	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function CreateDenseGrid
LCPI0_0:
	.quad	0x3fe0000000000000              ## double 0.5
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_CreateDenseGrid:                       ## @CreateDenseGrid
	.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
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	_GRIDDENSITY@GOTPCREL(%rip), %rax
	imull	(%rax), %edi
	movl	48(%rbp), %esi
	cvtsi2sd	%edi, %xmm2
	movsd	LCPI0_0(%rip), %xmm0            ## xmm0 = mem[0],zero
	movapd	%xmm0, %xmm1
	divsd	%xmm2, %xmm1
	movq	_NEGATIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %r11d
	cmpl	%esi, %r11d
	jne	LBB0_3
## %bb.1:
	ucomisd	(%rcx), %xmm1
	jbe	LBB0_3
## %bb.2:
	movsd	%xmm1, (%rcx)
LBB0_3:
	movq	24(%rbp), %r15
	testl	%edx, %edx
	jle	LBB0_13
## %bb.4:
	movq	40(%rbp), %r13
	movq	32(%rbp), %rbx
	movl	%edx, %r14d
	xorl	%edx, %edx
	xorl	%r10d, %r10d
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	%eax, %r10d
LBB0_12:                                ##   in Loop: Header=BB0_5 Depth=1
	movslq	%r10d, %rax
	movsd	%xmm2, -8(%r15,%rax,8)
	incq	%rdx
	cmpq	%r14, %rdx
	je	LBB0_13
LBB0_5:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_8 Depth 2
	movq	%rdx, %rdi
	shlq	$4, %rdi
	movsd	(%rcx,%rdi), %xmm2              ## xmm2 = mem[0],zero
	movslq	%r10d, %rax
	movsd	%xmm2, (%r15,%rax,8)
	movsd	(%rcx,%rdi), %xmm3              ## xmm3 = mem[0],zero
	movsd	8(%rcx,%rdi), %xmm2             ## xmm2 = mem[0],zero
	movapd	%xmm2, %xmm4
	subsd	%xmm3, %xmm4
	divsd	%xmm1, %xmm4
	addsd	%xmm0, %xmm4
	cvttsd2si	%xmm4, %r12d
	testl	%r12d, %r12d
	jle	LBB0_12
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	cmpl	$1, %r12d
	je	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	%r12d, %edi
	andl	$-2, %edi
	.p2align	4, 0x90
LBB0_8:                                 ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movsd	(%r8,%rdx,8), %xmm4             ## xmm4 = mem[0],zero
	movsd	%xmm4, (%rbx,%rax,8)
	movsd	(%r9,%rdx,8), %xmm4             ## xmm4 = mem[0],zero
	movsd	%xmm4, (%r13,%rax,8)
	movsd	%xmm3, (%r15,%rax,8)
	addsd	%xmm1, %xmm3
	movsd	(%r8,%rdx,8), %xmm4             ## xmm4 = mem[0],zero
	movsd	%xmm4, 8(%rbx,%rax,8)
	movsd	(%r9,%rdx,8), %xmm4             ## xmm4 = mem[0],zero
	movsd	%xmm4, 8(%r13,%rax,8)
	movsd	%xmm3, 8(%r15,%rax,8)
	addsd	%xmm1, %xmm3
	addq	$2, %rax
	addl	$-2, %edi
	jne	LBB0_8
LBB0_9:                                 ##   in Loop: Header=BB0_5 Depth=1
	testb	$1, %r12b
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_5 Depth=1
	movsd	(%r8,%rdx,8), %xmm4             ## xmm4 = mem[0],zero
	movsd	%xmm4, (%rbx,%rax,8)
	movsd	(%r9,%rdx,8), %xmm4             ## xmm4 = mem[0],zero
	movsd	%xmm4, (%r13,%rax,8)
	movsd	%xmm3, (%r15,%rax,8)
	incq	%rax
	jmp	LBB0_11
LBB0_13:
	cmpl	%esi, %r11d
	jne	LBB0_17
## %bb.14:
	testb	$1, -44(%rbp)                   ## 1-byte Folded Reload
	je	LBB0_17
## %bb.15:
	movq	16(%rbp), %rax
	movslq	(%rax), %rax
	movsd	-8(%r15,%rax,8), %xmm2          ## xmm2 = mem[0],zero
	subsd	%xmm1, %xmm0
	ucomisd	%xmm0, %xmm2
	jbe	LBB0_17
## %bb.16:
	movsd	%xmm0, -8(%r15,%rax,8)
LBB0_17:
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GRIDDENSITY,4,2                ## @GRIDDENSITY
	.comm	_NEGATIVE,4,2                   ## @NEGATIVE
	.no_dead_strip	_CreateDenseGrid
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function CreateDenseGrid
_CreateDenseGrid:                       ; @CreateDenseGrid
	.cfi_startproc
; %bb.0:
	ldr	w8, [sp, #16]
Lloh0:
	adrp	x9, _GRIDDENSITY@GOTPAGE
Lloh1:
	ldr	x9, [x9, _GRIDDENSITY@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	mul	w9, w9, w0
	scvtf	d0, w9
	fmov	d1, #0.50000000
	fdiv	d0, d1, d0
Lloh3:
	adrp	x9, _NEGATIVE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _NEGATIVE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w9, w8
	b.ne	LBB0_3
; %bb.1:
	ldr	d1, [x3]
	fcmp	d0, d1
	b.le	LBB0_3
; %bb.2:
	str	d0, [x3]
LBB0_3:
	cmp	w2, #1
	b.lt	LBB0_9
; %bb.4:
	mov	x10, #0
	mov	w11, #0
	ldp	x13, x12, [sp]
	mov	w14, w2
	fmov	d1, #0.50000000
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	sub	w15, w11, #1
	str	d2, [x7, w15, sxtw #3]
	add	x10, x10, #1
	cmp	x10, x14
	b.eq	LBB0_9
LBB0_6:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
	add	x15, x3, x10, lsl #4
	ldr	d2, [x15]
	str	d2, [x7, w11, sxtw #3]
	ldp	d3, d2, [x15]
	fsub	d4, d2, d3
	fdiv	d4, d4, d0
	fadd	d4, d4, d1
	fcvtzs	w15, d4
	cmp	w15, #1
	b.lt	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	sxtw	x16, w11
	lsl	x0, x16, #3
	add	x16, x13, x0
	add	x17, x12, x0
	add	x0, x7, x0
LBB0_8:                                 ;   Parent Loop BB0_6 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	lsl	x2, x10, #3
	ldr	d4, [x4, x2]
	str	d4, [x16], #8
	ldr	d4, [x5, x2]
	str	d4, [x17], #8
	str	d3, [x0], #8
	fadd	d3, d0, d3
	add	w11, w11, #1
	subs	w15, w15, #1
	b.ne	LBB0_8
	b	LBB0_5
LBB0_9:
	cmp	w9, w8
	b.ne	LBB0_13
; %bb.10:
	tbz	w1, #0, LBB0_13
; %bb.11:
	ldrsw	x8, [x6]
	sub	x8, x8, #1
	ldr	d1, [x7, x8, lsl #3]
	fmov	d2, #0.50000000
	fsub	d0, d2, d0
	fcmp	d1, d0
	b.le	LBB0_13
; %bb.12:
	str	d0, [x7, x8, lsl #3]
LBB0_13:
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_GRIDDENSITY,4,2                ; @GRIDDENSITY
	.comm	_NEGATIVE,4,2                   ; @NEGATIVE
	.no_dead_strip	_CreateDenseGrid
.subsections_via_symbols
