	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_FaceFromPortal                 ## -- Begin function FaceFromPortal
	.p2align	4, 0x90
_FaceFromPortal:                        ## @FaceFromPortal
	.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	16(%rdi), %rbx
	testq	%rbx, %rbx
	je	LBB0_6
## %bb.1:
	movl	%esi, %r15d
	movq	%rdi, %r14
	xorl	%eax, %eax
	callq	_AllocFace
	movq	%rax, %r13
	movl	4(%rbx), %eax
	movl	%eax, 24(%r13)
	movl	(%rbx), %eax
	andl	$-2, %eax
	orl	%r15d, %eax
	movl	%eax, (%r13)
	movq	%r14, 16(%r13)
	movq	(%r14), %rax
	movslq	%r15d, %rcx
	movq	(%rax,%rcx,8), %rcx
	movl	(%rcx), %edi
	movq	_CONTENTS_WINDOW@GOTPCREL(%rip), %r12
	testl	%edi, (%r12)
	je	LBB0_4
## %bb.2:
	xorl	%ecx, %ecx
	testl	%r15d, %r15d
	sete	%cl
	movq	(%rax,%rcx,8), %rax
	xorl	(%rax), %edi
	callq	_VisibleContents
	cmpl	(%r12), %eax
	jne	LBB0_4
LBB0_6:
	xorl	%r13d, %r13d
	jmp	LBB0_9
LBB0_4:
	movl	8(%r14), %edi
	testl	%r15d, %r15d
	je	LBB0_7
## %bb.5:
	callq	_ReverseWinding
	movl	%eax, 8(%r13)
	movq	(%r14), %rax
	addq	$8, %rax
	jmp	LBB0_8
LBB0_7:
	callq	_CopyWinding
	movl	%eax, 8(%r13)
	movq	(%r14), %rax
LBB0_8:
	movq	(%rax), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r13)
LBB0_9:
	movq	%r13, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CONTENTS_WINDOW,4,2            ## @CONTENTS_WINDOW
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_FaceFromPortal                 ; -- Begin function FaceFromPortal
	.p2align	2
_FaceFromPortal:                        ; @FaceFromPortal
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [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 w21, -40
	.cfi_offset w22, -48
	ldr	x22, [x0, #16]
	cbz	x22, LBB0_3
; %bb.1:
	mov	x21, x1
	mov	x20, x0
	bl	_AllocFace
	mov	x19, x0
	ldp	w9, w8, [x22]
	str	w8, [x0, #24]
	and	w8, w9, #0xfffffffe
	orr	w9, w8, w21
	str	x20, [x0, #16]
	ldr	x8, [x20]
	ldr	x10, [x8, w21, sxtw #3]
	str	w9, [x0]
	ldr	w9, [x10]
Lloh0:
	adrp	x22, _CONTENTS_WINDOW@GOTPAGE
Lloh1:
	ldr	x22, [x22, _CONTENTS_WINDOW@GOTPAGEOFF]
	ldr	w10, [x22]
	tst	w10, w9
	b.eq	LBB0_4
; %bb.2:
	cmp	w21, #0
	cset	w10, eq
	ldr	x8, [x8, w10, uxtw #3]
	ldr	w8, [x8]
	eor	w0, w8, w9
	bl	_VisibleContents
	ldr	w8, [x22]
	cmp	w0, w8
	b.ne	LBB0_4
LBB0_3:
	mov	x19, #0
	b	LBB0_8
LBB0_4:
	ldr	w0, [x20, #8]
	cbz	w21, LBB0_6
; %bb.5:
	bl	_ReverseWinding
	str	w0, [x19, #8]
	ldr	x8, [x20]
	add	x8, x8, #8
	b	LBB0_7
LBB0_6:
	bl	_CopyWinding
	str	w0, [x19, #8]
	ldr	x8, [x20]
LBB0_7:
	ldr	x8, [x8]
	ldr	w8, [x8]
	str	w8, [x19, #4]
LBB0_8:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_CONTENTS_WINDOW,4,2            ; @CONTENTS_WINDOW
.subsections_via_symbols
