From 2c352f050349a6f4c2184e6cd55e5a430ad82c89 Mon Sep 17 00:00:00 2001 From: v420v Date: Mon, 21 Oct 2024 13:24:50 +0900 Subject: [PATCH] first commit --- .github/workflows/ci.yml | 25 + .gitignore | 6 + Dockerfile | 14 + LICENSE.md | 7 + Makefile | 56 + README.md | 54 + bootstrap/codegen.s | 7948 +++++++++++++++ bootstrap/ibu.s | 393 + bootstrap/linux-syscall.s | 153 + bootstrap/parser.s | 13745 ++++++++++++++++++++++++++ bootstrap/preprocessor.s | 2498 +++++ bootstrap/std.s | 3219 ++++++ bootstrap/tokenizer.s | 3781 +++++++ docker-compose.yml | 10 + docs/docs.md | 296 + docs/docs_jp.md | 296 + example/age.ibu | 14 + example/fizzbuzz.ibu | 19 + example/link.ibu | 40 + lib/linux-syscall/header.ibu | 324 + lib/linux-syscall/linux-syscall.ibu | 342 + lib/runtime.s | 58 + lib/std/header.ibu | 42 + lib/std/std.ibu | 351 + main.ibu | 7 + src/codegen/codegen.ibu | 593 ++ src/codegen/header.ibu | 15 + src/ibu.ibu | 50 + src/parser/header.ibu | 174 + src/parser/parser.ibu | 1461 +++ src/preprocessor/header.ibu | 20 + src/preprocessor/preprocessor.ibu | 205 + src/tokenizer/header.ibu | 38 + src/tokenizer/tokenizer.ibu | 359 + 34 files changed, 36613 insertions(+) create mode 100644 .github/workflows/ci.yml create mode 100644 .gitignore create mode 100644 Dockerfile create mode 100644 LICENSE.md create mode 100644 Makefile create mode 100644 README.md create mode 100644 bootstrap/codegen.s create mode 100644 bootstrap/ibu.s create mode 100644 bootstrap/linux-syscall.s create mode 100644 bootstrap/parser.s create mode 100644 bootstrap/preprocessor.s create mode 100644 bootstrap/std.s create mode 100644 bootstrap/tokenizer.s create mode 100644 docker-compose.yml create mode 100644 docs/docs.md create mode 100644 docs/docs_jp.md create mode 100644 example/age.ibu create mode 100644 example/fizzbuzz.ibu create mode 100644 example/link.ibu create mode 100644 lib/linux-syscall/header.ibu create mode 100644 lib/linux-syscall/linux-syscall.ibu create mode 100644 lib/runtime.s create mode 100644 lib/std/header.ibu create mode 100644 lib/std/std.ibu create mode 100644 main.ibu create mode 100644 src/codegen/codegen.ibu create mode 100644 src/codegen/header.ibu create mode 100644 src/ibu.ibu create mode 100644 src/parser/header.ibu create mode 100644 src/parser/parser.ibu create mode 100644 src/preprocessor/header.ibu create mode 100644 src/preprocessor/preprocessor.ibu create mode 100644 src/tokenizer/header.ibu create mode 100644 src/tokenizer/tokenizer.ibu diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..8624c48 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,25 @@ +name: CI + +on: + push: + branches: [main] +jobs: + build: + strategy: + matrix: + os: ["ubuntu-latest"] + runs-on: ${{ matrix.os }} + + steps: + - name: Checkout ${{ github.event.repository.name }} + uses: actions/checkout@v2 + + - name: Build ${{ github.event.repository.name }} + run: make init + + - name: make self + run: | + make self + make self + make self + time make self diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f225287 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +*.o +*.out +main +ibuc +ibu +save \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..f1ac6c1 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,14 @@ +FROM --platform=linux/x86_64 ubuntu:latest + +RUN apt-get update && \ + apt-get -y install sudo && \ + sudo apt-get -y install build-essential && \ + sudo apt-get -y install git && \ + sudo apt-get -y install vim && \ + sudo apt-get -y install man && \ + sudo apt-get -y install manpages-dev && \ + apt-get install -y strace + +VOLUME /root/env +WORKDIR /root/env + diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..097386e --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,7 @@ +Copyright 2023 Ibuki Yoshida + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..1c8b8cf --- /dev/null +++ b/Makefile @@ -0,0 +1,56 @@ + +SHELL = /bin/bash +.SHELLFLAGS = -o pipefail -c + +.DEFAULT_GOAL := init + +.PHONY: up +up: + docker compose up -d + +.PHONY: down +down: + docker compose down + +.PHONY: ibulang +ibulang: + docker compose exec ibulang bash + +.PHONY: init +init: + as -o bootstrap/ibu.o bootstrap/ibu.s + as -o bootstrap/tokenizer.o bootstrap/tokenizer.s + as -o bootstrap/parser.o bootstrap/parser.s + as -o bootstrap/codegen.o bootstrap/codegen.s + as -o bootstrap/preprocessor.o bootstrap/preprocessor.s + as -o bootstrap/linux-syscall.o bootstrap/linux-syscall.s + as -o bootstrap/std.o bootstrap/std.s + as -o lib/runtime.o lib/runtime.s + ld -o ibuc bootstrap/ibu.o bootstrap/tokenizer.o bootstrap/parser.o bootstrap/codegen.o bootstrap/preprocessor.o bootstrap/linux-syscall.o bootstrap/std.o lib/runtime.o + +.PHONY: self +self: + ./ibuc src/ibu.ibu | as - -o src/ibu.o + ./ibuc src/tokenizer/tokenizer.ibu | as - -o src/tokenizer.o + ./ibuc src/parser/parser.ibu | as - -o src/parser.o + ./ibuc src/codegen/codegen.ibu | as - -o src/codegen.o + ./ibuc src/preprocessor/preprocessor.ibu | as - -o src/preprocessor.o + ./ibuc lib/linux-syscall/linux-syscall.ibu | as - -o lib/linux-syscall.o + ./ibuc lib/std/std.ibu | as - -o lib/std.o + as -o lib/runtime.o lib/runtime.s + ld -o ibuc src/tokenizer.o src/parser.o src/codegen.o src/preprocessor.o src/ibu.o lib/std.o lib/runtime.o lib/linux-syscall.o + +.PHONY: update_bootstrap +update_bootstrap: + ./ibuc src/ibu.ibu > bootstrap/ibu.s + ./ibuc src/tokenizer/tokenizer.ibu > bootstrap/tokenizer.s + ./ibuc src/parser/parser.ibu > bootstrap/parser.s + ./ibuc src/codegen/codegen.ibu > bootstrap/codegen.s + ./ibuc src/preprocessor/preprocessor.ibu > bootstrap/preprocessor.s + ./ibuc lib/linux-syscall/linux-syscall.ibu > bootstrap/linux-syscall.s + ./ibuc lib/std/std.ibu > bootstrap/std.s + +.PHONY: clean +clean: + rm *.o ibuc bootstrap/*.o src/*.o lib/*.o + diff --git a/README.md b/README.md new file mode 100644 index 0000000..9fca5a4 --- /dev/null +++ b/README.md @@ -0,0 +1,54 @@ +

The Ibu programming language

+ +[Changelog]() | +[Docs](docs/docs.md) | +[ドキュメント](docs/docs_jp.md) + +[![CI](https://github.com/v420v/ibu/actions/workflows/ci.yml/badge.svg)](https://github.com/v420v/ibu/actions/workflows/ci.yml) + +- No strict type checker +- No C-like pointer arithmetic +- No function-like macros +- No `break`, `continue` stmt. Use `goto` +- Allows `13 <= age < 20` instead of `13 <= age && age < 20` +- Variable length args `func(...)` can be accessed with built-in variables `argc i64` and `argv *i64` +- The compiler is written in itself +- Default args don't have to be on the end (WIP) + +```go +#include "std/header.ibu" + +func main() i32 { + let age i32 = 19; + + if 13 <= age < 20 { + printf("Teen-ager\n"); + } + + return 0; +} +``` + +## Installing the Language +```zsh +$ git clone git@github.com:v420v/ibu.git +$ cd ibu +$ make up +$ make ibulang +$ make init +``` + +## How to Use the Compiler +A simple example compile and run hello world +```zsh +$ ./ibuc main.ibu | as - -o main.o +$ as -o lib/runtime.o lib/runtime.s +$ ./ibuc lib/linux-syscall/linux-syscall.ibu | as - -o lib/linux-syscall.o +$ ./ibuc lib/std/std.ibu | as - -o lib/std.o +$ ld -o main main.o lib/runtime.o lib/linux-syscall.o lib/std.o +$ ./main +``` + +[documentation](docs/docs.md) + +[documentation[日本語版]](docs/docs_jp.md) diff --git a/bootstrap/codegen.s b/bootstrap/codegen.s new file mode 100644 index 0000000..43941b8 --- /dev/null +++ b/bootstrap/codegen.s @@ -0,0 +1,7948 @@ +.text +.global has_main +has_main: + push %rbp + movq %rsp, %rbp + subq $0, %rsp +.L.while.start.0: + movq $0, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setne %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.while.end.0 +.data +.L.str.0: + .byte 109 + .byte 97 + .byte 105 + .byte 110 + .byte 0 +.text + leaq .L.str.0(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.1 + movq $1, %rax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.1 +.L.else.1: +.L.end.1: + leaq 16(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $72, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + jmp .L.while.start.0 +.L.while.end.0: + movq $0, %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global assign_local_var_offset +assign_local_var_offset: + push %rbp + movq %rsp, %rbp + subq $0, %rsp + movq $0, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.2 + movq $16, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $16, %rax + movslq (%rax), %rax + push %rax + leaq align_to(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.2 +.L.else.2: +.L.end.2: + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $64, %rax + movslq (%rax), %rax + cmpq $0, %rax + sete %al + movzbq %al, %rax + cmpq $1, %rax + jne .L.else.3 + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $16, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $16, %rax + movq (%rax), %rax + addq $4, %rax + movslq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $16, %rax + movslq (%rax), %rax + pop %rdi + addl %edi, %eax + pop %rdi + movl %eax, (%rdi) + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $16, %rax + movslq (%rax), %rax + push %rax + movq $0, %rax + pop %rdi + subl %edi, %eax + pop %rdi + movl %eax, (%rdi) + jmp .L.end.3 +.L.else.3: +.L.end.3: + movq $0, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $72, %rax + movq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setne %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.4 + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $72, %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq assign_local_var_offset(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + jmp .L.end.4 +.L.else.4: +.L.end.4: + movq $16, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $16, %rax + movslq (%rax), %rax + push %rax + leaq align_to(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global assign_func_params_offset +assign_func_params_offset: + push %rbp + movq %rsp, %rbp + subq $0, %rsp + movq $0, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.5 + movq $0, %rax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.5 +.L.else.5: +.L.end.5: + movq $0, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $72, %rax + movq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setne %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.6 + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $72, %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq assign_func_params_offset(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + jmp .L.end.6 +.L.else.6: +.L.end.6: + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $64, %rax + movslq (%rax), %rax + cmpq $1, %rax + jne .L.else.7 + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $20, %rax + movslq (%rax), %rax + pop %rdi + movl %eax, (%rdi) + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $20, %rax + push %rax + movq $8, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $20, %rax + movslq (%rax), %rax + pop %rdi + addl %edi, %eax + pop %rdi + movl %eax, (%rdi) + jmp .L.end.7 +.L.else.7: +.L.end.7: + movq $0, %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global gen_node_block +gen_node_block: + push %rbp + movq %rsp, %rbp + subq $16, %rsp + leaq -12(%rbp), %rax + push %rax + movq $0, %rax + pop %rdi + movl %eax, (%rdi) +.L.while.start.8: + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movslq (%rax), %rax + push %rax + leaq -12(%rbp), %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setl %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.while.end.8 + leaq -8(%rbp), %rax + push %rax + leaq -12(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + push %rax + leaq vec_get(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq gen_stmt(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movq $1, %rax + push %rax + leaq -12(%rbp), %rax + push %rax + movq $1, %rax + push %rax + leaq -12(%rbp), %rax + movslq (%rax), %rax + pop %rdi + addl %edi, %eax + pop %rdi + movl %eax, (%rdi) + pop %rdi + subl %edi, %eax + jmp .L.while.start.8 +.L.while.end.8: + movq $0, %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global func_call_args_to_stack +func_call_args_to_stack: + push %rbp + movq %rsp, %rbp + subq $32, %rsp + movq $0, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.9 + movq $0, %rax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.9 +.L.else.9: +.L.end.9: + leaq -20(%rbp), %rax + push %rax + movq $0, %rax + pop %rdi + movl %eax, (%rdi) + leaq -16(%rbp), %rax + push %rax + movq $1, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movslq (%rax), %rax + pop %rdi + subl %edi, %eax + pop %rdi + movl %eax, (%rdi) +.L.while.start.10: + leaq -16(%rbp), %rax + movslq (%rax), %rax + push %rax + movq $0, %rax + pop %rdi + cmpl %edi, %eax + setle %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.while.end.10 + leaq -12(%rbp), %rax + push %rax + leaq -16(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + push %rax + leaq vec_get(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -12(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq gen_expr(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp +.data +.L.str.1: + .byte 9 + .byte 112 + .byte 117 + .byte 115 + .byte 104 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 97 + .byte 120 + .byte 10 + .byte 0 +.text + leaq .L.str.1(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leaq -20(%rbp), %rax + push %rax + movq $8, %rax + push %rax + leaq -20(%rbp), %rax + movslq (%rax), %rax + pop %rdi + addl %edi, %eax + pop %rdi + movl %eax, (%rdi) + leaq 32(%rbp), %rax + movq (%rax), %rax + addq $40, %rax + movslq (%rax), %rax + cmpq $0, %rax + je .L.false.12 + movq $1, %rax + push %rax + movq $2, %rax + push %rax + leaq 32(%rbp), %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + addq $8, %rax + movslq (%rax), %rax + pop %rdi + subl %edi, %eax + pop %rdi + subl %edi, %eax + push %rax + movq $1, %rax + push %rax + leaq -16(%rbp), %rax + movslq (%rax), %rax + pop %rdi + subl %edi, %eax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $0, %rax + je .L.false.12 + movq $1, %rax + jmp .L.end.12 +.L.false.12: + movq $0, %rax +.L.end.12: + cmpq $1, %rax + jne .L.else.11 + leaq -4(%rbp), %rax + push %rax + movq $0, %rax + pop %rdi + movl %eax, (%rdi) + movq $2, %rax + push %rax + leaq 32(%rbp), %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + addq $8, %rax + movslq (%rax), %rax + pop %rdi + subl %edi, %eax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setg %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.13 + leaq -4(%rbp), %rax + push %rax + movq $2, %rax + push %rax + leaq 32(%rbp), %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + addq $8, %rax + movslq (%rax), %rax + pop %rdi + subl %edi, %eax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movslq (%rax), %rax + pop %rdi + subl %edi, %eax + pop %rdi + movl %eax, (%rdi) + jmp .L.end.13 +.L.else.13: +.L.end.13: +.data +.L.str.2: + .byte 9 + .byte 108 + .byte 101 + .byte 97 + .byte 113 + .byte 32 + .byte 40 + .byte 37 + .byte 37 + .byte 114 + .byte 115 + .byte 112 + .byte 41 + .byte 44 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 97 + .byte 120 + .byte 10 + .byte 0 +.text + leaq .L.str.2(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp +.data +.L.str.3: + .byte 9 + .byte 112 + .byte 117 + .byte 115 + .byte 104 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 97 + .byte 120 + .byte 10 + .byte 0 +.text + leaq .L.str.3(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leaq -4(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq (%rsp), %rax + push %rax + push $1 +.data +.L.str.4: + .byte 9 + .byte 112 + .byte 117 + .byte 115 + .byte 104 + .byte 32 + .byte 36 + .byte 37 + .byte 100 + .byte 10 + .byte 0 +.text + leaq .L.str.4(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $32, %rsp + leaq -20(%rbp), %rax + push %rax + movq $16, %rax + push %rax + leaq -20(%rbp), %rax + movslq (%rax), %rax + pop %rdi + addl %edi, %eax + pop %rdi + movl %eax, (%rdi) + jmp .L.end.11 +.L.else.11: +.L.end.11: + movq $1, %rax + push %rax + leaq -16(%rbp), %rax + push %rax + movq $1, %rax + push %rax + leaq -16(%rbp), %rax + movslq (%rax), %rax + pop %rdi + subl %edi, %eax + pop %rdi + movl %eax, (%rdi) + pop %rdi + addl %edi, %eax + jmp .L.while.start.10 +.L.while.end.10: + leaq -20(%rbp), %rax + movslq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global gen_condition_store +gen_condition_store: + push %rbp + movq %rsp, %rbp + subq $0, %rsp + movq $8, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $4, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $0, %rax + jne .L.true.16 + movq $7, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmp $0, %rax + jne .L.true.16 + mov $0, %rax + jmp .L.end.16 +.L.true.16: + mov $1, %rax +.L.end.16: + cmpq $0, %rax + jne .L.true.15 + movq $13, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmp $0, %rax + jne .L.true.15 + mov $0, %rax + jmp .L.end.15 +.L.true.15: + mov $1, %rax +.L.end.15: + cmpq $1, %rax + jne .L.else.14 +.data +.L.str.5: + .byte 9 + .byte 109 + .byte 111 + .byte 118 + .byte 122 + .byte 98 + .byte 113 + .byte 32 + .byte 37 + .byte 37 + .byte 97 + .byte 108 + .byte 44 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 97 + .byte 120 + .byte 10 + .byte 0 +.text + leaq .L.str.5(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.end.14 +.L.else.14: +.data +.L.str.6: + .byte 9 + .byte 109 + .byte 111 + .byte 118 + .byte 122 + .byte 98 + .byte 108 + .byte 32 + .byte 37 + .byte 37 + .byte 97 + .byte 108 + .byte 44 + .byte 32 + .byte 37 + .byte 37 + .byte 101 + .byte 97 + .byte 120 + .byte 10 + .byte 0 +.text + leaq .L.str.6(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp +.L.end.14: + leave + ret +.global gen_load +gen_load: + push %rbp + movq %rsp, %rbp + subq $0, %rsp + movq $5, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $0, %rax + jne .L.true.19 + movq $13, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmp $0, %rax + jne .L.true.19 + mov $0, %rax + jmp .L.end.19 +.L.true.19: + mov $1, %rax +.L.end.19: + cmpq $0, %rax + jne .L.true.18 + movq $6, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmp $0, %rax + jne .L.true.18 + mov $0, %rax + jmp .L.end.18 +.L.true.18: + mov $1, %rax +.L.end.18: + cmpq $1, %rax + jne .L.else.17 + movq $0, %rax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.17 +.L.else.17: +.L.end.17: + movq $8, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $4, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.20 +.data +.L.str.7: + .byte 9 + .byte 109 + .byte 111 + .byte 118 + .byte 113 + .byte 32 + .byte 40 + .byte 37 + .byte 37 + .byte 114 + .byte 97 + .byte 120 + .byte 41 + .byte 44 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 97 + .byte 120 + .byte 10 + .byte 0 +.text + leaq .L.str.7(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.end.20 +.L.else.20: + movq $4, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $4, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.21 +.data +.L.str.8: + .byte 9 + .byte 109 + .byte 111 + .byte 118 + .byte 115 + .byte 108 + .byte 113 + .byte 32 + .byte 40 + .byte 37 + .byte 37 + .byte 114 + .byte 97 + .byte 120 + .byte 41 + .byte 44 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 97 + .byte 120 + .byte 10 + .byte 0 +.text + leaq .L.str.8(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.end.21 +.L.else.21: + movq $2, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $4, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.22 + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $60, %rax + movslq (%rax), %rax + cmpq $1, %rax + jne .L.else.23 +.data +.L.str.9: + .byte 9 + .byte 109 + .byte 111 + .byte 118 + .byte 122 + .byte 119 + .byte 108 + .byte 32 + .byte 40 + .byte 37 + .byte 37 + .byte 114 + .byte 97 + .byte 120 + .byte 41 + .byte 44 + .byte 32 + .byte 37 + .byte 37 + .byte 101 + .byte 97 + .byte 120 + .byte 10 + .byte 0 +.text + leaq .L.str.9(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.end.23 +.L.else.23: +.data +.L.str.10: + .byte 9 + .byte 109 + .byte 111 + .byte 118 + .byte 115 + .byte 119 + .byte 108 + .byte 32 + .byte 40 + .byte 37 + .byte 37 + .byte 114 + .byte 97 + .byte 120 + .byte 41 + .byte 44 + .byte 32 + .byte 37 + .byte 37 + .byte 101 + .byte 97 + .byte 120 + .byte 10 + .byte 0 +.text + leaq .L.str.10(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp +.L.end.23: + jmp .L.end.22 +.L.else.22: + movq $1, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $4, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.24 + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $60, %rax + movslq (%rax), %rax + cmpq $1, %rax + jne .L.else.25 +.data +.L.str.11: + .byte 9 + .byte 109 + .byte 111 + .byte 118 + .byte 122 + .byte 98 + .byte 108 + .byte 32 + .byte 40 + .byte 37 + .byte 37 + .byte 114 + .byte 97 + .byte 120 + .byte 41 + .byte 44 + .byte 32 + .byte 37 + .byte 37 + .byte 101 + .byte 97 + .byte 120 + .byte 10 + .byte 0 +.text + leaq .L.str.11(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.end.25 +.L.else.25: +.data +.L.str.12: + .byte 9 + .byte 109 + .byte 111 + .byte 118 + .byte 115 + .byte 98 + .byte 108 + .byte 32 + .byte 40 + .byte 37 + .byte 37 + .byte 114 + .byte 97 + .byte 120 + .byte 41 + .byte 44 + .byte 32 + .byte 37 + .byte 37 + .byte 101 + .byte 97 + .byte 120 + .byte 10 + .byte 0 +.text + leaq .L.str.12(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp +.L.end.25: + jmp .L.end.24 +.L.else.24: +.data +.L.str.13: + .byte 117 + .byte 110 + .byte 114 + .byte 101 + .byte 97 + .byte 99 + .byte 104 + .byte 97 + .byte 98 + .byte 108 + .byte 101 + .byte 10 + .byte 0 +.text + leaq .L.str.13(%rip), %rax + push %rax + leaq eprintf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movq $1, %rax + push %rax + leaq exit(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp +.L.end.24: +.L.end.22: +.L.end.21: +.L.end.20: + movq $0, %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global gen_store +gen_store: + push %rbp + movq %rsp, %rbp + subq $16, %rsp + movq $5, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.26 + leaq -4(%rbp), %rax + push %rax + movq $0, %rax + pop %rdi + movl %eax, (%rdi) +.L.while.start.27: + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $4, %rax + movslq (%rax), %rax + push %rax + leaq -4(%rbp), %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setl %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.while.end.27 + leaq -4(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq (%rsp), %rax + push %rax + push $1 +.data +.L.str.14: + .byte 9 + .byte 109 + .byte 111 + .byte 118 + .byte 98 + .byte 32 + .byte 37 + .byte 100 + .byte 40 + .byte 37 + .byte 37 + .byte 114 + .byte 97 + .byte 120 + .byte 41 + .byte 44 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 56 + .byte 98 + .byte 10 + .byte 0 +.text + leaq .L.str.14(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $32, %rsp + leaq -4(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq (%rsp), %rax + push %rax + push $1 +.data +.L.str.15: + .byte 9 + .byte 109 + .byte 111 + .byte 118 + .byte 98 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 56 + .byte 98 + .byte 44 + .byte 32 + .byte 37 + .byte 100 + .byte 40 + .byte 37 + .byte 37 + .byte 114 + .byte 100 + .byte 105 + .byte 41 + .byte 10 + .byte 0 +.text + leaq .L.str.15(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $32, %rsp + movq $1, %rax + push %rax + leaq -4(%rbp), %rax + push %rax + movq $1, %rax + push %rax + leaq -4(%rbp), %rax + movslq (%rax), %rax + pop %rdi + addl %edi, %eax + pop %rdi + movl %eax, (%rdi) + pop %rdi + subl %edi, %eax + jmp .L.while.start.27 +.L.while.end.27: + movq $0, %rax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.26 +.L.else.26: +.L.end.26: + movq $1, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $4, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.28 +.data +.L.str.16: + .byte 9 + .byte 109 + .byte 111 + .byte 118 + .byte 98 + .byte 32 + .byte 37 + .byte 37 + .byte 97 + .byte 108 + .byte 44 + .byte 32 + .byte 40 + .byte 37 + .byte 37 + .byte 114 + .byte 100 + .byte 105 + .byte 41 + .byte 10 + .byte 0 +.text + leaq .L.str.16(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.end.28 +.L.else.28: + movq $2, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $4, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.29 +.data +.L.str.17: + .byte 9 + .byte 109 + .byte 111 + .byte 118 + .byte 119 + .byte 32 + .byte 37 + .byte 37 + .byte 97 + .byte 120 + .byte 44 + .byte 32 + .byte 40 + .byte 37 + .byte 37 + .byte 114 + .byte 100 + .byte 105 + .byte 41 + .byte 10 + .byte 0 +.text + leaq .L.str.17(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.end.29 +.L.else.29: + movq $4, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $4, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.30 +.data +.L.str.18: + .byte 9 + .byte 109 + .byte 111 + .byte 118 + .byte 108 + .byte 32 + .byte 37 + .byte 37 + .byte 101 + .byte 97 + .byte 120 + .byte 44 + .byte 32 + .byte 40 + .byte 37 + .byte 37 + .byte 114 + .byte 100 + .byte 105 + .byte 41 + .byte 10 + .byte 0 +.text + leaq .L.str.18(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.end.30 +.L.else.30: +.data +.L.str.19: + .byte 9 + .byte 109 + .byte 111 + .byte 118 + .byte 113 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 97 + .byte 120 + .byte 44 + .byte 32 + .byte 40 + .byte 37 + .byte 37 + .byte 114 + .byte 100 + .byte 105 + .byte 41 + .byte 10 + .byte 0 +.text + leaq .L.str.19(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp +.L.end.30: +.L.end.29: +.L.end.28: + movq $0, %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global gen_addr +gen_addr: + push %rbp + movq %rsp, %rbp + subq $0, %rsp + movq $28, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.31 + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq gen_addr(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $104, %rax + movslq (%rax), %rax + push %rax + leaq (%rsp), %rax + push %rax + push $1 +.data +.L.str.20: + .byte 9 + .byte 97 + .byte 100 + .byte 100 + .byte 113 + .byte 32 + .byte 36 + .byte 37 + .byte 100 + .byte 44 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 97 + .byte 120 + .byte 10 + .byte 0 +.text + leaq .L.str.20(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $32, %rsp + jmp .L.end.31 +.L.else.31: + movq $14, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.32 + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $80, %rax + movq (%rax), %rax + addq $68, %rax + movslq (%rax), %rax + cmpq $1, %rax + jne .L.else.33 + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $80, %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + push %rax + leaq (%rsp), %rax + push %rax + push $1 +.data +.L.str.21: + .byte 9 + .byte 108 + .byte 101 + .byte 97 + .byte 113 + .byte 32 + .byte 37 + .byte 115 + .byte 40 + .byte 37 + .byte 37 + .byte 114 + .byte 105 + .byte 112 + .byte 41 + .byte 44 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 97 + .byte 120 + .byte 10 + .byte 0 +.text + leaq .L.str.21(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $32, %rsp + jmp .L.end.33 +.L.else.33: + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $80, %rax + movq (%rax), %rax + addq $24, %rax + movslq (%rax), %rax + push %rax + leaq (%rsp), %rax + push %rax + push $1 +.data +.L.str.22: + .byte 9 + .byte 108 + .byte 101 + .byte 97 + .byte 113 + .byte 32 + .byte 37 + .byte 100 + .byte 40 + .byte 37 + .byte 37 + .byte 114 + .byte 98 + .byte 112 + .byte 41 + .byte 44 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 97 + .byte 120 + .byte 10 + .byte 0 +.text + leaq .L.str.22(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $32, %rsp +.L.end.33: + jmp .L.end.32 +.L.else.32: + movq $20, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.34 + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq gen_expr(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + jmp .L.end.34 +.L.else.34: +.L.end.34: +.L.end.32: +.L.end.31: + movq $0, %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global gen_lhs_rhs +gen_lhs_rhs: + push %rbp + movq %rsp, %rbp + subq $0, %rsp + leaq 32(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq gen_expr(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp +.data +.L.str.23: + .byte 9 + .byte 112 + .byte 117 + .byte 115 + .byte 104 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 97 + .byte 120 + .byte 10 + .byte 0 +.text + leaq .L.str.23(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leaq 24(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq gen_expr(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp +.data +.L.str.24: + .byte 9 + .byte 112 + .byte 111 + .byte 112 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 100 + .byte 105 + .byte 10 + .byte 0 +.text + leaq .L.str.24(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leave + ret +.global gen_stmt +gen_stmt: + push %rbp + movq %rsp, %rbp + subq $16, %rsp + leaq -4(%rbp), %rax + push %rax + movq $0, %rax + pop %rdi + movl %eax, (%rdi) + movq $29, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.35 + movq $0, %rax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.35 +.L.else.35: +.L.end.35: + movq $21, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.36 + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq gen_node_block(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movq $0, %rax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.36 +.L.else.36: +.L.end.36: + movq $22, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.37 + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq gen_expr(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movq $0, %rax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.37 +.L.else.37: +.L.end.37: + movq $32, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.38 + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq gen_expr(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp +.data +.L.str.25: + .byte 9 + .byte 109 + .byte 111 + .byte 118 + .byte 113 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 97 + .byte 120 + .byte 44 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 100 + .byte 105 + .byte 10 + .byte 0 +.text + leaq .L.str.25(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + addq $4, %rax + movslq (%rax), %rax + push %rax + leaq (%rsp), %rax + push %rax + push $1 +.data +.L.str.26: + .byte 9 + .byte 109 + .byte 111 + .byte 118 + .byte 113 + .byte 32 + .byte 36 + .byte 37 + .byte 100 + .byte 44 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 99 + .byte 120 + .byte 10 + .byte 0 +.text + leaq .L.str.26(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $32, %rsp +.data +.L.str.27: + .byte 9 + .byte 109 + .byte 111 + .byte 118 + .byte 32 + .byte 36 + .byte 48 + .byte 44 + .byte 32 + .byte 37 + .byte 37 + .byte 97 + .byte 108 + .byte 10 + .byte 0 +.text + leaq .L.str.27(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp +.data +.L.str.28: + .byte 9 + .byte 114 + .byte 101 + .byte 112 + .byte 32 + .byte 115 + .byte 116 + .byte 111 + .byte 115 + .byte 98 + .byte 10 + .byte 0 +.text + leaq .L.str.28(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movq $0, %rax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.38 +.L.else.38: +.L.end.38: + movq $18, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.39 + movq $0, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setne %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.40 + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq gen_expr(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + jmp .L.end.40 +.L.else.40: +.L.end.40: +.data +.L.str.29: + .byte 9 + .byte 109 + .byte 111 + .byte 118 + .byte 113 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 98 + .byte 112 + .byte 44 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 115 + .byte 112 + .byte 10 + .byte 0 +.text + leaq .L.str.29(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp +.data +.L.str.30: + .byte 9 + .byte 112 + .byte 111 + .byte 112 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 98 + .byte 112 + .byte 10 + .byte 0 +.text + leaq .L.str.30(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp +.data +.L.str.31: + .byte 9 + .byte 114 + .byte 101 + .byte 116 + .byte 113 + .byte 10 + .byte 0 +.text + leaq .L.str.31(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movq $0, %rax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.39 +.L.else.39: +.L.end.39: + movq $15, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.41 + leaq -4(%rbp), %rax + push %rax + movq $1, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + push %rax + movq $1, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + addl %edi, %eax + pop %rdi + movl %eax, (%rdi) + pop %rdi + subl %edi, %eax + pop %rdi + movl %eax, (%rdi) + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $48, %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq gen_expr(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp +.data +.L.str.32: + .byte 9 + .byte 99 + .byte 109 + .byte 112 + .byte 113 + .byte 32 + .byte 36 + .byte 49 + .byte 44 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 97 + .byte 120 + .byte 10 + .byte 0 +.text + leaq .L.str.32(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leaq -4(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq (%rsp), %rax + push %rax + push $1 +.data +.L.str.33: + .byte 9 + .byte 106 + .byte 110 + .byte 101 + .byte 32 + .byte 46 + .byte 76 + .byte 46 + .byte 101 + .byte 108 + .byte 115 + .byte 101 + .byte 46 + .byte 37 + .byte 100 + .byte 10 + .byte 0 +.text + leaq .L.str.33(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $32, %rsp + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq gen_stmt(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + leaq -4(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq (%rsp), %rax + push %rax + push $1 +.data +.L.str.34: + .byte 9 + .byte 106 + .byte 109 + .byte 112 + .byte 32 + .byte 46 + .byte 76 + .byte 46 + .byte 101 + .byte 110 + .byte 100 + .byte 46 + .byte 37 + .byte 100 + .byte 10 + .byte 0 +.text + leaq .L.str.34(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $32, %rsp + leaq -4(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq (%rsp), %rax + push %rax + push $1 +.data +.L.str.35: + .byte 46 + .byte 76 + .byte 46 + .byte 101 + .byte 108 + .byte 115 + .byte 101 + .byte 46 + .byte 37 + .byte 100 + .byte 58 + .byte 10 + .byte 0 +.text + leaq .L.str.35(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $32, %rsp + movq $0, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $40, %rax + movq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setne %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.42 + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $40, %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq gen_stmt(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + jmp .L.end.42 +.L.else.42: +.L.end.42: + leaq -4(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq (%rsp), %rax + push %rax + push $1 +.data +.L.str.36: + .byte 46 + .byte 76 + .byte 46 + .byte 101 + .byte 110 + .byte 100 + .byte 46 + .byte 37 + .byte 100 + .byte 58 + .byte 10 + .byte 0 +.text + leaq .L.str.36(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $32, %rsp + movq $0, %rax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.41 +.L.else.41: +.L.end.41: + movq $23, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.43 + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $56, %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movq (%rax), %rax + push %rax + leaq (%rsp), %rax + push %rax + push $2 +.data +.L.str.37: + .byte 9 + .byte 106 + .byte 109 + .byte 112 + .byte 32 + .byte 46 + .byte 76 + .byte 46 + .byte 37 + .byte 115 + .byte 46 + .byte 37 + .byte 115 + .byte 10 + .byte 0 +.text + leaq .L.str.37(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $40, %rsp + movq $0, %rax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.43 +.L.else.43: +.L.end.43: + movq $24, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.44 + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $56, %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movq (%rax), %rax + push %rax + leaq (%rsp), %rax + push %rax + push $2 +.data +.L.str.38: + .byte 46 + .byte 76 + .byte 46 + .byte 37 + .byte 115 + .byte 46 + .byte 37 + .byte 115 + .byte 58 + .byte 10 + .byte 0 +.text + leaq .L.str.38(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $40, %rsp + movq $0, %rax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.44 +.L.else.44: +.L.end.44: + movq $16, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.45 + leaq -4(%rbp), %rax + push %rax + movq $1, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + push %rax + movq $1, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + addl %edi, %eax + pop %rdi + movl %eax, (%rdi) + pop %rdi + subl %edi, %eax + pop %rdi + movl %eax, (%rdi) + leaq -4(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq (%rsp), %rax + push %rax + push $1 +.data +.L.str.39: + .byte 46 + .byte 76 + .byte 46 + .byte 119 + .byte 104 + .byte 105 + .byte 108 + .byte 101 + .byte 46 + .byte 115 + .byte 116 + .byte 97 + .byte 114 + .byte 116 + .byte 46 + .byte 37 + .byte 100 + .byte 58 + .byte 10 + .byte 0 +.text + leaq .L.str.39(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $32, %rsp + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $48, %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq gen_expr(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp +.data +.L.str.40: + .byte 9 + .byte 99 + .byte 109 + .byte 112 + .byte 113 + .byte 32 + .byte 36 + .byte 49 + .byte 44 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 97 + .byte 120 + .byte 10 + .byte 0 +.text + leaq .L.str.40(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leaq -4(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq (%rsp), %rax + push %rax + push $1 +.data +.L.str.41: + .byte 9 + .byte 106 + .byte 110 + .byte 101 + .byte 32 + .byte 46 + .byte 76 + .byte 46 + .byte 119 + .byte 104 + .byte 105 + .byte 108 + .byte 101 + .byte 46 + .byte 101 + .byte 110 + .byte 100 + .byte 46 + .byte 37 + .byte 100 + .byte 10 + .byte 0 +.text + leaq .L.str.41(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $32, %rsp + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq gen_stmt(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + leaq -4(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq (%rsp), %rax + push %rax + push $1 +.data +.L.str.42: + .byte 9 + .byte 106 + .byte 109 + .byte 112 + .byte 32 + .byte 46 + .byte 76 + .byte 46 + .byte 119 + .byte 104 + .byte 105 + .byte 108 + .byte 101 + .byte 46 + .byte 115 + .byte 116 + .byte 97 + .byte 114 + .byte 116 + .byte 46 + .byte 37 + .byte 100 + .byte 10 + .byte 0 +.text + leaq .L.str.42(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $32, %rsp + leaq -4(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq (%rsp), %rax + push %rax + push $1 +.data +.L.str.43: + .byte 46 + .byte 76 + .byte 46 + .byte 119 + .byte 104 + .byte 105 + .byte 108 + .byte 101 + .byte 46 + .byte 101 + .byte 110 + .byte 100 + .byte 46 + .byte 37 + .byte 100 + .byte 58 + .byte 10 + .byte 0 +.text + leaq .L.str.43(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $32, %rsp + movq $0, %rax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.45 +.L.else.45: +.L.end.45: + movq $17, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.46 + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq gen_addr(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp +.data +.L.str.44: + .byte 9 + .byte 112 + .byte 117 + .byte 115 + .byte 104 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 97 + .byte 120 + .byte 10 + .byte 0 +.text + leaq .L.str.44(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $16, %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq gen_expr(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp +.data +.L.str.45: + .byte 9 + .byte 112 + .byte 111 + .byte 112 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 100 + .byte 105 + .byte 10 + .byte 0 +.text + leaq .L.str.45(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + push %rax + leaq gen_store(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movq $0, %rax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.46 +.L.else.46: +.L.end.46: +.data +.L.str.46: + .byte 103 + .byte 101 + .byte 110 + .byte 95 + .byte 115 + .byte 116 + .byte 109 + .byte 116 + .byte 32 + .byte 117 + .byte 110 + .byte 114 + .byte 101 + .byte 97 + .byte 99 + .byte 104 + .byte 97 + .byte 98 + .byte 108 + .byte 101 + .byte 10 + .byte 0 +.text + leaq .L.str.46(%rip), %rax + push %rax + leaq eprintf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movq $1, %rax + push %rax + leaq exit(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leave + ret +.global gen_expr +gen_expr: + push %rbp + movq %rsp, %rbp + subq $16, %rsp + leaq -16(%rbp), %rax + push %rax + movq $0, %rax + pop %rdi + movl %eax, (%rdi) + movq $29, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.47 + movq $0, %rax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.47 +.L.else.47: +.L.end.47: + movq $28, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.48 + leaq 24(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq gen_addr(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq gen_load(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movq $0, %rax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.48 +.L.else.48: +.L.end.48: + movq $12, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.49 + leaq -16(%rbp), %rax + push %rax + movq $1, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $4, %rax + push %rax + movq $1, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $4, %rax + movslq (%rax), %rax + pop %rdi + addl %edi, %eax + pop %rdi + movl %eax, (%rdi) + pop %rdi + subl %edi, %eax + pop %rdi + movl %eax, (%rdi) +.data +.L.str.47: + .byte 46 + .byte 100 + .byte 97 + .byte 116 + .byte 97 + .byte 10 + .byte 0 +.text + leaq .L.str.47(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leaq -16(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq (%rsp), %rax + push %rax + push $1 +.data +.L.str.48: + .byte 46 + .byte 76 + .byte 46 + .byte 115 + .byte 116 + .byte 114 + .byte 46 + .byte 37 + .byte 100 + .byte 58 + .byte 10 + .byte 0 +.text + leaq .L.str.48(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $32, %rsp + leaq -12(%rbp), %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $72, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) +.L.while.start.50: + movq $0, %rax + push %rax + leaq -12(%rbp), %rax + movq (%rax), %rax + movzbl (%rax), %eax + pop %rdi + cmpl %edi, %eax + setne %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.while.end.50 + leaq -12(%rbp), %rax + movq (%rax), %rax + movzbl (%rax), %eax + push %rax + leaq (%rsp), %rax + push %rax + push $1 +.data +.L.str.49: + .byte 9 + .byte 46 + .byte 98 + .byte 121 + .byte 116 + .byte 101 + .byte 32 + .byte 37 + .byte 100 + .byte 10 + .byte 0 +.text + leaq .L.str.49(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $32, %rsp + movq $1, %rax + push %rax + leaq -12(%rbp), %rax + push %rax + movq $1, %rax + push %rax + leaq -12(%rbp), %rax + movq (%rax), %rax + pop %rdi + addq %rdi, %rax + pop %rdi + movq %rax, (%rdi) + pop %rdi + subq %rdi, %rax + jmp .L.while.start.50 +.L.while.end.50: +.data +.L.str.50: + .byte 9 + .byte 46 + .byte 98 + .byte 121 + .byte 116 + .byte 101 + .byte 32 + .byte 48 + .byte 10 + .byte 0 +.text + leaq .L.str.50(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp +.data +.L.str.51: + .byte 46 + .byte 116 + .byte 101 + .byte 120 + .byte 116 + .byte 10 + .byte 0 +.text + leaq .L.str.51(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leaq -16(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq (%rsp), %rax + push %rax + push $1 +.data +.L.str.52: + .byte 9 + .byte 108 + .byte 101 + .byte 97 + .byte 113 + .byte 32 + .byte 46 + .byte 76 + .byte 46 + .byte 115 + .byte 116 + .byte 114 + .byte 46 + .byte 37 + .byte 100 + .byte 40 + .byte 37 + .byte 37 + .byte 114 + .byte 105 + .byte 112 + .byte 41 + .byte 44 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 97 + .byte 120 + .byte 10 + .byte 0 +.text + leaq .L.str.52(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $32, %rsp + movq $0, %rax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.49 +.L.else.49: +.L.end.49: + movq $13, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.51 + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $64, %rax + movslq (%rax), %rax + push %rax + leaq (%rsp), %rax + push %rax + push $1 +.data +.L.str.53: + .byte 9 + .byte 109 + .byte 111 + .byte 118 + .byte 113 + .byte 32 + .byte 36 + .byte 37 + .byte 100 + .byte 44 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 97 + .byte 120 + .byte 10 + .byte 0 +.text + leaq .L.str.53(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $32, %rsp + movq $0, %rax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.51 +.L.else.51: +.L.end.51: + movq $17, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.52 + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq gen_addr(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp +.data +.L.str.54: + .byte 9 + .byte 112 + .byte 117 + .byte 115 + .byte 104 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 97 + .byte 120 + .byte 10 + .byte 0 +.text + leaq .L.str.54(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $16, %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq gen_expr(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp +.data +.L.str.55: + .byte 9 + .byte 112 + .byte 111 + .byte 112 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 100 + .byte 105 + .byte 10 + .byte 0 +.text + leaq .L.str.55(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + push %rax + leaq gen_store(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movq $0, %rax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.52 +.L.else.52: +.L.end.52: + movq $14, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.53 + leaq 24(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq gen_addr(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq gen_load(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movq $0, %rax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.53 +.L.else.53: +.L.end.53: + movq $25, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.54 + leaq -4(%rbp), %rax + push %rax + movq $0, %rax + pop %rdi + movl %eax, (%rdi) + leaq -4(%rbp), %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $112, %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq func_call_args_to_stack(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + pop %rdi + movl %eax, (%rdi) + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq gen_expr(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp +.data +.L.str.56: + .byte 9 + .byte 109 + .byte 111 + .byte 118 + .byte 113 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 97 + .byte 120 + .byte 44 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 49 + .byte 48 + .byte 10 + .byte 0 +.text + leaq .L.str.56(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp +.data +.L.str.57: + .byte 9 + .byte 109 + .byte 111 + .byte 118 + .byte 113 + .byte 32 + .byte 36 + .byte 48 + .byte 44 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 97 + .byte 120 + .byte 10 + .byte 0 +.text + leaq .L.str.57(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp +.data +.L.str.58: + .byte 9 + .byte 99 + .byte 97 + .byte 108 + .byte 108 + .byte 113 + .byte 32 + .byte 42 + .byte 37 + .byte 37 + .byte 114 + .byte 49 + .byte 48 + .byte 10 + .byte 0 +.text + leaq .L.str.58(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leaq -4(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq (%rsp), %rax + push %rax + push $1 +.data +.L.str.59: + .byte 9 + .byte 97 + .byte 100 + .byte 100 + .byte 113 + .byte 32 + .byte 36 + .byte 37 + .byte 100 + .byte 44 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 115 + .byte 112 + .byte 10 + .byte 0 +.text + leaq .L.str.59(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $32, %rsp + movq $4, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.55 +.data +.L.str.60: + .byte 9 + .byte 109 + .byte 111 + .byte 118 + .byte 122 + .byte 120 + .byte 32 + .byte 37 + .byte 37 + .byte 97 + .byte 108 + .byte 44 + .byte 32 + .byte 37 + .byte 37 + .byte 101 + .byte 97 + .byte 120 + .byte 10 + .byte 0 +.text + leaq .L.str.60(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.end.55 +.L.else.55: + movq $3, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.56 +.data +.L.str.61: + .byte 9 + .byte 109 + .byte 111 + .byte 118 + .byte 115 + .byte 98 + .byte 108 + .byte 32 + .byte 37 + .byte 37 + .byte 97 + .byte 108 + .byte 44 + .byte 32 + .byte 37 + .byte 37 + .byte 101 + .byte 97 + .byte 120 + .byte 10 + .byte 0 +.text + leaq .L.str.61(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.end.56 +.L.else.56: + movq $11, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.57 +.data +.L.str.62: + .byte 9 + .byte 109 + .byte 111 + .byte 118 + .byte 122 + .byte 98 + .byte 108 + .byte 32 + .byte 37 + .byte 37 + .byte 97 + .byte 108 + .byte 44 + .byte 32 + .byte 37 + .byte 37 + .byte 101 + .byte 97 + .byte 120 + .byte 10 + .byte 0 +.text + leaq .L.str.62(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.end.57 +.L.else.57: + movq $2, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.58 +.data +.L.str.63: + .byte 9 + .byte 109 + .byte 111 + .byte 118 + .byte 115 + .byte 119 + .byte 108 + .byte 32 + .byte 37 + .byte 37 + .byte 97 + .byte 120 + .byte 44 + .byte 32 + .byte 37 + .byte 37 + .byte 101 + .byte 97 + .byte 120 + .byte 10 + .byte 0 +.text + leaq .L.str.63(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.end.58 +.L.else.58: + movq $10, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.59 +.data +.L.str.64: + .byte 9 + .byte 109 + .byte 111 + .byte 118 + .byte 122 + .byte 119 + .byte 108 + .byte 32 + .byte 37 + .byte 37 + .byte 97 + .byte 120 + .byte 44 + .byte 32 + .byte 37 + .byte 37 + .byte 101 + .byte 97 + .byte 120 + .byte 10 + .byte 0 +.text + leaq .L.str.64(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.end.59 +.L.else.59: +.L.end.59: +.L.end.58: +.L.end.57: +.L.end.56: +.L.end.55: + movq $0, %rax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.54 +.L.else.54: +.L.end.54: + movq $22, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.60 + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq gen_expr(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movq $0, %rax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.60 +.L.else.60: +.L.end.60: + movq $19, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.61 + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq gen_addr(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movq $0, %rax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.61 +.L.else.61: +.L.end.61: + movq $20, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.62 + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq gen_expr(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq gen_load(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movq $0, %rax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.62 +.L.else.62: +.L.end.62: + movq $5, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.63 + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq gen_expr(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp +.data +.L.str.65: + .byte 9 + .byte 99 + .byte 109 + .byte 112 + .byte 113 + .byte 32 + .byte 36 + .byte 48 + .byte 44 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 97 + .byte 120 + .byte 10 + .byte 0 +.text + leaq .L.str.65(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp +.data +.L.str.66: + .byte 9 + .byte 115 + .byte 101 + .byte 116 + .byte 101 + .byte 32 + .byte 37 + .byte 37 + .byte 97 + .byte 108 + .byte 10 + .byte 0 +.text + leaq .L.str.66(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp +.data +.L.str.67: + .byte 9 + .byte 109 + .byte 111 + .byte 118 + .byte 122 + .byte 98 + .byte 113 + .byte 32 + .byte 37 + .byte 37 + .byte 97 + .byte 108 + .byte 44 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 97 + .byte 120 + .byte 10 + .byte 0 +.text + leaq .L.str.67(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movq $0, %rax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.63 +.L.else.63: +.L.end.63: + movq $0, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.64 + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $16, %rax + movq (%rax), %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq gen_lhs_rhs(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + movq $7, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $0, %rax + jne .L.true.66 + movq $13, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmp $0, %rax + jne .L.true.66 + mov $0, %rax + jmp .L.end.66 +.L.true.66: + mov $1, %rax +.L.end.66: + cmpq $1, %rax + jne .L.else.65 +.data +.L.str.68: + .byte 9 + .byte 97 + .byte 100 + .byte 100 + .byte 113 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 100 + .byte 105 + .byte 44 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 97 + .byte 120 + .byte 10 + .byte 0 +.text + leaq .L.str.68(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.end.65 +.L.else.65: +.data +.L.str.69: + .byte 9 + .byte 97 + .byte 100 + .byte 100 + .byte 108 + .byte 32 + .byte 37 + .byte 37 + .byte 101 + .byte 100 + .byte 105 + .byte 44 + .byte 32 + .byte 37 + .byte 37 + .byte 101 + .byte 97 + .byte 120 + .byte 10 + .byte 0 +.text + leaq .L.str.69(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp +.L.end.65: + movq $0, %rax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.64 +.L.else.64: +.L.end.64: + movq $30, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.67 + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $16, %rax + movq (%rax), %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq gen_lhs_rhs(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp +.data +.L.str.70: + .byte 9 + .byte 109 + .byte 111 + .byte 118 + .byte 113 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 100 + .byte 105 + .byte 44 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 99 + .byte 120 + .byte 10 + .byte 0 +.text + leaq .L.str.70(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movq $13, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $0, %rax + jne .L.true.70 + movq $7, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmp $0, %rax + jne .L.true.70 + mov $0, %rax + jmp .L.end.70 +.L.true.70: + mov $1, %rax +.L.end.70: + cmpq $0, %rax + jne .L.true.69 + movq $8, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + addq $4, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmp $0, %rax + jne .L.true.69 + mov $0, %rax + jmp .L.end.69 +.L.true.69: + mov $1, %rax +.L.end.69: + cmpq $1, %rax + jne .L.else.68 +.data +.L.str.71: + .byte 9 + .byte 115 + .byte 104 + .byte 108 + .byte 32 + .byte 37 + .byte 37 + .byte 99 + .byte 108 + .byte 44 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 97 + .byte 120 + .byte 10 + .byte 0 +.text + leaq .L.str.71(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.end.68 +.L.else.68: +.data +.L.str.72: + .byte 9 + .byte 115 + .byte 104 + .byte 108 + .byte 32 + .byte 37 + .byte 37 + .byte 99 + .byte 108 + .byte 44 + .byte 32 + .byte 37 + .byte 37 + .byte 101 + .byte 97 + .byte 120 + .byte 10 + .byte 0 +.text + leaq .L.str.72(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp +.L.end.68: + movq $0, %rax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.67 +.L.else.67: +.L.end.67: + movq $31, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.71 + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $16, %rax + movq (%rax), %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq gen_lhs_rhs(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp +.data +.L.str.73: + .byte 9 + .byte 109 + .byte 111 + .byte 118 + .byte 113 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 100 + .byte 105 + .byte 44 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 99 + .byte 120 + .byte 10 + .byte 0 +.text + leaq .L.str.73(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movq $13, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $0, %rax + jne .L.true.74 + movq $7, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmp $0, %rax + jne .L.true.74 + mov $0, %rax + jmp .L.end.74 +.L.true.74: + mov $1, %rax +.L.end.74: + cmpq $0, %rax + jne .L.true.73 + movq $8, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + addq $4, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmp $0, %rax + jne .L.true.73 + mov $0, %rax + jmp .L.end.73 +.L.true.73: + mov $1, %rax +.L.end.73: + cmpq $1, %rax + jne .L.else.72 +.data +.L.str.74: + .byte 9 + .byte 115 + .byte 104 + .byte 114 + .byte 32 + .byte 37 + .byte 37 + .byte 99 + .byte 108 + .byte 44 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 97 + .byte 120 + .byte 10 + .byte 0 +.text + leaq .L.str.74(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.end.72 +.L.else.72: +.data +.L.str.75: + .byte 9 + .byte 115 + .byte 104 + .byte 114 + .byte 32 + .byte 37 + .byte 37 + .byte 99 + .byte 108 + .byte 44 + .byte 32 + .byte 37 + .byte 37 + .byte 101 + .byte 97 + .byte 120 + .byte 10 + .byte 0 +.text + leaq .L.str.75(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp +.L.end.72: + movq $0, %rax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.71 +.L.else.71: +.L.end.71: + movq $1, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.75 + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $16, %rax + movq (%rax), %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq gen_lhs_rhs(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + movq $7, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $0, %rax + jne .L.true.77 + movq $13, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmp $0, %rax + jne .L.true.77 + mov $0, %rax + jmp .L.end.77 +.L.true.77: + mov $1, %rax +.L.end.77: + cmpq $1, %rax + jne .L.else.76 +.data +.L.str.76: + .byte 9 + .byte 115 + .byte 117 + .byte 98 + .byte 113 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 100 + .byte 105 + .byte 44 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 97 + .byte 120 + .byte 10 + .byte 0 +.text + leaq .L.str.76(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.end.76 +.L.else.76: +.data +.L.str.77: + .byte 9 + .byte 115 + .byte 117 + .byte 98 + .byte 108 + .byte 32 + .byte 37 + .byte 37 + .byte 101 + .byte 100 + .byte 105 + .byte 44 + .byte 32 + .byte 37 + .byte 37 + .byte 101 + .byte 97 + .byte 120 + .byte 10 + .byte 0 +.text + leaq .L.str.77(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp +.L.end.76: + movq $0, %rax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.75 +.L.else.75: +.L.end.75: + movq $33, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.78 + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $16, %rax + movq (%rax), %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq gen_lhs_rhs(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + movq $7, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $0, %rax + jne .L.true.80 + movq $13, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmp $0, %rax + jne .L.true.80 + mov $0, %rax + jmp .L.end.80 +.L.true.80: + mov $1, %rax +.L.end.80: + cmpq $1, %rax + jne .L.else.79 +.data +.L.str.78: + .byte 9 + .byte 97 + .byte 110 + .byte 100 + .byte 113 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 100 + .byte 105 + .byte 44 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 97 + .byte 120 + .byte 10 + .byte 0 +.text + leaq .L.str.78(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.end.79 +.L.else.79: +.data +.L.str.79: + .byte 9 + .byte 97 + .byte 110 + .byte 100 + .byte 108 + .byte 32 + .byte 37 + .byte 37 + .byte 101 + .byte 100 + .byte 105 + .byte 44 + .byte 32 + .byte 37 + .byte 37 + .byte 101 + .byte 97 + .byte 120 + .byte 10 + .byte 0 +.text + leaq .L.str.79(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp +.L.end.79: + movq $0, %rax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.78 +.L.else.78: +.L.end.78: + movq $34, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.81 + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $16, %rax + movq (%rax), %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq gen_lhs_rhs(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + movq $7, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $0, %rax + jne .L.true.83 + movq $13, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmp $0, %rax + jne .L.true.83 + mov $0, %rax + jmp .L.end.83 +.L.true.83: + mov $1, %rax +.L.end.83: + cmpq $1, %rax + jne .L.else.82 +.data +.L.str.80: + .byte 9 + .byte 111 + .byte 114 + .byte 113 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 100 + .byte 105 + .byte 44 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 97 + .byte 120 + .byte 10 + .byte 0 +.text + leaq .L.str.80(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.end.82 +.L.else.82: +.data +.L.str.81: + .byte 9 + .byte 111 + .byte 114 + .byte 108 + .byte 32 + .byte 37 + .byte 37 + .byte 101 + .byte 100 + .byte 105 + .byte 44 + .byte 32 + .byte 37 + .byte 37 + .byte 101 + .byte 97 + .byte 120 + .byte 10 + .byte 0 +.text + leaq .L.str.81(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp +.L.end.82: + movq $0, %rax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.81 +.L.else.81: +.L.end.81: + movq $2, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.84 + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $16, %rax + movq (%rax), %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq gen_lhs_rhs(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + movq $7, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $0, %rax + jne .L.true.86 + movq $13, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmp $0, %rax + jne .L.true.86 + mov $0, %rax + jmp .L.end.86 +.L.true.86: + mov $1, %rax +.L.end.86: + cmpq $1, %rax + jne .L.else.85 +.data +.L.str.82: + .byte 9 + .byte 105 + .byte 109 + .byte 117 + .byte 108 + .byte 113 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 100 + .byte 105 + .byte 44 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 97 + .byte 120 + .byte 10 + .byte 0 +.text + leaq .L.str.82(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.end.85 +.L.else.85: +.data +.L.str.83: + .byte 9 + .byte 105 + .byte 109 + .byte 117 + .byte 108 + .byte 108 + .byte 32 + .byte 37 + .byte 37 + .byte 101 + .byte 100 + .byte 105 + .byte 44 + .byte 32 + .byte 37 + .byte 37 + .byte 101 + .byte 97 + .byte 120 + .byte 10 + .byte 0 +.text + leaq .L.str.83(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp +.L.end.85: + movq $0, %rax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.84 +.L.else.84: +.L.end.84: + movq $3, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $0, %rax + jne .L.true.88 + movq $4, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmp $0, %rax + jne .L.true.88 + mov $0, %rax + jmp .L.end.88 +.L.true.88: + mov $1, %rax +.L.end.88: + cmpq $1, %rax + jne .L.else.87 + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $16, %rax + movq (%rax), %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq gen_lhs_rhs(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + addq $60, %rax + movslq (%rax), %rax + cmpq $1, %rax + jne .L.else.89 + movq $8, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + addq $4, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.90 +.data +.L.str.84: + .byte 9 + .byte 109 + .byte 111 + .byte 118 + .byte 32 + .byte 36 + .byte 48 + .byte 44 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 100 + .byte 120 + .byte 10 + .byte 0 +.text + leaq .L.str.84(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp +.data +.L.str.85: + .byte 9 + .byte 100 + .byte 105 + .byte 118 + .byte 113 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 100 + .byte 105 + .byte 10 + .byte 0 +.text + leaq .L.str.85(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.end.90 +.L.else.90: +.data +.L.str.86: + .byte 9 + .byte 109 + .byte 111 + .byte 118 + .byte 32 + .byte 36 + .byte 48 + .byte 44 + .byte 32 + .byte 37 + .byte 37 + .byte 101 + .byte 100 + .byte 120 + .byte 10 + .byte 0 +.text + leaq .L.str.86(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp +.data +.L.str.87: + .byte 9 + .byte 100 + .byte 105 + .byte 118 + .byte 108 + .byte 32 + .byte 37 + .byte 37 + .byte 101 + .byte 100 + .byte 105 + .byte 10 + .byte 0 +.text + leaq .L.str.87(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp +.L.end.90: + jmp .L.end.89 +.L.else.89: + movq $8, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + addq $4, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.91 +.data +.L.str.88: + .byte 9 + .byte 99 + .byte 113 + .byte 116 + .byte 111 + .byte 10 + .byte 0 +.text + leaq .L.str.88(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.end.91 +.L.else.91: +.data +.L.str.89: + .byte 9 + .byte 99 + .byte 108 + .byte 116 + .byte 100 + .byte 10 + .byte 0 +.text + leaq .L.str.89(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp +.L.end.91: + movq $8, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + addq $4, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.92 +.data +.L.str.90: + .byte 9 + .byte 105 + .byte 100 + .byte 105 + .byte 118 + .byte 113 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 100 + .byte 105 + .byte 10 + .byte 0 +.text + leaq .L.str.90(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.end.92 +.L.else.92: +.data +.L.str.91: + .byte 9 + .byte 105 + .byte 100 + .byte 105 + .byte 118 + .byte 108 + .byte 32 + .byte 37 + .byte 37 + .byte 101 + .byte 100 + .byte 105 + .byte 10 + .byte 0 +.text + leaq .L.str.91(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp +.L.end.92: +.L.end.89: + movq $4, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.93 +.data +.L.str.92: + .byte 9 + .byte 109 + .byte 111 + .byte 118 + .byte 113 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 100 + .byte 120 + .byte 44 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 97 + .byte 120 + .byte 10 + .byte 0 +.text + leaq .L.str.92(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.end.93 +.L.else.93: +.L.end.93: + movq $0, %rax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.87 +.L.else.87: +.L.end.87: + movq $7, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.94 + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $16, %rax + movq (%rax), %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq gen_lhs_rhs(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + movq $7, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $0, %rax + jne .L.true.96 + movq $13, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmp $0, %rax + jne .L.true.96 + mov $0, %rax + jmp .L.end.96 +.L.true.96: + mov $1, %rax +.L.end.96: + cmpq $1, %rax + jne .L.else.95 +.data +.L.str.93: + .byte 9 + .byte 99 + .byte 109 + .byte 112 + .byte 113 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 100 + .byte 105 + .byte 44 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 97 + .byte 120 + .byte 10 + .byte 0 +.text + leaq .L.str.93(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.end.95 +.L.else.95: +.data +.L.str.94: + .byte 9 + .byte 99 + .byte 109 + .byte 112 + .byte 108 + .byte 32 + .byte 37 + .byte 37 + .byte 101 + .byte 100 + .byte 105 + .byte 44 + .byte 32 + .byte 37 + .byte 37 + .byte 101 + .byte 97 + .byte 120 + .byte 10 + .byte 0 +.text + leaq .L.str.94(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp +.L.end.95: +.data +.L.str.95: + .byte 9 + .byte 115 + .byte 101 + .byte 116 + .byte 101 + .byte 32 + .byte 37 + .byte 37 + .byte 97 + .byte 108 + .byte 10 + .byte 0 +.text + leaq .L.str.95(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + push %rax + leaq gen_condition_store(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movq $0, %rax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.94 +.L.else.94: +.L.end.94: + movq $6, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.97 + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $16, %rax + movq (%rax), %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq gen_lhs_rhs(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + movq $7, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $0, %rax + jne .L.true.99 + movq $13, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmp $0, %rax + jne .L.true.99 + mov $0, %rax + jmp .L.end.99 +.L.true.99: + mov $1, %rax +.L.end.99: + cmpq $1, %rax + jne .L.else.98 +.data +.L.str.96: + .byte 9 + .byte 99 + .byte 109 + .byte 112 + .byte 113 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 100 + .byte 105 + .byte 44 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 97 + .byte 120 + .byte 10 + .byte 0 +.text + leaq .L.str.96(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.end.98 +.L.else.98: +.data +.L.str.97: + .byte 9 + .byte 99 + .byte 109 + .byte 112 + .byte 108 + .byte 32 + .byte 37 + .byte 37 + .byte 101 + .byte 100 + .byte 105 + .byte 44 + .byte 32 + .byte 37 + .byte 37 + .byte 101 + .byte 97 + .byte 120 + .byte 10 + .byte 0 +.text + leaq .L.str.97(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp +.L.end.98: +.data +.L.str.98: + .byte 9 + .byte 115 + .byte 101 + .byte 116 + .byte 110 + .byte 101 + .byte 32 + .byte 37 + .byte 37 + .byte 97 + .byte 108 + .byte 10 + .byte 0 +.text + leaq .L.str.98(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + push %rax + leaq gen_condition_store(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movq $0, %rax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.97 +.L.else.97: +.L.end.97: + movq $26, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.100 + leaq -16(%rbp), %rax + push %rax + movq $1, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + push %rax + movq $1, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + addl %edi, %eax + pop %rdi + movl %eax, (%rdi) + pop %rdi + subl %edi, %eax + pop %rdi + movl %eax, (%rdi) + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq gen_expr(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp +.data +.L.str.99: + .byte 9 + .byte 99 + .byte 109 + .byte 112 + .byte 113 + .byte 32 + .byte 36 + .byte 48 + .byte 44 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 97 + .byte 120 + .byte 10 + .byte 0 +.text + leaq .L.str.99(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leaq -16(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq (%rsp), %rax + push %rax + push $1 +.data +.L.str.100: + .byte 9 + .byte 106 + .byte 101 + .byte 32 + .byte 46 + .byte 76 + .byte 46 + .byte 102 + .byte 97 + .byte 108 + .byte 115 + .byte 101 + .byte 46 + .byte 37 + .byte 100 + .byte 10 + .byte 0 +.text + leaq .L.str.100(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $32, %rsp + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $16, %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq gen_expr(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp +.data +.L.str.101: + .byte 9 + .byte 99 + .byte 109 + .byte 112 + .byte 113 + .byte 32 + .byte 36 + .byte 48 + .byte 44 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 97 + .byte 120 + .byte 10 + .byte 0 +.text + leaq .L.str.101(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leaq -16(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq (%rsp), %rax + push %rax + push $1 +.data +.L.str.102: + .byte 9 + .byte 106 + .byte 101 + .byte 32 + .byte 46 + .byte 76 + .byte 46 + .byte 102 + .byte 97 + .byte 108 + .byte 115 + .byte 101 + .byte 46 + .byte 37 + .byte 100 + .byte 10 + .byte 0 +.text + leaq .L.str.102(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $32, %rsp +.data +.L.str.103: + .byte 9 + .byte 109 + .byte 111 + .byte 118 + .byte 113 + .byte 32 + .byte 36 + .byte 49 + .byte 44 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 97 + .byte 120 + .byte 10 + .byte 0 +.text + leaq .L.str.103(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leaq -16(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq (%rsp), %rax + push %rax + push $1 +.data +.L.str.104: + .byte 9 + .byte 106 + .byte 109 + .byte 112 + .byte 32 + .byte 46 + .byte 76 + .byte 46 + .byte 101 + .byte 110 + .byte 100 + .byte 46 + .byte 37 + .byte 100 + .byte 10 + .byte 0 +.text + leaq .L.str.104(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $32, %rsp + leaq -16(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq (%rsp), %rax + push %rax + push $1 +.data +.L.str.105: + .byte 46 + .byte 76 + .byte 46 + .byte 102 + .byte 97 + .byte 108 + .byte 115 + .byte 101 + .byte 46 + .byte 37 + .byte 100 + .byte 58 + .byte 10 + .byte 0 +.text + leaq .L.str.105(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $32, %rsp +.data +.L.str.106: + .byte 9 + .byte 109 + .byte 111 + .byte 118 + .byte 113 + .byte 32 + .byte 36 + .byte 48 + .byte 44 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 97 + .byte 120 + .byte 10 + .byte 0 +.text + leaq .L.str.106(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leaq -16(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq (%rsp), %rax + push %rax + push $1 +.data +.L.str.107: + .byte 46 + .byte 76 + .byte 46 + .byte 101 + .byte 110 + .byte 100 + .byte 46 + .byte 37 + .byte 100 + .byte 58 + .byte 10 + .byte 0 +.text + leaq .L.str.107(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $32, %rsp + movq $0, %rax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.100 +.L.else.100: +.L.end.100: + movq $27, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.101 + leaq -16(%rbp), %rax + push %rax + movq $1, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + push %rax + movq $1, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + addl %edi, %eax + pop %rdi + movl %eax, (%rdi) + pop %rdi + subl %edi, %eax + pop %rdi + movl %eax, (%rdi) + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq gen_expr(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp +.data +.L.str.108: + .byte 9 + .byte 99 + .byte 109 + .byte 112 + .byte 113 + .byte 32 + .byte 36 + .byte 48 + .byte 44 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 97 + .byte 120 + .byte 10 + .byte 0 +.text + leaq .L.str.108(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leaq -16(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq (%rsp), %rax + push %rax + push $1 +.data +.L.str.109: + .byte 9 + .byte 106 + .byte 110 + .byte 101 + .byte 32 + .byte 46 + .byte 76 + .byte 46 + .byte 116 + .byte 114 + .byte 117 + .byte 101 + .byte 46 + .byte 37 + .byte 100 + .byte 10 + .byte 0 +.text + leaq .L.str.109(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $32, %rsp + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $16, %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq gen_expr(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp +.data +.L.str.110: + .byte 9 + .byte 99 + .byte 109 + .byte 112 + .byte 32 + .byte 36 + .byte 48 + .byte 44 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 97 + .byte 120 + .byte 10 + .byte 0 +.text + leaq .L.str.110(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leaq -16(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq (%rsp), %rax + push %rax + push $1 +.data +.L.str.111: + .byte 9 + .byte 106 + .byte 110 + .byte 101 + .byte 32 + .byte 46 + .byte 76 + .byte 46 + .byte 116 + .byte 114 + .byte 117 + .byte 101 + .byte 46 + .byte 37 + .byte 100 + .byte 10 + .byte 0 +.text + leaq .L.str.111(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $32, %rsp +.data +.L.str.112: + .byte 9 + .byte 109 + .byte 111 + .byte 118 + .byte 32 + .byte 36 + .byte 48 + .byte 44 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 97 + .byte 120 + .byte 10 + .byte 0 +.text + leaq .L.str.112(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leaq -16(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq (%rsp), %rax + push %rax + push $1 +.data +.L.str.113: + .byte 9 + .byte 106 + .byte 109 + .byte 112 + .byte 32 + .byte 46 + .byte 76 + .byte 46 + .byte 101 + .byte 110 + .byte 100 + .byte 46 + .byte 37 + .byte 100 + .byte 10 + .byte 0 +.text + leaq .L.str.113(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $32, %rsp + leaq -16(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq (%rsp), %rax + push %rax + push $1 +.data +.L.str.114: + .byte 46 + .byte 76 + .byte 46 + .byte 116 + .byte 114 + .byte 117 + .byte 101 + .byte 46 + .byte 37 + .byte 100 + .byte 58 + .byte 10 + .byte 0 +.text + leaq .L.str.114(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $32, %rsp +.data +.L.str.115: + .byte 9 + .byte 109 + .byte 111 + .byte 118 + .byte 32 + .byte 36 + .byte 49 + .byte 44 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 97 + .byte 120 + .byte 10 + .byte 0 +.text + leaq .L.str.115(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leaq -16(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq (%rsp), %rax + push %rax + push $1 +.data +.L.str.116: + .byte 46 + .byte 76 + .byte 46 + .byte 101 + .byte 110 + .byte 100 + .byte 46 + .byte 37 + .byte 100 + .byte 58 + .byte 10 + .byte 0 +.text + leaq .L.str.116(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $32, %rsp + movq $0, %rax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.101 +.L.else.101: +.L.end.101: + movq $10, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.102 + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $16, %rax + movq (%rax), %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq gen_lhs_rhs(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + movq $7, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $0, %rax + jne .L.true.104 + movq $13, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmp $0, %rax + jne .L.true.104 + mov $0, %rax + jmp .L.end.104 +.L.true.104: + mov $1, %rax +.L.end.104: + cmpq $1, %rax + jne .L.else.103 +.data +.L.str.117: + .byte 9 + .byte 99 + .byte 109 + .byte 112 + .byte 113 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 100 + .byte 105 + .byte 44 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 97 + .byte 120 + .byte 10 + .byte 0 +.text + leaq .L.str.117(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.end.103 +.L.else.103: +.data +.L.str.118: + .byte 9 + .byte 99 + .byte 109 + .byte 112 + .byte 108 + .byte 32 + .byte 37 + .byte 37 + .byte 101 + .byte 100 + .byte 105 + .byte 44 + .byte 32 + .byte 37 + .byte 37 + .byte 101 + .byte 97 + .byte 120 + .byte 10 + .byte 0 +.text + leaq .L.str.118(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp +.L.end.103: + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + addq $60, %rax + movslq (%rax), %rax + cmpq $1, %rax + jne .L.else.105 +.data +.L.str.119: + .byte 9 + .byte 115 + .byte 101 + .byte 116 + .byte 97 + .byte 101 + .byte 32 + .byte 37 + .byte 37 + .byte 97 + .byte 108 + .byte 10 + .byte 0 +.text + leaq .L.str.119(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.end.105 +.L.else.105: +.data +.L.str.120: + .byte 9 + .byte 115 + .byte 101 + .byte 116 + .byte 103 + .byte 101 + .byte 32 + .byte 37 + .byte 37 + .byte 97 + .byte 108 + .byte 10 + .byte 0 +.text + leaq .L.str.120(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp +.L.end.105: + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + push %rax + leaq gen_condition_store(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movq $0, %rax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.102 +.L.else.102: +.L.end.102: + movq $11, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.106 + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $16, %rax + movq (%rax), %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq gen_lhs_rhs(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + movq $7, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $0, %rax + jne .L.true.108 + movq $13, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmp $0, %rax + jne .L.true.108 + mov $0, %rax + jmp .L.end.108 +.L.true.108: + mov $1, %rax +.L.end.108: + cmpq $1, %rax + jne .L.else.107 +.data +.L.str.121: + .byte 9 + .byte 99 + .byte 109 + .byte 112 + .byte 113 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 100 + .byte 105 + .byte 44 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 97 + .byte 120 + .byte 10 + .byte 0 +.text + leaq .L.str.121(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.end.107 +.L.else.107: +.data +.L.str.122: + .byte 9 + .byte 99 + .byte 109 + .byte 112 + .byte 108 + .byte 32 + .byte 37 + .byte 37 + .byte 101 + .byte 100 + .byte 105 + .byte 44 + .byte 32 + .byte 37 + .byte 37 + .byte 101 + .byte 97 + .byte 120 + .byte 10 + .byte 0 +.text + leaq .L.str.122(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp +.L.end.107: + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + addq $60, %rax + movslq (%rax), %rax + cmpq $1, %rax + jne .L.else.109 +.data +.L.str.123: + .byte 9 + .byte 115 + .byte 101 + .byte 116 + .byte 97 + .byte 32 + .byte 37 + .byte 37 + .byte 97 + .byte 108 + .byte 10 + .byte 0 +.text + leaq .L.str.123(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.end.109 +.L.else.109: +.data +.L.str.124: + .byte 9 + .byte 115 + .byte 101 + .byte 116 + .byte 103 + .byte 32 + .byte 37 + .byte 37 + .byte 97 + .byte 108 + .byte 10 + .byte 0 +.text + leaq .L.str.124(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp +.L.end.109: + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + push %rax + leaq gen_condition_store(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movq $0, %rax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.106 +.L.else.106: +.L.end.106: + movq $8, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.110 + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $16, %rax + movq (%rax), %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq gen_lhs_rhs(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + movq $7, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $0, %rax + jne .L.true.112 + movq $13, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmp $0, %rax + jne .L.true.112 + mov $0, %rax + jmp .L.end.112 +.L.true.112: + mov $1, %rax +.L.end.112: + cmpq $1, %rax + jne .L.else.111 +.data +.L.str.125: + .byte 9 + .byte 99 + .byte 109 + .byte 112 + .byte 113 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 100 + .byte 105 + .byte 44 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 97 + .byte 120 + .byte 10 + .byte 0 +.text + leaq .L.str.125(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.end.111 +.L.else.111: +.data +.L.str.126: + .byte 9 + .byte 99 + .byte 109 + .byte 112 + .byte 108 + .byte 32 + .byte 37 + .byte 37 + .byte 101 + .byte 100 + .byte 105 + .byte 44 + .byte 32 + .byte 37 + .byte 37 + .byte 101 + .byte 97 + .byte 120 + .byte 10 + .byte 0 +.text + leaq .L.str.126(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp +.L.end.111: + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + addq $60, %rax + movslq (%rax), %rax + cmpq $1, %rax + jne .L.else.113 +.data +.L.str.127: + .byte 9 + .byte 115 + .byte 101 + .byte 116 + .byte 98 + .byte 101 + .byte 32 + .byte 37 + .byte 37 + .byte 97 + .byte 108 + .byte 10 + .byte 0 +.text + leaq .L.str.127(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.end.113 +.L.else.113: +.data +.L.str.128: + .byte 9 + .byte 115 + .byte 101 + .byte 116 + .byte 108 + .byte 101 + .byte 32 + .byte 37 + .byte 37 + .byte 97 + .byte 108 + .byte 10 + .byte 0 +.text + leaq .L.str.128(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp +.L.end.113: + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + push %rax + leaq gen_condition_store(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movq $0, %rax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.110 +.L.else.110: +.L.end.110: + movq $9, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.114 + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $16, %rax + movq (%rax), %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq gen_lhs_rhs(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + movq $7, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $0, %rax + jne .L.true.116 + movq $13, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmp $0, %rax + jne .L.true.116 + mov $0, %rax + jmp .L.end.116 +.L.true.116: + mov $1, %rax +.L.end.116: + cmpq $1, %rax + jne .L.else.115 +.data +.L.str.129: + .byte 9 + .byte 99 + .byte 109 + .byte 112 + .byte 113 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 100 + .byte 105 + .byte 44 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 97 + .byte 120 + .byte 10 + .byte 0 +.text + leaq .L.str.129(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.end.115 +.L.else.115: +.data +.L.str.130: + .byte 9 + .byte 99 + .byte 109 + .byte 112 + .byte 108 + .byte 32 + .byte 37 + .byte 37 + .byte 101 + .byte 100 + .byte 105 + .byte 44 + .byte 32 + .byte 37 + .byte 37 + .byte 101 + .byte 97 + .byte 120 + .byte 10 + .byte 0 +.text + leaq .L.str.130(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp +.L.end.115: + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + addq $60, %rax + movslq (%rax), %rax + cmpq $1, %rax + jne .L.else.117 +.data +.L.str.131: + .byte 9 + .byte 115 + .byte 101 + .byte 116 + .byte 98 + .byte 32 + .byte 37 + .byte 37 + .byte 97 + .byte 108 + .byte 10 + .byte 0 +.text + leaq .L.str.131(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.end.117 +.L.else.117: +.data +.L.str.132: + .byte 9 + .byte 115 + .byte 101 + .byte 116 + .byte 108 + .byte 32 + .byte 37 + .byte 37 + .byte 97 + .byte 108 + .byte 10 + .byte 0 +.text + leaq .L.str.132(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp +.L.end.117: + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + push %rax + leaq gen_condition_store(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movq $0, %rax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.114 +.L.else.114: +.L.end.114: +.data +.L.str.133: + .byte 103 + .byte 101 + .byte 110 + .byte 95 + .byte 101 + .byte 120 + .byte 112 + .byte 114 + .byte 32 + .byte 117 + .byte 110 + .byte 114 + .byte 101 + .byte 97 + .byte 99 + .byte 104 + .byte 97 + .byte 98 + .byte 108 + .byte 101 + .byte 10 + .byte 0 +.text + leaq .L.str.133(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movq $1, %rax + push %rax + leaq exit(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leave + ret +.global gen +gen: + push %rbp + movq %rsp, %rbp + subq $0, %rsp +.data +.L.str.134: + .byte 46 + .byte 116 + .byte 101 + .byte 120 + .byte 116 + .byte 10 + .byte 0 +.text + leaq .L.str.134(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leaq 24(%rbp), %rax + movq (%rax), %rax + push %rax + leaq has_main(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.118 +.data +.L.str.135: + .byte 46 + .byte 103 + .byte 108 + .byte 111 + .byte 98 + .byte 97 + .byte 108 + .byte 32 + .byte 95 + .byte 115 + .byte 116 + .byte 97 + .byte 114 + .byte 116 + .byte 10 + .byte 0 +.text + leaq .L.str.135(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp +.data +.L.str.136: + .byte 95 + .byte 115 + .byte 116 + .byte 97 + .byte 114 + .byte 116 + .byte 58 + .byte 10 + .byte 0 +.text + leaq .L.str.136(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp +.data +.L.str.137: + .byte 9 + .byte 112 + .byte 117 + .byte 115 + .byte 104 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 98 + .byte 112 + .byte 10 + .byte 0 +.text + leaq .L.str.137(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp +.data +.L.str.138: + .byte 9 + .byte 109 + .byte 111 + .byte 118 + .byte 113 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 115 + .byte 112 + .byte 44 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 98 + .byte 112 + .byte 10 + .byte 0 +.text + leaq .L.str.138(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp +.data +.L.str.139: + .byte 9 + .byte 108 + .byte 101 + .byte 97 + .byte 113 + .byte 32 + .byte 49 + .byte 54 + .byte 40 + .byte 37 + .byte 37 + .byte 114 + .byte 98 + .byte 112 + .byte 41 + .byte 44 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 97 + .byte 120 + .byte 10 + .byte 0 +.text + leaq .L.str.139(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp +.data +.L.str.140: + .byte 9 + .byte 112 + .byte 117 + .byte 115 + .byte 104 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 97 + .byte 120 + .byte 10 + .byte 0 +.text + leaq .L.str.140(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp +.data +.L.str.141: + .byte 9 + .byte 112 + .byte 117 + .byte 115 + .byte 104 + .byte 113 + .byte 32 + .byte 56 + .byte 40 + .byte 37 + .byte 37 + .byte 114 + .byte 98 + .byte 112 + .byte 41 + .byte 10 + .byte 0 +.text + leaq .L.str.141(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp +.data +.L.str.142: + .byte 9 + .byte 99 + .byte 97 + .byte 108 + .byte 108 + .byte 113 + .byte 32 + .byte 109 + .byte 97 + .byte 105 + .byte 110 + .byte 10 + .byte 0 +.text + leaq .L.str.142(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp +.data +.L.str.143: + .byte 9 + .byte 109 + .byte 111 + .byte 118 + .byte 113 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 97 + .byte 120 + .byte 44 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 100 + .byte 105 + .byte 10 + .byte 0 +.text + leaq .L.str.143(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp +.data +.L.str.144: + .byte 9 + .byte 109 + .byte 111 + .byte 118 + .byte 113 + .byte 32 + .byte 36 + .byte 54 + .byte 48 + .byte 44 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 97 + .byte 120 + .byte 10 + .byte 0 +.text + leaq .L.str.144(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp +.data +.L.str.145: + .byte 9 + .byte 115 + .byte 121 + .byte 115 + .byte 99 + .byte 97 + .byte 108 + .byte 108 + .byte 10 + .byte 0 +.text + leaq .L.str.145(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.end.118 +.L.else.118: +.L.end.118: +.L.while.start.119: + movq $0, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setne %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.while.end.119 + movq $0, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $0, %rax + je .L.false.121 + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $60, %rax + movslq (%rax), %rax + cmpq $0, %rax + sete %al + movzbq %al, %rax + cmpq $0, %rax + je .L.false.121 + movq $1, %rax + jmp .L.end.121 +.L.false.121: + movq $0, %rax +.L.end.121: + cmpq $1, %rax + jne .L.else.120 + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $16, %rax + push %rax + movq $0, %rax + pop %rdi + movl %eax, (%rdi) + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $20, %rax + push %rax + movq $16, %rax + pop %rdi + movl %eax, (%rdi) + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $48, %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq assign_func_params_offset(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $56, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $48, %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq assign_local_var_offset(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + pop %rdi + movl %eax, (%rdi) + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + push %rax + leaq (%rsp), %rax + push %rax + push $1 +.data +.L.str.146: + .byte 46 + .byte 103 + .byte 108 + .byte 111 + .byte 98 + .byte 97 + .byte 108 + .byte 32 + .byte 37 + .byte 115 + .byte 10 + .byte 0 +.text + leaq .L.str.146(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $32, %rsp + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + push %rax + leaq (%rsp), %rax + push %rax + push $1 +.data +.L.str.147: + .byte 37 + .byte 115 + .byte 58 + .byte 10 + .byte 0 +.text + leaq .L.str.147(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $32, %rsp +.data +.L.str.148: + .byte 9 + .byte 112 + .byte 117 + .byte 115 + .byte 104 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 98 + .byte 112 + .byte 10 + .byte 0 +.text + leaq .L.str.148(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp +.data +.L.str.149: + .byte 9 + .byte 109 + .byte 111 + .byte 118 + .byte 113 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 115 + .byte 112 + .byte 44 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 98 + .byte 112 + .byte 10 + .byte 0 +.text + leaq .L.str.149(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $56, %rax + movslq (%rax), %rax + push %rax + leaq (%rsp), %rax + push %rax + push $1 +.data +.L.str.150: + .byte 9 + .byte 115 + .byte 117 + .byte 98 + .byte 113 + .byte 32 + .byte 36 + .byte 37 + .byte 100 + .byte 44 + .byte 32 + .byte 37 + .byte 37 + .byte 114 + .byte 115 + .byte 112 + .byte 10 + .byte 0 +.text + leaq .L.str.150(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $32, %rsp + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq gen_stmt(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp +.data +.L.str.151: + .byte 9 + .byte 108 + .byte 101 + .byte 97 + .byte 118 + .byte 101 + .byte 10 + .byte 0 +.text + leaq .L.str.151(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp +.data +.L.str.152: + .byte 9 + .byte 114 + .byte 101 + .byte 116 + .byte 10 + .byte 0 +.text + leaq .L.str.152(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.end.120 +.L.else.120: +.L.end.120: + leaq 24(%rbp), %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $72, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + jmp .L.while.start.119 +.L.while.end.119: + leave + ret +.global new_gen +new_gen: + push %rbp + movq %rsp, %rbp + subq $16, %rsp + leaq -8(%rbp), %rax + push %rax + movq $24, %rax + push %rax + leaq alloc(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + movq $0, %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.122 +.data +.L.str.153: + .byte 109 + .byte 101 + .byte 109 + .byte 111 + .byte 114 + .byte 121 + .byte 32 + .byte 97 + .byte 108 + .byte 108 + .byte 111 + .byte 99 + .byte 97 + .byte 116 + .byte 105 + .byte 111 + .byte 110 + .byte 32 + .byte 102 + .byte 97 + .byte 105 + .byte 108 + .byte 101 + .byte 100 + .byte 10 + .byte 0 +.text + leaq .L.str.153(%rip), %rax + push %rax + leaq eprintf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movq $1, %rax + push %rax + leaq exit(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.end.122 +.L.else.122: +.L.end.122: + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + push %rax + movq $0, %rax + pop %rdi + movl %eax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $4, %rax + push %rax + movq $0, %rax + pop %rdi + movl %eax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret diff --git a/bootstrap/ibu.s b/bootstrap/ibu.s new file mode 100644 index 0000000..9485be1 --- /dev/null +++ b/bootstrap/ibu.s @@ -0,0 +1,393 @@ +.text +.global _start +_start: + push %rbp + movq %rsp, %rbp + leaq 16(%rbp), %rax + push %rax + pushq 8(%rbp) + callq main + movq %rax, %rdi + movq $60, %rax + syscall +.global main +main: + push %rbp + movq %rsp, %rbp + subq $64, %rsp + movq $2, %rax + push %rax + leaq 16(%rbp), %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setne %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.0 +.data +.L.str.0: + .byte 117 + .byte 115 + .byte 97 + .byte 103 + .byte 101 + .byte 10 + .byte 9 + .byte 105 + .byte 98 + .byte 117 + .byte 99 + .byte 32 + .byte 60 + .byte 102 + .byte 105 + .byte 108 + .byte 101 + .byte 110 + .byte 97 + .byte 109 + .byte 101 + .byte 62 + .byte 46 + .byte 105 + .byte 98 + .byte 117 + .byte 10 + .byte 0 +.text + leaq .L.str.0(%rip), %rax + push %rax + leaq printf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movq $0, %rax + push %rax + leaq exit(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.end.0 +.L.else.0: +.L.end.0: + leaq -60(%rbp), %rax + push %rax + movq $8, %rax + push %rax + movq $1, %rax + pop %rdi + imull %edi, %eax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + pop %rdi + addq %rdi, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leaq -52(%rbp), %rax + push %rax + movq $0, %rax + pop %rdi + movl %eax, (%rdi) +.data +.L.str.1: + .byte 45 + .byte 0 +.text + leaq .L.str.1(%rip), %rax + push %rax + leaq -60(%rbp), %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.1 + leaq -52(%rbp), %rax + push %rax + movq $0, %rax + pop %rdi + movl %eax, (%rdi) + jmp .L.end.1 +.L.else.1: + leaq -52(%rbp), %rax + push %rax + movq $420, %rax + push %rax + movq $0, %rax + push %rax + leaq -60(%rbp), %rax + movq (%rax), %rax + push %rax + leaq open(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + pop %rdi + movl %eax, (%rdi) + movq $0, %rax + push %rax + leaq -52(%rbp), %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setl %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.2 + leaq -60(%rbp), %rax + movq (%rax), %rax + push %rax + leaq (%rsp), %rax + push %rax + push $1 +.data +.L.str.2: + .byte 27 + .byte 91 + .byte 49 + .byte 109 + .byte 27 + .byte 91 + .byte 51 + .byte 49 + .byte 109 + .byte 101 + .byte 114 + .byte 114 + .byte 111 + .byte 114 + .byte 27 + .byte 91 + .byte 48 + .byte 109 + .byte 58 + .byte 32 + .byte 111 + .byte 112 + .byte 101 + .byte 110 + .byte 105 + .byte 110 + .byte 103 + .byte 32 + .byte 102 + .byte 105 + .byte 108 + .byte 101 + .byte 32 + .byte 37 + .byte 115 + .byte 10 + .byte 0 +.text + leaq .L.str.2(%rip), %rax + push %rax + leaq eprintf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $32, %rsp + movq $1, %rax + push %rax + leaq exit(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.end.2 +.L.else.2: +.L.end.2: +.L.end.1: + leaq -48(%rbp), %rax + push %rax + movq $150000, %rax + push %rax + leaq alloc(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + movq $0, %rax + push %rax + leaq -48(%rbp), %rax + movq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.3 +.data +.L.str.3: + .byte 109 + .byte 101 + .byte 109 + .byte 111 + .byte 114 + .byte 121 + .byte 32 + .byte 97 + .byte 108 + .byte 108 + .byte 111 + .byte 99 + .byte 97 + .byte 116 + .byte 105 + .byte 111 + .byte 110 + .byte 32 + .byte 102 + .byte 97 + .byte 105 + .byte 108 + .byte 101 + .byte 100 + .byte 10 + .byte 0 +.text + leaq .L.str.3(%rip), %rax + push %rax + leaq eprintf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movq $1, %rax + push %rax + leaq exit(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.end.3 +.L.else.3: +.L.end.3: + movq $150000, %rax + push %rax + leaq -48(%rbp), %rax + movq (%rax), %rax + push %rax + leaq -52(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq read(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + leaq -52(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq close(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leaq -40(%rbp), %rax + push %rax + leaq -48(%rbp), %rax + movq (%rax), %rax + push %rax + leaq -60(%rbp), %rax + movq (%rax), %rax + push %rax + leaq new_tokenizer(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -32(%rbp), %rax + push %rax + leaq -40(%rbp), %rax + movq (%rax), %rax + push %rax + leaq tokenize(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -24(%rbp), %rax + push %rax + leaq new_preprocessor(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $0, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -24(%rbp), %rax + movq (%rax), %rax + push %rax + leaq -32(%rbp), %rax + movq (%rax), %rax + push %rax + leaq preprocess(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + leaq -16(%rbp), %rax + push %rax + leaq -32(%rbp), %rax + movq (%rax), %rax + push %rax + leaq new_parser(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parse(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leaq -8(%rbp), %rax + push %rax + leaq new_gen(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $0, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -16(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movq (%rax), %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + push %rax + leaq gen(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movq $0, %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret diff --git a/bootstrap/linux-syscall.s b/bootstrap/linux-syscall.s new file mode 100644 index 0000000..a1f03f9 --- /dev/null +++ b/bootstrap/linux-syscall.s @@ -0,0 +1,153 @@ +.text +.global readlink +readlink: + push %rbp + movq %rsp, %rbp + subq $0, %rsp + leaq 32(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + movq $89, %rax + push %rax + leaq syscall(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $32, %rsp + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global exit +exit: + push %rbp + movq %rsp, %rbp + subq $0, %rsp + movq $0, %rax + push %rax + movq $0, %rax + push %rax + leaq 16(%rbp), %rax + movslq (%rax), %rax + push %rax + movq $60, %rax + push %rax + leaq syscall(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $32, %rsp + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global write +write: + push %rbp + movq %rsp, %rbp + subq $0, %rsp + leaq 32(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movslq (%rax), %rax + push %rax + movq $1, %rax + push %rax + leaq syscall(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $32, %rsp + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global close +close: + push %rbp + movq %rsp, %rbp + subq $0, %rsp + movq $0, %rax + push %rax + movq $0, %rax + push %rax + leaq 16(%rbp), %rax + movslq (%rax), %rax + push %rax + movq $3, %rax + push %rax + leaq syscall(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $32, %rsp + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global read +read: + push %rbp + movq %rsp, %rbp + subq $0, %rsp + leaq 32(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movslq (%rax), %rax + push %rax + movq $0, %rax + push %rax + leaq syscall(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $32, %rsp + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global open +open: + push %rbp + movq %rsp, %rbp + subq $0, %rsp + leaq 32(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq 24(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + movq $2, %rax + push %rax + leaq syscall(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $32, %rsp + movq %rbp, %rsp + pop %rbp + retq + leave + ret diff --git a/bootstrap/parser.s b/bootstrap/parser.s new file mode 100644 index 0000000..f3e32ae --- /dev/null +++ b/bootstrap/parser.s @@ -0,0 +1,13745 @@ +.text +.global parse_func +parse_func: + push %rbp + movq %rsp, %rbp + subq $64, %rsp +.data +.L.str.0: + .byte 102 + .byte 117 + .byte 110 + .byte 99 + .byte 0 +.text + leaq .L.str.0(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_skip(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $16, %rax + push %rax + movq $0, %rax + pop %rdi + movq %rax, (%rdi) + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq enter_scope(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leaq -56(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_next(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leaq -48(%rbp), %rax + push %rax + movq $4, %rax + push %rax + leaq new_vec(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -40(%rbp), %rax + push %rax + movq $4, %rax + push %rax + leaq new_vec(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -32(%rbp), %rax + push %rax + leaq -40(%rbp), %rax + movq (%rax), %rax + push %rax + leaq -48(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parse_function_params(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + movzx %al, %eax + pop %rdi + movl %eax, (%rdi) + leaq -28(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leaq -20(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parse_ty(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -12(%rbp), %rax + push %rax + leaq -56(%rbp), %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq find_globals(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + pop %rdi + movq %rax, (%rdi) + movq $0, %rax + push %rax + leaq -12(%rbp), %rax + movq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setne %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.0 + leaq -40(%rbp), %rax + movq (%rax), %rax + push %rax + leaq -12(%rbp), %rax + movq (%rax), %rax + addq $40, %rax + movq (%rax), %rax + push %rax + leaq cmp_func_params(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $0, %rax + sete %al + movzbq %al, %rax + cmpq $1, %rax + jne .L.else.1 +.data +.L.str.1: + .byte 97 + .byte 114 + .byte 103 + .byte 117 + .byte 109 + .byte 101 + .byte 110 + .byte 116 + .byte 115 + .byte 32 + .byte 100 + .byte 111 + .byte 101 + .byte 115 + .byte 110 + .byte 39 + .byte 116 + .byte 32 + .byte 109 + .byte 97 + .byte 116 + .byte 99 + .byte 104 + .byte 32 + .byte 116 + .byte 111 + .byte 32 + .byte 112 + .byte 114 + .byte 111 + .byte 116 + .byte 111 + .byte 116 + .byte 121 + .byte 112 + .byte 101 + .byte 0 +.text + leaq .L.str.1(%rip), %rax + push %rax + leaq -56(%rbp), %rax + movq (%rax), %rax + push %rax + leaq print_error(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + jmp .L.end.1 +.L.else.1: +.L.end.1: + leaq -12(%rbp), %rax + movq (%rax), %rax + addq $16, %rax + movq (%rax), %rax + addq $24, %rax + movq (%rax), %rax + push %rax + leaq -20(%rbp), %rax + movq (%rax), %rax + push %rax + leaq cmp_type(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $0, %rax + sete %al + movzbq %al, %rax + cmpq $1, %rax + jne .L.else.2 +.data +.L.str.2: + .byte 114 + .byte 101 + .byte 116 + .byte 117 + .byte 114 + .byte 110 + .byte 32 + .byte 116 + .byte 121 + .byte 112 + .byte 101 + .byte 32 + .byte 100 + .byte 111 + .byte 101 + .byte 115 + .byte 110 + .byte 39 + .byte 116 + .byte 32 + .byte 109 + .byte 97 + .byte 116 + .byte 99 + .byte 104 + .byte 32 + .byte 116 + .byte 111 + .byte 32 + .byte 112 + .byte 114 + .byte 111 + .byte 116 + .byte 111 + .byte 116 + .byte 121 + .byte 112 + .byte 101 + .byte 0 +.text + leaq .L.str.2(%rip), %rax + push %rax + leaq -56(%rbp), %rax + movq (%rax), %rax + push %rax + leaq print_error(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + jmp .L.end.2 +.L.else.2: +.L.end.2: + jmp .L.end.0 +.L.else.0: +.L.end.0: + movq $5, %rax + push %rax + leaq -20(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.3 +.data +.L.str.3: + .byte 117 + .byte 110 + .byte 115 + .byte 117 + .byte 112 + .byte 112 + .byte 111 + .byte 114 + .byte 116 + .byte 101 + .byte 100 + .byte 32 + .byte 102 + .byte 101 + .byte 97 + .byte 116 + .byte 117 + .byte 114 + .byte 101 + .byte 58 + .byte 32 + .byte 102 + .byte 117 + .byte 110 + .byte 99 + .byte 116 + .byte 105 + .byte 111 + .byte 110 + .byte 32 + .byte 114 + .byte 101 + .byte 116 + .byte 117 + .byte 114 + .byte 110 + .byte 105 + .byte 110 + .byte 103 + .byte 32 + .byte 115 + .byte 116 + .byte 114 + .byte 117 + .byte 99 + .byte 116 + .byte 0 +.text + leaq .L.str.3(%rip), %rax + push %rax + leaq -28(%rbp), %rax + movq (%rax), %rax + push %rax + leaq print_error(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + jmp .L.end.3 +.L.else.3: +.L.end.3: + leaq -4(%rbp), %rax + push %rax + movq $0, %rax + pop %rdi + movl %eax, (%rdi) +.data +.L.str.4: + .byte 59 + .byte 0 +.text + leaq .L.str.4(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.4 +.data +.L.str.5: + .byte 59 + .byte 0 +.text + leaq .L.str.5(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_skip(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + leaq -4(%rbp), %rax + push %rax + movq $1, %rax + pop %rdi + movl %eax, (%rdi) + jmp .L.end.4 +.L.else.4: +.L.end.4: + movq $0, %rax + push %rax + leaq -12(%rbp), %rax + movq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.5 + leaq -12(%rbp), %rax + push %rax + movq $80, %rax + push %rax + leaq alloc(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + movq $0, %rax + push %rax + leaq -12(%rbp), %rax + movq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.6 +.data +.L.str.6: + .byte 109 + .byte 101 + .byte 109 + .byte 111 + .byte 114 + .byte 121 + .byte 32 + .byte 97 + .byte 108 + .byte 108 + .byte 111 + .byte 99 + .byte 97 + .byte 116 + .byte 105 + .byte 111 + .byte 110 + .byte 32 + .byte 102 + .byte 97 + .byte 105 + .byte 108 + .byte 101 + .byte 100 + .byte 10 + .byte 0 +.text + leaq .L.str.6(%rip), %rax + push %rax + leaq eprintf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.end.6 +.L.else.6: +.L.end.6: + leaq -12(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + push %rax + movq $0, %rax + pop %rdi + movl %eax, (%rdi) + leaq -12(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + push %rax + leaq -56(%rbp), %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leaq -12(%rbp), %rax + movq (%rax), %rax + addq $40, %rax + push %rax + leaq -40(%rbp), %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leaq -12(%rbp), %rax + movq (%rax), %rax + addq $68, %rax + push %rax + movq $1, %rax + pop %rdi + movl %eax, (%rdi) + leaq -12(%rbp), %rax + movq (%rax), %rax + addq $16, %rax + push %rax + leaq -32(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq -20(%rbp), %rax + movq (%rax), %rax + push %rax + leaq -48(%rbp), %rax + movq (%rax), %rax + push %rax + leaq new_func_type(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -12(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq add_function_object(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + leaq -4(%rbp), %rax + movslq (%rax), %rax + cmpq $1, %rax + jne .L.else.7 + leaq -12(%rbp), %rax + movq (%rax), %rax + addq $60, %rax + push %rax + movq $1, %rax + pop %rdi + movl %eax, (%rdi) + leaq -12(%rbp), %rax + movq (%rax), %rax + addq $48, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $16, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + jmp .L.end.7 +.L.else.7: + leaq -12(%rbp), %rax + movq (%rax), %rax + addq $32, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parse_block(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -12(%rbp), %rax + movq (%rax), %rax + addq $48, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $16, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) +.L.end.7: + jmp .L.end.5 +.L.else.5: + leaq -12(%rbp), %rax + movq (%rax), %rax + addq $60, %rax + movslq (%rax), %rax + cmpq $0, %rax + je .L.false.9 + leaq -4(%rbp), %rax + movslq (%rax), %rax + cmpq $0, %rax + sete %al + movzbq %al, %rax + cmpq $0, %rax + je .L.false.9 + movq $1, %rax + jmp .L.end.9 +.L.false.9: + movq $0, %rax +.L.end.9: + cmpq $1, %rax + jne .L.else.8 + leaq -12(%rbp), %rax + movq (%rax), %rax + addq $60, %rax + push %rax + movq $0, %rax + pop %rdi + movl %eax, (%rdi) + leaq -12(%rbp), %rax + movq (%rax), %rax + addq $32, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parse_block(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -12(%rbp), %rax + movq (%rax), %rax + addq $48, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $16, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + jmp .L.end.8 +.L.else.8: + leaq -4(%rbp), %rax + movslq (%rax), %rax + cmpq $0, %rax + sete %al + movzbq %al, %rax + cmpq $1, %rax + jne .L.else.10 +.data +.L.str.7: + .byte 102 + .byte 117 + .byte 110 + .byte 99 + .byte 116 + .byte 105 + .byte 111 + .byte 110 + .byte 32 + .byte 105 + .byte 115 + .byte 32 + .byte 97 + .byte 108 + .byte 114 + .byte 101 + .byte 97 + .byte 100 + .byte 121 + .byte 32 + .byte 100 + .byte 101 + .byte 102 + .byte 105 + .byte 110 + .byte 101 + .byte 100 + .byte 32 + .byte 115 + .byte 111 + .byte 109 + .byte 101 + .byte 119 + .byte 104 + .byte 101 + .byte 114 + .byte 101 + .byte 0 +.text + leaq .L.str.7(%rip), %rax + push %rax + leaq -56(%rbp), %rax + movq (%rax), %rax + push %rax + leaq print_error(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + jmp .L.end.10 +.L.else.10: +.L.end.10: +.L.end.8: +.L.end.5: + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq leave_scope(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leave + ret +.global add_function_object +add_function_object: + push %rbp + movq %rsp, %rbp + subq $0, %rsp + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $72, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leave + ret +.global parse_function_params +parse_function_params: + push %rbp + movq %rsp, %rbp + subq $48, %rsp + leaq -36(%rbp), %rax + push %rax + movq $0, %rax + pop %rdi + movl %eax, (%rdi) +.data +.L.str.8: + .byte 40 + .byte 0 +.text + leaq .L.str.8(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_skip(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp +.L.while.start.11: +.data +.L.str.9: + .byte 41 + .byte 0 +.text + leaq .L.str.9(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $0, %rax + sete %al + movzbq %al, %rax + cmpq $1, %rax + jne .L.while.end.11 + leaq -32(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leaq -24(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_next(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leaq -8(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) +.data +.L.str.10: + .byte 46 + .byte 46 + .byte 46 + .byte 0 +.text + leaq .L.str.10(%rip), %rax + push %rax + leaq -32(%rbp), %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.12 +.data +.L.str.11: + .byte 41 + .byte 0 +.text + leaq .L.str.11(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $0, %rax + sete %al + movzbq %al, %rax + cmpq $1, %rax + jne .L.else.13 +.data +.L.str.12: + .byte 109 + .byte 117 + .byte 115 + .byte 116 + .byte 32 + .byte 98 + .byte 101 + .byte 32 + .byte 97 + .byte 116 + .byte 32 + .byte 116 + .byte 104 + .byte 101 + .byte 32 + .byte 101 + .byte 110 + .byte 100 + .byte 32 + .byte 111 + .byte 102 + .byte 32 + .byte 116 + .byte 104 + .byte 101 + .byte 32 + .byte 112 + .byte 97 + .byte 114 + .byte 97 + .byte 109 + .byte 97 + .byte 116 + .byte 101 + .byte 114 + .byte 115 + .byte 0 +.text + leaq .L.str.12(%rip), %rax + push %rax + leaq -24(%rbp), %rax + movq (%rax), %rax + push %rax + leaq print_error(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + jmp .L.end.13 +.L.else.13: +.L.end.13: + leaq -36(%rbp), %rax + push %rax + movq $1, %rax + pop %rdi + movl %eax, (%rdi) + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $64, %rax + movq (%rax), %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + push %rax + leaq vec_append(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movq $1, %rax + push %rax + leaq -24(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $56, %rax + movq (%rax), %rax + push %rax +.data +.L.str.13: + .byte 97 + .byte 114 + .byte 103 + .byte 99 + .byte 0 +.text + leaq .L.str.13(%rip), %rax + push %rax + movq $1, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq new_local_object(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $48, %rsp + push %rax + leaq 32(%rbp), %rax + movq (%rax), %rax + push %rax + leaq vec_append(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + leaq -16(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $64, %rax + movq (%rax), %rax + push %rax + leaq new_pointer_type(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + push %rax + leaq vec_append(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movq $1, %rax + push %rax + leaq -24(%rbp), %rax + movq (%rax), %rax + push %rax + leaq -16(%rbp), %rax + movq (%rax), %rax + push %rax +.data +.L.str.14: + .byte 97 + .byte 114 + .byte 103 + .byte 118 + .byte 0 +.text + leaq .L.str.14(%rip), %rax + push %rax + movq $1, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq new_local_object(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $48, %rsp + push %rax + leaq 32(%rbp), %rax + movq (%rax), %rax + push %rax + leaq vec_append(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + jmp .L.end.12 +.L.else.12: + leaq -16(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parse_ty(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + movq $5, %rax + push %rax + leaq -16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.14 +.data +.L.str.15: + .byte 117 + .byte 110 + .byte 115 + .byte 117 + .byte 112 + .byte 112 + .byte 111 + .byte 114 + .byte 116 + .byte 101 + .byte 100 + .byte 32 + .byte 102 + .byte 101 + .byte 97 + .byte 116 + .byte 117 + .byte 114 + .byte 101 + .byte 58 + .byte 32 + .byte 102 + .byte 117 + .byte 110 + .byte 99 + .byte 116 + .byte 105 + .byte 111 + .byte 110 + .byte 32 + .byte 112 + .byte 97 + .byte 114 + .byte 97 + .byte 109 + .byte 101 + .byte 116 + .byte 101 + .byte 114 + .byte 32 + .byte 111 + .byte 102 + .byte 32 + .byte 115 + .byte 116 + .byte 114 + .byte 117 + .byte 99 + .byte 116 + .byte 0 +.text + leaq .L.str.15(%rip), %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + push %rax + leaq print_error(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + jmp .L.end.14 +.L.else.14: +.L.end.14: + movq $13, %rax + push %rax + leaq -16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.15 + leaq -16(%rbp), %rax + push %rax + leaq -16(%rbp), %rax + movq (%rax), %rax + addq $48, %rax + movq (%rax), %rax + push %rax + leaq new_pointer_type(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + jmp .L.end.15 +.L.else.15: +.L.end.15: + leaq -16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + push %rax + leaq vec_append(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movq $1, %rax + push %rax + leaq -24(%rbp), %rax + movq (%rax), %rax + push %rax + leaq -16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq -32(%rbp), %rax + movq (%rax), %rax + push %rax + movq $1, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq new_local_object(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $48, %rsp + push %rax + leaq 32(%rbp), %rax + movq (%rax), %rax + push %rax + leaq vec_append(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp +.data +.L.str.16: + .byte 41 + .byte 0 +.text + leaq .L.str.16(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $0, %rax + sete %al + movzbq %al, %rax + cmpq $0, %rax + je .L.false.17 +.data +.L.str.17: + .byte 44 + .byte 0 +.text + leaq .L.str.17(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $0, %rax + sete %al + movzbq %al, %rax + cmpq $0, %rax + je .L.false.17 + movq $1, %rax + jmp .L.end.17 +.L.false.17: + movq $0, %rax +.L.end.17: + cmpq $1, %rax + jne .L.else.16 + jmp .L.parse_function_params.break + jmp .L.end.16 +.L.else.16: +.data +.L.str.18: + .byte 41 + .byte 0 +.text + leaq .L.str.18(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $0, %rax + sete %al + movzbq %al, %rax + cmpq $1, %rax + jne .L.else.18 +.data +.L.str.19: + .byte 44 + .byte 0 +.text + leaq .L.str.19(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_skip(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + jmp .L.end.18 +.L.else.18: +.L.end.18: +.L.end.16: +.L.end.12: + jmp .L.while.start.11 +.L.while.end.11: +.L.parse_function_params.break: +.data +.L.str.20: + .byte 41 + .byte 0 +.text + leaq .L.str.20(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_skip(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + leaq -36(%rbp), %rax + movslq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global parse_struct +parse_struct: + push %rbp + movq %rsp, %rbp + subq $48, %rsp +.data +.L.str.21: + .byte 115 + .byte 116 + .byte 114 + .byte 117 + .byte 99 + .byte 116 + .byte 0 +.text + leaq .L.str.21(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_skip(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + leaq -44(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_next(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leaq -36(%rbp), %rax + push %rax + movq $4, %rax + push %rax + leaq new_vec(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -28(%rbp), %rax + push %rax + movq $80, %rax + push %rax + leaq alloc(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -28(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + push %rax + movq $5, %rax + pop %rdi + movl %eax, (%rdi) + leaq -28(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + push %rax + leaq -44(%rbp), %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leaq -28(%rbp), %rax + movq (%rax), %rax + addq $4, %rax + push %rax + movq $0, %rax + pop %rdi + movl %eax, (%rdi) + leaq -28(%rbp), %rax + movq (%rax), %rax + addq $16, %rax + push %rax + leaq -36(%rbp), %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leaq -20(%rbp), %rax + push %rax + leaq -44(%rbp), %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq get_user_defined_type(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + pop %rdi + movq %rax, (%rdi) + movq $0, %rax + push %rax + leaq -20(%rbp), %rax + movq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.19 + leaq -28(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq vec_append(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + jmp .L.end.19 +.L.else.19: +.L.end.19: +.data +.L.str.22: + .byte 59 + .byte 0 +.text + leaq .L.str.22(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.20 + movq $0, %rax + push %rax + leaq -20(%rbp), %rax + movq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.21 + leaq -28(%rbp), %rax + movq (%rax), %rax + addq $64, %rax + push %rax + movq $1, %rax + pop %rdi + movl %eax, (%rdi) + jmp .L.end.21 +.L.else.21: +.L.end.21: +.data +.L.str.23: + .byte 59 + .byte 0 +.text + leaq .L.str.23(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_skip(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + jmp .L.end.20 +.L.else.20: +.data +.L.str.24: + .byte 123 + .byte 0 +.text + leaq .L.str.24(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_skip(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp +.L.while.start.22: +.data +.L.str.25: + .byte 125 + .byte 0 +.text + leaq .L.str.25(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $0, %rax + sete %al + movzbq %al, %rax + cmpq $1, %rax + jne .L.while.end.22 + leaq -12(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_next(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parse_ty(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + push %rax + leaq -12(%rbp), %rax + movq (%rax), %rax + push %rax + leaq new_member(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + push %rax + leaq -36(%rbp), %rax + movq (%rax), %rax + push %rax + leaq vec_append(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp +.data +.L.str.26: + .byte 44 + .byte 0 +.text + leaq .L.str.26(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_skip(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + jmp .L.while.start.22 +.L.while.end.22: +.data +.L.str.27: + .byte 125 + .byte 0 +.text + leaq .L.str.27(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_skip(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + leaq -4(%rbp), %rax + push %rax + leaq -36(%rbp), %rax + movq (%rax), %rax + push %rax + leaq calc_sizof_struct_members(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movl %eax, (%rdi) + movq $0, %rax + push %rax + leaq -20(%rbp), %rax + movq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.23 + leaq -28(%rbp), %rax + movq (%rax), %rax + addq $4, %rax + push %rax + leaq -4(%rbp), %rax + movslq (%rax), %rax + pop %rdi + movl %eax, (%rdi) + leaq -28(%rbp), %rax + movq (%rax), %rax + addq $16, %rax + push %rax + leaq -36(%rbp), %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + jmp .L.end.23 +.L.else.23: + leaq -20(%rbp), %rax + movq (%rax), %rax + addq $64, %rax + movslq (%rax), %rax + cmpq $0, %rax + sete %al + movzbq %al, %rax + cmpq $1, %rax + jne .L.else.24 +.data +.L.str.28: + .byte 115 + .byte 116 + .byte 114 + .byte 117 + .byte 99 + .byte 116 + .byte 32 + .byte 105 + .byte 115 + .byte 32 + .byte 97 + .byte 108 + .byte 114 + .byte 101 + .byte 97 + .byte 100 + .byte 121 + .byte 32 + .byte 100 + .byte 101 + .byte 102 + .byte 105 + .byte 110 + .byte 101 + .byte 100 + .byte 0 +.text + leaq .L.str.28(%rip), %rax + push %rax + leaq -44(%rbp), %rax + movq (%rax), %rax + push %rax + leaq print_error(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + jmp .L.end.24 +.L.else.24: + leaq -20(%rbp), %rax + movq (%rax), %rax + addq $16, %rax + push %rax + leaq -36(%rbp), %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leaq -20(%rbp), %rax + movq (%rax), %rax + addq $4, %rax + push %rax + leaq -4(%rbp), %rax + movslq (%rax), %rax + pop %rdi + movl %eax, (%rdi) + leaq -20(%rbp), %rax + movq (%rax), %rax + addq $64, %rax + push %rax + movq $0, %rax + pop %rdi + movl %eax, (%rdi) +.L.end.24: +.L.end.23: +.L.end.20: + leave + ret +.global calc_sizof_struct_members +calc_sizof_struct_members: + push %rbp + movq %rsp, %rbp + subq $16, %rsp + leaq -16(%rbp), %rax + push %rax + movq $0, %rax + pop %rdi + movl %eax, (%rdi) + leaq -12(%rbp), %rax + push %rax + movq $0, %rax + pop %rdi + movl %eax, (%rdi) +.L.while.start.25: + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movslq (%rax), %rax + push %rax + leaq -12(%rbp), %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setl %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.while.end.25 + leaq -8(%rbp), %rax + push %rax + leaq -12(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq vec_get(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + pop %rdi + movq %rax, (%rdi) + movq $8, %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $4, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setle %al + movzbl %al, %eax + cmpq $0, %rax + je .L.false.27 + movq $8, %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $4, %rax + movslq (%rax), %rax + push %rax + leaq -16(%rbp), %rax + movslq (%rax), %rax + pop %rdi + addl %edi, %eax + push %rax + leaq align_to(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + push %rax + movq $8, %rax + push %rax + leaq -16(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq align_to(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + pop %rdi + cmpl %edi, %eax + setl %al + movzbl %al, %eax + cmpq $0, %rax + je .L.false.27 + movq $1, %rax + jmp .L.end.27 +.L.false.27: + movq $0, %rax +.L.end.27: + cmpq $1, %rax + jne .L.else.26 + leaq -16(%rbp), %rax + push %rax + movq $8, %rax + push %rax + leaq -16(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq align_to(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + pop %rdi + movl %eax, (%rdi) + jmp .L.end.26 +.L.else.26: +.L.end.26: + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $16, %rax + push %rax + leaq -16(%rbp), %rax + movslq (%rax), %rax + pop %rdi + movl %eax, (%rdi) + leaq -16(%rbp), %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $4, %rax + movslq (%rax), %rax + push %rax + leaq -16(%rbp), %rax + movslq (%rax), %rax + pop %rdi + addl %edi, %eax + pop %rdi + movl %eax, (%rdi) + movq $1, %rax + push %rax + leaq -12(%rbp), %rax + push %rax + movq $1, %rax + push %rax + leaq -12(%rbp), %rax + movslq (%rax), %rax + pop %rdi + addl %edi, %eax + pop %rdi + movl %eax, (%rdi) + pop %rdi + subl %edi, %eax + jmp .L.while.start.25 +.L.while.end.25: + movq $8, %rax + push %rax + leaq -16(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq align_to(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global new_member +new_member: + push %rbp + movq %rsp, %rbp + subq $16, %rsp + leaq -8(%rbp), %rax + push %rax + movq $24, %rax + push %rax + leaq alloc(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global parse_label +parse_label: + push %rbp + movq %rsp, %rbp + subq $16, %rsp + leaq -8(%rbp), %rax + push %rax + movq $24, %rax + push %rax + leaq new_node(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $56, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_next(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp +.data +.L.str.29: + .byte 58 + .byte 0 +.text + leaq .L.str.29(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_skip(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + leaq -8(%rbp), %rax + movq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global parse_while +parse_while: + push %rbp + movq %rsp, %rbp + subq $16, %rsp +.data +.L.str.30: + .byte 119 + .byte 104 + .byte 105 + .byte 108 + .byte 101 + .byte 0 +.text + leaq .L.str.30(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_skip(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + leaq -8(%rbp), %rax + push %rax + movq $16, %rax + push %rax + leaq new_node(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) +.data +.L.str.31: + .byte 123 + .byte 0 +.text + leaq .L.str.31(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $0, %rax + sete %al + movzbq %al, %rax + cmpq $1, %rax + jne .L.else.28 + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $48, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parse_expr(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + jmp .L.end.28 +.L.else.28: + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $48, %rax + push %rax + leaq node_true(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $0, %rsp + pop %rdi + movq %rax, (%rdi) +.L.end.28: + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $32, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parse_block(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global parse_return +parse_return: + push %rbp + movq %rsp, %rbp + subq $16, %rsp +.data +.L.str.32: + .byte 114 + .byte 101 + .byte 116 + .byte 117 + .byte 114 + .byte 110 + .byte 0 +.text + leaq .L.str.32(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_skip(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp +.data +.L.str.33: + .byte 59 + .byte 0 +.text + leaq .L.str.33(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.29 +.data +.L.str.34: + .byte 59 + .byte 0 +.text + leaq .L.str.34(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_skip(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movq $18, %rax + push %rax + leaq new_node(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.29 +.L.else.29: +.L.end.29: + leaq -8(%rbp), %rax + push %rax + movq $18, %rax + push %rax + leaq new_node(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parse_expr_stmt(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global parse_if +parse_if: + push %rbp + movq %rsp, %rbp + subq $16, %rsp +.data +.L.str.35: + .byte 105 + .byte 102 + .byte 0 +.text + leaq .L.str.35(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_skip(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + leaq -8(%rbp), %rax + push %rax + movq $15, %rax + push %rax + leaq new_node(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $48, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parse_expr(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $32, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parse_block(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) +.data +.L.str.36: + .byte 101 + .byte 108 + .byte 115 + .byte 101 + .byte 0 +.text + leaq .L.str.36(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.30 + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_next(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $40, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parse_stmt(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + jmp .L.end.30 +.L.else.30: + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $40, %rax + push %rax + movq $29, %rax + push %rax + leaq new_node(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) +.L.end.30: + leaq -8(%rbp), %rax + movq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global parse_goto +parse_goto: + push %rbp + movq %rsp, %rbp + subq $16, %rsp +.data +.L.str.37: + .byte 103 + .byte 111 + .byte 116 + .byte 111 + .byte 0 +.text + leaq .L.str.37(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_skip(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + leaq -16(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_next(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp +.data +.L.str.38: + .byte 59 + .byte 0 +.text + leaq .L.str.38(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_skip(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + leaq -8(%rbp), %rax + push %rax + movq $23, %rax + push %rax + leaq new_node(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $56, %rax + push %rax + leaq -16(%rbp), %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global parse_let +parse_let: + push %rbp + movq %rsp, %rbp + subq $48, %rsp +.data +.L.str.39: + .byte 108 + .byte 101 + .byte 116 + .byte 0 +.text + leaq .L.str.39(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_skip(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + leaq -32(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_next(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leaq -24(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parse_ty(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -16(%rbp), %rax + push %rax + movq $0, %rax + push %rax + leaq -32(%rbp), %rax + movq (%rax), %rax + push %rax + leaq -24(%rbp), %rax + movq (%rax), %rax + push %rax + leaq -32(%rbp), %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + movq $1, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq new_local_object(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $48, %rsp + pop %rdi + movq %rax, (%rdi) +.data +.L.str.40: + .byte 61 + .byte 0 +.text + leaq .L.str.40(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.31 +.data +.L.str.41: + .byte 61 + .byte 0 +.text + leaq .L.str.41(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_skip(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + leaq -8(%rbp), %rax + push %rax + movq $14, %rax + push %rax + leaq new_node(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $80, %rax + push %rax + leaq -16(%rbp), %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq add_type(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp +.data +.L.str.42: + .byte 123 + .byte 0 +.text + leaq .L.str.42(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.32 + leaq -40(%rbp), %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq initializer(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + pop %rdi + movq %rax, (%rdi) +.data +.L.str.43: + .byte 59 + .byte 0 +.text + leaq .L.str.43(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_skip(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + jmp .L.end.32 +.L.else.32: + leaq -40(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parse_expr_stmt(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + push %rax + movq $17, %rax + push %rax + leaq new_binop(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + pop %rdi + movq %rax, (%rdi) +.L.end.32: + leaq -40(%rbp), %rax + movq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.31 +.L.else.31: +.data +.L.str.44: + .byte 59 + .byte 0 +.text + leaq .L.str.44(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_skip(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movq $0, %rax + movq %rbp, %rsp + pop %rbp + retq +.L.end.31: + leave + ret +.global initializer +initializer: + push %rbp + movq %rsp, %rbp + subq $48, %rsp + leaq -28(%rbp), %rax + push %rax + movq $0, %rax + pop %rdi + movl %eax, (%rdi) + leaq -24(%rbp), %rax + push %rax + movq $10, %rax + push %rax + leaq new_vec(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + movq $13, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setne %al + movzbl %al, %eax + cmpq $0, %rax + je .L.false.34 + movq $5, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setne %al + movzbl %al, %eax + cmpq $0, %rax + je .L.false.34 + movq $1, %rax + jmp .L.end.34 +.L.false.34: + movq $0, %rax +.L.end.34: + cmpq $1, %rax + jne .L.else.33 +.data +.L.str.45: + .byte 117 + .byte 110 + .byte 101 + .byte 120 + .byte 112 + .byte 101 + .byte 99 + .byte 116 + .byte 101 + .byte 100 + .byte 32 + .byte 105 + .byte 110 + .byte 105 + .byte 116 + .byte 105 + .byte 97 + .byte 108 + .byte 105 + .byte 122 + .byte 101 + .byte 114 + .byte 0 +.text + leaq .L.str.45(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + push %rax + leaq print_error(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + jmp .L.end.33 +.L.else.33: +.L.end.33: +.data +.L.str.46: + .byte 123 + .byte 0 +.text + leaq .L.str.46(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_skip(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp +.data +.L.str.47: + .byte 125 + .byte 0 +.text + leaq .L.str.47(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.35 + leaq -44(%rbp), %rax + push %rax + movq $32, %rax + push %rax + leaq new_node(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -44(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leaq -44(%rbp), %rax + movq (%rax), %rax + push %rax + leaq -24(%rbp), %rax + movq (%rax), %rax + push %rax + leaq vec_append(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + jmp .L.end.35 +.L.else.35: + movq $13, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.36 +.L.while.start.37: + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + addq $56, %rax + movslq (%rax), %rax + push %rax + leaq -28(%rbp), %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setl %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.while.end.37 + leaq -36(%rbp), %rax + push %rax + movq $20, %rax + push %rax + leaq new_node(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -36(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + push %rax + leaq -28(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + addq $48, %rax + movq (%rax), %rax + addq $4, %rax + movslq (%rax), %rax + pop %rdi + imull %edi, %eax + push %rax + leaq new_node_num(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + push %rax + movq $0, %rax + push %rax + leaq new_binop(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -36(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq add_type(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp +.data +.L.str.48: + .byte 123 + .byte 0 +.text + leaq .L.str.48(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.38 + leaq -44(%rbp), %rax + push %rax + leaq -36(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq initializer(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + pop %rdi + movq %rax, (%rdi) + jmp .L.end.38 +.L.else.38: + leaq -44(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parse_expr(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + push %rax + leaq -36(%rbp), %rax + movq (%rax), %rax + push %rax + movq $17, %rax + push %rax + leaq new_binop(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + pop %rdi + movq %rax, (%rdi) +.L.end.38: + leaq -44(%rbp), %rax + movq (%rax), %rax + push %rax + leaq -24(%rbp), %rax + movq (%rax), %rax + push %rax + leaq vec_append(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movq $1, %rax + push %rax + leaq -28(%rbp), %rax + push %rax + movq $1, %rax + push %rax + leaq -28(%rbp), %rax + movslq (%rax), %rax + pop %rdi + addl %edi, %eax + pop %rdi + movl %eax, (%rdi) + pop %rdi + subl %edi, %eax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + addq $56, %rax + movslq (%rax), %rax + push %rax + leaq -28(%rbp), %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setl %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.39 +.data +.L.str.49: + .byte 44 + .byte 0 +.text + leaq .L.str.49(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_skip(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + jmp .L.end.39 +.L.else.39: +.L.end.39: + jmp .L.while.start.37 +.L.while.end.37: + jmp .L.end.36 +.L.else.36: + movq $5, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.40 +.L.while.start.41: + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + addq $16, %rax + movq (%rax), %rax + addq $8, %rax + movslq (%rax), %rax + push %rax + leaq -28(%rbp), %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setl %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.while.end.41 + leaq -16(%rbp), %rax + push %rax + leaq -28(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + addq $16, %rax + movq (%rax), %rax + push %rax + leaq vec_get(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -36(%rbp), %rax + push %rax + leaq -16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + push %rax + leaq -16(%rbp), %rax + movq (%rax), %rax + addq $16, %rax + movslq (%rax), %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + push %rax + movq $28, %rax + push %rax + leaq new_struct_access_node(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $32, %rsp + pop %rdi + movq %rax, (%rdi) +.data +.L.str.50: + .byte 123 + .byte 0 +.text + leaq .L.str.50(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.42 + leaq -44(%rbp), %rax + push %rax + leaq -36(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq initializer(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + pop %rdi + movq %rax, (%rdi) + jmp .L.end.42 +.L.else.42: + leaq -44(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parse_expr(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + push %rax + leaq -36(%rbp), %rax + movq (%rax), %rax + push %rax + movq $17, %rax + push %rax + leaq new_binop(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + pop %rdi + movq %rax, (%rdi) +.L.end.42: + leaq -44(%rbp), %rax + movq (%rax), %rax + push %rax + leaq -24(%rbp), %rax + movq (%rax), %rax + push %rax + leaq vec_append(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movq $1, %rax + push %rax + leaq -28(%rbp), %rax + push %rax + movq $1, %rax + push %rax + leaq -28(%rbp), %rax + movslq (%rax), %rax + pop %rdi + addl %edi, %eax + pop %rdi + movl %eax, (%rdi) + pop %rdi + subl %edi, %eax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + addq $16, %rax + movq (%rax), %rax + addq $8, %rax + movslq (%rax), %rax + push %rax + leaq -28(%rbp), %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setl %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.43 +.data +.L.str.51: + .byte 44 + .byte 0 +.text + leaq .L.str.51(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_skip(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + jmp .L.end.43 +.L.else.43: +.L.end.43: + jmp .L.while.start.41 +.L.while.end.41: + jmp .L.end.40 +.L.else.40: +.L.end.40: +.L.end.36: +.L.end.35: +.data +.L.str.52: + .byte 125 + .byte 0 +.text + leaq .L.str.52(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_skip(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + leaq -8(%rbp), %rax + push %rax + movq $21, %rax + push %rax + leaq new_node(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + push %rax + leaq -24(%rbp), %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq add_type(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + leaq -8(%rbp), %rax + movq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global node_true +node_true: + push %rbp + movq %rsp, %rbp + subq $16, %rsp + leaq -8(%rbp), %rax + push %rax + movq $13, %rax + push %rax + leaq new_node(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $64, %rax + push %rax + movq $1, %rax + pop %rdi + movl %eax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global parse_block +parse_block: + push %rbp + movq %rsp, %rbp + subq $32, %rsp + leaq -24(%rbp), %rax + push %rax + movq $21, %rax + push %rax + leaq new_node(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -16(%rbp), %rax + push %rax + movq $4, %rax + push %rax + leaq new_vec(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) +.data +.L.str.53: + .byte 123 + .byte 0 +.text + leaq .L.str.53(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_skip(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq enter_scope(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp +.L.while.start.44: +.data +.L.str.54: + .byte 125 + .byte 0 +.text + leaq .L.str.54(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $0, %rax + sete %al + movzbq %al, %rax + cmpq $1, %rax + jne .L.while.end.44 + leaq -8(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parse_stmt(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + movq $0, %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setne %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.45 + leaq -8(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq add_type(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + leaq -8(%rbp), %rax + movq (%rax), %rax + push %rax + leaq -16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq vec_append(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + jmp .L.end.45 +.L.else.45: +.L.end.45: + jmp .L.while.start.44 +.L.while.end.44: + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq leave_scope(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp +.data +.L.str.55: + .byte 125 + .byte 0 +.text + leaq .L.str.55(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_skip(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + leaq -24(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + push %rax + leaq -16(%rbp), %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leaq -24(%rbp), %rax + movq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global parse_expr_stmt +parse_expr_stmt: + push %rbp + movq %rsp, %rbp + subq $16, %rsp + leaq -8(%rbp), %rax + push %rax + movq $22, %rax + push %rax + leaq new_node(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parse_expr(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) +.data +.L.str.56: + .byte 59 + .byte 0 +.text + leaq .L.str.56(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_skip(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + leaq -8(%rbp), %rax + movq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global parse_logor +parse_logor: + push %rbp + movq %rsp, %rbp + subq $16, %rsp + leaq -8(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parse_logand(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) +.L.while.start.46: +.data +.L.str.57: + .byte 124 + .byte 124 + .byte 0 +.text + leaq .L.str.57(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.while.end.46 + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_next(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leaq -8(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parse_logand(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + push %rax + movq $27, %rax + push %rax + leaq new_binop(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + pop %rdi + movq %rax, (%rdi) + jmp .L.while.start.46 +.L.while.end.46: + leaq -8(%rbp), %rax + movq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global parse_logand +parse_logand: + push %rbp + movq %rsp, %rbp + subq $16, %rsp + leaq -8(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parse_or(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) +.L.while.start.47: +.data +.L.str.58: + .byte 38 + .byte 38 + .byte 0 +.text + leaq .L.str.58(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.while.end.47 + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_next(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leaq -8(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parse_or(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + push %rax + movq $26, %rax + push %rax + leaq new_binop(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + pop %rdi + movq %rax, (%rdi) + jmp .L.while.start.47 +.L.while.end.47: + leaq -8(%rbp), %rax + movq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global parse_or +parse_or: + push %rbp + movq %rsp, %rbp + subq $16, %rsp + leaq -8(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parse_and(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) +.L.while.start.48: +.data +.L.str.59: + .byte 124 + .byte 0 +.text + leaq .L.str.59(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.while.end.48 + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_next(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leaq -8(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parse_and(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + push %rax + movq $34, %rax + push %rax + leaq new_binop(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + pop %rdi + movq %rax, (%rdi) + jmp .L.while.start.48 +.L.while.end.48: + leaq -8(%rbp), %rax + movq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global parse_and +parse_and: + push %rbp + movq %rsp, %rbp + subq $16, %rsp + leaq -8(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parse_equality(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) +.L.while.start.49: +.data +.L.str.60: + .byte 38 + .byte 0 +.text + leaq .L.str.60(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.while.end.49 + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_next(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leaq -8(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parse_equality(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + push %rax + movq $33, %rax + push %rax + leaq new_binop(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + pop %rdi + movq %rax, (%rdi) + jmp .L.while.start.49 +.L.while.end.49: + leaq -8(%rbp), %rax + movq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global parse_equality +parse_equality: + push %rbp + movq %rsp, %rbp + subq $16, %rsp + leaq -16(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parse_relational(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) +.L.while.start.50: + movq $1, %rax + cmpq $1, %rax + jne .L.while.end.50 +.data +.L.str.61: + .byte 61 + .byte 61 + .byte 0 +.text + leaq .L.str.61(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.51 + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_next(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leaq -8(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parse_relational(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + push %rax + leaq is_comparison_node(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.52 + leaq -16(%rbp), %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + push %rax + leaq -16(%rbp), %rax + movq (%rax), %rax + push %rax + movq $7, %rax + push %rax + leaq new_equality(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + pop %rdi + movq %rax, (%rdi) + jmp .L.end.52 +.L.else.52: + leaq -16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq is_comparison_node(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.53 + leaq -16(%rbp), %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + push %rax + leaq -16(%rbp), %rax + movq (%rax), %rax + push %rax + movq $7, %rax + push %rax + leaq new_relational(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + pop %rdi + movq %rax, (%rdi) + jmp .L.end.53 +.L.else.53: + leaq -16(%rbp), %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + push %rax + leaq -16(%rbp), %rax + movq (%rax), %rax + push %rax + movq $7, %rax + push %rax + leaq new_binop(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + pop %rdi + movq %rax, (%rdi) +.L.end.53: +.L.end.52: + jmp .L.end.51 +.L.else.51: +.data +.L.str.62: + .byte 33 + .byte 61 + .byte 0 +.text + leaq .L.str.62(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.54 + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_next(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leaq -8(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parse_relational(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + push %rax + leaq is_comparison_node(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.55 + leaq -16(%rbp), %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + push %rax + leaq -16(%rbp), %rax + movq (%rax), %rax + push %rax + movq $6, %rax + push %rax + leaq new_equality(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + pop %rdi + movq %rax, (%rdi) + jmp .L.end.55 +.L.else.55: + leaq -16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq is_comparison_node(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.56 + leaq -16(%rbp), %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + push %rax + leaq -16(%rbp), %rax + movq (%rax), %rax + push %rax + movq $6, %rax + push %rax + leaq new_relational(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + pop %rdi + movq %rax, (%rdi) + jmp .L.end.56 +.L.else.56: + leaq -16(%rbp), %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + push %rax + leaq -16(%rbp), %rax + movq (%rax), %rax + push %rax + movq $6, %rax + push %rax + leaq new_binop(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + pop %rdi + movq %rax, (%rdi) +.L.end.56: +.L.end.55: + jmp .L.end.54 +.L.else.54: + jmp .L.parse_equality.break +.L.end.54: +.L.end.51: + jmp .L.while.start.50 +.L.while.end.50: +.L.parse_equality.break: + leaq -16(%rbp), %rax + movq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global parse_relational +parse_relational: + push %rbp + movq %rsp, %rbp + subq $16, %rsp + leaq -16(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parse_shift(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) +.L.while.start.57: + movq $1, %rax + cmpq $1, %rax + jne .L.while.end.57 +.data +.L.str.63: + .byte 60 + .byte 61 + .byte 0 +.text + leaq .L.str.63(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.58 + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_next(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leaq -8(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parse_shift(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq is_comparison_node(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.59 + leaq -16(%rbp), %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + push %rax + leaq -16(%rbp), %rax + movq (%rax), %rax + push %rax + movq $8, %rax + push %rax + leaq new_relational(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + pop %rdi + movq %rax, (%rdi) + jmp .L.end.59 +.L.else.59: + leaq -16(%rbp), %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + push %rax + leaq -16(%rbp), %rax + movq (%rax), %rax + push %rax + movq $8, %rax + push %rax + leaq new_binop(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + pop %rdi + movq %rax, (%rdi) +.L.end.59: + jmp .L.end.58 +.L.else.58: +.data +.L.str.64: + .byte 62 + .byte 61 + .byte 0 +.text + leaq .L.str.64(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.60 + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_next(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leaq -8(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parse_shift(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq is_comparison_node(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.61 + leaq -16(%rbp), %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + push %rax + leaq -16(%rbp), %rax + movq (%rax), %rax + push %rax + movq $10, %rax + push %rax + leaq new_relational(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + pop %rdi + movq %rax, (%rdi) + jmp .L.end.61 +.L.else.61: + leaq -16(%rbp), %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + push %rax + leaq -16(%rbp), %rax + movq (%rax), %rax + push %rax + movq $10, %rax + push %rax + leaq new_binop(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + pop %rdi + movq %rax, (%rdi) +.L.end.61: + jmp .L.end.60 +.L.else.60: +.data +.L.str.65: + .byte 60 + .byte 0 +.text + leaq .L.str.65(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.62 + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_next(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leaq -8(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parse_shift(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq is_comparison_node(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.63 + leaq -16(%rbp), %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + push %rax + leaq -16(%rbp), %rax + movq (%rax), %rax + push %rax + movq $9, %rax + push %rax + leaq new_relational(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + pop %rdi + movq %rax, (%rdi) + jmp .L.end.63 +.L.else.63: + leaq -16(%rbp), %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + push %rax + leaq -16(%rbp), %rax + movq (%rax), %rax + push %rax + movq $9, %rax + push %rax + leaq new_binop(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + pop %rdi + movq %rax, (%rdi) +.L.end.63: + jmp .L.end.62 +.L.else.62: +.data +.L.str.66: + .byte 62 + .byte 0 +.text + leaq .L.str.66(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.64 + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_next(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leaq -8(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parse_shift(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq is_comparison_node(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.65 + leaq -16(%rbp), %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + push %rax + leaq -16(%rbp), %rax + movq (%rax), %rax + push %rax + movq $11, %rax + push %rax + leaq new_relational(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + pop %rdi + movq %rax, (%rdi) + jmp .L.end.65 +.L.else.65: + leaq -16(%rbp), %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + push %rax + leaq -16(%rbp), %rax + movq (%rax), %rax + push %rax + movq $11, %rax + push %rax + leaq new_binop(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + pop %rdi + movq %rax, (%rdi) +.L.end.65: + jmp .L.end.64 +.L.else.64: + jmp .L.parse_relational.break +.L.end.64: +.L.end.62: +.L.end.60: +.L.end.58: + jmp .L.while.start.57 +.L.while.end.57: +.L.parse_relational.break: + leaq -16(%rbp), %rax + movq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global new_equality +new_equality: + push %rbp + movq %rsp, %rbp + subq $16, %rsp + leaq 24(%rbp), %rax + movq (%rax), %rax + push %rax + leaq is_comparison_node(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movzx %al, %eax + cmpq $0, %rax + je .L.false.67 + leaq 32(%rbp), %rax + movq (%rax), %rax + push %rax + leaq is_comparison_node(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movzx %al, %eax + cmpq $0, %rax + je .L.false.67 + movq $1, %rax + jmp .L.end.67 +.L.false.67: + movq $0, %rax +.L.end.67: + cmpq $1, %rax + jne .L.else.66 + leaq -8(%rbp), %rax + push %rax + leaq 32(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movq (%rax), %rax + push %rax + leaq search_relational_lhs(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $16, %rax + movq (%rax), %rax + push %rax + leaq search_relational_rhs(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + push %rax + leaq 16(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq new_binop(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + push %rax + movq $26, %rax + push %rax + leaq new_binop(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + push %rax + leaq 32(%rbp), %rax + movq (%rax), %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + push %rax + movq $26, %rax + push %rax + leaq new_binop(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.66 +.L.else.66: +.L.end.66: + leaq -8(%rbp), %rax + push %rax + leaq 32(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movq (%rax), %rax + push %rax + leaq search_relational_lhs(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq new_binop(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + push %rax + leaq 32(%rbp), %rax + movq (%rax), %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + push %rax + movq $26, %rax + push %rax + leaq new_binop(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global new_relational +new_relational: + push %rbp + movq %rsp, %rbp + subq $16, %rsp + leaq 24(%rbp), %rax + movq (%rax), %rax + push %rax + leaq is_comparison_node(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movzx %al, %eax + cmpq $0, %rax + je .L.false.69 + leaq 32(%rbp), %rax + movq (%rax), %rax + push %rax + leaq is_comparison_node(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movzx %al, %eax + cmpq $0, %rax + je .L.false.69 + movq $1, %rax + jmp .L.end.69 +.L.false.69: + movq $0, %rax +.L.end.69: + cmpq $1, %rax + jne .L.else.68 + leaq -8(%rbp), %rax + push %rax + leaq 32(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movq (%rax), %rax + push %rax + leaq search_relational_lhs(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $16, %rax + movq (%rax), %rax + push %rax + leaq search_relational_rhs(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + push %rax + leaq 16(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq new_binop(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + push %rax + leaq 32(%rbp), %rax + movq (%rax), %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + push %rax + movq $26, %rax + push %rax + leaq new_binop(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + push %rax + movq $26, %rax + push %rax + leaq new_binop(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.68 +.L.else.68: +.L.end.68: + leaq -8(%rbp), %rax + push %rax + leaq 32(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $16, %rax + movq (%rax), %rax + push %rax + leaq search_relational_rhs(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + push %rax + leaq 16(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq new_binop(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + push %rax + movq $26, %rax + push %rax + leaq new_binop(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global search_relational_lhs +search_relational_lhs: + push %rbp + movq %rsp, %rbp + subq $16, %rsp + leaq -8(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) +.L.while.start.70: + leaq -8(%rbp), %rax + movq (%rax), %rax + push %rax + leaq is_comparison_node(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.while.end.70 + leaq -8(%rbp), %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + jmp .L.while.start.70 +.L.while.end.70: + leaq -8(%rbp), %rax + movq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global search_relational_rhs +search_relational_rhs: + push %rbp + movq %rsp, %rbp + subq $16, %rsp + leaq -8(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) +.L.while.start.71: + leaq -8(%rbp), %rax + movq (%rax), %rax + push %rax + leaq is_comparison_node(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.while.end.71 + leaq -8(%rbp), %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $16, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + jmp .L.while.start.71 +.L.while.end.71: + leaq -8(%rbp), %rax + movq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global is_comparison_node +is_comparison_node: + push %rbp + movq %rsp, %rbp + subq $0, %rsp + movq $8, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $0, %rax + jne .L.true.77 + movq $10, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmp $0, %rax + jne .L.true.77 + mov $0, %rax + jmp .L.end.77 +.L.true.77: + mov $1, %rax +.L.end.77: + cmpq $0, %rax + jne .L.true.76 + movq $9, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmp $0, %rax + jne .L.true.76 + mov $0, %rax + jmp .L.end.76 +.L.true.76: + mov $1, %rax +.L.end.76: + cmpq $0, %rax + jne .L.true.75 + movq $11, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmp $0, %rax + jne .L.true.75 + mov $0, %rax + jmp .L.end.75 +.L.true.75: + mov $1, %rax +.L.end.75: + cmpq $0, %rax + jne .L.true.74 + movq $7, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmp $0, %rax + jne .L.true.74 + mov $0, %rax + jmp .L.end.74 +.L.true.74: + mov $1, %rax +.L.end.74: + cmpq $0, %rax + jne .L.true.73 + movq $6, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmp $0, %rax + jne .L.true.73 + mov $0, %rax + jmp .L.end.73 +.L.true.73: + mov $1, %rax +.L.end.73: + cmpq $0, %rax + jne .L.true.72 + movq $26, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmp $0, %rax + jne .L.true.72 + mov $0, %rax + jmp .L.end.72 +.L.true.72: + mov $1, %rax +.L.end.72: + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global parse_shift +parse_shift: + push %rbp + movq %rsp, %rbp + subq $16, %rsp + leaq -8(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parse_add(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) +.L.while.start.78: + movq $1, %rax + cmpq $1, %rax + jne .L.while.end.78 +.data +.L.str.67: + .byte 60 + .byte 60 + .byte 0 +.text + leaq .L.str.67(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.79 + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_next(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leaq -8(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parse_add(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + push %rax + movq $30, %rax + push %rax + leaq new_binop(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + pop %rdi + movq %rax, (%rdi) + jmp .L.end.79 +.L.else.79: +.data +.L.str.68: + .byte 62 + .byte 62 + .byte 0 +.text + leaq .L.str.68(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.80 + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_next(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leaq -8(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parse_add(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + push %rax + movq $31, %rax + push %rax + leaq new_binop(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + pop %rdi + movq %rax, (%rdi) + jmp .L.end.80 +.L.else.80: + jmp .L.parse_shift.break +.L.end.80: +.L.end.79: + jmp .L.while.start.78 +.L.while.end.78: +.L.parse_shift.break: + leaq -8(%rbp), %rax + movq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global parse_add +parse_add: + push %rbp + movq %rsp, %rbp + subq $16, %rsp + leaq -8(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parse_mul(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) +.L.while.start.81: + movq $1, %rax + cmpq $1, %rax + jne .L.while.end.81 +.data +.L.str.69: + .byte 43 + .byte 0 +.text + leaq .L.str.69(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.82 + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_next(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leaq -8(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parse_mul(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + push %rax + movq $0, %rax + push %rax + leaq new_binop(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + pop %rdi + movq %rax, (%rdi) + jmp .L.end.82 +.L.else.82: +.data +.L.str.70: + .byte 45 + .byte 0 +.text + leaq .L.str.70(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.83 + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_next(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leaq -8(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parse_mul(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + push %rax + movq $1, %rax + push %rax + leaq new_binop(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + pop %rdi + movq %rax, (%rdi) + jmp .L.end.83 +.L.else.83: + jmp .L.parse_add.break +.L.end.83: +.L.end.82: + jmp .L.while.start.81 +.L.while.end.81: +.L.parse_add.break: + leaq -8(%rbp), %rax + movq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global parse_mul +parse_mul: + push %rbp + movq %rsp, %rbp + subq $16, %rsp + leaq -8(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parse_unary(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) +.L.while.start.84: + movq $1, %rax + cmpq $1, %rax + jne .L.while.end.84 +.data +.L.str.71: + .byte 42 + .byte 0 +.text + leaq .L.str.71(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.85 + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_next(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leaq -8(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parse_unary(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + push %rax + movq $2, %rax + push %rax + leaq new_binop(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + pop %rdi + movq %rax, (%rdi) + jmp .L.end.85 +.L.else.85: +.data +.L.str.72: + .byte 47 + .byte 0 +.text + leaq .L.str.72(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.86 + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_next(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leaq -8(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parse_unary(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + push %rax + movq $3, %rax + push %rax + leaq new_binop(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + pop %rdi + movq %rax, (%rdi) + jmp .L.end.86 +.L.else.86: +.data +.L.str.73: + .byte 37 + .byte 0 +.text + leaq .L.str.73(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.87 + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_next(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leaq -8(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parse_unary(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + push %rax + movq $4, %rax + push %rax + leaq new_binop(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + pop %rdi + movq %rax, (%rdi) + jmp .L.end.87 +.L.else.87: + jmp .L.parse_mul.break +.L.end.87: +.L.end.86: +.L.end.85: + jmp .L.while.start.84 +.L.while.end.84: +.L.parse_mul.break: + leaq -8(%rbp), %rax + movq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global parse_not +parse_not: + push %rbp + movq %rsp, %rbp + subq $16, %rsp +.data +.L.str.74: + .byte 33 + .byte 0 +.text + leaq .L.str.74(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_skip(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + leaq -8(%rbp), %rax + push %rax + movq $5, %rax + push %rax + leaq new_node(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parse_unary(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global parse_ref +parse_ref: + push %rbp + movq %rsp, %rbp + subq $16, %rsp +.data +.L.str.75: + .byte 38 + .byte 0 +.text + leaq .L.str.75(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_skip(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + leaq -8(%rbp), %rax + push %rax + movq $19, %rax + push %rax + leaq new_node(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parse_unary(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global params_length_without_argv_argc +params_length_without_argv_argc: + push %rbp + movq %rsp, %rbp + subq $0, %rsp + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $40, %rax + movslq (%rax), %rax + cmpq $1, %rax + jne .L.else.88 + movq $2, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + addq $8, %rax + movslq (%rax), %rax + pop %rdi + subl %edi, %eax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.88 +.L.else.88: + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + addq $8, %rax + movslq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq +.L.end.88: + leave + ret +.global new_binop +new_binop: + push %rbp + movq %rsp, %rbp + subq $16, %rsp + leaq -8(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq new_node(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $16, %rax + push %rax + leaq 32(%rbp), %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global parse_deref +parse_deref: + push %rbp + movq %rsp, %rbp + subq $16, %rsp + leaq -16(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_next(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leaq -8(%rbp), %rax + push %rax + movq $20, %rax + push %rax + leaq new_node(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parse_unary(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq add_type(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movq $7, %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setne %al + movzbl %al, %eax + cmpq $0, %rax + je .L.false.90 + movq $13, %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setne %al + movzbl %al, %eax + cmpq $0, %rax + je .L.false.90 + movq $1, %rax + jmp .L.end.90 +.L.false.90: + movq $0, %rax +.L.end.90: + cmpq $1, %rax + jne .L.else.89 +.data +.L.str.76: + .byte 105 + .byte 110 + .byte 118 + .byte 97 + .byte 108 + .byte 105 + .byte 100 + .byte 32 + .byte 112 + .byte 111 + .byte 105 + .byte 110 + .byte 116 + .byte 101 + .byte 114 + .byte 32 + .byte 100 + .byte 101 + .byte 114 + .byte 101 + .byte 102 + .byte 101 + .byte 114 + .byte 101 + .byte 110 + .byte 99 + .byte 101 + .byte 0 +.text + leaq .L.str.76(%rip), %rax + push %rax + leaq -16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq print_error(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + jmp .L.end.89 +.L.else.89: +.L.end.89: + leaq -8(%rbp), %rax + movq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global new_struct_access_node +new_struct_access_node: + push %rbp + movq %rsp, %rbp + subq $16, %rsp + leaq -8(%rbp), %rax + push %rax + movq $120, %rax + push %rax + leaq alloc(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + push %rax + leaq 16(%rbp), %rax + movslq (%rax), %rax + pop %rdi + movl %eax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $104, %rax + push %rax + leaq 32(%rbp), %rax + movslq (%rax), %rax + pop %rdi + movl %eax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + push %rax + leaq 40(%rbp), %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global search_struct_member +search_struct_member: + push %rbp + movq %rsp, %rbp + subq $16, %rsp + leaq -12(%rbp), %rax + push %rax + movq $0, %rax + pop %rdi + movl %eax, (%rdi) +.L.while.start.91: + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movslq (%rax), %rax + push %rax + leaq -12(%rbp), %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setl %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.while.end.91 + leaq -8(%rbp), %rax + push %rax + leaq -12(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq vec_get(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + pop %rdi + movq %rax, (%rdi) + leaq 24(%rbp), %rax + movq (%rax), %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.92 + leaq -8(%rbp), %rax + movq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.92 +.L.else.92: +.L.end.92: + movq $1, %rax + push %rax + leaq -12(%rbp), %rax + push %rax + movq $1, %rax + push %rax + leaq -12(%rbp), %rax + movslq (%rax), %rax + pop %rdi + addl %edi, %eax + pop %rdi + movl %eax, (%rdi) + pop %rdi + subl %edi, %eax + jmp .L.while.start.91 +.L.while.end.91: + movq $0, %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global parse_number +parse_number: + push %rbp + movq %rsp, %rbp + subq $16, %rsp + movq $0, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.93 + leaq -8(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $56, %rax + movslq (%rax), %rax + push %rax + leaq new_node_num(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_next(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.end.93 +.L.else.93: + movq $3, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.94 + leaq -8(%rbp), %rax + push %rax + movq $12, %rax + push %rax + leaq new_node(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $72, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $48, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_next(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.end.94 +.L.else.94: +.data +.L.str.77: + .byte 110 + .byte 105 + .byte 108 + .byte 0 +.text + leaq .L.str.77(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.95 + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_next(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leaq -8(%rbp), %rax + push %rax + movq $13, %rax + push %rax + leaq new_node(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $56, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $64, %rax + push %rax + movq $0, %rax + pop %rdi + movl %eax, (%rdi) + jmp .L.end.95 +.L.else.95: +.data +.L.str.78: + .byte 116 + .byte 114 + .byte 117 + .byte 101 + .byte 0 +.text + leaq .L.str.78(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.96 + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_next(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leaq -8(%rbp), %rax + push %rax + movq $13, %rax + push %rax + leaq new_node(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $112, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $64, %rax + push %rax + movq $1, %rax + pop %rdi + movl %eax, (%rdi) + jmp .L.end.96 +.L.else.96: +.data +.L.str.79: + .byte 102 + .byte 97 + .byte 108 + .byte 115 + .byte 101 + .byte 0 +.text + leaq .L.str.79(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.97 + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_next(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leaq -8(%rbp), %rax + push %rax + movq $13, %rax + push %rax + leaq new_node(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $112, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $64, %rax + push %rax + movq $0, %rax + pop %rdi + movl %eax, (%rdi) + jmp .L.end.97 +.L.else.97: +.data +.L.str.80: + .byte 116 + .byte 121 + .byte 112 + .byte 101 + .byte 115 + .byte 105 + .byte 122 + .byte 101 + .byte 0 +.text + leaq .L.str.80(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.98 + leaq -8(%rbp), %rax + push %rax + movq $13, %rax + push %rax + leaq new_node(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_next(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp +.data +.L.str.81: + .byte 40 + .byte 0 +.text + leaq .L.str.81(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_skip(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $64, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parse_ty(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + addq $4, %rax + movslq (%rax), %rax + pop %rdi + movl %eax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $56, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) +.data +.L.str.82: + .byte 41 + .byte 0 +.text + leaq .L.str.82(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_skip(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + jmp .L.end.98 +.L.else.98: +.data +.L.str.83: + .byte 115 + .byte 105 + .byte 122 + .byte 101 + .byte 111 + .byte 102 + .byte 0 +.text + leaq .L.str.83(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.99 + leaq -8(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parse_sizeof(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + jmp .L.end.99 +.L.else.99: + movq $2, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.100 + leaq -8(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parse_ident(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + jmp .L.end.100 +.L.else.100: +.data +.L.str.84: + .byte 40 + .byte 0 +.text + leaq .L.str.84(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.101 + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_next(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leaq -8(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parse_expr(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) +.data +.L.str.85: + .byte 41 + .byte 0 +.text + leaq .L.str.85(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_skip(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + jmp .L.end.101 +.L.else.101: +.data +.L.str.86: + .byte 101 + .byte 120 + .byte 112 + .byte 101 + .byte 99 + .byte 116 + .byte 101 + .byte 100 + .byte 32 + .byte 110 + .byte 117 + .byte 109 + .byte 98 + .byte 101 + .byte 114 + .byte 32 + .byte 111 + .byte 114 + .byte 32 + .byte 105 + .byte 100 + .byte 101 + .byte 110 + .byte 116 + .byte 105 + .byte 102 + .byte 105 + .byte 101 + .byte 114 + .byte 0 +.text + leaq .L.str.86(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + push %rax + leaq print_error(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movq $1, %rax + push %rax + leaq exit(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp +.L.end.101: +.L.end.100: +.L.end.99: +.L.end.98: +.L.end.97: +.L.end.96: +.L.end.95: +.L.end.94: +.L.end.93: + leaq -8(%rbp), %rax + movq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global new_node_num +new_node_num: + push %rbp + movq %rsp, %rbp + subq $16, %rsp + leaq -8(%rbp), %rax + push %rax + movq $13, %rax + push %rax + leaq new_node(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $64, %rax + push %rax + leaq 16(%rbp), %rax + movslq (%rax), %rax + pop %rdi + movl %eax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global parse_ident +parse_ident: + push %rbp + movq %rsp, %rbp + subq $32, %rsp + leaq -24(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leaq -16(%rbp), %rax + push %rax + movq $14, %rax + push %rax + leaq new_node(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq find_object(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + pop %rdi + movq %rax, (%rdi) + movq $0, %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.102 +.data +.L.str.87: + .byte 117 + .byte 110 + .byte 107 + .byte 111 + .byte 119 + .byte 110 + .byte 32 + .byte 111 + .byte 98 + .byte 106 + .byte 101 + .byte 99 + .byte 116 + .byte 0 +.text + leaq .L.str.87(%rip), %rax + push %rax + leaq -24(%rbp), %rax + movq (%rax), %rax + push %rax + leaq print_error(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + jmp .L.end.102 +.L.else.102: +.L.end.102: + leaq -16(%rbp), %rax + movq (%rax), %rax + addq $80, %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_next(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leaq -16(%rbp), %rax + movq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global find_object +find_object: + push %rbp + movq %rsp, %rbp + subq $16, %rsp + leaq -8(%rbp), %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq find_locals(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + pop %rdi + movq %rax, (%rdi) + movq $0, %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.103 + leaq -8(%rbp), %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq find_globals(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + pop %rdi + movq %rax, (%rdi) + jmp .L.end.103 +.L.else.103: +.L.end.103: + leaq -8(%rbp), %rax + movq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global parse_sizeof +parse_sizeof: + push %rbp + movq %rsp, %rbp + subq $16, %rsp +.data +.L.str.88: + .byte 115 + .byte 105 + .byte 122 + .byte 101 + .byte 111 + .byte 102 + .byte 0 +.text + leaq .L.str.88(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_skip(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp +.data +.L.str.89: + .byte 40 + .byte 0 +.text + leaq .L.str.89(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_skip(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + leaq -12(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parse_unary(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) +.data +.L.str.90: + .byte 41 + .byte 0 +.text + leaq .L.str.90(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_skip(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + leaq -12(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq add_type(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + leaq -4(%rbp), %rax + push %rax + leaq -12(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + addq $4, %rax + movslq (%rax), %rax + pop %rdi + movl %eax, (%rdi) + leaq -12(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + push %rax + movq $13, %rax + pop %rdi + movl %eax, (%rdi) + leaq -12(%rbp), %rax + movq (%rax), %rax + addq $64, %rax + push %rax + leaq -4(%rbp), %rax + movslq (%rax), %rax + pop %rdi + movl %eax, (%rdi) + leaq -12(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $56, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leaq -12(%rbp), %rax + movq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global parse_unary +parse_unary: + push %rbp + movq %rsp, %rbp + subq $112, %rsp +.data +.L.str.91: + .byte 42 + .byte 0 +.text + leaq .L.str.91(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.104 + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parse_deref(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.104 +.L.else.104: +.L.end.104: +.data +.L.str.92: + .byte 38 + .byte 0 +.text + leaq .L.str.92(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.105 + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parse_ref(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.105 +.L.else.105: +.L.end.105: +.data +.L.str.93: + .byte 33 + .byte 0 +.text + leaq .L.str.93(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.106 + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parse_not(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.106 +.L.else.106: +.L.end.106: + leaq -100(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parse_number(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) +.L.while.start.107: + movq $1, %rax + cmpq $1, %rax + jne .L.while.end.107 +.data +.L.str.94: + .byte 40 + .byte 0 +.text + leaq .L.str.94(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.108 + leaq -92(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) +.data +.L.str.95: + .byte 40 + .byte 0 +.text + leaq .L.str.95(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_skip(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + leaq -100(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq add_type(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movq $6, %rax + push %rax + leaq -100(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setne %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.109 +.data +.L.str.96: + .byte 99 + .byte 97 + .byte 110 + .byte 110 + .byte 111 + .byte 116 + .byte 32 + .byte 99 + .byte 97 + .byte 108 + .byte 108 + .byte 32 + .byte 97 + .byte 32 + .byte 110 + .byte 111 + .byte 110 + .byte 101 + .byte 32 + .byte 102 + .byte 117 + .byte 110 + .byte 99 + .byte 116 + .byte 105 + .byte 111 + .byte 110 + .byte 32 + .byte 116 + .byte 121 + .byte 112 + .byte 101 + .byte 32 + .byte 111 + .byte 98 + .byte 106 + .byte 101 + .byte 99 + .byte 116 + .byte 10 + .byte 0 +.text + leaq .L.str.96(%rip), %rax + push %rax + leaq -92(%rbp), %rax + movq (%rax), %rax + push %rax + leaq print_error(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + jmp .L.end.109 +.L.else.109: +.L.end.109: + leaq -84(%rbp), %rax + push %rax + movq $25, %rax + push %rax + leaq new_node(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -84(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + push %rax + leaq -100(%rbp), %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leaq -84(%rbp), %rax + movq (%rax), %rax + addq $112, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parse_func_call_args(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -76(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) +.data +.L.str.97: + .byte 41 + .byte 0 +.text + leaq .L.str.97(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_skip(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + leaq -100(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + addq $40, %rax + movslq (%rax), %rax + cmpq $1, %rax + jne .L.else.110 + leaq -100(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + push %rax + leaq params_length_without_argv_argc(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + push %rax + leaq -84(%rbp), %rax + movq (%rax), %rax + addq $112, %rax + movq (%rax), %rax + addq $8, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setl %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.111 +.data +.L.str.98: + .byte 84 + .byte 104 + .byte 101 + .byte 32 + .byte 110 + .byte 117 + .byte 109 + .byte 98 + .byte 101 + .byte 114 + .byte 32 + .byte 111 + .byte 102 + .byte 32 + .byte 97 + .byte 114 + .byte 103 + .byte 117 + .byte 109 + .byte 101 + .byte 110 + .byte 116 + .byte 115 + .byte 32 + .byte 100 + .byte 111 + .byte 101 + .byte 115 + .byte 32 + .byte 110 + .byte 111 + .byte 116 + .byte 32 + .byte 109 + .byte 97 + .byte 116 + .byte 99 + .byte 104 + .byte 32 + .byte 116 + .byte 104 + .byte 101 + .byte 32 + .byte 102 + .byte 117 + .byte 110 + .byte 99 + .byte 116 + .byte 105 + .byte 111 + .byte 110 + .byte 32 + .byte 100 + .byte 101 + .byte 102 + .byte 105 + .byte 110 + .byte 105 + .byte 116 + .byte 105 + .byte 111 + .byte 110 + .byte 0 +.text + leaq .L.str.98(%rip), %rax + push %rax + leaq -92(%rbp), %rax + movq (%rax), %rax + push %rax + leaq print_error(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + jmp .L.end.111 +.L.else.111: +.L.end.111: + jmp .L.end.110 +.L.else.110: + leaq -100(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + addq $8, %rax + movslq (%rax), %rax + push %rax + leaq -84(%rbp), %rax + movq (%rax), %rax + addq $112, %rax + movq (%rax), %rax + addq $8, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setne %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.112 +.data +.L.str.99: + .byte 84 + .byte 104 + .byte 101 + .byte 32 + .byte 110 + .byte 117 + .byte 109 + .byte 98 + .byte 101 + .byte 114 + .byte 32 + .byte 111 + .byte 102 + .byte 32 + .byte 97 + .byte 114 + .byte 103 + .byte 117 + .byte 109 + .byte 101 + .byte 110 + .byte 116 + .byte 115 + .byte 32 + .byte 100 + .byte 111 + .byte 101 + .byte 115 + .byte 32 + .byte 110 + .byte 111 + .byte 116 + .byte 32 + .byte 109 + .byte 97 + .byte 116 + .byte 99 + .byte 104 + .byte 32 + .byte 116 + .byte 104 + .byte 101 + .byte 32 + .byte 102 + .byte 117 + .byte 110 + .byte 99 + .byte 116 + .byte 105 + .byte 111 + .byte 110 + .byte 32 + .byte 100 + .byte 101 + .byte 102 + .byte 105 + .byte 110 + .byte 105 + .byte 116 + .byte 105 + .byte 111 + .byte 110 + .byte 0 +.text + leaq .L.str.99(%rip), %rax + push %rax + leaq -92(%rbp), %rax + movq (%rax), %rax + push %rax + leaq print_error(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + jmp .L.end.112 +.L.else.112: +.L.end.112: +.L.end.110: + leaq -100(%rbp), %rax + push %rax + leaq -84(%rbp), %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + jmp .L.parse_unary.continue + jmp .L.end.108 +.L.else.108: +.L.end.108: + leaq -68(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) +.data +.L.str.100: + .byte 43 + .byte 43 + .byte 0 +.text + leaq .L.str.100(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.113 + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_next(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leaq -100(%rbp), %rax + push %rax + movq $1, %rax + push %rax + leaq new_node_num(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + push %rax + movq $1, %rax + push %rax + leaq new_node_num(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + push %rax + leaq -100(%rbp), %rax + movq (%rax), %rax + push %rax + movq $0, %rax + push %rax + leaq new_binop(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + push %rax + leaq -100(%rbp), %rax + movq (%rax), %rax + push %rax + movq $17, %rax + push %rax + leaq new_binop(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + push %rax + movq $1, %rax + push %rax + leaq new_binop(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + pop %rdi + movq %rax, (%rdi) + jmp .L.parse_unary.continue + jmp .L.end.113 +.L.else.113: +.L.end.113: +.data +.L.str.101: + .byte 45 + .byte 45 + .byte 0 +.text + leaq .L.str.101(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.114 + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_next(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leaq -100(%rbp), %rax + push %rax + movq $1, %rax + push %rax + leaq new_node_num(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + push %rax + movq $1, %rax + push %rax + leaq new_node_num(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + push %rax + leaq -100(%rbp), %rax + movq (%rax), %rax + push %rax + movq $1, %rax + push %rax + leaq new_binop(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + push %rax + leaq -100(%rbp), %rax + movq (%rax), %rax + push %rax + movq $17, %rax + push %rax + leaq new_binop(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + push %rax + movq $0, %rax + push %rax + leaq new_binop(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + pop %rdi + movq %rax, (%rdi) + jmp .L.parse_unary.continue + jmp .L.end.114 +.L.else.114: +.L.end.114: +.data +.L.str.102: + .byte 91 + .byte 0 +.text + leaq .L.str.102(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.115 + leaq -100(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq add_type(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_next(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leaq -60(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parse_expr(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) +.data +.L.str.103: + .byte 93 + .byte 0 +.text + leaq .L.str.103(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_skip(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movq $7, %rax + push %rax + leaq -100(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setne %al + movzbl %al, %eax + cmpq $0, %rax + je .L.false.117 + movq $13, %rax + push %rax + leaq -100(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setne %al + movzbl %al, %eax + cmpq $0, %rax + je .L.false.117 + movq $1, %rax + jmp .L.end.117 +.L.false.117: + movq $0, %rax +.L.end.117: + cmpq $1, %rax + jne .L.else.116 +.data +.L.str.104: + .byte 96 + .byte 91 + .byte 93 + .byte 96 + .byte 32 + .byte 99 + .byte 97 + .byte 110 + .byte 110 + .byte 111 + .byte 116 + .byte 32 + .byte 97 + .byte 99 + .byte 99 + .byte 101 + .byte 115 + .byte 115 + .byte 32 + .byte 116 + .byte 111 + .byte 32 + .byte 110 + .byte 111 + .byte 110 + .byte 101 + .byte 32 + .byte 112 + .byte 111 + .byte 105 + .byte 110 + .byte 116 + .byte 101 + .byte 114 + .byte 32 + .byte 116 + .byte 121 + .byte 112 + .byte 101 + .byte 46 + .byte 0 +.text + leaq .L.str.104(%rip), %rax + push %rax + leaq -68(%rbp), %rax + movq (%rax), %rax + push %rax + leaq print_error(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + jmp .L.end.116 +.L.else.116: +.L.end.116: + leaq -52(%rbp), %rax + push %rax + movq $13, %rax + push %rax + leaq new_node(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -52(%rbp), %rax + movq (%rax), %rax + addq $64, %rax + push %rax + leaq -100(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + addq $48, %rax + movq (%rax), %rax + addq $4, %rax + movslq (%rax), %rax + pop %rdi + movl %eax, (%rdi) + leaq -52(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $56, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leaq -44(%rbp), %rax + push %rax + leaq -52(%rbp), %rax + movq (%rax), %rax + push %rax + leaq -60(%rbp), %rax + movq (%rax), %rax + push %rax + movq $2, %rax + push %rax + leaq new_binop(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -100(%rbp), %rax + push %rax + leaq -44(%rbp), %rax + movq (%rax), %rax + push %rax + leaq -100(%rbp), %rax + movq (%rax), %rax + push %rax + movq $0, %rax + push %rax + leaq new_binop(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -100(%rbp), %rax + push %rax + movq $0, %rax + push %rax + movq $0, %rax + push %rax + leaq -100(%rbp), %rax + movq (%rax), %rax + push %rax + movq $20, %rax + push %rax + leaq new_struct_access_node(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $32, %rsp + pop %rdi + movq %rax, (%rdi) + jmp .L.parse_unary.continue + jmp .L.end.115 +.L.else.115: +.L.end.115: +.data +.L.str.105: + .byte 46 + .byte 0 +.text + leaq .L.str.105(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.118 + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_next(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leaq -36(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leaq -28(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_next(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leaq -100(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq add_type(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movq $7, %rax + push %rax + leaq -100(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.119 + movq $5, %rax + push %rax + leaq -100(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + addq $48, %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setne %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.120 +.data +.L.str.106: + .byte 99 + .byte 97 + .byte 110 + .byte 110 + .byte 111 + .byte 116 + .byte 32 + .byte 97 + .byte 99 + .byte 99 + .byte 101 + .byte 115 + .byte 115 + .byte 32 + .byte 102 + .byte 114 + .byte 111 + .byte 109 + .byte 32 + .byte 110 + .byte 111 + .byte 110 + .byte 101 + .byte 32 + .byte 115 + .byte 116 + .byte 114 + .byte 117 + .byte 99 + .byte 116 + .byte 32 + .byte 116 + .byte 121 + .byte 112 + .byte 101 + .byte 0 +.text + leaq .L.str.106(%rip), %rax + push %rax + leaq -68(%rbp), %rax + movq (%rax), %rax + push %rax + leaq print_error(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + jmp .L.end.120 +.L.else.120: +.L.end.120: + leaq -20(%rbp), %rax + push %rax + leaq -36(%rbp), %rax + movq (%rax), %rax + push %rax + leaq -100(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + addq $48, %rax + movq (%rax), %rax + addq $16, %rax + movq (%rax), %rax + push %rax + leaq search_struct_member(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + pop %rdi + movq %rax, (%rdi) + movq $0, %rax + push %rax + leaq -20(%rbp), %rax + movq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.121 +.data +.L.str.107: + .byte 109 + .byte 101 + .byte 109 + .byte 98 + .byte 101 + .byte 114 + .byte 32 + .byte 110 + .byte 97 + .byte 109 + .byte 101 + .byte 32 + .byte 110 + .byte 111 + .byte 116 + .byte 32 + .byte 102 + .byte 111 + .byte 117 + .byte 110 + .byte 100 + .byte 0 +.text + leaq .L.str.107(%rip), %rax + push %rax + leaq -28(%rbp), %rax + movq (%rax), %rax + push %rax + leaq -100(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + addq $48, %rax + movq (%rax), %rax + addq $16, %rax + movq (%rax), %rax + push %rax + leaq unkown_member_error(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + jmp .L.end.121 +.L.else.121: +.L.end.121: + leaq -100(%rbp), %rax + push %rax + leaq -100(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + addq $48, %rax + movq (%rax), %rax + push %rax + movq $0, %rax + push %rax + leaq -100(%rbp), %rax + movq (%rax), %rax + push %rax + movq $20, %rax + push %rax + leaq new_struct_access_node(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $32, %rsp + pop %rdi + movq %rax, (%rdi) + jmp .L.end.119 +.L.else.119: + movq $5, %rax + push %rax + leaq -100(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setne %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.122 +.data +.L.str.108: + .byte 99 + .byte 97 + .byte 110 + .byte 110 + .byte 111 + .byte 116 + .byte 32 + .byte 97 + .byte 99 + .byte 99 + .byte 101 + .byte 115 + .byte 115 + .byte 32 + .byte 102 + .byte 114 + .byte 111 + .byte 109 + .byte 32 + .byte 110 + .byte 111 + .byte 110 + .byte 101 + .byte 32 + .byte 115 + .byte 116 + .byte 114 + .byte 117 + .byte 99 + .byte 116 + .byte 32 + .byte 116 + .byte 121 + .byte 112 + .byte 101 + .byte 0 +.text + leaq .L.str.108(%rip), %rax + push %rax + leaq -68(%rbp), %rax + movq (%rax), %rax + push %rax + leaq print_error(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + jmp .L.end.122 +.L.else.122: +.L.end.122: + leaq -20(%rbp), %rax + push %rax + leaq -36(%rbp), %rax + movq (%rax), %rax + push %rax + leaq -100(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + addq $16, %rax + movq (%rax), %rax + push %rax + leaq search_struct_member(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + pop %rdi + movq %rax, (%rdi) + movq $0, %rax + push %rax + leaq -20(%rbp), %rax + movq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.123 +.data +.L.str.109: + .byte 109 + .byte 101 + .byte 109 + .byte 98 + .byte 101 + .byte 114 + .byte 32 + .byte 110 + .byte 97 + .byte 109 + .byte 101 + .byte 32 + .byte 110 + .byte 111 + .byte 116 + .byte 32 + .byte 102 + .byte 111 + .byte 117 + .byte 110 + .byte 100 + .byte 0 +.text + leaq .L.str.109(%rip), %rax + push %rax + leaq -28(%rbp), %rax + movq (%rax), %rax + push %rax + leaq -100(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + addq $16, %rax + movq (%rax), %rax + push %rax + leaq unkown_member_error(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + jmp .L.end.123 +.L.else.123: +.L.end.123: +.L.end.119: + leaq -12(%rbp), %rax + push %rax + leaq -20(%rbp), %rax + movq (%rax), %rax + addq $16, %rax + movslq (%rax), %rax + pop %rdi + movl %eax, (%rdi) + leaq -8(%rbp), %rax + push %rax + leaq -20(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leaq -100(%rbp), %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + push %rax + leaq -12(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq -100(%rbp), %rax + movq (%rax), %rax + push %rax + movq $28, %rax + push %rax + leaq new_struct_access_node(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $32, %rsp + pop %rdi + movq %rax, (%rdi) + jmp .L.parse_unary.continue + jmp .L.end.118 +.L.else.118: +.L.end.118: + jmp .L.parse_unary.break +.L.parse_unary.continue: + jmp .L.while.start.107 +.L.while.end.107: +.L.parse_unary.break: + leaq -100(%rbp), %rax + movq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global parse_func_call_args +parse_func_call_args: + push %rbp + movq %rsp, %rbp + subq $16, %rsp + leaq -8(%rbp), %rax + push %rax + movq $4, %rax + push %rax + leaq new_vec(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) +.L.while.start.124: +.data +.L.str.110: + .byte 41 + .byte 0 +.text + leaq .L.str.110(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $0, %rax + sete %al + movzbq %al, %rax + cmpq $1, %rax + jne .L.while.end.124 + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parse_expr(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + push %rax + leaq vec_append(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp +.data +.L.str.111: + .byte 44 + .byte 0 +.text + leaq .L.str.111(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $0, %rax + sete %al + movzbq %al, %rax + cmpq $1, %rax + jne .L.else.125 + jmp .L.parse_func_call_args.break + jmp .L.end.125 +.L.else.125: +.L.end.125: + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_next(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.while.start.124 +.L.while.end.124: +.L.parse_func_call_args.break: + leaq -8(%rbp), %rax + movq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global parse_params_types +parse_params_types: + push %rbp + movq %rsp, %rbp + subq $16, %rsp +.L.while.start.126: +.data +.L.str.112: + .byte 41 + .byte 0 +.text + leaq .L.str.112(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $0, %rax + sete %al + movzbq %al, %rax + cmpq $1, %rax + jne .L.while.end.126 +.data +.L.str.113: + .byte 46 + .byte 46 + .byte 46 + .byte 0 +.text + leaq .L.str.113(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.127 + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_next(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movq $1, %rax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.127 +.L.else.127: + leaq -8(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parse_ty(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + movq $13, %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.128 + leaq -8(%rbp), %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $48, %rax + movq (%rax), %rax + push %rax + leaq new_pointer_type(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + jmp .L.end.128 +.L.else.128: +.L.end.128: + leaq -8(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + push %rax + leaq vec_append(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp +.L.end.127: +.data +.L.str.114: + .byte 44 + .byte 0 +.text + leaq .L.str.114(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $0, %rax + sete %al + movzbq %al, %rax + cmpq $1, %rax + jne .L.else.129 + jmp .L.parse_params_types.break + jmp .L.end.129 +.L.else.129: +.L.end.129: + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_next(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.while.start.126 +.L.while.end.126: +.L.parse_params_types.break: + movq $0, %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global add_type_block +add_type_block: + push %rbp + movq %rsp, %rbp + subq $16, %rsp + movq $0, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.130 + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.130 +.L.else.130: +.L.end.130: + leaq -12(%rbp), %rax + push %rax + movq $0, %rax + pop %rdi + movl %eax, (%rdi) +.L.while.start.131: + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movslq (%rax), %rax + push %rax + leaq -12(%rbp), %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setl %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.while.end.131 + leaq -8(%rbp), %rax + push %rax + leaq -12(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + push %rax + leaq vec_get(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq add_type(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movq $1, %rax + push %rax + leaq -12(%rbp), %rax + push %rax + movq $1, %rax + push %rax + leaq -12(%rbp), %rax + movslq (%rax), %rax + pop %rdi + addl %edi, %eax + pop %rdi + movl %eax, (%rdi) + pop %rdi + subl %edi, %eax + jmp .L.while.start.131 +.L.while.end.131: + leave + ret +.global new_local_object +new_local_object: + push %rbp + movq %rsp, %rbp + subq $16, %rsp + leaq 48(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 32(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq check_local_object_already_exist(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + leaq -8(%rbp), %rax + push %rax + movq $80, %rax + push %rax + leaq alloc(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + movq $0, %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.132 +.data +.L.str.115: + .byte 109 + .byte 101 + .byte 109 + .byte 111 + .byte 114 + .byte 121 + .byte 32 + .byte 97 + .byte 108 + .byte 108 + .byte 111 + .byte 99 + .byte 97 + .byte 116 + .byte 105 + .byte 111 + .byte 110 + .byte 32 + .byte 102 + .byte 97 + .byte 105 + .byte 108 + .byte 101 + .byte 100 + .byte 10 + .byte 0 +.text + leaq .L.str.115(%rip), %rax + push %rax + leaq eprintf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movq $1, %rax + push %rax + leaq exit(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.end.132 +.L.else.132: +.L.end.132: + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + push %rax + leaq 24(%rbp), %rax + movslq (%rax), %rax + pop %rdi + movl %eax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + push %rax + leaq 32(%rbp), %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $16, %rax + push %rax + leaq 40(%rbp), %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $64, %rax + push %rax + leaq 56(%rbp), %rax + movslq (%rax), %rax + pop %rdi + movl %eax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $72, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $16, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $16, %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 32(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq scope_push_obj(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + leaq -8(%rbp), %rax + movq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global scope_push_obj +scope_push_obj: + push %rbp + movq %rsp, %rbp + subq $16, %rsp + leaq -8(%rbp), %rax + push %rax + movq $24, %rax + push %rax + leaq alloc(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + push %rax + leaq 32(%rbp), %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $16, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + movq (%rax), %rax + addq $0, %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global check_local_object_already_exist +check_local_object_already_exist: + push %rbp + movq %rsp, %rbp + subq $16, %rsp + leaq -8(%rbp), %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq find_locals_current_scope(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + pop %rdi + movq %rax, (%rdi) + movq $0, %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setne %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.133 +.data +.L.str.116: + .byte 110 + .byte 97 + .byte 109 + .byte 101 + .byte 32 + .byte 97 + .byte 108 + .byte 114 + .byte 101 + .byte 97 + .byte 100 + .byte 121 + .byte 32 + .byte 101 + .byte 120 + .byte 105 + .byte 115 + .byte 116 + .byte 0 +.text + leaq .L.str.116(%rip), %rax + push %rax + leaq 32(%rbp), %rax + movq (%rax), %rax + push %rax + leaq print_error_with_code(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movq $1, %rax + push %rax + leaq exit(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.end.133 +.L.else.133: +.L.end.133: + movq $0, %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global find_globals +find_globals: + push %rbp + movq %rsp, %rbp + subq $16, %rsp + leaq -8(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) +.L.while.start.134: + movq $0, %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setne %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.while.end.134 + leaq 24(%rbp), %rax + movq (%rax), %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.135 + leaq -8(%rbp), %rax + movq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.135 +.L.else.135: +.L.end.135: + leaq -8(%rbp), %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $72, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + jmp .L.while.start.134 +.L.while.end.134: + movq $0, %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global find_locals_current_scope +find_locals_current_scope: + push %rbp + movq %rsp, %rbp + subq $16, %rsp + leaq -16(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + movq $0, %rax + push %rax + leaq -16(%rbp), %rax + movq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setne %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.136 + leaq -8(%rbp), %rax + push %rax + leaq -16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) +.L.while.start.137: + movq $0, %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setne %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.while.end.137 + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.138 + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.138 +.L.else.138: +.L.end.138: + leaq -8(%rbp), %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $16, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + jmp .L.while.start.137 +.L.while.end.137: + jmp .L.end.136 +.L.else.136: +.L.end.136: + movq $0, %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global find_locals +find_locals: + push %rbp + movq %rsp, %rbp + subq $16, %rsp + leaq -16(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) +.L.while.start.139: + movq $0, %rax + push %rax + leaq -16(%rbp), %rax + movq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setne %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.while.end.139 + leaq -8(%rbp), %rax + push %rax + leaq -16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) +.L.while.start.140: + movq $0, %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setne %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.while.end.140 + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.141 + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.141 +.L.else.141: +.L.end.141: + leaq -8(%rbp), %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $16, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + jmp .L.while.start.140 +.L.while.end.140: + leaq -16(%rbp), %rax + push %rax + leaq -16(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + jmp .L.while.start.139 +.L.while.end.139: + movq $0, %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global cmp_func_params +cmp_func_params: + push %rbp + movq %rsp, %rbp + subq $16, %rsp + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movslq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setne %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.142 + movq $0, %rax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.142 +.L.else.142: +.L.end.142: + leaq -4(%rbp), %rax + push %rax + movq $0, %rax + pop %rdi + movl %eax, (%rdi) +.L.while.start.143: + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movslq (%rax), %rax + push %rax + leaq -4(%rbp), %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setl %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.while.end.143 + leaq -4(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + push %rax + leaq vec_get(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + push %rax + leaq -4(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq vec_get(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + push %rax + leaq cmp_func_param(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $0, %rax + sete %al + movzbq %al, %rax + cmpq $1, %rax + jne .L.else.144 + movq $0, %rax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.144 +.L.else.144: +.L.end.144: + movq $1, %rax + push %rax + leaq -4(%rbp), %rax + push %rax + movq $1, %rax + push %rax + leaq -4(%rbp), %rax + movslq (%rax), %rax + pop %rdi + addl %edi, %eax + pop %rdi + movl %eax, (%rdi) + pop %rdi + subl %edi, %eax + jmp .L.while.start.143 +.L.while.end.143: + movq $1, %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global cmp_func_param +cmp_func_param: + push %rbp + movq %rsp, %rbp + subq $0, %rsp + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $0, %rax + je .L.false.145 + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $16, %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $16, %rax + movq (%rax), %rax + push %rax + leaq cmp_type(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $0, %rax + je .L.false.145 + movq $1, %rax + jmp .L.end.145 +.L.false.145: + movq $0, %rax +.L.end.145: + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global cmp_type_vec +cmp_type_vec: + push %rbp + movq %rsp, %rbp + subq $16, %rsp + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movslq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setne %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.146 + movq $0, %rax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.146 +.L.else.146: +.L.end.146: + leaq -4(%rbp), %rax + push %rax + movq $0, %rax + pop %rdi + movl %eax, (%rdi) +.L.while.start.147: + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movslq (%rax), %rax + push %rax + leaq -4(%rbp), %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setl %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.while.end.147 + leaq -4(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + push %rax + leaq vec_get(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + push %rax + leaq -4(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq vec_get(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + push %rax + leaq cmp_type(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $0, %rax + sete %al + movzbq %al, %rax + cmpq $1, %rax + jne .L.else.148 + movq $0, %rax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.148 +.L.else.148: +.L.end.148: + movq $1, %rax + push %rax + leaq -4(%rbp), %rax + push %rax + movq $1, %rax + push %rax + leaq -4(%rbp), %rax + movslq (%rax), %rax + pop %rdi + addl %edi, %eax + pop %rdi + movl %eax, (%rdi) + pop %rdi + subl %edi, %eax + jmp .L.while.start.147 +.L.while.end.147: + movq $1, %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global parser_skip +parser_skip: + push %rbp + movq %rsp, %rbp + subq $0, %rsp + leaq 24(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.149 + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_next(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.149 +.L.else.149: +.L.end.149: +.data +.L.str.117: + .byte 117 + .byte 110 + .byte 101 + .byte 120 + .byte 112 + .byte 101 + .byte 99 + .byte 116 + .byte 101 + .byte 100 + .byte 32 + .byte 116 + .byte 111 + .byte 107 + .byte 101 + .byte 110 + .byte 0 +.text + leaq .L.str.117(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + push %rax + leaq unexpected_token_error(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + leave + ret +.global new_node +new_node: + push %rbp + movq %rsp, %rbp + subq $16, %rsp + leaq -8(%rbp), %rax + push %rax + movq $120, %rax + push %rax + leaq alloc(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + movq $0, %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.150 +.data +.L.str.118: + .byte 109 + .byte 101 + .byte 109 + .byte 111 + .byte 114 + .byte 121 + .byte 32 + .byte 97 + .byte 108 + .byte 108 + .byte 111 + .byte 99 + .byte 97 + .byte 116 + .byte 105 + .byte 111 + .byte 110 + .byte 32 + .byte 102 + .byte 97 + .byte 105 + .byte 108 + .byte 101 + .byte 100 + .byte 10 + .byte 0 +.text + leaq .L.str.118(%rip), %rax + push %rax + leaq eprintf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movq $1, %rax + push %rax + leaq exit(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.end.150 +.L.else.150: +.L.end.150: + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + push %rax + leaq 16(%rbp), %rax + movslq (%rax), %rax + pop %rdi + movl %eax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global parser_next +parser_next: + push %rbp + movq %rsp, %rbp + subq $0, %rsp + movq $0, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $64, %rax + movq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.151 +.data +.L.str.119: + .byte 105 + .byte 110 + .byte 116 + .byte 101 + .byte 114 + .byte 110 + .byte 97 + .byte 108 + .byte 32 + .byte 101 + .byte 114 + .byte 114 + .byte 111 + .byte 114 + .byte 58 + .byte 32 + .byte 116 + .byte 104 + .byte 105 + .byte 115 + .byte 32 + .byte 115 + .byte 104 + .byte 111 + .byte 117 + .byte 108 + .byte 100 + .byte 32 + .byte 110 + .byte 111 + .byte 116 + .byte 32 + .byte 104 + .byte 97 + .byte 112 + .byte 112 + .byte 101 + .byte 110 + .byte 46 + .byte 0 +.text + leaq .L.str.119(%rip), %rax + push %rax + leaq eprintf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movq $1, %rax + push %rax + leaq exit(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.end.151 +.L.else.151: +.L.end.151: + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $64, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global new_func_type +new_func_type: + push %rbp + movq %rsp, %rbp + subq $16, %rsp + leaq -8(%rbp), %rax + push %rax + movq $80, %rax + push %rax + leaq alloc(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + movq $0, %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.152 +.data +.L.str.120: + .byte 109 + .byte 101 + .byte 109 + .byte 111 + .byte 114 + .byte 121 + .byte 32 + .byte 97 + .byte 108 + .byte 108 + .byte 111 + .byte 99 + .byte 97 + .byte 116 + .byte 105 + .byte 111 + .byte 110 + .byte 32 + .byte 102 + .byte 97 + .byte 105 + .byte 108 + .byte 101 + .byte 100 + .byte 10 + .byte 0 +.text + leaq .L.str.120(%rip), %rax + push %rax + leaq eprintf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movq $1, %rax + push %rax + leaq exit(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.end.152 +.L.else.152: +.L.end.152: + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + push %rax + movq $6, %rax + pop %rdi + movl %eax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $4, %rax + push %rax + movq $8, %rax + pop %rdi + movl %eax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $32, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $40, %rax + push %rax + leaq 32(%rbp), %rax + movslq (%rax), %rax + pop %rdi + movl %eax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global new_array_type +new_array_type: + push %rbp + movq %rsp, %rbp + subq $16, %rsp + leaq -8(%rbp), %rax + push %rax + movq $80, %rax + push %rax + leaq alloc(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + movq $0, %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.153 +.data +.L.str.121: + .byte 109 + .byte 101 + .byte 109 + .byte 111 + .byte 114 + .byte 121 + .byte 32 + .byte 97 + .byte 108 + .byte 108 + .byte 111 + .byte 99 + .byte 97 + .byte 116 + .byte 105 + .byte 111 + .byte 110 + .byte 32 + .byte 102 + .byte 97 + .byte 105 + .byte 108 + .byte 101 + .byte 100 + .byte 10 + .byte 0 +.text + leaq .L.str.121(%rip), %rax + push %rax + leaq eprintf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movq $1, %rax + push %rax + leaq exit(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.end.153 +.L.else.153: +.L.end.153: + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + push %rax + movq $13, %rax + pop %rdi + movl %eax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $4, %rax + push %rax + leaq 24(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $4, %rax + movslq (%rax), %rax + pop %rdi + imull %edi, %eax + pop %rdi + movl %eax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $48, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $56, %rax + push %rax + leaq 24(%rbp), %rax + movslq (%rax), %rax + pop %rdi + movl %eax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global new_pointer_type +new_pointer_type: + push %rbp + movq %rsp, %rbp + subq $16, %rsp + leaq -8(%rbp), %rax + push %rax + movq $80, %rax + push %rax + leaq alloc(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + movq $0, %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.154 +.data +.L.str.122: + .byte 109 + .byte 101 + .byte 109 + .byte 111 + .byte 114 + .byte 121 + .byte 32 + .byte 97 + .byte 108 + .byte 108 + .byte 111 + .byte 99 + .byte 97 + .byte 116 + .byte 105 + .byte 111 + .byte 110 + .byte 32 + .byte 102 + .byte 97 + .byte 105 + .byte 108 + .byte 101 + .byte 100 + .byte 10 + .byte 0 +.text + leaq .L.str.122(%rip), %rax + push %rax + leaq eprintf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movq $1, %rax + push %rax + leaq exit(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.end.154 +.L.else.154: +.L.end.154: + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + push %rax + movq $7, %rax + pop %rdi + movl %eax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $4, %rax + push %rax + movq $8, %rax + pop %rdi + movl %eax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $48, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global new_builtin_type +new_builtin_type: + push %rbp + movq %rsp, %rbp + subq $16, %rsp + leaq -8(%rbp), %rax + push %rax + movq $80, %rax + push %rax + leaq alloc(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + movq $0, %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.155 +.data +.L.str.123: + .byte 109 + .byte 101 + .byte 109 + .byte 111 + .byte 114 + .byte 121 + .byte 32 + .byte 97 + .byte 108 + .byte 108 + .byte 111 + .byte 99 + .byte 97 + .byte 116 + .byte 105 + .byte 111 + .byte 110 + .byte 32 + .byte 102 + .byte 97 + .byte 105 + .byte 108 + .byte 101 + .byte 100 + .byte 10 + .byte 0 +.text + leaq .L.str.123(%rip), %rax + push %rax + leaq eprintf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movq $1, %rax + push %rax + leaq exit(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.end.155 +.L.else.155: +.L.end.155: + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + push %rax + leaq 16(%rbp), %rax + movslq (%rax), %rax + pop %rdi + movl %eax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $4, %rax + push %rax + leaq 24(%rbp), %rax + movslq (%rax), %rax + pop %rdi + movl %eax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + push %rax + leaq 32(%rbp), %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $48, %rax + push %rax + movq $0, %rax + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $60, %rax + push %rax + leaq 40(%rbp), %rax + movslq (%rax), %rax + pop %rdi + movl %eax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global get_user_defined_type +get_user_defined_type: + push %rbp + movq %rsp, %rbp + subq $16, %rsp + leaq -12(%rbp), %rax + push %rax + movq $0, %rax + pop %rdi + movl %eax, (%rdi) +.L.while.start.156: + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + addq $8, %rax + movslq (%rax), %rax + push %rax + leaq -12(%rbp), %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setl %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.while.end.156 + leaq -8(%rbp), %rax + push %rax + leaq -12(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq vec_get(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + pop %rdi + movq %rax, (%rdi) + leaq 24(%rbp), %rax + movq (%rax), %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.157 + leaq -8(%rbp), %rax + movq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.157 +.L.else.157: +.L.end.157: + movq $1, %rax + push %rax + leaq -12(%rbp), %rax + push %rax + movq $1, %rax + push %rax + leaq -12(%rbp), %rax + movslq (%rax), %rax + pop %rdi + addl %edi, %eax + pop %rdi + movl %eax, (%rdi) + pop %rdi + subl %edi, %eax + jmp .L.while.start.156 +.L.while.end.156: + movq $0, %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global leave_scope +leave_scope: + push %rbp + movq %rsp, %rbp + subq $0, %rsp + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + movq (%rax), %rax + addq $8, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leave + ret +.global enter_scope +enter_scope: + push %rbp + movq %rsp, %rbp + subq $16, %rsp + leaq -8(%rbp), %rax + push %rax + movq $16, %rax + push %rax + leaq alloc(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leave + ret +.global cmp_type +cmp_type: + push %rbp + movq %rsp, %rbp + subq $0, %rsp + movq $0, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $0, %rax + jne .L.true.159 + movq $0, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmp $0, %rax + jne .L.true.159 + mov $0, %rax + jmp .L.end.159 +.L.true.159: + mov $1, %rax +.L.end.159: + cmpq $1, %rax + jne .L.else.158 +.data +.L.str.124: + .byte 105 + .byte 110 + .byte 116 + .byte 101 + .byte 114 + .byte 110 + .byte 97 + .byte 108 + .byte 32 + .byte 101 + .byte 114 + .byte 114 + .byte 111 + .byte 114 + .byte 58 + .byte 32 + .byte 116 + .byte 104 + .byte 105 + .byte 115 + .byte 32 + .byte 115 + .byte 104 + .byte 111 + .byte 117 + .byte 108 + .byte 100 + .byte 32 + .byte 110 + .byte 111 + .byte 116 + .byte 32 + .byte 104 + .byte 97 + .byte 112 + .byte 112 + .byte 101 + .byte 110 + .byte 10 + .byte 0 +.text + leaq .L.str.124(%rip), %rax + push %rax + leaq eprintf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movq $1, %rax + push %rax + leaq exit(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.end.158 +.L.else.158: +.L.end.158: + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setne %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.160 + movq $0, %rax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.160 +.L.else.160: +.L.end.160: + movq $6, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.161 + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + movq (%rax), %rax + push %rax + leaq cmp_type(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $0, %rax + je .L.false.163 + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq cmp_type_vec(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $0, %rax + je .L.false.163 + movq $1, %rax + jmp .L.end.163 +.L.false.163: + movq $0, %rax +.L.end.163: + cmpq $0, %rax + je .L.false.162 + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $40, %rax + movslq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $40, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $0, %rax + je .L.false.162 + movq $1, %rax + jmp .L.end.162 +.L.false.162: + movq $0, %rax +.L.end.162: + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.161 +.L.else.161: +.L.end.161: + movq $7, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.164 + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $48, %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $48, %rax + movq (%rax), %rax + push %rax + leaq cmp_type(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.164 +.L.else.164: +.L.end.164: + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $4, %rax + movslq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $4, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $0, %rax + je .L.false.166 + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $60, %rax + movslq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $60, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $0, %rax + je .L.false.166 + movq $1, %rax + jmp .L.end.166 +.L.false.166: + movq $0, %rax +.L.end.166: + cmpq $0, %rax + je .L.false.165 + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $0, %rax + je .L.false.165 + movq $1, %rax + jmp .L.end.165 +.L.false.165: + movq $0, %rax +.L.end.165: + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global parse_stmt +parse_stmt: + push %rbp + movq %rsp, %rbp + subq $0, %rsp +.data +.L.str.125: + .byte 108 + .byte 101 + .byte 116 + .byte 0 +.text + leaq .L.str.125(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.167 + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parse_let(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.167 +.L.else.167: +.L.end.167: +.data +.L.str.126: + .byte 103 + .byte 111 + .byte 116 + .byte 111 + .byte 0 +.text + leaq .L.str.126(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.168 + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parse_goto(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.168 +.L.else.168: +.L.end.168: +.data +.L.str.127: + .byte 105 + .byte 102 + .byte 0 +.text + leaq .L.str.127(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.169 + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parse_if(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.169 +.L.else.169: +.L.end.169: +.data +.L.str.128: + .byte 119 + .byte 104 + .byte 105 + .byte 108 + .byte 101 + .byte 0 +.text + leaq .L.str.128(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.170 + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parse_while(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.170 +.L.else.170: +.L.end.170: +.data +.L.str.129: + .byte 114 + .byte 101 + .byte 116 + .byte 117 + .byte 114 + .byte 110 + .byte 0 +.text + leaq .L.str.129(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.171 + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parse_return(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.171 +.L.else.171: +.L.end.171: +.data +.L.str.130: + .byte 123 + .byte 0 +.text + leaq .L.str.130(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.172 + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parse_block(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.172 +.L.else.172: +.L.end.172: + movq $5, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setne %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.173 +.data +.L.str.131: + .byte 58 + .byte 0 +.text + leaq .L.str.131(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $64, %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.174 + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parse_label(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.174 +.L.else.174: +.L.end.174: + jmp .L.end.173 +.L.else.173: +.L.end.173: + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parse_expr_stmt(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global parse_expr +parse_expr: + push %rbp + movq %rsp, %rbp + subq $16, %rsp + leaq -8(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parse_logor(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) +.data +.L.str.132: + .byte 61 + .byte 0 +.text + leaq .L.str.132(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.175 + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_next(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leaq -8(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parse_expr(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + push %rax + movq $17, %rax + push %rax + leaq new_binop(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + pop %rdi + movq %rax, (%rdi) + jmp .L.end.175 +.L.else.175: +.L.end.175: + leaq -8(%rbp), %rax + movq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global parse_ty +parse_ty: + push %rbp + movq %rsp, %rbp + subq $48, %rsp + leaq -40(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leaq -32(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_next(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp +.data +.L.str.133: + .byte 105 + .byte 54 + .byte 52 + .byte 0 +.text + leaq .L.str.133(%rip), %rax + push %rax + leaq -40(%rbp), %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.176 + leaq -24(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $64, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + jmp .L.end.176 +.L.else.176: +.data +.L.str.134: + .byte 105 + .byte 51 + .byte 50 + .byte 0 +.text + leaq .L.str.134(%rip), %rax + push %rax + leaq -40(%rbp), %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.177 + leaq -24(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $56, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + jmp .L.end.177 +.L.else.177: +.data +.L.str.135: + .byte 105 + .byte 49 + .byte 54 + .byte 0 +.text + leaq .L.str.135(%rip), %rax + push %rax + leaq -40(%rbp), %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.178 + leaq -24(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $48, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + jmp .L.end.178 +.L.else.178: +.data +.L.str.136: + .byte 105 + .byte 56 + .byte 0 +.text + leaq .L.str.136(%rip), %rax + push %rax + leaq -40(%rbp), %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.179 + leaq -24(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $40, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + jmp .L.end.179 +.L.else.179: +.data +.L.str.137: + .byte 117 + .byte 54 + .byte 52 + .byte 0 +.text + leaq .L.str.137(%rip), %rax + push %rax + leaq -40(%rbp), %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.180 + leaq -24(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $104, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + jmp .L.end.180 +.L.else.180: +.data +.L.str.138: + .byte 117 + .byte 51 + .byte 50 + .byte 0 +.text + leaq .L.str.138(%rip), %rax + push %rax + leaq -40(%rbp), %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.181 + leaq -24(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $96, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + jmp .L.end.181 +.L.else.181: +.data +.L.str.139: + .byte 117 + .byte 49 + .byte 54 + .byte 0 +.text + leaq .L.str.139(%rip), %rax + push %rax + leaq -40(%rbp), %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.182 + leaq -24(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + jmp .L.end.182 +.L.else.182: +.data +.L.str.140: + .byte 117 + .byte 56 + .byte 0 +.text + leaq .L.str.140(%rip), %rax + push %rax + leaq -40(%rbp), %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.183 + leaq -24(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $80, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + jmp .L.end.183 +.L.else.183: +.data +.L.str.141: + .byte 117 + .byte 48 + .byte 0 +.text + leaq .L.str.141(%rip), %rax + push %rax + leaq -40(%rbp), %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.184 + leaq -24(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $72, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + jmp .L.end.184 +.L.else.184: +.data +.L.str.142: + .byte 98 + .byte 111 + .byte 111 + .byte 108 + .byte 0 +.text + leaq .L.str.142(%rip), %rax + push %rax + leaq -40(%rbp), %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.185 + leaq -24(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $112, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + jmp .L.end.185 +.L.else.185: +.data +.L.str.143: + .byte 42 + .byte 0 +.text + leaq .L.str.143(%rip), %rax + push %rax + leaq -40(%rbp), %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.186 + leaq -24(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parse_ty(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + push %rax + leaq new_pointer_type(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + jmp .L.end.186 +.L.else.186: +.data +.L.str.144: + .byte 102 + .byte 117 + .byte 110 + .byte 99 + .byte 0 +.text + leaq .L.str.144(%rip), %rax + push %rax + leaq -40(%rbp), %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.187 +.data +.L.str.145: + .byte 40 + .byte 0 +.text + leaq .L.str.145(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_skip(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + leaq -16(%rbp), %rax + push %rax + movq $4, %rax + push %rax + leaq new_vec(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + push %rax + leaq -16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parse_params_types(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + pop %rdi + movl %eax, (%rdi) +.data +.L.str.146: + .byte 41 + .byte 0 +.text + leaq .L.str.146(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_skip(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + leaq -24(%rbp), %rax + push %rax + leaq -8(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parse_ty(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + push %rax + leaq -16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq new_func_type(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + pop %rdi + movq %rax, (%rdi) + jmp .L.end.187 +.L.else.187: +.data +.L.str.147: + .byte 91 + .byte 0 +.text + leaq .L.str.147(%rip), %rax + push %rax + leaq -40(%rbp), %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.188 + movq $0, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setne %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.189 +.data +.L.str.148: + .byte 101 + .byte 120 + .byte 112 + .byte 101 + .byte 99 + .byte 116 + .byte 101 + .byte 100 + .byte 32 + .byte 110 + .byte 117 + .byte 109 + .byte 98 + .byte 101 + .byte 114 + .byte 0 +.text + leaq .L.str.148(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + push %rax + leaq print_error(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + jmp .L.end.189 +.L.else.189: +.L.end.189: + leaq -4(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq atoi(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movl %eax, (%rdi) + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_next(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp +.data +.L.str.149: + .byte 93 + .byte 0 +.text + leaq .L.str.149(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parser_skip(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + leaq -24(%rbp), %rax + push %rax + leaq -4(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parse_ty(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + push %rax + leaq new_array_type(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + pop %rdi + movq %rax, (%rdi) + jmp .L.end.188 +.L.else.188: + leaq -24(%rbp), %rax + push %rax + leaq -40(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq get_user_defined_type(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + pop %rdi + movq %rax, (%rdi) + movq $0, %rax + push %rax + leaq -24(%rbp), %rax + movq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.190 +.data +.L.str.150: + .byte 117 + .byte 110 + .byte 107 + .byte 111 + .byte 119 + .byte 110 + .byte 32 + .byte 116 + .byte 121 + .byte 112 + .byte 101 + .byte 32 + .byte 102 + .byte 111 + .byte 117 + .byte 110 + .byte 100 + .byte 0 +.text + leaq .L.str.150(%rip), %rax + push %rax + leaq -32(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq unkown_type_error(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + jmp .L.end.190 +.L.else.190: +.L.end.190: +.L.end.188: +.L.end.187: +.L.end.186: +.L.end.185: +.L.end.184: +.L.end.183: +.L.end.182: +.L.end.181: +.L.end.180: +.L.end.179: +.L.end.178: +.L.end.177: +.L.end.176: + leaq -24(%rbp), %rax + movq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global add_type +add_type: + push %rbp + movq %rsp, %rbp + subq $0, %rsp + movq $0, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $0, %rax + jne .L.true.192 + movq $0, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setne %al + movzbl %al, %eax + cmp $0, %rax + jne .L.true.192 + mov $0, %rax + jmp .L.end.192 +.L.true.192: + mov $1, %rax +.L.end.192: + cmpq $1, %rax + jne .L.else.191 + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.191 +.L.else.191: +.L.end.191: + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq add_type(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $16, %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq add_type(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $48, %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq add_type(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq add_type_block(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq add_type(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $40, %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq add_type(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $112, %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq add_type_block(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movq $12, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.193 + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $40, %rax + movq (%rax), %rax + push %rax + leaq new_pointer_type(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.193 +.L.else.193: +.L.end.193: + movq $25, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.194 + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + addq $24, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.194 +.L.else.194: +.L.end.194: + movq $0, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $0, %rax + jne .L.true.203 + movq $1, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmp $0, %rax + jne .L.true.203 + mov $0, %rax + jmp .L.end.203 +.L.true.203: + mov $1, %rax +.L.end.203: + cmpq $0, %rax + jne .L.true.202 + movq $2, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmp $0, %rax + jne .L.true.202 + mov $0, %rax + jmp .L.end.202 +.L.true.202: + mov $1, %rax +.L.end.202: + cmpq $0, %rax + jne .L.true.201 + movq $3, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmp $0, %rax + jne .L.true.201 + mov $0, %rax + jmp .L.end.201 +.L.true.201: + mov $1, %rax +.L.end.201: + cmpq $0, %rax + jne .L.true.200 + movq $4, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmp $0, %rax + jne .L.true.200 + mov $0, %rax + jmp .L.end.200 +.L.true.200: + mov $1, %rax +.L.end.200: + cmpq $0, %rax + jne .L.true.199 + movq $17, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmp $0, %rax + jne .L.true.199 + mov $0, %rax + jmp .L.end.199 +.L.true.199: + mov $1, %rax +.L.end.199: + cmpq $0, %rax + jne .L.true.198 + movq $30, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmp $0, %rax + jne .L.true.198 + mov $0, %rax + jmp .L.end.198 +.L.true.198: + mov $1, %rax +.L.end.198: + cmpq $0, %rax + jne .L.true.197 + movq $31, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmp $0, %rax + jne .L.true.197 + mov $0, %rax + jmp .L.end.197 +.L.true.197: + mov $1, %rax +.L.end.197: + cmpq $0, %rax + jne .L.true.196 + movq $32, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmp $0, %rax + jne .L.true.196 + mov $0, %rax + jmp .L.end.196 +.L.true.196: + mov $1, %rax +.L.end.196: + cmpq $1, %rax + jne .L.else.195 + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.195 +.L.else.195: +.L.end.195: + movq $5, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $0, %rax + jne .L.true.215 + movq $7, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmp $0, %rax + jne .L.true.215 + mov $0, %rax + jmp .L.end.215 +.L.true.215: + mov $1, %rax +.L.end.215: + cmpq $0, %rax + jne .L.true.214 + movq $6, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmp $0, %rax + jne .L.true.214 + mov $0, %rax + jmp .L.end.214 +.L.true.214: + mov $1, %rax +.L.end.214: + cmpq $0, %rax + jne .L.true.213 + movq $8, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmp $0, %rax + jne .L.true.213 + mov $0, %rax + jmp .L.end.213 +.L.true.213: + mov $1, %rax +.L.end.213: + cmpq $0, %rax + jne .L.true.212 + movq $9, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmp $0, %rax + jne .L.true.212 + mov $0, %rax + jmp .L.end.212 +.L.true.212: + mov $1, %rax +.L.end.212: + cmpq $0, %rax + jne .L.true.211 + movq $11, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmp $0, %rax + jne .L.true.211 + mov $0, %rax + jmp .L.end.211 +.L.true.211: + mov $1, %rax +.L.end.211: + cmpq $0, %rax + jne .L.true.210 + movq $10, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmp $0, %rax + jne .L.true.210 + mov $0, %rax + jmp .L.end.210 +.L.true.210: + mov $1, %rax +.L.end.210: + cmpq $0, %rax + jne .L.true.209 + movq $26, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmp $0, %rax + jne .L.true.209 + mov $0, %rax + jmp .L.end.209 +.L.true.209: + mov $1, %rax +.L.end.209: + cmpq $0, %rax + jne .L.true.208 + movq $27, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmp $0, %rax + jne .L.true.208 + mov $0, %rax + jmp .L.end.208 +.L.true.208: + mov $1, %rax +.L.end.208: + cmpq $0, %rax + jne .L.true.207 + movq $13, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmp $0, %rax + jne .L.true.207 + mov $0, %rax + jmp .L.end.207 +.L.true.207: + mov $1, %rax +.L.end.207: + cmpq $0, %rax + jne .L.true.206 + movq $33, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmp $0, %rax + jne .L.true.206 + mov $0, %rax + jmp .L.end.206 +.L.true.206: + mov $1, %rax +.L.end.206: + cmpq $0, %rax + jne .L.true.205 + movq $34, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmp $0, %rax + jne .L.true.205 + mov $0, %rax + jmp .L.end.205 +.L.true.205: + mov $1, %rax +.L.end.205: + cmpq $1, %rax + jne .L.else.204 + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $56, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.204 +.L.else.204: +.L.end.204: + movq $14, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.216 + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $80, %rax + movq (%rax), %rax + addq $16, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.216 +.L.else.216: +.L.end.216: + movq $19, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.217 + movq $13, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.218 + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + addq $48, %rax + movq (%rax), %rax + push %rax + leaq new_pointer_type(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + jmp .L.end.218 +.L.else.218: + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + push %rax + leaq new_pointer_type(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) +.L.end.218: + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.217 +.L.else.217: +.L.end.217: + movq $20, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.219 + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + addq $48, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.219 +.L.else.219: +.L.end.219: + movq $22, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.220 + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movq (%rax), %rax + addq $88, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.220 +.L.else.220: +.L.end.220: + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global parse +parse: + push %rbp + movq %rsp, %rbp + subq $0, %rsp +.L.while.start.221: + movq $5, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setne %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.while.end.221 +.data +.L.str.151: + .byte 102 + .byte 117 + .byte 110 + .byte 99 + .byte 0 +.text + leaq .L.str.151(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.222 + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parse_func(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.end.222 +.L.else.222: +.data +.L.str.152: + .byte 115 + .byte 116 + .byte 114 + .byte 117 + .byte 99 + .byte 116 + .byte 0 +.text + leaq .L.str.152(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.223 + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq parse_struct(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.end.223 +.L.else.223: +.data +.L.str.153: + .byte 110 + .byte 111 + .byte 110 + .byte 45 + .byte 100 + .byte 101 + .byte 99 + .byte 108 + .byte 97 + .byte 114 + .byte 97 + .byte 116 + .byte 105 + .byte 111 + .byte 110 + .byte 32 + .byte 115 + .byte 116 + .byte 97 + .byte 116 + .byte 101 + .byte 109 + .byte 101 + .byte 110 + .byte 116 + .byte 32 + .byte 111 + .byte 117 + .byte 116 + .byte 115 + .byte 105 + .byte 100 + .byte 101 + .byte 32 + .byte 102 + .byte 117 + .byte 110 + .byte 99 + .byte 116 + .byte 105 + .byte 111 + .byte 110 + .byte 32 + .byte 98 + .byte 111 + .byte 100 + .byte 121 + .byte 0 +.text + leaq .L.str.153(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + push %rax + leaq print_error(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp +.L.end.223: +.L.end.222: + jmp .L.while.start.221 +.L.while.end.221: + leave + ret +.global new_parser +new_parser: + push %rbp + movq %rsp, %rbp + subq $16, %rsp + leaq -8(%rbp), %rax + push %rax + movq $120, %rax + push %rax + leaq alloc(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + movq $0, %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.224 +.data +.L.str.154: + .byte 109 + .byte 101 + .byte 109 + .byte 111 + .byte 114 + .byte 121 + .byte 32 + .byte 97 + .byte 108 + .byte 108 + .byte 111 + .byte 99 + .byte 97 + .byte 116 + .byte 105 + .byte 111 + .byte 110 + .byte 32 + .byte 102 + .byte 97 + .byte 105 + .byte 108 + .byte 101 + .byte 100 + .byte 10 + .byte 0 +.text + leaq .L.str.154(%rip), %rax + push %rax + leaq eprintf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movq $1, %rax + push %rax + leaq exit(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.end.224 +.L.else.224: +.L.end.224: + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $16, %rax + push %rax + movq $0, %rax + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $32, %rax + push %rax + movq $4, %rax + push %rax + leaq new_vec(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $64, %rax + push %rax + movq $0, %rax + push %rax +.data +.L.str.155: + .byte 105 + .byte 54 + .byte 52 + .byte 0 +.text + leaq .L.str.155(%rip), %rax + push %rax + movq $8, %rax + push %rax + movq $0, %rax + push %rax + leaq new_builtin_type(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $32, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $56, %rax + push %rax + movq $0, %rax + push %rax +.data +.L.str.156: + .byte 105 + .byte 51 + .byte 50 + .byte 0 +.text + leaq .L.str.156(%rip), %rax + push %rax + movq $4, %rax + push %rax + movq $1, %rax + push %rax + leaq new_builtin_type(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $32, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $48, %rax + push %rax + movq $0, %rax + push %rax +.data +.L.str.157: + .byte 105 + .byte 49 + .byte 54 + .byte 0 +.text + leaq .L.str.157(%rip), %rax + push %rax + movq $2, %rax + push %rax + movq $2, %rax + push %rax + leaq new_builtin_type(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $32, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $40, %rax + push %rax + movq $0, %rax + push %rax +.data +.L.str.158: + .byte 105 + .byte 56 + .byte 0 +.text + leaq .L.str.158(%rip), %rax + push %rax + movq $1, %rax + push %rax + movq $3, %rax + push %rax + leaq new_builtin_type(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $32, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $112, %rax + push %rax + movq $0, %rax + push %rax +.data +.L.str.159: + .byte 98 + .byte 111 + .byte 111 + .byte 108 + .byte 0 +.text + leaq .L.str.159(%rip), %rax + push %rax + movq $4, %rax + push %rax + movq $4, %rax + push %rax + leaq new_builtin_type(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $32, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $104, %rax + push %rax + movq $1, %rax + push %rax +.data +.L.str.160: + .byte 117 + .byte 54 + .byte 52 + .byte 0 +.text + leaq .L.str.160(%rip), %rax + push %rax + movq $8, %rax + push %rax + movq $8, %rax + push %rax + leaq new_builtin_type(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $32, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $96, %rax + push %rax + movq $1, %rax + push %rax +.data +.L.str.161: + .byte 117 + .byte 51 + .byte 50 + .byte 0 +.text + leaq .L.str.161(%rip), %rax + push %rax + movq $4, %rax + push %rax + movq $9, %rax + push %rax + leaq new_builtin_type(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $32, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $88, %rax + push %rax + movq $1, %rax + push %rax +.data +.L.str.162: + .byte 117 + .byte 49 + .byte 54 + .byte 0 +.text + leaq .L.str.162(%rip), %rax + push %rax + movq $2, %rax + push %rax + movq $10, %rax + push %rax + leaq new_builtin_type(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $32, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $80, %rax + push %rax + movq $1, %rax + push %rax +.data +.L.str.163: + .byte 117 + .byte 56 + .byte 0 +.text + leaq .L.str.163(%rip), %rax + push %rax + movq $1, %rax + push %rax + movq $11, %rax + push %rax + leaq new_builtin_type(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $32, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $72, %rax + push %rax + movq $1, %rax + push %rax +.data +.L.str.164: + .byte 117 + .byte 48 + .byte 0 +.text + leaq .L.str.164(%rip), %rax + push %rax + movq $0, %rax + push %rax + movq $12, %rax + push %rax + leaq new_builtin_type(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $32, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global unkown_member_error +unkown_member_error: + push %rbp + movq %rsp, %rbp + subq $16, %rsp + leaq 32(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + push %rax + leaq print_error_with_code(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movq $0, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.225 + movq $1, %rax + push %rax + leaq exit(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.end.225 +.L.else.225: + movq $1, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.226 + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movslq (%rax), %rax + push %rax + leaq (%rsp), %rax + push %rax + push $1 +.data +.L.str.165: + .byte 104 + .byte 101 + .byte 108 + .byte 112 + .byte 58 + .byte 32 + .byte 37 + .byte 100 + .byte 32 + .byte 112 + .byte 111 + .byte 115 + .byte 115 + .byte 105 + .byte 98 + .byte 105 + .byte 108 + .byte 105 + .byte 116 + .byte 121 + .byte 58 + .byte 0 +.text + leaq .L.str.165(%rip), %rax + push %rax + leaq eprintf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $32, %rsp + jmp .L.end.226 +.L.else.226: + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movslq (%rax), %rax + push %rax + leaq (%rsp), %rax + push %rax + push $1 +.data +.L.str.166: + .byte 104 + .byte 101 + .byte 108 + .byte 112 + .byte 58 + .byte 32 + .byte 37 + .byte 100 + .byte 32 + .byte 112 + .byte 111 + .byte 115 + .byte 115 + .byte 105 + .byte 98 + .byte 105 + .byte 108 + .byte 105 + .byte 116 + .byte 105 + .byte 101 + .byte 115 + .byte 58 + .byte 0 +.text + leaq .L.str.166(%rip), %rax + push %rax + leaq eprintf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $32, %rsp +.L.end.226: +.L.end.225: + leaq -12(%rbp), %rax + push %rax + movq $0, %rax + pop %rdi + movl %eax, (%rdi) +.L.while.start.227: + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movslq (%rax), %rax + push %rax + leaq -12(%rbp), %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setl %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.while.end.227 + leaq -8(%rbp), %rax + push %rax + leaq -12(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq vec_get(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + pop %rdi + movq %rax, (%rdi) + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movslq (%rax), %rax + push %rax + movq $1, %rax + push %rax + leaq -12(%rbp), %rax + movslq (%rax), %rax + pop %rdi + addl %edi, %eax + pop %rdi + cmpl %edi, %eax + setl %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.228 + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movq (%rax), %rax + push %rax + leaq (%rsp), %rax + push %rax + push $1 +.data +.L.str.167: + .byte 32 + .byte 96 + .byte 37 + .byte 115 + .byte 96 + .byte 44 + .byte 0 +.text + leaq .L.str.167(%rip), %rax + push %rax + leaq eprintf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $32, %rsp + jmp .L.end.228 +.L.else.228: + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movq (%rax), %rax + push %rax + leaq (%rsp), %rax + push %rax + push $1 +.data +.L.str.168: + .byte 32 + .byte 96 + .byte 37 + .byte 115 + .byte 96 + .byte 0 +.text + leaq .L.str.168(%rip), %rax + push %rax + leaq eprintf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $32, %rsp +.L.end.228: + movq $1, %rax + push %rax + leaq -12(%rbp), %rax + push %rax + movq $1, %rax + push %rax + leaq -12(%rbp), %rax + movslq (%rax), %rax + pop %rdi + addl %edi, %eax + pop %rdi + movl %eax, (%rdi) + pop %rdi + subl %edi, %eax + jmp .L.while.start.227 +.L.while.end.227: +.data +.L.str.169: + .byte 10 + .byte 0 +.text + leaq .L.str.169(%rip), %rax + push %rax + leaq eprintf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movq $1, %rax + push %rax + leaq exit(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leave + ret +.global unkown_type_error +unkown_type_error: + push %rbp + movq %rsp, %rbp + subq $16, %rsp + leaq 32(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + push %rax + leaq print_error_with_code(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movq $0, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.229 + movq $1, %rax + push %rax + leaq exit(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.end.229 +.L.else.229: + movq $1, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.230 + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movslq (%rax), %rax + push %rax + leaq (%rsp), %rax + push %rax + push $1 +.data +.L.str.170: + .byte 104 + .byte 101 + .byte 108 + .byte 112 + .byte 58 + .byte 32 + .byte 37 + .byte 100 + .byte 32 + .byte 112 + .byte 111 + .byte 115 + .byte 115 + .byte 105 + .byte 98 + .byte 105 + .byte 108 + .byte 105 + .byte 116 + .byte 121 + .byte 58 + .byte 0 +.text + leaq .L.str.170(%rip), %rax + push %rax + leaq eprintf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $32, %rsp + jmp .L.end.230 +.L.else.230: + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movslq (%rax), %rax + push %rax + leaq (%rsp), %rax + push %rax + push $1 +.data +.L.str.171: + .byte 104 + .byte 101 + .byte 108 + .byte 112 + .byte 58 + .byte 32 + .byte 37 + .byte 100 + .byte 32 + .byte 112 + .byte 111 + .byte 115 + .byte 115 + .byte 105 + .byte 98 + .byte 105 + .byte 108 + .byte 105 + .byte 116 + .byte 105 + .byte 101 + .byte 115 + .byte 58 + .byte 0 +.text + leaq .L.str.171(%rip), %rax + push %rax + leaq eprintf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $32, %rsp +.L.end.230: +.L.end.229: + leaq -12(%rbp), %rax + push %rax + movq $0, %rax + pop %rdi + movl %eax, (%rdi) +.L.while.start.231: + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movslq (%rax), %rax + push %rax + leaq -12(%rbp), %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setl %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.while.end.231 + leaq -8(%rbp), %rax + push %rax + leaq -12(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq vec_get(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + pop %rdi + movq %rax, (%rdi) + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movslq (%rax), %rax + push %rax + movq $1, %rax + push %rax + leaq -12(%rbp), %rax + movslq (%rax), %rax + pop %rdi + addl %edi, %eax + pop %rdi + cmpl %edi, %eax + setl %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.232 + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movq (%rax), %rax + push %rax + leaq (%rsp), %rax + push %rax + push $1 +.data +.L.str.172: + .byte 32 + .byte 96 + .byte 37 + .byte 115 + .byte 96 + .byte 44 + .byte 0 +.text + leaq .L.str.172(%rip), %rax + push %rax + leaq eprintf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $32, %rsp + jmp .L.end.232 +.L.else.232: + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movq (%rax), %rax + push %rax + leaq (%rsp), %rax + push %rax + push $1 +.data +.L.str.173: + .byte 32 + .byte 96 + .byte 37 + .byte 115 + .byte 96 + .byte 0 +.text + leaq .L.str.173(%rip), %rax + push %rax + leaq eprintf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $32, %rsp +.L.end.232: + movq $1, %rax + push %rax + leaq -12(%rbp), %rax + push %rax + movq $1, %rax + push %rax + leaq -12(%rbp), %rax + movslq (%rax), %rax + pop %rdi + addl %edi, %eax + pop %rdi + movl %eax, (%rdi) + pop %rdi + subl %edi, %eax + jmp .L.while.start.231 +.L.while.end.231: +.data +.L.str.174: + .byte 10 + .byte 0 +.text + leaq .L.str.174(%rip), %rax + push %rax + leaq eprintf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movq $1, %rax + push %rax + leaq exit(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leave + ret +.global unexpected_token_error +unexpected_token_error: + push %rbp + movq %rsp, %rbp + subq $0, %rsp + leaq 32(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + push %rax + leaq print_error_with_code(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq (%rsp), %rax + push %rax + push $2 +.data +.L.str.175: + .byte 104 + .byte 101 + .byte 108 + .byte 112 + .byte 58 + .byte 32 + .byte 101 + .byte 120 + .byte 112 + .byte 101 + .byte 99 + .byte 116 + .byte 101 + .byte 100 + .byte 32 + .byte 96 + .byte 37 + .byte 115 + .byte 96 + .byte 32 + .byte 98 + .byte 117 + .byte 116 + .byte 32 + .byte 103 + .byte 111 + .byte 116 + .byte 32 + .byte 96 + .byte 37 + .byte 115 + .byte 96 + .byte 10 + .byte 0 +.text + leaq .L.str.175(%rip), %rax + push %rax + leaq eprintf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $40, %rsp + movq $1, %rax + push %rax + leaq exit(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leave + ret diff --git a/bootstrap/preprocessor.s b/bootstrap/preprocessor.s new file mode 100644 index 0000000..ca6e3d1 --- /dev/null +++ b/bootstrap/preprocessor.s @@ -0,0 +1,2498 @@ +.text +.global fd_get_file_full_path +fd_get_file_full_path: + push %rbp + movq %rsp, %rbp + subq $32, %rsp + leaq -20(%rbp), %rax + push %rax + movq $4096, %rax + push %rax + leaq alloc(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + movq $0, %rax + push %rax + leaq -20(%rbp), %rax + movq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.0 +.data +.L.str.0: + .byte 109 + .byte 101 + .byte 109 + .byte 111 + .byte 114 + .byte 121 + .byte 32 + .byte 97 + .byte 108 + .byte 108 + .byte 111 + .byte 99 + .byte 97 + .byte 116 + .byte 105 + .byte 111 + .byte 110 + .byte 32 + .byte 102 + .byte 97 + .byte 105 + .byte 108 + .byte 101 + .byte 100 + .byte 10 + .byte 0 +.text + leaq .L.str.0(%rip), %rax + push %rax + leaq eprintf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movq $1, %rax + push %rax + leaq exit(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.end.0 +.L.else.0: +.L.end.0: + leaq -12(%rbp), %rax + push %rax + movq $64, %rax + push %rax + leaq alloc(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + leaq 16(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq (%rsp), %rax + push %rax + push $1 +.data +.L.str.1: + .byte 47 + .byte 112 + .byte 114 + .byte 111 + .byte 99 + .byte 47 + .byte 115 + .byte 101 + .byte 108 + .byte 102 + .byte 47 + .byte 102 + .byte 100 + .byte 47 + .byte 37 + .byte 100 + .byte 0 +.text + leaq .L.str.1(%rip), %rax + push %rax + leaq -12(%rbp), %rax + movq (%rax), %rax + push %rax + leaq sprintf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $40, %rsp + leaq -4(%rbp), %rax + push %rax + movq $1, %rax + push %rax + movq $4096, %rax + pop %rdi + subl %edi, %eax + push %rax + leaq -20(%rbp), %rax + movq (%rax), %rax + push %rax + leaq -12(%rbp), %rax + movq (%rax), %rax + push %rax + leaq readlink(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + pop %rdi + movl %eax, (%rdi) + movq $0, %rax + push %rax + leaq -4(%rbp), %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setl %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.1 +.data +.L.str.2: + .byte 102 + .byte 97 + .byte 105 + .byte 108 + .byte 101 + .byte 100 + .byte 32 + .byte 97 + .byte 116 + .byte 32 + .byte 114 + .byte 101 + .byte 97 + .byte 100 + .byte 105 + .byte 110 + .byte 103 + .byte 32 + .byte 47 + .byte 112 + .byte 114 + .byte 111 + .byte 99 + .byte 47 + .byte 115 + .byte 101 + .byte 108 + .byte 102 + .byte 47 + .byte 102 + .byte 100 + .byte 32 + .byte 116 + .byte 111 + .byte 32 + .byte 103 + .byte 101 + .byte 116 + .byte 32 + .byte 101 + .byte 120 + .byte 101 + .byte 32 + .byte 112 + .byte 97 + .byte 116 + .byte 104 + .byte 10 + .byte 0 +.text + leaq .L.str.2(%rip), %rax + push %rax + leaq eprintf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movq $1, %rax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.1 +.L.else.1: +.L.end.1: + movq $1, %rax + push %rax + leaq -4(%rbp), %rax + movslq (%rax), %rax + pop %rdi + imull %edi, %eax + push %rax + leaq -20(%rbp), %rax + movq (%rax), %rax + pop %rdi + addq %rdi, %rax + push %rax + movq $0, %rax + pop %rdi + movb %al, (%rdi) + leaq -20(%rbp), %rax + movq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global get_ibu_lib_path +get_ibu_lib_path: + push %rbp + movq %rsp, %rbp + subq $4128, %rsp + leaq -4116(%rbp), %rax + movq %rax, %rdi + movq $4096, %rcx + mov $0, %al + rep stosb + leaq -20(%rbp), %rax + push %rax + movq $1, %rax + push %rax + movq $4096, %rax + pop %rdi + subl %edi, %eax + push %rax + leaq -4116(%rbp), %rax + push %rax +.data +.L.str.3: + .byte 47 + .byte 112 + .byte 114 + .byte 111 + .byte 99 + .byte 47 + .byte 115 + .byte 101 + .byte 108 + .byte 102 + .byte 47 + .byte 101 + .byte 120 + .byte 101 + .byte 0 +.text + leaq .L.str.3(%rip), %rax + push %rax + leaq readlink(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + pop %rdi + movl %eax, (%rdi) + movq $0, %rax + push %rax + leaq -20(%rbp), %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setl %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.2 +.data +.L.str.4: + .byte 102 + .byte 97 + .byte 105 + .byte 108 + .byte 101 + .byte 100 + .byte 32 + .byte 97 + .byte 116 + .byte 32 + .byte 114 + .byte 101 + .byte 97 + .byte 100 + .byte 105 + .byte 110 + .byte 103 + .byte 32 + .byte 47 + .byte 112 + .byte 114 + .byte 111 + .byte 99 + .byte 47 + .byte 115 + .byte 101 + .byte 108 + .byte 102 + .byte 47 + .byte 101 + .byte 120 + .byte 101 + .byte 32 + .byte 116 + .byte 111 + .byte 32 + .byte 103 + .byte 101 + .byte 116 + .byte 32 + .byte 105 + .byte 98 + .byte 117 + .byte 95 + .byte 101 + .byte 120 + .byte 101 + .byte 32 + .byte 112 + .byte 97 + .byte 116 + .byte 104 + .byte 10 + .byte 0 +.text + leaq .L.str.4(%rip), %rax + push %rax + leaq eprintf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movq $1, %rax + push %rax + leaq exit(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.end.2 +.L.else.2: +.L.end.2: + movq $1, %rax + push %rax + leaq -20(%rbp), %rax + movslq (%rax), %rax + pop %rdi + imull %edi, %eax + push %rax + leaq -4116(%rbp), %rax + pop %rdi + addq %rdi, %rax + push %rax + movq $0, %rax + pop %rdi + movb %al, (%rdi) + leaq -16(%rbp), %rax + push %rax + leaq -20(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq -4116(%rbp), %rax + push %rax + leaq strndup(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + push %rax + leaq dirname(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + push %rax + movq $1, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq strlen(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + push %rax +.data +.L.str.5: + .byte 47 + .byte 108 + .byte 105 + .byte 98 + .byte 47 + .byte 0 +.text + leaq .L.str.5(%rip), %rax + push %rax + leaq strlen(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + push %rax + leaq -16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq strlen(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + addl %edi, %eax + pop %rdi + addl %edi, %eax + pop %rdi + addl %edi, %eax + push %rax + leaq alloc(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + movq $0, %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.3 +.data +.L.str.6: + .byte 109 + .byte 101 + .byte 109 + .byte 111 + .byte 114 + .byte 121 + .byte 32 + .byte 97 + .byte 108 + .byte 108 + .byte 111 + .byte 99 + .byte 97 + .byte 116 + .byte 105 + .byte 111 + .byte 110 + .byte 32 + .byte 102 + .byte 97 + .byte 105 + .byte 108 + .byte 101 + .byte 100 + .byte 10 + .byte 0 +.text + leaq .L.str.6(%rip), %rax + push %rax + leaq eprintf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movq $1, %rax + push %rax + leaq exit(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.end.3 +.L.else.3: +.L.end.3: + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq -16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq (%rsp), %rax + push %rax + push $2 +.data +.L.str.7: + .byte 37 + .byte 115 + .byte 47 + .byte 108 + .byte 105 + .byte 98 + .byte 47 + .byte 37 + .byte 115 + .byte 0 +.text + leaq .L.str.7(%rip), %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + push %rax + leaq sprintf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $48, %rsp + leaq -8(%rbp), %rax + movq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global dirname +dirname: + push %rbp + movq %rsp, %rbp + subq $16, %rsp + leaq -12(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq strlen(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movl %eax, (%rdi) + movq $2, %rax + push %rax + leaq -12(%rbp), %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setge %al + movzbl %al, %eax + cmpq $0, %rax + je .L.false.6 + movq $46, %rax + push %rax + movq $1, %rax + push %rax + movq $0, %rax + pop %rdi + imull %edi, %eax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + pop %rdi + addq %rdi, %rax + movzbl (%rax), %eax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $0, %rax + je .L.false.6 + movq $1, %rax + jmp .L.end.6 +.L.false.6: + movq $0, %rax +.L.end.6: + cmpq $0, %rax + je .L.false.5 + movq $47, %rax + push %rax + movq $1, %rax + push %rax + movq $1, %rax + pop %rdi + imull %edi, %eax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + pop %rdi + addq %rdi, %rax + movzbl (%rax), %eax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $0, %rax + je .L.false.5 + movq $1, %rax + jmp .L.end.5 +.L.false.5: + movq $0, %rax +.L.end.5: + cmpq $1, %rax + jne .L.else.4 + movq $2, %rax + push %rax + leaq -12(%rbp), %rax + movslq (%rax), %rax + pop %rdi + subl %edi, %eax + push %rax + movq $2, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + pop %rdi + addq %rdi, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq memmove(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + movq $1, %rax + push %rax + movq $2, %rax + push %rax + leaq -12(%rbp), %rax + movslq (%rax), %rax + pop %rdi + subl %edi, %eax + pop %rdi + imull %edi, %eax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + pop %rdi + addq %rdi, %rax + push %rax + movq $0, %rax + pop %rdi + movb %al, (%rdi) + jmp .L.end.4 +.L.else.4: +.L.end.4: +.L.while.start.7: + movq $0, %rax + push %rax + leaq -12(%rbp), %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setg %al + movzbl %al, %eax + cmpq $0, %rax + je .L.false.8 + movq $47, %rax + push %rax + movq $1, %rax + push %rax + movq $1, %rax + push %rax + leaq -12(%rbp), %rax + movslq (%rax), %rax + pop %rdi + subl %edi, %eax + pop %rdi + imull %edi, %eax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + pop %rdi + addq %rdi, %rax + movzbl (%rax), %eax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $0, %rax + je .L.false.8 + movq $1, %rax + jmp .L.end.8 +.L.false.8: + movq $0, %rax +.L.end.8: + cmpq $1, %rax + jne .L.while.end.7 + movq $1, %rax + push %rax + leaq -12(%rbp), %rax + push %rax + movq $1, %rax + push %rax + leaq -12(%rbp), %rax + movslq (%rax), %rax + pop %rdi + subl %edi, %eax + pop %rdi + movl %eax, (%rdi) + pop %rdi + addl %edi, %eax + movq $1, %rax + push %rax + leaq -12(%rbp), %rax + movslq (%rax), %rax + pop %rdi + imull %edi, %eax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + pop %rdi + addq %rdi, %rax + push %rax + movq $0, %rax + pop %rdi + movb %al, (%rdi) + jmp .L.while.start.7 +.L.while.end.7: + leaq -8(%rbp), %rax + push %rax + movq $47, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq strrchr(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + pop %rdi + movq %rax, (%rdi) + movq $0, %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.9 + movq $2, %rax + push %rax +.data +.L.str.8: + .byte 46 + .byte 0 +.text + leaq .L.str.8(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq memcpy(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + jmp .L.end.9 +.L.else.9: + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.10 + movq $1, %rax + push %rax + movq $1, %rax + pop %rdi + imull %edi, %eax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + pop %rdi + addq %rdi, %rax + push %rax + movq $0, %rax + pop %rdi + movb %al, (%rdi) + jmp .L.end.10 +.L.else.10: + leaq -8(%rbp), %rax + movq (%rax), %rax + push %rax + movq $0, %rax + pop %rdi + movb %al, (%rdi) +.L.end.10: +.L.end.9: + leaq 16(%rbp), %rax + movq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global get_eof_from_tokens +get_eof_from_tokens: + push %rbp + movq %rsp, %rbp + subq $0, %rsp +.L.while.start.11: + movq $5, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setne %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.while.end.11 + leaq 16(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $64, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + jmp .L.while.start.11 +.L.while.end.11: + leaq 16(%rbp), %rax + movq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global find_macro +find_macro: + push %rbp + movq %rsp, %rbp + subq $16, %rsp + leaq -8(%rbp), %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) +.L.while.start.12: + movq $0, %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setne %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.while.end.12 + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.13 + leaq -8(%rbp), %rax + movq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.13 +.L.else.13: +.L.end.13: + leaq -8(%rbp), %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $16, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + jmp .L.while.start.12 +.L.while.end.12: + movq $0, %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global new_macro +new_macro: + push %rbp + movq %rsp, %rbp + subq $16, %rsp + leaq -8(%rbp), %rax + push %rax + movq $24, %rax + push %rax + leaq alloc(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $16, %rax + push %rax + movq $0, %rax + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global preprocess +preprocess: + push %rbp + movq %rsp, %rbp + subq $96, %rsp + leaq -84(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movq (%rax), %rax + push %rax + leaq strlen(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movq (%rax), %rax + push %rax + leaq strndup(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + push %rax + leaq dirname(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) +.L.while.start.14: + movq $1, %rax + cmpq $1, %rax + jne .L.while.end.14 + movq $0, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $64, %rax + movq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setne %al + movzbl %al, %eax + cmpq $0, %rax + je .L.false.17 +.data +.L.str.9: + .byte 35 + .byte 0 +.text + leaq .L.str.9(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $0, %rax + je .L.false.17 + movq $1, %rax + jmp .L.end.17 +.L.false.17: + movq $0, %rax +.L.end.17: + cmpq $0, %rax + je .L.false.16 +.data +.L.str.10: + .byte 100 + .byte 101 + .byte 102 + .byte 105 + .byte 110 + .byte 101 + .byte 0 +.text + leaq .L.str.10(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $64, %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $0, %rax + je .L.false.16 + movq $1, %rax + jmp .L.end.16 +.L.false.16: + movq $0, %rax +.L.end.16: + cmpq $1, %rax + jne .L.else.15 + leaq -76(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $64, %rax + movq (%rax), %rax + addq $64, %rax + movq (%rax), %rax + addq $64, %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $64, %rax + movq (%rax), %rax + addq $64, %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq new_macro(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -76(%rbp), %rax + movq (%rax), %rax + addq $16, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + push %rax + leaq -76(%rbp), %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $64, %rax + movq (%rax), %rax + addq $64, %rax + movq (%rax), %rax + addq $64, %rax + movq (%rax), %rax + addq $64, %rax + movq (%rax), %rax + pop %rdi + movb 0(%rax), %r8b + movb %r8b, 0(%rdi) + movb 1(%rax), %r8b + movb %r8b, 1(%rdi) + movb 2(%rax), %r8b + movb %r8b, 2(%rdi) + movb 3(%rax), %r8b + movb %r8b, 3(%rdi) + movb 4(%rax), %r8b + movb %r8b, 4(%rdi) + movb 5(%rax), %r8b + movb %r8b, 5(%rdi) + movb 6(%rax), %r8b + movb %r8b, 6(%rdi) + movb 7(%rax), %r8b + movb %r8b, 7(%rdi) + movb 8(%rax), %r8b + movb %r8b, 8(%rdi) + movb 9(%rax), %r8b + movb %r8b, 9(%rdi) + movb 10(%rax), %r8b + movb %r8b, 10(%rdi) + movb 11(%rax), %r8b + movb %r8b, 11(%rdi) + movb 12(%rax), %r8b + movb %r8b, 12(%rdi) + movb 13(%rax), %r8b + movb %r8b, 13(%rdi) + movb 14(%rax), %r8b + movb %r8b, 14(%rdi) + movb 15(%rax), %r8b + movb %r8b, 15(%rdi) + movb 16(%rax), %r8b + movb %r8b, 16(%rdi) + movb 17(%rax), %r8b + movb %r8b, 17(%rdi) + movb 18(%rax), %r8b + movb %r8b, 18(%rdi) + movb 19(%rax), %r8b + movb %r8b, 19(%rdi) + movb 20(%rax), %r8b + movb %r8b, 20(%rdi) + movb 21(%rax), %r8b + movb %r8b, 21(%rdi) + movb 22(%rax), %r8b + movb %r8b, 22(%rdi) + movb 23(%rax), %r8b + movb %r8b, 23(%rdi) + movb 24(%rax), %r8b + movb %r8b, 24(%rdi) + movb 25(%rax), %r8b + movb %r8b, 25(%rdi) + movb 26(%rax), %r8b + movb %r8b, 26(%rdi) + movb 27(%rax), %r8b + movb %r8b, 27(%rdi) + movb 28(%rax), %r8b + movb %r8b, 28(%rdi) + movb 29(%rax), %r8b + movb %r8b, 29(%rdi) + movb 30(%rax), %r8b + movb %r8b, 30(%rdi) + movb 31(%rax), %r8b + movb %r8b, 31(%rdi) + movb 32(%rax), %r8b + movb %r8b, 32(%rdi) + movb 33(%rax), %r8b + movb %r8b, 33(%rdi) + movb 34(%rax), %r8b + movb %r8b, 34(%rdi) + movb 35(%rax), %r8b + movb %r8b, 35(%rdi) + movb 36(%rax), %r8b + movb %r8b, 36(%rdi) + movb 37(%rax), %r8b + movb %r8b, 37(%rdi) + movb 38(%rax), %r8b + movb %r8b, 38(%rdi) + movb 39(%rax), %r8b + movb %r8b, 39(%rdi) + movb 40(%rax), %r8b + movb %r8b, 40(%rdi) + movb 41(%rax), %r8b + movb %r8b, 41(%rdi) + movb 42(%rax), %r8b + movb %r8b, 42(%rdi) + movb 43(%rax), %r8b + movb %r8b, 43(%rdi) + movb 44(%rax), %r8b + movb %r8b, 44(%rdi) + movb 45(%rax), %r8b + movb %r8b, 45(%rdi) + movb 46(%rax), %r8b + movb %r8b, 46(%rdi) + movb 47(%rax), %r8b + movb %r8b, 47(%rdi) + movb 48(%rax), %r8b + movb %r8b, 48(%rdi) + movb 49(%rax), %r8b + movb %r8b, 49(%rdi) + movb 50(%rax), %r8b + movb %r8b, 50(%rdi) + movb 51(%rax), %r8b + movb %r8b, 51(%rdi) + movb 52(%rax), %r8b + movb %r8b, 52(%rdi) + movb 53(%rax), %r8b + movb %r8b, 53(%rdi) + movb 54(%rax), %r8b + movb %r8b, 54(%rdi) + movb 55(%rax), %r8b + movb %r8b, 55(%rdi) + movb 56(%rax), %r8b + movb %r8b, 56(%rdi) + movb 57(%rax), %r8b + movb %r8b, 57(%rdi) + movb 58(%rax), %r8b + movb %r8b, 58(%rdi) + movb 59(%rax), %r8b + movb %r8b, 59(%rdi) + movb 60(%rax), %r8b + movb %r8b, 60(%rdi) + movb 61(%rax), %r8b + movb %r8b, 61(%rdi) + movb 62(%rax), %r8b + movb %r8b, 62(%rdi) + movb 63(%rax), %r8b + movb %r8b, 63(%rdi) + movb 64(%rax), %r8b + movb %r8b, 64(%rdi) + movb 65(%rax), %r8b + movb %r8b, 65(%rdi) + movb 66(%rax), %r8b + movb %r8b, 66(%rdi) + movb 67(%rax), %r8b + movb %r8b, 67(%rdi) + movb 68(%rax), %r8b + movb %r8b, 68(%rdi) + movb 69(%rax), %r8b + movb %r8b, 69(%rdi) + movb 70(%rax), %r8b + movb %r8b, 70(%rdi) + movb 71(%rax), %r8b + movb %r8b, 71(%rdi) + jmp .L.end.15 +.L.else.15: + movq $0, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $64, %rax + movq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setne %al + movzbl %al, %eax + cmpq $0, %rax + je .L.false.20 +.data +.L.str.11: + .byte 35 + .byte 0 +.text + leaq .L.str.11(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $0, %rax + je .L.false.20 + movq $1, %rax + jmp .L.end.20 +.L.false.20: + movq $0, %rax +.L.end.20: + cmpq $0, %rax + je .L.false.19 +.data +.L.str.12: + .byte 105 + .byte 110 + .byte 99 + .byte 108 + .byte 117 + .byte 100 + .byte 101 + .byte 0 +.text + leaq .L.str.12(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $64, %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $0, %rax + je .L.false.19 + movq $1, %rax + jmp .L.end.19 +.L.false.19: + movq $0, %rax +.L.end.19: + cmpq $1, %rax + jne .L.else.18 + leaq -68(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $64, %rax + movq (%rax), %rax + addq $64, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + movq $3, %rax + push %rax + leaq -68(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setne %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.21 +.data +.L.str.13: + .byte 101 + .byte 120 + .byte 112 + .byte 101 + .byte 99 + .byte 116 + .byte 101 + .byte 100 + .byte 32 + .byte 116 + .byte 111 + .byte 107 + .byte 101 + .byte 110 + .byte 32 + .byte 115 + .byte 116 + .byte 114 + .byte 105 + .byte 110 + .byte 103 + .byte 0 +.text + leaq .L.str.13(%rip), %rax + push %rax + leaq -68(%rbp), %rax + movq (%rax), %rax + push %rax + leaq print_error(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + jmp .L.end.21 +.L.else.21: +.L.end.21: + leaq -60(%rbp), %rax + push %rax + movq $1, %rax + push %rax + leaq -68(%rbp), %rax + movq (%rax), %rax + addq $48, %rax + movq (%rax), %rax + push %rax + leaq strlen(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + push %rax +.data +.L.str.14: + .byte 47 + .byte 0 +.text + leaq .L.str.14(%rip), %rax + push %rax + leaq strlen(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + push %rax + leaq -84(%rbp), %rax + movq (%rax), %rax + push %rax + leaq strlen(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + addl %edi, %eax + pop %rdi + addl %edi, %eax + pop %rdi + addl %edi, %eax + push %rax + leaq alloc(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + movq $0, %rax + push %rax + leaq -60(%rbp), %rax + movq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.22 +.data +.L.str.15: + .byte 109 + .byte 101 + .byte 109 + .byte 111 + .byte 114 + .byte 121 + .byte 32 + .byte 97 + .byte 108 + .byte 108 + .byte 111 + .byte 99 + .byte 97 + .byte 116 + .byte 105 + .byte 111 + .byte 110 + .byte 32 + .byte 102 + .byte 97 + .byte 105 + .byte 108 + .byte 101 + .byte 100 + .byte 10 + .byte 0 +.text + leaq .L.str.15(%rip), %rax + push %rax + leaq eprintf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movq $1, %rax + push %rax + leaq exit(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.end.22 +.L.else.22: +.L.end.22: + leaq -68(%rbp), %rax + movq (%rax), %rax + addq $48, %rax + movq (%rax), %rax + push %rax + leaq -84(%rbp), %rax + movq (%rax), %rax + push %rax + leaq (%rsp), %rax + push %rax + push $2 +.data +.L.str.16: + .byte 37 + .byte 115 + .byte 47 + .byte 37 + .byte 115 + .byte 0 +.text + leaq .L.str.16(%rip), %rax + push %rax + leaq -60(%rbp), %rax + movq (%rax), %rax + push %rax + leaq sprintf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $48, %rsp + leaq -52(%rbp), %rax + push %rax + movq $420, %rax + push %rax + movq $0, %rax + push %rax + leaq -60(%rbp), %rax + movq (%rax), %rax + push %rax + leaq open(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + pop %rdi + movl %eax, (%rdi) + movq $0, %rax + push %rax + leaq -52(%rbp), %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setl %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.23 + leaq -52(%rbp), %rax + push %rax + movq $420, %rax + push %rax + movq $0, %rax + push %rax + leaq -68(%rbp), %rax + movq (%rax), %rax + addq $48, %rax + movq (%rax), %rax + push %rax + leaq get_ibu_lib_path(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + push %rax + leaq open(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + pop %rdi + movl %eax, (%rdi) + movq $0, %rax + push %rax + leaq -52(%rbp), %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setl %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.24 +.data +.L.str.17: + .byte 110 + .byte 111 + .byte 32 + .byte 115 + .byte 117 + .byte 99 + .byte 104 + .byte 32 + .byte 102 + .byte 105 + .byte 108 + .byte 101 + .byte 32 + .byte 111 + .byte 114 + .byte 32 + .byte 100 + .byte 105 + .byte 114 + .byte 101 + .byte 99 + .byte 116 + .byte 111 + .byte 114 + .byte 121 + .byte 0 +.text + leaq .L.str.17(%rip), %rax + push %rax + leaq -68(%rbp), %rax + movq (%rax), %rax + push %rax + leaq print_error(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + jmp .L.end.24 +.L.else.24: +.L.end.24: + jmp .L.end.23 +.L.else.23: +.L.end.23: + leaq -48(%rbp), %rax + push %rax + leaq -52(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq fd_get_file_full_path(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -40(%rbp), %rax + push %rax + movq $0, %rax + pop %rdi + movl %eax, (%rdi) + leaq -36(%rbp), %rax + push %rax + movq $0, %rax + pop %rdi + movl %eax, (%rdi) +.L.while.start.25: + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movq (%rax), %rax + addq $8, %rax + movslq (%rax), %rax + push %rax + leaq -36(%rbp), %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setl %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.while.end.25 + leaq -32(%rbp), %rax + push %rax + leaq -36(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movq (%rax), %rax + push %rax + leaq vec_get(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -32(%rbp), %rax + movq (%rax), %rax + push %rax + leaq -48(%rbp), %rax + movq (%rax), %rax + push %rax + leaq strcmp(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.26 + leaq -40(%rbp), %rax + push %rax + movq $1, %rax + pop %rdi + movl %eax, (%rdi) + jmp .L.end.26 +.L.else.26: +.L.end.26: + movq $1, %rax + push %rax + leaq -36(%rbp), %rax + push %rax + movq $1, %rax + push %rax + leaq -36(%rbp), %rax + movslq (%rax), %rax + pop %rdi + addl %edi, %eax + pop %rdi + movl %eax, (%rdi) + pop %rdi + subl %edi, %eax + jmp .L.while.start.25 +.L.while.end.25: + leaq -40(%rbp), %rax + movslq (%rax), %rax + cmpq $0, %rax + sete %al + movzbq %al, %rax + cmpq $1, %rax + jne .L.else.27 + leaq -48(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movq (%rax), %rax + push %rax + leaq vec_append(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + leaq -24(%rbp), %rax + push %rax + movq $150000, %rax + push %rax + leaq alloc(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + movq $0, %rax + push %rax + leaq -24(%rbp), %rax + movq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.28 +.data +.L.str.18: + .byte 109 + .byte 101 + .byte 109 + .byte 111 + .byte 114 + .byte 121 + .byte 32 + .byte 97 + .byte 108 + .byte 108 + .byte 111 + .byte 99 + .byte 97 + .byte 116 + .byte 105 + .byte 111 + .byte 110 + .byte 32 + .byte 102 + .byte 97 + .byte 105 + .byte 108 + .byte 101 + .byte 100 + .byte 10 + .byte 0 +.text + leaq .L.str.18(%rip), %rax + push %rax + leaq eprintf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movq $1, %rax + push %rax + leaq exit(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.end.28 +.L.else.28: +.L.end.28: + movq $150000, %rax + push %rax + leaq -24(%rbp), %rax + movq (%rax), %rax + push %rax + leaq -52(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq read(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + leaq -52(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq close(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leaq -16(%rbp), %rax + push %rax + leaq -24(%rbp), %rax + movq (%rax), %rax + push %rax + leaq -60(%rbp), %rax + movq (%rax), %rax + push %rax + leaq new_tokenizer(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + push %rax + leaq tokenize(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + leaq 24(%rbp), %rax + movq (%rax), %rax + push %rax + leaq -16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq preprocess(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + leaq -16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq get_eof_from_tokens(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $64, %rax + movq (%rax), %rax + addq $64, %rax + movq (%rax), %rax + addq $64, %rax + movq (%rax), %rax + pop %rdi + movb 0(%rax), %r8b + movb %r8b, 0(%rdi) + movb 1(%rax), %r8b + movb %r8b, 1(%rdi) + movb 2(%rax), %r8b + movb %r8b, 2(%rdi) + movb 3(%rax), %r8b + movb %r8b, 3(%rdi) + movb 4(%rax), %r8b + movb %r8b, 4(%rdi) + movb 5(%rax), %r8b + movb %r8b, 5(%rdi) + movb 6(%rax), %r8b + movb %r8b, 6(%rdi) + movb 7(%rax), %r8b + movb %r8b, 7(%rdi) + movb 8(%rax), %r8b + movb %r8b, 8(%rdi) + movb 9(%rax), %r8b + movb %r8b, 9(%rdi) + movb 10(%rax), %r8b + movb %r8b, 10(%rdi) + movb 11(%rax), %r8b + movb %r8b, 11(%rdi) + movb 12(%rax), %r8b + movb %r8b, 12(%rdi) + movb 13(%rax), %r8b + movb %r8b, 13(%rdi) + movb 14(%rax), %r8b + movb %r8b, 14(%rdi) + movb 15(%rax), %r8b + movb %r8b, 15(%rdi) + movb 16(%rax), %r8b + movb %r8b, 16(%rdi) + movb 17(%rax), %r8b + movb %r8b, 17(%rdi) + movb 18(%rax), %r8b + movb %r8b, 18(%rdi) + movb 19(%rax), %r8b + movb %r8b, 19(%rdi) + movb 20(%rax), %r8b + movb %r8b, 20(%rdi) + movb 21(%rax), %r8b + movb %r8b, 21(%rdi) + movb 22(%rax), %r8b + movb %r8b, 22(%rdi) + movb 23(%rax), %r8b + movb %r8b, 23(%rdi) + movb 24(%rax), %r8b + movb %r8b, 24(%rdi) + movb 25(%rax), %r8b + movb %r8b, 25(%rdi) + movb 26(%rax), %r8b + movb %r8b, 26(%rdi) + movb 27(%rax), %r8b + movb %r8b, 27(%rdi) + movb 28(%rax), %r8b + movb %r8b, 28(%rdi) + movb 29(%rax), %r8b + movb %r8b, 29(%rdi) + movb 30(%rax), %r8b + movb %r8b, 30(%rdi) + movb 31(%rax), %r8b + movb %r8b, 31(%rdi) + movb 32(%rax), %r8b + movb %r8b, 32(%rdi) + movb 33(%rax), %r8b + movb %r8b, 33(%rdi) + movb 34(%rax), %r8b + movb %r8b, 34(%rdi) + movb 35(%rax), %r8b + movb %r8b, 35(%rdi) + movb 36(%rax), %r8b + movb %r8b, 36(%rdi) + movb 37(%rax), %r8b + movb %r8b, 37(%rdi) + movb 38(%rax), %r8b + movb %r8b, 38(%rdi) + movb 39(%rax), %r8b + movb %r8b, 39(%rdi) + movb 40(%rax), %r8b + movb %r8b, 40(%rdi) + movb 41(%rax), %r8b + movb %r8b, 41(%rdi) + movb 42(%rax), %r8b + movb %r8b, 42(%rdi) + movb 43(%rax), %r8b + movb %r8b, 43(%rdi) + movb 44(%rax), %r8b + movb %r8b, 44(%rdi) + movb 45(%rax), %r8b + movb %r8b, 45(%rdi) + movb 46(%rax), %r8b + movb %r8b, 46(%rdi) + movb 47(%rax), %r8b + movb %r8b, 47(%rdi) + movb 48(%rax), %r8b + movb %r8b, 48(%rdi) + movb 49(%rax), %r8b + movb %r8b, 49(%rdi) + movb 50(%rax), %r8b + movb %r8b, 50(%rdi) + movb 51(%rax), %r8b + movb %r8b, 51(%rdi) + movb 52(%rax), %r8b + movb %r8b, 52(%rdi) + movb 53(%rax), %r8b + movb %r8b, 53(%rdi) + movb 54(%rax), %r8b + movb %r8b, 54(%rdi) + movb 55(%rax), %r8b + movb %r8b, 55(%rdi) + movb 56(%rax), %r8b + movb %r8b, 56(%rdi) + movb 57(%rax), %r8b + movb %r8b, 57(%rdi) + movb 58(%rax), %r8b + movb %r8b, 58(%rdi) + movb 59(%rax), %r8b + movb %r8b, 59(%rdi) + movb 60(%rax), %r8b + movb %r8b, 60(%rdi) + movb 61(%rax), %r8b + movb %r8b, 61(%rdi) + movb 62(%rax), %r8b + movb %r8b, 62(%rdi) + movb 63(%rax), %r8b + movb %r8b, 63(%rdi) + movb 64(%rax), %r8b + movb %r8b, 64(%rdi) + movb 65(%rax), %r8b + movb %r8b, 65(%rdi) + movb 66(%rax), %r8b + movb %r8b, 66(%rdi) + movb 67(%rax), %r8b + movb %r8b, 67(%rdi) + movb 68(%rax), %r8b + movb %r8b, 68(%rdi) + movb 69(%rax), %r8b + movb %r8b, 69(%rdi) + movb 70(%rax), %r8b + movb %r8b, 70(%rdi) + movb 71(%rax), %r8b + movb %r8b, 71(%rdi) + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq -16(%rbp), %rax + movq (%rax), %rax + pop %rdi + movb 0(%rax), %r8b + movb %r8b, 0(%rdi) + movb 1(%rax), %r8b + movb %r8b, 1(%rdi) + movb 2(%rax), %r8b + movb %r8b, 2(%rdi) + movb 3(%rax), %r8b + movb %r8b, 3(%rdi) + movb 4(%rax), %r8b + movb %r8b, 4(%rdi) + movb 5(%rax), %r8b + movb %r8b, 5(%rdi) + movb 6(%rax), %r8b + movb %r8b, 6(%rdi) + movb 7(%rax), %r8b + movb %r8b, 7(%rdi) + movb 8(%rax), %r8b + movb %r8b, 8(%rdi) + movb 9(%rax), %r8b + movb %r8b, 9(%rdi) + movb 10(%rax), %r8b + movb %r8b, 10(%rdi) + movb 11(%rax), %r8b + movb %r8b, 11(%rdi) + movb 12(%rax), %r8b + movb %r8b, 12(%rdi) + movb 13(%rax), %r8b + movb %r8b, 13(%rdi) + movb 14(%rax), %r8b + movb %r8b, 14(%rdi) + movb 15(%rax), %r8b + movb %r8b, 15(%rdi) + movb 16(%rax), %r8b + movb %r8b, 16(%rdi) + movb 17(%rax), %r8b + movb %r8b, 17(%rdi) + movb 18(%rax), %r8b + movb %r8b, 18(%rdi) + movb 19(%rax), %r8b + movb %r8b, 19(%rdi) + movb 20(%rax), %r8b + movb %r8b, 20(%rdi) + movb 21(%rax), %r8b + movb %r8b, 21(%rdi) + movb 22(%rax), %r8b + movb %r8b, 22(%rdi) + movb 23(%rax), %r8b + movb %r8b, 23(%rdi) + movb 24(%rax), %r8b + movb %r8b, 24(%rdi) + movb 25(%rax), %r8b + movb %r8b, 25(%rdi) + movb 26(%rax), %r8b + movb %r8b, 26(%rdi) + movb 27(%rax), %r8b + movb %r8b, 27(%rdi) + movb 28(%rax), %r8b + movb %r8b, 28(%rdi) + movb 29(%rax), %r8b + movb %r8b, 29(%rdi) + movb 30(%rax), %r8b + movb %r8b, 30(%rdi) + movb 31(%rax), %r8b + movb %r8b, 31(%rdi) + movb 32(%rax), %r8b + movb %r8b, 32(%rdi) + movb 33(%rax), %r8b + movb %r8b, 33(%rdi) + movb 34(%rax), %r8b + movb %r8b, 34(%rdi) + movb 35(%rax), %r8b + movb %r8b, 35(%rdi) + movb 36(%rax), %r8b + movb %r8b, 36(%rdi) + movb 37(%rax), %r8b + movb %r8b, 37(%rdi) + movb 38(%rax), %r8b + movb %r8b, 38(%rdi) + movb 39(%rax), %r8b + movb %r8b, 39(%rdi) + movb 40(%rax), %r8b + movb %r8b, 40(%rdi) + movb 41(%rax), %r8b + movb %r8b, 41(%rdi) + movb 42(%rax), %r8b + movb %r8b, 42(%rdi) + movb 43(%rax), %r8b + movb %r8b, 43(%rdi) + movb 44(%rax), %r8b + movb %r8b, 44(%rdi) + movb 45(%rax), %r8b + movb %r8b, 45(%rdi) + movb 46(%rax), %r8b + movb %r8b, 46(%rdi) + movb 47(%rax), %r8b + movb %r8b, 47(%rdi) + movb 48(%rax), %r8b + movb %r8b, 48(%rdi) + movb 49(%rax), %r8b + movb %r8b, 49(%rdi) + movb 50(%rax), %r8b + movb %r8b, 50(%rdi) + movb 51(%rax), %r8b + movb %r8b, 51(%rdi) + movb 52(%rax), %r8b + movb %r8b, 52(%rdi) + movb 53(%rax), %r8b + movb %r8b, 53(%rdi) + movb 54(%rax), %r8b + movb %r8b, 54(%rdi) + movb 55(%rax), %r8b + movb %r8b, 55(%rdi) + movb 56(%rax), %r8b + movb %r8b, 56(%rdi) + movb 57(%rax), %r8b + movb %r8b, 57(%rdi) + movb 58(%rax), %r8b + movb %r8b, 58(%rdi) + movb 59(%rax), %r8b + movb %r8b, 59(%rdi) + movb 60(%rax), %r8b + movb %r8b, 60(%rdi) + movb 61(%rax), %r8b + movb %r8b, 61(%rdi) + movb 62(%rax), %r8b + movb %r8b, 62(%rdi) + movb 63(%rax), %r8b + movb %r8b, 63(%rdi) + movb 64(%rax), %r8b + movb %r8b, 64(%rdi) + movb 65(%rax), %r8b + movb %r8b, 65(%rdi) + movb 66(%rax), %r8b + movb %r8b, 66(%rdi) + movb 67(%rax), %r8b + movb %r8b, 67(%rdi) + movb 68(%rax), %r8b + movb %r8b, 68(%rdi) + movb 69(%rax), %r8b + movb %r8b, 69(%rdi) + movb 70(%rax), %r8b + movb %r8b, 70(%rdi) + movb 71(%rax), %r8b + movb %r8b, 71(%rdi) + jmp .L.end.27 +.L.else.27: + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $64, %rax + movq (%rax), %rax + addq $64, %rax + movq (%rax), %rax + addq $64, %rax + movq (%rax), %rax + pop %rdi + movb 0(%rax), %r8b + movb %r8b, 0(%rdi) + movb 1(%rax), %r8b + movb %r8b, 1(%rdi) + movb 2(%rax), %r8b + movb %r8b, 2(%rdi) + movb 3(%rax), %r8b + movb %r8b, 3(%rdi) + movb 4(%rax), %r8b + movb %r8b, 4(%rdi) + movb 5(%rax), %r8b + movb %r8b, 5(%rdi) + movb 6(%rax), %r8b + movb %r8b, 6(%rdi) + movb 7(%rax), %r8b + movb %r8b, 7(%rdi) + movb 8(%rax), %r8b + movb %r8b, 8(%rdi) + movb 9(%rax), %r8b + movb %r8b, 9(%rdi) + movb 10(%rax), %r8b + movb %r8b, 10(%rdi) + movb 11(%rax), %r8b + movb %r8b, 11(%rdi) + movb 12(%rax), %r8b + movb %r8b, 12(%rdi) + movb 13(%rax), %r8b + movb %r8b, 13(%rdi) + movb 14(%rax), %r8b + movb %r8b, 14(%rdi) + movb 15(%rax), %r8b + movb %r8b, 15(%rdi) + movb 16(%rax), %r8b + movb %r8b, 16(%rdi) + movb 17(%rax), %r8b + movb %r8b, 17(%rdi) + movb 18(%rax), %r8b + movb %r8b, 18(%rdi) + movb 19(%rax), %r8b + movb %r8b, 19(%rdi) + movb 20(%rax), %r8b + movb %r8b, 20(%rdi) + movb 21(%rax), %r8b + movb %r8b, 21(%rdi) + movb 22(%rax), %r8b + movb %r8b, 22(%rdi) + movb 23(%rax), %r8b + movb %r8b, 23(%rdi) + movb 24(%rax), %r8b + movb %r8b, 24(%rdi) + movb 25(%rax), %r8b + movb %r8b, 25(%rdi) + movb 26(%rax), %r8b + movb %r8b, 26(%rdi) + movb 27(%rax), %r8b + movb %r8b, 27(%rdi) + movb 28(%rax), %r8b + movb %r8b, 28(%rdi) + movb 29(%rax), %r8b + movb %r8b, 29(%rdi) + movb 30(%rax), %r8b + movb %r8b, 30(%rdi) + movb 31(%rax), %r8b + movb %r8b, 31(%rdi) + movb 32(%rax), %r8b + movb %r8b, 32(%rdi) + movb 33(%rax), %r8b + movb %r8b, 33(%rdi) + movb 34(%rax), %r8b + movb %r8b, 34(%rdi) + movb 35(%rax), %r8b + movb %r8b, 35(%rdi) + movb 36(%rax), %r8b + movb %r8b, 36(%rdi) + movb 37(%rax), %r8b + movb %r8b, 37(%rdi) + movb 38(%rax), %r8b + movb %r8b, 38(%rdi) + movb 39(%rax), %r8b + movb %r8b, 39(%rdi) + movb 40(%rax), %r8b + movb %r8b, 40(%rdi) + movb 41(%rax), %r8b + movb %r8b, 41(%rdi) + movb 42(%rax), %r8b + movb %r8b, 42(%rdi) + movb 43(%rax), %r8b + movb %r8b, 43(%rdi) + movb 44(%rax), %r8b + movb %r8b, 44(%rdi) + movb 45(%rax), %r8b + movb %r8b, 45(%rdi) + movb 46(%rax), %r8b + movb %r8b, 46(%rdi) + movb 47(%rax), %r8b + movb %r8b, 47(%rdi) + movb 48(%rax), %r8b + movb %r8b, 48(%rdi) + movb 49(%rax), %r8b + movb %r8b, 49(%rdi) + movb 50(%rax), %r8b + movb %r8b, 50(%rdi) + movb 51(%rax), %r8b + movb %r8b, 51(%rdi) + movb 52(%rax), %r8b + movb %r8b, 52(%rdi) + movb 53(%rax), %r8b + movb %r8b, 53(%rdi) + movb 54(%rax), %r8b + movb %r8b, 54(%rdi) + movb 55(%rax), %r8b + movb %r8b, 55(%rdi) + movb 56(%rax), %r8b + movb %r8b, 56(%rdi) + movb 57(%rax), %r8b + movb %r8b, 57(%rdi) + movb 58(%rax), %r8b + movb %r8b, 58(%rdi) + movb 59(%rax), %r8b + movb %r8b, 59(%rdi) + movb 60(%rax), %r8b + movb %r8b, 60(%rdi) + movb 61(%rax), %r8b + movb %r8b, 61(%rdi) + movb 62(%rax), %r8b + movb %r8b, 62(%rdi) + movb 63(%rax), %r8b + movb %r8b, 63(%rdi) + movb 64(%rax), %r8b + movb %r8b, 64(%rdi) + movb 65(%rax), %r8b + movb %r8b, 65(%rdi) + movb 66(%rax), %r8b + movb %r8b, 66(%rdi) + movb 67(%rax), %r8b + movb %r8b, 67(%rdi) + movb 68(%rax), %r8b + movb %r8b, 68(%rdi) + movb 69(%rax), %r8b + movb %r8b, 69(%rdi) + movb 70(%rax), %r8b + movb %r8b, 70(%rdi) + movb 71(%rax), %r8b + movb %r8b, 71(%rdi) +.L.end.27: + jmp .L.end.18 +.L.else.18: + jmp .L.preprocess.break +.L.end.18: +.L.end.15: + jmp .L.while.start.14 +.L.while.end.14: +.L.preprocess.break: + leaq -8(%rbp), %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq find_macro(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + pop %rdi + movq %rax, (%rdi) + movq $0, %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setne %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.29 + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movq (%rax), %rax + push %rax + leaq copy_token(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + jmp .L.end.29 +.L.else.29: +.L.end.29: + movq $0, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $64, %rax + movq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setne %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.30 + leaq 24(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $64, %rax + movq (%rax), %rax + push %rax + leaq preprocess(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + jmp .L.end.30 +.L.else.30: +.L.end.30: + leave + ret +.global new_preprocessor +new_preprocessor: + push %rbp + movq %rsp, %rbp + subq $16, %rsp + leaq -8(%rbp), %rax + push %rax + movq $16, %rax + push %rax + leaq alloc(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + push %rax + movq $0, %rax + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + push %rax + movq $4, %rax + push %rax + leaq new_vec(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret diff --git a/bootstrap/std.s b/bootstrap/std.s new file mode 100644 index 0000000..69b6804 --- /dev/null +++ b/bootstrap/std.s @@ -0,0 +1,3219 @@ +.text +.global strndup +strndup: + push %rbp + movq %rsp, %rbp + subq $16, %rsp + leaq -8(%rbp), %rax + push %rax + movq $1, %rax + push %rax + leaq 24(%rbp), %rax + movslq (%rax), %rax + pop %rdi + addl %edi, %eax + push %rax + leaq alloc(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + movq $0, %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.0 +.data +.L.str.0: + .byte 109 + .byte 101 + .byte 109 + .byte 111 + .byte 114 + .byte 121 + .byte 32 + .byte 97 + .byte 108 + .byte 108 + .byte 111 + .byte 99 + .byte 97 + .byte 116 + .byte 105 + .byte 111 + .byte 110 + .byte 32 + .byte 102 + .byte 97 + .byte 105 + .byte 108 + .byte 101 + .byte 100 + .byte 10 + .byte 0 +.text + leaq .L.str.0(%rip), %rax + push %rax + leaq eprintf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movq $1, %rax + push %rax + leaq exit(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.end.0 +.L.else.0: +.L.end.0: + leaq 24(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + push %rax + leaq memcpy(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + movq $1, %rax + push %rax + leaq 24(%rbp), %rax + movslq (%rax), %rax + pop %rdi + imull %edi, %eax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + pop %rdi + addq %rdi, %rax + push %rax + movq $0, %rax + pop %rdi + movb %al, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global sprintf +sprintf: + push %rbp + movq %rsp, %rbp + subq $0, %rsp + leaq 40(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq vsprintf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global eprintf +eprintf: + push %rbp + movq %rsp, %rbp + subq $0, %rsp + leaq 32(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + movq $2, %rax + push %rax + leaq vfprintf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global printf +printf: + push %rbp + movq %rsp, %rbp + subq $0, %rsp + leaq 32(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + movq $1, %rax + push %rax + leaq vfprintf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global fprintf +fprintf: + push %rbp + movq %rsp, %rbp + subq $0, %rsp + leaq 40(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq vfprintf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global vsprintf +vsprintf: + push %rbp + movq %rsp, %rbp + subq $32, %rsp + leaq -24(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leaq -16(%rbp), %rax + push %rax + movq $0, %rax + pop %rdi + movl %eax, (%rdi) +.L.while.start.1: + movq $0, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + movzbl (%rax), %eax + pop %rdi + cmpl %edi, %eax + setne %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.while.end.1 + movq $37, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + movzbl (%rax), %eax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.2 + movq $1, %rax + push %rax + leaq 24(%rbp), %rax + push %rax + movq $1, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + pop %rdi + addq %rdi, %rax + pop %rdi + movq %rax, (%rdi) + pop %rdi + subq %rdi, %rax + movq $115, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + movzbl (%rax), %eax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.3 + leaq -12(%rbp), %rax + push %rax + movq $8, %rax + push %rax + movq $1, %rax + push %rax + leaq -16(%rbp), %rax + push %rax + movq $1, %rax + push %rax + leaq -16(%rbp), %rax + movslq (%rax), %rax + pop %rdi + addl %edi, %eax + pop %rdi + movl %eax, (%rdi) + pop %rdi + subl %edi, %eax + pop %rdi + imull %edi, %eax + push %rax + leaq 32(%rbp), %rax + movq (%rax), %rax + pop %rdi + addq %rdi, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leaq -12(%rbp), %rax + movq (%rax), %rax + push %rax + leaq strlen(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + push %rax + leaq -12(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq memcpy(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + leaq 16(%rbp), %rax + push %rax + leaq -12(%rbp), %rax + movq (%rax), %rax + push %rax + leaq strlen(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + pop %rdi + addq %rdi, %rax + pop %rdi + movq %rax, (%rdi) + jmp .L.end.3 +.L.else.3: + movq $100, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + movzbl (%rax), %eax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.4 + leaq 16(%rbp), %rax + push %rax + movq $10, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + movq $8, %rax + push %rax + movq $1, %rax + push %rax + leaq -16(%rbp), %rax + push %rax + movq $1, %rax + push %rax + leaq -16(%rbp), %rax + movslq (%rax), %rax + pop %rdi + addl %edi, %eax + pop %rdi + movl %eax, (%rdi) + pop %rdi + subl %edi, %eax + pop %rdi + imull %edi, %eax + push %rax + leaq 32(%rbp), %rax + movq (%rax), %rax + pop %rdi + addq %rdi, %rax + movq (%rax), %rax + push %rax + leaq itoa(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + pop %rdi + addq %rdi, %rax + pop %rdi + movq %rax, (%rdi) + jmp .L.end.4 +.L.else.4: + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + movq $37, %rax + pop %rdi + movb %al, (%rdi) + movq $1, %rax + push %rax + leaq 16(%rbp), %rax + push %rax + movq $1, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + pop %rdi + addq %rdi, %rax + pop %rdi + movq %rax, (%rdi) + pop %rdi + subq %rdi, %rax +.L.end.4: +.L.end.3: + jmp .L.end.2 +.L.else.2: + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + movzbl (%rax), %eax + pop %rdi + movb %al, (%rdi) + movq $1, %rax + push %rax + leaq 16(%rbp), %rax + push %rax + movq $1, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + pop %rdi + addq %rdi, %rax + pop %rdi + movq %rax, (%rdi) + pop %rdi + subq %rdi, %rax +.L.end.2: + movq $1, %rax + push %rax + leaq 24(%rbp), %rax + push %rax + movq $1, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + pop %rdi + addq %rdi, %rax + pop %rdi + movq %rax, (%rdi) + pop %rdi + subq %rdi, %rax + jmp .L.while.start.1 +.L.while.end.1: + leaq -4(%rbp), %rax + push %rax + leaq -24(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + pop %rdi + subq %rdi, %rax + pop %rdi + movl %eax, (%rdi) + movq $1, %rax + push %rax + leaq -4(%rbp), %rax + movslq (%rax), %rax + pop %rdi + imull %edi, %eax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + pop %rdi + addq %rdi, %rax + push %rax + movq $0, %rax + pop %rdi + movb %al, (%rdi) + leaq -4(%rbp), %rax + movslq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global vfprintf +vfprintf: + push %rbp + movq %rsp, %rbp + subq $32, %rsp + leaq -20(%rbp), %rax + push %rax + movq $0, %rax + pop %rdi + movl %eax, (%rdi) + leaq -16(%rbp), %rax + push %rax + movq $0, %rax + pop %rdi + movl %eax, (%rdi) +.L.while.start.5: + movq $0, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + movzbl (%rax), %eax + pop %rdi + cmpl %edi, %eax + setne %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.while.end.5 + movq $37, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + movzbl (%rax), %eax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.6 + movq $1, %rax + push %rax + leaq 24(%rbp), %rax + push %rax + movq $1, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + pop %rdi + addq %rdi, %rax + pop %rdi + movq %rax, (%rdi) + pop %rdi + subq %rdi, %rax + movq $115, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + movzbl (%rax), %eax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.7 + leaq -16(%rbp), %rax + push %rax + movq $8, %rax + push %rax + movq $1, %rax + push %rax + leaq -20(%rbp), %rax + push %rax + movq $1, %rax + push %rax + leaq -20(%rbp), %rax + movslq (%rax), %rax + pop %rdi + addl %edi, %eax + pop %rdi + movl %eax, (%rdi) + pop %rdi + subl %edi, %eax + pop %rdi + imull %edi, %eax + push %rax + leaq 32(%rbp), %rax + movq (%rax), %rax + pop %rdi + addq %rdi, %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq fputs(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + push %rax + leaq -16(%rbp), %rax + movslq (%rax), %rax + pop %rdi + addl %edi, %eax + pop %rdi + movl %eax, (%rdi) + jmp .L.end.7 +.L.else.7: + movq $112, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + movzbl (%rax), %eax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.8 + leaq -12(%rbp), %rax + push %rax + movq $8, %rax + push %rax + movq $1, %rax + push %rax + leaq -20(%rbp), %rax + push %rax + movq $1, %rax + push %rax + leaq -20(%rbp), %rax + movslq (%rax), %rax + pop %rdi + addl %edi, %eax + pop %rdi + movl %eax, (%rdi) + pop %rdi + subl %edi, %eax + pop %rdi + imull %edi, %eax + push %rax + leaq 32(%rbp), %rax + movq (%rax), %rax + pop %rdi + addq %rdi, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leaq -12(%rbp), %rax + movq (%rax), %rax + cmpq $0, %rax + sete %al + movzbq %al, %rax + cmpq $1, %rax + jne .L.else.9 + leaq -16(%rbp), %rax + push %rax +.data +.L.str.1: + .byte 40 + .byte 110 + .byte 105 + .byte 108 + .byte 41 + .byte 0 +.text + leaq .L.str.1(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq fputs(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + push %rax + leaq -16(%rbp), %rax + movslq (%rax), %rax + pop %rdi + addl %edi, %eax + pop %rdi + movl %eax, (%rdi) + jmp .L.end.9 +.L.else.9: + leaq -16(%rbp), %rax + push %rax +.data +.L.str.2: + .byte 48 + .byte 120 + .byte 0 +.text + leaq .L.str.2(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq fputs(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + push %rax + leaq -16(%rbp), %rax + movslq (%rax), %rax + pop %rdi + addl %edi, %eax + pop %rdi + movl %eax, (%rdi) + leaq -16(%rbp), %rax + push %rax + movq $0, %rax + push %rax + movq $16, %rax + push %rax + leaq -12(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq fputunum(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $32, %rsp + push %rax + leaq -16(%rbp), %rax + movslq (%rax), %rax + pop %rdi + addl %edi, %eax + pop %rdi + movl %eax, (%rdi) +.L.end.9: + jmp .L.end.8 +.L.else.8: + movq $98, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + movzbl (%rax), %eax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.10 + leaq -16(%rbp), %rax + push %rax + movq $0, %rax + push %rax + movq $2, %rax + push %rax + movq $8, %rax + push %rax + movq $1, %rax + push %rax + leaq -20(%rbp), %rax + push %rax + movq $1, %rax + push %rax + leaq -20(%rbp), %rax + movslq (%rax), %rax + pop %rdi + addl %edi, %eax + pop %rdi + movl %eax, (%rdi) + pop %rdi + subl %edi, %eax + pop %rdi + imull %edi, %eax + push %rax + leaq 32(%rbp), %rax + movq (%rax), %rax + pop %rdi + addq %rdi, %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq fputunum(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $32, %rsp + push %rax + leaq -16(%rbp), %rax + movslq (%rax), %rax + pop %rdi + addl %edi, %eax + pop %rdi + movl %eax, (%rdi) + jmp .L.end.10 +.L.else.10: + movq $99, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + movzbl (%rax), %eax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.11 + leaq -16(%rbp), %rax + push %rax + movq $8, %rax + push %rax + movq $1, %rax + push %rax + leaq -20(%rbp), %rax + push %rax + movq $1, %rax + push %rax + leaq -20(%rbp), %rax + movslq (%rax), %rax + pop %rdi + addl %edi, %eax + pop %rdi + movl %eax, (%rdi) + pop %rdi + subl %edi, %eax + pop %rdi + imull %edi, %eax + push %rax + leaq 32(%rbp), %rax + movq (%rax), %rax + pop %rdi + addq %rdi, %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq fputchar(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + push %rax + leaq -16(%rbp), %rax + movslq (%rax), %rax + pop %rdi + addl %edi, %eax + pop %rdi + movl %eax, (%rdi) + jmp .L.end.11 +.L.else.11: + movq $120, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + movzbl (%rax), %eax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.12 + leaq -16(%rbp), %rax + push %rax + movq $0, %rax + push %rax + movq $16, %rax + push %rax + movq $8, %rax + push %rax + movq $1, %rax + push %rax + leaq -20(%rbp), %rax + push %rax + movq $1, %rax + push %rax + leaq -20(%rbp), %rax + movslq (%rax), %rax + pop %rdi + addl %edi, %eax + pop %rdi + movl %eax, (%rdi) + pop %rdi + subl %edi, %eax + pop %rdi + imull %edi, %eax + push %rax + leaq 32(%rbp), %rax + movq (%rax), %rax + pop %rdi + addq %rdi, %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq fputunum(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $32, %rsp + push %rax + leaq -16(%rbp), %rax + movslq (%rax), %rax + pop %rdi + addl %edi, %eax + pop %rdi + movl %eax, (%rdi) + jmp .L.end.12 +.L.else.12: + movq $88, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + movzbl (%rax), %eax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.13 + leaq -16(%rbp), %rax + push %rax + movq $1, %rax + push %rax + movq $16, %rax + push %rax + movq $8, %rax + push %rax + movq $1, %rax + push %rax + leaq -20(%rbp), %rax + push %rax + movq $1, %rax + push %rax + leaq -20(%rbp), %rax + movslq (%rax), %rax + pop %rdi + addl %edi, %eax + pop %rdi + movl %eax, (%rdi) + pop %rdi + subl %edi, %eax + pop %rdi + imull %edi, %eax + push %rax + leaq 32(%rbp), %rax + movq (%rax), %rax + pop %rdi + addq %rdi, %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq fputunum(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $32, %rsp + push %rax + leaq -16(%rbp), %rax + movslq (%rax), %rax + pop %rdi + addl %edi, %eax + pop %rdi + movl %eax, (%rdi) + jmp .L.end.13 +.L.else.13: + movq $117, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + movzbl (%rax), %eax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.14 + leaq -16(%rbp), %rax + push %rax + movq $0, %rax + push %rax + movq $10, %rax + push %rax + movq $8, %rax + push %rax + movq $1, %rax + push %rax + leaq -20(%rbp), %rax + push %rax + movq $1, %rax + push %rax + leaq -20(%rbp), %rax + movslq (%rax), %rax + pop %rdi + addl %edi, %eax + pop %rdi + movl %eax, (%rdi) + pop %rdi + subl %edi, %eax + pop %rdi + imull %edi, %eax + push %rax + leaq 32(%rbp), %rax + movq (%rax), %rax + pop %rdi + addq %rdi, %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq fputunum(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $32, %rsp + push %rax + leaq -16(%rbp), %rax + movslq (%rax), %rax + pop %rdi + addl %edi, %eax + pop %rdi + movl %eax, (%rdi) + jmp .L.end.14 +.L.else.14: + movq $100, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + movzbl (%rax), %eax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.15 + leaq -4(%rbp), %rax + push %rax + movq $8, %rax + push %rax + movq $1, %rax + push %rax + leaq -20(%rbp), %rax + push %rax + movq $1, %rax + push %rax + leaq -20(%rbp), %rax + movslq (%rax), %rax + pop %rdi + addl %edi, %eax + pop %rdi + movl %eax, (%rdi) + pop %rdi + subl %edi, %eax + pop %rdi + imull %edi, %eax + push %rax + leaq 32(%rbp), %rax + movq (%rax), %rax + pop %rdi + addq %rdi, %rax + movq (%rax), %rax + pop %rdi + movl %eax, (%rdi) + movq $0, %rax + push %rax + leaq -4(%rbp), %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setl %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.16 + leaq -16(%rbp), %rax + push %rax +.data +.L.str.3: + .byte 45 + .byte 0 +.text + leaq .L.str.3(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq fputs(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + push %rax + leaq -16(%rbp), %rax + movslq (%rax), %rax + pop %rdi + addl %edi, %eax + pop %rdi + movl %eax, (%rdi) + leaq -4(%rbp), %rax + push %rax + leaq -4(%rbp), %rax + movslq (%rax), %rax + push %rax + movq $0, %rax + pop %rdi + subl %edi, %eax + pop %rdi + movl %eax, (%rdi) + jmp .L.end.16 +.L.else.16: +.L.end.16: + leaq -16(%rbp), %rax + push %rax + movq $0, %rax + push %rax + movq $10, %rax + push %rax + leaq -4(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq fputunum(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $32, %rsp + push %rax + leaq -16(%rbp), %rax + movslq (%rax), %rax + pop %rdi + addl %edi, %eax + pop %rdi + movl %eax, (%rdi) + jmp .L.end.15 +.L.else.15: + leaq -16(%rbp), %rax + push %rax + movq $1, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq write(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + push %rax + leaq -16(%rbp), %rax + movslq (%rax), %rax + pop %rdi + addl %edi, %eax + pop %rdi + movl %eax, (%rdi) +.L.end.15: +.L.end.14: +.L.end.13: +.L.end.12: +.L.end.11: +.L.end.10: +.L.end.8: +.L.end.7: + jmp .L.end.6 +.L.else.6: + leaq -16(%rbp), %rax + push %rax + movq $1, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq write(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + push %rax + leaq -16(%rbp), %rax + movslq (%rax), %rax + pop %rdi + addl %edi, %eax + pop %rdi + movl %eax, (%rdi) +.L.end.6: + movq $1, %rax + push %rax + leaq 24(%rbp), %rax + push %rax + movq $1, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + pop %rdi + addq %rdi, %rax + pop %rdi + movq %rax, (%rdi) + pop %rdi + subq %rdi, %rax + jmp .L.while.start.5 +.L.while.end.5: + leaq -16(%rbp), %rax + movslq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global fputchar +fputchar: + push %rbp + movq %rsp, %rbp + subq $16, %rsp + leaq -4(%rbp), %rax + push %rax + movq $1, %rax + push %rax + leaq 24(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq write(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + pop %rdi + movl %eax, (%rdi) + movq $0, %rax + push %rax + leaq -4(%rbp), %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setl %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.17 +.data +.L.str.4: + .byte 119 + .byte 114 + .byte 105 + .byte 116 + .byte 101 + .byte 32 + .byte 115 + .byte 121 + .byte 115 + .byte 99 + .byte 97 + .byte 108 + .byte 108 + .byte 32 + .byte 102 + .byte 97 + .byte 105 + .byte 108 + .byte 101 + .byte 100 + .byte 32 + .byte 97 + .byte 116 + .byte 32 + .byte 102 + .byte 112 + .byte 117 + .byte 116 + .byte 99 + .byte 104 + .byte 97 + .byte 114 + .byte 10 + .byte 0 +.text + leaq .L.str.4(%rip), %rax + push %rax + leaq eprintf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movq $1, %rax + push %rax + leaq exit(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.end.17 +.L.else.17: +.L.end.17: + leaq -4(%rbp), %rax + movslq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global fputunum +fputunum: + push %rbp + movq %rsp, %rbp + subq $16, %rsp + leaq -4(%rbp), %rax + push %rax + movq $0, %rax + pop %rdi + movl %eax, (%rdi) + leaq 32(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setae %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.18 + leaq -4(%rbp), %rax + push %rax + leaq 40(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq 32(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq 32(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + pop %rdi + mov $0, %rdx + divq %rdi + push %rax + leaq 16(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq fputunum(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $32, %rsp + push %rax + leaq -4(%rbp), %rax + movslq (%rax), %rax + pop %rdi + addl %edi, %eax + pop %rdi + movl %eax, (%rdi) + jmp .L.end.18 +.L.else.18: +.L.end.18: + leaq 40(%rbp), %rax + movslq (%rax), %rax + cmpq $1, %rax + jne .L.else.19 + leaq -4(%rbp), %rax + push %rax + movq $1, %rax + push %rax + movq $1, %rax + push %rax + leaq 32(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + pop %rdi + mov $0, %rdx + divq %rdi + movq %rdx, %rax + pop %rdi + imull %edi, %eax + push %rax +.data +.L.str.5: + .byte 48 + .byte 49 + .byte 50 + .byte 51 + .byte 52 + .byte 53 + .byte 54 + .byte 55 + .byte 56 + .byte 57 + .byte 65 + .byte 66 + .byte 67 + .byte 68 + .byte 69 + .byte 70 + .byte 0 +.text + leaq .L.str.5(%rip), %rax + pop %rdi + addq %rdi, %rax + push %rax + leaq 16(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq write(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + push %rax + leaq -4(%rbp), %rax + movslq (%rax), %rax + pop %rdi + addl %edi, %eax + pop %rdi + movl %eax, (%rdi) + jmp .L.end.19 +.L.else.19: + leaq -4(%rbp), %rax + push %rax + movq $1, %rax + push %rax + movq $1, %rax + push %rax + leaq 32(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + pop %rdi + mov $0, %rdx + divq %rdi + movq %rdx, %rax + pop %rdi + imull %edi, %eax + push %rax +.data +.L.str.6: + .byte 48 + .byte 49 + .byte 50 + .byte 51 + .byte 52 + .byte 53 + .byte 54 + .byte 55 + .byte 56 + .byte 57 + .byte 97 + .byte 98 + .byte 99 + .byte 100 + .byte 101 + .byte 102 + .byte 0 +.text + leaq .L.str.6(%rip), %rax + pop %rdi + addq %rdi, %rax + push %rax + leaq 16(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq write(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + push %rax + leaq -4(%rbp), %rax + movslq (%rax), %rax + pop %rdi + addl %edi, %eax + pop %rdi + movl %eax, (%rdi) +.L.end.19: + leaq -4(%rbp), %rax + movslq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global itoa +itoa: + push %rbp + movq %rsp, %rbp + subq $16, %rsp + leaq -12(%rbp), %rax + push %rax + movq $0, %rax + pop %rdi + movl %eax, (%rdi) + movq $0, %rax + push %rax + leaq 16(%rbp), %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.20 + movq $1, %rax + push %rax + movq $1, %rax + push %rax + leaq -12(%rbp), %rax + push %rax + movq $1, %rax + push %rax + leaq -12(%rbp), %rax + movslq (%rax), %rax + pop %rdi + addl %edi, %eax + pop %rdi + movl %eax, (%rdi) + pop %rdi + subl %edi, %eax + pop %rdi + imull %edi, %eax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + pop %rdi + addq %rdi, %rax + push %rax + movq $48, %rax + pop %rdi + movb %al, (%rdi) + movq $1, %rax + push %rax + leaq -12(%rbp), %rax + movslq (%rax), %rax + pop %rdi + imull %edi, %eax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + pop %rdi + addq %rdi, %rax + push %rax + movq $0, %rax + pop %rdi + movb %al, (%rdi) + leaq 24(%rbp), %rax + movq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.20 +.L.else.20: +.L.end.20: + leaq -8(%rbp), %rax + push %rax + movq $0, %rax + pop %rdi + movl %eax, (%rdi) + movq $0, %rax + push %rax + leaq 16(%rbp), %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setl %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.21 + leaq -8(%rbp), %rax + push %rax + movq $1, %rax + pop %rdi + movl %eax, (%rdi) + leaq 16(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movslq (%rax), %rax + push %rax + movq $0, %rax + pop %rdi + subl %edi, %eax + pop %rdi + movl %eax, (%rdi) + jmp .L.end.21 +.L.else.21: +.L.end.21: +.L.while.start.22: + movq $0, %rax + push %rax + leaq 16(%rbp), %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setne %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.while.end.22 + leaq -4(%rbp), %rax + push %rax + leaq 32(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movslq (%rax), %rax + pop %rdi + cltd + idivl %edi + movq %rdx, %rax + pop %rdi + movl %eax, (%rdi) + movq $9, %rax + push %rax + leaq -4(%rbp), %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setg %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.23 + movq $1, %rax + push %rax + movq $1, %rax + push %rax + leaq -12(%rbp), %rax + push %rax + movq $1, %rax + push %rax + leaq -12(%rbp), %rax + movslq (%rax), %rax + pop %rdi + addl %edi, %eax + pop %rdi + movl %eax, (%rdi) + pop %rdi + subl %edi, %eax + pop %rdi + imull %edi, %eax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + pop %rdi + addq %rdi, %rax + push %rax + movq $97, %rax + push %rax + movq $10, %rax + push %rax + leaq -4(%rbp), %rax + movslq (%rax), %rax + pop %rdi + subl %edi, %eax + pop %rdi + addl %edi, %eax + pop %rdi + movb %al, (%rdi) + jmp .L.end.23 +.L.else.23: + movq $1, %rax + push %rax + movq $1, %rax + push %rax + leaq -12(%rbp), %rax + push %rax + movq $1, %rax + push %rax + leaq -12(%rbp), %rax + movslq (%rax), %rax + pop %rdi + addl %edi, %eax + pop %rdi + movl %eax, (%rdi) + pop %rdi + subl %edi, %eax + pop %rdi + imull %edi, %eax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + pop %rdi + addq %rdi, %rax + push %rax + movq $48, %rax + push %rax + leaq -4(%rbp), %rax + movslq (%rax), %rax + pop %rdi + addl %edi, %eax + pop %rdi + movb %al, (%rdi) +.L.end.23: + leaq 16(%rbp), %rax + push %rax + leaq 32(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movslq (%rax), %rax + pop %rdi + cltd + idivl %edi + pop %rdi + movl %eax, (%rdi) + jmp .L.while.start.22 +.L.while.end.22: + leaq -8(%rbp), %rax + movslq (%rax), %rax + cmpq $1, %rax + jne .L.else.24 + movq $1, %rax + push %rax + movq $1, %rax + push %rax + leaq -12(%rbp), %rax + push %rax + movq $1, %rax + push %rax + leaq -12(%rbp), %rax + movslq (%rax), %rax + pop %rdi + addl %edi, %eax + pop %rdi + movl %eax, (%rdi) + pop %rdi + subl %edi, %eax + pop %rdi + imull %edi, %eax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + pop %rdi + addq %rdi, %rax + push %rax + movq $45, %rax + pop %rdi + movb %al, (%rdi) + jmp .L.end.24 +.L.else.24: +.L.end.24: + leaq -12(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + push %rax + leaq reverse_str(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movq $1, %rax + push %rax + leaq -12(%rbp), %rax + movslq (%rax), %rax + pop %rdi + imull %edi, %eax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + pop %rdi + addq %rdi, %rax + push %rax + movq $0, %rax + pop %rdi + movb %al, (%rdi) + leaq -12(%rbp), %rax + movslq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global reverse_str +reverse_str: + push %rbp + movq %rsp, %rbp + subq $16, %rsp + leaq -9(%rbp), %rax + push %rax + movq $0, %rax + pop %rdi + movl %eax, (%rdi) + leaq -5(%rbp), %rax + push %rax + movq $1, %rax + push %rax + leaq 24(%rbp), %rax + movslq (%rax), %rax + pop %rdi + subl %edi, %eax + pop %rdi + movl %eax, (%rdi) +.L.while.start.25: + leaq -5(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq -9(%rbp), %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setl %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.while.end.25 + leaq -1(%rbp), %rax + push %rax + movq $1, %rax + push %rax + leaq -9(%rbp), %rax + movslq (%rax), %rax + pop %rdi + imull %edi, %eax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + pop %rdi + addq %rdi, %rax + movzbl (%rax), %eax + pop %rdi + movb %al, (%rdi) + movq $1, %rax + push %rax + leaq -9(%rbp), %rax + movslq (%rax), %rax + pop %rdi + imull %edi, %eax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + pop %rdi + addq %rdi, %rax + push %rax + movq $1, %rax + push %rax + leaq -5(%rbp), %rax + movslq (%rax), %rax + pop %rdi + imull %edi, %eax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + pop %rdi + addq %rdi, %rax + movzbl (%rax), %eax + pop %rdi + movb %al, (%rdi) + movq $1, %rax + push %rax + leaq -5(%rbp), %rax + movslq (%rax), %rax + pop %rdi + imull %edi, %eax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + pop %rdi + addq %rdi, %rax + push %rax + leaq -1(%rbp), %rax + movzbl (%rax), %eax + pop %rdi + movb %al, (%rdi) + movq $1, %rax + push %rax + leaq -5(%rbp), %rax + push %rax + movq $1, %rax + push %rax + leaq -5(%rbp), %rax + movslq (%rax), %rax + pop %rdi + subl %edi, %eax + pop %rdi + movl %eax, (%rdi) + pop %rdi + addl %edi, %eax + movq $1, %rax + push %rax + leaq -9(%rbp), %rax + push %rax + movq $1, %rax + push %rax + leaq -9(%rbp), %rax + movslq (%rax), %rax + pop %rdi + addl %edi, %eax + pop %rdi + movl %eax, (%rdi) + pop %rdi + subl %edi, %eax + jmp .L.while.start.25 +.L.while.end.25: + leave + ret +.global atoi +atoi: + push %rbp + movq %rsp, %rbp + subq $16, %rsp + leaq -12(%rbp), %rax + push %rax + movq $0, %rax + pop %rdi + movl %eax, (%rdi) + leaq -8(%rbp), %rax + push %rax + movq $0, %rax + pop %rdi + movl %eax, (%rdi) + leaq -4(%rbp), %rax + push %rax + movq $0, %rax + pop %rdi + movl %eax, (%rdi) + movq $45, %rax + push %rax + movq $1, %rax + push %rax + leaq -12(%rbp), %rax + movslq (%rax), %rax + pop %rdi + imull %edi, %eax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + pop %rdi + addq %rdi, %rax + movsbl (%rax), %eax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.26 + leaq -4(%rbp), %rax + push %rax + movq $1, %rax + pop %rdi + movl %eax, (%rdi) + movq $1, %rax + push %rax + leaq -12(%rbp), %rax + push %rax + movq $1, %rax + push %rax + leaq -12(%rbp), %rax + movslq (%rax), %rax + pop %rdi + addl %edi, %eax + pop %rdi + movl %eax, (%rdi) + pop %rdi + subl %edi, %eax + jmp .L.end.26 +.L.else.26: +.L.end.26: +.L.while.start.27: + movq $0, %rax + push %rax + movq $1, %rax + push %rax + leaq -12(%rbp), %rax + movslq (%rax), %rax + pop %rdi + imull %edi, %eax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + pop %rdi + addq %rdi, %rax + movsbl (%rax), %eax + pop %rdi + cmpl %edi, %eax + setne %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.while.end.27 + leaq -8(%rbp), %rax + push %rax + movq $48, %rax + push %rax + movq $1, %rax + push %rax + movq $1, %rax + push %rax + leaq -12(%rbp), %rax + push %rax + movq $1, %rax + push %rax + leaq -12(%rbp), %rax + movslq (%rax), %rax + pop %rdi + addl %edi, %eax + pop %rdi + movl %eax, (%rdi) + pop %rdi + subl %edi, %eax + pop %rdi + imull %edi, %eax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + pop %rdi + addq %rdi, %rax + movsbl (%rax), %eax + push %rax + movq $10, %rax + push %rax + leaq -8(%rbp), %rax + movslq (%rax), %rax + pop %rdi + imull %edi, %eax + pop %rdi + addl %edi, %eax + pop %rdi + subl %edi, %eax + pop %rdi + movl %eax, (%rdi) + jmp .L.while.start.27 +.L.while.end.27: + leaq -4(%rbp), %rax + movslq (%rax), %rax + cmpq $1, %rax + jne .L.else.28 + leaq -8(%rbp), %rax + push %rax + leaq -8(%rbp), %rax + movslq (%rax), %rax + push %rax + movq $0, %rax + pop %rdi + subl %edi, %eax + pop %rdi + movl %eax, (%rdi) + jmp .L.end.28 +.L.else.28: +.L.end.28: + leaq -8(%rbp), %rax + movslq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global isdigit +isdigit: + push %rbp + movq %rsp, %rbp + subq $0, %rsp + leaq 16(%rbp), %rax + movzbl (%rax), %eax + push %rax + movq $48, %rax + pop %rdi + cmpl %edi, %eax + setle %al + movzbl %al, %eax + cmpq $0, %rax + je .L.false.30 + movq $57, %rax + push %rax + leaq 16(%rbp), %rax + movzbl (%rax), %eax + pop %rdi + cmpl %edi, %eax + setbe %al + movzbl %al, %eax + cmpq $0, %rax + je .L.false.30 + movq $1, %rax + jmp .L.end.30 +.L.false.30: + movq $0, %rax +.L.end.30: + cmpq $1, %rax + jne .L.else.29 + movq $1, %rax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.29 +.L.else.29: +.L.end.29: + movq $0, %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global isalpha +isalpha: + push %rbp + movq %rsp, %rbp + subq $0, %rsp + leaq 16(%rbp), %rax + movzbl (%rax), %eax + push %rax + movq $65, %rax + pop %rdi + cmpl %edi, %eax + setle %al + movzbl %al, %eax + cmpq $0, %rax + je .L.false.33 + movq $90, %rax + push %rax + leaq 16(%rbp), %rax + movzbl (%rax), %eax + pop %rdi + cmpl %edi, %eax + setbe %al + movzbl %al, %eax + cmpq $0, %rax + je .L.false.33 + movq $1, %rax + jmp .L.end.33 +.L.false.33: + movq $0, %rax +.L.end.33: + cmpq $0, %rax + jne .L.true.32 + leaq 16(%rbp), %rax + movzbl (%rax), %eax + push %rax + movq $97, %rax + pop %rdi + cmpl %edi, %eax + setle %al + movzbl %al, %eax + cmpq $0, %rax + je .L.false.34 + movq $122, %rax + push %rax + leaq 16(%rbp), %rax + movzbl (%rax), %eax + pop %rdi + cmpl %edi, %eax + setbe %al + movzbl %al, %eax + cmpq $0, %rax + je .L.false.34 + movq $1, %rax + jmp .L.end.34 +.L.false.34: + movq $0, %rax +.L.end.34: + cmp $0, %rax + jne .L.true.32 + mov $0, %rax + jmp .L.end.32 +.L.true.32: + mov $1, %rax +.L.end.32: + cmpq $1, %rax + jne .L.else.31 + movq $1, %rax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.31 +.L.else.31: +.L.end.31: + movq $0, %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global memcpy +memcpy: + push %rbp + movq %rsp, %rbp + subq $16, %rsp + leaq -4(%rbp), %rax + push %rax + movq $0, %rax + pop %rdi + movl %eax, (%rdi) +.L.while.start.35: + leaq 32(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq -4(%rbp), %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setl %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.while.end.35 + movq $1, %rax + push %rax + leaq -4(%rbp), %rax + movslq (%rax), %rax + pop %rdi + imull %edi, %eax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + pop %rdi + addq %rdi, %rax + push %rax + movq $1, %rax + push %rax + leaq -4(%rbp), %rax + movslq (%rax), %rax + pop %rdi + imull %edi, %eax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + pop %rdi + addq %rdi, %rax + movzbl (%rax), %eax + pop %rdi + movb %al, (%rdi) + movq $1, %rax + push %rax + leaq -4(%rbp), %rax + push %rax + movq $1, %rax + push %rax + leaq -4(%rbp), %rax + movslq (%rax), %rax + pop %rdi + addl %edi, %eax + pop %rdi + movl %eax, (%rdi) + pop %rdi + subl %edi, %eax + jmp .L.while.start.35 +.L.while.end.35: + leaq 16(%rbp), %rax + movq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global strrchr +strrchr: + push %rbp + movq %rsp, %rbp + subq $16, %rsp + leaq -8(%rbp), %rax + push %rax + movq $0, %rax + pop %rdi + movq %rax, (%rdi) +.L.while.start.36: + movq $0, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + movzbl (%rax), %eax + pop %rdi + cmpl %edi, %eax + setne %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.while.end.36 + leaq 24(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + movzbl (%rax), %eax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.37 + leaq -8(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + jmp .L.end.37 +.L.else.37: +.L.end.37: + movq $1, %rax + push %rax + leaq 16(%rbp), %rax + push %rax + movq $1, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + pop %rdi + addq %rdi, %rax + pop %rdi + movq %rax, (%rdi) + pop %rdi + subq %rdi, %rax + jmp .L.while.start.36 +.L.while.end.36: + leaq -8(%rbp), %rax + movq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global byte_to_upper +byte_to_upper: + push %rbp + movq %rsp, %rbp + subq $0, %rsp + leaq 16(%rbp), %rax + movzbl (%rax), %eax + push %rax + movq $65, %rax + pop %rdi + cmpl %edi, %eax + setle %al + movzbl %al, %eax + cmpq $0, %rax + je .L.false.39 + movq $90, %rax + push %rax + leaq 16(%rbp), %rax + movzbl (%rax), %eax + pop %rdi + cmpl %edi, %eax + setbe %al + movzbl %al, %eax + cmpq $0, %rax + je .L.false.39 + movq $1, %rax + jmp .L.end.39 +.L.false.39: + movq $0, %rax +.L.end.39: + cmpq $1, %rax + jne .L.else.38 + movq $32, %rax + push %rax + leaq 16(%rbp), %rax + movzbl (%rax), %eax + pop %rdi + subl %edi, %eax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.38 +.L.else.38: +.L.end.38: + leaq 16(%rbp), %rax + movzbl (%rax), %eax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global byte_to_lower +byte_to_lower: + push %rbp + movq %rsp, %rbp + subq $0, %rsp + leaq 16(%rbp), %rax + movzbl (%rax), %eax + push %rax + movq $65, %rax + pop %rdi + cmpl %edi, %eax + setle %al + movzbl %al, %eax + cmpq $0, %rax + je .L.false.41 + movq $90, %rax + push %rax + leaq 16(%rbp), %rax + movzbl (%rax), %eax + pop %rdi + cmpl %edi, %eax + setbe %al + movzbl %al, %eax + cmpq $0, %rax + je .L.false.41 + movq $1, %rax + jmp .L.end.41 +.L.false.41: + movq $0, %rax +.L.end.41: + cmpq $1, %rax + jne .L.else.40 + movq $32, %rax + push %rax + leaq 16(%rbp), %rax + movzbl (%rax), %eax + pop %rdi + addl %edi, %eax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.40 +.L.else.40: +.L.end.40: + leaq 16(%rbp), %rax + movzbl (%rax), %eax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global memmove +memmove: + push %rbp + movq %rsp, %rbp + subq $32, %rsp + leaq -28(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leaq -20(%rbp), %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leaq -12(%rbp), %rax + push %rax + leaq 32(%rbp), %rax + movslq (%rax), %rax + push %rax + movq $1, %rax + pop %rdi + imull %edi, %eax + push %rax + leaq alloc(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + movq $0, %rax + push %rax + leaq -12(%rbp), %rax + movq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.42 + movq $0, %rax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.42 +.L.else.42: + leaq -4(%rbp), %rax + push %rax + movq $0, %rax + pop %rdi + movl %eax, (%rdi) +.L.while.start.43: + leaq 32(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq -4(%rbp), %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setb %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.while.end.43 + leaq -4(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq -12(%rbp), %rax + movq (%rax), %rax + pop %rdi + addq %rdi, %rax + push %rax + leaq -4(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq -20(%rbp), %rax + movq (%rax), %rax + pop %rdi + addq %rdi, %rax + movzbl (%rax), %eax + pop %rdi + movb %al, (%rdi) + movq $1, %rax + push %rax + leaq -4(%rbp), %rax + push %rax + movq $1, %rax + push %rax + leaq -4(%rbp), %rax + movslq (%rax), %rax + pop %rdi + addl %edi, %eax + pop %rdi + movl %eax, (%rdi) + pop %rdi + subl %edi, %eax + jmp .L.while.start.43 +.L.while.end.43: + leaq -4(%rbp), %rax + push %rax + movq $0, %rax + pop %rdi + movl %eax, (%rdi) +.L.while.start.44: + leaq 32(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq -4(%rbp), %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setb %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.while.end.44 + leaq -4(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq -28(%rbp), %rax + movq (%rax), %rax + pop %rdi + addq %rdi, %rax + push %rax + leaq -4(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq -12(%rbp), %rax + movq (%rax), %rax + pop %rdi + addq %rdi, %rax + movzbl (%rax), %eax + pop %rdi + movb %al, (%rdi) + movq $1, %rax + push %rax + leaq -4(%rbp), %rax + push %rax + movq $1, %rax + push %rax + leaq -4(%rbp), %rax + movslq (%rax), %rax + pop %rdi + addl %edi, %eax + pop %rdi + movl %eax, (%rdi) + pop %rdi + subl %edi, %eax + jmp .L.while.start.44 +.L.while.end.44: +.L.end.42: + leave + ret +.global align_to +align_to: + push %rbp + movq %rsp, %rbp + subq $0, %rsp + leaq 24(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq 24(%rbp), %rax + movslq (%rax), %rax + push %rax + movq $1, %rax + push %rax + leaq 24(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movslq (%rax), %rax + pop %rdi + addl %edi, %eax + pop %rdi + subl %edi, %eax + pop %rdi + cltd + idivl %edi + pop %rdi + imull %edi, %eax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global fputs +fputs: + push %rbp + movq %rsp, %rbp + subq $32, %rsp + leaq -20(%rbp), %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leaq -12(%rbp), %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + push %rax + leaq strlen(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + push %rax + leaq -20(%rbp), %rax + movq (%rax), %rax + pop %rdi + addq %rdi, %rax + pop %rdi + movq %rax, (%rdi) + leaq -4(%rbp), %rax + push %rax + movq $0, %rax + pop %rdi + movl %eax, (%rdi) +.L.while.start.45: + leaq -12(%rbp), %rax + movq (%rax), %rax + push %rax + leaq -20(%rbp), %rax + movq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setl %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.while.end.45 + leaq -4(%rbp), %rax + push %rax + leaq -20(%rbp), %rax + movq (%rax), %rax + push %rax + leaq -12(%rbp), %rax + movq (%rax), %rax + pop %rdi + subq %rdi, %rax + push %rax + leaq -20(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq write(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + pop %rdi + movl %eax, (%rdi) + movq $0, %rax + push %rax + leaq -4(%rbp), %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setl %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.46 +.data +.L.str.7: + .byte 119 + .byte 114 + .byte 105 + .byte 116 + .byte 101 + .byte 32 + .byte 115 + .byte 121 + .byte 115 + .byte 99 + .byte 97 + .byte 108 + .byte 108 + .byte 32 + .byte 102 + .byte 97 + .byte 105 + .byte 108 + .byte 101 + .byte 100 + .byte 32 + .byte 97 + .byte 116 + .byte 32 + .byte 102 + .byte 112 + .byte 117 + .byte 116 + .byte 115 + .byte 10 + .byte 0 +.text + leaq .L.str.7(%rip), %rax + push %rax + leaq eprintf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movq $1, %rax + push %rax + leaq exit(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.end.46 +.L.else.46: +.L.end.46: + leaq -20(%rbp), %rax + push %rax + leaq -4(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq -20(%rbp), %rax + movq (%rax), %rax + pop %rdi + addq %rdi, %rax + pop %rdi + movq %rax, (%rdi) + jmp .L.while.start.45 +.L.while.end.45: + leaq -4(%rbp), %rax + movslq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global strlen +strlen: + push %rbp + movq %rsp, %rbp + subq $16, %rsp + leaq -8(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) +.L.while.start.47: + movq $0, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + movzbl (%rax), %eax + pop %rdi + cmpl %edi, %eax + setne %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.while.end.47 + movq $1, %rax + push %rax + leaq 16(%rbp), %rax + push %rax + movq $1, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + pop %rdi + addq %rdi, %rax + pop %rdi + movq %rax, (%rdi) + pop %rdi + subq %rdi, %rax + jmp .L.while.start.47 +.L.while.end.47: + leaq -8(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + pop %rdi + subq %rdi, %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global vec_append +vec_append: + push %rbp + movq %rsp, %rbp + subq $0, %rsp + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $12, %rax + movslq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setge %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.48 + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq vec_realloc(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.end.48 +.L.else.48: +.L.end.48: + movq $8, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movslq (%rax), %rax + pop %rdi + imull %edi, %eax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + pop %rdi + addq %rdi, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + movq $1, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + push %rax + movq $1, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movslq (%rax), %rax + pop %rdi + addl %edi, %eax + pop %rdi + movl %eax, (%rdi) + pop %rdi + subl %edi, %eax + leave + ret +.global vec_get +vec_get: + push %rbp + movq %rsp, %rbp + subq $0, %rsp + movq $8, %rax + push %rax + leaq 24(%rbp), %rax + movslq (%rax), %rax + pop %rdi + imull %edi, %eax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + pop %rdi + addq %rdi, %rax + movq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global vec_realloc +vec_realloc: + push %rbp + movq %rsp, %rbp + subq $16, %rsp + leaq -8(%rbp), %rax + push %rax + movq $2, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $12, %rax + movslq (%rax), %rax + push %rax + movq $8, %rax + pop %rdi + imull %edi, %eax + pop %rdi + imull %edi, %eax + push %rax + leaq alloc(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + movq $0, %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.49 +.data +.L.str.8: + .byte 97 + .byte 108 + .byte 108 + .byte 111 + .byte 99 + .byte 97 + .byte 116 + .byte 105 + .byte 111 + .byte 110 + .byte 32 + .byte 102 + .byte 97 + .byte 105 + .byte 108 + .byte 101 + .byte 100 + .byte 10 + .byte 0 +.text + leaq .L.str.8(%rip), %rax + push %rax + leaq eprintf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movq $1, %rax + push %rax + leaq exit(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.end.49 +.L.else.49: +.L.end.49: + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $12, %rax + movslq (%rax), %rax + push %rax + movq $8, %rax + pop %rdi + imull %edi, %eax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + push %rax + leaq memcpy(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $12, %rax + push %rax + movq $2, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $12, %rax + movslq (%rax), %rax + pop %rdi + imull %edi, %eax + pop %rdi + movl %eax, (%rdi) + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leave + ret +.global new_vec +new_vec: + push %rbp + movq %rsp, %rbp + subq $16, %rsp + leaq -8(%rbp), %rax + push %rax + movq $16, %rax + push %rax + leaq alloc(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + push %rax + leaq 16(%rbp), %rax + movslq (%rax), %rax + push %rax + movq $8, %rax + pop %rdi + imull %edi, %eax + push %rax + leaq alloc(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + movq $0, %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.50 +.data +.L.str.9: + .byte 97 + .byte 108 + .byte 108 + .byte 111 + .byte 99 + .byte 97 + .byte 116 + .byte 105 + .byte 111 + .byte 110 + .byte 32 + .byte 102 + .byte 97 + .byte 105 + .byte 108 + .byte 101 + .byte 100 + .byte 10 + .byte 0 +.text + leaq .L.str.9(%rip), %rax + push %rax + leaq eprintf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movq $1, %rax + push %rax + leaq exit(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.end.50 +.L.else.50: +.L.end.50: + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + push %rax + movq $0, %rax + pop %rdi + movl %eax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $12, %rax + push %rax + leaq 16(%rbp), %rax + movslq (%rax), %rax + pop %rdi + movl %eax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global strcmp +strcmp: + push %rbp + movq %rsp, %rbp + subq $16, %rsp + leaq -4(%rbp), %rax + push %rax + movq $0, %rax + pop %rdi + movl %eax, (%rdi) +.L.while.start.51: + movq $1, %rax + cmpq $1, %rax + jne .L.while.end.51 + movq $1, %rax + push %rax + leaq -4(%rbp), %rax + movslq (%rax), %rax + pop %rdi + imull %edi, %eax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + pop %rdi + addq %rdi, %rax + movzbl (%rax), %eax + push %rax + movq $1, %rax + push %rax + leaq -4(%rbp), %rax + movslq (%rax), %rax + pop %rdi + imull %edi, %eax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + pop %rdi + addq %rdi, %rax + movzbl (%rax), %eax + pop %rdi + cmpl %edi, %eax + setne %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.52 + movq $0, %rax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.52 +.L.else.52: +.L.end.52: + movq $0, %rax + push %rax + movq $1, %rax + push %rax + leaq -4(%rbp), %rax + movslq (%rax), %rax + pop %rdi + imull %edi, %eax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + pop %rdi + addq %rdi, %rax + movzbl (%rax), %eax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.53 + movq $1, %rax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.53 +.L.else.53: +.L.end.53: + movq $1, %rax + push %rax + leaq -4(%rbp), %rax + push %rax + movq $1, %rax + push %rax + leaq -4(%rbp), %rax + movslq (%rax), %rax + pop %rdi + addl %edi, %eax + pop %rdi + movl %eax, (%rdi) + pop %rdi + subl %edi, %eax + jmp .L.while.start.51 +.L.while.end.51: + movq $0, %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret diff --git a/bootstrap/tokenizer.s b/bootstrap/tokenizer.s new file mode 100644 index 0000000..ccb06ab --- /dev/null +++ b/bootstrap/tokenizer.s @@ -0,0 +1,3781 @@ +.text +.global tokenize_ident +tokenize_ident: + push %rbp + movq %rsp, %rbp + subq $16, %rsp + leaq -16(%rbp), %rax + push %rax + movq $2, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq new_token(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) +.L.while.start.0: + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + movq (%rax), %rax + movzbl (%rax), %eax + push %rax + leaq isalpha(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movzx %al, %eax + cmpq $0, %rax + jne .L.true.2 + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + movq (%rax), %rax + movzbl (%rax), %eax + push %rax + leaq isdigit(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movzx %al, %eax + cmp $0, %rax + jne .L.true.2 + mov $0, %rax + jmp .L.end.2 +.L.true.2: + mov $1, %rax +.L.end.2: + cmpq $0, %rax + jne .L.true.1 + movq $95, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + movq (%rax), %rax + movzbl (%rax), %eax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmp $0, %rax + jne .L.true.1 + mov $0, %rax + jmp .L.end.1 +.L.true.1: + mov $1, %rax +.L.end.1: + cmpq $1, %rax + jne .L.while.end.0 + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq tokenizer_next(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.while.start.0 +.L.while.end.0: + leaq -16(%rbp), %rax + movq (%rax), %rax + addq $32, %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + movq (%rax), %rax + pop %rdi + subq %rdi, %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + push %rax + leaq strndup(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -16(%rbp), %rax + movq (%rax), %rax + addq $40, %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + movq (%rax), %rax + pop %rdi + subq %rdi, %rax + pop %rdi + movl %eax, (%rdi) + leaq -16(%rbp), %rax + movq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global tokenize_string +tokenize_string: + push %rbp + movq %rsp, %rbp + subq $48, %rsp + leaq -36(%rbp), %rax + push %rax + movq $3, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq new_token(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -28(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq tokenizer_next(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leaq -20(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq string_end(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -12(%rbp), %rax + push %rax + movq $1, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + movq (%rax), %rax + push %rax + leaq -20(%rbp), %rax + movq (%rax), %rax + pop %rdi + subq %rdi, %rax + pop %rdi + addq %rdi, %rax + push %rax + leaq alloc(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + movq $0, %rax + push %rax + leaq -12(%rbp), %rax + movq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.3 +.data +.L.str.0: + .byte 109 + .byte 101 + .byte 109 + .byte 111 + .byte 114 + .byte 121 + .byte 32 + .byte 97 + .byte 108 + .byte 108 + .byte 111 + .byte 99 + .byte 97 + .byte 116 + .byte 105 + .byte 111 + .byte 110 + .byte 32 + .byte 102 + .byte 97 + .byte 105 + .byte 108 + .byte 101 + .byte 100 + .byte 10 + .byte 0 +.text + leaq .L.str.0(%rip), %rax + push %rax + leaq eprintf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movq $1, %rax + push %rax + leaq exit(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.end.3 +.L.else.3: +.L.end.3: + leaq -4(%rbp), %rax + push %rax + movq $0, %rax + pop %rdi + movl %eax, (%rdi) +.L.while.start.4: + leaq -20(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + movq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setl %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.while.end.4 + movq $92, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + movq (%rax), %rax + movzbl (%rax), %eax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.5 + movq $1, %rax + push %rax + movq $1, %rax + push %rax + leaq -4(%rbp), %rax + push %rax + movq $1, %rax + push %rax + leaq -4(%rbp), %rax + movslq (%rax), %rax + pop %rdi + addl %edi, %eax + pop %rdi + movl %eax, (%rdi) + pop %rdi + subl %edi, %eax + pop %rdi + imull %edi, %eax + push %rax + leaq -12(%rbp), %rax + movq (%rax), %rax + pop %rdi + addq %rdi, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq read_escaped_char(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movzbl %al, %eax + pop %rdi + movb %al, (%rdi) + jmp .L.end.5 +.L.else.5: + movq $1, %rax + push %rax + movq $1, %rax + push %rax + leaq -4(%rbp), %rax + push %rax + movq $1, %rax + push %rax + leaq -4(%rbp), %rax + movslq (%rax), %rax + pop %rdi + addl %edi, %eax + pop %rdi + movl %eax, (%rdi) + pop %rdi + subl %edi, %eax + pop %rdi + imull %edi, %eax + push %rax + leaq -12(%rbp), %rax + movq (%rax), %rax + pop %rdi + addq %rdi, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + movq (%rax), %rax + movzbl (%rax), %eax + pop %rdi + movb %al, (%rdi) +.L.end.5: + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq tokenizer_next(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.while.start.4 +.L.while.end.4: + movq $1, %rax + push %rax + leaq -4(%rbp), %rax + movslq (%rax), %rax + pop %rdi + imull %edi, %eax + push %rax + leaq -12(%rbp), %rax + movq (%rax), %rax + pop %rdi + addq %rdi, %rax + push %rax + movq $0, %rax + pop %rdi + movb %al, (%rdi) + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq tokenizer_next(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leaq -36(%rbp), %rax + movq (%rax), %rax + addq $32, %rax + push %rax + leaq -28(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + movq (%rax), %rax + pop %rdi + subq %rdi, %rax + push %rax + leaq -28(%rbp), %rax + movq (%rax), %rax + push %rax + leaq strndup(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -36(%rbp), %rax + movq (%rax), %rax + addq $40, %rax + push %rax + leaq -28(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + movq (%rax), %rax + pop %rdi + subq %rdi, %rax + pop %rdi + movl %eax, (%rdi) + leaq -36(%rbp), %rax + movq (%rax), %rax + addq $48, %rax + push %rax + leaq -12(%rbp), %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leaq -36(%rbp), %rax + movq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global tokenize_char +tokenize_char: + push %rbp + movq %rsp, %rbp + subq $32, %rsp + leaq -17(%rbp), %rax + push %rax + movq $0, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq new_token(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -9(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq tokenizer_next(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movq $92, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + movq (%rax), %rax + movzbl (%rax), %eax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.6 + leaq -1(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq read_escaped_char(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movzbl %al, %eax + pop %rdi + movb %al, (%rdi) + jmp .L.end.6 +.L.else.6: + leaq -1(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + movq (%rax), %rax + movzbl (%rax), %eax + pop %rdi + movb %al, (%rdi) +.L.end.6: + movq $2, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq tokenizer_next_n(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + leaq -17(%rbp), %rax + movq (%rax), %rax + addq $32, %rax + push %rax + leaq -9(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + movq (%rax), %rax + pop %rdi + subq %rdi, %rax + push %rax + leaq -9(%rbp), %rax + movq (%rax), %rax + push %rax + leaq strndup(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -17(%rbp), %rax + movq (%rax), %rax + addq $40, %rax + push %rax + leaq -9(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + movq (%rax), %rax + pop %rdi + subq %rdi, %rax + pop %rdi + movl %eax, (%rdi) + leaq -17(%rbp), %rax + movq (%rax), %rax + addq $56, %rax + push %rax + leaq -1(%rbp), %rax + movzbl (%rax), %eax + pop %rdi + movl %eax, (%rdi) + leaq -17(%rbp), %rax + movq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global tokenize_number +tokenize_number: + push %rbp + movq %rsp, %rbp + subq $16, %rsp + leaq -16(%rbp), %rax + push %rax + movq $0, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq new_token(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) +.L.while.start.7: + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + movq (%rax), %rax + movzbl (%rax), %eax + push %rax + leaq isdigit(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.while.end.7 + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq tokenizer_next(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.while.start.7 +.L.while.end.7: + leaq -16(%rbp), %rax + movq (%rax), %rax + addq $32, %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + movq (%rax), %rax + pop %rdi + subq %rdi, %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + push %rax + leaq strndup(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -16(%rbp), %rax + movq (%rax), %rax + addq $40, %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + movq (%rax), %rax + pop %rdi + subq %rdi, %rax + pop %rdi + movl %eax, (%rdi) + leaq -16(%rbp), %rax + movq (%rax), %rax + addq $56, %rax + push %rax + leaq -16(%rbp), %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + push %rax + leaq atoi(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movl %eax, (%rdi) + leaq -16(%rbp), %rax + movq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global read_escaped_char +read_escaped_char: + push %rbp + movq %rsp, %rbp + subq $16, %rsp + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq tokenizer_next(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + movq (%rax), %rax + movzbl (%rax), %eax + push %rax + movq $48, %rax + pop %rdi + cmpl %edi, %eax + setle %al + movzbl %al, %eax + cmpq $0, %rax + je .L.false.9 + movq $55, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + movq (%rax), %rax + movzbl (%rax), %eax + pop %rdi + cmpl %edi, %eax + setbe %al + movzbl %al, %eax + cmpq $0, %rax + je .L.false.9 + movq $1, %rax + jmp .L.end.9 +.L.false.9: + movq $0, %rax +.L.end.9: + cmpq $1, %rax + jne .L.else.8 + leaq -1(%rbp), %rax + push %rax + movq $48, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + movq (%rax), %rax + movzbl (%rax), %eax + pop %rdi + subl %edi, %eax + pop %rdi + movb %al, (%rdi) + movq $1, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + movq (%rax), %rax + pop %rdi + addq %rdi, %rax + movzbl (%rax), %eax + push %rax + movq $48, %rax + pop %rdi + cmpl %edi, %eax + setle %al + movzbl %al, %eax + cmpq $0, %rax + je .L.false.11 + movq $55, %rax + push %rax + movq $1, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + movq (%rax), %rax + pop %rdi + addq %rdi, %rax + movzbl (%rax), %eax + pop %rdi + cmpl %edi, %eax + setbe %al + movzbl %al, %eax + cmpq $0, %rax + je .L.false.11 + movq $1, %rax + jmp .L.end.11 +.L.false.11: + movq $0, %rax +.L.end.11: + cmpq $1, %rax + jne .L.else.10 + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq tokenizer_next(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leaq -1(%rbp), %rax + push %rax + movq $48, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + movq (%rax), %rax + movzbl (%rax), %eax + pop %rdi + subl %edi, %eax + push %rax + movq $3, %rax + push %rax + leaq -1(%rbp), %rax + movzbl (%rax), %eax + pop %rdi + movq %rdi, %rcx + shl %cl, %eax + pop %rdi + addl %edi, %eax + pop %rdi + movb %al, (%rdi) + movq $1, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + movq (%rax), %rax + pop %rdi + addq %rdi, %rax + movzbl (%rax), %eax + push %rax + movq $48, %rax + pop %rdi + cmpl %edi, %eax + setle %al + movzbl %al, %eax + cmpq $0, %rax + je .L.false.13 + movq $55, %rax + push %rax + movq $1, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + movq (%rax), %rax + pop %rdi + addq %rdi, %rax + movzbl (%rax), %eax + pop %rdi + cmpl %edi, %eax + setbe %al + movzbl %al, %eax + cmpq $0, %rax + je .L.false.13 + movq $1, %rax + jmp .L.end.13 +.L.false.13: + movq $0, %rax +.L.end.13: + cmpq $1, %rax + jne .L.else.12 + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq tokenizer_next(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leaq -1(%rbp), %rax + push %rax + movq $48, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + movq (%rax), %rax + movzbl (%rax), %eax + pop %rdi + subl %edi, %eax + push %rax + movq $3, %rax + push %rax + leaq -1(%rbp), %rax + movzbl (%rax), %eax + pop %rdi + movq %rdi, %rcx + shl %cl, %eax + pop %rdi + addl %edi, %eax + pop %rdi + movb %al, (%rdi) + jmp .L.end.12 +.L.else.12: +.L.end.12: + jmp .L.end.10 +.L.else.10: +.L.end.10: + leaq -1(%rbp), %rax + movzbl (%rax), %eax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.8 +.L.else.8: +.L.end.8: + movq $120, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + movq (%rax), %rax + movzbl (%rax), %eax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.14 + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq tokenizer_next(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + movq (%rax), %rax + movzbl (%rax), %eax + push %rax + leaq is_hex_digit(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movzx %al, %eax + cmpq $0, %rax + sete %al + movzbq %al, %rax + cmpq $1, %rax + jne .L.else.15 + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $16, %rax + movslq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $20, %rax + movslq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + push %rax + leaq (%rsp), %rax + push %rax + push $3 +.data +.L.str.1: + .byte 27 + .byte 91 + .byte 49 + .byte 109 + .byte 27 + .byte 91 + .byte 51 + .byte 49 + .byte 109 + .byte 45 + .byte 45 + .byte 62 + .byte 32 + .byte 37 + .byte 115 + .byte 58 + .byte 37 + .byte 100 + .byte 58 + .byte 37 + .byte 100 + .byte 58 + .byte 32 + .byte 101 + .byte 114 + .byte 114 + .byte 111 + .byte 114 + .byte 58 + .byte 32 + .byte 105 + .byte 110 + .byte 118 + .byte 97 + .byte 108 + .byte 105 + .byte 100 + .byte 32 + .byte 104 + .byte 101 + .byte 120 + .byte 32 + .byte 101 + .byte 115 + .byte 99 + .byte 97 + .byte 112 + .byte 101 + .byte 32 + .byte 115 + .byte 101 + .byte 113 + .byte 117 + .byte 101 + .byte 110 + .byte 99 + .byte 101 + .byte 27 + .byte 91 + .byte 48 + .byte 109 + .byte 10 + .byte 0 +.text + leaq .L.str.1(%rip), %rax + push %rax + leaq eprintf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $48, %rsp + movq $1, %rax + push %rax + leaq exit(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.end.15 +.L.else.15: +.L.end.15: +.L.while.start.16: + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + movq (%rax), %rax + movzbl (%rax), %eax + push %rax + leaq is_hex_digit(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.while.end.16 + leaq -1(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + movq (%rax), %rax + movzbl (%rax), %eax + push %rax + leaq from_hex(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movzbl %al, %eax + push %rax + movq $4, %rax + push %rax + leaq -1(%rbp), %rax + movzbl (%rax), %eax + pop %rdi + movq %rdi, %rcx + shl %cl, %eax + pop %rdi + addl %edi, %eax + pop %rdi + movb %al, (%rdi) + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq tokenizer_next(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.while.start.16 +.L.while.end.16: + jmp .L.end.14 +.L.else.14: +.L.end.14: + movq $97, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + movq (%rax), %rax + movzbl (%rax), %eax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.17 + movq $7, %rax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.17 +.L.else.17: +.L.end.17: + movq $98, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + movq (%rax), %rax + movzbl (%rax), %eax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.18 + movq $8, %rax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.18 +.L.else.18: +.L.end.18: + movq $116, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + movq (%rax), %rax + movzbl (%rax), %eax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.19 + movq $9, %rax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.19 +.L.else.19: +.L.end.19: + movq $110, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + movq (%rax), %rax + movzbl (%rax), %eax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.20 + movq $10, %rax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.20 +.L.else.20: +.L.end.20: + movq $118, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + movq (%rax), %rax + movzbl (%rax), %eax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.21 + movq $11, %rax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.21 +.L.else.21: +.L.end.21: + movq $102, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + movq (%rax), %rax + movzbl (%rax), %eax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.22 + movq $12, %rax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.22 +.L.else.22: +.L.end.22: + movq $114, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + movq (%rax), %rax + movzbl (%rax), %eax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.23 + movq $13, %rax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.23 +.L.else.23: +.L.end.23: + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + movq (%rax), %rax + movzbl (%rax), %eax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global from_hex +from_hex: + push %rbp + movq %rsp, %rbp + subq $0, %rsp + leaq 16(%rbp), %rax + movzbl (%rax), %eax + push %rax + movq $48, %rax + pop %rdi + cmpl %edi, %eax + setle %al + movzbl %al, %eax + cmpq $0, %rax + je .L.false.25 + movq $57, %rax + push %rax + leaq 16(%rbp), %rax + movzbl (%rax), %eax + pop %rdi + cmpl %edi, %eax + setbe %al + movzbl %al, %eax + cmpq $0, %rax + je .L.false.25 + movq $1, %rax + jmp .L.end.25 +.L.false.25: + movq $0, %rax +.L.end.25: + cmpq $1, %rax + jne .L.else.24 + movq $48, %rax + push %rax + leaq 16(%rbp), %rax + movzbl (%rax), %eax + pop %rdi + subl %edi, %eax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.24 +.L.else.24: +.L.end.24: + leaq 16(%rbp), %rax + movzbl (%rax), %eax + push %rax + movq $97, %rax + pop %rdi + cmpl %edi, %eax + setle %al + movzbl %al, %eax + cmpq $0, %rax + je .L.false.27 + movq $102, %rax + push %rax + leaq 16(%rbp), %rax + movzbl (%rax), %eax + pop %rdi + cmpl %edi, %eax + setbe %al + movzbl %al, %eax + cmpq $0, %rax + je .L.false.27 + movq $1, %rax + jmp .L.end.27 +.L.false.27: + movq $0, %rax +.L.end.27: + cmpq $1, %rax + jne .L.else.26 + movq $10, %rax + push %rax + movq $97, %rax + push %rax + leaq 16(%rbp), %rax + movzbl (%rax), %eax + pop %rdi + subl %edi, %eax + pop %rdi + addl %edi, %eax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.26 +.L.else.26: +.L.end.26: + movq $10, %rax + push %rax + movq $65, %rax + push %rax + leaq 16(%rbp), %rax + movzbl (%rax), %eax + pop %rdi + subl %edi, %eax + pop %rdi + addl %edi, %eax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global is_hex_digit +is_hex_digit: + push %rbp + movq %rsp, %rbp + subq $0, %rsp + leaq 16(%rbp), %rax + movzbl (%rax), %eax + push %rax + movq $48, %rax + pop %rdi + cmpl %edi, %eax + setle %al + movzbl %al, %eax + cmpq $0, %rax + je .L.false.30 + movq $57, %rax + push %rax + leaq 16(%rbp), %rax + movzbl (%rax), %eax + pop %rdi + cmpl %edi, %eax + setbe %al + movzbl %al, %eax + cmpq $0, %rax + je .L.false.30 + movq $1, %rax + jmp .L.end.30 +.L.false.30: + movq $0, %rax +.L.end.30: + cmpq $0, %rax + jne .L.true.29 + leaq 16(%rbp), %rax + movzbl (%rax), %eax + push %rax + movq $65, %rax + pop %rdi + cmpl %edi, %eax + setle %al + movzbl %al, %eax + cmpq $0, %rax + je .L.false.31 + movq $70, %rax + push %rax + leaq 16(%rbp), %rax + movzbl (%rax), %eax + pop %rdi + cmpl %edi, %eax + setbe %al + movzbl %al, %eax + cmpq $0, %rax + je .L.false.31 + movq $1, %rax + jmp .L.end.31 +.L.false.31: + movq $0, %rax +.L.end.31: + cmp $0, %rax + jne .L.true.29 + mov $0, %rax + jmp .L.end.29 +.L.true.29: + mov $1, %rax +.L.end.29: + cmpq $0, %rax + jne .L.true.28 + leaq 16(%rbp), %rax + movzbl (%rax), %eax + push %rax + movq $97, %rax + pop %rdi + cmpl %edi, %eax + setle %al + movzbl %al, %eax + cmpq $0, %rax + je .L.false.32 + movq $102, %rax + push %rax + leaq 16(%rbp), %rax + movzbl (%rax), %eax + pop %rdi + cmpl %edi, %eax + setbe %al + movzbl %al, %eax + cmpq $0, %rax + je .L.false.32 + movq $1, %rax + jmp .L.end.32 +.L.false.32: + movq $0, %rax +.L.end.32: + cmp $0, %rax + jne .L.true.28 + mov $0, %rax + jmp .L.end.28 +.L.true.28: + mov $1, %rax +.L.end.28: + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global string_end +string_end: + push %rbp + movq %rsp, %rbp + subq $0, %rsp +.L.while.start.33: + movq $34, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + movzbl (%rax), %eax + pop %rdi + cmpl %edi, %eax + setne %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.while.end.33 + movq $10, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + movzbl (%rax), %eax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $0, %rax + jne .L.true.35 + movq $0, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + movzbl (%rax), %eax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmp $0, %rax + jne .L.true.35 + mov $0, %rax + jmp .L.end.35 +.L.true.35: + mov $1, %rax +.L.end.35: + cmpq $1, %rax + jne .L.else.34 + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $16, %rax + movslq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $20, %rax + movslq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + push %rax + leaq (%rsp), %rax + push %rax + push $3 +.data +.L.str.2: + .byte 27 + .byte 91 + .byte 49 + .byte 109 + .byte 27 + .byte 91 + .byte 51 + .byte 49 + .byte 109 + .byte 45 + .byte 45 + .byte 62 + .byte 32 + .byte 37 + .byte 115 + .byte 58 + .byte 37 + .byte 100 + .byte 58 + .byte 37 + .byte 100 + .byte 58 + .byte 32 + .byte 101 + .byte 114 + .byte 114 + .byte 111 + .byte 114 + .byte 58 + .byte 32 + .byte 117 + .byte 110 + .byte 99 + .byte 108 + .byte 111 + .byte 115 + .byte 101 + .byte 100 + .byte 32 + .byte 115 + .byte 116 + .byte 114 + .byte 105 + .byte 110 + .byte 103 + .byte 32 + .byte 108 + .byte 105 + .byte 116 + .byte 101 + .byte 114 + .byte 97 + .byte 108 + .byte 27 + .byte 91 + .byte 48 + .byte 109 + .byte 10 + .byte 0 +.text + leaq .L.str.2(%rip), %rax + push %rax + leaq eprintf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $48, %rsp + movq $1, %rax + push %rax + leaq exit(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.end.34 +.L.else.34: +.L.end.34: + movq $92, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + movzbl (%rax), %eax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.36 + movq $1, %rax + push %rax + leaq 24(%rbp), %rax + push %rax + movq $1, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + pop %rdi + addq %rdi, %rax + pop %rdi + movq %rax, (%rdi) + pop %rdi + subq %rdi, %rax + jmp .L.end.36 +.L.else.36: +.L.end.36: + movq $1, %rax + push %rax + leaq 24(%rbp), %rax + push %rax + movq $1, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + pop %rdi + addq %rdi, %rax + pop %rdi + movq %rax, (%rdi) + pop %rdi + subq %rdi, %rax + jmp .L.while.start.33 +.L.while.end.33: + leaq 24(%rbp), %rax + movq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global skip_single_line_comment +skip_single_line_comment: + push %rbp + movq %rsp, %rbp + subq $0, %rsp +.data +.L.str.3: + .byte 47 + .byte 47 + .byte 0 +.text + leaq .L.str.3(%rip), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + movq (%rax), %rax + push %rax + leaq starts_with(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.37 +.L.while.start.38: + movq $10, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + movq (%rax), %rax + movzbl (%rax), %eax + pop %rdi + cmpl %edi, %eax + setne %al + movzbl %al, %eax + cmpq $0, %rax + je .L.false.39 + movq $0, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + movq (%rax), %rax + movzbl (%rax), %eax + pop %rdi + cmpl %edi, %eax + setne %al + movzbl %al, %eax + cmpq $0, %rax + je .L.false.39 + movq $1, %rax + jmp .L.end.39 +.L.false.39: + movq $0, %rax +.L.end.39: + cmpq $1, %rax + jne .L.while.end.38 + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq tokenizer_next(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.while.start.38 +.L.while.end.38: + jmp .L.end.37 +.L.else.37: +.L.end.37: + leave + ret +.global tokenize_punct +tokenize_punct: + push %rbp + movq %rsp, %rbp + subq $16, %rsp + leaq -12(%rbp), %rax + push %rax + movq $0, %rax + pop %rdi + movl %eax, (%rdi) +.L.while.start.40: + movq $34, %rax + push %rax + leaq -12(%rbp), %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setl %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.while.end.40 + movq $8, %rax + push %rax + leaq -12(%rbp), %rax + movslq (%rax), %rax + pop %rdi + imull %edi, %eax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $32, %rax + pop %rdi + addq %rdi, %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + movq (%rax), %rax + push %rax + leaq starts_with(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.41 + leaq -8(%rbp), %rax + push %rax + movq $4, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq new_token(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $40, %rax + push %rax + movq $8, %rax + push %rax + leaq -12(%rbp), %rax + movslq (%rax), %rax + pop %rdi + imull %edi, %eax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $32, %rax + pop %rdi + addq %rdi, %rax + movq (%rax), %rax + push %rax + leaq strlen(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movl %eax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $32, %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $40, %rax + movslq (%rax), %rax + push %rax + movq $8, %rax + push %rax + leaq -12(%rbp), %rax + movslq (%rax), %rax + pop %rdi + imull %edi, %eax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $32, %rax + pop %rdi + addq %rdi, %rax + movq (%rax), %rax + push %rax + leaq strndup(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $40, %rax + movslq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq tokenizer_next_n(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + leaq -8(%rbp), %rax + movq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.41 +.L.else.41: +.L.end.41: + movq $1, %rax + push %rax + leaq -12(%rbp), %rax + push %rax + movq $1, %rax + push %rax + leaq -12(%rbp), %rax + movslq (%rax), %rax + pop %rdi + addl %edi, %eax + pop %rdi + movl %eax, (%rdi) + pop %rdi + subl %edi, %eax + jmp .L.while.start.40 +.L.while.end.40: + movq $0, %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global new_token +new_token: + push %rbp + movq %rsp, %rbp + subq $16, %rsp + leaq -8(%rbp), %rax + push %rax + movq $72, %rax + push %rax + leaq alloc(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + movq $0, %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.42 +.data +.L.str.4: + .byte 109 + .byte 101 + .byte 109 + .byte 111 + .byte 114 + .byte 121 + .byte 32 + .byte 97 + .byte 108 + .byte 108 + .byte 111 + .byte 99 + .byte 97 + .byte 116 + .byte 105 + .byte 111 + .byte 110 + .byte 32 + .byte 102 + .byte 97 + .byte 105 + .byte 108 + .byte 101 + .byte 100 + .byte 10 + .byte 0 +.text + leaq .L.str.4(%rip), %rax + push %rax + leaq eprintf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movq $1, %rax + push %rax + leaq exit(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.end.42 +.L.else.42: +.L.end.42: + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $20, %rax + movslq (%rax), %rax + pop %rdi + movl %eax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $28, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $16, %rax + movslq (%rax), %rax + pop %rdi + movl %eax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + push %rax + leaq 24(%rbp), %rax + movslq (%rax), %rax + pop %rdi + movl %eax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $16, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global tokenizer_next_n +tokenizer_next_n: + push %rbp + movq %rsp, %rbp + subq $16, %rsp + leaq -4(%rbp), %rax + push %rax + movq $0, %rax + pop %rdi + movl %eax, (%rdi) +.L.while.start.43: + leaq 24(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq -4(%rbp), %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setl %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.while.end.43 + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq tokenizer_next(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movq $1, %rax + push %rax + leaq -4(%rbp), %rax + push %rax + movq $1, %rax + push %rax + leaq -4(%rbp), %rax + movslq (%rax), %rax + pop %rdi + addl %edi, %eax + pop %rdi + movl %eax, (%rdi) + pop %rdi + subl %edi, %eax + jmp .L.while.start.43 +.L.while.end.43: + leave + ret +.global tokenizer_next +tokenizer_next: + push %rbp + movq %rsp, %rbp + subq $0, %rsp + movq $10, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + movq (%rax), %rax + movzbl (%rax), %eax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.44 + movq $1, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $20, %rax + push %rax + movq $1, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $20, %rax + movslq (%rax), %rax + pop %rdi + addl %edi, %eax + pop %rdi + movl %eax, (%rdi) + pop %rdi + subl %edi, %eax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $16, %rax + push %rax + movq $0, %rax + pop %rdi + movl %eax, (%rdi) + movq $1, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + push %rax + movq $1, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + movq (%rax), %rax + pop %rdi + addq %rdi, %rax + pop %rdi + movq %rax, (%rdi) + pop %rdi + subq %rdi, %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + jmp .L.end.44 +.L.else.44: + movq $1, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $16, %rax + push %rax + movq $1, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $16, %rax + movslq (%rax), %rax + pop %rdi + addl %edi, %eax + pop %rdi + movl %eax, (%rdi) + pop %rdi + subl %edi, %eax + movq $1, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + push %rax + movq $1, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + movq (%rax), %rax + pop %rdi + addq %rdi, %rax + pop %rdi + movq %rax, (%rdi) + pop %rdi + subq %rdi, %rax +.L.end.44: + leave + ret +.global starts_with +starts_with: + push %rbp + movq %rsp, %rbp + subq $16, %rsp + leaq -4(%rbp), %rax + push %rax + movq $0, %rax + pop %rdi + movl %eax, (%rdi) +.L.while.start.45: + leaq 24(%rbp), %rax + movq (%rax), %rax + push %rax + leaq strlen(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + push %rax + leaq -4(%rbp), %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setl %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.while.end.45 + movq $1, %rax + push %rax + leaq -4(%rbp), %rax + movslq (%rax), %rax + pop %rdi + imull %edi, %eax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + pop %rdi + addq %rdi, %rax + movzbl (%rax), %eax + push %rax + movq $1, %rax + push %rax + leaq -4(%rbp), %rax + movslq (%rax), %rax + pop %rdi + imull %edi, %eax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + pop %rdi + addq %rdi, %rax + movzbl (%rax), %eax + pop %rdi + cmpl %edi, %eax + setne %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.46 + movq $0, %rax + movq %rbp, %rsp + pop %rbp + retq + jmp .L.end.46 +.L.else.46: +.L.end.46: + movq $1, %rax + push %rax + leaq -4(%rbp), %rax + push %rax + movq $1, %rax + push %rax + leaq -4(%rbp), %rax + movslq (%rax), %rax + pop %rdi + addl %edi, %eax + pop %rdi + movl %eax, (%rdi) + pop %rdi + subl %edi, %eax + jmp .L.while.start.45 +.L.while.end.45: + movq $1, %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global frepeat_str +frepeat_str: + push %rbp + movq %rsp, %rbp + subq $16, %rsp + leaq -4(%rbp), %rax + push %rax + movq $0, %rax + pop %rdi + movl %eax, (%rdi) +.L.while.start.47: + leaq 32(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq -4(%rbp), %rax + movslq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setl %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.while.end.47 + leaq 24(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movslq (%rax), %rax + push %rax + leaq fputs(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movq $1, %rax + push %rax + leaq -4(%rbp), %rax + push %rax + movq $1, %rax + push %rax + leaq -4(%rbp), %rax + movslq (%rax), %rax + pop %rdi + addl %edi, %eax + pop %rdi + movl %eax, (%rdi) + pop %rdi + subl %edi, %eax + jmp .L.while.start.47 +.L.while.end.47: + movq $0, %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global tokenize +tokenize: + push %rbp + movq %rsp, %rbp + subq $96, %rsp + leaq -96(%rbp), %rax + movq %rax, %rdi + movq $72, %rcx + mov $0, %al + rep stosb + leaq -24(%rbp), %rax + push %rax + leaq -96(%rbp), %rax + pop %rdi + movq %rax, (%rdi) +.L.while.start.48: + movq $0, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + movq (%rax), %rax + movzbl (%rax), %eax + pop %rdi + cmpl %edi, %eax + setne %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.while.end.48 + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq skip_single_line_comment(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + movq (%rax), %rax + movzbl (%rax), %eax + push %rax + leaq isdigit(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.49 + leaq -24(%rbp), %rax + push %rax + leaq -24(%rbp), %rax + movq (%rax), %rax + addq $64, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq tokenize_number(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + pop %rdi + movq %rax, (%rdi) + jmp .L.end.49 +.L.else.49: + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + movq (%rax), %rax + movzbl (%rax), %eax + push %rax + leaq isalpha(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movzx %al, %eax + cmpq $1, %rax + jne .L.else.50 + leaq -24(%rbp), %rax + push %rax + leaq -24(%rbp), %rax + movq (%rax), %rax + addq $64, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq tokenize_ident(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + pop %rdi + movq %rax, (%rdi) + jmp .L.end.50 +.L.else.50: + movq $39, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + movq (%rax), %rax + movzbl (%rax), %eax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.51 + leaq -24(%rbp), %rax + push %rax + leaq -24(%rbp), %rax + movq (%rax), %rax + addq $64, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq tokenize_char(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + pop %rdi + movq %rax, (%rdi) + jmp .L.end.51 +.L.else.51: + movq $34, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + movq (%rax), %rax + movzbl (%rax), %eax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.52 + leaq -24(%rbp), %rax + push %rax + leaq -24(%rbp), %rax + movq (%rax), %rax + addq $64, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq tokenize_string(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + pop %rdi + movq %rax, (%rdi) + jmp .L.end.52 +.L.else.52: + movq $32, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + movq (%rax), %rax + movzbl (%rax), %eax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.53 + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq tokenizer_next(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.end.53 +.L.else.53: + movq $10, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + movq (%rax), %rax + movzbl (%rax), %eax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.54 + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq tokenizer_next(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.end.54 +.L.else.54: + movq $9, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + movq (%rax), %rax + movzbl (%rax), %eax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.55 + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq tokenizer_next(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.end.55 +.L.else.55: + leaq -16(%rbp), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq tokenize_punct(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + movq $0, %rax + push %rax + leaq -16(%rbp), %rax + movq (%rax), %rax + pop %rdi + cmpl %edi, %eax + setne %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.56 + leaq -24(%rbp), %rax + push %rax + leaq -24(%rbp), %rax + movq (%rax), %rax + addq $64, %rax + push %rax + leaq -16(%rbp), %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + pop %rdi + movq %rax, (%rdi) + jmp .L.end.56 +.L.else.56: + leaq -8(%rbp), %rax + push %rax + movq $6, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq new_token(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $32, %rax + push %rax + movq $1, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + movq (%rax), %rax + push %rax + leaq strndup(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + pop %rdi + movq %rax, (%rdi) + leaq -8(%rbp), %rax + movq (%rax), %rax + addq $40, %rax + push %rax + movq $1, %rax + pop %rdi + movl %eax, (%rdi) +.data +.L.str.5: + .byte 117 + .byte 110 + .byte 107 + .byte 111 + .byte 119 + .byte 110 + .byte 32 + .byte 99 + .byte 104 + .byte 97 + .byte 114 + .byte 97 + .byte 99 + .byte 116 + .byte 101 + .byte 114 + .byte 32 + .byte 102 + .byte 111 + .byte 117 + .byte 110 + .byte 100 + .byte 0 +.text + leaq .L.str.5(%rip), %rax + push %rax + leaq -8(%rbp), %rax + movq (%rax), %rax + push %rax + leaq print_error(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp +.L.end.56: +.L.end.55: +.L.end.54: +.L.end.53: +.L.end.52: +.L.end.51: +.L.end.50: +.L.end.49: + jmp .L.while.start.48 +.L.while.end.48: + leaq -24(%rbp), %rax + push %rax + leaq -24(%rbp), %rax + movq (%rax), %rax + addq $64, %rax + push %rax + movq $5, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq new_token(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + pop %rdi + movq %rax, (%rdi) + pop %rdi + movq %rax, (%rdi) + leaq -24(%rbp), %rax + movq (%rax), %rax + addq $32, %rax + push %rax +.data +.L.str.6: + .byte 69 + .byte 79 + .byte 70 + .byte 0 +.text + leaq .L.str.6(%rip), %rax + pop %rdi + movq %rax, (%rdi) + leaq -24(%rbp), %rax + movq (%rax), %rax + addq $40, %rax + push %rax + movq $1, %rax + pop %rdi + movl %eax, (%rdi) + leaq -96(%rbp), %rax + addq $64, %rax + movq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global new_tokenizer +new_tokenizer: + push %rbp + movq %rsp, %rbp + subq $288, %rsp + leaq -280(%rbp), %rax + push %rax + movq $304, %rax + push %rax + leaq alloc(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + pop %rdi + movq %rax, (%rdi) + movq $0, %rax + push %rax + leaq -280(%rbp), %rax + movq (%rax), %rax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.57 +.data +.L.str.7: + .byte 109 + .byte 101 + .byte 109 + .byte 111 + .byte 114 + .byte 121 + .byte 32 + .byte 97 + .byte 108 + .byte 108 + .byte 111 + .byte 99 + .byte 97 + .byte 116 + .byte 105 + .byte 111 + .byte 110 + .byte 32 + .byte 102 + .byte 97 + .byte 105 + .byte 108 + .byte 101 + .byte 100 + .byte 10 + .byte 0 +.text + leaq .L.str.7(%rip), %rax + push %rax + leaq eprintf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movq $1, %rax + push %rax + leaq exit(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + jmp .L.end.57 +.L.else.57: +.L.end.57: + leaq -280(%rbp), %rax + movq (%rax), %rax + addq $20, %rax + push %rax + movq $1, %rax + pop %rdi + movl %eax, (%rdi) + leaq -280(%rbp), %rax + movq (%rax), %rax + addq $16, %rax + push %rax + movq $0, %rax + pop %rdi + movl %eax, (%rdi) + leaq -280(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leaq -280(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + push %rax + leaq 24(%rbp), %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leaq -280(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + movq $0, %rax + push %rax + leaq -272(%rbp), %rax + pop %rdi + addq %rdi, %rax + push %rax +.data +.L.str.8: + .byte 61 + .byte 61 + .byte 0 +.text + leaq .L.str.8(%rip), %rax + pop %rdi + movq %rax, (%rdi) + movq $8, %rax + push %rax + leaq -272(%rbp), %rax + pop %rdi + addq %rdi, %rax + push %rax +.data +.L.str.9: + .byte 60 + .byte 61 + .byte 0 +.text + leaq .L.str.9(%rip), %rax + pop %rdi + movq %rax, (%rdi) + movq $16, %rax + push %rax + leaq -272(%rbp), %rax + pop %rdi + addq %rdi, %rax + push %rax +.data +.L.str.10: + .byte 62 + .byte 61 + .byte 0 +.text + leaq .L.str.10(%rip), %rax + pop %rdi + movq %rax, (%rdi) + movq $24, %rax + push %rax + leaq -272(%rbp), %rax + pop %rdi + addq %rdi, %rax + push %rax +.data +.L.str.11: + .byte 33 + .byte 61 + .byte 0 +.text + leaq .L.str.11(%rip), %rax + pop %rdi + movq %rax, (%rdi) + movq $32, %rax + push %rax + leaq -272(%rbp), %rax + pop %rdi + addq %rdi, %rax + push %rax +.data +.L.str.12: + .byte 43 + .byte 43 + .byte 0 +.text + leaq .L.str.12(%rip), %rax + pop %rdi + movq %rax, (%rdi) + movq $40, %rax + push %rax + leaq -272(%rbp), %rax + pop %rdi + addq %rdi, %rax + push %rax +.data +.L.str.13: + .byte 45 + .byte 45 + .byte 0 +.text + leaq .L.str.13(%rip), %rax + pop %rdi + movq %rax, (%rdi) + movq $48, %rax + push %rax + leaq -272(%rbp), %rax + pop %rdi + addq %rdi, %rax + push %rax +.data +.L.str.14: + .byte 124 + .byte 124 + .byte 0 +.text + leaq .L.str.14(%rip), %rax + pop %rdi + movq %rax, (%rdi) + movq $56, %rax + push %rax + leaq -272(%rbp), %rax + pop %rdi + addq %rdi, %rax + push %rax +.data +.L.str.15: + .byte 38 + .byte 38 + .byte 0 +.text + leaq .L.str.15(%rip), %rax + pop %rdi + movq %rax, (%rdi) + movq $64, %rax + push %rax + leaq -272(%rbp), %rax + pop %rdi + addq %rdi, %rax + push %rax +.data +.L.str.16: + .byte 60 + .byte 60 + .byte 0 +.text + leaq .L.str.16(%rip), %rax + pop %rdi + movq %rax, (%rdi) + movq $72, %rax + push %rax + leaq -272(%rbp), %rax + pop %rdi + addq %rdi, %rax + push %rax +.data +.L.str.17: + .byte 62 + .byte 62 + .byte 0 +.text + leaq .L.str.17(%rip), %rax + pop %rdi + movq %rax, (%rdi) + movq $80, %rax + push %rax + leaq -272(%rbp), %rax + pop %rdi + addq %rdi, %rax + push %rax +.data +.L.str.18: + .byte 46 + .byte 46 + .byte 46 + .byte 0 +.text + leaq .L.str.18(%rip), %rax + pop %rdi + movq %rax, (%rdi) + movq $88, %rax + push %rax + leaq -272(%rbp), %rax + pop %rdi + addq %rdi, %rax + push %rax +.data +.L.str.19: + .byte 43 + .byte 0 +.text + leaq .L.str.19(%rip), %rax + pop %rdi + movq %rax, (%rdi) + movq $96, %rax + push %rax + leaq -272(%rbp), %rax + pop %rdi + addq %rdi, %rax + push %rax +.data +.L.str.20: + .byte 45 + .byte 0 +.text + leaq .L.str.20(%rip), %rax + pop %rdi + movq %rax, (%rdi) + movq $104, %rax + push %rax + leaq -272(%rbp), %rax + pop %rdi + addq %rdi, %rax + push %rax +.data +.L.str.21: + .byte 60 + .byte 0 +.text + leaq .L.str.21(%rip), %rax + pop %rdi + movq %rax, (%rdi) + movq $112, %rax + push %rax + leaq -272(%rbp), %rax + pop %rdi + addq %rdi, %rax + push %rax +.data +.L.str.22: + .byte 62 + .byte 0 +.text + leaq .L.str.22(%rip), %rax + pop %rdi + movq %rax, (%rdi) + movq $120, %rax + push %rax + leaq -272(%rbp), %rax + pop %rdi + addq %rdi, %rax + push %rax +.data +.L.str.23: + .byte 59 + .byte 0 +.text + leaq .L.str.23(%rip), %rax + pop %rdi + movq %rax, (%rdi) + movq $128, %rax + push %rax + leaq -272(%rbp), %rax + pop %rdi + addq %rdi, %rax + push %rax +.data +.L.str.24: + .byte 58 + .byte 0 +.text + leaq .L.str.24(%rip), %rax + pop %rdi + movq %rax, (%rdi) + movq $136, %rax + push %rax + leaq -272(%rbp), %rax + pop %rdi + addq %rdi, %rax + push %rax +.data +.L.str.25: + .byte 123 + .byte 0 +.text + leaq .L.str.25(%rip), %rax + pop %rdi + movq %rax, (%rdi) + movq $144, %rax + push %rax + leaq -272(%rbp), %rax + pop %rdi + addq %rdi, %rax + push %rax +.data +.L.str.26: + .byte 125 + .byte 0 +.text + leaq .L.str.26(%rip), %rax + pop %rdi + movq %rax, (%rdi) + movq $152, %rax + push %rax + leaq -272(%rbp), %rax + pop %rdi + addq %rdi, %rax + push %rax +.data +.L.str.27: + .byte 61 + .byte 0 +.text + leaq .L.str.27(%rip), %rax + pop %rdi + movq %rax, (%rdi) + movq $160, %rax + push %rax + leaq -272(%rbp), %rax + pop %rdi + addq %rdi, %rax + push %rax +.data +.L.str.28: + .byte 44 + .byte 0 +.text + leaq .L.str.28(%rip), %rax + pop %rdi + movq %rax, (%rdi) + movq $168, %rax + push %rax + leaq -272(%rbp), %rax + pop %rdi + addq %rdi, %rax + push %rax +.data +.L.str.29: + .byte 40 + .byte 0 +.text + leaq .L.str.29(%rip), %rax + pop %rdi + movq %rax, (%rdi) + movq $176, %rax + push %rax + leaq -272(%rbp), %rax + pop %rdi + addq %rdi, %rax + push %rax +.data +.L.str.30: + .byte 41 + .byte 0 +.text + leaq .L.str.30(%rip), %rax + pop %rdi + movq %rax, (%rdi) + movq $184, %rax + push %rax + leaq -272(%rbp), %rax + pop %rdi + addq %rdi, %rax + push %rax +.data +.L.str.31: + .byte 91 + .byte 0 +.text + leaq .L.str.31(%rip), %rax + pop %rdi + movq %rax, (%rdi) + movq $192, %rax + push %rax + leaq -272(%rbp), %rax + pop %rdi + addq %rdi, %rax + push %rax +.data +.L.str.32: + .byte 93 + .byte 0 +.text + leaq .L.str.32(%rip), %rax + pop %rdi + movq %rax, (%rdi) + movq $200, %rax + push %rax + leaq -272(%rbp), %rax + pop %rdi + addq %rdi, %rax + push %rax +.data +.L.str.33: + .byte 46 + .byte 0 +.text + leaq .L.str.33(%rip), %rax + pop %rdi + movq %rax, (%rdi) + movq $208, %rax + push %rax + leaq -272(%rbp), %rax + pop %rdi + addq %rdi, %rax + push %rax +.data +.L.str.34: + .byte 42 + .byte 0 +.text + leaq .L.str.34(%rip), %rax + pop %rdi + movq %rax, (%rdi) + movq $216, %rax + push %rax + leaq -272(%rbp), %rax + pop %rdi + addq %rdi, %rax + push %rax +.data +.L.str.35: + .byte 35 + .byte 0 +.text + leaq .L.str.35(%rip), %rax + pop %rdi + movq %rax, (%rdi) + movq $224, %rax + push %rax + leaq -272(%rbp), %rax + pop %rdi + addq %rdi, %rax + push %rax +.data +.L.str.36: + .byte 33 + .byte 0 +.text + leaq .L.str.36(%rip), %rax + pop %rdi + movq %rax, (%rdi) + movq $232, %rax + push %rax + leaq -272(%rbp), %rax + pop %rdi + addq %rdi, %rax + push %rax +.data +.L.str.37: + .byte 37 + .byte 0 +.text + leaq .L.str.37(%rip), %rax + pop %rdi + movq %rax, (%rdi) + movq $240, %rax + push %rax + leaq -272(%rbp), %rax + pop %rdi + addq %rdi, %rax + push %rax +.data +.L.str.38: + .byte 38 + .byte 0 +.text + leaq .L.str.38(%rip), %rax + pop %rdi + movq %rax, (%rdi) + movq $248, %rax + push %rax + leaq -272(%rbp), %rax + pop %rdi + addq %rdi, %rax + push %rax +.data +.L.str.39: + .byte 47 + .byte 0 +.text + leaq .L.str.39(%rip), %rax + pop %rdi + movq %rax, (%rdi) + movq $256, %rax + push %rax + leaq -272(%rbp), %rax + pop %rdi + addq %rdi, %rax + push %rax +.data +.L.str.40: + .byte 124 + .byte 0 +.text + leaq .L.str.40(%rip), %rax + pop %rdi + movq %rax, (%rdi) + movq $264, %rax + push %rax + leaq -272(%rbp), %rax + pop %rdi + addq %rdi, %rax + push %rax +.data +.L.str.41: + .byte 38 + .byte 0 +.text + leaq .L.str.41(%rip), %rax + pop %rdi + movq %rax, (%rdi) + movq $272, %rax + push %rax + leaq -272(%rbp), %rax + push %rax + leaq -280(%rbp), %rax + movq (%rax), %rax + addq $32, %rax + push %rax + leaq memcpy(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + leaq -280(%rbp), %rax + movq (%rax), %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global print_error +print_error: + push %rbp + movq %rsp, %rbp + subq $0, %rsp + leaq 24(%rbp), %rax + movq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + push %rax + leaq print_error_with_code(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $16, %rsp + movq $1, %rax + push %rax + leaq exit(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leave + ret +.global print_error_with_code +print_error_with_code: + push %rbp + movq %rsp, %rbp + subq $0, %rsp + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $28, %rax + movslq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + movslq (%rax), %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movq (%rax), %rax + push %rax + leaq (%rsp), %rax + push %rax + push $3 +.data +.L.str.42: + .byte 27 + .byte 91 + .byte 49 + .byte 109 + .byte 27 + .byte 91 + .byte 51 + .byte 49 + .byte 109 + .byte 45 + .byte 45 + .byte 62 + .byte 32 + .byte 37 + .byte 115 + .byte 58 + .byte 37 + .byte 100 + .byte 58 + .byte 37 + .byte 100 + .byte 58 + .byte 32 + .byte 101 + .byte 114 + .byte 114 + .byte 111 + .byte 114 + .byte 58 + .byte 27 + .byte 91 + .byte 48 + .byte 109 + .byte 10 + .byte 0 +.text + leaq .L.str.42(%rip), %rax + push %rax + leaq eprintf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $48, %rsp +.data +.L.str.43: + .byte 32 + .byte 124 + .byte 32 + .byte 10 + .byte 0 +.text + leaq .L.str.43(%rip), %rax + push %rax + leaq eprintf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp +.data +.L.str.44: + .byte 32 + .byte 124 + .byte 32 + .byte 0 +.text + leaq .L.str.44(%rip), %rax + push %rax + leaq eprintf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp +.L.while.start.58: + movq $10, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $16, %rax + movq (%rax), %rax + movzbl (%rax), %eax + pop %rdi + cmpl %edi, %eax + setne %al + movzbl %al, %eax + cmpq $0, %rax + je .L.false.59 + movq $0, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $16, %rax + movq (%rax), %rax + movzbl (%rax), %eax + pop %rdi + cmpl %edi, %eax + setne %al + movzbl %al, %eax + cmpq $0, %rax + je .L.false.59 + movq $1, %rax + jmp .L.end.59 +.L.false.59: + movq $0, %rax +.L.end.59: + cmpq $1, %rax + jne .L.while.end.58 + movq $9, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $16, %rax + movq (%rax), %rax + movzbl (%rax), %eax + pop %rdi + cmpl %edi, %eax + sete %al + movzbl %al, %eax + cmpq $1, %rax + jne .L.else.60 + movq $1, %rax + push %rax +.data +.L.str.45: + .byte 32 + .byte 0 +.text + leaq .L.str.45(%rip), %rax + push %rax + movq $2, %rax + push %rax + leaq write(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + jmp .L.end.60 +.L.else.60: + movq $1, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $16, %rax + movq (%rax), %rax + push %rax + movq $2, %rax + push %rax + leaq write(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp +.L.end.60: + movq $1, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $16, %rax + push %rax + movq $1, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $16, %rax + movq (%rax), %rax + pop %rdi + addq %rdi, %rax + pop %rdi + movq %rax, (%rdi) + pop %rdi + subq %rdi, %rax + jmp .L.while.start.58 +.L.while.end.58: +.data +.L.str.46: + .byte 10 + .byte 0 +.text + leaq .L.str.46(%rip), %rax + push %rax + leaq eprintf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp +.data +.L.str.47: + .byte 32 + .byte 124 + .byte 32 + .byte 0 +.text + leaq .L.str.47(%rip), %rax + push %rax + leaq eprintf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp +.data +.L.str.48: + .byte 27 + .byte 91 + .byte 49 + .byte 109 + .byte 27 + .byte 91 + .byte 51 + .byte 49 + .byte 109 + .byte 0 +.text + leaq .L.str.48(%rip), %rax + push %rax + leaq eprintf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $28, %rax + movslq (%rax), %rax + push %rax +.data +.L.str.49: + .byte 32 + .byte 0 +.text + leaq .L.str.49(%rip), %rax + push %rax + movq $2, %rax + push %rax + leaq frepeat_str(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $40, %rax + movslq (%rax), %rax + push %rax +.data +.L.str.50: + .byte 94 + .byte 0 +.text + leaq .L.str.50(%rip), %rax + push %rax + movq $2, %rax + push %rax + leaq frepeat_str(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $24, %rsp + leaq 24(%rbp), %rax + movq (%rax), %rax + push %rax + leaq (%rsp), %rax + push %rax + push $1 +.data +.L.str.51: + .byte 32 + .byte 37 + .byte 115 + .byte 27 + .byte 91 + .byte 48 + .byte 109 + .byte 10 + .byte 0 +.text + leaq .L.str.51(%rip), %rax + push %rax + leaq eprintf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $32, %rsp +.data +.L.str.52: + .byte 32 + .byte 124 + .byte 32 + .byte 10 + .byte 0 +.text + leaq .L.str.52(%rip), %rax + push %rax + leaq eprintf(%rip), %rax + movq %rax, %r10 + movq $0, %rax + callq *%r10 + addq $8, %rsp + movq $0, %rax + movq %rbp, %rsp + pop %rbp + retq + leave + ret +.global copy_token +copy_token: + push %rbp + movq %rsp, %rbp + subq $0, %rsp + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $32, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $32, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $0, %rax + movslq (%rax), %rax + pop %rdi + movl %eax, (%rdi) + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $8, %rax + movq (%rax), %rax + pop %rdi + movq %rax, (%rdi) + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $24, %rax + movslq (%rax), %rax + pop %rdi + movl %eax, (%rdi) + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $28, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $28, %rax + movslq (%rax), %rax + pop %rdi + movl %eax, (%rdi) + leaq 24(%rbp), %rax + movq (%rax), %rax + addq $56, %rax + push %rax + leaq 16(%rbp), %rax + movq (%rax), %rax + addq $56, %rax + movslq (%rax), %rax + pop %rdi + movl %eax, (%rdi) + leave + ret diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..e696869 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,10 @@ +services: + ibulang: + build: + context: . + dockerfile: Dockerfile + volumes: + - .:/root/env + working_dir: /root/env + stdin_open: true # docker run -i + tty: true # docker run -t diff --git a/docs/docs.md b/docs/docs.md new file mode 100644 index 0000000..37f5fac --- /dev/null +++ b/docs/docs.md @@ -0,0 +1,296 @@ +# Documentation + +## Introduction +ibu is a statically typed compiled language developed solely for the enjoyment of programming. + +## Installing the Language +```zsh +$ git clone git@github.com:v420v/ibu.git +$ cd ibu +$ make up +$ make ibulang +$ make init +``` + +## How to Use the Compiler +Let's actually compile and run a hello world program. +```zsh +$ ./ibuc main.ibu | as - -o main.o +$ as -o lib/runtime.o lib/runtime.s +$ ./ibuc lib/linux-syscall/linux-syscall.ibu | as - -o lib/linux-syscall.o +$ ./ibuc lib/std/std.ibu | as - -o lib/std.o +$ ld -o main main.o lib/runtime.o lib/linux-syscall.o lib/std.o +$ ./main +``` +Brief explanation: +- Line 1 `./ibuc main.ibu | as - -o main.o` + - Converts main.ibu to assembly code using the ./ibuc compiler + - Passes it to the assembler (as) using pipe (|) + - Generates an object file (main.o) with -o main.o + +- Line 2 `as -o lib/runtime.o lib/runtime.s` + - Uses the assembler (as) + - Compiles the assembly file runtime.s + - Generates an object file lib/runtime.o + +- Line 3 `./ibuc lib/linux-syscall/linux-syscall.ibu | as - -o lib/linux-syscall.o` + - Compiles the Linux system call related source file (linux-syscall.ibu) + - Generates an object file lib/linux-syscall.o through the assembler + +- Line 4 `./ibuc lib/std/std.ibu | as - -o lib/std.o` + - Compiles the standard library (std.ibu) + - Generates an object file lib/std.o through the assembler + +- Line 5 `ld -o main main.o lib/runtime.o lib/linux-syscall.o lib/std.o` + - Uses the linker (ld) + - Links all object files generated above + - Creates an executable file (main) + +- Line 6 `./main` + - Executes hello world + +## Hello World +``` +#include "std/header.ibu" + +func main() i32 { + printf("hello world"); + return 0; +} +``` + +## Comments +```c +// Only single-line comments exist +``` + +## Include files +The include keyword first looks for the specified file from the current directory. If it fails it searches the file from the [lib](../lib) folder. +``` +#include "std/header.ibu" +``` + +## Functions +Function declarations are somewhat similar to Go. + +The type comes after the parameter name. + +Return type must always be specified. If there is no return value, you can use the `u0` type which will be covered in the [Types](#types) section. +``` +#include "std/header.ibu" + +func foo(x i32, y i32) i32 { + return x + y; +} + +func main() i32 { + return foo(34, 35); +} +``` + +## Variables +``` +#include "std/header.ibu" + +func main() i32 { + let a i32 = 10; + printf("%d\n", a); + return 0; +} +``` + +## Types +```go +u0 // void in C with no size +u8 // unsigned 8-bit integer +u16 // unsigned 16-bit integer +u32 // unsigned 32-bit integer +u64 // unsigned 64-bit integer + +i8 // 8-bit integer +i16 // 16-bit integer +i32 // 32-bit integer +i64 // 64-bit integer + +f64 // WIP +``` + +## Arrays +``` +#include "std/header.ibu" + +func main() i32 { + let array [10]i32 = { + 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 + }; + + return array[3] + array[4]; +} +``` + +## Conditional Statements + +### Example 1 +``` +#include "std/header.ibu" + +func main() i32 { + if 34 < 35 { + printf("hi!"); + } +} +``` + +### Example 2 +You can use `13 <= age < 20` instead of `13 <= age && age < 20` +``` +#include "std/header.ibu" + +func main() i32 { + let age i32 = 19; + if 10 <= age < 20 { + printf("Teenager\n"); + } +} +``` + +### Example 3 +``` +#include "std/header.ibu" + +func main() i32 { + let c u8 = 'b'; + if 'a' <= c <= 'z' { + printf("This is a lowercase alphabet\n"); + } +} +``` + +## Loops + +### Example 1 +``` +#include "std/header.ibu" + +func main() i32 { + let i i32 = 0; + while i < 10 { + printf("%d\n", i); + i++; + } +} +``` + +### Example 2 +``` +#include "std/header.ibu" + +func main() i32 { + let i i32 = 0; +label: + if i < 10 { + printf("%d\n", i); + i++; + goto label; + } +} +``` + +## Variable Arguments +Variable arguments can be accessed using the built-in variables `argv` and `argc`. + +``` +#include "std/header.ibu" + +func add_nums(...) i32 { + let n i32 = 0; + let idx i32 = 0; + + while idx < argc { + n = n + argv[idx]; + idx++; + } + + return n; +} + +func main() i32 { + let d i32 = add_nums(1, 2, 3); + printf("%d\n", d); + + return 0; +} +``` + +## Structures +``` +#include "std/header.ibu" + +struct Person { + name *u8, + age i32, +} + +func main() i32 { + let p Person = { + "Taro", + 10 + }; + + printf("Name is %s.\n", p.name); + printf("Age is %d years old.\n", p.age); +} +``` + +## Heap Memory +`alloc()` allocates memory on the heap. + +`typesize()` is a builtin directive that is replaced with the size of the type passed during parsing. +``` +#include "std/header.ibu" + +struct Person { + name *u8, + age i32, +} + +func main() i32 { + let p Person = alloc(typesize(Person)); + p.name = "Taro"; + p.age = 10; + + printf("Name is %s.\n", p.name); + printf("Age is %d years old.\n", p.age); +} +``` + +## Default Arguments (WIP) +Default arguments don't need to be at the end +``` +#include "std/header.ibu" + +func foo(x i32 = 10, y i32) i32 { + return x + y; +} + +func main() i32 { + foo(34, 35); + foo(, 35); +} +``` + +## Inline Assembly (WIP) +``` +#include "std/header.ibu" + +foo: + push rbp + mov rsp, rbp + // omitted... + ret + +func main() i32 { + foo(); +} +``` + diff --git a/docs/docs_jp.md b/docs/docs_jp.md new file mode 100644 index 0000000..1117082 --- /dev/null +++ b/docs/docs_jp.md @@ -0,0 +1,296 @@ + +# ドキュメンテーション + +## はじめに +ibuは静的型コンパイル型言語であり、ただプログラミングを楽しむためだけに開発されました。 + +## 言語をインストール +```zsh +$ git clone git@github.com:v420v/ibu.git +$ cd ibu +$ make up +$ make ibulang +$ make init +``` + +## コンパイラの使用方法 +hello world プログラムを実際にコンパイルし、実行してみる。 +```zsh +$ ./ibuc main.ibu | as - -o main.o +$ as -o lib/runtime.o lib/runtime.s +$ ./ibuc lib/linux-syscall/linux-syscall.ibu | as - -o lib/linux-syscall.o +$ ./ibuc lib/std/std.ibu | as - -o lib/std.o +$ ld -o main main.o lib/runtime.o lib/linux-syscall.o lib/std.o +$ ./main +``` +簡単な解説 +- 1行目 `./ibuc main.ibu | as - -o main.o` + - ./ibucというコンパイラでmain.ibuをアセンブリコードに変換 + - パイプ(|)を使ってアセンブラ(as)に渡し + - -o main.oでオブジェクトファイル(main.o)を生成 + +- 2行目 `as -o lib/runtime.o lib/runtime.s` + - アセンブラ(as)を使って + - runtime.sというアセンブリファイルをコンパイル + - lib/runtime.oというオブジェクトファイルを生成 + +- 3行目 `./ibuc lib/linux-syscall/linux-syscall.ibu | as - -o lib/linux-syscall.o` + - Linux用のシステムコール関連のソースファイル(linux-syscall.ibu)をコンパイル + - アセンブラを通してlib/linux-syscall.oというオブジェクトファイルを生成 + +- 4行目 `./ibuc lib/std/std.ibu | as - -o lib/std.o` + - 標準ライブラリ(std.ibu)をコンパイル + - アセンブラを通してlib/std.oというオブジェクトファイルを生成 + +- 5行目 `ld -o main main.o lib/runtime.o lib/linux-syscall.o lib/std.o` + - リンカ(ld)を使って + - 上記で生成した全てのオブジェクトファイルをリンク + - 実行可能ファイル(main)を生成 + +- 6行目 `./main` + - hello world 実行 + +## Hello World +``` +#include "std/header.ibu" + +func main() i32 { + printf("hello world"); + return 0; +} +``` + +## コメント +```c +// シングルラインコメントのみ存在します +``` + +## ファイルのインクルード +includeキーワードは、まずカレントディレクトリから指定されたファイルを探します。失敗した場合は、ファイルを[lib](../lib)フォルダ内から探します。 +``` +#include "std/header.ibu" +``` + +## 関数 +関数の記述方法は少しGo言語に似ています。 + +型は引数名の後に来ます。 + +戻り値の型は必ず記述しなければいけません。戻り値が無い場合、この後のセクション[型](#型)でも出てきますが`u0`型が使えます。 +``` +#include "std/header.ibu" + +func foo(x i32, y i32) i32 { + return x + y; +} + +func main() i32 { + return foo(34, 35); +} +``` + +## 変数 +``` +#include "std/header.ibu" + +func main() i32 { + let a i32 = 10; + printf("%d\n", a); + return 0; +} +``` + +## 型 +```go +u0 // サイズの無いCのvoid +u8 // 符号なし8ビット整数 +u16 // 符号なし16ビット整数 +u32 // 符号なし32ビット整数 +u64 // 符号なし64ビット整数 + +i8 // 8ビット整数 +i16 // 16ビット整数 +i32 // 32ビット整数 +i64 // 64ビット整数 + +f64 // WIP +``` + +## 配列 +``` +#include "std/header.ibu" + +func main() i32 { + let array [10]i32 = { + 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 + }; + + return array[3] + array[4]; +} +``` + +## 条件分岐 + +### 例1 +``` +#include "std/header.ibu" + +func main() i32 { + if 34 < 35 { + printf("hi!"); + } +} +``` + +### 例2 +`13 <= age && age < 20`の代わりに`13 <= age < 20`が使えます。 +``` +#include "std/header.ibu" + +func main() i32 { + let age i32 = 19; + if 10 <= age < 20 { + printf("10代\n"); + } +} +``` + +### 例3 +``` +#include "std/header.ibu" + +func main() i32 { + let c u8 = 'b'; + if 'a' <= c <= 'z' { + printf("小文字のアルファベットです\n"); + } +} +``` + +## ループ処理 + +### 例1 +``` +#include "std/header.ibu" + +func main() i32 { + let i i32 = 0; + while i < 10 { + printf("%d\n", i); + i++; + } +} +``` + +### 例2 +``` +#include "std/header.ibu" + +func main() i32 { + let i i32 = 0; +label: + if i < 10 { + printf("%d\n", i); + i++; + goto label; + } +} +``` + +## 可変長引数 +可変長引数には、組み込み変数 `argv` `argc`でアクセスできます。 + +``` +#include "std/header.ibu" + +func add_nums(...) i32 { + let n i32 = 0; + let idx i32 = 0; + + while idx < argc { + n = n + argv[idx]; + idx++; + } + + return n; +} + +func main() i32 { + let d i32 = add_nums(1, 2, 3); + printf("%d\n", d); + + return 0; +} +``` + +## 構造体 +``` +#include "std/header.ibu" + +struct Person { + name *u8, + age i32, +} + +func main() i32 { + let p Person = { + "太郎", + 10 + }; + + printf("名前は%sです。\n", p.name); + printf("年齢は%d歳です。\n", p.age); +} +``` + +## ヒープメモリ +`alloc()` を使用し、ヒープメモリをアロケートできます。 + +`typesize()` はbuiltinディレクティブで構文解析時に渡された型のサイズに置き換わります。 +``` +#include "std/header.ibu" + +struct Person { + name *u8, + age i32, +} + +func main() i32 { + let p Person = alloc(typesize(Person)); + p.name = "太郎"; + p.age = 10; + + printf("名前は%sです。\n", p.name); + printf("年齢は%d歳です。\n", p.age); +} +``` + +## デフォルト引数 (WIP) +デフォルトの引数は末尾になくてもよい +``` +#include "std/header.ibu" + +func foo(x i32 = 10, y i32) i32 { + return x + y; +} + +func main() i32 { + foo(34, 35); + foo(, 35); +} +``` + +## インライン アセンブリ (WIP) +``` +#include "std/header.ibu" + +foo: + push rbp + mov rsp, rbp + // 省略... + ret + +func main() i32 { + foo(); +} +``` diff --git a/example/age.ibu b/example/age.ibu new file mode 100644 index 0000000..bbee183 --- /dev/null +++ b/example/age.ibu @@ -0,0 +1,14 @@ + +#include "std/header.ibu" + +func main() i32 { + let age i32 = 19; + + if 13 <= age < 20 { + printf("Teen-ager\n"); + } + + return 0; +} + + diff --git a/example/fizzbuzz.ibu b/example/fizzbuzz.ibu new file mode 100644 index 0000000..1579841 --- /dev/null +++ b/example/fizzbuzz.ibu @@ -0,0 +1,19 @@ + +#include "std/header.ibu" + +func main() i32 { + let c i32 = 1; + while c <= 100 { + if c % 15 == 0 { + printf("FizzBuzz\n"); + } else if c % 3 == 0 { + printf("Fizz\n"); + } else if c % 5 == 0 { + printf("Buzz\n"); + } else { + printf("%d\n", c); + } + c++; + } +} + diff --git a/example/link.ibu b/example/link.ibu new file mode 100644 index 0000000..926c829 --- /dev/null +++ b/example/link.ibu @@ -0,0 +1,40 @@ + +#include "std/header.ibu" + +struct User { + name *u8, + next *User, +} + +func user_print_names(user *User) i32 { + printf("%s\n", user.name); + + if user.next != nil { + user_print_names(user.next); + } + return 0; +} + +func new_user(name *u8) *User { + let user *User = alloc(typesize(User)); + user.name = name; + return user; +} + +func main(argc i32, argv **u8) i32 { + let head User = {}; + let cur *User = &head; + + cur = cur.next = new_user("Ibu"); + cur = cur.next = new_user("Ibuki"); + cur = cur.next = new_user("Foo"); + cur = cur.next = new_user("Bar"); + + user_print_names(head.next); + + printf("%s\n", head.next.next.next.next.name); + + return 0; +} + + diff --git a/lib/linux-syscall/header.ibu b/lib/linux-syscall/header.ibu new file mode 100644 index 0000000..fc43012 --- /dev/null +++ b/lib/linux-syscall/header.ibu @@ -0,0 +1,324 @@ + +#define SYS_READ 0 +#define SYS_WRITE 1 +#define SYS_OPEN 2 +#define SYS_CLOSE 3 +#define SYS_STAT 4 +#define SYS_FSTAT 5 +#define SYS_LSTAT 6 +#define SYS_POLL 7 +#define SYS_LSEEK 8 +#define SYS_MMAP 9 +#define SYS_MPROTECT 10 +#define SYS_MUNMAP 11 +#define SYS_BRK 12 +#define SYS_RT_SIGACTION 13 +#define SYS_RT_SIGPROCMASK 14 +#define SYS_RT_SIGRETURN 15 +#define SYS_IOCTL 16 +#define SYS_PREAD64 17 +#define SYS_PWRITE64 18 +#define SYS_READV 19 +#define SYS_WRITEV 20 +#define SYS_ACCESS 21 +#define SYS_PIPE 22 +#define SYS_SELECT 23 +#define SYS_SCHED_YIELD 24 +#define SYS_MREMAP 25 +#define SYS_MSYNC 26 +#define SYS_MINCORE 27 +#define SYS_MADVISE 28 +#define SYS_SHMGET 29 +#define SYS_SHMAT 30 +#define SYS_SHMCTL 31 +#define SYS_DUP 32 +#define SYS_DUP2 33 +#define SYS_PAUSE 34 +#define SYS_NANOSLEEP 35 +#define SYS_GETITIMER 36 +#define SYS_ALARM 37 +#define SYS_SETITIMER 38 +#define SYS_GETPID 39 +#define SYS_SENDFILE 40 +#define SYS_SOCKET 41 +#define SYS_CONNECT 42 +#define SYS_ACCEPT 43 +#define SYS_SENDTO 44 +#define SYS_RECVFROM 45 +#define SYS_SENDMSG 46 +#define SYS_RECVMSG 47 +#define SYS_SHUTDOWN 48 +#define SYS_BIND 49 +#define SYS_LISTEN 50 +#define SYS_GETSOCKNAME 51 +#define SYS_GETPEERNAME 52 +#define SYS_SOCKETPAIR 53 +#define SYS_SETSOCKOPT 54 +#define SYS_GETSOCKOPT 55 +#define SYS_CLONE 56 +#define SYS_FORK 57 +#define SYS_VFORK 58 +#define SYS_EXECVE 59 +#define SYS_EXIT 60 +#define SYS_WAIT4 61 +#define SYS_KILL 62 +#define SYS_UNAME 63 +#define SYS_SEMGET 64 +#define SYS_SEMOP 65 +#define SYS_SEMCTL 66 +#define SYS_SHMDT 67 +#define SYS_MSGGET 68 +#define SYS_MSGSND 69 +#define SYS_MSGRCV 70 +#define SYS_MSGCTL 71 +#define SYS_FCNTL 72 +#define SYS_FLOCK 73 +#define SYS_FSYNC 74 +#define SYS_FDATASYNC 75 +#define SYS_TRUNCATE 76 +#define SYS_FTRUNCATE 77 +#define SYS_GETDENTS 78 +#define SYS_GETCWD 79 +#define SYS_CHDIR 80 +#define SYS_FCHDIR 81 +#define SYS_RENAME 82 +#define SYS_MKDIR 83 +#define SYS_RMDIR 84 +#define SYS_CREAT 85 +#define SYS_LINK 86 +#define SYS_UNLINK 87 +#define SYS_SYMLINK 88 +#define SYS_READLINK 89 +#define SYS_CHMOD 90 +#define SYS_FCHMOD 91 +#define SYS_CHOWN 92 +#define SYS_FCHOWN 93 +#define SYS_LCHOWN 94 +#define SYS_UMASK 95 +#define SYS_GETTIMEOFDAY 96 +#define SYS_GETRLIMIT 97 +#define SYS_GETRUSAGE 98 +#define SYS_SYSINFO 99 +#define SYS_TIMES 100 +#define SYS_PTRACE 101 +#define SYS_GETUID 102 +#define SYS_SYSLOG 103 +#define SYS_GETGID 104 +#define SYS_SETUID 105 +#define SYS_SETGID 106 +#define SYS_GETEUID 107 +#define SYS_GETEGID 108 +#define SYS_SETPGID 109 +#define SYS_GETPPID 110 +#define SYS_GETPGRP 111 +#define SYS_SETSID 112 +#define SYS_SETREUID 113 +#define SYS_SETREGID 114 +#define SYS_GETGROUPS 115 +#define SYS_SETGROUPS 116 +#define SYS_SETRESUID 117 +#define SYS_GETRESUID 118 +#define SYS_SETRESGID 119 +#define SYS_GETRESGID 120 +#define SYS_GETPGID 121 +#define SYS_SETFSUID 122 +#define SYS_SETFSGID 123 +#define SYS_GETSID 124 +#define SYS_CAPGET 125 +#define SYS_CAPSET 126 +#define SYS_RT_SIGPENDING 127 +#define SYS_RT_SIGTIMEDWAIT 128 +#define SYS_RT_SIGQUEUEINFO 129 +#define SYS_RT_SIGSUSPEND 130 +#define SYS_SIGALTSTACK 131 +#define SYS_UTIME 132 +#define SYS_MKNOD 133 +#define SYS_USELIB 134 +#define SYS_PERSONALITY 135 +#define SYS_USTAT 136 +#define SYS_STATFS 137 +#define SYS_FSTATFS 138 +#define SYS_SYSFS 139 +#define SYS_GETPRIORITY 140 +#define SYS_SETPRIORITY 141 +#define SYS_SCHED_SETPARAM 142 +#define SYS_SCHED_GETPARAM 143 +#define SYS_SCHED_SETSCHEDULER 144 +#define SYS_SCHED_GETSCHEDULER 145 +#define SYS_SCHED_GET_PRIORITY_MAX 146 +#define SYS_SCHED_GET_PRIORITY_MIN 147 +#define SYS_SCHED_RR_GET_INTERVAL 148 +#define SYS_MLOCK 149 +#define SYS_MUNLOCK 150 +#define SYS_MLOCKALL 151 +#define SYS_MUNLOCKALL 152 +#define SYS_VHANGUP 153 +#define SYS_MODIFY_LDT 154 +#define SYS_PIVOT_ROOT 155 +#define SYS__SYSCTL 156 +#define SYS_PRCTL 157 +#define SYS_ARCH_PRCTL 158 +#define SYS_ADJTIMEX 159 +#define SYS_SETRLIMIT 160 +#define SYS_CHROOT 161 +#define SYS_SYNC 162 +#define SYS_ACCT 163 +#define SYS_SETTIMEOFDAY 164 +#define SYS_MOUNT 165 +#define SYS_UMOUNT2 166 +#define SYS_SWAPON 167 +#define SYS_SWAPOFF 168 +#define SYS_REBOOT 169 +#define SYS_SETHOSTNAME 170 +#define SYS_SETDOMAINNAME 171 +#define SYS_IOPL 172 +#define SYS_IOPERM 173 +#define SYS_CREATE_MODULE 174 +#define SYS_INIT_MODULE 175 +#define SYS_DELETE_MODULE 176 +#define SYS_GET_KERNEL_SYMS 177 +#define SYS_QUERY_MODULE 178 +#define SYS_QUOTACTL 179 +#define SYS_NFSSERVCTL 180 +#define SYS_GETPMSG 181 +#define SYS_PUTPMSG 182 +#define SYS_AFS_SYSCALL 183 +#define SYS_TUXCALL 184 +#define SYS_SECURITY 185 +#define SYS_GETTID 186 +#define SYS_READAHEAD 187 +#define SYS_SETXATTR 188 +#define SYS_LSETXATTR 189 +#define SYS_FSETXATTR 190 +#define SYS_GETXATTR 191 +#define SYS_LGETXATTR 192 +#define SYS_FGETXATTR 193 +#define SYS_LISTXATTR 194 +#define SYS_LLISTXATTR 195 +#define SYS_FLISTXATTR 196 +#define SYS_REMOVEXATTR 197 +#define SYS_LREMOVEXATTR 198 +#define SYS_FREMOVEXATTR 199 +#define SYS_TKILL 200 +#define SYS_TIME 201 +#define SYS_FUTEX 202 +#define SYS_SCHED_SETAFFINITY 203 +#define SYS_SCHED_GETAFFINITY 204 +#define SYS_SET_THREAD_AREA 205 +#define SYS_IO_SETUP 206 +#define SYS_IO_DESTROY 207 +#define SYS_IO_GETEVENTS 208 +#define SYS_IO_SUBMIT 209 +#define SYS_IO_CANCEL 210 +#define SYS_GET_THREAD_AREA 211 +#define SYS_LOOKUP_DCOOKIE 212 +#define SYS_EPOLL_CREATE 213 +#define SYS_EPOLL_CTL_OLD 214 +#define SYS_EPOLL_WAIT_OLD 215 +#define SYS_REMAP_FILE_PAGES 216 +#define SYS_GETDENTS64 217 +#define SYS_SET_TID_ADDRESS 218 +#define SYS_RESTART_SYSCALL 219 +#define SYS_SEMTIMEDOP 220 +#define SYS_FADVISE64 221 +#define SYS_TIMER_CREATE 222 +#define SYS_TIMER_SETTIME 223 +#define SYS_TIMER_GETTIME 224 +#define SYS_TIMER_GETOVERRUN 225 +#define SYS_TIMER_DELETE 226 +#define SYS_CLOCK_SETTIME 227 +#define SYS_CLOCK_GETTIME 228 +#define SYS_CLOCK_GETRES 229 +#define SYS_CLOCK_NANOSLEEP 230 +#define SYS_EXIT_GROUP 231 +#define SYS_EPOLL_WAIT 232 +#define SYS_EPOLL_CTL 233 +#define SYS_TGKILL 234 +#define SYS_UTIMES 235 +#define SYS_VSERVER 236 +#define SYS_MBIND 237 +#define SYS_SET_MEMPOLICY 238 +#define SYS_GET_MEMPOLICY 239 +#define SYS_MQ_OPEN 240 +#define SYS_MQ_UNLINK 241 +#define SYS_MQ_TIMEDSEND 242 +#define SYS_MQ_TIMEDRECEIVE 243 +#define SYS_MQ_NOTIFY 244 +#define SYS_MQ_GETSETATTR 245 +#define SYS_KEXEC_LOAD 246 +#define SYS_WAITID 247 +#define SYS_ADD_KEY 248 +#define SYS_REQUEST_KEY 249 +#define SYS_KEYCTL 250 +#define SYS_IOPRIO_SET 251 +#define SYS_IOPRIO_GET 252 +#define SYS_INOTIFY_INIT 253 +#define SYS_INOTIFY_ADD_WATCH 254 +#define SYS_INOTIFY_RM_WATCH 255 +#define SYS_MIGRATE_PAGES 256 +#define SYS_OPENAT 257 +#define SYS_MKDIRAT 258 +#define SYS_MKNODAT 259 +#define SYS_FCHOWNAT 260 +#define SYS_FUTIMESAT 261 +#define SYS_NEWFSTATAT 262 +#define SYS_UNLINKAT 263 +#define SYS_RENAMEAT 264 +#define SYS_LINKAT 265 +#define SYS_SYMLINKAT 266 +#define SYS_READLINKAT 267 +#define SYS_FCHMODAT 268 +#define SYS_FACCESSAT 269 +#define SYS_PSELECT6 270 +#define SYS_PPOLL 271 +#define SYS_UNSHARE 272 +#define SYS_SET_ROBUST_LIST 273 +#define SYS_GET_ROBUST_LIST 274 +#define SYS_SPLICE 275 +#define SYS_TEE 276 +#define SYS_SYNC_FILE_RANGE 277 +#define SYS_VMSPLICE 278 +#define SYS_MOVE_PAGES 279 +#define SYS_UTIMENSAT 280 +#define SYS_EPOLL_PWAIT 281 +#define SYS_SIGNALFD 282 +#define SYS_TIMERFD_CREATE 283 +#define SYS_EVENTFD 284 +#define SYS_FALLOCATE 285 +#define SYS_TIMERFD_SETTIME 286 +#define SYS_TIMERFD_GETTIME 287 +#define SYS_ACCEPT4 288 +#define SYS_SIGNALFD4 289 +#define SYS_EVENTFD2 290 +#define SYS_EPOLL_CREATE1 291 +#define SYS_DUP3 292 +#define SYS_PIPE2 293 +#define SYS_INOTIFY_INIT1 294 +#define SYS_PREADV 295 +#define SYS_PWRITEV 296 +#define SYS_RT_TGSIGQUEUEINFO 297 +#define SYS_PERF_EVENT_OPEN 298 +#define SYS_RECVMMSG 299 +#define SYS_FANOTIFY_INIT 300 +#define SYS_FANOTIFY_MARK 301 +#define SYS_PRLIMIT64 302 +#define SYS_NAME_TO_HANDLE_AT 303 +#define SYS_OPEN_BY_HANDLE_AT 304 +#define SYS_CLOCK_ADJTIME 305 +#define SYS_SYNCFS 306 +#define SYS_SENDMMSG 307 +#define SYS_SETNS 308 +#define SYS_GETCPU 309 +#define SYS_PROCESS_VM_READV 310 +#define SYS_PROCESS_VM_WRITEV 311 +#define SYS_KCMP 312 +#define SYS_FINIT_MODULE 313 + +func syscall(trap u64, a1 u64, a2 u64, a3 u64) i64; +func open(file_name *u8, flags i32, mode i32) i64; +func read(fd i32, buf *u8, size i32) i64; +func close(fd i32) i64; +func write(fn i32, buf *u8, size i32) i64; +func exit(code i32) i64; +func readlink(path *u8, buf *u8, buf_size i64) i64; + diff --git a/lib/linux-syscall/linux-syscall.ibu b/lib/linux-syscall/linux-syscall.ibu new file mode 100644 index 0000000..e526374 --- /dev/null +++ b/lib/linux-syscall/linux-syscall.ibu @@ -0,0 +1,342 @@ + +#define SYS_READ 0 +#define SYS_WRITE 1 +#define SYS_OPEN 2 +#define SYS_CLOSE 3 +#define SYS_STAT 4 +#define SYS_FSTAT 5 +#define SYS_LSTAT 6 +#define SYS_POLL 7 +#define SYS_LSEEK 8 +#define SYS_MMAP 9 +#define SYS_MPROTECT 10 +#define SYS_MUNMAP 11 +#define SYS_BRK 12 +#define SYS_RT_SIGACTION 13 +#define SYS_RT_SIGPROCMASK 14 +#define SYS_RT_SIGRETURN 15 +#define SYS_IOCTL 16 +#define SYS_PREAD64 17 +#define SYS_PWRITE64 18 +#define SYS_READV 19 +#define SYS_WRITEV 20 +#define SYS_ACCESS 21 +#define SYS_PIPE 22 +#define SYS_SELECT 23 +#define SYS_SCHED_YIELD 24 +#define SYS_MREMAP 25 +#define SYS_MSYNC 26 +#define SYS_MINCORE 27 +#define SYS_MADVISE 28 +#define SYS_SHMGET 29 +#define SYS_SHMAT 30 +#define SYS_SHMCTL 31 +#define SYS_DUP 32 +#define SYS_DUP2 33 +#define SYS_PAUSE 34 +#define SYS_NANOSLEEP 35 +#define SYS_GETITIMER 36 +#define SYS_ALARM 37 +#define SYS_SETITIMER 38 +#define SYS_GETPID 39 +#define SYS_SENDFILE 40 +#define SYS_SOCKET 41 +#define SYS_CONNECT 42 +#define SYS_ACCEPT 43 +#define SYS_SENDTO 44 +#define SYS_RECVFROM 45 +#define SYS_SENDMSG 46 +#define SYS_RECVMSG 47 +#define SYS_SHUTDOWN 48 +#define SYS_BIND 49 +#define SYS_LISTEN 50 +#define SYS_GETSOCKNAME 51 +#define SYS_GETPEERNAME 52 +#define SYS_SOCKETPAIR 53 +#define SYS_SETSOCKOPT 54 +#define SYS_GETSOCKOPT 55 +#define SYS_CLONE 56 +#define SYS_FORK 57 +#define SYS_VFORK 58 +#define SYS_EXECVE 59 +#define SYS_EXIT 60 +#define SYS_WAIT4 61 +#define SYS_KILL 62 +#define SYS_UNAME 63 +#define SYS_SEMGET 64 +#define SYS_SEMOP 65 +#define SYS_SEMCTL 66 +#define SYS_SHMDT 67 +#define SYS_MSGGET 68 +#define SYS_MSGSND 69 +#define SYS_MSGRCV 70 +#define SYS_MSGCTL 71 +#define SYS_FCNTL 72 +#define SYS_FLOCK 73 +#define SYS_FSYNC 74 +#define SYS_FDATASYNC 75 +#define SYS_TRUNCATE 76 +#define SYS_FTRUNCATE 77 +#define SYS_GETDENTS 78 +#define SYS_GETCWD 79 +#define SYS_CHDIR 80 +#define SYS_FCHDIR 81 +#define SYS_RENAME 82 +#define SYS_MKDIR 83 +#define SYS_RMDIR 84 +#define SYS_CREAT 85 +#define SYS_LINK 86 +#define SYS_UNLINK 87 +#define SYS_SYMLINK 88 +#define SYS_READLINK 89 +#define SYS_CHMOD 90 +#define SYS_FCHMOD 91 +#define SYS_CHOWN 92 +#define SYS_FCHOWN 93 +#define SYS_LCHOWN 94 +#define SYS_UMASK 95 +#define SYS_GETTIMEOFDAY 96 +#define SYS_GETRLIMIT 97 +#define SYS_GETRUSAGE 98 +#define SYS_SYSINFO 99 +#define SYS_TIMES 100 +#define SYS_PTRACE 101 +#define SYS_GETUID 102 +#define SYS_SYSLOG 103 +#define SYS_GETGID 104 +#define SYS_SETUID 105 +#define SYS_SETGID 106 +#define SYS_GETEUID 107 +#define SYS_GETEGID 108 +#define SYS_SETPGID 109 +#define SYS_GETPPID 110 +#define SYS_GETPGRP 111 +#define SYS_SETSID 112 +#define SYS_SETREUID 113 +#define SYS_SETREGID 114 +#define SYS_GETGROUPS 115 +#define SYS_SETGROUPS 116 +#define SYS_SETRESUID 117 +#define SYS_GETRESUID 118 +#define SYS_SETRESGID 119 +#define SYS_GETRESGID 120 +#define SYS_GETPGID 121 +#define SYS_SETFSUID 122 +#define SYS_SETFSGID 123 +#define SYS_GETSID 124 +#define SYS_CAPGET 125 +#define SYS_CAPSET 126 +#define SYS_RT_SIGPENDING 127 +#define SYS_RT_SIGTIMEDWAIT 128 +#define SYS_RT_SIGQUEUEINFO 129 +#define SYS_RT_SIGSUSPEND 130 +#define SYS_SIGALTSTACK 131 +#define SYS_UTIME 132 +#define SYS_MKNOD 133 +#define SYS_USELIB 134 +#define SYS_PERSONALITY 135 +#define SYS_USTAT 136 +#define SYS_STATFS 137 +#define SYS_FSTATFS 138 +#define SYS_SYSFS 139 +#define SYS_GETPRIORITY 140 +#define SYS_SETPRIORITY 141 +#define SYS_SCHED_SETPARAM 142 +#define SYS_SCHED_GETPARAM 143 +#define SYS_SCHED_SETSCHEDULER 144 +#define SYS_SCHED_GETSCHEDULER 145 +#define SYS_SCHED_GET_PRIORITY_MAX 146 +#define SYS_SCHED_GET_PRIORITY_MIN 147 +#define SYS_SCHED_RR_GET_INTERVAL 148 +#define SYS_MLOCK 149 +#define SYS_MUNLOCK 150 +#define SYS_MLOCKALL 151 +#define SYS_MUNLOCKALL 152 +#define SYS_VHANGUP 153 +#define SYS_MODIFY_LDT 154 +#define SYS_PIVOT_ROOT 155 +#define SYS__SYSCTL 156 +#define SYS_PRCTL 157 +#define SYS_ARCH_PRCTL 158 +#define SYS_ADJTIMEX 159 +#define SYS_SETRLIMIT 160 +#define SYS_CHROOT 161 +#define SYS_SYNC 162 +#define SYS_ACCT 163 +#define SYS_SETTIMEOFDAY 164 +#define SYS_MOUNT 165 +#define SYS_UMOUNT2 166 +#define SYS_SWAPON 167 +#define SYS_SWAPOFF 168 +#define SYS_REBOOT 169 +#define SYS_SETHOSTNAME 170 +#define SYS_SETDOMAINNAME 171 +#define SYS_IOPL 172 +#define SYS_IOPERM 173 +#define SYS_CREATE_MODULE 174 +#define SYS_INIT_MODULE 175 +#define SYS_DELETE_MODULE 176 +#define SYS_GET_KERNEL_SYMS 177 +#define SYS_QUERY_MODULE 178 +#define SYS_QUOTACTL 179 +#define SYS_NFSSERVCTL 180 +#define SYS_GETPMSG 181 +#define SYS_PUTPMSG 182 +#define SYS_AFS_SYSCALL 183 +#define SYS_TUXCALL 184 +#define SYS_SECURITY 185 +#define SYS_GETTID 186 +#define SYS_READAHEAD 187 +#define SYS_SETXATTR 188 +#define SYS_LSETXATTR 189 +#define SYS_FSETXATTR 190 +#define SYS_GETXATTR 191 +#define SYS_LGETXATTR 192 +#define SYS_FGETXATTR 193 +#define SYS_LISTXATTR 194 +#define SYS_LLISTXATTR 195 +#define SYS_FLISTXATTR 196 +#define SYS_REMOVEXATTR 197 +#define SYS_LREMOVEXATTR 198 +#define SYS_FREMOVEXATTR 199 +#define SYS_TKILL 200 +#define SYS_TIME 201 +#define SYS_FUTEX 202 +#define SYS_SCHED_SETAFFINITY 203 +#define SYS_SCHED_GETAFFINITY 204 +#define SYS_SET_THREAD_AREA 205 +#define SYS_IO_SETUP 206 +#define SYS_IO_DESTROY 207 +#define SYS_IO_GETEVENTS 208 +#define SYS_IO_SUBMIT 209 +#define SYS_IO_CANCEL 210 +#define SYS_GET_THREAD_AREA 211 +#define SYS_LOOKUP_DCOOKIE 212 +#define SYS_EPOLL_CREATE 213 +#define SYS_EPOLL_CTL_OLD 214 +#define SYS_EPOLL_WAIT_OLD 215 +#define SYS_REMAP_FILE_PAGES 216 +#define SYS_GETDENTS64 217 +#define SYS_SET_TID_ADDRESS 218 +#define SYS_RESTART_SYSCALL 219 +#define SYS_SEMTIMEDOP 220 +#define SYS_FADVISE64 221 +#define SYS_TIMER_CREATE 222 +#define SYS_TIMER_SETTIME 223 +#define SYS_TIMER_GETTIME 224 +#define SYS_TIMER_GETOVERRUN 225 +#define SYS_TIMER_DELETE 226 +#define SYS_CLOCK_SETTIME 227 +#define SYS_CLOCK_GETTIME 228 +#define SYS_CLOCK_GETRES 229 +#define SYS_CLOCK_NANOSLEEP 230 +#define SYS_EXIT_GROUP 231 +#define SYS_EPOLL_WAIT 232 +#define SYS_EPOLL_CTL 233 +#define SYS_TGKILL 234 +#define SYS_UTIMES 235 +#define SYS_VSERVER 236 +#define SYS_MBIND 237 +#define SYS_SET_MEMPOLICY 238 +#define SYS_GET_MEMPOLICY 239 +#define SYS_MQ_OPEN 240 +#define SYS_MQ_UNLINK 241 +#define SYS_MQ_TIMEDSEND 242 +#define SYS_MQ_TIMEDRECEIVE 243 +#define SYS_MQ_NOTIFY 244 +#define SYS_MQ_GETSETATTR 245 +#define SYS_KEXEC_LOAD 246 +#define SYS_WAITID 247 +#define SYS_ADD_KEY 248 +#define SYS_REQUEST_KEY 249 +#define SYS_KEYCTL 250 +#define SYS_IOPRIO_SET 251 +#define SYS_IOPRIO_GET 252 +#define SYS_INOTIFY_INIT 253 +#define SYS_INOTIFY_ADD_WATCH 254 +#define SYS_INOTIFY_RM_WATCH 255 +#define SYS_MIGRATE_PAGES 256 +#define SYS_OPENAT 257 +#define SYS_MKDIRAT 258 +#define SYS_MKNODAT 259 +#define SYS_FCHOWNAT 260 +#define SYS_FUTIMESAT 261 +#define SYS_NEWFSTATAT 262 +#define SYS_UNLINKAT 263 +#define SYS_RENAMEAT 264 +#define SYS_LINKAT 265 +#define SYS_SYMLINKAT 266 +#define SYS_READLINKAT 267 +#define SYS_FCHMODAT 268 +#define SYS_FACCESSAT 269 +#define SYS_PSELECT6 270 +#define SYS_PPOLL 271 +#define SYS_UNSHARE 272 +#define SYS_SET_ROBUST_LIST 273 +#define SYS_GET_ROBUST_LIST 274 +#define SYS_SPLICE 275 +#define SYS_TEE 276 +#define SYS_SYNC_FILE_RANGE 277 +#define SYS_VMSPLICE 278 +#define SYS_MOVE_PAGES 279 +#define SYS_UTIMENSAT 280 +#define SYS_EPOLL_PWAIT 281 +#define SYS_SIGNALFD 282 +#define SYS_TIMERFD_CREATE 283 +#define SYS_EVENTFD 284 +#define SYS_FALLOCATE 285 +#define SYS_TIMERFD_SETTIME 286 +#define SYS_TIMERFD_GETTIME 287 +#define SYS_ACCEPT4 288 +#define SYS_SIGNALFD4 289 +#define SYS_EVENTFD2 290 +#define SYS_EPOLL_CREATE1 291 +#define SYS_DUP3 292 +#define SYS_PIPE2 293 +#define SYS_INOTIFY_INIT1 294 +#define SYS_PREADV 295 +#define SYS_PWRITEV 296 +#define SYS_RT_TGSIGQUEUEINFO 297 +#define SYS_PERF_EVENT_OPEN 298 +#define SYS_RECVMMSG 299 +#define SYS_FANOTIFY_INIT 300 +#define SYS_FANOTIFY_MARK 301 +#define SYS_PRLIMIT64 302 +#define SYS_NAME_TO_HANDLE_AT 303 +#define SYS_OPEN_BY_HANDLE_AT 304 +#define SYS_CLOCK_ADJTIME 305 +#define SYS_SYNCFS 306 +#define SYS_SENDMMSG 307 +#define SYS_SETNS 308 +#define SYS_GETCPU 309 +#define SYS_PROCESS_VM_READV 310 +#define SYS_PROCESS_VM_WRITEV 311 +#define SYS_KCMP 312 +#define SYS_FINIT_MODULE 313 + +func syscall(trap u64, a1 u64, a2 u64, a3 u64) i64; // src/builtin.s + +func open(file_name *u8, flags i32, mode i32) i64 { + return syscall(SYS_OPEN, file_name, flags, mode); +} + +func read(fd i32, buf *u8, size i32) i64 { + return syscall(SYS_READ, fd, buf, size); +} + +func close(fd i32) i64 { + return syscall(SYS_CLOSE, fd, 0, 0); +} + +func write(fn i32, buf *u8, size i32) i64 { + return syscall(SYS_WRITE, fn, buf, size); +} + +func exit(code i32) i64 { + return syscall(SYS_EXIT, code, 0, 0); +} + +func readlink(path *u8, buf *u8, buf_size i64) i64 { + return syscall(SYS_READLINK, path, buf, buf_size); +} + diff --git a/lib/runtime.s b/lib/runtime.s new file mode 100644 index 0000000..ba3a442 --- /dev/null +++ b/lib/runtime.s @@ -0,0 +1,58 @@ +.set HEAP_CAPACITY, 436870912 # 0.5GB + +# Allocator +.bss +heap: + .zero HEAP_CAPACITY +heap_size: + .zero 8 + +.text + +# func syscall(trap *i8, a1 *i8, a2 *i8, a3 *i8) i64; +# a3 16+24(rbp) +# a2 16+16(rbp) +# a1 16+8(rbp) +# trap 16(rbp) +.global syscall +syscall: + push %rbp + movq %rsp, %rbp + movq 16(%rbp), %rax + movq 16+8(%rbp), %rdi + movq 16+16(%rbp), %rsi + movq 16+24(%rbp), %rdx + syscall + leave + ret + +# func alloc(size i32) *u8; +# size 16(rbp) +.global alloc +alloc: + pushq %rbp + movq %rsp, %rbp + movq 16(%rbp), %rax + movq %rax, -24(%rbp) + movq heap_size(%rip), %rdx + movq -24(%rbp), %rax + addq %rdx, %rax + cmpq $HEAP_CAPACITY-1, %rax + jbe .L.alloc.2 + movl $0, %eax + jmp .L.alloc_ret_null +.L.alloc.2: + movq heap_size(%rip), %rax + leaq heap(%rip), %rdx + addq %rdx, %rax + movq %rax, -8(%rbp) + movq heap_size(%rip), %rdx + movq -24(%rbp), %rax + addq %rdx, %rax + movq %rax, heap_size(%rip) + movq -8(%rbp), %rax +.L.alloc_ret_null: + popq %rbp + ret + + diff --git a/lib/std/header.ibu b/lib/std/header.ibu new file mode 100644 index 0000000..1f370ee --- /dev/null +++ b/lib/std/header.ibu @@ -0,0 +1,42 @@ + + +#define STDIN 0 +#define STDIO 1 +#define STDERR 2 +#define PROGRAM_MAX_SIZE 150000 + +struct Vec { + ptr **u8, + len i32, + cap i32, +} + +func strcmp(a *u8, b *u8) bool; +func new_vec(cap i32) *Vec; +func vec_realloc(vec *Vec) u0; +func vec_get(vec *Vec, idx i32) *u8; +func vec_append(vec *Vec, val *u8) u0; +func alloc(size i32) *u8; +func strlen(str *u8) i32; +func fputs(fd i32, str *u8) i32; +func align_to(n i32, align i32) i32; +func memmove(dest *u8, src *u8, n u32) u0; +func byte_to_lower(c u8) u8; +func byte_to_upper(c u8) u8; +func strrchr(str *u8, ch i32) *u8; +func memcpy(dest *u8, source *u8, size i32) *u8; +func isalpha(c u8) bool; +func isdigit(c u8) bool; +func atoi(str *i8) i32; +func reverse_str(str *u8, length i32) i32; +func itoa(num i32, str *u8, base i32) i32; +func fputunum(fd i32, n u64, r u32, u bool) i32; +func fputchar(fd i32, c u8) i32; +func vfprintf(fd i32, fmt *u8, args *i64) i32; +func vsprintf(buf *u8, fmt *u8, argv *i64) i32; +func fprintf(fd i32, fmt *u8, ...) i32; +func printf(fmt *u8, ...) i32; +func eprintf(fmt *u8, ...) i32; +func sprintf(buf *u8, fmt *u8, ...) i32; +func strndup(str *u8, n i32) *u8; + diff --git a/lib/std/std.ibu b/lib/std/std.ibu new file mode 100644 index 0000000..6a135a6 --- /dev/null +++ b/lib/std/std.ibu @@ -0,0 +1,351 @@ + +#include "linux-syscall/header.ibu" +#include "std/header.ibu" + +func strcmp(a *u8, b *u8) bool { + let idx i32 = 0; + while { + if a[idx] != b[idx] { + return false; + } + if a[idx] == '\0' { + return true; + } + idx++; + } + return false; +} + +func new_vec(cap i32) *Vec { + let vec *Vec = alloc(typesize(Vec)); + vec.ptr = alloc(typesize(*u8) * cap); + if vec.ptr == nil { + eprintf("allocation failed\n"); + exit(1); + } + vec.len = 0; + vec.cap = cap; + return vec; +} + +func vec_realloc(vec *Vec) u0 { + let new_ptr *u8 = alloc(typesize(*u8) * vec.cap * 2); + if new_ptr == nil { + eprintf("allocation failed\n"); + exit(1); + } + memcpy(new_ptr, vec.ptr, (typesize(*u8) * vec.cap)); + vec.cap = vec.cap * 2; + vec.ptr = new_ptr; +} + +func vec_get(vec *Vec, idx i32) *u8 { + return vec.ptr[idx]; +} + +func vec_append(vec *Vec, val *u8) u0 { + if vec.len >= vec.cap { + vec_realloc(vec); + } + vec.ptr[vec.len] = val; + vec.len++; +} + +func strlen(str *u8) i32 { + let start *u8 = str; + while *str != '\0' { + str++; + } + return str - start; +} + +func fputs(fd i32, str *u8) i32 { + let p *u8 = str; + let endp *u8 = p + strlen(str); + let num_bytes i32 = 0; + + while p < endp { + num_bytes = write(fd, p, endp - p); + if num_bytes < 0 { + eprintf("write syscall failed at fputs\n"); + exit(1); + } + p = p + num_bytes; + } + + return num_bytes; +} + +func align_to(n i32, align i32) i32 { + return (n + align - 1) / align * align; +} + +func memmove(dest *u8, src *u8, n u32) u0 { + let p_dest *u8 = dest; + let p_src *u8 = src; + + let tmp *u8 = alloc(typesize(u8) * n); // TODO: free(tmp); + + if tmp == nil { + return nil; + } else { + let i u32 = 0; + while i < n { + *(tmp + i) = *(p_src + i); + i++; + } + + i = 0; + while i < n { + *(p_dest + i) = *(tmp + i); + i++; + } + } +} + +func byte_to_lower(c u8) u8 { + if 'A' <= c <= 'Z' { + return c + 32; + } + return c; +} + +func byte_to_upper(c u8) u8 { + if 'A' <= c <= 'Z' { + return c - 32; + } + return c; +} + +func strrchr(str *u8, ch i32) *u8 { + let last_occurrence *u8 = nil; + + while *str != '\0' { + if *str == ch { + last_occurrence = str; + } + str++; + } + + return last_occurrence; +} + +func memcpy(dest *u8, source *u8, size i32) *u8 { + let i i32 = 0; + while i < size { + dest[i] = source[i]; + i++; + } + return dest; +} + +func isalpha(c u8) bool { + if 'A' <= c <= 'Z' || 'a' <= c <= 'z' { + return true; + } + return false; +} + +func isdigit(c u8) bool { + if '0' <= c <= '9' { // 0 .. 9 + return true; + } + return false; +} + +func atoi(str *i8) i32 { + let i i32 = 0; + let n i32 = 0; + let is_neg bool = 0; + + if str[i] == '-' { + is_neg = true; + i++; + } + + while str[i] != '\0' { + n = n * 10 + str[i++] - '0'; + } + + if is_neg { + n = 0 - n; + } + + return n; +} + +func reverse_str(str *u8, length i32) i32 { + let start i32 = 0; + let end i32 = length - 1; + + while start < end { + let temp u8 = str[start]; + str[start] = str[end]; + str[end] = temp; + end--; + start++; + } +} + +func itoa(num i32, str *u8, base i32) i32 { + let i i32 = 0; + + if num == 0 { + str[i++] = '0'; + str[i] = 0; + return str; + } + + let is_neg bool = false; + + if num < 0 { + is_neg = true; + num = 0 - num; + } + + while num != 0 { + let rem i32 = num % base; + if rem > 9 { + str[i++] = (rem - 10) + 'a'; + } else { + str[i++] = rem + '0'; + } + num = num / base; + } + + if is_neg { + str[i++] = '-'; + } + + reverse_str(str, i); + + str[i] = 0; + + return i; +} + +func fputunum(fd i32, n u64, r u32, u bool) i32 { + let l i32 = 0; + if n >= r { + l = l + fputunum(fd, n / r, r, u); + } + if u { + l = l + write(fd, &("0123456789ABCDEF"[n % r]), 1); + } else { + l = l + write(fd, &("0123456789abcdef"[n % r]), 1); + } + return l; +} + +func fputchar(fd i32, c u8) i32 { + let l i32 = write(fd, &c, 1); + if l < 0 { + eprintf("write syscall failed at fputchar\n"); + exit(1); + } + return l; +} + +func vfprintf(fd i32, fmt *u8, args *i64) i32 { + let i i32 = 0; + let l i32 = 0; + + while *fmt != 0 { + if *fmt == '%' { + fmt++; + if *fmt == 's' { + l = l + fputs(fd, args[i++]); + } else if *fmt == 'p' { + let p *u0 = args[i++]; + if !p { + l = l + fputs(fd, "(nil)"); + } else { + l = l + fputs(fd, "0x"); + l = l + fputunum(fd, p, 16, false); + } + } else if *fmt == 'b' { + l = l + fputunum(fd, args[i++], 2, false); + } else if *fmt == 'c' { + l = l + fputchar(fd, args[i++]); + } else if *fmt == 'x' { + l = l + fputunum(fd, args[i++], 16, false); + } else if *fmt == 'X' { + l = l + fputunum(fd, args[i++], 16, true); + } else if *fmt == 'u' { + l = l + fputunum(fd, args[i++], 10, false); + } else if *fmt == 'd' { + let d i32 = args[i++]; + if d < 0 { + l = l + fputs(fd, "-"); + d = 0-d; + } + l = l + fputunum(fd, d, 10, false); + } else { + l = l + write(fd, fmt, 1); + } + } else { + l = l + write(fd, fmt, 1); + } + fmt++; + } + + return l; +} + +func vsprintf(buf *u8, fmt *u8, argv *i64) i32 { + let buf_start *u8 = buf; + + let i i32 = 0; + + while *fmt != 0 { + if *fmt == '%' { + fmt++; + if *fmt == 's' { // %s + let str *u8 = argv[i++]; + memcpy(buf, str, strlen(str)); + buf = buf + strlen(str); + } else if *fmt == 'd' { // %d + buf = buf + itoa(argv[i++], buf, 10); + } else { + *buf = '%'; + buf++; + } + } else { + *buf = *fmt; + buf++; + } + fmt++; + } + + let len i32 = buf - buf_start; + buf[len] = '\0'; + + return len; +} + +func fprintf(fd i32, fmt *u8, ...) i32 { + return vfprintf(fd, fmt, argv); +} + +func printf(fmt *u8, ...) i32 { + return vfprintf(STDIO, fmt, argv); +} + +func eprintf(fmt *u8, ...) i32 { + return vfprintf(STDERR, fmt, argv); +} + +func sprintf(buf *u8, fmt *u8, ...) i32 { + return vsprintf(buf, fmt, argv); +} + +func strndup(str *u8, n i32) *u8 { + let r *u8 = alloc(n+1); + if r == nil { + eprintf("memory allocation failed\n"); + exit(1); + } + memcpy(r, str, n); + r[n] = '\0'; + return r; +} diff --git a/main.ibu b/main.ibu new file mode 100644 index 0000000..67fbb06 --- /dev/null +++ b/main.ibu @@ -0,0 +1,7 @@ + +#include "std/header.ibu" + +func main() i32 { + printf("Hello, world!\n"); + return 0; +} diff --git a/src/codegen/codegen.ibu b/src/codegen/codegen.ibu new file mode 100644 index 0000000..bdc7a0d --- /dev/null +++ b/src/codegen/codegen.ibu @@ -0,0 +1,593 @@ + +#include "header.ibu" +#include "std/header.ibu" +#include "linux-syscall/header.ibu" + +func gen_expr(g *Gen, node *Node) i32; +func gen_stmt(g *Gen, node *Node) i32; + +func new_gen() *Gen { + let g *Gen = alloc(typesize(Gen)); + if g == nil { + eprintf("memory allocation failed\n"); + exit(1); + } + g.label_count = 0; + g.str_label_count = 0; + return g; +} + +func gen_lhs_rhs(g *Gen, lhs *Node, rhs *Node) i32 { + gen_expr(g, rhs); + printf("\tpush %%rax\n"); + gen_expr(g, lhs); + printf("\tpop %%rdi\n"); +} + +func gen_addr(g *Gen, node *Node) i32 { + if node.kind == ND_MEMBER_ACCESS { + gen_addr(g, node.lhs); + printf("\taddq $%d, %%rax\n", node.offset); + } else if node.kind == ND_VAR { + if node.obj.is_global { + printf("\tleaq %s(%%rip), %%rax\n", node.obj.name); + } else { + printf("\tleaq %d(%%rbp), %%rax\n", node.obj.offset); + } + } else if node.kind == ND_DEREF { + gen_expr(g, node.lhs); + } else { + // TODO: print error + } + return 0; +} + +func gen_store(ty *Type) i32 { + if ty.kind == TY_STRUCT { + let idx i32 = 0; + while idx < ty.size { + printf("\tmovb %d(%%rax), %%r8b\n", idx); + printf("\tmovb %%r8b, %d(%%rdi)\n", idx); + idx++; + } + return 0; + } + if ty.size == 1 { + printf("\tmovb %%al, (%%rdi)\n"); + } else if ty.size == 2 { + printf("\tmovw %%ax, (%%rdi)\n"); + } else if ty.size == 4 { + printf("\tmovl %%eax, (%%rdi)\n"); + } else { + printf("\tmovq %%rax, (%%rdi)\n"); + } + return 0; +} + +func gen_load(g *Gen, ty *Type) i32 { + if ty.kind == TY_STRUCT || ty.kind == TY_ARRAY || ty.kind == TY_FUNC { + return 0; + } + + if ty.size == 8 { + printf("\tmovq (%%rax), %%rax\n"); + } else if ty.size == 4 { + printf("\tmovslq (%%rax), %%rax\n"); + } else if ty.size == 2 { + if ty.is_unsigned { + printf("\tmovzwl (%%rax), %%eax\n"); + } else { + printf("\tmovswl (%%rax), %%eax\n"); + } + } else if ty.size == 1 { + if ty.is_unsigned { + printf("\tmovzbl (%%rax), %%eax\n"); + } else { + printf("\tmovsbl (%%rax), %%eax\n"); + } + } else { + eprintf("unreachable\n"); + exit(1); + } + return 0; +} + +func gen_condition_store(ty *Type) i32 { + if ty.size == 8 || ty.kind == TY_PTR || ty.kind == TY_ARRAY { + printf("\tmovzbq %%al, %%rax\n"); + } else { + printf("\tmovzbl %%al, %%eax\n"); + } +} + +func func_call_args_to_stack(g *Gen, args *Vec, ty *Type) i32 { + if args.len == 0 { + return 0; + } + + let stack i32 = 0; + + let idx i32 = args.len - 1; + while 0 <= idx { + let arg *Node = vec_get(args, idx); + gen_expr(g, arg); + printf("\tpush %%rax\n"); + stack = stack + 8; + + if ty.is_variadic && idx-1 == (ty.params.len - 2 - 1) { + let argc i32 = 0; + if args.len > (ty.params.len - 2) { + argc = args.len - (ty.params.len - 2); + } + printf("\tleaq (%%rsp), %%rax\n"); + printf("\tpush %%rax\n"); + printf("\tpush $%d\n", argc); + stack = stack + 16; + } + + idx--; + } + + return stack; +} + +func gen_expr(g *Gen, node *Node) i32 { + let c i32 = 0; + if node.kind == ND_EMPTY { + return 0; + } + if node.kind == ND_MEMBER_ACCESS { + gen_addr(g, node); + gen_load(g, node.ty); + return 0; + } + if node.kind == ND_STR { + c = g.str_label_count++; + printf(".data\n"); + printf(".L.str.%d:\n", c); + + let str *u8 = node.str_val; + while *str != nil { + printf("\t.byte %d\n", *str); + str++; + } + printf("\t.byte 0\n"); + + printf(".text\n"); + printf("\tleaq .L.str.%d(%%rip), %%rax\n", c); + return 0; + } + if node.kind == ND_NUM { + printf("\tmovq $%d, %%rax\n", node.int_val); + return 0; + } + if node.kind == ND_ASSIGN { + gen_addr(g, node.lhs); + printf("\tpush %%rax\n"); + gen_expr(g, node.rhs); + printf("\tpop %%rdi\n"); + gen_store(node.ty); + return 0; + } + if node.kind == ND_VAR { + gen_addr(g, node); + gen_load(g, node.ty); + return 0; + } + if node.kind == ND_FUNC_CALL { + let stack i32 = 0; + stack = func_call_args_to_stack(g, node.args, node.lhs.ty); + + gen_expr(g, node.lhs); + printf("\tmovq %%rax, %%r10\n"); + printf("\tmovq $0, %%rax\n"); + + printf("\tcallq *%%r10\n"); + printf("\taddq $%d, %%rsp\n", stack); + + if node.ty.kind == TY_BOOL { + printf("\tmovzx %%al, %%eax\n"); + } else if node.ty.kind == TY_I8 { + printf("\tmovsbl %%al, %%eax\n"); + } else if node.ty.kind == TY_U8 { + printf("\tmovzbl %%al, %%eax\n"); + } else if node.ty.kind == TY_I16 { + printf("\tmovswl %%ax, %%eax\n"); + } else if node.ty.kind == TY_U16 { + printf("\tmovzwl %%ax, %%eax\n"); + } else {} + + return 0; + } + if node.kind == ND_EXPR_STMT { + gen_expr(g, node.lhs); + return 0; + } + if node.kind == ND_REF { + gen_addr(g, node.lhs); + return 0; + } + if node.kind == ND_DEREF { + gen_expr(g, node.lhs); + gen_load(g, node.ty); + return 0; + } + if node.kind == ND_NOT { + gen_expr(g, node.lhs); + printf("\tcmpq $0, %%rax\n"); + printf("\tsete %%al\n"); + printf("\tmovzbq %%al, %%rax\n"); + return 0; + } + if node.kind == ND_ADD { + gen_lhs_rhs(g, node.lhs, node.rhs); + if node.ty.kind == TY_PTR || node.ty.kind == TY_ARRAY { + printf("\taddq %%rdi, %%rax\n"); + } else { + printf("\taddl %%edi, %%eax\n"); + } + return 0; + } + if node.kind == ND_SHL { + gen_lhs_rhs(g, node.lhs, node.rhs); + printf("\tmovq %%rdi, %%rcx\n"); + if node.ty.kind == TY_ARRAY || node.ty.kind == TY_PTR || node.ty.size == 8 { + printf("\tshl %%cl, %%rax\n"); + } else { + printf("\tshl %%cl, %%eax\n"); + } + return 0; + } + if node.kind == ND_SHR { + gen_lhs_rhs(g, node.lhs, node.rhs); + printf("\tmovq %%rdi, %%rcx\n"); + if node.ty.kind == TY_ARRAY || node.ty.kind == TY_PTR || node.ty.size == 8 { + printf("\tshr %%cl, %%rax\n"); + } else { + printf("\tshr %%cl, %%eax\n"); + } + return 0; + } + if node.kind == ND_SUB { + gen_lhs_rhs(g, node.lhs, node.rhs); + if node.ty.kind == TY_PTR || node.ty.kind == TY_ARRAY { + printf("\tsubq %%rdi, %%rax\n"); + } else { + printf("\tsubl %%edi, %%eax\n"); + } + return 0; + } + if node.kind == ND_AND { + gen_lhs_rhs(g, node.lhs, node.rhs); + if node.ty.kind == TY_PTR || node.ty.kind == TY_ARRAY { + printf("\tandq %%rdi, %%rax\n"); + } else { + printf("\tandl %%edi, %%eax\n"); + } + return 0; + } + if node.kind == ND_OR { + gen_lhs_rhs(g, node.lhs, node.rhs); + if node.ty.kind == TY_PTR || node.ty.kind == TY_ARRAY { + printf("\torq %%rdi, %%rax\n"); + } else { + printf("\torl %%edi, %%eax\n"); + } + return 0; + } + if node.kind == ND_MUL { + gen_lhs_rhs(g, node.lhs, node.rhs); + if node.ty.kind == TY_PTR || node.ty.kind == TY_ARRAY { + printf("\timulq %%rdi, %%rax\n"); + } else { + printf("\timull %%edi, %%eax\n"); + } + return 0; + } + if node.kind == ND_DIV || node.kind == ND_MOD { + gen_lhs_rhs(g, node.lhs, node.rhs); + + if node.ty.is_unsigned { + if node.ty.size == 8 { + printf("\tmov $0, %%rdx\n"); + printf("\tdivq %%rdi\n"); + } else { + printf("\tmov $0, %%edx\n"); + printf("\tdivl %%edi\n"); + } + } else { + if node.lhs.ty.size == 8 { + printf("\tcqto\n"); + } else { + printf("\tcltd\n"); + } + if node.ty.size == 8 { + printf("\tidivq %%rdi\n"); + } else { + printf("\tidivl %%edi\n"); + } + } + if node.kind == ND_MOD { + printf("\tmovq %%rdx, %%rax\n"); + } + return 0; + } + if node.kind == ND_EQ { + gen_lhs_rhs(g, node.lhs, node.rhs); + if node.ty.kind == TY_PTR || node.ty.kind == TY_ARRAY { + printf("\tcmpq %%rdi, %%rax\n"); + } else { + printf("\tcmpl %%edi, %%eax\n"); + } + printf("\tsete %%al\n"); + gen_condition_store(node.ty); + return 0; + } + if node.kind == ND_NE { + gen_lhs_rhs(g, node.lhs, node.rhs); + if node.ty.kind == TY_PTR || node.ty.kind == TY_ARRAY { + printf("\tcmpq %%rdi, %%rax\n"); + } else { + printf("\tcmpl %%edi, %%eax\n"); + } + printf("\tsetne %%al\n"); + gen_condition_store(node.ty); + return 0; + } + if node.kind == ND_LOGAND { + c = g.label_count++; + gen_expr(g, node.lhs); + printf("\tcmpq $0, %%rax\n"); + printf("\tje .L.false.%d\n", c); + gen_expr(g, node.rhs); + printf("\tcmpq $0, %%rax\n"); + printf("\tje .L.false.%d\n", c); + printf("\tmovq $1, %%rax\n"); + printf("\tjmp .L.end.%d\n", c); + printf(".L.false.%d:\n", c); + printf("\tmovq $0, %%rax\n"); + printf(".L.end.%d:\n", c); + return 0; + } + if node.kind == ND_LOGOR { + c = g.label_count++; + gen_expr(g, node.lhs); + printf("\tcmpq $0, %%rax\n"); + printf("\tjne .L.true.%d\n", c); + gen_expr(g, node.rhs); + printf("\tcmp $0, %%rax\n"); + printf("\tjne .L.true.%d\n", c); + printf("\tmov $0, %%rax\n"); + printf("\tjmp .L.end.%d\n", c); + printf(".L.true.%d:\n", c); + printf("\tmov $1, %%rax\n"); + printf(".L.end.%d:\n", c); + return 0; + } + if node.kind == ND_GE { + gen_lhs_rhs(g, node.lhs, node.rhs); + if node.ty.kind == TY_PTR || node.ty.kind == TY_ARRAY { + printf("\tcmpq %%rdi, %%rax\n"); + } else { + printf("\tcmpl %%edi, %%eax\n"); + } + if node.lhs.ty.is_unsigned { + printf("\tsetae %%al\n"); + } else { + printf("\tsetge %%al\n"); + } + gen_condition_store(node.ty); + return 0; + } + if node.kind == ND_GT { + gen_lhs_rhs(g, node.lhs, node.rhs); + if node.ty.kind == TY_PTR || node.ty.kind == TY_ARRAY { + printf("\tcmpq %%rdi, %%rax\n"); + } else { + printf("\tcmpl %%edi, %%eax\n"); + } + if node.lhs.ty.is_unsigned { + printf("\tseta %%al\n"); + } else { + printf("\tsetg %%al\n"); + } + gen_condition_store(node.ty); + return 0; + } + if node.kind == ND_LE { + gen_lhs_rhs(g, node.lhs, node.rhs); + if node.ty.kind == TY_PTR || node.ty.kind == TY_ARRAY { + printf("\tcmpq %%rdi, %%rax\n"); + } else { + printf("\tcmpl %%edi, %%eax\n"); + } + if node.lhs.ty.is_unsigned { + printf("\tsetbe %%al\n"); + } else { + printf("\tsetle %%al\n"); + } + gen_condition_store(node.ty); + return 0; + } + if node.kind == ND_LT { + gen_lhs_rhs(g, node.lhs, node.rhs); + if node.ty.kind == TY_PTR || node.ty.kind == TY_ARRAY { + printf("\tcmpq %%rdi, %%rax\n"); + } else { + printf("\tcmpl %%edi, %%eax\n"); + } + if node.lhs.ty.is_unsigned { + printf("\tsetb %%al\n"); + } else { + printf("\tsetl %%al\n"); + } + gen_condition_store(node.ty); + return 0; + } + printf("gen_expr unreachable\n"); + exit(1); +} + +func gen_node_block(g *Gen, stmts *Vec) i32 { + let idx i32 = 0; + while idx < stmts.len { + let stmt *Node = vec_get(stmts, idx); + gen_stmt(g, stmt); + idx++; + } + return 0; +} + +func gen_stmt(g *Gen, node *Node) i32 { + let c i32 = 0; + if node.kind == ND_EMPTY { + return 0; + } + if node.kind == ND_BLOCK { + gen_node_block(g, node.body); + return 0; + } + if node.kind == ND_EXPR_STMT { + gen_expr(g, node.lhs); + return 0; + } + if node.kind == ND_MEMZERO { + gen_expr(g, node.lhs); + printf("\tmovq %%rax, %%rdi\n"); + printf("\tmovq $%d, %%rcx\n", node.ty.size); + printf("\tmov $0, %%al\n"); + printf("\trep stosb\n"); + return 0; + } + if node.kind == ND_RETURN { + if node.lhs != nil { + gen_expr(g, node.lhs); + } + printf("\tmovq %%rbp, %%rsp\n"); + printf("\tpop %%rbp\n"); + printf("\tretq\n"); + return 0; + } + if node.kind == ND_IF { + c = g.label_count++; + gen_expr(g, node.cond); + printf("\tcmpq $1, %%rax\n"); + printf("\tjne .L.else.%d\n", c); + gen_stmt(g, node.then_block); + printf("\tjmp .L.end.%d\n", c); + printf(".L.else.%d:\n", c); + if node.else_block != nil { + gen_stmt(g, node.else_block); + } + printf(".L.end.%d:\n", c); + return 0; + } + if node.kind == ND_GOTO { + printf("\tjmp .L.%s.%s\n", g.cur_func_name, node.label_name); + return 0; + } + if node.kind == ND_LABEL { + printf(".L.%s.%s:\n", g.cur_func_name, node.label_name); + return 0; + } + if node.kind == ND_WHILE { + c = g.label_count++; + printf(".L.while.start.%d:\n", c); + gen_expr(g, node.cond); + printf("\tcmpq $1, %%rax\n"); + printf("\tjne .L.while.end.%d\n", c); + gen_stmt(g, node.then_block); + printf("\tjmp .L.while.start.%d\n", c); + printf(".L.while.end.%d:\n", c); + return 0; + } + if node.kind == ND_ASSIGN { + gen_addr(g, node.lhs); + printf("\tpush %%rax\n"); + gen_expr(g, node.rhs); + printf("\tpop %%rdi\n"); + gen_store(node.ty); + return 0; + } + eprintf("gen_stmt unreachable\n"); + exit(1); +} + +func assign_func_params_offset(g *Gen, obj *Object) i32 { + if obj == nil { + return 0; + } + if obj.next != nil { + assign_func_params_offset(g, obj.next); + } + if obj.is_func_param { + obj.offset = g.stack_offset; + g.stack_offset = g.stack_offset + 8; + } + return 0; +} + +func assign_local_var_offset(g *Gen, obj *Object) i32 { + if obj == nil { + return align_to(g.offset, 16); + } + if !obj.is_func_param { + g.offset = g.offset + obj.ty.size; + obj.offset = 0 - g.offset; + } + if obj.next != nil { + assign_local_var_offset(g, obj.next); + } + return align_to(g.offset, 16); +} + +func has_main(object *Object) bool { + while object != nil { + if strcmp(object.name, "main") { + return true; + } + object = object.next; + } + return false; +} + +func gen(g *Gen, object *Object) u0 { + printf(".text\n"); + + if has_main(object) { + printf(".global _start\n"); + printf("_start:\n"); + printf("\tpush %%rbp\n"); + printf("\tmovq %%rsp, %%rbp\n"); + printf("\tleaq 16(%%rbp), %%rax\n"); + printf("\tpush %%rax\n"); + printf("\tpushq 8(%%rbp)\n"); + printf("\tcallq main\n"); + printf("\tmovq %%rax, %%rdi\n"); + printf("\tmovq $60, %%rax\n"); + printf("\tsyscall\n"); + } + + while object != nil { + if object.kind == OBJ_FUNC && !object.is_declaration { + g.cur_func_name = object.name; + + g.offset = 0; + g.stack_offset = 16; + assign_func_params_offset(g, object.locals); + object.stack_size = assign_local_var_offset(g, object.locals); + + printf(".global %s\n", object.name); + printf("%s:\n", object.name); + printf("\tpush %%rbp\n"); + printf("\tmovq %%rsp, %%rbp\n"); + printf("\tsubq $%d, %%rsp\n", object.stack_size); + + gen_stmt(g, object.body); + printf("\tleave\n"); + printf("\tret\n"); + } + object = object.next; + } +} + diff --git a/src/codegen/header.ibu b/src/codegen/header.ibu new file mode 100644 index 0000000..5d2a020 --- /dev/null +++ b/src/codegen/header.ibu @@ -0,0 +1,15 @@ + +#include "../parser/header.ibu" + +struct Gen { + label_count i32, + str_label_count i32, + cur_func_name *u8, + + offset i32, + stack_offset i32, +} + +func new_gen() *Gen; +func gen(g *Gen, object *Object) u0; + diff --git a/src/ibu.ibu b/src/ibu.ibu new file mode 100644 index 0000000..c6c8a53 --- /dev/null +++ b/src/ibu.ibu @@ -0,0 +1,50 @@ + +#include "std/header.ibu" +#include "linux-syscall/header.ibu" +#include "tokenizer/header.ibu" +#include "parser/header.ibu" +#include "codegen/header.ibu" +#include "preprocessor/header.ibu" + +func main(argc i32, argv **u8) i32 { + if argc != 2 { + printf("usage\n\tibuc .ibu\n"); + exit(0); + } + + let file_name *u8 = argv[1]; + + let fd i32 = 0; + if strcmp(file_name, "-") { + fd = STDIN; + } else { + fd = open(file_name, 0, 420); + if fd < 0 { + eprintf("\033[1m\033[31merror\033[0m: opening file %s\n", file_name); + exit(1); + } + } + + let program *u8 = alloc(PROGRAM_MAX_SIZE); + if program == nil { + eprintf("memory allocation failed\n"); + exit(1); + } + read(fd, program, PROGRAM_MAX_SIZE); + close(fd); + + let t *Tokenizer = new_tokenizer(file_name, program); + let tokens *Token = tokenize(t); + + let preprocessor *Preprocessor = new_preprocessor(); + preprocess(tokens, preprocessor); + + let p *Parser = new_parser(tokens); + parse(p); + + let g *Gen = new_gen(); + gen(g, p.globals); + + return 0; +} + diff --git a/src/parser/header.ibu b/src/parser/header.ibu new file mode 100644 index 0000000..6947221 --- /dev/null +++ b/src/parser/header.ibu @@ -0,0 +1,174 @@ + +#include "std/header.ibu" +#include "../tokenizer/header.ibu" + +#define NodeKind i32 +#define ND_ADD 0 +#define ND_SUB 1 +#define ND_MUL 2 +#define ND_DIV 3 +#define ND_MOD 4 +#define ND_NOT 5 +#define ND_NE 6 +#define ND_EQ 7 +#define ND_LE 8 +#define ND_LT 9 +#define ND_GE 10 +#define ND_GT 11 +#define ND_STR 12 +#define ND_NUM 13 +#define ND_VAR 14 +#define ND_IF 15 +#define ND_WHILE 16 +#define ND_ASSIGN 17 +#define ND_RETURN 18 +#define ND_REF 19 +#define ND_DEREF 20 +#define ND_BLOCK 21 +#define ND_EXPR_STMT 22 +#define ND_GOTO 23 +#define ND_LABEL 24 +#define ND_FUNC_CALL 25 +#define ND_LOGAND 26 +#define ND_LOGOR 27 +#define ND_MEMBER_ACCESS 28 +#define ND_EMPTY 29 +#define ND_SHL 30 +#define ND_SHR 31 +#define ND_MEMZERO 32 +#define ND_AND 33 +#define ND_OR 34 + +#define TypeKind i32 +#define TY_I64 0 +#define TY_I32 1 +#define TY_I16 2 +#define TY_I8 3 +#define TY_BOOL 4 +#define TY_STRUCT 5 +#define TY_FUNC 6 +#define TY_PTR 7 +#define TY_U64 8 +#define TY_U32 9 +#define TY_U16 10 +#define TY_U8 11 +#define TY_U0 12 +#define TY_ARRAY 13 + +struct Type; +struct Member { + ty *Type, + name *u8, + offset i32, +} + +struct Type { + kind TypeKind, + size i32, + name *u8, + + // struct type + members *Vec, + + // func type + return_type *Type, + params *Vec, + is_variadic bool, + + // pointer type + pointer_to *Type, + + array_len i32, + + is_unsigned bool, + is_declaration bool, + + tok *Token, +} + +func unexpected_token_error(expected *u8, tok *Token, msg *u8) u0; +func unkown_type_error(types *Vec, tok *Token, msg *u8) u0; +func unkown_member_error(members *Vec, tok *Token, msg *u8) u0; +#define ObjectKind i32 +#define OBJ_FUNC 0 +#define OBJ_VAR 1 + +struct Object; +struct Node; +struct Object { + name *u8, + kind ObjectKind, + ty *Type, + + // local variable + offset i32, + + // function + body *Node, + params *Vec, + locals *Object, + stack_size i32, + + is_declaration bool, + is_func_param bool, + is_global bool, + + next *Object, +} + +struct Node { + kind NodeKind, + lhs *Node, + rhs *Node, + body *Vec, + then_block *Node, + else_block *Node, + cond *Node, + label_name *u8, + int_val i32, + str_val *u8, + obj *Object, + ty *Type, + func_name *u8, + offset i32, + args *Vec, +} + +struct VarScope; +struct VarScope { + name *u8, + obj *Object, + outer *VarScope, +} + +struct Scope; +struct Scope { + var_scope *VarScope, + outer *Scope, +} + +struct Parser { + tokens *Token, + globals *Object, + + // function local variables + locals *Object, + scope *Scope, + + // types + user_defined_types *Vec, + ty_i8 *Type, + ty_i16 *Type, + ty_i32 *Type, + ty_i64 *Type, + ty_u0 *Type, + ty_u8 *Type, + ty_u16 *Type, + ty_u32 *Type, + ty_u64 *Type, + ty_bool *Type, +} + +func new_parser(tokens *Token) *Parser; +func parse(p *Parser) u0; + diff --git a/src/parser/parser.ibu b/src/parser/parser.ibu new file mode 100644 index 0000000..a7ee2b4 --- /dev/null +++ b/src/parser/parser.ibu @@ -0,0 +1,1461 @@ + +#include "header.ibu" +#include "std/header.ibu" +#include "linux-syscall/header.ibu" + +func add_type(p *Parser, node *Node) u0; +func parse_ty(p *Parser) *Type; +func parse_expr(p *Parser) *Node; +func parse_stmt(p *Parser) *Node; +func cmp_type(ty1 *Type, ty2 *Type) bool; + +func unexpected_token_error(expected *u8, tok *Token, msg *u8) u0 { + print_error_with_code(tok, msg); + eprintf("help: expected `%s` but got `%s`\n", expected, tok.lit); + exit(1); +} + +func unkown_type_error(types *Vec, tok *Token, msg *u8) u0 { + print_error_with_code(tok, msg); + + if types.len == 0 { + exit(1); + } else if types.len == 1 { + eprintf("help: %d possibility:", types.len); + } else { + eprintf("help: %d possibilities:", types.len); + } + + let i i32 = 0; + while i < types.len { + let type *Type = vec_get(types, i); + if i+1 < types.len { + eprintf(" `%s`,", type.name); + } else { + eprintf(" `%s`", type.name); + } + i++; + } + + eprintf("\n"); + + exit(1); +} + +func unkown_member_error(members *Vec, tok *Token, msg *u8) u0 { + print_error_with_code(tok, msg); + + if members.len == 0 { + exit(1); + } else if members.len == 1 { + eprintf("help: %d possibility:", members.len); + } else { + eprintf("help: %d possibilities:", members.len); + } + + let i i32 = 0; + while i < members.len { + let member *Member = vec_get(members, i); + if i+1 < members.len { + eprintf(" `%s`,", member.name); + } else { + eprintf(" `%s`", member.name); + } + i++; + } + + eprintf("\n"); + + exit(1); +} + +func enter_scope(p *Parser) u0 { + let new_scope *Scope = alloc(typesize(Scope)); + new_scope.outer = p.scope; + p.scope = new_scope; +} + +func leave_scope(p *Parser) u0 { + p.scope = p.scope.outer; +} + +func get_user_defined_type(p *Parser, name *u8) *Type { + let i i32 = 0; + + while i < p.user_defined_types.len { + let type *Type = vec_get(p.user_defined_types, i); + if strcmp(type.name, name) { + return type; + } + i++; + } + + return nil; +} + +func new_builtin_type(kind TypeKind, size i32, name *u8, is_unsigned bool) *Type { + let ty *Type = alloc(typesize(Type)); + if ty == nil { + eprintf("memory allocation failed\n"); + exit(1); + } + ty.kind = kind; + ty.size = size; + ty.name = name; + ty.pointer_to = nil; + ty.is_unsigned = is_unsigned; + return ty; +} + +func new_pointer_type(base *Type) *Type { + let ty *Type = alloc(typesize(Type)); + if ty == nil { + eprintf("memory allocation failed\n"); + exit(1); + } + ty.kind = TY_PTR; + ty.size = 8; + ty.pointer_to = base; + return ty; +} + +func new_array_type(base *Type, len i32) *Type { + let ty *Type = alloc(typesize(Type)); + if ty == nil { + eprintf("memory allocation failed\n"); + exit(1); + } + ty.kind = TY_ARRAY; + ty.size = base.size * len; + ty.pointer_to = base; + ty.array_len = len; + return ty; +} + +func new_func_type(params_types *Vec, return_type *Type, is_variadic bool) *Type { + let ty *Type; + ty = alloc(typesize(Type)); + if ty == nil { + eprintf("memory allocation failed\n"); + exit(1); + } + ty.kind = TY_FUNC; + ty.size = 8; + ty.params = params_types; + ty.return_type = return_type; + ty.is_variadic = is_variadic; + return ty; +} + +func new_parser(tokens *Token) *Parser { + let p *Parser = alloc(typesize(Parser)); + if p == nil { + eprintf("memory allocation failed\n"); + exit(1); + } + p.tokens = tokens; + p.locals = nil; + p.user_defined_types = new_vec(4); + + p.ty_i64 = new_builtin_type(TY_I64, 8, "i64", false); + p.ty_i32 = new_builtin_type(TY_I32, 4, "i32", false); + p.ty_i16 = new_builtin_type(TY_I16, 2, "i16", false); + p.ty_i8 = new_builtin_type(TY_I8, 1, "i8", false); + p.ty_bool = new_builtin_type(TY_BOOL, 4, "bool", false); + + p.ty_u64 = new_builtin_type(TY_U64, 8, "u64", true); + p.ty_u32 = new_builtin_type(TY_U32, 4, "u32", true); + p.ty_u16 = new_builtin_type(TY_U16, 2, "u16", true); + p.ty_u8 = new_builtin_type(TY_U8, 1, "u8", true); + p.ty_u0 = new_builtin_type(TY_U0, 0, "u0", true); + + return p; +} + +func parser_next(p *Parser) u0 { + if p.tokens.next == nil { + eprintf("internal error: this should not happen."); + exit(1); + } + p.tokens = p.tokens.next; + return; +} + +func new_node(kind NodeKind) *Node { + let node *Node = alloc(typesize(Node)); + if node == nil { + eprintf("memory allocation failed\n"); + exit(1); + } + node.kind = kind; + return node; +} + +func parser_skip(p *Parser, str *u8) u0 { + if strcmp(p.tokens.lit, str) { + parser_next(p); + return; + } + unexpected_token_error(str, p.tokens, "unexpected token"); +} + +func cmp_type_vec(vec1 *Vec, vec2 *Vec) bool { + if vec1.len != vec2.len { + return false; + } + + let i i32 = 0; + while i < vec1.len { + if !cmp_type(vec_get(vec1, i), vec_get(vec2, i)) { + return false; + } + i++; + } + + return true; +} + +func cmp_type(ty1 *Type, ty2 *Type) bool { + if ty1 == nil || ty2 == nil { + eprintf("internal error: this should not happen\n"); + exit(1); + } + + if ty1.kind != ty2.kind { + return false; + } + + if ty1.kind == TY_FUNC { + return cmp_type(ty1.return_type, ty2.return_type) && cmp_type_vec(ty1.params, ty2.params) && ty1.is_variadic == ty2.is_variadic; + } + + if ty1.kind == TY_PTR { + return cmp_type(ty1.pointer_to, ty2.pointer_to); + } + + return ty1.size == ty2.size && ty1.is_unsigned == ty2.is_unsigned && strcmp(ty1.name, ty2.name); +} + +func cmp_func_param(p1 *Object, p2 *Object) bool { + return strcmp(p1.name, p2.name) && cmp_type(p1.ty, p2.ty); +} + +func cmp_func_params(p1 *Vec, p2 *Vec) bool { + if p1.len != p2.len { + return false; + } + + let idx i32 = 0; + while idx < p1.len { + if !cmp_func_param(vec_get(p1, idx), vec_get(p2, idx)) { + return false; + } + idx++; + } + + return true; +} + +func find_locals(p *Parser, name *u8) *Object { + let scope *Scope = p.scope; + while scope != nil { + let var_scope *VarScope = scope.var_scope; + while var_scope != nil { + if strcmp(name, var_scope.name) { + return var_scope.obj; + } + var_scope = var_scope.outer; + } + scope = scope.outer; + } + return nil; +} + +func find_locals_current_scope(p *Parser, name *u8) *Object { + let scope *Scope = p.scope; + if scope != nil { + let var_scope *VarScope = scope.var_scope; + while var_scope != nil { + if strcmp(name, var_scope.name) { + return var_scope.obj; + } + var_scope = var_scope.outer; + } + } + return nil; +} + +func find_globals(p *Parser, name *u8) *Object { + let object *Object = p.globals; + + while object != nil { + if strcmp(object.name, name) { + return object; + } + object = object.next; + } + + return nil; +} + +func check_local_object_already_exist(p *Parser, name *u8, tok *Token) i32 { + let obj *Object = find_locals_current_scope(p, name); + if obj != nil { + print_error_with_code(tok, "name already exist"); + exit(1); + } + return 0; +} + +func scope_push_obj(p *Parser, name *u8, obj *Object) *VarScope { + let var_scope *VarScope = alloc(typesize(VarScope)); + var_scope.name = name; + var_scope.obj = obj; + var_scope.outer = p.scope.var_scope; + p.scope.var_scope = var_scope; + return var_scope; +} + +func new_local_object(p *Parser, kind ObjectKind, name *u8, ty *Type, tok *Token, is_func_param bool) *Object { + check_local_object_already_exist(p, name, tok); + + let obj *Object = alloc(typesize(Object)); + if obj == nil { + eprintf("memory allocation failed\n"); + exit(1); + } + + obj.kind = kind; + obj.name = name; + obj.ty = ty; + obj.is_func_param = is_func_param; + + obj.next = p.locals; + p.locals = obj; + + scope_push_obj(p, name, obj); + + return obj; +} + +func add_type_block(p *Parser, nodes *Vec) u0 { + if nodes == nil { + return; + } + let i i32 = 0; + while i < nodes.len { + let node *Node = vec_get(nodes, i); + add_type(p, node); + i++; + } +} + +func add_type(p *Parser, node *Node) u0 { + if node == nil || node.ty != nil { + return; + } + + add_type(p, node.lhs); + add_type(p, node.rhs); + add_type(p, node.cond); + + add_type_block(p, node.body); + add_type(p, node.then_block); + add_type(p, node.else_block); + + add_type_block(p, node.args); + + if node.kind == ND_STR { + node.ty = new_pointer_type(p.ty_i8); + return; + } + + if node.kind == ND_FUNC_CALL { + node.ty = node.lhs.ty.return_type; + return; + } + + if (node.kind == ND_ADD || node.kind == ND_SUB + || node.kind == ND_MUL || node.kind == ND_DIV + || node.kind == ND_MOD || node.kind == ND_ASSIGN + || node.kind == ND_SHL || node.kind == ND_SHR || node.kind == ND_MEMZERO) { + node.ty = node.lhs.ty; + return; + } + + if (node.kind == ND_NOT || node.kind == ND_EQ + || node.kind == ND_NE || node.kind == ND_LE + || node.kind == ND_LT || node.kind == ND_GT + || node.kind == ND_GE || node.kind == ND_LOGAND + || node.kind == ND_LOGOR || node.kind == ND_NUM + || node.kind == ND_AND || node.kind == ND_OR) { + node.ty = p.ty_i32; + return; + } + + if node.kind == ND_VAR { + node.ty = node.obj.ty; + return; + } + + if node.kind == ND_REF { + if node.lhs.ty.kind == TY_ARRAY { + node.ty = new_pointer_type(node.lhs.ty.pointer_to); + } else { + node.ty = new_pointer_type(node.lhs.ty); + } + return; + } + + if node.kind == ND_DEREF { + node.ty = node.lhs.ty.pointer_to; + return; + } + + if node.kind == ND_EXPR_STMT { + node.ty = node.lhs.ty; + return; + } + + return; +} + +func parse_params_types(p *Parser, types *Vec) bool { + while !strcmp(p.tokens.lit, ")") { + if strcmp(p.tokens.lit, "...") { + parser_next(p); + return true; + } else { + let ty *Type = parse_ty(p); + if ty.kind == TY_ARRAY { + ty = new_pointer_type(ty.pointer_to); + } + vec_append(types, ty); + } + if !strcmp(p.tokens.lit, ",") { + goto break; + } + parser_next(p); + } + +break: + + return false; +} + +func parse_ty(p *Parser) *Type { + let name *u8 = p.tokens.lit; + let type_name_tok *Token = p.tokens; + + parser_next(p); + let ty *Type; + + if strcmp(name, "i64") { ty = p.ty_i64; } + else if strcmp(name, "i32") { ty = p.ty_i32; } + else if strcmp(name, "i16") { ty = p.ty_i16; } + else if strcmp(name, "i8") { ty = p.ty_i8; } + else if strcmp(name, "u64") { ty = p.ty_u64; } + else if strcmp(name, "u32") { ty = p.ty_u32; } + else if strcmp(name, "u16") { ty = p.ty_u16; } + else if strcmp(name, "u8") { ty = p.ty_u8; } + else if strcmp(name, "u0") { ty = p.ty_u0; } + else if strcmp(name, "bool") { ty = p.ty_bool; } + else if strcmp(name, "*") { ty = new_pointer_type(parse_ty(p)); } + else if strcmp(name, "func") { + parser_skip(p, "("); + let types *Vec = new_vec(4); + let is_variadic bool = parse_params_types(p, types); + parser_skip(p, ")"); + ty = new_func_type(types, parse_ty(p), is_variadic); + } else if strcmp(name, "[") { + if p.tokens.kind != TK_NUM { + print_error(p.tokens, "expected number"); + } + let array_len i32 = atoi(p.tokens.lit); + parser_next(p); + parser_skip(p, "]"); + ty = new_array_type(parse_ty(p), array_len); + } else { + ty = get_user_defined_type(p, name); + if ty == nil { + unkown_type_error(p.user_defined_types, type_name_tok, "unkown type found"); + } + } + + return ty; +} + +func parse_func_call_args(p *Parser) *Vec { + let args *Vec = new_vec(4); + + while !strcmp(p.tokens.lit, ")") { + vec_append(args, parse_expr(p)); + if !strcmp(p.tokens.lit, ",") { + goto break; + } + parser_next(p); + } + +break: + return args; +} + +func parse_unary(p *Parser) *Node; + +func parse_sizeof(p *Parser) *Node { + parser_skip(p, "sizeof"); + parser_skip(p, "("); + let node *Node = parse_unary(p); + parser_skip(p, ")"); + add_type(p, node); + let size i32 = node.ty.size; + + node.kind = ND_NUM; + node.int_val = size; + node.ty = p.ty_i32; + + return node; +} + +func find_object(p *Parser, name *u8) *Object { + let obj *Object = find_locals(p, name); + if obj == nil { + obj = find_globals(p, name); + } + return obj; +} + +func parse_ident(p *Parser) *Node { + let var_tok *Token = p.tokens; + let var_node *Node = new_node(ND_VAR); + let obj *Object = find_object(p, p.tokens.lit); + + if obj == nil { + print_error(var_tok, "unkown object"); + } + + var_node.obj = obj; + + parser_next(p); + + return var_node; +} + +func new_node_num(n i32) *Node { + let node *Node = new_node(ND_NUM); + node.int_val = n; + return node; +} + +func parse_number(p *Parser) *Node { + let node *Node; + + if p.tokens.kind == TK_NUM { + node = new_node_num(p.tokens.int_val); + parser_next(p); + } else if p.tokens.kind == TK_STR { + node = new_node(ND_STR); + node.str_val = p.tokens.str_val; + parser_next(p); + } else if strcmp(p.tokens.lit, "nil") { + parser_next(p); + node = new_node(ND_NUM); + node.ty = p.ty_i32; + node.int_val = 0; + } else if strcmp(p.tokens.lit, "true") { + parser_next(p); + node = new_node(ND_NUM); + node.ty = p.ty_bool; + node.int_val = 1; + } else if strcmp(p.tokens.lit, "false") { + parser_next(p); + node = new_node(ND_NUM); + node.ty = p.ty_bool; + node.int_val = 0; + } else if strcmp(p.tokens.lit, "typesize") { + node = new_node(ND_NUM); + parser_next(p); + parser_skip(p, "("); + node.int_val = parse_ty(p).size; + node.ty = p.ty_i32; + parser_skip(p, ")"); + } else if strcmp(p.tokens.lit, "sizeof") { + node = parse_sizeof(p); + } else if p.tokens.kind == TK_IDENT { + node = parse_ident(p); + } else if strcmp(p.tokens.lit, "(") { + parser_next(p); + node = parse_expr(p); + parser_skip(p, ")"); + } else { + print_error(p.tokens, "expected number or identifier"); + exit(1); + } + return node; +} + +func search_struct_member(members *Vec, exp_member_name *u8) *Member { + let i i32 = 0; + while i < members.len { + let member *Member = vec_get(members, i); + if strcmp(member.name, exp_member_name) { + return member; + } + i++; + } + return nil; +} + +func new_struct_access_node(kind NodeKind, lhs *Node, offset i32, ty *Type) *Node { + let node *Node = alloc(typesize(Node)); + + node.kind = kind; + node.lhs = lhs; + node.offset = offset; + node.ty = ty; + + return node; +} + +func parse_deref(p *Parser) *Node { + let tok *Token = p.tokens; + parser_next(p); + let node *Node = new_node(ND_DEREF); + node.lhs = parse_unary(p); + + add_type(p, node.lhs); + + if node.lhs.ty.kind != TY_PTR && node.lhs.ty.kind != TY_ARRAY { + print_error(tok, "invalid pointer dereference"); + } + + return node; +} + +func new_binop(kind NodeKind, lhs *Node, rhs *Node) *Node { + let node *Node = new_node(kind); + node.lhs = lhs; + node.rhs = rhs; + return node; +} + +func params_length_without_argv_argc(ty *Type) i32 { + if ty.is_variadic { + return ty.params.len - 2; + } else { + return ty.params.len; + } +} + +func parse_ref(p *Parser) *Node { + parser_skip(p, "&"); + let node *Node = new_node(ND_REF); + node.lhs = parse_unary(p); + return node; +} + +func parse_not(p *Parser) *Node { + parser_skip(p, "!"); + let node *Node = new_node(ND_NOT); + node.lhs = parse_unary(p); + return node; +} + +func parse_unary(p *Parser) *Node { + if strcmp(p.tokens.lit, "*") { + return parse_deref(p); + } + if strcmp(p.tokens.lit, "&") { + return parse_ref(p); + } + if strcmp(p.tokens.lit, "!") { + return parse_not(p); + } + + let node *Node = parse_number(p); + + while { + if strcmp(p.tokens.lit, "(") { + let lpar_tok *Token = p.tokens; + parser_skip(p, "("); + + add_type(p, node); + + if node.ty.kind != TY_FUNC { + print_error(lpar_tok, "cannot call a none function type object\n"); + } + + let func_call_node *Node = new_node(ND_FUNC_CALL); + func_call_node.lhs = node; + + func_call_node.args = parse_func_call_args(p); + + let rpar_tok *Token = p.tokens; + parser_skip(p, ")"); + + if node.ty.is_variadic { + if func_call_node.args.len < params_length_without_argv_argc(node.ty) { + print_error(lpar_tok, "The number of arguments does not match the function definition"); + } + } else { + if func_call_node.args.len != node.ty.params.len { + print_error(lpar_tok, "The number of arguments does not match the function definition"); + } + } + + node = func_call_node; + goto continue; + } + let access_tok *Token = p.tokens; + if strcmp(p.tokens.lit, "++") { + parser_next(p); + node = new_binop(ND_SUB, new_binop(ND_ASSIGN, node, new_binop(ND_ADD, node, new_node_num(1))), new_node_num(1)); + goto continue; + } + if strcmp(p.tokens.lit, "--") { + parser_next(p); + node = new_binop(ND_ADD, new_binop(ND_ASSIGN, node, new_binop(ND_SUB, node, new_node_num(1))), new_node_num(1)); + goto continue; + } + if strcmp(p.tokens.lit, "[") { + add_type(p, node); + parser_next(p); + let index_number_node *Node = parse_expr(p); + parser_skip(p, "]"); + + if node.ty.kind != TY_PTR && node.ty.kind != TY_ARRAY { + print_error(access_tok, "`[]` cannot access to none pointer type."); + } + + let base_number_node *Node = new_node(ND_NUM); + base_number_node.int_val = node.ty.pointer_to.size; + base_number_node.ty = p.ty_i32; + + let idx_pointer_arith *Node = new_binop(ND_MUL, index_number_node, base_number_node); + node = new_binop(ND_ADD, node, idx_pointer_arith); + + node = new_struct_access_node(ND_DEREF, node, 0, nil); + goto continue; + } + if strcmp(p.tokens.lit, ".") { + parser_next(p); + + let member_name *u8 = p.tokens.lit; + let member_tok *Token = p.tokens; + let member *Member; + + parser_next(p); + + add_type(p, node); + + if node.ty.kind == TY_PTR { + if node.ty.pointer_to.kind != TY_STRUCT { + print_error(access_tok, "cannot access from none struct type"); + } + member = search_struct_member(node.ty.pointer_to.members, member_name); + if member == nil { + unkown_member_error(node.ty.pointer_to.members, member_tok, "member name not found"); + } + node = new_struct_access_node(ND_DEREF, node, 0, node.ty.pointer_to); + } else { + if node.ty.kind != TY_STRUCT { + print_error(access_tok, "cannot access from none struct type"); + } + member = search_struct_member(node.ty.members, member_name); + if member == nil { + unkown_member_error(node.ty.members, member_tok, "member name not found"); + } + } + let offset i32 = member.offset; + let member_ty *Type = member.ty; + node = new_struct_access_node(ND_MEMBER_ACCESS, node, offset, member_ty); + goto continue; + } + goto break; + continue: + } + break: + + return node; +} + +func parse_mul(p *Parser) *Node { + let node *Node = parse_unary(p); + + while { + if strcmp(p.tokens.lit, "*") { + parser_next(p); + node = new_binop(ND_MUL, node, parse_unary(p)); + } else if strcmp(p.tokens.lit, "/") { + parser_next(p); + node = new_binop(ND_DIV, node, parse_unary(p)); + } else if strcmp(p.tokens.lit, "%") { + parser_next(p); + node = new_binop(ND_MOD, node, parse_unary(p)); + } else { + goto break; + } + } +break: + + return node; +} + +func parse_add(p *Parser) *Node { + let node *Node = parse_mul(p); + + while { + if strcmp(p.tokens.lit, "+") { + parser_next(p); + node = new_binop(ND_ADD, node, parse_mul(p)); + } else if strcmp(p.tokens.lit, "-") { + parser_next(p); + node = new_binop(ND_SUB, node, parse_mul(p)); + } else { + goto break; + } + } +break: + + return node; +} + +func parse_shift(p *Parser) *Node { + let node *Node = parse_add(p); + + while { + if strcmp(p.tokens.lit, "<<") { + parser_next(p); + node = new_binop(ND_SHL, node, parse_add(p)); + } else if strcmp(p.tokens.lit, ">>") { + parser_next(p); + node = new_binop(ND_SHR, node, parse_add(p)); + } else { + goto break; + } + } + +break: + return node; +} + +func is_comparison_node(node *Node) bool { + return + node.kind == ND_LE || + node.kind == ND_GE || + node.kind == ND_LT || + node.kind == ND_GT || + node.kind == ND_EQ || + node.kind == ND_NE || + node.kind == ND_LOGAND; +} + +func search_relational_rhs(node *Node) *Node { + let rel_node *Node = node; + while is_comparison_node(rel_node) { + rel_node = rel_node.rhs; + } + + return rel_node; +} + +func search_relational_lhs(node *Node) *Node { + let rel_node *Node = node; + while is_comparison_node(rel_node) { + rel_node = rel_node.lhs; + } + + return rel_node; +} + +func new_relational(kind NodeKind, lhs *Node, rhs *Node) *Node { + let node *Node; + + if is_comparison_node(lhs) && is_comparison_node(rhs) { + node = new_binop(kind, search_relational_rhs(lhs.rhs), search_relational_lhs(rhs.lhs)); + node = new_binop(ND_LOGAND, node, rhs); + node = new_binop(ND_LOGAND, lhs, node); + return node; + } + + node = new_binop(kind, search_relational_rhs(lhs.rhs), rhs); + node = new_binop(ND_LOGAND, lhs, node); + return node; +} + +func new_equality(kind NodeKind, lhs *Node, rhs *Node) *Node { + let node *Node; + if is_comparison_node(lhs) && is_comparison_node(rhs) { + node = new_binop(kind, search_relational_rhs(lhs.rhs), search_relational_lhs(rhs.lhs)); + node = new_binop(ND_LOGAND, lhs, node); + node = new_binop(ND_LOGAND, node, rhs); + return node; + } + node = new_binop(kind, lhs, search_relational_lhs(rhs.lhs)); + node = new_binop(ND_LOGAND, node, rhs); + return node; +} + +func parse_relational(p *Parser) *Node { + let node *Node = parse_shift(p); + let rhs *Node; + + while { + if strcmp(p.tokens.lit, "<=") { + parser_next(p); + rhs = parse_shift(p); + if is_comparison_node(node) { + node = new_relational(ND_LE, node, rhs); + } else { + node = new_binop(ND_LE, node, rhs); + } + } else if strcmp(p.tokens.lit, ">=") { + parser_next(p); + rhs = parse_shift(p); + if is_comparison_node(node) { + node = new_relational(ND_GE, node, rhs); + } else { + node = new_binop(ND_GE, node, rhs); + } + } else if strcmp(p.tokens.lit, "<") { + parser_next(p); + rhs = parse_shift(p); + if is_comparison_node(node) { + node = new_relational(ND_LT, node, rhs); + } else { + node = new_binop(ND_LT, node, rhs); + } + } else if strcmp(p.tokens.lit, ">") { + parser_next(p); + rhs = parse_shift(p); + if is_comparison_node(node) { + node = new_relational(ND_GT, node, rhs); + } else { + node = new_binop(ND_GT, node, rhs); + } + } else { + goto break; + } + } +break: + + return node; +} + +func parse_equality(p *Parser) *Node { + let node *Node = parse_relational(p); + let rhs *Node; + + while { + if strcmp(p.tokens.lit, "==") { + parser_next(p); + rhs = parse_relational(p); + if is_comparison_node(rhs) { + node = new_equality(ND_EQ, node, rhs); + } else if is_comparison_node(node) { + node = new_relational(ND_EQ, node, rhs); + } else { + node = new_binop(ND_EQ, node, rhs); + } + } else if strcmp(p.tokens.lit, "!=") { + parser_next(p); + rhs = parse_relational(p); + if is_comparison_node(rhs) { + node = new_equality(ND_NE, node, rhs); + } else if is_comparison_node(node) { + node = new_relational(ND_NE, node, rhs); + } else { + node = new_binop(ND_NE, node, rhs); + } + } else { + goto break; + } + } +break: + + return node; +} + +func parse_and(p *Parser) *Node { + let node *Node = parse_equality(p); + while strcmp(p.tokens.lit, "&") { + parser_next(p); + node = new_binop(ND_AND, node, parse_equality(p)); + } + return node; +} + +func parse_or(p *Parser) *Node { + let node *Node = parse_and(p); + while strcmp(p.tokens.lit, "|") { + parser_next(p); + node = new_binop(ND_OR, node, parse_and(p)); + } + return node; +} + +func parse_logand(p *Parser) *Node { + let node *Node = parse_or(p); + while strcmp(p.tokens.lit, "&&") { + parser_next(p); + node = new_binop(ND_LOGAND, node, parse_or(p)); + } + return node; +} + +func parse_logor(p *Parser) *Node { + let node *Node = parse_logand(p); + while strcmp(p.tokens.lit, "||") { + parser_next(p); + node = new_binop(ND_LOGOR, node, parse_logand(p)); + } + return node; +} + +func parse_expr(p *Parser) *Node { + let node *Node = parse_logor(p); + if strcmp(p.tokens.lit, "=") { + parser_next(p); + node = new_binop(ND_ASSIGN, node, parse_expr(p)); + } + return node; +} + +func parse_expr_stmt(p *Parser) *Node { + let node *Node = new_node(ND_EXPR_STMT); + node.lhs = parse_expr(p); + parser_skip(p, ";"); + return node; +} + +func parse_block(p *Parser) *Node { + let node *Node = new_node(ND_BLOCK); + + let stmts *Vec = new_vec(4); + + parser_skip(p, "{"); + + enter_scope(p); + + while !strcmp(p.tokens.lit, "}") { + let stmt *Node = parse_stmt(p); + if stmt != nil { + add_type(p, stmt); + vec_append(stmts, stmt); + } + } + + leave_scope(p); + + parser_skip(p, "}"); + + node.body = stmts; + + return node; +} + +func node_true() *Node { + let node *Node = new_node(ND_NUM); + node.int_val = 1; + return node; +} + +func initializer(p *Parser, lhs *Node) *Node { + let expr *Node; + let deref_lhs *Node; + let i i32 = 0; + + let nodes *Vec = new_vec(10); + + if lhs.ty.kind != TY_ARRAY && lhs.ty.kind != TY_STRUCT { + print_error(p.tokens, "unexpected initializer"); + } + + parser_skip(p, "{"); + + if strcmp(p.tokens.lit, "}") { + expr = new_node(ND_MEMZERO); + expr.lhs = lhs; + vec_append(nodes, expr); + } else if lhs.ty.kind == TY_ARRAY { + while i < lhs.ty.array_len { + deref_lhs = new_node(ND_DEREF); + deref_lhs.lhs = new_binop(ND_ADD, lhs, new_node_num(lhs.ty.pointer_to.size * i)); + + add_type(p, deref_lhs); + + if strcmp(p.tokens.lit, "{") { + expr = initializer(p, deref_lhs); + } else { + expr = new_binop(ND_ASSIGN, deref_lhs, parse_expr(p)); + } + + vec_append(nodes, expr); + + i++; + + if i < lhs.ty.array_len { + parser_skip(p, ","); + } + } + } else if lhs.ty.kind == TY_STRUCT { + while i < lhs.ty.members.len { + let struct_member *Member = vec_get(lhs.ty.members, i); + + deref_lhs = new_struct_access_node(ND_MEMBER_ACCESS, lhs, struct_member.offset, struct_member.ty); + + if strcmp(p.tokens.lit, "{") { + expr = initializer(p, deref_lhs); + } else { + expr = new_binop(ND_ASSIGN, deref_lhs, parse_expr(p)); + } + + vec_append(nodes, expr); + + i++; + + if i < lhs.ty.members.len { + parser_skip(p, ","); + } + } + } else {} + + parser_skip(p, "}"); + + let node *Node = new_node(ND_BLOCK); + node.body = nodes; + add_type(p, node); + + return node; +} + +func parse_let(p *Parser) *Node { + let node *Node; + + parser_skip(p, "let"); + + let var_name_tok *Token = p.tokens; + parser_next(p); + + let var_ty *Type = parse_ty(p); + let obj *Object = new_local_object(p, OBJ_VAR, var_name_tok.lit, var_ty, var_name_tok, false); + + if strcmp(p.tokens.lit, "=") { + parser_skip(p, "="); + + let node_var *Node = new_node(ND_VAR); + node_var.obj = obj; + add_type(p, node_var); + + if strcmp(p.tokens.lit, "{") { + node = initializer(p, node_var); + parser_skip(p, ";"); + } else { + node = new_binop(ND_ASSIGN, node_var, parse_expr_stmt(p)); + } + + return node; + } else { + parser_skip(p, ";"); + return nil; + } +} + +func parse_goto(p *Parser) *Node { + parser_skip(p, "goto"); + + let label_name *u8 = p.tokens.lit; + parser_next(p); + + parser_skip(p, ";"); + + let node *Node = new_node(ND_GOTO); + node.label_name = label_name; + return node; +} + +func parse_if(p *Parser) *Node { + parser_skip(p, "if"); + + let node *Node = new_node(ND_IF); + node.cond = parse_expr(p); + node.then_block = parse_block(p); + + if strcmp(p.tokens.lit, "else") { + parser_next(p); + node.else_block = parse_stmt(p); + } else { + node.else_block = new_node(ND_EMPTY); + } + + return node; +} + +func parse_return(p *Parser) *Node { + parser_skip(p, "return"); + if strcmp(p.tokens.lit, ";") { + parser_skip(p, ";"); + return new_node(ND_RETURN); + } + let node *Node = new_node(ND_RETURN); + node.lhs = parse_expr_stmt(p); + return node; +} + +func parse_while(p *Parser) *Node { + parser_skip(p, "while"); + let node *Node = new_node(ND_WHILE); + + if !strcmp(p.tokens.lit, "{") { + node.cond = parse_expr(p); + } else { + node.cond = node_true(); + } + + node.then_block = parse_block(p); + return node; +} + +func parse_label(p *Parser) *Node { + let node *Node = new_node(ND_LABEL); + node.label_name = p.tokens.lit; + + parser_next(p); + parser_skip(p, ":"); + + return node; +} + +func parse_stmt(p *Parser) *Node { + if strcmp(p.tokens.lit, "let") { + return parse_let(p); + } + if strcmp(p.tokens.lit, "goto") { + return parse_goto(p); + } + if strcmp(p.tokens.lit, "if") { + return parse_if(p); + } + if strcmp(p.tokens.lit, "while") { + return parse_while(p); + } + if strcmp(p.tokens.lit, "return") { + return parse_return(p); + } + if strcmp(p.tokens.lit, "{") { + return parse_block(p); + } + if p.tokens.kind != TK_EOF { + if strcmp(p.tokens.next.lit, ":") { + return parse_label(p); + } + } + + return parse_expr_stmt(p); +} + +func new_member(name *u8, ty *Type) *Member { + let member *Member = alloc(typesize(Member)); + member.name = name; + member.ty = ty; + return member; +} + +func calc_sizof_struct_members(members *Vec) i32 { + let offset i32 = 0; + let i i32 = 0; + + while i < members.len { + let member *Member = vec_get(members, i); + if member.ty.size <= 8 && align_to(offset, 8) < align_to(offset + member.ty.size, 8) { + offset = align_to(offset, 8); + } + member.offset = offset; + offset = offset + member.ty.size; + i++; + } + + return align_to(offset, 8); +} + +func parse_struct(p *Parser) u0 { + parser_skip(p, "struct"); + let name_tok *Token = p.tokens; + parser_next(p); + + let members *Vec = new_vec(4); + + let ty *Type = alloc(typesize(Type)); + ty.kind = TY_STRUCT; + ty.name = name_tok.lit; + ty.size = 0; + ty.members = members; + + let user_defined_struct *Type = get_user_defined_type(p, name_tok.lit); + + if user_defined_struct == nil { + vec_append(p.user_defined_types, ty); + } + + if strcmp(p.tokens.lit, ";") { + if user_defined_struct == nil { + ty.is_declaration = true; + } + parser_skip(p, ";"); + } else { + parser_skip(p, "{"); + while !strcmp(p.tokens.lit, "}") { + let member_name *u8 = p.tokens.lit; + parser_next(p); + vec_append(members, new_member(member_name, parse_ty(p))); + parser_skip(p, ","); + } + parser_skip(p, "}"); + + let struct_size i32 = calc_sizof_struct_members(members); + + if user_defined_struct == nil { + ty.size = struct_size; + ty.members = members; + } else if !user_defined_struct.is_declaration { + print_error(name_tok, "struct is already defined"); + } else { + user_defined_struct.members = members; + user_defined_struct.size = struct_size; + user_defined_struct.is_declaration = false; + } + } +} + +func parse_function_params(p *Parser, types *Vec, params *Vec) bool { + let is_variadic bool = false; + + parser_skip(p, "("); + + while !strcmp(p.tokens.lit, ")") { + let params_name *u8 = p.tokens.lit; + let params_name_tok *Token = p.tokens; + parser_next(p); + + let ty *Type; + let ty_tok *Token = p.tokens; + if strcmp(params_name, "...") { + if !strcmp(p.tokens.lit, ")") { + print_error(params_name_tok, "must be at the end of the paramaters"); + } + is_variadic = true; + + vec_append(types, p.ty_i64); + vec_append(params, new_local_object(p, OBJ_VAR, "argc", p.ty_i32, params_name_tok, true)); + + ty = new_pointer_type(p.ty_i64); + vec_append(types, ty); + vec_append(params, new_local_object(p, OBJ_VAR, "argv", ty, params_name_tok, true)); + } else { + ty = parse_ty(p); + if ty.kind == TY_STRUCT { + print_error(ty_tok, "unsupported feature: function parameter of struct"); + } + if ty.kind == TY_ARRAY { + ty = new_pointer_type(ty.pointer_to); + } + vec_append(types, ty); + vec_append(params, new_local_object(p, OBJ_VAR, params_name, ty, params_name_tok, true)); + + if !strcmp(p.tokens.lit, ")") && !strcmp(p.tokens.lit, ",") { + goto break; + } else if !strcmp(p.tokens.lit, ")") { + parser_skip(p, ","); + } + } + } + +break: + + parser_skip(p, ")"); + + return is_variadic; +} + +func add_function_object(p *Parser, fn *Object) u0 { + fn.next = p.globals; + p.globals = fn; +} + +func parse_func(p *Parser) u0 { + parser_skip(p, "func"); + + p.locals = nil; + enter_scope(p); + + let name_tok *Token = p.tokens; + parser_next(p); + + let types *Vec = new_vec(4); + let params *Vec = new_vec(4); + let is_variadic bool = parse_function_params(p, types, params); + let save_return_ty_tok *Token = p.tokens; + let return_ty *Type = parse_ty(p); + let fn *Object = find_globals(p, name_tok.lit); + + if fn != nil { + if !cmp_func_params(fn.params, params) { + print_error(name_tok, "arguments doesn't match to prototype"); + } + if !cmp_type(return_ty, fn.ty.return_type) { + print_error(name_tok, "return type doesn't match to prototype"); + } + } + + if return_ty.kind == TY_STRUCT { + print_error(save_return_ty_tok, "unsupported feature: function returning struct"); + } + + let is_declaration bool = false; + + if strcmp(p.tokens.lit, ";") { + parser_skip(p, ";"); + is_declaration = true; + } + + if fn == nil { + fn = alloc(typesize(Object)); + if fn == nil { + eprintf("memory allocation failed\n"); + } + fn.kind = OBJ_FUNC; + fn.name = name_tok.lit; + fn.params = params; + fn.is_global = true; + fn.ty = new_func_type(types, return_ty, is_variadic); + add_function_object(p, fn); + if is_declaration { + fn.is_declaration = true; + fn.locals = p.locals; + } else { + fn.body = parse_block(p); + fn.locals = p.locals; + } + } else if fn.is_declaration && !is_declaration { + fn.is_declaration = false; + fn.body = parse_block(p); + fn.locals = p.locals; + } else if !is_declaration { + print_error(name_tok, "function is already defined somewhere"); + } + + leave_scope(p); +} + +func parse(p *Parser) u0 { + while p.tokens.kind != TK_EOF { + if strcmp(p.tokens.lit, "func") { + parse_func(p); + } else if strcmp(p.tokens.lit, "struct") { + parse_struct(p); + } else { + print_error(p.tokens, "non-declaration statement outside function body"); + } + } +} + diff --git a/src/preprocessor/header.ibu b/src/preprocessor/header.ibu new file mode 100644 index 0000000..ec883dd --- /dev/null +++ b/src/preprocessor/header.ibu @@ -0,0 +1,20 @@ + +#include "../tokenizer/header.ibu" +#include "std/header.ibu" + +#define MAX_PATH_LENGTH 4096 + +struct Macro { + name *u8, + tok *Token, + next *Macro, +} + +struct Preprocessor { + macros *Macro, + included_file_full_path *Vec, +} + +func new_preprocessor() *Preprocessor; +func preprocess(tok *Token, p *Preprocessor) u0; + diff --git a/src/preprocessor/preprocessor.ibu b/src/preprocessor/preprocessor.ibu new file mode 100644 index 0000000..f79f0e9 --- /dev/null +++ b/src/preprocessor/preprocessor.ibu @@ -0,0 +1,205 @@ + +#include "header.ibu" +#include "std/header.ibu" +#include "linux-syscall/header.ibu" + +func new_preprocessor() *Preprocessor { + let p *Preprocessor = alloc(typesize(Preprocessor)); + p.macros = nil; + p.included_file_full_path = new_vec(4); + return p; +} + +func new_macro(name *u8, tok *Token) *Macro { + let macro *Macro = alloc(typesize(Macro)); + macro.name = name; + macro.tok = tok; + macro.next = nil; + return macro; +} + +func find_macro(name *u8, p *Preprocessor) *Macro { + let m *Macro = p.macros; + while m != nil { + if strcmp(m.name, name) { + return m; + } + m = m.next; + } + return nil; +} + +func get_eof_from_tokens(tokens *Token) *Token { + while tokens.kind != TK_EOF { + tokens = tokens.next; + } + return tokens; +} + +func dirname(path *u8) *u8 { + let len i32 = strlen(path); + + if len >= 2 && path[0] == '.' && path[1] == '/' { + memmove(path, path+2, len - 2); + path[len - 2] = '\0'; + } + + while len > 0 && path[len - 1] == '/' { + len--; + path[len] = '\0'; + } + + let last_slash *u8 = strrchr(path, '/'); + + if (last_slash == nil) { + memcpy(path, ".", 2); + } else { + if (last_slash == path) { + last_slash[1] = '\0'; + } else { + *last_slash = '\0'; + } + } + + return path; +} + +func get_ibu_lib_path(file_name *u8) *u8 { + let ibu_exe_path [MAX_PATH_LENGTH]u8 = {}; + + let ibu_exe_path_len i32 = readlink("/proc/self/exe", ibu_exe_path, MAX_PATH_LENGTH-1); + + if ibu_exe_path_len < 0 { + eprintf("failed at reading /proc/self/exe to get ibu_exe path\n"); + exit(1); + } + ibu_exe_path[ibu_exe_path_len] = '\0'; + + let ibu_root_path *u8 = dirname(strndup(ibu_exe_path, ibu_exe_path_len)); + + let ibu_lib_path *u8 = alloc( + strlen(ibu_root_path) + + strlen("/lib/") + + strlen(file_name) + + 1 + ); + + if ibu_lib_path == nil { + eprintf("memory allocation failed\n"); + exit(1); + } + + sprintf(ibu_lib_path, "%s/lib/%s", ibu_root_path, file_name); + + return ibu_lib_path; +} + +func fd_get_file_full_path(fd i32) *u8 { + let result *u8 = alloc(MAX_PATH_LENGTH); + if result == nil { + eprintf("memory allocation failed\n"); + exit(1); + } + + let path *u8 = alloc(64); + + sprintf(path, "/proc/self/fd/%d", fd); + + let len i32 = readlink(path, result, MAX_PATH_LENGTH-1); + + if len < 0 { + eprintf("failed at reading /proc/self/fd to get exe path\n"); + return 1; + } + result[len] = '\0'; + + return result; +} + +func preprocess(tok *Token, p *Preprocessor) u0 { + let start_folder_name *u8 = dirname(strndup(tok.file_name, strlen(tok.file_name))); + + while { + if tok.next != nil && strcmp(tok.lit, "#") && strcmp(tok.next.lit, "define") { + let macro *Macro = new_macro(tok.next.next.lit, tok.next.next.next); + macro.next = p.macros; + p.macros = macro; + *tok = *tok.next.next.next.next; + } else if tok.next != nil && strcmp(tok.lit, "#") && strcmp(tok.next.lit, "include") { + let file_name_tok *Token = tok.next.next; + + if file_name_tok.kind != TK_STR { + print_error(file_name_tok, "expected token string"); + } + + let new_file_name *u8 = alloc( + strlen(start_folder_name) + + strlen("/") + + strlen(file_name_tok.str_val) + + 1 + ); + + if new_file_name == nil { + eprintf("memory allocation failed\n"); + exit(1); + } + + sprintf(new_file_name, "%s/%s", start_folder_name, file_name_tok.str_val); + + let fd i32 = open(new_file_name, 0, 420); + if fd < 0 { + fd = open(get_ibu_lib_path(file_name_tok.str_val), 0, 420); + if fd < 0 { + print_error(file_name_tok, "no such file or directory"); + } + } + + let file_full_path *u8 = fd_get_file_full_path(fd); + + let already_imported bool = false; + + let i i32 = 0; + while i < p.included_file_full_path.len { + let imported_name *u8 = vec_get(p.included_file_full_path, i); + if strcmp(file_full_path, imported_name) { + already_imported = true; + } + i++; + } + + if !already_imported { + vec_append(p.included_file_full_path, file_full_path); + + let buf *u8 = alloc(PROGRAM_MAX_SIZE); + if buf == nil { + eprintf("memory allocation failed\n"); + exit(1); + } + read(fd, buf, PROGRAM_MAX_SIZE); + close(fd); + + let tokens *Token = tokenize(new_tokenizer(new_file_name, buf)); + preprocess(tokens, p); + + *get_eof_from_tokens(tokens) = *tok.next.next.next; + *tok = *tokens; + } else { + *tok = *tok.next.next.next; + } + } else { + goto break; + } + } + +break: + + let m *Macro = find_macro(tok.lit, p); + if m != nil { + copy_token(m.tok, tok); + } + + if tok.next != nil { + preprocess(tok.next, p); + } +} + diff --git a/src/tokenizer/header.ibu b/src/tokenizer/header.ibu new file mode 100644 index 0000000..82d5940 --- /dev/null +++ b/src/tokenizer/header.ibu @@ -0,0 +1,38 @@ + +#define TokenKind i32 +#define TK_NUM 0 +#define TK_CHAR 1 +#define TK_IDENT 2 +#define TK_STR 3 +#define TK_PUNCT 4 +#define TK_EOF 5 +#define TK_UNKOWN 6 + +struct Token { + kind TokenKind, + file_name *u8, + program *u8, + line i32, + col i32, + lit *u8, + len i32, + str_val *u8, + int_val i32, + next *Token, +} + +struct Tokenizer { + file_name *u8, + cur_line *u8, + col i32, + line i32, + program *u8, + puncts [34]*u8, +} + +func copy_token(source *Token, dest *Token) u0; +func print_error_with_code(tok *Token, msg *u8) u0; +func print_error(tok *Token, msg *u8) u0; +func new_tokenizer(file_name *u8, program *u8) *Tokenizer; +func tokenize(t *Tokenizer) *Token; + diff --git a/src/tokenizer/tokenizer.ibu b/src/tokenizer/tokenizer.ibu new file mode 100644 index 0000000..0a75a2a --- /dev/null +++ b/src/tokenizer/tokenizer.ibu @@ -0,0 +1,359 @@ + +#include "std/header.ibu" +#include "linux-syscall/header.ibu" +#include "header.ibu" + +func copy_token(source *Token, dest *Token) u0 { + dest.lit = source.lit; + dest.kind = source.kind; + dest.file_name = source.file_name; + dest.line = source.line; + dest.col = source.col; + dest.int_val = source.int_val; +} + +func frepeat_str(fd i32, str *u8, n i32) i32 { + let i i32 = 0; + while i < n { + fputs(fd, str); + i++; + } + return 0; +} + +func print_error_with_code(tok *Token, msg *u8) u0 { + eprintf("\033[1m\033[31m--> %s:%d:%d: error:\033[0m\n", tok.file_name, tok.line, tok.col); + + eprintf(" | \n"); + + eprintf(" | "); + while (*tok.program != '\n') && (*tok.program != '\0') { + if *tok.program == '\t' { + write(STDERR, " ", 1); + } else { + write(STDERR, tok.program, 1); + } + tok.program++; + } + eprintf("\n"); + + eprintf(" | "); + + eprintf("\033[1m\033[31m"); + frepeat_str(STDERR, " ", tok.col); + frepeat_str(STDERR, "^", tok.len); + + eprintf(" %s\033[0m\n", msg); + + eprintf(" | \n"); + + return 0; +} + +func print_error(tok *Token, msg *u8) u0 { + print_error_with_code(tok, msg); + exit(1); +} + +func new_tokenizer(file_name *u8, program *u8) *Tokenizer { + let t *Tokenizer = alloc(typesize(Tokenizer)); + if t == nil { + eprintf("memory allocation failed\n"); + exit(1); + } + t.line = 1; + t.col = 0; + t.program = program; + t.cur_line = program; + t.file_name = file_name; + + let puncts [34]*u8 = { + "==", "<=", ">=", "!=", "++", "--", "||", "&&", "<<", ">>", "...", + "+", "-", "<", ">", ";", ":", "{", "}", "=", ",", "(", ")", "[", "]", + ".", "*", "#", "!", "%", "&", "/", "|", "&" + }; + + memcpy(t.puncts, puncts, sizeof(t.puncts)); + + return t; +} + +func starts_with(a *u8, b *u8) bool { + let i i32 = 0; + while i < strlen(b) { + if a[i] != b[i] { + return false; + } + i++; + } + return true; +} + +func tokenizer_next(t *Tokenizer) u0 { + if *t.program == '\n' { + t.line++; + t.col = 0; + t.program++; + t.cur_line = t.program; + } else { + t.col++; + t.program++; + } +} + +func tokenizer_next_n(t *Tokenizer, n i32) u0 { + let idx i32 = 0; + while idx < n { + tokenizer_next(t); + idx++; + } +} + +func new_token(t *Tokenizer, kind TokenKind) *Token { + let tok *Token = alloc(typesize(Token)); + if tok == nil { + eprintf("memory allocation failed\n"); + exit(1); + } + + tok.line = t.line; + tok.col = t.col; + tok.file_name = t.file_name; + tok.kind = kind; + tok.program = t.cur_line; + + return tok; +} + +func tokenize_punct(t *Tokenizer) *Token { + let idx i32 = 0; + while idx < 34 { + if starts_with(t.program, t.puncts[idx]) { + let tok *Token = new_token(t, TK_PUNCT); + tok.len = strlen(t.puncts[idx]); + tok.lit = strndup(t.puncts[idx], tok.len); + tokenizer_next_n(t, tok.len); + return tok; + } + idx++; + } + return nil; +} + +func skip_single_line_comment(t *Tokenizer) u0 { + if starts_with(t.program, "//") { + while (*t.program != '\n') && (*t.program != '\0') { + tokenizer_next(t); + } + } +} + +func string_end(t *Tokenizer, str *u8) *u8 { + while *str != '\"' { + if *str == '\n' || *str == '\0' { + eprintf("\033[1m\033[31m--> %s:%d:%d: error: unclosed string literal\033[0m\n", t.file_name, t.line, t.col); + exit(1); + } + if *str == '\\' { // back slash + str++; + } + str++; + } + return str; +} + +func is_hex_digit(c u8) bool { + return ('0' <= c <= '9') || ('A' <= c <= 'F') || ('a' <= c <= 'f'); +} + +func from_hex(c u8) u8 { + if '0' <= c <= '9' { + return c - '0'; + } + if 'a' <= c <= 'f' { + return c - 'a' + 10; + } + return c - 'A' + 10; +} + +func read_escaped_char(t *Tokenizer) u8 { + let c u8; + tokenizer_next(t); + if '0' <= *t.program <= '7' { + c = *t.program - '0'; + if '0' <= *(t.program+1) <= '7' { + tokenizer_next(t); + c = (c << 3) + (*t.program - '0'); + if '0' <= *(t.program+1) <= '7' { + tokenizer_next(t); + c = (c << 3) + (*t.program - '0'); + } + } + return c; + } + + if *t.program == 'x' { + tokenizer_next(t); + if !is_hex_digit(*t.program) { + eprintf("\033[1m\033[31m--> %s:%d:%d: error: invalid hex escape sequence\033[0m\n", t.file_name, t.line, t.col); + exit(1); + } + + while is_hex_digit(*t.program) { + c = (c << 4) + from_hex(*t.program); + tokenizer_next(t); + } + } + + if *t.program == 'a' { + return '\a'; + } + if *t.program == 'b' { + return '\b'; + } + if *t.program == 't' { + return '\t'; + } + if *t.program == 'n' { + return '\n'; + } + if *t.program == 'v' { + return '\v'; + } + if *t.program == 'f' { + return '\f'; + } + if *t.program == 'r' { + return '\r'; + } + + return *t.program; +} + +func tokenize_number(t *Tokenizer) *Token { + let tok *Token = new_token(t, TK_NUM); + + let digit_start *u8 = t.program; + + while isdigit(*t.program) { + tokenizer_next(t); + } + + tok.lit = strndup(digit_start, t.program-digit_start); + tok.len = t.program-digit_start; + tok.int_val = atoi(tok.lit); + + return tok; +} + +func tokenize_char(t *Tokenizer) *Token { + let tok *Token = new_token(t, TK_NUM); + let char_start *u8 = t.program; + tokenizer_next(t); + + let c u8; + if *t.program == '\\' { + c = read_escaped_char(t); + } else { + c = *t.program; + } + tokenizer_next_n(t, 2); + + tok.lit = strndup(char_start, t.program - char_start); + tok.len = t.program - char_start; + tok.int_val = c; + + return tok; +} + +func tokenize_string(t *Tokenizer) *Token { + let tok *Token = new_token(t, TK_STR); + + let string_start *u8 = t.program; + + tokenizer_next(t); // skip start `"` + + let end *u8 = string_end(t, t.program); + let buf *u8 = alloc(end - t.program + 1); + if buf == nil { + eprintf("memory allocation failed\n"); + exit(1); + } + let len i32 = 0; + + while t.program < end { + if *t.program == '\\' { + buf[len++] = read_escaped_char(t); + } else { + buf[len++] = *t.program; + } + + tokenizer_next(t); + } + buf[len] = '\0'; // null terminator + + tokenizer_next(t); // skip end `"` + + tok.lit = strndup(string_start, t.program - string_start); + tok.len = t.program - string_start; + + tok.str_val = buf; + + return tok; +} + +func tokenize_ident(t *Tokenizer) *Token { + let tok *Token = new_token(t, TK_IDENT); + + let ident_start *u8 = t.program; + while isalpha(*t.program) || isdigit(*t.program) || *t.program == 95 { + tokenizer_next(t); + } + + tok.lit = strndup(ident_start, t.program-ident_start); + tok.len = t.program-ident_start; + + return tok; +} + +func tokenize(t *Tokenizer) *Token { + let head Token = {}; + let cur *Token = &head; + + while *t.program != nil { + skip_single_line_comment(t); + + if isdigit(*t.program) { + cur = cur.next = tokenize_number(t); + } else if isalpha(*t.program) { + cur = cur.next = tokenize_ident(t); + } else if *t.program == '\'' { + cur = cur.next = tokenize_char(t); + } else if *t.program == '\"' { + cur = cur.next = tokenize_string(t); + } else if *t.program == ' ' { // Space + tokenizer_next(t); + } else if *t.program == '\n' { // New line + tokenizer_next(t); + } else if *t.program == '\t' { // Tab + tokenizer_next(t); + } else { + let tok *Token = tokenize_punct(t); + if tok != nil { + cur = cur.next = tok; + } else { + let invalid_tok *Token = new_token(t, TK_UNKOWN); + invalid_tok.lit = strndup(t.program, 1); + invalid_tok.len = 1; + print_error(invalid_tok, "unkown character found"); + } + } + } + + cur = cur.next = new_token(t, TK_EOF); + cur.lit = "EOF"; + cur.len = 1; + + return head.next; +} +