	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function setupLookaside
_setupLookaside:                        ## @setupLookaside
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r12d
	movl	%edx, %ebx
	movq	%rsi, %r14
	movq	%rdi, %r15
	xorl	%esi, %esi
	callq	_sqlite3LookasideUsed
	testq	%rax, %rax
	jle	LBB0_2
## %bb.1:
	movq	_SQLITE_BUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_25
LBB0_2:
	cmpl	$0, (%r15)
	je	LBB0_4
## %bb.3:
	movq	24(%r15), %rdi
	callq	_sqlite3_free
LBB0_4:
	movl	%ebx, %edi
	callq	_ROUNDDOWN8
	movl	%eax, %r13d
	xorl	%eax, %eax
	cmpl	$9, %r13d
	movl	%r13d, %ebx
	cmovll	%eax, %ebx
	testl	%r12d, %r12d
	cmovlel	%eax, %r12d
	jle	LBB0_10
## %bb.5:
	testl	%ebx, %ebx
	je	LBB0_10
## %bb.6:
	testq	%r14, %r14
	je	LBB0_8
## %bb.7:
	movq	%r14, %rbx
	jmp	LBB0_12
LBB0_8:
	xorl	%eax, %eax
	callq	_sqlite3BeginBenignMalloc
	imull	%r12d, %ebx
	movl	%ebx, %edi
	callq	_sqlite3Malloc
	movq	%rax, %rbx
	xorl	%eax, %eax
	callq	_sqlite3EndBenignMalloc
	testq	%rbx, %rbx
	je	LBB0_9
## %bb.11:
	movq	%rbx, %rdi
	callq	_sqlite3MallocSize
	cltd
	idivl	%r13d
	movl	%eax, %r12d
LBB0_12:
	movq	%rbx, 24(%r15)
	movq	$0, 32(%r15)
	movq	$0, 48(%r15)
	movslq	%r13d, %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%rax, 40(%r15)
	xorl	%edi, %edi
	cmpl	$9, %r13d
	setge	%dil
	callq	_assert
	movl	%r12d, 4(%r15)
	testl	%r12d, %r12d
	jle	LBB0_23
## %bb.13:
	movq	32(%r15), %rax
	leal	-1(%r12), %ecx
	movl	%r12d, %edi
	andl	$7, %edi
	je	LBB0_14
## %bb.15:
	movq	-48(%rbp), %r8                  ## 8-byte Reload
	leaq	(,%r8,4), %rsi
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movq	%rax, 56(%rbx)
	movq	%rbx, %rax
	addq	%rsi, %rbx
	incl	%edx
	cmpl	%edx, %edi
	jne	LBB0_16
## %bb.17:
	movq	%rbx, %rax
	subq	%rsi, %rax
	subl	%edx, %r12d
	cmpl	$7, %ecx
	jae	LBB0_19
	jmp	LBB0_22
LBB0_14:
	movq	-48(%rbp), %r8                  ## 8-byte Reload
	cmpl	$7, %ecx
	jb	LBB0_22
LBB0_19:
	movq	%r8, %rcx
	shlq	$5, %rcx
	decl	%r12d
	leaq	56(,%r8,4), %rdx
	.p2align	4, 0x90
LBB0_20:                                ## =>This Inner Loop Header: Depth=1
	movq	%rax, 56(%rbx)
	leaq	(%rbx,%rdx), %rax
	movq	%rbx, (%rbx,%rdx)
	leaq	(%rbx,%rdx), %rsi
	addq	$-56, %rsi
	leaq	-56(%rdx,%rax), %rdi
	movq	%rsi, -56(%rdx,%rax)
	leaq	-112(%rdx,%rax), %rax
	leaq	-56(%rdx,%rdi), %rsi
	movq	%rax, -56(%rdx,%rdi)
	leaq	-112(%rdx,%rdi), %rax
	leaq	-56(%rdx,%rsi), %rdi
	movq	%rax, -56(%rdx,%rsi)
	leaq	-112(%rdx,%rsi), %rax
	leaq	-56(%rdx,%rdi), %rsi
	movq	%rax, -56(%rdx,%rdi)
	leaq	-112(%rdx,%rdi), %rax
	leaq	-56(%rdx,%rsi), %rdi
	movq	%rax, -56(%rdx,%rsi)
	leaq	(%rdx,%rsi), %rax
	addq	$-112, %rax
	movq	%rax, -56(%rdx,%rdi)
	addq	%rcx, %rbx
	addl	$-8, %r12d
	leaq	(%rdx,%rdi), %rax
	addq	$-112, %rax
	cmpl	$-2, %r12d
	jb	LBB0_20
