Function at 0x1400e46f0
Capabilities:
Reference sql statements

Disassembly:
mov qword [rsp + 0x10], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x80]
sub rsp, 0x180
lea rax, str.DELETE_FROM__Q._q_content_WHERE_rowid___
mov r12, r9
mov qword [rsp + 0x40], rax
mov r13, r8
lea rax, str.SELECT_NOT_EXISTS_SELECT_docid_FROM__Q._q_content_WHERE_rowid___
mov r15, rcx
mov qword [rsp + 0x48], rax
lea rax, str.DELETE_FROM__Q._q_content
mov qword [rsp + 0x50], rax
lea rax, str.DELETE_FROM__Q._q_segments
mov qword [rsp + 0x58], rax
lea rax, str.DELETE_FROM__Q._q_segdir
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__s_WHERE_rowid_
mov qword [rsp + 0x78], rax
lea rax, str.SELECT__SELECT_max_idx__FROM__Q._q_segdir_WHERE_level______1
mov qword [rbp - 0x80], rax
lea rax, str.REPLACE_INTO__Q._q_segments_blockid__block__VALUES______
mov qword [rbp - 0x78], rax
lea rax, str.SELECT_coalesce__SELECT_max_blockid__FROM__Q._q_segments___1__1_
mov qword [rbp - 0x70], rax
lea rax, str.REPLACE_INTO__Q._q_segdir_VALUES_____________
mov qword [rbp - 0x68], 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 [rbp - 0x60], 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 [rbp - 0x58], rax
lea rax, str.SELECT_count___FROM__Q._q_segdir_WHERE_level___
mov qword [rbp - 0x50], rax
lea rax, str.SELECT_max_level__FROM__Q._q_segdir_WHERE_level_BETWEEN___AND__
mov qword [rbp - 0x48], rax
lea rax, str.DELETE_FROM__Q._q_segdir_WHERE_level___
mov qword [rbp - 0x40], rax
lea rax, str.DELETE_FROM__Q._q_segments_WHERE_blockid_BETWEEN___AND__
mov qword [rbp - 0x38], rax
lea rax, str.INSERT_INTO__Q._q_content_VALUES__s_
mov qword [rbp - 0x30], rax
lea rax, str.DELETE_FROM__Q._q_docsize_WHERE_docid___
mov qword [rbp - 0x28], rax
lea rax, str.REPLACE_INTO__Q._q_docsize_VALUES_____
mov qword [rbp - 0x20], rax
lea rax, str.SELECT_size_FROM__Q._q_docsize_WHERE_docid_
mov qword [rbp - 0x18], rax
lea rax, str.SELECT_value_FROM__Q._q_stat_WHERE_id_
mov qword [rbp - 0x10], rax
lea rax, str.REPLACE_INTO__Q._q_stat_VALUES_____
mov qword [rbp - 8], rax
lea rax, [0x1401d2c47]
mov qword [rbp], rax
mov qword [rbp + 8], rax
lea rax, str.DELETE_FROM__Q._q_segdir_WHERE_level_BETWEEN___AND__
mov qword [rbp + 0x10], rax
lea rax, str.SELECT___UNION_SELECT_level____1024_____FROM__Q._q_segdir
mov qword [rbp + 0x18], rax
lea rax, str.SELECT_level__count___AS_cnt_FROM__Q._q_segdir___GROUP_BY_level_HAVING_cnt____ORDER_BY__level____1024__ASC__2_DESC_LIMIT_1
mov qword [rbp + 0x20], rax
lea rax, str.SELECT_2__total_1__leaves_end_block___start_block____FROM__SELECT__FROM__Q._q_segdir_________WHERE_level____ORDER_BY_idx_ASC_LIMIT_____
mov qword [rbp + 0x28], rax
lea rax, str.DELETE_FROM__Q._q_segdir_WHERE_level____AND_idx___
mov qword [rbp + 0x30], rax
lea rax, str.UPDATE__Q._q_segdir_SET_idx____WHERE_level__AND_idx_
mov qword [rbp + 0x38], rax
lea rax, str.SELECT_idx__start_block__leaves_end_block__end_block__root_FROM__Q._q_segdir_WHERE_level____AND_idx___
mov qword [rbp + 0x40], rax
lea rax, str.UPDATE__Q._q_segdir_SET_start_block_____root___WHERE_level____AND_idx___
mov qword [rbp + 0x48], rax
lea rax, str.SELECT_1_FROM__Q._q_segments_WHERE_blockid__AND_block_IS_NULL
mov qword [rbp + 0x50], rax
lea rax, str.SELECT_idx_FROM__Q._q_segdir_WHERE_level__ORDER_BY_1_ASC
mov qword [rbp + 0x58], rax
lea rax, str.SELECT_max__level____1024___FROM__Q._q_segdir
mov qword [rbp + 0x60], 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 [rbp + 0x68], rax
lea rax, str.UPDATE_OR_FAIL__Q._q_segdir_SET_level_1_idx__WHERE_level__AND_idx_
mov qword [rbp + 0x70], rax
lea rax, str.UPDATE_OR_FAIL__Q._q_segdir_SET_level__WHERE_level_1
mov qword [rbp + 0x78], rax
xor ebx, ebx
movsxd rcx, edx
mov edi, ebx
lea rax, [rcx + 0xe]
mov rsi, qword [r15 + rax*8]
lea rax, [r15 + rax*8]
mov qword [rbp + 0xd0], rax
mov qword [rbp + 0xc0], rsi
test rsi, rsi
jne 0x1400e49e9
mov rcx, qword [rsp + rcx*8 + 0x40]
cmp edx, 0x12
jne 0x1400e4918
mov r9, qword [r15 + 0x1c0]
mov r8, qword [r15 + 0x28]
mov rdx, qword [r15 + 0x20]
call fcn.1400a6650
jmp 0x1400e493e
cmp edx, 7
jne 0x1400e4931
mov rdx, qword [r15 + 0x1b8]
call fcn.1400a6650
mov r9d, 0x81
jmp 0x1400e4944
mov r8, qword [r15 + 0x28]
mov rdx, qword [r15 + 0x20]
call fcn.1400a6650
mov r9d, 0x85
mov r14, rax
test rax, rax
jne 0x1400e4954
lea edi, [rax + 7]
jmp 0x1400e49e9
mov rcx, qword [r15 + 0x18]
lea rax, [rbp + 0xc0]
mov qword [rsp + 0x30], rbx
mov r8d, 0xffffffff
mov qword [rsp + 0x28], rax
mov rdx, r14
mov qword [rsp + 0x20], rbx
call fcn.1401605a0
cmp dword [0x14020e0b0], ebx
mov edi, eax
je 0x1400e49cf
mov rcx, qword [0x1402136d0]
test rcx, rcx
je 0x1400e4998
call qword [0x14020e130]
mov rcx, r14
call qword [0x14020e0e8]
dec qword [0x140213658]
movsxd rcx, eax
sub qword [0x140213610], rcx
mov rcx, r14
call qword [0x14020e0d8]
mov rcx, qword [0x1402136d0]
test rcx, rcx
je 0x1400e49d8
call qword [0x14020e140]
jmp 0x1400e49d8
mov rcx, r14
call qword [0x14020e0d8]
mov rax, qword [rbp + 0xd0]
mov rsi, qword [rbp + 0xc0]
mov qword [rax], rsi
test r12, r12
je 0x1400e4a28
test rsi, rsi
je 0x1400e49f9
movsx eax, word [rsi + 0x20]
jmp 0x1400e49fb
mov eax, ebx
test edi, edi
jne 0x1400e4a28
movsxd r15, eax
lea r14d, [rdi + 1]
cmp rbx, r15
jge 0x1400e4a28
mov r8, qword [r12 + rbx*8]
mov edx, r14d
mov rcx, rsi
call fcn.1400a9240
inc r14d
inc rbx
mov edi, eax
test eax, eax
je 0x1400e4a06
jmp 0x1400e4a2a
mov eax, edi
mov rbx, qword [rsp + 0x1c8]
mov qword [r13], rsi
add rsp, 0x180
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret