LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/baziotis[P]minijava-cpp/typecheck.cpp
// Function: typecheck(Goal*)
bool typecheck(Goal *goal) {
    typecheck_init();
    constexpr int approximated_num_of_classes_per_inheritance_tree = 8;
    // +1 for the main class
    int type_decls_len = goal->type_decls.len + 1;
    inher_roots.reserve(type_decls_len /
                        approximated_num_of_classes_per_inheritance_tree);
    // Pass 1
    TypeTable type_table = install_type_declarations(goal);
    if (config.log) {
        printf("\n");
    }

    // TODO: How able we are to continue?
    // Print types that could not be inserted. This can
    // happen if the types used are more than the type
    // declarations. See TypeTable.
    // TODO: The types in `could_not_be_inserted` might actually have a
    // declaration. Consider that if say we have space in the table for 2
    // type declarations. The declarations that _exist_ are for A and D.
    // In A, let's say we use A, B, C and D in that order. D will be inserted
    // last and it won't be in the type table. It will be in the
    // `could_not_be_inserted` because of lack of space. But D
    // actually has a declaration.
    for (IdType *type : type_table.could_not_be_inserted) {
        typecheck_error(type->loc, "Type `", type->id, "` has not been ",
                        "defined");
    }

    // Offset computation
    type_table.offset_computation();

    // Print calloc declarations etc.
    cgen_init();

    // Pass 2
    full_typecheck(goal, type_table);
    
    if (num_global_typecheck_errors == 0) {
        return true;
    }
    return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rdi, %rbx
movl $0x2a, %edi
callq 0x3693
movl 0x50(%rbx), %eax
leal 0x1(%rax), %ecx
addl $0x8, %eax
testl %ecx, %ecx
cmovnsl %ecx, %eax
sarl $0x3, %eax
movslq %eax, %rsi
leaq 0x12e70(%rip), %rdi     # 0x1ba70
callq 0xece0
leaq 0x8(%rsp), %rdi
movq %rbx, (%rsp)
movq %rbx, %rsi
callq 0x829a
leaq 0x10e1b(%rip), %rax     # 0x19a38
cmpb $0x1, (%rax)
jne 0x8c2c
movl $0xa, %edi
callq 0x2160
movq 0x70(%rsp), %r13
testq %r13, %r13
je 0x8c78
movq 0x78(%rsp), %rbp
shlq $0x3, %r13
xorl %ebx, %ebx
leaq 0x99cc(%rip), %r14      # 0x12614
leaq 0x99cc(%rip), %r15      # 0x1261b
leaq 0xa65b(%rip), %r12      # 0x132b1
movq (%rbp,%rbx), %rax
movl (%rax), %edi
movq 0x8(%rax), %rdx
movq %r14, %rsi
movq %r15, %rcx
movq %r12, %r8
callq 0x8ccf
addq $0x8, %rbx
cmpq %rbx, %r13
jne 0x8c56
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x8ab8
callq 0x4837
leaq 0x80(%rsp), %rax
movl $0xf, %ecx
movq %rax, %rdi
movq %r14, %rsi
rep  movsq (%rsi), %es:(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x78(%rax)
movq %rax, %rdi
movq (%rsp), %rsi
callq 0xa422
cmpl $0x0, 0x12dce(%rip)     # 0x1ba88
sete %al
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/baziotis[P]minijava-cpp/typecheck.cpp
// Function: void typecheck_error<char const*, char, char const*, char const*, char const*>(location_t, char const*, char, char const*, char const*, char const*)
static void typecheck_error(location_t __loc, Args... args) {
    ++num_global_typecheck_errors;
    log(__loc);
    yellow_on();
    bold_on();
    log(" Semantic Error: ");
    bold_off();
    yellow_off();
    log(args...);
    printf("\n");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %rbx
movl %edx, %ebp
incl 0xefb8(%rip)            # 0x1ba88
movq %rsi, %r14
movl %edi, %edx
leaq 0xcf64(%rip), %rax      # 0x19a40
movq (%rax), %rsi
leaq 0x4210(%rip), %rdi      # 0x10cf6
xorl %eax, %eax
callq 0x2030
leaq 0xcf44(%rip), %r15      # 0x19a38
cmpb $0x1, 0x1(%r15)
jne 0xcb09
leaq 0x7180(%rip), %rdi      # 0x13c82
xorl %eax, %eax
callq 0x2030
cmpb $0x1, 0x1(%r15)
jne 0xcb1e
leaq 0x41e8(%rip), %rdi      # 0x10cff
xorl %eax, %eax
callq 0x2030
leaq 0x388f(%rip), %rdi      # 0x103b4
leaq 0x7144(%rip), %rsi      # 0x13c70
xorl %eax, %eax
callq 0x2030
cmpb $0x1, 0x1(%r15)
jne 0xcb48
leaq 0x39c4(%rip), %rdi      # 0x10505
xorl %eax, %eax
callq 0x2030
cmpb $0x1, 0x1(%r15)
jne 0xcb5d
leaq 0x39af(%rip), %rdi      # 0x10505
xorl %eax, %eax
callq 0x2030
leaq 0x3850(%rip), %rdi      # 0x103b4
movq %r14, %rsi
xorl %eax, %eax
callq 0x2030
movzbl %bpl, %edi
callq 0x2160
leaq 0x6471(%rip), %rdi      # 0x12fef
leaq 0x4eec(%rip), %rdx      # 0x11a71
movq %rbx, %rsi
callq 0xeac0
movl $0xa, %edi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2160
// File: /workspace/github_cpp_makefile_star2_O1/baziotis[P]minijava-cpp/typecheck.cpp
// Function: DeclarationVisitor::id_to_type(char const*, location_t)
IdType* DeclarationVisitor::id_to_type(const char *id, location_t loc) {
    // Check if it already exists.
    IdType *type = this->type_table.find(id);
    if (type) {
        return type;
    }
    // Otherwise construct a new one and
    // save it in the table.
    type = new IdType(id);
    type->loc = loc;
    this->type_table.insert(type->id, type);
    return type;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x30(%rdi), %rax
testq %rax, %rax
je 0x8dff
testq %r14, %r14
je 0x8e4e
imull $0x5f5e505, %r14d, %ecx # imm = 0x5F5E505
imulq %rax, %rcx
shrq $0x20, %rcx
movq 0x38(%rbx), %rsi
xorl %r15d, %r15d
movq %rcx, %rdx
movq (%rsi,%rdx,8), %rdi
cmpq %r14, %rdi
je 0x8e04
testq %rdi, %rdi
je 0x8e0c
incq %rdx
cmpq %rax, %rdx
cmoveq %r15, %rdx
cmpq %rcx, %rdx
jne 0x8de0
jmp 0x8e0c
xorl %r15d, %r15d
jmp 0x8e0c
movq 0x40(%rbx), %rax
movq (%rax,%rdx,8), %r15
testq %r15, %r15
jne 0x8e40
movl $0x90, %edi
movl $0x3, %esi
callq 0x23f5
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
callq 0xed22
movl %ebp, (%r15)
movq 0x8(%r15), %rsi
movq %rbx, %rdi
movq %r15, %rdx
callq 0x8e86
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0xa9bf(%rip), %rdi      # 0x13814
leaq 0xa9bc(%rip), %rsi      # 0x13818
leaq 0xa9c4(%rip), %rcx      # 0x13827
movl $0x5e, %edx
callq 0x20b0
movq %rax, %rbx
movl $0x90, %esi
movq %r15, %rdi
callq 0x2100
movq %rbx, %rdi
callq 0x21c0
nop
// File: /workspace/github_cpp_makefile_star2_O1/baziotis[P]minijava-cpp/typecheck.cpp
// Function: TypeTable::insert(char const*, IdType*)
void TypeTable::insert(const char *id, IdType* v) {
    if (!type_table.insert(id, v)) {
        // Search in the auxiliary buffer
        for (IdType *type : could_not_be_inserted) {
            if (type->id == id) {
                return;
            }
        }
        could_not_be_inserted.push(v);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rdi, %rbx
movq 0x50(%rdi), %rax
cmpq 0x58(%rdi), %rax
jne 0x8f05
movq 0x68(%rbx), %r15
testq %r15, %r15
sete %cl
je 0x8edf
movq 0x70(%rbx), %rax
movq (%rax), %rdx
cmpq %rsi, 0x8(%rdx)
je 0x8ed7
leaq (,%r15,8), %rdx
movl $0x8, %edi
cmpq %rdi, %rdx
sete %cl
je 0x8edf
movq (%rax,%rdi), %r8
addq $0x8, %rdi
cmpq %rsi, 0x8(%r8)
jne 0x8ec1
testb %cl, %cl
je 0x8f7d
leaq 0x60(%rbx), %rdi
incq %r15
cmpq (%rdi), %r15
jbe 0x8ef3
movq %r15, %rsi
callq 0xf8fa
movq 0x68(%rbx), %rax
movq 0x70(%rbx), %rcx
movq %r14, (%rcx,%rax,8)
movq %r15, 0x68(%rbx)
jmp 0x8f7d
testq %rsi, %rsi
je 0x8fb0
movq 0x30(%rbx), %rcx
testq %rcx, %rcx
je 0x8fcf
imull $0x5f5e505, %esi, %edx  # imm = 0x5F5E505
imulq %rcx, %rdx
shrq $0x20, %rdx
movq 0x38(%rbx), %rdi
movq (%rdi,%rdx,8), %r10
testq %r10, %r10
je 0x8f5f
xorl %r9d, %r9d
movq %rdx, %r8
cmpq %rsi, %r10
je 0x8f83
incq %r8
cmpq %rcx, %r8
cmoveq %r9, %r8
cmpq %rdx, %r8
je 0x8e9b
movq (%rdi,%r8,8), %r10
testq %r10, %r10
jne 0x8f3c
jmp 0x8f62
movq %rdx, %r8
movq %rsi, (%rdi,%r8,8)
movq 0x40(%rbx), %rcx
movq %r14, (%rcx,%r8,8)
movq 0x48(%rbx), %rcx
movq %r14, (%rcx,%rax,8)
incq %rax
movq %rax, 0x50(%rbx)
popq %rbx
popq %r14
popq %r15
retq
leaq 0xae17(%rip), %rdi      # 0x13da1
xorl %eax, %eax
callq 0x2030
leaq 0x87c0(%rip), %rdi      # 0x11758
leaq 0xa879(%rip), %rsi      # 0x13818
leaq 0xad89(%rip), %rcx      # 0x13d2f
movl $0x53, %edx
callq 0x20b0
leaq 0xa85d(%rip), %rdi      # 0x13814
leaq 0xa85a(%rip), %rsi      # 0x13818
leaq 0xad6a(%rip), %rcx      # 0x13d2f
movl $0x46, %edx
callq 0x20b0
leaq 0xadc2(%rip), %rdi      # 0x13d98
leaq 0xa83b(%rip), %rsi      # 0x13818
leaq 0xad4b(%rip), %rcx      # 0x13d2f
movl $0x47, %edx
callq 0x20b0
// File: /workspace/github_cpp_makefile_star2_O1/baziotis[P]minijava-cpp/typecheck.cpp
// Function: DeclarationVisitor::typespec_to_type(Typespec, location_t)
Type* DeclarationVisitor::typespec_to_type(Typespec tspec, location_t loc) {
    switch (tspec.kind) {
    case TYSPEC::UNDEFINED: assert(0);
    case TYSPEC::INT: return type_table.int_type;
    case TYSPEC::ARR: return type_table.int_arr_type;
    case TYSPEC::BOOL: return type_table.bool_type;
    case TYSPEC::ID: return this->id_to_type(tspec.id, loc);
    default: assert(0);
    }
}

// Assembly:
pushq %rax
cmpl $0x4, %esi
ja 0x9042
movl %esi, %eax
leaq 0x93ab(%rip), %rsi      # 0x123a8
movslq (%rsi,%rax,4), %rax
addq %rsi, %rax
jmpq *%rax
movq 0x18(%rdi), %rax
jmp 0x9021
movq 0x10(%rdi), %rax
jmp 0x9021
movq %rdx, %rsi
movl %ecx, %edx
popq %rax
jmp 0x8da6
movq 0x8(%rdi), %rax
popq %rcx
retq
leaq 0x9688(%rip), %rdi      # 0x126b2
leaq 0x945d(%rip), %rsi      # 0x1248e
leaq 0x95f3(%rip), %rcx      # 0x1262b
movl $0x1de, %edx            # imm = 0x1DE
callq 0x20b0
leaq 0x9669(%rip), %rdi      # 0x126b2
leaq 0x943e(%rip), %rsi      # 0x1248e
leaq 0x95d4(%rip), %rcx      # 0x1262b
movl $0x1e3, %edx            # imm = 0x1E3
callq 0x20b0
nop
// File: /workspace/github_cpp_makefile_star2_O1/baziotis[P]minijava-cpp/typecheck.cpp
// Function: TypeTable::initialize(unsigned long)
void TypeTable::initialize(size_t n) {
    type_table.reserve(n);
    undefined_type = new Type(TY::UNDEFINED);
    bool_type = new Type(TY::BOOL);
    int_type = new Type(TY::INT);
    int_arr_type = new Type(TY::ARR);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
addq $0x30, %rdi
callq 0xed96
movl $0x8, %edi
movl $0x3, %esi
callq 0x23f5
movl $0x0, 0x4(%rax)
movq %rax, (%rbx)
movl $0x8, %edi
movl $0x3, %esi
callq 0x23f5
movl $0x3, 0x4(%rax)
movq %rax, 0x8(%rbx)
movl $0x8, %edi
movl $0x3, %esi
callq 0x23f5
movl $0x1, 0x4(%rax)
movq %rax, 0x10(%rbx)
movl $0x8, %edi
movl $0x3, %esi
callq 0x23f5
movl $0x2, 0x4(%rax)
movq %rax, 0x18(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/baziotis[P]minijava-cpp/typecheck.cpp
// Function: DeclarationVisitor::visit(Goal*)
void DeclarationVisitor::visit(Goal *goal) {
    LOG_SCOPE;
    debug_print("Pass1::Goal\n");
    goal->main_class.accept(this);
    for (TypeDeclaration *type_decl : goal->type_decls) {
        type_decl->accept(this);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x7(%rsp), %rdi
callq 0x34d0
leaq 0x9551(%rip), %rdi      # 0x1266c
xorl %eax, %eax
callq 0x3541
leaq 0x8(%r14), %rsi
movq %rbx, %rdi
callq 0x9184
movq 0x50(%r14), %r15
testq %r15, %r15
je 0x9157
movq 0x58(%r14), %r14
shlq $0x3, %r15
xorl %r12d, %r12d
movq (%r14,%r12), %rsi
movq %rbx, %rdi
callq 0x9500
addq $0x8, %r12
cmpq %r12, %r15
jne 0x9142
leaq 0x7(%rsp), %rdi
callq 0x34e4
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x916f
movq %rax, %rbx
leaq 0x7(%rsp), %rdi
callq 0x34e4
movq %rbx, %rdi
callq 0x21c0
// File: /workspace/github_cpp_makefile_star2_O1/baziotis[P]minijava-cpp/typecheck.cpp
// Function: DeclarationVisitor::visit(MainClass*)
void DeclarationVisitor::visit(MainClass *main_class) {
    LOG_SCOPE;
    debug_print("Pass1::MainClass: %s\n", main_class->id);
    // Assert that we visit this first i.e., no types have been created
    assert(this->type_table.len_inserted() == 0);
    IdType *main_cls_type = new IdType(main_class->id,
                                       /* nfields = */ 0,
                                       /* nmethods = */ 0);
    main_cls_type->loc = main_class->loc;

    this->type_table.main_cls_type = main_cls_type;
    this->type_table.insert(main_class->id, main_cls_type);
    inher_roots.push(main_cls_type);

    // Construct a custom method for `main()`
    Method *main_method = Method::construct_main_method(this, main_class);
    this->type_table.main_method = main_method;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x7(%rsp), %rdi
callq 0x34d0
movq 0x8(%r14), %rsi
leaq 0x94d2(%rip), %rdi      # 0x12679
xorl %eax, %eax
callq 0x3541
cmpq $0x0, 0x50(%rbx)
jne 0x9254
movl $0x90, %edi
movl $0x3, %esi
callq 0x23f5
movq %rax, %r15
movq 0x8(%r14), %rsi
movq %rax, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xeee6
movl (%r14), %eax
movl %eax, (%r15)
movq %r15, 0x20(%rbx)
movq 0x8(%r14), %rsi
movq %rbx, %rdi
movq %r15, %rdx
callq 0x8e86
movq 0x1287d(%rip), %r12     # 0x1ba78
incq %r12
cmpq 0x1286b(%rip), %r12     # 0x1ba70
jbe 0x9216
leaq 0x12862(%rip), %rdi     # 0x1ba70
movq %r12, %rsi
callq 0xf8fa
movq 0x12863(%rip), %rax     # 0x1ba80
movq 0x12854(%rip), %rcx     # 0x1ba78
movq %r15, (%rax,%rcx,8)
movq %r12, 0x12849(%rip)     # 0x1ba78
movq %rbx, %rdi
movq %r14, %rsi
callq 0x929e
movq %rax, 0x28(%rbx)
leaq 0x7(%rsp), %rdi
callq 0x34e4
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x9434(%rip), %rdi      # 0x1268f
leaq 0x922c(%rip), %rsi      # 0x1248e
leaq 0x944b(%rip), %rcx      # 0x126b4
movl $0x212, %edx            # imm = 0x212
callq 0x20b0
jmp 0x9289
movq %rax, %rbx
movl $0x90, %esi
movq %r15, %rdi
callq 0x2100
jmp 0x928c
jmp 0x9289
movq %rax, %rbx
leaq 0x7(%rsp), %rdi
callq 0x34e4
movq %rbx, %rdi
callq 0x21c0
// File: /workspace/github_cpp_makefile_star2_O1/baziotis[P]minijava-cpp/typecheck.cpp
// Function: DeclarationVisitor::visit(LocalDeclaration*)
Local *DeclarationVisitor::visit(LocalDeclaration *local_decl) {
    // Note: It's responsibility of the one who calls this visit
    // to have assured that a local declaration with the same
    // id does not exist.
    LOG_SCOPE;
    assert(!local_decl->is_undefined());
    print_indentation();
    debug_log(local_decl->loc, "LocalDeclaration: ", local_decl->id, "\n");
    if (local_decl->typespec.id != NULL
        && local_decl->typespec.id == this->type_table.main_cls_type->id)
    {
        typecheck_error(local_decl->loc, "You can't declare a local of type of",
                        " the main class.");
    }
    Type *type = typespec_to_type(local_decl->typespec, local_decl->loc);
    Local *local = new Local(local_decl->id, type);
    return local;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0xf(%rsp), %rdi
callq 0x34d0
cmpq $0x0, 0x18(%rbx)
je 0x9e4d
callq 0x34f7
movl (%rbx), %edi
movq 0x18(%rbx), %rdx
leaq 0x8a8c(%rip), %rsi      # 0x12864
callq 0x9ac9
movq 0x10(%rbx), %rax
testq %rax, %rax
je 0x9e05
movq 0x20(%r14), %rcx
cmpq 0x8(%rcx), %rax
jne 0x9e05
movl (%rbx), %edi
leaq 0x8a7e(%rip), %rsi      # 0x12877
leaq 0x8ec2(%rip), %rdx      # 0x12cc2
callq 0x9e85
movl (%rbx), %ecx
movl 0x8(%rbx), %esi
movq 0x10(%rbx), %rdx
movq %r14, %rdi
callq 0x8fee
movq %rax, %r14
movl $0x40, %edi
movl $0x3, %esi
callq 0x23f5
movq %rax, %r15
movq 0x18(%rbx), %rax
movq %rax, (%r15)
movq %r14, 0x8(%r15)
leaq 0xf(%rsp), %rdi
callq 0x34e4
movq %r15, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x89bf(%rip), %rdi      # 0x12813
leaq 0x8633(%rip), %rsi      # 0x1248e
leaq 0x89cd(%rip), %rcx      # 0x1282f
movl $0x293, %edx            # imm = 0x293
callq 0x20b0
jmp 0x9e70
jmp 0x9e70
movq %rax, %rbx
leaq 0xf(%rsp), %rdi
callq 0x34e4
movq %rbx, %rdi
callq 0x21c0
// File: /workspace/github_cpp_makefile_star2_O1/baziotis[P]minijava-cpp/typecheck.cpp
// Function: DeclarationVisitor::gen_id()
const char *DeclarationVisitor::gen_id() {
    static int count = 0;
    char buf[64];
    sprintf(buf, "a%d", count);
    count++;
    return str_intern(buf);
}

// Assembly:
pushq %rbx
subq $0x40, %rsp
movl 0x11b31(%rip), %edx     # 0x1ba8c
leaq 0x893a(%rip), %rsi      # 0x1289c
movq %rsp, %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2040
incl 0x11b17(%rip)           # 0x1ba8c
movq %rbx, %rdi
callq 0x8238
addq $0x40, %rsp
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/baziotis[P]minijava-cpp/typecheck.cpp
// Function: MainTypeCheckVisitor::visit(Goal*)
void MainTypeCheckVisitor::visit(Goal *goal) {
    LOG_SCOPE;
    debug_print("MainTypeCheck::Goal\n");
    goal->main_class.accept(this);
    for (IdType *type : this->type_table) {
        if (type->is_defined()) {
            type->accept(this);
        } else {
            // type->loc is going to be the location of its first usage (Check
            // id_to_type()). Ideally, we would like to have all the locations
            // it was used, or some, but this will at least make this a not very
            // bad message.
            typecheck_error(type->loc, "Type `", type->id, "` has not been ",
                            "defined");
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x7(%rsp), %rdi
callq 0x34d0
leaq 0x8500(%rip), %rdi      # 0x12941
xorl %eax, %eax
callq 0x3541
movq %rbx, %rdi
callq 0xa4d8
movq 0x50(%rbx), %r13
testq %r13, %r13
je 0xa4a8
movq 0x48(%rbx), %rbp
shlq $0x3, %r13
xorl %r14d, %r14d
leaq 0x81b0(%rip), %r15      # 0x1261b
leaq 0x8e3f(%rip), %r12      # 0x132b1
movq (%rbp,%r14), %rsi
cmpl $0x0, 0x4(%rsi)
je 0xa487
movq %rbx, %rdi
callq 0xa544
jmp 0xa49f
movl (%rsi), %edi
movq 0x8(%rsi), %rdx
leaq 0x8180(%rip), %rsi      # 0x12614
movq %r15, %rcx
movq %r12, %r8
callq 0x8ccf
addq $0x8, %r14
cmpq %r14, %r13
jne 0xa472
leaq 0x7(%rsp), %rdi
callq 0x34e4
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xa4c3
movq %rax, %rbx
leaq 0x7(%rsp), %rdi
callq 0x34e4
movq %rbx, %rdi
callq 0x21c0
// File: /workspace/github_cpp_makefile_star2_O1/baziotis[P]minijava-cpp/typecheck.cpp
// Function: MainTypeCheckVisitor::visit(MainClass*)
void MainTypeCheckVisitor::visit(MainClass *main_class) {
    LOG_SCOPE;
    debug_print("MainTypeCheck::MainClass\n");
    this->curr_class = this->type_table.main_cls_type;
    this->type_table.main_method->accept(this, this->curr_class->id);
    this->curr_class = NULL;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0xf(%rsp), %rdi
callq 0x34d0
leaq 0x8465(%rip), %rdi      # 0x12956
xorl %eax, %eax
callq 0x3541
movq 0x20(%rbx), %rax
movq 0x28(%rbx), %rsi
movq %rax, 0x80(%rbx)
movq 0x8(%rax), %rdx
movq %rbx, %rdi
callq 0xa60c
movq $0x0, 0x80(%rbx)
leaq 0xf(%rsp), %rdi
callq 0x34e4
addq $0x10, %rsp
popq %rbx
retq
movq %rax, %rbx
leaq 0xf(%rsp), %rdi
callq 0x34e4
movq %rbx, %rdi
callq 0x21c0
nop
// File: /workspace/github_cpp_makefile_star2_O1/baziotis[P]minijava-cpp/typecheck.cpp
// Function: MainTypeCheckVisitor::visit(IdType*)
void MainTypeCheckVisitor::visit(IdType *type) {
    LOG_SCOPE;
    assert(type->is_IdType());
    assert(type->is_defined());
    debug_print("MainTypeCheck::IdType %s\n", type->id);

    this->curr_class = type;
    for (Method *method : type->methods) {
        method->accept(this, type->id);
    }
    this->curr_class = NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0xf(%rsp), %rdi
callq 0x34d0
testq %r14, %r14
je 0xa5d6
cmpl $0x4, 0x4(%r14)
jne 0xa5d6
movq 0x8(%r14), %rsi
leaq 0x8423(%rip), %rdi      # 0x1299b
xorl %eax, %eax
callq 0x3541
movq %r14, 0x80(%rbx)
movq 0x60(%r14), %r15
testq %r15, %r15
je 0xa5b3
movq 0x58(%r14), %r12
shlq $0x3, %r15
xorl %r13d, %r13d
movq (%r12,%r13), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
callq 0xa60c
addq $0x8, %r13
cmpq %r13, %r15
jne 0xa59a
movq $0x0, 0x80(%rbx)
leaq 0xf(%rsp), %rdi
callq 0x34e4
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x706e(%rip), %rdi      # 0x1164b
leaq 0x7eaa(%rip), %rsi      # 0x1248e
leaq 0x8385(%rip), %rcx      # 0x12970
movl $0x2ea, %edx            # imm = 0x2EA
callq 0x20b0
jmp 0xa5f7
movq %rax, %rbx
leaq 0xf(%rsp), %rdi
callq 0x34e4
movq %rbx, %rdi
callq 0x21c0
// File: /workspace/github_cpp_makefile_star2_O1/baziotis[P]minijava-cpp/typecheck.cpp
// Function: compatible_types(Type*, Type*)
static bool compatible_types(Type *lhs, Type *rhs) {
    if (lhs == rhs) return true;
    IdType *ty1 = lhs->is_IdType();
    IdType *ty2 = rhs->is_IdType();
    if (ty1 && ty2) {
        IdType *runner = ty2;
        while (runner->parent) {
            runner = runner->parent;
            if (runner == ty1) {
                return true;
            }
            // Cyclic inheritance, we issue error elsewhere.
            if (runner == ty2) break;
        }
        return false;
    }
    return false;
}

// Assembly:
cmpq %rsi, %rdi
je 0xaa8c
xorl %eax, %eax
cmpl $0x4, 0x4(%rdi)
cmovneq %rax, %rdi
cmpl $0x4, 0x4(%rsi)
cmovneq %rax, %rsi
testq %rdi, %rdi
sete %cl
testq %rsi, %rsi
sete %dl
orb %cl, %dl
jne 0xaa8b
movq %rsi, %rax
movq 0x78(%rax), %rax
testq %rax, %rax
je 0xaa89
cmpq %rdi, %rax
je 0xaa8c
cmpq %rsi, %rax
jne 0xaa76
xorl %eax, %eax
retq
movb $0x1, %al
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/baziotis[P]minijava-cpp/typecheck.cpp
// Function: typecheck_and_helper(bool, Expression*, MainTypeCheckVisitor*, Type*, Type*)
static Type *typecheck_and_helper(bool is_correct, Expression *expr,
                                  MainTypeCheckVisitor *v, Type *boolty, Type *undefinedty) {
    Type *ty = expr->accept(v);
    if (ty->kind == TY::UNDEFINED) {
        return undefinedty;
    }
    if (ty != boolty) {
        typecheck_error(expr->loc, "Bad right operand for binary operator `&&`. Operand ",
                        "of boolean type was expected, found: `", ty->name(), "`");
        is_correct = false;
    }
    if (is_correct) {
        return boolty;
    }
    return undefinedty;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rcx, %r14
movq %rsi, %r15
movl %edi, %ebp
movq %rdx, %rdi
callq 0xaa90
cmpl $0x0, 0x4(%rax)
je 0xcab0
cmpq %r14, %rax
je 0xcaa9
movl (%r15), %ebp
movq %rax, %rdi
callq 0x84fa
leaq 0x704b(%rip), %rsi      # 0x13ada
leaq 0x63aa(%rip), %rdx      # 0x12e40
leaq 0x4fd4(%rip), %r8       # 0x11a71
movl %ebp, %edi
movq %rax, %rcx
callq 0x8ccf
xorl %ebp, %ebp
testb %bpl, %bpl
cmovneq %r14, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/baziotis[P]minijava-cpp/typecheck.cpp
// Function: MainTypeCheckVisitor::visit(BlockStatement*)
void MainTypeCheckVisitor::visit(BlockStatement *block_stmt) {
    LOG_SCOPE;
    debug_print("MainTypeCheck::BlockStatement\n");
    for (Statement *stmt : block_stmt->block) {
        stmt->accept(this);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x7(%rsp), %rdi
callq 0x34d0
leaq 0x658b(%rip), %rdi      # 0x13208
xorl %eax, %eax
callq 0x3541
movq 0x18(%r14), %r15
testq %r15, %r15
je 0xccae
movq 0x20(%r14), %r14
shlq $0x3, %r15
xorl %r12d, %r12d
movq (%r14,%r12), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x18(%rax)
addq $0x8, %r12
cmpq %r12, %r15
jne 0xcc98
leaq 0x7(%rsp), %rdi
callq 0x34e4
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0xccc6
movq %rax, %rbx
leaq 0x7(%rsp), %rdi
callq 0x34e4
movq %rbx, %rdi
callq 0x21c0
nop
// File: /workspace/github_cpp_makefile_star2_O1/baziotis[P]minijava-cpp/typecheck.cpp
// Function: get_track_buf(SerializedHashTable<Local*>)
FuncArr<WhileAssign> get_track_buf(SerializedHashTable<Local*> locals) {
    FuncArr<WhileAssign> track_buf(locals.len);
    size_t i = 0;
    for (Local *lo : locals) {
        // Initialize its entry with its local and dumb
        // values for `assigned` and `used` (they will be overriden).
        track_buf.push({lo, 0, 0});
        ++i;
    }
    return track_buf;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x50(%rsp), %r14
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq %r14, %rsi
callq 0xfba6
testq %r14, %r14
je 0xe197
movq 0x48(%rsp), %r15
shlq $0x3, %r14
xorl %r12d, %r12d
movq (%r15,%r12), %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0xf1fc
addq $0x8, %r12
cmpq %r12, %r14
jne 0xe180
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/baziotis[P]minijava-cpp/typecheck.cpp
// Function: MainTypeCheckVisitor::visit(PrintStatement*)
void MainTypeCheckVisitor::visit(PrintStatement *print_stmt) {
    LOG_SCOPE;
    debug_print("MainTypeCheck::PrintStatement\n");
    // A print statement can have only integer.
    Type *ty = print_stmt->to_print->accept(this);
    poison_stmt(ty);
    if (ty != this->type_table.int_type) {
        typecheck_error(print_stmt->to_print->loc,
                        "Print statement accepts only integer expressions.");
    }
    /// Codegen ///
    llvalue_t to_print = __expr_context.llval;
    cgen_print_stmt(to_print);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x27(%rsp), %rdi
callq 0x34d0
leaq 0x4c72(%rip), %rdi      # 0x13648
xorl %eax, %eax
callq 0x3541
movq 0x10(%rbx), %rsi
movq %r14, %rdi
callq 0xaa90
cmpl $0x0, 0x4(%rax)
je 0xea24
cmpq 0x10(%r14), %rax
je 0xea07
movq 0x10(%rbx), %rax
movl (%rax), %edi
leaq 0x4c65(%rip), %rsi      # 0x13667
callq 0xc99f
leaq 0xafaa(%rip), %rax      # 0x199b8
movups 0x8(%rax), %xmm0
movups 0x18(%rax), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
callq 0x494a
leaq 0x27(%rsp), %rdi
callq 0x34e4
addq $0x28, %rsp
popq %rbx
popq %r14
retq
jmp 0xea3a
jmp 0xea3a
movq %rax, %rbx
leaq 0x27(%rsp), %rdi
callq 0x34e4
movq %rbx, %rdi
callq 0x21c0
nop
// File: /workspace/github_cpp_makefile_star2_O1/baziotis[P]minijava-cpp/typecheck.cpp
// Function: Method::Method(MethodDeclaration*)
Method::Method(MethodDeclaration *method_decl) {
    id = method_decl->id;
    size_t locals_size = method_decl->params.len + method_decl->vars.len;
    locals.reserve(locals_size);
    param_len = method_decl->params.len;
    stmts = method_decl->stmts;
    ret_expr = method_decl->ret;
    loc = method_decl->loc;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
addq $0x18, %rdi
xorps %xmm0, %xmm0
movups %xmm0, 0x38(%r14)
movups %xmm0, 0x28(%r14)
movups %xmm0, 0x18(%r14)
movups %xmm0, 0x58(%r14)
movq $0x0, 0x68(%r14)
movq 0x18(%rsi), %rax
movq %rax, (%r14)
movq 0x40(%rsi), %rsi
addq 0x28(%rbx), %rsi
callq 0xf2ea
movq 0x28(%rbx), %rax
movq %rax, 0x10(%r14)
movups 0x50(%rbx), %xmm0
movups %xmm0, 0x58(%r14)
movq 0x60(%rbx), %rax
movq %rax, 0x68(%r14)
movq 0x68(%rbx), %rax
movq %rax, 0x70(%r14)
movl (%rbx), %eax
movl %eax, 0x50(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/baziotis[P]minijava-cpp/typecheck.cpp
// Function: void typecheck_error_no_ln<char const*, char const*, char const*, char const*>(location_t, char const*, char const*, char const*, char const*)
void typecheck_error_no_ln(location_t __loc, Args... args) {
    ++num_global_typecheck_errors;
    log(__loc);
    yellow_on();
    bold_on();
    log(" Semantic Error: ");
    bold_off();
    yellow_off();
    log(args...);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r15
incl 0xced0(%rip)            # 0x1ba88
movq %rsi, %r12
movl %edi, %edx
leaq 0xae7c(%rip), %rax      # 0x19a40
movq (%rax), %rsi
leaq 0x2128(%rip), %rdi      # 0x10cf6
xorl %eax, %eax
callq 0x2030
leaq 0xae5c(%rip), %r13      # 0x19a38
cmpb $0x1, 0x1(%r13)
jne 0xebf1
leaq 0x5098(%rip), %rdi      # 0x13c82
xorl %eax, %eax
callq 0x2030
cmpb $0x1, 0x1(%r13)
jne 0xec06
leaq 0x2100(%rip), %rdi      # 0x10cff
xorl %eax, %eax
callq 0x2030
leaq 0x17a7(%rip), %rdi      # 0x103b4
leaq 0x505c(%rip), %rsi      # 0x13c70
xorl %eax, %eax
callq 0x2030
cmpb $0x1, 0x1(%r13)
jne 0xec30
leaq 0x18dc(%rip), %rdi      # 0x10505
xorl %eax, %eax
callq 0x2030
cmpb $0x1, 0x1(%r13)
jne 0xec45
leaq 0x18c7(%rip), %rdi      # 0x10505
xorl %eax, %eax
callq 0x2030
leaq 0x1768(%rip), %rdi      # 0x103b4
movq %r12, %rsi
xorl %eax, %eax
callq 0x2030
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xeac0
nop
// File: /workspace/github_cpp_makefile_star2_O1/baziotis[P]minijava-cpp/typecheck.cpp
// Function: VirtualTable::insert(Method*, char const*)
void insert(Method *method, const char *enclosing) {
        assert(method);
        // Keep index that it will be pushed in the serial buffer.
        ssize_t index = vmethods.len;
        vmethods.push({method, enclosing});
        // Insert it into the table (giving it an index to keep
        // in the serial buffer)
        const char *method_id = method->id;
        ssize_t val = this->hash(method_id);
        buckets[val].insert(method_id, index);
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rsi, %rsi
je 0xecc0
movq %rsi, %r14
movq %rdi, %rbx
addq $0x1308, %rdi           # imm = 0x1308
movq 0x1310(%rbx), %r15
callq 0xf4c8
movq (%r14), %rsi
movl $0xbebca0a0, %eax       # imm = 0xBEBCA0A0
imulq %rsi, %rax
shrq $0x20, %rax
andl $0x1f, %eax
imulq $0x98, %rax, %rax
leaq (%rbx,%rax), %rdi
addq $0x8, %rdi
movq %r15, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0xf516
leaq 0x3b3a(%rip), %rdi      # 0x12801
leaq 0x37c0(%rip), %rsi      # 0x1248e
leaq 0x4a2f(%rip), %rcx      # 0x13704
movl $0xde, %edx
callq 0x20b0
nop
// File: /workspace/github_cpp_makefile_star2_O1/baziotis[P]minijava-cpp/./typecheck.h
// Function: SerializedHashTable<IdType*>::reserve(unsigned long)
inline void reserve(size_t n) {
        if (n == 0) {
          return;
        }
        cap = n;
        len = 0;
        serialized = (T *) allocate(cap * sizeof(T), MEM::TYPECHECK);
        assert(serialized);
        table.reserve(cap);
    }

// Assembly:
pushq %rbx
testq %rsi, %rsi
je 0xee86
movq %rdi, %rbx
movq %rsi, 0x28(%rdi)
movq $0x0, 0x20(%rdi)
shlq $0x3, %rsi
movq %rsi, %rdi
movl $0x3, %esi
callq 0x22dc
movq %rax, 0x18(%rbx)
testq %rax, %rax
je 0xee88
movq 0x28(%rbx), %rax
testq %rax, %rax
je 0xee76
movq %rax, %xmm0
punpckldq 0x3669(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x3671(%rip), %xmm0     # 0x12460
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
divsd 0x366d(%rip), %xmm1     # 0x12470
cvttsd2si %xmm1, %rax
movq %rax, %rcx
sarq $0x3f, %rcx
subsd 0x3661(%rip), %xmm1     # 0x12478
cvttsd2si %xmm1, %rdi
andq %rcx, %rdi
orq %rax, %rdi
movq %rdi, (%rbx)
shlq $0x3, %rdi
movl $0x3, %esi
callq 0x23f5
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0xeea7
movq (%rbx), %rdi
shlq $0x3, %rdi
movl $0x3, %esi
callq 0x23f5
movq %rax, 0x10(%rbx)
testq %rax, %rax
je 0xeec6
movq (%rbx), %rax
testq %rax, %rax
je 0xee86
xorl %ecx, %ecx
movq 0x8(%rbx), %rdx
movq $0x0, (%rdx,%rcx,8)
incq %rcx
cmpq %rcx, %rax
jne 0xee60
jmp 0xee86
xorpd %xmm0, %xmm0
movupd %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
popq %rbx
retq
leaq 0x4b18(%rip), %rdi      # 0x139a7
leaq 0x4b1c(%rip), %rsi      # 0x139b2
leaq 0x4e4f(%rip), %rcx      # 0x13cec
movl $0x2d, %edx
callq 0x20b0
leaq 0x49da(%rip), %rdi      # 0x13888
leaq 0x4963(%rip), %rsi      # 0x13818
leaq 0x4a8a(%rip), %rcx      # 0x13946
movl $0x29, %edx
callq 0x20b0
leaq 0x2d68(%rip), %rdi      # 0x11c35
leaq 0x4944(%rip), %rsi      # 0x13818
leaq 0x4a6b(%rip), %rcx      # 0x13946
movl $0x2b, %edx
callq 0x20b0
nop
// File: /workspace/github_cpp_makefile_star2_O1/baziotis[P]minijava-cpp/./llvm.h
// Function: lbl_pair_t::construct(char const*)
void construct(const char *lbl) {
        long num = gen_lbl();
        size_t len = strlen(lbl);
        size_t alloc_size = len + 10;
        char *pstart = (char *) allocate(alloc_size, MEM::FUNC);
        char *pend = (char *) allocate(alloc_size, MEM::FUNC);
        sprintf(pstart, "%s", lbl);
        sprintf(pend, "%s_end", lbl);
        start.construct(pstart, num);
        end.construct(pend, num);
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
callq 0x4762
movq %rax, %r14
movq %r15, %rdi
callq 0x2090
leaq 0xa(%rax), %r12
movq %r12, %rdi
movl $0x4, %esi
callq 0x22dc
movq %rax, %r13
movq %r12, %rdi
movl $0x4, %esi
callq 0x22dc
movq %rax, %r12
movq %r13, %rdi
movq %r15, %rsi
callq 0x20f0
leaq 0x4b0a(%rip), %rsi      # 0x13b0f
movq %r12, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x2040
movq %rbx, %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0xf112
addq $0x8, %rbx
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, %rdx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xf112
nop
// File: /workspace/github_cpp_makefile_star2_O1/baziotis[P]minijava-cpp/./array.h
// Function: Array<llvalue_t, (MEM)4>::push(llvalue_t)
void push(T v) {
        constexpr size_t size_t_max = std::numeric_limits<size_t>::max();
        assert(len < size_t_max);
        assert(len < cap);
        size_t new_len = len + 1;
        data[len] = v;
        len = new_len;
    }

// Assembly:
pushq %rax
movq 0x8(%rdi), %rax
cmpq $-0x1, %rax
je 0xf073
cmpq (%rdi), %rax
jae 0xf092
leaq 0x10(%rsp), %rcx
leaq 0x1(%rax), %rdx
movq 0x10(%rdi), %rsi
shlq $0x5, %rax
movups (%rcx), %xmm0
movups 0x10(%rcx), %xmm1
movups %xmm1, 0x10(%rsi,%rax)
movups %xmm0, (%rsi,%rax)
movq %rdx, 0x8(%rdi)
popq %rax
retq
leaq 0x49aa(%rip), %rdi      # 0x13a24
leaq 0x271d(%rip), %rsi      # 0x1179e
leaq 0x4f06(%rip), %rcx      # 0x13f8e
movl $0x22, %edx
callq 0x20b0
leaq 0x49ed(%rip), %rdi      # 0x13a86
leaq 0x26fe(%rip), %rsi      # 0x1179e
leaq 0x4ee7(%rip), %rcx      # 0x13f8e
movl $0x23, %edx
callq 0x20b0
nop
// File: /workspace/github_cpp_makefile_star2_O1/baziotis[P]minijava-cpp/./llvm.h
// Function: llvm_label_t::construct(char const*, long)
void construct(const char *_lbl, long num = -1) {
        assert(_lbl);
        assert(lbl == NULL);
        if (num == -1) {
            num = gen_lbl();
        }

        // Labels are allocated in MEM::FUNC arena.
        // This arena is freed when we finish a method.

        size_t len = strlen(_lbl);
        // Allocate space that will surely be enough.
        size_t alloc_size = len + 20;
        char *p = (char *) allocate(alloc_size, MEM::FUNC);
        // sprintf might be slow.
        sprintf(p, "%s%ld", _lbl, num);
        lbl = (const char *) p;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0xf17b
movq %rdi, %rbx
cmpq $0x0, (%rdi)
jne 0xf19a
movq %rdx, %r15
movq %rsi, %r14
cmpq $-0x1, %rdx
jne 0xf13c
callq 0x4762
movq %rax, %r15
movq %r14, %rdi
callq 0x2090
leaq 0x14(%rax), %rdi
movl $0x4, %esi
callq 0x22dc
movq %rax, %r12
leaq 0x4a6e(%rip), %rsi      # 0x13bca
movq %rax, %rdi
movq %r14, %rdx
movq %r15, %rcx
xorl %eax, %eax
callq 0x2040
movq %r12, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x49fd(%rip), %rdi      # 0x13b7f
leaq 0x49fb(%rip), %rsi      # 0x13b84
leaq 0x49fd(%rip), %rcx      # 0x13b8d
movl $0x11, %edx
callq 0x20b0
leaq 0x4a1d(%rip), %rdi      # 0x13bbe
leaq 0x49dc(%rip), %rsi      # 0x13b84
leaq 0x49de(%rip), %rcx      # 0x13b8d
movl $0x12, %edx
callq 0x20b0
nop
// File: /workspace/github_cpp_makefile_star2_O1/baziotis[P]minijava-cpp/./array.h
// Function: Array<llvalue_t, (MEM)4>::reserve(unsigned long)
void reserve(size_t n) {
        assert(len == 0 && cap == 0);
        if (!n) return;
        data = (T *) allocate(n * sizeof(T), mem);
        assert(data);
        len = 0;
        cap = n;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq (%rdi), %rax
orq 0x8(%rdi), %rax
jne 0xf2ab
movq %rsi, %rbx
testq %rsi, %rsi
je 0xf2a3
movq %rdi, %r14
movq %rbx, %rdi
shlq $0x5, %rdi
movl $0x4, %esi
callq 0x22dc
movq %rax, 0x10(%r14)
testq %rax, %rax
je 0xf2ca
movq $0x0, 0x8(%r14)
movq %rbx, (%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x451c(%rip), %rdi      # 0x137ce
leaq 0x24e5(%rip), %rsi      # 0x1179e
leaq 0x4ecd(%rip), %rcx      # 0x1418d
movl $0x2a, %edx
callq 0x20b0
leaq 0x2964(%rip), %rdi      # 0x11c35
leaq 0x24c6(%rip), %rsi      # 0x1179e
leaq 0x4eae(%rip), %rcx      # 0x1418d
movl $0x2d, %edx
callq 0x20b0
nop
// File: /workspace/github_cpp_makefile_star2_O1/baziotis[P]minijava-cpp/typecheck.cpp
// Function: FirstBucket::find(char const*) const
ssize_t find(const char *id) const {
        const Bucket *runner = &b;
        ssize_t lim = bucket_cap;
        ssize_t i = nelems;
        while (i > 0) {
            assert(runner);
            ssize_t lim = bucket_cap - 1;
            if (i < bucket_cap) {
                lim = i - 1;
            }
            ssize_t ndx = runner->find(id, lim);
            if (ndx >= 0) {
              return ndx;
            }
            runner = runner->next;
            i -= bucket_cap;
        }
        return -1;
    }

// Assembly:
pushq %rax
movq 0x88(%rdi), %rcx
movl $0x7, %edx
testq %rcx, %rcx
jle 0xf4a0
testq %rdi, %rdi
je 0xf4a9
leaq -0x1(%rcx), %r9
cmpq $0x8, %rcx
cmovgeq %rdx, %r9
movq $-0x1, %r8
testq %r9, %r9
js 0xf484
incq %r9
xorl %r10d, %r10d
cmpq %rsi, (%rdi,%r10,8)
je 0xf47f
incq %r10
cmpq %r10, %r9
jne 0xf46f
jmp 0xf484
movq 0x40(%rdi,%r10,8), %r8
testq %r8, %r8
js 0xf48e
movq %r8, %rax
jmp 0xf499
movq 0x80(%rdi), %rdi
addq $-0x8, %rcx
testq %r8, %r8
js 0xf447
jmp 0xf4a7
movq $-0x1, %rax
popq %rcx
retq
leaq 0x421f(%rip), %rdi      # 0x136cf
leaq 0x2fd7(%rip), %rsi      # 0x1248e
leaq 0x4218(%rip), %rcx      # 0x136d6
movl $0xa4, %edx
callq 0x20b0
// File: /workspace/github_cpp_makefile_star2_O1/baziotis[P]minijava-cpp/./buf.h
// Function: Buf<VMethod>::push(VMethod)
void push(T v) {
        size_t new_len = len + 1;
        if(new_len > cap) _grow(new_len);
        data[len] = v;
        len = new_len;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r12
movq %rdi, %r14
movq 0x8(%rdi), %r15
incq %r15
cmpq (%rdi), %r15
jbe 0xf4f0
movq %r14, %rdi
movq %r15, %rsi
callq 0xf5d6
movq 0x8(%r14), %rax
movq 0x10(%r14), %rcx
shlq $0x4, %rax
movq %r12, (%rcx,%rax)
movq %rbx, 0x8(%rcx,%rax)
movq %r15, 0x8(%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/baziotis[P]minijava-cpp/typecheck.cpp
// Function: FirstBucket::insert(char const*, long)
void insert(const char *method_id, ssize_t index_in_serial_buf) {
        ssize_t index_in_bucket = nelems % bucket_cap;
        if (nelems != 0 && index_in_bucket == 0) {
            // It may have been allocated from a previous downward
            // tree traversal.
            Bucket *b;
            if (last_bucket->next == NULL) {
                b = new Bucket;
                last_bucket->next = b;
            } else {
                b = last_bucket->next;
            }
            last_bucket = b;
        }
        last_bucket->insert(method_id, index_in_serial_buf, index_in_bucket);
        nelems++;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq 0x88(%rdi), %r12
leaq 0x7(%r12), %rax
testq %r12, %r12
cmovnsq %r12, %rax
sete %cl
andq $-0x8, %rax
subq %rax, %r12
setne %al
orb %cl, %al
jne 0xf58d
movq 0x90(%r14), %rax
movq 0x80(%rax), %rax
testq %rax, %rax
jne 0xf586
movl $0x88, %edi
movl $0x5, %esi
callq 0x22dc
movq $0x0, 0x80(%rax)
movq 0x90(%r14), %rcx
movq %rax, 0x80(%rcx)
movq %rax, 0x90(%r14)
cmpq $0x8, %r12
jae 0xf5b6
movq 0x90(%r14), %rax
movq %r15, (%rax,%r12,8)
movq %rbx, 0x40(%rax,%r12,8)
incq 0x88(%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x41a8(%rip), %rdi      # 0x13765
leaq 0x2eca(%rip), %rsi      # 0x1248e
leaq 0x41cf(%rip), %rcx      # 0x1379a
movl $0x75, %edx
callq 0x20b0
nop
// File: /workspace/github_cpp_makefile_star2_O1/DanielWochnik[P]CombOptWS2018/graph.cpp
// Function: DHBW::Graph::add_edge(unsigned long, unsigned long)
EdgeId Graph::add_edge(VertexId ep1, VertexId ep2)
{
	_edges.emplace_back(num_edges(),ep1,ep2,*this);
	vertex(ep1).add_edge(num_edges()-1);
	vertex(ep2).add_edge(num_edges()-1);

	return num_edges()-1;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x10(%rsp), %r14
movq %rsi, (%r14)
movq %rsp, %rcx
movq %rdx, (%rcx)
movq 0x20(%rdi), %rax
subq 0x18(%rdi), %rax
addq $0x18, %rdi
sarq $0x5, %rax
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
movq %r14, %rdx
movq %rbx, %r8
callq 0x2cba
movq (%r14), %rax
movq (%rbx), %rcx
movq 0x8(%rbx), %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
movabsq $-0x3333333333333333, %r14 # imm = 0xCCCCCCCCCCCCCCCD
imulq %r14, %rdx
cmpq %rax, %rdx
jbe 0x27d7
leaq (%rax,%rax,4), %rax
leaq (%rcx,%rax,8), %rdi
movq 0x20(%rbx), %rsi
subq 0x18(%rbx), %rsi
sarq $0x5, %rsi
decq %rsi
callq 0x2440
movq (%rsp), %rax
movq (%rbx), %rcx
movq 0x8(%rbx), %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
imulq %r14, %rdx
cmpq %rax, %rdx
jbe 0x27d7
leaq (%rax,%rax,4), %rax
leaq (%rcx,%rax,8), %rdi
movq 0x20(%rbx), %rsi
subq 0x18(%rbx), %rsi
sarq $0x5, %rsi
decq %rsi
callq 0x2440
movq 0x20(%rbx), %rax
subq 0x18(%rbx), %rax
sarq $0x5, %rax
decq %rax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
leaq 0x19a0(%rip), %rdi      # 0x417e
leaq 0x1b47(%rip), %rsi      # 0x432c
leaq 0x19a6(%rip), %rcx      # 0x4192
movl $0x58, %edx
callq 0x20a0
// File: /workspace/github_cpp_makefile_star2_O1/DanielWochnik[P]CombOptWS2018/graph.cpp
// Function: DHBW::Graph::write_to_file_plain(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void Graph::write_to_file_plain(std::string const & filename)
{
	std::ofstream outfile(filename.c_str());
	
	// Write cities
	outfile << num_vertices();
	
	// Write edges
	for (Edge const & edge : _edges)
	{
		outfile << "\n" << edge.vertex1() << " " << edge.vertex2();
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movq %rdi, %rbx
movq (%rsi), %rsi
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movl $0x10, %edx
callq 0x2160
movq 0x8(%rbx), %rax
subq (%rbx), %rax
sarq $0x3, %rax
movabsq $-0x3333333333333333, %rsi # imm = 0xCCCCCCCCCCCCCCCD
imulq %rax, %rsi
movq %r14, %rdi
callq 0x20b0
movq 0x18(%rbx), %r13
movq 0x20(%rbx), %rbp
cmpq %rbp, %r13
je 0x2c18
leaq 0x16a6(%rip), %rbx      # 0x426e
leaq 0x8(%rsp), %r14
leaq 0x169c(%rip), %r15      # 0x4270
movl $0x1, %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2170
movq 0x8(%r13), %rsi
movq %r14, %rdi
callq 0x20b0
movq %rax, %r12
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x2170
movq 0x10(%r13), %rsi
movq %r12, %rdi
callq 0x20b0
addq $0x20, %r13
cmpq %rbp, %r13
jne 0x2bd4
movq 0x33a9(%rip), %rax      # 0x5fc8
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq 0x10(%rsp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, 0x8(%rsp,%rcx)
callq 0x2110
leaq 0x100(%rsp), %rdi
callq 0x2060
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2c5e
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x2190
movq %rbx, %rdi
callq 0x21d0
nop
// File: /workspace/github_cpp_makefile_star2_O1/DanielWochnik[P]CombOptWS2018/main.cpp
// Function: example_function1(DHBW::Graph&)
VertexId example_function1(Graph & g)
{
	// This method is written unneccessary compliceted to give a better feeling of the use of this class
	// EdgeId and GraphId are internally just the same as unsigned int's. I prefer using the aliases for 
	// better readability.
	EdgeId a;
	for (VertexId i = 0; i < g.num_vertices(); ++i)
	{
		// Get the i-th vertex
		Vertex & v = g.vertex(i);
		EdgeId b = 0;
		for (EdgeId e = 0;  e < v.num_edges(); ++ e)
		{
			++b;
		}
		if ( b > a)
		{
			a = b;
		}
	}
	return a;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
callq 0x25ce
xorl %r14d, %r14d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2632
movq %rax, %r12
movq %rax, %rdi
callq 0x23dc
xorl %r13d, %r13d
testq %rax, %rax
je 0x3326
incq %r13
movq %r12, %rdi
callq 0x23dc
cmpq %rax, %r13
jb 0x3316
cmpq %r15, %r13
cmovaq %r13, %r15
incq %r14
movq %rbx, %rdi
callq 0x25ce
cmpq %rax, %r14
jb 0x32f8
movq %r15, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/DanielWochnik[P]CombOptWS2018/main.cpp
// Function: random_path(DHBW::Graph&, unsigned long, unsigned long)
std::vector<VertexId> random_path(Graph & g, VertexId s, VertexId t)
{
	// Create empty vector
	std::vector<VertexId> path;
	// add first vertex, i.e. s, (represented by its id)
	path.push_back(s);
	
	// random walk :D
	VertexId current = s;
	while (current != t)
	{
		// Get vertex from VertexId
		Vertex & v = g.vertex(current);
		// Ask for number of edges
		EdgeId num_edges = v.num_edges();
		// compute random integer in [0,num_edges-1]
		EdgeId rand_id = rand()%num_edges;
		// Take edge (first take id from v, than get edge from g)
		Edge next_edge = g.edge(v.edge(rand_id));
		// Compute next vertex
		current = next_edge.other_vertex(v.id());
		path.push_back(current);
	}
	return path;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq %rdx, 0x8(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq 0x8(%rdi), %rsi
testq %rsi, %rsi
je 0x338a
movq %rdx, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x3397
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x2e42
movq 0x8(%rsp), %rsi
movq %rsi, (%rsp)
cmpq %r14, %rsi
je 0x3440
leaq 0x10(%rsp), %r12
movq %r15, %rdi
callq 0x2632
movq %rax, %rbp
movq %rax, %rdi
callq 0x23dc
movq %rax, %r13
callq 0x2050
cltq
xorl %edx, %edx
divq %r13
movq %rbp, %rdi
movq %rdx, %rsi
callq 0x23ea
movq (%rax), %rsi
movq %r15, %rdi
callq 0x268a
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movaps %xmm1, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
movq %rbp, %rdi
callq 0x2424
movq %r12, %rdi
movq %rax, %rsi
callq 0x2526
movq (%rax), %rax
movq %rax, (%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x3428
movq %rax, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x3433
movq %rbx, %rdi
movq %rsp, %rdx
callq 0x2e42
movq (%rsp), %rsi
cmpq %r14, %rsi
jne 0x33ae
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3458
jmp 0x3458
jmp 0x3458
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x346f
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x2150
movq %r14, %rdi
callq 0x21d0
// File: /workspace/github_cpp_makefile_star2_O1/DanielWochnik[P]CombOptWS2018/main.cpp
// Function: main
int main()
{	
	// Read graph from input file 
	Graph g("input/graph1.plain");
	// Print to console, std::endl is (almost) equivalent to "\n"
	std::cout << example_function1(g) << std::endl;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x58, %rsp
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0xe0e(%rip), %rsi       # 0x429c
leaq 0xe19(%rip), %rdx       # 0x42ae
leaq 0x8(%rsp), %rdi
callq 0x358e
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
xorl %edx, %edx
callq 0x2806
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x34c7
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2150
leaq 0x28(%rsp), %rdi
callq 0x32e4
movq 0x2b00(%rip), %rdi      # 0x5fd8
movq %rax, %rsi
callq 0x20b0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20c0
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x3521
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x2150
leaq 0x28(%rsp), %rdi
callq 0x2d04
xorl %eax, %eax
addq $0x58, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x3563
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2150
jmp 0x3563
movq %rax, %rbx
jmp 0x3563
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x356c
movq %rbx, %rdi
callq 0x21d0
nop