LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/ryvnf[P]czc/codegen.c
// Function: return_stmt_to_c
struct rope *return_stmt_to_c(struct ast *ast)
{
    struct ast *expr_ast = ast_ast(ast, 0);

    if (expr_ast == NULL) {
        if (zc_func_ret_type != void_type)
            fatal(ast->loc, "missing return value in non-void function");
        return return_semi_rope;
    }

    struct expr expr = eval_expr(zc_func_ret_type, expr_ast);

    if (zc_func_ret_type == void_type)
        fatal(ast->loc, "return with value in function returning void");
    if (common_type(zc_func_ret_type, expr.type) != zc_func_ret_type)
        fatal(ast->loc, "invalid type for return");

    struct rope *rope = rope_new_tree(return_sp_rope, expr.rope);
    rope = rope_new_tree(rope, semi_rope);
    return add_indent_nl(rope);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %esi, %esi
callq 0x27c8
leaq 0xffba(%rip), %r15      # 0x13df0
movq (%r15), %rdi
testq %rax, %rax
je 0x3e8d
movq %rax, %rsi
callq 0x633e
movq (%r15), %rdi
cmpq 0xf188(%rip), %rdi      # 0x12fd8
je 0x3ea3
movq %rdx, %r14
movq %rax, %rsi
callq 0x5506
cmpq (%r15), %rax
jne 0x3eb0
leaq 0xf657(%rip), %rdi      # 0x134c0
movq %r14, %rsi
callq 0xb136
leaq 0xf668(%rip), %rsi      # 0x134e0
movq %rax, %rdi
callq 0xb136
movq %rax, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x33f7
cmpq 0xf144(%rip), %rdi      # 0x12fd8
jne 0x3ebd
leaq 0xf5c3(%rip), %rax      # 0x13460
popq %rbx
popq %r14
popq %r15
retq
movq 0x8(%rbx), %rdi
leaq 0x9851(%rip), %rsi      # 0xd6ff
jmp 0x3ec8
movq 0x8(%rbx), %rdi
leaq 0x9871(%rip), %rsi      # 0xd72c
jmp 0x3ec8
movq 0x8(%rbx), %rdi
leaq 0x980d(%rip), %rsi      # 0xd6d5
xorl %eax, %eax
callq 0x5011
// File: /workspace/github_c_makefile_star2_O1/ryvnf[P]czc/codegen.c
// Function: label_stmt_to_c
struct rope *label_stmt_to_c(struct ast *ast)
{
    struct ast *name_ast = ast_ast(ast, 0);
    const char *name = ast_s(name_ast);
    const char *c_name = define_label(name);

    struct ast *stmt_ast = ast_ast(ast, 1);

    struct rope *rope = rope_new_s(c_name);
    rope = rope_new_tree(rope, colon_nl_rope);

    if (stmt_ast)
        rope = rope_new_tree(rope, stmt_to_c(stmt_ast));
    else
        rope = rope_new_tree(rope, add_indent_nl(semi_rope));

    return rope;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %esi, %esi
callq 0x27c8
movq %rax, %rdi
callq 0x26d0
movq %rax, %rdi
callq 0x331f
movq %rax, %r15
movl $0x1, %esi
movq %rbx, %rdi
callq 0x27c8
movq %rax, %r14
movq %r15, %rdi
callq 0xb15d
leaq 0xfd7a(%rip), %rsi      # 0x13ce0
movq %rax, %rdi
callq 0xb136
movq %rax, %rbx
testq %r14, %r14
je 0x3f80
movq %r14, %rdi
callq 0x3f9c
jmp 0x3f8c
leaq 0xf559(%rip), %rdi      # 0x134e0
callq 0x33f7
movq %rbx, %rdi
movq %rax, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0xb136
// File: /workspace/github_c_makefile_star2_O1/ryvnf[P]czc/codegen.c
// Function: stmt_to_c
struct rope *stmt_to_c(struct ast *ast)
{
    switch (ast->tag) {
        default:
            return expr_stmt_to_c(ast);
        case TYPE_DEF:
	    handle_type_def(ast);
	    return NULL;
        case ALIAS_DEF:
	    handle_alias_def(ast);
	    return NULL;
        case IF_STMT:
            return if_stmt_to_c(ast);
        case SWITCH_STMT:
            return switch_stmt_to_c(ast);
        case FOR_STMT:
            return for_stmt_to_c(ast);
        case RETURN_STMT:
            return return_stmt_to_c(ast);
        case BREAK_STMT:
            return break_stmt_to_c(ast);
        case CONTINUE_STMT:
            return continue_stmt_to_c(ast);
        case GOTO_STMT:
            return goto_stmt_to_c(ast);
        case LABEL_STMT:
            return label_stmt_to_c(ast);
    }
}

// Assembly:
pushq %rax
movl (%rdi), %eax
cmpl $0x4002, %eax           # imm = 0x4002
jle 0x3fc7
leal -0x4101(%rax), %ecx
cmpl $0xa, %ecx
ja 0x3feb
leaq 0x9654(%rip), %rax      # 0xd60c
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
popq %rax
jmp 0x379d
cmpl $0x3, %eax
je 0x3fdf
cmpl $0x4, %eax
je 0x3fe5
cmpl $0x4002, %eax           # imm = 0x4002
jne 0x3ffb
callq 0x40a8
jmp 0x3ff7
popq %rax
jmp 0x3ecf
popq %rax
jmp 0x3efa
cmpl $0x4003, %eax           # imm = 0x4003
jne 0x3ffb
callq 0x40e7
xorl %eax, %eax
popq %rcx
retq
popq %rax
jmp 0x3763
popq %rax
jmp 0x3e20
popq %rax
jmp 0x3f25
popq %rax
jmp 0x3cae
popq %rax
jmp 0x3bf7
popq %rax
jmp 0x401f
// File: /workspace/github_c_makefile_star2_O1/ryvnf[P]czc/codegen.c
// Function: goto_stmt_to_c
struct rope *goto_stmt_to_c(struct ast *ast)
{
    struct ast *name_ast = ast_ast(ast, 0);
    const char *name = ast_s(name_ast);
    const char *c_name = goto_label(name, ast);

    struct rope *rope = goto_sp_rope;
    rope = rope_new_tree(rope, rope_new_s(c_name));
    rope = rope_new_tree(rope, semi_nl_rope);

    return add_indent(rope);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
xorl %ebx, %ebx
xorl %esi, %esi
callq 0x27c8
movq %rax, %rdi
callq 0x26d0
movq %rax, %rdi
movq %r14, %rsi
callq 0x32e4
movq %rax, %rdi
callq 0xb15d
leaq 0xfcae(%rip), %rdi      # 0x13d00
movq %rax, %rsi
callq 0xb136
leaq 0xf65f(%rip), %rsi      # 0x136c0
movq %rax, %rdi
callq 0xb136
testq %rax, %rax
je 0x409f
leaq 0xfd5f(%rip), %rcx      # 0x13dd4
movslq (%rcx), %r15
testl %r15d, %r15d
je 0x409c
leaq 0xf1fc(%rip), %r14      # 0x13280
movq %rax, %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0xb136
movq %rax, %rbx
decq %r15
jne 0x4087
jmp 0x409f
movq %rax, %rbx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/ryvnf[P]czc/codegen.c
// Function: func_body_to_c
struct rope *func_body_to_c(struct ast *ast)
{
    zc_func_labels = strmap_new(32);
    lbl_list = NULL;

