	.file	"extr_portals.c_MakeNodePortal.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"CutNodePortals_r: mislinked portal"
	.text
	.p2align 4
	.globl	MakeNodePortal
	.type	MakeNodePortal, @function
MakeNodePortal:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	sub	rsp, 32
	.cfi_def_cfa_offset 80
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	call	BaseWindingForNode@PLT
	mov	r14, QWORD PTR 24[rbp]
	mov	QWORD PTR 16[rsp], rax
	test	rax, rax
	je	.L1
	mov	rdi, rax
	test	r14, r14
	je	.L2
	lea	r12, 16[rsp]
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L5:
	lea	rdi, .LC1[rip]
	call	Error@PLT
	movsx	rax, r13d
	lea	rbx, 0[0+rax*8]
.L4:
	mov	edx, DWORD PTR CLIP_EPSILON[rip]
	movss	xmm0, DWORD PTR 12[rsp]
	mov	rdi, r12
	xor	esi, esi
	call	ChopWindingInPlace@PLT
	mov	rax, QWORD PTR 40[r14]
	mov	rdi, QWORD PTR 16[rsp]
	add	rax, rbx
	mov	r14, QWORD PTR [rax]
	test	r14, r14
	je	.L2
	test	rdi, rdi
	je	.L1
.L6:
	mov	rax, QWORD PTR 32[r14]
	cmp	QWORD PTR [rax], rbp
	je	.L27
	cmp	QWORD PTR 8[rax], rbp
	jne	.L5
	mov	r8d, DWORD PTR 28[r14]
	xor	esi, esi
	mov	ebx, 8
	mov	edi, DWORD PTR vec3_origin[rip]
	mov	edx, esi
	mov	r13d, 1
	mov	esi, r8d
	call	VectorSubtract@PLT
	movss	xmm0, DWORD PTR 24[r14]
	xorps	xmm0, XMMWORD PTR .LC0[rip]
	movss	DWORD PTR 12[rsp], xmm0
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L27:
	mov	edi, DWORD PTR 28[r14]
	xor	esi, esi
	xor	ebx, ebx
	xor	r13d, r13d
	call	VectorCopy@PLT
	movss	xmm1, DWORD PTR 24[r14]
	movss	DWORD PTR 12[rsp], xmm1
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L2:
	test	rdi, rdi
	je	.L1
	call	WindingIsTiny@PLT
	test	rax, rax
	jne	.L28
	xor	eax, eax
	call	AllocPortal@PLT
	mov	rdx, QWORD PTR 0[rbp]
	mov	rdi, rax
	mov	rax, QWORD PTR mapplanes[rip]
	mov	rax, QWORD PTR [rax+rdx*8]
	mov	QWORD PTR 16[rdi], rbp
	mov	QWORD PTR 24[rdi], rax
	mov	rax, QWORD PTR 16[rsp]
	mov	QWORD PTR 8[rdi], rax
	mov	eax, DWORD PTR 16[rbp]
	mov	DWORD PTR [rdi], eax
	mov	rax, QWORD PTR 8[rbp]
	mov	edx, DWORD PTR 4[rax]
	mov	esi, DWORD PTR [rax]
	call	AddPortalToNodes@PLT
.L1:
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L29
	add	rsp, 32
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	pop	rbx
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L28:
	.cfi_restore_state
	mov	rdi, QWORD PTR 16[rsp]
	add	DWORD PTR c_tinyportals[rip], 1
	call	FreeWinding@PLT
	jmp	.L1
.L29:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	MakeNodePortal, .-MakeNodePortal
	.comm	vec3_origin,4,4
	.comm	mapplanes,8,8
	.comm	c_tinyportals,4,4
	.comm	CLIP_EPSILON,4,4
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	2147483648
	.long	0
	.long	0
	.long	0
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_portals.c_MakeNodePortal.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"CutNodePortals_r: mislinked portal\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	MakeNodePortal
	.syntax unified
	.arm
	.fpu softvfp
	.type	MakeNodePortal, %function
MakeNodePortal:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r3, .L23
	mov	r5, r0
	sub	sp, sp, #12
	ldr	r3, [r3]
	str	r3, [sp, #4]
	mov	r3,#0
	bl	BaseWindingForNode
	ldr	r4, [r5, #12]
	str	r0, [sp]
	cmp	r0, #0
	cmpne	r4, #0
	beq	.L2
	ldr	r9, .L23+4
	ldr	r10, .L23+8
	ldr	fp, .L23+12
	b	.L6
.L5:
	mov	r0, r10
	bl	Error
	lsl	r6, r8, #2
.L4:
	ldr	r3, [r9]
	mov	r2, r7
	mov	r1, #0
	mov	r0, sp
	bl	ChopWindingInPlace
	ldr	r3, [r4, #24]
	ldr	r0, [sp]
	ldr	r4, [r3, r6]
	cmp	r4, #0
	cmpne	r0, #0
	beq	.L2
.L6:
	ldr	r3, [r4, #20]
	ldr	r2, [r3]
	cmp	r2, r5
	beq	.L20
	ldr	r3, [r3, #4]
	cmp	r3, r5
	bne	.L5
	mov	r2, #0
	ldr	r1, [r4, #16]
	ldr	r0, [fp]
	bl	VectorSubtract
	ldr	r7, [r4, #12]
	mov	r6, #4
	mov	r8, #1
	add	r7, r7, #-2147483648
	b	.L4
.L20:
	mov	r8, #0
	ldr	r0, [r4, #16]
	mov	r1, r8
	bl	VectorCopy
	mov	r6, r8
	ldr	r7, [r4, #12]	@ float
	b	.L4
.L2:
	cmp	r0, #0
	beq	.L1
	bl	WindingIsTiny
	cmp	r0, #0
	bne	.L21
	bl	AllocPortal
	mov	r3, r0
	ldr	r2, .L23+16
	ldr	r1, [r5]
	ldr	r2, [r2]
	add	ip, r0, #12
	add	r2, r2, r1, lsl #3
	ldm	r2, {r0, r1}
	ldr	r2, [sp]
	stm	ip, {r0, r1}
	ldr	r0, [r5, #8]
	ldr	r1, [r5, #4]
	stm	r3, {r0, r2, r5}
	mov	r0, r3
	ldm	r1, {r1, r2}
	bl	AddPortalToNodes
.L1:
	ldr	r3, .L23
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L22
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L21:
	ldr	r2, .L23+20
	ldr	r0, [sp]
	ldr	r3, [r2]
	add	r3, r3, #1
	str	r3, [r2]
	bl	FreeWinding
	b	.L1
.L22:
	bl	__stack_chk_fail
.L24:
	.align	2
.L23:
	.word	.LC1
	.word	CLIP_EPSILON
	.word	.LC0
	.word	vec3_origin
	.word	mapplanes
	.word	c_tinyportals
	.size	MakeNodePortal, .-MakeNodePortal
	.comm	vec3_origin,4,4
	.comm	mapplanes,4,4
	.comm	c_tinyportals,4,4
	.comm	CLIP_EPSILON,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
