LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/vssense[P]Compiler/src/back-end/byte_code.cpp
// Function: WriteSubR64R64(Compiler*, R64, R64)
void WriteSubR64R64(Compiler* compiler, R64 reg1, R64 reg2)
{
    assert(compiler);

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

    if (compiler->asm_listing_required)
    {
        fprintf(compiler->file, "sub %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 0x4182
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 0x5014
movq %r12, %rdi
movl $0x29, %esi
callq 0x5014
movl %r14d, %eax
andl $0x7, %eax
leal (%rax,%rbx,8), %eax
orb $-0x40, %al
movsbl %al, %esi
movq %r12, %rdi
callq 0x5014
cmpb $0x1, 0x20(%r15)
jne 0x4179
movq 0x10(%r15), %rdi
movl %r14d, %eax
leaq 0x9ff7(%rip), %rcx      # 0xe150
movq (%rcx,%rax,8), %rdx
movl %ebx, %eax
movq (%rcx,%rax,8), %rcx
leaq 0x4db8(%rip), %rsi      # 0x8f22
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 0x477c(%rip), %rdi      # 0x8905
leaq 0x4be6(%rip), %rsi      # 0x8d76
leaq 0x4d61(%rip), %rcx      # 0x8ef8
movl $0xe8, %edx
callq 0x20b0
// File: /workspace/github_cpp_makefile_star2_O1/vssense[P]Compiler/src/back-end/byte_code.cpp
// Function: WriteSubR64Num(Compiler*, R64, int)
void WriteSubR64Num(Compiler* compiler, R64 reg, int value)
{
    assert(compiler);

    SetByte(&compiler->writer, CodeRexByteR64(reg));
    
    if (compiler->memory_optimization_required && abs(value) < max_char)
    {
        SetByte(&compiler->writer, sub_r64_num1);
        SetByte(&compiler->writer, CodeR64(mode_sub_r64_num, reg));

        SetByte(&compiler->writer, value);
    }
    else
    {
        SetByte(&compiler->writer, sub_r64_num4);
        SetByte(&compiler->writer, CodeR64(mode_sub_r64_num, reg));

        SetInt(&compiler->writer, value);
    }

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x4288
movl %edx, %ebx
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 0x5014
movl %ebx, %eax
negl %eax
cmovsl %ebx, %eax
movl %r14d, %r13d
andb $0x7, %r13b
orb $-0x18, %r13b
cmpb $0x1, 0x22(%r15)
jne 0x421f
cmpl $0xfe, %eax
ja 0x421f
movq %r12, %rdi
movl $0xffffff83, %esi       # imm = 0xFFFFFF83
callq 0x5014
movsbl %r13b, %esi
movq %r12, %rdi
callq 0x5014
movsbl %bl, %esi
movq %r12, %rdi
callq 0x5014
jmp 0x4242
movq %r12, %rdi
movl $0xffffff81, %esi       # imm = 0xFFFFFF81
callq 0x5014
movsbl %r13b, %esi
movq %r12, %rdi
callq 0x5014
movq %r12, %rdi
movl %ebx, %esi
callq 0x5055
cmpb $0x1, 0x20(%r15)
jne 0x4279
movq 0x10(%r15), %rdi
movl %r14d, %eax
leaq 0x9ef9(%rip), %rcx      # 0xe150
movq (%rcx,%rax,8), %rdx
leaq 0x4cf7(%rip), %rsi      # 0x8f59
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 0x4676(%rip), %rdi      # 0x8905
leaq 0x4ae0(%rip), %rsi      # 0x8d76
leaq 0x4c92(%rip), %rcx      # 0x8f2f
movl $0xf6, %edx
callq 0x20b0
// File: /workspace/github_cpp_makefile_star2_O1/vssense[P]Compiler/src/back-end/byte_code.cpp
// Function: WriteMulR64(Compiler*, R64)
void WriteMulR64(Compiler* compiler, R64 reg)
{
    assert(compiler);

    SetByte(&compiler->writer, CodeRexByteR64(reg));
    SetByte(&compiler->writer, mul_div_r64);
    SetByte(&compiler->writer, CodeR64(mode_mul_r64_num, reg));

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x432c
movl %esi, %ebx
movq %rdi, %r14
leaq 0x28(%rdi), %r15
xorl %esi, %esi
cmpl $0x8, %ebx
setge %sil
orl $0x48, %esi
movq %r15, %rdi
callq 0x5014
movq %r15, %rdi
movl $0xfffffff7, %esi       # imm = 0xFFFFFFF7
callq 0x5014
movl %ebx, %eax
andb $0x7, %al
orb $-0x20, %al
movsbl %al, %esi
movq %r15, %rdi
callq 0x5014
cmpb $0x1, 0x20(%r14)
jne 0x4321
movq 0x10(%r14), %rdi
movl %ebx, %eax
leaq 0x9e4b(%rip), %rcx      # 0xe150
movq (%rcx,%rax,8), %rdx
leaq 0x4c78(%rip), %rsi      # 0x8f88
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2180
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x45d2(%rip), %rdi      # 0x8905
leaq 0x4a3c(%rip), %rsi      # 0x8d76
leaq 0x4c25(%rip), %rcx      # 0x8f66
movl $0x111, %edx            # imm = 0x111
callq 0x20b0
// File: /workspace/github_cpp_makefile_star2_O1/vssense[P]Compiler/src/back-end/byte_code.cpp
// Function: WriteDivR64(Compiler*, R64)
void WriteDivR64(Compiler* compiler, R64 reg)
{
    assert(compiler);

    SetByte(&compiler->writer, cqo_first_byte);
    SetByte(&compiler->writer, cqo_second_byte);

    SetByte(&compiler->writer, CodeRexByteR64(reg));
    SetByte(&compiler->writer, mul_div_r64);
    SetByte(&compiler->writer, CodeR64(mode_div_r64_num, reg));

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x43ee
movl %esi, %ebx
movq %rdi, %r14
leaq 0x28(%rdi), %r15
movq %r15, %rdi
movl $0x48, %esi
callq 0x5014
movq %r15, %rdi
movl $0xffffff99, %esi       # imm = 0xFFFFFF99
callq 0x5014
xorl %esi, %esi
cmpl $0x8, %ebx
setge %sil
orl $0x48, %esi
movq %r15, %rdi
callq 0x5014
movq %r15, %rdi
movl $0xfffffff7, %esi       # imm = 0xFFFFFFF7
callq 0x5014
movl %ebx, %eax
andb $0x7, %al
orb $-0x10, %al
movsbl %al, %esi
movq %r15, %rdi
callq 0x5014
cmpb $0x1, 0x20(%r14)
jne 0x43e3
movq 0x10(%r14), %rdi
movl %ebx, %eax
leaq 0x9d89(%rip), %rcx      # 0xe150
movq (%rcx,%rax,8), %rdx
leaq 0x4be2(%rip), %rsi      # 0x8fb4
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2180
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4510(%rip), %rdi      # 0x8905
leaq 0x497a(%rip), %rsi      # 0x8d76
leaq 0x4b8f(%rip), %rcx      # 0x8f92
movl $0x11f, %edx            # imm = 0x11F
callq 0x20b0
// File: /workspace/github_cpp_makefile_star2_O1/vssense[P]Compiler/src/back-end/byte_code.cpp
// Function: WritePushR64(Compiler*, R64)
void WritePushR64(Compiler* compiler, R64 reg)
{
    assert(compiler);

    if (compiler->speed_optimization_required &&
        CodeR64(mode_pop_r64, reg) == LastByte(&compiler->writer))
    {
        if (compiler->asm_listing_required)
        {
            fseek(compiler->file, -pop_reg_str_size, SEEK_CUR);
        }

        compiler->writer.offset--;
        
        if (LastByte(&compiler->writer) == additional_push_pop_byte)
        {
            compiler->writer.offset--;
        }

        return;
    }

    if (reg > RDI)
    {
        SetByte(&compiler->writer, additional_push_pop_byte);
    }

    SetByte(&compiler->writer, CodeR64(mode_push_r64, reg));

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %rdi, %rdi
je 0x44db
movl %esi, %r14d
movq %rdi, %rbx
cmpb $0x1, 0x21(%rdi)
jne 0x447d
movl %r14d, %r12d
andl $0x7, %r12d
orl $0x58, %r12d
leaq 0x28(%rbx), %r15
movq %r15, %rdi
callq 0x503c
movsbl %al, %eax
cmpl %eax, %r12d
jne 0x447d
cmpb $0x1, 0x20(%rbx)
jne 0x4467
movq 0x10(%rbx), %rdi
movq $-0x9, %rsi
movl $0x1, %edx
callq 0x2110
decq 0x30(%rbx)
movq %r15, %rdi
callq 0x503c
cmpb $0x41, %al
jne 0x44d2
decq 0x30(%rbx)
jmp 0x44d2
cmpl $0x8, %r14d
jl 0x4491
leaq 0x28(%rbx), %rdi
movl $0x41, %esi
callq 0x5014
leaq 0x28(%rbx), %rdi
movl %r14d, %eax
andb $0x7, %al
orb $0x50, %al
movzbl %al, %esi
callq 0x5014
cmpb $0x1, 0x20(%rbx)
jne 0x44d2
movq 0x10(%rbx), %rdi
movl %r14d, %eax
leaq 0x9c98(%rip), %rcx      # 0xe150
movq (%rcx,%rax,8), %rdx
leaq 0x4b27(%rip), %rsi      # 0x8fea
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 0x4423(%rip), %rdi      # 0x8905
leaq 0x488d(%rip), %rsi      # 0x8d76
leaq 0x4ad7(%rip), %rcx      # 0x8fc7
movl $0x131, %edx            # imm = 0x131
callq 0x20b0
// File: /workspace/github_cpp_makefile_star2_O1/vssense[P]Compiler/src/back-end/byte_code.cpp
// Function: WritePushNum(Compiler*, int)
void WritePushNum(Compiler* compiler, int value)
{
    assert(compiler);

    if (compiler->memory_optimization_required && abs(value) < max_char)
    {
        SetByte(&compiler->writer, push_num1);
        SetByte(&compiler->writer, value); 
    }
    else
    {
        SetByte(&compiler->writer, push_num4);
        SetInt(&compiler->writer, value);
    }

    if (compiler->asm_listing_required)
    {
        fprintf(compiler->file, "push %d\n\t", value);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x4587
movl %esi, %ebx
movq %rdi, %r14
movl %esi, %eax
negl %eax
cmovsl %esi, %eax
leaq 0x28(%rdi), %r15
cmpb $0x1, 0x22(%rdi)
jne 0x4540
cmpl $0xfe, %eax
ja 0x4540
movq %r15, %rdi
movl $0x6a, %esi
callq 0x5014
movsbl %bl, %esi
movq %r15, %rdi
callq 0x5014
jmp 0x4557
movq %r15, %rdi
movl $0x68, %esi
callq 0x5014
movq %r15, %rdi
movl %ebx, %esi
callq 0x5055
cmpb $0x1, 0x20(%r14)
jne 0x457c
movq 0x10(%r14), %rdi
leaq 0x4aae(%rip), %rsi      # 0x9017
movl %ebx, %edx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2180
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4377(%rip), %rdi      # 0x8905
leaq 0x47e1(%rip), %rsi      # 0x8d76
leaq 0x4a58(%rip), %rcx      # 0x8ff4
movl $0x154, %edx            # imm = 0x154
callq 0x20b0
// File: /workspace/github_cpp_makefile_star2_O1/vssense[P]Compiler/src/back-end/byte_code.cpp
// Function: WritePopR64(Compiler*, R64)
void WritePopR64(Compiler* compiler, R64 reg)
{
    assert(compiler);

    if (compiler->speed_optimization_required &&
        CodeR64(mode_push_r64, reg) == LastByte(&compiler->writer))
    {
        if (compiler->asm_listing_required)
        {
            fseek(compiler->file, -push_reg_str_size, SEEK_CUR);
        }

        compiler->writer.offset--;
        
        if (LastByte(&compiler->writer) == additional_push_pop_byte)
        {
            compiler->writer.offset--;
        }

        return;
    }


    if (reg > RDI)
    {
        SetByte(&compiler->writer, additional_push_pop_byte);
    }

    SetByte(&compiler->writer, CodeR64(mode_pop_r64, reg));

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %rdi, %rdi
je 0x4674
movl %esi, %r14d
movq %rdi, %rbx
cmpb $0x1, 0x21(%rdi)
jne 0x4616
movl %r14d, %r12d
andl $0x7, %r12d
orl $0x50, %r12d
leaq 0x28(%rbx), %r15
movq %r15, %rdi
callq 0x503c
movsbl %al, %eax
cmpl %eax, %r12d
jne 0x4616
cmpb $0x1, 0x20(%rbx)
jne 0x4600
movq 0x10(%rbx), %rdi
movq $-0xa, %rsi
movl $0x1, %edx
callq 0x2110
decq 0x30(%rbx)
movq %r15, %rdi
callq 0x503c
cmpb $0x41, %al
jne 0x466b
decq 0x30(%rbx)
jmp 0x466b
cmpl $0x8, %r14d
jl 0x462a
leaq 0x28(%rbx), %rdi
movl $0x41, %esi
callq 0x5014
leaq 0x28(%rbx), %rdi
movl %r14d, %eax
andb $0x7, %al
orb $0x58, %al
movzbl %al, %esi
callq 0x5014
cmpb $0x1, 0x20(%rbx)
jne 0x466b
movq 0x10(%rbx), %rdi
movl %r14d, %eax
leaq 0x9aff(%rip), %rcx      # 0xe150
movq (%rcx,%rax,8), %rdx
leaq 0x49e7(%rip), %rsi      # 0x9043
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 0x428a(%rip), %rdi      # 0x8905
leaq 0x46f4(%rip), %rsi      # 0x8d76
leaq 0x4998(%rip), %rcx      # 0x9021
movl $0x169, %edx            # imm = 0x169
callq 0x20b0
// File: /workspace/github_cpp_makefile_star2_O1/vssense[P]Compiler/src/back-end/byte_code.cpp
// Function: WriteSalR64(Compiler*, R64, int)
void WriteSalR64(Compiler* compiler, R64 reg, int offset)
{
    assert(compiler);

    SetByte(&compiler->writer, CodeRexByteR64(reg));
    SetByte(&compiler->writer, sal_r64);
    SetByte(&compiler->writer, CodeR64(mode_sal_r64, reg));
    SetByte(&compiler->writer, (char)offset);

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %rdi, %rdi
je 0x472c
movl %edx, %ebx
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 0x5014
movq %r12, %rdi
movl $0xffffffc1, %esi       # imm = 0xFFFFFFC1
callq 0x5014
movl %r14d, %eax
andb $0x7, %al
orb $-0x20, %al
movsbl %al, %esi
movq %r12, %rdi
callq 0x5014
movsbl %bl, %esi
movq %r12, %rdi
callq 0x5014
cmpb $0x1, 0x20(%r15)
jne 0x4723
movq 0x10(%r15), %rdi
movl %r14d, %eax
leaq 0x9a49(%rip), %rcx      # 0xe150
movq (%rcx,%rax,8), %rdx
leaq 0x4961(%rip), %rsi      # 0x9073
movl %ebx, %ecx
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 0x41d2(%rip), %rdi      # 0x8905
leaq 0x463c(%rip), %rsi      # 0x8d76
leaq 0x490b(%rip), %rcx      # 0x904c
movl $0x18d, %edx            # imm = 0x18D
callq 0x20b0
// File: /workspace/github_cpp_makefile_star2_O1/vssense[P]Compiler/src/back-end/byte_code.cpp
// Function: WriteCmpR64R64(Compiler*, R64, R64)
void WriteCmpR64R64(Compiler* compiler, R64 reg1, R64 reg2)
{
    assert(compiler);

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

    if (compiler->asm_listing_required)
    {
        fprintf(compiler->file, "cmp %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 0x47eb
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 0x5014
movq %r12, %rdi
movl $0x29, %esi
callq 0x5014
movl %r14d, %eax
andl $0x7, %eax
leal (%rax,%rbx,8), %eax
orb $-0x40, %al
movsbl %al, %esi
movq %r12, %rdi
callq 0x5014
cmpb $0x1, 0x20(%r15)
jne 0x47e2
movq 0x10(%r15), %rdi
movl %r14d, %eax
leaq 0x998e(%rip), %rcx      # 0xe150
movq (%rcx,%rax,8), %rdx
movl %ebx, %eax
movq (%rcx,%rax,8), %rcx
leaq 0x48d7(%rip), %rsi      # 0x90aa
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 0x4113(%rip), %rdi      # 0x8905
leaq 0x457d(%rip), %rsi      # 0x8d76
leaq 0x4880(%rip), %rcx      # 0x9080
movl $0x19c, %edx            # imm = 0x19C
callq 0x20b0
// File: /workspace/github_cpp_makefile_star2_O1/vssense[P]Compiler/src/back-end/byte_code.cpp
// Function: WriteTest(Compiler*, R64, R64)
void WriteTest(Compiler* compiler, R64 reg1, R64 reg2)
{
    assert(compiler);

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

    if (compiler->asm_listing_required)
    {
        fprintf(compiler->file, "test %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 0x48aa
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 0x5014
movq %r12, %rdi
movl $0xffffff85, %esi       # imm = 0xFFFFFF85
callq 0x5014
movl %r14d, %eax
andl $0x7, %eax
leal (%rax,%rbx,8), %eax
orb $-0x40, %al
movsbl %al, %esi
movq %r12, %rdi
callq 0x5014
cmpb $0x1, 0x20(%r15)
jne 0x48a1
movq 0x10(%r15), %rdi
movl %r14d, %eax
leaq 0x98cf(%rip), %rcx      # 0xe150
movq (%rcx,%rax,8), %rdx
movl %ebx, %eax
movq (%rcx,%rax,8), %rcx
leaq 0x484a(%rip), %rsi      # 0x90dc
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 0x4054(%rip), %rdi      # 0x8905
leaq 0x44be(%rip), %rsi      # 0x8d76
leaq 0x47f8(%rip), %rcx      # 0x90b7
movl $0x1aa, %edx            # imm = 0x1AA
callq 0x20b0
// File: /workspace/github_cpp_makefile_star2_O1/vssense[P]Compiler/src/back-end/byte_code.cpp
// Function: WriteJumpOp(Compiler*, int, unsigned long, unsigned long)
size_t WriteJumpOp(Compiler* compiler, int op, size_t label, size_t offset_to_jump)
{
    assert(compiler);

    SetByte(&compiler->writer, jmp_4_bytes);
    SetByte(&compiler->writer, JUMP_OP_CODES[op - EQUAL_OP]);
    SetInt(&compiler->writer, offset_to_jump - compiler->writer.offset - sizeof(int));

    if (compiler->asm_listing_required)
    {
        fprintf(compiler->file, "%s L%lu\n\t", JUMPS[op - EQUAL_OP], label);
    }

    return compiler->writer.offset - sizeof(int);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x4966
movq %rcx, %r15
movq %rdx, %r14
movl %esi, %r12d
movq %rdi, %rbx
leaq 0x28(%rdi), %r13
movq %r13, %rdi
movl $0xf, %esi
callq 0x5014
movslq %r12d, %r12
leaq 0x497f(%rip), %rax      # 0x9286
movsbl -0x4(%r12,%rax), %esi
movq %r13, %rdi
callq 0x5014
subl 0x30(%rbx), %r15d
addl $-0x4, %r15d
movq %r13, %rdi
movl %r15d, %esi
callq 0x5055
cmpb $0x1, 0x20(%rbx)
jne 0x494f
movq 0x10(%rbx), %rdi
leaq 0x9897(%rip), %rax      # 0xe1d0
movq -0x20(%rax,%r12,8), %rdx
leaq 0x47d9(%rip), %rsi      # 0x911e
movq %r14, %rcx
xorl %eax, %eax
callq 0x2180
movq 0x30(%rbx), %rax
addq $-0x4, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3f98(%rip), %rdi      # 0x8905
leaq 0x4402(%rip), %rsi      # 0x8d76
leaq 0x476f(%rip), %rcx      # 0x90ea
movl $0x1b8, %edx            # imm = 0x1B8
callq 0x20b0
// File: /workspace/github_cpp_makefile_star2_O1/vssense[P]Compiler/src/back-end/byte_code.cpp
// Function: WriteJump(Compiler*, unsigned long, unsigned long)
size_t WriteJump(Compiler* compiler, size_t label, size_t offset_to_jump)
{
    assert(compiler);

    SetByte(&compiler->writer, jmp);
    SetInt(&compiler->writer, offset_to_jump - compiler->writer.offset - sizeof(int));

    if (compiler->asm_listing_required)
    {
        fprintf(compiler->file, "jmp L%lu\n\t", label);
    }
    
    return compiler->writer.offset - sizeof(int);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %rdi, %rdi
je 0x49ee
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x28(%rdi), %r12
movq %r12, %rdi
movl $0xffffffe9, %esi       # imm = 0xFFFFFFE9
callq 0x5014
subl 0x30(%rbx), %r15d
addl $-0x4, %r15d
movq %r12, %rdi
movl %r15d, %esi
callq 0x5055
cmpb $0x1, 0x20(%rbx)
jne 0x49dd
movq 0x10(%rbx), %rdi
leaq 0x4782(%rip), %rsi      # 0x9155
movq %r14, %rdx
xorl %eax, %eax
callq 0x2180
movq 0x30(%rbx), %rax
addq $-0x4, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3f10(%rip), %rdi      # 0x8905
leaq 0x437a(%rip), %rsi      # 0x8d76
leaq 0x4725(%rip), %rcx      # 0x9128
movl $0x1c8, %edx            # imm = 0x1C8
callq 0x20b0
// File: /workspace/github_cpp_makefile_star2_O1/vssense[P]Compiler/src/back-end/byte_code.cpp
// Function: WriteLabel(Compiler*, unsigned long)
size_t WriteLabel(Compiler* compiler, size_t label)
{
    assert(compiler);

    if (compiler->asm_listing_required)
    {
        fseek(compiler->file, -1, SEEK_CUR);
        fprintf(compiler->file, "L%lu :\n\t", label);
    }

    return compiler->writer.offset;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x4a58
movq %rdi, %rbx
cmpb $0x1, 0x20(%rdi)
jne 0x4a4f
movq %rsi, %r14
movq 0x10(%rbx), %rdi
movq $-0x1, %rsi
movl $0x1, %edx
callq 0x2110
movq 0x10(%rbx), %rdi
leaq 0x4741(%rip), %rsi      # 0x9186
movq %r14, %rdx
xorl %eax, %eax
callq 0x2180
movq 0x30(%rbx), %rax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x3ea6(%rip), %rdi      # 0x8905
leaq 0x4310(%rip), %rsi      # 0x8d76
leaq 0x46f3(%rip), %rcx      # 0x9160
movl $0x1d7, %edx            # imm = 0x1D7
callq 0x20b0
// File: /workspace/github_cpp_makefile_star2_O1/vssense[P]Compiler/src/back-end/byte_code.cpp
// Function: WriteCall(Compiler*, Function*)
void WriteCall(Compiler* compiler, Function* func)
{
    assert(compiler);
    assert(func);

    SetByte(&compiler->writer, call_func);
    AddCall(&compiler->writer, compiler->writer.offset, func);
    SetInt(&compiler->writer, 0);

    if (compiler->asm_listing_required)
    {
        fprintf(compiler->file, "call %s\n\t", func->name);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x4aec
movq %rsi, %rbx
testq %rsi, %rsi
je 0x4b0b
movq %rdi, %r14
leaq 0x28(%rdi), %r15
movq %r15, %rdi
movl $0xffffffe8, %esi       # imm = 0xFFFFFFE8
callq 0x5014
movq 0x30(%r14), %rsi
movq %r15, %rdi
movq %rbx, %rdx
callq 0x50b3
movq %r15, %rdi
xorl %esi, %esi
callq 0x5055
cmpb $0x1, 0x20(%r14)
jne 0x4ae1
movq 0x10(%r14), %rdi
movq (%rbx), %rdx
leaq 0x46eb(%rip), %rsi      # 0x91bb
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2180
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3e12(%rip), %rdi      # 0x8905
leaq 0x427c(%rip), %rsi      # 0x8d76
leaq 0x468e(%rip), %rcx      # 0x918f
movl $0x1e4, %edx            # imm = 0x1E4
callq 0x20b0
leaq 0x46a4(%rip), %rdi      # 0x91b6
leaq 0x425d(%rip), %rsi      # 0x8d76
leaq 0x466f(%rip), %rcx      # 0x918f
movl $0x1e5, %edx            # imm = 0x1E5
callq 0x20b0
// File: /workspace/github_cpp_makefile_star2_O1/vssense[P]Compiler/src/back-end/byte_code.cpp
// Function: WriteCall(Compiler*, char const*)
void WriteCall(Compiler* compiler, const char* name)
{
    assert(compiler);
    assert(name);

    SetByte(&compiler->writer, call_func);

    if (strcmp(name, "print") == 0)
    {
        SetInt(&compiler->writer, compiler->print_offset - compiler->writer.offset - sizeof(int));
    }
    else
    {
        SetInt(&compiler->writer, compiler->scan_offset - compiler->writer.offset - sizeof(int));
    }

    if (compiler->asm_listing_required)
    {
        fprintf(compiler->file, "call %s\n\t", name);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x4bb7
movq %rsi, %rbx
testq %rsi, %rsi
je 0x4bd6
movq %rdi, %r14
leaq 0x28(%rdi), %r15
movq %r15, %rdi
movl $0xffffffe8, %esi       # imm = 0xFFFFFFE8
callq 0x5014
leaq 0x3f8c(%rip), %rsi      # 0x8aec
movq %rbx, %rdi
callq 0x2170
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
movl 0x108(%r14,%rcx,8), %esi
subl 0x30(%r14), %esi
addl $-0x4, %esi
movq %r15, %rdi
callq 0x5055
cmpb $0x1, 0x20(%r14)
jne 0x4bac
movq 0x10(%r14), %rdi
leaq 0x4623(%rip), %rsi      # 0x91bb
movq %rbx, %rdx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2180
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3d47(%rip), %rdi      # 0x8905
leaq 0x41b1(%rip), %rsi      # 0x8d76
leaq 0x45f9(%rip), %rcx      # 0x91c5
movl $0x1f3, %edx            # imm = 0x1F3
callq 0x20b0
leaq 0x5963(%rip), %rdi      # 0xa540
leaq 0x4192(%rip), %rsi      # 0x8d76
leaq 0x45da(%rip), %rcx      # 0x91c5
movl $0x1f4, %edx            # imm = 0x1F4
callq 0x20b0
// File: /workspace/github_cpp_makefile_star2_O1/vssense[P]Compiler/src/back-end/byte_code.cpp
// Function: WriteRet(Compiler*)
void WriteRet(Compiler* compiler)
{
    assert(compiler);

    SetByte(&compiler->writer, ret_func);

    if (compiler->asm_listing_required)
    {
        fprintf(compiler->file, "ret\n\t");
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x4c3e
movq %rdi, %rbx
addq $0x28, %rdi
movl $0xffffffc3, %esi       # imm = 0xFFFFFFC3
callq 0x5014
cmpb $0x1, 0x20(%rbx)
jne 0x4c37
movq 0x10(%rbx), %rcx
leaq 0x45e6(%rip), %rdi      # 0x9208
movl $0x5, %esi
movl $0x1, %edx
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x21f0
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x3cc0(%rip), %rdi      # 0x8905
leaq 0x412a(%rip), %rsi      # 0x8d76
leaq 0x459b(%rip), %rcx      # 0x91ee
movl $0x209, %edx            # imm = 0x209
callq 0x20b0
// File: /workspace/github_cpp_makefile_star2_O1/vssense[P]Compiler/src/back-end/byte_code.cpp
// Function: WriteFuncDecl(Compiler*, Function*)
void WriteFuncDecl(Compiler* compiler, Function* func)
{
    assert(compiler);

    SetByte(&compiler->writer, nop);

    func->offset = compiler->writer.offset;

    if (compiler->asm_listing_required)
    {
        fprintf(compiler->file, "\n%s :\n\t", func->name);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x4caa
movq %rsi, %rbx
movq %rdi, %r14
addq $0x28, %rdi
movl $0xffffff90, %esi       # imm = 0xFFFFFF90
callq 0x5014
movq 0x30(%r14), %rax
movq %rax, 0x28(%rbx)
cmpb $0x1, 0x20(%r14)
jne 0x4ca5
movq 0x10(%r14), %rdi
movq (%rbx), %rdx
leaq 0x459f(%rip), %rsi      # 0x9239
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0x2180
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x3c54(%rip), %rdi      # 0x8905
leaq 0x40be(%rip), %rsi      # 0x8d76
leaq 0x454f(%rip), %rcx      # 0x920e
movl $0x215, %edx            # imm = 0x215
callq 0x20b0
// File: /workspace/github_cpp_makefile_star2_O1/vssense[P]Compiler/src/back-end/byte_code.cpp
// Function: WriteSyscall(Compiler*)
void WriteSyscall(Compiler* compiler)
{
    assert(compiler);

    SetByte(&compiler->writer, syscall_first_byte);
    SetByte(&compiler->writer, syscall_second_byte);

    if (compiler->asm_listing_required)
    {
        fprintf(compiler->file, "syscall\n\t");
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x4d1f
movq %rdi, %rbx
leaq 0x28(%rdi), %r14
movq %r14, %rdi
movl $0xf, %esi
callq 0x5014
movq %r14, %rdi
movl $0x5, %esi
callq 0x5014
cmpb $0x1, 0x20(%rbx)
jne 0x4d1a
movq 0x10(%rbx), %rcx
leaq 0x4558(%rip), %rdi      # 0x925f
movl $0x9, %esi
movl $0x1, %edx
popq %rbx
popq %r14
popq %rbp
jmp 0x21f0
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x3bdf(%rip), %rdi      # 0x8905
leaq 0x4049(%rip), %rsi      # 0x8d76
leaq 0x450d(%rip), %rcx      # 0x9241
movl $0x223, %edx            # imm = 0x223
callq 0x20b0
// File: /workspace/github_cpp_makefile_star2_O1/vssense[P]Compiler/src/back-end/byte_code.cpp
// Function: SetAllCalls(Compiler*)
void SetAllCalls(Compiler* compiler)
{
    assert(compiler);

    for (size_t i = 0; i < compiler->writer.calls_size; ++i)
    {
        int* tmp_ptr = (int*)(compiler->writer.buffer + compiler->writer.calls[i].offset);
        *tmp_ptr = compiler->writer.calls[i].function->offset - compiler->writer.calls[i].offset - sizeof(int);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testq %rdi, %rdi
je 0x4d79
movq 0x48(%rdi), %rax
testq %rax, %rax
je 0x4d77
movq 0x28(%rdi), %rcx
movq 0x40(%rdi), %rdx
addq $0x8, %rdx
movq -0x8(%rdx), %rsi
movq (%rdx), %rdi
movl 0x28(%rdi), %edi
subl %esi, %edi
addl $-0x4, %edi
movl %edi, (%rcx,%rsi)
addq $0x10, %rdx
decq %rax
jne 0x4d5c
popq %rbp
retq
leaq 0x3b85(%rip), %rdi      # 0x8905
leaq 0x3fef(%rip), %rsi      # 0x8d76
leaq 0x44db(%rip), %rcx      # 0x9269
movl $0x230, %edx            # imm = 0x230
callq 0x20b0
// File: /workspace/github_cpp_makefile_star2_O1/vssense[P]Compiler/src/back-end/elf_writer.cpp
// Function: InitDataSegment(ElfFileWriter*)
size_t InitDataSegment(ElfFileWriter* writer)
{
    ASSERT_WRITER;
    
    writer->text_header.p_filesz = writer->offset - elf_text_offset;
    writer->text_header.p_memsz  = writer->offset - elf_text_offset;

    size_t data_segment_offset = writer->offset & ~elf_segment_alignment;
    data_segment_offset       += elf_text_offset;
    writer->offset             = data_segment_offset;

    if (writer->buffer_capacity < writer->offset + elf_data_size)
    {
        writer->buffer_capacity = writer->offset + elf_data_size + 1;
        writer->buffer          = (char*)realloc(writer->buffer,
                                                 writer->buffer_capacity * sizeof(char));
        assert(writer->buffer);
    }

    writer->data_header.p_offset = data_segment_offset;
    writer->data_header.p_vaddr  = virtual_start + data_segment_offset;

    return data_segment_offset;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %r15
movq 0x10(%rdi), %rax
movq $-0x1000, %rcx          # imm = 0xF000
leaq (%r15,%rcx), %rdx
movq %rdx, 0x90(%rdi)
movq %rdx, 0x98(%rdi)
andq %rcx, %r15
leaq 0x1000(%r15), %r14
movq %r14, 0x8(%rdi)
leaq 0x1100(%r15), %rcx
cmpq %rcx, %rax
jae 0x4ebb
leaq 0x1101(%r15), %rsi
movq %rsi, 0x10(%rbx)
movq (%rbx), %rdi
callq 0x21c0
movq %rax, (%rbx)
testq %rax, %rax
je 0x4ede
movq %r14, 0xb0(%rbx)
addq $0x401000, %r15         # imm = 0x401000
movq %r15, 0xb8(%rbx)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x43bb(%rip), %rdi      # 0x92a0
leaq 0x43c3(%rip), %rsi      # 0x92af
leaq 0x43d8(%rip), %rcx      # 0x92cb
movl $0xb4, %edx
callq 0x20b0
// File: /workspace/github_cpp_makefile_star2_O1/vssense[P]Compiler/src/back-end/elf_writer.cpp
// Function: Construct(ElfFileWriter*)
void Construct(ElfFileWriter* writer)
{
    writer->offset = 0;
    writer->buffer = (char*)calloc(buffer_default_size, sizeof(char));
    writer->buffer_capacity = buffer_default_size;

    writer->calls = (CallInfo*)calloc(calls_default_size, sizeof(CallInfo));
    writer->calls_size = 0;
    writer->calls_capacity = calls_default_size;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %r14d, %r14d
movq %r14, 0x8(%rdi)
movl $0x2000, %edi           # imm = 0x2000
movl $0x1, %esi
callq 0x20c0
movq %rax, (%rbx)
movq $0x2000, 0x10(%rbx)     # imm = 0x2000
movl $0x10, %edi
movl $0x10, %esi
callq 0x20c0
movq %rax, 0x18(%rbx)
movq %r14, 0x20(%rbx)
movq $0x10, 0x28(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/vssense[P]Compiler/src/back-end/elf_writer.cpp
// Function: CheckElfWriterBuffer(ElfFileWriter*)
void CheckElfWriterBuffer(ElfFileWriter* writer)
{
    ASSERT_WRITER;

    if (writer->offset >= writer->buffer_capacity - sizeof(int64_t))
    {
        writer->buffer_capacity *= 2;
        writer->buffer = (char*)realloc(writer->buffer,
                                        writer->buffer_capacity * sizeof(char));
        assert(writer->buffer);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq 0x10(%rdi), %rsi
leaq -0x8(%rsi), %rax
cmpq %rax, 0x8(%rdi)
jb 0x4f93
movq %rdi, %rbx
addq %rsi, %rsi
movq %rsi, 0x10(%rdi)
movq (%rdi), %rdi
callq 0x21c0
movq %rax, (%rbx)
testq %rax, %rax
je 0x4f9a
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x42ff(%rip), %rdi      # 0x92a0
leaq 0x4307(%rip), %rsi      # 0x92af
leaq 0x4344(%rip), %rcx      # 0x92f3
movl $0xd8, %edx
callq 0x20b0
// File: /workspace/github_cpp_makefile_star2_O1/vssense[P]Compiler/src/back-end/elf_writer.cpp
// Function: CheckElfWriterCallsBuffer(ElfFileWriter*)
void CheckElfWriterCallsBuffer(ElfFileWriter* writer)
{
    ASSERT_WRITER;

    if (writer->calls_size >= writer->calls_capacity - 1)
    {
        writer->calls_capacity *= 2;
        writer->calls = (CallInfo*)realloc(writer->calls,
                                           writer->calls_capacity * sizeof(CallInfo));
        assert(writer->calls);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq 0x28(%rdi), %rsi
leaq -0x1(%rsi), %rax
cmpq %rax, 0x20(%rdi)
jb 0x4fee
movq %rdi, %rbx
leaq (%rsi,%rsi), %rax
movq %rax, 0x28(%rdi)
movq 0x18(%rdi), %rdi
shlq $0x5, %rsi
callq 0x21c0
movq %rax, 0x18(%rbx)
testq %rax, %rax
je 0x4ff5
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x4322(%rip), %rdi      # 0x931e
leaq 0x42ac(%rip), %rsi      # 0x92af
leaq 0x4322(%rip), %rcx      # 0x932c
movl $0xe5, %edx
callq 0x20b0
// File: /workspace/github_cpp_makefile_star2_O1/vssense[P]Compiler/src/back-end/elf_writer.cpp
// Function: SetInt(ElfFileWriter*, int)
void SetInt(ElfFileWriter* writer, int value)
{
    ASSERT_WRITER;

    CheckElfWriterBuffer(writer);

    int* tmp_ptr = (int*)(writer->buffer + writer->offset);
    *tmp_ptr = value;
    writer->offset += sizeof(int);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
callq 0x4f65
movq (%r14), %rax
movq 0x8(%r14), %rcx
movl %ebx, (%rax,%rcx)
addq $0x4, %rcx
movq %rcx, 0x8(%r14)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/vssense[P]Compiler/src/back-end/elf_writer.cpp
// Function: SetLong(ElfFileWriter*, long)
void SetLong(ElfFileWriter* writer, int64_t value)
{
    ASSERT_WRITER;

    CheckElfWriterBuffer(writer);

    long long* tmp_ptr = (long long*)(writer->buffer + writer->offset);
    *tmp_ptr = value;
    writer->offset += sizeof(long long);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
callq 0x4f65
movq (%r14), %rax
movq 0x8(%r14), %rcx
movq %rbx, (%rax,%rcx)
addq $0x8, %rcx
movq %rcx, 0x8(%r14)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/vssense[P]Compiler/src/back-end/elf_writer.cpp
// Function: AddCall(ElfFileWriter*, unsigned long, Function*)
void AddCall(ElfFileWriter* writer, size_t offset, Function* function)
{
    ASSERT_WRITER;
    assert(function);

    CheckElfWriterCallsBuffer(writer);

    writer->calls[writer->calls_size++] = {offset, function};
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rdx, %rdx
je 0x50f8
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0x4fb9
movq 0x18(%r15), %rax
movq 0x20(%r15), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x20(%r15)
shlq $0x4, %rcx
movq %r14, (%rax,%rcx)
movq %rbx, 0x8(%rax,%rcx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3a42(%rip), %rdi      # 0x8b41
leaq 0x41a9(%rip), %rsi      # 0x92af
leaq 0x424f(%rip), %rcx      # 0x935c
movl $0x11f, %edx            # imm = 0x11F
callq 0x20b0
// File: /workspace/github_cpp_makefile_star2_O1/vssense[P]Compiler/src/back-end/elf_writer.cpp
// Function: Destruct(ElfFileWriter*)
void Destruct(ElfFileWriter* writer)
{
    ASSERT_WRITER;

    assert(writer->buffer);
    free(writer->buffer);
    writer->buffer          = nullptr;
    writer->offset          = 0;
    writer->buffer_capacity = 0;

    assert(writer->calls);
    free(writer->calls);
    writer->calls          = nullptr;
    writer->calls_size     = 0;
    writer->calls_capacity = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x5162
callq 0x2140
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x5181
addq $0x18, %rbx
callq 0x2140
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x4137(%rip), %rdi      # 0x92a0
leaq 0x413f(%rip), %rsi      # 0x92af
leaq 0x4217(%rip), %rcx      # 0x938e
movl $0x12a, %edx            # imm = 0x12A
callq 0x20b0
leaq 0x4196(%rip), %rdi      # 0x931e
leaq 0x4120(%rip), %rsi      # 0x92af
leaq 0x41f8(%rip), %rcx      # 0x938e
movl $0x130, %edx            # imm = 0x130
callq 0x20b0
// File: /workspace/github_cpp_makefile_star2_O1/vssense[P]Compiler/src/front-end/parser.cpp
// Function: LenOfFile(_IO_FILE*)
size_t LenOfFile(FILE* file)
{
    assert(file);

    fseek(file, 0, SEEK_END);
    size_t pos = ftell(file);
    fseek(file, 0, SEEK_SET);

    return pos;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x51da
movq %rdi, %rbx
xorl %esi, %esi
movl $0x2, %edx
callq 0x2110
movq %rbx, %rdi
callq 0x2030
movq %rax, %r14
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2110
movq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x371f(%rip), %rdi      # 0x8900
leaq 0x41ca(%rip), %rsi      # 0x93b2
leaq 0x41dc(%rip), %rcx      # 0x93cb
movl $0x16, %edx
callq 0x20b0
// File: /workspace/github_cpp_makefile_star2_O1/vssense[P]Compiler/src/front-end/parser.cpp
// Function: ReadFile(_IO_FILE*)
Buffer* ReadFile(FILE* file)
{
    assert(file);

    Buffer* buffer = (Buffer*)calloc(1, sizeof(Buffer)); 
 
    size_t size = LenOfFile(file);

    buffer->str = (char*)calloc(size + 1, sizeof(char));
    assert(buffer->str);

    buffer->lenght = fread(buffer->str, sizeof(char), size, file);
    buffer->original_str = buffer->str;

    buffer->str[buffer->lenght] = '\0';

    return buffer;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %rdi, %rdi
je 0x526e
movq %rdi, %rbx
movl $0x1, %edi
movl $0x18, %esi
callq 0x20c0
movq %rax, %r14
movq %rbx, %rdi
callq 0x51a0
movq %rax, %r15
leaq 0x1(%rax), %rdi
movl $0x1, %esi
callq 0x20c0
movq %rax, (%r14)
testq %rax, %rax
je 0x528d
movq %rax, %r12
movl $0x1, %esi
movq %rax, %rdi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x2190
movq %rax, 0x10(%r14)
movq %r12, 0x8(%r14)
movb $0x0, (%r12,%rax)
movq %r14, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x368b(%rip), %rdi      # 0x8900
leaq 0x4136(%rip), %rsi      # 0x93b2
leaq 0x4161(%rip), %rcx      # 0x93e4
movl $0x21, %edx
callq 0x20b0
leaq 0x4169(%rip), %rdi      # 0x93fd
leaq 0x4117(%rip), %rsi      # 0x93b2
leaq 0x4142(%rip), %rcx      # 0x93e4
movl $0x28, %edx
callq 0x20b0
// File: /workspace/github_cpp_makefile_star2_O1/vssense[P]Compiler/src/front-end/parser.cpp
// Function: GetBuffer(char const*)
Buffer* GetBuffer(const char* input)
{
    assert(input);

    FILE* file = fopen(input, "r");
    if (!file) 
    {
        printf("error : no such file \"%s\"\n", input);
        assert(!"no input file\n");
    }

    return ReadFile(file); 
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x52d9
movq %rdi, %rbx
leaq 0x3fec(%rip), %rsi      # 0x92ad
callq 0x2130
testq %rax, %rax
je 0x52f8
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x51f9
leaq 0x4129(%rip), %rdi      # 0x9409
leaq 0x40cb(%rip), %rsi      # 0x93b2
leaq 0x4121(%rip), %rcx      # 0x940f
movl $0x34, %edx
callq 0x20b0
leaq 0x4130(%rip), %rdi      # 0x942f
movq %rbx, %rsi
xorl %eax, %eax
callq 0x2040
leaq 0x413a(%rip), %rdi      # 0x944a
leaq 0x409b(%rip), %rsi      # 0x93b2
leaq 0x40f1(%rip), %rcx      # 0x940f
movl $0x3a, %edx
callq 0x20b0
// File: /workspace/github_cpp_makefile_star2_O1/vssense[P]Compiler/src/front-end/parser.cpp
// Function: CompilationError(Parser*, unsigned long*)
void CompilationError(Parser* parser, size_t* idx)
{
    assert(parser);

    printf("Compilation error : ");

    PrintError(parser->status);

    char* str_start = parser->tokens[*idx].token_str;
    printf("%s\n", str_start);
    
    while (str_start > parser->original_buffer && *str_start != '\n')
    {
        --str_start;
    }

    PrintBeforeSymbol(str_start, '\n');

    printf("\n");

    for (int i = 0; i <= parser->tokens[*idx].token_str - str_start; ++i)
    {
        printf(" ");
    }

    printf("^\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %rdi, %rdi
je 0x548d
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x40c2(%rip), %rdi      # 0x94a7
xorl %eax, %eax
callq 0x2040
movl 0x18(%r14), %edi
callq 0x5361
movq (%r14), %rax
movq (%rbx), %rcx
leaq (%rcx,%rcx,2), %rcx
movq 0x10(%rax,%rcx,8), %r15
movq %r15, %rdi
callq 0x21a0
movq 0x10(%r14), %rax
cmpq %rax, %r15
jbe 0x5426
cmpb $0xa, (%r15)
je 0x5426
decq %r15
cmpq %rax, %r15
ja 0x5415
movq %rax, %r15
movq %r15, %rdi
movl $0xa, %esi
callq 0x5389
movl $0xa, %edi
callq 0x2160
movq (%r14), %rax
movq (%rbx), %rcx
leaq (%rcx,%rcx,2), %rcx
cmpq %r15, 0x10(%rax,%rcx,8)
js 0x5479
movq $-0x1, %r12
movl $0x20, %edi
callq 0x2160
movq (%r14), %rax
movq (%rbx), %rcx
leaq (%rcx,%rcx,2), %rcx
movq 0x10(%rax,%rcx,8), %rax
subq %r15, %rax
incq %r12
cmpq %r12, %rax
jg 0x5455
leaq 0x448c(%rip), %rdi      # 0x990c
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x21a0
leaq 0x3fe2(%rip), %rdi      # 0x9476
leaq 0x3f17(%rip), %rsi      # 0x93b2
leaq 0x3fdb(%rip), %rcx      # 0x947d
movl $0x82, %edx
callq 0x20b0
// File: /workspace/github_cpp_makefile_star2_O1/vssense[P]Compiler/src/front-end/parser.cpp
// Function: IgnoreSpaces(Buffer*)
void IgnoreSpaces(Buffer* buffer)
{
    assert(buffer);

    buffer->str += strspn(buffer->str, SKIP_SYMBOLS);
    if (SYMBOL == '~')
    {
        buffer->str += strcspn(buffer->str, "\n"); 
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x54fe
movq %rdi, %rbx
movq (%rdi), %r15
movq 0x8d38(%rip), %rsi      # 0xe200
movq %r15, %rdi
callq 0x2070
leaq (%r15,%rax), %r14
movq %r14, (%rbx)
cmpb $0x7e, (%r15,%rax)
jne 0x54f3
leaq 0x33c3(%rip), %rsi      # 0x88a8
movq %r14, %rdi
callq 0x2050
addq %r14, %rax
movq %rax, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3da3(%rip), %rdi      # 0x92a8
leaq 0x3ea6(%rip), %rsi      # 0x93b2
leaq 0x3fa9(%rip), %rcx      # 0x94bc
movl $0xa3, %edx
callq 0x20b0
// File: /workspace/github_cpp_makefile_star2_O1/vssense[P]Compiler/src/front-end/parser.cpp
// Function: GetNumber(Token*, unsigned long*, Buffer*)
bool GetNumber(Token* tokens, size_t* ofs, Buffer* buffer)
{
    assert(tokens);
    assert(ofs);
    assert(buffer);

    for (int i = 0; i < NUM_DIGITS; ++i)
    {
        if (strncmp(buffer->str, DIGITS[i].rus_digit, DIGITS[i].rus_len) == 0)
        {
            VALUE.number = i;
            TYPE         = TYPE_NUMB;
            STR          = buffer->str;

            buffer->str += DIGITS[i].rus_len;
            (*ofs)++;
            return true;
        }

        if (strncmp(buffer->str, DIGITS[i].eng_digit, DIGITS[i].eng_len) == 0)
        {
            VALUE.number = i;
            TYPE         = TYPE_NUMB;
            STR          = buffer->str;

            buffer->str += DIGITS[i].eng_len;
            (*ofs)++;
            return true;
        }
    }

    return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
testq %rdi, %rdi
je 0x55fe
testq %rsi, %rsi
je 0x561d
movq %rdi, -0x38(%rbp)
movq %rsi, -0x40(%rbp)
testq %rdx, %rdx
je 0x563c
movq %rdx, -0x30(%rbp)
movq (%rdx), %r13
movb $0x1, %r12b
leaq 0x83a6(%rip), %r15      # 0xd908
xorl %r14d, %r14d
movq -0x18(%r15), %rsi
movq -0x10(%r15), %rbx
movq %r13, %rdi
movq %rbx, %rdx
callq 0x2090
testl %eax, %eax
je 0x55ad
movq -0x8(%r15), %rsi
movq (%r15), %rbx
movq %r13, %rdi
movq %rbx, %rdx
callq 0x2090
testl %eax, %eax
je 0x55ad
cmpq $0xa, %r14
leaq 0x1(%r14), %rax
setb %r12b
addq $0x20, %r15
movq %rax, %r14
cmpq $0xb, %rax
jne 0x5565
jmp 0x55e8
movq -0x40(%rbp), %rsi
movq (%rsi), %rax
leaq (%rax,%rax,2), %rax
movq -0x38(%rbp), %r8
movl %r14d, 0x8(%r8,%rax,8)
movq (%rsi), %rax
leaq (%rax,%rax,2), %rcx
movl $0x0, (%r8,%rcx,8)
movq -0x30(%rbp), %rdi
movq (%rdi), %rdx
movq %rdx, 0x10(%r8,%rcx,8)
addq %rdx, %rbx
movq %rbx, (%rdi)
incq %rax
movq %rax, (%rsi)
andb $0x1, %r12b
movl %r12d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4026(%rip), %rdi      # 0x962b
leaq 0x3da6(%rip), %rsi      # 0x93b2
leaq 0x3ec5(%rip), %rcx      # 0x94d8
movl $0xae, %edx
callq 0x20b0
leaq 0x36ac(%rip), %rdi      # 0x8cd0
leaq 0x3d87(%rip), %rsi      # 0x93b2
leaq 0x3ea6(%rip), %rcx      # 0x94d8
movl $0xaf, %edx
callq 0x20b0
leaq 0x3c65(%rip), %rdi      # 0x92a8
leaq 0x3d68(%rip), %rsi      # 0x93b2
leaq 0x3e87(%rip), %rcx      # 0x94d8
movl $0xb0, %edx
callq 0x20b0
// File: /workspace/github_cpp_makefile_star2_O1/vssense[P]Compiler/src/front-end/parser.cpp
// Function: GetOperator(Token*, unsigned long*, Buffer*)
bool GetOperator(Token* tokens, size_t* ofs, Buffer* buffer)
{
    assert(tokens);
    assert(ofs);
    assert(buffer);

    for (int i = 0; i < NUM_OPERATORS; ++i)
    {
        if (strncmp(buffer->str, OPERATORS[i].rus_name, OPERATORS[i].rus_len) == 0)
        {
            VALUE.op = i;
            TYPE     = TYPE_OP;
            STR      = buffer->str;

            buffer->str += OPERATORS[i].rus_len;
            (*ofs)++;
            return true;
        }

        if (OPERATORS[i].eng_name != nullptr)
        {
            if (strncmp(buffer->str, OPERATORS[i].eng_name, OPERATORS[i].eng_len) == 0)
            {
                VALUE.op = i;
                TYPE     = TYPE_OP;
                STR      = buffer->str;

                buffer->str += OPERATORS[i].eng_len;
                (*ofs)++;
                return true;
            }
        }
    }

    return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
testq %rdi, %rdi
je 0x5741
testq %rsi, %rsi
je 0x5760
movq %rdi, -0x38(%rbp)
movq %rsi, -0x40(%rbp)
testq %rdx, %rdx
je 0x577f
movq %rdx, -0x30(%rbp)
movq (%rdx), %r13
movb $0x1, %r12b
leaq 0x83c8(%rip), %r15      # 0xda68
xorl %r14d, %r14d
movq -0x18(%r15), %rsi
movq -0x10(%r15), %rbx
movq %r13, %rdi
movq %rbx, %rdx
callq 0x2090
testl %eax, %eax
je 0x56f0
movq -0x8(%r15), %rsi
testq %rsi, %rsi
je 0x56d5
movq (%r15), %rbx
movq %r13, %rdi
movq %rbx, %rdx
callq 0x2090
testl %eax, %eax
je 0x56f0
cmpq $0x18, %r14
leaq 0x1(%r14), %rax
setb %r12b
addq $0x20, %r15
movq %rax, %r14
cmpq $0x19, %rax
jne 0x56a3
jmp 0x572b
movq -0x40(%rbp), %rsi
movq (%rsi), %rax
leaq (%rax,%rax,2), %rax
movq -0x38(%rbp), %r8
movl %r14d, 0x8(%r8,%rax,8)
movq (%rsi), %rax
leaq (%rax,%rax,2), %rcx
movl $0x2, (%r8,%rcx,8)
movq -0x30(%rbp), %rdi
movq (%rdi), %rdx
movq %rdx, 0x10(%r8,%rcx,8)
addq %rdx, %rbx
movq %rbx, (%rdi)
incq %rax
movq %rax, (%rsi)
andb $0x1, %r12b
movl %r12d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3ee3(%rip), %rdi      # 0x962b
leaq 0x3c63(%rip), %rsi      # 0x93b2
leaq 0x3dae(%rip), %rcx      # 0x9504
movl $0xd0, %edx
callq 0x20b0
leaq 0x3569(%rip), %rdi      # 0x8cd0
leaq 0x3c44(%rip), %rsi      # 0x93b2
leaq 0x3d8f(%rip), %rcx      # 0x9504
movl $0xd1, %edx
callq 0x20b0
leaq 0x3b22(%rip), %rdi      # 0x92a8
leaq 0x3c25(%rip), %rsi      # 0x93b2
leaq 0x3d70(%rip), %rcx      # 0x9504
movl $0xd2, %edx
callq 0x20b0