	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function LinearSubdivideMesh
LCPI0_0:
	.quad	0x3fd0000000000000              ## double 0.25
LCPI0_1:
	.quad	0x3fe8000000000000              ## double 0.75
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_LinearSubdivideMesh
	.p2align	4, 0x90
_LinearSubdivideMesh:                   ## @LinearSubdivideMesh
	.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
	movq	%rdi, %r15
	movl	$16, %edi
	callq	_malloc
	movq	%rax, %rbx
	movl	(%r15), %edi
	leal	(%rdi,%rdi), %eax
	movl	%eax, (%rbx)
	movl	4(%r15), %eax
	movl	%eax, 4(%rbx)
	imull	%eax, %edi
	shll	$5, %edi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_malloc
	movq	%rbx, %r8
	movq	%rax, 8(%rbx)
	cmpl	$0, 4(%r15)
	jle	LBB0_7
## %bb.1:
	movl	(%r8), %ecx
	xorl	%r12d, %r12d
	movsd	LCPI0_0(%rip), %xmm1            ## xmm1 = mem[0],zero
	movsd	LCPI0_1(%rip), %xmm2            ## xmm2 = mem[0],zero
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	%r8, -48(%rbp)                  ## 8-byte Spill
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	imull	%r12d, %ecx
	movslq	%ecx, %rcx
	shlq	$4, %rcx
	movq	8(%r15), %rdx
	movslq	(%r15), %rsi
	movslq	%r12d, %rdi
	imulq	%rsi, %rdi
	shlq	$4, %rdi
	movups	(%rdx,%rdi), %xmm0
	movups	%xmm0, (%rax,%rcx)
	movq	8(%r8), %rax
	movl	(%r8), %ecx
	movl	%ecx, %edx
	imull	%r12d, %edx
	addl	%edx, %ecx
	decl	%ecx
	movslq	%ecx, %rcx
	shlq	$4, %rcx
	movq	8(%r15), %rdx
	movl	(%r15), %esi
	movl	%esi, %edi
	imull	%r12d, %edi
	addl	%edi, %esi
	decl	%esi
	movslq	%esi, %rsi
	shlq	$4, %rsi
	movupd	(%rdx,%rsi), %xmm0
	movupd	%xmm0, (%rax,%rcx)
	movl	(%r8), %ecx
	cmpl	$3, %ecx
	jl	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$1, %ebx
	movl	$24, %r13d
	.p2align	4, 0x90
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r15), %eax
	imull	%r12d, %eax
	movslq	%eax, %r14
	shlq	$4, %r14
	addq	8(%r15), %r14
	movq	-8(%r14,%rbx,8), %rax
	movq	8(%r14,%rbx,8), %rdx
	movsd	(%rdx), %xmm0                   ## xmm0 = mem[0],zero
	mulsd	%xmm1, %xmm0
	movsd	(%rax), %xmm1                   ## xmm1 = mem[0],zero
	mulsd	%xmm2, %xmm1
	imull	%r12d, %ecx
	movslq	%ecx, %r15
	shlq	$4, %r15
	addq	8(%r8), %r15
	addsd	%xmm0, %xmm1
	movq	-8(%r13,%r15), %rcx
	movsd	%xmm1, (%rcx)
	movsd	8(%rdx), %xmm0                  ## xmm0 = mem[0],zero
	mulsd	LCPI0_0(%rip), %xmm0
	movsd	8(%rax), %xmm1                  ## xmm1 = mem[0],zero
	mulsd	%xmm2, %xmm1
	addsd	%xmm0, %xmm1
	movsd	%xmm1, 8(%rcx)
	movsd	16(%rdx), %xmm0                 ## xmm0 = mem[0],zero
	mulsd	LCPI0_0(%rip), %xmm0
	movsd	16(%rax), %xmm1                 ## xmm1 = mem[0],zero
	mulsd	%xmm2, %xmm1
	addsd	%xmm0, %xmm1
	movsd	%xmm1, 16(%rcx)
	movq	(%r14,%rbx,8), %rax
	movq	16(%r14,%rbx,8), %rcx
	movsd	(%rcx), %xmm0                   ## xmm0 = mem[0],zero
	mulsd	LCPI0_0(%rip), %xmm0
	movsd	(%rax), %xmm1                   ## xmm1 = mem[0],zero
	mulsd	%xmm2, %xmm1
	addsd	%xmm0, %xmm1
	movq	(%r13,%r15), %rdi
	movsd	%xmm1, (%rdi)
	movsd	8(%rcx), %xmm0                  ## xmm0 = mem[0],zero
	mulsd	LCPI0_0(%rip), %xmm0
	movsd	8(%rax), %xmm1                  ## xmm1 = mem[0],zero
	mulsd	%xmm2, %xmm1
	addsd	%xmm0, %xmm1
	movsd	%xmm1, 8(%rdi)
	movsd	16(%rcx), %xmm0                 ## xmm0 = mem[0],zero
	mulsd	LCPI0_0(%rip), %xmm0
	movsd	16(%rax), %xmm1                 ## xmm1 = mem[0],zero
	mulsd	%xmm2, %xmm1
	addsd	%xmm0, %xmm1
	movsd	%xmm1, 16(%rdi)
	movq	%rdi, %rsi
	callq	_VectorNormalize
	movq	-8(%r14,%rbx,8), %rax
	movq	8(%r14,%rbx,8), %rcx
	movsd	(%rcx), %xmm0                   ## xmm0 = mem[0],zero
	mulsd	LCPI0_1(%rip), %xmm0
	movsd	(%rax), %xmm1                   ## xmm1 = mem[0],zero
	mulsd	LCPI0_0(%rip), %xmm1
	addsd	%xmm0, %xmm1
	movq	8(%r13,%r15), %rdx
	movsd	%xmm1, (%rdx)
	movsd	8(%rcx), %xmm0                  ## xmm0 = mem[0],zero
	mulsd	LCPI0_1(%rip), %xmm0
	movsd	8(%rax), %xmm1                  ## xmm1 = mem[0],zero
	mulsd	LCPI0_0(%rip), %xmm1
	addsd	%xmm0, %xmm1
	movsd	%xmm1, 8(%rdx)
	movsd	16(%rcx), %xmm0                 ## xmm0 = mem[0],zero
	mulsd	LCPI0_1(%rip), %xmm0
	movsd	16(%rax), %xmm1                 ## xmm1 = mem[0],zero
	mulsd	LCPI0_0(%rip), %xmm1
	addsd	%xmm0, %xmm1
	movsd	%xmm1, 16(%rdx)
	movq	(%r14,%rbx,8), %rax
	movq	16(%r14,%rbx,8), %rcx
	movsd	(%rcx), %xmm0                   ## xmm0 = mem[0],zero
	mulsd	LCPI0_1(%rip), %xmm0
	movsd	(%rax), %xmm1                   ## xmm1 = mem[0],zero
	mulsd	LCPI0_0(%rip), %xmm1
	addsd	%xmm0, %xmm1
	movq	16(%r13,%r15), %rdi
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movsd	%xmm1, (%rdi)
	movsd	8(%rcx), %xmm0                  ## xmm0 = mem[0],zero
	mulsd	LCPI0_1(%rip), %xmm0
	movsd	8(%rax), %xmm1                  ## xmm1 = mem[0],zero
	mulsd	LCPI0_0(%rip), %xmm1
	addsd	%xmm0, %xmm1
	movsd	%xmm1, 8(%rdi)
	movsd	16(%rcx), %xmm0                 ## xmm0 = mem[0],zero
	mulsd	LCPI0_1(%rip), %xmm0
	movsd	16(%rax), %xmm1                 ## xmm1 = mem[0],zero
	mulsd	LCPI0_0(%rip), %xmm1
	addsd	%xmm0, %xmm1
	movsd	%xmm1, 16(%rdi)
	movq	%rdi, %rsi
	callq	_VectorNormalize
	movsd	LCPI0_1(%rip), %xmm2            ## xmm2 = mem[0],zero
	movsd	LCPI0_0(%rip), %xmm1            ## xmm1 = mem[0],zero
	movq	-48(%rbp), %r8                  ## 8-byte Reload
	addq	$2, %rbx
	movl	(%r8), %ecx
	leal	-1(%rcx), %eax
	addq	$32, %r13
	cmpl	%ebx, %eax
	jg	LBB0_4
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	incl	%r12d
	cmpl	4(%r15), %r12d
	jge	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%r8), %rax
	jmp	LBB0_2
