// File: /workspace/github_c_makefile_star2_O0/CarlosLunaMota[P]BinaryTrees/BinaryTrees.c
// Function: print_rb_subtree
static void print_rb_subtree(const rb_node *node, const int is_right,
                             char *indent, void (* print_node) (const void *)) {

    // Allocate memory:
    char *new_indent = (char *) malloc((6+strlen(indent)*sizeof(char)));
    assert(new_indent != NULL);

    // Print right subtree recursively:
    if (node->right != NULL) {
        if (is_right == YES) { sprintf(new_indent, "%s%s", indent, "      "); }
        else {
            if (node->color == RED) {
                sprintf(new_indent, "%s%s", indent, "||    ");
            } else {
                sprintf(new_indent, "%s%s", indent, "|     ");
            }
        }
        print_rb_subtree(node->right, YES, new_indent, print_node);
    }

    // Print current node:
    if (node->color == RED) {
        if (is_right) { fprintf(stdout, "%s/====",indent); }
        else          { fprintf(stdout, "%s\\====",indent); }
    } else {
        if (is_right) { fprintf(stdout, "%s,----",indent); }
        else          { fprintf(stdout, "%s`----",indent); }
    }
    if (print_node == NULL)  {
        if (node->color == RED) { fprintf(stdout, "(#)"); }
        else                    { fprintf(stdout, "( )"); }
    } else { print_node(node->data); }
    fprintf(stdout, "\n");

    // Print left subtree recursively:
    if (node->left != NULL) {
        if (is_right == YES) {
            if (node->color == RED) {
                sprintf(new_indent, "%s%s", indent, "||    ");
            } else {
                sprintf(new_indent, "%s%s", indent, "|     ");
            }
        } else { sprintf(new_indent, "%s%s", indent, "      "); }
        print_rb_subtree(node->left, NO, new_indent, print_node);
    }

    // Free memory:
    free(new_indent);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x1040
movq %rax, %rdi
shlq $0x0, %rdi
addq $0x6, %rdi
callq 0x10a0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x13fdd
jmp 0x13ffc
leaq 0x2f06(%rip), %rdi      # 0x16eea
leaq 0x2211(%rip), %rsi      # 0x161fc
movl $0x10f5, %edx           # imm = 0x10F5
leaq 0x3000(%rip), %rcx      # 0x16ff7
callq 0x1060
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x14095
cmpl $0x1, -0xc(%rbp)
jne 0x14030
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rdx
leaq 0x2f2f(%rip), %rsi      # 0x16f4f
leaq 0x2f2d(%rip), %rcx      # 0x16f54
movb $0x0, %al
callq 0x10c0
jmp 0x1407b
movq -0x8(%rbp), %rax
movsbl 0x18(%rax), %eax
cmpl $0x1, %eax
jne 0x1405c
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rdx
leaq 0x2f03(%rip), %rsi      # 0x16f4f
leaq 0x2ff6(%rip), %rcx      # 0x17049
movb $0x0, %al
callq 0x10c0
jmp 0x14079
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rdx
leaq 0x2ee4(%rip), %rsi      # 0x16f4f
leaq 0x2ee9(%rip), %rcx      # 0x16f5b
movb $0x0, %al
callq 0x10c0
jmp 0x1407b
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x28(%rbp), %rdx
movq -0x20(%rbp), %rcx
movl $0x1, %esi
callq 0x13fa0
movq -0x8(%rbp), %rax
movsbl 0x18(%rax), %eax
cmpl $0x1, %eax
jne 0x140e4
cmpl $0x0, -0xc(%rbp)
je 0x140c6
movq 0x5f29(%rip), %rax      # 0x19fd8
movq (%rax), %rdi
movq -0x18(%rbp), %rdx
leaq 0x2f93(%rip), %rsi      # 0x17050
movb $0x0, %al
callq 0x1080
jmp 0x140e2
movq 0x5f0b(%rip), %rax      # 0x19fd8
movq (%rax), %rdi
movq -0x18(%rbp), %rdx
leaq 0x2f7d(%rip), %rsi      # 0x17058
movb $0x0, %al
callq 0x1080
jmp 0x14126
cmpl $0x0, -0xc(%rbp)
je 0x14108
movq 0x5ee7(%rip), %rax      # 0x19fd8
movq (%rax), %rdi
movq -0x18(%rbp), %rdx
leaq 0x2e63(%rip), %rsi      # 0x16f62
movb $0x0, %al
callq 0x1080
jmp 0x14124
movq 0x5ec9(%rip), %rax      # 0x19fd8
movq (%rax), %rdi
movq -0x18(%rbp), %rdx
leaq 0x2e4d(%rip), %rsi      # 0x16f6a
movb $0x0, %al
callq 0x1080
jmp 0x14126
cmpq $0x0, -0x20(%rbp)
jne 0x1416e
movq -0x8(%rbp), %rax
movsbl 0x18(%rax), %eax
cmpl $0x1, %eax
jne 0x14154
movq 0x5e97(%rip), %rax      # 0x19fd8
movq (%rax), %rdi
leaq 0x257b(%rip), %rsi      # 0x166c6
movb $0x0, %al
callq 0x1080
jmp 0x1416c
movq 0x5e7d(%rip), %rax      # 0x19fd8
movq (%rax), %rdi
leaq 0x298b(%rip), %rsi      # 0x16af0
movb $0x0, %al
callq 0x1080
jmp 0x1417b
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rcx
movq (%rcx), %rdi
callq *%rax
movq 0x5e56(%rip), %rax      # 0x19fd8
movq (%rax), %rdi
leaq 0x1f45(%rip), %rsi      # 0x160d1
movb $0x0, %al
callq 0x1080
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x14227
cmpl $0x1, -0xc(%rbp)
jne 0x141f3
movq -0x8(%rbp), %rax
movsbl 0x18(%rax), %eax
cmpl $0x1, %eax
jne 0x141d4
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rdx
leaq 0x2d8b(%rip), %rsi      # 0x16f4f
leaq 0x2e7e(%rip), %rcx      # 0x17049
movb $0x0, %al
callq 0x10c0
jmp 0x141f1
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rdx
leaq 0x2d6c(%rip), %rsi      # 0x16f4f
leaq 0x2d71(%rip), %rcx      # 0x16f5b
movb $0x0, %al
callq 0x10c0
jmp 0x14210
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rdx
leaq 0x2d4d(%rip), %rsi      # 0x16f4f
leaq 0x2d4b(%rip), %rcx      # 0x16f54
movb $0x0, %al
callq 0x10c0
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x28(%rbp), %rdx
movq -0x20(%rbp), %rcx
xorl %esi, %esi
callq 0x13fa0
movq -0x28(%rbp), %rdi
callq 0x10e0
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)