	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fetchPayload
_fetchPayload:                          ## @fetchPayload
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	xorl	%edi, %edi
	testq	%rbx, %rbx
	je	LBB0_3
## %bb.1:
	cmpq	$0, (%rbx)
	js	LBB0_3
## %bb.2:
	xorl	%edi, %edi
	cmpq	$0, 48(%rbx)
	setne	%dil
LBB0_3:
	callq	_assert
	movq	8(%rbx), %rax
	movq	_CURSOR_VALID@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	sete	%dil
	callq	_assert
	movq	56(%rbx), %rax
	movq	(%rax), %rax
	movl	(%rax), %edi
	callq	_sqlite3_mutex_held
	movl	%eax, %edi
	callq	_assert
	movq	%rbx, %rdi
	callq	_cursorOwnsBtShared
	movl	%eax, %edi
	callq	_assert
	movq	16(%rbx), %rax
	movq	48(%rbx), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	setl	%dil
	callq	_assert
	xorl	%edi, %edi
	cmpq	$0, 24(%rbx)
	setg	%dil
	callq	_assert
	movq	32(%rbx), %rax
	movq	48(%rbx), %rcx
	cmpq	8(%rcx), %rax
	setg	%al
	movq	_CORRUPT_DB@GOTPCREL(%rip), %r15
	cmpl	$0, (%r15)
	setne	%cl
	orb	%al, %cl
	movzbl	%cl, %edi
	callq	_assert
	movq	32(%rbx), %rax
	movq	48(%rbx), %rcx
	cmpq	16(%rcx), %rax
	setl	%al
	cmpl	$0, (%r15)
	setne	%cl
	orb	%al, %cl
	movzbl	%cl, %edi
	callq	_assert
	movl	40(%rbx), %eax
	movq	48(%rbx), %rcx
	movl	16(%rcx), %ecx
	subl	32(%rbx), %ecx
	cmpl	%ecx, %eax
	jle	LBB0_5
## %bb.4:
	movl	(%r15), %edi
	callq	_assert
	movq	48(%rbx), %rax
	movl	16(%rax), %esi
	subl	32(%rbx), %esi
	xorl	%edi, %edi
	callq	_MAX
LBB0_5:
	cltq
	movq	%rax, (%r14)
	movq	32(%rbx), %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CURSOR_VALID,8,3               ## @CURSOR_VALID
	.comm	_CORRUPT_DB,4,2                 ## @CORRUPT_DB
	.no_dead_strip	_fetchPayload
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fetchPayload
_fetchPayload:                          ; @fetchPayload
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x1
	mov	x19, x0
	cbz	x0, LBB0_4
; %bb.1:
	ldr	x8, [x19]
	tbnz	x8, #63, LBB0_3
; %bb.2:
	ldr	x8, [x19, #48]
	cmp	x8, #0
	cset	w0, ne
	b	LBB0_4
LBB0_3:
	mov	w0, #0
LBB0_4:
	bl	_assert
	ldr	x8, [x19, #8]
Lloh0:
	adrp	x9, _CURSOR_VALID@GOTPAGE
Lloh1:
	ldr	x9, [x9, _CURSOR_VALID@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, eq
	bl	_assert
	ldr	x8, [x19, #56]
	ldr	x8, [x8]
	ldr	w0, [x8]
	bl	_sqlite3_mutex_held
	bl	_assert
	mov	x0, x19
	bl	_cursorOwnsBtShared
	bl	_assert
	ldr	x8, [x19, #16]
	ldr	x9, [x19, #48]
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, lt
	bl	_assert
	ldr	x8, [x19, #24]
	cmp	x8, #0
	cset	w0, gt
	bl	_assert
	ldr	x8, [x19, #32]
	ldr	x9, [x19, #48]
	ldr	x9, [x9, #8]
	cmp	x8, x9
Lloh3:
	adrp	x21, _CORRUPT_DB@GOTPAGE
Lloh4:
	ldr	x21, [x21, _CORRUPT_DB@GOTPAGEOFF]
	ldr	w8, [x21]
	ccmp	w8, #0, #0, le
	cset	w0, ne
	bl	_assert
	ldr	x8, [x19, #32]
	ldr	x9, [x19, #48]
	ldr	x9, [x9, #16]
	cmp	x8, x9
	ldr	w8, [x21]
	ccmp	w8, #0, #0, ge
	cset	w0, ne
	bl	_assert
	ldr	w0, [x19, #40]
	ldr	x8, [x19, #48]
	ldr	w8, [x8, #16]
	ldr	w9, [x19, #32]
	sub	w8, w8, w9
	cmp	w0, w8
	b.le	LBB0_6
; %bb.5:
	ldr	w0, [x21]
	bl	_assert
	ldr	x8, [x19, #48]
	ldr	w8, [x8, #16]
	ldr	w9, [x19, #32]
	sub	w1, w8, w9
	mov	w0, #0
	bl	_MAX
                                        ; kill: def $w0 killed $w0 def $x0
LBB0_6:
	sxtw	x8, w0
	str	x8, [x20]
	ldr	x0, [x19, #32]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_CURSOR_VALID,8,3               ; @CURSOR_VALID
	.comm	_CORRUPT_DB,4,2                 ; @CORRUPT_DB
	.no_dead_strip	_fetchPayload
.subsections_via_symbols
