	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_RB_SurfaceMesh                 ## -- Begin function RB_SurfaceMesh
	.p2align	4, 0x90
_RB_SurfaceMesh:                        ## @RB_SurfaceMesh
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	_backEnd@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax), %rcx
	xorps	%xmm0, %xmm0
	cmpq	8(%rax), %rcx
	je	LBB0_2
## %bb.1:
	movss	16(%rax), %xmm0                 ## xmm0 = mem[0],zero,zero,zero
LBB0_2:
	movss	%xmm0, -48(%rbp)                ## 4-byte Spill
	movl	(%r12), %edi
	movl	4(%r12), %eax
	leal	(%rax,%rax,2), %esi
	callq	_RB_CHECKOVERFLOW
	movq	%r12, %rdi
	movd	-48(%rbp), %xmm0                ## 4-byte Folded Reload
                                        ## xmm0 = mem[0],zero,zero,zero
	callq	_LerpMeshVertexes
	movl	4(%r12), %eax
	leal	(%rax,%rax,2), %r14d
	movq	_tess@GOTPCREL(%rip), %r11
	movl	(%r11), %edx
	movslq	4(%r11), %rcx
	testl	%eax, %eax
	jle	LBB0_20
## %bb.3:
	movslq	8(%r12), %r15
	leaq	(%r12,%r15,4), %rax
	movslq	%edx, %r9
	movq	8(%r11), %r10
	cmpl	$2, %r14d
	movl	$1, %r13d
	cmovgel	%r14d, %r13d
	cmpl	$8, %r13d
	jb	LBB0_4
## %bb.5:
	leaq	(%r10,%r9,4), %rdx
	subq	%rax, %rdx
	cmpq	$32, %rdx
	jae	LBB0_7
LBB0_4:
	xorl	%edi, %edi
LBB0_13:
	movq	%rdi, %r8
	notq	%r8
	addq	%r13, %r8
	movq	%r13, %rsi
	andq	$3, %rsi
	je	LBB0_16
## %bb.14:
	leaq	(%r10,%r9,4), %rbx
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rax,%rdi,4), %edx
	addl	%ecx, %edx
	movl	%edx, (%rbx,%rdi,4)
	incq	%rdi
	decq	%rsi
	jne	LBB0_15
LBB0_16:
	cmpq	$3, %r8
	jb	LBB0_19
## %bb.17:
	leaq	(%r10,%r9,4), %rax
	addq	$12, %rax
	leaq	(%r12,%r15,4), %rdx
	addq	$12, %rdx
	.p2align	4, 0x90
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movl	-12(%rdx,%rdi,4), %esi
	addl	%ecx, %esi
	movl	%esi, -12(%rax,%rdi,4)
	movl	-8(%rdx,%rdi,4), %esi
	addl	%ecx, %esi
	movl	%esi, -8(%rax,%rdi,4)
	movl	-4(%rdx,%rdi,4), %esi
	addl	%ecx, %esi
	movl	%esi, -4(%rax,%rdi,4)
	movl	(%rdx,%rdi,4), %esi
	addl	%ecx, %esi
	movl	%esi, (%rax,%rdi,4)
	addq	$4, %rdi
	cmpq	%rdi, %r13
	jne	LBB0_18
	jmp	LBB0_19
LBB0_7:
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movl	%r13d, %edi
	andl	$2147483640, %edi               ## imm = 0x7FFFFFF8
	movd	%ecx, %xmm0
	pshufd	$0, %xmm0, %xmm0                ## xmm0 = xmm0[0,0,0,0]
	leaq	-8(%rdi), %rdx
	movq	%rdx, %r15
	shrq	$3, %r15
	incq	%r15
	testq	%rdx, %rdx
	je	LBB0_28
