// File: /workspace/github_c_makefile_star2_O0/buptlxb[P]xRay/src/basic_block.cpp
// Function: BasicBlock::toString(char*, int) const
char *BasicBlock::toString(char *buf, int size) const
{
    snprintf(buf, size, "\t\t\t0x%llx(0x%llx) %ld instructions", (ADDR)this, getFirstInstAddr(), insts.size());

    if (!successors.empty()) {
        snprintf(buf+strlen(buf), size-strlen(buf), "\n\t\t\tsucc{");
        for (ConstBBPtrIter iter = successors.begin(); iter != successors.end(); iter++) {
            snprintf(buf+strlen(buf), size-strlen(buf), "0x%llx(0x%llx), ", (ADDR)(*iter), (*iter)->getFirstInstAddr());
        }
        snprintf(buf+strlen(buf)-2, size-strlen(buf)+2, "}");
    }

    if (!predecessors.empty()) {
        snprintf(buf+strlen(buf), size-strlen(buf), "\n\t\t\tpred{");
        for (ConstBBPtrIter iter = predecessors.begin(); iter != predecessors.end(); iter++) {
            snprintf(buf+strlen(buf), size-strlen(buf), "0x%llx(0x%llx), ", (ADDR)(*iter), (*iter)->getFirstInstAddr());
        }
        snprintf(buf+strlen(buf)-2, size-strlen(buf)+2, "}");
    }
    return buf;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x120, %rsp            # imm = 0x120
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x50(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x68(%rbp)
movslq -0x14(%rbp), %rax
movq %rax, -0x60(%rbp)
callq 0x9190
movq -0x50(%rbp), %rdi
movq %rax, -0x58(%rbp)
callq 0x9230
movq -0x68(%rbp), %rdi
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %r8
movq -0x50(%rbp), %rcx
movq %rax, %r9
leaq 0x4869a(%rip), %rdx     # 0x510c4
movb $0x0, %al
callq 0x82e0
movq -0x50(%rbp), %rdi
addq $0x18, %rdi
callq 0x9260
testb $0x1, %al
jne 0x8bd8
movq -0x10(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x10(%rbp), %rdi
callq 0x80b0
movq %rax, %rcx
movq -0x80(%rbp), %rax
addq %rcx, %rax
movq %rax, -0x70(%rbp)
movslq -0x14(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x10(%rbp), %rdi
callq 0x80b0
movq -0x78(%rbp), %rsi
movq -0x70(%rbp), %rdi
subq %rax, %rsi
leaq 0x4865f(%rip), %rdx     # 0x510e7
movb $0x0, %al
callq 0x82e0
movq -0x50(%rbp), %rdi
addq $0x18, %rdi
callq 0x92a0
movq %rax, -0x20(%rbp)
movq -0x50(%rbp), %rdi
addq $0x18, %rdi
callq 0x9310
movq %rax, -0x28(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x92d0
testb $0x1, %al
jne 0x8ac7
jmp 0x8b75
movq -0x10(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0x10(%rbp), %rdi
callq 0x80b0
movq %rax, %rcx
movq -0xa8(%rbp), %rax
addq %rcx, %rax
movq %rax, -0x98(%rbp)
movslq -0x14(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0x10(%rbp), %rdi
callq 0x80b0
movq %rax, %rcx
movq -0xa0(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x90(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x9340
movq (%rax), %rax
movq %rax, -0x88(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x9340
movq (%rax), %rdi
callq 0x9190
movq -0x98(%rbp), %rdi
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rcx
movq %rax, %r8
leaq 0x48597(%rip), %rdx     # 0x510f1
movb $0x0, %al
callq 0x82e0
leaq -0x20(%rbp), %rdi
xorl %esi, %esi
callq 0x9360
movq %rax, -0x30(%rbp)
jmp 0x8aa0
movq -0x10(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq -0x10(%rbp), %rdi
callq 0x80b0
movq %rax, %rcx
movq -0xc0(%rbp), %rax
addq %rcx, %rax
addq $-0x2, %rax
movq %rax, -0xb0(%rbp)
movslq -0x14(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0x10(%rbp), %rdi
callq 0x80b0
movq -0xb8(%rbp), %rsi
movq -0xb0(%rbp), %rdi
subq %rax, %rsi
addq $0x2, %rsi
leaq 0x48531(%rip), %rdx     # 0x51102
movb $0x0, %al
callq 0x82e0
movq -0x50(%rbp), %rdi
addq $0x30, %rdi
callq 0x9260
testb $0x1, %al
jne 0x8d91
movq -0x10(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0x10(%rbp), %rdi
callq 0x80b0
movq %rax, %rcx
movq -0xd8(%rbp), %rax
addq %rcx, %rax
movq %rax, -0xc8(%rbp)
movslq -0x14(%rbp), %rax
movq %rax, -0xd0(%rbp)
movq -0x10(%rbp), %rdi
callq 0x80b0
movq -0xd0(%rbp), %rsi
movq -0xc8(%rbp), %rdi
subq %rax, %rsi
leaq 0x484c3(%rip), %rdx     # 0x51104
movb $0x0, %al
callq 0x82e0
movq -0x50(%rbp), %rdi
addq $0x30, %rdi
callq 0x92a0
movq %rax, -0x38(%rbp)
movq -0x50(%rbp), %rdi
addq $0x30, %rdi
callq 0x9310
movq %rax, -0x40(%rbp)
leaq -0x38(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x92d0
testb $0x1, %al
jne 0x8c80
jmp 0x8d2e
movq -0x10(%rbp), %rax
movq %rax, -0x100(%rbp)
movq -0x10(%rbp), %rdi
callq 0x80b0
movq %rax, %rcx
movq -0x100(%rbp), %rax
addq %rcx, %rax
movq %rax, -0xf0(%rbp)
movslq -0x14(%rbp), %rax
movq %rax, -0xf8(%rbp)
movq -0x10(%rbp), %rdi
callq 0x80b0
movq %rax, %rcx
movq -0xf8(%rbp), %rax
subq %rcx, %rax
movq %rax, -0xe8(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x9340
movq (%rax), %rax
movq %rax, -0xe0(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x9340
movq (%rax), %rdi
callq 0x9190
movq -0xf0(%rbp), %rdi
movq -0xe8(%rbp), %rsi
movq -0xe0(%rbp), %rcx
movq %rax, %r8
leaq 0x483de(%rip), %rdx     # 0x510f1
movb $0x0, %al
callq 0x82e0
leaq -0x38(%rbp), %rdi
xorl %esi, %esi
callq 0x9360
movq %rax, -0x48(%rbp)
jmp 0x8c59
movq -0x10(%rbp), %rax
movq %rax, -0x118(%rbp)
movq -0x10(%rbp), %rdi
callq 0x80b0
movq %rax, %rcx
movq -0x118(%rbp), %rax
addq %rcx, %rax
addq $-0x2, %rax
movq %rax, -0x108(%rbp)
movslq -0x14(%rbp), %rax
movq %rax, -0x110(%rbp)
movq -0x10(%rbp), %rdi
callq 0x80b0
movq -0x110(%rbp), %rsi
movq -0x108(%rbp), %rdi
subq %rax, %rsi
addq $0x2, %rsi
leaq 0x48378(%rip), %rdx     # 0x51102
movb $0x0, %al
callq 0x82e0
movq -0x10(%rbp), %rax
addq $0x120, %rsp            # imm = 0x120
popq %rbp
retq
nop