	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vdbePmaReaderSeek
_vdbePmaReaderSeek:                     ## @vdbePmaReaderSeek
	.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
	movq	%rdx, %r15
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	32(%rsi), %rax
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	xorl	%edi, %edi
	cmpq	$0, (%rax)
	sete	%dil
	jmp	LBB0_3
LBB0_2:
	movl	$1, %edi
LBB0_3:
	callq	_assert
	movl	$201, %edi
	callq	_sqlite3FaultSim
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	_SQLITE_IOERR_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	jmp	LBB0_11
LBB0_5:
	movq	(%rbx), %rdx
	testq	%rdx, %rdx
	je	LBB0_7
## %bb.6:
	movl	24(%rbx), %edi
	xorl	%esi, %esi
	callq	_sqlite3OsUnfetch
	movq	$0, (%rbx)
LBB0_7:
	movl	%r12d, 8(%rbx)
	movl	4(%r15), %eax
	movl	%eax, 28(%rbx)
	movl	(%r15), %eax
	movl	%eax, 24(%rbx)
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%rbx, %rdx
	callq	_vdbeSorterMapFile
	movl	%eax, %r12d
	movq	_SQLITE_OK@GOTPCREL(%rip), %r15
	cmpl	(%r15), %eax
	jne	LBB0_10
## %bb.8:
	cmpq	$0, (%rbx)
	je	LBB0_12
LBB0_10:
	movl	%r12d, %r13d
LBB0_11:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movq	(%r14), %rax
	movl	(%rax), %r14d
	movl	8(%rbx), %eax
	cltd
	idivl	%r14d
	movl	%edx, %esi
	movq	16(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:
	movl	%r12d, %r13d
	cmpl	%r12d, %r13d
	je	LBB0_17
	jmp	LBB0_11
LBB0_14:
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movl	%r14d, %edi
	callq	_sqlite3Malloc
	movq	%rax, 16(%rbx)
	testq	%rax, %rax
	jne	LBB0_16
## %bb.15:
	movq	_SQLITE_NOMEM_BKPT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r12d
LBB0_16:
	movl	%r12d, %r13d
	movl	%r14d, 12(%rbx)
	movl	(%r15), %r12d
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	cmpl	%r12d, %r13d
	jne	LBB0_11
LBB0_17:
	testl	%esi, %esi
	je	LBB0_11
## %bb.18:
	subl	%esi, %r14d
	movl	8(%rbx), %ecx
	movl	24(%rbx), %edi
	leal	(%rcx,%r14), %r8d
	movl	28(%rbx), %ebx
	movl	%ebx, %edx
	subl	%ecx, %edx
	cmpl	%ebx, %r8d
	cmovlel	%r14d, %edx
	movslq	%esi, %rsi
	leaq	(%rax,%rsi,4), %rsi
                                        ## kill: def $ecx killed $ecx killed $rcx
	callq	_sqlite3OsRead
	movl	%eax, %r13d
	xorl	%edi, %edi
	cmpl	(%r15), %eax
	setne	%dil
	callq	_testcase
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_SQLITE_OK,4,2                  ## @SQLITE_OK
	.comm	_SQLITE_IOERR_READ,4,2          ## @SQLITE_IOERR_READ
	.comm	_SQLITE_NOMEM_BKPT,4,2          ## @SQLITE_NOMEM_BKPT
	.no_dead_strip	_vdbePmaReaderSeek
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vdbePmaReaderSeek
_vdbePmaReaderSeek:                     ; @vdbePmaReaderSeek
	.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	x22, x3
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
	ldr	x8, [x1, #32]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	x8, [x8]
	cmp	x8, #0
	cset	w0, eq
	b	LBB0_3
LBB0_2:
	mov	w0, #1
LBB0_3:
	bl	_assert
	mov	w0, #201
	bl	_sqlite3FaultSim
	cbz	x0, LBB0_5
; %bb.4:
Lloh0:
	adrp	x8, _SQLITE_IOERR_READ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SQLITE_IOERR_READ@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
	b	LBB0_10
LBB0_5:
	ldr	x2, [x19]
	cbz	x2, LBB0_7
; %bb.6:
	ldr	w0, [x19, #24]
	mov	w1, #0
	bl	_sqlite3OsUnfetch
	str	xzr, [x19]
LBB0_7:
	str	w22, [x19, #8]
	ldr	d0, [x21]
	str	d0, [x19, #24]
	mov	x0, x20
	mov	x1, x21
	mov	x2, x19
	bl	_vdbeSorterMapFile
	mov	x22, x0
Lloh3:
	adrp	x23, _SQLITE_OK@GOTPAGE
Lloh4:
	ldr	x23, [x23, _SQLITE_OK@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w0, w8
	b.ne	LBB0_9
; %bb.8:
	ldr	x8, [x19]
	cbz	x8, LBB0_11
LBB0_9:
	mov	x20, x22
LBB0_10:
	mov	x0, x20
	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
LBB0_11:
	ldr	x8, [x20]
	ldr	w21, [x8]
	ldr	w24, [x19, #8]
	ldr	x0, [x19, #16]
	mov	x20, x22
	cbnz	x0, LBB0_13
; %bb.12:
	mov	x0, x21
	bl	_sqlite3Malloc
Lloh5:
	adrp	x8, _SQLITE_NOMEM_BKPT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SQLITE_NOMEM_BKPT@GOTPAGEOFF]
	str	x0, [x19, #16]
Lloh7:
	ldr	w8, [x8]
	cmp	x0, #0
	csel	w20, w8, w22, eq
	str	w21, [x19, #12]
	ldr	w22, [x23]
LBB0_13:
	cmp	w20, w22
	b.ne	LBB0_10
; %bb.14:
	sdiv	w8, w24, w21
	msub	w9, w8, w21, w24
	cbz	w9, LBB0_10
; %bb.15:
	ldr	w3, [x19, #8]
	sub	w10, w21, w9
	add	w11, w3, w10
	ldp	w8, w12, [x19, #24]
	sub	w13, w12, w3
	cmp	w11, w12
	csel	w2, w13, w10, gt
	add	x1, x0, w9, sxtw #2
	mov	x0, x8
	bl	_sqlite3OsRead
	mov	x20, x0
	ldr	w8, [x23]
	cmp	w0, w8
	cset	w0, ne
	bl	_testcase
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_SQLITE_OK,4,2                  ; @SQLITE_OK
	.comm	_SQLITE_IOERR_READ,4,2          ; @SQLITE_IOERR_READ
	.comm	_SQLITE_NOMEM_BKPT,4,2          ; @SQLITE_NOMEM_BKPT
	.no_dead_strip	_vdbePmaReaderSeek
.subsections_via_symbols
