	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_R_GridInsertColumn             ## -- Begin function R_GridInsertColumn
	.p2align	4, 0x90
_R_GridInsertColumn:                    ## @R_GridInsertColumn
	.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
	subq	$168, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movss	%xmm0, -84(%rbp)                ## 4-byte Spill
	movl	%ecx, -88(%rbp)                 ## 4-byte Spill
	movl	%edx, %r15d
	movl	%esi, -52(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MAX_GRID_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%rbx, %rax
	imulq	%rbx, %rax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -96(%rbp)                 ## 8-byte Spill
	leaq	(,%rbx,8), %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	movl	(%r14), %ecx
	cmpl	%ebx, %ecx
	jge	LBB0_21
## %bb.1:
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	leal	1(%rcx), %eax
	movl	%eax, -64(%rbp)                 ## 4-byte Spill
	movl	4(%r14), %eax
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	movl	%eax, %r11d
	testl	%ecx, %ecx
	js	LBB0_22
## %bb.2:
	movl	%r15d, %eax
	movq	%rax, -200(%rbp)                ## 8-byte Spill
	movl	-52(%rbp), %r8d                 ## 4-byte Reload
	movl	-64(%rbp), %eax                 ## 4-byte Reload
	movq	%rax, -168(%rbp)                ## 8-byte Spill
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%r8,4), %rcx
	movq	%rcx, -136(%rbp)                ## 8-byte Spill
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movq	%rcx, %rdx
	shlq	$4, %rdx
	movq	%rdx, -184(%rbp)                ## 8-byte Spill
	leaq	(,%rcx,4), %r15
	leaq	(%r15,%r15,2), %rcx
	movq	%rcx, -176(%rbp)                ## 8-byte Spill
	xorl	%r13d, %r13d
	movq	%rax, %r9
	movl	-60(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, %r11d
	xorl	%r10d, %r10d
	movq	%r8, -104(%rbp)                 ## 8-byte Spill
	movq	%r12, -112(%rbp)                ## 8-byte Spill
	movq	%r14, -144(%rbp)                ## 8-byte Spill
	movq	%r15, -128(%rbp)                ## 8-byte Spill
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_5 Depth=1
	incl	%r10d
LBB0_4:                                 ##   in Loop: Header=BB0_5 Depth=1
	incq	%r13
	addq	$4, %r9
	cmpq	-168(%rbp), %r13                ## 8-byte Folded Reload
	je	LBB0_22
LBB0_5:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_17 Depth 2
                                        ##     Child Loop BB0_20 Depth 2
                                        ##     Child Loop BB0_9 Depth 2
	cmpq	%r8, %r13
	jne	LBB0_11
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	testl	%r11d, %r11d
	jle	LBB0_15
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	%r10d, -56(%rbp)                ## 4-byte Spill
	movq	%r9, -80(%rbp)                  ## 8-byte Spill
	movq	%r13, %r12
	movq	-136(%rbp), %rbx                ## 8-byte Reload
	xorl	%r13d, %r13d
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_9 Depth=2
	incq	%r13
	movslq	4(%r14), %r11
	addq	%r15, %rbx
	cmpq	%r11, %r13
	jge	LBB0_14
LBB0_9:                                 ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	32(%r14), %rax
	movl	(%r14), %ecx
	imull	%r13d, %ecx
	addl	-52(%rbp), %ecx                 ## 4-byte Folded Reload
	movslq	%ecx, %rcx
	leaq	(%rax,%rcx,4), %rdi
	addq	$-4, %rdi
	leaq	(%rax,%rcx,4), %rsi
	movq	%rbx, %rdx
	callq	_LerpDrawVert
	cmpq	%r13, -200(%rbp)                ## 8-byte Folded Reload
	jne	LBB0_8
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=2
	movl	(%rbx), %esi
	movl	-88(%rbp), %edi                 ## 4-byte Reload
	callq	_VectorCopy
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	8(%r14), %rcx
	movslq	%r10d, %rdx
	movq	%rdx, -120(%rbp)                ## 8-byte Spill
	movss	(%rcx,%rdx,4), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, (%r12,%r13,4)
	testl	%r11d, %r11d
	jle	LBB0_3
## %bb.12:                              ##   in Loop: Header=BB0_5 Depth=1
	movl	%r10d, -56(%rbp)                ## 4-byte Spill
	movq	%r13, -160(%rbp)                ## 8-byte Spill
	movq	32(%r14), %rdi
	movslq	(%r14), %rsi
	movl	%r11d, %r13d
	leaq	-1(%r13), %rcx
	movl	%r13d, %edx
	andl	$3, %edx
	cmpq	$3, %rcx
	movq	%r9, -80(%rbp)                  ## 8-byte Spill
	movq	%rsi, -152(%rbp)                ## 8-byte Spill
	jae	LBB0_16
## %bb.13:                              ##   in Loop: Header=BB0_5 Depth=1
	xorl	%esi, %esi
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	-104(%rbp), %r8                 ## 8-byte Reload
	movq	%r12, %r13
	movq	-112(%rbp), %r12                ## 8-byte Reload
	movq	-80(%rbp), %r9                  ## 8-byte Reload
	movl	-56(%rbp), %r10d                ## 4-byte Reload
LBB0_15:                                ##   in Loop: Header=BB0_5 Depth=1
	movss	-84(%rbp), %xmm0                ## 4-byte Reload
                                        ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, (%r12,%r8,4)
	jmp	LBB0_4
LBB0_16:                                ##   in Loop: Header=BB0_5 Depth=1
	andl	$-4, %r13d
	leaq	(%rdi,%rsi,8), %rax
	movq	%rax, -192(%rbp)                ## 8-byte Spill
	movq	-120(%rbp), %rcx                ## 8-byte Reload
	leaq	(,%rcx,4), %rcx
	movq	%rsi, %r15
	shlq	$4, %r15
	leaq	(%rdi,%rsi,4), %r10
	leaq	(%rsi,%rsi,2), %rsi
	leaq	(%rdi,%rsi,4), %r8
	movq	%r9, %r12
	xorl	%esi, %esi
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_17:                                ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%rdi,%rcx), %r9d
	movl	%r9d, (%r12)
	movl	(%r10,%rcx), %ebx
	movl	%ebx, (%r12,%r14,4)
	movq	-192(%rbp), %rax                ## 8-byte Reload
	movl	(%rax,%rcx), %ebx
	movl	%ebx, (%r12,%r14,8)
	movl	(%r8,%rcx), %ebx
	movq	%rdi, %rax
	movq	-176(%rbp), %rdi                ## 8-byte Reload
	movl	%ebx, (%r12,%rdi)
	movq	%rax, %rdi
	addq	$4, %rsi
	addq	-184(%rbp), %r12                ## 8-byte Folded Reload
	addq	%r15, %rcx
	cmpq	%rsi, %r13
	jne	LBB0_17
