Function at 0x180126770
Capabilities:
Reference sql statements

Disassembly:
mov qword [rsp + 8], rbx
mov dword [rsp + 0x18], r8d
mov qword [rsp + 0x10], rdx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x30
mov rbx, qword [rsp + 0x98]
xorps xmm0, xmm0
mov rax, qword [rsp + 0x90]
mov r15d, r9d
and r15d, 8
xor r13d, r13d
mov ebp, r9d
mov rdi, rcx
movups xmmword [rbx + 8], xmm0
mov r12d, 1
movups xmmword [rbx + 0x18], xmm0
movups xmmword [rbx + 0x28], xmm0
movups xmmword [rbx + 0x38], xmm0
movups xmmword [rbx + 0x48], xmm0
movups xmmword [rbx + 0x58], xmm0
movups xmmword [rbx + 0x68], xmm0
movups xmmword [rbx + 0x78], xmm0
mov qword [rbx], rax
mov rsi, qword [rcx + 0x68]
test rsi, rsi
jne 0x180126815
mov rdx, qword [rcx]
lea rcx, str.SELECT_pgno_FROM__q._q_idx_WHERE_segid__AND_term___ORDER_BY_term_DESC_LIMIT_1
mov r8, qword [rdx + 0x10]
mov rdx, qword [rdx + 8]
call fcn.18002d2d0
mov r8, rax
lea rdx, [rdi + 0x68]
mov rcx, rdi
call fcn.180123230
mov rax, qword [rsp + 0x90]
mov rsi, qword [rdi + 0x68]
cmp dword [rdi + 0x3c], r13d
lea r14, [rdi + 0x3c]
jne 0x1801269ab
movsxd r8, dword [rax]
mov edx, r12d
mov rcx, rsi
call fcn.18005bf00
movsxd r9, dword [rsp + 0x80]
mov edx, 2
mov r8, qword [rsp + 0x78]
mov rcx, rsi
mov byte [rsp + 0x28], r13b
mov qword [rsp + 0x20], r13
call fcn.18005bce0
mov rcx, rsi
call fcn.18005aa50
cmp eax, 0x64
jne 0x180126879
xor edx, edx
mov rcx, rsi
call fcn.18005b540
movsxd r13, eax
mov r12, r13
sar r12, 1
and r13d, 1
mov rcx, rsi
call fcn.180059b60
mov edx, 1
mov dword [r14], eax
mov rcx, rsi
call fcn.18005bb20
test eax, eax
jne 0x1801268a7
mov rax, qword [rsi]
mov rcx, qword [rax + 0x18]
test rcx, rcx
je 0x1801268a7
call qword [0x180191e00]
mov rax, qword [rsp + 0x90]
mov esi, 0
mov rdx, rbx
mov rcx, rdi
mov eax, dword [rax + 4]
cmp r12d, eax
cmovge eax, r12d
cmovge esi, r13d
dec eax
mov dword [rbx + 0xc], eax
call fcn.180124e00
cmp qword [rbx + 0x10], 0
je 0x1801268f7
mov eax, dword [rsp + 0x80]
mov r8, rbx
mov r9, qword [rsp + 0x78]
mov edx, r15d
mov rcx, rdi
mov dword [rsp + 0x20], eax
call fcn.180126180
cmp dword [r14], 0
jne 0x180126959
test r15d, r15d
jne 0x180126959
mov edx, dword [rbx + 8]
mov rax, qword [rbx + 0x10]
or edx, 1
mov dword [rbx + 8], edx
test rax, rax
je 0x180126959
and ebp, 2
je 0x18012691f
or edx, 2
mov dword [rbx + 8], edx
test esi, esi
je 0x18012694a
mov r9d, dword [rbx + 0x40]
and edx, 2
cmp r9d, dword [rbx + 0xc]
jne 0x180126938
mov eax, dword [rax + 0xc]
cmp dword [rbx + 0x4c], eax
jl 0x18012694a
mov rax, qword [rbx]
mov rcx, rdi
mov r8d, dword [rax]
call fcn.180124c20
mov qword [rbx + 0x60], rax
test ebp, ebp
je 0x180126959
mov rdx, rbx
mov rcx, rdi
call fcn.180125f00
test byte [rbx + 8], 2
je 0x180126968
lea rcx, [0x1801256b0]
jmp 0x180126981
mov rax, qword [rdi]
lea rcx, [0x180125a10]
lea rdx, [0x180125740]
cmp dword [rax + 0x5c], 1
cmove rcx, rdx
mov qword [rbx + 0x38], rcx
mov rax, qword [rbx]
movsxd rdi, dword [rax + 0x20]
test edi, edi
jle 0x1801269ab
mov rdx, rdi
mov rcx, r14
shl rdx, 4
call fcn.18011b850
test rax, rax
je 0x1801269ab
mov qword [rbx + 0x28], rax
mov dword [rbx + 0x30], edi
mov rbx, qword [rsp + 0x70]
add rsp, 0x30
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret