LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/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 0x6a60
movq %r14, %rdi
movl %eax, %esi
callq 0x72c7
movq %rax, %r14
leaq 0x11aed(%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 0x92e5
leaq 0x5d95(%rip), %rsi      # 0xf06e
movq %r15, %rdi
movl %ebx, %ecx
xorl %eax, %eax
callq 0x3140
movl %ebx, -0x2c(%rbp)
leaq 0x11ac9(%rip), %rax     # 0x1adb8
movl (%rax), %ebx
testl %ebx, %ebx
je 0x92fa
xorl %r12d, %r12d
jmp 0x9369
movq %r14, %rdi
callq 0x871a
movq (%r14), %rax
movq 0x20(%rax), %r12
testb %r13b, %r13b
je 0x9369
leaq 0x11a93(%rip), %rax     # 0x1ada8
movl (%rax), %edx
leaq 0x11a8e(%rip), %r13     # 0x1adac
movl (%r13), %ecx
leaq 0x5d67(%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 0x5cf3(%rip), %xmm2     # 0xf040
divss %xmm0, %xmm2
xorps %xmm0, %xmm0
cvtss2sd %xmm2, %xmm0
leaq 0x5d4c(%rip), %rsi      # 0xf0ab
movq %r15, %rdi
movb $0x1, %al
callq 0x3140
testl %ebx, %ebx
setne %bl
movq %r14, %rdi
callq 0x7951
xorl %edi, %edi
callq 0x6be6
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
sete %al
orb %bl, %al
jne 0x9395
movq %r12, %rsi
xorl %edx, %edx
callq 0x7de7
movq %r12, %rdi
callq 0x85c7
leaq 0xd8f4(%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_O3/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 0xc604(%rip), %rcx      # 0x15bc0
movq (%rcx,%rax,8), %rcx
leaq 0x5b26(%rip), %rsi      # 0xf0ed
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3140
movq 0x28(%r14), %rax
movl 0x1c(%rax), %edx
testl %edx, %edx
jle 0x95f1
leaq 0x5b28(%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 0x5afa(%rip), %rsi      # 0xf0fc
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0x3140
// File: /workspace/github_c_makefile_star2_O3/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, -0x50(%rbp)
movq %rdi, %r14
movw $0x0, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq 0x28(%rdi), %rbx
movl 0x18(%rbx), %r15d
movl 0x1c(%rbx), %ecx
leaq 0xc578(%rip), %rax      # 0x15bc0
movq (%rax,%r15,8), %rdx
testl %ecx, %ecx
je 0x966f
leaq 0x5ab2(%rip), %rsi      # 0xf109
leaq -0x38(%rbp), %rdi
xorl %eax, %eax
callq 0x31b0
movq 0x28(%r14), %rbx
movl 0x18(%rbx), %r15d
movl 0x1c(%rbx), %esi
jmp 0x967d
leaq -0x38(%rbp), %rdi
movq %rdx, %rsi
callq 0x3060
xorl %esi, %esi
movq 0x8(%rbx), %rax
movl 0x38(%rax), %ecx
movq %rcx, -0x48(%rbp)
movl 0x3c(%rax), %r12d
movl 0x40(%rax), %eax
movq %rax, -0x40(%rbp)
movq (%r14), %r13
movq 0x8(%r14), %rax
testq %rax, %rax
leaq 0x4dcd(%rip), %rbx      # 0xe471
cmovneq %rax, %rbx
movl %r15d, %edi
callq 0xbf78
movl %eax, %r10d
movq 0x28(%r14), %rax
movl 0x28(%rax), %r11d
leaq 0x5a4e(%rip), %rsi      # 0xf110
leaq -0x38(%rbp), %rcx
movq -0x50(%rbp), %rdi
movq %r13, %rdx
movq %rbx, %r8
movl %r12d, %r9d
xorl %eax, %eax
pushq %r11
pushq %r10
pushq -0x48(%rbp)
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_O3/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 0xbe2e
movq %r15, 0x30(%r14)
movq %r15, %rdi
callq 0x7d47
movl %eax, 0x3c(%r14)
movq %r15, %rdi
callq 0x7d97
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_O3/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 0x5552(%rip), %rsi      # 0xf13a
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3140
movq %r14, %rdi
movq %rbx, %rsi
callq 0x9a8a
leaq 0x555a(%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 0xbf3f
// File: /workspace/github_c_makefile_star2_O3/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 0x97be
leaq 0x18(%rbx), %rdi
callq 0xbe41
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_O3/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 0x97be
leaq 0x18(%rbx), %rdi
callq 0xbe41
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x3030
// File: /workspace/github_c_makefile_star2_O3/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 0x9b53
movq %r14, %rdi
callq 0x9c7c
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_O3/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 0x9f42
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 0x98a7
cmpl %ebx, 0xc(%r13)
jne 0x9f0b
movq 0x10(%rax), %rax
movq 0x28(%rax), %rax
movl 0x20(%rax), %edx
movl 0x24(%rax), %ecx
leaq 0x52cf(%rip), %rsi      # 0xf19c
xorl %r12d, %r12d
leaq -0x80(%rbp), %r13
movq %r13, %rdi
xorl %eax, %eax
callq 0x31b0
movq (%r14), %r9
leaq 0x52f3(%rip), %rax      # 0xf1db
leaq 0x52e3(%rip), %rdi      # 0xf1d2
xorl %esi, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl %r15d, %ecx
movl -0x2c(%rbp), %r8d
pushq %r13
pushq %rax
callq 0x93bc
addq $0x10, %rsp
jmp 0x9f30
cmpq $0x0, 0x18(%r12)
je 0x9f23
movq 0x20(%r12), %rax
movq %r14, 0x20(%rax)
movq %r14, 0x20(%r12)
jmp 0x9f2d
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 0x38bc
xorl %r12d, %r12d
jmp 0x9f30
// File: /workspace/github_c_makefile_star2_O3/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 0x9fdb
movq %rsi, %r14
movq %rdi, %rbx
movq (%r12), %r13
leaq 0x18(%r13), %rdi
movq 0x20(%r13), %rax
testq %rax, %rax
je 0x9f81
movl 0x10(%rax), %eax
incl %eax
jmp 0x9f83
xorl %eax, %eax
movl %eax, 0x10(%r14)
movq %r14, %rsi
callq 0xbe75
cmpl $0x2, 0x14(%r14)
je 0x9fc6
movl 0x14(%rbx), %edi
movl 0x18(%r14), %esi
callq 0xbf93
movl %eax, %r15d
movl %eax, 0x28(%r14)
movl 0x18(%r14), %edi
movl 0x1c(%r14), %esi
callq 0xbf78
addl %r15d, %eax
movl %eax, 0x14(%rbx)
cmpl 0x4c(%r13), %eax
jle 0x9fc6
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 0x38e0
jmp 0x9fc6
// File: /workspace/github_c_makefile_star2_O3/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 0xa019
movq %rsi, %rbx
movq (%r14), %rdi
movq %rbx, %rsi
callq 0x9833
movq 0x8(%r14), %r14
testq %r14, %r14
je 0xa00e
testq %rax, %rax
je 0x9ff5
testq %rax, %rax
je 0xa019
movq 0x10(%rax), %rax
jmp 0xa01b
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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, %r14
movq %rdi, %rbx
movl $0x50, %edi
callq 0x3150
movq %rax, %r15
movl 0x10(%rbx), %edx
incl %edx
movl %edx, 0x10(%rbx)
movq %rax, %rdi
movq %r14, %rsi
callq 0x9b53
movq 0x8(%rbx), %r14
movq %r15, %rdi
callq 0x9c7c
movq %r14, 0x8(%rax)
movq 0x18(%r14), %rcx
movq 0x10(%r14), %rdx
orq %rcx, %rdx
jne 0xa083
leaq 0x10(%r14), %rcx
jmp 0xa08b
movq %rcx, 0x28(%rax)
addq $0x20, %rcx
movq %rax, (%rcx)
movq %rax, 0x18(%r14)
movq 0x8(%rbx), %rax
movq 0x18(%rax), %rax
movq %rax, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xa0ce
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 0xa0e3
movl $0x0, 0x14(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xa699
cmpl %edx, %esi
jne 0xa66a
cmpl $0xb, %eax
ja 0xa6a2
movl $0xfc, %edx
btl %eax, %edx
jae 0xa66e
leal -0x1(%rsi), %edx
movl $0x3, %ebx
cmpl $0x2, %edx
jae 0xa68e
jmp 0xa699
movl %eax, %edi
jmp 0xa692
movl $0x303, %edx            # imm = 0x303
btl %eax, %edx
jae 0xa684
leal -0x1(%rsi), %edx
cmpl $0x2, %edx
jae 0xa68e
movl %esi, %ebx
jmp 0xa699
movl $0x3, %ebx
cmpl $0x3, %esi
je 0xa699
movl %eax, %edi
movl %esi, %edx
callq 0xa57b
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movq 0xa94f(%rip), %rcx      # 0x14ff8
movq (%rcx), %rdi
leaq 0x4c67(%rip), %rsi      # 0xf31a
xorl %ebx, %ebx
movl %eax, %edx
xorl %eax, %eax
callq 0x3140
jmp 0xa699
// File: /workspace/github_c_makefile_star2_O3/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 0xb676
movq 0x40(%r15), %rax
jmp 0xb678
xorl %eax, %eax
movq %rax, (%rbx)
movl 0xc(%r15), %edx
movl 0x10(%r15), %ecx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x9e73
testb %al, %al
je 0xb6ac
movq %r15, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0xb5ae
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_O3/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 0xb725
movq (%r14), %rdx
movq 0x28(%r14), %rax
movl 0x20(%rax), %ecx
movl 0x24(%rax), %r8d
leaq 0xf6e6(%rip), %r12      # 0x1add0
leaq 0x3c3d(%rip), %rsi      # 0xf32e
movq %r12, %rdi
xorl %eax, %eax
callq 0x31b0
movq (%r14), %r9
leaq 0x3c6e(%rip), %rax      # 0xf373
leaq 0x313c(%rip), %rdi      # 0xe848
xorl %esi, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl %r15d, %ecx
movl %ebx, %r8d
pushq %r12
pushq %rax
callq 0x93bc
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_O3/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 0xbe63
movq (%rdi), %r14
callq 0x3030
movq %r14, %rdi
testq %r14, %r14
jne 0xbe53
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movl $0x0, 0x10(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xbe96
incl 0x10(%rdi)
cmpq $0x0, (%rdi)
movq %rdi, %rax
je 0xbe8a
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_O3/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 0xbf1e
movq %rdi, %r14
movl 0x20(%rdi), %ecx
movl 0x24(%rdi), %r8d
movl 0x10(%rdi), %edx
movl 0x14(%rdi), %eax
leaq 0x9c1f(%rip), %rsi      # 0x15ae0
movq (%rsi,%rax,8), %r9
movl 0x18(%rdi), %eax
leaq 0x9cf1(%rip), %rsi      # 0x15bc0
movq (%rsi,%rax,8), %rax
movq %rax, (%rsp)
leaq 0x3c0c(%rip), %rsi      # 0xfaea
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3140
movl 0x1c(%r14), %edx
testl %edx, %edx
jle 0xbf01
leaq 0x3214(%rip), %rsi      # 0xf10b
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3140
movl 0x28(%r14), %edx
leaq 0x31f7(%rip), %rsi      # 0xf103
movq %rbx, %rdi
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x3140
leaq 0x3bc0(%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_O3/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 0xbf71
movq %rsi, %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0xbe97
movl $0xa, %edi
movq %rbx, %rsi
callq 0x3110
movq (%r14), %r14
testq %r14, %r14
jne 0xbf51
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/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 0x9bfc(%rip), %rdx      # 0x15bc0
movq (%rdx,%rax,8), %rdx
testl %ecx, %ecx
je 0xbfdb
leaq 0x3136(%rip), %rsi      # 0xf109
xorl %eax, %eax
popq %rbp
jmp 0x31b0
movq %rdx, %rsi
popq %rbp
jmp 0x3060
// File: /workspace/github_c_makefile_star2_O3/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, 0x20(%rdi)
movl $0x0, 0x30(%rdi)
movq %rcx, 0x8(%rdi)
movq %r8, 0x10(%rdi)
movq %rdx, 0x18(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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, 0x20(%rax)
movl $0x0, 0x30(%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_O3/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, 0x8(%rax)
movups %xmm0, 0x18(%rax)
movq $0x0, 0x28(%rax)
movl %ebx, 0x30(%rax)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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, 0x20(%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_O3/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 0xc176
cmpq $0x0, 0x20(%rbx)
jne 0xc19a
movq %rbx, 0x28(%r14)
movq %r14, 0x20(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
movq 0x8e7b(%rip), %rax      # 0x14ff8
movq (%rax), %rdi
leaq 0x39aa(%rip), %rsi      # 0xfb31
leaq 0x39c4(%rip), %rdx      # 0xfb52
movq %r14, %rcx
xorl %eax, %eax
callq 0x3140
jmp 0xc162
movq 0x8e57(%rip), %rax      # 0x14ff8
movq (%rax), %rdi
leaq 0x39b4(%rip), %rsi      # 0xfb5f
leaq 0x39a0(%rip), %rdx      # 0xfb52
movq %rbx, %rcx
xorl %eax, %eax
callq 0x3140
jmp 0xc169
// File: /workspace/github_c_makefile_star2_O3/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 0xc1d3
movq $0x0, 0x28(%rax)
movq 0x28(%rdi), %rax
testq %rax, %rax
je 0xc1e4
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_O3/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 0xc210
movq $0x0, 0x28(%rax)
movq 0x28(%rdi), %rax
testq %rax, %rax
je 0xc221
movq $0x0, 0x20(%rax)
popq %rbp
jmp 0x3030
// File: /workspace/github_c_makefile_star2_O3/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 0xc26e
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq 0x20(%rdi), %rcx
movq 0x28(%rdi), %rbx
movq %rbx, %rax
testq %rcx, %rcx
je 0xc24e
movq $0x0, 0x28(%rcx)
movq 0x28(%rdi), %rax
testq %rax, %rax
je 0xc25b
movq $0x0, 0x20(%rax)
callq 0x3030
movq %rbx, %rdi
testq %rbx, %rbx
jne 0xc232
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x987b(%rip), %rcx      # 0x15b00
movq (%rcx,%rax,8), %rdx
leaq 0x38f0(%rip), %rsi      # 0xfb80
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3140
movl (%r14), %eax
cmpl $0x15, %eax
ja 0xc2c1
movl $0x3b0000, %ecx         # imm = 0x3B0000
btl %eax, %ecx
jae 0xc2c1
movl 0x30(%r14), %edx
leaq 0x38d5(%rip), %rsi      # 0xfb8c
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3140
cmpq $0x0, 0x18(%r14)
je 0xc2ed
leaq 0x38c8(%rip), %rdi      # 0xfb97
movl $0x7, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x31d0
movq 0x18(%r14), %rdi
movq %rbx, %rsi
callq 0xbe97
cmpq $0x0, 0x8(%r14)
je 0xc319
leaq 0x38a4(%rip), %rdi      # 0xfb9f
movl $0x8, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x31d0
movq 0x8(%r14), %rdi
movq %rbx, %rsi
callq 0xbe97
cmpq $0x0, 0x10(%r14)
je 0xc345
leaq 0x3881(%rip), %rdi      # 0xfba8
movl $0x8, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x31d0
movq 0x10(%r14), %rdi
movq %rbx, %rsi
callq 0xbe97
movl $0x29, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x3110
// File: /workspace/github_c_makefile_star2_O3/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 0xc3c3
testq %rsi, %rsi
je 0xc3bd
movq 0x8(%r15), %rdi
callq 0xc14e
movq (%r15), %rsi
jmp 0xc3c3
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_O3/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 0xc3fb
movq %r14, %rdi
callq 0xc14e
jmp 0xc406
movq %r14, 0x8(%rbx)
movl $0x1, 0x10(%rbx)
movq %r14, (%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xc436
movq 0x8(%rbx), %rdi
movq %r14, %rsi
callq 0xc14e
movq %r14, 0x8(%rbx)
jmp 0xc444
movq %r14, 0x8(%rbx)
movq %r14, (%rbx)
movl $0x1, 0x10(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xc48b
movq 0x8(%rdi), %rcx
cmpq %rbx, %rax
je 0xc475
cmpq %rbx, %rcx
jne 0xc497
movq 0x20(%rcx), %rax
movq %rax, 0x8(%rdi)
jmp 0xc497
cmpq %rbx, %rcx
je 0xc483
movq 0x28(%rax), %rax
movq %rax, (%rdi)
jmp 0xc497
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
jmp 0xc497
leaq 0x10(%rdi), %rdx
movq %rbx, %rsi
callq 0x3998
movq 0x20(%rbx), %rax
movq 0x28(%rbx), %rcx
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rbx)
testq %rcx, %rcx
je 0xc4af
movq %rax, 0x20(%rcx)
leaq 0x20(%rbx), %rdx
testq %rax, %rax
je 0xc4bc
movq %rcx, 0x28(%rax)
movq (%rdx), %rax
testq %rax, %rax
je 0xc4cc
movq $0x0, 0x28(%rax)
movq 0x28(%rbx), %rax
testq %rax, %rax
je 0xc4dd
movq $0x0, 0x20(%rax)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x3030
// File: /workspace/github_c_makefile_star2_O3/sharmaeklavya2[P]cerplag/./util/llist.gen.c
// Function: ircode_print
void CLASSED(print)(CLASS* plist, FILE* fp) {
    int i;
    TYPE node = plist->first;
    for(i=0; i<(plist->size); ++i) {
        TYPED(print)(node, fp);
        fprintf(fp, "\n");
        node = node->next;
    }
}

// Assembly:
cmpl $0x0, 0x10(%rdi)
jle 0xc55d
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
xorl %r12d, %r12d
movq %rdi, %r15
movq (%r15), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0xc26f
movl $0xa, %edi
movq %rbx, %rsi
callq 0x3110
addq $0x28, %r15
incl %r12d
cmpl 0x10(%r14), %r12d
jl 0xc52d
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/sharmaeklavya2[P]cerplag/x86.c
// Function: x86_instr_init
void x86_instr_init(X86Instr* instr, x86_op_t opcode) {
    memset((void*)instr, 0, sizeof(instr));
    instr->next = instr->prev = NULL;
    instr->arg1[0] = instr->arg2[0] = '\0';
    instr->opcode = opcode;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq $0x0, (%rdi)
movb $0x0, 0x22(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%rdi)
movl %esi, (%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/sharmaeklavya2[P]cerplag/x86.c
// Function: x86_instr_new
X86Instr* x86_instr_new(x86_op_t opcode) {
    X86Instr* p = malloc(sizeof(X86Instr));
#ifdef LOG_MEM
    fprintf(stderr, "%s: Allocated X86Instr %p\n", __func__, (void*)p);
#endif
    x86_instr_init(p, opcode);
    return p;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
movl $0x50, %edi
callq 0x3150
movq $0x0, (%rax)
movb $0x0, 0x22(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%rax)
movl %ebx, (%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/sharmaeklavya2[P]cerplag/x86.c
// Function: x86_instr_link
void x86_instr_link(X86Instr* i1, X86Instr* 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, 0x48(%rdi)
jne 0xc65c
cmpq $0x0, 0x40(%rbx)
jne 0xc680
movq %rbx, 0x48(%r14)
movq %r14, 0x40(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
movq 0x8995(%rip), %rax      # 0x14ff8
movq (%rax), %rdi
leaq 0x34c4(%rip), %rsi      # 0xfb31
leaq 0x35c6(%rip), %rdx      # 0xfc3a
movq %r14, %rcx
xorl %eax, %eax
callq 0x3140
jmp 0xc648
movq 0x8971(%rip), %rax      # 0x14ff8
movq (%rax), %rdi
leaq 0x34ce(%rip), %rsi      # 0xfb5f
leaq 0x35a2(%rip), %rdx      # 0xfc3a
movq %rbx, %rcx
xorl %eax, %eax
callq 0x3140
jmp 0xc64f
// File: /workspace/github_c_makefile_star2_O3/sharmaeklavya2[P]cerplag/x86.c
// Function: x86_instr_clear
void x86_instr_clear(X86Instr* instr) {
    if(instr->prev != NULL) {
        instr->prev->next = NULL;
    }
    if(instr->next != NULL) {
        instr->next->prev = NULL;
    }
    x86_instr_init(instr, 0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x40(%rdi), %rax
testq %rax, %rax
je 0xc6b9
movq $0x0, 0x48(%rax)
leaq 0x40(%rdi), %rax
movq 0x48(%rdi), %rcx
testq %rcx, %rcx
je 0xc6ce
movq $0x0, 0x40(%rcx)
movq $0x0, (%rdi)
movb $0x0, 0x22(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/sharmaeklavya2[P]cerplag/x86.c
// Function: x86_instr_destroy
void x86_instr_destroy(X86Instr* instr) {
    x86_instr_clear(instr);
    free(instr);
#ifdef LOG_MEM
    fprintf(stderr, "%s: Destroyed X86Instr %p\n", __func__, (void*)instr);
#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x40(%rdi), %rax
testq %rax, %rax
je 0xc6f6
movq $0x0, 0x48(%rax)
movq 0x48(%rdi), %rax
testq %rax, %rax
je 0xc707
movq $0x0, 0x40(%rax)
popq %rbp
jmp 0x3030
// File: /workspace/github_c_makefile_star2_O3/sharmaeklavya2[P]cerplag/x86.c
// Function: x86_instr_destroy_list
void x86_instr_destroy_list(X86Instr* n) {
    X86Instr* p = NULL;
    while(n != NULL) {
        p = n->next;
        x86_instr_destroy(n);
        n = p;
    }
}

// Assembly:
testq %rdi, %rdi
je 0xc754
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq 0x40(%rdi), %rcx
movq 0x48(%rdi), %rbx
movq %rbx, %rax
testq %rcx, %rcx
je 0xc734
movq $0x0, 0x48(%rcx)
movq 0x48(%rdi), %rax
testq %rax, %rax
je 0xc741
movq $0x0, 0x40(%rax)
callq 0x3030
movq %rbx, %rdi
testq %rbx, %rbx
jne 0xc718
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/sharmaeklavya2[P]cerplag/x86.c
// Function: x86_instr_print
void x86_instr_print(X86Instr* n, FILE* fp) {
    if(n->opcode == X86_OP_label) {
        fprintf(fp, "%s%s:", X86_INDENT_STR, n->arg1);
    }
    else if(n->arg2[0] != '\0') {
        fprintf(fp, "%s%s %s, %s", X86_INDENT_STR, X86_OP_STRS[n->opcode], n->arg1, n->arg2);
    }
    else if(n->arg1[0] != '\0') {
        fprintf(fp, "%s%s %s", X86_INDENT_STR, X86_OP_STRS[n->opcode], n->arg1);
    }
    else {
        fprintf(fp, "%s%s", X86_INDENT_STR, X86_OP_STRS[n->opcode]);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rsi, %rax
movq %rdi, %r8
movl (%rdi), %ecx
cmpq $0x13, %rcx
jne 0xc787
addq $0x4, %r8
leaq 0x34d7(%rip), %rsi      # 0xfc49
leaq 0x2669(%rip), %rdx      # 0xede2
movq %rax, %rdi
movq %r8, %rcx
xorl %eax, %eax
popq %rbp
jmp 0x3140
cmpb $0x0, 0x22(%r8)
je 0xc7ba
leaq 0x22(%r8), %r9
leaq 0x9467(%rip), %rdx      # 0x15c00
movq (%rdx,%rcx,8), %rcx
addq $0x4, %r8
leaq 0x34a7(%rip), %rsi      # 0xfc4f
leaq 0x2633(%rip), %rdx      # 0xede2
movq %rax, %rdi
xorl %eax, %eax
popq %rbp
jmp 0x3140
cmpb $0x0, 0x4(%r8)
leaq 0x943a(%rip), %rdx      # 0x15c00
movq (%rdx,%rcx,8), %rcx
je 0xc7e9
addq $0x4, %r8
leaq 0x3484(%rip), %rsi      # 0xfc5b
leaq 0x2604(%rip), %rdx      # 0xede2
movq %rax, %rdi
xorl %eax, %eax
popq %rbp
jmp 0x3140
leaq 0x3473(%rip), %rsi      # 0xfc63
leaq 0x25eb(%rip), %rdx      # 0xede2
movq %rax, %rdi
jmp 0xc77f
// File: /workspace/github_c_makefile_star2_O3/sharmaeklavya2[P]cerplag/compile_x86.c
// Function: enable_output
void enable_output(valtype_t type, int size) {
    include_lib_files[0] = true;
    int index = 1;
    if(size > 0) {
        index += 2;
    }
    if(type == TYPE_BOOLEAN) {
        index++;
    }
    include_lib_files[index] = true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb $0x1, %al
movb %al, 0x9308(%rip)       # 0x15d18
leaq 0x9301(%rip), %rcx      # 0x15d18
xorl %edx, %edx
testl %esi, %esi
setg %dl
xorl %esi, %esi
cmpl $0x3, %edi
sete %sil
leaq (%rsi,%rdx,2), %rdx
movb %al, 0x1(%rdx,%rcx)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/sharmaeklavya2[P]cerplag/compile_x86.c
// Function: enable_input
void enable_input(valtype_t type) {
    include_lib_files[0] = true;
    int index = 5;
    if(type == TYPE_BOOLEAN) {
        index++;
    }
    include_lib_files[index] = true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb $0x1, %al
movb %al, 0x92db(%rip)       # 0x15d18
leaq 0x92d4(%rip), %rcx      # 0x15d18
xorl %edx, %edx
cmpl $0x3, %edi
sete %dl
movb %al, 0x5(%rdx,%rcx)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/sharmaeklavya2[P]cerplag/compile_x86.c
// Function: load_index_if_needed
void load_index_if_needed(X86Code* ocode, const AddrNode* an, const char* index_reg) {
    if(an->addr_type == ADDR_ARR && an->index->addr_type == ADDR_VAR) {
        X86Instr* onode = x86_instr_new(X86_OP_mov);
        x86_code_append(ocode, onode);
        strcpy(onode->arg1, index_reg);
        snprintf(onode->arg2, X86_ARG_SIZE, "[%s + %d]", DATA_REG, an->index->offset);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
cmpl $0x3, 0x14(%rsi)
jne 0xcc3b
movq %rsi, %rbx
movq 0x38(%rsi), %rax
cmpl $0x0, 0x14(%rax)
je 0xcc44
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rdx, %r14
movq %rdi, %r15
xorl %edi, %edi
callq 0xc5c9
movq %rax, %r12
movq %r15, %rdi
movq %rax, %rsi
callq 0xc8b4
leaq 0x4(%r12), %rdi
movq %r14, %rsi
callq 0x3060
addq $0x22, %r12
movq 0x38(%rbx), %rax
movl 0x28(%rax), %r8d
leaq 0x31ba(%rip), %rdx      # 0xfe39
leaq 0x3046(%rip), %rcx      # 0xfccc
movl $0x1e, %esi
movq %r12, %rdi
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x30c0
// File: /workspace/github_c_makefile_star2_O3/sharmaeklavya2[P]cerplag/compile_x86.c
// Function: op_addr_to_reg
void op_addr_to_reg(X86Code* ocode, x86_op_t opcode, int regno, const AddrNode* an) {
    X86Instr* onode = x86_instr_new2(opcode, std_regs[regno][an->type], NULL);
    load_index_if_needed(ocode, an, "si");
    addr_to_x86_arg(an, onode->arg2, false, "rsi");
    x86_code_append(ocode, onode);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %r14
movl %esi, %eax
movq %rdi, %rbx
movslq %edx, %rcx
movl 0x18(%r14), %edx
leaq (%rcx,%rcx,4), %rcx
leaq 0xe23f(%rip), %rsi      # 0x1af00
leaq (%rsi,%rcx,8), %rcx
leaq (%rdx,%rdx,4), %rdx
leaq (%rcx,%rdx,2), %rsi
movl %eax, %edi
xorl %edx, %edx
callq 0xc5f6
movq %rax, %r15
leaq 0x3179(%rip), %rdx      # 0xfe59
movq %rbx, %rdi
movq %r14, %rsi
callq 0xcc1d
leaq 0x22(%r15), %rsi
leaq 0x3162(%rip), %rcx      # 0xfe58
movq %r14, %rdi
xorl %edx, %edx
callq 0xca58
movq %rbx, %rdi
movq %r15, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xc8b4
// File: /workspace/github_c_makefile_star2_O3/sharmaeklavya2[P]cerplag/compile_x86.c
// Function: op_reg_to_addr
void op_reg_to_addr(X86Code* ocode, x86_op_t opcode, const AddrNode* an, int regno) {
    X86Instr* onode = x86_instr_new2(opcode, NULL, std_regs[regno][an->type]);
    load_index_if_needed(ocode, an, "di");
    addr_to_x86_arg(an, onode->arg1, false, "rdi");
    x86_code_append(ocode, onode);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rdi, %rbx
movslq %ecx, %rax
movl 0x18(%rdx), %ecx
leaq (%rax,%rax,4), %rax
leaq 0xe1ca(%rip), %rdx      # 0x1af00
leaq (%rdx,%rax,8), %rax
leaq (%rcx,%rcx,4), %rcx
leaq (%rax,%rcx,2), %rdx
movl %esi, %edi
xorl %esi, %esi
callq 0xc5f6
movq %rax, %r15
leaq 0x3108(%rip), %rdx      # 0xfe5d
movq %rbx, %rdi
movq %r14, %rsi
callq 0xcc1d
leaq 0x4(%r15), %rsi
leaq 0x30f1(%rip), %rcx      # 0xfe5c
movq %r14, %rdi
xorl %edx, %edx
callq 0xca58
movq %rbx, %rdi
movq %r15, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xc8b4