Function at 0x1401d55b2
Capabilities:
Reference sql statements

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0xd0
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
mov rax, qword [rbp + 0x10]
mov rax, qword [rax]
mov qword [rbp - 0x20], rax
mov rax, qword [rbp - 0x20]
mov eax, dword [rax + 0x80]
cmp eax, 5
sete al
movzx eax, al
mov dword [rbp - 0x24], eax
mov qword [rbp - 0x90], 0
mov rax, qword [rbp + 0x18]
mov eax, dword [rax + 4]
sub eax, 1
mov dword [rbp - 4], eax
mov rax, qword [rbp + 0x18]
mov eax, dword [rax + 8]
mov dword [rbp - 8], eax
mov rax, qword [rbp + 0x18]
mov eax, dword [rax + 4]
test eax, eax
je 0x1401d5af5
mov rax, qword [rbp + 0x18]
mov ecx, dword [rax]
mov rax, qword [rbp - 0x20]
mov rdx, qword [rax + 0x10]
mov rax, qword [rbp - 0x20]
mov rax, qword [rax + 8]
mov r9d, ecx
mov r8, rdx
mov rdx, rax
lea rax, str.SELECT_segid__term___pgno__1____pgno1__FROM__Q._q_idx_WHERE_segid_d_ORDER_BY_1__2
mov rcx, rax
call sym.sqlite3_mprintf
mov rcx, rax
lea rdx, [rbp - 0x90]
mov rax, qword [rbp + 0x10]
mov r8, rcx
mov rcx, rax
call sym.fts5IndexPrepareStmt
jmp 0x1401d5a9a
mov rax, qword [rbp - 0x90]
mov edx, 1
mov rcx, rax
call sym.sqlite3_column_blob
mov qword [rbp - 0x30], rax
mov rax, qword [rbp - 0x90]
mov edx, 1
mov rcx, rax
call sym.sqlite3_column_bytes
mov dword [rbp - 0x34], eax
mov rax, qword [rbp - 0x90]
mov edx, 2
mov rcx, rax
call sym.sqlite3_column_int
mov dword [rbp - 0x38], eax
mov rax, qword [rbp - 0x90]
mov edx, 3
mov rcx, rax
call sym.sqlite3_column_int
mov dword [rbp - 0x3c], eax
mov rax, qword [rbp + 0x18]
mov eax, dword [rax + 4]
cmp dword [rbp - 0x38], eax
jge 0x1401d56d1
jmp 0x1401d5a9a
mov rax, qword [rbp + 0x18]
mov eax, dword [rax]
cdqe
shl rax, 0x25
mov rdx, rax
mov eax, dword [rbp - 0x38]
cdqe
add rax, rdx
mov qword [rbp - 0x48], rax
mov rdx, qword [rbp - 0x48]
mov rax, qword [rbp + 0x10]
mov rcx, rax
call sym.fts5LeafRead
mov qword [rbp - 0x50], rax
cmp qword [rbp - 0x50], 0
je 0x1401d5abf
mov rax, qword [rbp - 0x50]
mov edx, dword [rax + 8]
mov rax, qword [rbp - 0x50]
mov eax, dword [rax + 0xc]
cmp edx, eax
jg 0x1401d5764
cmp dword [rbp - 0x34], 0
jne 0x1401d5754
mov rax, qword [rbp - 0x20]
mov eax, dword [rax + 0x80]
cmp eax, 5
jne 0x1401d5754
mov rax, qword [rbp - 0x50]
mov edx, dword [rax + 8]
mov rax, qword [rbp - 0x50]
mov eax, dword [rax + 0xc]
cmp edx, eax
jne 0x1401d5754
mov rax, qword [rbp - 0x50]
mov eax, dword [rax + 8]
cmp eax, 4
je 0x1401d584a
mov rax, qword [rbp + 0x10]
mov dword [rax + 0x3c], 0x10b
jmp 0x1401d584a
mov rax, qword [rbp - 0x50]
mov rcx, rax
call sym.fts5LeafFirstTermOff
mov dword [rbp - 0x54], eax
mov rax, qword [rbp - 0x50]
mov rax, qword [rax]
mov rcx, rax
call sym.fts5GetU16
movzx eax, ax
mov dword [rbp - 0x58], eax
mov eax, dword [rbp - 0x58]
cmp eax, dword [rbp - 0x54]
jge 0x1401d579c
mov rax, qword [rbp - 0x50]
mov eax, dword [rax + 0xc]
cmp dword [rbp - 0x54], eax
jl 0x1401d57ac
mov rax, qword [rbp + 0x10]
mov dword [rax + 0x3c], 0x10b
jmp 0x1401d583a
mov rax, qword [rbp - 0x50]
mov rdx, qword [rax]
mov eax, dword [rbp - 0x54]
cdqe
lea rcx, [rdx + rax]
lea rax, [rbp - 0x94]
mov rdx, rax
call sym.sqlite3Fts5GetVarint32
add dword [rbp - 0x54], eax
mov edx, dword [rbp - 0x94]
mov eax, dword [rbp - 0x34]
cmp edx, eax
cmovle eax, edx
test eax, eax
jle 0x1401d580f
mov edx, dword [rbp - 0x94]
mov eax, dword [rbp - 0x34]
cmp edx, eax
cmovle eax, edx
movsxd r8, eax
mov rax, qword [rbp - 0x50]
mov rdx, qword [rax]
mov eax, dword [rbp - 0x54]
cdqe
lea rcx, [rdx + rax]
mov rax, qword [rbp - 0x30]
mov rdx, rax
call sym.memcmp
jmp 0x1401d5814
mov eax, 0
mov dword [rbp - 0xc], eax
cmp dword [rbp - 0xc], 0
jne 0x1401d5829
mov eax, dword [rbp - 0x94]
sub eax, dword [rbp - 0x34]
mov dword [rbp - 0xc], eax
cmp dword [rbp - 0xc], 0
jns 0x1401d583a
mov rax, qword [rbp + 0x10]
mov dword [rax + 0x3c], 0x10b
mov rdx, qword [rbp - 0x50]
mov rax, qword [rbp + 0x10]
mov rcx, rax
call sym.fts5IntegrityCheckPgidx
mov rax, qword [rbp - 0x50]
mov rcx, rax
call sym.fts5DataRelease
mov rax, qword [rbp + 0x10]
mov eax, dword [rax + 0x3c]
test eax, eax
jne 0x1401d5ac2
mov eax, dword [rbp - 0x38]
lea ecx, [rax - 1]
mov eax, dword [rbp - 8]
lea r9d, [rax + 1]
mov eax, dword [rbp - 4]
lea r8d, [rax + 1]
mov rdx, qword [rbp + 0x18]
mov rax, qword [rbp + 0x10]
mov dword [rsp + 0x20], ecx
mov rcx, rax
call sym.fts5IndexIntegrityCheckEmpty
mov rax, qword [rbp + 0x10]
mov eax, dword [rax + 0x3c]
test eax, eax
jne 0x1401d5ac5
cmp dword [rbp - 0x3c], 0
je 0x1401d5a8a
mov qword [rbp - 0x60], 0
mov eax, dword [rbp - 0x38]
mov dword [rbp - 0x10], eax
mov rax, qword [rbp + 0x18]
mov eax, dword [rax]
mov dword [rbp - 0x64], eax
mov dword [rbp - 0x14], 0
mov ecx, dword [rbp - 0x38]
mov edx, dword [rbp - 0x64]
mov rax, qword [rbp + 0x10]
mov r9d, ecx
mov r8d, edx
mov edx, 0
mov rcx, rax
call sym.fts5DlidxIterInit
mov qword [rbp - 0x60], rax
jmp 0x1401d5a5e
mov eax, dword [rbp - 0x10]
add eax, 1
mov dword [rbp - 0x14], eax
jmp 0x1401d5957
mov eax, dword [rbp - 0x64]
cdqe
shl rax, 0x25
mov rdx, rax
mov eax, dword [rbp - 0x14]
cdqe
add rax, rdx
mov qword [rbp - 0x70], rax
mov rdx, qword [rbp - 0x70]
mov rax, qword [rbp + 0x10]
mov rcx, rax
call sym.fts5DataRead
mov qword [rbp - 0x50], rax
cmp qword [rbp - 0x50], 0
je 0x1401d5953
mov rax, qword [rbp - 0x50]
mov rax, qword [rax]
mov rcx, rax
call sym.fts5GetU16
test ax, ax
je 0x1401d5947
mov rax, qword [rbp + 0x10]
mov dword [rax + 0x3c], 0x10b
mov rax, qword [rbp - 0x50]
mov rcx, rax
call sym.fts5DataRelease
add dword [rbp - 0x14], 1
mov rax, qword [rbp - 0x60]
mov rcx, rax
call sym.fts5DlidxIterPgno
cmp dword [rbp - 0x14], eax
jl 0x1401d58f5
mov rax, qword [rbp - 0x60]
mov rcx, rax
call sym.fts5DlidxIterPgno
mov dword [rbp - 0x10], eax
mov eax, dword [rbp - 0x64]
cdqe
shl rax, 0x25
mov rdx, rax
mov eax, dword [rbp - 0x10]
cdqe
add rax, rdx
mov qword [rbp - 0x70], rax
mov rdx, qword [rbp - 0x70]
mov rax, qword [rbp + 0x10]
mov rcx, rax
call sym.fts5DataRead
mov qword [rbp - 0x50], rax
cmp qword [rbp - 0x50], 0
je 0x1401d5a4e
mov rax, qword [rbp - 0x50]
mov rax, qword [rax]
mov rcx, rax
call sym.fts5GetU16
movzx eax, ax
mov dword [rbp - 0x74], eax
mov rax, qword [rbp - 0x50]
mov eax, dword [rax + 0xc]
cmp dword [rbp - 0x74], eax
jl 0x1401d59dc
mov rax, qword [rbp + 0x10]
mov dword [rax + 0x3c], 0x10b
jmp 0x1401d5a42
cmp dword [rbp - 0x24], 0
je 0x1401d59e8
cmp dword [rbp - 0x74], 0
jle 0x1401d5a42
mov rax, qword [rbp - 0x60]
mov rcx, rax
call sym.fts5DlidxIterRowid
mov qword [rbp - 0x80], rax
mov rax, qword [rbp - 0x50]
mov rdx, qword [rax]
mov eax, dword [rbp - 0x74]
cdqe
lea rcx, [rdx + rax]
lea rax, [rbp - 0xa0]
mov rdx, rax
call sym.sqlite3Fts5GetVarint
mov rax, qword [rbp - 0xa0]
cmp qword [rbp - 0x80], rax
jg 0x1401d5a37
cmp dword [rbp - 0x24], 0
jne 0x1401d5a42
mov rax, qword [rbp - 0xa0]
cmp qword [rbp - 0x80], rax
je 0x1401d5a42
mov rax, qword [rbp + 0x10]
mov dword [rax + 0x3c], 0x10b
mov rax, qword [rbp - 0x50]
mov rcx, rax
call sym.fts5DataRelease
mov rdx, qword [rbp - 0x60]
mov rax, qword [rbp + 0x10]
mov rcx, rax
call sym.fts5DlidxIterNext
mov rdx, qword [rbp - 0x60]
mov rax, qword [rbp + 0x10]
mov rcx, rax
call sym.fts5DlidxIterEof
test eax, eax
je 0x1401d58ea
mov eax, dword [rbp - 0x14]
mov dword [rbp - 8], eax
mov rax, qword [rbp - 0x60]
mov rcx, rax
call sym.fts5DlidxIterFree
jmp 0x1401d5a94
mov rax, qword [rbp + 0x18]
mov eax, dword [rax + 8]
mov dword [rbp - 8], eax
mov eax, dword [rbp - 0x38]
mov dword [rbp - 4], eax
mov rax, qword [rbp + 0x10]
mov eax, dword [rax + 0x3c]
test eax, eax
jne 0x1401d5ac6
mov rax, qword [rbp - 0x90]
mov rcx, rax
call sym.sqlite3_step
cmp eax, 0x64
je 0x1401d5663
jmp 0x1401d5ac6
nop
jmp 0x1401d5ac6
nop
jmp 0x1401d5ac6
nop
mov rax, qword [rbp - 0x90]
mov rcx, rax
call sym.sqlite3_finalize
mov dword [rbp - 0x84], eax
mov rax, qword [rbp + 0x10]
mov eax, dword [rax + 0x3c]
test eax, eax
jne 0x1401d5af6
mov rax, qword [rbp + 0x10]
mov edx, dword [rbp - 0x84]
mov dword [rax + 0x3c], edx
jmp 0x1401d5af6
nop
add rsp, 0xd0
pop rbp
ret