LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/sharmaeklavya2[P]cerplag/./util/tree.gen.c
// Function: parse_tree_get_node
TYPED(tree_node)* TYPED(tree_get_node)(TYPE value)
{
    TYPED(tree_node)* new_node = malloc(sizeof(TYPED(tree_node)));
    if(new_node == NULL){
        fprintf(stderr, "tree: No memory!\n");
    }else{
        new_node->value         = value;
        new_node->parent        = NULL;
        new_node->first_child   = NULL;
        new_node->next_sibling  = NULL;
        new_node->prev_sibling  = NULL;
        new_node->last_child    = NULL;
    }
    TYPED(tree_node_count)++;
    return new_node;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
movl $0x30, %edi
callq 0x3150
movq %rax, %rbx
testq %rax, %rax
je 0x78fc
movq %r14, (%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rbx)
movups %xmm0, 0x18(%rbx)
movq $0x0, 0x28(%rbx)
incl 0x134b0(%rip)           # 0x1ada4
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
callq 0x3795
jmp 0x78ee
// File: /workspace/github_c_makefile_star2_O1/sharmaeklavya2[P]cerplag/./util/tree.gen.c
// Function: parse_tree_insert
TYPED(tree_node)* TYPED(tree_insert)(TYPED(tree_node)* parent, TYPE value){
    TYPED(tree_node)* new_node = TYPED(tree_get_node)(value);
    new_node->parent = parent;
    if(parent->first_child == NULL && parent->last_child == NULL){
        parent->first_child = new_node;
    }else{
        new_node->prev_sibling = parent->last_child;
        parent->last_child->next_sibling = new_node;
    }
    parent->last_child = new_node;
    return new_node;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x78bc
movq %rbx, 0x8(%rax)
cmpq $0x0, 0x10(%rbx)
jne 0x7926
cmpq $0x0, 0x18(%rbx)
je 0x7940
movq 0x18(%rbx), %rcx
movq %rcx, 0x28(%rax)
addq $0x20, %rcx
movq %rax, (%rcx)
movq %rax, 0x18(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x10(%rbx), %rcx
jmp 0x7932
// File: /workspace/github_c_makefile_star2_O1/sharmaeklavya2[P]cerplag/./util/tree.gen.c
// Function: parse_tree_destroy
void TYPED(tree_destroy)(TYPED(tree_node)* root)
{
    if(root != NULL)
    {
        TYPED(tree_node)* sibling = root->next_sibling;
        TYPED(tree_node)* child = root->first_child;
        TYPED(destroy)(root->value);
        free(root);
        TYPED(tree_destroy)(child);
        TYPED(tree_destroy)(sibling);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
testq %rbx, %rbx
je 0x797d
movq 0x20(%rbx), %r15
movq (%rbx), %rdi
movq 0x10(%rbx), %r14
callq 0x3030
movq %rbx, %rdi
callq 0x3030
movq %r14, %rdi
callq 0x7946
movq %r15, %rbx
jmp 0x7953
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/sharmaeklavya2[P]cerplag/./util/tree.gen.c
// Function: parse_tree_print_helper
void TYPED(tree_print_helper)(TYPED(tree_node)* root, FILE* fp, int indent, void printer(TYPE, FILE*)) {
    if(root != NULL) {
        int i;
        for(i=0; i<indent; ++i)
            fprintf(fp, "  ");
        printer(root->value, fp);
        fprintf(fp, "\n");
        TYPED(tree_print_helper)(root->first_child, fp, indent+1, printer);
        TYPED(tree_print_helper)(root->next_sibling, fp, indent, printer);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rbx
movq %rsi, %r15
movq %rdi, %r12
leaq 0x743b(%rip), %r13      # 0xede4
movq %rdx, -0x38(%rbp)
leal 0x1(%rdx), %eax
movl %eax, -0x2c(%rbp)
testq %r12, %r12
je 0x7a0f
cmpl $0x0, -0x38(%rbp)
jle 0x79df
movq -0x38(%rbp), %rax
movl %eax, %r14d
movl $0x2, %esi
movl $0x1, %edx
movq %r13, %rdi
movq %r15, %rcx
callq 0x31d0
decl %r14d
jne 0x79c5
movq (%r12), %rdi
movq %r15, %rsi
callq *%rbx
movl $0xa, %edi
movq %r15, %rsi
callq 0x3110
movq 0x10(%r12), %rdi
movq %r15, %rsi
movl -0x2c(%rbp), %edx
movq %rbx, %rcx
callq 0x7988
movq 0x20(%r12), %r12
jmp 0x79b3
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/sharmaeklavya2[P]cerplag/./util/tree.gen.c
// Function: parse_tree_print
void TYPED(tree_print)(TYPED(tree_node)* root, FILE* fp) {
    if(root == NULL)
        fprintf(fp, "null_tree\n");
    else
        TYPED(tree_print_helper)(root, fp, 0, TYPED(print));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rsi, %rax
testq %rdi, %rdi
je 0x7a3c
leaq -0x17f(%rip), %rcx      # 0x78b2
movq %rax, %rsi
xorl %edx, %edx
popq %rbp
jmp 0x7988
leaq 0x70ed(%rip), %rdi      # 0xeb30
movl $0xa, %esi
movl $0x1, %edx
movq %rax, %rcx
popq %rbp
jmp 0x31d0
nop
// File: /workspace/github_c_makefile_star2_O1/sharmaeklavya2[P]cerplag/ast.c
// Function: complain_ast_node_type
void complain_ast_node_type(const char* funcname, astn_t node_type) {
    if(node_type >= NUM_ASTN)
        fprintf(stderr, "%s: invalid node_type %d\n", funcname, node_type);
    else
        fprintf(stderr, "%s: invalid node_type %s (%d)\n", funcname, ASTN_STRS[node_type], node_type);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %esi, %r8d
movq %rdi, %rdx
movq 0xd58f(%rip), %rax      # 0x14ff8
movq (%rax), %rdi
cmpl $0x14, %esi
jb 0x7a83
leaq 0x72e8(%rip), %rsi      # 0xed60
movl %r8d, %ecx
xorl %eax, %eax
popq %rbp
jmp 0x3140
movl %r8d, %eax
leaq 0xdc23(%rip), %rcx      # 0x156b0
movq (%rcx,%rax,8), %rcx
leaq 0x72e2(%rip), %rsi      # 0xed7a
xorl %eax, %eax
popq %rbp
jmp 0x3140
// File: /workspace/github_c_makefile_star2_O1/sharmaeklavya2[P]cerplag/ast.c
// Function: get_next_ast_node
pAstNode get_next_ast_node(pAstNode p) {
    switch(p->base.node_type) {
        case ASTN_IDList: return ((IDListNode*)p)->next;
        case ASTN_IDTypeList: return ((IDTypeListNode*)p)->next;
        case ASTN_Module: return ((ModuleNode*)p)->next;
        case ASTN_Assn: return ((AssnNode*)p)->next;
        case ASTN_While: return ((WhileNode*)p)->next;
        case ASTN_For: return ((ForNode*)p)->next;
        case ASTN_Decl: return ((DeclNode*)p)->next;
        case ASTN_Input: return ((InputNode*)p)->next;
        case ASTN_Output: return ((OutputNode*)p)->next;
        case ASTN_FCall: return ((FCallNode*)p)->next;
        case ASTN_Switch: return ((SwitchNode*)p)->next;
        case ASTN_Case: return ((CaseNode*)p)->next;
        default:
            complain_ast_node_type(__func__, p->base.node_type);
            return NULL;
    }
}

// Assembly:
movl (%rdi), %esi
leal -0x7(%rsi), %eax
cmpl $0xc, %eax
ja 0x7ead
leaq 0x6cf2(%rip), %rcx      # 0xeb8c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x38(%rdi), %rax
retq
movq 0x48(%rdi), %rax
retq
pushq %rbp
movq %rsp, %rbp
leaq 0x6eee(%rip), %rdi      # 0xeda6
callq 0x7a58
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/sharmaeklavya2[P]cerplag/ast.c
// Function: get_scope_beg_line
int get_scope_beg_line(pAstNode p) {
    if(p == NULL) {
        return 0;
    }
    switch(p->base.node_type) {
        case ASTN_Module: return ((ModuleNode*)p)->scope_beg_line;
        case ASTN_For: return ((ForNode*)p)->scope_beg_line;
        case ASTN_While: return ((WhileNode*)p)->scope_beg_line;
        case ASTN_Switch: return ((SwitchNode*)p)->scope_beg_line;
        default:
            complain_ast_node_type(__func__, p->base.node_type);
            return 0;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
xorl %ebx, %ebx
testq %rdi, %rdi
je 0x7f08
movl (%rdi), %esi
leal -0x9(%rsi), %eax
cmpl $0x9, %eax
ja 0x7efc
leaq 0x6ce1(%rip), %rcx      # 0xebc0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl 0x60(%rdi), %ebx
jmp 0x7f08
movl 0x68(%rdi), %ebx
jmp 0x7f08
movl 0x50(%rdi), %ebx
jmp 0x7f08
movl 0x58(%rdi), %ebx
jmp 0x7f08
leaq 0x6eb5(%rip), %rdi      # 0xedb8
callq 0x7a58
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/sharmaeklavya2[P]cerplag/ast.c
// Function: get_scope_end_line
int get_scope_end_line(pAstNode p) {
    if(p == NULL) {
        return 0;
    }
    switch(p->base.node_type) {
        case ASTN_Module: return ((ModuleNode*)p)->scope_end_line;
        case ASTN_For: return ((ForNode*)p)->scope_end_line;
        case ASTN_While: return ((WhileNode*)p)->scope_end_line;
        case ASTN_Switch: return ((SwitchNode*)p)->scope_end_line;
        default:
            complain_ast_node_type(__func__, p->base.node_type);
            return 0;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
xorl %ebx, %ebx
testq %rdi, %rdi
je 0x7f58
movl (%rdi), %esi
leal -0x9(%rsi), %eax
cmpl $0x9, %eax
ja 0x7f4c
leaq 0x6cb9(%rip), %rcx      # 0xebe8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl 0x64(%rdi), %ebx
jmp 0x7f58
movl 0x6c(%rdi), %ebx
jmp 0x7f58
movl 0x54(%rdi), %ebx
jmp 0x7f58
movl 0x5c(%rdi), %ebx
jmp 0x7f58
leaq 0x6e78(%rip), %rdi      # 0xedcb
callq 0x7a58
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/sharmaeklavya2[P]cerplag/ast_gen.c
// Function: read_children
int read_children(parse_tree_node** nodes, parse_tree_node* root) {
    //for(i=0; i<n; ++i) nodes[i] = NULL;
    if(root == NULL) return -1;
    root = root->first_child;
    int n;
    for(n=0; root != NULL; ++n) {
        nodes[n] = root;
        root = root->next_sibling;
    }
    nodes[n] = NULL;
    return n;
}

// Assembly:
testq %rsi, %rsi
je 0x880b
movq 0x10(%rsi), %rcx
testq %rcx, %rcx
je 0x8811
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
movq %rcx, (%rdi,%rax,8)
incq %rax
movq 0x20(%rcx), %rcx
testq %rcx, %rcx
jne 0x87f8
popq %rbp
jmp 0x8813
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
xorl %eax, %eax
movl %eax, %ecx
movq $0x0, (%rdi,%rcx,8)
retq
// File: /workspace/github_c_makefile_star2_O1/sharmaeklavya2[P]cerplag/ast_gen.c
// Function: ast_gen_main
int ast_gen_main(FILE* ifp, FILE* ofp, FILE* statsfp, int verbosity)
{
    gsymb_t start_symb = init_parser();

    parse_tree_node* proot = build_parse_tree(ifp, start_symb);
    int parse_tree_size = parse_tree_node_count * (sizeof(parse_tree_node) + sizeof(Symbol));
    if(verbosity > 0 && statsfp != NULL) {
        fprintf(statsfp, "Parse tree: %d nodes = %d bytes.\n", parse_tree_node_count, parse_tree_size);
    }
    pAstNode ast = NULL;
    int parse_errors = error_count;
    if(parse_errors == 0) {
        build_ast(proot);
        ast = proot->value->tree;
        if(verbosity >= 1 && statsfp != NULL) {
            fprintf(statsfp, "AST: %d nodes = %d bytes.\n", ast_node_count, ast_mem_allocd);
            fprintf(statsfp, "Compression percent: %lf\n",
                100 * ((float)parse_tree_size - ast_mem_allocd) / (parse_tree_size));
        }
    }
    parse_tree_destroy(proot);
    destroy_parser(false);

    if(parse_errors == 0 && ofp != NULL) {
        print_ast(ofp, ast, 0);
    }

    destroy_ast(ast);
    pch_int_hmap_clear(&intern_table);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, %r12d
movq %rdx, %r15
movq %rsi, -0x38(%rbp)
movq %rdi, %r14
xorl %eax, %eax
callq 0x6a59
movq %r14, %rdi
movl %eax, %esi
callq 0x72b8
movq %rax, %r14
leaq 0x119d5(%rip), %rax     # 0x1ada4
movl (%rax), %edx
imull $0x70, %edx, %ebx
testl %r12d, %r12d
setg %al
testq %r15, %r15
setne %r13b
andb %al, %r13b
cmpb $0x1, %r13b
jne 0x93fd
leaq 0x5c7d(%rip), %rsi      # 0xf06e
movq %r15, %rdi
movl %ebx, %ecx
xorl %eax, %eax
callq 0x3140
movl %ebx, -0x2c(%rbp)
leaq 0x119b1(%rip), %rax     # 0x1adb8
movl (%rax), %ebx
testl %ebx, %ebx
je 0x9412
xorl %r12d, %r12d
jmp 0x9481
movq %r14, %rdi
callq 0x881e
movq (%r14), %rax
movq 0x20(%rax), %r12
testb %r13b, %r13b
je 0x9481
leaq 0x1197b(%rip), %rax     # 0x1ada8
movl (%rax), %edx
leaq 0x11976(%rip), %r13     # 0x1adac
movl (%r13), %ecx
leaq 0x5c4f(%rip), %rsi      # 0xf090
movq %r15, %rdi
xorl %eax, %eax
callq 0x3140
cvtsi2ssl -0x2c(%rbp), %xmm0
cvtsi2ssl (%r13), %xmm1
movaps %xmm0, %xmm2
subss %xmm1, %xmm2
mulss 0x5bdb(%rip), %xmm2     # 0xf040
divss %xmm0, %xmm2
xorps %xmm0, %xmm0
cvtss2sd %xmm2, %xmm0
leaq 0x5c34(%rip), %rsi      # 0xf0ab
movq %r15, %rdi
movb $0x1, %al
callq 0x3140
testl %ebx, %ebx
setne %bl
movq %r14, %rdi
callq 0x7946
xorl %edi, %edi
callq 0x6bea
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
sete %al
orb %bl, %al
jne 0x94ad
movq %r12, %rsi
xorl %edx, %edx
callq 0x7f61
movq %r12, %rdi
callq 0x86cc
leaq 0xd7dc(%rip), %rdi      # 0x16c98
callq 0x3ed7
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/sharmaeklavya2[P]cerplag/symbol_table.c
// Function: pSTEntry_print
void pSTEntry_print(pSTEntry p, FILE* fp)
{
    fprintf(fp, "STEntry(%s: %s", p->lexeme, TYPE_STRS[p->addr->type]);
    if(p->addr->size > 0)
        fprintf(fp, "[%d]", p->addr->size);
    fprintf(fp, ", %d:%d, %d)", p->addr->line, p->addr->col, p->addr->offset);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rdx
movq 0x28(%rdi), %rax
movl 0x18(%rax), %eax
leaq 0xc4f0(%rip), %rcx      # 0x15bc0
movq (%rcx,%rax,8), %rcx
leaq 0x5a12(%rip), %rsi      # 0xf0ed
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3140
movq 0x28(%r14), %rax
movl 0x1c(%rax), %edx
testl %edx, %edx
jle 0x9701
leaq 0x5a14(%rip), %rsi      # 0xf10b
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3140
movq 0x28(%r14), %rax
movl 0x20(%rax), %edx
movl 0x24(%rax), %ecx
movl 0x28(%rax), %r8d
leaq 0x59e6(%rip), %rsi      # 0xf0fc
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0x3140
// File: /workspace/github_c_makefile_star2_O1/sharmaeklavya2[P]cerplag/symbol_table.c
// Function: pSTEntry_print_sub
void pSTEntry_print_sub(pSTEntry p, FILE* fp) {
    char type_str[10] = "";
    if(p->addr->size == 0)
        sprintf(type_str, "%s", TYPE_STRS[p->addr->type]);
    else
        sprintf(type_str, "%s[%d]", TYPE_STRS[p->addr->type], p->addr->size);
    int beg_line = p->addr->symbol_table->scope_beg_line;
    int end_line = p->addr->symbol_table->scope_end_line;
    const char* func_name = p->func_name == NULL ? "driver" : p->func_name;
    fprintf(fp, "%-10s %-12s %-10s %3d to %3d %6d %6d %7d\n", p->lexeme, type_str, func_name, beg_line, end_line,
        p->addr->symbol_table->level, get_type_width(p->addr->type, p->addr->size), p->addr->offset);
    //pSTEntry_print(p, fp);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, -0x48(%rbp)
movq %rdi, %r14
movw $0x0, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq 0x28(%rdi), %rax
movl 0x18(%rax), %edx
movl 0x1c(%rax), %ecx
leaq 0xc465(%rip), %rax      # 0x15bc0
movq (%rax,%rdx,8), %rdx
testl %ecx, %ecx
je 0x9777
leaq 0x599f(%rip), %rsi      # 0xf109
leaq -0x38(%rbp), %rdi
xorl %eax, %eax
callq 0x31b0
jmp 0x9783
leaq -0x38(%rbp), %rdi
movq %rdx, %rsi
callq 0x3060
movq 0x28(%r14), %rax
movq 0x8(%rax), %rcx
movl 0x38(%rcx), %ebx
movl 0x3c(%rcx), %r15d
movl 0x40(%rcx), %ecx
movq %rcx, -0x40(%rbp)
movq (%r14), %r12
movq 0x8(%r14), %rcx
testq %rcx, %rcx
leaq 0x4cc7(%rip), %r13      # 0xe471
cmovneq %rcx, %r13
movl 0x18(%rax), %edi
movl 0x1c(%rax), %esi
callq 0xc02c
movl %eax, %r10d
movq 0x28(%r14), %rax
movl 0x28(%rax), %r11d
leaq 0x5945(%rip), %rsi      # 0xf110
leaq -0x38(%rbp), %rcx
movq -0x48(%rbp), %rdi
movq %r12, %rdx
movq %r13, %r8
movl %r15d, %r9d
xorl %eax, %eax
pushq %r11
pushq %r10
pushq %rbx
pushq -0x40(%rbp)
callq 0x3140
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/sharmaeklavya2[P]cerplag/symbol_table.c
// Function: ST_init
void ST_init(pST pst, struct AstNode* scope, int level) {
    ST_hmap_init(&(pst->vmap), 10, false);
    AddrList_init(&(pst->addrs));
    pst->scope = scope;
    pst->scope_beg_line = get_scope_beg_line(scope);
    pst->scope_end_line = get_scope_end_line(scope);
    pst->beg_offset = pst->end_offset = pst->max_offset = 0;
    pst->level = level;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r14
movl $0xa, %edi
movl $0x8, %esi
callq 0x3120
movq %rax, (%r14)
movq $0xa, 0x8(%r14)
movw $0x100, 0x10(%r14)      # imm = 0x100
leaq 0x18(%r14), %rdi
callq 0xbee2
movq %r15, 0x30(%r14)
movq %r15, %rdi
callq 0x7ec1
movl %eax, 0x3c(%r14)
movq %r15, %rdi
callq 0x7f11
movl %eax, 0x40(%r14)
movl $0x0, 0x4c(%r14)
movq $0x0, 0x44(%r14)
movl %ebx, 0x38(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/sharmaeklavya2[P]cerplag/symbol_table.c
// Function: ST_print
void ST_print(pST p, FILE* fp)
{
    fprintf(fp, "SymbolTable(off=%d:%d, maxoff=%d):\n", p->beg_offset, p->end_offset, p->max_offset);
    ST_hmap_print(&(p->vmap), fp);
    fprintf(fp, "AddrList:\n");
    AddrList_print(&(p->addrs), fp);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl 0x44(%rdi), %edx
movl 0x48(%rdi), %ecx
movl 0x4c(%rdi), %r8d
leaq 0x5447(%rip), %rsi      # 0xf13a
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3140
movq %r14, %rdi
movq %rbx, %rsi
callq 0x9b95
leaq 0x544f(%rip), %rdi      # 0xf15e
movl $0xa, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x31d0
addq $0x18, %r14
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0xbff3
// File: /workspace/github_c_makefile_star2_O1/sharmaeklavya2[P]cerplag/symbol_table.c
// Function: ST_clear
void ST_clear(pST p)
{
    ST_hmap_clear(&(p->vmap));
    AddrList_clear(&(p->addrs));
    p->scope = NULL;
    p->level = 0;
    p->beg_offset = p->end_offset = p->max_offset = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x98c5
leaq 0x18(%rbx), %rdi
callq 0xbef5
xorl %eax, %eax
movq %rax, 0x30(%rbx)
movl %eax, 0x38(%rbx)
movl %eax, 0x4c(%rbx)
movq %rax, 0x44(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/sharmaeklavya2[P]cerplag/symbol_table.c
// Function: ST_destroy
void ST_destroy(pST p) {
#ifdef LOG_MEM
    fprintf(stderr, "Called %s(%p)\n", __func__, (void*)p);
#endif
    ST_clear(p);
    free(p);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x98c5
leaq 0x18(%rbx), %rdi
callq 0xbef5
xorl %eax, %eax
movq %rax, 0x30(%rbx)
movl %eax, 0x38(%rbx)
movl %eax, 0x4c(%rbx)
movq %rax, 0x44(%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x3030
// File: /workspace/github_c_makefile_star2_O1/sharmaeklavya2[P]cerplag/symbol_table.c
// Function: SD_init
void SD_init(pSD psd) {
    psd->level = 0;
    psd->offset = 0;
#ifdef LOG_MEM
    fprintf(stderr, "Called %s(%p)\n", __func__, (void*)psd);
#endif

    pST pst = malloc(sizeof(ST));
#ifdef LOG_MEM
    fprintf(stderr, "%s: Allocated ST %p\n", __func__, (void*)pst);
#endif
    ST_init(pst, NULL, 0);
    psd->root = psd->active = ST_tree_get_node(pst);
    psd->first_entry = psd->last_entry = NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq $0x0, 0x10(%rdi)
movl $0x50, %edi
callq 0x3150
movq %rax, %r14
movq %rax, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x9c5e
movq %r14, %rdi
callq 0x9d97
movq %rax, 0x8(%rbx)
movq %rax, (%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/sharmaeklavya2[P]cerplag/symbol_table.c
// Function: SD_add_entry
bool SD_add_entry(pSD psd, pSTEntry pentry, int line, int col) {
    // pentry->addr is not yet initialized
    if(psd->active == NULL) {
        fprintf(stderr, "%s: No SymbolTable present in stack.\n", __func__);
        return false;
    }
    pST pst = psd->active->value;

    int old_size = pst->vmap.size;
    ST_hmap_node* node = ST_hmap_insert(&(pst->vmap), pentry->lexeme, pentry);
    if(pst->vmap.size == old_size) {
        char msg[80];
        sprintf(msg, "Variable has already been declared at line %d col %d.", node->value->addr->line, node->value->addr->col);
        print_error("semantic", ERROR, -1, line, col, pentry->lexeme, "ALREADY_DECL", msg);
        return false;
    }

    if(psd->first_entry == NULL) {
        psd->first_entry = psd->last_entry = pentry;
    }
    else {
        psd->last_entry->next = pentry;
        psd->last_entry = pentry;
    }
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq 0x8(%rdi), %rax
testq %rax, %rax
je 0xa046
movq %rsi, %r14
movq %rdi, %r12
movl %edx, %r15d
movl %ecx, -0x2c(%rbp)
movq (%rax), %r13
movl 0xc(%r13), %ebx
movq (%rsi), %rsi
movq %r13, %rdi
movq %r14, %rdx
callq 0x99ae
cmpl %ebx, 0xc(%r13)
jne 0xa00f
movq 0x10(%rax), %rax
movq 0x28(%rax), %rax
movl 0x20(%rax), %edx
movl 0x24(%rax), %ecx
leaq 0x51cb(%rip), %rsi      # 0xf19c
xorl %r12d, %r12d
leaq -0x80(%rbp), %r13
movq %r13, %rdi
xorl %eax, %eax
callq 0x31b0
movq (%r14), %r9
leaq 0x51ef(%rip), %rax      # 0xf1db
leaq 0x51df(%rip), %rdi      # 0xf1d2
xorl %esi, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl %r15d, %ecx
movl -0x2c(%rbp), %r8d
pushq %r13
pushq %rax
callq 0x94d4
addq $0x10, %rsp
jmp 0xa034
cmpq $0x0, 0x18(%r12)
je 0xa027
movq 0x20(%r12), %rax
movq %r14, 0x20(%rax)
movq %r14, 0x20(%r12)
jmp 0xa031
movq %r14, 0x20(%r12)
movq %r14, 0x18(%r12)
movb $0x1, %r12b
movl %r12d, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x38bd
xorl %r12d, %r12d
jmp 0xa034
// File: /workspace/github_c_makefile_star2_O1/sharmaeklavya2[P]cerplag/symbol_table.c
// Function: SD_add_addr
bool SD_add_addr(pSD psd, AddrNode* an) {
    if(psd->active == NULL) {
        fprintf(stderr, "%s: No SymbolTable present in stack.\n", __func__);
        return false;
    }
    pST pst = psd->active->value;

    if(pst->addrs.last == NULL) {
        an->id = 0;
    }
    else {
        an->id = pst->addrs.last->id + 1;
    }

    AddrList_add(&(pst->addrs), an);

    if(an->addr_type != ADDR_CONST) {
        an->offset = get_aligned_offset(psd->offset, an->type);
        psd->offset = an->offset + get_type_width(an->type, an->size);
        if((psd->offset) > (pst->max_offset)) {
            pst->max_offset = psd->offset;
        }
    }
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x8(%rdi), %r12
testq %r12, %r12
je 0xa0df
movq %rsi, %r14
movq %rdi, %rbx
movq (%r12), %r13
leaq 0x18(%r13), %rdi
movq 0x20(%r13), %rax
testq %rax, %rax
je 0xa085
movl 0x10(%rax), %eax
incl %eax
jmp 0xa087
xorl %eax, %eax
movl %eax, 0x10(%r14)
movq %r14, %rsi
callq 0xbf29
cmpl $0x2, 0x14(%r14)
je 0xa0ca
movl 0x14(%rbx), %edi
movl 0x18(%r14), %esi
callq 0xc047
movl %eax, %r15d
movl %eax, 0x28(%r14)
movl 0x18(%r14), %edi
movl 0x1c(%r14), %esi
callq 0xc02c
addl %r15d, %eax
movl %eax, 0x14(%rbx)
cmpl 0x4c(%r13), %eax
jle 0xa0ca
movl %eax, 0x4c(%r13)
testq %r12, %r12
setne %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x38e1
jmp 0xa0ca
// File: /workspace/github_c_makefile_star2_O1/sharmaeklavya2[P]cerplag/symbol_table.c
// Function: SD_get_entry
pSTEntry SD_get_entry(pSD psd, const char* lexeme) {
    ST_tree_node* n = psd->active;
    ST_hmap_node* res = NULL;
    while(n != NULL && res == NULL) {
        res = ST_hmap_query(&(n->value->vmap), lexeme);
        n = n->parent;
    }
    if(res == NULL)
        return NULL;
    else
        return res->value;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq 0x8(%rdi), %r14
testq %r14, %r14
je 0xa11a
movq %rsi, %rbx
movq (%r14), %rdi
movq %rbx, %rsi
callq 0x993a
movq 0x8(%r14), %r14
testq %rax, %rax
sete %cl
testq %r14, %r14
je 0xa11e
testq %rax, %rax
je 0xa0f9
jmp 0xa11e
movb $0x1, %cl
xorl %eax, %eax
testb %cl, %cl
je 0xa126
xorl %eax, %eax
jmp 0xa12a
movq 0x10(%rax), %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/sharmaeklavya2[P]cerplag/symbol_table.c
// Function: SD_add_scope
void SD_add_scope(pSD psd, pAstNode scope) {
    pST pst = malloc(sizeof(ST));
#ifdef LOG_MEM
    fprintf(stderr, "%s: Allocated ST %p\n", __func__, (void*)pst);
#endif
    ST_init(pst, scope, ++(psd->level));
    ST_tree_insert(psd->active, pst);
    psd->active = psd->active->last_child;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl $0x50, %edi
callq 0x3150
movq %rax, %r15
movl 0x10(%r14), %edx
incl %edx
movl %edx, 0x10(%r14)
movq %rax, %rdi
movq %rbx, %rsi
callq 0x9c5e
movq 0x8(%r14), %rdi
movq %r15, %rsi
callq 0x9dde
movq 0x8(%r14), %rax
movq 0x18(%rax), %rax
movq %rax, 0x8(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/sharmaeklavya2[P]cerplag/symbol_table.c
// Function: SD_remove_scope
void SD_remove_scope(pSD psd) {
    ST_tree_node* parent = psd->active->parent;
    if(parent != NULL) {
        int pmo = parent->value->max_offset;
        int mo = psd->active->value->max_offset;
        if(mo > pmo) {pmo = mo;}
        parent->value->max_offset = pmo;
    }
    psd->active = parent;
    psd->level--;
    if(parent->parent == NULL) {   // if now root is active
        psd->offset = 0;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x8(%rdi), %rcx
movq 0x8(%rcx), %rax
testq %rax, %rax
je 0xa1b9
movq (%rax), %rdx
movl 0x4c(%rdx), %esi
movq (%rcx), %rcx
movl 0x4c(%rcx), %ecx
cmpl %esi, %ecx
cmovgl %ecx, %esi
movl %esi, 0x4c(%rdx)
movq %rax, 0x8(%rdi)
decl 0x10(%rdi)
cmpq $0x0, 0x8(%rax)
jne 0xa1ce
movl $0x0, 0x14(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/sharmaeklavya2[P]cerplag/compiler.c
// Function: get_composite_type
valtype_t get_composite_type(op_t op, valtype_t type1, valtype_t type2, int line, int col) {
    if(type1 == TYPE_ERROR || type2 == TYPE_ERROR)
        return TYPE_ERROR;
    if(type1 != type2) {
        print_type_error(op, type1, type2, line, col);
        return TYPE_ERROR;
    }
    switch(op) {
        case OP_PLUS:
        case OP_MINUS:
        case OP_MUL:
        case OP_DIV:
            if(type1 == TYPE_INTEGER || type1 == TYPE_REAL)
                return type1;
            else
                print_type_error(op, type1, type2, line, col);
            break;
        /*
        case OP_DIV:
            if(type1 == TYPE_INTEGER || type1 == TYPE_REAL)
                return TYPE_REAL;
            else
                print_type_error(op, type1, type2, line, col);
            break;
        */
        case OP_GT:
        case OP_LT:
        case OP_GE:
        case OP_LE:
        case OP_EQ:
        case OP_NE:
            if(type1 == TYPE_INTEGER || type1 == TYPE_REAL)
                return TYPE_BOOLEAN;
            else
                print_type_error(op, type1, type2, line, col);
            break;
        case OP_AND:
        case OP_OR:
            if(type1 == TYPE_BOOLEAN)
                return TYPE_BOOLEAN;
            else
                print_type_error(op, type1, type2, line, col);
            break;
        default:
            fprintf(stderr, "Invalid operand %d\n", op);
    }
    return TYPE_ERROR;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %eax
testl %esi, %esi
sete %dil
testl %edx, %edx
sete %r9b
xorl %ebx, %ebx
orb %dil, %r9b
jne 0xa783
cmpl %edx, %esi
jne 0xa77a
cmpl $0xb, %eax
ja 0xa78c
movl $0xfc, %edi
btl %eax, %edi
jae 0xa75a
leal -0x1(%rsi), %edi
movl $0x3, %ebx
cmpl $0x2, %edi
jae 0xa77a
jmp 0xa783
movl $0x303, %edi            # imm = 0x303
btl %eax, %edi
jae 0xa770
leal -0x1(%rsi), %edi
cmpl $0x2, %edi
jae 0xa77a
movl %esi, %ebx
jmp 0xa783
movl $0x3, %ebx
cmpl $0x3, %esi
je 0xa783
movl %eax, %edi
callq 0xa66b
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movq 0xa865(%rip), %rcx      # 0x14ff8
movq (%rcx), %rdi
leaq 0x4b7d(%rip), %rsi      # 0xf31a
xorl %ebx, %ebx
movl %eax, %edx
xorl %eax, %eax
callq 0x3140
jmp 0xa783
// File: /workspace/github_c_makefile_star2_O1/sharmaeklavya2[P]cerplag/compiler.c
// Function: add_node_addr_to_SD
AddrNode* add_node_addr_to_SD(pAstNode node, pSD psd, addr_type_t addr_type) {
    AddrNode* anode = malloc(sizeof(AddrNode));
#ifdef LOG_MEM
    fprintf(stderr, "%s: Allocated AddrNode %p\n", __func__, (void*)anode);
#endif
    anode->next = NULL;
    anode->symbol_table = (psd->active)->value;
    anode->id = 0;
    anode->addr_type = addr_type;
    anode->type = node->base.type;
    anode->size = node->base.size;
    anode->line = node->base.line;
    anode->col = node->base.col;
    anode->offset = 0;
    SD_add_addr(psd, anode);
    return anode;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
movl $0x40, %edi
callq 0x3150
movq %rax, %r12
movq $0x0, (%rax)
movq 0x8(%r14), %rax
movq (%rax), %rax
movq %rax, 0x8(%r12)
xorl %eax, %eax
movl %eax, 0x10(%r12)
movl %ebx, 0x14(%r12)
movl 0x4(%r15), %ecx
movl %ecx, 0x18(%r12)
movl 0x8(%r15), %ecx
movl %ecx, 0x1c(%r12)
movl 0xc(%r15), %ecx
movl %ecx, 0x20(%r12)
movl 0x10(%r15), %ecx
movl %ecx, 0x24(%r12)
movl %eax, 0x28(%r12)
movq %r14, %rdi
movq %r12, %rsi
callq 0xa050
movq %r12, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/sharmaeklavya2[P]cerplag/compiler.c
// Function: add_node_var_to_SD
void add_node_var_to_SD(pAstNode node, pSD psd, const char* func_name) {
    pSTEntry entry = malloc(sizeof(STEntry));
#ifdef LOG_MEM
    fprintf(stderr, "%s: Allocated STEntry %p\n", __func__, (void*)entry);
#endif
    entry->func_name = func_name;
    entry->use_line = 0;
    entry->use_col = 0;
    entry->readonly = false;
    entry->next = NULL;
    entry->addr = NULL;
    if(node->base.node_type == ASTN_IDList) {
        entry->lexeme = ((IDListNode*)node)->varname;
    }
    else if(node->base.node_type == ASTN_IDTypeList) {
        entry->lexeme = ((IDTypeListNode*)node)->varname;
    }
    else {
        entry->lexeme = NULL;
    }
    int line = node->base.line, col = node->base.col;
    if(!SD_add_entry(psd, entry, line, col)) {
        free(entry);
#ifdef LOG_MEM
        fprintf(stderr, "%s: Freed STEntry %p\n", __func__, (void*)entry);
#endif
    }
    else {
        entry->addr = add_node_addr_to_SD(node, psd, ADDR_VAR);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %r15
movl $0x30, %edi
callq 0x3150
movq %rax, %rbx
movq %r12, 0x8(%rax)
movq $0x0, 0x10(%rax)
movb $0x0, 0x18(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rax)
movl (%r15), %eax
addl $-0x7, %eax
cmpl $0x1, %eax
ja 0xb73f
movq 0x40(%r15), %rax
jmp 0xb741
xorl %eax, %eax
movq %rax, (%rbx)
movl 0xc(%r15), %edx
movl 0x10(%r15), %ecx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x9f77
testb %al, %al
je 0xb775
movq %r15, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0xb677
movq %rax, 0x28(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x3030
// File: /workspace/github_c_makefile_star2_O1/sharmaeklavya2[P]cerplag/compiler.c
// Function: log_var_set
void log_var_set(pSTEntry entry, int line, int col) {
    if(entry->readonly == true) {
        sprintf(msg, "Cannot modify read-only variable '%s' (declared at line %d, col %d).",
            entry->lexeme, entry->addr->line, entry->addr->col);
        print_error("type", ERROR, -1, line, col, entry->lexeme, "RDONLY_MOD", msg);
    }
    entry->use_line = line;
    entry->use_col = col;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebx
movl %esi, %r15d
movq %rdi, %r14
cmpb $0x1, 0x18(%rdi)
jne 0xb7ee
movq (%r14), %rdx
movq 0x28(%r14), %rax
movl 0x20(%rax), %ecx
movl 0x24(%rax), %r8d
leaq 0xf61d(%rip), %r12      # 0x1add0
leaq 0x3b74(%rip), %rsi      # 0xf32e
movq %r12, %rdi
xorl %eax, %eax
callq 0x31b0
movq (%r14), %r9
leaq 0x3ba5(%rip), %rax      # 0xf373
leaq 0x3073(%rip), %rdi      # 0xe848
xorl %esi, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl %r15d, %ecx
movl %ebx, %r8d
pushq %r12
pushq %rax
callq 0x94d4
addq $0x10, %rsp
movl %r15d, 0x10(%r14)
movl %ebx, 0x14(%r14)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/sharmaeklavya2[P]cerplag/addr.c
// Function: AddrList_clear
void AddrList_clear(AddrList* al) {
    AddrNode* an = al->first;
    AddrNode* tn2 = NULL;
    for(; an != NULL; an = tn2) {
        tn2 = an->next;
        AddrNode_destroy(an);
    }
    al->first = al->last = NULL;
    al->size = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0xbf17
movq (%rdi), %r14
callq 0x3030
movq %r14, %rdi
testq %r14, %r14
jne 0xbf07
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movl $0x0, 0x10(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/sharmaeklavya2[P]cerplag/addr.c
// Function: AddrList_add
void AddrList_add(AddrList* al, AddrNode* an) {
    if(an != NULL) {
        (al->size)++;
        if(al->first == NULL) {
            al->first = an;
        }
        else {
            al->last->next = an;
        }
        al->last = an;
    }
}

// Assembly:
testq %rsi, %rsi
je 0xbf4a
incl 0x10(%rdi)
cmpq $0x0, (%rdi)
movq %rdi, %rax
je 0xbf3e
movq 0x8(%rdi), %rax
pushq %rbp
movq %rsp, %rbp
movq %rsi, (%rax)
movq %rsi, 0x8(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/sharmaeklavya2[P]cerplag/addr.c
// Function: AddrNode_print
void AddrNode_print(const AddrNode* an, FILE* fp) {
    if(an == NULL) {
        fprintf(fp, "null");
    }
    else {
        fprintf(fp, "AddrNode(%d, %d:%d, %s %s", an->id, an->line, an->col, ADDR_TYPE_STRS[an->addr_type],
            TYPE_STRS[an->type]);
        if(an->size > 0) {
            fprintf(fp, "[%d]", an->size);
        }
        fprintf(fp, ", %d)", an->offset);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
testq %rdi, %rdi
je 0xbfd2
movq %rdi, %r14
movl 0x20(%rdi), %ecx
movl 0x24(%rdi), %r8d
movl 0x10(%rdi), %edx
movl 0x14(%rdi), %eax
leaq 0x9b6b(%rip), %rsi      # 0x15ae0
movq (%rsi,%rax,8), %r9
movl 0x18(%rdi), %eax
leaq 0x9c3d(%rip), %rsi      # 0x15bc0
movq (%rsi,%rax,8), %rax
movq %rax, (%rsp)
leaq 0x3b58(%rip), %rsi      # 0xfaea
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3140
movl 0x1c(%r14), %edx
testl %edx, %edx
jle 0xbfb5
leaq 0x3160(%rip), %rsi      # 0xf10b
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3140
movl 0x28(%r14), %edx
leaq 0x3143(%rip), %rsi      # 0xf103
movq %rbx, %rdi
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x3140
leaq 0x3b0c(%rip), %rdi      # 0xfae5
movl $0x4, %esi
movl $0x1, %edx
movq %rbx, %rcx
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x31d0
// File: /workspace/github_c_makefile_star2_O1/sharmaeklavya2[P]cerplag/addr.c
// Function: AddrList_print
void AddrList_print(const AddrList* al, FILE* fp) {
    AddrNode* an = al->first;
    for(; an != NULL; an = an->next) {
        AddrNode_print(an, fp);
        fprintf(fp, "\n");
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq (%rdi), %r14
testq %r14, %r14
je 0xc025
movq %rsi, %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0xbf4b
movl $0xa, %edi
movq %rbx, %rsi
callq 0x3110
movq (%r14), %r14
testq %r14, %r14
jne 0xc005
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/sharmaeklavya2[P]cerplag/type.c
// Function: get_aligned_offset
int get_aligned_offset(int offset, valtype_t type) {
    int align_size = TYPE_ALIGNS[type];
    int t = offset % align_size;
    if(t != 0)
        offset += (align_size - t);
    return offset;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %esi, %eax
leaq 0x9b9c(%rip), %rcx      # 0x15bf0
movl (%rcx,%rax,4), %ecx
movl %edi, %eax
cltd
idivl %ecx
subl %edx, %ecx
testl %edx, %edx
cmovel %edx, %ecx
addl %edi, %ecx
movl %ecx, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/sharmaeklavya2[P]cerplag/type.c
// Function: get_type_str
void get_type_str(char* str, valtype_t type, int size) {
    if(size == 0)
        sprintf(str, "%s", TYPE_STRS[type]);
    else
        sprintf(str, "%s[%d]", TYPE_STRS[type], size);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edx, %ecx
movl %esi, %eax
leaq 0x9b48(%rip), %rdx      # 0x15bc0
movq (%rdx,%rax,8), %rdx
testl %ecx, %ecx
je 0xc08f
leaq 0x3082(%rip), %rsi      # 0xf109
xorl %eax, %eax
popq %rbp
jmp 0x31b0
movq %rdx, %rsi
popq %rbp
jmp 0x3060
// File: /workspace/github_c_makefile_star2_O1/sharmaeklavya2[P]cerplag/ircode.c
// Function: irinstr_init2
void irinstr_init2(IRInstr* instr, op_t op, AddrNode* res, AddrNode* arg1, AddrNode* arg2) {
    irinstr_init(instr, op);
    instr->arg1 = arg1;
    instr->arg2 = arg2;
    instr->res = res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %esi, (%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
movups %xmm0, 0x18(%rdi)
movups %xmm0, 0x24(%rdi)
movq %rcx, 0x8(%rdi)
movq %r8, 0x10(%rdi)
movq %rdx, 0x18(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/sharmaeklavya2[P]cerplag/ircode.c
// Function: irinstr_new
IRInstr* irinstr_new(op_t op) {
    IRInstr* p = malloc(sizeof(IRInstr));
#ifdef LOG_MEM
    fprintf(stderr, "%s: Allocated IRInstr %p\n", __func__, (void*)p);
#endif
    irinstr_init(p, op);
    return p;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
movl $0x38, %edi
callq 0x3150
movl %ebx, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
movups %xmm0, 0x18(%rax)
movups %xmm0, 0x24(%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/sharmaeklavya2[P]cerplag/ircode.c
// Function: irinstr_new2
IRInstr* irinstr_new2(op_t op, AddrNode* res, AddrNode* arg1, AddrNode* arg2) {
    IRInstr* p = malloc(sizeof(IRInstr));
#ifdef LOG_MEM
    fprintf(stderr, "%s: Allocated IRInstr %p\n", __func__, (void*)p);
#endif
    irinstr_init2(p, op, res, arg1, arg2);
    return p;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movl %edi, %r12d
movl $0x38, %edi
callq 0x3150
movl %r12d, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
movups %xmm0, 0x18(%rax)
movups %xmm0, 0x24(%rax)
movq %r14, 0x8(%rax)
movq %rbx, 0x10(%rax)
movq %r15, 0x18(%rax)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/sharmaeklavya2[P]cerplag/ircode.c
// Function: irinstr_new3
IRInstr* irinstr_new3(op_t op, int label) {
    IRInstr* p = malloc(sizeof(IRInstr));
#ifdef LOG_MEM
    fprintf(stderr, "%s: Allocated IRInstr %p\n", __func__, (void*)p);
#endif
    irinstr_init3(p, op, label);
    return p;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %esi, %ebx
movl %edi, %r14d
movl $0x38, %edi
callq 0x3150
movl %r14d, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x24(%rax)
movups %xmm0, 0x8(%rax)
movups %xmm0, 0x18(%rax)
movl %ebx, 0x30(%rax)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/sharmaeklavya2[P]cerplag/ircode.c
// Function: irinstr_new4
IRInstr* irinstr_new4(op_t op, AddrNode* res, AddrNode* arg1, AddrNode* arg2, int label) {
    IRInstr* p = malloc(sizeof(IRInstr));
#ifdef LOG_MEM
    fprintf(stderr, "%s: Allocated IRInstr %p\n", __func__, (void*)p);
#endif
    irinstr_init4(p, op, res, arg1, arg2, label);
    return p;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %ebx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movl %edi, %r13d
movl $0x38, %edi
callq 0x3150
movl %r13d, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
movups %xmm0, 0x18(%rax)
movups %xmm0, 0x24(%rax)
movq %r15, 0x8(%rax)
movq %r14, 0x10(%rax)
movq %r12, 0x18(%rax)
movl %ebx, 0x30(%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/sharmaeklavya2[P]cerplag/ircode.c
// Function: irinstr_link
void irinstr_link(IRInstr* i1, IRInstr* i2) {
    if(i1->next != NULL) {
        fprintf(stderr, "%s: i1 (%p) already has a next.\n", __func__, (void*)i1);
    }
    if(i2->prev != NULL) {
        fprintf(stderr, "%s: i2 (%p) already has a prev.\n", __func__, (void*)i2);
    }
    i1->next = i2;
    i2->prev = i1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
cmpq $0x0, 0x28(%rdi)
jne 0xc234
cmpq $0x0, 0x20(%rbx)
jne 0xc258
movq %rbx, 0x28(%r14)
movq %r14, 0x20(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
movq 0x8dbd(%rip), %rax      # 0x14ff8
movq (%rax), %rdi
leaq 0x38ec(%rip), %rsi      # 0xfb31
leaq 0x3906(%rip), %rdx      # 0xfb52
movq %r14, %rcx
xorl %eax, %eax
callq 0x3140
jmp 0xc220
movq 0x8d99(%rip), %rax      # 0x14ff8
movq (%rax), %rdi
leaq 0x38f6(%rip), %rsi      # 0xfb5f
leaq 0x38e2(%rip), %rdx      # 0xfb52
movq %rbx, %rcx
xorl %eax, %eax
callq 0x3140
jmp 0xc227
// File: /workspace/github_c_makefile_star2_O1/sharmaeklavya2[P]cerplag/ircode.c
// Function: irinstr_clear
void irinstr_clear(IRInstr* instr) {
    if(instr->prev != NULL) {
        instr->prev->next = NULL;
    }
    if(instr->next != NULL) {
        instr->next->prev = NULL;
    }
    irinstr_init(instr, 0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x20(%rdi), %rax
testq %rax, %rax
je 0xc291
movq $0x0, 0x28(%rax)
movq 0x28(%rdi), %rax
testq %rax, %rax
je 0xc2a2
movq $0x0, 0x20(%rax)
movl $0x0, (%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
movups %xmm0, 0x18(%rdi)
movups %xmm0, 0x24(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/sharmaeklavya2[P]cerplag/ircode.c
// Function: irinstr_destroy
void irinstr_destroy(IRInstr* instr) {
    irinstr_clear(instr);
    free(instr);
#ifdef LOG_MEM
    fprintf(stderr, "%s: Destroyed IRInstr %p\n", __func__, (void*)instr);
#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x20(%rdi), %rax
testq %rax, %rax
je 0xc2ce
movq $0x0, 0x28(%rax)
movq 0x28(%rdi), %rax
testq %rax, %rax
je 0xc2df
movq $0x0, 0x20(%rax)
movl $0x0, (%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
movups %xmm0, 0x18(%rdi)
movups %xmm0, 0x24(%rdi)
popq %rbp
jmp 0x3030
// File: /workspace/github_c_makefile_star2_O1/sharmaeklavya2[P]cerplag/ircode.c
// Function: irinstr_destroy_list
void irinstr_destroy_list(IRInstr* n) {
    IRInstr* p = NULL;
    while(n != NULL) {
        p = n->next;
        irinstr_destroy(n);
        n = p;
    }
}

// Assembly:
testq %rdi, %rdi
je 0xc31c
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq 0x28(%rdi), %rbx
callq 0xc2b9
movq %rbx, %rdi
testq %rbx, %rbx
jne 0xc305
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/sharmaeklavya2[P]cerplag/ircode.c
// Function: irinstr_print
void irinstr_print(IRInstr* n, FILE* fp) {
    fprintf(fp, "Instr(op=%s", OP_STRS[n->op]);
    if(n->op == OP_JUMP0 || n->op == OP_JUMP || n->op == OP_LABEL
        || n->op == OP_JG || n->op == OP_JUMP1) {
        fprintf(fp, ", label=%d", n->label);
    }
    if(n->res != NULL) {
        fprintf(fp, ",\n\tres=");
        AddrNode_print(n->res, fp);
    }
    if(n->arg1 != NULL) {
        fprintf(fp, ",\n\targ1=");
        AddrNode_print(n->arg1, fp);
    }
    if(n->arg2 != NULL) {
        fprintf(fp, ",\n\targ2=");
        AddrNode_print(n->arg2, fp);
    }
    fprintf(fp, ")");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl (%rdi), %eax
leaq 0x97cd(%rip), %rcx      # 0x15b00
movq (%rcx,%rax,8), %rdx
leaq 0x3842(%rip), %rsi      # 0xfb80
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3140
movl (%r14), %eax
cmpl $0x15, %eax
ja 0xc36f
movl $0x3b0000, %ecx         # imm = 0x3B0000
btl %eax, %ecx
jae 0xc36f
movl 0x30(%r14), %edx
leaq 0x3827(%rip), %rsi      # 0xfb8c
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3140
cmpq $0x0, 0x18(%r14)
je 0xc39b
leaq 0x381a(%rip), %rdi      # 0xfb97
movl $0x7, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x31d0
movq 0x18(%r14), %rdi
movq %rbx, %rsi
callq 0xbf4b
cmpq $0x0, 0x8(%r14)
je 0xc3c7
leaq 0x37f6(%rip), %rdi      # 0xfb9f
movl $0x8, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x31d0
movq 0x8(%r14), %rdi
movq %rbx, %rsi
callq 0xbf4b
cmpq $0x0, 0x10(%r14)
je 0xc3f3
leaq 0x37d3(%rip), %rdi      # 0xfba8
movl $0x8, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x31d0
movq 0x10(%r14), %rdi
movq %rbx, %rsi
callq 0xbf4b
movl $0x29, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x3110
// File: /workspace/github_c_makefile_star2_O1/sharmaeklavya2[P]cerplag/./util/llist.gen.c
// Function: ircode_combine
void CLASSED(combine)(CLASS* plist, CLASS* p1, CLASS* p2) {
    plist->size = p1->size + p2->size;
    if(p1->first == NULL) {
        plist->first = p2->first;
        plist->last = p2->last;
    }
    else if(p2->first == NULL) {
        plist->first = p1->first;
        plist->last = p1->last;
    }
    else {
        TYPED(link)(p1->last, p2->first);
        plist->first = p1->first;
        plist->last = p2->last;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movl 0x10(%rdx), %eax
addl 0x10(%rsi), %eax
movl %eax, 0x10(%rdi)
movq (%rsi), %rax
movq (%rdx), %rsi
testq %rax, %rax
je 0xc471
testq %rsi, %rsi
je 0xc46b
movq 0x8(%r15), %rdi
callq 0xc20c
movq (%r15), %rsi
jmp 0xc471
movq %rax, %rsi
movq %r15, %r14
movq %rsi, (%rbx)
movq 0x8(%r14), %rax
movq %rax, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/sharmaeklavya2[P]cerplag/./util/llist.gen.c
// Function: ircode_prepend
void CLASSED(prepend)(CLASS* plist, TYPE instr) {
    (plist->size)++;
    if(plist->first == NULL) {
        plist->first = plist->last = instr;
        plist->size = 1;
    }
    else {
        TYPED(link)(instr, plist->first);
        plist->first = instr;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
incl 0x10(%rdi)
movq %rsi, %r14
movq (%rdi), %rsi
testq %rsi, %rsi
je 0xc4ac
movq %r14, %rdi
callq 0xc20c
movq %r14, (%rbx)
jmp 0xc4ba
movq %r14, 0x8(%rbx)
movq %r14, (%rbx)
movl $0x1, 0x10(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/sharmaeklavya2[P]cerplag/./util/llist.gen.c
// Function: ircode_append
void CLASSED(append)(CLASS* plist, TYPE instr) {
    (plist->size)++;
    if(plist->first == NULL) {
        plist->first = plist->last = instr;
        plist->size = 1;
    }
    else {
        TYPED(link)(plist->last, instr);
        plist->last = instr;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
incl 0x10(%rdi)
movq %rsi, %r14
cmpq $0x0, (%rdi)
je 0xc4e7
movq 0x8(%rbx), %rdi
movq %r14, %rsi
callq 0xc20c
movq %r14, 0x8(%rbx)
jmp 0xc4f5
movq %r14, 0x8(%rbx)
movq %r14, (%rbx)
movl $0x1, 0x10(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/sharmaeklavya2[P]cerplag/./util/llist.gen.c
// Function: ircode_remove
void CLASSED(remove)(CLASS* plist, TYPE elem) {
    (plist->size)--;
    // first manipulate pointers of list
    if(plist->first == NULL) {
        fprintf(stderr, "Cannot remove from empty linked-list.\n");
        plist->first = plist->last = elem;
        plist->size = 0;
    }
    else if(plist->first == elem) {
        if(plist->last == elem) {
            plist->first = plist->last = NULL;
        }
        else {
            plist->first = plist->first->next;
        }
    }
    else if(plist->last == elem) {
        plist->last = plist->last->prev;
    }
    // now detach elem
    TYPE prev = elem->prev;
    TYPE next = elem->next;
    elem->prev = elem->next = NULL;
    if(next != NULL) {
        next->prev = prev;
    }
    if(prev != NULL) {
        prev->next = next;
    }
    TYPED(destroy)(elem);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
decl 0x10(%rdi)
movq %rsi, %rbx
movq (%rdi), %rax
testq %rax, %rax
je 0xc53c
movq 0x8(%rdi), %rcx
cmpq %rbx, %rax
je 0xc526
cmpq %rbx, %rcx
jne 0xc548
movq 0x20(%rcx), %rax
movq %rax, 0x8(%rdi)
jmp 0xc548
cmpq %rbx, %rcx
je 0xc534
movq 0x28(%rax), %rax
movq %rax, (%rdi)
jmp 0xc548
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
jmp 0xc548
leaq 0x10(%rdi), %rdx
movq %rbx, %rsi
callq 0x3999
movq 0x20(%rbx), %rax
movq 0x28(%rbx), %rcx
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rbx)
testq %rcx, %rcx
je 0xc560
movq %rax, 0x20(%rcx)
testq %rax, %rax
je 0xc569
movq %rcx, 0x28(%rax)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0xc2b9