	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function MakeNodePortal
LCPI0_0:
	.long	0x80000000                      ## float -0
	.long	0x80000000                      ## float -0
	.long	0x80000000                      ## float -0
	.long	0x80000000                      ## float -0
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_MakeNodePortal
	.p2align	4, 0x90
_MakeNodePortal:                        ## @MakeNodePortal
	.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, %r12
	callq	_BaseWindingForNode
	movq	%rax, -48(%rbp)
	movq	24(%r12), %rbx
	testq	%rax, %rax
	setne	%cl
	testq	%rbx, %rbx
	je	LBB0_10
## %bb.1:
	testq	%rax, %rax
	je	LBB0_10
## %bb.2:
	movq	_CLIP_EPSILON@GOTPCREL(%rip), %r13
	leaq	-48(%rbp), %r14
                                        ## implicit-def: $r15d
                                        ## implicit-def: $xmm0
                                        ## kill: killed $xmm0
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	32(%rbx), %rax
	cmpq	%r12, (%rax)
	je	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpq	%r12, 8(%rax)
	je	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	leaq	L_.str(%rip), %rdi
	callq	_Error
	movaps	-64(%rbp), %xmm0                ## 16-byte Reload
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	28(%rbx), %edi
	callq	_VectorCopy
	movss	24(%rbx), %xmm0                 ## xmm0 = mem[0],zero,zero,zero
	xorl	%r15d, %r15d
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	_vec3_origin@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	28(%rbx), %esi
	callq	_VectorSubtract
	movss	24(%rbx), %xmm0                 ## xmm0 = mem[0],zero,zero,zero
	xorps	LCPI0_0(%rip), %xmm0
	movl	$1, %r15d
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	(%r13), %edx
	movq	%r14, %rdi
	movaps	%xmm0, -64(%rbp)                ## 16-byte Spill
	callq	_ChopWindingInPlace
	movq	40(%rbx), %rcx
	movslq	%r15d, %rdx
	movq	-48(%rbp), %rax
	movq	(%rcx,%rdx,8), %rbx
	testq	%rax, %rax
	setne	%cl
	testq	%rbx, %rbx
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=1
	testq	%rax, %rax
	jne	LBB0_3
LBB0_10:
	testb	%cl, %cl
	je	LBB0_14
## %bb.11:
	movq	%rax, %rdi
	callq	_WindingIsTiny
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movq	_c_tinyportals@GOTPCREL(%rip), %rax
	incl	(%rax)
	movq	-48(%rbp), %rdi
	callq	_FreeWinding
	jmp	LBB0_14
LBB0_13:
	xorl	%eax, %eax
	callq	_AllocPortal
	movq	_mapplanes@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%r12), %rdx
	movq	(%rcx,%rdx,8), %rcx
	movq	%rcx, 24(%rax)
	movq	%r12, 16(%rax)
	movq	-48(%rbp), %rcx
	movq	%rcx, 8(%rax)
	movl	16(%r12), %ecx
	movl	%ecx, (%rax)
	movq	8(%r12), %rcx
	movl	(%rcx), %esi
	movl	4(%rcx), %edx
	movq	%rax, %rdi
	callq	_AddPortalToNodes
LBB0_14:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_vec3_origin,4,2                ## @vec3_origin
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"CutNodePortals_r: mislinked portal"

	.comm	_CLIP_EPSILON,4,2               ## @CLIP_EPSILON
	.comm	_c_tinyportals,4,2              ## @c_tinyportals
	.comm	_mapplanes,8,3                  ## @mapplanes
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_MakeNodePortal                 ; -- Begin function MakeNodePortal
	.p2align	2
_MakeNodePortal:                        ; @MakeNodePortal
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	d9, d8, [sp, #16]               ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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 b8, -72
	.cfi_offset b9, -80
	mov	x19, x0
	bl	_BaseWindingForNode
	str	x0, [sp, #8]
	ldr	x21, [x19, #24]
	cmp	x0, #0
	cset	w8, ne
	cmp	x21, #0
	ccmp	x0, #0, #4, ne
	b.ne	LBB0_4
LBB0_1:
	cbz	w8, LBB0_12
; %bb.2:
	bl	_WindingIsTiny
	cbz	x0, LBB0_11
; %bb.3:
Lloh0:
	adrp	x8, _c_tinyportals@GOTPAGE
Lloh1:
	ldr	x8, [x8, _c_tinyportals@GOTPAGEOFF]
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
	ldr	x0, [sp, #8]
	bl	_FreeWinding
	b	LBB0_12
LBB0_4:
Lloh2:
	adrp	x22, _CLIP_EPSILON@GOTPAGE
Lloh3:
	ldr	x22, [x22, _CLIP_EPSILON@GOTPAGEOFF]
Lloh4:
	adrp	x23, _vec3_origin@GOTPAGE
Lloh5:
	ldr	x23, [x23, _vec3_origin@GOTPAGEOFF]
Lloh6:
	adrp	x20, l_.str@PAGE
Lloh7:
	add	x20, x20, l_.str@PAGEOFF
                                        ; implicit-def: $w24
                                        ; implicit-def: $s8
	b	LBB0_7
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=1
	ldr	w0, [x21, #28]
	bl	_VectorCopy
	mov	w24, #0
	ldr	s8, [x21, #24]
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	ldr	w2, [x22]
	add	x0, sp, #8
	fmov	s0, s8
	bl	_ChopWindingInPlace
	ldr	x8, [x21, #40]
	ldr	x0, [sp, #8]
	ldr	x21, [x8, w24, sxtw #3]
	cmp	x0, #0
	cset	w8, ne
	cmp	x21, #0
	ccmp	x0, #0, #4, ne
	b.eq	LBB0_1
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21, #32]
	ldr	x9, [x8]
	cmp	x9, x19
	b.eq	LBB0_5
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x8, #8]
	cmp	x8, x19
	b.eq	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x20
	bl	_Error
	b	LBB0_6
LBB0_10:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w0, [x23]
	ldr	w1, [x21, #28]
	bl	_VectorSubtract
	ldr	s0, [x21, #24]
	fneg	s8, s0
	mov	w24, #1
	b	LBB0_6
LBB0_11:
	bl	_AllocPortal
Lloh8:
	adrp	x8, _mapplanes@GOTPAGE
Lloh9:
	ldr	x8, [x8, _mapplanes@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	ldr	x9, [x19]
	ldr	x8, [x8, x9, lsl #3]
	stp	x19, x8, [x0, #16]
	ldr	x8, [sp, #8]
	str	x8, [x0, #8]
	ldr	w8, [x19, #16]
	str	w8, [x0]
	ldr	x8, [x19, #8]
	ldp	w1, w2, [x8]
	bl	_AddPortalToNodes
LBB0_12:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #16]               ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_vec3_origin,4,2                ; @vec3_origin
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"CutNodePortals_r: mislinked portal"

	.comm	_CLIP_EPSILON,4,2               ; @CLIP_EPSILON
	.comm	_c_tinyportals,4,2              ; @c_tinyportals
	.comm	_mapplanes,8,3                  ; @mapplanes
.subsections_via_symbols
