LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/vssense[P]Compiler/src/back-end/compiling.cpp
// Function: WriteAsmStdFunctions(Compiler*)
void WriteAsmStdFunctions(Compiler* compiler)
{
    assert(compiler);

    ElfFileWriter* writer = &compiler->writer;

    memcpy(writer->buffer + writer->offset, byte_code_print, sizeof(byte_code_print));
    compiler->print_offset = writer->offset;
    writer->offset += sizeof(byte_code_print);

    memcpy(writer->buffer + writer->offset, byte_code_scan, sizeof(byte_code_scan));
    compiler->scan_offset = writer->offset;
    writer->offset += sizeof(byte_code_scan);

    if (compiler->asm_listing_required)
    {
        fprintf(compiler->file, "%s", nasm_print_func);
        fprintf(compiler->file, "%s", nasm_scan_func);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x290a
movq %rdi, %rbx
movq 0x28(%rdi), %rdi
addq 0x30(%rbx), %rdi
leaq 0x57da(%rip), %rsi      # 0x8070
pushq $0x66
popq %rdx
callq 0x20d0
movq 0x30(%rbx), %rdi
movq %rdi, 0x108(%rbx)
addq $0x66, %rdi
movq %rdi, 0x30(%rbx)
addq 0x28(%rbx), %rdi
leaq 0x5824(%rip), %rsi      # 0x80e0
pushq $0x5c
popq %rdx
callq 0x20d0
movq 0x30(%rbx), %rax
movq %rax, 0x110(%rbx)
addq $0x5c, %rax
movq %rax, 0x30(%rbx)
cmpb $0x1, 0x20(%rbx)
jne 0x2903
movq 0x10(%rbx), %rsi
movq 0xb840(%rip), %rdi      # 0xe128
callq 0x2120
movq 0x10(%rbx), %rsi
movq 0xb838(%rip), %rdi      # 0xe130
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x2120
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x5ff4(%rip), %rdi      # 0x8905
leaq 0x5fa3(%rip), %rsi      # 0x88bb
leaq 0x6111(%rip), %rcx      # 0x8a30
movl $0xf9, %edx
callq 0x20b0
// File: /workspace/github_cpp_makefile_star2_O2/vssense[P]Compiler/src/back-end/compiling.cpp
// Function: WriteAsmFunc(Node*, Compiler*)
void WriteAsmFunc(Node* node, Compiler* compiler)
{
    ASSERT_COMPILER;

    WriteFuncDecl(compiler, FUNC);

    WritePushR64  (compiler, RBP);
    WriteMovR64R64(compiler, RBP, RSP);
    WriteSubR64Num(compiler, RSP, FUNC->num_vars * sizeof(int64_t));

    WriteAsmCompound(node->left->right, compiler);

    WriteMovR64R64(compiler, RSP, RBP);
    WritePopR64   (compiler, RBP);
    WriteRet      (compiler);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r15
movq 0x8(%rsi), %rsi
movq %rbx, %rdi
callq 0x49ed
pushq $0x5
popq %r14
movq %rbx, %rdi
movl %r14d, %esi
callq 0x41cb
pushq $0x4
popq %r12
movq %rbx, %rdi
movl %r14d, %esi
movl %r12d, %edx
callq 0x3998
movq 0x8(%rbx), %rax
movl 0x20(%rax), %edx
shll $0x3, %edx
movq %rbx, %rdi
movl %r12d, %esi
callq 0x3f6b
movq 0x18(%r15), %rax
movq 0x20(%rax), %rdi
movq %rbx, %rsi
callq 0x2cb9
movq %rbx, %rdi
movl %r12d, %esi
movl %r14d, %edx
callq 0x3998
movq %rbx, %rdi
movl %r14d, %esi
callq 0x4358
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x498b
// File: /workspace/github_cpp_makefile_star2_O2/vssense[P]Compiler/src/back-end/compiling.cpp
// Function: WriteAsmStdData(Compiler*)
void WriteAsmStdData(Compiler* compiler)
{
    assert(compiler);

    int data_segment_offset = InitDataSegment(&compiler->writer);

    memcpy(compiler->writer.buffer + compiler->writer.offset, byte_code_std_data, sizeof(byte_code_std_data));
    compiler->writer.offset += sizeof(byte_code_std_data);

    SetInt(&compiler->writer, start_virtual_offset + data_segment_offset, offset_to_set_data + compiler->print_offset);
    SetInt(&compiler->writer, start_virtual_offset + data_segment_offset, offset_to_set_data + compiler->scan_offset);

    if (compiler->asm_listing_required)
    {
        fprintf(compiler->file, "%s", asm_data);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x2a54
movq %rdi, %rbx
leaq 0x28(%rdi), %r14
movq %r14, %rdi
callq 0x4bde
movq 0x28(%rbx), %rcx
movq 0x30(%rbx), %rdx
movaps 0x575a(%rip), %xmm0     # 0x8140
movups %xmm0, (%rcx,%rdx)
movw $0x20, 0x10(%rcx,%rdx)
addq $0x12, 0x30(%rbx)
leal 0x400000(%rax), %r15d
movq 0x108(%rbx), %rdx
addq $0x2, %rdx
movq %r14, %rdi
movl %r15d, %esi
callq 0x4dfd
movq 0x110(%rbx), %rdx
addq $0x2, %rdx
movq %r14, %rdi
movl %r15d, %esi
callq 0x4dfd
cmpb $0x1, 0x20(%rbx)
jne 0x2a49
movq 0x10(%rbx), %rsi
movq 0xb6fe(%rip), %rdi      # 0xe138
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2120
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5eaa(%rip), %rdi      # 0x8905
leaq 0x5e59(%rip), %rsi      # 0x88bb
leaq 0x5fed(%rip), %rcx      # 0x8a56
movl $0x10e, %edx            # imm = 0x10E
callq 0x20b0
// File: /workspace/github_cpp_makefile_star2_O2/vssense[P]Compiler/src/back-end/compiling.cpp
// Function: WriteByteCodeToFile(Compiler*, BackEndInfo*)
void WriteByteCodeToFile(Compiler* compiler, BackEndInfo* info)
{
    assert(compiler);
    assert(info);

    const char* output_file_name = DEFAULT_OUTPUT_FILE_NAME;

    if (info->output_file != nullptr)
    {
        output_file_name = info->output_file;
    }

    FILE* output = fopen(output_file_name, "w");
    assert(output && "Can't create output file");

    char chmod_str[chmod_str_len] = "";
    sprintf(chmod_str, "chmod +x %s", output_file_name);
    system(chmod_str);

    fwrite(compiler->writer.buffer, compiler->writer.offset, sizeof(char), output);
    fclose(output);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x80, %rsp
testq %rdi, %rdi
je 0x2b43
testq %rsi, %rsi
je 0x2b62
movq %rdi, %rbx
movq (%rsi), %r15
testq %r15, %r15
jne 0x2aa9
movq 0xb677(%rip), %r15      # 0xe120
leaq 0x5e4a(%rip), %rsi      # 0x88fa
movq %r15, %rdi
callq 0x2130
testq %rax, %rax
je 0x2b81
movq %rax, %r14
xorps %xmm0, %xmm0
leaq -0xa0(%rbp), %r12
movaps %xmm0, 0x70(%r12)
movaps %xmm0, 0x60(%r12)
movaps %xmm0, 0x50(%r12)
movaps %xmm0, 0x40(%r12)
movaps %xmm0, 0x30(%r12)
movaps %xmm0, 0x20(%r12)
movaps %xmm0, 0x10(%r12)
movaps %xmm0, (%r12)
leaq 0x5f20(%rip), %rsi      # 0x8a24
movq %r12, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x2060
movq %r12, %rdi
callq 0x20e0
movq 0x28(%rbx), %rdi
movq 0x30(%rbx), %rsi
pushq $0x1
popq %rdx
movq %r14, %rcx
callq 0x21f0
movq %r14, %rdi
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2100
leaq 0x5dbb(%rip), %rdi      # 0x8905
leaq 0x5d6a(%rip), %rsi      # 0x88bb
leaq 0x5e73(%rip), %rcx      # 0x89cb
movl $0xe2, %edx
callq 0x20b0
leaq 0x5ded(%rip), %rdi      # 0x8956
leaq 0x5d4b(%rip), %rsi      # 0x88bb
leaq 0x5e54(%rip), %rcx      # 0x89cb
movl $0xe3, %edx
callq 0x20b0
leaq 0x5e77(%rip), %rdi      # 0x89ff
leaq 0x5d2c(%rip), %rsi      # 0x88bb
leaq 0x5e35(%rip), %rcx      # 0x89cb
movl $0xed, %edx
callq 0x20b0
// File: /workspace/github_cpp_makefile_star2_O2/vssense[P]Compiler/src/back-end/compiling.cpp
// Function: DestructNameTable(NameTable*)
void DestructNameTable(NameTable* table)
{
    assert(table);

    for (size_t i = 0; i < table->num_func; ++i)
    {
        free(table->functions[i].vars);
    }
    
    free(table->functions);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x2be3
movq %rdi, %rbx
pushq $0x8
popq %r14
xorl %r15d, %r15d
movq (%rbx), %rdi
cmpq 0x8(%rbx), %r15
jae 0x2bd4
movq (%rdi,%r14), %rdi
callq 0x2140
incq %r15
addq $0x30, %r14
jmp 0x2bb9
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2140
leaq 0x5d66(%rip), %rdi      # 0x8950
leaq 0x5cca(%rip), %rsi      # 0x88bb
leaq 0x5fbd(%rip), %rcx      # 0x8bb5
movl $0x2dd, %edx            # imm = 0x2DD
callq 0x20b0
// File: /workspace/github_cpp_makefile_star2_O2/vssense[P]Compiler/src/back-end/compiling.cpp
// Function: FindFunc(char const*, NameTable*)
Function* FindFunc(const char* name, NameTable* table)
{
    assert(name);

    for (size_t i = 0; i < table->num_func; ++i)
    {
        if (strcmp(table->functions[i].name, name) == 0)
        {
            return table->functions + i;
        }
    }

    printf("error : unknown function : '%s'\n", name);

    return nullptr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x2c9a
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rsi), %r12
incq %r12
pushq $-0x30
popq %r13
decq %r12
je 0x2c74
movq (%r14), %r15
movq 0x30(%r15,%r13), %rdi
addq $0x30, %r13
movq %rbx, %rsi
callq 0x2170
testl %eax, %eax
jne 0x2c52
addq %r13, %r15
jmp 0x2c88
leaq 0x5ea5(%rip), %rdi      # 0x8b20
xorl %r15d, %r15d
movq %rbx, %rsi
xorl %eax, %eax
callq 0x2040
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x78df(%rip), %rdi      # 0xa580
leaq 0x5c13(%rip), %rsi      # 0x88bb
leaq 0x5e43(%rip), %rcx      # 0x8af2
movl $0x28c, %edx            # imm = 0x28C
callq 0x20b0
// File: /workspace/github_cpp_makefile_star2_O2/vssense[P]Compiler/src/back-end/compiling.cpp
// Function: WriteAsmCompound(Node*, Compiler*)
void WriteAsmCompound(Node* node, Compiler* compiler)
{
    if (node == nullptr)
    {
        return;
    }

    ASSERT_COMPILER;

    while (node != nullptr)
    {
        WriteAsmStatement(node->left, compiler);
        node = node->right;
    }
}

// Assembly:
testq %rdi, %rdi
je 0x2ce4
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq 0x18(%r14), %rdi
movq %rbx, %rsi
callq 0x2ce5
movq 0x20(%r14), %r14
testq %r14, %r14
jne 0x2ccb
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/vssense[P]Compiler/src/back-end/compiling.cpp
// Function: WriteAsmStatement(Node*, Compiler*)
void WriteAsmStatement(Node* node, Compiler* compiler)
{
    ASSERT_COMPILER;

    switch (node->type)
    {
        case DECL_TYPE :
        {
            WriteAsmAssignment(node, compiler);
            break;
        }
        case ADECL_TYPE :
        {
            WriteAsmArrayDeclaration(node, compiler);
            break;
        }
        case ASSG_TYPE :
        {
            WriteAsmAssignment(node, compiler);
            break;
        }
        case JUMP_TYPE :
        {
            if (!FUNC->is_void)
            {
                WriteAsmExpression(node->right, compiler);
                WritePopR64(compiler, RAX);
            }

            WriteMovR64R64(compiler, RSP, RBP);
            WritePopR64   (compiler, RBP);
            WriteRet      (compiler);
            break;
        }
        case COND_TYPE :
        {
            WriteAsmCondition(node, compiler);
            break;
        }
        case LOOP_TYPE :
        {
            WriteAsmLoop(node, compiler);
            break;
        }
        case CALL_TYPE :
        {
            WriteAsmCall(node, compiler);
            break;
        }
        default :
        {
            printf("I am here, but I shouldn't, line = %d\n", __LINE__);
            break;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl (%rdi), %eax
decl %eax
cmpl $0xc, %eax
ja 0x2d14
movq %rsi, %rbx
leaq 0x5321(%rip), %rcx      # 0x8020
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x2da4
leaq 0x5d5c(%rip), %rdi      # 0x8a77
movl $0x172, %esi            # imm = 0x172
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0x2040
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x312b
movq 0x8(%rbx), %rax
cmpb $0x0, 0x10(%rax)
jne 0x2d57
movq 0x20(%rdi), %rdi
movq %rbx, %rsi
callq 0x2ec5
movq %rbx, %rdi
xorl %esi, %esi
callq 0x4358
pushq $0x4
popq %rsi
pushq $0x5
popq %r14
movq %rbx, %rdi
movl %r14d, %edx
callq 0x3998
movq %rbx, %rdi
movl %r14d, %esi
callq 0x4358
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x498b
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x2e62
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x2f1e
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x3053
// File: /workspace/github_cpp_makefile_star2_O2/vssense[P]Compiler/src/back-end/compiling.cpp
// Function: WriteAsmAssignment(Node*, Compiler*)
void WriteAsmAssignment(Node* node, Compiler* compiler)
{
    ASSERT_COMPILER;

    WriteAsmExpression(node->right, compiler);

    if (node->left->type == MEM_ACCESS_TYPE)
    {
        WriteAsmExpression(node->left->right, compiler);

        WriteMovR64Mem(compiler, RAX, RBP, GetVarOfs(FUNC, node->left->left->value.name));
        WritePopR64   (compiler, RBX);
        WriteSalR64   (compiler, RBX, 3);    //sizeof(int64_t)
        WriteSubR64R64(compiler, RAX, RBX);
        WritePopR64   (compiler, RBX);
        WriteMovMemR64(compiler, RAX, RBX);

        return;
    }

    WritePopR64   (compiler, RAX);
    WriteMovMemR64(compiler, RBP, RAX, GetVarOfs(FUNC, node->left->value.name));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq 0x20(%rdi), %rdi
callq 0x2ec5
movq 0x18(%r14), %rax
cmpl $0x3, (%rax)
jne 0x2e34
movq 0x20(%rax), %rdi
movq %rbx, %rsi
callq 0x2ec5
movq 0x8(%rbx), %rdi
movq 0x18(%r14), %rax
movq 0x18(%rax), %rax
movq 0x8(%rax), %rsi
callq 0x31ee
pushq $0x5
popq %rdx
movq %rbx, %rdi
xorl %esi, %esi
movl %eax, %ecx
callq 0x3a53
pushq $0x3
popq %r14
movq %rbx, %rdi
movl %r14d, %esi
callq 0x4358
movq %rbx, %rdi
movl %r14d, %esi
movl %r14d, %edx
callq 0x443d
movq %rbx, %rdi
xorl %esi, %esi
movl %r14d, %edx
callq 0x3eae
movq %rbx, %rdi
movl %r14d, %esi
callq 0x4358
movq %rbx, %rdi
xorl %esi, %esi
movl %r14d, %edx
xorl %ecx, %ecx
jmp 0x2e59
movq %rbx, %rdi
xorl %esi, %esi
callq 0x4358
movq 0x8(%rbx), %rdi
movq 0x18(%r14), %rax
movq 0x8(%rax), %rsi
callq 0x31ee
pushq $0x5
popq %rsi
movq %rbx, %rdi
xorl %edx, %edx
movl %eax, %ecx
popq %rbx
popq %r14
popq %rbp
jmp 0x3b4c
// File: /workspace/github_cpp_makefile_star2_O2/vssense[P]Compiler/src/back-end/compiling.cpp
// Function: WriteAsmArrayDeclaration(Node*, Compiler*)
void WriteAsmArrayDeclaration(Node* node, Compiler* compiler)
{
    ASSERT_COMPILER;

    WriteAsmExpression(node->right, compiler);

    WriteMovMemR64(compiler, RBP, RSP, GetVarOfs(FUNC, node->left->value.name));
    WritePopR64   (compiler, RAX);
    WriteSalR64   (compiler, RAX, 3); //sizeof(int64_t)
    WriteSubR64R64(compiler, RSP, RAX);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq 0x20(%rdi), %rdi
callq 0x2ec5
movq 0x8(%rbx), %rdi
movq 0x18(%r14), %rax
movq 0x8(%rax), %rsi
callq 0x31ee
pushq $0x5
popq %rsi
pushq $0x4
popq %r14
movq %rbx, %rdi
movl %r14d, %edx
movl %eax, %ecx
callq 0x3b4c
movq %rbx, %rdi
xorl %esi, %esi
callq 0x4358
pushq $0x3
popq %rdx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x443d
movq %rbx, %rdi
movl %r14d, %esi
xorl %edx, %edx
popq %rbx
popq %r14
popq %rbp
jmp 0x3eae
// File: /workspace/github_cpp_makefile_star2_O2/vssense[P]Compiler/src/back-end/compiling.cpp
// Function: WriteAsmExpression(Node*, Compiler*)
void WriteAsmExpression(Node* node, Compiler* compiler)
{
    if (node == nullptr)
    {
        return;    
    }

    ASSERT_COMPILER;

    if (node->type == MATH_TYPE && node->value.op >= EQUAL_OP) // is comparison
    {
        WriteAsmExpression(node->left,  compiler);
        WriteAsmExpression(node->right, compiler);
        WriteAsmCompare(node, compiler);
    }
    else
    {
        WriteAsmSimpleExpression(node, compiler);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x2f19
movq %rsi, %rbx
movq %rdi, %r14
cmpl $0xe, (%rdi)
jne 0x2f0a
cmpl $0x3, 0x8(%r14)
jle 0x2f0a
movq 0x18(%r14), %rdi
movq %rbx, %rsi
callq 0x2ec5
movq 0x20(%r14), %rdi
movq %rbx, %rsi
callq 0x2ec5
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x32d3
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x33ae
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/vssense[P]Compiler/src/back-end/compiling.cpp
// Function: WriteAsmCondition(Node*, Compiler*)
void WriteAsmCondition(Node* node, Compiler* compiler)
{
    ASSERT_COMPILER;

    WriteAsmExpression(node->left, compiler);

    size_t true_label = compiler->label++;
    size_t false_label = compiler->label++;
    size_t continue_label = compiler->label++;

    WritePopR64(compiler, RAX);
    WriteTest  (compiler, RAX, RAX);

    size_t true_jump_offset  = WriteJumpOp(compiler, NOT_EQUAL_OP, true_label);
    size_t false_jump_offset = WriteJump  (compiler, false_label);
    size_t true_label_offset = WriteLabel (compiler, true_label);

    WriteAsmCompound(node->right->left->right, compiler);

    size_t continue_jump_offset = WriteJump(compiler, continue_label);
    size_t false_label_offset   = WriteLabel(compiler, false_label);

    if (node->right->right != nullptr)
    {
        WriteAsmCompound(node->right->right->right, compiler);
    }

    size_t continue_label_offset = WriteLabel(compiler, continue_label);

    SetInt(&compiler->writer, true_label_offset - true_jump_offset - sizeof(int), true_jump_offset);
    SetInt(&compiler->writer, false_label_offset - false_jump_offset - sizeof(int), false_jump_offset);
    SetInt(&compiler->writer, continue_label_offset - continue_jump_offset - sizeof(int), continue_jump_offset);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq %rdi, %r12
movq 0x18(%rdi), %rdi
callq 0x2ec5
movq 0x18(%rbx), %r14
leaq 0x1(%r14), %r13
movq %r13, -0x30(%rbp)
leaq 0x2(%r14), %r15
leaq 0x3(%r14), %rax
movq %rax, 0x18(%rbx)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x4358
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x45b0
pushq $0x5
popq %rsi
movq %rbx, %rdi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0x466d
movq %rax, -0x40(%rbp)
movq %rbx, %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0x4727
movq %rax, -0x48(%rbp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x47ad
movq %rax, %r13
movq 0x20(%r12), %rax
movq 0x18(%rax), %rax
movq 0x20(%rax), %rdi
movq %rbx, %rsi
callq 0x2cb9
movq %rbx, %rdi
movq %r15, %r14
movq %r15, %rsi
xorl %edx, %edx
callq 0x4727
movq %rax, -0x38(%rbp)
movq %rbx, %rdi
movq -0x30(%rbp), %rsi
callq 0x47ad
movq %rax, %r15
movq 0x20(%r12), %rax
movq 0x20(%rax), %rax
testq %rax, %rax
je 0x2ff1
movq 0x20(%rax), %rdi
movq %rbx, %rsi
callq 0x2cb9
movq %rbx, %rdi
movq %r14, %rsi
callq 0x47ad
movq %rax, %r12
addq $0x28, %rbx
movq -0x40(%rbp), %rdx
subl %edx, %r13d
addl $-0x4, %r13d
movq %rbx, %rdi
movl %r13d, %esi
callq 0x4dfd
movq -0x48(%rbp), %rdx
subl %edx, %r15d
addl $-0x4, %r15d
movq %rbx, %rdi
movl %r15d, %esi
callq 0x4dfd
movq -0x38(%rbp), %rdx
subl %edx, %r12d
addl $-0x4, %r12d
movq %rbx, %rdi
movl %r12d, %esi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4dfd
// File: /workspace/github_cpp_makefile_star2_O2/vssense[P]Compiler/src/back-end/compiling.cpp
// Function: WriteAsmLoop(Node*, Compiler*)
void WriteAsmLoop(Node* node, Compiler* compiler)
{
    ASSERT_COMPILER;

    size_t loop_label     = compiler->label++;
    size_t continue_label = compiler->label++;

    size_t loop_label_offset = WriteLabel(compiler, loop_label);

    WriteAsmExpression(node->left, compiler);

    WritePopR64(compiler, RAX);
    WriteTest  (compiler, RAX, RAX);
    size_t continue_jump_offset = WriteJumpOp(compiler, EQUAL_OP, continue_label);

    WriteAsmCompound(node->right->right, compiler);

    size_t loop_jump_offset      = WriteJump (compiler, loop_label);
    size_t continue_label_offset = WriteLabel(compiler, continue_label);

    SetInt(&compiler->writer, loop_label_offset     - loop_jump_offset     - sizeof(int), loop_jump_offset);
    SetInt(&compiler->writer, continue_label_offset - continue_jump_offset - sizeof(int), continue_jump_offset);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r15
movq 0x18(%rsi), %r12
leaq 0x1(%r12), %r13
movq %r13, -0x30(%rbp)
leaq 0x2(%r12), %rax
movq %rax, 0x18(%rsi)
movq %rsi, %rdi
movq %r12, %rsi
callq 0x47ad
movq %rax, %r14
movq 0x18(%r15), %rdi
movq %rbx, %rsi
callq 0x2ec5
movq %rbx, %rdi
xorl %esi, %esi
callq 0x4358
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x45b0
pushq $0x4
popq %rsi
movq %rbx, %rdi
movq %r13, %rdx
xorl %ecx, %ecx
callq 0x466d
movq %rax, %r13
movq 0x20(%r15), %rax
movq 0x20(%rax), %rdi
movq %rbx, %rsi
callq 0x2cb9
movq %rbx, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x4727
movq %rax, %r15
movq %rbx, %rdi
movq -0x30(%rbp), %rsi
callq 0x47ad
movq %rax, %r12
addq $0x28, %rbx
subl %r15d, %r14d
addl $-0x4, %r14d
movq %rbx, %rdi
movl %r14d, %esi
movq %r15, %rdx
callq 0x4dfd
subl %r13d, %r12d
addl $-0x4, %r12d
movq %rbx, %rdi
movl %r12d, %esi
movq %r13, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4dfd
// File: /workspace/github_cpp_makefile_star2_O2/vssense[P]Compiler/src/back-end/compiling.cpp
// Function: WriteAsmCall(Node*, Compiler*)
void WriteAsmCall(Node* node, Compiler* compiler)
{
    if (WriteAsmStdCall(node, compiler))
    {
        return;
    }

    ASSERT_COMPILER;

    Function* call_func = FindFunc(node->left->value.name, compiler->table);

    if (call_func != nullptr)
    {       
        for (size_t i = 0; i < call_func->num_args; ++i)
        {
            node = node->right;
            if (node == nullptr)
            {
                printf("error : too few arguments for '%s'\n", call_func->name);
                return;
            }

            WriteAsmExpression(node->left, compiler);
        }

        if (node->right != nullptr)
        {
            printf("error : too more arguments for '%s'\n", call_func->name);
        }

        WriteCall     (compiler, call_func);
        WriteAddR64Num(compiler, RSP, call_func->num_args * 8);

        if (!call_func->is_void)
        {
            WritePushR64(compiler, RAX);
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r15
callq 0x357f
testb %al, %al
jne 0x31ba
movq 0x18(%r15), %rax
movq 0x8(%rax), %rdi
movq (%rbx), %rsi
callq 0x2c2e
testq %rax, %rax
je 0x31ba
movq %rax, %r14
xorl %r12d, %r12d
movq 0x20(%r15), %r15
cmpq 0x18(%r14), %r12
jae 0x3180
testq %r15, %r15
je 0x31c3
movq 0x18(%r15), %rdi
movq %rbx, %rsi
callq 0x2ec5
incq %r12
jmp 0x3160
testq %r15, %r15
je 0x3196
movq (%r14), %rsi
leaq 0x5933(%rip), %rdi      # 0x8ac2
xorl %eax, %eax
callq 0x2040
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4811
movl 0x18(%r14), %edx
shll $0x3, %edx
pushq $0x4
popq %rsi
movq %rbx, %rdi
callq 0x3dac
cmpb $0x0, 0x10(%r14)
je 0x31dc
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq (%r14), %rsi
leaq 0x58d1(%rip), %rdi      # 0x8a9e
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2040
movq %rbx, %rdi
xorl %esi, %esi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x41cb
// File: /workspace/github_cpp_makefile_star2_O2/vssense[P]Compiler/src/back-end/compiling.cpp
// Function: GetVarOfs(Function*, char*)
int GetVarOfs(Function* function, char* name)
{
    assert(function);
    assert(name);

    for (size_t i = 0; i < function->num_args; ++i)
    {
        if (strcmp(function->vars[i], name) == 0)
        {
            return (i + 2) * sizeof(int64_t);
        }
    }

    for (size_t i = function->num_args; i < function->num_vars + function->num_args; ++i)
    {
        if (strcmp(function->vars[i], name) == 0)
        {
            return - (i - function->num_args + 1) * sizeof(int64_t);
        }
    }
    
    printf("error : '%s' wasn't declarated here\n", name);
    return -0xFFFFFFFF;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x3295
movq %rsi, %rbx
testq %rsi, %rsi
je 0x32b4
movq %rdi, %r14
movq 0x18(%rdi), %r12
pushq $0x10
popq %r15
xorl %r13d, %r13d
cmpq %r13, %r12
je 0x3241
movq 0x8(%r14), %rax
movq (%rax,%r13,8), %rdi
movq %rbx, %rsi
callq 0x2170
testl %eax, %eax
je 0x3283
incq %r13
addl $0x8, %r15d
jmp 0x321f
movq 0x20(%r14), %r13
addq %r12, %r13
pushq $-0x8
popq %r15
cmpq %r13, %r12
jae 0x326e
movq 0x8(%r14), %rax
movq (%rax,%r12,8), %rdi
movq %rbx, %rsi
callq 0x2170
testl %eax, %eax
je 0x3283
incq %r12
addl $-0x8, %r15d
jmp 0x324c
leaq 0x58f7(%rip), %rdi      # 0x8b6c
movq %rbx, %rsi
xorl %eax, %eax
callq 0x2040
pushq $0x1
popq %r15
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x58a5(%rip), %rdi      # 0x8b41
leaq 0x5618(%rip), %rsi      # 0x88bb
leaq 0x58a0(%rip), %rcx      # 0x8b4a
movl $0x2b5, %edx            # imm = 0x2B5
callq 0x20b0
leaq 0x72c5(%rip), %rdi      # 0xa580
leaq 0x55f9(%rip), %rsi      # 0x88bb
leaq 0x5881(%rip), %rcx      # 0x8b4a
movl $0x2b6, %edx            # imm = 0x2B6
callq 0x20b0
// File: /workspace/github_cpp_makefile_star2_O2/vssense[P]Compiler/src/back-end/compiling.cpp
// Function: WriteAsmCompare(Node*, Compiler*)
void WriteAsmCompare(Node* node, Compiler* compiler)
{
    ASSERT_COMPILER;

    WritePopR64   (compiler, RAX);
    WritePopR64   (compiler, RBX);
    WriteCmpR64R64(compiler, RBX, RAX);

    size_t true_label     = compiler->label++;
    size_t continue_label = compiler->label++;

    size_t true_jump_offset = WriteJumpOp(compiler, node->value.op, true_label);

    WritePushNum(compiler, 0);
    size_t continue_jump_offset  = WriteJump (compiler, continue_label);
    size_t true_label_offset     = WriteLabel(compiler, true_label);

    WritePushNum(compiler, 1);
    size_t continue_label_offset = WriteLabel(compiler, continue_label);

    SetInt(&compiler->writer, true_label_offset     - true_jump_offset     - sizeof(int), true_jump_offset);
    SetInt(&compiler->writer, continue_label_offset - continue_jump_offset - sizeof(int), continue_jump_offset);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
xorl %esi, %esi
callq 0x4358
pushq $0x3
popq %r15
movq %rbx, %rdi
movl %r15d, %esi
callq 0x4358
movq %rbx, %rdi
movl %r15d, %esi
xorl %edx, %edx
callq 0x44f3
movq 0x18(%rbx), %r13
leaq 0x1(%r13), %r12
leaq 0x2(%r13), %rax
movq %rax, 0x18(%rbx)
movl 0x8(%r14), %esi
movq %rbx, %rdi
movq %r13, %rdx
xorl %ecx, %ecx
callq 0x466d
movq %rax, %r14
movq %rbx, %rdi
xorl %esi, %esi
callq 0x42b0
movq %rbx, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x4727
movq %rax, %r15
movq %rbx, %rdi
movq %r13, %rsi
callq 0x47ad
movq %rax, %r13
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x42b0
movq %rbx, %rdi
movq %r12, %rsi
callq 0x47ad
movq %rax, %r12
addq $0x28, %rbx
subl %r14d, %r13d
addl $-0x4, %r13d
movq %rbx, %rdi
movl %r13d, %esi
movq %r14, %rdx
callq 0x4dfd
subl %r15d, %r12d
addl $-0x4, %r12d
movq %rbx, %rdi
movl %r12d, %esi
movq %r15, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4dfd
// File: /workspace/github_cpp_makefile_star2_O2/vssense[P]Compiler/src/back-end/compiling.cpp
// Function: WriteAsmSimpleExpression(Node*, Compiler*)
void WriteAsmSimpleExpression(Node* node, Compiler* compiler)
{
    ASSERT_COMPILER;

    if (node->type == MATH_TYPE)
    {
        WriteAsmSimpleExpression(node->left,  compiler);
        WriteAsmSimpleExpression(node->right, compiler);
        
        WritePopR64(compiler, RBX);
        WritePopR64(compiler, RAX);

        switch (node->value.op)
        {
            case ADD_OP :
            {   
                WriteAddR64R64(compiler, RAX, RBX);
                break;
            }
            case SUB_OP :
            {
                WriteSubR64R64(compiler, RAX, RBX);
                break;
            }
            case MUL_OP :
            {
                WriteMulR64(compiler, RBX);
                break;
            }
            case DIV_OP :
            {   
                WriteDivR64(compiler, RBX);
                break;
            }
            default:
            {
                printf("I am here, but I shouldn't, line = %d\n", __LINE__);
            }
        }

        WritePushR64(compiler, RAX);
    }
    else
    {
        WriteAsmPrimaryExpression(node, compiler);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
cmpl $0xe, (%rdi)
jne 0x3416
movq 0x18(%r14), %rdi
movq %rbx, %rsi
callq 0x33ae
movq 0x20(%r14), %rdi
movq %rbx, %rsi
callq 0x33ae
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x4358
movq %rbx, %rdi
xorl %esi, %esi
callq 0x4358
movl 0x8(%r14), %eax
cmpq $0x3, %rax
ja 0x344e
leaq 0x4c56(%rip), %rcx      # 0x8054
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
pushq $0x3
popq %rdx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x3cef
jmp 0x3461
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x346f
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x406d
jmp 0x3461
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x410f
jmp 0x3461
pushq $0x3
popq %rdx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x3eae
jmp 0x3461
leaq 0x5622(%rip), %rdi      # 0x8a77
movl $0x20f, %esi            # imm = 0x20F
xorl %eax, %eax
callq 0x2040
movq %rbx, %rdi
xorl %esi, %esi
popq %rbx
popq %r14
popq %rbp
jmp 0x41cb
// File: /workspace/github_cpp_makefile_star2_O2/vssense[P]Compiler/src/back-end/compiling.cpp
// Function: WriteAsmPrimaryExpression(Node*, Compiler*)
void WriteAsmPrimaryExpression(Node* node, Compiler* compiler)
{
    ASSERT_COMPILER;

    switch (node->type)
    {
        case ID_TYPE :
        {
            WriteMovR64Mem(compiler, RAX, RBP, GetVarOfs(FUNC, node->value.name));
            WritePushR64  (compiler, RAX);
            break;
        }
        case NUMB_TYPE :
        {
            WritePushNum(compiler, node->value.number);
            break;
        }
        case MEM_ACCESS_TYPE :
        {
            WriteAsmMemoryAccess(node, compiler);
            break;
        }
        case CALL_TYPE :
        {
            WriteAsmCall(node, compiler);
            break;
        }
        default :
        {
            printf("I am here, but I shouldn't, line = %d\n", __LINE__);
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl (%rdi), %eax
cmpl $0x3, %eax
je 0x34dc
cmpl $0xf, %eax
je 0x34bd
cmpl $0xc, %eax
je 0x34ce
cmpl $0x4, %eax
jne 0x34ea
movq 0x8(%rbx), %rax
movq 0x8(%rdi), %rsi
movq %rax, %rdi
callq 0x31ee
pushq $0x5
popq %rdx
movq %rbx, %rdi
xorl %esi, %esi
movl %eax, %ecx
callq 0x3a53
movq %rbx, %rdi
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x41cb
movl 0x8(%rdi), %esi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x42b0
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x312b
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x3503
leaq 0x5586(%rip), %rdi      # 0x8a77
movl $0x238, %esi            # imm = 0x238
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x2040
// File: /workspace/github_cpp_makefile_star2_O2/vssense[P]Compiler/src/back-end/compiling.cpp
// Function: WriteAsmMemoryAccess(Node*, Compiler*)
void WriteAsmMemoryAccess(Node* node, Compiler* compiler)
{
    ASSERT_COMPILER;

    WriteAsmExpression(node->right, compiler);

    WriteMovR64Mem(compiler, RAX, RBP, GetVarOfs(FUNC, node->left->value.name));
    WritePopR64   (compiler, RBX);
    WriteSalR64   (compiler, RBX, 3);
    WriteSubR64R64(compiler, RAX, RBX);
    WriteMovR64Mem(compiler, RAX, RAX);
    WritePushR64  (compiler, RAX);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq 0x20(%rdi), %rdi
callq 0x2ec5
movq 0x8(%rbx), %rdi
movq 0x18(%r14), %rax
movq 0x8(%rax), %rsi
callq 0x31ee
pushq $0x5
popq %rdx
movq %rbx, %rdi
xorl %esi, %esi
movl %eax, %ecx
callq 0x3a53
pushq $0x3
popq %r14
movq %rbx, %rdi
movl %r14d, %esi
callq 0x4358
movq %rbx, %rdi
movl %r14d, %esi
movl %r14d, %edx
callq 0x443d
movq %rbx, %rdi
xorl %esi, %esi
movl %r14d, %edx
callq 0x3eae
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x3a53
movq %rbx, %rdi
xorl %esi, %esi
popq %rbx
popq %r14
popq %rbp
jmp 0x41cb
// File: /workspace/github_cpp_makefile_star2_O2/vssense[P]Compiler/src/back-end/compiling.cpp
// Function: WriteAsmStdCall(Node*, Compiler*)
bool WriteAsmStdCall(Node* node, Compiler* compiler)
{
    ASSERT_COMPILER;

    if (strcmp(node->left->value.name, SCAN) == 0)
    {
        WriteCall   (compiler, "scan");
        WritePushR64(compiler, RAX);
        return true;
    }

    if (strcmp(node->left->value.name, PRINT) == 0)
    {
        WriteAsmExpression(node->right->left, compiler);

        WriteCall  (compiler, "print");
        WritePopR64(compiler, RBX); //cleaning stack
        return true;
    }

    return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x18(%rdi), %rax
movq 0x8(%rax), %r15
movq 0xaba2(%rip), %rsi      # 0xe140
movq %r15, %rdi
callq 0x2170
testl %eax, %eax
je 0x35c1
movq 0xab97(%rip), %rsi      # 0xe148
movq %r15, %rdi
callq 0x2170
testl %eax, %eax
je 0x35dc
xorl %eax, %eax
jmp 0x3608
leaq 0x551f(%rip), %rsi      # 0x8ae7
movq %rbx, %rdi
callq 0x48c2
movq %rbx, %rdi
xorl %esi, %esi
callq 0x41cb
jmp 0x3606
movq 0x20(%r14), %rax
movq 0x18(%rax), %rdi
movq %rbx, %rsi
callq 0x2ec5
leaq 0x54f9(%rip), %rsi      # 0x8aec
movq %rbx, %rdi
callq 0x48c2
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x4358
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/vssense[P]Compiler/src/back-end/compiling.cpp
// Function: GetNumFunc(Tree*)
size_t GetNumFunc(Tree* tree)
{
    assert(tree);

    size_t result = 0;
    Node* node = tree->root;

    while (node != nullptr)
    {
        node = node->left;
        result++;
    }

    return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testq %rdi, %rdi
je 0x3631
xorl %eax, %eax
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x362f
addq $0x18, %rdi
incq %rax
jmp 0x361e
popq %rbp
retq
leaq 0x5622(%rip), %rdi      # 0x8c5a
leaq 0x527c(%rip), %rsi      # 0x88bb
leaq 0x55b5(%rip), %rcx      # 0x8bfb
movl $0x2f0, %edx            # imm = 0x2F0
callq 0x20b0
// File: /workspace/github_cpp_makefile_star2_O2/vssense[P]Compiler/src/back-end/compiling.cpp
// Function: NewNameTable()
NameTable* NewNameTable()
{
    NameTable* table = (NameTable*)calloc(1, sizeof(NameTable));
    assert(table);

    table->num_func  = 0;
    table->functions = nullptr;

    return table;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq $0x1
popq %rdi
pushq $0x10
popq %rsi
callq 0x20c0
testq %rax, %rax
je 0x3666
popq %rbp
retq
leaq 0x52e3(%rip), %rdi      # 0x8950
leaq 0x5247(%rip), %rsi      # 0x88bb
leaq 0x559a(%rip), %rcx      # 0x8c15
movl $0x301, %edx            # imm = 0x301
callq 0x20b0
// File: /workspace/github_cpp_makefile_star2_O2/vssense[P]Compiler/src/back-end/compiling.cpp
// Function: FillNameTable(NameTable*, Tree*)
void FillNameTable(NameTable* table, Tree* tree)
{
    assert(table);
    assert(tree);

    Node* node = tree->root;

    for (size_t i = 0; i < table->num_func; ++i)
    {
        GetFunction(node->right, table->functions + i);
        node = node->left;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %rdi, %rdi
je 0x36d4
movq %rsi, %rbx
testq %rsi, %rsi
je 0x36f3
movq %rdi, %r14
xorl %r15d, %r15d
xorl %r12d, %r12d
cmpq 0x8(%r14), %r12
jae 0x36cb
movq (%rbx), %rbx
movq 0x20(%rbx), %rdi
movq (%r14), %rsi
addq %r15, %rsi
callq 0x3712
addq $0x18, %rbx
incq %r12
addq $0x30, %r15
jmp 0x36a6
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5275(%rip), %rdi      # 0x8950
leaq 0x51d9(%rip), %rsi      # 0x88bb
leaq 0x5546(%rip), %rcx      # 0x8c2f
movl $0x30b, %edx            # imm = 0x30B
callq 0x20b0
leaq 0x5560(%rip), %rdi      # 0x8c5a
leaq 0x51ba(%rip), %rsi      # 0x88bb
leaq 0x5527(%rip), %rcx      # 0x8c2f
movl $0x30c, %edx            # imm = 0x30C
callq 0x20b0
// File: /workspace/github_cpp_makefile_star2_O2/vssense[P]Compiler/src/back-end/compiling.cpp
// Function: GetFunction(Node*, Function*)
void GetFunction(Node* subtree, Function* function)
{
    assert(subtree);
    assert(function);

    function->name     = subtree->value.name;
    function->is_void  = subtree->parent->value.is_void;

    function->num_args = GetNumArgs(subtree->right);
    function->num_vars = GetNumVars(subtree->left->right);

    function->vars = (char**)calloc(function->num_args + function->num_vars, sizeof(char*));

    GetNames(function->vars, subtree);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x3786
movq %rsi, %r14
testq %rsi, %rsi
je 0x37a5
movq %rdi, %rbx
movq 0x8(%rdi), %rax
movq %rax, (%r14)
movq 0x10(%rdi), %rax
movb 0x8(%rax), %al
movb %al, 0x10(%r14)
movq 0x20(%rdi), %rdi
callq 0x37c4
movq %rax, %r15
movq %rax, 0x18(%r14)
movq 0x18(%rbx), %rax
movq 0x20(%rax), %rdi
callq 0x37da
movq %rax, 0x20(%r14)
addq %rax, %r15
pushq $0x8
popq %rsi
movq %r15, %rdi
callq 0x20c0
movq %rax, 0x8(%r14)
movq %rax, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x3818
leaq 0x54ca(%rip), %rdi      # 0x8c57
leaq 0x5127(%rip), %rsi      # 0x88bb
leaq 0x54c4(%rip), %rcx      # 0x8c5f
movl $0x319, %edx            # imm = 0x319
callq 0x20b0
leaq 0x5395(%rip), %rdi      # 0x8b41
leaq 0x5108(%rip), %rsi      # 0x88bb
leaq 0x54a5(%rip), %rcx      # 0x8c5f
movl $0x31a, %edx            # imm = 0x31A
callq 0x20b0
// File: /workspace/github_cpp_makefile_star2_O2/vssense[P]Compiler/src/back-end/compiling.cpp
// Function: GetNumVars(Node*)
size_t GetNumVars(Node* node)
{
    if (node == nullptr)
    {
        return 0;
    }

    int num = 0;

    if (node->type == DECL_TYPE || node->type == ADECL_TYPE)
    {
        num = 1;
    }

    return num + GetNumVars(node->left) + GetNumVars(node->right);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
xorl %ebx, %ebx
testq %r14, %r14
je 0x380a
movl (%r14), %r15d
decl %r15d
movq 0x18(%r14), %rdi
callq 0x37da
cmpl $0x2, %r15d
movq 0x20(%r14), %r14
adcq %rax, %rbx
jmp 0x37e9
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/vssense[P]Compiler/src/back-end/compiling.cpp
// Function: GetNames(char**, Node*)
void GetNames(char** vars, Node* subtree)
{
    assert(vars);
    assert(subtree);

    Node* arg = subtree->right;

    size_t ofs = 0;

    for (; arg != nullptr; ++ofs)
    {
        vars[ofs] = arg->value.name;

        arg = arg->right;
    }

    GetVars(subtree->left->right, vars, &ofs);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
testq %rdi, %rdi
je 0x3866
testq %rsi, %rsi
je 0x3885
movq %rdi, %rax
movq 0x20(%rsi), %rdx
xorl %ecx, %ecx
testq %rdx, %rdx
je 0x3849
movq 0x8(%rdx), %rdi
movq %rdi, (%rax,%rcx,8)
movq 0x20(%rdx), %rdx
incq %rcx
jmp 0x3833
leaq -0x8(%rbp), %rdx
movq %rcx, (%rdx)
movq 0x18(%rsi), %rcx
movq 0x20(%rcx), %rdi
movq %rax, %rsi
callq 0x38a4
addq $0x10, %rsp
popq %rbp
retq
leaq 0x5417(%rip), %rdi      # 0x8c84
leaq 0x5047(%rip), %rsi      # 0x88bb
leaq 0x540e(%rip), %rcx      # 0x8c89
movl $0x347, %edx            # imm = 0x347
callq 0x20b0
leaq 0x53cb(%rip), %rdi      # 0x8c57
leaq 0x5028(%rip), %rsi      # 0x88bb
leaq 0x53ef(%rip), %rcx      # 0x8c89
movl $0x348, %edx            # imm = 0x348
callq 0x20b0
// File: /workspace/github_cpp_makefile_star2_O2/vssense[P]Compiler/src/back-end/compiling.cpp
// Function: GetVars(Node*, char**, unsigned long*)
void GetVars(Node* node, char** vars, size_t* ofs)
{
    assert(vars);
    assert(ofs);

    if (node == nullptr)
    {
        return;
    }

    if (node->type == DECL_TYPE || node->type == ADECL_TYPE)
    {
        vars[(*ofs)++] = node->left->value.name;
    }

    GetVars(node->right, vars, ofs);
    GetVars(node->left,  vars, ofs);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0x3906
movq %rdx, %rbx
testq %rdx, %rdx
je 0x3925
movq %rsi, %r14
movq %rdi, %r15
testq %r15, %r15
je 0x38fb
movl (%r15), %eax
decl %eax
cmpl $0x1, %eax
ja 0x38e6
movq 0x18(%r15), %rax
movq 0x8(%rax), %rax
movq (%rbx), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, (%rbx)
movq %rax, (%r14,%rcx,8)
movq 0x20(%r15), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x38a4
movq 0x18(%r15), %r15
jmp 0x38c1
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5377(%rip), %rdi      # 0x8c84
leaq 0x4fa7(%rip), %rsi      # 0x88bb
leaq 0x538d(%rip), %rcx      # 0x8ca8
movl $0x35a, %edx            # imm = 0x35A
callq 0x20b0
leaq 0x53a4(%rip), %rdi      # 0x8cd0
leaq 0x4f88(%rip), %rsi      # 0x88bb
leaq 0x536e(%rip), %rcx      # 0x8ca8
movl $0x35b, %edx            # imm = 0x35B
callq 0x20b0
// File: /workspace/github_cpp_makefile_star2_O2/vssense[P]Compiler/src/back-end/byte_code.cpp
// Function: WriteMovR64R64(Compiler*, R64, R64)
void WriteMovR64R64(Compiler* compiler, R64 reg1, R64 reg2)
{
    assert(compiler);

    SetByte(&compiler->writer, CodeRexByteR64R64(reg1, reg2));
    SetByte(&compiler->writer, mov_r64_r64);
    SetByte(&compiler->writer, CodeR64R64(mode_r64_r64, reg2, reg1));

    if (compiler->asm_listing_required)
    {
        fprintf(compiler->file, "mov %s, %s\n\t", REGS[reg1], REGS[reg2]);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %rdi, %rdi
je 0x3a36
movl %edx, %ebx
movl %esi, %r14d
movq %rdi, %r15
leaq 0x28(%rdi), %r12
cmpl $0x8, %esi
setge %al
cmpl $0x8, %edx
setge %cl
shlb $0x2, %cl
orb %al, %cl
orb $0x48, %cl
movzbl %cl, %esi
movq %r12, %rdi
callq 0x4d94
pushq $-0x77
popq %rsi
movq %r12, %rdi
callq 0x4d94
movl %r14d, %eax
andl $0x7, %eax
leal (%rax,%rbx,8), %eax
orb $-0x40, %al
movsbl %al, %esi
movq %r12, %rdi
callq 0x4d94
cmpb $0x1, 0x20(%r15)
jne 0x3a2d
movq 0x10(%r15), %rdi
movl %r14d, %eax
leaq 0xa743(%rip), %rcx      # 0xe150
movq (%rcx,%rax,8), %rdx
movl %ebx, %eax
movq (%rcx,%rax,8), %rcx
leaq 0x539d(%rip), %rsi      # 0x8dbb
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2180
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4ec8(%rip), %rdi      # 0x8905
leaq 0x5332(%rip), %rsi      # 0x8d76
leaq 0x5346(%rip), %rcx      # 0x8d91
pushq $0x6e
popq %rdx
callq 0x20b0
// File: /workspace/github_cpp_makefile_star2_O2/vssense[P]Compiler/src/back-end/byte_code.cpp
// Function: WriteMovR64Mem(Compiler*, R64, R64, int)
void WriteMovR64Mem(Compiler* compiler, R64 reg1, R64 reg2, int offset)
{
    assert(compiler);

    SetByte(&compiler->writer, CodeRexByteR64R64(reg1, reg2));
    SetByte(&compiler->writer, mov_r64_mem);
    SetByte(&compiler->writer, CodeR64R64(mode_r64_mem_4_bytes, reg1, reg2));

    if (reg2 == RSP || reg2 == R12)
    {
        SetByte(&compiler->writer, additional_rsp_r12_byte);
    }

    SetInt(&compiler->writer, offset);

    if (compiler->asm_listing_required)
    {
        fprintf(compiler->file, "mov %s, [%s + %d]\n\t", REGS[reg1], REGS[reg2], offset);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x3b2f
movl %ecx, %ebx
movl %edx, %r14d
movl %esi, %r15d
movq %rdi, %r12
leaq 0x28(%rdi), %r13
cmpl $0x8, %esi
setge %al
cmpl $0x8, %edx
setge %cl
shlb $0x2, %cl
orb %al, %cl
orb $0x48, %cl
movzbl %cl, %esi
movq %r13, %rdi
callq 0x4d94
pushq $-0x75
popq %rsi
movq %r13, %rdi
callq 0x4d94
movl %r15d, %eax
andl $0x7, %eax
movl %r14d, %ecx
andl $0x7, %ecx
leal (%rcx,%rax,8), %eax
orb $-0x80, %al
movsbl %al, %esi
movq %r13, %rdi
callq 0x4d94
movl %r14d, %eax
andl $-0x9, %eax
cmpl $0x4, %eax
jne 0x3ad5
pushq $0x24
popq %rsi
movq %r13, %rdi
callq 0x4d94
movq %r13, %rdi
movl %ebx, %esi
callq 0x4dd5
cmpb $0x1, 0x20(%r12)
jne 0x3b20
movq 0x10(%r12), %rdi
movl %r15d, %eax
leaq 0xa65a(%rip), %rcx      # 0xe150
movq (%rcx,%rax,8), %rdx
movl %r14d, %eax
movq (%rcx,%rax,8), %rcx
leaq 0x52ef(%rip), %rsi      # 0x8df7
movl %ebx, %r8d
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2180
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4dcf(%rip), %rdi      # 0x8905
leaq 0x5239(%rip), %rsi      # 0x8d76
leaq 0x5284(%rip), %rcx      # 0x8dc8
pushq $0x7c
popq %rdx
callq 0x20b0
// File: /workspace/github_cpp_makefile_star2_O2/vssense[P]Compiler/src/back-end/byte_code.cpp
// Function: WriteMovMemR64(Compiler*, R64, R64, int)
void WriteMovMemR64(Compiler* compiler, R64 reg1, R64 reg2, int offset)
{
    assert(compiler);

    SetByte(&compiler->writer, CodeRexByteR64R64(reg2, reg1));
    SetByte(&compiler->writer, mov_mem_r64);
    SetByte(&compiler->writer, CodeR64R64(mode_r64_mem_4_bytes, reg2, reg1));

    if (reg1 == RSP || reg1 == R12)
    {
        SetByte(&compiler->writer, additional_rsp_r12_byte);
    }

    SetInt(&compiler->writer, offset);

    if (compiler->asm_listing_required)
    {
        fprintf(compiler->file, "mov [%s + %d], %s\n\t", REGS[reg1], offset, REGS[reg2]);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x3c27
movl %ecx, %ebx
movl %edx, %r14d
movl %esi, %r15d
movq %rdi, %r12
leaq 0x28(%rdi), %r13
cmpl $0x8, %edx
setge %al
cmpl $0x8, %esi
setge %cl
shlb $0x2, %cl
orb %al, %cl
orb $0x48, %cl
movzbl %cl, %esi
movq %r13, %rdi
callq 0x4d94
pushq $-0x77
popq %rsi
movq %r13, %rdi
callq 0x4d94
movl %r14d, %eax
andl $0x7, %eax
movl %r15d, %ecx
andl $0x7, %ecx
leal (%rcx,%rax,8), %eax
orb $-0x80, %al
movsbl %al, %esi
movq %r13, %rdi
callq 0x4d94
movl %r15d, %eax
andl $-0x9, %eax
cmpl $0x4, %eax
jne 0x3bce
pushq $0x24
popq %rsi
movq %r13, %rdi
callq 0x4d94
movq %r13, %rdi
movl %ebx, %esi
callq 0x4dd5
cmpb $0x1, 0x20(%r12)
jne 0x3c18
movq 0x10(%r12), %rdi
movl %r15d, %eax
leaq 0xa561(%rip), %rcx      # 0xe150
movq (%rcx,%rax,8), %rdx
movl %r14d, %eax
movq (%rcx,%rax,8), %r8
leaq 0x5239(%rip), %rsi      # 0x8e3a
movl %ebx, %ecx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2180
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4cd7(%rip), %rdi      # 0x8905
leaq 0x5141(%rip), %rsi      # 0x8d76
leaq 0x51cf(%rip), %rcx      # 0x8e0b
movl $0x91, %edx
callq 0x20b0
// File: /workspace/github_cpp_makefile_star2_O2/vssense[P]Compiler/src/back-end/byte_code.cpp
// Function: WriteMovR64Num(Compiler*, R64, long)
void WriteMovR64Num(Compiler* compiler, R64 reg, int64_t value)
{
    assert(compiler);

    if (compiler->memory_optimization_required && abs(value) < max_int)
    {
        if (reg > RDI)
        {
            SetByte(&compiler->writer, additional_push_pop_byte);
        }

        SetByte(&compiler->writer, CodeR64(mode_mov_r64_num, reg));
        SetInt(&compiler->writer, value);
    }
    else
    {
        SetByte(&compiler->writer, CodeRexByteR64(reg));
        SetByte(&compiler->writer, CodeR64(mode_mov_r64_num, reg));
        SetLong(&compiler->writer, value);
    }

    if (compiler->asm_listing_required)
    {
        fprintf(compiler->file, "mov %s, %ld\n\t", REGS[reg], value);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %rdi, %rdi
je 0x3cd0
movq %rdx, %rbx
movl %esi, %r14d
movq %rdi, %r15
leaq 0x28(%rdi), %r12
xorl %esi, %esi
cmpl $0x8, %r14d
setge %sil
orl $0x48, %esi
movq %r12, %rdi
callq 0x4d94
movl %r14d, %eax
andb $0x7, %al
orb $-0x48, %al
movsbl %al, %esi
movq %r12, %rdi
callq 0x4d94
movq %r12, %rdi
movq %rbx, %rsi
callq 0x4e09
cmpb $0x1, 0x20(%r15)
jne 0x3cc7
movq 0x10(%r15), %rdi
movl %r14d, %eax
leaq 0xa4a6(%rip), %rcx      # 0xe150
movq (%rcx,%rax,8), %rdx
leaq 0x51c7(%rip), %rsi      # 0x8e7c
movq %rbx, %rcx
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2180
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4c2e(%rip), %rdi      # 0x8905
leaq 0x5098(%rip), %rsi      # 0x8d76
leaq 0x5169(%rip), %rcx      # 0x8e4e
movl $0xa6, %edx
callq 0x20b0