    struct rope *rope = lcurly_nl_rope;
    zc_func_decls_rope = NULL;

    zc_indent_level++;

    struct rope *stmts_rope = NULL;
    stmts_rope = stmt_list_to_c(stmts_rope, ast, NULL);

    rope = rope_new_tree(rope, zc_func_decls_rope);
    rope = rope_new_tree(rope, stmts_rope);

    zc_indent_level--;
    rope = rope_new_tree(rope, add_indent(rcurly_rope));

    strmap_del(zc_func_labels, NULL);
    check_lbl_list(lbl_list);

    return rope;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
movl $0x20, %edi
callq 0xb3cc
leaq 0xfcdd(%rip), %r15      # 0x13e20
movq %rax, (%r15)
xorl %eax, %eax
movq %rax, 0xfc41(%rip)      # 0x13d90
leaq 0xfcc2(%rip), %r14      # 0x13e18
movq %rax, (%r14)
leaq 0xfc74(%rip), %r13      # 0x13dd4
incl (%r13)
xorl %edi, %edi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x3ac1
movq %rax, %rbx
movq (%r14), %rsi
leaq 0xf1e3(%rip), %rdi      # 0x13360
callq 0xb136
movq %rax, %rdi
movq %rbx, %rsi
callq 0xb136
movq %rax, %rbx
movslq (%r13), %r12
decq %r12
movl %r12d, (%r13)
leaq 0xf21e(%rip), %rax      # 0x133c0
testl %r12d, %r12d
je 0x41be
leaq 0xf0d2(%rip), %r14      # 0x13280
movq %r14, %rdi
movq %rax, %rsi
callq 0xb136
decq %r12
jne 0x41ae
movq %rbx, %rdi
movq %rax, %rsi
callq 0xb136
movq %rax, %rbx
movq (%r15), %rdi
xorl %esi, %esi
callq 0xb552
movq 0xfbb3(%rip), %rdi      # 0x13d90
callq 0x3297
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/ryvnf[P]czc/codegen.c
// Function: add_global_decl
void add_global_decl(struct decl_sym *decl)
{
    if (is_void_type(decl->type))
        fatal(decl->sym.loc->loc, "cannot declare a variable of void type");

    if (is_extern_type(decl->type))
        fatal(decl->sym.loc->loc, "cannot declare a variable of incomplete type");

    add_type_decl(decl->type);
    struct rope *rope = decl_to_c(decl);
    rope = rope_new_tree(extern_sp_rope, rope);
    rope = rope_new_tree(rope, semi_nl_rope);
    zc_prog_decls_rope = rope_new_tree(zc_prog_decls_rope, rope);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
movl (%rdi), %eax
testb $0x1, %al
jne 0x4252
btl $0x9, %eax
jb 0x4263
callq 0x4279
movq 0x10(%rbx), %rdi
callq 0xb15d
movq 0x18(%rbx), %rsi
movq %rax, %rdi
callq 0x348a
leaq 0xf4bc(%rip), %rdi      # 0x136e0
movq %rax, %rsi
callq 0xb136
leaq 0xf48d(%rip), %rsi      # 0x136c0
movq %rax, %rdi
callq 0xb136
leaq 0xfbc6(%rip), %rbx      # 0x13e08
movq (%rbx), %rdi
movq %rax, %rsi
callq 0xb136
movq %rax, (%rbx)
popq %rbx
retq
movq 0x8(%rbx), %rax
movq 0x8(%rax), %rdi
leaq 0x9533(%rip), %rsi      # 0xd794
jmp 0x4272
movq 0x8(%rbx), %rax
movq 0x8(%rax), %rdi
leaq 0x9549(%rip), %rsi      # 0xd7bb
xorl %eax, %eax
callq 0x5011
// File: /workspace/github_c_makefile_star2_O1/ryvnf[P]czc/codegen.c
// Function: add_type_decl
void add_type_decl(struct type *type)
{
    switch (type_type(type->tag)) {
	case PTR_TYPE_FLAG:
            add_type_decl(ptr_type(type)->to);
            break;
	case ARRAY_TYPE_FLAG:
            add_type_decl(array_type(type)->of);
            break;
	case FUNC_TYPE_FLAG:
            add_type_decl(func_type(type)->ret);
            break;
	case STRUCT_TYPE_FLAG:
            add_struct_def(struct_type(type));
            break;
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl $0x3ff, %ebx            # imm = 0x3FF
leaq 0x93af(%rip), %r14      # 0xd638
movl (%rdi), %eax
andl %ebx, %eax
addl $-0x8, %eax
roll $0x1d, %eax
cmpl $0x7, %eax
ja 0x42d6
movslq (%r14,%rax,4), %rax
addq %r14, %rax
jmpq *%rax
callq 0xbba7
movq 0x8(%rax), %rdi
jmp 0x4289
callq 0xbbd9
movq 0x8(%rax), %rdi
jmp 0x4289
callq 0xbc0b
movq 0x8(%rax), %rdi
jmp 0x4289
callq 0xbc3d
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x43a2
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/ryvnf[P]czc/codegen.c
// Function: add_local_decl
void add_local_decl(struct decl_sym *decl)
{
    if (is_void_type(decl->type))
        fatal(decl->sym.loc->loc, "cannot declare a variable of void type");

    if (is_extern_type(decl->type))
        fatal(decl->sym.loc->loc, "cannot declare a variable of incomplete type");

    if (is_func_type(decl->type))
        fatal(decl->sym.loc->loc, "cannot declare a function here");

    add_type_decl(decl->type);
    struct rope *rope = NULL;

    rope = rope_new_tree(rope, decl_to_c(decl));
    rope = rope_new_tree(rope, semi_nl_rope);
    rope = add_indent_lev(rope, 1);

    zc_func_decls_rope = rope_new_tree(zc_func_decls_rope, rope);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
movl (%rdi), %eax
testb $0x1, %al
jne 0x436a
btl $0x9, %eax
jb 0x437b
testb $0x20, %al
jne 0x438c
callq 0x4279
movq 0x10(%rbx), %rdi
callq 0xb15d
movq 0x18(%rbx), %rsi
movq %rax, %rdi
callq 0x348a
xorl %ebx, %ebx
xorl %edi, %edi
movq %rax, %rsi
callq 0xb136
leaq 0xf392(%rip), %rsi      # 0x136c0
movq %rax, %rdi
callq 0xb136
testq %rax, %rax
je 0x434d
leaq 0xef3e(%rip), %rdi      # 0x13280
movq %rax, %rsi
callq 0xb136
movq %rax, %rbx
leaq 0xfac4(%rip), %r14      # 0x13e18
movq (%r14), %rdi
movq %rbx, %rsi
callq 0xb136
movq %rax, (%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x8(%rbx), %rax
movq 0x8(%rax), %rdi
leaq 0x941b(%rip), %rsi      # 0xd794
jmp 0x439b
movq 0x8(%rbx), %rax
movq 0x8(%rax), %rdi
leaq 0x9431(%rip), %rsi      # 0xd7bb
jmp 0x439b
movq 0x8(%rbx), %rax
movq 0x8(%rax), %rdi
leaq 0x944d(%rip), %rsi      # 0xd7e8
xorl %eax, %eax
callq 0x5011
// File: /workspace/github_c_makefile_star2_O1/ryvnf[P]czc/codegen.c
// Function: add_struct_def
void add_struct_def(struct struct_type *type)
{
    if (type->is_defined)
        return;
    type->is_defined = true;
    
    for (size_t i = 0; i < type->n_fields; i++)
        add_type_decl(type->fields[i].type);

    struct rope *rope = NULL;
    rope = struct_def_to_c(type);
    rope = rope_new_tree(rope, semi_nl_rope);
    zc_type_defs_rope = rope_new_tree(zc_type_defs_rope, rope);

    rope = struct_type_to_c(NULL, type);
    rope = rope_new_tree(rope, semi_nl_rope);
    zc_type_decls_rope = rope_new_tree(zc_type_decls_rope, rope);
}

// Assembly:
cmpb $0x0, 0x18(%rdi)
jne 0x4447
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movb $0x1, 0x18(%rdi)
cmpq $0x0, 0x10(%rdi)
je 0x43db
leaq 0x28(%rbx), %r14
xorl %r15d, %r15d
movq (%r14), %rdi
callq 0x4279
incq %r15
addq $0x10, %r14
cmpq 0x10(%rbx), %r15
jb 0x43c6
movq %rbx, %rdi
callq 0x3637
leaq 0xf2d6(%rip), %r14      # 0x136c0
movq %rax, %rdi
movq %r14, %rsi
callq 0xb136
leaq 0xfa04(%rip), %r15      # 0x13e00
movq (%r15), %rdi
movq %rax, %rsi
callq 0xb136
movq %rax, (%r15)
movq 0x8(%rbx), %rdi
callq 0xb15d
leaq 0xf2e6(%rip), %rdi      # 0x13700
movq %rax, %rsi
callq 0xb136
movq %rax, %rdi
movq %r14, %rsi
callq 0xb136
leaq 0xf9c4(%rip), %rbx      # 0x13df8
movq (%rbx), %rdi
movq %rax, %rsi
callq 0xb136
movq %rax, (%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/ryvnf[P]czc/codegen.c
// Function: init_ast_to_c
struct rope *init_ast_to_c(struct type *type, struct ast *init_ast, size_t nest_level)
{
    struct expr expr = eval_expr_global(type, init_ast);

    // In C ',' and '?:' operators have lower precedence than '='.  Should
    // probably be solved in a cleaner way in the future, until then this
    // works.
    if (init_ast->tag == COMMA_EXPR || init_ast->tag == COND_EXPR)
        expr.rope = add_paren(expr.rope);

    struct type *got_type = target_type(type, expr.type);

    if (got_type == NULL)
        fatal(init_ast->loc, "invalid type for initializer");

    if (!type_equals(got_type, type))
        fatal(init_ast->loc, "invalid type for initializer");

    return expr.rope;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x7f0b
movq %rax, %r12
movq %rdx, %r15
movl (%rbx), %eax
orl $0x10, %eax
cmpl $0x4210, %eax           # imm = 0x4210
jne 0x4706
leaq 0xebb4(%rip), %rdi      # 0x132a0
movq %r15, %rsi
callq 0xb136
leaq 0xebc5(%rip), %rsi      # 0x132c0
movq %rax, %rdi
callq 0xb136
movq %rax, %r15
movq %r14, %rdi
movq %r12, %rsi
callq 0x559f
testq %rax, %rax
je 0x4734
movq %rax, %rdi
movq %r14, %rsi
callq 0xc0c3
testb %al, %al
je 0x4734
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x8(%rbx), %rdi
leaq 0x90fa(%rip), %rsi      # 0xd839
xorl %eax, %eax
callq 0x5011
// File: /workspace/github_c_makefile_star2_O1/ryvnf[P]czc/codegen.c
// Function: data_def_to_c
struct rope *data_def_to_c(struct ast *ast)
{
    struct ast *decl_ast = ast_ast(ast, 0);

    struct ast *init_ast = ast_ast(ast, 1);
    const char *name = ast_s(ast_ast(decl_ast, 0));

    struct sym *sym = scope_get_sym(global_scope, name);
    assert(sym->tag == DECL_SYM);
    struct decl_sym *decl = (struct decl_sym *)sym;

    struct rope *rope = decl_to_c(decl);

    rope = rope_new_tree(rope, asgn_binop_rope);
    rope = rope_new_tree(rope, init_ast_to_c(decl->type, init_ast, 0));
    rope = rope_new_tree(rope, semi_nl_rope);
    rope = rope_new_tree(nl_rope, rope);

    return rope;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %esi, %esi
callq 0x27c8
movq %rax, %r14
movl $0x1, %esi
movq %rbx, %rdi
callq 0x27c8
movq %rax, %rbx
movq %r14, %rdi
xorl %esi, %esi
callq 0x27c8
movq %rax, %rdi
callq 0x26d0
leaq 0xf667(%rip), %rcx      # 0x13de8
movq (%rcx), %rdi
movq %rax, %rsi
callq 0xb310
cmpl $0x1, (%rax)
jne 0x47f5
movq %rax, %r14
movq 0x10(%rax), %rdi
callq 0xb15d
movq 0x18(%r14), %rsi
movq %rax, %rdi
callq 0x348a
leaq 0xf030(%rip), %rsi      # 0x137e0
movq %rax, %rdi
callq 0xb136
movq %rax, %r15
movq 0x18(%r14), %rdi
movq %rbx, %rsi
callq 0x46c0
movq %r15, %rdi
movq %rax, %rsi
callq 0xb136
leaq 0xeee7(%rip), %rsi      # 0x136c0
movq %rax, %rdi
callq 0xb136
leaq 0xeeb8(%rip), %rdi      # 0x136a0
movq %rax, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0xb136
leaq 0x89b0(%rip), %rdi      # 0xd1ac
leaq 0x9004(%rip), %rsi      # 0xd807
leaq 0x9007(%rip), %rcx      # 0xd811
leaq 0x9045(%rip), %r8       # 0xd856
movl $0x2d0, %edx            # imm = 0x2D0
xorl %eax, %eax
callq 0x4f1c
// File: /workspace/github_c_makefile_star2_O1/ryvnf[P]czc/codegen.c
// Function: codegen_pass
void codegen_pass(struct ast *ast)
{
    size_t n_extern_defs;
    struct ast **extern_defs = ast_asts(ast, &n_extern_defs);

    for (size_t i = 0; i < n_extern_defs; ++i) {
        struct ast *extern_def = extern_defs[i];

        switch (extern_def->tag) {
            case ASGN_EXPR:
                append_def(data_def_to_c(extern_def));
                break;
            case FUNC_DEF:
                append_def(func_def_to_c(extern_def));
                break;
            case TYPE_DEF: {
                scope_get_type(current_scope, ast_s(ast_ast(extern_def, 0)));
                continue;
            }
            case SOURCE_FILE:
                codegen_pass(extern_def);
        }
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
leaq 0x8(%rsp), %r14
movq %r14, %rsi
callq 0x2805
cmpq $0x0, (%r14)
je 0x4b3b
movq %rax, %rbx
xorl %r15d, %r15d
leaq 0xf352(%rip), %r12      # 0x13e10
leaq 0xf31b(%rip), %r13      # 0x13de0
movq (%rbx,%r15,8), %rdi
movl (%rdi), %eax
cmpl $0x421f, %eax           # imm = 0x421F
jg 0x4b00
cmpl $0x4001, %eax           # imm = 0x4001
je 0x4b15
cmpl $0x4002, %eax           # imm = 0x4002
jne 0x4b31
movq (%r13), %r14
xorl %esi, %esi
callq 0x27c8
movq %rax, %rdi
callq 0x26d0
movq %r14, %rdi
movq %rax, %rsi
callq 0xb387
jmp 0x4b31
cmpl $0x4502, %eax           # imm = 0x4502
je 0x4b2c
cmpl $0x4220, %eax           # imm = 0x4220
jne 0x4b31
callq 0x4746
jmp 0x4b1a
callq 0x4448
movq (%r12), %rdi
movq %rax, %rsi
callq 0xb136
movq %rax, (%r12)
jmp 0x4b31
callq 0x4a8d
incq %r15
cmpq 0x8(%rsp), %r15
jb 0x4ac5
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/ryvnf[P]czc/error.c
// Function: error
void error(struct loc *loc, const char *fmt, ...) {
	assert(fmt);

	va_list va;
	va_start(va, fmt);

        if (loc != NULL)
            fprintf(stderr, "%s:%d: error: ", loc->file, loc->line);
        else
            fprintf(stderr, "error: ");

	vfprintf(stderr, fmt, va);
        putc('\n', stderr);

	va_end(va);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xd8, %rsp
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0x4e71
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
testq %rsi, %rsi
je 0x4ef4
movq %rsi, %rbx
leaq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%rsp)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%rsp)
movq 0xe153(%rip), %r14      # 0x12ff8
movq (%r14), %rax
testq %rdi, %rdi
jne 0x4eb7
movq %rax, %rdi
callq 0x2280
jmp 0x4ece
movq (%rdi), %rdx
movl 0x8(%rdi), %ecx
leaq 0x8a5a(%rip), %rsi      # 0xd91e
movq %rax, %rdi
xorl %eax, %eax
callq 0x2130
movq (%r14), %rdi
movq %rsp, %rdx
movq %rbx, %rsi
callq 0x21e0
movq (%r14), %rsi
movl $0xa, %edi
callq 0x2110
addq $0xd8, %rsp
popq %rbx
popq %r14
retq
leaq 0x82b1(%rip), %rdi      # 0xd1ac
leaq 0x8a0a(%rip), %rsi      # 0xd90c
leaq 0x8a0b(%rip), %rcx      # 0xd914
leaq 0x8a08(%rip), %r8       # 0xd918
movl $0x4, %edx
xorl %eax, %eax
callq 0x4f1c
// File: /workspace/github_c_makefile_star2_O1/ryvnf[P]czc/error.c
// Function: bug
void bug(const char *fmt, ...) {
	assert(fmt); /* catching bugs within bugs */

	va_list va;
	va_start(va, fmt);

        fprintf(stderr, "internal error: ");
	vfprintf(stderr, fmt, va);
        putc('\n', stderr);

	va_end(va);
	abort();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movq %rsi, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0x4f7c
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
testq %rdi, %rdi
jne 0x4fa9
leaq 0x8224(%rip), %rdi      # 0xd1ac
leaq 0x897d(%rip), %rsi      # 0xd90c
leaq 0x897e(%rip), %rcx      # 0xd914
leaq 0x8996(%rip), %r8       # 0xd933
movl $0x28, %edx
xorl %eax, %eax
callq 0x4f1c
movq %rdi, %rbx
leaq 0x20(%rsp), %rax
movq %rsp, %r14
movq %rax, 0x10(%r14)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%r14)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%r14)
movq 0xe020(%rip), %r15      # 0x12ff8
movq (%r15), %rcx
leaq 0x8955(%rip), %rdi      # 0xd937
movl $0x10, %esi
movl $0x1, %edx
callq 0x2210
movq (%r15), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x21e0
movq (%r15), %rsi
movl $0xa, %edi
callq 0x2110
callq 0x2040
// File: /workspace/github_c_makefile_star2_O1/ryvnf[P]czc/error.c
// Function: fatal
void fatal(struct loc *loc, const char *fmt, ...) {
	assert(fmt);

	va_list va;
	va_start(va, fmt);

        if (loc != NULL)
            fprintf(stderr, "%s:%d: error: ", loc->file, loc->line);
        else
            fprintf(stderr, "error: ");

	vfprintf(stderr, fmt, va);
        putc('\n', stderr);

	va_end(va);

        exit(1);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xd8, %rsp
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0x506a
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
testq %rsi, %rsi
jne 0x5097
leaq 0x8136(%rip), %rdi      # 0xd1ac
leaq 0x888f(%rip), %rsi      # 0xd90c
leaq 0x8890(%rip), %rcx      # 0xd914
leaq 0x88a2(%rip), %r8       # 0xd92d
movl $0x15, %edx
xorl %eax, %eax
callq 0x4f1c
movq %rsi, %rbx
leaq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%rsp)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%rsp)
movq 0xdf32(%rip), %r14      # 0x12ff8
movq (%r14), %rcx
testq %rdi, %rdi
jne 0x50e6
leaq 0x8850(%rip), %rdi      # 0xd925
movl $0x7, %esi
movl $0x1, %edx
callq 0x2210
jmp 0x50ff
movq (%rdi), %rdx
movl 0x8(%rdi), %eax
leaq 0x882b(%rip), %rsi      # 0xd91e
movq %rcx, %rdi
movl %eax, %ecx
xorl %eax, %eax
callq 0x2130
movq (%r14), %rdi
movq %rsp, %rdx
movq %rbx, %rsi
callq 0x21e0
movq (%r14), %rsi
movl $0xa, %edi
callq 0x2110
movl $0x1, %edi
callq 0x2200
// File: /workspace/github_c_makefile_star2_O1/ryvnf[P]czc/eval.c
// Function: get_c_prec
int get_c_prec(enum ast_tag tag)
{
    switch (tag) {
        case COMMA_EXPR:
            return 0;
        case COND_EXPR:
            return 1;
        case ASGN_EXPR:
        case ADD_ASGN_EXPR:
        case SUB_ASGN_EXPR:
        case MUL_ASGN_EXPR:
        case DIV_ASGN_EXPR:
        case REM_ASGN_EXPR:
        case OR_ASGN_EXPR:
        case XOR_ASGN_EXPR:
        case AND_ASGN_EXPR:
        case SHL_ASGN_EXPR:
        case SHR_ASGN_EXPR:
            return 2;
        case LOR_EXPR:
            return 3;
        case LAND_EXPR:
            return 4;
        case OR_EXPR:
            return 5;
        case XOR_EXPR:
            return 6;
        case AND_EXPR:
            return 7;
        case EQ_EXPR:
        case NE_EXPR:
            return 8;
        case LT_EXPR:
        case GT_EXPR:
        case LE_EXPR:
        case GE_EXPR:
            return 9;
        case SHL_EXPR:
        case SHR_EXPR:
            return 10;
        case ADD_EXPR:
        case SUB_EXPR:
            return 11;
        case MUL_EXPR:
        case DIV_EXPR:
        case REM_EXPR:
            return 12;
        case CAST_EXPR:
            return 13;
        case NOT_EXPR:
        case COMPL_EXPR:
        case UPLUS_EXPR:
        case NEG_EXPR:
        case REF_EXPR:
        case PRE_INC_EXPR:
        case PRE_DEC_EXPR:
        case SIZEOF_EXPR:
        case DEREF_EXPR:
            return 14;
    }
    return 15;
}

// Assembly:
cmpl $0x426f, %edi           # imm = 0x426F
jg 0x53de
cmpl $0x422f, %edi           # imm = 0x422F
jg 0x540b
leal -0x4220(%rdi), %eax
cmpl $0xb, %eax
jae 0x549d
movl $0x2, %eax
retq
cmpl $0x42af, %edi           # imm = 0x42AF
jle 0x5440
leal -0x42c0(%rdi), %eax
cmpl $0x30, %eax
ja 0x54d9
movabsq $0x1000000ff0000, %rcx  # imm = 0x1000000FF0000
btq %rax, %rcx
jae 0x547b
movl $0xe, %eax
retq
cmpl $0x425f, %edi           # imm = 0x425F
jg 0x546a
leal -0x4250(%rdi), %eax
cmpl $0x2, %eax
jb 0x54b5
cmpl $0x4230, %edi           # imm = 0x4230
je 0x54c7
cmpl $0x4240, %edi           # imm = 0x4240
jne 0x54ea
movl $0x4, %eax
retq
cmpl $0x429f, %edi           # imm = 0x429F
jg 0x548c
cmpl $0x4270, %edi           # imm = 0x4270
je 0x54c1
cmpl $0x4280, %edi           # imm = 0x4280
je 0x54bb
cmpl $0x4290, %edi           # imm = 0x4290
jne 0x54ea
movl $0x7, %eax
retq
addl $0xffffbda0, %edi       # imm = 0xFFFFBDA0
cmpl $0x4, %edi
jae 0x54ea
movl $0x9, %eax
retq
movl $0x7, %ecx
btq %rax, %rcx
jae 0x54cd
movl $0xc, %eax
retq
addl $0xffffbd60, %edi       # imm = 0xFFFFBD60
cmpl $0x2, %edi
jae 0x54ea
movl $0xa, %eax
retq
xorl %eax, %eax
cmpl $0x4200, %edi           # imm = 0x4200
je 0x54ef
cmpl $0x4210, %edi           # imm = 0x4210
jne 0x54ea
movl $0x1, %eax
retq
movl $0x8, %eax
retq
movl $0x6, %eax
retq
movl $0x5, %eax
retq
movl $0x3, %eax
retq
cmpq $0x20, %rax
jne 0x54d9
movl $0xd, %eax
retq
addl $0xffffbd50, %edi       # imm = 0xFFFFBD50
cmpl $0x2, %edi
jae 0x54ea
movl $0xb, %eax
retq
movl $0xf, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/ryvnf[P]czc/eval.c
// Function: common_type
struct type *common_type(struct type *a, struct type *b)
{
    if ((is_int_type(a) && b->tag == INT_CONST_TYPE) ||
            (is_float_type(a) && b->tag == FLOAT_CONST_TYPE))
        return a;

    if (is_ptr_type(a) && is_ptr_type(b) && (is_void_type(ptr_type(b)->to)))
        return a;

    if ((is_int_type(b) && a->tag == INT_CONST_TYPE) ||
            (is_float_type(b) && a->tag == FLOAT_CONST_TYPE))
        return b;

    if (is_ptr_type(b) && is_ptr_type(a) && (is_void_type(ptr_type(a)->to)))
        return b;

    if (type_equals(a, b))
        return a;

    return NULL;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl (%rdi), %eax
testb $0x2, %al
je 0x551f
cmpl $0xf002, (%r14)         # imm = 0xF002
je 0x5594
testb $0x4, %al
je 0x552c
cmpl $0x3004, (%r14)         # imm = 0x3004
je 0x5594
testb $0x8, %al
je 0x5547
testb $0x8, (%r14)
je 0x5547
movq %r14, %rdi
callq 0xbba7
movq 0x8(%rax), %rax
testb $0x1, (%rax)
jne 0x5594
movl (%r14), %eax
testb $0x2, %al
je 0x5556
cmpl $0xf002, (%rbx)         # imm = 0xF002
je 0x5591
testb $0x4, %al
je 0x5562
cmpl $0x3004, (%rbx)         # imm = 0x3004
je 0x5591
testb $0x8, %al
je 0x557c
testb $0x8, (%rbx)
je 0x557c
movq %rbx, %rdi
callq 0xbba7
movq 0x8(%rax), %rax
testb $0x1, (%rax)
jne 0x5591
movq %rbx, %rdi
movq %r14, %rsi
callq 0xc0c3
xorl %ecx, %ecx
testb %al, %al
cmoveq %rcx, %rbx
jmp 0x5594
movq %r14, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/ryvnf[P]czc/eval.c
// Function: target_type
struct type *target_type(struct type *want, struct type *b)
{
    if ((is_int_type(want) && b->tag == INT_CONST_TYPE) ||
            (is_float_type(want) && b->tag == FLOAT_CONST_TYPE))
        return want;

    if (is_ptr_type(want) && is_ptr_type(b) && (is_void_type(ptr_type(b)->to)))
        return want;

    // TODO: Is this neccessary?
    //if ((is_int_type(b) && want->tag == INT_CONST_TYPE) ||
    //        (is_float_type(b) && want->tag == FLOAT_CONST_TYPE))
    //    return b;

    if (is_ptr_type(b) && is_ptr_type(want) && (is_void_type(ptr_type(want)->to)))
        return want;

    // pointer decay
    if (is_ptr_type(want) && is_array_type(b) &&
            type_equals(ptr_type(want)->to, array_type(b)->of))
        return want;

    if (type_equals(want, b))
        return want;

    return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movl (%rdi), %eax
testb $0x2, %al
je 0x55bd
cmpl $0xf002, (%r14)         # imm = 0xF002
je 0x5643
testb $0x4, %al
je 0x55ca
cmpl $0x3004, (%r14)         # imm = 0x3004
je 0x5643
testb $0x8, %al
je 0x55e5
testb $0x8, (%r14)
je 0x55e5
movq %r14, %rdi
callq 0xbba7
movq 0x8(%rax), %rax
testb $0x1, (%rax)
jne 0x5643
testb $0x8, (%r14)
je 0x5601
testb $0x8, (%rbx)
je 0x5601
movq %rbx, %rdi
callq 0xbba7
movq 0x8(%rax), %rax
testb $0x1, (%rax)
jne 0x5643
testb $0x8, (%rbx)
je 0x5630
testb $0x10, (%r14)
je 0x5630
movq %rbx, %rdi
callq 0xbba7
movq 0x8(%rax), %r15
movq %r14, %rdi
callq 0xbbd9
movq 0x8(%rax), %rsi
movq %r15, %rdi
callq 0xc0c3
testb %al, %al
jne 0x5643
movq %rbx, %rdi
movq %r14, %rsi
callq 0xc0c3
xorl %ecx, %ecx
testb %al, %al
cmoveq %rcx, %rbx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/ryvnf[P]czc/eval.c
// Function: eval_cond_type
struct type *eval_cond_type(struct type *t, struct ast *ast)
{
    struct type *cond_type = eval_type(NULL, ast_ast(ast, 0));
    struct type *then_type = eval_type(t, ast_ast(ast, 1));
    struct type *else_type = eval_type(t, ast_ast(ast, 2));

    require_type(ast, cond_type, BOOL_TYPE);

    struct type *type = common_type(then_type, else_type);
    if (type == NULL)
        incompatible_type(ast);

    return type;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
xorl %esi, %esi
callq 0x27c8
xorl %edi, %edi
movq %rax, %rsi
callq 0x57c4
movq %rax, %r15
movl $0x1, %esi
movq %rbx, %rdi
callq 0x27c8
movq %r14, %rdi
movq %rax, %rsi
callq 0x57c4
movq %rax, %r12
movl $0x2, %esi
movq %rbx, %rdi
callq 0x27c8
movq %r14, %rdi
movq %rax, %rsi
callq 0x57c4
movq %rax, %r14
movq %rbx, %rdi
movq %r15, %rsi
movl $0x80, %edx
callq 0x56cc
movq %r12, %rdi
movq %r14, %rsi
callq 0x5506
testq %rax, %rax
je 0x57a5
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x8(%rbx), %r14
movl (%rbx), %edi
callq 0x5124
leaq 0x864f(%rip), %rsi      # 0xde06
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x5011
// File: /workspace/github_c_makefile_star2_O1/ryvnf[P]czc/eval.c
// Function: eval_binop_type
struct type *eval_binop_type(struct ast *ast, enum ast_tag accept)
{
    struct type *lhs_type = eval_type(NULL, ast_ast(ast, 0));
    struct type *rhs_type = eval_type(NULL, ast_ast(ast, 1));
    struct type *type = common_type(lhs_type, rhs_type);
    if (type == NULL)
        incompatible_type(ast);

    require_type(ast, type, accept);
    return type_dup(type, 0);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
xorl %esi, %esi
callq 0x27c8
xorl %edi, %edi
movq %rax, %rsi
callq 0x57c4
movq %rax, %r15
movl $0x1, %esi
movq %r14, %rdi
callq 0x27c8
xorl %edi, %edi
movq %rax, %rsi
callq 0x57c4
movq %r15, %rdi
movq %rax, %rsi
callq 0x5506
testq %rax, %rax
je 0x5b4f
movq %rax, %r15
movq %r14, %rdi
movq %rax, %rsi
movl %ebx, %edx
callq 0x56cc
movq %r15, %rdi
xorl %esi, %esi
popq %rbx
popq %r14
popq %r15
jmp 0xc27b
movq 0x8(%r14), %rbx
movl (%r14), %edi
callq 0x5124
leaq 0x82a4(%rip), %rsi      # 0xde06
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x5011
// File: /workspace/github_c_makefile_star2_O1/ryvnf[P]czc/eval.c
// Function: eval_relop_type
struct type *eval_relop_type(struct ast *ast, enum ast_tag accept)
{
    struct type *lhs_type = eval_type(NULL, ast_ast(ast, 0));
    struct type *rhs_type = eval_type(NULL, ast_ast(ast, 1));
    struct type *type = common_type(lhs_type, rhs_type);
    if (type == NULL)
        incompatible_type(ast);

    require_type(ast, type, accept);
    return bool_type;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
xorl %esi, %esi
callq 0x27c8
xorl %edi, %edi
movq %rax, %rsi
callq 0x57c4
movq %rax, %r15
movl $0x1, %esi
movq %r14, %rdi
callq 0x27c8
xorl %edi, %edi
movq %rax, %rsi
callq 0x57c4
movq %r15, %rdi
movq %rax, %rsi
callq 0x5506
testq %rax, %rax
je 0x5bce
movq %r14, %rdi
movq %rax, %rsi
movl %ebx, %edx
callq 0x56cc
leaq 0xe198(%rip), %rax      # 0x13d60
popq %rbx
popq %r14
popq %r15
retq
movq 0x8(%r14), %rbx
movl (%r14), %edi
callq 0x5124
leaq 0x8225(%rip), %rsi      # 0xde06
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x5011
// File: /workspace/github_c_makefile_star2_O1/ryvnf[P]czc/eval.c
// Function: eval_unop_type
struct type *eval_unop_type(struct ast *ast, enum ast_tag accept, bool lval_op)
{
    struct type *type = eval_type(NULL, ast_ast(ast, 0));

    require_type(ast, type, accept);
    if (lval_op)
        require_lval(ast, type);
    return type_dup(type, 0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movl %esi, %r15d
movq %rdi, %rbx
xorl %esi, %esi
callq 0x27c8
xorl %edi, %edi
movq %rax, %rsi
callq 0x57c4
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
movl %r15d, %edx
callq 0x56cc
testl %ebp, %ebp
je 0x5c2e
movq %rbx, %rdi
movq %r14, %rsi
callq 0x56f7
movq %r14, %rdi
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xc27b
// File: /workspace/github_c_makefile_star2_O1/ryvnf[P]czc/eval.c
// Function: eval_add_type
struct type *eval_add_type(struct ast *ast)
{
    struct type *lhs_type = ptr_decay(eval_type(NULL, ast_ast(ast, 0)));
    struct type *rhs_type = ptr_decay(eval_type(NULL, ast_ast(ast, 1)));

    if (is_ptr_type(lhs_type) && is_int_type(rhs_type))
        return lhs_type;

    if (is_int_type(lhs_type) && is_ptr_type(rhs_type))
        return rhs_type;

    struct type *type = common_type(lhs_type, rhs_type);
    if (type == NULL)
        incompatible_type(ast);

    require_type(ast, type, INT_TYPE | FLOAT_TYPE);
    return type_dup(type, 0);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %esi, %esi
callq 0x27c8
xorl %edi, %edi
movq %rax, %rsi
callq 0x57c4
movq %rax, %rdi
callq 0x564c
movq %rax, %r14
movl $0x1, %esi
movq %rbx, %rdi
callq 0x27c8
xorl %edi, %edi
movq %rax, %rsi
callq 0x57c4
movq %rax, %rdi
callq 0x564c
movl (%r14), %ecx
testb $0x8, %cl
je 0x5c91
testb $0x2, (%rax)
jne 0x5cd2
testb $0x2, %cl
je 0x5c9b
testb $0x8, (%rax)
jne 0x5ccf
movq %r14, %rdi
movq %rax, %rsi
callq 0x5506
testq %rax, %rax
je 0x5cdd
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
movl $0x1006, %edx           # imm = 0x1006
callq 0x56cc
movq %r14, %rdi
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xc27b
movq %rax, %r14
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x8(%rbx), %r14
movl (%rbx), %edi
callq 0x5124
leaq 0x8117(%rip), %rsi      # 0xde06
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x5011
// File: /workspace/github_c_makefile_star2_O1/ryvnf[P]czc/eval.c
// Function: eval_sub_type
struct type *eval_sub_type(struct ast *ast)
{
    struct type *lhs_type = ptr_decay(eval_type(NULL, ast_ast(ast, 0)));
    struct type *rhs_type = ptr_decay(eval_type(NULL, ast_ast(ast, 1)));

    if (is_ptr_type(lhs_type) && is_int_type(rhs_type))
        return type_dup(lhs_type, 0);

    if (is_int_type(lhs_type) && is_ptr_type(rhs_type))
        return type_dup(rhs_type, 0);

    if (is_ptr_type(lhs_type) && is_ptr_type(rhs_type) &&
            type_equals(lhs_type, rhs_type))
        return const_int_type;

    struct type *type = common_type(lhs_type, rhs_type);
    if (type == NULL)
        incompatible_type(ast);

    require_type(ast, type, PTR_TYPE | INT_TYPE | FLOAT_TYPE);
    return type_dup(type, 0);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %esi, %esi
callq 0x27c8
xorl %edi, %edi
movq %rax, %rsi
callq 0x57c4
movq %rax, %rdi
callq 0x564c
movq %rax, %r14
movl $0x1, %esi
movq %rbx, %rdi
callq 0x27c8
xorl %edi, %edi
movq %rax, %rsi
callq 0x57c4
movq %rax, %rdi
callq 0x564c
movq %rax, %r15
movl (%r14), %eax
testb $0x8, %al
je 0x5d4f
testb $0x2, (%r15)
jne 0x5da7
testb $0x2, %al
je 0x5d59
testb $0x8, (%r15)
jne 0x5da4
testb $0x8, %al
je 0x5d7f
testb $0x8, (%r15)
je 0x5d7f
movq %r14, %rdi
movq %r15, %rsi
callq 0xc0c3
testb %al, %al
je 0x5d7f
leaq 0xdfdf(%rip), %rax      # 0x13d58
popq %rbx
popq %r14
popq %r15
retq
movq %r14, %rdi
movq %r15, %rsi
callq 0x5506
testq %rax, %rax
je 0x5db6
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
movl $0x100e, %edx           # imm = 0x100E
callq 0x56cc
jmp 0x5da7
movq %r15, %r14
movq %r14, %rdi
xorl %esi, %esi
popq %rbx
popq %r14
popq %r15
jmp 0xc27b
movq 0x8(%rbx), %r14
movl (%rbx), %edi
callq 0x5124
leaq 0x803e(%rip), %rsi      # 0xde06
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x5011
// File: /workspace/github_c_makefile_star2_O1/ryvnf[P]czc/eval.c
// Function: eval_asgn_type
struct type *eval_asgn_type(struct ast *ast)
{
    struct type *lhs_type = eval_type(NULL, ast_ast(ast, 0));
    require_lval(ast, lhs_type);

    struct type *type;
    switch (ast->tag) {
        case ASGN_EXPR:
            type = target_type(lhs_type, eval_type(lhs_type, ast_ast(ast, 1)));
            if (type == NULL)
                incompatible_type(ast);

            require_type(ast, type, ~(VOID_TYPE_FLAG | FUNC_TYPE_FLAG));
            break;
        case ADD_ASGN_EXPR:
            type = ptr_decay(eval_add_type(ast));
            break;
        case SUB_ASGN_EXPR:
            type = ptr_decay(eval_sub_type(ast));
            break;
        case MUL_ASGN_EXPR:
        case DIV_ASGN_EXPR:
            type = ptr_decay(eval_binop_type(ast, INT_TYPE_FLAG | FLOAT_TYPE_FLAG));
            break;
        case REM_ASGN_EXPR:
        case OR_ASGN_EXPR:
        case XOR_ASGN_EXPR:
        case AND_ASGN_EXPR:
        case SHL_ASGN_EXPR:
        case SHR_ASGN_EXPR:
            type = ptr_decay(eval_binop_type(ast, INT_TYPE_FLAG));
            break;
    }

    if (!type_equals(lhs_type, type))
        incompatible_type(ast);

    return type_dup(type, LVAL_TYPE_FLAG);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %esi, %esi
callq 0x27c8
xorl %edi, %edi
movq %rax, %rsi
callq 0x57c4
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
callq 0x56f7
movl $0xffffbde0, %eax       # imm = 0xFFFFBDE0
addl (%rbx), %eax
cmpl $0xa, %eax
ja 0x5eb0
leaq 0x7c9d(%rip), %rcx      # 0xdab0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rbx, %rdi
movl $0x2, %esi
jmp 0x5e2e
movq %rbx, %rdi
movl $0x6, %esi
callq 0x5aeb
movq %rax, %rdi
callq 0x564c
movq %rax, %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0xc0c3
testb %al, %al
je 0x5eb2
movq %r15, %rdi
movl $0x400, %esi            # imm = 0x400
popq %rbx
popq %r14
popq %r15
jmp 0xc27b
movq %rbx, %rdi
callq 0x5cfc
jmp 0x5e33
movl $0x1, %esi
movq %rbx, %rdi
callq 0x27c8
movq %r14, %rdi
movq %rax, %rsi
callq 0x57c4
movq %r14, %rdi
movq %rax, %rsi
callq 0x559f
testq %rax, %rax
je 0x5eb2
movq %rax, %r15
movq %rbx, %rdi
movq %rax, %rsi
movl $0xffffffde, %edx       # imm = 0xFFFFFFDE
callq 0x56cc
jmp 0x5e3e
movq %rbx, %rdi
callq 0x5c42
jmp 0x5e33
jmp 0x5e3e
movq 0x8(%rbx), %r14
movl (%rbx), %edi
callq 0x5124
leaq 0x7f42(%rip), %rsi      # 0xde06
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x5011
// File: /workspace/github_c_makefile_star2_O1/ryvnf[P]czc/eval.c
// Function: eval_subscr_type
struct type *eval_subscr_type(struct ast *ast)
{
    struct type *lhs_type = ptr_decay(eval_type(NULL, ast_ast(ast, 0)));
    struct type *rhs_type = ptr_decay(eval_type(NULL, ast_ast(ast, 1)));

    if (is_ptr_type(lhs_type) && is_int_type(rhs_type))
        return type_dup(ptr_type(lhs_type)->to, LVAL_TYPE_FLAG);

    if (is_int_type(lhs_type) && is_ptr_type(rhs_type))
        return type_dup(ptr_type(lhs_type)->to, LVAL_TYPE_FLAG);

    invalid_type(ast);
    return NULL;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %esi, %esi
callq 0x27c8
xorl %edi, %edi
movq %rax, %rsi
callq 0x57c4
movq %rax, %rdi
callq 0x564c
movq %rax, %r14
movl $0x1, %esi
movq %rbx, %rdi
callq 0x27c8
xorl %edi, %edi
movq %rax, %rsi
callq 0x57c4
movq %rax, %rdi
callq 0x564c
movl (%r14), %ecx
testb $0x8, %cl
je 0x6015
testb $0x2, (%rax)
jne 0x601f
testb $0x2, %cl
je 0x603c
testb $0x8, (%rax)
je 0x603c
movq %r14, %rdi
callq 0xbba7
movq 0x8(%rax), %rdi
movl $0x400, %esi            # imm = 0x400
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xc27b
movq 0x8(%rbx), %r14
movl (%rbx), %edi
callq 0x5124
leaq 0x7d9b(%rip), %rsi      # 0xdde9
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x5011
// File: /workspace/github_c_makefile_star2_O1/ryvnf[P]czc/eval.c
// Function: eval_call_type
struct type *eval_call_type(struct ast *ast)
{
    struct type *called_type = eval_type(NULL, ast_ast(ast, 0));
    require_type(ast, called_type, FUNC_TYPE_FLAG);

    struct func_type *called_func_type = func_type(called_type);

    bool has_vararg = called_func_type->has_vararg;
    size_t n_param_types = called_func_type->n_params;
    struct type **param_types = called_func_type->params;

    size_t n_arg_asts;
    struct ast **arg_asts = ast_asts(ast_ast(ast, 1), &n_arg_asts);

    if ((n_arg_asts != n_param_types && !has_vararg) || n_arg_asts <
            n_param_types)
        fatal(ast->loc, "invalid number of arguments");

    for (size_t i = 0; i < n_param_types; i++) {
        struct type *got_type = eval_type(param_types[i], arg_asts[i]);
        struct type *type = target_type(param_types[i], got_type);

        if (type == NULL || !type_equals(param_types[i], type))
            fatal(ast->loc, "invalid type for argument %zu in function call", i + 1);
    }

    return called_func_type->ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %esi, %esi
callq 0x27c8
xorl %edi, %edi
movq %rax, %rsi
callq 0x57c4
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
movl $0x20, %edx
callq 0x56cc
movq %r14, %rdi
callq 0xbc0b
movq %rax, %r14
movb 0x18(%rax), %bpl
movq 0x10(%rax), %r13
movl $0x1, %esi
movq %rbx, %rdi
callq 0x27c8
movq %rsp, %r12
movq %rax, %rdi
movq %r12, %rsi
callq 0x2805
movq %rax, %r15
movq (%r12), %rax
cmpq %r13, %rax
setae %al
je 0x60cf
andb %al, %bpl
je 0x613b
testq %r13, %r13
je 0x6110
xorl %r12d, %r12d
movq 0x20(%r14,%r12,8), %rdi
movq (%r15,%r12,8), %rsi
callq 0x57c4
movq 0x20(%r14,%r12,8), %rdi
movq %rax, %rsi
callq 0x559f
testq %rax, %rax
je 0x6123
movq 0x20(%r14,%r12,8), %rdi
movq %rax, %rsi
callq 0xc0c3
testb %al, %al
je 0x6123
incq %r12
cmpq %r12, %r13
jne 0x60d7
movq 0x8(%r14), %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%rbx), %rdi
incq %r12
leaq 0x7d2a(%rip), %rsi      # 0xde5b
movq %r12, %rdx
xorl %eax, %eax
callq 0x5011
movq 0x8(%rbx), %rdi
leaq 0x7cf9(%rip), %rsi      # 0xde3f
xorl %eax, %eax
callq 0x5011
// File: /workspace/github_c_makefile_star2_O1/ryvnf[P]czc/eval.c
// Function: eval_member_type
struct type *eval_member_type(struct ast *ast)
{
    struct ast *lhs_ast = ast_ast(ast, 0);
    struct ast *rhs_ast = ast_ast(ast, 1);
    struct type *lhs_type = eval_type(NULL, lhs_ast);
    const char *member_id = ast_s(rhs_ast);

    if (type_type(lhs_type->tag) != STRUCT_TYPE_FLAG)
        incompatible_type(ast);

    size_t n_fields = struct_type(lhs_type)->n_fields;
    struct field *fields = struct_type(lhs_type)->fields;

    for (size_t i = 0; i < n_fields; i++) {
        if (strcmp(member_id, fields[i].name) == 0)
            return type_dup(fields[i].type, LVAL_TYPE_FLAG);
    }

    fatal(ast->loc, "structure has no member %s", member_id);
    return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %esi, %esi
callq 0x27c8
movq %rax, %r14
movl $0x1, %esi
movq %rbx, %rdi
callq 0x27c8
movq %rax, %r12
xorl %edi, %edi
movq %r14, %rsi
callq 0x57c4
movq %rax, %r15
movq %r12, %rdi
callq 0x26d0
movq %rax, %r14
movl $0x3ff, %eax            # imm = 0x3FF
andl (%r15), %eax
cmpl $0x40, %eax
jne 0x6222
movq %r15, %rdi
callq 0xbc3d
movq 0x10(%rax), %r12
movq %r15, %rdi
callq 0xbc3d
testq %r12, %r12
setne %bpl
je 0x620e
movq %rax, %r15
addq $0x20, %r15
movq (%r15), %rsi
movq %r14, %rdi
callq 0x2100
testl %eax, %eax
je 0x61fc
leaq -0x1(%r12), %rbp
xorl %r13d, %r13d
cmpq %r13, %rbp
je 0x620c
movq 0x10(%r15), %rsi
addq $0x10, %r15
movq %r14, %rdi
callq 0x2100
incq %r13
testl %eax, %eax
jne 0x61d9
cmpq %r12, %r13
setb %bpl
movq 0x8(%r15), %rdi
movl $0x400, %esi            # imm = 0x400
callq 0xc27b
jmp 0x620e
xorl %ebp, %ebp
testb %bpl, %bpl
je 0x623c
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%rbx), %r14
movl (%rbx), %edi
callq 0x5124
leaq 0x7bd2(%rip), %rsi      # 0xde06
movq %r14, %rdi
movq %rax, %rdx
jmp 0x624a
movq 0x8(%rbx), %rdi
leaq 0x7c43(%rip), %rsi      # 0xde8a
movq %r14, %rdx
xorl %eax, %eax
callq 0x5011
// File: /workspace/github_c_makefile_star2_O1/ryvnf[P]czc/eval.c
// Function: eval_name_type
struct type *eval_name_type(struct type *t, struct ast *ast)
{
    const char *name = ast_s(ast);

    struct sym *sym = scope_get_sym(current_scope, name);

    if (sym == NULL)
        fatal(ast->loc, "undeclared identifier '%s'", name);

    if (sym->tag == DECL_SYM) {
        struct type *type = ((struct decl_sym *)sym)->type;
        if (type == NULL)
            fatal(ast->loc, "undeclared identifier '%s'", name);
        return type_dup(type, LVAL_TYPE_FLAG);
    } else if (sym->tag == ALIAS_SYM) {
        struct expr expr = eval_expr(t, ((struct alias_sym *)sym)->ast);
        expr.rope = add_paren(expr.rope);
        return expr.type;
    }

    unreachable();
    return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
movq %rsi, %rdi
callq 0x26d0
movq %rax, %rbx
leaq 0xdb44(%rip), %rax      # 0x13de0
movq (%rax), %rdi
movq %rbx, %rsi
callq 0xb310
testq %rax, %rax
je 0x6308
movl (%rax), %ecx
cmpl $0x2, %ecx
je 0x62d0
cmpl $0x1, %ecx
jne 0x631d
movq 0x18(%rax), %rdi
testq %rdi, %rdi
je 0x6308
movl $0x400, %esi            # imm = 0x400
popq %rbx
popq %r14
popq %r15
jmp 0xc27b
movq 0x10(%rax), %rsi
movq %r15, %rdi
xorl %edx, %edx
callq 0x7a4c
movq %rax, %rbx
leaq 0xcfb8(%rip), %rdi      # 0x132a0
movq %rdx, %rsi
callq 0xb136
leaq 0xcfc9(%rip), %rsi      # 0x132c0
movq %rax, %rdi
callq 0xb136
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
movq 0x8(%r14), %rdi
leaq 0x7b92(%rip), %rsi      # 0xdea5
movq %rbx, %rdx
xorl %eax, %eax
callq 0x5011
leaq 0x7b9c(%rip), %rdi      # 0xdec0
leaq 0x7bbb(%rip), %rsi      # 0xdee6
leaq 0x7bbb(%rip), %rcx      # 0xdeed
movl $0x217, %edx            # imm = 0x217
xorl %eax, %eax
callq 0x4f1c
// File: /workspace/github_c_makefile_star2_O1/ryvnf[P]czc/eval.c
// Function: eval_decl_type
struct type *eval_decl_type(struct ast *ast)
{
    struct ast *name_ast = ast_ast(ast, 0);
    const char *name = ast_s(name_ast);

    struct sym *sym = scope_get_sym(current_scope, name);

    if (!sym || sym->loc != ast) {
        sym = sym_from_ast(ast);
        add_local_decl((struct decl_sym *)sym);
        scope_add_sym(current_scope, name, sym);
    }

    return eval_name_type(NULL, name_ast);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
xorl %esi, %esi
callq 0x27c8
movq %rax, %rbx
movq %rax, %rdi
callq 0x26d0
movq %rax, %r15
leaq 0xda74(%rip), %r12      # 0x13de0
movq (%r12), %rdi
movq %rax, %rsi
callq 0xb310
testq %rax, %rax
je 0x6383
cmpq %r14, 0x8(%rax)
je 0x63a5
movq %r14, %rdi
callq 0xb6f9
movq %rax, %r14
movq %rax, %rdi
callq 0x42de
movq (%r12), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0xb2ff
xorl %edi, %edi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x627f