	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function allocateCursor
_allocateCursor:                        ## @allocateCursor
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %ebx
	movl	%ecx, -52(%rbp)                 ## 4-byte Spill
	movl	%edx, %r15d
	movq	%rdi, %r13
	movslq	(%rdi), %r12
	movslq	%esi, %rcx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	subq	%rcx, %r12
	shlq	$3, %r12
	addq	16(%rdi), %r12
	movl	$24, %edi
	callq	_ROUND8
	movl	%eax, %r14d
	movl	%ebx, -56(%rbp)                 ## 4-byte Spill
	testl	%ebx, %ebx
	je	LBB0_1
## %bb.2:
	xorl	%eax, %eax
	callq	_sqlite3BtreeCursorSize
	jmp	LBB0_3
LBB0_1:
	xorl	%eax, %eax
LBB0_3:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	leal	(%r15,%r15), %ecx
	movslq	%ecx, %rcx
	shlq	$2, %rcx
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	addl	%ecx, %r14d
	addl	%eax, %r14d
	xorl	%edi, %edi
	cmpl	%ebx, 4(%r13)
	setg	%dil
	callq	_assert
	movq	8(%r13), %rax
	movq	(%rax,%rbx,8), %rsi
	testq	%rsi, %rsi
	je	LBB0_5
## %bb.4:
	movq	%r13, %rdi
	callq	_sqlite3VdbeFreeCursor
	movq	8(%r13), %rax
	movq	$0, (%rax,%rbx,8)
LBB0_5:
	movq	_SQLITE_OK@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	xorl	%ebx, %ebx
	movq	%r12, %rdi
	movl	%r14d, %esi
	xorl	%edx, %edx
	callq	_sqlite3VdbeMemGrow
	cmpq	%rax, %r15
	jne	LBB0_10
## %bb.6:
	movq	(%r12), %rbx
	movq	8(%r13), %rax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	%rbx, (%rax,%rcx,8)
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$24, %edx
	callq	_memset
	movl	-52(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%rbx)
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	%eax, 4(%rbx)
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movq	(%r12), %r14
	movl	$24, %edi
	callq	_ROUND8
	cltq
	leaq	(%r14,%rax,4), %rax
	movq	%rax, 16(%rbx)
LBB0_8:
	cmpl	$0, -56(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_10
## %bb.9:
	movq	(%r12), %r14
	movl	$24, %edi
	callq	_ROUND8
	cltq
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	addq	%rax, %rcx
	leaq	(%r14,%rcx,4), %rdi
	movq	%rdi, 8(%rbx)
	callq	_sqlite3BtreeCursorZero
LBB0_10:
	movq	%rbx, %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SQLITE_OK,8,3                  ## @SQLITE_OK
	.no_dead_strip	_allocateCursor
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function allocateCursor
_allocateCursor:                        ; @allocateCursor
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x4
	mov	x21, x3
	mov	x20, x2
	mov	x24, x1
	mov	x23, x0
	ldr	x22, [x0, #16]
	ldr	w8, [x0]
	sub	w26, w8, w1
	mov	w0, #24
	bl	_ROUND8
	mov	x25, x0
	cbz	w19, LBB0_2
; %bb.1:
	bl	_sqlite3BtreeCursorSize
	b	LBB0_3
LBB0_2:
	mov	w0, #0
LBB0_3:
	add	x22, x22, w26, sxtw #3
	lsl	w8, w20, #1
	sbfiz	x26, x8, #2, #32
	add	w8, w25, w26
	add	w25, w8, w0
	ldr	w8, [x23, #4]
	cmp	w8, w24
	cset	w0, gt
	bl	_assert
	ldr	x8, [x23, #8]
	sxtw	x27, w24
	ldr	x1, [x8, w24, sxtw #3]
	cbz	x1, LBB0_5
; %bb.4:
	mov	x0, x23
	bl	_sqlite3VdbeFreeCursor
	ldr	x8, [x23, #8]
	str	xzr, [x8, x27, lsl #3]
LBB0_5:
Lloh0:
	adrp	x8, _SQLITE_OK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SQLITE_OK@GOTPAGEOFF]
Lloh2:
	ldr	x24, [x8]
	mov	x0, x22
	mov	x1, x25
	mov	w2, #0
	bl	_sqlite3VdbeMemGrow
	cmp	x24, x0
	b.ne	LBB0_10
; %bb.6:
	ldr	x24, [x22]
	ldr	x8, [x23, #8]
	str	x24, [x8, x27, lsl #3]
	mov	x0, x24
	mov	w1, #0
	mov	w2, #24
	bl	_memset
	stp	w21, w20, [x24]
	cbz	w20, LBB0_8
; %bb.7:
	ldr	x20, [x22]
	mov	w0, #24
	bl	_ROUND8
	add	x8, x20, w0, sxtw #2
	str	x8, [x24, #16]
LBB0_8:
	cbz	w19, LBB0_11
; %bb.9:
	ldr	x19, [x22]
	mov	w0, #24
	bl	_ROUND8
	add	x8, x26, w0, sxtw
	add	x0, x19, x8, lsl #2
	str	x0, [x24, #8]
	bl	_sqlite3BtreeCursorZero
	b	LBB0_11
LBB0_10:
	mov	x24, #0
LBB0_11:
	mov	x0, x24
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_SQLITE_OK,8,3                  ; @SQLITE_OK
	.no_dead_strip	_allocateCursor
.subsections_via_symbols
