// File: /workspace/github_cpp_makefile_star2_O3/DRSY[P]MyRBTree/main.cpp
// Function: RBTree::display(unsigned long)
void display(size_t width) {
        update_depth();
        size_t whole_width = (this->depth-1)*2*width+1;
        std::queue<NodePtr_t> q;
        q.push(this->root);
        size_t level = 0;
        while(!q.empty()) {
            level++;
            size_t num = q.size();
            for(size_t i=0;i<(this->depth-level);++i)
                for(size_t j=0;j<width;++j)
                    std::cout<<" ";
            size_t space;
            if(level>1)
                space = (whole_width-num-width*2*(this->depth-level))/(num-1);
            else
                space = 0;
            while(num--) {
                auto ptr = q.front();
                q.pop();
                if(ptr)
                    if(ptr->color==Color::red)
                        std::cout<<"\e[0;31m"<<ptr->value<<"\e[0m";
                    else
                        std::cout<<ptr->value;
                else
                    std::cout<<" ";
                for(size_t j=0;j<space;++j)
                    std::cout<<" ";
                if(level<this->depth) {
                   if(ptr) {
                        q.push(ptr->left);
                        q.push(ptr->right);
                    }else {
                        q.push(NULL);
                        q.push(NULL);
                    }
                }
            }
            std::cout<<"\n";
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rsi, -0x48(%rbp)
movq %rdi, -0x30(%rbp)
movl 0x8(%rdi), %ebx
testl %ebx, %ebx
jne 0x1410
movq -0x30(%rbp), %rbx
movq (%rbx), %rsi
movl $0x1, %edx
movq %rbx, %rdi
callq 0x20d0
movl 0x8(%rbx), %ebx
xorps %xmm0, %xmm0
leaq -0xa0(%rbp), %r14
movaps %xmm0, 0x40(%r14)
movaps %xmm0, 0x30(%r14)
movaps %xmm0, 0x20(%r14)
movaps %xmm0, 0x10(%r14)
movaps %xmm0, (%r14)
movq %r14, %rdi
xorl %esi, %esi
callq 0x211c
movq 0x30(%r14), %rax
movq 0x40(%r14), %rcx
addq $-0x8, %rcx
cmpq %rcx, %rax
je 0x145e
movq -0x30(%rbp), %rcx
movq (%rcx), %rcx
movq %rcx, (%rax)
addq $0x8, -0x70(%rbp)
jmp 0x146e
leaq -0xa0(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x22a4
leal -0x2(,%rbx,2), %eax
cltq
movq %rax, -0xa8(%rbp)
movq $0x0, -0x38(%rbp)
movq 0x3b43(%rip), %r15      # 0x4fd0
leaq 0x1bcb(%rip), %r13      # 0x305f
movq -0x90(%rbp), %rdi
movq -0x70(%rbp), %rsi
cmpq %rdi, %rsi
je 0x1738
movq -0x38(%rbp), %rdx
incq %rdx
movq -0x80(%rbp), %rbx
movq -0x58(%rbp), %rax
movq %rax, %r8
subq -0x78(%rbp), %r8
shrq $0x3, %r8
cmpq $0x1, %rax
adcq $-0x1, %r8
subq -0x68(%rbp), %rsi
movq -0x30(%rbp), %rax
movslq 0x8(%rax), %rax
movq %rdx, -0x38(%rbp)
cmpq %rax, %rdx
jne 0x14e3
xorl %ecx, %ecx
jmp 0x1544
movq %r8, -0xb0(%rbp)
movq %rdi, -0xb8(%rbp)
movq %rsi, -0x40(%rbp)
xorl %r14d, %r14d
movq -0x48(%rbp), %rcx
movq %rcx, %r12
testq %rcx, %rcx
je 0x1520
movl $0x1, %edx
movq %r15, %rdi
movq %r13, %rsi
callq 0x1100
decq %r12
jne 0x1504
movq -0x30(%rbp), %rax
movl 0x8(%rax), %eax
incq %r14
movslq %eax, %rcx
subq -0x38(%rbp), %rcx
cmpq %rcx, %r14
jb 0x14f8
addq %rcx, %rcx
movq -0x40(%rbp), %rsi
movq -0xb8(%rbp), %rdi
movq -0xb0(%rbp), %r8
shlq $0x6, %r8
sarq $0x3, %rsi
subq %rdi, %rbx
sarq $0x3, %rbx
addq %rsi, %rbx
addq %r8, %rbx
cmpq $0x1, -0x38(%rbp)
jbe 0x1584
movq -0xa8(%rbp), %rax
subq %rcx, %rax
imulq -0x48(%rbp), %rax
subq %rbx, %rax
incq %rax
leaq -0x1(%rbx), %rcx
xorl %edx, %edx
divq %rcx
movq %rax, -0x40(%rbp)
jmp 0x158c
movq $0x0, -0x40(%rbp)
testq %rbx, %rbx
je 0x171f
movq -0x90(%rbp), %rax
movq -0x80(%rbp), %rcx
movq (%rax), %r14
addq $-0x8, %rcx
cmpq %rcx, %rax
je 0x15b2
addq $0x8, %rax
jmp 0x15e5
movq -0x88(%rbp), %rdi
movl $0x200, %esi            # imm = 0x200
callq 0x10e0
movq -0x78(%rbp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, -0x78(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x88(%rbp)
leaq 0x200(%rax), %rcx
movq %rcx, -0x80(%rbp)
movq %rax, -0x90(%rbp)
testq %r14, %r14
je 0x1605
cmpl $0x0, 0x4(%r14)
je 0x1612
movl (%r14), %esi
movq %r15, %rdi
callq 0x1150
jmp 0x1645
movl $0x1, %edx
movq %r15, %rax
movq %r13, %rsi
jmp 0x163d
movl $0x7, %edx
movq %r15, %rdi
leaq 0x19e3(%rip), %rsi      # 0x3004
callq 0x1100
movl (%r14), %esi
movq %r15, %rdi
callq 0x1150
movl $0x4, %edx
leaq 0x19f3(%rip), %rsi      # 0x3030
movq %rax, %rdi
callq 0x1100
movq -0x40(%rbp), %rax
movq %rax, %r12
testq %rax, %rax
je 0x1666
movl $0x1, %edx
movq %r15, %rdi
movq %r13, %rsi
callq 0x1100
decq %r12
jne 0x1651
movq -0x30(%rbp), %rax
movslq 0x8(%rax), %rax
cmpq %rax, -0x38(%rbp)
jae 0x1716
testq %r14, %r14
je 0x16a6
leaq 0x10(%r14), %rsi
movq -0x70(%rbp), %rax
movq -0x60(%rbp), %rcx
addq $-0x8, %rcx
cmpq %rcx, %rax
je 0x16d9
movq (%rsi), %rcx
movq %rcx, (%rax)
movq -0x70(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x70(%rbp)
jmp 0x16e9
movq $0x0, -0x50(%rbp)
leaq -0xa0(%rbp), %r14
movq %r14, %rdi
leaq -0x50(%rbp), %r12
movq %r12, %rsi
callq 0x24b6
movq $0x0, -0x50(%rbp)
movq %r14, %rdi
movq %r12, %rsi
callq 0x24b6
jmp 0x1716
leaq -0xa0(%rbp), %rdi
callq 0x22a4
movq -0x70(%rbp), %rax
addq $0x18, %r14
movq -0x60(%rbp), %rcx
addq $-0x8, %rcx
cmpq %rcx, %rax
je 0x1707
movq (%r14), %rcx
movq %rcx, (%rax)
addq $0x8, -0x70(%rbp)
jmp 0x1716
leaq -0xa0(%rbp), %rdi
movq %r14, %rsi
callq 0x22a4
decq %rbx
jne 0x1595
movl $0x1, %edx
movq %r15, %rdi
leaq 0x1986(%rip), %rsi      # 0x30b4
callq 0x1100
jmp 0x1494
leaq -0xa0(%rbp), %rdi
callq 0x25d6
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1762
jmp 0x1762
jmp 0x1762
jmp 0x1762
jmp 0x1762
jmp 0x1762
movq %rax, %rbx
leaq -0xa0(%rbp), %rdi
callq 0x25d6
movq %rbx, %rdi
callq 0x1160
nop