	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal4,4byte_literals
	.p2align	2                               ## -- Begin function update_map
LCPI0_0:
	.long	0x3f000000                      ## float 0.5
LCPI0_2:
	.long	0x3f800000                      ## float 1
LCPI0_3:
	.long	0x4048f5c3                      ## float 3.1400001
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4
LCPI0_1:
	.long	0x7fffffff                      ## float NaN
	.long	0x7fffffff                      ## float NaN
	.long	0x7fffffff                      ## float NaN
	.long	0x7fffffff                      ## float NaN
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_update_map:                            ## @update_map
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %ebx
	xorl	%edi, %edi
	testl	%ebx, %ebx
	setg	%dil
	callq	_assert
	testl	%ebx, %ebx
	je	LBB0_8
## %bb.1:
	leaq	-44(%rbp), %r13
	movq	_MAP_NUM_TOTAL_VERTICES@GOTPCREL(%rip), %r14
	movq	_map_vertices@GOTPCREL(%rip), %r15
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	decl	%ebx
	je	LBB0_8
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	leaq	-60(%rbp), %rdi
	leaq	-56(%rbp), %rsi
	leaq	-52(%rbp), %rdx
	movq	%r13, %rcx
	callq	_generate_heightmap__circle
	movss	-44(%rbp), %xmm0                ## xmm0 = mem[0],zero,zero,zero
	mulss	LCPI0_0(%rip), %xmm0
	movss	%xmm0, -44(%rbp)
	cmpq	$0, (%r14)
	je	LBB0_7
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%r12d, %r12d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=2
	incq	%r12
	cmpq	(%r14), %r12
	jae	LBB0_7
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movss	-60(%rbp), %xmm0                ## xmm0 = mem[0],zero,zero,zero
	movq	(%r15), %rax
	movq	(%rax), %rcx
	subss	(%rcx,%r12,4), %xmm0
	movq	16(%rax), %rax
	movss	-56(%rbp), %xmm1                ## xmm1 = mem[0],zero,zero,zero
	subss	(%rax,%r12,4), %xmm1
	mulss	%xmm1, %xmm1
	mulss	%xmm0, %xmm0
	addss	%xmm1, %xmm0
	callq	_sqrt
	xorps	%xmm0, %xmm0
	cvtsi2ss	%rax, %xmm0
	addss	%xmm0, %xmm0
	divss	-52(%rbp), %xmm0
	movaps	%xmm0, %xmm1
	andps	LCPI0_1(%rip), %xmm1
	movss	LCPI0_2(%rip), %xmm2            ## xmm2 = mem[0],zero,zero,zero
	ucomiss	%xmm1, %xmm2
	jb	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=2
	movss	-44(%rbp), %xmm1                ## xmm1 = mem[0],zero,zero,zero
	movss	%xmm1, -48(%rbp)                ## 4-byte Spill
	mulss	LCPI0_3(%rip), %xmm0
	callq	_cos
	mulss	-44(%rbp), %xmm0
	addss	-48(%rbp), %xmm0                ## 4-byte Folded Reload
	movq	(%r15), %rax
	movq	8(%rax), %rax
	addss	(%rax,%r12,4), %xmm0
	movss	%xmm0, (%rax,%r12,4)
	jmp	LBB0_6
LBB0_8:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAP_NUM_TOTAL_VERTICES,8,3     ## @MAP_NUM_TOTAL_VERTICES
	.comm	_map_vertices,8,3               ## @map_vertices
	.no_dead_strip	_update_map
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function update_map
_update_map:                            ; @update_map
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	d11, d10, [sp, #16]             ; 16-byte Folded Spill
	stp	d9, d8, [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 b8, -72
	.cfi_offset b9, -80
	.cfi_offset b10, -88
	.cfi_offset b11, -96
	mov	x19, x0
	cmp	w0, #0
	cset	w0, gt
	bl	_assert
	cbz	w19, LBB0_8
; %bb.1:
	fmov	s8, #0.50000000
Lloh0:
	adrp	x20, _MAP_NUM_TOTAL_VERTICES@GOTPAGE
Lloh1:
	ldr	x20, [x20, _MAP_NUM_TOTAL_VERTICES@GOTPAGEOFF]
Lloh2:
	adrp	x21, _map_vertices@GOTPAGE
Lloh3:
	ldr	x21, [x21, _map_vertices@GOTPAGEOFF]
	fmov	s9, #1.00000000
	mov	w22, #62915
	movk	w22, #16456, lsl #16
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	subs	w19, w19, #1
	b.eq	LBB0_8
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	add	x0, sp, #12
	add	x1, sp, #8
	add	x2, sp, #4
	mov	x3, sp
	bl	_generate_heightmap__circle
	ldr	s0, [sp]
	fmul	s0, s0, s8
	str	s0, [sp]
	ldr	x8, [x20]
	cbz	x8, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x23, #0
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=2
	add	x23, x23, #1
	ldr	x8, [x20]
	cmp	x23, x8
	b.hs	LBB0_2
LBB0_6:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	s0, [sp, #12]
	ldr	x8, [x21]
	ldr	x9, [x8]
	lsl	x24, x23, #2
	ldr	s1, [x9, x24]
	fsub	s0, s0, s1
	ldr	s1, [sp, #8]
	ldr	x8, [x8, #16]
	ldr	s2, [x8, x24]
	fsub	s1, s1, s2
	fmul	s1, s1, s1
	fmadd	s0, s0, s0, s1
	bl	_sqrt
	scvtf	s0, x0
	fadd	s0, s0, s0
	ldr	s1, [sp, #4]
	fdiv	s0, s0, s1
	fabs	s1, s0
	fcmp	s1, s9
	b.hi	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	ldr	s10, [sp]
	fmov	s1, w22
	fmul	s0, s0, s1
	bl	_cos
	ldr	s1, [sp]
	fmadd	s0, s0, s1, s10
	ldr	x8, [x21]
	ldr	x8, [x8, #8]
	ldr	s1, [x8, x24]
	fadd	s0, s0, s1
	str	s0, [x8, x24]
	b	LBB0_5
LBB0_8:
	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	d9, d8, [sp, #32]               ; 16-byte Folded Reload
	ldp	d11, d10, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_MAP_NUM_TOTAL_VERTICES,8,3     ; @MAP_NUM_TOTAL_VERTICES
	.comm	_map_vertices,8,3               ; @map_vertices
	.no_dead_strip	_update_map
.subsections_via_symbols