## %bb.8:
	movq	%r15, %rbx
	andq	$-2, %rbx
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	leaq	(%r12,%rdx,4), %rsi
	addq	$48, %rsi
	leaq	(%r10,%r9,4), %r8
	addq	$48, %r8
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movdqu	-48(%rsi,%rdx,4), %xmm1
	movdqu	-32(%rsi,%rdx,4), %xmm2
	paddd	%xmm0, %xmm1
	paddd	%xmm0, %xmm2
	movdqu	%xmm1, -48(%r8,%rdx,4)
	movdqu	%xmm2, -32(%r8,%rdx,4)
	movdqu	-16(%rsi,%rdx,4), %xmm1
	movdqu	(%rsi,%rdx,4), %xmm2
	paddd	%xmm0, %xmm1
	paddd	%xmm0, %xmm2
	movdqu	%xmm1, -16(%r8,%rdx,4)
	movdqu	%xmm2, (%r8,%rdx,4)
	addq	$16, %rdx
	addq	$-2, %rbx
	jne	LBB0_9
## %bb.10:
	testb	$1, %r15b
	je	LBB0_12
LBB0_11:
	movdqu	(%rax,%rdx,4), %xmm1
	movdqu	16(%rax,%rdx,4), %xmm2
	paddd	%xmm0, %xmm1
	paddd	%xmm0, %xmm2
	addq	%r9, %rdx
	movdqu	%xmm1, (%r10,%rdx,4)
	movdqu	%xmm2, 16(%r10,%rdx,4)
LBB0_12:
	cmpq	%r13, %rdi
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	jne	LBB0_13
LBB0_19:
	movl	(%r11), %edx
LBB0_20:
	addl	%r14d, %edx
	movl	%edx, (%r11)
	movl	(%r12), %r10d
	testl	%r10d, %r10d
	jle	LBB0_27
## %bb.21:
	movslq	12(%r12), %r9
	movq	16(%r11), %r8
	cmpl	$1, %r10d
	jne	LBB0_23
## %bb.22:
	xorl	%edi, %edi
	jmp	LBB0_25
LBB0_23:
	movl	%r10d, %eax
	andl	$-2, %eax
	leaq	(%r12,%r9,4), %rdx
	addq	$12, %rdx
	leaq	(%r8,%rcx,8), %rsi
	addq	$8, %rsi
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_24:                                ## =>This Inner Loop Header: Depth=1
	movss	-12(%rdx,%rdi,8), %xmm0         ## xmm0 = mem[0],zero,zero,zero
	movq	-8(%rsi,%rdi,8), %rbx
	movq	(%rbx), %rbx
	movss	%xmm0, (%rbx)
	movss	-8(%rdx,%rdi,8), %xmm0          ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, 4(%rbx)
	movss	-4(%rdx,%rdi,8), %xmm0          ## xmm0 = mem[0],zero,zero,zero
	movq	(%rsi,%rdi,8), %rbx
	movq	(%rbx), %rbx
	movss	%xmm0, (%rbx)
	movd	(%rdx,%rdi,8), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	movd	%xmm0, 4(%rbx)
	addq	$2, %rdi
	cmpq	%rdi, %rax
	jne	LBB0_24
LBB0_25:
	testb	$1, %r10b
	je	LBB0_27
## %bb.26:
	leaq	(%r12,%r9,4), %rax
	movss	(%rax,%rdi,8), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	addq	%rdi, %rcx
	movq	(%r8,%rcx,8), %rcx
	movq	(%rcx), %rcx
	movss	%xmm0, (%rcx)
	movd	4(%rax,%rdi,8), %xmm0           ## xmm0 = mem[0],zero,zero,zero
	movd	%xmm0, 4(%rcx)
LBB0_27:
	addl	%r10d, 4(%r11)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_28:
	xorl	%edx, %edx
	testb	$1, %r15b
	jne	LBB0_11
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_backEnd,8,3                    ## @backEnd
	.comm	_tess,24,3                      ## @tess
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_RB_SurfaceMesh                 ; -- Begin function RB_SurfaceMesh
	.p2align	2
