	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function adjust_grid
LCPI0_0:
	.quad	0x3f947ae147ae147b              ## double 0.02
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_adjust_grid
	.p2align	4, 0x90
_adjust_grid:                           ## @adjust_grid
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_GRIDH@GOTPCREL(%rip), %rax
	movl	(%rax), %r10d
	testl	%r10d, %r10d
	jle	LBB0_8
## %bb.1:
	movq	_GRIDW@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_p@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	_vertex@GOTPCREL(%rip), %rax
	movq	(%rax), %r8
	movslq	%r14d, %r9
	movl	%r9d, %edi
	andl	$-2, %edi
	leaq	4(%r8), %rsi
	leaq	(,%r9,4), %r11
	xorl	%eax, %eax
	movsd	LCPI0_0(%rip), %xmm0            ## xmm0 = mem[0],zero
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%rax
	addq	%r11, %rsi
	cmpq	%r10, %rax
	je	LBB0_8
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	testl	%r14d, %r14d
	jle	LBB0_7
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%ebx, %ebx
	cmpl	$1, %r14d
	je	LBB0_5
	.p2align	4, 0x90
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%rdx,%rbx,8), %rcx
	movsd	(%rcx,%rax,8), %xmm1            ## xmm1 = mem[0],zero
	mulsd	%xmm0, %xmm1
	cvtsd2ss	%xmm1, %xmm1
	movss	%xmm1, -4(%rsi,%rbx,4)
	movq	8(%rdx,%rbx,8), %rcx
	movsd	(%rcx,%rax,8), %xmm1            ## xmm1 = mem[0],zero
	mulsd	%xmm0, %xmm1
	cvtsd2ss	%xmm1, %xmm1
	movss	%xmm1, (%rsi,%rbx,4)
	addq	$2, %rbx
	cmpq	%rbx, %rdi
	jne	LBB0_4
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	testb	$1, %r14b
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, %rcx
	imulq	%r9, %rcx
	addq	%rbx, %rcx
	movq	(%rdx,%rbx,8), %rbx
	movsd	(%rbx,%rax,8), %xmm1            ## xmm1 = mem[0],zero
	mulsd	%xmm0, %xmm1
	cvtsd2ss	%xmm1, %xmm1
	movss	%xmm1, (%r8,%rcx,4)
	jmp	LBB0_7
LBB0_8:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GRIDH,4,2                      ## @GRIDH
	.comm	_GRIDW,4,2                      ## @GRIDW
	.comm	_p,8,3                          ## @p
	.comm	_vertex,8,3                     ## @vertex
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_adjust_grid                    ; -- Begin function adjust_grid
	.p2align	2
_adjust_grid:                           ; @adjust_grid
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _GRIDH@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GRIDH@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.1:
	mov	x9, #0
Lloh3:
	adrp	x10, _GRIDW@GOTPAGE
Lloh4:
	ldr	x10, [x10, _GRIDW@GOTPAGEOFF]
Lloh5:
	adrp	x11, _p@GOTPAGE
Lloh6:
	ldr	x11, [x11, _p@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x10]
Lloh8:
	ldr	x11, [x11]
Lloh9:
	adrp	x12, _vertex@GOTPAGE
Lloh10:
	ldr	x12, [x12, _vertex@GOTPAGEOFF]
Lloh11:
	ldr	x12, [x12]
	sxtw	x15, w10
	and	x13, x10, #0xfffffffc
	add	x14, x11, #16
	lsl	x15, x15, #2
	mov	x16, #5243
	movk	x16, #18350, lsl #16
	movk	x16, #31457, lsl #32
	movk	x16, #16276, lsl #48
	dup.2d	v0, x16
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x9, x9, #1
	add	x12, x12, x15
	cmp	x9, x8
	b.eq	LBB0_10
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
                                        ;     Child Loop BB0_9 Depth 2
	cmp	w10, #1
	b.lt	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	cmp	w10, #4
	b.hs	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x17, #0
	b	LBB0_9
LBB0_6:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x17, x13
	mov	x0, x12
	mov	x1, x14
LBB0_7:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldp	x2, x3, [x1, #-16]
	ldp	x4, x5, [x1], #32
	lsl	x6, x9, #3
	add	x3, x3, x6
	add	x5, x5, x6
	ldr	d1, [x2, x6]
	ld1.d	{ v1 }[1], [x3]
	ldr	d2, [x4, x6]
	ld1.d	{ v2 }[1], [x5]
	fmul.2d	v2, v2, v0
	fmul.2d	v1, v1, v0
	fcvtn	v1.2s, v1.2d
	fcvtn2	v1.4s, v2.2d
	str	q1, [x0], #16
	subs	x17, x17, #4
	b.ne	LBB0_7
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x17, x13
	cmp	x13, x10
	b.eq	LBB0_2
LBB0_9:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x0, [x11, x17, lsl #3]
	ldr	d1, [x0, x9, lsl #3]
	fmov	d2, x16
	fmul	d1, d1, d2
	fcvt	s1, d1
	str	s1, [x12, x17, lsl #2]
	add	x17, x17, #1
	cmp	x10, x17
	b.ne	LBB0_9
	b	LBB0_2
LBB0_10:
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_GRIDH,4,2                      ; @GRIDH
	.comm	_GRIDW,4,2                      ; @GRIDW
	.comm	_p,8,3                          ; @p
	.comm	_vertex,8,3                     ; @vertex
.subsections_via_symbols
