// File: /workspace/github_cpp_makefile_star2_O3/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 0x18127(%rip), %rdi     # 0x1d360
movq %rbx, %rsi
callq 0x80fe
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 0x1029a(%rip), %rsi     # 0x1554d
movl $0x1, %edx
movq %r15, %rdi
je 0x52e8
callq 0x32b0
leaq 0xfe50(%rip), %rsi      # 0x15119
movl $0x7, %edx
movq %r15, %rdi
callq 0x32b0
movq 0x28(%r13), %rsi
movq 0x30(%r13), %rdx
movq %r15, %rdi
callq 0x32b0
jmp 0x530c
callq 0x32b0
leaq 0xfe25(%rip), %rsi      # 0x15119
movl $0x7, %edx
movq %r15, %rdi
callq 0x32b0
movq %r15, %rdi
movq %r13, %rsi
callq 0x31d0
movq %rax, %rbx
leaq 0x125c6(%rip), %rsi     # 0x178dc
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 0x541b
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 0x4d56
movq -0x50(%rbp), %rdi
cmpq %rbx, %rdi
je 0x53ef
callq 0x3230
movq -0x70(%rbp), %rdi
cmpq %r13, %rdi
je 0x53fd
callq 0x3230
movq -0x90(%rbp), %rdi
cmpq %r14, %rdi
je 0x540e
callq 0x3230
movq (%r12), %r12
cmpq %r15, %r12
jne 0x536f
leaq -0x208(%rbp), %rsi
leaq -0x98(%rbp), %rdi
callq 0x3400
movq -0x90(%rbp), %rdx
testq %rdx, %rdx
movq -0x30(%rbp), %r14
je 0x5462
xorl %eax, %eax
movq -0x98(%rbp), %rcx
cmpb $0x22, (%rcx,%rax)
jne 0x5458
movb $0x27, (%rcx,%rax)
movq -0x90(%rbp), %rdx
incq %rax
cmpq %rax, %rdx
ja 0x5440
jmp 0x5464
xorl %edx, %edx
movq -0x98(%rbp), %rsi
movq %r14, %rdi
callq 0x32b0
leaq 0xfca7(%rip), %rsi      # 0x15121
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 0xfc65(%rip), %rsi      # 0x15125
movl $0x5, %edx
movq %r14, %rdi
callq 0x32b0
movq %r14, %rdi
movq %r15, %rsi
callq 0x31d0
movq %rax, %rbx
leaq 0xfc49(%rip), %rsi      # 0x1512b
movl $0x6, %edx
movq %rax, %rdi
callq 0x32b0
movq 0x18(%r15), %rsi
movq %rbx, %rdi
callq 0x31d0
movq %rax, %rbx
leaq 0xfbeb(%rip), %rsi      # 0x150f0
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 0xfbda(%rip), %rsi      # 0x15125
movl $0x5, %edx
movq %r14, %rdi
callq 0x32b0
movq %r14, %rdi
movq %r15, %rsi
callq 0x31d0
movq %rax, %rbx
leaq 0xfbbe(%rip), %rsi      # 0x1512b
movl $0x6, %edx
movq %rax, %rdi
callq 0x32b0
movq 0x20(%r15), %rsi
movq %rbx, %rdi
callq 0x31d0
movq %rax, %rbx
leaq 0xfb60(%rip), %rsi      # 0x150f0
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 0x17da5(%rip), %rax     # 0x1d370
movq 0x18(%r15), %rdi
testq %rax, %rax
je 0x560b
leaq 0x17d8d(%rip), %rcx     # 0x1d368
movq %rax, %rdx
xorl %esi, %esi
cmpq %rdi, 0x20(%rdx)
setb %sil
cmovaeq %rdx, %rcx
movq 0x10(%rdx,%rsi,8), %rdx
testq %rdx, %rdx
jne 0x55de
leaq 0x17d6b(%rip), %rdx     # 0x1d368
cmpq %rdx, %rcx
je 0x560b
cmpq 0x20(%rcx), %rdi
setae %cl
jmp 0x560d
xorl %ecx, %ecx
testq %rdi, %rdi
sete %dl
orb %cl, %dl
jne 0x5626
movq %r14, %rsi
callq 0x520e
movq 0x17d4a(%rip), %rax     # 0x1d370
movq 0x20(%r15), %rdi
testq %rax, %rax
je 0x5662
leaq 0x17d32(%rip), %rcx     # 0x1d368
xorl %edx, %edx
cmpq %rdi, 0x20(%rax)
setb %dl
cmovaeq %rax, %rcx
movq 0x10(%rax,%rdx,8), %rax
testq %rax, %rax
jne 0x5636
leaq 0x17d14(%rip), %rax     # 0x1d368
cmpq %rax, %rcx
je 0x5662
cmpq 0x20(%rcx), %rdi
setae %al
jmp 0x5664
xorl %eax, %eax
testq %rdi, %rdi
sete %cl
orb %al, %cl
jne 0x5676
movq %r14, %rsi
callq 0x520e
leaq -0x88(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x568b
callq 0x3230
movq 0x17906(%rip), %rsi     # 0x1cf98
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 0x56c2
jmp 0x56c2
jmp 0x56d7
movq %rax, %rbx
leaq -0x88(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x56fe
jmp 0x5714
movq %rax, %rbx
jmp 0x5714
movq %rax, %rbx
jmp 0x56f2
movq %rax, %rbx
movq -0x70(%rbp), %rdi
cmpq %r13, %rdi
je 0x56f2
callq 0x3230
movq -0x90(%rbp), %rdi
cmpq %r14, %rdi
je 0x5714
callq 0x3230
jmp 0x5714
movq %rax, %rbx
leaq -0x98(%rbp), %rdi
callq 0x7d26
movq 0x1787d(%rip), %rsi     # 0x1cf98
leaq -0x220(%rbp), %rdi
callq 0x31c0
leaq -0x1a0(%rbp), %rdi
callq 0x30c0
movq %rbx, %rdi
callq 0x3470
nop