_RB_SurfaceMesh:                        ; @RB_SurfaceMesh
	.cfi_startproc
; %bb.0:
	stp	d9, d8, [sp, #-48]!             ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset b8, -40
	.cfi_offset b9, -48
	mov	x19, x0
Lloh0:
	adrp	x8, _backEnd@GOTPAGE
Lloh1:
	ldr	x8, [x8, _backEnd@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldp	x9, x10, [x8]
	movi	d8, #0000000000000000
	cmp	x9, x10
	b.eq	LBB0_2
; %bb.1:
	ldr	s8, [x8, #16]
LBB0_2:
	ldp	w0, w8, [x19]
	add	w1, w8, w8, lsl #1
	bl	_RB_CHECKOVERFLOW
	mov	x0, x19
	fmov	s0, s8
	bl	_LerpMeshVertexes
	ldr	w11, [x19, #4]
	add	w10, w11, w11, lsl #1
Lloh3:
	adrp	x8, _tess@GOTPAGE
Lloh4:
	ldr	x8, [x8, _tess@GOTPAGEOFF]
	ldp	w12, w9, [x8]
                                        ; kill: def $w9 killed $w9 def $x9
	sxtw	x9, w9
	cmp	w11, #1
	b.lt	LBB0_9
; %bb.3:
	ldrsw	x11, [x19, #8]
	sxtw	x13, w12
	ldr	x14, [x8, #8]
	cmp	w10, #1
	csinc	w12, w10, wzr, gt
	cmp	w12, #16
	b.lo	LBB0_5
; %bb.4:
	add	x16, x14, x13, lsl #2
	add	x17, x19, x11, lsl #2
	sub	x15, x16, x17
	cmp	x15, #64
	b.hs	LBB0_13
LBB0_5:
	mov	x15, #0
LBB0_6:
	add	x13, x15, x13
	add	x13, x14, x13, lsl #2
	lsl	x14, x15, #2
	add	x11, x14, x11, lsl #2
	add	x11, x19, x11
	sub	x12, x12, x15
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w14, [x11], #4
	add	w14, w14, w9
	str	w14, [x13], #4
	subs	x12, x12, #1
	b.ne	LBB0_7
LBB0_8:
	ldr	w12, [x8]
LBB0_9:
	add	w10, w12, w10
	str	w10, [x8]
	ldr	w10, [x19]
	cmp	w10, #1
	b.lt	LBB0_12
; %bb.10:
	ldrsw	x11, [x19, #12]
	ldr	x12, [x8, #16]
	add	x9, x12, x9, lsl #3
	add	x11, x19, x11, lsl #2
	add	x11, x11, #4
	mov	x12, x10
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldur	s0, [x11, #-4]
	ldr	x13, [x9], #8
	ldr	x13, [x13]
	str	s0, [x13]
	ldr	s0, [x11], #8
	str	s0, [x13, #4]
	subs	x12, x12, #1
	b.ne	LBB0_11
LBB0_12:
	ldr	w9, [x8, #4]
	add	w9, w9, w10
	str	w9, [x8, #4]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp], #48               ; 16-byte Folded Reload
	ret
LBB0_13:
	and	x15, x12, #0x7ffffff0
	dup.4s	v0, w9
	add	x16, x16, #32
	add	x17, x17, #32
	mov	x0, x15
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	ldp	q1, q2, [x17, #-32]
	ldp	q3, q4, [x17], #64
	add.4s	v1, v1, v0
	add.4s	v2, v2, v0
	add.4s	v3, v3, v0
	add.4s	v4, v4, v0
	stp	q1, q2, [x16, #-32]
	stp	q3, q4, [x16], #64
	subs	x0, x0, #16
	b.ne	LBB0_14
; %bb.15:
	cmp	x15, x12
	b.eq	LBB0_8
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_backEnd,8,3                    ; @backEnd
	.comm	_tess,24,3                      ; @tess
.subsections_via_symbols
