Function at 0x1800bdd10
Capabilities:
Reference sql statements

Disassembly:
mov r11, rsp
push rbx
push rbp
push rsi
push rdi
push r12
push r14
push r15
sub rsp, 0x180
lea rax, str.DELETE_FROM__Q._q_content_WHERE_rowid___
mov r12, rcx
lea rcx, str.SELECT__s_WHERE_rowid_
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x78], rcx
lea rax, str.SELECT_NOT_EXISTS_SELECT_docid_FROM__Q._q_content_WHERE_rowid___
mov qword [rsp + 0x48], rax
lea rax, str.DELETE_FROM__Q._q_content
lea r10, str.INSERT_INTO__Q._q_content_VALUES__s_
mov qword [rsp + 0x50], rax
lea rax, str.DELETE_FROM__Q._q_segments
mov r14, r9
mov qword [rsp + 0x58], rax
lea rax, str.DELETE_FROM__Q._q_segdir
mov r15, r8
mov qword [rsp + 0x60], rax
lea rax, str.DELETE_FROM__Q._q_docsize
mov qword [rsp + 0x68], rax
lea rax, str.DELETE_FROM__Q._q_stat
mov qword [rsp + 0x70], rax
lea rax, str.SELECT__SELECT_max_idx__FROM__Q._q_segdir_WHERE_level______1
mov qword [r11 - 0xe8], r10
mov qword [r11 - 0x138], rax
lea rax, str.REPLACE_INTO__Q._q_segments_blockid__block__VALUES______
mov qword [r11 - 0x130], rax
lea rax, str.SELECT_coalesce__SELECT_max_blockid__FROM__Q._q_segments___1__1_
mov qword [r11 - 0x128], rax
lea rax, str.REPLACE_INTO__Q._q_segdir_VALUES_____________
mov qword [r11 - 0x120], rax
lea rax, str.SELECT_idx__start_block__leaves_end_block__end_block__root_FROM__Q._q_segdir_WHERE_level____ORDER_BY_idx_ASC
mov qword [r11 - 0x118], rax
lea rax, str.SELECT_idx__start_block__leaves_end_block__end_block__root_FROM__Q._q_segdir_WHERE_level_BETWEEN___AND__ORDER_BY_level_DESC__idx_ASC
mov qword [r11 - 0x110], rax
lea rax, str.SELECT_count___FROM__Q._q_segdir_WHERE_level___
mov qword [r11 - 0x108], rax
lea rax, str.SELECT_max_level__FROM__Q._q_segdir_WHERE_level_BETWEEN___AND__
mov qword [r11 - 0x100], rax
lea rax, str.DELETE_FROM__Q._q_segdir_WHERE_level___
mov qword [r11 - 0xf8], rax
lea rax, str.DELETE_FROM__Q._q_segments_WHERE_blockid_BETWEEN___AND__
mov qword [r11 - 0xf0], rax
lea rax, str.DELETE_FROM__Q._q_docsize_WHERE_docid___
mov qword [r11 - 0xe0], rax
lea rax, str.REPLACE_INTO__Q._q_docsize_VALUES_____
mov qword [r11 - 0xd8], rax
lea rax, str.SELECT_size_FROM__Q._q_docsize_WHERE_docid_
mov qword [r11 - 0xd0], rax
lea rax, str.SELECT_value_FROM__Q._q_stat_WHERE_id_
mov qword [r11 - 0xc8], rax
lea rax, str.REPLACE_INTO__Q._q_stat_VALUES_____
mov qword [r11 - 0xc0], rax
lea rax, [0x1800ec114]
mov qword [r11 - 0xb8], rax
mov qword [r11 - 0xb0], rax
lea rax, str.DELETE_FROM__Q._q_segdir_WHERE_level_BETWEEN___AND__
mov qword [r11 - 0xa8], rax
lea rax, str.SELECT_DISTINCT_level____1024_____FROM__Q._q_segdir
mov qword [r11 - 0xa0], rax
lea rax, str.SELECT_level_FROM__Q._q_segdir_GROUP_BY_level_HAVING_count______ORDER_BY__level____1024__ASC_LIMIT_1
mov qword [r11 - 0x98], rax
lea rax, str.SELECT_2__total_1__leaves_end_block___start_block____FROM__Q._q_segdir_WHERE_level____AND_idx____
mov qword [r11 - 0x90], rax
lea rax, str.DELETE_FROM__Q._q_segdir_WHERE_level____AND_idx___
mov qword [r11 - 0x88], rax
lea rax, str.UPDATE__Q._q_segdir_SET_idx____WHERE_level__AND_idx_
mov qword [r11 - 0x80], rax
lea rax, str.SELECT_idx__start_block__leaves_end_block__end_block__root_FROM__Q._q_segdir_WHERE_level____AND_idx___
mov qword [r11 - 0x78], rax
lea rax, str.UPDATE__Q._q_segdir_SET_start_block_____root___WHERE_level____AND_idx___
mov qword [r11 - 0x70], rax
lea rax, str.SELECT_1_FROM__Q._q_segments_WHERE_blockid__AND_block_IS_NULL
mov qword [r11 - 0x68], rax
lea rax, str.SELECT_idx_FROM__Q._q_segdir_WHERE_level__ORDER_BY_1_ASC
mov qword [r11 - 0x60], rax
lea rax, str.SELECT_max__level____1024___FROM__Q._q_segdir
mov qword [r11 - 0x58], rax
lea rax, str.SELECT_level__idx__end_block_FROM__Q._q_segdir_WHERE_level_BETWEEN___AND___ORDER_BY_level_DESC__idx_ASC
mov qword [r11 - 0x50], rax
lea rax, str.UPDATE_OR_FAIL__Q._q_segdir_SET_level_1_idx__WHERE_level__AND_idx_
mov qword [r11 - 0x48], rax
lea rax, str.UPDATE_OR_FAIL__Q._q_segdir_SET_level__WHERE_level_1
xor ebx, ebx
mov qword [r11 - 0x40], rax
movsxd rax, edx
mov rbp, qword [r12 + rax*8 + 0x68]
mov edi, ebx
mov qword [rsp + 0x1d0], rax
mov qword [r11 + 8], rbp
lea esi, [rbx + 1]
test rbp, rbp
jne 0x1800be002
mov qword [r11 + 0x10], r13
cmp edx, 0x12
jne 0x1800bdf77
mov r9, qword [r12 + 0x1b0]
mov r8, qword [r12 + 0x28]
mov rdx, qword [r12 + 0x20]
mov rcx, r10
call sym.SQLite.Interop.dll_sqlite3_mprintf
mov r13, rax
jmp 0x1800bdfa5
cmp edx, 7
jne 0x1800bdf8e
mov rdx, qword [r12 + 0x1a8]
call sym.SQLite.Interop.dll_sqlite3_mprintf
mov r13, rax
jmp 0x1800bdfa5
mov r8, qword [r12 + 0x28]
mov rdx, qword [r12 + 0x20]
mov rcx, qword [rsp + rax*8 + 0x40]
call sym.SQLite.Interop.dll_sqlite3_mprintf
mov r13, rax
test r13, r13
jne 0x1800bdfb0
lea edi, [r13 + 7]
jmp 0x1800bdffa
mov rcx, qword [r12 + 0x18]
lea rax, [rsp + 0x1c0]
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x28], rax
mov r9d, esi
or r8d, 0xffffffff
mov rdx, r13
mov qword [rsp + 0x20], rbx
call fcn.1800bce80
mov rcx, r13
mov edi, eax
call sym.SQLite.Interop.dll_sqlite3_free
mov rax, qword [rsp + 0x1d0]
mov rbp, qword [rsp + 0x1c0]
mov qword [r12 + rax*8 + 0x68], rbp
mov r13, qword [rsp + 0x1c8]
test r14, r14
je 0x1800be040
test rbp, rbp
je 0x1800be012
movsx eax, word [rbp + 0x78]
jmp 0x1800be014
mov eax, ebx
movsxd r12, eax
test edi, edi
jne 0x1800be040
nop dword [rax + rax]
cmp rbx, r12
jge 0x1800be040
mov r8, qword [r14 + rbx*8]
mov edx, esi
mov rcx, rbp
call sym.SQLite.Interop.dll_sqlite3_bind_value
inc esi
inc rbx
mov edi, eax
test eax, eax
je 0x1800be020
jmp 0x1800be042
mov eax, edi
mov qword [r15], rbp
add rsp, 0x180
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret