Function at 0x140116120
Capabilities:
Reference sql statements

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xc8
movups xmmword [rsp + 0xb0], xmm6
mov rbx, rdx
mov rbp, rcx
lea rdx, str.cannot_VACUUM_from_within_a_transaction
mov rdi, r9
cmp byte [rbx + 0x65], 0
je 0x14011618a
cmp dword [rbx + 0xd8], 1
jg 0x140116378
mov r13d, dword [rbx + 0x4c]
test r9, r9
je 0x140116388
movzx eax, word [r9 + 0x14]
lea rcx, [0x14016dbe0]
mov rdx, rax
and edx, 0x3f
cmp byte [rcx + rdx], 3
je 0x1401161d0
lea rdx, str.non_text_filename
mov rcx, rbx
call sym.sqlite3DbStrDup
mov rdx, qword [rbp]
mov rsi, rax
test rdx, rdx
je 0x1401161a6
mov rcx, rbx
call sym.sqlite3DbFreeNN
mov qword [rbp], rsi
mov r15d, 1
movups xmm6, xmmword [rsp + 0xb0]
mov eax, r15d
add rsp, 0xc8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov edx, eax
and dx, 0x202
cmp dx, 0x202
je 0x140116398
test al, 1
jne 0x1401163b0
mov edx, 1
mov rcx, rdi
mov dword [rsp + 0x120], r8d
call sym.valueToText
mov r8d, dword [rsp + 0x120]
mov r9, rax
mov eax, dword [rbx + 0x4c]
and eax, 0xfffffffe
or eax, 6
mov dword [rbx + 0x4c], eax
mov eax, dword [rbx + 0x2c]
mov rsi, qword [rbx + 0x30]
mov rdx, rbp
movzx ecx, byte [rbx + 0x6e]
mov r14d, dword [rbx + 0x28]
mov byte [rbx + 0x6e], 0
mov dword [rsp + 0x2c], eax
or eax, 6
movdqu xmm6, xmmword [rbx + 0x78]
mov dword [rbx + 0x2c], eax
movabs rax, 0xfffffffeefffafff
and rax, rsi
mov qword [rsp + 0x20], rsi
movsxd rsi, r8d
lea r8, str.ATTACH__Q_AS_vacuum_db
or rax, 0x201
shl rsi, 5
mov byte [rsp + 0x43], cl
mov qword [rbx + 0x30], rax
mov rax, qword [rbx + 0x20]
mov dword [rsp + 0x44], r14d
add rax, rsi
mov r12, qword [rax + 8]
mov rcx, qword [rax]
mov rax, qword [r12 + 8]
mov qword [rsp + 0x38], rcx
mov rcx, rbx
mov rax, qword [rax]
mov rax, qword [rax + 0x10]
mov qword [rsp + 0x30], rax
call sym.execSqlF
mov dword [rbx + 0x4c], r13d
mov r15d, eax
test eax, eax
jne 0x140116668
movsxd r13, r14d
mov rax, qword [rbx + 0x20]
shl r13, 5
add r13, rax
mov r14, qword [r13 + 8]
test rdi, rdi
je 0x140116748
mov rdx, qword [r14 + 8]
mov rdx, qword [rdx]
mov rcx, qword [rdx + 0x48]
mov qword [rsp + 0x60], 0
mov r9, qword [rcx]
test r9, r9
je 0x140116304
lea r8, [rsp + 0x60]
mov rdx, r8
call qword [r9 + 0x30]
test eax, eax
jne 0x1401166b0
cmp qword [rsp + 0x60], 0
jg 0x1401166b0
mov rax, qword [rbx + 0x20]
mov ecx, dword [rbx + 0x30]
or dword [rbx + 0x2c], 8
movzx edx, byte [rax + rsi + 0x10]
and ecx, 0x38
or edx, ecx
or edx, 0x20
mov r15d, edx
cmp byte [r12 + 0x11], 0
je 0x1401166e8
mov eax, dword [r12 + 0x14]
cmp byte [r12 + 0x12], 0
lea edx, [rax + 1]
mov dword [r12 + 0x14], edx
jne 0x1401163c0
mov rcx, r12
call sym.btreeLockCarefully
mov rax, qword [r12 + 8]
movzx ecx, byte [rax + 0x26]
mov edx, dword [rax + 0x34]
sub edx, dword [rax + 0x38]
cmp byte [r12 + 0x11], 0
mov dword [rsp + 0x4c], ecx
mov dword [rsp + 0x48], edx
je 0x1401163e4
mov eax, dword [r12 + 0x14]
sub eax, 1
jmp 0x1401163d7
lea rdx, str.cannot_VACUUM___SQL_statements_in_progress
jmp 0x14011618a
lea r9, [0x14015f198]
jmp 0x140116216
cmp byte [r9 + 0x16], 1
jne 0x1401161e2
mov r9, qword [r9 + 8]
mov eax, r13d
jmp 0x14011620d
mov eax, r13d
xor r9d, r9d
jmp 0x14011620d
mov rdx, qword [r12 + 8]
movzx ecx, byte [rdx + 0x26]
mov dword [rsp + 0x4c], ecx
mov ecx, dword [rdx + 0x34]
sub ecx, dword [rdx + 0x38]
mov dword [rsp + 0x48], ecx
mov dword [r12 + 0x14], eax
test eax, eax
je 0x140116708
mov rax, qword [rbx + 0x20]
mov rax, qword [rax + rsi + 0x18]
mov rcx, r14
mov edx, dword [rax + 0x74]
call sym.sqlite3BtreeSetCacheSize.isra.0
xor edx, edx
mov rcx, r12
call sym.sqlite3BtreeSetSpillSize
mov rcx, r14
mov edx, eax
call sym.sqlite3BtreeSetSpillSize
cmp byte [r14 + 0x11], 0
mov rsi, qword [r14 + 8]
je 0x14011642b
add dword [r14 + 0x14], 1
cmp byte [r14 + 0x12], 0
jne 0x14011642b
mov rcx, r14
call sym.btreeLockCarefully
mov rcx, qword [rsi]
mov edx, r15d
call sym.sqlite3PagerSetFlags
cmp byte [r14 + 0x11], 0
je 0x140116448
sub dword [r14 + 0x14], 1
je 0x140116758
lea r8, str.BEGIN
mov rdx, rbp
mov rcx, rbx
call sym.execSql
mov r15d, eax
test eax, eax
jne 0x140116600
test rdi, rdi
mov rcx, r12
sete dl
sete sil
xor r8d, r8d
movzx edx, dl
add edx, edx
call sym.sqlite3BtreeBeginTrans
mov r15d, eax
test eax, eax
jne 0x140116600
mov rax, qword [r12 + 8]
mov rdx, qword [rax]
cmp byte [rdx + 9], 5
jne 0x1401164a8
test sil, sil
je 0x1401164a8
mov dword [rbx + 0x74], 0
nop dword [rax]
mov ecx, dword [rsp + 0x48]
mov esi, dword [rsp + 0x4c]
mov edx, dword [rax + 0x34]
cmp ecx, esi
cmovge esi, ecx
xor r9d, r9d
mov rcx, r14
mov r8d, esi
call sym.sqlite3BtreeSetPageSize
test eax, eax
jne 0x140116738
movabs rax, 0xff000000ff
test qword [rsp + 0x30], rax
je 0x140116718
cmp byte [rbx + 0x67], 0
jne 0x140116738
movsx edx, byte [rbx + 0x6a]
test dl, dl
js 0x140116765
mov rcx, r14
call sym.sqlite3BtreeSetAutoVacuum
movzx eax, byte [rsp + 0x44]
mov rdx, rbp
mov rcx, rbx
mov rsi, qword [rsp + 0x38]
lea r8, str.SELECT_sql_FROM___w_.sqlite_schema_WHERE_typetableAND_name__sqlite_sequence_AND_coalesce_rootpage_1__0
mov byte [rbx + 0xc4], al
mov r9, rsi
call sym.execSqlF
mov r15d, eax
test eax, eax
jne 0x140116600
mov r9, rsi
lea r8, str.SELECT_sql_FROM___w_.sqlite_schema_WHERE_typeindex
mov rdx, rbp
mov rcx, rbx
call sym.execSqlF
mov r15d, eax
test eax, eax
jne 0x140116600
mov byte [rbx + 0xc4], 0
mov r9, rsi
mov rdx, rbp
mov rcx, rbx
lea r8, str.SELECTINSERT_INTO_vacuum_db.quote_name__SELECTFROM__w_.quote_name_FROM_vacuum_db.sqlite_schema_WHERE_typetableAND_coalesce_rootpage_1__0
call sym.execSqlF
and dword [rbx + 0x2c], 0xfffffffb
mov r15d, eax
test eax, eax
jne 0x140116600
mov r9, rsi
lea r8, str.INSERT_INTO_vacuum_db.sqlite_schema_SELECTFROM___w_.sqlite_schema_WHERE_type_IN_view_trigger__OR_typetableAND_rootpage0_
mov rdx, rbp
mov rcx, rbx
call sym.execSqlF
mov r15d, eax
test eax, eax
jne 0x140116600
lea rax, [rsp + 0x5c]
lea rsi, [0x14016bb58]
mov qword [rsp + 0x30], rax
lea rbp, [rsi + 0xa]
movzx r15d, byte [rsi]
mov r8, qword [rsp + 0x30]
mov rcx, r12
mov edx, r15d
call sym.sqlite3BtreeGetMeta
movzx r8d, byte [rsi + 1]
mov edx, r15d
mov rcx, r14
add r8d, dword [rsp + 0x5c]
call sym.sqlite3BtreeUpdateMeta
test eax, eax
jne 0x140116774
add rsi, 2
cmp rbp, rsi
jne 0x1401165ad
test rdi, rdi
je 0x14011677c
mov rcx, r14
call sym.sqlite3BtreeCommit
mov r15d, eax
nop dword [rax + rax]
mov eax, dword [rsp + 0x2c]
mov r9d, 1
xor r8d, r8d
mov rcx, r12
mov byte [rbx + 0xc4], 0
mov edx, 0xffffffff
mov dword [rbx + 0x2c], eax
mov rax, qword [rsp + 0x20]
movups xmmword [rbx + 0x78], xmm6
mov qword [rbx + 0x30], rax
movzx eax, byte [rsp + 0x43]
mov byte [rbx + 0x6e], al
call sym.sqlite3BtreeSetPageSize
mov byte [rbx + 0x65], 1
mov rcx, qword [r13 + 8]
call sym.sqlite3BtreeClose.isra.0
mov qword [r13 + 8], 0
mov qword [r13 + 0x18], 0
mov rcx, rbx
call sym.sqlite3ResetAllSchemasOfConnection
jmp 0x1401161b0
mov eax, dword [rsp + 0x2c]
movups xmmword [rbx + 0x78], xmm6
xor r8d, r8d
mov edx, 0xffffffff
mov byte [rbx + 0xc4], 0
mov r9d, 1
mov rcx, r12
mov dword [rbx + 0x2c], eax
mov rax, qword [rsp + 0x20]
mov qword [rbx + 0x30], rax
movzx eax, byte [rsp + 0x43]
mov byte [rbx + 0x6e], al
call sym.sqlite3BtreeSetPageSize
mov byte [rbx + 0x65], 1
jmp 0x140116656
lea rdx, str.output_file_already_exists
mov rcx, rbx
call sym.sqlite3DbStrDup
mov rdx, qword [rbp]
mov rsi, rax
test rdx, rdx
je 0x1401166d3
mov rcx, rbx
call sym.sqlite3DbFreeNN
mov qword [rbp], rsi
mov r15d, 1
jmp 0x140116600
mov rdx, qword [r12 + 8]
movzx ecx, byte [rdx + 0x26]
mov dword [rsp + 0x4c], ecx
mov ecx, dword [rdx + 0x34]
sub ecx, dword [rdx + 0x38]
mov dword [rsp + 0x48], ecx
jmp 0x1401163e8
mov rcx, r12
call sym.unlockBtreeMutex
jmp 0x1401163e4
mov edx, dword [rbx + 0x74]
xor r9d, r9d
mov r8d, esi
mov rcx, r14
call sym.sqlite3BtreeSetPageSize
test eax, eax
je 0x1401164e3
nop dword [rax]
mov r15d, 7
jmp 0x140116600
mov r15d, 0x21
jmp 0x14011631b
mov rcx, r14
call sym.unlockBtreeMutex
jmp 0x140116448
mov rcx, r12
call sym.sqlite3BtreeGetAutoVacuum
mov edx, eax
jmp 0x1401164f9
mov r15d, eax
jmp 0x140116600
cmp byte [r12 + 0x11], 0
je 0x14011679a
add dword [r12 + 0x14], 1
cmp byte [r12 + 0x12], 0
jne 0x14011679a
mov rcx, r12
call sym.btreeLockCarefully
cmp byte [r14 + 0x11], 0
je 0x1401167b5
add dword [r14 + 0x14], 1
cmp byte [r14 + 0x12], 0
jne 0x1401167b5
mov rcx, r14
call sym.btreeLockCarefully
mov rax, qword [r12 + 8]
lea r8, [rsp + 0x60]
mov rax, qword [rax]
mov rcx, qword [rax + 0x48]
mov r9, qword [rcx]
test r9, r9
je 0x14011680a
mov rdx, qword [r14 + 8]
lea r8, [rsp + 0x60]
mov qword [rsp + 0x30], r8
movsxd rax, dword [rdx + 0x34]
mov edx, dword [rdx + 0x40]
imul rax, rdx
mov edx, 0xb
mov qword [rsp + 0x60], rax
call qword [r9 + 0x50]
mov r8, qword [rsp + 0x30]
test eax, eax
mov r15d, eax
je 0x14011680a
cmp eax, 0xc
jne 0x140116945
mov rdi, r8
xor eax, eax
mov ecx, 0x12
mov edx, 0x7fffffff
rep stosd dword [rdi], eax
movq xmm1, r14
mov rcx, r8
mov qword [rsp + 0x30], r8
movq xmm0, qword [r14]
mov qword [rsp + 0x68], r12
mov dword [rsp + 0x78], 1
punpcklqdq xmm0, xmm1
movups xmmword [rsp + 0x80], xmm0
call sym.sqlite3_backup_step
mov rcx, qword [rsp + 0x30]
call sym.sqlite3_backup_finish
mov r15d, eax
test eax, eax
jne 0x14011690a
mov rax, qword [r12 + 8]
and word [rax + 0x28], 0xfffd
cmp byte [r14 + 0x11], 0
jne 0x140116971
cmp byte [r12 + 0x11], 0
jne 0x1401169bd
mov rcx, r14
call sym.sqlite3BtreeCommit
mov r15d, eax
test eax, eax
jne 0x140116600
mov rcx, r14
call sym.sqlite3BtreeGetAutoVacuum
mov rcx, r12
mov edx, eax
call sym.sqlite3BtreeSetAutoVacuum
cmp byte [r14 + 0x11], 0
je 0x1401169aa
add dword [r14 + 0x14], 1
cmp byte [r14 + 0x12], 0
jne 0x1401169d6
mov rcx, r14
call sym.btreeLockCarefully
mov rax, qword [r14 + 8]
mov esi, dword [rax + 0x34]
sub esi, dword [rax + 0x38]
cmp byte [r14 + 0x11], 0
movzx edi, byte [rax + 0x26]
je 0x1401168e9
sub dword [r14 + 0x14], 1
je 0x1401169e9
cmp edi, esi
mov edx, dword [rax + 0x34]
mov r9d, 1
mov rcx, r12
cmovge esi, edi
mov r8d, esi
call sym.sqlite3BtreeSetPageSize
mov r15d, eax
jmp 0x140116600
mov rax, qword [rsp + 0x68]
mov rax, qword [rax + 8]
mov rax, qword [rax]
cmp byte [rax + 0x10], 0
jne 0x140116945
add dword [rax + 0x84], 1
mov rdx, qword [rax + 0x70]
jmp 0x140116934
mov dword [rdx + 0x18], 1
mov rdx, qword [rdx + 0x40]
test rdx, rdx
jne 0x140116929
mov rcx, qword [rax + 0x120]
call sym.sqlite3PcacheTruncate
cmp byte [r14 + 0x11], 0
jne 0x140116971
cmp byte [r12 + 0x11], 0
je 0x140116600
sub dword [r12 + 0x14], 1
jne 0x140116600
mov rcx, r12
call sym.unlockBtreeMutex
jmp 0x140116600
sub dword [r14 + 0x14], 1
je 0x140116996
cmp byte [r12 + 0x11], 0
je 0x140116988
sub dword [r12 + 0x14], 1
je 0x1401169a0
test r15d, r15d
jne 0x140116600
jmp 0x140116881
mov rcx, r14
call sym.unlockBtreeMutex
jmp 0x140116978
mov rcx, r12
call sym.unlockBtreeMutex
jmp 0x140116988
mov rax, qword [r14 + 8]
mov esi, dword [rax + 0x34]
movzx edi, byte [rax + 0x26]
sub esi, dword [rax + 0x38]
jmp 0x1401168e9
sub dword [r12 + 0x14], 1
jne 0x140116881
mov rcx, r12
call sym.unlockBtreeMutex
jmp 0x140116881
mov rax, qword [r14 + 8]
mov esi, dword [rax + 0x34]
movzx edi, byte [rax + 0x26]
sub esi, dword [rax + 0x38]
jmp 0x1401168de
mov rcx, r14
call sym.unlockBtreeMutex
mov rax, qword [r14 + 8]
jmp 0x1401168e9