LBB0_18:                                ##   in Loop: Header=BB0_5 Depth=1
	testq	%rdx, %rdx
	movq	-112(%rbp), %r12                ## 8-byte Reload
	movq	-144(%rbp), %r14                ## 8-byte Reload
	movq	-104(%rbp), %r8                 ## 8-byte Reload
	movq	-128(%rbp), %r15                ## 8-byte Reload
	movq	-160(%rbp), %r13                ## 8-byte Reload
	movq	-80(%rbp), %r9                  ## 8-byte Reload
	movl	-56(%rbp), %r10d                ## 4-byte Reload
	movq	-152(%rbp), %rbx                ## 8-byte Reload
	je	LBB0_3
## %bb.19:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	%rdi, %rax
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	imulq	%rsi, %rdi
	imulq	%rbx, %rsi
	addq	-120(%rbp), %rsi                ## 8-byte Folded Reload
	leaq	(%rax,%rsi,4), %rcx
	shlq	$2, %rbx
	leaq	(%r9,%rdi,4), %rsi
	.p2align	4, 0x90
LBB0_20:                                ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%rcx), %edi
	movl	%edi, (%rsi)
	addq	%rbx, %rcx
	addq	%r15, %rsi
	decq	%rdx
	jne	LBB0_20
	jmp	LBB0_3
LBB0_21:
	xorl	%ebx, %ebx
	jmp	LBB0_42
