	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ntileValueFunc
_ntileValueFunc:                        ## @ntileValueFunc
	.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
	movq	%rdi, %rbx
	movl	$12, %esi
	callq	_sqlite3_aggregate_context
	testq	%rax, %rax
	je	LBB0_8
## %bb.1:
	movq	%rax, %rcx
	movl	(%rax), %esi
	testl	%esi, %esi
	jle	LBB0_8
## %bb.2:
	movl	4(%rcx), %r8d
	movl	%r8d, %eax
	cltd
	idivl	%esi
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	movl	%edx, %r14d
	movl	%eax, %r15d
	leal	1(%r15), %eax
	movl	%edx, %r13d
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	imull	%eax, %r13d
	movl	8(%rcx), %r12d
	subl	%edx, %esi
	imull	%r15d, %esi
	addl	%r13d, %esi
	xorl	%edi, %edi
	cmpl	%r8d, %esi
	sete	%dil
	callq	_assert
	movl	%r12d, %eax
	subl	%r13d, %eax
	jge	LBB0_6
## %bb.5:
	movl	%r12d, %eax
	cltd
	idivl	-44(%rbp)                       ## 4-byte Folded Reload
	movl	%eax, %esi
	incl	%esi
	jmp	LBB0_7
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movl	8(%rcx), %esi
	incl	%esi
	jmp	LBB0_7
LBB0_6:
	cltd
	idivl	%r15d
                                        ## kill: def $eax killed $eax def $rax
	leal	(%r14,%rax), %esi
	incl	%esi
LBB0_7:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_sqlite3_result_int64           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_ntileValueFunc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ntileValueFunc
_ntileValueFunc:                        ; @ntileValueFunc
	.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	x19, x0
	mov	w1, #12
	bl	_sqlite3_aggregate_context
	cbz	x0, LBB0_5
; %bb.1:
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.2:
	ldr	w9, [x0, #4]
	sdiv	w20, w9, w8
	cbz	w20, LBB0_6
; %bb.3:
	msub	w21, w20, w8, w9
	add	w22, w20, #1
	mul	w24, w21, w22
	ldr	w23, [x0, #8]
	sub	w8, w8, w21
	madd	w8, w8, w20, w24
	cmp	w8, w9
	cset	w0, eq
	bl	_assert
	subs	w8, w23, w24
	b.ge	LBB0_7
; %bb.4:
	sdiv	w8, w23, w22
	b	LBB0_8
LBB0_5:
	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_6:
	ldr	w8, [x0, #8]
	b	LBB0_8
LBB0_7:
	sdiv	w8, w8, w20
	add	w8, w21, w8
LBB0_8:
	add	w1, w8, #1
	mov	x0, x19
	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
	b	_sqlite3_result_int64
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_ntileValueFunc
.subsections_via_symbols
