// File: /workspace/github_c_makefile_star2_O3/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 0x40a0a4
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq 0x10(%rdx), %rax
testq %rax, %rax
je 0x40a217
movl %edi, %ebx
cmpl $0x7, %edi
je 0x40a0a7
cmpl $0x8, %ebx
jne 0x40a0cc
leaq 0x10f15b(%rip), %rcx    # 0x5191e8
cmpq %rcx, %rax
je 0x40a217
movq %rax, %r12
movq 0x8(%rax), %rax
cmpq %rcx, %rax
jne 0x40a096
jmp 0x40a0c2
xorl %eax, %eax
retq
leaq 0x10f13a(%rip), %rcx    # 0x5191e8
cmpq %rcx, %rax
je 0x40a217
movq %rax, %r12
movq (%rax), %rax
cmpq %rcx, %rax
jne 0x40a0b7
movq 0x20(%r12), %rax
jmp 0x40a219
leaq 0x10f115(%rip), %r13    # 0x5191e8
cmpq %r13, %rax
je 0x40a10d
movq %rsi, %r15
leaq 0x10f106(%rip), %rbp    # 0x5191e8
movq %rax, %r12
movq 0x20(%rax), %rsi
movq 0x8(%r14), %rdx
movq %r15, %rdi
callq *(%r14)
movl %eax, %ecx
movq %r12, %rax
testl %ecx, %ecx
js 0x40a103
je 0x40a15c
leaq 0x8(%r12), %rax
movq (%rax), %rax
cmpq %rbp, %rax
jne 0x40a0e2
jmp 0x40a110
movq %r13, %r12
xorl %eax, %eax
cmpl $0x6, %ebx
ja 0x40a1b3
movl $0x61, %edx
btl %ebx, %edx
jb 0x40a219
movl $0xc, %eax
btl %ebx, %eax
jae 0x40a178
testl %ecx, %ecx
jns 0x40a1a1
movq (%r12), %rax
leaq 0x10f0a6(%rip), %rcx    # 0x5191e8
cmpq %rcx, %rax
je 0x40a25f
movq %rax, %r12
movq 0x8(%rax), %rax
cmpq %rcx, %rax
jne 0x40a14b
jmp 0x40a0c2
cmpl $0x3, %ebx
jb 0x40a0c2
cmpl $0x4, %ebx
sete %dl
cmpl $0x3, %ebx
sete %al
movb $0x1, %cl
movq %r12, %r13
jmp 0x40a1b7
testl %ecx, %ecx
jle 0x40a1a1
movq 0x8(%r12), %rax
leaq 0x10f060(%rip), %rcx    # 0x5191e8
cmpq %rcx, %rax
je 0x40a228
movq %rax, %r12
movq (%rax), %rax
cmpq %rcx, %rax
jne 0x40a191
jmp 0x40a0c2
leaq 0x10f040(%rip), %rax    # 0x5191e8
cmpq %rax, %r12
jne 0x40a0c2
jmp 0x40a217
xorl %ecx, %ecx
xorl %edx, %edx
cmpl $0x5, %ebx
setne %sil
andb %cl, %dl
xorb $0x1, %dl
testb %dl, %sil
jne 0x40a1e8
movq 0x8(%r13), %rax
leaq 0x10f015(%rip), %rcx    # 0x5191e8
cmpq %rcx, %rax
je 0x40a245
movq %rax, %r12
movq (%rax), %rax
cmpq %rcx, %rax
jne 0x40a1d8
jmp 0x40a0c2
cmpl $0x6, %ebx
setne %dl
andb %cl, %al
xorb $0x1, %al
testb %al, %dl
jne 0x40a217
movq (%r13), %rax
leaq 0x10efe7(%rip), %rcx    # 0x5191e8
cmpq %rcx, %rax
je 0x40a27b
movq %rax, %r12
movq 0x8(%rax), %rax
cmpq %rcx, %rax
jne 0x40a206
jmp 0x40a0c2
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
movq %r12, %rdx
movq 0x10(%rdx), %r12
cmpq %rcx, %r12
je 0x40a219
cmpq 0x8(%r12), %rdx
movq %r12, %rdx
je 0x40a22d
jmp 0x40a0c2
xorl %eax, %eax
movq 0x10(%r13), %r12
cmpq %rcx, %r12
je 0x40a219
cmpq 0x8(%r12), %r13
movq %r12, %r13
je 0x40a247
jmp 0x40a0c2
xorl %eax, %eax
movq %r12, %rdx
movq 0x10(%rdx), %r12
cmpq %rcx, %r12
je 0x40a219
cmpq (%r12), %rdx
movq %r12, %rdx
je 0x40a264
jmp 0x40a0c2
xorl %eax, %eax
movq 0x10(%r13), %r12
cmpq %rcx, %r12
je 0x40a219
cmpq (%r12), %r13
movq %r12, %r13
je 0x40a27d
jmp 0x40a0c2