LBB0_22:
	testl	%r11d, %r11d
	movq	-72(%rbp), %r10                 ## 8-byte Reload
	jle	LBB0_41
## %bb.23:
	movq	16(%r14), %rcx
	movl	%r11d, %edx
	cmpl	$8, %r11d
	jb	LBB0_24
## %bb.25:
	leaq	(%r12,%r10,4), %rax
	subq	%rcx, %rax
	cmpq	$32, %rax
	jae	LBB0_27
LBB0_24:
	xorl	%eax, %eax
LBB0_35:
	movq	%rax, %rsi
	notq	%rsi
	addq	%rdx, %rsi
	movq	%rdx, %rdi
	andq	$3, %rdi
	je	LBB0_38
## %bb.36:
	leaq	(%r12,%r10,4), %rbx
	.p2align	4, 0x90
LBB0_37:                                ## =>This Inner Loop Header: Depth=1
	movss	(%rcx,%rax,4), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, (%rbx,%rax,4)
	incq	%rax
	decq	%rdi
	jne	LBB0_37
LBB0_38:
	cmpq	$3, %rsi
	jb	LBB0_41
## %bb.39:
	leaq	(%r12,%r10,4), %rsi
	addq	$12, %rsi
	.p2align	4, 0x90
LBB0_40:                                ## =>This Inner Loop Header: Depth=1
	movss	(%rcx,%rax,4), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, -12(%rsi,%rax,4)
	movss	4(%rcx,%rax,4), %xmm0           ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, -8(%rsi,%rax,4)
	movss	8(%rcx,%rax,4), %xmm0           ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, -4(%rsi,%rax,4)
	movss	12(%rcx,%rax,4), %xmm0          ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, (%rsi,%rax,4)
	addq	$4, %rax
	cmpq	%rax, %rdx
	jne	LBB0_40
	jmp	LBB0_41
LBB0_27:
	leaq	(,%r10,4), %r8
	movl	%edx, %eax
	andl	$-8, %eax
	leaq	-8(%rax), %rdi
	movq	%rdi, %rsi
	shrq	$3, %rsi
	incq	%rsi
	movl	%esi, %r9d
	andl	$3, %r9d
	cmpq	$24, %rdi
	jae	LBB0_29
## %bb.28:
	xorl	%edi, %edi
	jmp	LBB0_31
LBB0_29:
	andq	$-4, %rsi
	leaq	(%r12,%r8), %rbx
	addq	$112, %rbx
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_30:                                ## =>This Inner Loop Header: Depth=1
	movups	(%rcx,%rdi,4), %xmm0
	movups	16(%rcx,%rdi,4), %xmm1
	movups	%xmm0, -112(%rbx,%rdi,4)
	movups	%xmm1, -96(%rbx,%rdi,4)
	movups	32(%rcx,%rdi,4), %xmm0
	movups	48(%rcx,%rdi,4), %xmm1
	movups	%xmm0, -80(%rbx,%rdi,4)
	movups	%xmm1, -64(%rbx,%rdi,4)
	movups	64(%rcx,%rdi,4), %xmm0
	movups	80(%rcx,%rdi,4), %xmm1
	movups	%xmm0, -48(%rbx,%rdi,4)
	movups	%xmm1, -32(%rbx,%rdi,4)
	movups	96(%rcx,%rdi,4), %xmm0
	movups	112(%rcx,%rdi,4), %xmm1
	movups	%xmm0, -16(%rbx,%rdi,4)
	movups	%xmm1, (%rbx,%rdi,4)
	addq	$32, %rdi
	addq	$-4, %rsi
	jne	LBB0_30
LBB0_31:
	testq	%r9, %r9
	je	LBB0_34
## %bb.32:
	leaq	(%r8,%rdi,4), %rsi
	addq	%r12, %rsi
	addq	$16, %rsi
	leaq	(%rcx,%rdi,4), %rdi
	addq	$16, %rdi
	shlq	$5, %r9
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_33:                                ## =>This Inner Loop Header: Depth=1
	movups	-16(%rdi,%rbx), %xmm0
	movups	(%rdi,%rbx), %xmm1
	movups	%xmm0, -16(%rsi,%rbx)
	movups	%xmm1, (%rsi,%rbx)
	addq	$32, %rbx
	cmpq	%rbx, %r9
	jne	LBB0_33
