// File: /workspace/github_cpp_makefile_star2_O1/johan-bjareholt[P]lua-compiler/src/ir.cc
// Function: BBlock::dumpDot(std::ostream&)
void BBlock::dumpDot(std::ostream& ss){
    traversed_blocks.insert(this);
    // Def self
    ss  << '"' << this << '"' << std::endl;
    // Set self string
    if (this->label.empty())
        ss  << "[" << "label=\"" << this << "" << std::endl;
    else
        ss  << "[" << "label=\"" << this->label << "" << std::endl;
    std::stringstream ss_code;
    for(auto i : instructions){
        i.dump(ss_code);
    }
    // Handle " in the code so it doesn't escape
    std::string code_s = ss_code.str();
    for (int i = 0; i < code_s.length(); i++) {
        //std::cout << i << std::endl;
        if (code_s[i] == '"'){
            code_s[i] = '\'';
        }
    }
    ss << code_s;
    // Close self def
    ss << "\"];" << std::endl;
    // Connect to subs
    if (trueExit)
        ss  << "    \"" << this << "\" -> \"" << trueExit << "\";" << std::endl;
    if (falseExit)
        ss  << "    \"" << this << "\" -> \"" << falseExit << "\";"<< std::endl;
    // Dumpdot subs
    bool trueExitFound = traversed_blocks.find(trueExit) != traversed_blocks.end();
    if (trueExit && !trueExitFound)
        trueExit->dumpDot(ss);
    bool falseExitFound = traversed_blocks.find(falseExit) != traversed_blocks.end();
    if (falseExit && !falseExitFound)
        falseExit->dumpDot(ss);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1f8, %rsp            # imm = 0x1F8
movq %rsi, %r15
movq %rdi, %r13
leaq -0x220(%rbp), %rbx
movq %rdi, (%rbx)
leaq 0x1a123(%rip), %rdi     # 0x1f360
movq %rbx, %rsi
callq 0x8122
movb $0x22, %r14b
movb %r14b, (%rbx)
movl $0x1, %edx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x32b0
movq %rax, %rdi
movq %r13, %rsi
callq 0x31d0
movb %r14b, (%rbx)
leaq -0x220(%rbp), %rsi
movl $0x1, %edx
movq %rax, %rdi
callq 0x32b0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3240
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3180
cmpq $0x0, 0x30(%r13)
movq %r15, -0x30(%rbp)
leaq 0x11296(%rip), %rsi     # 0x1654d
movl $0x1, %edx
movq %r15, %rdi
je 0x52ec
callq 0x32b0
leaq 0x10e4c(%rip), %rsi     # 0x16119
movl $0x7, %edx
movq %r15, %rdi
callq 0x32b0
movq 0x28(%r13), %rsi
movq 0x30(%r13), %rdx
movq %r15, %rdi
callq 0x32b0
jmp 0x5310
callq 0x32b0
leaq 0x10e21(%rip), %rsi     # 0x16119
movl $0x7, %edx
movq %r15, %rdi
callq 0x32b0
movq %r15, %rdi
movq %r13, %rsi
callq 0x31d0
movq %rax, %rbx
leaq 0x135e2(%rip), %rsi     # 0x188fc
movq %rax, %rdi
xorl %edx, %edx
callq 0x32b0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3240
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3180
leaq -0x220(%rbp), %rdi
callq 0x31a0
movq (%r13), %r12
movq %r13, %r15
cmpq %r13, %r12
je 0x541f
leaq -0x80(%rbp), %r14
leaq -0x60(%rbp), %r13
leaq -0x40(%rbp), %rbx
movb 0x10(%r12), %al
movb %al, -0x98(%rbp)
movq %r14, -0x90(%rbp)
movq 0x18(%r12), %rsi
movq 0x20(%r12), %rdx
addq %rsi, %rdx
leaq -0x90(%rbp), %rdi
callq 0x4baa
movq %r13, -0x70(%rbp)
movq 0x38(%r12), %rsi
movq 0x40(%r12), %rdx
addq %rsi, %rdx
leaq -0x70(%rbp), %rdi
callq 0x4baa
movq %rbx, -0x50(%rbp)
movq 0x58(%r12), %rsi
movq 0x60(%r12), %rdx
addq %rsi, %rdx
leaq -0x50(%rbp), %rdi
callq 0x4baa
leaq -0x98(%rbp), %rdi
leaq -0x210(%rbp), %rsi
callq 0x4d52
movq -0x50(%rbp), %rdi
cmpq %rbx, %rdi
je 0x53f3
callq 0x3230
movq -0x70(%rbp), %rdi
cmpq %r13, %rdi
je 0x5401
callq 0x3230
movq -0x90(%rbp), %rdi
cmpq %r14, %rdi
je 0x5412
callq 0x3230
movq (%r12), %r12
cmpq %r15, %r12
jne 0x5373
leaq -0x208(%rbp), %rsi
leaq -0x98(%rbp), %rdi
callq 0x3400
movq -0x90(%rbp), %rdx
testq %rdx, %rdx
movq -0x30(%rbp), %r14
je 0x5464
xorl %eax, %eax
movq -0x98(%rbp), %rcx
cmpb $0x22, (%rcx,%rax)
jne 0x5455
movb $0x27, (%rcx,%rax)
incq %rax
movq -0x90(%rbp), %rdx
cmpq %rax, %rdx
ja 0x5444
movq -0x98(%rbp), %rsi
movq %r14, %rdi
callq 0x32b0
leaq 0x10ca7(%rip), %rsi     # 0x16121
movl $0x3, %edx
movq %r14, %rdi
callq 0x32b0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x3240
movsbl %al, %esi
movq %r14, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3180
cmpq $0x0, 0x18(%r15)
je 0x5539
leaq 0x10c65(%rip), %rsi     # 0x16125
movl $0x5, %edx
movq %r14, %rdi
callq 0x32b0
movq %r14, %rdi
movq %r15, %rsi
callq 0x31d0
movq %rax, %rbx
leaq 0x10c49(%rip), %rsi     # 0x1612b
movl $0x6, %edx
movq %rax, %rdi
callq 0x32b0
movq 0x18(%r15), %rsi
movq %rbx, %rdi
callq 0x31d0
movq %rax, %rbx
leaq 0x10beb(%rip), %rsi     # 0x160f0
movl $0x2, %edx
movq %rax, %rdi
callq 0x32b0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3240
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3180
cmpq $0x0, 0x20(%r15)
je 0x55c4
leaq 0x10bda(%rip), %rsi     # 0x16125
movl $0x5, %edx
movq %r14, %rdi
callq 0x32b0
movq %r14, %rdi
movq %r15, %rsi
callq 0x31d0
movq %rax, %rbx
leaq 0x10bbe(%rip), %rsi     # 0x1612b
movl $0x6, %edx
movq %rax, %rdi
callq 0x32b0
movq 0x20(%r15), %rsi
movq %rbx, %rdi
callq 0x31d0
movq %rax, %rbx
leaq 0x10b60(%rip), %rsi     # 0x160f0
movl $0x2, %edx
movq %rax, %rdi
callq 0x32b0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3240
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3180
movq 0x19da5(%rip), %rdx     # 0x1f370
leaq 0x19d96(%rip), %rax     # 0x1f368
movq %rax, %rcx
testq %rdx, %rdx
je 0x55fd
movq 0x18(%r15), %rsi
leaq 0x19d83(%rip), %rcx     # 0x1f368
xorl %edi, %edi
cmpq %rsi, 0x20(%rdx)
setb %dil
cmovaeq %rdx, %rcx
movq 0x10(%rdx,%rdi,8), %rdx
testq %rdx, %rdx
jne 0x55e5
cmpq %rax, %rcx
je 0x560f
movq 0x18(%r15), %rax
cmpq 0x20(%rcx), %rax
setae %al
jmp 0x5611
xorl %eax, %eax
movq 0x18(%r15), %rdi
testq %rdi, %rdi
sete %cl
orb %al, %cl
jne 0x5627
movq %r14, %rsi
callq 0x5212
movq 0x19d42(%rip), %rdx     # 0x1f370
leaq 0x19d33(%rip), %rax     # 0x1f368
movq %rax, %rcx
testq %rdx, %rdx
je 0x5660
movq 0x20(%r15), %rsi
leaq 0x19d20(%rip), %rcx     # 0x1f368
xorl %edi, %edi
cmpq %rsi, 0x20(%rdx)
setb %dil
cmovaeq %rdx, %rcx
movq 0x10(%rdx,%rdi,8), %rdx
testq %rdx, %rdx
jne 0x5648
cmpq %rax, %rcx
je 0x5672
movq 0x20(%r15), %rax
cmpq 0x20(%rcx), %rax
setae %al
jmp 0x5674
xorl %eax, %eax
movq 0x20(%r15), %rdi
testq %rdi, %rdi
sete %cl
orb %al, %cl
jne 0x568a
movq %r14, %rsi
callq 0x5212
leaq -0x88(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x569f
callq 0x3230
movq 0x198f2(%rip), %rsi     # 0x1ef98
leaq -0x220(%rbp), %rdi
callq 0x31c0
leaq -0x1a0(%rbp), %rdi
callq 0x30c0
addq $0x1f8, %rsp            # imm = 0x1F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x56d6
jmp 0x56d6
jmp 0x56eb
movq %rax, %rbx
leaq -0x88(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x5712
jmp 0x5728
movq %rax, %rbx
jmp 0x5728
movq %rax, %rbx
jmp 0x5706
movq %rax, %rbx
movq -0x70(%rbp), %rdi
cmpq %r13, %rdi
je 0x5706
callq 0x3230
movq -0x90(%rbp), %rdi
cmpq %r14, %rdi
je 0x5728
callq 0x3230
jmp 0x5728
movq %rax, %rbx
leaq -0x98(%rbp), %rdi
callq 0x7d56
movq 0x19869(%rip), %rsi     # 0x1ef98
leaq -0x220(%rbp), %rdi
callq 0x31c0
leaq -0x1a0(%rbp), %rdi
callq 0x30c0
movq %rbx, %rdi
callq 0x3470
nop