LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/chgzm[P]minic/generator.c
// Function: calc_localvar_size_in_stmt
static int calc_localvar_size_in_stmt(const StmtNode* node) {
    if (node->labeled_stmt_node != NULL) {
        return calc_localvar_size_in_labeled_stmt(node->labeled_stmt_node);
    }
    else if (node->compound_stmt_node != NULL) {
        return calc_localvar_size_in_compound_stmt(node->compound_stmt_node);
    }
    else if (node->selection_stmt_node != NULL) {
        return calc_localvar_size_in_selection_stmt(node->selection_stmt_node);
    }
    else if (node->itr_stmt_node != NULL) {
        return calc_localvar_size_in_itr_stmt(node->itr_stmt_node);
    }

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
je 0x3b27
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x3c90
movl %eax, -0x4(%rbp)
jmp 0x3b8b
movq -0x10(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x3b44
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x3850
movl %eax, -0x4(%rbp)
jmp 0x3b8b
movq -0x10(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x3b61
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x3cb0
movl %eax, -0x4(%rbp)
jmp 0x3b8b
movq -0x10(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x3b7e
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x3d00
movl %eax, -0x4(%rbp)
jmp 0x3b8b
jmp 0x3b80
jmp 0x3b82
jmp 0x3b84
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/chgzm[P]minic/generator.c
// Function: get_varsize_from_decl_specifier_nodes
static int get_varsize_from_decl_specifier_nodes(const Vector* nodes) {
    for (int i = 0; i < nodes->size; ++i) {
        const DeclSpecifierNode* decl_specifier_node = nodes->elements[i];
        if (decl_specifier_node->type_specifier_node == NULL) {
            continue;
        }

        const TypeSpecifierNode* type_specifier_node = decl_specifier_node->type_specifier_node;
        if (type_specifier_node->type_specifier == TYPE_STRUCT) {
            const StructSpecifierNode* struct_specifier_node = type_specifier_node->struct_specifier_node;
            const char* ident = struct_specifier_node->identifier;
            const StructInfo* struct_info1 = strptrmap_get(struct_map, ident);
            return (struct_info1->field_info_map->size * 8);
        } 
        else if (type_specifier_node->type_specifier == TYPE_TYPEDEFNAME) {
            const StructInfo* struct_info2 = strptrmap_get(struct_map, type_specifier_node->struct_name);
            return (struct_info2->field_info_map->size * 8);
        } 
        else {
            return 8; // @todo
        }
    }

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jge 0x3c80
movq -0x10(%rbp), %rax
movq (%rax), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x3be5
jmp 0x3c72
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpl $0x5, (%rax)
jne 0x3c36
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq 0x11539(%rip), %rdi     # 0x15150
movq -0x38(%rbp), %rsi
callq 0xeb80
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq (%rax), %rax
movl 0x8(%rax), %eax
shll $0x3, %eax
movl %eax, -0x4(%rbp)
jmp 0x3c87
movq -0x28(%rbp), %rax
cmpl $0x7, (%rax)
jne 0x3c69
movq 0x1150a(%rip), %rdi     # 0x15150
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0xeb80
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq (%rax), %rax
movl 0x8(%rax), %eax
shll $0x3, %eax
movl %eax, -0x4(%rbp)
jmp 0x3c87
movl $0x8, -0x4(%rbp)
jmp 0x3c87
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x3bb3
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/chgzm[P]minic/generator.c
// Function: calc_localvar_size_in_selection_stmt
static int calc_localvar_size_in_selection_stmt(const SelectionStmtNode* node) {
    int size = 0;
    size += calc_localvar_size_in_stmt(node->stmt_node_0);

    if (node->stmt_node_1 != NULL) {
        size += calc_localvar_size_in_stmt(node->stmt_node_1);
    }

    return size;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x3b00
addl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x3cf4
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x3b00
addl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/chgzm[P]minic/generator.c
// Function: calc_localvar_size_in_itr_stmt
static int calc_localvar_size_in_itr_stmt(const ItrStmtNode* node) {
    int size = 0;
    for (int i = 0; i < node->declaration_nodes->size; ++i) {
        const DeclarationNode* declaration_node = node->declaration_nodes->elements[i];
        const Vector* init_declarator_nodes = declaration_node->init_declarator_nodes;

        for (int j = 0; j < init_declarator_nodes->size; ++j) {
            const InitDeclaratorNode* init_declarator_node = init_declarator_nodes->elements[j];
            const DeclaratorNode* declarator_node = init_declarator_node->declarator_node;
            const DirectDeclaratorNode* direct_declarator_node = declarator_node->direct_declarator_node;

            if (direct_declarator_node->conditional_expr_node == NULL) {
                size += 8;
            } else {
                const int array_size = get_array_size_from_constant_expr(direct_declarator_node->conditional_expr_node);
                size += (array_size * 8);
            }
        }
    }

    size += calc_localvar_size_in_stmt(node->stmt_node);

    return size;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
movq -0x8(%rbp), %rcx
movq 0x28(%rcx), %rcx
cmpl 0x8(%rcx), %eax
jge 0x3ddd
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq (%rax), %rax
movslq -0x10(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jge 0x3dcd
movq -0x20(%rbp), %rax
movq (%rax), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
cmpq $0x0, 0x18(%rax)
jne 0x3da4
movl -0xc(%rbp), %eax
addl $0x8, %eax
movl %eax, -0xc(%rbp)
jmp 0x3dc0
movq -0x40(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x3660
movl %eax, -0x44(%rbp)
movl -0x44(%rbp), %eax
shll $0x3, %eax
addl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
jmp 0x3dc2
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x3d58
jmp 0x3dcf
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x3d1a
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x3b00
addl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/chgzm[P]minic/generator.c
// Function: process_args
static void process_args(const ParamListNode* node) {
    const int param_count = count_param_list_node(node);

    const ParamListNode* current = node;
    int index = 1;
    while (current != NULL) {
        process_param_list_node(current, param_count - index);
        current = current->param_list_node;
        ++index;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x3e60
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x1, -0x1c(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x3e54
movq -0x18(%rbp), %rdi
movl -0xc(%rbp), %esi
subl -0x1c(%rbp), %esi
callq 0x3ea0
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x3e27
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/chgzm[P]minic/generator.c
// Function: count_param_list_node
static int count_param_list_node(const ParamListNode* node) {
    int cnt = 0;
    const ParamListNode* current = node;
    while (current != NULL) {
        current = current->param_list_node;
        ++cnt;
    }

    return cnt;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x3e95
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x3e77
movl -0xc(%rbp), %eax
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/chgzm[P]minic/generator.c
// Function: process_block_item
static void process_block_item(const BlockItemNode* node) {
    if (node->declaration_node != NULL) {
        process_declaration(node->declaration_node);
    } else {
        process_stmt(node->stmt_node);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
je 0x4204
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x4220
jmp 0x4211
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x44b0
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/chgzm[P]minic/generator.c
// Function: process_stmt
static void process_stmt(const StmtNode* node) {
    if (node->labeled_stmt_node != NULL) {
        process_labeled_stmt(node->labeled_stmt_node);
    }
    else if (node->expr_stmt_node != NULL) {
        process_expr_stmt(node->expr_stmt_node);
    }
    else if (node->itr_stmt_node != NULL) {
        process_itr_stmt(node->itr_stmt_node);
    }
    else if (node->compound_stmt_node != NULL) {
        process_compound_stmt(node->compound_stmt_node);
    }
    else if (node->jump_stmt_node != NULL) {
        process_jump_stmt(node->jump_stmt_node);
    }
    else if (node->selection_stmt_node != NULL) {
        process_selection_stmt(node->selection_stmt_node);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
je 0x44d7
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x6540
jmp 0x4561
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x44f1
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x6680
jmp 0x455f
movq -0x8(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x450b
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x66b0
jmp 0x455d
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x4525
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x39d0
jmp 0x455b
movq -0x8(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0x453f
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0x6920
jmp 0x4559
movq -0x8(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x4557
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x6a00
jmp 0x4559
jmp 0x455b
jmp 0x455d
jmp 0x455f
jmp 0x4561
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/chgzm[P]minic/generator.c
// Function: align_offset
static int align_offset(int offset, int size) {
    if (size == 1) {
        return offset;
    }

    if (offset % 8 != 0) {
        offset += (8 - offset % 8);
    }

    return offset;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpl $0x1, -0xc(%rbp)
jne 0x4588
movl -0x8(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x45b6
movl -0x8(%rbp), %eax
movl $0x8, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
je 0x45b0
movl -0x8(%rbp), %eax
movl $0x8, %ecx
cltd
idivl %ecx
movl $0x8, %eax
subl %edx, %eax
addl -0x8(%rbp), %eax
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/chgzm[P]minic/generator.c
// Function: process_conditional_expr
static void process_conditional_expr(const ConditionalExprNode* node) {
    // <logical-or-expression>
    if (node->conditional_expr_node == NULL) {
        process_logical_or_expr(node->logical_or_expr_node);
    }
    // <logical-or-expression> ? <expression> : <conditional-expression>
    else {
        const char* label1 = get_label();
        const char* label2 = get_label();
 
        process_logical_or_expr(node->logical_or_expr_node);
        printf("  pop rax\n");
        printf("  cmp rax, 0\n");
        printf("  je %s\n", label1);
        process_expr(node->expr_node);
        printf("  jmp %s\n", label2);
        printf("%s:\n", label1);
        process_conditional_expr(node->conditional_expr_node);
        printf("%s:\n", label2);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x4818
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x4ba0
jmp 0x48b4
callq 0x6500
movq %rax, -0x10(%rbp)
callq 0x6500
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x4ba0
leaq 0xaea7(%rip), %rdi      # 0xf6e4
movb $0x0, %al
callq 0x1090
leaq 0xaf74(%rip), %rdi      # 0xf7bf
movb $0x0, %al
callq 0x1090
movq -0x10(%rbp), %rsi
leaq 0xaf70(%rip), %rdi      # 0xf7cd
movb $0x0, %al
callq 0x1090
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x4c20
movq -0x18(%rbp), %rsi
leaq 0xaf5a(%rip), %rdi      # 0xf7d6
movb $0x0, %al
callq 0x1090
movq -0x10(%rbp), %rsi
leaq 0xad5f(%rip), %rdi      # 0xf5ed
movb $0x0, %al
callq 0x1090
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x47f0
movq -0x18(%rbp), %rsi
leaq 0xad40(%rip), %rdi      # 0xf5ed
movb $0x0, %al
callq 0x1090
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/chgzm[P]minic/generator.c
// Function: process_unary_expr_left
static void process_unary_expr_left(const UnaryExprNode* node) {
    switch (node->type) {
    // postfix-expression
    case UN_NONE: {
        process_postfix_expr_left(node->postfix_expr_node);
        break;
    }
    // ++ unary-expression
    case UN_INC: {
        // @todo
        break;
    }
    case UN_DEC: {
        break;
    }
    case UN_OP: {
        switch (node->op_type) {
        case OP_MUL: {
            process_cast_expr(node->cast_expr_node);

            break;
        }
        default: {
            break;
        }
        }

        break;
    }
    case UN_SIZEOF_IDENT: 
    case UN_SIZEOF_TYPE: {
        break;
    }
    default: {
        break;
    }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl 0x20(%rax), %eax
movq %rax, -0x10(%rbp)
subq $0x5, %rax
ja 0x4926
movq -0x10(%rbp), %rax
leaq 0xac00(%rip), %rcx      # 0xf4e8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x5d80
jmp 0x4928
jmp 0x4928
jmp 0x4928
movq -0x8(%rbp), %rax
movl 0x24(%rax), %eax
subl $0xd, %eax
jne 0x4920
jmp 0x4911
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x5400
jmp 0x4922
jmp 0x4922
jmp 0x4928
jmp 0x4928
jmp 0x4928
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/chgzm[P]minic/generator.c
// Function: process_logical_or_expr
static void process_logical_or_expr(const LogicalOrExprNode* node) {
    // <logical-and-expression>
    if (node->logical_or_expr_node == NULL) {
        process_logical_and_expr(node->logical_and_expr_node);
    }
    // <logical-or-expression> || <logical-and-expression>
    else {
        process_logical_or_expr(node->logical_or_expr_node);
        process_logical_and_expr(node->logical_and_expr_node);

        printf("  pop rdi\n");
        printf("  pop rax\n");
        printf("  or rax, rdi\n");
        printf("  push rax\n");
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x4bc5
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x4c80
jmp 0x4c16
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x4ba0
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x4c80
leaq 0xaaf4(%rip), %rdi      # 0xf6d9
movb $0x0, %al
callq 0x1090
leaq 0xaaf1(%rip), %rdi      # 0xf6e4
movb $0x0, %al
callq 0x1090
leaq 0xabdf(%rip), %rdi      # 0xf7e0
movb $0x0, %al
callq 0x1090
leaq 0xaabe(%rip), %rdi      # 0xf6cd
movb $0x0, %al
callq 0x1090
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/chgzm[P]minic/generator.c
// Function: process_expr
static void process_expr(const ExprNode* node) {
    // <assignment-expression>
    if (node->expr_node == NULL) {
        process_assign_expr(node->assign_expr_node);
    }
    // <expression> , <assignment-expression>
    else {
        const ExprNode* current = node;
        while (current->expr_node != NULL) {
            process_assign_expr(current->assign_expr_node);
            current = current->expr_node;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x4c45
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x45c0
jmp 0x4c74
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x4c72
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x45c0
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0x4c4d
jmp 0x4c74
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/chgzm[P]minic/generator.c
// Function: process_logical_and_expr
static void process_logical_and_expr(const LogicalAndExprNode* node) {
    // <inclusive-or-expression>
    if (node->logical_and_expr_node == NULL) {
        process_inclusive_or_expr(node->inclusive_or_expr_node);
    }
    // <logical-and-expression> && <inclusive-or-expression>
    else {
        char* label1 = get_label();
        char* label2 = get_label();
        process_logical_and_expr(node->logical_and_expr_node);
        printf("  pop rax\n");
        printf("  cmp rax, 0\n");
        printf("  je %s\n", label1);
        process_inclusive_or_expr(node->inclusive_or_expr_node);
        printf("  pop rax\n");
        printf("  cmp rax, 0\n");
        printf("  je %s\n", label1);
        printf("  push 1\n");
        printf("  jmp %s\n", label2);
        printf("%s:\n", label1);
        printf("  push 0\n");
        printf("%s:\n", label2);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x4ca8
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x4d90
jmp 0x4d81
callq 0x6500
movq %rax, -0x10(%rbp)
callq 0x6500
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x4c80
leaq 0xaa16(%rip), %rdi      # 0xf6e4
movb $0x0, %al
callq 0x1090
leaq 0xaae3(%rip), %rdi      # 0xf7bf
movb $0x0, %al
callq 0x1090
movq -0x10(%rbp), %rsi
leaq 0xaadf(%rip), %rdi      # 0xf7cd
movb $0x0, %al
callq 0x1090
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x4d90
leaq 0xa9dc(%rip), %rdi      # 0xf6e4
movb $0x0, %al
callq 0x1090
leaq 0xaaa9(%rip), %rdi      # 0xf7bf
movb $0x0, %al
callq 0x1090
movq -0x10(%rbp), %rsi
leaq 0xaaa5(%rip), %rdi      # 0xf7cd
movb $0x0, %al
callq 0x1090
leaq 0xaab9(%rip), %rdi      # 0xf7ef
movb $0x0, %al
callq 0x1090
movq -0x18(%rbp), %rsi
leaq 0xaa8e(%rip), %rdi      # 0xf7d6
movb $0x0, %al
callq 0x1090
movq -0x10(%rbp), %rsi
leaq 0xa893(%rip), %rdi      # 0xf5ed
movb $0x0, %al
callq 0x1090
leaq 0xaa91(%rip), %rdi      # 0xf7f9
movb $0x0, %al
callq 0x1090
movq -0x18(%rbp), %rsi
leaq 0xa873(%rip), %rdi      # 0xf5ed
movb $0x0, %al
callq 0x1090
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/chgzm[P]minic/generator.c
// Function: process_equality_expr
static void process_equality_expr(const EqualityExprNode* node) {
    switch (node->cmp_type) {
    // <relational-expression>
    case CMP_NONE: {
        process_relational_expr(node->relational_expr_node);
        break;
    }
    // <equality-expression> == <relational-expression>
    case CMP_EQ: {
        process_equality_expr(node->equality_expr_node);
        process_relational_expr(node->relational_expr_node);

        printf("  pop rdi\n");
        printf("  pop rax\n");
        printf("  cmp rax, rdi\n");
        printf("  sete al\n");
        printf("  movzb rax, al\n");
        printf("  push rax\n");

        break;
    }
    // <equality-expression> != <relational-expression>
    case CMP_NE: {
        process_equality_expr(node->equality_expr_node);
        process_relational_expr(node->relational_expr_node);

        printf("  pop rdi\n");
        printf("  pop rax\n");
        printf("  cmp rax, rdi\n");
        printf("  setne al\n");
        printf("  movzb rax, al\n");
        printf("  push rax\n");

        break;
    }
    default:{
        break;
    }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %eax
movl %eax, -0xc(%rbp)
testl %eax, %eax
je 0x4e56
jmp 0x4e3b
movl -0xc(%rbp), %eax
subl $0x3, %eax
je 0x4e68
jmp 0x4e45
movl -0xc(%rbp), %eax
subl $0x4, %eax
je 0x4ed8
jmp 0x4f48
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x4f50
jmp 0x4f4a
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x4e20
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x4f50
leaq 0xa850(%rip), %rdi      # 0xf6d9
movb $0x0, %al
callq 0x1090
leaq 0xa84d(%rip), %rdi      # 0xf6e4
movb $0x0, %al
callq 0x1090
leaq 0xa95e(%rip), %rdi      # 0xf803
movb $0x0, %al
callq 0x1090
leaq 0xa960(%rip), %rdi      # 0xf813
movb $0x0, %al
callq 0x1090
leaq 0xa95d(%rip), %rdi      # 0xf81e
movb $0x0, %al
callq 0x1090
leaq 0xa7fe(%rip), %rdi      # 0xf6cd
movb $0x0, %al
callq 0x1090
jmp 0x4f4a
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x4e20
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x4f50
leaq 0xa7e0(%rip), %rdi      # 0xf6d9
movb $0x0, %al
callq 0x1090
leaq 0xa7dd(%rip), %rdi      # 0xf6e4
movb $0x0, %al
callq 0x1090
leaq 0xa8ee(%rip), %rdi      # 0xf803
movb $0x0, %al
callq 0x1090
leaq 0xa90c(%rip), %rdi      # 0xf82f
movb $0x0, %al
callq 0x1090
leaq 0xa8ed(%rip), %rdi      # 0xf81e
movb $0x0, %al
callq 0x1090
leaq 0xa78e(%rip), %rdi      # 0xf6cd
movb $0x0, %al
callq 0x1090
jmp 0x4f4a
jmp 0x4f4a
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/chgzm[P]minic/generator.c
// Function: process_additive_expr
static void process_additive_expr(const AdditiveExprNode* node) {
    // <multiplicative-expression>
    if (node->additive_expr_node == NULL) {
        process_multiplicative_expr(node->multiplicative_expr_node);
    }
    //  <additive-expression> + <multiplicative-expression>
    else if (node->operator_type == OP_ADD) {
        process_additive_expr(node->additive_expr_node);
        process_multiplicative_expr(node->multiplicative_expr_node);

        printf("  pop rdi\n");
        printf("  pop rax\n");
        printf("  add rax, rdi\n");
        printf("  push rax\n");
    }
    // <additive-expression> - <multiplicative-expression>
    else if (node->operator_type == OP_SUB) {
        process_additive_expr(node->additive_expr_node);
        process_multiplicative_expr(node->multiplicative_expr_node);

        printf("  pop rdi\n");
        printf("  pop rax\n");
        printf("  sub rax, rdi\n");
        printf("  push rax\n");
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x51c9
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x5290
jmp 0x5285
movq -0x8(%rbp), %rax
cmpl $0xb, (%rax)
jne 0x5226
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x51a0
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x5290
leaq 0xa4e6(%rip), %rdi      # 0xf6d9
movb $0x0, %al
callq 0x1090
leaq 0xa4e3(%rip), %rdi      # 0xf6e4
movb $0x0, %al
callq 0x1090
leaq 0xa65a(%rip), %rdi      # 0xf869
movb $0x0, %al
callq 0x1090
leaq 0xa4b0(%rip), %rdi      # 0xf6cd
movb $0x0, %al
callq 0x1090
jmp 0x5283
movq -0x8(%rbp), %rax
cmpl $0xc, (%rax)
jne 0x5281
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x51a0
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x5290
leaq 0xa489(%rip), %rdi      # 0xf6d9
movb $0x0, %al
callq 0x1090
leaq 0xa486(%rip), %rdi      # 0xf6e4
movb $0x0, %al
callq 0x1090
leaq 0xa60d(%rip), %rdi      # 0xf879
movb $0x0, %al
callq 0x1090
leaq 0xa453(%rip), %rdi      # 0xf6cd
movb $0x0, %al
callq 0x1090
jmp 0x5283
jmp 0x5285
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/chgzm[P]minic/generator.c
// Function: process_multiplicative_expr
static void process_multiplicative_expr(const MultiPlicativeExprNode* node) {
    // <cast-expression>
    if (node->multiplicative_expr_node == NULL) {
        process_cast_expr(node->cast_expr_node);
    }
    //   <multiplicative-expression> * <cast-expression>
    // | <multiplicative-expression> / <cast-expression>
    // | <multiplicative-expression> % <cast-expression>
    else if (node->operator_type == OP_MUL) {
        process_multiplicative_expr(node->multiplicative_expr_node);
        process_cast_expr(node->cast_expr_node);

        printf("  pop rdi\n");
        printf("  pop rax\n");
        printf("  imul rax, rdi\n");
        printf("  push rax\n");
    }
    else if (node->operator_type == OP_DIV) {
        process_multiplicative_expr(node->multiplicative_expr_node);
        process_cast_expr(node->cast_expr_node);

        printf("  pop rdi\n");
        printf("  pop rax\n");
        printf("  cqo\n");
        printf("  idiv rdi\n");
        printf("  push rax\n");
    }
    else if (node->operator_type == OP_MOD) {
        process_multiplicative_expr(node->multiplicative_expr_node);
        process_cast_expr(node->cast_expr_node);

        printf("  pop rdi\n");
        printf("  pop rax\n");
        printf("  cqo\n");
        printf("  idiv rdi\n");
        printf("  push rdx\n");
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x52b9
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x5400
jmp 0x53f3
movq -0x8(%rbp), %rax
cmpl $0xd, (%rax)
jne 0x5319
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x5290
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x5400
leaq 0xa3f6(%rip), %rdi      # 0xf6d9
movb $0x0, %al
callq 0x1090
leaq 0xa3f3(%rip), %rdi      # 0xf6e4
movb $0x0, %al
callq 0x1090
leaq 0xa58a(%rip), %rdi      # 0xf889
movb $0x0, %al
callq 0x1090
leaq 0xa3c0(%rip), %rdi      # 0xf6cd
movb $0x0, %al
callq 0x1090
jmp 0x53f1
movq -0x8(%rbp), %rax
cmpl $0xe, (%rax)
jne 0x5384
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x5290
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x5400
leaq 0xa396(%rip), %rdi      # 0xf6d9
movb $0x0, %al
callq 0x1090
leaq 0xa393(%rip), %rdi      # 0xf6e4
movb $0x0, %al
callq 0x1090
leaq 0xa405(%rip), %rdi      # 0xf764
movb $0x0, %al
callq 0x1090
leaq 0xa3fe(%rip), %rdi      # 0xf76b
movb $0x0, %al
callq 0x1090
leaq 0xa352(%rip), %rdi      # 0xf6cd
movb $0x0, %al
callq 0x1090
jmp 0x53ef
movq -0x8(%rbp), %rax
cmpl $0xf, (%rax)
jne 0x53ed
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x5290
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x5400
leaq 0xa32b(%rip), %rdi      # 0xf6d9
movb $0x0, %al
callq 0x1090
leaq 0xa328(%rip), %rdi      # 0xf6e4
movb $0x0, %al
callq 0x1090
leaq 0xa39a(%rip), %rdi      # 0xf764
movb $0x0, %al
callq 0x1090
leaq 0xa393(%rip), %rdi      # 0xf76b
movb $0x0, %al
callq 0x1090
leaq 0xa4b4(%rip), %rdi      # 0xf89a
movb $0x0, %al
callq 0x1090
jmp 0x53ef
jmp 0x53f1
jmp 0x53f3
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/chgzm[P]minic/generator.c
// Function: get_localvar
static LocalVar* get_localvar(const char* str) {
    for (int i = 0; i < localvar_list->size; ++i) {
        LocalVar* localvar = localvar_list->elements[i];
        if (strcmp(localvar->name, str) == 0) {
            return localvar;
        }
    }

    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq 0xf53b(%rip), %rcx      # 0x15168
cmpl 0x8(%rcx), %eax
jge 0x5c75
movq 0xf52f(%rip), %rax      # 0x15168
movq (%rax), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x10c0
cmpl $0x0, %eax
jne 0x5c68
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x5c7d
jmp 0x5c6a
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x5c23
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/chgzm[P]minic/generator.c
// Function: get_globalvar
static GlobalVar* get_globalvar(const char* str) {
    for (int i = 0; i < globalvar_list->size; ++i) {
        GlobalVar* gv = globalvar_list->elements[i];
        if (strcmp(gv->name, str) == 0) {
            return gv;
        }
    }

    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq 0xf49b(%rip), %rcx      # 0x15148
cmpl 0x8(%rcx), %eax
jge 0x5cf5
movq 0xf48f(%rip), %rax      # 0x15148
movq (%rax), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x10c0
cmpl $0x0, %eax
jne 0x5ce8
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x5cfd
jmp 0x5cea
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x5ca3
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/chgzm[P]minic/generator.c
// Function: process_primary_expr_right
static void process_primary_expr_right(const PrimaryExprNode* node) {
    // constant
    if (node->constant_node != NULL) {
        process_constant_node(node->constant_node);
    }
    // ( expression )
    else if (node->expr_node != NULL) {
        process_expr(node->expr_node);
    }
    // identifier
    else if (node->identifier != NULL) {
        process_identifier_right(node->identifier);
    }
    else {
        // @todo
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
je 0x5d34
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x60d0
jmp 0x5d6e
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x5d4e
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x4c20
jmp 0x5d6c
movq -0x8(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x5d68
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x61e0
jmp 0x5d6a
jmp 0x5d6a
jmp 0x5d6c
jmp 0x5d6e
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/chgzm[P]minic/generator.c
// Function: process_constant_node
static void process_constant_node(const ConstantNode* node) {
    switch (node->const_type) {
    case CONST_BYTE: {
        printf("  push %d\n", node->integer_constant);
        intstack_push(size_stack, 1);
        break;
    }
    case CONST_INT: {
        printf("  push %d\n", node->integer_constant);
        intstack_push(size_stack, 8);
        break;
    }
    case CONST_STR: {
        const char* label = get_string_label();
        printf(".data\n");
        printf("%s:\n", label);
        printf("  .string \"%s\"\n", node->character_constant);
        printf(".text\n");
        printf("  lea rax, %s[rip]\n", label);
        printf("  push rax\n");
        break;
    }
    case CONST_FLOAT: {
        break;
    }
    default: {
        error("Invalid ConstType.\n");
        break;
    }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %eax
movq %rax, -0x18(%rbp)
subq $0x3, %rax
ja 0x61c8
movq -0x18(%rbp), %rax
leaq 0x94a9(%rip), %rcx      # 0xf5a4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x8(%rbp), %rax
movl 0x4(%rax), %esi
leaq 0x97e2(%rip), %rdi      # 0xf8f4
movb $0x0, %al
callq 0x1090
movq 0xf020(%rip), %rdi      # 0x15140
movl $0x1, %esi
callq 0xe810
jmp 0x61d6
movq -0x8(%rbp), %rax
movl 0x4(%rax), %esi
leaq 0x97b7(%rip), %rdi      # 0xf8f4
movb $0x0, %al
callq 0x1090
movq 0xeff5(%rip), %rdi      # 0x15140
movl $0x8, %esi
callq 0xe810
jmp 0x61d6
callq 0x37d0
movq %rax, -0x10(%rbp)
leaq 0x947f(%rip), %rdi      # 0xf5e6
movb $0x0, %al
callq 0x1090
movq -0x10(%rbp), %rsi
leaq 0x9474(%rip), %rdi      # 0xf5ed
movb $0x0, %al
callq 0x1090
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rsi
leaq 0x9476(%rip), %rdi      # 0xf605
movb $0x0, %al
callq 0x1090
leaq 0x9461(%rip), %rdi      # 0xf5fe
movb $0x0, %al
callq 0x1090
movq -0x10(%rbp), %rsi
leaq 0x97cf(%rip), %rdi      # 0xf97e
movb $0x0, %al
callq 0x1090
leaq 0x9510(%rip), %rdi      # 0xf6cd
movb $0x0, %al
callq 0x1090
jmp 0x61d6
jmp 0x61d6
leaq 0x97c3(%rip), %rdi      # 0xf992
movb $0x0, %al
callq 0xe4e0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/chgzm[P]minic/generator.c
// Function: process_primary_expr_left
static void process_primary_expr_left(const PrimaryExprNode* node) {
    // constant
    if (node->constant_node != NULL) {
        process_constant_node(node->constant_node);
    }
    // ( expression )
    else if (node->expr_node != NULL) {
        process_expr_left(node->expr_node);
    }
    // identifier
    else if (node->identifier != NULL) {
        process_identifier_left(node->identifier);
    }
    else {
        // @todo
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
je 0x63a4
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x60d0
jmp 0x63de
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x63be
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x63f0
jmp 0x63dc
movq -0x8(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x63d8
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x6440
jmp 0x63da
jmp 0x63da
jmp 0x63dc
jmp 0x63de
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/chgzm[P]minic/generator.c
// Function: process_expr_left
static void process_expr_left(const ExprNode* node) {
    process_unary_expr_left(node
               ->assign_expr_node
               ->conditional_expr_node
               ->logical_or_expr_node
               ->logical_and_expr_node
               ->inclusive_or_expr_node
               ->exclusive_or_expr_node
               ->and_expr_node
               ->equality_expr_node
               ->relational_expr_node
               ->shift_expr_node
               ->additive_expr_node
               ->multiplicative_expr_node
               ->cast_expr_node
               ->unary_expr_node
    );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rax
movq (%rax), %rax
movq (%rax), %rax
movq (%rax), %rax
movq (%rax), %rax
movq (%rax), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rax
movq (%rax), %rdi
callq 0x48c0
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/chgzm[P]minic/generator.c
// Function: process_identifier_left
static void process_identifier_left(const char* identifier) {
    const LocalVar* lv = get_localvar(identifier);
    if (lv != NULL) {
        printf("  lea rax, [rbp-%d]\n", lv->offset);
        printf("  push rax\n");
        stack_push(type_stack, lv->type);
    } 
    else {
        const GlobalVar* gv = get_globalvar(identifier);    
        printf("  lea rax, %s[rip]\n", gv->name);
        printf("  push rax\n");
        stack_push(type_stack, gv->type);
    }
    intstack_push(size_stack, 8);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x5c10
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x6498
movq -0x10(%rbp), %rax
movl 0x14(%rax), %esi
leaq 0x924a(%rip), %rdi      # 0xf6b8
movb $0x0, %al
callq 0x1090
leaq 0x9251(%rip), %rdi      # 0xf6cd
movb $0x0, %al
callq 0x1090
movq 0xeca6(%rip), %rdi      # 0x15130
movq -0x10(%rbp), %rax
movq (%rax), %rsi
callq 0xe6e0
jmp 0x64dc
movq -0x8(%rbp), %rdi
callq 0x5c90
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rsi
leaq 0x94ca(%rip), %rdi      # 0xf97e
movb $0x0, %al
callq 0x1090
leaq 0x920b(%rip), %rdi      # 0xf6cd
movb $0x0, %al
callq 0x1090
movq 0xec60(%rip), %rdi      # 0x15130
movq -0x18(%rbp), %rax
movq (%rax), %rsi
callq 0xe6e0
movq 0xec5d(%rip), %rdi      # 0x15140
movl $0x8, %esi
callq 0xe810
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/chgzm[P]minic/generator.c
// Function: process_labeled_stmt
static void process_labeled_stmt(const LabeledStmtNode* node) {
    switch (node->labeled_stmt_type) {
    case LABELED_CASE: {
        process_conditional_expr(node->conditional_expr_node);

        printf("  pop rdi\n");
        printf("  pop rax\n");
        printf("  push rax\n");
        printf("  cmp rax, rdi\n");
        char* current_stmt_label = stack_top(current_stmt_label_stack);
        if (node->stmt_node->labeled_stmt_node == NULL) {
            const char* label = get_label();
            printf("  jne %s\n", label);
            printf("%s:\n", current_stmt_label);
            process_stmt(node->stmt_node);
            printf("%s:\n", label); 
           
            stack_pop(current_stmt_label_stack);
            stack_push(current_stmt_label_stack, get_label()); 
        } else {
            printf("  je %s\n", current_stmt_label);
            process_labeled_stmt(node->stmt_node->labeled_stmt_node);
        }

        break;
    }
    case LABELED_DEFAULT: {
        process_stmt(node->stmt_node);
        break;
    }
    default: {
        break;
    }
    } 
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x1c(%rbp)
testl %eax, %eax
je 0x656c
jmp 0x655b
movl -0x1c(%rbp), %eax
subl $0x1, %eax
je 0x6669
jmp 0x6678
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x47f0
leaq 0x9159(%rip), %rdi      # 0xf6d9
movb $0x0, %al
callq 0x1090
leaq 0x9156(%rip), %rdi      # 0xf6e4
movb $0x0, %al
callq 0x1090
leaq 0x9131(%rip), %rdi      # 0xf6cd
movb $0x0, %al
callq 0x1090
leaq 0x9259(%rip), %rdi      # 0xf803
movb $0x0, %al
callq 0x1090
movq 0xeb80(%rip), %rdi      # 0x15138
callq 0xe760
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
cmpq $0x0, (%rax)
jne 0x6645
callq 0x6500
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rsi
leaq 0x93f6(%rip), %rdi      # 0xf9d9
movb $0x0, %al
callq 0x1090
movq -0x10(%rbp), %rsi
leaq 0x8ff8(%rip), %rdi      # 0xf5ed
movb $0x0, %al
callq 0x1090
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x44b0
movq -0x18(%rbp), %rsi
leaq 0x8fd9(%rip), %rdi      # 0xf5ed
movb $0x0, %al
callq 0x1090
movq 0xeb16(%rip), %rdi      # 0x15138
callq 0xe7a0
movq 0xeb0a(%rip), %rax      # 0x15138
movq %rax, -0x28(%rbp)
callq 0x6500
movq -0x28(%rbp), %rdi
movq %rax, %rsi
callq 0xe6e0
jmp 0x6667
movq -0x10(%rbp), %rsi
leaq 0x917d(%rip), %rdi      # 0xf7cd
movb $0x0, %al
callq 0x1090
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq (%rax), %rdi
callq 0x6540
jmp 0x667a
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x44b0
jmp 0x667a
jmp 0x667a
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/chgzm[P]minic/generator.c
// Function: process_jump_stmt
static void process_jump_stmt(const JumpStmtNode* node) {
    switch (node->jump_type) {
    case JMP_CONTINUE: {
        const char* label1 = stack_top(continue_label_stack);
        printf("  jmp %s\n", label1);
        break;
    }
    case JMP_BREAK: {
        const char* label2 = stack_top(break_label_stack);
        printf("  jmp %s\n", label2);
        break;
    }
    case JMP_RETURN: {
        if (node->expr_node != NULL) {
            process_expr(node->expr_node);
        }
        printf("  pop rax\n");
        if (ret_label == NULL) {
            ret_label = get_label();
        }
        printf("  jmp %s\n", ret_label);
        break;
    }
    default: {
        break;
    }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x1c(%rbp)
testl %eax, %eax
je 0x6952
jmp 0x693b
movl -0x1c(%rbp), %eax
subl $0x1, %eax
je 0x6976
jmp 0x6945
movl -0x1c(%rbp), %eax
subl $0x2, %eax
je 0x699a
jmp 0x69ed
movq 0xe7cf(%rip), %rdi      # 0x15128
callq 0xe760
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rsi
leaq 0x8e69(%rip), %rdi      # 0xf7d6
movb $0x0, %al
callq 0x1090
jmp 0x69ef
movq 0xe7a3(%rip), %rdi      # 0x15120
callq 0xe760
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rsi
leaq 0x8e45(%rip), %rdi      # 0xf7d6
movb $0x0, %al
callq 0x1090
jmp 0x69ef
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x69b2
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x4c20
leaq 0x8d2b(%rip), %rdi      # 0xf6e4
movb $0x0, %al
callq 0x1090
cmpq $0x0, 0xe7b0(%rip)      # 0x15178
jne 0x69d6
callq 0x6500
movq %rax, 0xe7a2(%rip)      # 0x15178
movq 0xe79b(%rip), %rsi      # 0x15178
leaq 0x8df2(%rip), %rdi      # 0xf7d6
movb $0x0, %al
callq 0x1090
jmp 0x69ef
jmp 0x69ef
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/chgzm[P]minic/minic.c
// Function: main
int main(int argc, char** argv) {
    if (argc < 2) {
        usage();
        return -1;
    }

    int arg_index = 1;
    if (strncmp("-d", argv[1], 2) == 0 || strncmp("--debug", argv[1], 7) == 0) {
        debug_flag = true;
        arg_index = 2;
    } 

    char* addr = read_file(argv[arg_index]);
    if (addr == NULL) {
        error("Failed to load file.\n"); 
        return -1;
    }

    const Vector* vec = tokenize(addr);
    if (vec == NULL) {
        error("Failed to tokenize.\n");
        return -1;
    }

#ifdef MINIC_DEV
    if (debug_flag) {
        dump_tokens(vec);
    }
#endif

    const Vector* processed_vec = preprocess(vec); 
    if (processed_vec == NULL) {
        error("Failed to preprocess.\n");
        return -1;
    }

#ifdef MINIC_DEV
    if (debug_flag) {
        dump_tokens(processed_vec);
    }
#endif

    const TransUnitNode* node = parse(processed_vec);
    if (node == NULL) {
        error("Failed to parse.\n");
        return -1;
    }

#ifdef MINIC_DEV
    if (debug_flag) {
        dump_nodes(node);
    }
#endif

    gen(node);

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0x2, -0x8(%rbp)
jge 0x6bed
callq 0x6d10
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x6d05
movl $0x1, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
leaq 0x8de0(%rip), %rdi      # 0xf9e3
movl $0x2, %edx
callq 0x1060
cmpl $0x0, %eax
je 0x6c30
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
leaq 0x8dc5(%rip), %rdi      # 0xf9e6
movl $0x7, %edx
callq 0x1060
cmpl $0x0, %eax
jne 0x6c3e
movb $0x1, 0xe549(%rip)      # 0x15180
movl $0x2, -0x14(%rbp)
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0xe510
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x6c74
leaq 0x8d8d(%rip), %rdi      # 0xf9ee
movb $0x0, %al
callq 0xe4e0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x6d05
movq -0x20(%rbp), %rdi
callq 0xca70
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x6c9f
leaq 0x8d75(%rip), %rdi      # 0xfa04
movb $0x0, %al
callq 0xe4e0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x6d05
movq -0x28(%rbp), %rdi
callq 0xc330
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x6cca
leaq 0x8d5f(%rip), %rdi      # 0xfa19
movb $0x0, %al
callq 0xe4e0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x6d05
movq -0x30(%rbp), %rdi
callq 0x6d30
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x6cf5
leaq 0x8d4b(%rip), %rdi      # 0xfa30
movb $0x0, %al
callq 0xe4e0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x6d05
movq -0x38(%rbp), %rdi
callq 0x2a70
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/chgzm[P]minic/parser.c
// Function: parse
TransUnitNode* parse(const Vector* vec) {
    // init
    typedef_map = create_strptrmap(1024);
    TransUnitNode* trans_unit_node = create_trans_unit_node();

    int index = 0;
    while (index < vec->size) {
        ExternalDeclNode* external_decl_node = create_external_decl_node(vec, &index);
        if (external_decl_node == NULL) {
            error("Failed to create external-declaration node.\n");
            return NULL;
        }

        vector_push_back(trans_unit_node->external_decl_nodes, external_decl_node);
    }

    return trans_unit_node;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl $0x400, %edi            # imm = 0x400
callq 0xe900
movq %rax, 0xe43b(%rip)      # 0x15188
callq 0x76c0
movq %rax, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jge 0x6dab
movq -0x10(%rbp), %rdi
leaq -0x1c(%rbp), %rsi
callq 0x6dc0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x6d99
leaq 0x8f38(%rip), %rdi      # 0xfcc0
movb $0x0, %al
callq 0xe4e0
movq $0x0, -0x8(%rbp)
jmp 0x6db3
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movq -0x28(%rbp), %rsi
callq 0xe610
jmp 0x6d5d
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/chgzm[P]minic/parser.c
// Function: decode_type_specifier
const char* decode_type_specifier(int type_specifier) {
    switch (type_specifier) {
    case TYPE_NONE:        { return "TYPE_NONE";        }
    case TYPE_VOID:        { return "TYPE_VOID";        }
    case TYPE_CHAR:        { return "TYPE_CHAR";        }
    case TYPE_INT:         { return "TYPE_INT";         }
    case TYPE_DOUBLE:      { return "TYPE_DOUBLE";      }
    case TYPE_STRUCT:      { return "TYPE_STRUCT";      }
    case TYPE_ENUM:        { return "TYPE_ENUM";        }
    case TYPE_TYPEDEFNAME: { return "TYPE_TYPEDEFNAME"; }
    default:               { return "INVALID";          }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq %rax, -0x18(%rbp)
subq $0x7, %rax
ja 0x71c0
movq -0x18(%rbp), %rax
leaq 0x8935(%rip), %rcx      # 0xfa84
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x8b8e(%rip), %rax      # 0xfced
movq %rax, -0x8(%rbp)
jmp 0x71cb
leaq 0x8b8b(%rip), %rax      # 0xfcf7
movq %rax, -0x8(%rbp)
jmp 0x71cb
leaq 0x8b88(%rip), %rax      # 0xfd01
movq %rax, -0x8(%rbp)
jmp 0x71cb
leaq 0x8b85(%rip), %rax      # 0xfd0b
movq %rax, -0x8(%rbp)
jmp 0x71cb
leaq 0x8b81(%rip), %rax      # 0xfd14
movq %rax, -0x8(%rbp)
jmp 0x71cb
leaq 0x8b80(%rip), %rax      # 0xfd20
movq %rax, -0x8(%rbp)
jmp 0x71cb
leaq 0x8b7f(%rip), %rax      # 0xfd2c
movq %rax, -0x8(%rbp)
jmp 0x71cb
leaq 0x8b7c(%rip), %rax      # 0xfd36
movq %rax, -0x8(%rbp)
jmp 0x71cb
leaq 0x8b80(%rip), %rax      # 0xfd47
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)