LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/masyagin1998[P]GCI/src/parser/ast.c
// Function: dump_left_unary_expr_ast_to_file_inner
static void dump_left_unary_expr_ast_to_file_inner(FILE*f, const struct LEFT_UNARY_EXPR_AST*ast, size_t spaces_num)
{
    if (ast->op != AST_LEFT_UNARY_OP_PLUS) {
        PUT_SPACES(); fprintf(f, "<left_unary_expr line=\"%zu\" pos=\"%zu\">\n", ast->line, ast->pos);
        INC_SPACES_NUM();
        PUT_SPACES(); fprintf(f, "<op>UNARY_MINUS</op>\n");
        dump_primary_expr_ast_to_file_inner(f, ast->expr, spaces_num);
        DEC_SPACES_NUM();
        PUT_SPACES(); fprintf(f, "</left_unary_expr>\n");
    } else {
        dump_primary_expr_ast_to_file_inner(f, ast->expr, spaces_num);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rbx
cmpl $0x0, (%rsi)
je 0xa477
leaq 0x568c(%rip), %r13      # 0xfa52
leaq 0x4e39(%rip), %r15      # 0xf206
movq %rbx, %rdi
movq %r13, %rsi
movl %r14d, %edx
movq %r15, %rcx
xorl %eax, %eax
callq 0x1100
movq 0x10(%r12), %rdx
movq 0x18(%r12), %rcx
leaq 0x5cbb(%rip), %rsi      # 0x100ac
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1100
movq %r14, %rbp
addq $0x2, %rbp
movq %rbx, %rdi
movq %r13, %rsi
movl %ebp, %edx
movq %r15, %rcx
xorl %eax, %eax
callq 0x1100
leaq 0x5cb9(%rip), %rdi      # 0x100d4
movl $0x15, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x1190
movq 0x8(%r12), %rsi
movq %rbx, %rdi
movq %rbp, %rdx
callq 0xa544
movq %rbx, %rdi
movq %r13, %rsi
movl %r14d, %edx
movq %r15, %rcx
xorl %eax, %eax
callq 0x1100
leaq 0x5c93(%rip), %rdi      # 0x100ea
movl $0x13, %esi
movl $0x1, %edx
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1190
movq 0x8(%r12), %rsi
movq %rbx, %rdi
movq %r14, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xa544
// File: /workspace/github_c_makefile_star2_O3/masyagin1998[P]GCI/src/parser/ast.c
// Function: primary_expr_ast_free
void primary_expr_ast_free(struct PRIMARY_EXPR_AST*ast)
{
    switch (ast->type) {
    case AST_PRIMARY_EXPR_TYPE_HAS_PROPERTY:
        has_property_expr_ast_free(ast->has_property_expr);
        break;
    case AST_PRIMARY_EXPR_TYPE_LEN:
        len_expr_ast_free(ast->len_expr);
        break;
    case AST_PRIMARY_EXPR_TYPE_FUNCTION_CALL:
        function_call_ast_free(ast->function_call);
        break;
    case AST_PRIMARY_EXPR_TYPE_VARIABLE:
        variable_ast_free(ast->var_name);
        break;
    case AST_PRIMARY_EXPR_TYPE_NUMBER:
        number_ast_free(ast->number);
        break;
    case AST_PRIMARY_EXPR_TYPE_LOGICAL_OR_EXPR:
        logical_or_expr_ast_free(ast->logical_or_expr);
        break;
    default:
        fprintf(stderr, "Invalid PRIMARY_EXPR_AST type: %d\n", ast->type);
        exit(EXIT_FAILURE);                
        break;
    }
    SAFE_FREE(ast);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x8(%rdi), %edi
cmpq $0x5, %rdi
ja 0xa504
leaq 0x54c0(%rip), %rax      # 0xf96c
movslq (%rax,%rdi,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq (%rbx), %rdi
callq 0xa595
jmp 0xa4f5
movq (%rbx), %rdi
jmp 0xa4e6
movq (%rbx), %rdi
callq 0x8983
jmp 0xa4f5
movq (%rbx), %rdi
callq 0x8877
jmp 0xa4f5
movq (%rbx), %r14
movq (%r14), %rdi
callq 0x8877
movq %r14, %rdi
callq 0x1030
jmp 0xa4f5
movq (%rbx), %rdi
callq 0x8bdc
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1030
callq 0x23ce
// File: /workspace/github_c_makefile_star2_O3/masyagin1998[P]GCI/src/parser/ast.c
// Function: dump_has_property_expr_ast_to_file_inner
static void dump_has_property_expr_ast_to_file_inner(FILE*f, const struct HAS_PROPERTY_EXPR_AST*ast, size_t spaces_num)
{
    PUT_SPACES(); fprintf(f, "<has_property_expr line=\"%zu\" pos=\"%zu\">\n", ast->line, ast->pos);
    INC_SPACES_NUM();
    dump_variable_ast_to_file_inner(f, ast->obj, spaces_num);
    dump_ident_ast_to_file_inner(f, ast->ident, spaces_num);
    DEC_SPACES_NUM();
    PUT_SPACES(); fprintf(f, "</has_property_expr>\n");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r13
movq %rdi, %rbx
leaq 0x5423(%rip), %r12      # 0xfa52
leaq 0x4bd0(%rip), %r15      # 0xf206
movq %r12, %rsi
movq %r15, %rcx
xorl %eax, %eax
callq 0x1100
movq 0x10(%r13), %rdx
movq 0x18(%r13), %rcx
leaq 0x5aac(%rip), %rsi      # 0x100fe
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1100
movq %r14, %rbp
addq $0x2, %rbp
movq (%r13), %rsi
movq %rbx, %rdi
movq %rbp, %rdx
callq 0x92e2
movq 0x8(%r13), %r13
movq %rbx, %rdi
movq %r12, %rsi
movl %ebp, %edx
movq %r15, %rcx
xorl %eax, %eax
callq 0x1100
movq 0x20(%r13), %rdx
movq 0x28(%r13), %rcx
leaq 0x5b3d(%rip), %rsi      # 0x101d4
movq %rbx, %rdi
movq %r13, %r8
xorl %eax, %eax
callq 0x1100
movq %rbx, %rdi
movq %r12, %rsi
movl %r14d, %edx
movq %r15, %rcx
xorl %eax, %eax
callq 0x1100
leaq 0x5a6a(%rip), %rdi      # 0x10128
movl $0x15, %esi
movl $0x1, %edx
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1190
// File: /workspace/github_c_makefile_star2_O3/masyagin1998[P]GCI/src/parser/ast.c
// Function: create_len_expr_ast
struct LEN_EXPR_AST*create_len_expr_ast(struct VARIABLE_AST*arr, size_t line, size_t pos)
{
    struct LEN_EXPR_AST*len;
    SAFE_MALLOC(len, 1);
    len->arr = arr;

    len->line = line;
    len->pos = pos;

    return len;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movl $0x18, %edi
callq 0x1130
testq %rax, %rax
je 0xa70c
movq %r15, (%rax)
movq %r14, 0x8(%rax)
movq %rbx, 0x10(%rax)
popq %rbx
popq %r14
popq %r15
retq
callq 0x2499
// File: /workspace/github_c_makefile_star2_O3/masyagin1998[P]GCI/src/parser/ast.c
// Function: dump_len_expr_ast_to_file_inner
static void dump_len_expr_ast_to_file_inner(FILE*f, const struct LEN_EXPR_AST*ast, size_t spaces_num)
{
    PUT_SPACES(); fprintf(f, "<len_expr line=\"%zu\" pos=\"%zu\">\n", ast->line, ast->pos);
    INC_SPACES_NUM();
    dump_variable_ast_to_file_inner(f, ast->arr, spaces_num);
    DEC_SPACES_NUM();
    PUT_SPACES(); fprintf(f, "</len_expr>\n");
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rsi, %r13
movq %rdi, %rbx
leaq 0x5324(%rip), %r12      # 0xfa52
leaq 0x4ad1(%rip), %r15      # 0xf206
movq %r12, %rsi
movq %r15, %rcx
xorl %eax, %eax
callq 0x1100
movq 0x8(%r13), %rdx
movq 0x10(%r13), %rcx
leaq 0x59ed(%rip), %rsi      # 0x1013e
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1100
movq %r14, %rdx
addq $0x2, %rdx
movq (%r13), %rsi
movq %rbx, %rdi
callq 0x92e2
movq %rbx, %rdi
movq %r12, %rsi
movl %r14d, %edx
movq %r15, %rcx
xorl %eax, %eax
callq 0x1100
leaq 0x59d7(%rip), %rdi      # 0x1015f
movl $0xc, %esi
movl $0x1, %edx
movq %rbx, %rcx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x1190
// File: /workspace/github_c_makefile_star2_O3/masyagin1998[P]GCI/src/parser/ast.c
// Function: dump_function_call_ast_to_file_inner
static void dump_function_call_ast_to_file_inner(FILE*f, const struct FUNCTION_CALL_AST*ast, size_t spaces_num)
{
    PUT_SPACES(); fprintf(f, "<function_call line=\"%zu\" pos=\"%zu\">\n", ast->line, ast->pos);
    INC_SPACES_NUM();
    PUT_SPACES(); fprintf(f, "<function_name line=\"%zu\" pos=\"%zu\">\n", ast->line, ast->pos);
    INC_SPACES_NUM();
    dump_ident_ast_to_file_inner(f, ast->function_name, spaces_num);
    DEC_SPACES_NUM();
    PUT_SPACES(); fprintf(f, "</function_name>\n");
    if (ast->args_list != NULL) {
        dump_args_list_ast_to_file_inner(f, ast->args_list, spaces_num);
    }
    DEC_SPACES_NUM();
    PUT_SPACES(); fprintf(f, "</function_call>\n");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x524d(%rip), %rbp      # 0xfa52
leaq 0x49fa(%rip), %r13      # 0xf206
movq %rbp, %rsi
movq %r13, %rcx
xorl %eax, %eax
callq 0x1100
movq 0x10(%r15), %rdx
movq 0x18(%r15), %rcx
leaq 0x5944(%rip), %rsi      # 0x1016c
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1100
movq %r14, %r12
addq $0x2, %r12
movq %rbx, %rdi
movq %rbp, %rsi
movl %r12d, %edx
movq %r13, %rcx
movq %r13, %rbp
xorl %eax, %eax
callq 0x1100
movq 0x10(%r15), %rdx
movq 0x18(%r15), %rcx
leaq 0x5285(%rip), %rsi      # 0xfae3
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1100
movq (%r15), %r13
leal 0x4(%r14), %edx
movq %rbx, %rdi
leaq 0x51d9(%rip), %rsi      # 0xfa52
movq %rbp, %rcx
xorl %eax, %eax
callq 0x1100
movq 0x20(%r13), %rdx
movq 0x28(%r13), %rcx
leaq 0x5942(%rip), %rsi      # 0x101d4
movq %rbx, %rdi
movq %r13, %r8
xorl %eax, %eax
callq 0x1100
movq %rbx, %rdi
leaq 0x51a9(%rip), %rsi      # 0xfa52
movl %r12d, %edx
movq %rbp, %rcx
xorl %eax, %eax
callq 0x1100
leaq 0x524c(%rip), %rdi      # 0xfb09
movl $0x11, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x1190
movq 0x8(%r15), %rsi
testq %rsi, %rsi
je 0xa8e3
movq %rbx, %rdi
movq %r12, %rdx
callq 0x9837
leaq 0x5168(%rip), %rsi      # 0xfa52
leaq 0x4915(%rip), %rcx      # 0xf206
movq %rbx, %rdi
movl %r14d, %edx
xorl %eax, %eax
callq 0x1100
leaq 0x588d(%rip), %rdi      # 0x10192
movl $0x11, %esi
movl $0x1, %edx
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1190
// File: /workspace/github_c_makefile_star2_O3/masyagin1998[P]GCI/src/parser/ast.c
// Function: create_number_ast
struct NUMBER_AST*create_number_ast(long long number, size_t line, size_t pos)
{
    struct NUMBER_AST*number_ast;
    SAFE_MALLOC(number_ast, 1);
    number_ast->number = number;

    number_ast->line = line;
    number_ast->pos = pos;
    
    return number_ast;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movl $0x18, %edi
callq 0x1130
testq %rax, %rax
je 0xaa32
movq %r15, (%rax)
movq %r14, 0x8(%rax)
movq %rbx, 0x10(%rax)
popq %rbx
popq %r14
popq %r15
retq
callq 0x255d
// File: /workspace/github_c_makefile_star2_O3/masyagin1998[P]GCI/src/bytecode-generator/bytecode-generator.c
// Function: create_constant_from_fieldref
struct CONSTANT create_constant_from_fieldref(const char*str_cnst)
{
    struct CONSTANT cnst;
    memset(&cnst, 0, sizeof(cnst));
    strncpy(cnst.str_cnst, str_cnst, sizeof(cnst.str_cnst));
    cnst.type = CONSTANT_TYPE_FIELDREF;
    return cnst;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq $0x0, 0x20(%rdi)
movl $0x20, %edx
callq 0x1040
movl $0x2, 0x20(%rbx)
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/masyagin1998[P]GCI/src/bytecode-generator/bytecode-generator.c
// Function: create_constant_from_functionref
struct CONSTANT create_constant_from_functionref(const char*str_cnst)
{
    struct CONSTANT cnst;
    memset(&cnst, 0, sizeof(cnst));
    strncpy(cnst.str_cnst, str_cnst, sizeof(cnst.str_cnst));
    cnst.type = CONSTANT_TYPE_FUNCTIONREF;
    return cnst;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq $0x0, 0x20(%rdi)
movl $0x20, %edx
callq 0x1040
movl $0x3, 0x20(%rbx)
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/masyagin1998[P]GCI/src/bytecode-generator/bytecode-generator.c
// Function: bytecode_generator_generate
enum BYTECODE_GENERATOR_CODES bytecode_generator_generate(bytecode_generator_type_t bc_gen, struct BYTECODE**bc)
{   
    /* now only one function without arguments is supported. */
    struct FUNCTION_DECL_AST*f = bc_gen->ast->functions[0];
    enum BYTECODE_GENERATOR_CODES r = body_ast_bytecode_generate(bc_gen, f->body, NULL,
                                                                 NULL, NULL, NULL);
    if (r != BYTECODE_GENERATOR_OK) {
        bytecode_free(bc_gen->bc);
        return r;
    }

    (*bc) = bc_gen->bc;
    return BYTECODE_GENERATOR_OK;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rax
movq (%rax), %rax
movq (%rax), %rax
movq 0x10(%rax), %rsi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xab62
movl %eax, %ebp
movq 0x8(%r14), %rdi
testl %eax, %eax
je 0xab58
callq 0xb522
jmp 0xab5b
movq %rdi, (%rbx)
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/masyagin1998[P]GCI/src/bytecode-generator/bytecode-generator.c
// Function: logical_or_expr_ast_bytecode_generate
static enum BYTECODE_GENERATOR_CODES logical_or_expr_ast_bytecode_generate(bytecode_generator_type_t bc_gen, const struct LOGICAL_OR_EXPR_AST*ast)
{
    size_t i;

    enum BYTECODE_GENERATOR_CODES r = logical_and_expr_ast_bytecode_generate(bc_gen, ast->and_exprs[0]);
    if (r != BYTECODE_GENERATOR_OK) {
        return r;
    }    
    
    for (i = 1; i < ast->and_exprs_len; i++) {
        r = logical_and_expr_ast_bytecode_generate(bc_gen, ast->and_exprs[i]);
        if (r != BYTECODE_GENERATOR_OK) {
            return r;
        }
        PUSH_BACK(bc_gen->bc->op_codes, BC_OP_LOGICAL_OR);
    }

    return BYTECODE_GENERATOR_OK;    
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq (%rsi), %rax
movq (%rax), %rsi
callq 0xc02e
testl %eax, %eax
jne 0xbf1d
cmpq $0x2, 0x8(%rbx)
jb 0xbf1b
movl $0x1, %r12d
movq (%rbx), %rax
movq (%rax,%r12,8), %rsi
movq %r14, %rdi
callq 0xc02e
testl %eax, %eax
jne 0xbf1d
movq 0x8(%r14), %r15
movq 0x8(%r15), %rsi
cmpq 0x10(%r15), %rsi
jne 0xbee1
testq %rsi, %rsi
je 0xbee6
leaq (%rsi,%rsi), %rax
movq %rax, 0x10(%r15)
movq (%r15), %rdi
shlq $0x4, %rsi
callq 0x1160
movq 0x8(%r14), %r15
movq %rax, (%r15)
testq %rax, %rax
je 0xbf29
movq 0x8(%r15), %rsi
jmp 0xbf02
movq (%r15), %rax
jmp 0xbf02
movq $0x1, 0x10(%r15)
movl $0x8, %edi
callq 0x1130
movq %rax, (%r15)
testq %rax, %rax
je 0xbf31
xorl %esi, %esi
movq $0xc, (%rax,%rsi,8)
incq 0x8(%r15)
incq %r12
cmpq 0x8(%rbx), %r12
jb 0xbe95
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %r15, %rdi
callq 0x2dd3
callq 0x2e0b
// File: /workspace/github_c_makefile_star2_O3/masyagin1998[P]GCI/src/bytecode-generator/bytecode-generator.c
// Function: constant_pool_push_back
static int constant_pool_push_back(bytecode_type_t bc, struct CONSTANT cnst)
{
    size_t i;

    for (i = 0; i < bc->constant_pool_len; i++) {
        if (memcmp((char*) &cnst, (char*) (bc->constant_pool + i), sizeof(struct CONSTANT)) == 0) {
            return i;
        }
    }

    PUSH_BACK(bc->constant_pool, cnst);

    return bc->constant_pool_len - 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
leaq 0x30(%rsp), %r14
movq 0x20(%rdi), %r13
testq %r13, %r13
je 0xbfb4
movq 0x18(%rbx), %r12
xorl %r15d, %r15d
movl $0x28, %edx
movq %r14, %rdi
movq %r12, %rsi
callq 0x1140
testl %eax, %eax
je 0xc010
incq %r15
addq $0x28, %r12
cmpq %r15, %r13
jne 0xbf57
cmpq 0x28(%rbx), %r13
jne 0xbfda
leaq (,%r13,2), %rax
movq %rax, 0x28(%rbx)
movq 0x18(%rbx), %rdi
shlq $0x4, %r13
leaq (,%r13,4), %rsi
addq %r13, %rsi
callq 0x1160
movq %rax, 0x18(%rbx)
testq %rax, %rax
je 0xc022
movq 0x20(%rbx), %r13
jmp 0xbfde
cmpq 0x28(%rbx), %r13
jne 0xbfda
movq $0x1, 0x28(%rbx)
movl $0x28, %edi
callq 0x1130
movq %rax, 0x18(%rbx)
testq %rax, %rax
je 0xc01d
xorl %r13d, %r13d
jmp 0xbfde
movq 0x18(%rbx), %rax
leaq (,%r13,4), %rcx
addq %r13, %rcx
movq 0x20(%r14), %rdx
movq %rdx, 0x20(%rax,%rcx,8)
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movups %xmm1, 0x10(%rax,%rcx,8)
movups %xmm0, (%rax,%rcx,8)
movq 0x20(%rbx), %r15
leaq 0x1(%r15), %rax
movq %rax, 0x20(%rbx)
movl %r15d, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
callq 0x2e6e
addq $0x28, %rbx
movq %rbx, %rdi
callq 0x2e3c
// File: /workspace/github_c_makefile_star2_O3/masyagin1998[P]GCI/src/bytecode-generator/bytecode-generator.c
// Function: logical_and_expr_ast_bytecode_generate
static enum BYTECODE_GENERATOR_CODES logical_and_expr_ast_bytecode_generate(bytecode_generator_type_t bc_gen, const struct LOGICAL_AND_EXPR_AST*ast)
{
    size_t i;

    enum BYTECODE_GENERATOR_CODES r = eq_expr_ast_bytecode_generate(bc_gen, ast->eq_exprs[0]);
    if (r != BYTECODE_GENERATOR_OK) {
        return r;
    }    
    for (i = 1; i < ast->eq_exprs_len; i++) {
        r = eq_expr_ast_bytecode_generate(bc_gen, ast->eq_exprs[i]);
        if (r != BYTECODE_GENERATOR_OK) {
            return r;
        }
        PUSH_BACK(bc_gen->bc->op_codes, BC_OP_LOGICAL_AND);
    }

    return BYTECODE_GENERATOR_OK;    
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq (%rsi), %rax
movq (%rax), %rsi
callq 0xc101
testl %eax, %eax
jne 0xc0e8
cmpq $0x2, 0x8(%rbx)
jb 0xc0e6
movl $0x1, %r12d
movq (%rbx), %rax
movq (%rax,%r12,8), %rsi
movq %r14, %rdi
callq 0xc101
testl %eax, %eax
jne 0xc0e8
movq 0x8(%r14), %r15
movq 0x8(%r15), %rsi
cmpq 0x10(%r15), %rsi
jne 0xc0ac
testq %rsi, %rsi
je 0xc0b1
leaq (%rsi,%rsi), %rax
movq %rax, 0x10(%r15)
movq (%r15), %rdi
shlq $0x4, %rsi
callq 0x1160
movq 0x8(%r14), %r15
movq %rax, (%r15)
testq %rax, %rax
je 0xc0f4
movq 0x8(%r15), %rsi
jmp 0xc0cd
movq (%r15), %rax
jmp 0xc0cd
movq $0x1, 0x10(%r15)
movl $0x8, %edi
callq 0x1130
movq %rax, (%r15)
testq %rax, %rax
je 0xc0fc
xorl %esi, %esi
movq $0xd, (%rax,%rsi,8)
incq 0x8(%r15)
incq %r12
cmpq 0x8(%rbx), %r12
jb 0xc060
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %r15, %rdi
callq 0x2e9d
callq 0x2ed5
// File: /workspace/github_c_makefile_star2_O3/masyagin1998[P]GCI/src/bytecode-generator/bytecode-generator.c
// Function: eq_expr_ast_bytecode_generate
static enum BYTECODE_GENERATOR_CODES eq_expr_ast_bytecode_generate(bytecode_generator_type_t bc_gen, const struct EQ_EXPR_AST*ast)
{
    enum BYTECODE_GENERATOR_CODES r = relational_expr_ast_bytecode_generate(bc_gen, ast->left);
    if (r != BYTECODE_GENERATOR_OK) {
        return r;
    }    
    if (ast->right != NULL) {
        r = relational_expr_ast_bytecode_generate(bc_gen, ast->right);
        if (r != BYTECODE_GENERATOR_OK) {
            return r;
        }
        if (ast->eq_op == AST_EQ_OP_EQEQ) {
            PUSH_BACK(bc_gen->bc->op_codes, BC_OP_EQ_EQEQ);
        } else if (ast->eq_op == AST_EQ_OP_NEQ) {
            PUSH_BACK(bc_gen->bc->op_codes, BC_OP_EQ_NEQ);
        } else {
            fprintf(stderr, "Invalid AST_EQ_OP type: %d\n", ast->eq_op);
            exit(EXIT_FAILURE);            
        }
    }

    return BYTECODE_GENERATOR_OK;    
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
movq (%rsi), %rsi
callq 0xc243
testl %eax, %eax
je 0xc122
movl %eax, %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
movq 0x10(%r14), %rsi
xorl %ebx, %ebx
testq %rsi, %rsi
je 0xc11a
movq %r15, %rdi
callq 0xc243
testl %eax, %eax
jne 0xc118
movl 0x8(%r14), %edi
cmpl $0x1, %edi
je 0xc18e
testl %edi, %edi
jne 0xc224
movq 0x8(%r15), %r14
movq 0x8(%r14), %rsi
cmpq 0x10(%r14), %rsi
jne 0xc1cc
testq %rsi, %rsi
je 0xc1f7
leaq (%rsi,%rsi), %rax
movq %rax, 0x10(%r14)
movq (%r14), %rdi
shlq $0x4, %rsi
callq 0x1160
movq 0x8(%r15), %r14
movq %rax, (%r14)
testq %rax, %rax
je 0xc229
movq 0x8(%r14), %rsi
jmp 0xc213
movq 0x8(%r15), %r14
movq 0x8(%r14), %rsi
cmpq 0x10(%r14), %rsi
jne 0xc1c7
testq %rsi, %rsi
je 0xc1d1
leaq (%rsi,%rsi), %rax
movq %rax, 0x10(%r14)
movq (%r14), %rdi
shlq $0x4, %rsi
callq 0x1160
movq 0x8(%r15), %r14
movq %rax, (%r14)
testq %rax, %rax
je 0xc231
movq 0x8(%r14), %rsi
jmp 0xc1ed
movq (%r14), %rax
jmp 0xc1ed
movq (%r14), %rax
jmp 0xc213
movq $0x1, 0x10(%r14)
movl $0x8, %edi
callq 0x1130
movq %rax, (%r14)
testq %rax, %rax
je 0xc239
xorl %esi, %esi
movq $0xf, (%rax,%rsi,8)
jmp 0xc21b
movq $0x1, 0x10(%r14)
movl $0x8, %edi
callq 0x1130
movq %rax, (%r14)
testq %rax, %rax
je 0xc23e
xorl %esi, %esi
movq $0xe, (%rax,%rsi,8)
incq 0x8(%r14)
jmp 0xc11a
callq 0x2fd8
movq %r14, %rdi
callq 0x2f6f
movq %r14, %rdi
callq 0x2f06
callq 0x2f3e
callq 0x2fa7
// File: /workspace/github_c_makefile_star2_O3/masyagin1998[P]GCI/src/bytecode-generator/bytecode-generator.c
// Function: additive_expr_ast_bytecode_generate
static enum BYTECODE_GENERATOR_CODES additive_expr_ast_bytecode_generate(bytecode_generator_type_t bc_gen, const struct ADDITIVE_EXPR_AST*ast)
{
    size_t i;

    enum BYTECODE_GENERATOR_CODES r = multiplicative_expr_ast_bytecode_generate(bc_gen, ast->muls[0]);
    if (r != BYTECODE_GENERATOR_OK) {
        return r;
    }
    for (i = 1; i < ast->muls_len; i++) {
        r = multiplicative_expr_ast_bytecode_generate(bc_gen, ast->muls[i]);
        if (r != BYTECODE_GENERATOR_OK) {
            return r;
        }
        if (ast->ops[i - 1] == AST_ADDITIVE_OP_PLUS) {
            PUSH_BACK(bc_gen->bc->op_codes, BC_OP_ADDITIVE_PLUS);
        } else if (ast->ops[i - 1] == AST_ADDITIVE_OP_MINUS) {
            PUSH_BACK(bc_gen->bc->op_codes, BC_OP_ADDITIVE_MINUS);
        } else {
            fprintf(stderr, "Invalid AST_ADDITIVE_OP type: %d\n", ast->ops[i - 1]);
            exit(EXIT_FAILURE);
        }
    }

    return BYTECODE_GENERATOR_OK;    
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq (%rsi), %rax
movq (%rax), %rsi
callq 0xc62f
testl %eax, %eax
jne 0xc604
cmpq $0x2, 0x10(%rbx)
jb 0xc602
movl $0x1, %r12d
movq (%rbx), %rax
movq (%rax,%r12,8), %rsi
movq %r14, %rdi
callq 0xc62f
testl %eax, %eax
jne 0xc604
movq 0x8(%rbx), %rax
movl -0x4(%rax,%r12,4), %edi
cmpl $0x1, %edi
je 0xc560
testl %edi, %edi
jne 0xc610
movq 0x8(%r14), %r15
movq 0x8(%r15), %rsi
cmpq 0x10(%r15), %rsi
jne 0xc5a2
testq %rsi, %rsi
je 0xc5cd
leaq (%rsi,%rsi), %rax
movq %rax, 0x10(%r15)
movq (%r15), %rdi
shlq $0x4, %rsi
callq 0x1160
movq 0x8(%r14), %r15
movq %rax, (%r15)
testq %rax, %rax
je 0xc615
movq 0x8(%r15), %rsi
jmp 0xc5e9
movq 0x8(%r14), %r15
movq 0x8(%r15), %rsi
cmpq 0x10(%r15), %rsi
jne 0xc59d
testq %rsi, %rsi
je 0xc5a7
leaq (%rsi,%rsi), %rax
movq %rax, 0x10(%r15)
movq (%r15), %rdi
shlq $0x4, %rsi
callq 0x1160
movq 0x8(%r14), %r15
movq %rax, (%r15)
testq %rax, %rax
je 0xc61d
movq 0x8(%r15), %rsi
jmp 0xc5c3
movq (%r15), %rax
jmp 0xc5c3
movq (%r15), %rax
jmp 0xc5e9
movq $0x1, 0x10(%r15)
movl $0x8, %edi
callq 0x1130
movq %rax, (%r15)
testq %rax, %rax
je 0xc625
xorl %esi, %esi
movq $0x15, (%rax,%rsi,8)
jmp 0xc5f1
movq $0x1, 0x10(%r15)
movl $0x8, %edi
callq 0x1130
movq %rax, (%r15)
testq %rax, %rax
je 0xc62a
xorl %esi, %esi
movq $0x14, (%rax,%rsi,8)
incq 0x8(%r15)
incq %r12
cmpq 0x10(%rbx), %r12
jb 0xc4ef
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
callq 0x3294
movq %r15, %rdi
callq 0x322b
movq %r15, %rdi
callq 0x31c2
callq 0x31fa
callq 0x3263
// File: /workspace/github_c_makefile_star2_O3/masyagin1998[P]GCI/src/bytecode-generator/bytecode-generator.c
// Function: emit_loop
static void emit_loop(bytecode_generator_type_t bc_gen, size_t loop_start)
{
    int offset;
    
    PUSH_BACK(bc_gen->bc->op_codes, BC_OP_JUMP);

    offset = ((int) (bc_gen->bc->op_codes_len - loop_start + 1)) * (-1);
    
    PUSH_BACK(bc_gen->bc->op_codes, offset);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r15
movq 0x8(%rdi), %r14
movq 0x8(%r14), %rsi
cmpq 0x10(%r14), %rsi
jne 0xd35a
testq %rsi, %rsi
je 0xd35f
leaq (%rsi,%rsi), %rax
movq %rax, 0x10(%r14)
movq (%r14), %rdi
shlq $0x4, %rsi
callq 0x1160
movq 0x8(%r15), %r14
movq %rax, (%r14)
testq %rax, %rax
je 0xd3fe
movq 0x8(%r14), %rsi
jmp 0xd37f
movq (%r14), %rax
jmp 0xd37f
movq $0x1, 0x10(%r14)
movl $0x8, %edi
callq 0x1130
movq %rax, (%r14)
testq %rax, %rax
je 0xd40e
xorl %esi, %esi
movq $0x1d, (%rax,%rsi,8)
movq 0x8(%r14), %r12
leaq 0x1(%r12), %rsi
movq %rsi, 0x8(%r14)
cmpq 0x10(%r14), %rsi
jne 0xd3e1
testq %rsi, %rsi
je 0xd3c5
leaq (%rsi,%rsi), %rcx
movq %rcx, 0x10(%r14)
shlq $0x4, %rsi
movq %rax, %rdi
callq 0x1160
movq 0x8(%r15), %r14
movq %rax, (%r14)
testq %rax, %rax
je 0xd406
movq 0x8(%r14), %rsi
jmp 0xd3e1
movq $0x1, 0x10(%r14)
movl $0x8, %edi
callq 0x1130
movq %rax, (%r14)
testq %rax, %rax
je 0xd413
xorl %esi, %esi
subl %r12d, %ebx
addl $-0x2, %ebx
movslq %ebx, %rcx
movq %rcx, (%rax,%rsi,8)
incq 0x8(%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %r14, %rdi
callq 0x3b54
movq %r14, %rdi
callq 0x3b8c
callq 0x3bf5
callq 0x3bc4
// File: /workspace/github_c_makefile_star2_O3/masyagin1998[P]GCI/src/virtual-machine/virtual-machine.c
// Function: virtual_machine_conf
void virtual_machine_conf(virtual_machine_type_t vm, bytecode_type_t bc, size_t stack_size, size_t start_heap_size_b, int trace)
{
    vm->bc = bc;
    vm->ip = bc->op_codes;
    
    vm->stack_cap = stack_size;
    SAFE_MALLOC(vm->stack, vm->stack_cap);
    vm->stack_top = vm->stack;

    vm->gc = create_garbage_collector();
    garbage_collector_conf(vm->gc, start_heap_size_b, &(vm->stack), &(vm->stack_top), trace);

    vm->trace = trace;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %r8d, %ebx
movq %rcx, %r15
movq %rdi, %r14
movq %rsi, (%rdi)
movq (%rsi), %rax
movq %rax, 0x8(%rdi)
movq %rdx, 0x20(%rdi)
shlq $0x3, %rdx
leaq (%rdx,%rdx,2), %r12
movq %r12, %rdi
callq 0x1130
movq %rax, 0x10(%r14)
testq %rax, %rax
je 0xd4a6
leaq 0x10(%r14), %r12
leaq 0x18(%r14), %r13
movq %rax, 0x18(%r14)
xorl %eax, %eax
callq 0xdf88
movq %rax, 0x28(%r14)
movq %rax, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r13, %rcx
movl %ebx, %r8d
callq 0xdfa4
movl %ebx, 0x30(%r14)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %r12, %rdi
callq 0x3c55
// File: /workspace/github_c_makefile_star2_O3/masyagin1998[P]GCI/src/virtual-machine/virtual-machine.c
// Function: create_obj
struct OBJECT*create_obj(virtual_machine_type_t vm)
{
    size_t i;

    size_t properties_num = READ_BYTE();
    
    struct OBJECT*obj = garbage_collector_malloc_obj(vm->gc, properties_num);
    
    for (i = 0; i < properties_num; i++) {
        struct VALUE key = virtual_machine_stack_pop(vm);
        struct VALUE val = virtual_machine_stack_pop(vm);
        
        obj->properties[i].key = key.int_val;
        obj->properties[i].val = val;
    }
    
    obj->properties_len = properties_num;
    obj->properties_cap = properties_num * 2;

    return obj;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq 0x8(%rdi), %rax
movq 0x28(%rdi), %rdi
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rbx)
movq (%rax), %r14
movq %r14, %rsi
callq 0xdfdb
testq %r14, %r14
je 0xd528
movq %rax, %rcx
addq $0x18, %rcx
movq %r14, %rdx
movq 0x18(%rbx), %rsi
leaq -0x18(%rsi), %rdi
movq %rdi, 0x18(%rbx)
movq -0x10(%rsi), %rdi
leaq -0x30(%rsi), %r8
movq %r8, 0x18(%rbx)
movq -0x20(%rsi), %r8
movq %r8, 0x10(%rsp)
movups -0x30(%rsi), %xmm0
movaps %xmm0, (%rsp)
movq %rdi, -0x8(%rcx)
movaps (%rsp), %xmm0
movups %xmm0, (%rcx)
movq 0x10(%rsp), %rsi
movq %rsi, 0x10(%rcx)
addq $0x20, %rcx
decq %rdx
jne 0xd4e2
movq %r14, (%rax)
addq %r14, %r14
movq %r14, 0x8(%rax)
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/masyagin1998[P]GCI/src/virtual-machine/virtual-machine.c
// Function: create_arr
struct ARRAY*create_arr(virtual_machine_type_t vm)
{
    size_t i;

    size_t arr_len = READ_BYTE();

    struct ARRAY*arr = garbage_collector_malloc_arr(vm->gc, arr_len);

    for (i = 0; i < arr_len; i++) {
        struct VALUE val = virtual_machine_stack_pop(vm);
        arr->values[i] = val;
    }
    arr->len = arr_len;

    return arr;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rax
movq 0x28(%rdi), %rdi
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rbx)
movq (%rax), %r14
movq %r14, %rsi
callq 0xe1f7
testq %r14, %r14
je 0xd58f
movq %rax, %rcx
addq $0x10, %rcx
movq %r14, %rdx
movq 0x18(%rbx), %rsi
leaq -0x18(%rsi), %rdi
movq %rdi, 0x18(%rbx)
movups -0x18(%rsi), %xmm0
movq -0x8(%rsi), %rsi
movq %rsi, 0x10(%rcx)
movups %xmm0, (%rcx)
addq $0x18, %rcx
decq %rdx
jne 0xd56b
movq %r14, (%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/masyagin1998[P]GCI/src/garbage-collector/garbage-collector.c
// Function: garbage_collector_conf
void garbage_collector_conf(garbage_collector_type_t gc, size_t sizemem_start, struct VALUE**stack, struct VALUE**stack_top, int trace)
{
    gc->stack = stack;
    gc->stack_top = stack_top;
    allocator_malloc_pool(&(gc->a), sizemem_start);
    allocator_malloc_pool(&(gc->b), sizemem_start);

    gc->trace = trace;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %r8d, %ebx
movq %rsi, %r14
movq %rdi, %r15
movq %rdx, (%rdi)
movq %rcx, 0x8(%rdi)
addq $0x10, %rdi
callq 0xe6a0
leaq 0x60(%r15), %rdi
movq %r14, %rsi
callq 0xe6a0
movl %ebx, 0xc8(%r15)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/masyagin1998[P]GCI/src/garbage-collector/garbage-collector.c
// Function: garbage_collector_malloc_obj
struct OBJECT*garbage_collector_malloc_obj(garbage_collector_type_t gc, size_t start_properties_num)
{
    size_t start_properties_cap = start_properties_num * 2;
    size_t sizemem = sizeof(char) + sizeof(struct OBJECT) + sizeof(struct PROPERTY) * start_properties_cap;
    
    if ((gc->a.free_list.last != NULL) && (BLOCK_L_DATA_LEN(gc->a.free_list.last) >= (sizemem + BLOCK_OVERHEAD))) {
        return malloc_obj_force(gc, start_properties_cap, sizemem);
    }

    /* need garbage collection. */
    run_gc(gc, NULL, sizemem);

    return malloc_obj_force(gc, start_properties_cap, sizemem);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rax
shlq $0x6, %rax
leaq 0x11(%rax), %r15
movq 0x28(%rdi), %rcx
testq %rcx, %rcx
je 0xe004
orq $0x33, %rax
cmpq %rax, 0x1(%rcx)
jae 0xe011
movq %r14, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0xe03f
addq %rbx, %rbx
addq $0x10, %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0xe758
movb $0x2, (%rax)
leaq 0x1(%rax), %rcx
movq $0x0, 0x1(%rax)
movq %rbx, 0x9(%rax)
movq %rcx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/masyagin1998[P]GCI/src/garbage-collector/garbage-collector.c
// Function: run_gc
static void run_gc(garbage_collector_type_t gc, void**ptr, size_t ptr_sizemem)
{
    struct ALLOCATOR tmp;

    int need_realloc;

    if (gc->trace) {
        printf("\t<info>GC</info>\n");
    }

    run_gc_inner(gc, ptr);

    /* check if realloc is needed. */
    need_realloc = ((gc->b.busy_list.sizemem + gc->b.busy_list.count * BLOCK_OVERHEAD) +
                    (ptr_sizemem + BLOCK_OVERHEAD)) >= gc->b.sizemem / 2;

    if (need_realloc) {
        size_t new_sizemem = (gc->b.sizemem + (ptr_sizemem + BLOCK_OVERHEAD)) * 2;

        tmp = gc->a;
        gc->a = gc->b;
        gc->b = tmp;
        
        allocator_free_pool(&(gc->b));
        allocator_malloc_pool(&(gc->b), new_sizemem);

        run_gc_inner(gc, ptr);

        allocator_free_pool(&(gc->a));
        allocator_malloc_pool(&(gc->a), new_sizemem);
    }

    tmp = gc->a;
    gc->a = gc->b;
    gc->b = tmp;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %rdx, %r13
movq %rsi, %r15
movq %rdi, %rbx
cmpl $0x0, 0xc8(%rdi)
je 0xe06a
leaq 0x2b2d(%rip), %rdi      # 0x10b92
callq 0x1050
movq %rbx, %rdi
movq %r15, %rsi
callq 0xe2f1
leaq 0x60(%rbx), %r14
movq 0x68(%rbx), %r12
movq 0xa0(%rbx), %rax
movq %rax, %rcx
shlq $0x5, %rcx
leaq (%rcx,%rax,2), %rax
addq $0x22, %r13
movq 0xa8(%rbx), %rcx
addq %r13, %rcx
addq %rax, %rcx
movq %r12, %rax
shrq %rax
cmpq %rax, %rcx
jb 0xe113
addq %r13, %r12
addq %r12, %r12
leaq 0x10(%rbx), %r13
movq %rsp, %rax
movl $0xa, %ecx
movq %rax, %rdi
movq %r13, %rsi
rep  movsq (%rsi), %es:(%rdi)
movl $0xa, %ecx
movq %r13, %rdi
movq %r14, %rsi
rep  movsq (%rsi), %es:(%rdi)
movl $0xa, %ecx
movq %r14, %rdi
movq %rax, %rsi
rep  movsq (%rsi), %es:(%rdi)
movq %r14, %rdi
callq 0xe743
movq %r14, %rdi
movq %r12, %rsi
callq 0xe6a0
movq %rbx, %rdi
movq %r15, %rsi
callq 0xe2f1
movq %r13, %rdi
callq 0xe743
movq %r13, %rdi
movq %r12, %rsi
callq 0xe6a0
addq $0x10, %rbx
movq %rsp, %rax
movl $0xa, %ecx
movq %rax, %rdi
movq %rbx, %rsi
rep  movsq (%rsi), %es:(%rdi)
movl $0xa, %ecx
movq %rbx, %rdi
movq %r14, %rsi
rep  movsq (%rsi), %es:(%rdi)
movl $0xa, %ecx
movq %r14, %rdi
movq %rax, %rsi
rep  movsq (%rsi), %es:(%rdi)
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/masyagin1998[P]GCI/src/garbage-collector/garbage-collector.c
// Function: garbage_collector_realloc_obj
struct OBJECT*garbage_collector_realloc_obj(garbage_collector_type_t gc, struct OBJECT*obj, size_t new_properties_num)
{
    size_t new_properties_cap = new_properties_num * 2;
    size_t sizemem = sizeof(char) + sizeof(struct OBJECT) + sizeof(struct PROPERTY) * new_properties_cap;

    if ((gc->a.free_list.last != NULL) && (BLOCK_L_DATA_LEN(gc->a.free_list.last) >= (sizemem + BLOCK_OVERHEAD))) {
        return realloc_obj_force(gc, obj, new_properties_cap, sizemem);
    }

    /* need garbage collection. */
    run_gc(gc, (void**) &obj, sizemem);

    return realloc_obj_force(gc, obj, new_properties_cap, sizemem);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
movq %rsi, (%rsp)
movq %rdx, %rax
shlq $0x6, %rax
leaq 0x11(%rax), %r15
movq 0x28(%rdi), %rcx
testq %rcx, %rcx
je 0xe182
orq $0x33, %rax
cmpq %rax, 0x1(%rcx)
jae 0xe199
movq %rsp, %r12
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0xe03f
movq (%r12), %r12
jmp 0xe19c
movq %rsi, %r12
decq %r12
leaq 0x10(%r14), %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0xe93d
movq %rax, %r15
movq %r14, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0xe49b
addq %rbx, %rbx
movq %rbx, 0x9(%r15)
incq %r15
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/masyagin1998[P]GCI/src/garbage-collector/garbage-collector.c
// Function: garbage_collector_malloc_arr
struct ARRAY*garbage_collector_malloc_arr(garbage_collector_type_t gc, size_t arr_len)
{
    size_t start_arr_cap = arr_len * 2;
    size_t sizemem = sizeof(char) + sizeof(struct ARRAY) + sizeof(struct VALUE) * start_arr_cap;
    
    if ((gc->a.free_list.last != NULL) && (BLOCK_L_DATA_LEN(gc->a.free_list.last) >= (sizemem + BLOCK_OVERHEAD))) {
        return malloc_arr_force(gc, start_arr_cap, sizemem);
    }

    /* need garbage collection. */
    run_gc(gc, NULL, sizemem);

    return malloc_arr_force(gc, start_arr_cap, sizemem);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rcx
shlq $0x4, %rcx
leaq (%rcx,%rcx,2), %r15
addq $0x11, %r15
movq 0x28(%rdi), %rax
testq %rax, %rax
je 0xe228
leaq (%rcx,%rcx,2), %rcx
addq $0x33, %rcx
cmpq %rcx, 0x1(%rax)
jae 0xe235
movq %r14, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0xe03f
addq %rbx, %rbx
addq $0x10, %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0xe758
movb $0x3, (%rax)
leaq 0x1(%rax), %rcx
movq $0x0, 0x1(%rax)
movq %rbx, 0x9(%rax)
movq %rcx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/masyagin1998[P]GCI/src/garbage-collector/garbage-collector.c
// Function: garbage_collector_realloc_arr
struct ARRAY*garbage_collector_realloc_arr(garbage_collector_type_t gc, struct ARRAY*arr, size_t new_arr_len)
{
    size_t new_arr_cap = new_arr_len * 2;
    size_t sizemem = sizeof(struct ARRAY) + sizeof(struct VALUE) * new_arr_cap;

    if ((gc->a.free_list.last != NULL) && (BLOCK_L_DATA_LEN(gc->a.free_list.last) >= (sizemem + BLOCK_OVERHEAD))) {
        return realloc_arr_force(gc, arr, new_arr_cap, sizemem);
    }

    /* need garbage collection. */
    run_gc(gc, (void**) &arr, sizemem);

    return realloc_arr_force(gc, arr, new_arr_cap, sizemem);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
movq %rsi, (%rsp)
movq %rdx, %rcx
shlq $0x4, %rcx
leaq (%rcx,%rcx,2), %r15
addq $0x10, %r15
movq 0x28(%rdi), %rax
testq %rax, %rax
je 0xe29b
leaq (%rcx,%rcx,2), %rcx
addq $0x32, %rcx
cmpq %rcx, 0x1(%rax)
jae 0xe2b2
movq %rsp, %r12
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0xe03f
movq (%r12), %r12
jmp 0xe2b5
movq %rsi, %r12
decq %r12
leaq 0x10(%r14), %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0xe93d
movq %rax, %r15
movq %r14, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0xe49b
addq %rbx, %rbx
movq %rbx, 0x9(%r15)
incq %r15
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/masyagin1998[P]GCI/src/garbage-collector/garbage-collector.c
// Function: lookup_new_location
static void*lookup_new_location(garbage_collector_type_t gc, void*ptr)
{
    void*o = BLOCK_PTR_FROM_DATA((((char*) ptr) - 1));
    
    if (ptrs_map_get(&(gc->ptrs_map), o) == NULL) {
        ptrs_map_set(&(gc->ptrs_map), o, gc->b.free_list.first);

        allocator_malloc_block(&(gc->b), BLOCK_L_DATA_LEN(o));
        memcpy(BLOCK_DATA(gc->b.busy_list.last), BLOCK_DATA(o), BLOCK_L_DATA_LEN(o));
    }

    return (((char*) BLOCK_DATA(ptrs_map_get(&(gc->ptrs_map), o))) + 1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r15
movq %rdi, %r12
leaq -0x1a(%rsi), %rbx
leaq 0xb0(%rdi), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0xe652
testq %rax, %rax
jne 0xe482
leaq 0x60(%r12), %r13
movq 0x70(%r12), %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0xe5f9
movq -0x19(%r15), %rsi
movq %r13, %rdi
callq 0xe758
movq 0x98(%r12), %rdi
addq $0x19, %rdi
movq -0x19(%r15), %rdx
decq %r15
movq %r15, %rsi
callq 0x1120
movq %r14, %rdi
movq %rbx, %rsi
callq 0xe652
addq $0x1a, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/masyagin1998[P]GCI/src/garbage-collector/garbage-collector.c
// Function: change_one_ptr
static void change_one_ptr(garbage_collector_type_t gc, char*prev_ptr, char*new_ptr)
{
    struct VALUE*stack = (*(gc->stack));
    struct VALUE*stack_top = (*(gc->stack_top));

    struct VALUE*val;
    
    void*cur;

    for (val = stack; val != stack_top; val++) {
        change_vals_ptr(val, prev_ptr, new_ptr);
    }

    cur = gc->a.busy_list.first;

    while (cur != NULL) {
        size_t i;
        char*ptr = BLOCK_DATA(cur);
        if (ptr[0] == VALUE_TYPE_OBJ) {
            struct OBJECT*obj = (struct OBJECT*) (ptr + 1);
            for (i = 0; i < obj->properties_len; i++) {
                val = &(obj->properties[i].val);
                change_vals_ptr(val, prev_ptr, new_ptr);
            }
        } else if (ptr[0] == VALUE_TYPE_ARR) {
            size_t i;
            struct ARRAY*arr = (struct ARRAY*) (ptr + 1);
            for (i = 0; i < arr->len; i++) {
                val = &(arr->values[i]);
                change_vals_ptr(val, prev_ptr, new_ptr);
            }
        }
        cur = BLOCK_LIST_NEXT(cur);
    }
}

// Assembly:
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
movq (%rax), %rax
movq (%rcx), %rcx
cmpq %rcx, %rax
je 0xe4f3
leaq 0x1(%rsi), %r8
leaq 0x1(%rdx), %r9
leaq 0x8(%rax), %r10
movl 0x8(%r10), %r11d
cmpl $0x3, %r11d
je 0xe4d4
cmpl $0x2, %r11d
jne 0xe4df
cmpq %r8, (%r10)
jne 0xe4df
leaq 0x8(%rax), %r11
jmp 0xe4dc
movq %r10, %r11
cmpq %r8, (%r10)
jne 0xe4df
movq %r9, (%r11)
addq $0x18, %rax
leaq 0x18(%r10), %r11
addq $0x10, %r10
cmpq %rcx, %r10
movq %r11, %r10
jne 0xe4b9
movq 0x40(%rdi), %rax
testq %rax, %rax
je 0xe5d6
incq %rsi
incq %rdx
movzbl 0x19(%rax), %ecx
cmpl $0x3, %ecx
je 0xe577
cmpl $0x2, %ecx
jne 0xe5c9
movq 0x1a(%rax), %r9
testq %r9, %r9
je 0xe5c9
leaq 0x2a(%rax), %rcx
leaq 0x3a(%rax), %rdi
xorl %r8d, %r8d
movl 0x8(%rdi), %r10d
cmpl $0x3, %r10d
je 0xe54a
cmpl $0x2, %r10d
jne 0xe569
movq %rdi, %r10
cmpq %rsi, (%rdi)
jne 0xe569
jmp 0xe562
cmpq %rsi, (%rdi)
jne 0xe569
movq %r8, %r9
shlq $0x5, %r9
leaq (%rcx,%r9), %r10
addq $0x8, %r10
addq $0x8, %r10
movq %rdx, (%r10)
movq 0x1a(%rax), %r9
incq %r8
addq $0x20, %rdi
cmpq %r9, %r8
jb 0xe530
jmp 0xe5c9
movq 0x1a(%rax), %r8
testq %r8, %r8
je 0xe5c9
leaq 0x2a(%rax), %rcx
leaq 0x32(%rax), %rdi
xorl %r9d, %r9d
movl 0x8(%rdi), %r10d
cmpl $0x3, %r10d
je 0xe5a5
cmpl $0x2, %r10d
jne 0xe5bd
movq %rdi, %r10
cmpq %rsi, (%rdi)
jne 0xe5bd
jmp 0xe5b6
cmpq %rsi, (%rdi)
jne 0xe5bd
leaq (%r9,%r9,2), %r8
leaq (%rcx,%r8,8), %r10
addq $0x8, %r10
movq %rdx, (%r10)
movq 0x1a(%rax), %r8
incq %r9
addq $0x18, %rdi
cmpq %r8, %r9
jb 0xe58b
movq 0x11(%rax), %rax
testq %rax, %rax
jne 0xe506
retq
nop
// File: /workspace/github_c_makefile_star2_O3/masyagin1998[P]GCI/src/garbage-collector/ptrs-map.c
// Function: ptrs_map_set
void ptrs_map_set(ptrs_map_type_t pm, void*key, void*val)
{
    size_t i;

    if (key == NULL) {
        fprintf(stderr, "insertion null-key in map is prohibited\n");
        exit(1);
    }

    for (i = 0; i < pm->len; i++) {
        if (pm->elems[i].key == key) {
            pm->elems[i].val = val;
            return;
        }
    }

    if (pm->len == pm->cap) {
        fprintf(stderr, "non enough memory in map to handle new value\n");
        exit(1);
    }

    pm->elems[pm->len].key = key;
    pm->elems[pm->len].val = val;
    pm->len++;
}

// Assembly:
pushq %rax
testq %rsi, %rsi
je 0xe648
movq 0x8(%rdi), %rax
testq %rax, %rax
je 0xe621
movq (%rdi), %rcx
addq $0x8, %rcx
movq %rax, %r8
cmpq %rsi, -0x8(%rcx)
je 0xe643
addq $0x10, %rcx
decq %r8
jne 0xe612
cmpq 0x10(%rdi), %rax
je 0xe64d
movq (%rdi), %rcx
movq %rax, %r8
shlq $0x4, %r8
movq %rsi, (%rcx,%r8)
movq %rdx, 0x8(%rcx,%r8)
incq %rax
movq %rax, 0x8(%rdi)
jmp 0xe646
movq %rdx, (%rcx)
popq %rax
retq
callq 0x3cd9
callq 0x3cb4
// File: /workspace/github_c_makefile_star2_O3/masyagin1998[P]GCI/src/garbage-collector/ptrs-map.c
// Function: ptrs_map_get
void*ptrs_map_get(ptrs_map_type_t pm, void*key)
{
    size_t i;

    if (key == NULL) {
        fprintf(stderr, "selection by null-key from map is prohibited\n");
        exit(1);
    }

    for (i = 0; i < pm->len; i++) {
        if (pm->elems[i].key == key) {
            return pm->elems[i].val;
        }
    }

    return NULL;
}

// Assembly:
pushq %rax
testq %rsi, %rsi
je 0xe684
movq 0x8(%rdi), %rcx
testq %rcx, %rcx
je 0xe67b
movq (%rdi), %rdx
addq $0x8, %rdx
xorl %eax, %eax
cmpq %rsi, -0x8(%rdx)
je 0xe67f
addq $0x10, %rdx
decq %rcx
jne 0xe66a
jmp 0xe682
xorl %eax, %eax
jmp 0xe682
movq (%rdx), %rax
popq %rcx
retq
callq 0x3cfe
// File: /workspace/github_c_makefile_star2_O3/masyagin1998[P]GCI/src/garbage-collector/allocator.c
// Function: allocator_malloc_pool
void allocator_malloc_pool(allocator_type_t a, size_t sizemem)
{
    if (sizemem < MIN_BLOCK_LEN) {
        fprintf(stderr, "not enough memory for allocator:\n");
        fprintf(stderr, "got:         %ld bytes\n", sizemem);
        fprintf(stderr, "minimum:     %ld bytes;\n", MIN_BLOCK_LEN);
        fprintf(stderr, "recommended: %ld bytes;\n", MIN_BLOCK_LEN * 1024 * 1024);
        
        exit(EXIT_FAILURE);
    }
    
    a->sizemem = sizemem;
    SAFE_MALLOC(a->mem, a->sizemem);

    allocator_clean_pool(a);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
cmpq $0x22, %rsi
jbe 0xe6d3
movq %rdi, %r14
movq %rbx, 0x8(%rdi)
movq %rbx, %rdi
callq 0x1130
movq %rax, (%r14)
testq %rax, %rax
je 0xe6db
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xe6e3
movq %rbx, %rdi
callq 0x3d51
movq %rbx, %rdi
callq 0x3d23
// File: /workspace/github_c_makefile_star2_O3/masyagin1998[P]GCI/src/garbage-collector/allocator.c
// Function: allocator_malloc_block
void*allocator_malloc_block(allocator_type_t a, size_t sizemem)
{
    void*cur;

    if ((BLOCK_L_DATA_LEN(a->free_list.last) + BLOCK_OVERHEAD) < sizemem) {
        return NULL;
    }

    cur = allocator_list_search_by_sizemem(&(a->free_list), sizemem);

    /* remove block from list. */
    allocator_list_remove_elem(&(a->free_list), cur);
    
    if (BLOCK_L_DATA_LEN(cur) < (sizemem + MIN_BLOCK_LEN)) {
        /* don't need to divide block. */
        BLOCK_L_FLAG(cur) = BUSY_BLOCK;
        BLOCK_R_FLAG(cur) = BUSY_BLOCK;
        allocator_list_push_back(&(a->busy_list), cur);
        
        return BLOCK_DATA(cur);
    }

    size_t len = BLOCK_L_DATA_LEN(cur) - sizemem - BLOCK_OVERHEAD;
    void*tmp_block;
    /* have to divide block. */
    
    /* split block into two smaller blocks (one of them will contain data). */
    
    /* put busy block to busy list. */
    BLOCK_L_FLAG(cur) = BUSY_BLOCK;
    BLOCK_L_DATA_LEN(cur) = sizemem;
    BLOCK_LIST_PREV(cur) = NULL;
    BLOCK_LIST_NEXT(cur) = NULL;
    BLOCK_R_DATA_LEN(cur) = sizemem;
    BLOCK_R_FLAG(cur) = BUSY_BLOCK;
    allocator_list_push_back(&(a->busy_list), cur);
    
    /* put free block to free list. */
    tmp_block = BLOCK_ARR_NEXT(cur);
    BLOCK_L_FLAG(tmp_block) = FREE_BLOCK;
    BLOCK_L_DATA_LEN(tmp_block) = len;
    BLOCK_LIST_PREV(tmp_block) = NULL;
    BLOCK_LIST_NEXT(tmp_block) = NULL;
    BLOCK_R_DATA_LEN(tmp_block) = len;
    BLOCK_R_FLAG(tmp_block) = FREE_BLOCK;
    allocator_list_insert_elem(&(a->free_list), tmp_block);
    
    return BLOCK_DATA(cur);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x18(%rdi), %rax
movq 0x1(%rax), %rax
addq $0x22, %rax
cmpq %rsi, %rax
jae 0xe77c
xorl %r13d, %r13d
jmp 0xe84e
movq %rsi, %r12
movq %rdi, %rbx
leaq 0x10(%rdi), %r14
movq (%r14), %r15
testq %r15, %r15
je 0xe79a
cmpq %r12, 0x1(%r15)
jae 0xe79d
movq 0x11(%r15), %r15
jmp 0xe789
xorl %r15d, %r15d
movq %r14, %rdi
movq %r15, %rsi
callq 0xe860
movq 0x1(%r15), %rbp
leaq 0x23(%r12), %rax
cmpq %rax, %rbp
jae 0xe7d5
movb $0x1, %al
movb %al, (%r15)
leaq 0x19(%r15), %r13
movb %al, 0x21(%r15,%rbp)
addq $0x30, %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq 0xe898
jmp 0xe84e
subq %r12, %rbp
leaq -0x22(%rbp), %rax
movq %rax, (%rsp)
movb $0x1, %al
movb %al, (%r15)
movq %r12, 0x1(%r15)
leaq 0x19(%r15), %r13
xorps %xmm0, %xmm0
movups %xmm0, 0x9(%r15)
movq %r12, 0x19(%r15,%r12)
movq 0x1(%r15), %rcx
movb %al, 0x21(%r15,%rcx)
addq $0x30, %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq 0xe898
movq 0x1(%r15), %rax
leaq (%r15,%rax), %rcx
addq $0x19, %rcx
leaq (%r15,%rax), %rsi
addq $0x22, %rsi
xorl %eax, %eax
movb %al, (%rsi)
movq (%rsp), %rdx
movq %rdx, 0x1(%rsi)
xorps %xmm0, %xmm0
movups %xmm0, 0x9(%rsi)
movq %rdx, (%rbp,%rcx)
movq 0x1(%rsi), %rdx
movb %al, 0x2a(%rdx,%rcx)
movq %r14, %rdi
callq 0xe8cb
movq %r13, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/masyagin1998[P]GCI/src/garbage-collector/allocator.c
// Function: allocator_list_insert_elem
static void allocator_list_insert_elem(struct ALLOCATOR_LIST*list, void*elem)
{
    size_t len = BLOCK_L_DATA_LEN(elem);
    void*list_next = allocator_list_search_by_sizemem(list, len);

    if (list_next == NULL) {
        allocator_list_push_back(list, elem);
    } else {
        void*prev_elem;
        
        if (BLOCK_LIST_PREV(list_next) == NULL) {
            allocator_list_push_front(list, elem);
            return;
        }

        BLOCK_LIST_PREV(elem) = BLOCK_LIST_PREV(list_next);
        prev_elem = BLOCK_LIST_PREV(list_next);
        BLOCK_LIST_NEXT(prev_elem) = elem;
        BLOCK_LIST_NEXT(elem) = list_next;
        BLOCK_LIST_PREV(list_next) = elem;

        list->count++;
        list->sizemem += BLOCK_L_DATA_LEN(elem);
    }
}

// Assembly:
movq (%rdi), %rax
testq %rax, %rax
je 0xe898
movq 0x1(%rsi), %rdx
movq %rax, %rcx
cmpq %rdx, 0x1(%rcx)
jae 0xe8eb
movq 0x11(%rcx), %rcx
testq %rcx, %rcx
jne 0xe8da
jmp 0xe898
movq 0x9(%rcx), %rdx
testq %rdx, %rdx
je 0xe90a
movq %rdx, 0x9(%rsi)
movq 0x9(%rcx), %rax
movq %rsi, 0x11(%rax)
movq %rcx, 0x11(%rsi)
movq %rsi, 0x9(%rcx)
jmp 0xe930
movq %rax, 0x11(%rsi)
movq $0x0, 0x9(%rsi)
movq (%rdi), %rax
testq %rax, %rax
je 0xe922
movq %rsi, 0x9(%rax)
movq %rsi, (%rdi)
cmpq $0x0, 0x8(%rdi)
jne 0xe930
movq %rsi, 0x8(%rdi)
incq 0x10(%rdi)
movq 0x1(%rsi), %rax
addq %rax, 0x18(%rdi)
retq