LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/ryvnf[P]czc/codegen.c
// Function: block_to_c
struct rope *block_to_c(struct ast *ast)
{
    struct rope *rope = lcurly_nl_rope;
    zc_indent_level++;

    rope = stmt_list_to_c(rope, ast, NULL);

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

    return rope;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rsi
leaq 0xf8e4(%rip), %r14      # 0x12dd4
incl (%r14)
leaq 0xee66(%rip), %rdi      # 0x12360
xorl %edx, %edx
callq 0x3686
movq %rax, %rbx
decl (%r14)
leaq 0xeeb2(%rip), %rdi      # 0x123c0
callq 0x306e
movq %rbx, %rdi
movq %rax, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x9e47
// File: /workspace/github_c_makefile_star2_O2/ryvnf[P]czc/codegen.c
// Function: clause_to_c
struct rope *clause_to_c(struct ast *ast)
{
    struct rope *rope = NULL;
    struct ast *stmt_list;

    switch (ast->tag) {
        case CASE_CLAUSE: {
            size_t n_asts;
            struct ast **asts = ast_asts(ast_ast(ast, 0), &n_asts);

            for (size_t i = 0; i < n_asts; i++) {
                rope = rope_new_tree(rope, add_indent(case_sp_rope));
                
                size_t n = eval_size(asts[i]);

                rope = rope_new_tree(rope, rope_new_fmt("%d", n));
                rope = rope_new_tree(rope, colon_nl_rope);
            }

            stmt_list = ast_ast(ast, 1);
            break;
        }
        case DEFAULT_CLAUSE: {
            rope = add_indent(default_colon_nl_rope);
            stmt_list = ast_ast(ast, 0);
            break;
        }
    }

    zc_indent_level++;
    bool fallthrough = false;

    size_t n_stmts;
    ast_asts(stmt_list, &n_stmts);

    if (n_stmts != 0) 
        rope = stmt_list_to_c(rope, stmt_list, &fallthrough);
    else
        rope = add_indent_nl(semi_rope);

    if (!fallthrough)
        rope = rope_new_tree(rope, add_indent_nl(break_semi_rope));
    zc_indent_level--;