## %bb.21:
	shlq	$2, %r8
	movq	%rbx, %rax
	subq	%r8, %rax
LBB0_22:
	movq	%rax, 32(%r15)
LBB0_23:
	xorl	%eax, %eax
	testq	%r14, %r14
	sete	%al
	movq	%rbx, 16(%r15)
	movl	$0, 8(%r15)
	movl	%eax, (%r15)
	jmp	LBB0_24
LBB0_9:
	movl	%r13d, %eax
LBB0_10:
	movq	$0, 48(%r15)
	cltq
	movq	$0, 32(%r15)
	movq	%rax, 40(%r15)
	movq	%r15, 24(%r15)
	movq	%r15, 16(%r15)
	movl	$1, 8(%r15)
	movq	$0, (%r15)
LBB0_24:
	movq	_SQLITE_OK@GOTPCREL(%rip), %rax
LBB0_25:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SQLITE_BUSY,4,2                ## @SQLITE_BUSY
	.comm	_SQLITE_OK,4,2                  ## @SQLITE_OK
	.no_dead_strip	_setupLookaside
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function setupLookaside
_setupLookaside:                        ; @setupLookaside
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x3
	mov	x22, x2
	mov	x20, x1
	mov	x19, x0
	mov	w1, #0
	bl	_sqlite3LookasideUsed
	cmp	x0, #0
	b.le	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _SQLITE_BUSY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SQLITE_BUSY@GOTPAGEOFF]
	b	LBB0_17
LBB0_2:
	ldr	w8, [x19]
	cbz	w8, LBB0_4
; %bb.3:
	ldr	x0, [x19, #24]
	bl	_sqlite3_free
LBB0_4:
	mov	x0, x22
	bl	_ROUNDDOWN8
	mov	w8, #0
	cmp	w0, #9
	csel	w24, wzr, w0, lt
	cmp	w21, #0
	csel	w23, w21, wzr, gt
	cmp	w21, #1
	b.lt	LBB0_15
; %bb.5:
	cbz	w24, LBB0_15
; %bb.6:
	mov	x22, x0
	mov	x21, x20
	cbnz	x20, LBB0_9
; %bb.7:
	bl	_sqlite3BeginBenignMalloc
	mul	w0, w24, w23
	bl	_sqlite3Malloc
	mov	x21, x0
	bl	_sqlite3EndBenignMalloc
	cbz	x21, LBB0_14
; %bb.8:
	mov	x0, x21
	bl	_sqlite3MallocSize
	sdiv	w23, w0, w22
LBB0_9:
	stp	x21, xzr, [x19, #24]
	sxtw	x24, w22
	stp	x24, xzr, [x19, #40]
	cmp	w22, #8
	cset	w0, gt
	bl	_assert
	str	w23, [x19, #4]
	cmp	w23, #1
	b.lt	LBB0_13
; %bb.10:
	ldr	x10, [x19, #32]
	lsl	x8, x24, #2
	add	w9, w23, #1
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	str	x10, [x21, #56]
	mov	x10, x21
	add	x21, x21, x8
	sub	w9, w9, #1
	cmp	w9, #1
	b.hi	LBB0_11
; %bb.12:
	sub	x8, x21, x24, lsl #2
	str	x8, [x19, #32]
LBB0_13:
	cmp	x20, #0
	cset	w8, eq
	str	x21, [x19, #16]
	str	wzr, [x19, #8]
	str	w8, [x19]
	b	LBB0_16
LBB0_14:
	mov	x8, x22
LBB0_15:
	sxtw	x8, w8
	stp	x19, xzr, [x19, #24]
	stp	x8, xzr, [x19, #40]
	str	x19, [x19, #16]
	mov	w8, #1
	str	w8, [x19, #8]
	str	xzr, [x19]
LBB0_16:
Lloh2:
	adrp	x8, _SQLITE_OK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SQLITE_OK@GOTPAGEOFF]
LBB0_17:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_SQLITE_BUSY,4,2                ; @SQLITE_BUSY
	.comm	_SQLITE_OK,4,2                  ; @SQLITE_OK
	.no_dead_strip	_setupLookaside
.subsections_via_symbols
