Function at 0x14023b020
Capabilities:
Reference sql statements

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xc8
movaps xmmword [rsp + 0xb0], xmm6
mov rbx, rdx
mov rdi, rcx
movsxd rsi, r8d
cmp byte [rbx + 0x65], 0
lea rdx, str.cannot_VACUUM_from_within_a_transaction
mov rbp, r9
je 0x14023b08a
cmp dword [rbx + 0xd8], 1
jg 0x14023b238
test r9, r9
mov r12d, dword [rbx + 0x4c]
je 0x14023b248
movzx eax, word [r9 + 0x14]
lea rdx, [0x140339fc0]
and eax, 0x3f
cmp byte [rdx + rax], 3
je 0x14023b0d0
lea rdx, str.non_text_filename
mov rcx, rbx
call sym.sqlite3DbStrDup
mov rdx, qword [rdi]
mov rsi, rax
test rdx, rdx
je 0x14023b0a5
mov rcx, rbx
call sym.sqlite3DbFreeNN
mov qword [rdi], rsi
mov r14d, 1
movaps xmm6, xmmword [rsp + 0xb0]
mov eax, r14d
add rsp, 0xc8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rcx, r9
call sym.sqlite3ValueText.constprop.0
mov r9, rax
mov eax, dword [rbx + 0x4c]
and eax, 0xfffffffe
or eax, 6
mov dword [rbx + 0x4c], eax
mov eax, dword [rbx + 0x2c]
lea r8, str.ATTACH__Q_AS_vacuum_db
shl rsi, 5
mov rcx, qword [rbx + 0x30]
movzx edx, byte [rbx + 0x6e]
mov byte [rbx + 0x6e], 0
mov r13d, dword [rbx + 0x28]
mov dword [rsp + 0x28], eax
or eax, 6
movdqu xmm6, xmmword [rbx + 0x78]
mov dword [rbx + 0x2c], eax
movabs rax, 0xfffffffeefffafff
and rax, rcx
mov qword [rsp + 0x20], rcx
or rax, 0x201
mov byte [rsp + 0x2f], dl
mov rdx, rdi
mov qword [rbx + 0x30], rax
mov rax, qword [rbx + 0x20]
mov dword [rsp + 0x40], r13d
add rax, rsi
mov r15, qword [rax + 8]
mov rcx, qword [rax]
mov rax, qword [r15 + 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], r12d
test eax, eax
mov r14d, eax
jne 0x14023b660
mov rax, qword [rbx + 0x20]
movsxd r12, r13d
shl r12, 5
add r12, rax
test rbp, rbp
mov r13, qword [r12 + 8]
je 0x14023b788
mov rdx, qword [r13 + 8]
mov rdx, qword [rdx]
mov rcx, qword [rdx + 0x48]
mov qword [rsp + 0x60], 0
mov r9, qword [rcx]
test r9, r9
je 0x14023b1d2
lea r8, [rsp + 0x60]
mov rdx, r8
call qword [r9 + 0x30]
test eax, eax
jne 0x14023b6a8
cmp qword [rsp + 0x60], 0
jg 0x14023b6a8
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 r14d, edx
cmp byte [r15 + 0x11], 0
je 0x14023b740
mov eax, dword [r15 + 0x14]
cmp byte [r15 + 0x12], 0
lea edx, [rax + 1]
mov dword [r15 + 0x14], edx
jne 0x14023b258
mov rcx, r15
call sym.btreeLockCarefully
mov rax, qword [r15 + 8]
movzx ecx, byte [rax + 0x26]
mov edx, dword [rax + 0x34]
sub edx, dword [rax + 0x38]
cmp byte [r15 + 0x11], 0
mov dword [rsp + 0x44], ecx
mov dword [rsp + 0x48], edx
je 0x14023b27a
mov eax, dword [r15 + 0x14]
sub eax, 1
jmp 0x14023b26e
lea rdx, str.cannot_VACUUM___SQL_statements_in_progress
jmp 0x14023b08a
lea r9, [0x140329f88]
jmp 0x14023b0e7
mov rdx, qword [r15 + 8]
movzx ecx, byte [rdx + 0x26]
mov dword [rsp + 0x44], ecx
mov ecx, dword [rdx + 0x34]
sub ecx, dword [rdx + 0x38]
mov dword [rsp + 0x48], ecx
test eax, eax
mov dword [r15 + 0x14], eax
je 0x14023b7b0
mov rax, qword [rbx + 0x20]
mov rax, qword [rax + rsi + 0x18]
mov rcx, r13
mov edx, dword [rax + 0x74]
call sym.sqlite3BtreeSetCacheSize.isra.0
movzx r8d, byte [r15 + 0x11]
mov rsi, qword [r15 + 8]
test r8b, r8b
je 0x14023b610
mov r9d, dword [r15 + 0x14]
cmp byte [r15 + 0x12], 0
lea eax, [r9 + 1]
mov dword [r15 + 0x14], eax
jne 0x14023b760
mov rcx, r15
call sym.btreeLockCarefully
mov rax, qword [rsi]
movzx r8d, byte [r15 + 0x11]
mov rcx, qword [rax + 0x120]
movsxd rax, dword [rcx + 0x20]
test eax, eax
js 0x14023b62e
mov edx, dword [rcx + 0x24]
cmp eax, edx
cmovge edx, eax
test r8b, r8b
je 0x14023b2fc
mov eax, dword [r15 + 0x14]
lea r9d, [rax - 1]
test r9d, r9d
mov dword [r15 + 0x14], r9d
je 0x14023b798
mov rcx, r13
call sym.sqlite3BtreeSetSpillSize
mov edx, r14d
mov rcx, r13
call sym.sqlite3BtreeSetPagerFlags.isra.0
lea r8, str.BEGIN
mov rdx, rdi
mov rcx, rbx
call sym.execSql
test eax, eax
mov r14d, eax
jne 0x14023b5a0
test rbp, rbp
mov rcx, r15
sete dl
sete sil
xor r8d, r8d
movzx edx, dl
add edx, edx
call sym.sqlite3BtreeBeginTrans
test eax, eax
mov r14d, eax
jne 0x14023b5a0
mov rax, qword [r15 + 8]
mov rdx, qword [rax]
cmp byte [rdx + 9], 5
jne 0x14023b370
test sil, sil
je 0x14023b370
mov dword [rbx + 0x74], 0
nop word [rax + rax]
mov ecx, dword [rsp + 0x44]
mov esi, dword [rsp + 0x48]
mov edx, dword [rax + 0x34]
cmp ecx, esi
cmovge esi, ecx
xor r9d, r9d
mov rcx, r13
mov r8d, esi
call sym.sqlite3BtreeSetPageSize
test eax, eax
jne 0x14023b7e0
movabs rax, 0xff000000ff
test qword [rsp + 0x30], rax
je 0x14023b7c0
cmp byte [rbx + 0x67], 0
jne 0x14023b7e0
movzx esi, byte [rbx + 0x6a]
test sil, sil
js 0x14023b867
setne r14b
movzx r11d, byte [r13 + 0x11]
mov rax, qword [r13 + 8]
test r11b, r11b
je 0x14023b7eb
add dword [r13 + 0x14], 1
cmp byte [r13 + 0x12], 0
je 0x14023b811
test byte [rax + 0x28], 2
jne 0x14023b82e
cmp sil, 2
movzx edx, r14b
sete cl
mov dh, cl
mov word [rax + 0x21], dx
sub dword [r13 + 0x14], 1
je 0x14023b8f2
movzx eax, byte [rsp + 0x40]
lea r8, str.SELECT_sql_FROM___w_.sqlite_schema_WHERE_typetableAND_name__sqlite_sequence_AND_coalesce_rootpage_1__0
mov rdx, rdi
mov rcx, rbx
mov rsi, qword [rsp + 0x38]
mov byte [rbx + 0xc4], al
mov r9, rsi
call sym.execSqlF
test eax, eax
mov r14d, eax
jne 0x14023b5a0
mov r9, rsi
mov rdx, rdi
mov rcx, rbx
lea r8, str.SELECT_sql_FROM___w_.sqlite_schema_WHERE_typeindex
call sym.execSqlF
test eax, eax
mov r14d, eax
jne 0x14023b5a0
mov byte [rbx + 0xc4], 0
mov r9, rsi
mov rdx, rdi
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
test eax, eax
mov r14d, eax
jne 0x14023b5a0
mov r9, rsi
mov rdx, rdi
mov rcx, rbx
lea r8, str.INSERT_INTO_vacuum_db.sqlite_schema_SELECTFROM___w_.sqlite_schema_WHERE_type_IN_view_trigger__OR_typetableAND_rootpage0_
call sym.execSqlF
test eax, eax
mov r14d, eax
jne 0x14023b5a0
lea r14, [0x1403369b0]
mov qword [rsp + 0x118], rbx
lea rdi, [r14 + 0xa]
lea rsi, [rsp + 0x5c]
movzx ebx, byte [r14]
mov r8, rsi
mov rcx, r15
mov edx, ebx
call sym.sqlite3BtreeGetMeta
movzx r8d, byte [r14 + 1]
mov edx, ebx
mov rcx, r13
add r8d, dword [rsp + 0x5c]
call sym.sqlite3BtreeUpdateMeta
test eax, eax
jne 0x14023b965
add r14, 2
cmp r14, rdi
jne 0x14023b4c1
test rbp, rbp
mov rbx, qword [rsp + 0x118]
je 0x14023b99a
cmp byte [r13 + 0x11], 0
je 0x14023b523
add dword [r13 + 0x14], 1
cmp byte [r13 + 0x12], 0
jne 0x14023b523
mov rcx, r13
call sym.btreeLockCarefully
cmp byte [r13 + 0x10], 2
je 0x14023b975
cmp byte [r13 + 0x10], 0
movzx eax, byte [r13 + 0x11]
je 0x14023ba9b
test al, al
je 0x14023b556
add dword [r13 + 0x14], 1
cmp byte [r13 + 0x12], 0
jne 0x14023b556
mov rcx, r13
call sym.btreeLockCarefully
cmp byte [r13 + 0x10], 2
je 0x14023bb10
mov rcx, r13
call sym.btreeEndTransaction
cmp byte [r13 + 0x11], 0
je 0x14023b591
sub dword [r13 + 0x14], 1
mov r14d, 0
je 0x14023ba93
sub dword [r13 + 0x14], 1
je 0x14023bc25
test r14d, r14d
jne 0x14023b5a0
test rbp, rbp
je 0x14023bbbb
xor r14d, r14d
nop dword [rax]
mov eax, dword [rsp + 0x28]
mov r9d, 1
xor r8d, r8d
mov rcx, r15
mov edx, 0xffffffff
mov byte [rbx + 0xc4], 0
movups xmmword [rbx + 0x78], xmm6
mov dword [rbx + 0x2c], eax
mov rax, qword [rsp + 0x20]
mov qword [rbx + 0x30], rax
movzx eax, byte [rsp + 0x2f]
mov byte [rbx + 0x6e], al
call sym.sqlite3BtreeSetPageSize
mov byte [rbx + 0x65], 1
mov rcx, qword [r12 + 8]
call sym.sqlite3BtreeClose.isra.0
mov qword [r12 + 8], 0
mov qword [r12 + 0x18], 0
mov rcx, rbx
call sym.sqlite3ResetAllSchemasOfConnection
jmp 0x14023b0ae
mov rax, qword [rsi]
mov rcx, qword [rax + 0x120]
movsxd rax, dword [rcx + 0x20]
mov edx, dword [rcx + 0x24]
cmp eax, edx
cmovge edx, eax
test eax, eax
jns 0x14023b2fc
mov r9d, dword [rcx + 0x2c]
neg rax
add r9d, dword [rcx + 0x28]
shl rax, 0xa
cqo
movsxd r9, r9d
idiv r9
mov edx, 0x3b9aca00
cmp rax, rdx
cmovg rax, rdx
jmp 0x14023b2da
mov eax, dword [rsp + 0x28]
movups xmmword [rbx + 0x78], xmm6
xor r8d, r8d
mov edx, 0xffffffff
mov byte [rbx + 0xc4], 0
mov r9d, 1
mov rcx, r15
mov dword [rbx + 0x2c], eax
mov rax, qword [rsp + 0x20]
mov qword [rbx + 0x30], rax
movzx eax, byte [rsp + 0x2f]
mov byte [rbx + 0x6e], al
call sym.sqlite3BtreeSetPageSize
mov byte [rbx + 0x65], 1
jmp 0x14023b5f9
mov edx, 0x1b
mov rcx, rbx
call sym.sqlite3DbMallocRawNN
test rax, rax
mov rsi, rax
je 0x14023b6ed
movabs rax, 0x662074757074756f
mov qword [rsi], rax
movabs rax, 0x65726c6120656c69
mov qword [rsi + 8], rax
movabs rax, 0x7369786520796461
mov qword [rsi + 0x10], rax
mov dword [rsi + 0x17], 0x737473
mov rcx, qword [rdi]
test rcx, rcx
je 0x14023b72b
cmp rcx, qword [rbx + 0x1f0]
jae 0x14023b718
cmp rcx, qword [rbx + 0x1e0]
jae 0x14023b8dc
cmp rcx, qword [rbx + 0x1e8]
jae 0x14023b8ff
cmp qword [rbx + 0x308], 0
jne 0x14023b857
call sym.sqlite3_free
mov qword [rdi], rsi
mov r14d, 1
jmp 0x14023b5a0
mov rdx, qword [r15 + 8]
movzx ecx, byte [rdx + 0x26]
mov dword [rsp + 0x44], ecx
mov ecx, dword [rdx + 0x34]
sub ecx, dword [rdx + 0x38]
mov dword [rsp + 0x48], ecx
jmp 0x14023b27e
mov rax, qword [rsi]
mov rcx, qword [rax + 0x120]
movsxd rax, dword [rcx + 0x20]
mov edx, dword [rcx + 0x24]
cmp eax, edx
cmovge edx, eax
test eax, eax
jns 0x14023b2ef
jmp 0x14023b62e
mov r14d, 0x21
jmp 0x14023b1e9
mov rcx, r15
mov dword [rsp + 0x4c], edx
call sym.unlockBtreeMutex
mov edx, dword [rsp + 0x4c]
jmp 0x14023b2fc
mov rcx, r15
call sym.unlockBtreeMutex
jmp 0x14023b27a
mov edx, dword [rbx + 0x74]
xor r9d, r9d
mov r8d, esi
mov rcx, r13
call sym.sqlite3BtreeSetPageSize
test eax, eax
je 0x14023b3ab
nop dword [rax]
mov r14d, 7
jmp 0x14023b5a0
test byte [rax + 0x28], 2
je 0x14023b7fb
cmp byte [rax + 0x21], r14b
jne 0x14023b40e
cmp sil, 2
movzx edx, r14b
sete cl
mov dh, cl
mov word [rax + 0x21], dx
jmp 0x14023b40e
mov rcx, r13
mov qword [rsp + 0x30], rax
call sym.btreeLockCarefully
mov rax, qword [rsp + 0x30]
movzx r11d, byte [r13 + 0x11]
test byte [rax + 0x28], 2
je 0x14023b834
cmp byte [rax + 0x21], r14b
jne 0x14023b849
cmp sil, 2
movzx ecx, r14b
sete r8b
mov edx, r8d
mov ch, dl
mov word [rax + 0x21], cx
test r11b, r11b
jne 0x14023b403
jmp 0x14023b40e
mov rdx, rcx
mov rcx, rbx
call sym.measureAllocationSize
jmp 0x14023b72b
cmp byte [r15 + 0x11], 0
je 0x14023b915
mov eax, dword [r15 + 0x14]
cmp byte [r15 + 0x12], 0
lea edx, [rax + 1]
mov dword [r15 + 0x14], edx
jne 0x14023b93d
mov rcx, r15
xor r14d, r14d
call sym.btreeLockCarefully
mov rax, qword [r15 + 8]
movzx edx, byte [r15 + 0x11]
movzx esi, byte [rax + 0x21]
test sil, sil
je 0x14023b8b4
cmp byte [rax + 0x22], 1
mov r14d, 1
sbb esi, esi
add esi, 2
test dl, dl
je 0x14023b3c6
mov eax, dword [r15 + 0x14]
sub eax, 1
test eax, eax
mov dword [r15 + 0x14], eax
jne 0x14023b3c6
mov rcx, r15
call sym.unlockBtreeMutex
jmp 0x14023b3c6
mov rax, qword [rbx + 0x1d8]
mov qword [rcx], rax
mov qword [rbx + 0x1d8], rcx
jmp 0x14023b72b
mov rcx, r13
call sym.unlockBtreeMutex
jmp 0x14023b40e
mov rax, qword [rbx + 0x1c8]
mov qword [rcx], rax
mov qword [rbx + 0x1c8], rcx
jmp 0x14023b72b
mov rax, qword [r15 + 8]
xor r14d, r14d
movzx esi, byte [rax + 0x21]
test sil, sil
je 0x14023b3c6
cmp byte [rax + 0x22], 1
mov r14d, 1
sbb esi, esi
add esi, 2
jmp 0x14023b3c6
mov rdx, qword [r15 + 8]
xor r14d, r14d
movzx esi, byte [rdx + 0x21]
test sil, sil
je 0x14023b8c3
cmp byte [rdx + 0x22], 1
mov r14d, 1
sbb esi, esi
add esi, 2
jmp 0x14023b8bc
mov rbx, qword [rsp + 0x118]
mov r14d, eax
jmp 0x14023b5a0
xor edx, edx
mov rcx, r13
call sym.sqlite3BtreeCommitPhaseOne.part.0
test eax, eax
mov r14d, eax
je 0x14023b52e
cmp byte [r13 + 0x11], 0
jne 0x14023b581
jmp 0x14023b5a0
cmp byte [r15 + 0x11], 0
je 0x14023b9a9
mov rcx, r15
call sym.sqlite3BtreeEnter.part.0
cmp byte [r13 + 0x11], 0
je 0x14023b9b8
mov rcx, r13
call sym.sqlite3BtreeEnter.part.0
mov rax, qword [r15 + 8]
lea r8, [rsp + 0x60]
mov rax, qword [rax]
mov rcx, qword [rax + 0x48]
mov r9, qword [rcx]
test r9, r9
je 0x14023ba0c
mov rdx, qword [r13 + 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]
cmp eax, 0xc
mov r14d, eax
je 0x14023ba0c
test eax, eax
jne 0x14023bae9
xor eax, eax
mov rdi, r8
mov ecx, 0x12
mov qword [rsp + 0x30], r8
rep stosd dword [rdi], eax
movq xmm1, r13
mov rcx, r8
mov edx, 0x7fffffff
movq xmm0, qword [r13]
mov qword [rsp + 0x68], r15
mov dword [rsp + 0x78], 1
punpcklqdq xmm0, xmm1
movaps xmmword [rsp + 0x80], xmm0
call sym.sqlite3_backup_step
mov rcx, qword [rsp + 0x30]
call sym.sqlite3_backup_finish
test eax, eax
mov r14d, eax
jne 0x14023baae
mov rax, qword [r15 + 8]
and word [rax + 0x28], 0xfffd
cmp byte [r13 + 0x11], 0
je 0x14023bc32
mov rcx, r13
call sym.sqlite3BtreeLeave.part.0
cmp byte [r15 + 0x11], 0
je 0x14023b508
mov rcx, r15
call sym.sqlite3BtreeLeave.part.0
jmp 0x14023b508
mov rcx, r13
call sym.unlockBtreeMutex
xor r14d, r14d
cmp byte [r13 + 0x11], 0
jne 0x14023b581
jmp 0x14023b591
mov rax, qword [rsp + 0x68]
mov rax, qword [rax + 8]
mov rax, qword [rax]
cmp byte [rax + 0x10], 0
jne 0x14023bae9
add dword [rax + 0x84], 1
mov rdx, qword [rax + 0x70]
jmp 0x14023bad8
mov dword [rdx + 0x18], 1
mov rdx, qword [rdx + 0x40]
test rdx, rdx
jne 0x14023bacd
mov rcx, qword [rax + 0x120]
call sym.sqlite3PcacheTruncate
cmp byte [r13 + 0x11], 0
je 0x14023baf8
mov rcx, r13
call sym.sqlite3BtreeLeave.part.0
cmp byte [r15 + 0x11], 0
je 0x14023b5a0
mov rcx, r15
call sym.sqlite3BtreeLeave.part.0
jmp 0x14023b5a0
mov rdi, qword [r13 + 8]
mov rsi, qword [rdi]
mov r14d, dword [rsi + 0x30]
test r14d, r14d
jne 0x14023bb98
add dword [rsi + 0x84], 1
cmp byte [rsi + 0x15], 2
jne 0x14023bb3d
cmp byte [rsi + 8], 0
je 0x14023bb3d
cmp byte [rsi + 9], 1
je 0x14023bc70
movzx edx, byte [rsi + 0x18]
mov r8d, 1
mov rcx, rsi
call sym.pager_end_transaction
mov r14d, eax
movzx eax, al
cmp r14b, 0xd
je 0x14023bb82
cmp eax, 0xa
je 0x14023bb82
test r14d, r14d
jne 0x14023bb98
sub dword [r13 + 0x1c], 1
mov byte [rdi + 0x24], 1
mov rcx, qword [rdi + 0x60]
call sym.sqlite3BitvecDestroy
xor eax, eax
mov qword [rdi + 0x60], rax
jmp 0x14023b561
lea rax, [sym.getPageError]
mov dword [rsi + 0x30], r14d
mov byte [rsi + 0x15], 6
mov qword [rsi + 0x110], rax
cmp byte [r13 + 0x11], 0
je 0x14023b5a0
sub dword [r13 + 0x14], 1
jne 0x14023b581
mov rcx, r13
call sym.unlockBtreeMutex
jmp 0x14023b98a
mov rcx, r13
call sym.sqlite3BtreeGetAutoVacuum
mov rcx, r15
mov edx, eax
call sym.sqlite3BtreeSetAutoVacuum
cmp byte [r13 + 0x11], 0
je 0x14023bc52
add dword [r13 + 0x14], 1
cmp byte [r13 + 0x12], 0
jne 0x14023bc42
mov rcx, r13
call sym.btreeLockCarefully
mov rax, qword [r13 + 8]
mov esi, dword [rax + 0x34]
sub esi, dword [rax + 0x38]
cmp byte [r13 + 0x11], 0
movzx edi, byte [rax + 0x26]
je 0x14023bc04
sub dword [r13 + 0x14], 1
je 0x14023bc62
cmp edi, esi
mov edx, dword [rax + 0x34]
mov r9d, 1
mov rcx, r15
cmovge esi, edi
mov r8d, esi
call sym.sqlite3BtreeSetPageSize
mov r14d, eax
jmp 0x14023b5a0
mov rcx, r13
call sym.unlockBtreeMutex
jmp 0x14023b58c
cmp byte [r15 + 0x11], 0
je 0x14023b523
jmp 0x14023ba86
mov rax, qword [r13 + 8]
mov esi, dword [rax + 0x34]
movzx edi, byte [rax + 0x26]
sub esi, dword [rax + 0x38]
jmp 0x14023bbfd
mov rax, qword [r13 + 8]
mov esi, dword [rax + 0x34]
movzx edi, byte [rax + 0x26]
sub esi, dword [rax + 0x38]
jmp 0x14023bc04
mov rcx, r13
call sym.unlockBtreeMutex
mov rax, qword [r13 + 8]
jmp 0x14023bc04
mov byte [rsi + 0x15], 1
jmp 0x14023bb65