	.file	"extr_aas_gsubdiv.c_AAS_FindBestAreaSplitPlane.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"gsubdiv: area %d has a tiny winding\r\n"
	.align 8
.LC2:
	.string	"found %d epsilon faces trying to split area %d\r\n"
	.text
	.p2align 4
	.globl	AAS_FindBestAreaSplitPlane
	.type	AAS_FindBestAreaSplitPlane, @function
AAS_FindBestAreaSplitPlane:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	xor	r12d, r12d
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 88
	.cfi_def_cfa_offset 144
	mov	rdi, QWORD PTR cfg[rip]
	mov	QWORD PTR 32[rsp], rsi
	mov	rsi, r12
	mov	QWORD PTR 40[rsp], rdx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 72[rsp], rax
	xor	eax, eax
	call	VectorCopy@PLT
	mov	rdi, r12
	call	VectorInverse@PLT
	mov	r13, QWORD PTR 8[rbp]
	test	r13, r13
	je	.L21
	movss	xmm3, DWORD PTR .LC0[rip]
	lea	rax, 68[rsp]
	mov	r14, r13
	mov	DWORD PTR 28[rsp], 0
	mov	DWORD PTR 24[rsp], 0
	mov	QWORD PTR 8[rsp], rax
	movss	DWORD PTR 20[rsp], xmm3
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L5:
	mov	esi, r15d
	mov	rdi, r14
	call	AAS_GapFace@PLT
	test	rax, rax
	jne	.L8
.L4:
	mov	rax, QWORD PTR [rsp]
	add	rax, QWORD PTR 16[r14]
	mov	r14, QWORD PTR [rax]
	test	r14, r14
	je	.L7
.L17:
	cmp	QWORD PTR 8[r14], rbp
	mov	edi, DWORD PTR 4[r14]
	setne	bl
	setne	r15b
	call	WindingIsTiny@PLT
	movzx	ebx, bl
	movzx	r15d, r15b
	lea	rcx, 0[0+rbx*8]
	mov	QWORD PTR [rsp], rcx
	test	rax, rax
	jne	.L57
	mov	eax, DWORD PTR [r14]
	test	DWORD PTR FACE_GROUND[rip], eax
	je	.L5
.L8:
	mov	rax, QWORD PTR 16[r14]
	mov	r13, QWORD PTR [rax+rbx*8]
	test	r13, r13
	jne	.L6
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L11:
	test	DWORD PTR [r14], eax
	jne	.L19
.L18:
	mov	esi, r15d
	mov	rdi, r14
	call	AAS_GapFace@PLT
	test	rax, rax
	je	.L10
.L15:
	xor	r10d, r10d
	mov	esi, DWORD PTR 4[r13]
	mov	edi, DWORD PTR 4[r14]
	xor	edx, edx
	mov	r8, QWORD PTR 8[rsp]
	mov	rcx, r10
	call	FindPlaneSeperatingWindings@PLT
	test	eax, eax
	je	.L10
	xor	r10d, r10d
	lea	rcx, 60[rsp]
	lea	rdx, 56[rsp]
	mov	rdi, rbp
	movss	xmm0, DWORD PTR 68[rsp]
	lea	r8, 64[rsp]
	mov	rsi, r10
	call	AAS_TestSplitPlane@PLT
	test	eax, eax
	je	.L10
	mov	ecx, DWORD PTR 60[rsp]
	mov	eax, 100
	sub	eax, DWORD PTR 56[rsp]
	pxor	xmm0, xmm0
	pxor	xmm1, xmm1
	lea	edx, [rcx+rcx]
	sub	eax, edx
	cvtsi2ss	xmm0, eax
	imul	eax, DWORD PTR 64[rsp], -1000
	cvtsi2ss	xmm1, eax
	addss	xmm0, xmm1
	comiss	xmm0, DWORD PTR 20[rsp]
	ja	.L58
	.p2align 4,,10
	.p2align 3
.L10:
	mov	rax, QWORD PTR 16[r13]
	movzx	ebx, bl
	mov	r13, QWORD PTR [rax+rbx*8]
	test	r13, r13
	je	.L4
.L6:
	cmp	QWORD PTR 8[r13], rbp
	mov	edi, DWORD PTR 4[r14]
	setne	r12b
	setne	bl
	movzx	r12d, r12b
	call	WindingIsTiny@PLT
	test	rax, rax
	jne	.L59
	mov	eax, DWORD PTR FACE_GROUND[rip]
	test	DWORD PTR 0[r13], eax
	jne	.L11
	mov	esi, r12d
	mov	rdi, r13
	call	AAS_GapFace@PLT
	test	rax, rax
	je	.L10
	mov	eax, DWORD PTR FACE_GROUND[rip]
	test	DWORD PTR [r14], eax
	jne	.L19
