// File: DRSY[P]MyRBTree/main.cpp
// Function: RBTree::black_black(Node*, Node*)
void black_black(NodePtr_t father, NodePtr_t brother) {
        if(!brother) {
            if(isred(father) || father==this->root) {
                father->color = Color::black;
                return;
            }else {
                NodePtr_t tmp = father->father;
                NodePtr_t b = (father==tmp->left)?tmp->right:tmp->left;
                black_black(tmp, b);
            }
        }
        if(brother==father->right) {
            if(isblack(brother) && brother->right && isred(brother->right)) {
                Color tmp = father->color;
                father->color = Color::black;
                brother->color = tmp;
                rotate_left(father, brother);
                brother->right->color = Color::black;
            }
            else if(isblack(brother) && brother->left && isred(brother->left)) {
                brother->left->color = Color::black;
                brother->color = Color::red;
                auto p = rotate_right(brother->left, brother);
                Color tmp = father->color;
                father->color = Color::black;
                p->color = tmp;
                rotate_left(father, p);
                p->right->color = Color::black;
            }
            else {
                brother->color = Color::red;
                if(isred(father) || father==this->root)
                    father->color = Color::black;
                else {
                    NodePtr_t tmp = father->father;
                    NodePtr_t b = (father==tmp->left)?tmp->right:tmp->left;
                    black_black(tmp, b);
                }
            }
        }else {
            NodePtr_t prev = father->right;
            if(isblack(brother) && brother->left && isred(brother->left)) {
                Color tmp = father->color;
                father->color = Color::black;
                brother->color = tmp;
                rotate_right(brother, father);
                brother->left->color = Color::black;
            }
            else if(isblack(brother) && brother->right && isred(brother->right)) {
                brother->right->color = Color::black;
                brother->color = Color::red;
                auto p = rotate_left(brother, brother->right);
                Color tmp = father->color;
                father->color = Color::black;
                p->color = tmp;
                rotate_right(p, father);
                p->left->color = Color::black;
            }
            else {
                brother->color = Color::red;
                if(isred(father) || father==this->root)
                    father->color = Color::black;
                else {
                    NodePtr_t tmp = father->father;
                    NodePtr_t b = (father==tmp->left)?tmp->right:tmp->left;
                    black_black(tmp, b);
                }
            }
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x88(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x55e2
movq -0x10(%rbp), %rax
cmpl $0x0, 0x4(%rax)
je 0x5577
movq -0x88(%rbp), %rcx
movq -0x10(%rbp), %rax
cmpq (%rcx), %rax
jne 0x5587
movq -0x10(%rbp), %rax
movl $0x1, 0x4(%rax)
jmp 0x5949
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq -0x20(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jne 0x55b2
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x90(%rbp)
jmp 0x55c1
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x90(%rbp)
movq -0x88(%rbp), %rdi
movq -0x90(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x5530
jmp 0x55e2
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x18(%rcx), %rax
jne 0x579a
movq -0x18(%rbp), %rax
cmpl $0x1, 0x4(%rax)
jne 0x565e
movq -0x18(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x565e
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
cmpl $0x0, 0x4(%rax)
jne 0x565e
movq -0x88(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movl $0x1, 0x4(%rax)
movl -0x2c(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x3780
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movl $0x1, 0x4(%rax)
jmp 0x5795
movq -0x18(%rbp), %rax
cmpl $0x1, 0x4(%rax)
jne 0x5706
movq -0x18(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x5706
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
cmpl $0x0, 0x4(%rax)
jne 0x5706
movq -0x88(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movl $0x1, 0x4(%rax)
movq -0x18(%rbp), %rax
movl $0x0, 0x4(%rax)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x18(%rbp), %rdx
callq 0x36d0
movq -0x88(%rbp), %rdi
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x3c(%rbp)
movq -0x10(%rbp), %rax
movl $0x1, 0x4(%rax)
movl -0x3c(%rbp), %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x10(%rbp), %rsi
movq -0x38(%rbp), %rdx
callq 0x3780
movq -0x38(%rbp), %rax
movq 0x18(%rax), %rax
movl $0x1, 0x4(%rax)
jmp 0x5793
movq -0x18(%rbp), %rax
movl $0x0, 0x4(%rax)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x4(%rax)
je 0x572b
movq -0x88(%rbp), %rcx
movq -0x10(%rbp), %rax
cmpq (%rcx), %rax
jne 0x5738
movq -0x10(%rbp), %rax
movl $0x1, 0x4(%rax)
jmp 0x5791
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rax
movq -0x48(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jne 0x5763
movq -0x48(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x98(%rbp)
jmp 0x5772
movq -0x48(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x98(%rbp)
movq -0x88(%rbp), %rdi
movq -0x98(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rsi
movq -0x50(%rbp), %rdx
callq 0x5530
jmp 0x5793
jmp 0x5795
jmp 0x5949
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x1, 0x4(%rax)
jne 0x5810
movq -0x18(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x5810
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
cmpl $0x0, 0x4(%rax)
jne 0x5810
movq -0x88(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x5c(%rbp)
movq -0x10(%rbp), %rax
movl $0x1, 0x4(%rax)
movl -0x5c(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rdx
callq 0x36d0
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movl $0x1, 0x4(%rax)
jmp 0x5947
movq -0x18(%rbp), %rax
cmpl $0x1, 0x4(%rax)
jne 0x58b8
movq -0x18(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x58b8
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
cmpl $0x0, 0x4(%rax)
jne 0x58b8
movq -0x88(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movl $0x1, 0x4(%rax)
movq -0x18(%rbp), %rax
movl $0x0, 0x4(%rax)
movq -0x18(%rbp), %rsi
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rdx
callq 0x3780
movq -0x88(%rbp), %rdi
movq %rax, -0x68(%rbp)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x6c(%rbp)
movq -0x10(%rbp), %rax
movl $0x1, 0x4(%rax)
movl -0x6c(%rbp), %ecx
movq -0x68(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x68(%rbp), %rsi
movq -0x10(%rbp), %rdx
callq 0x36d0
movq -0x68(%rbp), %rax
movq 0x10(%rax), %rax
movl $0x1, 0x4(%rax)
jmp 0x5945
movq -0x18(%rbp), %rax
movl $0x0, 0x4(%rax)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x4(%rax)
je 0x58dd
movq -0x88(%rbp), %rcx
movq -0x10(%rbp), %rax
cmpq (%rcx), %rax
jne 0x58ea
movq -0x10(%rbp), %rax
movl $0x1, 0x4(%rax)
jmp 0x5943
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x78(%rbp)
movq -0x10(%rbp), %rax
movq -0x78(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jne 0x5915
movq -0x78(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0xa0(%rbp)
jmp 0x5924
movq -0x78(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0xa0(%rbp)
movq -0x88(%rbp), %rdi
movq -0xa0(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x78(%rbp), %rsi
movq -0x80(%rbp), %rdx
callq 0x5530
jmp 0x5945
jmp 0x5947
jmp 0x5949
addq $0xa0, %rsp
popq %rbp
retq