	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function RB_SurfaceFace
_RB_SurfaceFace:                        ## @RB_SurfaceFace
	.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, %r14
	movl	(%rdi), %edi
	movl	4(%r14), %esi
	callq	_RB_CHECKOVERFLOW
	movl	8(%r14), %eax
	movq	_tess@GOTPCREL(%rip), %r15
	orl	%eax, (%r15)
	movl	16(%r15), %edx
	movl	4(%r14), %r9d
	testl	%r9d, %r9d
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	jle	LBB0_15
## %bb.1:
	movslq	12(%r14), %rsi
	leaq	(%r14,%rsi), %rax
	movl	4(%r15), %r10d
	movq	8(%r15), %rdi
	movslq	%edx, %rdx
	leaq	(%rdi,%rdx,4), %rdx
	cmpl	$8, %r9d
	jb	LBB0_2
## %bb.3:
	leaq	-1(%r9), %rcx
	movl	%r9d, %edi
	decl	%edi
	cmpl	%ecx, %edi
	jb	LBB0_2
## %bb.4:
	movq	%rcx, %rbx
	shrq	$32, %rbx
	jne	LBB0_2
## %bb.5:
	leaq	(%r14,%rdi,4), %rbx
	addq	%rsi, %rbx
	leaq	(%rdx,%rdi,4), %rsi
	subq	%rsi, %rbx
	cmpq	$32, %rbx
	jae	LBB0_9
LBB0_2:
	movq	%r9, %rdi
LBB0_12:
	incq	%rdi
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	leal	-2(%rdi), %ecx
	movl	(%rax,%rcx,4), %esi
	addl	%r10d, %esi
	movl	%esi, (%rdx,%rcx,4)
	decq	%rdi
	cmpq	$1, %rdi
	ja	LBB0_13
LBB0_14:
	movl	4(%r14), %r9d
	movl	16(%r15), %edx
LBB0_15:
	addl	%r9d, %edx
	movl	%edx, 16(%r15)
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movl	(%r14), %r13d
	movq	64(%r15), %rax
	cmpq	$0, (%rax)
	je	LBB0_19
## %bb.16:
	movl	4(%r15), %eax
	testl	%r13d, %r13d
	jle	LBB0_23
## %bb.17:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	24(%rcx), %r14
	movslq	%eax, %rbx
	movl	%r13d, %r12d
	.p2align	4, 0x90
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movq	56(%r15), %rax
	movl	(%rax,%rbx,4), %esi
	movq	%r14, %rdi
	callq	_VectorCopy
	incq	%rbx
	decl	%r12d
	jne	LBB0_18
LBB0_19:
	movl	4(%r15), %eax
	testl	%r13d, %r13d
	jle	LBB0_23
## %bb.20:
	movslq	%eax, %r14
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	16(%rax), %rax
	movq	(%rax), %rbx
	movl	-52(%rbp), %r12d                ## 4-byte Reload
	.p2align	4, 0x90
LBB0_21:                                ## =>This Inner Loop Header: Depth=1
	movq	48(%r15), %rax
	movl	(%rax,%r14,4), %esi
	movq	%rbx, %rdi
	callq	_VectorCopy
	movss	12(%rbx), %xmm0                 ## xmm0 = mem[0],zero,zero,zero
	movq	24(%r15), %rax
	movq	(%rax,%r14,8), %rax
	movq	(%rax), %rcx
	movss	%xmm0, (%rcx)
	movss	16(%rbx), %xmm0                 ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, 4(%rcx)
	movss	20(%rbx), %xmm0                 ## xmm0 = mem[0],zero,zero,zero
	movq	8(%rax), %rax
	movss	%xmm0, (%rax)
	movd	24(%rbx), %xmm0                 ## xmm0 = mem[0],zero,zero,zero
	movd	%xmm0, 4(%rax)
	movl	28(%rbx), %eax
	movq	40(%r15), %rcx
	movl	%eax, (%rcx,%r14,4)
	movq	32(%r15), %rax
	movl	%r12d, (%rax,%r14,4)
	movq	_VERTEXSIZE@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	leaq	(%rbx,%rax,4), %rbx
	incq	%r14
	decl	%r13d
	jne	LBB0_21
## %bb.22:
	movl	4(%r15), %eax
LBB0_23:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	addl	(%rcx), %eax
	movl	%eax, 4(%r15)
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movl	%r9d, %r8d
	andl	$-8, %r8d
	movl	%r9d, %edi
	andl	$7, %edi
	movd	%r10d, %xmm0
	pshufd	$0, %xmm0, %xmm0                ## xmm0 = xmm0[0,0,0,0]
	pshufd	$27, %xmm0, %xmm0               ## xmm0 = xmm0[3,2,1,0]
	movq	%r8, %rsi
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movl	%ecx, %ebx
	shlq	$2, %rbx
	movdqu	-28(%rax,%rbx), %xmm1
	movdqu	-12(%rax,%rbx), %xmm2
	paddd	%xmm0, %xmm2
	movdqu	%xmm2, -12(%rdx,%rbx)
	paddd	%xmm0, %xmm1
	movdqu	%xmm1, -28(%rdx,%rbx)
	addq	$-8, %rcx
	addq	$-8, %rsi
	jne	LBB0_10