.L12:
	test	DWORD PTR 0[r13], eax
	je	.L10
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L19:
	mov	esi, r12d
	mov	rdi, r13
	call	AAS_GapFace@PLT
	test	rax, rax
	jne	.L15
	mov	eax, DWORD PTR FACE_GROUND[rip]
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L59:
	mov	esi, DWORD PTR 0[rbp]
	lea	rdi, .LC1[rip]
	xor	eax, eax
	call	Log_Write@PLT
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L57:
	mov	esi, DWORD PTR 0[rbp]
	lea	rdi, .LC1[rip]
	xor	eax, eax
	call	Log_Write@PLT
	mov	rax, QWORD PTR [rsp]
	add	rax, QWORD PTR 16[r14]
	mov	r14, QWORD PTR [rax]
	test	r14, r14
	jne	.L17
	.p2align 4,,10
	.p2align 3
.L7:
	mov	eax, DWORD PTR 28[rsp]
	test	eax, eax
	je	.L1
	mov	edx, DWORD PTR 0[rbp]
	mov	esi, DWORD PTR 64[rsp]
	lea	rdi, .LC2[rip]
	xor	eax, eax
	call	Log_Write@PLT
.L1:
	mov	rax, QWORD PTR 72[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L60
	mov	eax, DWORD PTR 24[rsp]
	add	rsp, 88
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L58:
	.cfi_restore_state
	xor	r10d, r10d
	mov	rsi, QWORD PTR 32[rsp]
	movss	DWORD PTR 20[rsp], xmm0
	mov	rdi, r10
	call	VectorCopy@PLT
	mov	rax, QWORD PTR 40[rsp]
	movss	xmm1, DWORD PTR 68[rsp]
	mov	DWORD PTR 24[rsp], 1
	movss	DWORD PTR [rax], xmm1
	mov	eax, DWORD PTR 64[rsp]
	mov	DWORD PTR 28[rsp], eax
	jmp	.L10
.L21:
	mov	DWORD PTR 24[rsp], 0
	jmp	.L1
.L60:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	AAS_FindBestAreaSplitPlane, .-AAS_FindBestAreaSplitPlane
	.comm	cfg,8,8
	.comm	FACE_GROUND,4,4
	.section	.rodata.cst4,"aM",@progbits,4
	.align 4
.LC0:
	.long	3379831792
	.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_aas_gsubdiv.c_AAS_FindBestAreaSplitPlane.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"gsubdiv: area %d has a tiny winding\015\012\000"
	.global	__aeabi_i2f
	.global	__aeabi_fadd
	.global	__aeabi_fcmpgt
	.align	2
.LC1:
	.ascii	"found %d epsilon faces trying to split area %d\015\012"
	.ascii	"\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	AAS_FindBestAreaSplitPlane
	.syntax unified
	.arm
	.fpu softvfp
	.type	AAS_FindBestAreaSplitPlane, %function
AAS_FindBestAreaSplitPlane:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	r3, r1
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r4, #0
	mov	r7, r0
	sub	sp, sp, #60
	ldr	r0, .L60
	str	r3, [sp, #24]
	ldr	r3, .L60+4
	str	r2, [sp, #28]
	mov	r1, r4
	ldr	r0, [r0]
	ldr	r3, [r3]
	str	r3, [sp, #52]
	mov	r3,#0
	bl	VectorCopy
	mov	r0, r4
	bl	VectorInverse
	ldr	r6, [r7, #4]
	cmp	r6, r4
	beq	.L21
	ldr	r3, .L60+8
	ldr	r9, .L60+12
	ldr	fp, .L60+16
	str	r4, [sp, #20]
	str	r4, [sp, #16]
	str	r3, [sp, #12]	@ float
	b	.L17
.L5:
	mov	r1, r8
	mov	r0, r6
	bl	AAS_GapFace
	cmp	r0, #0
	bne	.L8
.L4:
	ldr	r3, [r6, #12]
	ldr	r6, [r3, r8, lsl #2]
	cmp	r6, #0
	beq	.L7
.L17:
	ldmib	r6, {r0, r8}
	subs	r8, r8, r7
	movne	r8, #1
	bl	WindingIsTiny
	cmp	r0, #0
	bne	.L56
	ldr	r2, [r6]
	ldr	r3, [r9]
	tst	r2, r3
	beq	.L5
.L8:
	ldr	r3, [r6, #12]
	ldr	r4, [r3, r8, lsl #2]
	cmp	r4, #0
	bne	.L6
	b	.L7
.L11:
	ldr	r2, [r6]
	tst	r3, r2
	bne	.L19
.L18:
	mov	r1, r8
	mov	r0, r6
	bl	AAS_GapFace
	cmp	r0, #0
	beq	.L10
.L15:
	add	r3, sp, #48
	ldr	r1, [r4, #4]
	ldr	r0, [r6, #4]
	str	r3, [sp]
	mov	r3, #0
	mov	r2, r3
	bl	FindPlaneSeperatingWindings
	cmp	r0, #0
	beq	.L10
	add	r2, sp, #44
	add	r3, sp, #40
	str	r2, [sp, #4]
	str	r3, [sp]
	mov	r1, #0
	mov	r0, r7
	ldr	r2, [sp, #48]	@ float
	add	r3, sp, #36
	bl	AAS_TestSplitPlane
	cmp	r0, #0
	beq	.L10
	ldr	r3, [sp, #36]
	ldr	r0, [sp, #40]
	rsb	r3, r3, #100
	sub	r0, r3, r0, lsl #1
	bl	__aeabi_i2f
	mov	r10, r0
	ldr	r3, [sp, #44]
	rsb	r0, r3, r3, lsl #22
	add	r0, r3, r0, lsl #6
	add	r0, r3, r0, lsl #1
	lsl	r0, r0, #3
	bl	__aeabi_i2f
	mov	r1, r10
	bl	__aeabi_fadd
	ldr	r1, [sp, #12]	@ float
	mov	r10, r0
	bl	__aeabi_fcmpgt
	cmp	r0, #0
	bne	.L57
.L10:
	ldr	r3, [r4, #12]
	ldr	r4, [r3, r5, lsl #2]
	cmp	r4, #0
	beq	.L4
.L6:
	ldr	r5, [r4, #8]
	ldr	r0, [r6, #4]
	subs	r5, r5, r7
	movne	r5, #1
	bl	WindingIsTiny
	cmp	r0, #0
	bne	.L58
	ldr	r3, [r9]
	ldr	r2, [r4]
	tst	r3, r2
	bne	.L11
	mov	r1, r5
	mov	r0, r4
	bl	AAS_GapFace
	cmp	r0, #0
	beq	.L10
	ldr	r3, [r9]
	ldr	r2, [r6]
	tst	r3, r2
	bne	.L19
.L12:
	ldr	r2, [r4]
	tst	r3, r2
	beq	.L10
	b	.L18
.L19:
	mov	r1, r5
	mov	r0, r4
	bl	AAS_GapFace
	cmp	r0, #0
	bne	.L15
	ldr	r3, [r9]
	b	.L12
.L58:
	mov	r0, fp
	ldr	r1, [r7]
	bl	Log_Write
	b	.L10
.L56:
	mov	r0, fp
	ldr	r1, [r7]
	bl	Log_Write
	ldr	r3, [r6, #12]
	ldr	r6, [r3, r8, lsl #2]
	cmp	r6, #0
	bne	.L17
.L7:
	ldr	r3, [sp, #20]
	cmp	r3, #0
	beq	.L1
	ldr	r2, [r7]
	ldr	r1, [sp, #44]
	ldr	r0, .L60+20
	bl	Log_Write
.L1:
	ldr	r3, .L60+4
	ldr	r2, [r3]
	ldr	r3, [sp, #52]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L59
	ldr	r0, [sp, #16]
	add	sp, sp, #60
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L57:
	mov	r3, #1
	mov	r0, #0
	ldr	r1, [sp, #24]
	str	r3, [sp, #16]
	str	r10, [sp, #12]	@ float
	bl	VectorCopy
	ldr	r2, [sp, #44]
	ldr	r3, [sp, #48]	@ float
	str	r2, [sp, #20]
	ldr	r2, [sp, #28]
	str	r3, [r2]	@ float
	b	.L10
.L21:
	str	r6, [sp, #16]
	b	.L1
.L59:
	bl	__stack_chk_fail
.L61:
	.align	2
.L60:
	.word	cfg
	.word	.LC2
	.word	-915135504
	.word	FACE_GROUND
	.word	.LC0
	.word	.LC1
	.size	AAS_FindBestAreaSplitPlane, .-AAS_FindBestAreaSplitPlane
	.comm	cfg,4,4
	.comm	FACE_GROUND,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