LBB0_34:
	cmpq	%rdx, %rax
	jne	LBB0_35
LBB0_41:
	movl	-64(%rbp), %r15d                ## 4-byte Reload
	movl	%r15d, %edi
	movl	-60(%rbp), %r13d                ## 4-byte Reload
	movl	%r13d, %esi
	movq	-96(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdx
	callq	_MakeMeshNormals
	movl	28(%r14), %edi
	callq	_VectorCopy
	movss	24(%r14), %xmm0                 ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, -52(%rbp)                ## 4-byte Spill
	movq	%r14, %rdi
	callq	_R_FreeSurfaceGridMesh
	movl	%r15d, %edi
	movl	%r13d, %esi
	movq	%rbx, %rdx
	movq	%r12, %rcx
	callq	_R_CreateSurfaceGridMesh
	movq	%rax, %rbx
	movss	-52(%rbp), %xmm0                ## 4-byte Reload
                                        ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, 24(%rax)
	movl	28(%rax), %esi
	callq	_VectorCopy
LBB0_42:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_44
## %bb.43:
	movq	%rbx, %rax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_44:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_GRID_SIZE,4,2              ## @MAX_GRID_SIZE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_R_GridInsertColumn             ; -- Begin function R_GridInsertColumn
	.p2align	2
_R_GridInsertColumn:                    ; @R_GridInsertColumn
	.cfi_startproc
; %bb.0:
	stp	d9, d8, [sp, #-112]!            ; 16-byte Folded Spill
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	.cfi_offset b8, -104
	.cfi_offset b9, -112
	sub	sp, sp, #64
	fmov	s8, s0
	mov	x24, x3
	mov	x25, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-104]
Lloh3:
	adrp	x8, _MAX_GRID_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAX_GRID_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w13, [x8]
	mul	x8, x13, x13
	lsl	x8, x8, #2
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0xfffffffffffffff0
	sub	x12, x9, x8
	mov	sp, x12
	lsl	x8, x13, #3
	mov	x9, x8
Lloh8:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh9:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0xffffffff0
	sub	x26, x9, x8
	mov	sp, x26
	ldr	w9, [x0]
	cmp	w9, w13
	b.ge	LBB0_16
; %bb.1:
	stur	x13, [x29, #-160]               ; 8-byte Folded Spill
	stur	x12, [x29, #-144]               ; 8-byte Folded Spill
	add	w27, w9, #1
	ldr	w8, [x19, #4]
	stur	w8, [x29, #-148]                ; 4-byte Folded Spill
                                        ; kill: def $w8 killed $w8 def $x8
	tbnz	w9, #31, LBB0_17
; %bb.2:
	mov	x28, #0
	mov	w22, #0
	mov	w20, w2
	mov	w14, w25
	ldur	x8, [x29, #-160]                ; 8-byte Folded Reload
	lsl	x23, x8, #2
	ldur	x9, [x29, #-144]                ; 8-byte Folded Reload
	mov	x21, x9
	ldur	w8, [x29, #-148]                ; 4-byte Folded Reload
	add	x9, x9, w25, uxtw #2
	stp	x9, x14, [x29, #-136]           ; 16-byte Folded Spill
	stp	x27, x26, [x29, #-120]          ; 16-byte Folded Spill
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	w22, w22, #1
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x28, x28, #1
	add	x21, x21, #4
	cmp	x28, x27
	b.eq	LBB0_17
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_13 Depth 2
                                        ;     Child Loop BB0_9 Depth 2
	cmp	x28, x14
	b.ne	LBB0_11
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	cmp	w8, #1
	b.lt	LBB0_15
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x27, #0
	ldur	x26, [x29, #-136]               ; 8-byte Folded Reload
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=2
	add	x27, x27, #1
	ldrsw	x8, [x19, #4]
	add	x26, x26, x23
	cmp	x27, x8
	b.ge	LBB0_14
LBB0_9:                                 ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x19, #32]
	ldr	w9, [x19]
	madd	w9, w9, w27, w25
	add	x1, x8, w9, sxtw #2
	sub	x0, x1, #4
	mov	x2, x26
	bl	_LerpDrawVert
	cmp	x20, x27
	b.ne	LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=2
	ldr	w1, [x26]
	mov	x0, x24
	bl	_VectorCopy
	b	LBB0_8
LBB0_11:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x9, [x19, #8]
	ldr	s0, [x9, w22, sxtw #2]
	str	s0, [x26, x28, lsl #2]
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.12:                               ;   in Loop: Header=BB0_5 Depth=1
	sxtw	x10, w22
	ldr	x11, [x19, #32]
	ldrsw	x12, [x19]
	mov	w9, w8
	add	x10, x11, x10, lsl #2
	lsl	x11, x12, #2
	mov	x12, x21
LBB0_13:                                ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w13, [x10]
	str	w13, [x12]
	add	x10, x10, x11
	add	x12, x12, x23
	subs	x9, x9, #1
	b.ne	LBB0_13
	b	LBB0_3
LBB0_14:                                ;   in Loop: Header=BB0_5 Depth=1
	ldp	x27, x26, [x29, #-120]          ; 16-byte Folded Reload
	ldur	x14, [x29, #-128]               ; 8-byte Folded Reload
LBB0_15:                                ;   in Loop: Header=BB0_5 Depth=1
	str	s8, [x26, x14, lsl #2]
	b	LBB0_4
LBB0_16:
	mov	x19, #0
	b	LBB0_24
LBB0_17:
	cmp	w8, #1
	ldur	x20, [x29, #-144]               ; 8-byte Folded Reload
	ldur	x14, [x29, #-160]               ; 8-byte Folded Reload
	b.lt	LBB0_23
; %bb.18:
	ldr	x10, [x19, #16]
	mov	w9, w8
	cmp	w8, #16
	b.lo	LBB0_20
; %bb.19:
	lsl	x11, x14, #2
	add	x8, x11, x26
	sub	x8, x8, x10
	cmp	x8, #64
	b.hs	LBB0_26
LBB0_20:
	mov	x8, #0
LBB0_21:
	lsl	x12, x8, #2
	add	x11, x12, x14, lsl #2
	add	x11, x26, x11
	add	x10, x10, x12
	sub	x8, x9, x8
LBB0_22:                                ; =>This Inner Loop Header: Depth=1
	ldr	s0, [x10], #4
	str	s0, [x11], #4
	subs	x8, x8, #1
	b.ne	LBB0_22
LBB0_23:
	mov	x0, x27
	ldur	w21, [x29, #-148]               ; 4-byte Folded Reload
	mov	x1, x21
	mov	x2, x20
	bl	_MakeMeshNormals
	ldr	w0, [x19, #28]
	bl	_VectorCopy
	ldr	s8, [x19, #24]
	mov	x0, x19
	bl	_R_FreeSurfaceGridMesh
	mov	x0, x27
	mov	x1, x21
	mov	x2, x20
	mov	x3, x26
	bl	_R_CreateSurfaceGridMesh
	mov	x19, x0
	str	s8, [x0, #24]
	ldr	w1, [x0, #28]
	bl	_VectorCopy
LBB0_24:
	ldur	x8, [x29, #-104]
Lloh10:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh11:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_29
; %bb.25:
	mov	x0, x19
	sub	sp, x29, #96
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp], #112              ; 16-byte Folded Reload
	ret
LBB0_26:
	and	x8, x9, #0xfffffff0
	add	x11, x26, x11
	add	x11, x11, #32
	add	x12, x10, #32
	mov	x13, x8
LBB0_27:                                ; =>This Inner Loop Header: Depth=1
	ldp	q0, q1, [x12, #-32]
	ldp	q2, q3, [x12], #64
	stp	q0, q1, [x11, #-32]
	stp	q2, q3, [x11], #64
	subs	x13, x13, #16
	b.ne	LBB0_27
; %bb.28:
	cmp	x8, x9
	b.eq	LBB0_23
	b	LBB0_21
LBB0_29:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_GRID_SIZE,4,2              ; @MAX_GRID_SIZE
.subsections_via_symbols
