	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function nth_valueStepFunc
LCPI0_0:
	.quad	0x3ff0000000000000              ## double 1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_nth_valueStepFunc:                     ## @nth_valueStepFunc
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r12
	movl	%esi, %r14d
	movq	%rdi, %r15
	movl	$16, %esi
	callq	_sqlite3_aggregate_context
	testq	%rax, %rax
	je	LBB0_9
## %bb.1:
	movq	%rax, %rbx
	movq	8(%r12), %rdi
	callq	_sqlite3_value_numeric_type
	cmpl	$129, %eax
	je	LBB0_4
## %bb.2:
	cmpl	$128, %eax
	jne	LBB0_10
## %bb.3:
	movq	8(%r12), %rdi
	callq	_sqlite3_value_int64
	jmp	LBB0_5
LBB0_4:
	movq	8(%r12), %rdi
	callq	_sqlite3_value_double
	ucomisd	%xmm0, %xmm0
	jp	LBB0_10
LBB0_5:
	xorpd	%xmm1, %xmm1
	ucomisd	%xmm0, %xmm1
	jae	LBB0_10
## %bb.6:
	movsd	(%rbx), %xmm1                   ## xmm1 = mem[0],zero
	addsd	LCPI0_0(%rip), %xmm1
	movsd	%xmm1, (%rbx)
	ucomisd	%xmm1, %xmm0
	jne	LBB0_9
	jp	LBB0_9
## %bb.7:
	movq	(%r12), %rdi
	callq	_sqlite3_value_dup
	movl	%eax, 8(%rbx)
	testl	%eax, %eax
	jne	LBB0_9
## %bb.8:
	movq	%r15, %rdi
	callq	_sqlite3_result_error_nomem
LBB0_9:
	movl	%r14d, %edi
	callq	_UNUSED_PARAMETER
	movl	%r12d, %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_UNUSED_PARAMETER               ## TAILCALL
LBB0_10:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movl	$-1, %edx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_sqlite3_result_error           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"second argument to nth_value must be a positive integer"

	.no_dead_strip	_nth_valueStepFunc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nth_valueStepFunc
_nth_valueStepFunc:                     ; @nth_valueStepFunc
	.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	x19, x2
	mov	x20, x1
	mov	x21, x0
	mov	w1, #16
	bl	_sqlite3_aggregate_context
	cbz	x0, LBB0_9
; %bb.1:
	mov	x22, x0
	ldr	x0, [x19, #8]
	bl	_sqlite3_value_numeric_type
	cmp	w0, #129
	b.eq	LBB0_4
; %bb.2:
	cmp	w0, #128
	b.ne	LBB0_10
; %bb.3:
	ldr	x0, [x19, #8]
	bl	_sqlite3_value_int64
	b	LBB0_5
LBB0_4:
	ldr	x0, [x19, #8]
	bl	_sqlite3_value_double
	fcmp	d0, d0
	b.vs	LBB0_10
LBB0_5:
	fcmp	d0, #0.0
	b.ls	LBB0_10
; %bb.6:
	ldr	d1, [x22]
	fmov	d2, #1.00000000
	fadd	d1, d1, d2
	str	d1, [x22]
	fcmp	d0, d1
	b.ne	LBB0_9
; %bb.7:
	ldr	x0, [x19]
	bl	_sqlite3_value_dup
	str	w0, [x22, #8]
	cbnz	w0, LBB0_9
; %bb.8:
	mov	x0, x21
	bl	_sqlite3_result_error_nomem
LBB0_9:
	mov	x0, x20
	bl	_UNUSED_PARAMETER
	mov	x0, x19
	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
	b	_UNUSED_PARAMETER
LBB0_10:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	mov	w2, #-1
	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
	b	_sqlite3_result_error
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"second argument to nth_value must be a positive integer"

	.no_dead_strip	_nth_valueStepFunc
.subsections_via_symbols
