// File: /workspace/github_c_makefile_star2_O1/archer1357[P]Offline-Raytracer/redblack.c
// Function: rblookup
RB_STATIC const RB_ENTRY(data_t) * 
RB_ENTRY(lookup)(int mode, const RB_ENTRY(data_t) *key, struct RB_ENTRY(tree) *rbinfo)
{
	struct RB_ENTRY(node) *x;

	/* If we have a NULL root (empty tree) then just return NULL */
	if (rbinfo==NULL || rbinfo->rb_root==NULL)
		return(NULL);

	x=RB_ENTRY(_lookup)(mode, key, rbinfo);

	return((x==RBNULL) ? NULL : RB_GET(x, key));
}

// Assembly:
testq %rdx, %rdx
je 0x409c7a
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r14
movq 0x10(%rdx), %rcx
testq %rcx, %rcx
je 0x409d9d
movl %edi, %ebx
cmpl $0x7, %edi
je 0x409c7d
cmpl $0x8, %ebx
jne 0x409ca4
leaq 0x10e58f(%rip), %rdx    # 0x5181e8
cmpq %rdx, %rcx
je 0x409d8b
leaq 0x10e57f(%rip), %rax    # 0x5181e8
movq %rcx, %rdx
movq 0x8(%rcx), %rcx
cmpq %rax, %rcx
jne 0x409c69
jmp 0x409d8b
xorl %eax, %eax
retq
leaq 0x10e564(%rip), %rdx    # 0x5181e8
cmpq %rdx, %rcx
je 0x409d8b
leaq 0x10e554(%rip), %rax    # 0x5181e8
movq %rcx, %rdx
movq (%rcx), %rcx
cmpq %rax, %rcx
jne 0x409c94
jmp 0x409d8b
leaq 0x10e53d(%rip), %r12    # 0x5181e8
cmpq %r12, %rcx
je 0x409cf7
movq %rsi, %r15
leaq 0x10e52e(%rip), %r13    # 0x5181e8
movq %rcx, %r12
movq 0x20(%rcx), %rsi
movq 0x8(%r14), %rdx
movq %r15, %rdi
callq *(%r14)
movq %r12, %rcx
testl %eax, %eax
js 0x409cd9
je 0x409ce3
leaq 0x8(%r12), %rcx
movq (%rcx), %rcx
movb $0x1, %dil
xorl %esi, %esi
jmp 0x409ceb
movb $0x1, %sil
xorl %edi, %edi
movq %r12, %rcx
cmpq %r13, %rcx
je 0x409cfc
testb %dil, %dil
jne 0x409cba
jmp 0x409cfc
movb $0x1, %dil
xorl %esi, %esi
cmpl $0x3, %ebx
setb %dl
testb %sil, %dl
je 0x409d0c
movq %rcx, %rdx
jmp 0x409d8b
testb %sil, %sil
jne 0x409d26
leaq 0x10e4d0(%rip), %rdx    # 0x5181e8
leal -0x5(%rbx), %r8d
cmpl $0x2, %r8d
jb 0x409d8b
testl %ebx, %ebx
je 0x409d8b
cmpl $0x1, %ebx
je 0x409d3a
cmpl $0x4, %ebx
setne %dl
xorb $0x1, %dil
orb %dil, %dl
jne 0x409d74
testl %eax, %eax
jle 0x409d88
movq 0x8(%r12), %rcx
leaq 0x10e49e(%rip), %rax    # 0x5181e8
cmpq %rax, %rcx
je 0x409d65
movq %rcx, %rdx
movq (%rcx), %rcx
cmpq %rax, %rcx
jne 0x409d4f
jmp 0x409d8b
cmpq 0x8(%rdx), %r12
movq %rdx, %r12
jne 0x409d8b
movq 0x10(%r12), %rdx
cmpq %rax, %rdx
jne 0x409d5c
movq %rax, %rdx
jmp 0x409d8b
cmpl $0x2, %ebx
je 0x409d84
cmpl $0x3, %ebx
setne %dl
orb %dil, %dl
jne 0x409ddb
testl %eax, %eax
js 0x409da9
movq %r12, %rdx
leaq 0x10e456(%rip), %rax    # 0x5181e8
cmpq %rax, %rdx
je 0x409d9d
movq 0x20(%rdx), %rax
jmp 0x409d9f
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq (%r12), %rcx
leaq 0x10e434(%rip), %rax    # 0x5181e8
cmpq %rax, %rcx
je 0x409dcf
movq %rcx, %rdx
movq 0x8(%rcx), %rcx
cmpq %rax, %rcx
jne 0x409db9
jmp 0x409d8b
cmpq (%rdx), %r12
movq %rdx, %r12
jne 0x409d8b
movq 0x10(%r12), %rdx
cmpq %rax, %rdx
jne 0x409dc7
jmp 0x409d6f
cmpl $0x4, %ebx
setne %al
cmpl $0x5, %ebx
setne %dl
xorb $0x1, %sil
orb %sil, %al
testb %al, %dl
jne 0x409e2d
movq 0x8(%rcx), %rsi
leaq 0x10e3eb(%rip), %rax    # 0x5181e8
cmpq %rax, %rsi
je 0x409e1f
movq %rsi, %rdx
movq (%rsi), %rsi
cmpq %rax, %rsi
jne 0x409e02
jmp 0x409d8b
cmpq 0x8(%rdx), %rcx
movq %rdx, %rcx
jne 0x409d8b
movq 0x10(%rcx), %rdx
cmpq %rax, %rdx
jne 0x409e12
jmp 0x409d6f
cmpl $0x3, %ebx
setne %al
cmpl $0x6, %ebx
setne %dl
orb %sil, %al
testb %al, %dl
jne 0x409e7a
movq (%rcx), %rsi
leaq 0x10e39e(%rip), %rax    # 0x5181e8
cmpq %rax, %rsi
je 0x409e6c
movq %rsi, %rdx
movq 0x8(%rsi), %rsi
cmpq %rax, %rsi
jne 0x409e4f
jmp 0x409d8b
cmpq (%rdx), %rcx
movq %rdx, %rcx
jne 0x409d8b
movq 0x10(%rcx), %rdx
cmpq %rax, %rdx
jne 0x409e60
jmp 0x409d6f
leaq 0x10e367(%rip), %rdx    # 0x5181e8
jmp 0x409d8b