	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vdbePmaWriterFinish
_vdbePmaWriterFinish:                   ## @vdbePmaWriterFinish
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	cmpl	$0, (%rdi)
	je	LBB0_1
LBB0_4:
	movq	8(%rbx), %rax
	addq	24(%rbx), %rax
	movq	%rax, (%r14)
	movq	32(%rbx), %rdi
	callq	_sqlite3_free
	movl	(%rbx), %r14d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$48, %edx
	callq	_memset
	movl	%r14d, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_1:
	movq	32(%rbx), %rdi
	callq	_ALWAYS
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movq	8(%rbx), %rdx
	movq	16(%rbx), %rcx
	subq	%rcx, %rdx
	jbe	LBB0_4
## %bb.3:
	movl	40(%rbx), %edi
	leaq	(,%rcx,4), %rsi
	addq	32(%rbx), %rsi
	addq	24(%rbx), %rcx
	callq	_sqlite3OsWrite
	movl	%eax, (%rbx)
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_vdbePmaWriterFinish
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vdbePmaWriterFinish
_vdbePmaWriterFinish:                   ; @vdbePmaWriterFinish
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	mov	x19, x0
	ldr	w8, [x0]
	cbz	w8, LBB0_2
LBB0_1:
	ldr	x8, [x19, #8]
	ldp	x9, x0, [x19, #24]
	add	x8, x8, x9
	str	x8, [x20]
	bl	_sqlite3_free
	ldr	w20, [x19]
	mov	x0, x19
	mov	w1, #0
	mov	w2, #48
	bl	_memset
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_2:
	ldr	x0, [x19, #32]
	bl	_ALWAYS
	cbz	x0, LBB0_1
; %bb.3:
	ldp	x9, x8, [x19, #8]
	subs	x2, x9, x8
	b.ls	LBB0_1
; %bb.4:
	ldr	w0, [x19, #40]
	ldp	x10, x9, [x19, #24]
	add	x1, x9, x8, lsl #2
	add	x3, x10, x8
	bl	_sqlite3OsWrite
	str	w0, [x19]
	b	LBB0_1
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_vdbePmaWriterFinish
.subsections_via_symbols
