	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function RB_SurfaceMesh
_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, %r15
	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, -44(%rbp)                ## 4-byte Spill
	movq	_tess@GOTPCREL(%rip), %r14
	movl	24(%r14), %edi
	callq	_RB_CheckVao
	movl	(%r15), %edi
	movl	4(%r15), %esi
	callq	_RB_CHECKOVERFLOW
	movq	%r15, %rdi
	movd	-44(%rbp), %xmm0                ## 4-byte Folded Reload
                                        ## xmm0 = mem[0],zero,zero,zero
	callq	_LerpMeshVertexes
	movslq	(%r14), %r8
	movl	4(%r14), %r10d
	movslq	%r10d, %r13
	movl	4(%r15), %r12d
	testl	%r12d, %r12d
	jle	LBB0_19
## %bb.3:
	movq	16(%r15), %rdi
	movq	16(%r14), %r9
	cmpl	$4, %r12d
	jb	LBB0_4
## %bb.5:
	leaq	(%r9,%r8,8), %rcx
	subq	%rdi, %rcx
	cmpq	$32, %rcx
	jae	LBB0_7
LBB0_4:
	xorl	%esi, %esi
LBB0_13:
	movq	%rsi, %r11
	notq	%r11
	addq	%r12, %r11
	movq	%r12, %rdx
	andq	$3, %rdx
	je	LBB0_16
## %bb.14:
	leaq	(%r9,%r8,8), %rbx
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rdi,%rsi,8), %rcx
	addq	%r13, %rcx
	movq	%rcx, (%rbx,%rsi,8)
	incq	%rsi
	decq	%rdx
	jne	LBB0_15
LBB0_16:
	cmpq	$3, %r11
	jb	LBB0_19
## %bb.17:
	leaq	(%r9,%r8,8), %rcx
	addq	$24, %rcx
	.p2align	4, 0x90
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rdi,%rsi,8), %rdx
	addq	%r13, %rdx
	movq	%rdx, -24(%rcx,%rsi,8)
	movq	8(%rdi,%rsi,8), %rdx
	addq	%r13, %rdx
	movq	%rdx, -16(%rcx,%rsi,8)
	movq	16(%rdi,%rsi,8), %rdx
	addq	%r13, %rdx
	movq	%rdx, -8(%rcx,%rsi,8)
	movq	24(%rdi,%rsi,8), %rdx
	addq	%r13, %rdx
	movq	%rdx, (%rcx,%rsi,8)
	addq	$4, %rsi
	cmpq	%rsi, %r12
	jne	LBB0_18
	jmp	LBB0_19
LBB0_7:
	movl	%r12d, %esi
	andl	$-4, %esi
	movq	%r13, %xmm0
	pshufd	$68, %xmm0, %xmm0               ## xmm0 = xmm0[0,1,0,1]
	leaq	-4(%rsi), %rcx
	movq	%rcx, %r11
	shrq	$2, %r11
	incq	%r11
	testq	%rcx, %rcx
	je	LBB0_28
## %bb.8:
	movq	%r11, %rbx
	andq	$-2, %rbx
	leaq	(%r9,%r8,8), %rdx
	addq	$48, %rdx
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movdqu	(%rdi,%rcx,8), %xmm1
	movdqu	16(%rdi,%rcx,8), %xmm2
	paddq	%xmm0, %xmm1
	paddq	%xmm0, %xmm2
	movdqu	%xmm1, -48(%rdx,%rcx,8)
	movdqu	%xmm2, -32(%rdx,%rcx,8)
	movdqu	32(%rdi,%rcx,8), %xmm1
	movdqu	48(%rdi,%rcx,8), %xmm2
	paddq	%xmm0, %xmm1
	paddq	%xmm0, %xmm2
	movdqu	%xmm1, -16(%rdx,%rcx,8)
	movdqu	%xmm2, (%rdx,%rcx,8)
	addq	$8, %rcx
	addq	$-2, %rbx
	jne	LBB0_9
## %bb.10:
	testb	$1, %r11b
	je	LBB0_12
LBB0_11:
	movdqu	(%rdi,%rcx,8), %xmm1
	movdqu	16(%rdi,%rcx,8), %xmm2
	paddq	%xmm0, %xmm1
	paddq	%xmm0, %xmm2
	addq	%r8, %rcx
	movdqu	%xmm1, (%r9,%rcx,8)
	movdqu	%xmm2, 16(%r9,%rcx,8)
LBB0_12:
	cmpq	%r12, %rsi
	jne	LBB0_13
LBB0_19:
	addl	%r12d, %r8d
	movl	%r8d, (%r14)
	movl	(%r15), %r9d
	testl	%r9d, %r9d
	jle	LBB0_27
