LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/johan-bjareholt[P]lua-compiler/src/ir.cc
// Function: If(Expression*, Statement*, Statement*)
Statement *If(Expression *condition, Statement *trueSt, Statement *falseSt)
{
    Statement *result = new Statement('I');
    result->expressions.push_back(condition);
    result->children.push_back(trueSt);
    result->children.push_back(falseSt);
    return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdx, %r14
movq %rsi, %r15
leaq -0x38(%rbp), %r12
movq %rdi, (%r12)
movq %rsi, -0x30(%rbp)
movq %rdx, -0x28(%rbp)
movl $0x38, %edi
callq 0x3260
movq %rax, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movups %xmm0, 0x10(%rax)
movups %xmm0, 0x20(%rax)
movb $0x49, 0x30(%rax)
movq %rax, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x851a
movq 0x20(%rbx), %rsi
leaq 0x18(%rbx), %r12
cmpq 0x28(%rbx), %rsi
je 0x5e01
movq %r15, (%rsi)
movq 0x20(%rbx), %rsi
addq $0x8, %rsi
movq %rsi, 0x20(%rbx)
jmp 0x5e11
leaq -0x30(%rbp), %rdx
movq %r12, %rdi
callq 0x85f0
movq 0x20(%rbx), %rsi
cmpq 0x28(%rbx), %rsi
je 0x5e21
movq %r14, (%rsi)
addq $0x8, 0x20(%rbx)
jmp 0x5e2d
leaq -0x28(%rbp), %rdx
movq %r12, %rdi
callq 0x85f0
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/johan-bjareholt[P]lua-compiler/src/ir.cc
// Function: Seq(std::initializer_list<Statement*>)
Statement *Seq(initializer_list<Statement*> ss)
{
    Statement *result = new Statement('S');
    for(auto s : ss)
        result->children.push_back(s);
    return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl $0x38, %edi
callq 0x3260
movq %rax, %r15
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movups %xmm0, 0x10(%rax)
movups %xmm0, 0x20(%rax)
movb $0x53, 0x30(%rax)
testq %rbx, %rbx
je 0x5eb4
movq %r15, %r12
addq $0x18, %r12
shlq $0x3, %rbx
xorl %r13d, %r13d
movq (%r14,%r13), %rax
movq %rax, -0x30(%rbp)
movq 0x20(%r15), %rsi
cmpq 0x28(%r15), %rsi
je 0x5e9f
movq %rax, (%rsi)
addq $0x8, 0x20(%r15)
jmp 0x5eab
movq %r12, %rdi
leaq -0x30(%rbp), %rdx
callq 0x85f0
addq $0x8, %r13
cmpq %r13, %rbx
jne 0x5e83
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/johan-bjareholt[P]lua-compiler/src/ir.cc
// Function: Loop(Statement*, Expression*, Statement*, Statement*)
Statement *Loop(Statement* pre, Expression* check, Statement* body, Statement* post){
    Statement *result = new Statement('L');
    result->children.push_back(pre);
    result->expressions.push_back(check);
    result->children.push_back(body);
    result->children.push_back(post);
    return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r12
movq %rsi, %r13
leaq -0x50(%rbp), %rbx
movq %rdi, (%rbx)
movq %rsi, -0x48(%rbp)
movq %rdx, -0x40(%rbp)
movq %rcx, -0x30(%rbp)
movq %rcx, -0x38(%rbp)
movl $0x38, %edi
callq 0x3260
movq %rax, %r14
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movups %xmm0, 0x10(%rax)
movups %xmm0, 0x20(%rax)
movb $0x4c, 0x30(%rax)
leaq 0x18(%rax), %r15
movq %r15, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x85f0
movq 0x8(%r14), %rsi
cmpq 0x10(%r14), %rsi
je 0x5f38
movq %r13, (%rsi)
addq $0x8, 0x8(%r14)
jmp 0x5f44
leaq -0x48(%rbp), %rdx
movq %r14, %rdi
callq 0x851a
movq 0x20(%r14), %rsi
cmpq 0x28(%r14), %rsi
je 0x5f5f
movq %r12, (%rsi)
movq 0x20(%r14), %rsi
addq $0x8, %rsi
movq %rsi, 0x20(%r14)
jmp 0x5f6f
leaq -0x40(%rbp), %rdx
movq %r15, %rdi
callq 0x85f0
movq 0x20(%r14), %rsi
cmpq 0x28(%r14), %rsi
je 0x5f83
movq -0x30(%rbp), %rax
movq %rax, (%rsi)
addq $0x8, 0x20(%r14)
jmp 0x5f8f
leaq -0x38(%rbp), %rdx
movq %r15, %rdi
callq 0x85f0
movq %r14, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/johan-bjareholt[P]lua-compiler/src/ir.cc
// Function: Repeat(Expression*, Statement*)
Statement *Repeat(Expression* expression, Statement* body){
    Statement* repeat = new Statement('R');
    repeat->children.push_back(repeat);
    repeat->expressions.push_back(expression);
	return repeat;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq %rdi, -0x20(%rbp)
movl $0x38, %edi
callq 0x3260
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movups %xmm0, 0x10(%rax)
movups %xmm0, 0x20(%rax)
movb $0x52, 0x30(%rax)
leaq -0x18(%rbp), %r14
movq %rax, (%r14)
leaq 0x18(%rax), %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x85f0
movq (%r14), %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x63e0
movq %rbx, (%rsi)
addq $0x8, 0x8(%rdi)
jmp 0x63e9
leaq -0x20(%rbp), %rdx
callq 0x851a
movq -0x18(%rbp), %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/johan-bjareholt[P]lua-compiler/src/ir.cc
// Function: FunctionDef(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::vector<Expression*, std::allocator<Expression*>>, Statement*)
Statement *FunctionDef(std::string& name, std::vector<Expression*> args, Statement* body){
	Statement* result = new Statement('F');
	Expression* nameExp = String(name);
	result->expressions.push_back(nameExp);
	// TODO: Add proper args support
    Statement* argscontainer = new Statement('E');
    argscontainer->expressions = args;
	result->children.push_back(argscontainer);
	result->children.push_back(body);
	return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r12
movq %rdi, %r15
movq %rdx, -0x30(%rbp)
movq %rdx, -0x40(%rbp)
movl $0x38, %edi
callq 0x3260
movq %rax, %r14
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movups %xmm0, 0x10(%rax)
movups %xmm0, 0x20(%rax)
movb $0x46, 0x30(%rax)
leaq -0x50(%rbp), %rbx
movq %rbx, -0x10(%rbx)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
leaq -0x60(%rbp), %r15
movq %r15, %rdi
callq 0x4baa
movq %r15, %rdi
callq 0x5a7c
movq %rax, %r13
movq %r14, %r15
movq -0x60(%rbp), %rdi
cmpq %rbx, %rdi
je 0x646e
callq 0x3230
leaq -0x68(%rbp), %rdx
movq %r13, (%rdx)
movq %r15, %rdi
xorl %esi, %esi
callq 0x851a
movl $0x38, %edi
callq 0x3260
movq %rax, %r13
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movups %xmm0, 0x10(%rax)
movups %xmm0, 0x20(%rax)
movb $0x45, 0x30(%rax)
movq %rax, -0x38(%rbp)
movq %rax, %rdi
movq %r12, %rsi
callq 0x7d78
addq $0x18, %r14
movq 0x20(%r15), %rsi
cmpq 0x28(%r15), %rsi
je 0x64cc
movq %r13, (%rsi)
movq 0x20(%r15), %rsi
addq $0x8, %rsi
movq %rsi, 0x20(%r15)
jmp 0x64dc
leaq -0x38(%rbp), %rdx
movq %r14, %rdi
callq 0x85f0
movq 0x20(%r15), %rsi
cmpq 0x28(%r15), %rsi
je 0x64f0
movq -0x30(%rbp), %rax
movq %rax, (%rsi)
addq $0x8, 0x20(%r15)
jmp 0x64fc
leaq -0x40(%rbp), %rdx
movq %r14, %rdi
callq 0x85f0
movq %r15, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq -0x60(%rbp), %rdi
cmpq %rbx, %rdi
je 0x651f
callq 0x3230
movq %r14, %rdi
callq 0x3470
// File: /workspace/github_cpp_makefile_star2_O3/johan-bjareholt[P]lua-compiler/src/ir.cc
// Function: Return(std::__cxx11::list<Expression*, std::allocator<Expression*>>)
Statement *Return(std::list<Expression*> retvals){
    Statement *result = new Statement('r');
    for (Expression* exp : retvals){
        result->expressions.push_back(exp);
    }
    return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl $0x38, %edi
callq 0x3260
movq %rax, %r14
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movups %xmm0, 0x10(%rax)
movups %xmm0, 0x20(%rax)
movb $0x72, 0x30(%rax)
movq (%rbx), %r12
cmpq %rbx, %r12
je 0x6595
leaq -0x28(%rbp), %r15
movq 0x10(%r12), %rax
movq %rax, -0x28(%rbp)
movq 0x8(%r14), %rsi
cmpq 0x10(%r14), %rsi
je 0x6581
movq %rax, (%rsi)
addq $0x8, 0x8(%r14)
jmp 0x658c
movq %r14, %rdi
movq %r15, %rdx
callq 0x851a
movq (%r12), %r12
cmpq %rbx, %r12
jne 0x6564
movq %r14, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/johan-bjareholt[P]lua-compiler/src/ir.cc
// Function: convert[abi:cxx11](Expression*, BBlock*)
string convert(Expression *in, BBlock *out)
{
    map<Expression*,string> naming;
    namePass(in, naming);
    emitPass(in, naming, out);
    return naming[in];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq %rsi, -0x20(%rbp)
leaq -0x48(%rbp), %rax
movl $0x0, (%rax)
xorl %ecx, %ecx
movq %rcx, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %rcx, 0x20(%rax)
leaq -0x50(%rbp), %rsi
movq %r15, %rdi
callq 0x6711
leaq -0x50(%rbp), %rsi
movq %r15, %rdi
movq %r14, %rdx
callq 0x6938
leaq -0x50(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x7e5e
leaq 0x10(%rbx), %rcx
movq %rcx, (%rbx)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x4baa
leaq -0x50(%rbp), %rdi
callq 0x806a
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x806a
movq %rbx, %rdi
callq 0x3470
// File: /workspace/github_cpp_makefile_star2_O3/johan-bjareholt[P]lua-compiler/src/ir.cc
// Function: convertAssign(Statement*, BBlock*)
void convertAssign(Statement *in, BBlock *out)
{
    std::string name = in->expressions.at(0)->name;
    std::string val = convert(in->expressions.at(1), out);
    ThreeAd ta = ThreeAd(name,'c',name,val);
    out->instructions.push_back(ta);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq (%rdi), %rax
cmpq %rax, 0x8(%rdi)
je 0x6e97
movq %rsi, %rbx
movq %rdi, %r14
movq (%rax), %rax
leaq -0x38(%rbp), %r15
movq %r15, -0x10(%r15)
movq 0x30(%rax), %rsi
movq 0x38(%rax), %rdx
addq %rsi, %rdx
leaq -0x48(%rbp), %rdi
callq 0x4baa
movq (%r14), %rax
movq 0x8(%r14), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq $0x1, %rdx
jbe 0x6ea9
movq 0x8(%rax), %rsi
leaq -0xc8(%rbp), %rdi
movq %rbx, %rdx
callq 0x6c3b
leaq -0x98(%rbp), %r14
movq %r14, -0x10(%r14)
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
addq %rsi, %rdx
leaq -0xa8(%rbp), %rdi
callq 0x4baa
leaq -0x78(%rbp), %r12
movq %r12, -0x10(%r12)
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
addq %rsi, %rdx
leaq -0x88(%rbp), %rdi
callq 0x4baa
leaq -0x58(%rbp), %r13
movq %r13, -0x10(%r13)
movq -0xc8(%rbp), %rsi
movq -0xc0(%rbp), %rdx
addq %rsi, %rdx
leaq -0x68(%rbp), %rdi
callq 0x4baa
leaq -0x130(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
leaq -0x88(%rbp), %rcx
leaq -0x68(%rbp), %r8
movl $0x63, %edx
callq 0x4c94
movq -0x68(%rbp), %rdi
cmpq %r13, %rdi
je 0x6de3
callq 0x3230
movq -0x88(%rbp), %rdi
cmpq %r12, %rdi
je 0x6df4
callq 0x3230
movq -0xa8(%rbp), %rdi
cmpq %r14, %rdi
je 0x6e05
callq 0x3230
leaq -0x130(%rbp), %rsi
movq %rbx, %rdi
callq 0x8b44
movq %rax, %rdi
movq %rbx, %rsi
callq 0x3060
incq 0x10(%rbx)
leaq -0xd8(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6e38
callq 0x3230
leaq -0xf8(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6e4d
callq 0x3230
leaq -0x118(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6e62
callq 0x3230
leaq -0xb8(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6e77
callq 0x3230
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
je 0x6e85
callq 0x3230
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xe30e(%rip), %rdi      # 0x151ac
xorl %esi, %esi
xorl %edx, %edx
xorl %eax, %eax
callq 0x33d0
leaq 0xe2fc(%rip), %rdi      # 0x151ac
movl $0x1, %esi
xorl %eax, %eax
callq 0x33d0
movq %rax, %rbx
leaq -0x130(%rbp), %rdi
callq 0x7d26
jmp 0x6f0f
movq %rax, %rbx
movq -0x68(%rbp), %rdi
cmpq %r13, %rdi
je 0x6ee3
callq 0x3230
jmp 0x6ee3
movq %rax, %rbx
movq -0x88(%rbp), %rdi
cmpq %r12, %rdi
je 0x6ef9
callq 0x3230
jmp 0x6ef9
movq %rax, %rbx
movq -0xa8(%rbp), %rdi
cmpq %r14, %rdi
je 0x6f0f
callq 0x3230
jmp 0x6f0f
movq %rax, %rbx
leaq -0xb8(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6f29
callq 0x3230
jmp 0x6f29
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
je 0x6f37
callq 0x3230
movq %rbx, %rdi
callq 0x3470
// File: /workspace/github_cpp_makefile_star2_O3/johan-bjareholt[P]lua-compiler/src/ir.cc
// Function: convertComparitor(Expression*, BBlock*)
void convertComparitor(Expression *in, BBlock *out)
{
    std::string l = convert(in->left, out);
    std::string r = convert(in->right, out);
    std::string name = newName();
    ThreeAd ta = ThreeAd(name,in->op,l,r);
    out->instructions.push_back(ta);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rsi
leaq -0xe8(%rbp), %rdi
movq %rbx, %rdx
callq 0x6c3b
movq 0x8(%r14), %rsi
leaq -0xc8(%rbp), %rdi
movq %rbx, %rdx
callq 0x6c3b
leaq -0xa8(%rbp), %rdi
callq 0x65a5
leaq -0x78(%rbp), %r15
movq %r15, -0x10(%r15)
movq -0xa8(%rbp), %rsi
movq -0xa0(%rbp), %rdx
addq %rsi, %rdx
leaq -0x88(%rbp), %rdi
callq 0x4baa
movb 0x29(%r14), %r13b
leaq -0x58(%rbp), %r14
movq %r14, -0x10(%r14)
movq -0xe8(%rbp), %rsi
movq -0xe0(%rbp), %rdx
addq %rsi, %rdx
leaq -0x68(%rbp), %rdi
callq 0x4baa
leaq -0x38(%rbp), %r12
movq %r12, -0x10(%r12)
movq -0xc8(%rbp), %rsi
movq -0xc0(%rbp), %rdx
addq %rsi, %rdx
leaq -0x48(%rbp), %rdi
callq 0x4baa
movsbl %r13b, %edx
leaq -0x150(%rbp), %rdi
leaq -0x88(%rbp), %rsi
leaq -0x68(%rbp), %rcx
leaq -0x48(%rbp), %r8
callq 0x4c94
movq -0x48(%rbp), %rdi
cmpq %r12, %rdi
je 0x7025
callq 0x3230
movq -0x68(%rbp), %rdi
cmpq %r14, %rdi
je 0x7033
callq 0x3230
movq -0x88(%rbp), %rdi
cmpq %r15, %rdi
je 0x7044
callq 0x3230
leaq -0x150(%rbp), %rsi
movq %rbx, %rdi
callq 0x8b44
movq %rax, %rdi
movq %rbx, %rsi
callq 0x3060
incq 0x10(%rbx)
leaq -0xf8(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7077
callq 0x3230
leaq -0x118(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x708c
callq 0x3230
leaq -0x138(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x70a1
callq 0x3230
leaq -0x98(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x70b6
callq 0x3230
leaq -0xb8(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x70cb
callq 0x3230
leaq -0xd8(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x70e0
callq 0x3230
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x150(%rbp), %rdi
callq 0x7d26
jmp 0x7142
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r12, %rdi
je 0x7119
callq 0x3230
jmp 0x7119
movq %rax, %rbx
movq -0x68(%rbp), %rdi
cmpq %r14, %rdi
je 0x712c
callq 0x3230
jmp 0x712c
movq %rax, %rbx
movq -0x88(%rbp), %rdi
cmpq %r15, %rdi
je 0x7142
callq 0x3230
jmp 0x7142
movq %rax, %rbx
leaq -0x98(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x715c
callq 0x3230
jmp 0x715c
movq %rax, %rbx
leaq -0xb8(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7176
callq 0x3230
jmp 0x7176
movq %rax, %rbx
leaq -0xd8(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x718b
callq 0x3230
movq %rbx, %rdi
callq 0x3470
// File: /workspace/github_cpp_makefile_star2_O3/johan-bjareholt[P]lua-compiler/src/ir.cc
// Function: convertIf(Statement*, BBlock**)
void convertIf(Statement *in, BBlock **current)
{
    // Translate comparitor
    Expression* comparitor = in->expressions.back();
    convertComparitor(comparitor, *current);

    // Create true and false block
    BBlock* trueBlock = new BBlock();
    BBlock* trueBlockPtr = trueBlock;
    convertStatement(in->children.at(0), &trueBlockPtr);
    (*current)->trueExit = trueBlock;

    BBlock* falseBlock = new BBlock();
    BBlock* falseBlockPtr = falseBlock;
    convertStatement(in->children.at(1), &falseBlockPtr);
    (*current)->falseExit = falseBlock;

    // Create next block
    BBlock* nextBlock = new BBlock();
    trueBlock->trueExit = nextBlock;
    falseBlock->trueExit = nextBlock;

    *current = nextBlock;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r15
movq 0x8(%rdi), %rax
movq -0x8(%rax), %rdi
movq (%rsi), %rsi
callq 0x6f3f
movl $0x48, %edi
callq 0x3260
movq %rax, %r14
movq %rax, 0x8(%rax)
movq %rax, (%rax)
addq $0x38, %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r14)
xorl %ecx, %ecx
movq %rcx, 0x20(%r14)
movq %rax, 0x28(%r14)
movq %rcx, 0x30(%r14)
movb $0x0, 0x38(%r14)
movq %r14, -0x30(%rbp)
movq 0x18(%r15), %rax
cmpq %rax, 0x20(%r15)
je 0x72bc
movq (%rax), %rdi
leaq -0x30(%rbp), %rsi
callq 0x72dc
movq (%rbx), %rax
movq %r14, 0x18(%rax)
movl $0x48, %edi
callq 0x3260
movq %rax, %r12
movq %rax, 0x8(%rax)
movq %rax, (%rax)
addq $0x38, %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r12)
xorl %ecx, %ecx
movq %rcx, 0x20(%r12)
movq %rax, 0x28(%r12)
movq %rcx, 0x30(%r12)
movb $0x0, 0x38(%r12)
movq %r12, -0x28(%rbp)
movq 0x18(%r15), %rax
movq 0x20(%r15), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq $0x1, %rdx
jbe 0x72c9
movq 0x8(%rax), %rdi
leaq -0x28(%rbp), %rsi
callq 0x72dc
movq (%rbx), %rax
movq %r12, 0x20(%rax)
movl $0x48, %edi
callq 0x3260
movq %rax, 0x8(%rax)
movq %rax, (%rax)
leaq 0x38(%rax), %rcx
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
xorl %edx, %edx
movq %rdx, 0x20(%rax)
movq %rcx, 0x28(%rax)
movq %rdx, 0x30(%rax)
movb $0x0, 0x38(%rax)
movq %rax, 0x18(%r14)
movq %rax, 0x18(%r12)
movq %rax, (%rbx)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0xdee9(%rip), %rdi      # 0x151ac
xorl %esi, %esi
xorl %edx, %edx
jmp 0x72d5
leaq 0xdedc(%rip), %rdi      # 0x151ac
movl $0x1, %esi
xorl %eax, %eax
callq 0x33d0
// File: /workspace/github_cpp_makefile_star2_O3/johan-bjareholt[P]lua-compiler/src/ir.cc
// Function: convertStatement(Statement*, BBlock**)
void convertStatement(Statement *in, BBlock **current)
{
    switch(in->kind)
    {
        case 'A':
            convertAssign(in,*current);   // Does not update current
            break;
        case 'F':
            convertFuncDef(in,*current);	// Does not update current
            break;
        case 'E':
            convertExpressions(in, *current); // Does not update current
            break;
        case 'r':
            convertReturn(in,*current); // Does not update current
            break;
        case 'L':
            convertLoop(in,current);
            break;
        case 'R':
            convertRepeat(in,current);
            break;
        case 'I':
            convertIf(in,current);
            break;
        case 'S':
            convertSeq(in,current);
            break;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movzbl 0x30(%rdi), %eax
leal -0x45(%rax), %ecx
cmpl $0xe, %ecx
ja 0x7305
leaq 0xdd8d(%rip), %rax      # 0x15080
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq (%rsi), %rsi
popq %rbp
jmp 0x793e
cmpl $0x72, %eax
je 0x7338
cmpl $0x41, %eax
jne 0x7318
movq (%rsi), %rsi
popq %rbp
jmp 0x6cdd
popq %rbp
retq
popq %rbp
jmp 0x77a4
popq %rbp
jmp 0x7341
popq %rbp
jmp 0x767f
popq %rbp
jmp 0x7193
popq %rbp
jmp 0x7646
movq (%rsi), %rsi
popq %rbp
jmp 0x799a
// File: /workspace/github_cpp_makefile_star2_O3/johan-bjareholt[P]lua-compiler/src/ir.cc
// Function: convertRepeat(Statement*, BBlock**)
void convertRepeat(Statement *in, BBlock **current){
    Statement*  body = in->children.at(0);
    Expression* check = in->expressions.at(0);

    BBlock* bodyBlock = new BBlock();
    BBlock* checkBlock = new BBlock();
    BBlock* nextBlock = new BBlock();

    (*current)->trueExit = bodyBlock;

    (*current) = bodyBlock;
    convertStatement(body, current);
    bodyBlock->trueExit = checkBlock;
    
    (*current) = checkBlock;
    convertComparitor(check, *current);
    checkBlock->trueExit = bodyBlock;
    checkBlock->falseExit = nextBlock;

    (*current) = nextBlock;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq 0x18(%rdi), %rax
cmpq %rax, 0x20(%rdi)
je 0x7792
movq (%rdi), %rcx
cmpq %rcx, 0x8(%rdi)
je 0x7792
movq %rsi, %rbx
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq (%rcx), %rax
movq %rax, -0x38(%rbp)
movl $0x48, %edi
callq 0x3260
movq %rax, %r15
movq %rax, 0x8(%rax)
movq %rax, (%rax)
addq $0x38, %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r15)
xorl %r12d, %r12d
movq %r12, 0x20(%r15)
movq %rax, 0x28(%r15)
movq %r12, 0x30(%r15)
movb %r12b, 0x38(%r15)
movl $0x48, %edi
callq 0x3260
movq %rax, %r13
movq %rax, 0x8(%rax)
movq %rax, (%rax)
addq $0x38, %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r13)
movq %r12, 0x20(%r13)
movq %rax, 0x28(%r13)
movq %r12, 0x30(%r13)
movb %r12b, 0x38(%r13)
movl $0x48, %edi
callq 0x3260
movq %rax, %r14
movq %rax, 0x8(%rax)
movq %rax, (%rax)
addq $0x38, %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r14)
movq %r12, 0x20(%r14)
movq %rax, 0x28(%r14)
movq %r12, 0x30(%r14)
movb %r12b, 0x38(%r14)
movq (%rbx), %rax
movq %r15, 0x18(%rax)
movq %r15, (%rbx)
movq -0x30(%rbp), %rdi
movq %rbx, %rsi
callq 0x72dc
movq %r13, 0x18(%r15)
movq %r13, (%rbx)
movq -0x38(%rbp), %rdi
movq %r13, %rsi
callq 0x6f3f
movq %r15, 0x18(%r13)
movq %r14, 0x20(%r13)
movq %r14, (%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xda13(%rip), %rdi      # 0x151ac
xorl %esi, %esi
xorl %edx, %edx
xorl %eax, %eax
callq 0x33d0
// File: /workspace/github_cpp_makefile_star2_O3/johan-bjareholt[P]lua-compiler/src/ir.cc
// Function: convertLoop(Statement*, BBlock**)
void convertLoop(Statement *in, BBlock **current){
    Statement* pre = in->children.at(0);
    convertStatement(pre, current);
    Expression* check = in->expressions.at(0);
    Statement* body = in->children.at(1);
    Statement* post = in->children.at(2);

    BBlock* loopBlock = new BBlock();
    BBlock* bodyBlock = new BBlock();
    BBlock* nextBlock = new BBlock();

    (*current)->trueExit = loopBlock;
    // Set loop block
    (*current) = loopBlock;
    Expression* comparitor = in->expressions.back();
    convertComparitor(comparitor, *current);
    (*current)->falseExit = bodyBlock;
    (*current)->trueExit = nextBlock;

    // Set body block
    (*current) = bodyBlock;
    convertStatement(body, current);
    convertStatement(post, current);
    (*current)->trueExit = loopBlock;

    // Set next block
    (*current) = nextBlock;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq 0x18(%rdi), %rax
cmpq %rax, 0x20(%rdi)
je 0x7910
movq %rsi, %rbx
movq %rdi, %r14
movq (%rax), %rdi
callq 0x72dc
movq 0x8(%r14), %rax
cmpq (%r14), %rax
je 0x7910
movq 0x18(%r14), %rax
movq 0x20(%r14), %rcx
subq %rax, %rcx
movq %rcx, %rdx
sarq $0x3, %rdx
cmpq $0x1, %rdx
jbe 0x791d
movq %r14, -0x40(%rbp)
cmpq $0x10, %rcx
je 0x792b
movq 0x8(%rax), %rcx
movq %rcx, -0x30(%rbp)
movq 0x10(%rax), %rax
movq %rax, -0x38(%rbp)
movl $0x48, %edi
callq 0x3260
movq %rax, %r12
movq %rax, 0x8(%rax)
movq %rax, (%rax)
addq $0x38, %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r12)
xorl %r14d, %r14d
movq %r14, 0x20(%r12)
movq %rax, 0x28(%r12)
movq %r14, 0x30(%r12)
movb %r14b, 0x38(%r12)
movl $0x48, %edi
callq 0x3260
movq %rax, %r15
movq %rax, 0x8(%rax)
movq %rax, (%rax)
addq $0x38, %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r15)
movq %r14, 0x20(%r15)
movq %rax, 0x28(%r15)
movq %r14, 0x30(%r15)
movb %r14b, 0x38(%r15)
movl $0x48, %edi
callq 0x3260
movq %rax, %r13
movq %rax, 0x8(%rax)
movq %rax, (%rax)
addq $0x38, %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r13)
movq %r14, 0x20(%r13)
movq %rax, 0x28(%r13)
movq %r14, 0x30(%r13)
movb %r14b, 0x38(%r13)
movq (%rbx), %rax
movq %r12, 0x18(%rax)
movq %r12, (%rbx)
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x8(%rax), %rdi
movq %r12, %rsi
callq 0x6f3f
movq (%rbx), %rax
movq %r15, 0x20(%rax)
movq (%rbx), %rax
movq %r13, 0x18(%rax)
movq %r15, (%rbx)
movq -0x30(%rbp), %rdi
movq %rbx, %rsi
callq 0x72dc
movq -0x38(%rbp), %rdi
movq %rbx, %rsi
callq 0x72dc
movq (%rbx), %rax
movq %r12, 0x18(%rax)
movq %r13, (%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xd895(%rip), %rdi      # 0x151ac
xorl %esi, %esi
xorl %edx, %edx
jmp 0x7937
leaq 0xd888(%rip), %rdi      # 0x151ac
movl $0x1, %esi
jmp 0x7937
leaq 0xd87a(%rip), %rdi      # 0x151ac
movl $0x2, %esi
xorl %eax, %eax
callq 0x33d0
// File: /workspace/github_cpp_makefile_star2_O3/johan-bjareholt[P]lua-compiler/src/ir.cc
// Function: convertReturn(Statement*, BBlock*)
void convertReturn(Statement *in, BBlock *current){
    // TODO: Support for multiple return values
    Expression* retexp = in->expressions.at(0);
    std::string retval = convert(retexp, current);
    ThreeAd ta = ThreeAd("_r",'r',retval, retval);
    current->instructions.push_back(ta);
    
    /*for(Expression* exp: in->expressions){
        convert(exp, current);
    }*/
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xf0, %rsp
movq (%rdi), %rax
cmpq %rax, 0x8(%rdi)
je 0x7af5
movq %rsi, %rbx
movq (%rax), %rsi
leaq -0x40(%rbp), %rdi
movq %rbx, %rdx
callq 0x6c3b
leaq -0x90(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0xfd35(%rip), %rsi      # 0x17712
leaq 0xfd30(%rip), %rdx      # 0x17714
leaq -0xa0(%rbp), %rdi
callq 0x8e3a
leaq -0x70(%rbp), %r15
movq %r15, -0x10(%r15)
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rdx
addq %rsi, %rdx
leaq -0x80(%rbp), %rdi
callq 0x4baa
leaq -0x50(%rbp), %r12
movq %r12, -0x10(%r12)
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rdx
addq %rsi, %rdx
leaq -0x60(%rbp), %rdi
callq 0x4baa
leaq -0x108(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
leaq -0x80(%rbp), %rcx
leaq -0x60(%rbp), %r8
movl $0x72, %edx
callq 0x4c94
movq -0x60(%rbp), %rdi
cmpq %r12, %rdi
je 0x7a57
callq 0x3230
movq -0x80(%rbp), %rdi
cmpq %r15, %rdi
je 0x7a65
callq 0x3230
movq -0xa0(%rbp), %rdi
cmpq %r14, %rdi
je 0x7a76
callq 0x3230
leaq -0x108(%rbp), %rsi
movq %rbx, %rdi
callq 0x8b44
movq %rax, %rdi
movq %rbx, %rsi
callq 0x3060
incq 0x10(%rbx)
leaq -0xb0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7aa9
callq 0x3230
leaq -0xd0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7abe
callq 0x3230
leaq -0xf0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7ad3
callq 0x3230
leaq -0x30(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7ae5
callq 0x3230
addq $0xf0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0xd6b0(%rip), %rdi      # 0x151ac
xorl %esi, %esi
xorl %edx, %edx
xorl %eax, %eax
callq 0x33d0
movq %rax, %rbx
leaq -0x108(%rbp), %rdi
callq 0x7d26
jmp 0x7b57
movq %rax, %rbx
movq -0x60(%rbp), %rdi
cmpq %r12, %rdi
je 0x7b2e
callq 0x3230
jmp 0x7b2e
movq %rax, %rbx
movq -0x80(%rbp), %rdi
cmpq %r15, %rdi
je 0x7b41
callq 0x3230
jmp 0x7b41
movq %rax, %rbx
movq -0xa0(%rbp), %rdi
cmpq %r14, %rdi
je 0x7b57
callq 0x3230
jmp 0x7b57
movq %rax, %rbx
leaq -0x30(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7b69
callq 0x3230
movq %rbx, %rdi
callq 0x3470
// File: /workspace/github_cpp_makefile_star2_O3/johan-bjareholt[P]lua-compiler/src/ir.cc
// Function: dumpCFG(std::ostream&, BBlock*)
void dumpCFG(std::ostream& ss, BBlock *start)
{
    set<BBlock*> done, todo;
    todo.insert(start);
    while(todo.size()>0)
    {
        // Pop an arbitrary element from todo set
        auto first = todo.begin();
        BBlock *next = *first;
        todo.erase(first);

        next->dump(ss);

        done.insert(next);
        if(next->trueExit!=NULL && done.find(next->trueExit)==done.end())
            todo.insert(next->trueExit);
        if(next->falseExit!=NULL && done.find(next->falseExit)==done.end())
            todo.insert(next->falseExit);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdi, %rbx
leaq -0x98(%rbp), %rax
movq %rsi, (%rax)
leaq -0x88(%rbp), %r13
xorl %ecx, %ecx
movl %ecx, (%r13)
movq %rcx, 0x8(%r13)
movq %r13, 0x10(%r13)
movq %r13, 0x18(%r13)
movq %rcx, 0x20(%r13)
leaq -0x58(%rbp), %rdx
movl %ecx, (%rdx)
movq %rcx, 0x8(%rdx)
movq %rdx, 0x10(%rdx)
movq %rdx, 0x18(%rdx)
movq %rcx, 0x20(%rdx)
leaq -0x60(%rbp), %rdi
movq %rax, %rsi
callq 0x8ed8
cmpq $0x0, -0x38(%rbp)
je 0x7cd6
leaq -0x60(%rbp), %r14
leaq -0x90(%rbp), %r15
leaq -0x30(%rbp), %r12
movq -0x48(%rbp), %rsi
movq 0x20(%rsi), %rax
movq %rax, -0x30(%rbp)
movq %r14, %rdi
callq 0x8f92
movq -0x30(%rbp), %rdi
movq %rbx, %rsi
callq 0x4e4e
movq %r15, %rdi
movq %r12, %rsi
callq 0x8ed8
movq -0x30(%rbp), %rsi
movq 0x18(%rsi), %rax
testq %rax, %rax
je 0x7c73
movq -0x80(%rbp), %r8
testq %r8, %r8
je 0x7c63
movq %r13, %r9
movq %r9, %rcx
movq %r8, %rdx
movq 0x20(%r8), %rdi
xorl %r8d, %r8d
cmpq %rax, %rdi
setb %r8b
movq %rdx, %r9
cmovbq %rcx, %r9
movq 0x10(%rdx,%r8,8), %r8
testq %r8, %r8
jne 0x7c2c
cmpq %r13, %r9
je 0x7c63
cmpq %rax, %rdi
cmovbq %rcx, %rdx
cmpq 0x20(%rdx), %rax
jae 0x7c73
addq $0x18, %rsi
movq %r14, %rdi
callq 0x8ed8
movq -0x30(%rbp), %rsi
movq 0x20(%rsi), %rax
testq %rax, %rax
je 0x7ccb
movq -0x80(%rbp), %r8
testq %r8, %r8
je 0x7cbf
movq %r13, %r9
movq %r9, %rcx
movq %r8, %rdx
movq 0x20(%r8), %rdi
xorl %r8d, %r8d
cmpq %rax, %rdi
setb %r8b
movq %rdx, %r9
cmovbq %rcx, %r9
movq 0x10(%rdx,%r8,8), %r8
testq %r8, %r8
jne 0x7c88
cmpq %r13, %r9
je 0x7cbf
cmpq %rax, %rdi
cmovbq %rcx, %rdx
cmpq 0x20(%rdx), %rax
jae 0x7ccb
addq $0x20, %rsi
movq %r14, %rdi
callq 0x8ed8
cmpq $0x0, -0x38(%rbp)
jne 0x7be8
leaq -0x60(%rbp), %rdi
callq 0x7f68
leaq -0x90(%rbp), %rdi
callq 0x7f68
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x7cfc
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
callq 0x7f68
leaq -0x90(%rbp), %rdi
callq 0x7f68
movq %rbx, %rdi
callq 0x3470
// File: /workspace/github_cpp_makefile_star2_O3/johan-bjareholt[P]lua-compiler/src/convert.cc
// Function: newLabel[abi:cxx11]()
std::string newLabel(){
	std::stringstream ss;
	ss << "label" << to_string(labelcount);
    std::string varname = ss.str();
    addVar(varname, VT_LABEL, "");
	labelcount++;
	return varname;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1e8, %rsp            # imm = 0x1E8
movq %rdi, %rbx
leaq -0x210(%rbp), %rdi
callq 0x31a0
leaq -0x200(%rbp), %rdi
leaq 0xc32d(%rip), %rsi      # 0x15332
movl $0x5, %edx
callq 0x32b0
movl 0x143fa(%rip), %r15d    # 0x1d410
movl %r15d, %r12d
negl %r12d
cmovsl %r15d, %r12d
movl $0x1, %r13d
cmpl $0xa, %r12d
jb 0x9076
movl $0x4, %r13d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %r12d, %ecx
cmpl $0x63, %ecx
jbe 0x906d
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x9073
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x9076
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r13d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x903a
addl $-0x3, %r13d
jmp 0x9076
addl $-0x2, %r13d
jmp 0x9076
decl %r13d
shrl $0x1f, %r15d
leal (%r15,%r13), %esi
leaq -0x38(%rbp), %r14
movq %r14, -0x10(%r14)
leaq -0x48(%rbp), %rdi
movl $0x2d, %edx
callq 0x32d0
addq -0x48(%rbp), %r15
movq %r15, %rdi
movl %r13d, %esi
movl %r12d, %edx
callq 0x7ff7
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
leaq -0x200(%rbp), %rdi
callq 0x32b0
movq -0x48(%rbp), %rdi
cmpq %r14, %rdi
je 0x90c8
callq 0x3230
leaq -0x1f8(%rbp), %rsi
movq %rbx, %rdi
callq 0x3400
leaq -0x78(%rbp), %r15
movq %r15, -0x10(%r15)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq -0x88(%rbp), %rdi
callq 0x4baa
leaq -0x58(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0xe7d8(%rip), %rdx      # 0x178dc
leaq -0x68(%rbp), %rdi
movq %rdx, %rsi
callq 0x8e3a
leaq -0x88(%rbp), %rdi
leaq -0x68(%rbp), %rdx
movl $0x4, %esi
callq 0x91f7
movq -0x68(%rbp), %rdi
cmpq %r14, %rdi
je 0x9133
callq 0x3230
movq -0x88(%rbp), %rdi
cmpq %r15, %rdi
je 0x9144
callq 0x3230
incl 0x142c6(%rip)           # 0x1d410
movq 0x13e47(%rip), %rsi     # 0x1cf98
leaq -0x210(%rbp), %rdi
callq 0x31c0
leaq -0x190(%rbp), %rdi
callq 0x30c0
movq %rbx, %rax
addq $0x1e8, %rsp            # imm = 0x1E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r12
movq -0x68(%rbp), %rdi
cmpq %r14, %rdi
je 0x9194
callq 0x3230
jmp 0x9194
movq %rax, %r12
movq -0x88(%rbp), %rdi
cmpq %r15, %rdi
je 0x91aa
callq 0x3230
jmp 0x91aa
movq %rax, %r12
movq (%rbx), %rdi
addq $0x10, %rbx
cmpq %rbx, %rdi
jne 0x91c4
jmp 0x91d0
movq %rax, %r12
movq -0x48(%rbp), %rdi
cmpq %r14, %rdi
je 0x91d0
callq 0x3230
jmp 0x91d0
jmp 0x91cd
movq %rax, %r12
movq 0x13dc1(%rip), %rsi     # 0x1cf98
leaq -0x210(%rbp), %rdi
callq 0x31c0
leaq -0x190(%rbp), %rdi
callq 0x30c0
movq %r12, %rdi
callq 0x3470
// File: /workspace/github_cpp_makefile_star2_O3/johan-bjareholt[P]lua-compiler/src/convert.cc
// Function: addVar(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
static void addVar(std::string name, int type, std::string value){
    if (getVar(name) != nullptr){
        if (getVar(name)->first != VT_UNKNOWN)
            std::cout << "overriding value of " << name << "!" << std::endl;
        vars2.erase(name);
    }
    std::pair<int, std::string> var(type, value);
    std::pair<std::string, std::pair<int, std::string>> entry(name, var);
    vars2.insert(entry);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rdx, %r14
movl %esi, %r15d
movq %rdi, %rbx
leaq -0x80(%rbp), %r13
movq %r13, -0x10(%r13)
movq (%rdi), %rsi
movq 0x8(%rdi), %rdx
addq %rsi, %rdx
leaq -0x90(%rbp), %r12
movq %r12, %rdi
callq 0x4baa
leaq 0x141a4(%rip), %rdi     # 0x1d3e0
movq %r12, %rsi
callq 0xce92
movq %rax, %r12
movq -0x90(%rbp), %rdi
cmpq %r13, %rdi
je 0x9258
callq 0x3230
leaq 0x14189(%rip), %rax     # 0x1d3e8
cmpq %rax, %r12
je 0x9333
leaq -0x60(%rbp), %r13
movq %r13, -0x10(%r13)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq -0x70(%rbp), %r12
movq %r12, %rdi
callq 0x4baa
leaq 0x14153(%rip), %rdi     # 0x1d3e0
movq %r12, %rsi
callq 0xce92
movl 0x40(%rax), %r12d
movq -0x70(%rbp), %rdi
cmpq %r13, %rdi
je 0x92a7
callq 0x3230
cmpl $0x5, %r12d
je 0x9316
movq 0x13d1c(%rip), %r12     # 0x1cfd0
leaq 0xc444(%rip), %rsi      # 0x156ff
movl $0x14, %edx
movq %r12, %rdi
callq 0x32b0
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r12, %rdi
callq 0x32b0
movq %rax, %r12
leaq 0xda49(%rip), %rsi      # 0x16d2a
movl $0x1, %edx
movq %rax, %rdi
callq 0x32b0
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x3240
movsbl %al, %esi
movq %r12, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3180
leaq 0x140c3(%rip), %r12     # 0x1d3e0
movq %r12, %rdi
movq %rbx, %rsi
callq 0xc904
movq %r12, %rdi
movq %rax, %rsi
callq 0xc9c0
leaq -0x48(%rbp), %rdi
movl %r15d, -0x8(%rdi)
leaq -0x38(%rbp), %r15
movq %r15, -0x10(%r15)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
callq 0x4baa
leaq -0xd8(%rbp), %rdi
leaq -0x50(%rbp), %rdx
movq %rbx, %rsi
callq 0xc860
leaq 0x14074(%rip), %rdi     # 0x1d3e0
leaq -0xd8(%rbp), %rsi
callq 0xcb34
leaq -0xa0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x938d
callq 0x3230
leaq -0xc8(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x93a2
callq 0x3230
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
je 0x93b0
callq 0x3230
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x70(%rbp), %rdi
jmp 0x93ff
movq %rax, %rbx
leaq -0xd8(%rbp), %rdi
callq 0xc8ce
jmp 0x93df
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
je 0x93ed
callq 0x3230
movq %rbx, %rdi
callq 0x3470
movq %rax, %rbx
movq -0x90(%rbp), %rdi
cmpq %r13, %rdi
jne 0x93e8
jmp 0x93ed
// File: /workspace/github_cpp_makefile_star2_O3/aisthesis[P]realnumber/tst/array_arithmetic_test.cpp
// Function: MathTestCases::~MathTestCases()
~MathTestCases() {
		delete[] small_arr1;
		delete[] small_arr2;
		delete[] small_arr3;
		delete[] smaller_arr;
		delete[] small_result_arr;
		delete[] bigger_arr1;
		delete[] bigger_arr2;
		delete[] bigger_arr3;
		delete[] big_arr;
		delete[] big_sum_arr;
		delete[] big_product_arr;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x30(%rdi), %rdi
testq %rdi, %rdi
je 0x166b3
callq 0x31a0
movq 0x38(%rbx), %rdi
testq %rdi, %rdi
je 0x166c1
callq 0x31a0
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
je 0x166cf
callq 0x31a0
movq 0x48(%rbx), %rdi
testq %rdi, %rdi
je 0x166dd
callq 0x31a0
movq 0x50(%rbx), %rdi
testq %rdi, %rdi
je 0x166eb
callq 0x31a0
movq 0x58(%rbx), %rdi
testq %rdi, %rdi
je 0x166f9
callq 0x31a0
movq 0x60(%rbx), %rdi
testq %rdi, %rdi
je 0x16707
callq 0x31a0
movq 0x68(%rbx), %rdi
testq %rdi, %rdi
je 0x16715
callq 0x31a0
movq 0x70(%rbx), %rdi
testq %rdi, %rdi
je 0x16723
callq 0x31a0
movq 0x78(%rbx), %rdi
testq %rdi, %rdi
je 0x16731
callq 0x31a0
movq 0x80(%rbx), %rdi
addq $0x8, %rsp
testq %rdi, %rdi
je 0x16748
popq %rbx
popq %rbp
jmp 0x31a0
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/FakePsyho[P]halite2/MyBot.cpp
// Function: detectCollisions(hlt::Location const&, hlt::Location const&, std::vector<hlt::Entity, std::allocator<hlt::Entity>>&, double, bool)
int detectCollisions(const Location& start, const Location& end, VC<Entity>& entities, double radius = 0.5001, bool earlyExit = true) {
	int rv = m.in_bounds(end) ? 0 : 1;
	if (rv && earlyExit) return 1;
	for (auto& e : entities) 
		if (segment_circle_intersect(start, end, e, radius)) {
			if (earlyExit) return 1;
			rv++;
		}
	return rv;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, 0xc(%rsp)
movsd %xmm0, 0x10(%rsp)
movq %rsi, %r14
movq %rdi, %r15
movsd (%rsi), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x4440
xorps %xmm1, %xmm1
cvtsi2sdl 0x198d2(%rip), %xmm1 # 0x1dce8
ucomisd %xmm0, %xmm1
jbe 0x4440
movsd 0x8(%r14), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x4440
xorps %xmm1, %xmm1
cvtsi2sdl 0x198b5(%rip), %xmm1 # 0x1dcec
ucomisd %xmm0, %xmm1
seta %al
jmp 0x4442
xorl %eax, %eax
movl 0xc(%rsp), %ecx
xorb $0x1, %cl
movl %eax, %esi
orb %cl, %sil
cmpb $0x1, %sil
jne 0x4494
xorb $0x1, %al
movzbl %al, %ebp
movq (%rdx), %r12
movq 0x8(%rdx), %r13
cmpq %r13, %r12
je 0x4499
movzbl %cl, %ebx
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
movsd 0x10(%rsp), %xmm0
callq 0x44aa
testb %al, %al
je 0x4489
cmpb $0x0, 0xc(%rsp)
jne 0x4494
addl %ebx, %ebp
addq $0x78, %r12
cmpq %r13, %r12
jne 0x4468
jmp 0x4499
movl $0x1, %ebp
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/FakePsyho[P]halite2/MyBot.cpp
// Function: getSpawningTimes(hlt::Planet&, int)
VI getSpawningTimes(Planet &p, int max_turns = 20) {
	VI docked;
	for (EntityId& eid : p.docked_ships) {
		const Ship& ship = m.get_ship(p.owner_id, eid);
		if (ship.docking_status == ShipDockingStatus::Docked) {
			docked.PB(0);
		} else if (ship.docking_status == ShipDockingStatus::Docking) {
			docked.PB(ship.docking_progress - 1);
		}
	}
	
	if (docked.empty()) return VI();
		
	VI rv;
	int v = p.current_production;
	FOR(t, 1, max_turns+1) {
		REP(i, docked.S) {
			if (docked[i]) {
				docked[i]--;
			} else {
				v += BASE_PRODUCTIVITY;
			}
		}
		if (v >= 72) {
			rv.PB(t);
			v -= 72;
		}
	}
	return rv;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
movq 0x88(%rsi), %r12
movq 0x90(%rsi), %r13
cmpq %r13, %r12
je 0x4805
movl %edx, %ebp
movq %rsi, %r14
leaq 0x19624(%rip), %r15     # 0x1dce8
movl 0x4(%r14), %esi
movl (%r12), %edx
movq %r15, %rdi
callq 0xd6ae
movl 0x7c(%rax), %ecx
cmpl $0x1, %ecx
je 0x46fd
cmpl $0x2, %ecx
jne 0x4742
movl $0x0, 0xc(%rsp)
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
je 0x4722
movl $0x0, (%rsi)
jmp 0x4717
movl 0x80(%rax), %eax
decl %eax
movl %eax, 0xc(%rsp)
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
je 0x4733
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x18(%rsp)
jmp 0x4742
leaq 0x10(%rsp), %rdi
leaq 0xc(%rsp), %rdx
callq 0x117c2
jmp 0x4742
leaq 0x10(%rsp), %rdi
leaq 0xc(%rsp), %rdx
callq 0x117c2
addq $0x4, %r12
cmpq %r13, %r12
jne 0x46c4
movq 0x10(%rsp), %rdi
cmpq 0x18(%rsp), %rdi
je 0x4807
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
movl 0x80(%r14), %r15d
movl $0x1, 0xc(%rsp)
testl %ebp, %ebp
jle 0x4815
leaq 0xc(%rsp), %r14
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
subq %rax, %rcx
je 0x47c0
sarq $0x2, %rcx
cmpq $0x1, %rcx
adcq $0x0, %rcx
xorl %edx, %edx
movl (%rax,%rdx,4), %esi
testl %esi, %esi
je 0x47b4
decl %esi
movl %esi, (%rax,%rdx,4)
jmp 0x47b8
addl $0x6, %r15d
incq %rdx
cmpq %rdx, %rcx
jne 0x47a6
cmpl $0x47, %r15d
jle 0x47ef
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x47e0
movl 0xc(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x47eb
movq %rbx, %rdi
movq %r14, %rdx
callq 0x118fe
addl $-0x48, %r15d
movl 0xc(%rsp), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0xc(%rsp)
cmpl %ebp, %eax
jl 0x4789
movq 0x10(%rsp), %rdi
jmp 0x4815
xorl %edi, %edi
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
testq %rdi, %rdi
je 0x4827
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x3240
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x4859
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x3240
jmp 0x4859
jmp 0x4856
jmp 0x4856
movq %rax, %r14
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x4870
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x3240
movq %r14, %rdi
callq 0x33d0
// File: /workspace/github_cpp_makefile_star2_O3/FakePsyho[P]halite2/MyBot.cpp
// Function: hideOrder(hlt::Ship const&, int, int)
Order hideOrder(const Ship& ship, int cx, int cy) {
	Location loc(cx == 0 ? 1 : m.map_width - 1, cy == 0 ? 1 : m.map_height - 1);
	double dist = ship.location.get_distance_to(loc);
	
	Order o;
	o.ship = ship.entity_id;
	o.cornerx = cx;
	o.cornery = cy;
	o.type = OrderType::Hide;
	o.value = 5000 - dist;
	return o;
}

// Assembly:
movl 0x17a7e(%rip), %eax     # 0x1dce8
decl %eax
testl %edx, %edx
movl $0x1, %r8d
cmovel %r8d, %eax
cvtsi2sd %eax, %xmm0
movq %rdi, %rax
movl 0x17a67(%rip), %edi     # 0x1dcec
decl %edi
testl %ecx, %ecx
cmovel %r8d, %edi
cvtsi2sd %edi, %xmm1
movsd 0x8(%rsi), %xmm2
subsd %xmm0, %xmm2
movsd 0x10(%rsi), %xmm0
subsd %xmm1, %xmm0
mulsd %xmm0, %xmm0
mulsd %xmm2, %xmm2
addsd %xmm0, %xmm2
xorps %xmm0, %xmm0
sqrtsd %xmm2, %xmm0
xorl %edi, %edi
movb %dil, -0x5(%rsp)
movq %rdi, -0xd(%rsp)
xorpd %xmm1, %xmm1
movupd %xmm1, 0x1c(%rax)
movupd %xmm1, 0x10(%rax)
movq %rdi, 0x30(%rax)
movb %dil, 0x38(%rax)
movq -0x10(%rsp), %r8
movq %r8, 0x39(%rax)
movl -0x8(%rsp), %r8d
movl %r8d, 0x41(%rax)
movb %dil, 0x58(%rax)
pcmpeqd %xmm1, %xmm1
movdqu %xmm1, 0x60(%rax)
movl (%rsi), %esi
movl %esi, 0x60(%rax)
movl %edx, 0x6c(%rax)
movl %ecx, 0x70(%rax)
movl $0x7, (%rax)
movsd 0xfe48(%rip), %xmm1     # 0x16158
subsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rax)
retq
// File: /workspace/github_cpp_makefile_star2_O3/FakePsyho[P]halite2/MyBot.cpp
// Function: recalcOrder(Order&)
void recalcOrder(Order& o) {
	const Ship& ship = m.get_ship(player_id, o.ship);
	if (o.type == OrderType::Colonize) {
		o = colonizeOrder(ship, m.planets[o.planet]);
	} else if (o.type == OrderType::AttackShip || o.type == OrderType::AttackMiner || o.type == OrderType::DefendMiner || o.type == OrderType::HitAndRun) {
		Ship eship = *enemyShips[o.target];
		o = attackOrder(ship, eship, o.target);
	} else if (o.type == OrderType::Hide) {
		o = hideOrder(ship, o.cornerx, o.cornery);
	} else {
		assert(false);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movq %rdi, %rbx
movl 0x179ab(%rip), %esi     # 0x1dcdc
movl 0x60(%rdi), %edx
leaq 0x179ad(%rip), %rdi     # 0x1dce8
callq 0xd6ae
movq %rax, %r14
movl (%rbx), %eax
leal -0x3(%rax), %ecx
cmpl $0x4, %ecx
jae 0x63a6
movl 0x68(%rbx), %eax
leaq 0x18(%rsp), %rsi
movl %eax, (%rsi)
leaq 0x17dc2(%rip), %rdi     # 0x1e120
callq 0xd884
movq (%rax), %rsi
leaq 0x90(%rsp), %r15
movl $0x88, %edx
movq %r15, %rdi
callq 0x31f0
movl 0x68(%rbx), %ecx
leaq 0x18(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x6020
movl $0xe, %ecx
movq %rbx, %rdi
movq %r12, %rsi
rep  movsq (%rsi), %es:(%rdi)
movl 0x70(%r12), %eax
jmp 0x63ed
cmpl $0x7, %eax
je 0x63ff
cmpl $0x2, %eax
jne 0x64ae
movl 0x64(%rbx), %eax
leaq (%rax,%rax,4), %rdx
shlq $0x5, %rdx
addq 0x179a2(%rip), %rdx     # 0x1dd68
leaq 0x90(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x5df1
movl $0xe, %ecx
movq %rbx, %rdi
movq %r15, %rsi
rep  movsq (%rsi), %es:(%rdi)
movl 0x70(%r15), %eax
movl %eax, 0x70(%rbx)
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movl 0x178e3(%rip), %eax     # 0x1dce8
decl %eax
cmpl $0x0, 0x6c(%rbx)
movl $0x1, %ecx
cmovel %ecx, %eax
cvtsi2sd %eax, %xmm0
movl 0x178cf(%rip), %eax     # 0x1dcec
decl %eax
cmpl $0x0, 0x70(%rbx)
cmovel %ecx, %eax
cvtsi2sd %eax, %xmm1
movsd 0x8(%r14), %xmm2
subsd %xmm0, %xmm2
movsd 0x10(%r14), %xmm0
subsd %xmm1, %xmm0
mulsd %xmm0, %xmm0
mulsd %xmm2, %xmm2
addsd %xmm0, %xmm2
xorps %xmm0, %xmm0
sqrtsd %xmm2, %xmm0
xorl %eax, %eax
movq %rax, 0xb(%rsp)
movb %al, 0x13(%rsp)
movl (%r14), %ecx
movsd 0xfcf1(%rip), %xmm1     # 0x16158
subsd %xmm0, %xmm1
movl $0x7, (%rbx)
movsd %xmm1, 0x8(%rbx)
xorpd %xmm0, %xmm0
movupd %xmm0, 0x1c(%rbx)
movupd %xmm0, 0x10(%rbx)
movq %rax, 0x30(%rbx)
movb %al, 0x38(%rbx)
movl 0x10(%rsp), %edx
movl %edx, 0x41(%rbx)
movq 0x8(%rsp), %rdx
movq %rdx, 0x39(%rbx)
movb %al, 0x58(%rbx)
movl %ecx, 0x60(%rbx)
movq $-0x1, 0x64(%rbx)
jmp 0x63f0
leaq 0xfe38(%rip), %rdi      # 0x162ed
leaq 0xfe37(%rip), %rsi      # 0x162f3
leaq 0xfe3a(%rip), %rcx      # 0x162fd
movl $0x28a, %edx            # imm = 0x28A
callq 0x3160
// File: /workspace/github_cpp_makefile_star2_O3/FakePsyho[P]halite2/./hlt/move.hpp
// Function: hlt::Move::get_velocity()
Location get_velocity() {
			if (velocity_cached) return velocity;
			velocity = Move::get_velocity(move_angle_deg / 180.0 * M_PI, move_thrust);
			velocity_cached = true;
			return velocity;
		}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
cmpb $0x1, 0x48(%rdi)
jne 0xdb9e
movsd 0x38(%rbx), %xmm0
movsd 0x40(%rbx), %xmm1
jmp 0xdc0d
movsd 0x8(%rbx), %xmm2
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm2
xorps %xmm0, %xmm0
jne 0xdbb2
jnp 0xdbff
movsd 0x10(%rbx), %xmm0
divsd 0x8479(%rip), %xmm0     # 0x16038
mulsd 0x8479(%rip), %xmm0     # 0x16040
movsd %xmm0, 0x18(%rsp)
movsd %xmm2, 0x8(%rsp)
callq 0x3410
mulsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
movsd 0x18(%rsp), %xmm0
callq 0x3070
movapd %xmm0, %xmm1
movsd 0x10(%rsp), %xmm0
mulsd 0x8(%rsp), %xmm1
movsd %xmm0, 0x38(%rbx)
movsd %xmm1, 0x40(%rbx)
movb $0x1, 0x48(%rbx)
addq $0x20, %rsp
popq %rbx
retq
nop