LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/yutopp[P]cc/parser.c
// Function: debug_print_current_token
void debug_print_current_token(Parser *parser) {
    fprintf(DEBUGOUT, "DEBUG_PRINT: CURRENT_TOKEN ");

    ParserResult res = current_token(parser);
    if (res.result == PARSER_ERROR) {
        fprintf(DEBUGOUT, "ERR!\n");
        return;
    }

    fprintf(DEBUGOUT, "OK! -> ");
    token_fprint_buf(DEBUGOUT, res.value.token);
    fprintf(DEBUGOUT, "\n");
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8cb1(%rip), %r14      # 0xafd8
movq (%r14), %rcx
leaq 0x4fce(%rip), %rdi      # 0x72ff
movl $0x1b, %esi
movl $0x1, %edx
callq 0x11c0
movq (%rbx), %rdi
movq 0x10(%rbx), %rsi
callq 0x2ef6
movq (%r14), %rcx
testq %rax, %rax
je 0x238c
movq %rax, %rbx
leaq 0x4fc3(%rip), %rdi      # 0x7321
movl $0x7, %esi
movl $0x1, %edx
callq 0x11c0
movq (%r14), %rdi
movq %rbx, %rsi
callq 0x1c61
movq (%r14), %rsi
movl $0xa, %edi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x10f0
leaq 0x4f88(%rip), %rdi      # 0x731b
movl $0x5, %esi
movl $0x1, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x11c0
// File: /workspace/github_c_makefile_star2_O3/yutopp[P]cc/parser.c
// Function: parse_parameter_declaration
ParserResult parse_parameter_declaration(Parser *parser) {
    ParserResult res;
    state_t _parser_state = save_state(parser);

    res = parse_declaration_specifiers(parser); ErrProp;
    Node* spec = res.value.node;

    Node* node = node_arena_malloc(parser->arena);
    node->kind = NODE_PARAM_DECL;
    node->value.param_decl.spec = spec;

    res = parse_declarator(parser);
    if (res.result == PARSER_ERROR) {
        goto next_phase;
    }
    node->value.param_decl.decl = res.value.node;

    res.result = PARSER_OK;
    res.value.node = node;

    return res;

next_phase:
    // TODO: support 'abstract-declarator opt'
    node->value.param_decl.decl = NULL;

    res.result = PARSER_OK;
    res.value.node = node;

    return res;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x10(%rsi), %r15
callq 0x1f6c
cmpl $0x1, (%rbx)
jne 0x23cb
movq %r15, 0x10(%r14)
jmp 0x240b
movq 0x18(%rbx), %r12
movq 0x8(%r14), %rdi
callq 0x354a
movq %rax, %r15
movl $0xe, (%rax)
movq %r12, 0x8(%rax)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1ff3
cmpl $0x1, (%rbx)
je 0x23fb
movq 0x18(%rbx), %rax
jmp 0x23fd
xorl %eax, %eax
movq %rax, 0x10(%r15)
movl $0x0, (%rbx)
movq %r15, 0x18(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/yutopp[P]cc/parser.c
// Function: parse_expr_additive
ParserResult parse_expr_additive(Parser *parser) {
    ParserResult res;
    state_t _parser_state = save_state(parser);

    res = parse_expr_postfix(parser); ErrProp;

    for (;;) {
        _parser_state = save_state(parser);

        ParserResult res0 = current_token(parser);
        if (res0.result == PARSER_ERROR) {
            rewind_state(parser, _parser_state);
            goto escape;
        }
        Token* op = res0.value.token;

        switch (op->kind) {
        case TOK_KIND_PLUS:
            break;
        case TOK_KIND_MINUS:
            break;
        default:
            rewind_state(parser, _parser_state);
            goto escape;
        }
        forward_token(parser);

        res0 = parse_expr_postfix(parser);
        if (res0.result == PARSER_ERROR) {
            rewind_state(parser, _parser_state);
            goto escape;
        }

        Node* node = node_arena_malloc(parser->arena);
        node->kind = NODE_EXPR_BIN;
        node->value.expr_bin.op = op;
        node->value.expr_bin.lhs = res.value.node;
        node->value.expr_bin.rhs = res0.value.node;

        res.value.node = node;

        _parser_state = save_state(parser); // Forward state
    }

escape:
    return res;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq 0x10(%rsi), %r12
movq %rsp, %r15
movq %r15, %rdi
callq 0x28d4
movups (%r15), %xmm0
movups 0x10(%r15), %xmm1
movups %xmm1, 0x10(%r14)
movups %xmm0, (%r14)
cmpl $0x1, (%r14)
jne 0x2807
movq %r12, 0x10(%rbx)
jmp 0x28c6
movq 0x10(%rbx), %r15
movq (%rbx), %rdi
movq %r15, %rsi
callq 0x2ef6
testq %rax, %rax
je 0x28c2
movq %rax, %r12
movq %rax, 0x18(%rsp)
movl $0x0, (%rsp)
movl (%rax), %eax
andl $-0x2, %eax
cmpl $0xe, %eax
jne 0x28c2
incq 0x10(%rbx)
movq %rsp, %r13
movq %r13, %rdi
movq %rbx, %rsi
callq 0x28d4
cmpl $0x1, (%r13)
je 0x28c2
movq %rsp, %r13
movq 0x8(%rbx), %rdi
callq 0x354a
movl $0x6, (%rax)
movq %r12, 0x8(%rax)
movq 0x18(%r14), %rcx
movq %rcx, 0x10(%rax)
movq 0x18(%rsp), %rcx
movq %rcx, 0x18(%rax)
movq %rax, 0x18(%r14)
movq 0x10(%rbx), %r15
movq (%rbx), %rdi
movq %r15, %rsi
callq 0x2ef6
testq %rax, %rax
je 0x28c2
movq %rax, %r12
movq %rax, 0x18(%rsp)
movl $0x0, (%rsp)
movl (%rax), %eax
andl $-0x2, %eax
cmpl $0xe, %eax
jne 0x28c2
incq 0x10(%rbx)
movq %r13, %rdi
movq %rbx, %rsi
callq 0x28d4
cmpl $0x1, (%rsp)
jne 0x2858
movq %r15, 0x10(%rbx)
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/yutopp[P]cc/arena.c
// Function: arena_new
Arena* arena_new(size_t elem_size, void (*dtor)(void*)) {
    Arena* v = (Arena*)malloc(sizeof(Arena));
    if (!v) {
        return 0;
    }
    v->current = vector_new_with_cap(elem_size, 128);
    v->chain = vector_new(sizeof(Vector*));
    v->elem_size = elem_size;
    v->dtor = dtor;

    return v;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl $0x20, %edi
callq 0x1160
movq %rax, %r15
testq %rax, %rax
je 0x2c63
movl $0x80, %esi
movq %r14, %rdi
callq 0x2dc3
movq %rax, (%r15)
movl $0x8, %edi
callq 0x2d9c
movq %rax, 0x8(%r15)
movq %r14, 0x10(%r15)
movq %rbx, 0x18(%r15)
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/yutopp[P]cc/arena.c
// Function: arena_malloc
void* arena_malloc(Arena *arena) {
    if (vector_len(arena->current) == vector_cap(arena->current)) {
        // Move an ownership of current into chain
        Vector** c = (Vector**)vector_append(arena->chain);
        (*c) = arena->current;

        // Allocate a new space
        arena->current = vector_new_with_cap(arena->elem_size, vector_cap(arena->current) * 2);

        return arena_malloc(arena);
    }

    return vector_append(arena->current);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x2f0b
movq %rax, %r14
movq (%rbx), %rdi
callq 0x2f10
cmpq %rax, %r14
jne 0x2cb7
movq 0x8(%rbx), %rdi
callq 0x2eb0
movq (%rbx), %rdi
movq %rdi, (%rax)
movq 0x10(%rbx), %r14
callq 0x2f10
leaq (%rax,%rax), %rsi
movq %r14, %rdi
callq 0x2dc3
movq %rax, (%rbx)
movq %rax, %rdi
jmp 0x2c76
movq (%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2eb0
// File: /workspace/github_c_makefile_star2_O3/yutopp[P]cc/arena.c
// Function: arena_drop
void arena_drop(Arena *arena) {
    if (!arena) {
        return;
    }

    for(size_t i=0; i<vector_len(arena->current); ++i) {
        void* e = vector_at(arena->current, i);
        arena->dtor(e);
    }
    vector_drop(arena->current);

    for(size_t i=0; i<vector_len(arena->chain); ++i) {
        Vector** c = (Vector**)vector_at(arena->chain, i);
        for(size_t j=0; j<vector_len(*c); ++j) {
            void* e = vector_at(*c, j);
            arena->dtor(e);
        }
        vector_drop(*c);
    }
    vector_drop(arena->chain);

    free(arena);
}

// Assembly:
testq %rdi, %rdi
je 0x2d99
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x2f0b
testq %rax, %rax
je 0x2d0b
xorl %r14d, %r14d
movq (%rbx), %rdi
movq %r14, %rsi
callq 0x2ef6
movq %rax, %rdi
callq *0x18(%rbx)
incq %r14
movq (%rbx), %rdi
callq 0x2f0b
cmpq %rax, %r14
jb 0x2cea
movq (%rbx), %rdi
callq 0x2e8f
movq 0x8(%rbx), %rdi
callq 0x2f0b
testq %rax, %rax
je 0x2d7d
xorl %r14d, %r14d
movq 0x8(%rbx), %rdi
movq %r14, %rsi
callq 0x2ef6
movq %rax, %r15
movq (%rax), %rdi
callq 0x2f0b
testq %rax, %rax
je 0x2d64
xorl %r12d, %r12d
movq (%r15), %rdi
movq %r12, %rsi
callq 0x2ef6
movq %rax, %rdi
callq *0x18(%rbx)
incq %r12
movq (%r15), %rdi
callq 0x2f0b
cmpq %rax, %r12
jb 0x2d43
movq (%r15), %rdi
callq 0x2e8f
incq %r14
movq 0x8(%rbx), %rdi
callq 0x2f0b
cmpq %rax, %r14
jb 0x2d24
movq 0x8(%rbx), %rdi
callq 0x2e8f
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x1040
retq
nop
// File: /workspace/github_c_makefile_star2_O3/yutopp[P]cc/vector.c
// Function: vector_new
Vector* vector_new(size_t elem_size) {
    Vector* v = (Vector*)malloc(sizeof(Vector));
    if (!v) {
        return 0;
    }
    v->elem_size = elem_size;
    v->len = 0;
    v->cap = 0;
    v->buffer = 0;

    return v;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x20, %edi
callq 0x1160
testq %rax, %rax
je 0x2dc1
movq %rbx, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
movq $0x0, 0x18(%rax)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/yutopp[P]cc/vector.c
// Function: vector_new_with_cap
Vector* vector_new_with_cap(size_t elem_size, size_t cap) {
    Vector* v = vector_new(elem_size);
    bool res = extend(v, cap);
    assert(res);

    return v;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
movl $0x20, %edi
callq 0x1160
movq %rax, %rbx
testq %rax, %rax
je 0x2df2
movq %r15, (%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rbx)
movq $0x0, 0x18(%rbx)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2e29
testb %al, %al
je 0x2e0a
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x4596(%rip), %rdi      # 0x73a7
leaq 0x4593(%rip), %rsi      # 0x73ab
leaq 0x4595(%rip), %rcx      # 0x73b4
movl $0x20, %edx
callq 0x10d0
// File: /workspace/github_c_makefile_star2_O3/yutopp[P]cc/vector.c
// Function: vector_drop
void vector_drop(Vector *v) {
    if (!v) {
        return;
    }

    if (v->buffer) {
        free(v->buffer);
    }

    free(v);
}

// Assembly:
testq %rdi, %rdi
je 0x2eaf
pushq %rbx
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
testq %rdi, %rdi
je 0x2ea6
callq 0x1040
movq %rbx, %rdi
popq %rbx
jmp 0x1040
retq
// File: /workspace/github_c_makefile_star2_O3/yutopp[P]cc/vector.c
// Function: vector_append
void* vector_append(Vector *v) {
    if (v->len == v->cap) {
        size_t ext_size = v->cap == 0 ? 24 : v->cap * 2; //
        if (!extend(v, ext_size)) {
            return 0;
        }
    }

    // TODO: Consider alignment
    char* p = &v->buffer[v->elem_size * v->len];
    v->len++;

    return p;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rcx
cmpq 0x10(%rdi), %rcx
jne 0x2ede
leaq (%rcx,%rcx), %rax
testq %rcx, %rcx
movl $0x18, %esi
cmovneq %rax, %rsi
movq %rbx, %rdi
callq 0x2e29
testb %al, %al
je 0x2ef2
movq 0x8(%rbx), %rcx
movq (%rbx), %rax
imulq %rcx, %rax
addq 0x18(%rbx), %rax
incq %rcx
movq %rcx, 0x8(%rbx)
jmp 0x2ef4
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/yutopp[P]cc/node.c
// Function: node_declarator_extract_id_token
Token* node_declarator_extract_id_token(Node* node) {
    switch(node->kind) {
    case NODE_DECLARATOR:
        return node_declarator_extract_id_token(node->value.declarator.node);
    case NODE_DIRECT_DECLARATOR:
        return node_declarator_extract_id_token(node->value.direct_declarator.base);
    case NODE_ID:
        return node->value.id.tok;
    default:
        return NULL;
    }
}

// Assembly:
movl (%rdi), %eax
cmpl $0xc, %eax
je 0x351c
movl $0x10, %ecx
cmpl $0xd, %eax
je 0x3521
jmp 0x3527
movl $0x8, %ecx
movq (%rdi,%rcx), %rdi
jmp 0x3509
cmpl $0xa, %eax
jne 0x3531
movq 0x8(%rdi), %rax
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/yutopp[P]cc/ir.c
// Function: ir_function_set_local
void ir_function_set_local(IRFunction* f, IRSymbolID id, size_t size) {
    while(vector_len(f->locals) <= id) {
        void* e = vector_append(f->locals);
        assert(e);
    }

    size_t* s = vector_at(f->locals, id);
    *s = size;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x28(%r15), %rdi
callq 0x2f0b
movq 0x28(%r15), %rdi
cmpq %r14, %rax
ja 0x3599
callq 0x2eb0
testq %rax, %rax
jne 0x355e
leaq 0x3acf(%rip), %rdi      # 0x7050
leaq 0x3f48(%rip), %rsi      # 0x74d0
leaq 0x3f46(%rip), %rcx      # 0x74d5
movl $0x2b, %edx
callq 0x10d0
movq %r14, %rsi
callq 0x2ef6
movq %rbx, (%rax)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/yutopp[P]cc/ir.c
// Function: ir_module_new
IRModule* ir_module_new() {
    IRModule* m = (IRModule*)malloc(sizeof(IRModule));
    m->definitions = vector_new(sizeof(IRInst));
    m->functions = vector_new(sizeof(IRFunction));
    m->defs_sym_id = 0;

    return m;
}

// Assembly:
pushq %rbx
movl $0x18, %edi
callq 0x1160
movq %rax, %rbx
movl $0x30, %edi
callq 0x2d9c
movq %rax, (%rbx)
movl $0x38, %edi
callq 0x2d9c
movq %rax, 0x8(%rbx)
movq $0x0, 0x10(%rbx)
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/yutopp[P]cc/ir.c
// Function: ir_module_drop
void ir_module_drop(IRModule *m) {
    for(size_t i=0; i<vector_len(m->definitions); ++i) {
        IRInst* inst = vector_at(m->definitions, i);
        ir_inst_destruct(inst);
    }
    vector_drop(m->definitions);

    for(size_t i=0; i<vector_len(m->functions); ++i) {
        IRFunction* f = vector_at(m->functions, i);
        ir_function_destruct(f);
    }
    vector_drop(m->functions);

    free(m);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x2f0b
testq %rax, %rax
je 0x362a
xorl %r14d, %r14d
movq (%rbx), %rdi
movq %r14, %rsi
callq 0x2ef6
movq %rax, %rdi
callq 0x5d62
incq %r14
movq (%rbx), %rdi
callq 0x2f0b
cmpq %rax, %r14
jb 0x3607
movq (%rbx), %rdi
callq 0x2e8f
movq 0x8(%rbx), %rdi
callq 0x2f0b
testq %rax, %rax
je 0x367d
xorl %r14d, %r14d
movq 0x8(%rbx), %rdi
movq %r14, %rsi
callq 0x2ef6
movq %rax, %r15
movq (%rax), %rdi
callq 0x1040
movq 0x10(%r15), %rdi
callq 0x5d39
movq 0x28(%r15), %rdi
callq 0x2e8f
incq %r14
movq 0x8(%rbx), %rdi
callq 0x2f0b
cmpq %rax, %r14
jb 0x3643
movq 0x8(%rbx), %rdi
callq 0x2e8f
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x1040
// File: /workspace/github_c_makefile_star2_O3/yutopp[P]cc/ir.c
// Function: ir_module_fprint
void ir_module_fprint(FILE* fp, IRModule* m) {
    for(size_t i=0; i<vector_len(m->definitions); ++i) {
        IRInst* inst = vector_at(m->definitions, i);
        ir_inst_fprint(fp, inst);
    }

    for(size_t i=0; i<vector_len(m->functions); ++i) {
        IRFunction* f = vector_at(m->functions, i);
        ir_function_fprint(fp, f);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq (%rsi), %rdi
callq 0x2f0b
testq %rax, %rax
je 0x387d
xorl %r15d, %r15d
movq (%rbx), %rdi
movq %r15, %rsi
callq 0x2ef6
movq %r14, %rdi
movq %rax, %rsi
callq 0x38ea
incq %r15
movq (%rbx), %rdi
callq 0x2f0b
cmpq %rax, %r15
jb 0x3857
movq 0x8(%rbx), %rdi
callq 0x2f0b
testq %rax, %rax
je 0x38db
leaq 0x3c80(%rip), %r15      # 0x7512
leaq 0x2ae(%rip), %r12       # 0x3b47
xorl %r13d, %r13d
movq 0x8(%rbx), %rdi
movq %r13, %rsi
callq 0x2ef6
movq %rax, %rbp
movq (%rax), %rdx
movq %r14, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x1120
movq 0x18(%rbp), %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x5c1b
incq %r13
movq 0x8(%rbx), %rdi
callq 0x2f0b
cmpq %rax, %r13
jb 0x389c
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/yutopp[P]cc/ir.c
// Function: ir_bb_fprint
void ir_bb_fprint(FILE* fp, IRBB* bb) {
    fprint_indent(fp, 1); fprintf(fp, "%ld:\n", bb->id);

    for(size_t i=0; i<vector_len(bb->insts); ++i) {
        IRInst* inst = vector_at(bb->insts, i);
        fprint_indent(fp, 2); ir_inst_fprint(fp, inst);
    }

    if (bb->term != NULL) {
        fprint_indent(fp, 2); ir_inst_fprint(fp, bb->term);
    } else {
        fprint_indent(fp, 2); fprintf(fp, "NOT TERMINATED\n");
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movl $0x2, %ebp
movl $0x20, %edi
movq %rbx, %rsi
callq 0x10f0
decl %ebp
jne 0x3b68
movq (%r14), %rdx
leaq 0x3994(%rip), %rsi      # 0x7517
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1120
movq 0x10(%r14), %rdi
callq 0x2f0b
testq %rax, %rax
je 0x3bdf
xorl %r15d, %r15d
movq 0x10(%r14), %rdi
movq %r15, %rsi
callq 0x2ef6
movq %rax, %r12
movl $0x4, %ebp
movl $0x20, %edi
movq %rbx, %rsi
callq 0x10f0
decl %ebp
jne 0x3bb2
movq %rbx, %rdi
movq %r12, %rsi
callq 0x38ea
incq %r15
movq 0x10(%r14), %rdi
callq 0x2f0b
cmpq %rax, %r15
jb 0x3b9e
cmpq $0x0, 0x18(%r14)
je 0x3c10
movl $0x4, %ebp
movl $0x20, %edi
movq %rbx, %rsi
callq 0x10f0
decl %ebp
jne 0x3beb
movq 0x18(%r14), %rsi
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x38ea
movl $0x4, %ebp
movl $0x20, %edi
movq %rbx, %rsi
callq 0x10f0
decl %ebp
jne 0x3c15
leaq 0x38f0(%rip), %rdi      # 0x751d
movl $0xf, %esi
movl $0x1, %edx
movq %rbx, %rcx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x11c0
// File: /workspace/github_c_makefile_star2_O3/yutopp[P]cc/analyzer.c
// Function: env_new
Env* env_new(Token* name_tok, Env* parent) {
    Env* e = (Env*)malloc(sizeof(Env));
    e->parent = parent;
    e->name_tok = name_tok;
    e->name = e->name_tok ? token_to_string(e->name_tok) : NULL;
    e->children = string_map_new(sizeof(Env*), env_elem_dtor);

    return e;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %r14
movl $0x28, %edi
callq 0x1160
movq %rax, %rbx
movq %r15, (%rax)
movq %r14, 0x8(%rax)
testq %r14, %r14
je 0x4312
movq %r14, %rdi
callq 0x1b54
jmp 0x4314
xorl %eax, %eax
movq %rax, 0x10(%rbx)
leaq 0x17(%rip), %rsi        # 0x4336
movl $0x8, %edi
callq 0x5ebe
movq %rax, 0x20(%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/yutopp[P]cc/analyzer.c
// Function: env_drop
void env_drop(Env* env) {
    if (env->name) {
        free((char*)env->name);
    }
    string_map_drop(env->children);
    free(env);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0x4350
callq 0x1040
movq 0x20(%rbx), %rdi
callq 0x5ef4
movq %rbx, %rdi
popq %rbx
jmp 0x1040
// File: /workspace/github_c_makefile_star2_O3/yutopp[P]cc/analyzer.c
// Function: env_insert
Env* env_insert(Env* env, Env* child) {
    int found;
    assert(child->name);

    Env** e = string_map_insert(env->children, child->name, &found);
    assert(found == 0);
    *e = child;

    return *e;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq 0x10(%rsi), %rsi
testq %rsi, %rsi
je 0x4397
movq 0x20(%rdi), %rdi
leaq 0x4(%rsp), %r14
movq %r14, %rdx
callq 0x5ef9
cmpl $0x0, (%r14)
jne 0x43b6
movq %rbx, (%rax)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x3462(%rip), %rdi      # 0x7800
leaq 0x3467(%rip), %rsi      # 0x780c
leaq 0x346b(%rip), %rcx      # 0x7817
movl $0x36, %edx
callq 0x10d0
leaq 0x3478(%rip), %rdi      # 0x7835
leaq 0x3448(%rip), %rsi      # 0x780c
leaq 0x344c(%rip), %rcx      # 0x7817
movl $0x39, %edx
callq 0x10d0
// File: /workspace/github_c_makefile_star2_O3/yutopp[P]cc/analyzer.c
// Function: env_lookup
Env* env_lookup(Env* env, Token* name_tok) {
    char const* name = token_to_string(name_tok);
    Env* found_env = string_map_find(env->children, name);
    free((char*)name);

    if (found_env) {
        return found_env;
    }

    if (env->parent == NULL) {
        return NULL;
    }

    return env_lookup(env->parent, name_tok);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq %rbx, %rdi
callq 0x1b54
movq %rax, %r12
movq 0x20(%r14), %rdi
movq %rax, %rsi
callq 0x5f4c
movq %rax, %r15
movq %r12, %rdi
callq 0x1040
testq %r15, %r15
jne 0x4412
movq (%r14), %r14
testq %r14, %r14
jne 0x43e3
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/yutopp[P]cc/asm_x86_64.c
// Function: asm_x86_64_drop
void asm_x86_64_drop(ASM_X86_64 *a) {
    for(size_t i=0; i<vector_len(a->insts); ++i) {
        ASM_X86_64_Inst* inst = vector_at(a->insts, i);
        asm_x86_64_inst_destruct(inst);
    }
    vector_drop(a->insts);

    vector_drop(a->values);
    vector_drop(a->global_values);
    vector_drop(a->offsets);
    uint_map_drop(a->labels);

    free(a);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x2f0b
testq %rax, %rax
je 0x4dd7
xorl %r14d, %r14d
movq (%rbx), %rdi
movq %r14, %rsi
callq 0x2ef6
cmpl $0x5, (%rax)
jne 0x4dc7
cmpl $0x0, 0x10(%rax)
je 0x4dc7
movq 0x8(%rax), %rdi
callq 0x1040
incq %r14
movq (%rbx), %rdi
callq 0x2f0b
cmpq %rax, %r14
jb 0x4da8
movq (%rbx), %rdi
callq 0x2e8f
movq 0x8(%rbx), %rdi
callq 0x2e8f
movq 0x10(%rbx), %rdi
callq 0x2e8f
movq 0x18(%rbx), %rdi
callq 0x2e8f
movq 0x30(%rbx), %rdi
callq 0x5daa
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1040
// File: /workspace/github_c_makefile_star2_O3/yutopp[P]cc/asm_x86_64.c
// Function: fprint_inst_op
void fprint_inst_op(FILE* fp, char const* op, int num, ...) {
    va_list ap;

    fprintf(fp, "%s", op);

    va_start(ap, num);
    for(int i=0; i<num; ++i) {
        if (i == 0) {
            fprintf(fp, "\t");
        } else {
            fprintf(fp, ", ");
        }
        ASM_X86_64_Value* arg = va_arg(ap, ASM_X86_64_Value*);
        fprint_value(fp, arg);
    }
    va_end(ap);

    fprintf(fp, "\n");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xd8, %rsp
movl %edx, %ebp
movq %rdi, %rbx
leaq 0x20(%rsp), %r14
movq %rcx, 0x18(%r14)
movq %r8, 0x20(%r14)
movq %r9, 0x28(%r14)
testb %al, %al
je 0x50f0
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rsi, %rdi
movq %rbx, %rsi
callq 0x10e0
movabsq $0x3000000018, %rax     # imm = 0x3000000018
movq %rax, (%rsp)
leaq 0x100(%rsp), %rax
movq %rax, 0x8(%rsp)
movq %r14, 0x10(%rsp)
testl %ebp, %ebp
jle 0x518c
xorl %r15d, %r15d
leaq 0x2480(%rip), %r14      # 0x75a9
testl %r15d, %r15d
je 0x5145
movl $0x2, %esi
movl $0x1, %edx
movq %r14, %rdi
movq %rbx, %rcx
callq 0x11c0
jmp 0x5152
movl $0x9, %edi
movq %rbx, %rsi
callq 0x10f0
movl (%rsp), %ecx
cmpq $0x28, %rcx
ja 0x516b
movq %rcx, %rax
addq 0x10(%rsp), %rax
addl $0x8, %ecx
movl %ecx, (%rsp)
jmp 0x5179
movq 0x8(%rsp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq (%rax), %rsi
movq %rbx, %rdi
callq 0x51a7
incl %r15d
cmpl %r15d, %ebp
jne 0x5129
movl $0xa, %edi
movq %rbx, %rsi
callq 0x10f0
addq $0xd8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/yutopp[P]cc/asm_x86_64.c
// Function: fprint_value
void fprint_value(FILE* fp, ASM_X86_64_Value* v) {
    switch(v->kind) {
    case ASM_X86_64_VALUE_KIND_SYMBOL:
        fprintf(fp, "%s", v->value.symbol);
        break;

    case ASM_X86_64_VALUE_KIND_IMM_INT:
        fprintf(fp, "$%d", v->value.imm_int);
        break;

    case ASM_X86_64_VALUE_KIND_STRING:
        fprintf(fp, "%s(%%rip)", v->value.string.label);
        break;

    case ASM_X86_64_VALUE_KIND_REG:
        fprint_reg(fp, v->value.reg);
        break;

    case ASM_X86_64_VALUE_KIND_DISP_REG:
        if (v->value.disp_reg.symbol) {
            fprintf(fp, "%s", v->value.disp_reg.symbol);
        } else {
            fprintf(fp, "%d", v->value.disp_reg.disp);
        }
        fprintf(fp, "(");
        fprint_reg(fp, v->value.disp_reg.reg);
        fprintf(fp, ")");
        break;

    default:
        fprintf(stderr, "Unknown kind: %d", v->kind);
        assert(0); // TODO: error handling...
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl (%rsi), %edi
cmpq $0x4, %rdi
ja 0x527d
movq %rsi, %r14
leaq 0x27f8(%rip), %rax      # 0x79bc
movslq (%rax,%rdi,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq 0x8(%r14), %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x10e0
movq 0x8(%r14), %rdi
testq %rdi, %rdi
je 0x523b
movq %rbx, %rsi
callq 0x10e0
jmp 0x5250
movq 0x8(%r14), %rdx
leaq 0x28fb(%rip), %rsi      # 0x7af9
movq %rbx, %rdi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1120
movl 0x8(%r14), %esi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x5282
movl 0x8(%r14), %edx
leaq 0x28cb(%rip), %rsi      # 0x7af5
movq %rbx, %rdi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1120
movl 0x10(%r14), %edx
leaq 0x270f(%rip), %rsi      # 0x7955
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1120
movl $0x28, %edi
movq %rbx, %rsi
callq 0x10f0
movl 0x14(%r14), %esi
movq %rbx, %rdi
callq 0x5282
movl $0x29, %edi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x10f0
callq 0x13c3
// File: /workspace/github_c_makefile_star2_O3/yutopp[P]cc/asm_x86_64.c
// Function: asm_x86_64_set_val
static void asm_x86_64_set_val(ASM_X86_64 *a, IRSymbolID id, ASM_X86_64_Value value, int is_global) {
    Vector* mem = a->values;
    if (is_global) {
        mem = a->global_values;
    }

    while(vector_len(mem) <= id) {
        void* e = vector_append(mem);
        assert(e);
    }

    ASM_X86_64_Var* var = vector_at(mem, id);
    var->kind = ASM_X86_64_VAR_VAL;
    var->value.val = value;

    fprintf(DEBUGOUT, "SET = %ld <- ", id);
    fprint_value(DEBUGOUT, &var->value.val);
    fprintf(DEBUGOUT, "\n");
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
leaq 0x20(%rsp), %r15
xorl %eax, %eax
testl %edx, %edx
setne %al
movq 0x8(%rdi,%rax,8), %r14
movq %r14, %rdi
callq 0x2f0b
cmpq %rbx, %rax
ja 0x52ff
movq %r14, %rdi
callq 0x2eb0
testq %rax, %rax
jne 0x52c6
leaq 0x1d69(%rip), %rdi      # 0x7050
leaq 0x27cd(%rip), %rsi      # 0x7abb
leaq 0x2928(%rip), %rcx      # 0x7c1d
movl $0xc6, %edx
callq 0x10d0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2ef6
movl $0x1, (%rax)
leaq 0x8(%rax), %r14
movups (%r15), %xmm0
movups %xmm0, 0x8(%rax)
movq 0x10(%r15), %rcx
movq %rcx, 0x18(%rax)
movq 0x5cad(%rip), %r15      # 0xafd8
movq (%r15), %rdi
leaq 0x2931(%rip), %rsi      # 0x7c66
movq %rbx, %rdx
xorl %eax, %eax
callq 0x1120
movq (%r15), %rdi
movq %r14, %rsi
callq 0x51a7
movq (%r15), %rsi
movl $0xa, %edi
popq %rbx
popq %r14
popq %r15
jmp 0x10f0
// File: /workspace/github_c_makefile_star2_O3/yutopp[P]cc/asm_x86_64.c
// Function: asm_x86_64_get_val
static ASM_X86_64_Value* asm_x86_64_get_val(ASM_X86_64 *a, IRSymbolID id, int is_global) {
    Vector* mem = a->values;
    if (is_global) {
        mem = a->global_values;
    }

    fprintf(DEBUGOUT, "GET = %ld\n", id);
    assert(id <= vector_len(mem));
    ASM_X86_64_Var* var = vector_at(mem, id);
    if (var->kind == ASM_X86_64_VAR_VAL) {
        return &var->value.val;
    }

    assert(0); // TODO: implement
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
xorl %eax, %eax
testl %edx, %edx
setne %al
movq 0x8(%rdi,%rax,8), %r14
movq 0x55c5(%rip), %rax      # 0xafd8
movq (%rax), %rdi
leaq 0x23a1(%rip), %rsi      # 0x7dbe
movq %rbx, %rdx
xorl %eax, %eax
callq 0x1120
movq %r14, %rdi
callq 0x2f0b
cmpq %rbx, %rax
jb 0x5a50
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2ef6
cmpl $0x1, (%rax)
jne 0x5a6f
addq $0x8, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x2372(%rip), %rdi      # 0x7dc9
leaq 0x205d(%rip), %rsi      # 0x7abb
leaq 0x237a(%rip), %rcx      # 0x7ddf
movl $0xd9, %edx
callq 0x10d0
leaq 0x1dc8(%rip), %rdi      # 0x783e
leaq 0x203e(%rip), %rsi      # 0x7abb
leaq 0x235b(%rip), %rcx      # 0x7ddf
movl $0xdf, %edx
callq 0x10d0
// File: /workspace/github_c_makefile_star2_O3/yutopp[P]cc/asm_x86_64.c
// Function: asm_x86_64_get_local
static size_t asm_x86_64_get_local(ASM_X86_64 *a, IRSymbolID id) {
    fprintf(DEBUGOUT, "GET LOCAL = %ld\n", id);
    assert(id <= vector_len(a->offsets));

    size_t* o = vector_at(a->offsets, id);
    return *o;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x5539(%rip), %rax      # 0xafd8
movq (%rax), %rdi
leaq 0x237a(%rip), %rsi      # 0x7e23
movq %rbx, %rdx
xorl %eax, %eax
callq 0x1120
movq 0x18(%r14), %rdi
callq 0x2f0b
cmpq %rbx, %rax
jb 0x5ad8
movq 0x18(%r14), %rdi
movq %rbx, %rsi
callq 0x2ef6
movq (%rax), %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x2355(%rip), %rdi      # 0x7e34
leaq 0x1fd5(%rip), %rsi      # 0x7abb
leaq 0x2364(%rip), %rcx      # 0x7e51
movl $0xef, %edx
callq 0x10d0
nop
// File: /workspace/github_c_makefile_star2_O3/yutopp[P]cc/ir_bb.c
// Function: ir_bb_construct
void ir_bb_construct(IRBB* bb, IRBBID id) {
    bb->id = id;
    bb->prevs = vector_new(sizeof(IRBB*));
    bb->insts = vector_new(sizeof(IRInst));
    bb->term = NULL;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq %rsi, (%rdi)
movl $0x8, %edi
callq 0x2d9c
movq %rax, 0x8(%rbx)
movl $0x30, %edi
callq 0x2d9c
movq %rax, 0x10(%rbx)
movq $0x0, 0x18(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/yutopp[P]cc/ir_bb.c
// Function: ir_bb_destruct
void ir_bb_destruct(IRBB* bb) {
    vector_drop(bb->prevs);

    for(size_t i=0; i<vector_len(bb->insts); ++i) {
        IRInst* inst = vector_at(bb->insts, i);
        ir_inst_destruct(inst);
    }
    vector_drop(bb->insts);

    if (bb->term) {
        ir_inst_destruct(bb->term);
        free(bb->term);
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0x2e8f
movq 0x10(%rbx), %rdi
callq 0x2f0b
testq %rax, %rax
je 0x5b6b
xorl %r14d, %r14d
movq 0x10(%rbx), %rdi
movq %r14, %rsi
callq 0x2ef6
movq %rax, %rdi
callq 0x5d62
incq %r14
movq 0x10(%rbx), %rdi
callq 0x2f0b
cmpq %rax, %r14
jb 0x5b46
movq 0x10(%rbx), %rdi
callq 0x2e8f
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x5b92
callq 0x5d62
movq 0x18(%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1040
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/yutopp[P]cc/ir_bb.c
// Function: ir_bb_foreach_nexts
void ir_bb_foreach_nexts(IRBB* bb, void(*f)(IRBB*, void*), void* args) {
    if (bb->term == NULL) {
        return;
    }

    switch(bb->term->kind) {
    case IR_INST_KIND_RET:
        return;

    case IR_INST_KIND_BRANCH:
    {
        f( bb->term->value.branch.then_bb, args);
        if (bb->term->value.branch.else_bb) {
            f(bb->term->value.branch.else_bb, args);
        }
        return;
    }

    case IR_INST_KIND_JUMP:
    {
        f(bb->term->value.jump.next_bb, args);
        return;
    }

    default:
        assert(0); // TODO: error handling
        return;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq 0x18(%rdi), %rax
testq %rax, %rax
je 0x5be8
movl (%rax), %ecx
cmpl $0x1, %ecx
je 0x5be8
movq %rdx, %rbx
movq %rsi, %rdx
cmpl $0x3, %ecx
je 0x5bee
cmpl $0x2, %ecx
jne 0x5bfc
movq %rdi, %r14
movq 0x10(%rax), %rdi
movq %rbx, %rsi
movq %rdx, %r15
callq *%rdx
movq 0x18(%r14), %rax
movq 0x18(%rax), %rdi
testq %rdi, %rdi
je 0x5be8
movq %r15, %rcx
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmpq *%rcx
popq %rbx
popq %r14
popq %r15
retq
movq 0x8(%rax), %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmpq *%rdx
leaq 0x1c3b(%rip), %rdi      # 0x783e
leaq 0x2296(%rip), %rsi      # 0x7ea0
leaq 0x2297(%rip), %rcx      # 0x7ea8
movl $0x36, %edx
callq 0x10d0
// File: /workspace/github_c_makefile_star2_O3/yutopp[P]cc/ir_bb.c
// Function: ir_bb_visit
void ir_bb_visit(IRBB* initial_bb, void(*f)(IRBB* bb, void*), void* args) {
    struct ir_bb_visit_iter_arg_t state = {
        .visited = uint_map_new(1, NULL),
        .bbs = vector_new(sizeof(IRBB*)), // Vector<IRBB*>
        .head = 0,
    };

    IRBB** bb = vector_append(state.bbs);
    *bb = initial_bb;

    while(state.head < vector_len(state.bbs)) {
        bb = vector_at(state.bbs, state.head);
        state.head++;

        f(*bb, args);

        ir_bb_foreach_nexts(*bb, ir_bb_visit_iter, &state);
    }

    vector_drop(state.bbs);
    uint_map_drop(state.visited);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r12
movl $0x1, %edi
xorl %esi, %esi
callq 0x5d74
movq %rax, 0x8(%rsp)
movl $0x8, %edi
callq 0x2d9c
movq %rax, %r15
movq %rax, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
movq %rax, %rdi
callq 0x2eb0
movq %r12, (%rax)
movq %r15, %rdi
callq 0x2f0b
testq %rax, %rax
je 0x5cc9
leaq 0x6d(%rip), %r15        # 0x5ce9
leaq 0x8(%rsp), %r12
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x2ef6
movq %rax, %r13
incq 0x18(%rsp)
movq (%rax), %rdi
movq %rbx, %rsi
callq *%r14
movq (%r13), %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x5b9a
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %r13
callq 0x2f0b
cmpq %rax, %r13
jb 0x5c81
movq 0x10(%rsp), %r15
movq %r15, %rdi
callq 0x2e8f
movq 0x8(%rsp), %rdi
callq 0x5daa
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/yutopp[P]cc/ir_bb.c
// Function: ir_bb_visit_iter
static void ir_bb_visit_iter(IRBB* next, void* args) {
    struct ir_bb_visit_iter_arg_t* state = (struct ir_bb_visit_iter_arg_t*)args;

    int exist;
    uint_map_insert(state->visited, next->id, &exist);
    if (exist == 0) {
        IRBB** t = vector_append(state->bbs);
        *t = next;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rdi
movq (%rbx), %rsi
leaq 0xc(%rsp), %r15
movq %r15, %rdx
callq 0x5e13
cmpl $0x0, (%r15)
jne 0x5d1d
movq 0x8(%r14), %rdi
callq 0x2eb0
movq %rbx, (%rax)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O3/yutopp[P]cc/map.c
// Function: map_drop
static void map_drop(UintMap* m) {
    for(size_t i=0; i<vector_len(m->elems); ++i) {
        Elem* elem = vector_at(m->elems, i);
        if (m->dtor) {
            m->dtor((void*)elem->buffer);
        }
        free(elem->buffer);
    }
    vector_drop(m->elems);

    free(m);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0x2f0b
testq %rax, %rax
je 0x5dfd
xorl %r14d, %r14d
movq 0x8(%rbx), %rdi
movq %r14, %rsi
callq 0x2ef6
movq %rax, %r15
movq 0x10(%rbx), %rax
testq %rax, %rax
je 0x5de3
movq 0x8(%r15), %rdi
callq *%rax
movq 0x8(%r15), %rdi
callq 0x1040
incq %r14
movq 0x8(%rbx), %rdi
callq 0x2f0b
cmpq %rax, %r14
jb 0x5dc5
movq 0x8(%rbx), %rdi
callq 0x2e8f
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x1040
// File: /workspace/github_c_makefile_star2_O3/yutopp[P]cc/map.c
// Function: uint_map_insert
void* uint_map_insert(UintMap* m, size_t key, int* exist) {
    // TODO: improve performance
    void* content = uint_map_find(m, key);
    if (content) {
        if (exist) { *exist = 1; };
        return content;
    }

    if (exist) { *exist = 0; };
    Elem* elem = (Elem*)vector_append(m->elems);
    elem->key.num = key;
    elem->buffer = (char*)malloc(m->elem_size); // TODO: consider alignment

    return (void*)elem->buffer;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
callq 0x5e66
testq %rax, %rax
je 0x5e39
testq %r15, %r15
je 0x5e60
movl $0x1, (%r15)
jmp 0x5e60
testq %r15, %r15
je 0x5e45
movl $0x0, (%r15)
movq 0x8(%rbx), %rdi
callq 0x2eb0
movq %rax, %r15
movq %r14, (%rax)
movq (%rbx), %rdi
callq 0x1160
movq %rax, 0x8(%r15)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/yutopp[P]cc/map.c
// Function: string_map_insert
void* string_map_insert(StringMap* m, char const* key, int* exist) {
    // TODO: improve performance
    void* content = string_map_find(m, key);
    if (content) {
        if (exist) { *exist = 1; };
        return content;
    }

    if (exist) { *exist = 0; };
    Elem* elem = (Elem*)vector_append(m->elems);
    elem->key.name = key;
    elem->buffer = (char*)malloc(m->elem_size); // TODO: consider alignment

    return (void*)elem->buffer;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
callq 0x5f4c
testq %rax, %rax
je 0x5f1f
testq %r15, %r15
je 0x5f46
movl $0x1, (%r15)
jmp 0x5f46
testq %r15, %r15
je 0x5f2b
movl $0x0, (%r15)
movq 0x8(%rbx), %rdi
callq 0x2eb0
movq %rax, %r15
movq %r14, (%rax)
movq (%rbx), %rdi
callq 0x1160
movq %rax, 0x8(%r15)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/yutopp[P]cc/cc.c
// Function: cc_new
CC* cc_new(char const* buffer, char const* fpath) {
    CC* cc = malloc(sizeof(CC));
    cc->buffer = buffer;
    cc->fpath = fpath;
    cc->tokens = NULL;
    cc->nodes = NULL;
    cc->parser = NULL;
    cc->types = NULL;
    cc->analyzer = NULL;
    cc->ir_builder = NULL;
    cc->ir_mod = NULL;
    cc->state = CC_STATE_INIT;

    return cc;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl $0x50, %edi
callq 0x1160
movq %r14, (%rax)
movq %rbx, 0x8(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x30(%rax)
movups %xmm0, 0x3c(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/yutopp[P]cc/cc.c
// Function: cc_drop
void cc_drop(CC* cc) {
    if (cc->ir_mod) {
        ir_module_drop(cc->ir_mod);
    }
    if (cc->ir_builder) {
        ir_builder_drop(cc->ir_builder);
    }

    if (cc->analyzer) {
        analyzer_drop(cc->analyzer);

        assert(cc->types);
        type_arena_drop(cc->types);
    }

    if (cc->parser) {
        parser_drop(cc->parser);

        assert(cc->nodes);
        node_arena_drop(cc->nodes);
    }

    if (cc->tokens) {
        vector_drop(cc->tokens);
    }

    free(cc);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x40(%rdi), %rdi
testq %rdi, %rdi
je 0x6018
callq 0x35ef
movq 0x38(%rbx), %rdi
testq %rdi, %rdi
je 0x6026
callq 0x36a2
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
je 0x6042
callq 0x4434
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x6075
callq 0x5fc5
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x605e
callq 0x1cff
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x6094
callq 0x3545
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x606c
callq 0x2e8f
movq %rbx, %rdi
popq %rbx
jmp 0x1040
leaq 0x1e6f(%rip), %rdi      # 0x7eeb
leaq 0x1e72(%rip), %rsi      # 0x7ef5
leaq 0x1e70(%rip), %rcx      # 0x7efa
movl $0x37, %edx
callq 0x10d0
leaq 0x1e72(%rip), %rdi      # 0x7f0d
leaq 0x1e53(%rip), %rsi      # 0x7ef5
leaq 0x1e51(%rip), %rcx      # 0x7efa
movl $0x3e, %edx
callq 0x10d0
// File: /workspace/github_c_makefile_star2_O3/yutopp[P]cc/cc.c
// Function: cc_parse
ParserResult cc_parse(CC* cc) {
    cc_lex(cc); // TODO: pass lexer to parser

    cc->nodes = node_arena_new();
    cc->parser = parser_new(cc->tokens, cc->nodes);

    return parser_parse(cc->parser);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movl $0x20, %edi
callq 0x2d9c
movq %rax, 0x10(%r14)
movq (%r14), %rdi
movq 0x8(%r14), %rsi
callq 0x17a0
movq %rax, %r15
movq %rsp, %r12
movq 0x4eeb(%rip), %r13      # 0xafd8
movq %r12, %rdi
movq %r15, %rsi
callq 0x17d8
movq (%r13), %rdi
movq %r12, %rsi
callq 0x1b9c
movl $0xa, %edi
callq 0x1050
movq 0x10(%r14), %rdi
callq 0x2eb0
testq %rax, %rax
je 0x6173
movups (%rsp), %xmm0
movups 0x10(%rsp), %xmm1
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
cmpl $0x1f, (%rsp)
jne 0x60ed
movq %r15, %rdi
callq 0x17d3
xorl %eax, %eax
callq 0x3534
movq %rax, 0x18(%r14)
movq 0x10(%r14), %rdi
movq %rax, %rsi
callq 0x1cbc
movq %rax, 0x20(%r14)
movq %rbx, %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0x1d1b
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x1e0e(%rip), %rdi      # 0x7f88
leaq 0x1d74(%rip), %rsi      # 0x7ef5
leaq 0x1e05(%rip), %rcx      # 0x7f8d
movl $0x53, %edx
callq 0x10d0
// File: /workspace/github_c_makefile_star2_O3/ijleesw[P]data-compression/src/tunstall/tunstall.hpp
// Function: Tunstall::decompress(unsigned char*, int, unsigned char*, int)
void Tunstall::decompress(unsigned char *data, int input_size, unsigned char *output, int output_size) {
	unsigned char *end_output = output + output_size;
	unsigned char *end_data = data + input_size -1;
	if(probabilities.size() == 1) {
		memset(output, probabilities[0].symbol, output_size);
		return;
	}
	//index.push_back(index.back() + lengths.back()); //TODO WHY?
	while(data < end_data) {
		int symbol = *data++;
		int start = index[symbol];
		int length = lengths[symbol];
		//int length = index[symbol+1] - start;
		memcpy(output, &table[start], length);
		output += length;
	}
	//last symbol might override so we check.
	int symbol = *data;
	int start = index[symbol];
	int length = (*end_output - *output);
	//cout << (end_output - output) << endl;
	//cout << (*end_output - *output) << endl;
	memcpy(output, &table[start], length);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r12
movslq %r8d, %r8
movq 0x10(%rdi), %rax
movq 0x18(%rdi), %rsi
subq %rax, %rsi
cmpq $0x2, %rsi
jne 0x3571
movzbl (%rax), %esi
movq %rcx, %rdi
movq %r8, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x20c0
movq %rdi, %rbx
movslq %edx, %r15
leaq (%r12,%r15), %rax
decq %rax
cmpq %r12, %rax
jbe 0x35dc
movq %rax, (%rsp)
movq %r8, 0x8(%rsp)
decq %r15
xorl %r14d, %r14d
movq %rcx, 0x10(%rsp)
movq %rcx, %r13
movzbl (%r12,%r14), %eax
shll $0x2, %eax
movq 0x28(%rbx), %rcx
movq 0x40(%rbx), %rdx
movslq (%rcx,%rax), %rsi
movslq (%rdx,%rax), %rbp
addq 0x58(%rbx), %rsi
movq %r13, %rdi
movq %rbp, %rdx
callq 0x2120
addq %rbp, %r13
incq %r14
cmpq %r14, %r15
jne 0x359a
movq (%rsp), %r12
movq 0x10(%rsp), %rcx
movq 0x8(%rsp), %r8
jmp 0x35df
movq %rcx, %r13
movzbl (%r12), %eax
movq 0x28(%rbx), %rdx
movslq (%rdx,%rax,4), %rsi
movzbl (%rcx,%r8), %edx
movzbl (%r13), %eax
addq 0x58(%rbx), %rsi
subq %rax, %rdx
movq %r13, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2120
nop
// File: /workspace/github_c_makefile_star2_O3/ijleesw[P]data-compression/src/tunstall/readfile.hpp
// Function: readint2buf(char const*, unsigned char*&, unsigned int*)
int readint2buf(const char* path, unsigned char*& buf, unsigned int* length)
{
	int tmp;
	unsigned int cnt = 0;
	ifstream inFile;

	inFile.open(path);
	if (!inFile.is_open()) return 0;

	*length = 0;
	while (inFile >> tmp) (*length) = (*length)+1;
	inFile.seekg(0, ios::beg);

	buf = new unsigned char[(*length)+1];
	while (inFile >> tmp) buf[cnt++] = tmp;
	buf[cnt] = '\0';

	return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x210, %rsp            # imm = 0x210
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x2190
movq %r12, %rdi
movq %r15, %rsi
movl $0x8, %edx
callq 0x20e0
leaq 0x80(%rsp), %rdi
callq 0x2040
xorl %ebp, %ebp
testb %al, %al
je 0x3887
xorl %eax, %eax
leaq 0x8(%rsp), %r15
leaq 0x4(%rsp), %r12
movl %eax, (%r14)
movq %r15, %rdi
movq %r12, %rsi
callq 0x20d0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x382b
movl (%r14), %eax
incl %eax
jmp 0x3808
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x21e0
movl (%r14), %edi
incl %edi
callq 0x2030
movq %rax, (%rbx)
xorl %ebp, %ebp
leaq 0x8(%rsp), %r14
leaq 0x4(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x20d0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
movl %ebp, %eax
jne 0x387b
movb 0x4(%rsp), %cl
movq (%rbx), %rdx
incl %ebp
movb %cl, (%rdx,%rax)
jmp 0x3852
movq (%rbx), %rcx
movb $0x0, (%rcx,%rax)
movl $0x1, %ebp
leaq 0x8(%rsp), %rdi
callq 0x2050
movl %ebp, %eax
addq $0x210, %rsp            # imm = 0x210
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x38a7
jmp 0x38a7
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x2050
movq %rbx, %rdi
callq 0x2280
// File: /workspace/github_c_makefile_star2_O3/CSerxzm[P]WindowstoLinuxInterface/src/COPY.c
// Function: main
int main(int argc, char** argv){
    char lines[argc+1][255];
    predealLine(argc, argv, lines);
    char* srcname = lines[1];
    char* dstname = lines[2];
    char option[5];
    FILE *src, *dst;
	
	if(access(srcname, F_OK)==-1) {
		printf("源文件不存在\n");
		return 0;
    }
    if(!access(dstname, F_OK)) {
        while(1) {
            printf("覆盖 %s 吗?(Yes/No/All):", dstname);
            scanf("%s", option);
            if(strcmp("No", option) == 0) {
                printf("已复制 0 个文件\n");
                return 0;
            } 
            else if(strcmp("Yes", option) == 0) {
                break;
            }
        }
    }
    src = fopen(srcname, "rb");
    dst = fopen(dstname, "wb");
    int bufferLen = 1024;
    int readCount = 0;
    char *buffer = (char*)malloc(bufferLen);
    while((readCount=fread(buffer, 1, bufferLen, src)) > 0) {
        fwrite(buffer, readCount, 1, dst);
    }
    printf("已复制 1 个文件\n");
    free(buffer);
    fclose(src);
    fclose(dst);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leal 0x1(%rdi), %eax
movq %rax, %rcx
shlq $0x8, %rcx
subq %rax, %rcx
addq $0xf, %rcx
movabsq $0x1fffffffff0, %r14    # imm = 0x1FFFFFFFFF0
andq %rcx, %r14
movq %rsp, %r15
movq %r15, %rbx
subq %r14, %rbx
movq %rbx, %rsp
movq %rbx, %rdx
callq 0x11fc
negq %r14
addq %r15, %r14
addq $0xff, %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x10a0
cmpl $-0x1, %eax
je 0x1454
addq $0x1fe, %rbx            # imm = 0x1FE
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10a0
testl %eax, %eax
jne 0x13bd
leaq 0xc8b(%rip), %r15       # 0x2004
leaq 0xca0(%rip), %r12       # 0x2020
leaq -0x2d(%rbp), %r13
movq %r15, %rdi
movq %rbx, %rsi
xorl %eax, %eax
callq 0x1080
movq %r12, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x10c0
movzwl -0x2d(%rbp), %eax
xorl $0x6f4e, %eax           # imm = 0x6F4E
movzbl -0x2b(%rbp), %ecx
orw %ax, %cx
je 0x145d
cmpl $0x736559, -0x2d(%rbp)  # imm = 0x736559
jne 0x1384
leaq 0xc66(%rip), %rsi       # 0x202a
movq %r14, %rdi
callq 0x10b0
movq %rax, %r14
leaq 0xc57(%rip), %rsi       # 0x202d
movq %rbx, %rdi
callq 0x10b0
movq %rax, %rbx
movl $0x400, %edi            # imm = 0x400
callq 0x1090
movq %rax, %r15
movl $0x1, %esi
movl $0x400, %edx            # imm = 0x400
movq %rax, %rdi
movq %r14, %rcx
callq 0x1050
testl %eax, %eax
jle 0x142e
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl $0x1, %edx
movq %r15, %rdi
movq %rax, %rsi
movq %rbx, %rcx
callq 0x10d0
movl $0x1, %esi
movl $0x400, %edx            # imm = 0x400
movq %r15, %rdi
jmp 0x13fb
leaq 0xc11(%rip), %rdi       # 0x2046
callq 0x1040
movq %r15, %rdi
callq 0x1030
movq %r14, %rdi
callq 0x1060
movq %rbx, %rdi
callq 0x1060
jmp 0x1469
leaq 0xc01(%rip), %rdi       # 0x205c
jmp 0x1464
leaq 0xbcc(%rip), %rdi       # 0x2030
callq 0x1040
xorl %eax, %eax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/motet-a[P]libforks/tests/sigkill_parent_process.c
// Function: parent_main
static void parent_main(void) {
  libforks_ServerConn conn;
  check(libforks_start(&conn) == libforks_OK);

  pid_t serv_pid = libforks_get_server_pid(conn);
  check(write(pipe_fds[1], &serv_pid, sizeof serv_pid) == sizeof serv_pid);

  sleep(999);
}

// Assembly:
subq $0x18, %rsp
leaq 0x8(%rsp), %rdi
callq 0x18cf
testl %eax, %eax
jne 0x153e
movq 0x8(%rsp), %rdi
callq 0x2259
leaq 0x14(%rsp), %rsi
movl %eax, (%rsi)
movl 0x4c01(%rip), %edi      # 0x6120
movl $0x4, %edx
callq 0x1080
cmpq $0x4, %rax
jne 0x154f
movl $0x3e7, %edi            # imm = 0x3E7
callq 0x11e0
addq $0x18, %rsp
retq
leaq 0x1c16(%rip), %rdi      # 0x315b
movl $0x7, %esi
callq 0x14cb
leaq 0x1c2a(%rip), %rdi      # 0x3180
movl $0xa, %esi
callq 0x14cb
// File: /workspace/github_c_makefile_star2_O3/veltzer[P]xmeltdown/src/xmeltdown.c
// Function: calc_xloc
int calc_xloc(int width) {
	int xloc;
	/* give values near edges a better chance */
	xloc=rnd(DisplayWidth(dpy, screen)+MIN_WIDTH)-MIN_WIDTH;
	if ((xloc+width) > DisplayWidth(dpy, screen))
		xloc=DisplayWidth(dpy, screen)-width;
	else if (xloc < 0)
		xloc=0;
	return xloc;
}

// Assembly:
pushq %rbx
movl %edi, %ebx
callq 0x1130
movq 0x28c9(%rip), %rcx      # 0x40c0
movq 0xe8(%rcx), %rcx
movslq 0x28c3(%rip), %rdx      # 0x40c8
shlq $0x7, %rdx
movslq 0x18(%rcx,%rdx), %rcx
movq %rcx, %rsi
addq $0x1e, %rsi
cqto
idivq %rsi
leal -0x1e(%rdx), %esi
addl %ebx, %edx
addl $-0x1e, %edx
movl %ecx, %edi
subl %ebx, %edi
xorl %eax, %eax
testl %esi, %esi
cmovgl %esi, %eax
cmpl %ecx, %edx
cmovgl %edi, %eax
popq %rbx
retq