// File: /workspace/github_cpp_makefile_star2_O2/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 $0x88, %rsp
movq %rsi, -0x40(%rbp)
movq %rdi, %r15
callq 0x2c2a
movl 0x8(%r15), %r14d
leaq -0xa8(%rbp), %rbx
movq %rbx, %rdi
callq 0x2c4a
movq %rbx, %rdi
movq %r15, -0x48(%rbp)
movq %r15, %rsi
callq 0x2ee0
leal -0x2(,%r14,2), %eax
cltq
movq %rax, -0x58(%rbp)
movq $0x0, -0x30(%rbp)
leaq -0xa8(%rbp), %rdi
movq 0x3b74(%rip), %r12      # 0x5fd0
leaq 0x1bfc(%rip), %r13      # 0x405f
movq -0x78(%rbp), %rax
cmpq -0x98(%rbp), %rax
je 0x25ee
incq -0x30(%rbp)
callq 0x2f82
movq %rax, %rbx
xorl %r15d, %r15d
movq -0x48(%rbp), %rax
movslq 0x8(%rax), %rcx
subq -0x30(%rbp), %rcx
movq -0x40(%rbp), %r14
cmpq %rcx, %r15
jae 0x24b0
subq $0x1, %r14
jb 0x24ab
movq %r12, %rdi
movq %r13, %rsi
callq 0x20f0
jmp 0x2498
incq %r15
jmp 0x2483
cmpq $0x1, -0x30(%rbp)
jbe 0x24dd
addq %rcx, %rcx
movq -0x58(%rbp), %rax
subq %rcx, %rax
imulq -0x40(%rbp), %rax
subq %rbx, %rax
incq %rax
movq %rbx, %rcx
decq %rcx
xorl %edx, %edx
divq %rcx
movq %rax, -0x38(%rbp)
jmp 0x24e5
movq $0x0, -0x38(%rbp)
subq $0x1, %rbx
jb 0x25d3
movq -0x98(%rbp), %rax
movq (%rax), %r15
leaq -0xa8(%rbp), %rdi
callq 0x3138
movq %r12, %rax
movq %r13, %rsi
testq %r15, %r15
je 0x2545
cmpl $0x0, 0x4(%r15)
je 0x2524
movl (%r15), %esi
movq %r12, %rdi
callq 0x2180
jmp 0x254d
movq %r12, %rdi
leaq 0x1ad6(%rip), %rsi      # 0x4004
callq 0x20f0
movl (%r15), %esi
movq %rax, %rdi
callq 0x2180
leaq 0x1aeb(%rip), %rsi      # 0x4030
movq %rax, %rdi
callq 0x20f0
movq -0x38(%rbp), %r14
subq $0x1, %r14
jb 0x2564
movq %r12, %rdi
movq %r13, %rsi
callq 0x20f0
jmp 0x2551
movq -0x48(%rbp), %rax
movslq 0x8(%rax), %rax
cmpq %rax, -0x30(%rbp)
jae 0x24e5
testq %r15, %r15
je 0x25a3
leaq 0x10(%r15), %rsi
leaq -0xa8(%rbp), %rdi
callq 0x2ee0
addq $0x18, %r15
leaq -0xa8(%rbp), %rdi
movq %r15, %rsi
callq 0x2ee0
jmp 0x24e5
andq $0x0, -0x50(%rbp)
leaq -0xa8(%rbp), %r14
movq %r14, %rdi
leaq -0x50(%rbp), %r15
movq %r15, %rsi
callq 0x31a0
andq $0x0, -0x50(%rbp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x31a0
jmp 0x24e5
movq %r12, %rdi
leaq 0x1ad7(%rip), %rsi      # 0x40b4
callq 0x20f0
leaq -0xa8(%rbp), %rdi
jmp 0x2463
leaq -0xa8(%rbp), %rdi
callq 0x3272
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2618
jmp 0x2618
jmp 0x2618
jmp 0x2618
jmp 0x2618
jmp 0x2618
movq %rax, %rbx
leaq -0xa8(%rbp), %rdi
callq 0x3272
movq %rbx, %rdi
callq 0x2190
nop