LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: baziotis[P]minijava-cpp/typecheck.cpp
// Function: print_param_types(Method*)
static void print_param_types(Method *method) {
    size_t param_len = method->param_len;
    for (size_t i = 0; i != param_len; ++i) {
        Local *param = method->locals[i];
        printf("%s", param->type->name());
        if (i + 1 != param_len) {
            printf(", ");
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x10(%rbp), %rax
je 0xc2ac
movq -0x8(%rbp), %rdi
addq $0x18, %rdi
movq -0x18(%rbp), %rsi
callq 0x7870
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0xc180
movq %rax, %rsi
leaq 0xd172(%rip), %rdi      # 0x193eb
movb $0x0, %al
callq 0x2030
movq -0x18(%rbp), %rax
addq $0x1, %rax
cmpq -0x10(%rbp), %rax
je 0xc29c
leaq 0xfe0d(%rip), %rdi      # 0x1c0a2
movb $0x0, %al
callq 0x2030
jmp 0xc29e
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0xc240
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: baziotis[P]minijava-cpp/typecheck.cpp
// Function: TypeTable::offset_computation()
void TypeTable::offset_computation() {
    VirtualTable vtable;
    for (IdType *type : inher_roots) {
        //printf("-- Inheritance root: %s -- \n\n", type->id);
        constexpr size_t start_fields = 0;
        constexpr size_t start_methods = 0;
        compute_and_print_offsets_for_type(type, start_fields, start_methods, &vtable);
        vtable.clear();
        //printf("\n");
    }
    deallocate(MEM::CHILDREN);
    emit("\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1360, %rsp           # imm = 0x1360
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x1360(%rbp)
leaq -0x1328(%rbp), %rdi
callq 0x15a70
leaq 0x1a093(%rip), %rax     # 0x26a80
movq %rax, -0x1330(%rbp)
leaq 0x1a085(%rip), %rdi     # 0x26a80
callq 0x15b00
movq %rax, -0x1338(%rbp)
leaq 0x1a072(%rip), %rdi     # 0x26a80
callq 0x15b20
movq %rax, -0x1340(%rbp)
movq -0x1338(%rbp), %rax
cmpq -0x1340(%rbp), %rax
je 0xca92
movq -0x1360(%rbp), %rdi
movq -0x1338(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x1348(%rbp)
movq $0x0, -0x1350(%rbp)
movq $0x0, -0x1358(%rbp)
movq -0x1348(%rbp), %rsi
xorl %eax, %eax
movl %eax, %ecx
leaq -0x1328(%rbp), %r8
movq %rcx, %rdx
callq 0xc2c0
leaq -0x1328(%rbp), %rdi
callq 0x15b40
movq -0x1338(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x1338(%rbp)
jmp 0xca1a
movl $0x6, %edi
callq 0x25d0
leaq 0xdca1(%rip), %rdi      # 0x1a744
movb $0x0, %al
callq 0x5b70
addq $0x1360, %rsp           # imm = 0x1360
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: baziotis[P]minijava-cpp/typecheck.cpp
// Function: void typecheck_error<char const*, char const*, char const*, char const*>(location_t, char const*, 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
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movl 0x19dd7(%rip), %eax     # 0x26a98
addl $0x1, %eax
movl %eax, 0x19dce(%rip)     # 0x26a98
movl -0x4(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %edi
callq 0x15020
callq 0x15050
callq 0x15080
leaq 0x1026a(%rip), %rdi     # 0x1cf53
callq 0x150b0
callq 0x150e0
callq 0x15110
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq 0x15140
leaq 0xda30(%rip), %rdi      # 0x1a744
movb $0x0, %al
callq 0x2030
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x50, %rsp
movl %edx, -0xc(%rbp)
movq %rdi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movq -0x18(%rbp), %rdi
movq %rdi, -0x40(%rbp)
movq -0x20(%rbp), %rsi
callq 0x15c30
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0xcd69
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xcdd4
movl $0x90, %edi
callq 0x15c60
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x48(%rbp)
movq -0x20(%rbp), %rsi
callq 0x15c80
jmp 0xcd88
movq -0x40(%rbp), %rdi
movq -0x48(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movl -0xc(%rbp), %ecx
movl %ecx, (%rax)
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x28(%rbp), %rdx
callq 0xcdf0
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xcdd4
movq -0x48(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
movl $0x90, %esi
callq 0x2120
jmp 0xcdde
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
movq -0x30(%rbp), %rdi
callq 0x21c0
nopw (%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x40(%rbp)
addq $0x30, %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x15d90
testb $0x1, %al
jne 0xce8d
movq -0x40(%rbp), %rax
addq $0x60, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x15b00
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
callq 0x15b20
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x30(%rbp), %rax
je 0xce7c
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
cmpq -0x10(%rbp), %rax
jne 0xce6c
jmp 0xce8d
jmp 0xce6e
movq -0x28(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x28(%rbp)
jmp 0xce47
movq -0x40(%rbp), %rdi
addq $0x60, %rdi
movq -0x18(%rbp), %rsi
callq 0x15e10
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl %esi, -0x18(%rbp)
movq %rdx, -0x10(%rbp)
movl %ecx, -0x1c(%rbp)
movq %rdi, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
movl -0x18(%rbp), %eax
movq %rax, -0x38(%rbp)
subq $0x4, %rax
ja 0xcf44
movq -0x38(%rbp), %rax
leaq 0xe7a2(%rip), %rcx      # 0x1b678
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0xea9c(%rip), %rdi      # 0x1b982
leaq 0xe871(%rip), %rsi      # 0x1b75e
movl $0x1de, %edx            # imm = 0x1DE
leaq 0xea02(%rip), %rcx      # 0x1b8fb
callq 0x20d0
movq -0x40(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0xcf63
movq -0x40(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0xcf63
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0xcf63
movq -0x40(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x1c(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %edx
callq 0xcd30
movq %rax, -0x8(%rbp)
jmp 0xcf63
leaq 0xea37(%rip), %rdi      # 0x1b982
leaq 0xe80c(%rip), %rsi      # 0x1b75e
movl $0x1e3, %edx            # imm = 0x1E3
leaq 0xe99d(%rip), %rcx      # 0x1b8fb
callq 0x20d0
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x30(%rbp)
addq $0x30, %rdi
movq -0x10(%rbp), %rsi
callq 0x15ce0
movl $0x8, %edi
callq 0x15c60
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x28(%rbp)
xorl %esi, %esi
callq 0x15d70
jmp 0xcfb2
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rcx
movq %rcx, (%rax)
movl $0x8, %edi
callq 0x15c60
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x38(%rbp)
movl $0x3, %esi
callq 0x15d70
jmp 0xcfdd
movq -0x30(%rbp), %rax
movq -0x38(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x8, %edi
callq 0x15c60
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x40(%rbp)
movl $0x1, %esi
callq 0x15d70
jmp 0xd009
movq -0x30(%rbp), %rax
movq -0x40(%rbp), %rcx
movq %rcx, 0x10(%rax)
movl $0x8, %edi
callq 0x15c60
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x48(%rbp)
movl $0x2, %esi
callq 0x15d70
jmp 0xd035
movq -0x30(%rbp), %rax
movq -0x48(%rbp), %rcx
movq %rcx, 0x18(%rax)
addq $0x50, %rsp
popq %rbp
retq
movq -0x28(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
movl $0x8, %esi
callq 0x2120
jmp 0xd0b5
movq -0x38(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
movl $0x8, %esi
callq 0x2120
jmp 0xd0b5
movq -0x40(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
movl $0x8, %esi
callq 0x2120
jmp 0xd0b5
movq -0x48(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
movl $0x8, %esi
callq 0x2120
movq -0x18(%rbp), %rdi
callq 0x21c0
nop
// File: 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 %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x50(%rbp)
leaq -0x11(%rbp), %rdi
callq 0x3da0
leaq 0xe814(%rip), %rdi      # 0x1b93c
xorl %eax, %eax
callq 0x3e60
jmp 0xd131
movq -0x50(%rbp), %rsi
movq -0x10(%rbp), %rdi
addq $0x8, %rdi
callq 0x15ea0
jmp 0xd144
movq -0x10(%rbp), %rax
addq $0x48, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
callq 0x15ed0
movq %rax, -0x58(%rbp)
jmp 0xd15f
movq -0x58(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rdi
callq 0x15ef0
movq %rax, -0x60(%rbp)
jmp 0xd176
movq -0x60(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x40(%rbp), %rax
je 0xd1c9
movq -0x50(%rbp), %rsi
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rdi
callq 0x15f10
jmp 0xd1a2
jmp 0xd1a4
movq -0x38(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x38(%rbp)
jmp 0xd17e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x11(%rbp), %rdi
callq 0x3dd0
jmp 0xd1d8
leaq -0x11(%rbp), %rdi
callq 0x3dd0
addq $0x60, %rsp
popq %rbp
retq
movq -0x20(%rbp), %rdi
callq 0x21c0
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
leaq -0x11(%rbp), %rdi
callq 0x3da0
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
leaq 0xe729(%rip), %rdi      # 0x1b949
xorl %eax, %eax
callq 0x3e60
jmp 0xd229
movq -0x40(%rbp), %rdi
callq 0x15f40
movq %rax, -0x48(%rbp)
jmp 0xd238
movq -0x48(%rbp), %rax
cmpq $0x0, %rax
jne 0xd244
jmp 0xd274
leaq 0xe714(%rip), %rdi      # 0x1b95f
leaq 0xe50c(%rip), %rsi      # 0x1b75e
movl $0x212, %edx            # imm = 0x212
leaq 0xe726(%rip), %rcx      # 0x1b984
callq 0x20d0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0xd333
movl $0x90, %edi
callq 0x15c60
movq %rax, -0x50(%rbp)
jmp 0xd284
movq -0x50(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
xorl %eax, %eax
movl %eax, %ecx
movq %rcx, %rdx
callq 0x15f60
jmp 0xd29e
movq -0x40(%rbp), %rdi
movq -0x50(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rcx
movq -0x30(%rbp), %rax
movl (%rcx), %ecx
movl %ecx, (%rax)
movq -0x30(%rbp), %rax
movq %rax, 0x20(%rdi)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x30(%rbp), %rdx
callq 0xcdf0
jmp 0xd2d1
movq -0x30(%rbp), %rsi
leaq 0x197a4(%rip), %rdi     # 0x26a80
callq 0x15e10
jmp 0xd2e3
movq -0x40(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xd350
movq %rax, -0x58(%rbp)
jmp 0xd2f6
movq -0x40(%rbp), %rax
movq -0x58(%rbp), %rcx
movq %rcx, -0x38(%rbp)
movq -0x38(%rbp), %rcx
movq %rcx, 0x28(%rax)
leaq -0x11(%rbp), %rdi
callq 0x3dd0
addq $0x60, %rsp
popq %rbp
retq
movq -0x50(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
movl $0x90, %esi
callq 0x2120
leaq -0x11(%rbp), %rdi
callq 0x3dd0
movq -0x20(%rbp), %rdi
callq 0x21c0
nopw %cs:(%rax,%rax)
// File: baziotis[P]minijava-cpp/typecheck.cpp
// Function: Method::construct_main_method(DeclarationVisitor*, MainClass*)
Method *Method::construct_main_method(DeclarationVisitor *visitor, MainClass *main_class) {
    Method *method = (Method *) allocate_zero(sizeof(Method), MEM::TYPECHECK);
    method->id = main_method_string;
    size_t locals_size = main_class->vars.len;
    method->locals.reserve(locals_size);

    for (LocalDeclaration *var : main_class->vars) {
        if (method->locals.find(var->id)) {
            typecheck_error(var->loc, "Variable `", var->id, "` is already defined",
                            " in method `", method->id, "`");
        } else {
            Var *v = var->accept(visitor);
            method->locals.insert(v->id, v);
        }
    }

    method->param_len = 0;
    method->stmts = main_class->stmts;
    method->ret_type = visitor->type_table.int_type;
    method->ret_expr = NULL;
    method->loc = main_class->loc;
    return method;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x78, %edi
movl $0x3, %esi
callq 0x2570
movq %rax, -0x18(%rbp)
leaq 0x176de(%rip), %rax     # 0x24a58
movq (%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
addq $0x18, %rdi
movq -0x20(%rbp), %rsi
callq 0x16c60
movq -0x10(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0x160d0
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
callq 0x160f0
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
je 0xd479
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rdi
addq $0x18, %rdi
movq -0x40(%rbp), %rax
movq 0x18(%rax), %rsi
callq 0x16110
cmpq $0x0, %rax
je 0xd43d
movq -0x40(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x44(%rbp)
movq -0x40(%rbp), %rax
movq 0x18(%rax), %rdx
movq -0x18(%rbp), %rax
movq (%rax), %r9
movl -0x44(%rbp), %edi
leaq 0xe7e9(%rip), %rsi      # 0x1bc06
leaq 0xe7c0(%rip), %rcx      # 0x1bbe4
leaq 0xe7ce(%rip), %r8       # 0x1bbf9
leaq 0xd8fb(%rip), %rax      # 0x1ad2d
movq %rax, (%rsp)
callq 0xdb90
jmp 0xd466
movq -0x40(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x16140
movq %rax, -0x50(%rbp)
movq -0x18(%rbp), %rdi
addq $0x18, %rdi
movq -0x50(%rbp), %rax
movq (%rax), %rsi
movq -0x50(%rbp), %rdx
callq 0x16170
jmp 0xd468
movq -0x30(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x30(%rbp)
jmp 0xd3c7
movq -0x18(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rax
movq 0x28(%rcx), %rdx
movq %rdx, 0x58(%rax)
movq 0x30(%rcx), %rdx
movq %rdx, 0x60(%rax)
movq 0x38(%rcx), %rcx
movq %rcx, 0x68(%rax)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x70(%rax)
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rax
movl (%rcx), %ecx
movl %ecx, 0x50(%rax)
movq -0x18(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x70(%rbp)
leaq -0x11(%rbp), %rdi
callq 0x3da0
movq -0x10(%rbp), %rdi
callq 0xab70
movb %al, -0x61(%rbp)
jmp 0xdc62
movb -0x61(%rbp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0xdc6d
jmp 0xdc6f
jmp 0xdc9f
leaq 0xde6d(%rip), %rdi      # 0x1bae3
leaq 0xdae1(%rip), %rsi      # 0x1b75e
movl $0x293, %edx            # imm = 0x293
leaq 0xde76(%rip), %rcx      # 0x1baff
callq 0x20d0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0xddb6
callq 0x3e00
jmp 0xdca6
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdx
movl -0x28(%rbp), %edi
leaq 0xde73(%rip), %rsi      # 0x1bb34
leaq 0xca7c(%rip), %rcx      # 0x1a744
callq 0xda30
jmp 0xdccf
movq -0x10(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0xdd13
movq -0x70(%rbp), %rcx
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x20(%rcx), %rcx
cmpq 0x8(%rcx), %rax
jne 0xdd13
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %edi
leaq 0xde44(%rip), %rsi      # 0x1bb47
leaq 0xe29b(%rip), %rdx      # 0x1bfa5
callq 0xddd0
jmp 0xdd11
jmp 0xdd13
movq -0x70(%rbp), %rdi
movq -0x10(%rbp), %rax
movups 0x8(%rax), %xmm0
movaps %xmm0, -0x50(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x54(%rbp)
movl -0x50(%rbp), %esi
movq -0x48(%rbp), %rdx
movl -0x54(%rbp), %ecx
callq 0xcea0
movq %rax, -0x78(%rbp)
jmp 0xdd41
movq -0x78(%rbp), %rax
movq %rax, -0x38(%rbp)
movl $0x40, %edi
callq 0x15c60
movq %rax, -0x80(%rbp)
jmp 0xdd59
movq -0x80(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rsi
movq -0x38(%rbp), %rdx
callq 0x16310
jmp 0xdd70
movq -0x80(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x88(%rbp)
leaq -0x11(%rbp), %rdi
callq 0x3dd0
movq -0x88(%rbp), %rax
addq $0x90, %rsp
popq %rbp
retq
movq -0x80(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
movl $0x40, %esi
callq 0x2120
leaq -0x11(%rbp), %rdi
callq 0x3dd0
movq -0x20(%rbp), %rdi
callq 0x21c0
nopl (%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
leaq -0x50(%rbp), %rdi
movl 0x18c36(%rip), %edx     # 0x26a9c
leaq 0xdcff(%rip), %rsi      # 0x1bb6c
movb $0x0, %al
callq 0x2040
movl 0x18c22(%rip), %eax     # 0x26a9c
addl $0x1, %eax
movl %eax, 0x18c19(%rip)     # 0x26a9c
leaq -0x50(%rbp), %rdi
callq 0xbae0
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x58(%rbp)
leaq -0x11(%rbp), %rdi
callq 0x3da0
leaq 0xd919(%rip), %rdi      # 0x1bc11
xorl %eax, %eax
callq 0x3e60
jmp 0xe301
movq -0x58(%rbp), %rsi
movq -0x10(%rbp), %rdi
addq $0x8, %rdi
callq 0x16340
jmp 0xe314
movq -0x58(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
callq 0x16370
movq %rax, -0x60(%rbp)
jmp 0xe32b
movq -0x60(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rdi
callq 0x16390
movq %rax, -0x68(%rbp)
jmp 0xe342
movq -0x68(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x40(%rbp), %rax
je 0xe3e7
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rdi
callq 0x15fe0
movb %al, -0x69(%rbp)
jmp 0xe371
movb -0x69(%rbp), %al
testb $0x1, %al
jne 0xe37a
jmp 0xe3a2
movq -0x58(%rbp), %rsi
movq -0x48(%rbp), %rdi
callq 0x163b0
jmp 0xe389
jmp 0xe3d4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x11(%rbp), %rdi
callq 0x3dd0
jmp 0xe3f6
movq -0x48(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x4c(%rbp)
movq -0x48(%rbp), %rax
movq 0x8(%rax), %rdx
movl -0x4c(%rbp), %edi
leaq 0xd527(%rip), %rsi      # 0x1b8e4
leaq 0xd527(%rip), %rcx      # 0x1b8eb
leaq 0xe1c9(%rip), %r8       # 0x1c594
callq 0xcca0
jmp 0xe3d2
jmp 0xe3d4
jmp 0xe3d6
movq -0x38(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x38(%rbp)
jmp 0xe34a
leaq -0x11(%rbp), %rdi
callq 0x3dd0
addq $0x70, %rsp
popq %rbp
retq
movq -0x20(%rbp), %rdi
callq 0x21c0
nop
// File: 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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
leaq -0x11(%rbp), %rdi
callq 0x3da0
leaq 0xd7fe(%rip), %rdi      # 0x1bc26
xorl %eax, %eax
callq 0x3e60
jmp 0xe431
movq -0x30(%rbp), %rsi
movq 0x20(%rsi), %rax
movq %rax, 0x80(%rsi)
movq 0x28(%rsi), %rdi
movq 0x80(%rsi), %rax
movq 0x8(%rax), %rdx
callq 0x163e0
jmp 0xe456
movq -0x30(%rbp), %rax
movq $0x0, 0x80(%rax)
leaq -0x11(%rbp), %rdi
callq 0x3dd0
addq $0x30, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x11(%rbp), %rdi
callq 0x3dd0
movq -0x20(%rbp), %rdi
callq 0x21c0
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x58(%rbp)
leaq -0x11(%rbp), %rdi
callq 0x3da0
movq -0x10(%rbp), %rdi
callq 0x7960
movq %rax, -0x50(%rbp)
jmp 0xe4d0
movq -0x50(%rbp), %rax
cmpq $0x0, %rax
je 0xe4dc
jmp 0xe515
leaq 0xc394(%rip), %rdi      # 0x1a877
leaq 0xd274(%rip), %rsi      # 0x1b75e
movl $0x2ea, %edx            # imm = 0x2EA
leaq 0xd74a(%rip), %rcx      # 0x1bc40
callq 0x20d0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x11(%rbp), %rdi
callq 0x3dd0
jmp 0xe608
movq -0x10(%rbp), %rdi
callq 0x15fe0
movb %al, -0x59(%rbp)
jmp 0xe523
movb -0x59(%rbp), %al
testb $0x1, %al
jne 0xe52c
jmp 0xe52e
jmp 0xe54d
leaq 0xd736(%rip), %rdi      # 0x1bc6b
leaq 0xd222(%rip), %rsi      # 0x1b75e
movl $0x2eb, %edx            # imm = 0x2EB
leaq 0xd6f8(%rip), %rcx      # 0x1bc40
callq 0x20d0
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
leaq 0xd722(%rip), %rdi      # 0x1bc7e
xorl %eax, %eax
callq 0x3e60
jmp 0xe565
movq -0x58(%rbp), %rax
movq -0x10(%rbp), %rcx
movq %rcx, 0x80(%rax)
movq -0x10(%rbp), %rax
addq $0x40, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
callq 0x15680
movq %rax, -0x68(%rbp)
jmp 0xe58f
movq -0x68(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rdi
callq 0x156a0
movq %rax, -0x70(%rbp)
jmp 0xe5a6
movq -0x70(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x40(%rbp), %rax
je 0xe5ea
movq -0x58(%rbp), %rsi
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdx
callq 0x163e0
jmp 0xe5da
jmp 0xe5dc
movq -0x38(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x38(%rbp)
jmp 0xe5ae
movq -0x58(%rbp), %rax
movq $0x0, 0x80(%rax)
leaq -0x11(%rbp), %rdi
callq 0x3dd0
addq $0x70, %rsp
popq %rbp
retq
movq -0x20(%rbp), %rdi
callq 0x21c0
nopw %cs:(%rax,%rax)
// File: baziotis[P]minijava-cpp/typecheck.cpp
// Function: type_transitively_extends_Main(MainTypeCheckVisitor*, char const*)
static bool type_transitively_extends_Main(MainTypeCheckVisitor *visitor,
                                           const char *class_name) {
  IdType *type = visitor->type_table.find(class_name);
  const char *main_cls_id = visitor->type_table.main_cls_type->id;
  assert(type);
  IdType *parent = type->parent;
  while (parent != NULL) {
    if (parent->id == main_cls_id) {
      return true;
    }
    parent = parent->parent;
  }
  return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x15c30
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0xeb7a
jmp 0xeb99
leaq 0xd402(%rip), %rdi      # 0x1bf83
leaq 0xcbd6(%rip), %rsi      # 0x1b75e
movl $0x30f, %edx            # imm = 0x30F
leaq 0xe1df(%rip), %rcx      # 0x1cd73
callq 0x20d0
movq -0x20(%rbp), %rax
movq 0x78(%rax), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0xebce
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
cmpq -0x28(%rbp), %rax
jne 0xebc0
movb $0x1, -0x1(%rbp)
jmp 0xebd2
movq -0x30(%rbp), %rax
movq 0x78(%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0xeba5
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x18(%rbp), %rax
jne 0xec00
movb $0x1, -0x1(%rbp)
jmp 0xec6f
movq -0x10(%rbp), %rdi
callq 0x7960
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x7960
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0xec6b
cmpq $0x0, -0x28(%rbp)
je 0xec6b
movq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq $0x0, 0x78(%rax)
je 0xec65
movq -0x30(%rbp), %rax
movq 0x78(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x20(%rbp), %rax
jne 0xec57
movb $0x1, -0x1(%rbp)
jmp 0xec6f
movq -0x30(%rbp), %rax
cmpq -0x28(%rbp), %rax
jne 0xec63
jmp 0xec65
jmp 0xec30
movb $0x0, -0x1(%rbp)
jmp 0xec6f
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: baziotis[P]minijava-cpp/typecheck.cpp
// Function: lookup_local(char const*, Method*, IdType*)
static Local *lookup_local(const char *id, Method *method, IdType *cls) {
    // Check current method's locals (vars and params).
    Local *local = method->locals.find(id);
    if (local) {
        return local;
    }
    // Check current class's fields.
    local = cls->fields.find(id);
    if (local) {
        return local;
    }
    // Check parent's fields (account for cyclic inheritance).
    IdType *runner = cls;
    while (runner->parent) {
        runner = runner->parent;
        local = runner->fields.find(id);
        if (local) {
            return local;
        }
        // Cyclic inheritance, we issue error elsewhere.
        if (runner == cls) break;
    }
    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rdi
addq $0x18, %rdi
movq -0x10(%rbp), %rsi
callq 0x16110
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x114cd
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x1154e
movq -0x20(%rbp), %rdi
addq $0x10, %rdi
movq -0x10(%rbp), %rsi
callq 0x16110
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x114f3
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x1154e
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq $0x0, 0x78(%rax)
je 0x11546
movq -0x30(%rbp), %rax
movq 0x78(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
addq $0x10, %rdi
movq -0x10(%rbp), %rsi
callq 0x16110
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x11538
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x1154e
movq -0x30(%rbp), %rax
cmpq -0x20(%rbp), %rax
jne 0x11544
jmp 0x11546
jmp 0x114fb
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x40, %rsp
movb %dil, %al
andb $0x1, %al
movb %al, -0x9(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x16490
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpl $0x0, 0x4(%rax)
jne 0x11695
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x116ed
movq -0x38(%rbp), %rax
cmpq -0x28(%rbp), %rax
je 0x116d5
movq -0x18(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x3c(%rbp)
movq -0x38(%rbp), %rdi
callq 0xc180
movq %rax, %rcx
movl -0x3c(%rbp), %edi
leaq 0xb6ff(%rip), %rsi      # 0x1cdbd
leaq 0xaa5e(%rip), %rdx      # 0x1c123
leaq 0x9661(%rip), %r8       # 0x1ad2d
callq 0xcca0
movb $0x0, -0x9(%rbp)
testb $0x1, -0x9(%rbp)
je 0x116e5
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x116ed
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: baziotis[P]minijava-cpp/typecheck.cpp
// Function: deduce_method(Array<Type*, (MEM)4>, char const*, IdType*)
static Method *deduce_method(FuncArr<Type*> expr_list, const char *method_id, IdType *cls) {
    IdType *runner = cls;
    do {
        Method *method = lookup_method(method_id, runner);
        if (method) {
            if (check_expr_list_against_method(expr_list, method)) {
                return method;
            }
        }
        runner = runner->parent;
        // Cyclic inheritance, we issue error elsewhere.
        if (runner == cls) break;
    } while (runner);
    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
leaq 0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x14e30
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x1189b
movq -0x48(%rbp), %rax
movq (%rax), %rcx
movq %rcx, -0x40(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0x38(%rbp)
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
leaq -0x40(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x14e90
testb $0x1, %al
jne 0x1188f
jmp 0x11899
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x118c8
jmp 0x1189b
movq -0x20(%rbp), %rax
movq 0x78(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x18(%rbp), %rax
jne 0x118b3
jmp 0x118c0
jmp 0x118b5
cmpq $0x0, -0x20(%rbp)
jne 0x11830
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x50(%rbp)
leaq -0x11(%rbp), %rdi
callq 0x3da0
leaq 0xabe3(%rip), %rdi      # 0x1c4eb
xorl %eax, %eax
callq 0x3e60
jmp 0x11911
movq -0x10(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
callq 0x16450
movq %rax, -0x58(%rbp)
jmp 0x1192c
movq -0x58(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rdi
callq 0x16470
movq %rax, -0x60(%rbp)
jmp 0x11943
movq -0x60(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x40(%rbp), %rax
je 0x1199a
movq -0x50(%rbp), %rsi
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rdi
movq (%rdi), %rax
movq 0x18(%rax), %rax
callq *%rax
jmp 0x11973
jmp 0x11975
movq -0x38(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x38(%rbp)
jmp 0x1194b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x11(%rbp), %rdi
callq 0x3dd0
jmp 0x119a9
leaq -0x11(%rbp), %rdi
callq 0x3dd0
addq $0x60, %rsp
popq %rbp
retq
movq -0x20(%rbp), %rdi
callq 0x21c0
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x50(%rbp)
movq %rdi, %rax
movq %rax, -0x48(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
movq 0x20(%rax), %rsi
callq 0x16a20
movq -0x40(%rbp), %rax
movq $0x0, -0x8(%rbp)
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x15780
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x157a0
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
je 0x13d7a
movq -0x50(%rbp), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x38(%rbp)
movb -0x30(%rbp), %al
andb $-0x4, %al
orb $0x0, %al
movb %al, -0x30(%rbp)
movb -0x30(%rbp), %al
andb $-0xd, %al
orb $0x0, %al
movb %al, -0x30(%rbp)
movq -0x38(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x16a50
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
movq -0x18(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x18(%rbp)
jmp 0x13d1e
movq -0x48(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x88(%rbp)
leaq -0x11(%rbp), %rdi
callq 0x3da0
leaq 0x7cad(%rip), %rdi      # 0x1c92b
xorl %eax, %eax
callq 0x3e60
jmp 0x14c87
movq -0x88(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x16490
movq %rax, -0x90(%rbp)
jmp 0x14ca4
movq -0x90(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpl $0x0, 0x4(%rax)
jne 0x14cdf
movl $0x1, -0x34(%rbp)
jmp 0x14d57
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x11(%rbp), %rdi
callq 0x3dd0
jmp 0x14d69
movq -0x88(%rbp), %rcx
movq -0x30(%rbp), %rax
cmpq 0x10(%rcx), %rax
je 0x14d10
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl (%rax), %eax
movl %eax, -0x38(%rbp)
movl -0x38(%rbp), %edi
leaq 0x7c43(%rip), %rsi      # 0x1c94a
callq 0x11560
jmp 0x14d0e
jmp 0x14d10
leaq 0xfcb1(%rip), %rax      # 0x249c8
movups 0x8(%rax), %xmm0
movups 0x18(%rax), %xmm1
movaps %xmm1, -0x50(%rbp)
movaps %xmm0, -0x60(%rbp)
movaps -0x60(%rbp), %xmm0
movaps -0x50(%rbp), %xmm1
movaps %xmm1, -0x70(%rbp)
movaps %xmm0, -0x80(%rbp)
movaps -0x80(%rbp), %xmm0
movaps -0x70(%rbp), %xmm1
movq %rsp, %rax
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x5ea0
jmp 0x14d50
movl $0x0, -0x34(%rbp)
leaq -0x11(%rbp), %rdi
callq 0x3dd0
addq $0xb0, %rsp
popq %rbp
retq
movq -0x20(%rbp), %rdi
callq 0x21c0
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x20(%rbp)
addq $0x18, %rdi
callq 0x16c10
movq -0x20(%rbp), %rdi
addq $0x58, %rdi
callq 0xab20
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, (%rdi)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x10(%rbp), %rcx
addq 0x40(%rcx), %rax
movq %rax, -0x18(%rbp)
addq $0x18, %rdi
movq -0x18(%rbp), %rsi
callq 0x16c60
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x28(%rcx), %rcx
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rcx
movq 0x50(%rcx), %rdx
movq %rdx, 0x58(%rax)
movq 0x58(%rcx), %rdx
movq %rdx, 0x60(%rax)
movq 0x60(%rcx), %rcx
movq %rcx, 0x68(%rax)
movq -0x10(%rbp), %rcx
movq 0x68(%rcx), %rcx
movq %rcx, 0x70(%rax)
movq -0x10(%rbp), %rcx
movl (%rcx), %ecx
movl %ecx, 0x50(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: baziotis[P]minijava-cpp/typecheck.cpp
// Function: lookup_method(char const*, IdType*)
static Method *lookup_method(const char *id, IdType *cls) {
    // Check current class's methods
    Method *method = cls->methods.find(id);
    if (method) {
        return method;
    }
    // Check parent's methods (account for cyclic inheritance).
    return lookup_method_parent(id, cls);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rdi
addq $0x40, %rdi
movq -0x10(%rbp), %rsi
callq 0x16230
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x14e66
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x14e7b
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x14f90
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: baziotis[P]minijava-cpp/typecheck.cpp
// Function: check_expr_list_against_method(Array<Type*, (MEM)4>, Method*)
static bool check_expr_list_against_method(FuncArr<Type*> expr_list, Method *method) {
    if (expr_list.len != method->param_len) {
        return false;
    }

    size_t formal_param_counter = 0;
    for (Type *ety : expr_list) {
        Type *formal_type = method->locals[formal_param_counter]->type;
        if (!compatible_types(formal_type, ety)) {
            return false;
        }
        ++formal_param_counter;
    }
    assert(formal_param_counter == method->param_len);
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
leaq 0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
movq %rdi, -0x10(%rbp)
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x10(%rcx), %rax
je 0x14ebb
movb $0x0, -0x1(%rbp)
jmp 0x14f7a
movq -0x48(%rbp), %rax
movq $0x0, -0x18(%rbp)
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x17bc0
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
callq 0x17be0
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x30(%rbp), %rax
je 0x14f47
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
movq -0x18(%rbp), %rsi
callq 0x7870
movq (%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0xebe0
testb $0x1, %al
jne 0x14f2d
movb $0x0, -0x1(%rbp)
jmp 0x14f7a
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x28(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x28(%rbp)
jmp 0x14ee5
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jne 0x14f57
jmp 0x14f76
leaq 0x7e9b(%rip), %rdi      # 0x1cdf9
leaq 0x67f9(%rip), %rsi      # 0x1b75e
movl $0x37d, %edx            # imm = 0x37D
leaq 0x7eb2(%rip), %rcx      # 0x1ce23
callq 0x20d0
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: baziotis[P]minijava-cpp/typecheck.cpp
// Function: lookup_method_parent(char const*, IdType*, IdType**)
static Method *lookup_method_parent(const char *id, IdType *cls, IdType **ret_parent = NULL) {
    IdType *runner = cls;
    while (runner->parent) {
        runner = runner->parent;
        Method *method = runner->methods.find(id);
        if (method) {
            if (ret_parent) {
                *ret_parent = runner;
            }
            return method;
        }
        // Cyclic inheritance, we issue error elsewhere.
        if (runner == cls) break;
    }
    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq $0x0, 0x78(%rax)
je 0x15009
movq -0x28(%rbp), %rax
movq 0x78(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
addq $0x40, %rdi
movq -0x10(%rbp), %rsi
callq 0x16230
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x14ffb
cmpq $0x0, -0x20(%rbp)
je 0x14ff1
movq -0x28(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x15011
movq -0x28(%rbp), %rax
cmpq -0x18(%rbp), %rax
jne 0x15007
jmp 0x15009
jmp 0x14fac
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: baziotis[P]minijava-cpp/typecheck.cpp
// Function: VirtualTable::find(char const*)
VMethod *find(const char *id) {
        ssize_t val = this->hash(id);
        ssize_t index = buckets[val].find(id);
        if (index == -1) {
            return NULL;
        }
        return &vmethods[index];
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x30(%rbp)
movq -0x18(%rbp), %rsi
callq 0x16cf0
movq -0x30(%rbp), %rdi
movq %rax, -0x20(%rbp)
addq $0x8, %rdi
imulq $0x98, -0x20(%rbp), %rax
addq %rax, %rdi
movq -0x18(%rbp), %rsi
callq 0x16d30
movq %rax, -0x28(%rbp)
cmpq $-0x1, -0x28(%rbp)
jne 0x155d6
movq $0x0, -0x8(%rbp)
jmp 0x155ee
movq -0x30(%rbp), %rdi
addq $0x1308, %rdi           # imm = 0x1308
movq -0x28(%rbp), %rsi
callq 0x157c0
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movl 0x11477(%rip), %eax     # 0x26a98
addl $0x1, %eax
movl %eax, 0x1146e(%rip)     # 0x26a98
movl -0x4(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %edi
callq 0x15020
callq 0x15050
callq 0x15080
leaq 0x790a(%rip), %rdi      # 0x1cf53
callq 0x150b0
callq 0x150e0
callq 0x15110
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq 0x15140
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x156e5
jmp 0x15704
leaq 0x63e5(%rip), %rdi      # 0x1bad1
leaq 0x606b(%rip), %rsi      # 0x1b75e
movl $0xde, %edx
leaq 0x72e8(%rip), %rcx      # 0x1c9e7
callq 0x20d0
movq -0x48(%rbp), %rdi
movq 0x1310(%rdi), %rax
movq %rax, -0x20(%rbp)
addq $0x1308, %rdi           # imm = 0x1308
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x30(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x16e80
movq -0x48(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rsi
callq 0x16cf0
movq -0x48(%rbp), %rdi
movq %rax, -0x40(%rbp)
addq $0x8, %rdi
imulq $0x98, -0x40(%rbp), %rax
addq %rax, %rdi
movq -0x38(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x16ef0
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)