Function at 0x14009a5a0
Capabilities:
Reference sql statements

Disassembly:
push rbx
push rbp
push rdi
push r14
push r15
sub rsp, 0x60
cmp byte [rdx + 0x65], 0
mov rbp, r9
movsxd rbx, r8d
mov rdi, rdx
mov r14, rcx
mov qword [rsp + 0x20], 0
mov r15d, 1
jne 0x14009a625
lea edx, [r15 + 0x27]
mov rcx, rdi
call fcn.140076b10
mov rbx, rax
test rax, rax
je 0x14009a603
movups xmm0, xmmword [str.cannot_VACUUM_from_within_a_transaction]
movups xmmword [rax], xmm0
movups xmm1, xmmword [0x1400ee218]
movups xmmword [rax + 0x10], xmm1
movsd xmm0, qword [0x1400ee228]
movsd qword [rax + 0x20], xmm0
mov rdx, qword [r14]
test rdx, rdx
je 0x14009a613
mov rcx, rdi
call fcn.140076980
mov qword [r14], rbx
mov eax, r15d
add rsp, 0x60
pop r15
pop r14
pop rdi
pop rbp
pop rbx
ret
cmp dword [rdx + 0xd8], r15d
jle 0x14009a69c
mov edx, 0x2b
mov rcx, rdi
call fcn.140076b10
mov rbx, rax
test rax, rax
je 0x14009a67a
movups xmm0, xmmword [str.cannot_VACUUM___SQL_statements_in_progress]
movups xmmword [rax], xmm0
movups xmm1, xmmword [0x1400ee240]
movups xmmword [rax + 0x10], xmm1
movsd xmm0, qword [0x1400ee250]
movsd qword [rax + 0x20], xmm0
movzx eax, word [0x1400ee258]
mov word [rbx + 0x28], ax
movzx eax, byte [0x1400ee25a]
mov byte [rbx + 0x2a], al
mov rdx, qword [r14]
test rdx, rdx
je 0x14009a613
mov rcx, rdi
call fcn.140076980
mov eax, r15d
mov qword [r14], rbx
add rsp, 0x60
pop r15
pop r14
pop rdi
pop rbp
pop rbx
ret
mov qword [rsp + 0xa0], r12
mov r12d, dword [rdx + 0x4c]
lea rdx, [0x140000000]
test rbp, rbp
je 0x14009a760
movzx ecx, word [r9 + 0x14]
mov eax, ecx
and eax, 0x3f
cmp byte [rax + rdx + 0xe3ea0], 3
je 0x14009a711
mov edx, 0x12
mov rcx, rdi
call fcn.140076b10
mov rbx, rax
test rax, rax
je 0x14009a6f6
movups xmm0, xmmword [str.non_text_filename]
movups xmmword [rax], xmm0
movzx ecx, word [0x1400ee270]
mov word [rax + 0x10], cx
mov rdx, qword [r14]
test rdx, rdx
je 0x14009a706
mov rcx, rdi
call fcn.140076980
mov qword [r14], rbx
mov eax, r15d
jmp 0x14009ac82
mov edx, 0x202
movzx eax, cx
and ax, dx
cmp ax, dx
jne 0x14009a735
cmp byte [r9 + 0x16], r15b
jne 0x14009a735
mov r9, qword [r9 + 8]
and dword [rdi + 0x4c], 0xfffffffe
or dword [rdi + 0x4c], 6
jmp 0x14009a767
test r15b, cl
je 0x14009a747
and dword [rdi + 0x4c], 0xfffffffe
xor r9d, r9d
or dword [rdi + 0x4c], 6
jmp 0x14009a767
movzx edx, r15b
mov rcx, rbp
call fcn.1400c5590
and dword [rdi + 0x4c], 0xfffffffe
mov r9, rax
or dword [rdi + 0x4c], 6
jmp 0x14009a767
lea r9, [0x1400e0673]
mov eax, dword [rdi + 0x2c]
mov rcx, qword [rdi + 0x30]
mov rdx, qword [rdi + 0x78]
mov dword [rsp + 0x30], eax
or eax, 6
mov dword [rdi + 0x2c], eax
mov rax, rcx
mov qword [rsp + 0x48], rcx
movabs rcx, 0xfffffffeefffafff
and rax, rcx
mov qword [rsp + 0x50], rdx
mov rdx, qword [rdi + 0x80]
or rax, 0x201
mov qword [rdi + 0x30], rax
mov rcx, rbx
mov rax, qword [rdi + 0x20]
shl rcx, 5
mov qword [rsp + 0x58], rdx
movzx edx, byte [rdi + 0x6e]
mov byte [rdi + 0x6e], 0
mov rbx, qword [rax + rcx + 8]
mov byte [rsp + 0x98], dl
mov rdx, qword [rax + rcx]
mov qword [rsp + 0x38], rcx
mov rax, qword [rbx + 8]
mov qword [rsp + 0x90], rsi
mov qword [rsp + 0xa8], r13
mov qword [rsp + 0x40], rdx
mov rcx, qword [rax]
cmp byte [rcx + 0x10], 0
jne 0x14009a804
cmp byte [rcx + 0x14], 0
mov dword [rsp + 0x28], 0
je 0x14009a809
mov dword [rsp + 0x28], r15d
movsxd r13, dword [rdi + 0x28]
lea r8, str.ATTACH__Q_AS_vacuum_db
mov rdx, r14
mov dword [rsp + 0x2c], r13d
mov rcx, rdi
call fcn.14003f520
mov dword [rdi + 0x4c], r12d
mov esi, eax
test eax, eax
jne 0x14009abf2
mov r12, r13
shl r12, 5
add r12, qword [rdi + 0x20]
mov r13, qword [r12 + 8]
test rbp, rbp
je 0x14009a8f5
mov rax, qword [r13 + 8]
mov rcx, qword [rax]
mov rcx, qword [rcx + 0x48]
mov qword [rsp + 0x20], 0
mov rax, qword [rcx]
test rax, rax
je 0x14009a8d7
lea rdx, [rsp + 0x20]
call qword [rax + 0x30]
test eax, eax
jne 0x14009a87b
cmp qword [rsp + 0x20], 0
jle 0x14009a8d7
mov edx, 0x1b
mov rcx, rdi
mov esi, r15d
call fcn.140076b10
mov rbp, rax
test rax, rax
je 0x14009a8bf
movups xmm0, xmmword [str.output_file_already_exists]
movups xmmword [rax], xmm0
movsd xmm0, qword [0x1400ee2a0]
movsd qword [rax + 0x10], xmm0
movzx ecx, word [0x1400ee2a8]
mov word [rax + 0x18], cx
movzx eax, byte [0x1400ee2aa]
mov byte [rbp + 0x1a], al
mov rdx, qword [r14]
test rdx, rdx
je 0x14009a8cf
mov rcx, rdi
call fcn.140076980
mov qword [r14], rbp
jmp 0x14009abf7
mov rax, qword [rdi + 0x20]
or dword [rdi + 0x2c], 8
mov rsi, qword [rsp + 0x38]
movzx r15d, byte [rsi + rax + 0x10]
mov eax, dword [rdi + 0x30]
and eax, 0x38
or r15d, eax
jmp 0x14009a8fa
mov rsi, qword [rsp + 0x38]
mov rcx, rbx
call fcn.14006e830
mov rcx, qword [rdi + 0x20]
mov dword [rsp + 0x20], eax
mov rdx, qword [rsi + rcx + 0x18]
mov rcx, r13
mov edx, dword [rdx + 0x74]
call fcn.140070830
xor edx, edx
mov rcx, rbx
call fcn.140070a30
mov edx, eax
mov rcx, r13
call fcn.140070a30
or r15d, 0x20
mov rcx, r13
mov edx, r15d
call fcn.1400709d0
lea r8, str.BEGIN
mov rdx, r14
mov rcx, rdi
call fcn.14003f2f0
mov esi, eax
test eax, eax
jne 0x14009abf7
xor edx, edx
mov eax, 2
test rbp, rbp
cmove edx, eax
cmp byte [rbx + 0x11], sil
jne 0x14009a981
movzx eax, byte [rbx + 0x10]
test al, al
je 0x14009a981
cmp al, 1
jne 0x14009aaf7
test rbp, rbp
jne 0x14009a996
xor r8d, r8d
mov rcx, rbx
call fcn.140033b60
mov esi, eax
test esi, esi
jne 0x14009abf7
mov rax, qword [rbx + 8]
mov rcx, qword [rax]
cmp byte [rcx + 9], 5
jne 0x14009a9ab
test rbp, rbp
jne 0x14009a9ab
mov dword [rdi + 0x74], ebp
mov rax, qword [rbx + 8]
xor r9d, r9d
mov esi, dword [rsp + 0x20]
mov rcx, r13
mov r8d, esi
mov edx, dword [rax + 0x34]
call fcn.1400708d0
test eax, eax
jne 0x14009abeb
cmp dword [rsp + 0x28], eax
jne 0x14009a9eb
mov edx, dword [rdi + 0x74]
xor r9d, r9d
mov r8d, esi
mov rcx, r13
call fcn.1400708d0
test eax, eax
jne 0x14009abeb
cmp byte [rdi + 0x67], 0
jne 0x14009abeb
movsx eax, byte [rdi + 0x6a]
test al, al
jns 0x14009aa05
mov rcx, rbx
call fcn.14006e740
mov edx, eax
mov rcx, r13
call fcn.1400707a0
mov eax, dword [rsp + 0x2c]
lea r8, str.SELECT_sql_FROM___w_.sqlite_schema_WHERE_typetableAND_name__sqlite_sequence_AND_coalesce_rootpage_1__0
mov r15, qword [rsp + 0x40]
mov rdx, r14
mov r9, r15
mov byte [rdi + 0xc4], al
mov rcx, rdi
call fcn.14003f520
mov esi, eax
test eax, eax
jne 0x14009abf7
mov r9, r15
lea r8, str.SELECT_sql_FROM___w_.sqlite_schema_WHERE_typeindex
mov rdx, r14
mov rcx, rdi
call fcn.14003f520
mov esi, eax
test eax, eax
jne 0x14009abf7
mov r9, r15
mov byte [rdi + 0xc4], al
lea r8, str.SELECTINSERT_INTO_vacuum_db.quote_name__SELECTFROM__w_.quote_name_FROM_vacuum_db.sqlite_schema_WHERE_typetableAND_coalesce_rootpage_1__0
mov rdx, r14
mov rcx, rdi
call fcn.14003f520
and dword [rdi + 0x2c], 0xfffffffb
mov esi, eax
test eax, eax
jne 0x14009abf7
mov r9, r15
lea r8, str.INSERT_INTO_vacuum_db.sqlite_schema_SELECTFROM___w_.sqlite_schema_WHERE_type_IN_view_trigger__OR_typetableAND_rootpage0_
mov rdx, r14
mov rcx, rdi
call fcn.14003f520
mov esi, eax
test eax, eax
jne 0x14009abf7
xor r14d, r14d
nop word [rax + rax]
movzx r8d, byte [rbx + 0x11]
lea rax, [0x140000000]
movzx esi, byte [r14 + rax + 0xe4080]
mov r15, qword [rbx + 8]
test r8b, r8b
je 0x14009aae4
inc dword [rbx + 0x14]
cmp byte [rbx + 0x12], 0
jne 0x14009aae4
mov rcx, rbx
call fcn.140034eb0
movzx r8d, byte [rbx + 0x11]
cmp esi, 0xf
jne 0x14009ab2f
mov rax, qword [r15]
mov esi, dword [rbx + 0x1c]
add esi, dword [rax + 0x84]
jmp 0x14009ab43
test rbp, rbp
jne 0x14009a996
mov rax, qword [rbx]
mov edx, dword [rax + 0x2f0]
mov rax, qword [rbx + 8]
mov rcx, qword [rax]
cmp edx, dword [rcx + 0x80]
jle 0x14009ab28
cmp byte [rcx + 0xa], bpl
je 0x14009ab28
call fcn.140059600
jmp 0x14009a98c
xor esi, esi
jmp 0x14009a98e
mov rax, qword [r15 + 0x18]
lea edx, [rsi*4 + 0x24]
mov rcx, qword [rax + 0x50]
mov esi, dword [rdx + rcx]
bswap esi
test r8b, r8b
je 0x14009ab56
sub dword [rbx + 0x14], 1
jne 0x14009ab56
mov rcx, rbx
call fcn.1400c3420
lea rax, [0x140000000]
mov rcx, r13
movzx r8d, byte [r14 + rax + 0xe4081]
movzx edx, byte [r14 + rax + 0xe4080]
add r8d, esi
call fcn.140071500
mov esi, eax
test eax, eax
jne 0x14009abf7
add r14, 2
cmp r14, 0xa
jl 0x14009aab0
test rbp, rbp
jne 0x14009aba4
mov rdx, r13
mov rcx, rbx
call fcn.14006dd50
mov esi, eax
test eax, eax
jne 0x14009abf7
mov rcx, r13
call fcn.14006db00
mov esi, eax
test eax, eax
jne 0x14009abf7
test rbp, rbp
jne 0x14009abf7
mov rcx, r13
call fcn.14006e740
mov edx, eax
mov rcx, rbx
call fcn.1400707a0
mov rcx, r13
call fcn.14006e830
mov rcx, qword [r13 + 8]
lea r9d, [rsi + 1]
mov r8d, eax
mov edx, dword [rcx + 0x34]
mov rcx, rbx
call fcn.1400708d0
mov esi, eax
jmp 0x14009abf7
mov esi, 7
jmp 0x14009abf7
mov r12, qword [rsp + 0x20]
mov eax, dword [rsp + 0x30]
mov r9d, 1
mov dword [rdi + 0x2c], eax
xor r8d, r8d
mov rax, qword [rsp + 0x48]
mov rcx, rbx
mov qword [rdi + 0x30], rax
mov rax, qword [rsp + 0x50]
lea edx, [r9 - 2]
mov qword [rdi + 0x78], rax
mov rax, qword [rsp + 0x58]
mov qword [rdi + 0x80], rax
movzx eax, byte [rsp + 0x98]
mov byte [rdi + 0x6e], al
mov byte [rdi + 0xc4], 0
call fcn.1400708d0
mov r13, qword [rsp + 0xa8]
mov byte [rdi + 0x65], 1
test r12, r12
je 0x14009ac70
mov rcx, qword [r12 + 8]
call fcn.14006d690
mov qword [r12 + 8], 0
mov qword [r12 + 0x18], 0
mov rcx, rdi
call fcn.1400992a0
mov eax, esi
mov rsi, qword [rsp + 0x90]
mov r12, qword [rsp + 0xa0]
add rsp, 0x60
pop r15
pop r14
pop rdi
pop rbp
pop rbx
ret