LBB0_7:
	movq	%r15, %rdi
	movq	%r8, %rbx
	callq	_FreeMesh
	movq	%rbx, %rax
	addq	$24, %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	_LinearSubdivideMesh            ; -- Begin function LinearSubdivideMesh
	.p2align	2
_LinearSubdivideMesh:                   ; @LinearSubdivideMesh
	.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
	mov	x19, x0
	mov	w0, #16
	bl	_malloc
	mov	x20, x0
	ldp	w8, w9, [x19]
	lsl	w10, w8, #1
	stp	w10, w9, [x0]
	mul	w8, w8, w9
	lsl	w0, w8, #5
	bl	_malloc
	str	x0, [x20, #8]
	ldr	w8, [x19, #4]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.1:
	mov	w21, #0
	ldr	w8, [x20]
	fmov	d8, #0.25000000
	fmov	d9, #0.75000000
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_4 Depth 2
	mul	w8, w8, w21
	ldr	x9, [x19, #8]
	ldr	w10, [x19]
	mul	w10, w10, w21
	ldr	q0, [x9, w10, sxtw #4]
	str	q0, [x0, w8, sxtw #4]
	ldr	x8, [x20, #8]
	ldr	w9, [x20]
	madd	w9, w9, w21, w9
	sub	w9, w9, #1
	ldr	x10, [x19, #8]
	ldr	w11, [x19]
	madd	w11, w11, w21, w11
	sub	w11, w11, #1
	ldr	q0, [x10, w11, sxtw #4]
	str	q0, [x8, w9, sxtw #4]
	ldr	w8, [x20]
	cmp	w8, #3
	b.lt	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x22, #0
	mov	w23, #24
	mov	w24, #1
LBB0_4:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x9, [x19, #8]
	ldr	w10, [x19]
	ldr	x11, [x20, #8]
	mul	w10, w21, w10
	add	x25, x9, w10, sxtw #4
	add	x26, x25, x22
	ldr	x9, [x26]
	ldr	d0, [x9]
	ldp	x10, x12, [x26, #16]
	ldr	d1, [x10]
	fmul	d1, d1, d8
	fmadd	d0, d0, d9, d1
	mul	w8, w21, w8
	add	x8, x11, w8, sxtw #4
	add	x27, x8, x23
	ldur	x8, [x27, #-8]
	str	d0, [x8]
	ldr	d0, [x9, #8]
	ldr	d1, [x10, #8]
	fmul	d1, d1, d8
	fmadd	d0, d0, d9, d1
	str	d0, [x8, #8]
	ldr	d0, [x9, #16]
	ldr	d1, [x10, #16]
	fmul	d1, d1, d8
	fmadd	d0, d0, d9, d1
	str	d0, [x8, #16]
	lsl	x28, x24, #3
	ldr	x8, [x25, x28]
	ldr	d0, [x8]
	ldr	d1, [x12]
	fmul	d1, d1, d8
	fmadd	d0, d0, d9, d1
	ldr	x0, [x27]
	str	d0, [x0]
	ldr	d0, [x8, #8]
	ldr	d1, [x12, #8]
	fmul	d1, d1, d8
	fmadd	d0, d0, d9, d1
	str	d0, [x0, #8]
	ldr	d0, [x8, #16]
	ldr	d1, [x12, #16]
	fmul	d1, d1, d8
	fmadd	d0, d0, d9, d1
	str	d0, [x0, #16]
	mov	x1, x0
	bl	_VectorNormalize
	ldr	x8, [x26]
	ldr	d0, [x8]
	ldp	x9, x10, [x26, #16]
	ldr	d1, [x9]
	fmul	d1, d1, d9
	fmadd	d0, d0, d8, d1
	ldp	x11, x0, [x27, #8]
	str	d0, [x11]
	ldr	d0, [x8, #8]
	ldr	d1, [x9, #8]
	fmul	d1, d1, d9
	fmadd	d0, d0, d8, d1
	str	d0, [x11, #8]
	ldr	d0, [x8, #16]
	ldr	d1, [x9, #16]
	fmul	d1, d1, d9
	fmadd	d0, d0, d8, d1
	str	d0, [x11, #16]
	ldr	x8, [x25, x28]
	ldr	d0, [x8]
	ldr	d1, [x10]
	fmul	d1, d1, d9
	fmadd	d0, d0, d8, d1
	str	d0, [x0]
	ldr	d0, [x8, #8]
	ldr	d1, [x10, #8]
	fmul	d1, d1, d9
	fmadd	d0, d0, d8, d1
	str	d0, [x0, #8]
	ldr	d0, [x8, #16]
	ldr	d1, [x10, #16]
	fmul	d1, d1, d9
	fmadd	d0, d0, d8, d1
	str	d0, [x0, #16]
	mov	x1, x0
	bl	_VectorNormalize
	add	x24, x24, #2
	ldr	w8, [x20]
	sub	w9, w8, #1
	add	x22, x22, #16
	add	x23, x23, #32
	cmp	w9, w24
	b.gt	LBB0_4
LBB0_5:                                 ;   in Loop: Header=BB0_2 Depth=1
	add	w21, w21, #1
	ldr	w9, [x19, #4]
	cmp	w21, w9
	b.ge	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x0, [x20, #8]
	b	LBB0_2
LBB0_7:
	mov	x0, x19
	bl	_FreeMesh
	mov	x0, x20
	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
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
