// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
testq %r15, %r15
jne 0x351a
cmpl $0x0, 0x4(%rbx)
je 0x366e
cmpq %rbx, (%r14)
je 0x366e
movq 0x8(%rbx), %rsi
movq 0x10(%rsi), %rdx
cmpq %rbx, %rdx
jne 0x3512
movq 0x18(%rsi), %rdx
movq %r14, %rdi
callq 0x34d2
movl 0x4(%r15), %eax
cmpq %r15, 0x18(%rbx)
je 0x354c
cmpl $0x1, %eax
jne 0x3577
movq 0x10(%r15), %rax
testq %rax, %rax
je 0x3538
cmpl $0x0, 0x4(%rax)
je 0x35af
movq 0x18(%r15), %rdx
testq %rdx, %rdx
je 0x3577
cmpl $0x0, 0x4(%rdx)
jne 0x3577
jmp 0x35d4
cmpl $0x1, %eax
jne 0x3577
movq 0x18(%r15), %rax
testq %rax, %rax
je 0x3564
cmpl $0x0, 0x4(%rax)
je 0x360f
movq 0x10(%r15), %rsi
testq %rsi, %rsi
je 0x3577
cmpl $0x0, 0x4(%rsi)
je 0x3631
andl $0x0, 0x4(%r15)
cmpl $0x0, 0x4(%rbx)
je 0x366e
cmpq %rbx, (%r14)
je 0x366e
movq 0x8(%rbx), %rax
movq 0x10(%rax), %r15
cmpq %rbx, %r15
movq %rax, %rbx
jne 0x34e9
movq 0x18(%rax), %r15
movq %rax, %rbx
jmp 0x34e9
leaq 0x10(%r15), %r12
movl 0x4(%rbx), %eax
movl $0x1, 0x4(%rbx)
movl %eax, 0x4(%r15)
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x2bae
jmp 0x366a
pushq $0x1
popq %r13
movl %r13d, 0x4(%rdx)
andl $0x0, 0x4(%r15)
movq %r14, %rdi
movq %r15, %rsi
callq 0x2bec
movq %rax, %r12
movl 0x4(%rbx), %eax
movl %r13d, 0x4(%rbx)
movl %eax, 0x4(%r12)
movq %r14, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x2bae
addq $0x10, %r12
jmp 0x366a
leaq 0x18(%r15), %r12
movl 0x4(%rbx), %eax
movl $0x1, 0x4(%rbx)
movl %eax, 0x4(%r15)
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x2bec
jmp 0x366a
pushq $0x1
popq %r13
movl %r13d, 0x4(%rsi)
andl $0x0, 0x4(%r15)
movq %r14, %rdi
movq %r15, %rdx
callq 0x2bae
movq %rax, %r12
movl 0x4(%rbx), %eax
movl %r13d, 0x4(%rbx)
movl %eax, 0x4(%r12)
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x2bec
addq $0x18, %r12
movq (%r12), %rbx
movl $0x1, 0x4(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq