LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/masyagin1998[P]GCI/src/lexer/lexer.c
// Function: dump_lexer_to_xml_file
void dump_lexer_to_xml_file(FILE*f, lexer_type_t lexer)
{
    struct TOKEN*tok;
    char tmp_str[4096];

    fprintf(f, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
    fprintf(f, "<tokens>\n");

    lexer_next_token(lexer, &tok);
    while (tok->token_type != TOKEN_TYPE_EOF) {
        token_to_xml_string(tok, tmp_str, sizeof(tmp_str));
        fprintf(f, "\t%s\n", tmp_str);
        token_free(tok);
        lexer_next_token(lexer, &tok);
    }
    token_free(tok);

    fprintf(f, "</tokens>\n");        
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1010, %rsp           # imm = 0x1010
movq %rsi, %r14
movq %rdi, %rbx
leaq 0xc2fc(%rip), %rdi      # 0xe62c
pushq $0x27
popq %rsi
pushq $0x1
popq %r15
movq %r15, %rdx
movq %rbx, %rcx
callq 0x1190
leaq 0xc30b(%rip), %rdi      # 0xe654
pushq $0x9
popq %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x1190
leaq 0x8(%rsp), %r15
leaq 0x10(%rsp), %r12
leaq 0xc2f6(%rip), %r13      # 0xe65e
movq %r14, %rdi
movq %r15, %rsi
callq 0x1c9f
movq 0x8(%rsp), %rdi
cmpl $0x26, (%rdi)
je 0x23a6
movl $0x1000, %edx           # imm = 0x1000
movq %r12, %rsi
callq 0x2887
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
xorl %eax, %eax
callq 0x1100
movq 0x8(%rsp), %rdi
callq 0x297c
jmp 0x2368
callq 0x297c
leaq 0xc2b1(%rip), %rdi      # 0xe663
pushq $0xa
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rcx
callq 0x1190
addq $0x1010, %rsp           # imm = 0x1010
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/masyagin1998[P]GCI/src/lexer/token.c
// Function: token_read_keyword
void token_read_keyword(struct TOKEN**tok, const struct POS*pos, enum TOKEN_TYPE tok_type, const char*keyword, size_t keyword_len)
{
    struct TOKEN*new_tok;
    struct POS p = (*pos);
    size_t i;

    PREFIX_UNUSED(keyword);
    
    new_tok = create_token();

    new_tok->token_type = tok_type;
    new_tok->group_type = GROUP_TYPE_KEYWORDS;

    i = 0;
    while (i != keyword_len) {
        p = pos_next(&p);
        i++;
    }

    new_tok->frag.starting = (*pos);
    new_tok->frag.following = p;

    (*tok) = new_tok;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %r8, %r15
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x20(%rsi), %rax
movq %rsp, %r13
movq %rax, 0x20(%r13)
movups (%rsi), %xmm0
movups 0x10(%rsi), %xmm1
movaps %xmm1, 0x10(%r13)
movaps %xmm0, (%r13)
callq 0x23e8
movq %rax, %r12
movl %ebp, (%rax)
andl $0x0, 0x4(%rax)
leaq 0x30(%rsp), %rbp
subq $0x1, %r15
jb 0x24a1
movq %rbp, %rdi
movq %r13, %rsi
callq 0x2a9a
movq 0x50(%rsp), %rax
movq %rax, 0x20(%rsp)
movups 0x30(%rsp), %xmm0
movups 0x40(%rsp), %xmm1
movaps %xmm1, 0x10(%rsp)
movaps %xmm0, (%rsp)
jmp 0x2471
movq 0x20(%r14), %rax
movq %rax, 0x28(%r12)
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movups %xmm1, 0x18(%r12)
movups %xmm0, 0x8(%r12)
movaps (%rsp), %xmm0
movaps 0x10(%rsp), %xmm1
movups %xmm0, 0x30(%r12)
movups %xmm1, 0x40(%r12)
movq 0x20(%rsp), %rax
movq %rax, 0x50(%r12)
movq %r12, (%rbx)
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/masyagin1998[P]GCI/src/lexer/token.c
// Function: token_read_number
int token_read_number(struct TOKEN**tok, const struct POS*pos)
{
    enum LEXER_CODES r = LEXER_OK;
    
    struct TOKEN*new_tok;
    struct POS p = (*pos);
    
    new_tok = create_token();

    new_tok->token_type = TOKEN_TYPE_NUMBER;
    new_tok->group_type = GROUP_TYPE_NUMBERS;

    while (pos_is_digit(&p)) {
        p = pos_next(&p);
    }
    if (pos_get_code(&p) == '.') {
        r = LEXER_INVALID_TOKEN;
        p = pos_next(&p);
        while (pos_is_digit(&p)) {
            r = LEXER_OK;
            p = pos_next(&p);
        }
    }

    new_tok->frag.starting = (*pos);
    new_tok->frag.following = p;

    char tmp_str[64];
    snprintf(tmp_str, sizeof(tmp_str),
             "%.*s",
             (int) (new_tok->frag.following.index - new_tok->frag.starting.index),
             new_tok->frag.starting.program + new_tok->frag.starting.index);

    new_tok->int_val = atoll(tmp_str);

    (*tok) = new_tok;

    return r;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rsi, %r15
movq %rdi, %rbx
movq 0x20(%rsi), %rax
movq %rsp, %r12
movq %rax, 0x20(%r12)
movups (%rsi), %xmm0
movups 0x10(%rsi), %xmm1
movaps %xmm1, 0x10(%r12)
movaps %xmm0, (%r12)
callq 0x23e8
movq %rax, %r14
movabsq $0x20000001d, %rax      # imm = 0x20000001D
movq %rax, (%r14)
leaq 0x30(%rsp), %r13
movq %r12, %rdi
callq 0x29f3
testl %eax, %eax
je 0x2572
movq %r13, %rdi
movq %r12, %rsi
callq 0x2a9a
movq 0x50(%rsp), %rax
movq %rax, 0x20(%rsp)
movups 0x30(%rsp), %xmm0
movups 0x40(%rsp), %xmm1
movaps %xmm1, 0x10(%rsp)
movaps %xmm0, (%rsp)
jmp 0x253c
movq %rsp, %rdi
callq 0x29b8
xorl %ebp, %ebp
cmpl $0x2e, %eax
jne 0x25ed
leaq 0x30(%rsp), %r12
movq %rsp, %r13
movq %r12, %rdi
movq %r13, %rsi
callq 0x2a9a
movq 0x20(%r12), %rax
movq %rax, 0x20(%r13)
movups (%r12), %xmm0
movups 0x10(%r12), %xmm1
movaps %xmm1, 0x10(%r13)
movaps %xmm0, (%r13)
pushq $-0x1
popq %rbp
movq %r13, %rdi
callq 0x29f3
testl %eax, %eax
je 0x25ed
movq %r12, %rdi
movq %r13, %rsi
callq 0x2a9a
movq 0x50(%rsp), %rax
movq %rax, 0x20(%rsp)
movups 0x30(%rsp), %xmm0
movups 0x40(%rsp), %xmm1
movaps %xmm1, 0x10(%rsp)
movaps %xmm0, (%rsp)
xorl %ebp, %ebp
jmp 0x25b5
movq 0x20(%r15), %rax
movq %rax, 0x28(%r14)
movups (%r15), %xmm0
movups 0x10(%r15), %xmm1
movups %xmm1, 0x18(%r14)
movups %xmm0, 0x8(%r14)
movaps (%rsp), %xmm0
movaps 0x10(%rsp), %xmm1
movups %xmm0, 0x30(%r14)
movups %xmm1, 0x40(%r14)
movq 0x20(%rsp), %rax
movq %rax, 0x50(%r14)
movl 0x50(%r14), %ecx
movq 0x28(%r14), %r8
subl %r8d, %ecx
addq 0x8(%r14), %r8
leaq 0xc05c(%rip), %rdx      # 0xe696
leaq 0x30(%rsp), %r15
pushq $0x40
popq %rsi
movq %r15, %rdi
xorl %eax, %eax
callq 0x10b0
movq %r15, %rdi
callq 0x10e0
movq %rax, 0x58(%r14)
movq %r14, (%rbx)
movl %ebp, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/masyagin1998[P]GCI/src/lexer/token.c
// Function: token_read_ident
void token_read_ident(struct TOKEN**tok,  const struct POS*pos)
{
    struct TOKEN*new_tok;
    struct POS p = (*pos);
    
    new_tok = create_token();

    new_tok->token_type = TOKEN_TYPE_IDENT;
    new_tok->group_type = GROUP_TYPE_IDENTS;

    while (pos_is_digit(&p) || pos_is_letter(&p)) {
        p = pos_next(&p);
    }    

    new_tok->frag.starting = (*pos);
    new_tok->frag.following = p;

    snprintf(new_tok->str_val, sizeof(new_tok->str_val),
             "%.*s",
             (int) (new_tok->frag.following.index - new_tok->frag.starting.index),
             new_tok->frag.starting.program + new_tok->frag.starting.index);

    (*tok) = new_tok;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %rsi, %r15
movq %rdi, %rbx
movq 0x20(%rsi), %rax
movq %rsp, %r12
movq %rax, 0x20(%r12)
movups (%rsi), %xmm0
movups 0x10(%rsi), %xmm1
movaps %xmm1, 0x10(%r12)
movaps %xmm0, (%r12)
callq 0x23e8
movq %rax, %r14
movabsq $0x10000000c, %rax      # imm = 0x10000000C
movq %rax, (%r14)
leaq 0x28(%rsp), %r13
movq %r12, %rdi
callq 0x29f3
testl %eax, %eax
jne 0x26cf
movq %r12, %rdi
callq 0x2a09
testl %eax, %eax
je 0x26f9
movq %r13, %rdi
movq %r12, %rsi
callq 0x2a9a
movq 0x48(%rsp), %rax
movq %rax, 0x20(%rsp)
movups 0x28(%rsp), %xmm0
movups 0x38(%rsp), %xmm1
movaps %xmm1, 0x10(%rsp)
movaps %xmm0, (%rsp)
jmp 0x26b7
movq 0x20(%r15), %r8
movq %r8, 0x28(%r14)
movups (%r15), %xmm0
movups 0x10(%r15), %xmm1
movups %xmm1, 0x18(%r14)
movups %xmm0, 0x8(%r14)
movaps (%rsp), %xmm0
movaps 0x10(%rsp), %xmm1
movups %xmm0, 0x30(%r14)
movups %xmm1, 0x40(%r14)
movq 0x20(%rsp), %rcx
movq %rcx, 0x50(%r14)
movq %r14, %rdi
addq $0x58, %rdi
subl %r8d, %ecx
addq 0x8(%r14), %r8
leaq 0xbf51(%rip), %rdx      # 0xe696
pushq $0x20
popq %rsi
xorl %eax, %eax
callq 0x10b0
movq %r14, (%rbx)
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/masyagin1998[P]GCI/src/lexer/token.c
// Function: token_read_unknown
void token_read_unknown(struct TOKEN**tok, const struct POS*pos)
{
    struct TOKEN*new_tok;
    struct POS p = (*pos);

    new_tok = create_token();

    while (pos_is_unknown(&p)) {
        p = pos_next(&p);
    }

    new_tok->token_type = TOKEN_TYPE_UNKNOWN;
    new_tok->group_type = GROUP_TYPE_AUX;
    new_tok->frag.starting = (*pos);
    new_tok->frag.following = p;

    (*tok) = new_tok;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x20(%rsi), %rax
movq %rsp, %r12
movq %rax, 0x20(%r12)
movups (%rsi), %xmm0
movups 0x10(%rsi), %xmm1
movaps %xmm1, 0x10(%r12)
movaps %xmm0, (%r12)
callq 0x23e8
movq %rax, %r15
leaq 0x28(%rsp), %r13
movq %r12, %rdi
callq 0x2a31
testl %eax, %eax
je 0x2832
movq %r13, %rdi
movq %r12, %rsi
callq 0x2a9a
movq 0x48(%rsp), %rax
movq %rax, 0x20(%rsp)
movups 0x28(%rsp), %xmm0
movups 0x38(%rsp), %xmm1
movaps %xmm1, 0x10(%rsp)
movaps %xmm0, (%rsp)
jmp 0x27fc
movabsq $0x400000027, %rax      # imm = 0x400000027
movq %rax, (%r15)
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movups %xmm0, 0x8(%r15)
movups %xmm1, 0x18(%r15)
movq 0x20(%r14), %rax
movq %rax, 0x28(%r15)
movaps (%rsp), %xmm0
movaps 0x10(%rsp), %xmm1
movups %xmm0, 0x30(%r15)
movups %xmm1, 0x40(%r15)
movq 0x20(%rsp), %rax
movq %rax, 0x50(%r15)
movq %r15, (%rbx)
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/masyagin1998[P]GCI/src/lexer/token.c
// Function: token_to_xml_string
void token_to_xml_string(const struct TOKEN*tok, char*str, size_t len)
{
    switch (tok->group_type) {
    case GROUP_TYPE_KEYWORDS:
        TOKEN_GEN_STR("keyword");
        break;
    case GROUP_TYPE_IDENTS:
        TOKEN_GEN_STR("ident");
        break;
    case GROUP_TYPE_NUMBERS:
        TOKEN_GEN_STR("number");
        break;
    case GROUP_TYPE_OPS:
        TOKEN_GEN_STR("operator");
        break;
    case GROUP_TYPE_AUX:
        TOKEN_GEN_STR("aux");
        break;
    }
}

// Assembly:
pushq %rax
movl 0x4(%rdi), %eax
cmpq $0x4, %rax
ja 0x297a
leaq 0xbdd4(%rip), %rcx      # 0xe670
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x18(%rdi), %r8
movq 0x20(%rdi), %r9
movl 0x50(%rdi), %r10d
movq 0x28(%rdi), %r11
subl %r11d, %r10d
addq 0x8(%rdi), %r11
subq $0x8, %rsp
leaq 0xbdf7(%rip), %rcx      # 0xe6be
jmp 0x295a
movq 0x18(%rdi), %r8
movq 0x20(%rdi), %r9
movl 0x50(%rdi), %r10d
movq 0x28(%rdi), %r11
subl %r11d, %r10d
addq 0x8(%rdi), %r11
subq $0x8, %rsp
leaq 0xbdee(%rip), %rcx      # 0xe6dc
jmp 0x295a
movq 0x18(%rdi), %r8
movq 0x20(%rdi), %r9
movl 0x50(%rdi), %r10d
movq 0x28(%rdi), %r11
subl %r11d, %r10d
addq 0x8(%rdi), %r11
subq $0x8, %rsp
leaq 0xbdba(%rip), %rcx      # 0xe6cc
jmp 0x295a
movq 0x18(%rdi), %r8
movq 0x20(%rdi), %r9
movl 0x50(%rdi), %r10d
movq 0x28(%rdi), %r11
subl %r11d, %r10d
addq 0x8(%rdi), %r11
subq $0x8, %rsp
leaq 0xbd9d(%rip), %rcx      # 0xe6d3
jmp 0x295a
movq 0x18(%rdi), %r8
movq 0x20(%rdi), %r9
movl 0x50(%rdi), %r10d
movq 0x28(%rdi), %r11
subl %r11d, %r10d
addq 0x8(%rdi), %r11
subq $0x8, %rsp
leaq 0xbd6c(%rip), %rcx      # 0xe6c6
leaq 0xbd3a(%rip), %rax      # 0xe69b
movq %rsi, %rdi
movq %rdx, %rsi
movq %rax, %rdx
xorl %eax, %eax
pushq %rcx
pushq %r11
pushq %r10
callq 0x10b0
addq $0x20, %rsp
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/masyagin1998[P]GCI/src/lexer/pos.c
// Function: pos_is_unknown
int pos_is_unknown(const struct POS*pos)
{
    size_t i;
    const char symbols[] = { '|', '&', '=', '!', '<', '>', '+', '-', '*', '/', '%', '(', ')', '{', '}', ',', ';', '.', ':' };
    
    if (pos_is_whitespace(pos) || pos_is_newline(pos) || pos_is_digit(pos) || pos_is_letter(pos)) {
        return 0;
    }

    for (i = 0; i < sizeof(symbols) / sizeof(char); i++) {
        if (symbols[i] == pos_get_code(pos)) {
            return 0;
        }
    }

    return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq (%rdi), %rax
movq 0x20(%rdi), %rcx
movzbl (%rax,%rcx), %r15d
xorl %ebx, %ebx
cmpl $0x9, %r15d
je 0x2a92
cmpl $0x20, %r15d
je 0x2a92
movq %rdi, %r14
callq 0x29c4
leal -0x3a(%r15), %ecx
cmpb $-0xb, %cl
ja 0x2a92
testl %eax, %eax
jne 0x2a92
movq %r14, %rdi
callq 0x2a09
testl %eax, %eax
jne 0x2a92
xorl %eax, %eax
pushq $0x1
popq %rbx
leaq 0xbc63(%rip), %rcx      # 0xe6e0
cmpq $0x13, %rax
je 0x2a92
leaq 0x1(%rax), %rdx
cmpb (%rax,%rcx), %r15b
movq %rdx, %rax
jne 0x2a7d
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/masyagin1998[P]GCI/src/lexer/pos.c
// Function: pos_next
struct POS pos_next(const struct POS*pos)
{
    size_t new_line = pos->line;
    size_t new_pos = pos->pos;
    size_t new_index = pos->index;

    if (!pos_is_eof(pos)) {
        if (pos_is_newline(pos)) {
            new_line++;
            new_pos = 1;
        } else {
            new_pos++;
        }
        new_index++;
    }

    return (struct POS) {
        .program     = pos->program,
        .program_len = pos->program_len,
        .line        = new_line,
        .pos         = new_pos,    
        .index       = new_index,
    };
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rsi), %r15
movq 0x10(%rsi), %r12
movq 0x18(%rsi), %r13
movq 0x20(%rsi), %rbp
movq %r15, %rax
subq $0x1, %rax
setb %cl
cmpq %rax, %rbp
sete %al
orb %cl, %al
jne 0x2aeb
movq %r14, %rdi
callq 0x29c4
incq %r13
movl %eax, %ecx
addq %rcx, %r12
testl %eax, %eax
pushq $0x1
popq %rax
cmovneq %rax, %r13
incq %rbp
movq (%r14), %rax
movq %rax, (%rbx)
movq %r15, 0x8(%rbx)
movq %r12, 0x10(%rbx)
movq %r13, 0x18(%rbx)
movq %rbp, 0x20(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/masyagin1998[P]GCI/src/lexer/pos.c
// Function: pos_check_keyword
int pos_check_keyword(const struct POS*pos, const char*keyword, size_t keyword_len)
{
    size_t i = 0;

    struct POS p = (*pos);

    while (i != keyword_len) {
        if (keyword[i] != pos_get_code(&p)) {
            return 0;
        }
        p = pos_next(&p);
        i++;
    }

    if (!pos_is_letter(&p) && !pos_is_digit(&p)) {
        return 1;
    }

    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq 0x20(%rdi), %rax
movq %rsp, %r15
movq %rax, 0x20(%r15)
movups (%rdi), %xmm0
movups 0x10(%rdi), %xmm1
movaps %xmm1, 0x10(%r15)
movaps %xmm0, (%r15)
xorl %r13d, %r13d
leaq 0x28(%rsp), %r12
cmpq %r13, %rbx
je 0x2b8d
movq (%rsp), %rax
movq 0x20(%rsp), %rcx
movb (%rax,%rcx), %al
cmpb (%r14,%r13), %al
jne 0x2bb0
movq %r12, %rdi
movq %r15, %rsi
callq 0x2a9a
movq 0x48(%rsp), %rax
movq %rax, 0x20(%rsp)
movups 0x28(%rsp), %xmm0
movups 0x38(%rsp), %xmm1
movaps %xmm1, 0x10(%rsp)
movaps %xmm0, (%rsp)
incq %r13
jmp 0x2b49
movq %rsp, %rdi
callq 0x2a09
testl %eax, %eax
jne 0x2bb0
movq (%rsp), %rax
movq 0x20(%rsp), %rcx
movb (%rax,%rcx), %al
addb $-0x3a, %al
cmpb $-0xa, %al
jae 0x2bb0
pushq $0x1
popq %rax
jmp 0x2bb2
xorl %eax, %eax
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/masyagin1998[P]GCI/src/parser/parser.c
// Function: print_parser_error
void print_parser_error(const struct PARSER_ERROR*err)
{
    size_t i;
    
    char tmp[128];

    token_type_to_str(err->get_tok, tmp, sizeof(tmp));
    fprintf(stderr, "%zu:%zu: error: invalid token: \"%s\"; expected tokens: ",
            err->line, err->pos, tmp);

    i = 0;
    while (err->exp_toks[i] != TOKEN_TYPE_EOF) {
        token_type_to_str(err->exp_toks[i], tmp, sizeof(tmp));        
        fprintf(stderr, "\"%s\" ", tmp);
        i++;
    }

    fprintf(stderr, "\n");
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdi, %rbx
movl 0x40(%rdi), %edi
movq %rsp, %r14
movl $0x80, %edx
movq %r14, %rsi
callq 0x3006
movq 0x12de7(%rip), %r12     # 0x15ff0
movq (%r12), %rdi
movq 0x48(%rbx), %rdx
movq 0x50(%rbx), %rcx
leaq 0xb698(%rip), %rsi      # 0xe8b4
movq %r14, %r8
xorl %eax, %eax
callq 0x1100
leaq 0xb6be(%rip), %r15      # 0xe8eb
movl (%rbx), %edi
cmpl $0x26, %edi
je 0x3258
movl $0x80, %edx
movq %r14, %rsi
callq 0x3006
movq (%r12), %rdi
movq %r15, %rsi
movq %r14, %rdx
xorl %eax, %eax
callq 0x1100
addq $0x4, %rbx
jmp 0x322d
movq (%r12), %rsi
pushq $0xa
popq %rdi
callq 0x10c0
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/masyagin1998[P]GCI/src/parser/parser.c
// Function: set_parser_error
static void set_parser_error(struct PARSER*parser, size_t n, ...)
{
    size_t i;
    
    va_list args;
    va_start(args, n);
    for (i = 0; i < n; i++) {
        parser->err.exp_toks[i] = va_arg(args, enum TOKEN_TYPE);
    }
    va_end(args);
    parser->err.exp_toks[n] = TOKEN_TYPE_EOF;
    parser->err.get_tok = (parser->tok)->token_type;
    parser->err.line = (parser->tok)->frag.starting.line;
    parser->err.pos = (parser->tok)->frag.starting.pos;
}

// Assembly:
subq $0x58, %rsp
leaq -0x60(%rsp), %r10
movq %rdx, 0x10(%r10)
movq %rcx, 0x18(%r10)
movq %r8, 0x20(%r10)
movq %r9, 0x28(%r10)
testb %al, %al
je 0x32b7
movaps %xmm0, -0x30(%rsp)
movaps %xmm1, -0x20(%rsp)
movaps %xmm2, -0x10(%rsp)
movaps %xmm3, (%rsp)
movaps %xmm4, 0x10(%rsp)
movaps %xmm5, 0x20(%rsp)
movaps %xmm6, 0x30(%rsp)
movaps %xmm7, 0x40(%rsp)
movq %r10, -0x70(%rsp)
leaq 0x60(%rsp), %rdx
movq %rdx, -0x78(%rsp)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, -0x80(%rsp)
movl $0x10, %eax
xorl %ecx, %ecx
cmpq %rcx, %rsi
je 0x330e
cmpl $0x28, %eax
ja 0x32f7
movq %rdx, %r8
movl %eax, %edx
addq %r10, %rdx
addl $0x8, %eax
movl %eax, -0x80(%rsp)
jmp 0x3300
leaq 0x8(%rdx), %r8
movq %r8, -0x78(%rsp)
movl (%rdx), %edx
movl %edx, 0x10(%rdi,%rcx,4)
incq %rcx
movq %r8, %rdx
jmp 0x32dc
movl $0x26, 0x10(%rdi,%rsi,4)
movq 0x8(%rdi), %rax
movl (%rax), %ecx
movl %ecx, 0x50(%rdi)
movups 0x18(%rax), %xmm0
movups %xmm0, 0x58(%rdi)
addq $0x58, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/masyagin1998[P]GCI/src/parser/parser.c
// Function: ident_ast_read
static enum PARSER_CODES ident_ast_read(struct PARSER*parser, struct IDENT_AST**ident)
{
    enum PARSER_CODES r;
    
    if ((parser->tok)->token_type != TOKEN_TYPE_IDENT) {
        r = PARSER_INVALID_TOKEN;
        set_parser_error(parser, 1, TOKEN_TYPE_IDENT);
        goto err0;
    }
    
    (*ident) = create_ident_ast((parser->tok)->str_val,
                                (parser->tok)->frag.starting.line,
                                (parser->tok)->frag.starting.pos);

    token_free((parser->tok));
    lexer_next_token(parser->lexer, &(parser->tok));

    return PARSER_OK;

 err0:
    (*ident) = NULL;
    return r;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rdi), %rax
cmpl $0xc, (%rax)
jne 0x3370
leaq 0x8(%r14), %r15
leaq 0x58(%rax), %rdi
movq 0x18(%rax), %rsi
movq 0x20(%rax), %rdx
callq 0x843b
movq %rax, (%rbx)
movq 0x8(%r14), %rdi
callq 0x297c
movq (%r14), %rdi
movq %r15, %rsi
callq 0x1c9f
xorl %eax, %eax
jmp 0x3387
pushq $0x1
popq %rsi
pushq $0xc
popq %rdx
movq %r14, %rdi
xorl %eax, %eax
callq 0x3273
andq $0x0, (%rbx)
pushq $-0x1
popq %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/masyagin1998[P]GCI/src/parser/parser.c
// Function: function_call_ast_read
static enum PARSER_CODES function_call_ast_read(struct PARSER*parser, struct FUNCTION_CALL_AST**function_call, struct IDENT_AST*function_name)
{
    enum PARSER_CODES r;

    struct ARGS_LIST_AST*args_list = NULL;

    if ((parser->tok)->token_type != TOKEN_TYPE_LPAREN) {
        r = PARSER_INVALID_TOKEN;
        set_parser_error(parser, 1, TOKEN_TYPE_LPAREN);
        goto err0;
    }
    token_free((parser->tok));
    lexer_next_token(parser->lexer, &(parser->tok));

    if ((parser->tok)->token_type != TOKEN_TYPE_RPAREN) {
        r = args_list_ast_read(parser, &args_list);
        if (r != PARSER_OK) {
            goto err0;
        }
    }

    if ((parser->tok)->token_type != TOKEN_TYPE_RPAREN) {
        r = PARSER_INVALID_TOKEN;
        set_parser_error(parser, 1, TOKEN_TYPE_RPAREN);
        goto err1;
    }
    token_free((parser->tok));
    lexer_next_token(parser->lexer, &(parser->tok));    
    
    (*function_call) = create_function_call_ast(function_name, args_list,
                                                (parser->tok)->frag.starting.line,
                                                (parser->tok)->frag.starting.pos);

    return PARSER_OK;

 err1:
    if (args_list != NULL) {
        args_list_ast_free(args_list);
    }
 err0:
    (*function_call) = NULL;
    return r;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
andq $0x0, 0x8(%rsp)
movq %rdi, %r14
movq 0x8(%rdi), %rdi
cmpl $0x1b, (%rdi)
jne 0x3d44
movq %rdx, %r15
leaq 0x8(%r14), %r12
callq 0x297c
movq (%r14), %rdi
movq %r12, %rsi
callq 0x1c9f
movq 0x8(%r14), %rdi
cmpl $0x1c, (%rdi)
jne 0x3d5c
callq 0x297c
movq (%r14), %rdi
movq %r12, %rsi
callq 0x1c9f
movq 0x8(%rsp), %rsi
movq 0x8(%r14), %rax
movq 0x18(%rax), %rdx
movq 0x20(%rax), %rcx
movq %r15, %rdi
callq 0x8254
movq %rax, %r15
xorl %ebp, %ebp
jmp 0x3d72
xorl %r15d, %r15d
pushq $0x1
popq %rsi
pushq $0x1b
popq %rdx
movq %r14, %rdi
xorl %eax, %eax
callq 0x3273
pushq $-0x1
popq %rbp
jmp 0x3d72
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x44ae
testl %eax, %eax
je 0x3d84
movl %eax, %ebp
xorl %r15d, %r15d
movq %r15, (%rbx)
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq (%r12), %rdi
cmpl $0x1c, (%rdi)
je 0x3d14
xorl %r15d, %r15d
pushq $0x1
popq %rsi
pushq $0x1c
popq %rdx
movq %r14, %rdi
xorl %eax, %eax
callq 0x3273
movq 0x8(%rsp), %rdi
pushq $-0x1
popq %rbp
testq %rdi, %rdi
je 0x3d72
callq 0x7281
jmp 0x3d6f
// File: /workspace/github_c_makefile_star2_O2/masyagin1998[P]GCI/src/parser/parser.c
// Function: eq_expr_ast_read
static enum PARSER_CODES eq_expr_ast_read(struct PARSER*parser, struct EQ_EXPR_AST**eq_expr)
{
    enum PARSER_CODES r;

    struct RELATIONAL_EXPR_AST*left = NULL;
    enum AST_EQ_OP eq_op = AST_EQ_OP_EQEQ;
    struct RELATIONAL_EXPR_AST*right = NULL;

    r = relational_expr_ast_read(parser, &left);
    if (r != PARSER_OK) {
        goto err0;
    }

    if (((parser->tok)->token_type == TOKEN_TYPE_EQEQ) || ((parser->tok)->token_type == TOKEN_TYPE_NEQ)) {
        if ((parser->tok)->token_type == TOKEN_TYPE_EQEQ) {
            eq_op = AST_EQ_OP_EQEQ;
        } else if ((parser->tok)->token_type == TOKEN_TYPE_NEQ) {
            eq_op = AST_EQ_OP_NEQ;
        }

        token_free((parser->tok));
        lexer_next_token(parser->lexer, &(parser->tok));

        r = relational_expr_ast_read(parser, &right);
        if (r != PARSER_OK) {
            goto err1;
        }
    }

    (*eq_expr) = create_eq_expr_ast(left, eq_op, right,
                                    (parser->tok)->frag.starting.line,
                                    (parser->tok)->frag.starting.pos);

    return PARSER_OK;

 err1:
    relational_expr_ast_free(left);
 err0:
    (*eq_expr) = NULL;
    return r;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
leaq 0x8(%rsp), %rsi
andq $0x0, (%rsi)
movq %rdi, %r14
andq $0x0, (%rsp)
callq 0x4a3b
movl %eax, %ebp
xorl %eax, %eax
testl %ebp, %ebp
jne 0x4a29
movq 0x8(%r14), %rdi
movl (%rdi), %r12d
leal -0xf(%r12), %ecx
cmpl $0x1, %ecx
ja 0x49fc
leaq 0x8(%r14), %r15
callq 0x297c
movq (%r14), %rdi
movq %r15, %rsi
callq 0x1c9f
movq %rsp, %rsi
movq %r14, %rdi
callq 0x4a3b
testl %eax, %eax
je 0x4a00
movl %eax, %ebp
movq 0x8(%rsp), %rdi
callq 0x77bf
xorl %eax, %eax
jmp 0x4a29
xorl %edx, %edx
jmp 0x4a10
xorl %eax, %eax
cmpl $0x10, %r12d
sete %al
movq (%rsp), %rdx
movq (%r15), %rdi
movq 0x8(%rsp), %rsi
movq 0x18(%rdi), %rcx
movq 0x20(%rdi), %r8
movq %rsi, %rdi
movl %eax, %esi
callq 0x7626
xorl %ebp, %ebp
movq %rax, (%rbx)
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/masyagin1998[P]GCI/src/parser/parser.c
// Function: relational_expr_ast_read
static enum PARSER_CODES relational_expr_ast_read(struct PARSER*parser, struct RELATIONAL_EXPR_AST**relational_expr)
{
    enum PARSER_CODES r;

    struct ADDITIVE_EXPR_AST*left = NULL;
    enum AST_REL_OP rel_op = AST_REL_OP_LT;
    struct ADDITIVE_EXPR_AST*right = NULL;

    r = additive_expr_ast_read(parser, &left);
    if (r != PARSER_OK) {
        goto  err0;
    }

    if (((parser->tok)->token_type == TOKEN_TYPE_LT) || ((parser->tok)->token_type == TOKEN_TYPE_GT) ||
        ((parser->tok)->token_type == TOKEN_TYPE_LE) || ((parser->tok)->token_type == TOKEN_TYPE_GE)) {
        if ((parser->tok)->token_type == TOKEN_TYPE_LT) {
            rel_op = AST_REL_OP_LT;
        } else if ((parser->tok)->token_type == TOKEN_TYPE_GT) {
            rel_op = AST_REL_OP_GT;
        } else if ((parser->tok)->token_type == TOKEN_TYPE_LE) {
            rel_op = AST_REL_OP_LE;
        } else if ((parser->tok)->token_type == TOKEN_TYPE_GE) {
            rel_op = AST_REL_OP_GE;
        }

        token_free((parser->tok));
        lexer_next_token(parser->lexer, &(parser->tok));

        r = additive_expr_ast_read(parser, &right);
        if (r != PARSER_OK) {
            goto err1;
        }
    }

    (*relational_expr) = create_relational_expr_ast(left, rel_op, right,
                                                    (parser->tok)->frag.starting.line,
                                                    (parser->tok)->frag.starting.pos);

    return PARSER_OK;

 err1:
    additive_expr_ast_free(left);
 err0:
    (*relational_expr) = NULL;
    return r;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
leaq 0x10(%rsp), %rsi
andq $0x0, (%rsi)
movq %rdi, %r14
andq $0x0, 0x8(%rsp)
callq 0x4af8
movl %eax, %ebp
xorl %eax, %eax
testl %ebp, %ebp
jne 0x4ae4
movq 0x8(%r14), %rdi
movl (%rdi), %r13d
leal -0x11(%r13), %r12d
cmpl $0x3, %r12d
ja 0x4ab1
leaq 0x8(%r14), %r15
callq 0x297c
movq (%r14), %rdi
movq %r15, %rsi
callq 0x1c9f
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x4af8
testl %eax, %eax
je 0x4ab5
movl %eax, %ebp
movq 0x10(%rsp), %rdi
callq 0x795d
xorl %eax, %eax
jmp 0x4ae4
xorl %edx, %edx
jmp 0x4acb
addl $-0x12, %r13d
xorl %eax, %eax
cmpl $0x3, %r13d
cmovbl %r12d, %eax
movq 0x8(%rsp), %rdx
movq (%r15), %rdi
movq 0x10(%rsp), %rsi
movq 0x18(%rdi), %rcx
movq 0x20(%rdi), %r8
movq %rsi, %rdi
movl %eax, %esi
callq 0x77e2
xorl %ebp, %ebp
movq %rax, (%rbx)
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/masyagin1998[P]GCI/src/parser/ast.c
// Function: create_unit_ast
struct UNIT_AST*create_unit_ast(struct FUNCTION_DECL_AST**functions, size_t functions_len,
                                size_t line, size_t pos)
{
    struct UNIT_AST*unit_ast;
    SAFE_MALLOC(unit_ast, 1);
    unit_ast->functions = functions;
    unit_ast->functions_len = functions_len;
    
    unit_ast->line = line;
    unit_ast->pos = pos;
    
    return unit_ast;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
pushq $0x20
popq %rdi
callq 0x1130
testq %rax, %rax
je 0x55f4
movq %r12, (%rax)
movq %r15, 0x8(%rax)
movq %r14, 0x10(%rax)
movq %rbx, 0x18(%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x109f5(%rip), %rax     # 0x15ff0
movq (%rax), %rdi
leaq 0x8fb9(%rip), %rsi      # 0xe5be
leaq 0x93ac(%rip), %rdx      # 0xe9b8
pushq $0x1a
popq %rcx
pushq $0x20
popq %r8
xorl %eax, %eax
callq 0x1100
pushq $0x1
popq %rdi
callq 0x1180
// File: /workspace/github_c_makefile_star2_O2/masyagin1998[P]GCI/src/parser/ast.c
// Function: unit_ast_free
void unit_ast_free(struct UNIT_AST*ast)
{
    size_t i;
    for (i = 0; i < ast->functions_len; i++) {
        function_decl_ast_free(ast->functions[i]);
    }
    SAFE_FREE(ast->functions);
    SAFE_FREE(ast);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
movq (%rbx), %rdi
cmpq 0x8(%rbx), %r14
jae 0x56c3
movq (%rdi,%r14,8), %rdi
callq 0x56d7
incq %r14
jmp 0x56ac
callq 0x1030
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O2/masyagin1998[P]GCI/src/parser/ast.c
// Function: function_decl_ast_free
void function_decl_ast_free(struct FUNCTION_DECL_AST*ast)
{
    ident_ast_free(ast->function_name);
    if (ast->formal_parameters_list != NULL) {
        formal_parameters_list_ast_free(ast->formal_parameters_list);
    }
    body_ast_free(ast->body);
    SAFE_FREE(ast);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x1030
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x56f1
callq 0x588f
movq 0x10(%rbx), %rdi
callq 0x58c4
movq %rbx, %rdi
popq %rbx
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O2/masyagin1998[P]GCI/src/parser/ast.c
// Function: create_function_decl_ast
struct FUNCTION_DECL_AST*create_function_decl_ast(struct IDENT_AST*function_name,
                                                  struct FORMAL_PARAMETERS_LIST_AST*formal_parameters_list,
                                                  struct BODY_AST*body,
                                                  size_t line, size_t pos)
{
    struct FUNCTION_DECL_AST*function_ast;
    SAFE_MALLOC(function_ast, 1);
    function_ast->function_name = function_name;
    function_ast->formal_parameters_list = formal_parameters_list;
    function_ast->body = body;

    function_ast->line = line;
    function_ast->pos = pos;
    
    return function_ast;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
pushq $0x28
popq %rdi
callq 0x1130
testq %rax, %rax
je 0x5745
movq %r13, (%rax)
movq %r12, 0x8(%rax)
movq %r15, 0x10(%rax)
movq %r14, 0x18(%rax)
movq %rbx, 0x20(%rax)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq 0x108a4(%rip), %rax     # 0x15ff0
movq (%rax), %rdi
leaq 0x8e68(%rip), %rsi      # 0xe5be
leaq 0x925b(%rip), %rdx      # 0xe9b8
pushq $0x49
popq %rcx
pushq $0x28
popq %r8
xorl %eax, %eax
callq 0x1100
pushq $0x1
popq %rdi
callq 0x1180
// File: /workspace/github_c_makefile_star2_O2/masyagin1998[P]GCI/src/parser/ast.c
// Function: dump_function_decl_ast_to_file_inner
static void dump_function_decl_ast_to_file_inner(FILE*f, const struct FUNCTION_DECL_AST*ast, size_t spaces_num)
{
    PUT_SPACES(); fprintf(f, "<function line=\"%zu\" pos=\"%zu\">\n", ast->line, ast->pos);

    INC_SPACES_NUM();
    PUT_SPACES(); fprintf(f, "<function_name line=\"%zu\" pos=\"%zu\">\n", ast->line, ast->pos);
    INC_SPACES_NUM();
    dump_ident_ast_to_file_inner(f, ast->function_name, spaces_num);
    DEC_SPACES_NUM();
    PUT_SPACES(); fprintf(f, "</function_name>\n");
    if (ast->formal_parameters_list != NULL) {
        dump_formal_parameters_list_ast_to_file_inner(f, ast->formal_parameters_list, spaces_num);
    }
    dump_body_ast_to_file_inner(f, ast->body, spaces_num);
    DEC_SPACES_NUM();

    PUT_SPACES(); fprintf(f, "</function>\n");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x92c0(%rip), %rbp      # 0xea52
leaq 0x8a6d(%rip), %r13      # 0xe206
movq %rbp, %rsi
movq %r13, %rcx
xorl %eax, %eax
callq 0x1100
movq 0x18(%r15), %rdx
movq 0x20(%r15), %rcx
leaq 0x930d(%rip), %rsi      # 0xeac2
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1100
leaq 0x2(%r14), %r12
movq %rbx, %rdi
movq %rbp, %rsi
movl %r12d, %edx
movq %r13, %rcx
xorl %eax, %eax
callq 0x1100
movq 0x18(%r15), %rdx
movq 0x20(%r15), %rcx
leaq 0x92fe(%rip), %rsi      # 0xeae3
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1100
movq %r14, %rdx
addq $0x4, %rdx
movq (%r15), %rsi
movq %rbx, %rdi
callq 0x84b7
movq %rbx, %rdi
movq %rbp, %rsi
movl %r12d, %edx
movq %r13, %rcx
xorl %eax, %eax
callq 0x1100
leaq 0x92ee(%rip), %rdi      # 0xeb09
pushq $0x11
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rcx
callq 0x1190
movq 0x8(%r15), %rsi
testq %rsi, %rsi
je 0x583d
movq %rbx, %rdi
movq %r12, %rdx
callq 0x5967
movq 0x10(%r15), %rsi
movq %rbx, %rdi
movq %r12, %rdx
callq 0x5a77
leaq 0x91ff(%rip), %rsi      # 0xea52
leaq 0x89ac(%rip), %rcx      # 0xe206
movq %rbx, %rdi
movl %r14d, %edx
xorl %eax, %eax
callq 0x1100
leaq 0x92ad(%rip), %rdi      # 0xeb1b
pushq $0xc
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1190
// File: /workspace/github_c_makefile_star2_O2/masyagin1998[P]GCI/src/parser/ast.c
// Function: formal_parameters_list_ast_free
void formal_parameters_list_ast_free(struct FORMAL_PARAMETERS_LIST_AST*ast)
{
    size_t i;
    for (i = 0; i < ast->params_len; i++) {
        ident_ast_free(ast->params[i]);
    }
    SAFE_FREE(ast->params);
    SAFE_FREE(ast);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
movq (%rbx), %rdi
cmpq 0x8(%rbx), %r14
jae 0x58b0
movq (%rdi,%r14,8), %rdi
callq 0x1030
incq %r14
jmp 0x5899
callq 0x1030
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O2/masyagin1998[P]GCI/src/parser/ast.c
// Function: body_ast_free
void body_ast_free(struct BODY_AST*ast)
{
    size_t i;
    for (i = 0; i < ast->stmts_len; i++) {
        stmt_ast_free(ast->stmts[i]);
    }
    SAFE_FREE(ast->stmts);
    SAFE_FREE(ast);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
movq (%rbx), %rdi
cmpq 0x8(%rbx), %r14
jae 0x58e5
movq (%rdi,%r14,8), %rdi
callq 0x5b17
incq %r14
jmp 0x58ce
callq 0x1030
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O2/masyagin1998[P]GCI/src/parser/ast.c
// Function: create_formal_parameters_list_ast
struct FORMAL_PARAMETERS_LIST_AST*create_formal_parameters_list_ast(struct IDENT_AST**params, size_t params_len,
                                                                    size_t line, size_t pos)
{
    struct FORMAL_PARAMETERS_LIST_AST*formal_parameters_list;
    SAFE_MALLOC(formal_parameters_list, 1);
    formal_parameters_list->params = params;
    formal_parameters_list->params_len = params_len;

    formal_parameters_list->line = line;
    formal_parameters_list->pos = pos;
    
    return formal_parameters_list;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
pushq $0x20
popq %rdi
callq 0x1130
testq %rax, %rax
je 0x5935
movq %r12, (%rax)
movq %r15, 0x8(%rax)
movq %r14, 0x10(%rax)
movq %rbx, 0x18(%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x106b4(%rip), %rax     # 0x15ff0
movq (%rax), %rdi
leaq 0x8c78(%rip), %rsi      # 0xe5be
leaq 0x906b(%rip), %rdx      # 0xe9b8
pushq $0x7e
popq %rcx
pushq $0x20
popq %r8
xorl %eax, %eax
callq 0x1100
pushq $0x1
popq %rdi
callq 0x1180
// File: /workspace/github_c_makefile_star2_O2/masyagin1998[P]GCI/src/parser/ast.c
// Function: dump_formal_parameters_list_ast_to_file_inner
static void dump_formal_parameters_list_ast_to_file_inner(FILE*f, const struct FORMAL_PARAMETERS_LIST_AST*ast, size_t spaces_num)
{
    size_t i;
    
    PUT_SPACES(); fprintf(f, "<formal_parameters_list line=\"%zu\" pos=\"%zu\">\n", ast->line, ast->pos);
    INC_SPACES_NUM();
    for (i = 0; i < ast->params_len; i++) {
        dump_ident_ast_to_file_inner(f, ast->params[i], spaces_num);
    }
    DEC_SPACES_NUM();
    PUT_SPACES(); fprintf(f, "</formal_parameters_list>\n");
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x90d2(%rip), %rsi      # 0xea52
leaq 0x887f(%rip), %rcx      # 0xe206
xorl %r13d, %r13d
xorl %eax, %eax
callq 0x1100
movq 0x10(%r15), %rdx
movq 0x18(%r15), %rcx
leaq 0x9188(%rip), %rsi      # 0xeb28
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1100
movq %r14, %r12
addq $0x2, %r12
cmpq 0x8(%r15), %r13
jae 0x59ce
movq (%r15), %rax
movq (%rax,%r13,8), %rsi
movq %rbx, %rdi
movq %r12, %rdx
callq 0x84b7
incq %r13
jmp 0x59b1
leaq 0x907d(%rip), %rsi      # 0xea52
leaq 0x882a(%rip), %rcx      # 0xe206
movq %rbx, %rdi
movl %r14d, %edx
xorl %eax, %eax
callq 0x1100
leaq 0x9167(%rip), %rdi      # 0xeb57
pushq $0x1a
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rcx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x1190
// File: /workspace/github_c_makefile_star2_O2/masyagin1998[P]GCI/src/parser/ast.c
// Function: create_body_ast
struct BODY_AST*create_body_ast(struct STMT_AST**stmts, size_t stmts_len,
                                size_t line, size_t pos)
{
    struct BODY_AST*body;
    SAFE_MALLOC(body, 1);
    body->stmts = stmts;
    body->stmts_len = stmts_len;

    body->line = line;
    body->pos = pos;
    
    return body;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
pushq $0x20
popq %rdi
callq 0x1130
testq %rax, %rax
je 0x5a43
movq %r12, (%rax)
movq %r15, 0x8(%rax)
movq %r14, 0x10(%rax)
movq %rbx, 0x18(%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x105a6(%rip), %rax     # 0x15ff0
movq (%rax), %rdi
leaq 0x8b6a(%rip), %rsi      # 0xe5be
leaq 0x8f5d(%rip), %rdx      # 0xe9b8
pushq $0x20
popq %r8
movl $0xa8, %ecx
xorl %eax, %eax
callq 0x1100
pushq $0x1
popq %rdi
callq 0x1180
// File: /workspace/github_c_makefile_star2_O2/masyagin1998[P]GCI/src/parser/ast.c
// Function: dump_body_ast_to_file_inner
static void dump_body_ast_to_file_inner(FILE*f, const struct BODY_AST*ast, size_t spaces_num)
{
    size_t i;
    
    PUT_SPACES(); fprintf(f, "<body line=\"%zu\" pos=\"%zu\">\n", ast->line, ast->pos);
    INC_SPACES_NUM();
    for (i = 0; i < ast->stmts_len; i++) {
        dump_stmt_ast_to_file_inner(f, ast->stmts[i], spaces_num);
    }
    DEC_SPACES_NUM();
    PUT_SPACES(); fprintf(f, "</body>\n");
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x8fc2(%rip), %rsi      # 0xea52
leaq 0x876f(%rip), %rcx      # 0xe206
xorl %r13d, %r13d
xorl %eax, %eax
callq 0x1100
movq 0x10(%r15), %rdx
movq 0x18(%r15), %rcx
leaq 0x90c2(%rip), %rsi      # 0xeb72
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1100
movq %r14, %r12
addq $0x2, %r12
cmpq 0x8(%r15), %r13
jae 0x5ade
movq (%r15), %rax
movq (%rax,%r13,8), %rsi
movq %rbx, %rdi
movq %r12, %rdx
callq 0x5c2e
incq %r13
jmp 0x5ac1
leaq 0x8f6d(%rip), %rsi      # 0xea52
leaq 0x871a(%rip), %rcx      # 0xe206
movq %rbx, %rdi
movl %r14d, %edx
xorl %eax, %eax
callq 0x1100
leaq 0x908f(%rip), %rdi      # 0xeb8f
pushq $0x8
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rcx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x1190
// File: /workspace/github_c_makefile_star2_O2/masyagin1998[P]GCI/src/parser/ast.c
// Function: stmt_ast_free
void stmt_ast_free(struct STMT_AST*ast)
{
    switch (ast->type) {
    case AST_STMT_TYPE_DECL:
        decl_stmt_ast_free(ast->decl_stmt);
        break;
    case AST_STMT_TYPE_ASSIGN:
        assign_stmt_ast_free(ast->assign_stmt);
        break;
    case AST_STMT_TYPE_FUNCTION_CALL:
        function_call_stmt_ast_free(ast->function_call_stmt);
        break;
    case AST_STMT_TYPE_IF:
        if_stmt_ast_free(ast->if_stmt);
        break;
    case AST_STMT_TYPE_WHILE:
        while_stmt_ast_free(ast->while_stmt);
        break;
    case AST_STMT_TYPE_BREAK:
        break_stmt_ast_free(ast->break_stmt);
        break;
    case AST_STMT_TYPE_CONTINUE:
        continue_stmt_ast_free(ast->continue_stmt);
        break;
    case AST_STMT_TYPE_APPEND:
        append_stmt_ast_free(ast->append_stmt);
        break;
    case AST_STMT_TYPE_DELETE:
        delete_stmt_ast_free(ast->delete_stmt);
        break;        
    case AST_STMT_TYPE_RETURN:
        return_stmt_ast_free(ast->return_stmt);
        break;
    default:
        fprintf(stderr, "Invalid STMT_AST type: %d\n", ast->type);
        exit(EXIT_FAILURE);
        break;        
    }
    SAFE_FREE(ast);
}

// Assembly:
pushq %rbx
movl 0x8(%rdi), %edx
cmpq $0x9, %rdx
ja 0x5b95
movq %rdi, %rbx
leaq 0x8df1(%rip), %rax      # 0xe91c
movslq (%rax,%rdx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq (%rbx), %rdi
callq 0x1030
jmp 0x5b8c
movq (%rbx), %rdi
callq 0x5d9b
jmp 0x5b8c
movq (%rbx), %rdi
callq 0x5d37
jmp 0x5b8c
movq (%rbx), %rdi
callq 0x5d5f
jmp 0x5b8c
movq (%rbx), %rdi
callq 0x5cf6
jmp 0x5b8c
movq (%rbx), %rdi
callq 0x5d0b
jmp 0x5b8c
movq (%rbx), %rdi
callq 0x5cba
jmp 0x5b8c
movq (%rbx), %rdi
callq 0x5cd8
jmp 0x5b8c
movq (%rbx), %rdi
callq 0x5d7d
movq %rbx, %rdi
popq %rbx
jmp 0x1030
movq 0x10454(%rip), %rax     # 0x15ff0
movq (%rax), %rdi
leaq 0x8e23(%rip), %rsi      # 0xe9c9
xorl %eax, %eax
callq 0x1100
pushq $0x1
popq %rdi
callq 0x1180
// File: /workspace/github_c_makefile_star2_O2/masyagin1998[P]GCI/src/parser/ast.c
// Function: if_stmt_ast_free
void if_stmt_ast_free(struct IF_STMT_AST*ast)
{
    logical_or_expr_ast_free(ast->condition);
    body_ast_free(ast->if_body);
    if (ast->else_body != NULL) {
        body_ast_free(ast->else_body);
    }
    SAFE_FREE(ast);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x6424
movq 0x8(%rbx), %rdi
callq 0x58c4
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x5d2e
callq 0x58c4
movq %rbx, %rdi
popq %rbx
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O2/masyagin1998[P]GCI/src/parser/ast.c
// Function: create_decl_stmt_ast
struct DECL_STMT_AST*create_decl_stmt_ast(struct IDENT_AST*new_var_name,
                                          struct ASSIGNMENT_EXPR_AST*assignment,
                                          size_t line, size_t pos)
{
    struct DECL_STMT_AST*decl_stmt;
    SAFE_MALLOC(decl_stmt, 1);
    decl_stmt->new_var_name = new_var_name;
    decl_stmt->assignment = assignment;

    decl_stmt->line = line;
    decl_stmt->pos = pos;
    
    return decl_stmt;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
pushq $0x20
popq %rdi
callq 0x1130
testq %rax, %rax
je 0x5df1
movq %r12, (%rax)
movq %r15, 0x8(%rax)
movq %r14, 0x10(%rax)
movq %rbx, 0x18(%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x101f8(%rip), %rax     # 0x15ff0
movq (%rax), %rdi
leaq 0x87bc(%rip), %rsi      # 0xe5be
leaq 0x8baf(%rip), %rdx      # 0xe9b8
pushq $0x20
popq %r8
movl $0x162, %ecx            # imm = 0x162
xorl %eax, %eax
callq 0x1100
pushq $0x1
popq %rdi
callq 0x1180
// File: /workspace/github_c_makefile_star2_O2/masyagin1998[P]GCI/src/parser/ast.c
// Function: dump_decl_stmt_ast_to_file_inner
static void dump_decl_stmt_ast_to_file_inner(FILE*f, const struct DECL_STMT_AST*ast, size_t spaces_num)
{
    PUT_SPACES(); fprintf(f, "<decl_stmt line=\"%zu\" pos=\"%zu\">\n", ast->line, ast->pos);
    INC_SPACES_NUM();
    dump_ident_ast_to_file_inner(f, ast->new_var_name, spaces_num);
    PUT_SPACES(); fprintf(f, "<op>EQ</op>\n");
    dump_assignment_expr_ast_to_file_inner(f, ast->assignment, spaces_num);
    DEC_SPACES_NUM();
    PUT_SPACES(); fprintf(f, "</decl_stmt>\n");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r13
movq %rdi, %rbx
leaq 0x8c12(%rip), %r12      # 0xea52
leaq 0x83bf(%rip), %r15      # 0xe206
movq %r12, %rsi
movq %r15, %rcx
xorl %eax, %eax
callq 0x1100
movq 0x10(%r13), %rdx
movq 0x18(%r13), %rcx
leaq 0x8d35(%rip), %rsi      # 0xeb98
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1100
movq %r14, %rbp
addq $0x2, %rbp
movq (%r13), %rsi
movq %rbx, %rdi
movq %rbp, %rdx
callq 0x84b7
movq %rbx, %rdi
movq %r12, %rsi
movl %ebp, %edx
movq %r15, %rcx
xorl %eax, %eax
callq 0x1100
leaq 0x8d1e(%rip), %rdi      # 0xebba
pushq $0xc
popq %rsi
pushq $0x1
popq %r15
movq %r15, %rdx
movq %rbx, %rcx
callq 0x1190
movq 0x8(%r13), %rsi
movq %rbx, %rdi
movq %rbp, %rdx
callq 0x6d54
movq %rbx, %rdi
movq %r12, %rsi
movl %r14d, %edx
leaq 0x8339(%rip), %rcx      # 0xe206
xorl %eax, %eax
callq 0x1100
leaq 0x8cec(%rip), %rdi      # 0xebc7
pushq $0xd
popq %rsi
movq %r15, %rdx
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1190
// File: /workspace/github_c_makefile_star2_O2/masyagin1998[P]GCI/src/parser/ast.c
// Function: assignment_expr_ast_free
void assignment_expr_ast_free(struct ASSIGNMENT_EXPR_AST*ast)
{
    switch (ast->type) {
    case AST_ASSIGNMENT_EXPR_TYPE_OBJECT_LITERAL:
        object_literal_ast_free(ast->object_literal);
        break;
    case AST_ASSIGNMENT_EXPR_TYPE_ARRAY_LITERAL:
        array_literal_ast_free(ast->array_literal);
        break;        
    case AST_ASSIGNMENT_EXPR_TYPE_LOGICAL_OR_EXPR:
        logical_or_expr_ast_free(ast->logical_or_expr);
        break;
    default:
        fprintf(stderr, "Invalid ASSIGNMENT_EXPR_AST type: %d\n", ast->type);
        exit(EXIT_FAILURE);        
        break;
    }
    SAFE_FREE(ast);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl 0x8(%rdi), %edx
cmpl $0x2, %edx
je 0x5f20
cmpl $0x1, %edx
je 0x5f16
testl %edx, %edx
jne 0x5f31
movq (%rbx), %rdi
callq 0x6da0
jmp 0x5f28
movq (%rbx), %rdi
callq 0x6dd5
jmp 0x5f28
movq (%rbx), %rdi
callq 0x6424
movq %rbx, %rdi
popq %rbx
jmp 0x1030
movq 0x100b8(%rip), %rax     # 0x15ff0
movq (%rax), %rdi
leaq 0x8aea(%rip), %rsi      # 0xea2c
xorl %eax, %eax
callq 0x1100
pushq $0x1
popq %rdi
callq 0x1180
// File: /workspace/github_c_makefile_star2_O2/masyagin1998[P]GCI/src/parser/ast.c
// Function: create_assign_stmt_ast
struct ASSIGN_STMT_AST*create_assign_stmt_ast(struct VARIABLE_AST*var_name,
                                              struct ASSIGNMENT_EXPR_AST*assignment,
                                              size_t line, size_t pos)
{
    struct ASSIGN_STMT_AST*assign_stmt;
    SAFE_MALLOC(assign_stmt, 1);
    assign_stmt->var_name = var_name;
    assign_stmt->assignment = assignment;

    assign_stmt->line = line;
    assign_stmt->pos = pos;
    
    return assign_stmt;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
pushq $0x20
popq %rdi
callq 0x1130
testq %rax, %rax
je 0x5f8d
movq %r12, (%rax)
movq %r15, 0x8(%rax)
movq %r14, 0x10(%rax)
movq %rbx, 0x18(%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x1005c(%rip), %rax     # 0x15ff0
movq (%rax), %rdi
leaq 0x8620(%rip), %rsi      # 0xe5be
leaq 0x8a13(%rip), %rdx      # 0xe9b8
pushq $0x20
popq %r8
movl $0x18a, %ecx            # imm = 0x18A
xorl %eax, %eax
callq 0x1100
pushq $0x1
popq %rdi
callq 0x1180
// File: /workspace/github_c_makefile_star2_O2/masyagin1998[P]GCI/src/parser/ast.c
// Function: dump_assign_stmt_ast_to_file_inner
static void dump_assign_stmt_ast_to_file_inner(FILE*f, const struct ASSIGN_STMT_AST*ast, size_t spaces_num)
{
    PUT_SPACES(); fprintf(f, "<assign_stmt line=\"%zu\" pos=\"%zu\">\n", ast->line, ast->pos);
    INC_SPACES_NUM();
    dump_variable_ast_to_file_inner(f, ast->var_name, spaces_num);
    PUT_SPACES(); fprintf(f, "<op>EQ</op>\n");    
    dump_assignment_expr_ast_to_file_inner(f, ast->assignment, spaces_num);
    DEC_SPACES_NUM();
    PUT_SPACES(); fprintf(f, "</assign_stmt>\n");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r13
movq %rdi, %rbx
leaq 0x8a76(%rip), %r12      # 0xea52
leaq 0x8223(%rip), %r15      # 0xe206
movq %r12, %rsi
movq %r15, %rcx
xorl %eax, %eax
callq 0x1100
movq 0x10(%r13), %rdx
movq 0x18(%r13), %rcx
leaq 0x8bd6(%rip), %rsi      # 0xebd5
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1100
movq %r14, %rbp
addq $0x2, %rbp
movq (%r13), %rsi
movq %rbx, %rdi
movq %rbp, %rdx
callq 0x6c2c
movq %rbx, %rdi
movq %r12, %rsi
movl %ebp, %edx
movq %r15, %rcx
xorl %eax, %eax
callq 0x1100
leaq 0x8b82(%rip), %rdi      # 0xebba
pushq $0xc
popq %rsi
pushq $0x1
popq %r15
movq %r15, %rdx
movq %rbx, %rcx
callq 0x1190
movq 0x8(%r13), %rsi
movq %rbx, %rdi
movq %rbp, %rdx
callq 0x6d54
movq %rbx, %rdi
movq %r12, %rsi
movl %r14d, %edx
leaq 0x819d(%rip), %rcx      # 0xe206
xorl %eax, %eax
callq 0x1100
leaq 0x8b82(%rip), %rdi      # 0xebf9
pushq $0xf
popq %rsi
movq %r15, %rdx
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1190