    return rope;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movl (%rdi), %eax
cmpl $0x410a, %eax           # imm = 0x410A
je 0x35e2
cmpl $0x4109, %eax           # imm = 0x4109
jne 0x3600
movq %rbx, 0x10(%rsp)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x26ce
leaq 0x8(%rsp), %rsi
movq %rax, %rdi
callq 0x270b
movq %rax, %r15
leaq 0xf72c(%rip), %r12      # 0x12ca0
leaq 0x838e(%rip), %r13      # 0xb909
leaq 0xf75e(%rip), %rbp      # 0x12ce0
xorl %ebx, %ebx
xorl %r14d, %r14d
cmpq 0x8(%rsp), %rbx
jae 0x35d8
movq %r12, %rdi
callq 0x306e
movq %r14, %rdi
movq %rax, %rsi
callq 0x9e47
movq %rax, %r14
movq (%r15,%rbx,8), %rdi
callq 0x5fbd
movq %r13, %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0x9e7d
movq %r14, %rdi
movq %rax, %rsi
callq 0x9e47
movq %rax, %rdi
movq %rbp, %rsi
callq 0x9e47
movq %rax, %r14
incq %rbx
jmp 0x3587
pushq $0x1
popq %rsi
movq 0x10(%rsp), %rdi
jmp 0x35f6
leaq 0xf6d7(%rip), %rdi      # 0x12cc0
callq 0x306e
movq %rax, %r14
movq %rbx, %rdi
xorl %esi, %esi
callq 0x26ce
movq %rax, %rbx
jmp 0x3603
xorl %r14d, %r14d
leaq 0xf7ca(%rip), %r12      # 0x12dd4
incl (%r12)
movb $0x0, 0x7(%rsp)
leaq 0x8(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x270b
cmpq $0x0, (%r15)
je 0x3647
leaq 0x7(%rsp), %r15
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x3686
movq %rax, %rbx
testb $0x1, (%r15)
je 0x3656
jmp 0x3670
leaq 0xee92(%rip), %rdi      # 0x124e0
callq 0x307d
movq %rax, %rbx
leaq 0xee23(%rip), %rdi      # 0x12480
callq 0x307d
movq %rbx, %rdi
movq %rax, %rsi
callq 0x9e47
movq %rax, %rbx
decl (%r12)
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ryvnf[P]czc/codegen.c
// Function: stmt_list_to_c
struct rope *stmt_list_to_c(struct rope *rope, struct ast *ast,
        bool *fallthrough)
{
    size_t n_stmt_asts;
    struct ast **stmt_asts = ast_asts(ast, &n_stmt_asts);

    for (size_t i = 0; i < n_stmt_asts; ++i) {
        if (stmt_asts[i]->tag == FALLTHROUGH_STMT) {
            if (fallthrough == NULL || i != n_stmt_asts - 1)
                fatal(stmt_asts[i]->loc, "fallthrough not allowed here");

            *fallthrough = true;
            break;
        }

        struct rope *c_stmt = stmt_to_c(stmt_asts[i]);
        rope = rope_new_tree(rope, c_stmt);
    }

    return rope;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %rax
movq %rdi, %r14
movq %rsp, %rsi
movq %rax, %rdi
callq 0x270b
movq %rax, %r15
xorl %r12d, %r12d
movq (%rsp), %rax
cmpq %rax, %r12
jae 0x36e2
movq (%r15,%r12,8), %rdi
cmpl $0x5, (%rdi)
je 0x36d2
callq 0x3ad3
movq %r14, %rdi
movq %rax, %rsi
callq 0x9e47
movq %rax, %r14
incq %r12
jmp 0x36a8
testq %rbx, %rbx
je 0x36f1
decq %rax
cmpq %rax, %r12
jne 0x36f1
movb $0x1, (%rbx)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x8(%rdi), %rdi
leaq 0x807b(%rip), %rsi      # 0xb777
xorl %eax, %eax
callq 0x4a05
// File: /workspace/github_c_makefile_star2_O2/ryvnf[P]czc/codegen.c
// Function: switch_block_to_c
struct rope *switch_block_to_c(struct ast *ast)
{
    struct rope *rope = lcurly_nl_rope;

    size_t n_clause_asts;
    struct ast **clause_asts = ast_asts(ast, &n_clause_asts);

    for (size_t i = 0; i < n_clause_asts; ++i) {
        struct rope *c_clause = clause_to_c(clause_asts[i]);
	if (rope != NULL)
	    rope = rope_new_tree(rope, c_clause);
    }

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

    return rope;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
leaq 0x8(%rsp), %rsi
callq 0x270b
movq %rax, %r14
leaq 0xec40(%rip), %rbx      # 0x12360
xorl %r15d, %r15d
cmpq 0x8(%rsp), %r15
jae 0x374f
movq (%r14,%r15,8), %rdi
callq 0x3525
testq %rbx, %rbx
je 0x3748
movq %rbx, %rdi
movq %rax, %rsi
callq 0x9e47
movq %rax, %rbx
jmp 0x374a
xorl %ebx, %ebx
incq %r15
jmp 0x3723
leaq 0xec6a(%rip), %rdi      # 0x123c0
callq 0x306e
movq %rbx, %rdi
movq %rax, %rsi
callq 0x9e47
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/ryvnf[P]czc/codegen.c
// Function: switch_stmt_to_c
struct rope *switch_stmt_to_c(struct ast *ast)
{
    struct rope *rope = switch_sp_lparen_rope;
    struct ast *expr_ast = ast_ast(ast, 0);
    struct ast *block_ast = ast_ast(ast, 1);

    push_scope();

    struct expr expr = eval_expr(NULL, expr_ast);
    if (!is_bool_type(expr.type) && !is_int_type(expr.type))
        fatal(ast->loc, "expression has to be of boolean or integer type");

    rope = rope_new_tree(rope, expr.rope);
    rope = rope_new_tree(rope, rparen_sp_rope);

    rope = rope_new_tree(rope, switch_block_to_c(block_ast));

    pop_scope();

    return add_indent_nl(rope);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
xorl %esi, %esi
callq 0x26ce
movq %rax, %r15
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0x26ce
movq %rax, %rbx
callq 0x300b
xorl %edi, %edi
movq %r15, %rsi
callq 0x5b22
testb $-0x7e, (%rax)
je 0x37f6
leaq 0xf4d5(%rip), %rdi      # 0x12c80
movq %rdx, %rsi
callq 0x9e47
leaq 0xeb46(%rip), %rsi      # 0x12300
movq %rax, %rdi
callq 0x9e47
movq %rax, %r14
movq %rbx, %rdi
callq 0x3703
movq %r14, %rdi
movq %rax, %rsi
callq 0x9e47
leaq 0xf601(%rip), %rcx      # 0x12de0
movq (%rcx), %rdx
movq 0x10(%rdx), %rdx
movq %rdx, (%rcx)
movq %rax, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x307d
movq 0x8(%r14), %rdi
leaq 0x7ea4(%rip), %rsi      # 0xb6a5
xorl %eax, %eax
callq 0x4a05
// File: /workspace/github_c_makefile_star2_O2/ryvnf[P]czc/codegen.c
// Function: for_stmt_to_c
struct rope *for_stmt_to_c(struct ast *ast)
{
    struct rope *rope = for_sp_lparen_rope;
    struct ast *init_expr_ast = ast_ast(ast, 0);
    struct ast *cond_expr_ast = ast_ast(ast, 1);
    struct ast *update_expr_ast = ast_ast(ast, 2);
    struct ast *block_ast = ast_ast(ast, 3);

    push_scope();

    if (init_expr_ast != NULL) {
        struct expr init_expr = eval_expr(NULL, init_expr_ast);
        rope = rope_new_tree(rope, init_expr.rope);
    }
    rope = rope_new_tree(rope, semi_rope);

    if (cond_expr_ast != NULL) {
        rope = rope_new_tree(rope, sp_rope);

        struct expr cond_expr = eval_expr(NULL, cond_expr_ast);
        if (!is_bool_type(cond_expr.type))
            fatal(ast->loc, "condition has to be of boolean type");

        rope = rope_new_tree(rope, cond_expr.rope);
    }
    rope = rope_new_tree(rope, semi_rope);

    if (update_expr_ast != NULL) {
        rope = rope_new_tree(rope, sp_rope);

        struct expr update_expr = eval_expr(NULL, update_expr_ast);
        rope = rope_new_tree(rope, update_expr.rope);
    }
    rope = rope_new_tree(rope, rparen_sp_rope);

    zc_loop_level++;
    rope = rope_new_tree(rope, block_to_c(block_ast));
    zc_loop_level--;

    pop_scope();

    return add_indent_nl(rope);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %r15
xorl %esi, %esi
callq 0x26ce
movq %rax, %r13
pushq $0x1
popq %rsi
movq %r15, %rdi
callq 0x26ce
movq %rax, %r12
pushq $0x2
popq %rsi
movq %r15, %rdi
callq 0x26ce
movq %rax, %r14
pushq $0x3
popq %rsi
movq %r15, %rdi
callq 0x26ce
movq %rax, %rbx
callq 0x300b
testq %r13, %r13
je 0x3870
xorl %edi, %edi
movq %r13, %rsi
callq 0x5b22
leaq 0xed5d(%rip), %rdi      # 0x125c0
movq %rdx, %rsi
callq 0x9e47
movq %rax, %rdi
jmp 0x3877
leaq 0xed49(%rip), %rdi      # 0x125c0
leaq 0xec62(%rip), %rsi      # 0x124e0
callq 0x9e47
testq %r12, %r12
je 0x38b8
leaq 0xedf1(%rip), %rsi      # 0x12680
movq %rax, %rdi
callq 0x9e47
movq %rax, %r13
xorl %edi, %edi
movq %r12, %rsi
callq 0x5b22
testb $-0x80, (%rax)
je 0x3947
movq %r13, %rdi
movq %rdx, %rsi
callq 0x9e47
leaq 0xec21(%rip), %rsi      # 0x124e0
movq %rax, %rdi
callq 0x9e47
testq %r14, %r14
je 0x38f3
leaq 0xedad(%rip), %rsi      # 0x12680
movq %rax, %rdi
callq 0x9e47
movq %rax, %r15
xorl %edi, %edi
movq %r14, %rsi
callq 0x5b22
movq %r15, %rdi
movq %rdx, %rsi
callq 0x9e47
leaq 0xea06(%rip), %rsi      # 0x12300
movq %rax, %rdi
callq 0x9e47
movq %rax, %r14
leaq 0xf4c4(%rip), %r15      # 0x12dd0
incl (%r15)
movq %rbx, %rdi
callq 0x34e2
movq %r14, %rdi
movq %rax, %rsi
callq 0x9e47
decl (%r15)
leaq 0xf4b4(%rip), %rcx      # 0x12de0
movq (%rcx), %rdx
movq 0x10(%rdx), %rdx
movq %rdx, (%rcx)
movq %rax, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x307d
movq 0x8(%r15), %rdi
leaq 0x7d2f(%rip), %rsi      # 0xb681
xorl %eax, %eax
callq 0x4a05
// File: /workspace/github_c_makefile_star2_O2/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 0x26ce
leaq 0xf481(%rip), %r15      # 0x12df0
movq (%r15), %rdi
testq %rax, %rax
je 0x39c6
movq %rax, %rsi
callq 0x5b22
movq (%r15), %rdi
cmpq 0xe64f(%rip), %rdi      # 0x11fd8
je 0x39dc
movq %rdx, %r14
movq %rax, %rsi
callq 0x4e8f
cmpq (%r15), %rax
jne 0x39e9
leaq 0xeb1e(%rip), %rdi      # 0x124c0
movq %r14, %rsi
callq 0x9e47
leaq 0xeb2f(%rip), %rsi      # 0x124e0
movq %rax, %rdi
callq 0x9e47
movq %rax, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x307d
cmpq 0xe60b(%rip), %rdi      # 0x11fd8
jne 0x39f6
leaq 0xea8a(%rip), %rax      # 0x12460
popq %rbx
popq %r14
popq %r15
retq
movq 0x8(%rbx), %rdi
leaq 0x7d18(%rip), %rsi      # 0xb6ff
jmp 0x3a01
movq 0x8(%rbx), %rdi
leaq 0x7d38(%rip), %rsi      # 0xb72c
jmp 0x3a01
movq 0x8(%rbx), %rdi
leaq 0x7cd4(%rip), %rsi      # 0xb6d5
xorl %eax, %eax
callq 0x4a05
// File: /workspace/github_c_makefile_star2_O2/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 0x26ce
movq %rax, %rdi
callq 0x25da
movq %rax, %rdi
callq 0x2fd9
movq %rax, %r15
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x26ce
movq %rax, %r14
movq %r15, %rdi
callq 0x9e6c
leaq 0xf243(%rip), %rsi      # 0x12ce0
movq %rax, %rdi
callq 0x9e47
movq %rax, %rbx
testq %r14, %r14
je 0x3ab7
movq %r14, %rdi
callq 0x3ad3
jmp 0x3ac3
leaq 0xea22(%rip), %rdi      # 0x124e0
callq 0x307d
movq %rbx, %rdi
movq %rax, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x9e47
// File: /workspace/github_c_makefile_star2_O2/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
leal -0x4101(%rax), %ecx
cmpl $0xa, %ecx
ja 0x3af7
leaq 0x7b24(%rip), %rax      # 0xb60c
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
popq %rax
jmp 0x33de
cmpl $0x3, %eax
je 0x3b3a
cmpl $0x4, %eax
je 0x3b49
cmpl $0x4002, %eax           # imm = 0x4002
je 0x3b40
cmpl $0x4003, %eax           # imm = 0x4003
jne 0x3b16
callq 0x3bdb
jmp 0x3b45
popq %rax
jmp 0x33a4
popq %rax
jmp 0x3b4f
popq %rax
jmp 0x3959
popq %rax
jmp 0x3770
popq %rax
jmp 0x3808
popq %rax
jmp 0x3a5e
popq %rax
jmp 0x3a08
callq 0x3b9c
xorl %eax, %eax
popq %rcx
retq
popq %rax
jmp 0x3a33
// File: /workspace/github_c_makefile_star2_O2/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 %rbx
movq %rdi, %rbx
xorl %esi, %esi
callq 0x26ce
movq %rax, %rdi
callq 0x25da
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2f9e
movq %rax, %rdi
callq 0x9e6c
leaq 0xf184(%rip), %rdi      # 0x12d00
movq %rax, %rsi
callq 0x9e47
leaq 0xeb35(%rip), %rsi      # 0x126c0
movq %rax, %rdi
callq 0x9e47
movq %rax, %rdi
popq %rbx
jmp 0x306e
// File: /workspace/github_c_makefile_star2_O2/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 %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x20
popq %rdi
callq 0xa0d4
leaq 0xf1ec(%rip), %r14      # 0x12e20
movq %rax, (%r14)
andq $0x0, 0xf151(%rip)      # 0x12d90
leaq 0xf1d2(%rip), %r15      # 0x12e18
andq $0x0, (%r15)
leaq 0xf183(%rip), %r12      # 0x12dd4
incl (%r12)
xorl %edi, %edi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x3686
movq %rax, %rbx
movq (%r15), %rsi
leaq 0xe6f2(%rip), %rdi      # 0x12360
callq 0x9e47
movq %rax, %rdi
movq %rbx, %rsi
callq 0x9e47
movq %rax, %rbx
decl (%r12)
leaq 0xe734(%rip), %rdi      # 0x123c0
callq 0x306e
movq %rbx, %rdi
movq %rax, %rsi
callq 0x9e47
movq %rax, %rbx
movq (%r14), %rdi
xorl %esi, %esi
callq 0xa21d
movq 0xf0e0(%rip), %rdi      # 0x12d90
callq 0x2f51
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x3d1a
btl $0x9, %eax
jb 0x3d2b
callq 0x3d41
movq %rbx, %rdi
callq 0x338a
leaq 0xe9f4(%rip), %rdi      # 0x126e0
movq %rax, %rsi
callq 0x9e47
leaq 0xe9c5(%rip), %rsi      # 0x126c0
movq %rax, %rdi
callq 0x9e47
leaq 0xf0fe(%rip), %rbx      # 0x12e08
movq (%rbx), %rdi
movq %rax, %rsi
callq 0x9e47
movq %rax, (%rbx)
popq %rbx
retq
movq 0x8(%rbx), %rax
movq 0x8(%rax), %rdi
leaq 0x7a6b(%rip), %rsi      # 0xb794
jmp 0x3d3a
movq 0x8(%rbx), %rax
movq 0x8(%rax), %rdi
leaq 0x7a81(%rip), %rsi      # 0xb7bb
xorl %eax, %eax
callq 0x4a05
// File: /workspace/github_c_makefile_star2_O2/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 0x78e7(%rip), %r14      # 0xb638
movl (%rdi), %eax
andl %ebx, %eax
addl $-0x8, %eax
roll $0x1d, %eax
cmpl $0x7, %eax
ja 0x3d96
movslq (%r14,%rax,4), %rax
addq %r14, %rax
jmpq *%rax
callq 0xa778
jmp 0x3d7c
callq 0xa7aa
jmp 0x3d7c
callq 0xa7dc
movq 0x8(%rax), %rdi
jmp 0x3d51
callq 0xa80e
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3e36
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rbx
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
movl (%rdi), %eax
testb $0x1, %al
jne 0x3dfe
btl $0x9, %eax
jb 0x3e0f
testb $0x20, %al
jne 0x3e20
callq 0x3d41
movq %rbx, %rdi
callq 0x338a
xorl %edi, %edi
movq %rax, %rsi
callq 0x9e47
leaq 0xe8ec(%rip), %rsi      # 0x126c0
movq %rax, %rdi
callq 0x9e47
pushq $0x1
popq %rsi
movq %rax, %rdi
callq 0x303a
leaq 0xf02a(%rip), %rbx      # 0x12e18
movq (%rbx), %rdi
movq %rax, %rsi
callq 0x9e47
movq %rax, (%rbx)
popq %rbx
retq
movq 0x8(%rbx), %rax
movq 0x8(%rax), %rdi
leaq 0x7987(%rip), %rsi      # 0xb794
jmp 0x3e2f
movq 0x8(%rbx), %rax
movq 0x8(%rax), %rdi
leaq 0x799d(%rip), %rsi      # 0xb7bb
jmp 0x3e2f
movq 0x8(%rbx), %rax
movq 0x8(%rax), %rdi
leaq 0x79b9(%rip), %rsi      # 0xb7e8
xorl %eax, %eax
callq 0x4a05
// File: /workspace/github_c_makefile_star2_O2/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 0x3ec8
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movb $0x1, 0x18(%rdi)
leaq 0x28(%rdi), %r14
xorl %r15d, %r15d
cmpq 0x10(%rbx), %r15
jae 0x3e6a
movq (%r14), %rdi
callq 0x3d41
incq %r15
addq $0x10, %r14
jmp 0x3e53
movq %rbx, %rdi
callq 0x327d
leaq 0xe847(%rip), %r14      # 0x126c0
movq %rax, %rdi
movq %r14, %rsi
callq 0x9e47
leaq 0xef75(%rip), %r15      # 0x12e00
movq (%r15), %rdi
movq %rax, %rsi
callq 0x9e47
movq %rax, (%r15)
xorl %edi, %edi
movq %rbx, %rsi
callq 0x3307
movq %rax, %rdi
movq %r14, %rsi
callq 0x9e47
leaq 0xef43(%rip), %rbx      # 0x12df8
movq (%rbx), %rdi
movq %rax, %rsi
callq 0x9e47
movq %rax, (%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x7464
movq %rax, %r12
movq %rdx, %r15
movl (%rbx), %eax
orl $0x10, %eax
cmpl $0x4210, %eax           # imm = 0x4210
jne 0x4158
movq %r15, %rdi
callq 0x30c4
movq %rax, %r15
movq %r14, %rdi
movq %r12, %rsi
callq 0x4f3e
testq %rax, %rax
je 0x4186
movq %rax, %rdi
movq %r14, %rsi
callq 0xac35
testb %al, %al
je 0x4186
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x8(%rbx), %rdi
leaq 0x76a8(%rip), %rsi      # 0xb839
xorl %eax, %eax
callq 0x4a05
// File: /workspace/github_c_makefile_star2_O2/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 0x26ce
movq %rax, %r14
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x26ce
movq %rax, %rbx
movq %r14, %rdi
xorl %esi, %esi
callq 0x26ce
movq %rax, %rdi
callq 0x25da
leaq 0xec17(%rip), %rcx      # 0x12de8
movq (%rcx), %rdi
movq %rax, %rsi
callq 0xa01a
cmpl $0x1, (%rax)
jne 0x4238
movq %rax, %r14
movq %rax, %rdi
callq 0x338a
leaq 0xe5ed(%rip), %rsi      # 0x127e0
movq %rax, %rdi
callq 0x9e47
movq %rax, %r15
movq 0x18(%r14), %rdi
movq %rbx, %rsi
callq 0x4128
movq %r15, %rdi
movq %rax, %rsi
callq 0x9e47
leaq 0xe4a4(%rip), %rsi      # 0x126c0
movq %rax, %rdi
callq 0x9e47
leaq 0xe475(%rip), %rdi      # 0x126a0
movq %rax, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x9e47
leaq 0x6f6d(%rip), %rdi      # 0xb1ac
leaq 0x75c1(%rip), %rsi      # 0xb807
leaq 0x75c4(%rip), %rcx      # 0xb811
leaq 0x7602(%rip), %r8       # 0xb856
movl $0x2d0, %edx            # imm = 0x2D0
xorl %eax, %eax
callq 0x4918
// File: /workspace/github_c_makefile_star2_O2/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 %r12
pushq %rbx
pushq %rax
movq %rsp, %rsi
callq 0x270b
movq %rax, %rbx
xorl %r15d, %r15d
leaq 0xe915(%rip), %r12      # 0x12de0
cmpq (%rsp), %r15
jae 0x4533
movq (%rbx,%r15,8), %rdi
movl (%rdi), %eax
cmpl $0x4001, %eax           # imm = 0x4001
je 0x4521
cmpl $0x4002, %eax           # imm = 0x4002
je 0x44fa
cmpl $0x4502, %eax           # imm = 0x4502
je 0x451a
cmpl $0x4220, %eax           # imm = 0x4220
jne 0x452e
callq 0x4198
jmp 0x4526
movq (%r12), %r14
xorl %esi, %esi
callq 0x26ce
movq %rax, %rdi
callq 0x25da
movq %r14, %rdi
movq %rax, %rsi
callq 0xa08f
jmp 0x452e
callq 0x44ae
jmp 0x452e
callq 0x3ec9
movq %rax, %rdi
callq 0x4260
incq %r15
jmp 0x44cb
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x4861
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 0x48f2
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 0xd75f(%rip), %r14      # 0x11ff8
movq (%r14), %rcx
testq %rdi, %rdi
jne 0x48b5
leaq 0x707d(%rip), %rdi      # 0xb925
pushq $0x7
popq %rsi
pushq $0x1
popq %rdx
callq 0x2210
jmp 0x48ce
movq (%rdi), %rdx
movl 0x8(%rdi), %eax
leaq 0x705c(%rip), %rsi      # 0xb91e
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
pushq $0xa
popq %rdi
callq 0x2110
addq $0xd8, %rsp
popq %rbx
popq %r14
retq
leaq 0x68b3(%rip), %rdi      # 0xb1ac
leaq 0x700c(%rip), %rsi      # 0xb90c
leaq 0x700d(%rip), %rcx      # 0xb914
leaq 0x700a(%rip), %r8       # 0xb918
pushq $0x4
popq %rdx
xorl %eax, %eax
callq 0x4918
// File: /workspace/github_c_makefile_star2_O2/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 0x4978
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 0x49a3
leaq 0x6828(%rip), %rdi      # 0xb1ac
leaq 0x6f81(%rip), %rsi      # 0xb90c
leaq 0x6f82(%rip), %rcx      # 0xb914
leaq 0x6f9a(%rip), %r8       # 0xb933
pushq $0x28
popq %rdx
xorl %eax, %eax
callq 0x4918
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 0xd626(%rip), %r15      # 0x11ff8
movq (%r15), %rcx
leaq 0x6f5b(%rip), %rdi      # 0xb937
pushq $0x10
popq %rsi
pushq $0x1
popq %rdx
callq 0x2210
movq (%r15), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x21e0
movq (%r15), %rsi
pushq $0xa
popq %rdi
callq 0x2110
callq 0x2040
// File: /workspace/github_c_makefile_star2_O2/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 0x4a5e
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 0x4a89
leaq 0x6742(%rip), %rdi      # 0xb1ac
leaq 0x6e9b(%rip), %rsi      # 0xb90c
leaq 0x6e9c(%rip), %rcx      # 0xb914
leaq 0x6eae(%rip), %r8       # 0xb92d
pushq $0x15
popq %rdx
xorl %eax, %eax
callq 0x4918
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 0xd540(%rip), %r14      # 0x11ff8
movq (%r14), %rcx
testq %rdi, %rdi
jne 0x4ad4
leaq 0x6e5e(%rip), %rdi      # 0xb925
pushq $0x7
popq %rsi
pushq $0x1
popq %rdx
callq 0x2210
jmp 0x4aed
movq (%rdi), %rdx
movl 0x8(%rdi), %eax
leaq 0x6e3d(%rip), %rsi      # 0xb91e
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
pushq $0xa
popq %rdi
callq 0x2110
pushq $0x1
popq %rdi
callq 0x2200
nop
// File: /workspace/github_c_makefile_star2_O2/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), %ecx
movl %ecx, %edx
shrb %dl
movl (%rsi), %eax
cmpl $0xf002, %eax           # imm = 0xF002
sete %sil
testb %sil, %dl
jne 0x4f33
movl %ecx, %edx
shrb $0x2, %dl
cmpl $0x3004, %eax           # imm = 0x3004
sete %sil
testb %sil, %dl
jne 0x4f33
testb $0x8, %cl
sete %cl
testb $0x8, %al
sete %dl
orb %cl, %dl
jne 0x4ee9
movq %r14, %rdi
callq 0xa778
movq 0x8(%rax), %rax
testb $0x1, (%rax)
jne 0x4f33
movl (%r14), %eax
testb $0x2, %al
je 0x4ef5
cmpl $0xf002, (%rbx)         # imm = 0xF002
je 0x4f30
testb $0x4, %al
je 0x4f01
cmpl $0x3004, (%rbx)         # imm = 0x3004
je 0x4f30
testb $0x8, %al
je 0x4f1b
testb $0x8, (%rbx)
je 0x4f1b
movq %rbx, %rdi
callq 0xa778
movq 0x8(%rax), %rax
testb $0x1, (%rax)
jne 0x4f30
movq %rbx, %rdi
movq %r14, %rsi
callq 0xac35
xorl %ecx, %ecx
testb %al, %al
cmoveq %rcx, %rbx
jmp 0x4f33
movq %r14, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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
movl %eax, %edx
shrb %dl
movl (%rsi), %ecx
cmpl $0xf002, %ecx           # imm = 0xF002
sete %sil
testb %sil, %dl
jne 0x5006
movl %eax, %edx
shrb $0x2, %dl
cmpl $0x3004, %ecx           # imm = 0x3004
sete %sil
testb %sil, %dl
jne 0x5006
testb $0x8, %al
sete %dl
testb $0x8, %cl
sete %sil
orb %dl, %sil
jne 0x4fa3
movq %r14, %rdi
callq 0xa778
movq 0x8(%rax), %rax
testb $0x1, (%rax)
jne 0x5006
movl (%r14), %ecx
movl (%rbx), %eax
testb $0x8, %cl
sete %cl
testb $0x8, %al
sete %dl
orb %cl, %dl
jne 0x4fc5
movq %rbx, %rdi
callq 0xa778
movq 0x8(%rax), %rax
testb $0x1, (%rax)
jne 0x5006
movl (%rbx), %eax
testb $0x8, %al
je 0x4ff3
testb $0x10, (%r14)
je 0x4ff3
movq %rbx, %rdi
callq 0xa778
movq 0x8(%rax), %r15
movq %r14, %rdi
callq 0xa7aa
movq 0x8(%rax), %rsi
movq %r15, %rdi
callq 0xac35
testb %al, %al
jne 0x5006
movq %rbx, %rdi
movq %r14, %rsi
callq 0xac35
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_O2/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 0x26ce
xorl %edi, %edi
movq %rax, %rsi
callq 0x5137
movq %rax, %r15
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x26ce
movq %r14, %rdi
movq %rax, %rsi
callq 0x5137
movq %rax, %r12
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x26ce
movq %r14, %rdi
movq %rax, %rsi
callq 0x5137
movq %rax, %r14
movq %rbx, %rdi
movq %r15, %rsi
movl $0x80, %edx
callq 0x508f
movq %r12, %rdi
movq %r14, %rsi
callq 0x4e8f
testq %rax, %rax
je 0x512f
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rbx, %rdi
callq 0x504f
// File: /workspace/github_c_makefile_star2_O2/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 0x26ce
xorl %edi, %edi
movq %rax, %rsi
callq 0x5137
movq %rax, %r15
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0x26ce
xorl %edi, %edi
movq %rax, %rsi
callq 0x5137
movq %r15, %rdi
movq %rax, %rsi
callq 0x4e8f
testq %rax, %rax
je 0x544c
movq %rax, %r15
movq %r14, %rdi
movq %rax, %rsi
movl %ebx, %edx
callq 0x508f
movq %r15, %rdi
xorl %esi, %esi
popq %rbx
popq %r14
popq %r15
jmp 0xad4f
movq %r14, %rdi
callq 0x504f
// File: /workspace/github_c_makefile_star2_O2/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 0x26ce
xorl %edi, %edi
movq %rax, %rsi
callq 0x5137
movq %rax, %r15
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0x26ce
xorl %edi, %edi
movq %rax, %rsi
callq 0x5137
movq %r15, %rdi
movq %rax, %rsi
callq 0x4e8f
movq %r14, %rdi
testq %rax, %rax
je 0x54b1
movq %rax, %rsi
movl %ebx, %edx
callq 0x508f
leaq 0xd8b5(%rip), %rax      # 0x12d60
popq %rbx
popq %r14
popq %r15
retq
callq 0x504f
// File: /workspace/github_c_makefile_star2_O2/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 0x26ce
xorl %edi, %edi
movq %rax, %rsi
callq 0x5137
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
movl %r15d, %edx
callq 0x508f
testl %ebp, %ebp
je 0x54f6
movq %rbx, %rdi
movq %r14, %rsi
callq 0x509f
movq %r14, %rdi
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xad4f
// File: /workspace/github_c_makefile_star2_O2/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 0x26ce
xorl %edi, %edi
movq %rax, %rsi
callq 0x5137
movq %rax, %rdi
callq 0x500f
movq %rax, %r14
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x26ce
xorl %edi, %edi
movq %rax, %rsi
callq 0x5137
movq %rax, %rdi
callq 0x500f
movl (%r14), %ecx
testb $0x8, %cl
je 0x5557
testb $0x2, (%rax)
jne 0x5598
testb $0x2, %cl
je 0x5561
testb $0x8, (%rax)
jne 0x5595
movq %r14, %rdi
movq %rax, %rsi
callq 0x4e8f
testq %rax, %rax
je 0x55a3
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
movl $0x1006, %edx           # imm = 0x1006
callq 0x508f
movq %r14, %rdi
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xad4f
movq %rax, %r14
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rbx, %rdi
callq 0x504f
// File: /workspace/github_c_makefile_star2_O2/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 0x26ce
xorl %edi, %edi
movq %rax, %rsi
callq 0x5137
movq %rax, %rdi
callq 0x500f
movq %rax, %r14
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x26ce
xorl %edi, %edi
movq %rax, %rsi
callq 0x5137
movq %rax, %rdi
callq 0x500f
movq %rax, %r15
movl (%r14), %eax
testb $0x8, %al
je 0x55fc
testb $0x2, (%r15)
jne 0x5654
testb $0x2, %al
je 0x5606
testb $0x8, (%r15)
jne 0x5651
testb $0x8, %al
je 0x562c
testb $0x8, (%r15)
je 0x562c
movq %r14, %rdi
movq %r15, %rsi
callq 0xac35
testb %al, %al
je 0x562c
leaq 0xd732(%rip), %rax      # 0x12d58
popq %rbx
popq %r14
popq %r15
retq
movq %r14, %rdi
movq %r15, %rsi
callq 0x4e8f
testq %rax, %rax
je 0x5663
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
movl $0x100e, %edx           # imm = 0x100E
callq 0x508f
jmp 0x5654
movq %r15, %r14
movq %r14, %rdi
xorl %esi, %esi
popq %rbx
popq %r14
popq %r15
jmp 0xad4f
movq %rbx, %rdi
callq 0x504f
// File: /workspace/github_c_makefile_star2_O2/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 0x26ce
xorl %edi, %edi
movq %rax, %rsi
callq 0x5137
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
callq 0x509f
movl $0xffffbde0, %eax       # imm = 0xFFFFBDE0
addl (%rbx), %eax
cmpl $0xa, %eax
ja 0x573a
leaq 0x6407(%rip), %rcx      # 0xbab0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
pushq $0x2
jmp 0x56b8
pushq $0x6
popq %rsi
movq %rbx, %rdi
callq 0x53ea
movq %rax, %rdi
callq 0x500f
movq %rax, %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0xac35
testb %al, %al
je 0x573c
movq %r15, %rdi
movl $0x400, %esi            # imm = 0x400
popq %rbx
popq %r14
popq %r15
jmp 0xad4f
movq %rbx, %rdi
callq 0x55ab
jmp 0x56c1
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x26ce
movq %r14, %rdi
movq %rax, %rsi
callq 0x5137
movq %r14, %rdi
movq %rax, %rsi
callq 0x4f3e
testq %rax, %rax
je 0x573c
movq %rax, %r15
pushq $-0x22
popq %rdx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x508f
jmp 0x56cc
movq %rbx, %rdi
callq 0x550a
jmp 0x56c1
jmp 0x56cc
movq %rbx, %rdi
callq 0x504f
// File: /workspace/github_c_makefile_star2_O2/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 0x26ce
xorl %edi, %edi
movq %rax, %rsi
callq 0x5137
movq %rax, %rdi
callq 0x500f
movq %rax, %r14
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x26ce
xorl %edi, %edi
movq %rax, %rsi
callq 0x5137
movq %rax, %rdi
callq 0x500f
movl (%r14), %ecx
testb $0x8, %cl
je 0x5882
testb $0x2, (%rax)
jne 0x588c
testb $0x2, %cl
je 0x58a9
testb $0x8, (%rax)
je 0x58a9
movq %r14, %rdi
callq 0xa778
movq 0x8(%rax), %rdi
movl $0x400, %esi            # imm = 0x400
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xad4f
movq %rbx, %rdi
callq 0x502f
// File: /workspace/github_c_makefile_star2_O2/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 0x26ce
xorl %edi, %edi
movq %rax, %rsi
callq 0x5137
movq %rax, %r14
pushq $0x20
popq %rdx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x508f
movq %r14, %rdi
callq 0xa7dc
movq %rax, %r14
movb 0x18(%rax), %bpl
movq 0x10(%rax), %r13
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x26ce
movq %rsp, %r12
movq %rax, %rdi
movq %r12, %rsi
callq 0x270b
movq %rax, %r15
movq (%r12), %rax
cmpq %r13, %rax
setae %al
je 0x5921
andb %al, %bpl
je 0x598a
xorl %r12d, %r12d
cmpq %r12, %r13
je 0x595f
movq 0x20(%r14,%r12,8), %rdi
movq (%r15,%r12,8), %rsi
callq 0x5137
movq 0x20(%r14,%r12,8), %rdi
movq %rax, %rsi
callq 0x4f3e
testq %rax, %rax
je 0x5972
movq 0x20(%r14,%r12,8), %rdi
movq %rax, %rsi
callq 0xac35
testb %al, %al
je 0x5972
incq %r12
jmp 0x5924
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 0x64db(%rip), %rsi      # 0xbe5b
movq %r12, %rdx
xorl %eax, %eax
callq 0x4a05
movq 0x8(%rbx), %rdi
leaq 0x64aa(%rip), %rsi      # 0xbe3f
xorl %eax, %eax
callq 0x4a05