	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function BlockSampler_Next
LCPI0_0:
	.quad	0x3ff0000000000000              ## double 1
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_BlockSampler_Next
	.p2align	4, 0x90
_BlockSampler_Next:                     ## @BlockSampler_Next
	.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, %r14
	movq	(%rdi), %r15
	movq	8(%rdi), %rbx
	movq	%r15, %r12
	subq	%rbx, %r12
	movslq	16(%rdi), %r13
	movslq	20(%rdi), %rax
	subq	%rax, %r13
	callq	_BlockSampler_HasMore
	movl	%eax, %edi
	callq	_Assert
	cmpq	%r13, %r12
	jle	LBB0_5
## %bb.1:
	movl	24(%r14), %edi
	callq	_sampler_random_fract
	cvtsi2sd	%r13d, %xmm1
	cvtsi2sd	%r12, %xmm2
	movapd	%xmm1, %xmm4
	divsd	%xmm2, %xmm4
	movsd	LCPI0_0(%rip), %xmm2            ## xmm2 = mem[0],zero
	movapd	%xmm2, %xmm3
	subsd	%xmm4, %xmm3
	ucomisd	%xmm0, %xmm3
	jbe	LBB0_5
## %bb.2:
	movq	8(%r14), %rax
	notq	%rbx
	addq	%r15, %rbx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	incq	%rax
	xorps	%xmm4, %xmm4
	cvtsi2sd	%rbx, %xmm4
	movapd	%xmm1, %xmm5
	divsd	%xmm4, %xmm5
	movapd	%xmm2, %xmm4
	subsd	%xmm5, %xmm4
	mulsd	%xmm4, %xmm3
	decq	%rbx
	ucomisd	%xmm0, %xmm3
	ja	LBB0_3
## %bb.4:
	movq	%rax, 8(%r14)
LBB0_5:
	incl	20(%r14)
	movq	8(%r14), %rax
	leaq	1(%rax), %rcx
	movq	%rcx, 8(%r14)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_BlockSampler_Next              ; -- Begin function BlockSampler_Next
	.p2align	2
_BlockSampler_Next:                     ; @BlockSampler_Next
	.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
	ldp	x20, x21, [x0]
	sub	x22, x20, x21
	ldpsw	x8, x9, [x0, #16]
	sub	x23, x8, x9
	bl	_BlockSampler_HasMore
	bl	_Assert
	cmp	x22, x23
	b.le	LBB0_5
; %bb.1:
	ldr	w0, [x19, #24]
	bl	_sampler_random_fract
	scvtf	d1, w23
	scvtf	d2, x22
	fdiv	d3, d1, d2
	fmov	d2, #1.00000000
	fsub	d3, d2, d3
	fcmp	d0, d3
	b.pl	LBB0_5
; %bb.2:
	ldr	x8, [x19, #8]
	mvn	x9, x21
	add	x9, x9, x20
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	scvtf	d4, x9
	add	x8, x8, #1
	fdiv	d4, d1, d4
	fsub	d4, d2, d4
	fmul	d3, d3, d4
	sub	x9, x9, #1
	fcmp	d0, d3
	b.mi	LBB0_3
; %bb.4:
	str	x8, [x19, #8]
LBB0_5:
	ldr	w8, [x19, #20]
	add	w8, w8, #1
	str	w8, [x19, #20]
	ldr	x0, [x19, #8]
	add	x8, x0, #1
	str	x8, [x19, #8]
	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
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