## %bb.11:
	cmpq	%r9, %r8
	je	LBB0_14
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_tess,72,3                      ## @tess
	.comm	_VERTEXSIZE,4,2                 ## @VERTEXSIZE
	.no_dead_strip	_RB_SurfaceFace
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function RB_SurfaceFace
_RB_SurfaceFace:                        ; @RB_SurfaceFace
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x0
	ldr	w0, [x0]
	ldr	w1, [x19, #4]
	bl	_RB_CHECKOVERFLOW
Lloh0:
	adrp	x21, _tess@GOTPAGE
Lloh1:
	ldr	x21, [x21, _tess@GOTPAGEOFF]
	ldr	w8, [x21]
	ldp	w11, w22, [x19, #4]
	orr	w8, w8, w22
	str	w8, [x21]
	ldr	w13, [x21, #16]
	subs	w15, w11, #1
	b.lt	LBB0_8
; %bb.1:
	ldrsw	x14, [x19, #12]
	add	x8, x19, x14
	ldr	w9, [x21, #4]
	ldr	x16, [x21, #8]
	add	x10, x16, w13, sxtw #2
	cmp	w11, #16
	b.lo	LBB0_4
; %bb.2:
	sub	x12, x11, #1
	cmp	w15, w12
	lsr	x17, x12, #32
	ccmp	x17, #0, #0, hs
	b.ne	LBB0_4
; %bb.3:
	sxtw	x13, w13
	lsl	x15, x15, #2
	add	x17, x15, x19
	add	x14, x17, x14
	add	x13, x16, x13, lsl #2
	add	x13, x13, x15
	sub	x13, x14, x13
	cmp	x13, #64
	b.hs	LBB0_17
LBB0_4:
	mov	x13, x11
LBB0_5:
	add	x11, x13, #1
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	sub	w12, w11, #2
	lsl	x12, x12, #2
	ldr	w13, [x8, x12]
	add	w13, w13, w9
	str	w13, [x10, x12]
	sub	x11, x11, #1
	cmp	x11, #1
	b.hi	LBB0_6
LBB0_7:
	ldr	w11, [x19, #4]
	ldr	w13, [x21, #16]
LBB0_8:
	add	w8, w13, w11
	str	w8, [x21, #16]
	ldr	w23, [x19]
	ldr	x8, [x21, #64]
	ldr	x8, [x8]
	cbz	x8, LBB0_12
; %bb.9:
	ldr	w8, [x21, #4]
	cmp	w23, #1
	b.lt	LBB0_16
; %bb.10:
	ldr	x20, [x19, #24]
	sxtw	x8, w8
	lsl	x24, x8, #2
	mov	x25, x23
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21, #56]
	ldr	w1, [x8, x24]
	mov	x0, x20
	bl	_VectorCopy
	add	x24, x24, #4
	subs	w25, w25, #1
	b.ne	LBB0_11
LBB0_12:
	ldr	w8, [x21, #4]
	cmp	w23, #1
	b.lt	LBB0_16
; %bb.13:
                                        ; kill: def $w8 killed $w8 killed $x8 def $x8
	sxtw	x24, w8
	ldr	x8, [x19, #16]
	ldr	x20, [x8]
Lloh2:
	adrp	x25, _VERTEXSIZE@GOTPAGE
Lloh3:
	ldr	x25, [x25, _VERTEXSIZE@GOTPAGEOFF]
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21, #48]
	lsl	x26, x24, #2
	ldr	w1, [x8, x26]
	mov	x0, x20
	bl	_VectorCopy
	ldr	s0, [x20, #12]
	ldr	w8, [x20, #28]
	ldr	x9, [x21, #40]
	str	w8, [x9, x26]
	ldp	x8, x9, [x21, #24]
	ldr	x8, [x8, x24, lsl #3]
	ldp	x10, x8, [x8]
	str	s0, [x10]
	ldr	s0, [x20, #16]
	str	s0, [x10, #4]
	ldr	s0, [x20, #20]
	str	s0, [x8]
	ldr	s0, [x20, #24]
	str	s0, [x8, #4]
	str	w22, [x9, x26]
	ldrsw	x8, [x25]
	add	x20, x20, x8, lsl #2
	add	x24, x24, #1
	subs	w23, w23, #1
	b.ne	LBB0_14
; %bb.15:
	ldr	w8, [x21, #4]
LBB0_16:
	ldr	w9, [x19]
	add	w8, w8, w9
	str	w8, [x21, #4]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_17:
	and	x14, x11, #0xfffffff0
	and	x13, x11, #0xf
	dup.4s	v0, w9
	rev64.4s	v0, v0
	ext.16b	v0, v0, v0, #8
	mov	x15, x14
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	ubfiz	x16, x12, #2, #32
	add	x17, x8, x16
	ldur	q1, [x17, #-12]
	ldur	q2, [x17, #-28]
	ldur	q3, [x17, #-44]
	ldur	q4, [x17, #-60]
	add	x16, x10, x16
	add.4s	v1, v1, v0
	stur	q1, [x16, #-12]
	add.4s	v1, v2, v0
	stur	q1, [x16, #-28]
	add.4s	v1, v3, v0
	stur	q1, [x16, #-44]
	add.4s	v1, v4, v0
	stur	q1, [x16, #-60]
	sub	x12, x12, #16
	subs	x15, x15, #16
	b.ne	LBB0_18
; %bb.19:
	cmp	x14, x11
	b.eq	LBB0_7
	b	LBB0_5
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_tess,72,3                      ; @tess
	.comm	_VERTEXSIZE,4,2                 ; @VERTEXSIZE
	.no_dead_strip	_RB_SurfaceFace
.subsections_via_symbols