## %bb.20:
	movq	8(%r15), %rsi
	movq	8(%r14), %r8
	cmpl	$1, %r9d
	jne	LBB0_22
## %bb.21:
	xorl	%edi, %edi
	jmp	LBB0_24
LBB0_22:
	movl	%r9d, %r10d
	andl	$-2, %r10d
	leaq	(%r8,%r13,8), %rcx
	addq	$8, %rcx
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_23:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rsi,%rdi,8), %rbx
	movl	(%rbx), %eax
	movq	-8(%rcx,%rdi,8), %rdx
	movl	%eax, (%rdx)
	movl	4(%rbx), %eax
	movl	%eax, 4(%rdx)
	movq	8(%rsi,%rdi,8), %rax
	movl	(%rax), %edx
	movq	(%rcx,%rdi,8), %rbx
	movl	%edx, (%rbx)
	movl	4(%rax), %eax
	movl	%eax, 4(%rbx)
	addq	$2, %rdi
	cmpq	%rdi, %r10
	jne	LBB0_23
LBB0_24:
	testb	$1, %r9b
	je	LBB0_26
## %bb.25:
	movq	(%rsi,%rdi,8), %rax
	movl	(%rax), %ecx
	addq	%rdi, %r13
	movq	(%r8,%r13,8), %rdx
	movl	%ecx, (%rdx)
	movl	4(%rax), %eax
	movl	%eax, 4(%rdx)
LBB0_26:
	movl	(%r15), %r9d
	movl	4(%r14), %r10d
LBB0_27:
	addl	%r9d, %r10d
	movl	%r10d, 4(%r14)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_28:
	xorl	%ecx, %ecx
	testb	$1, %r11b
	jne	LBB0_11
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_backEnd,8,3                    ## @backEnd
	.comm	_tess,32,3                      ## @tess
	.no_dead_strip	_RB_SurfaceMesh
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function RB_SurfaceMesh
_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:
Lloh3:
	adrp	x20, _tess@GOTPAGE
Lloh4:
	ldr	x20, [x20, _tess@GOTPAGEOFF]
	ldr	w0, [x20, #24]
	bl	_RB_CheckVao
	ldp	w0, w1, [x19]
	bl	_RB_CHECKOVERFLOW
	mov	x0, x19
	fmov	s0, s8
	bl	_LerpMeshVertexes
	ldp	w10, w8, [x20]
                                        ; kill: def $w10 killed $w10 def $x10
	sxtw	x10, w10
	sxtw	x9, w8
	ldr	w11, [x19, #4]
	cmp	w11, #1
	b.lt	LBB0_8
; %bb.3:
	ldr	x12, [x19, #16]
	ldr	x13, [x20, #16]
	cmp	w11, #8
	b.lo	LBB0_5
; %bb.4:
	add	x15, x13, x10, lsl #3
	sub	x14, x15, x12
	cmp	x14, #64
	b.hs	LBB0_13
LBB0_5:
	mov	x14, #0
LBB0_6:
	add	x15, x14, x10
	add	x13, x13, x15, lsl #3
	add	x12, x12, x14, lsl #3
	sub	x14, x11, x14
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x15, [x12], #8
	add	x15, x15, x9
	str	x15, [x13], #8
	subs	x14, x14, #1
	b.ne	LBB0_7
LBB0_8:
	add	w10, w11, w10
	str	w10, [x20]
	ldr	w10, [x19]
	cmp	w10, #1
	b.lt	LBB0_12
; %bb.9:
	ldr	x8, [x19, #8]
	ldr	x11, [x20, #8]
	add	x9, x11, x9, lsl #3
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x8], #8
	ldr	w12, [x11]
	ldr	x13, [x9], #8
	str	w12, [x13]
	ldr	w11, [x11, #4]
	str	w11, [x13, #4]
	subs	x10, x10, #1
	b.ne	LBB0_10
; %bb.11:
	ldr	w10, [x19]
	ldr	w8, [x20, #4]
LBB0_12:
	add	w8, w8, w10
	str	w8, [x20, #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	x14, x11, #0xfffffff8
	dup.2d	v0, x9
	add	x15, x15, #32
	add	x16, x12, #32
	mov	x17, x14
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	ldp	q1, q2, [x16, #-32]
	ldp	q3, q4, [x16], #64
	add.2d	v1, v1, v0
	add.2d	v2, v2, v0
	add.2d	v3, v3, v0
	add.2d	v4, v4, v0
	stp	q1, q2, [x15, #-32]
	stp	q3, q4, [x15], #64
	subs	x17, x17, #8
	b.ne	LBB0_14
; %bb.15:
	cmp	x14, x11
	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,32,3                      ; @tess
	.no_dead_strip	_RB_SurfaceMesh
.subsections_via_symbols
