	.file	"extr_aas_create.c_AAS_CheckFaceWindingPlane.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC3:
	.string	"AAS_CheckFaceWindingPlane: face %d winding plane unequal to face plane\r\n"
	.align 8
.LC5:
	.string	"AAS_CheckFaceWindingPlane: face %d winding reversed\r\n"
	.text
	.p2align 4
	.globl	AAS_CheckFaceWindingPlane
	.type	AAS_CheckFaceWindingPlane, @function
AAS_CheckFaceWindingPlane:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	xor	ebp, ebp
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rsi, rbp
	sub	rsp, 32
	.cfi_def_cfa_offset 64
	mov	rdi, QWORD PTR 8[rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	lea	rdx, 20[rsp]
	call	WindingPlane@PLT
	mov	rbx, QWORD PTR [r12]
	mov	rsi, rbp
	sal	rbx, 4
	add	rbx, QWORD PTR mapplanes[rip]
	mov	rdi, QWORD PTR [rbx]
	call	DotProduct@PLT
	pxor	xmm1, xmm1
	cvtsi2ss	xmm1, QWORD PTR 8[rbx]
	movss	DWORD PTR 12[rsp], xmm0
	movss	xmm0, DWORD PTR 20[rsp]
	subss	xmm0, xmm1
	cvttss2si	rdi, xmm0
	call	fabs@PLT
	comisd	xmm0, QWORD PTR .LC0[rip]
	ja	.L6
	mov	rax, QWORD PTR [rbx]
	mov	rdi, QWORD PTR ds:0
	sub	rdi, QWORD PTR [rax]
	call	fabs@PLT
	comisd	xmm0, QWORD PTR .LC2[rip]
	jbe	.L22
.L6:
	xor	ebp, ebp
	mov	rdi, rbp
	call	VectorInverse@PLT
	pxor	xmm1, xmm1
	movss	xmm0, DWORD PTR 20[rsp]
	xorps	xmm0, XMMWORD PTR .LC1[rip]
	cvtsi2ss	xmm1, QWORD PTR 8[rbx]
	movss	DWORD PTR 20[rsp], xmm0
	subss	xmm0, xmm1
	cvttss2si	rdi, xmm0
	call	fabs@PLT
	comisd	xmm0, QWORD PTR .LC0[rip]
	jbe	.L23
.L4:
	mov	esi, DWORD PTR 16[r12]
	lea	rdi, .LC3[rip]
	xor	ebp, ebp
	call	Log_Write@PLT
	mov	rdi, QWORD PTR [rbx]
	mov	rsi, rbp
	call	DotProduct@PLT
	pxor	xmm1, xmm1
	comiss	xmm1, DWORD PTR 12[rsp]
	ja	.L24
.L9:
	movss	xmm3, DWORD PTR 12[rsp]
	comiss	xmm3, xmm1
	jbe	.L1
	comiss	xmm1, xmm0
	ja	.L19
.L1:
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L25
	add	rsp, 32
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L23:
	.cfi_restore_state
	mov	rax, QWORD PTR [rbx]
	mov	rdi, QWORD PTR ds:0
	sub	rdi, QWORD PTR [rax]
	call	fabs@PLT
	comisd	xmm0, QWORD PTR .LC2[rip]
	ja	.L4
	mov	rax, QWORD PTR [rbx]
	mov	rdi, QWORD PTR ds:8
	sub	rdi, QWORD PTR 8[rax]
	call	fabs@PLT
	comisd	xmm0, QWORD PTR .LC2[rip]
	ja	.L4
	mov	rax, QWORD PTR [rbx]
	mov	rdi, QWORD PTR ds:16
	sub	rdi, QWORD PTR 16[rax]
	call	fabs@PLT
	comisd	xmm0, QWORD PTR .LC2[rip]
	ja	.L4
	.p2align 4,,10
	.p2align 3
.L19:
	mov	esi, DWORD PTR 16[r12]
	lea	rdi, .LC5[rip]
	call	Log_Write@PLT
	mov	rbp, QWORD PTR 8[r12]
	mov	rdi, rbp
	call	ReverseWinding@PLT
	mov	rdi, rbp
	mov	QWORD PTR 8[r12], rax
	call	FreeWinding@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L24:
	comiss	xmm0, xmm1
	ja	.L19
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L22:
	mov	rax, QWORD PTR [rbx]
	mov	rdi, QWORD PTR ds:8
	sub	rdi, QWORD PTR 8[rax]
	call	fabs@PLT
	comisd	xmm0, QWORD PTR .LC2[rip]
	ja	.L6
	mov	rax, QWORD PTR [rbx]
	mov	rdi, QWORD PTR ds:16
	sub	rdi, QWORD PTR 16[rax]
	call	fabs@PLT
	comisd	xmm0, QWORD PTR .LC2[rip]
	ja	.L6
	jmp	.L1
.L25:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	AAS_CheckFaceWindingPlane, .-AAS_CheckFaceWindingPlane
	.comm	mapplanes,8,8
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC0:
	.long	2576980378
	.long	1071225241
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.long	2147483648
	.long	0
	.long	0
	.long	0
	.section	.rodata.cst8
	.align 8
.LC2:
	.long	3944497965
	.long	1058682594
	.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_create.c_AAS_CheckFaceWindingPlane.c"
	.text
	.global	__aeabi_i2f
	.global	__aeabi_fsub
	.global	__aeabi_f2iz
	.global	__aeabi_dcmpgt
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"AAS_CheckFaceWindingPlane: face %d winding plane un"
	.ascii	"equal to face plane\015\012\000"
	.global	__aeabi_fcmplt
	.global	__aeabi_fcmpgt
	.align	2
.LC1:
	.ascii	"AAS_CheckFaceWindingPlane: face %d winding reversed"
	.ascii	"\015\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	AAS_CheckFaceWindingPlane
	.syntax unified
	.arm
	.fpu softvfp
	.type	AAS_CheckFaceWindingPlane, %function
AAS_CheckFaceWindingPlane:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	mov	r5, #0
	mov	r4, r0
	sub	sp, sp, #12
	ldr	r3, .L26
	mov	r2, sp
	mov	r1, r5
	ldr	r0, [r0, #4]
	ldr	r3, [r3]
	str	r3, [sp, #4]
	mov	r3,#0
	bl	WindingPlane
	ldr	r3, .L26+4
	ldr	r7, [r4]
	ldr	r6, [r3]
	mov	r1, r5
	ldr	r0, [r6, r7, lsl #3]
	bl	DotProduct
	add	r9, r6, r7, lsl #3
	mov	r8, r0
	ldr	r0, [r9, #4]
	bl	__aeabi_i2f
	mov	r1, r0
	ldr	r0, [sp]	@ float
	bl	__aeabi_fsub
	bl	__aeabi_f2iz
	bl	fabs
	ldr	r2, .L26+8
	ldr	r3, .L26+12
	bl	__aeabi_dcmpgt
	cmp	r0, r5
	bne	.L6
	mov	r5, #0
	ldr	r3, [r6, r7, lsl #3]
	ldr	r0, [r5]
	ldr	r3, [r3]
	sub	r0, r0, r3
	bl	fabs
	ldr	r2, .L26+16
	ldr	r3, .L26+20
	bl	__aeabi_dcmpgt
	cmp	r0, r5
	beq	.L22
.L6:
	mov	r0, #0
	bl	VectorInverse
	ldr	r5, [sp]
	ldr	r0, [r9, #4]
	add	r5, r5, #-2147483648
	str	r5, [sp]	@ float
	bl	__aeabi_i2f
	mov	r1, r0
	mov	r0, r5
	bl	__aeabi_fsub
	bl	__aeabi_f2iz
	bl	fabs
	ldr	r2, .L26+8
	ldr	r3, .L26+12
	bl	__aeabi_dcmpgt
	cmp	r0, #0
	beq	.L23
.L4:
	ldr	r1, [r4, #8]
	ldr	r0, .L26+24
	bl	Log_Write
	mov	r1, #0
	ldr	r0, [r6, r7, lsl #3]
	bl	DotProduct
	mov	r1, #0
	mov	r5, r0
	mov	r0, r8
	bl	__aeabi_fcmplt
	cmp	r0, #0
	bne	.L24
.L9:
	mov	r0, r8
	mov	r1, #0
	bl	__aeabi_fcmpgt
	cmp	r0, #0
	beq	.L1
	mov	r0, r5
	mov	r1, #0
	bl	__aeabi_fcmplt
	cmp	r0, #0
	bne	.L19
.L1:
	ldr	r3, .L26
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L25
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L23:
	mov	r5, #0
	ldr	r3, [r6, r7, lsl #3]
	ldr	r0, [r5]
	ldr	r3, [r3]
	sub	r0, r0, r3
	bl	fabs
	ldr	r2, .L26+16
	ldr	r3, .L26+20
	bl	__aeabi_dcmpgt
	cmp	r0, r5
	bne	.L4
	ldr	r3, [r6, r7, lsl #3]
	ldr	r0, [r5, #4]
	ldr	r3, [r3, #4]
	sub	r0, r0, r3
	bl	fabs
	ldr	r2, .L26+16
	ldr	r3, .L26+20
	bl	__aeabi_dcmpgt
	cmp	r0, r5
	bne	.L4
	ldr	r3, [r6, r7, lsl #3]
	ldr	r0, [r5, #8]
	ldr	r3, [r3, #8]
	sub	r0, r0, r3
	bl	fabs
	ldr	r2, .L26+16
	ldr	r3, .L26+20
	bl	__aeabi_dcmpgt
	cmp	r0, r5
	bne	.L4
.L19:
	ldr	r1, [r4, #8]
	ldr	r0, .L26+28
	bl	Log_Write
	ldr	r5, [r4, #4]
	mov	r0, r5
	bl	ReverseWinding
	mov	r3, r0
	mov	r0, r5
	str	r3, [r4, #4]
	bl	FreeWinding
	b	.L1
.L24:
	mov	r1, #0
	mov	r0, r5
	bl	__aeabi_fcmpgt
	cmp	r0, #0
	bne	.L19
	b	.L9
.L22:
	ldr	r3, [r6, r7, lsl #3]
	ldr	r0, [r5, #4]
	ldr	r3, [r3, #4]
	sub	r0, r0, r3
	bl	fabs
	ldr	r2, .L26+16
	ldr	r3, .L26+20
	bl	__aeabi_dcmpgt
	cmp	r0, r5
	bne	.L6
	ldr	r3, [r6, r7, lsl #3]
	ldr	r0, [r5, #8]
	ldr	r3, [r3, #8]
	sub	r0, r0, r3
	bl	fabs
	ldr	r2, .L26+16
	ldr	r3, .L26+20
	bl	__aeabi_dcmpgt
	cmp	r0, r5
	bne	.L6
	b	.L1
.L25:
	bl	__stack_chk_fail
.L27:
	.align	2
.L26:
	.word	.LC2
	.word	mapplanes
	.word	-1717986918
	.word	1071225241
	.word	-350469331
	.word	1058682594
	.word	.LC0
	.word	.LC1
	.size	AAS_CheckFaceWindingPlane, .-AAS_CheckFaceWindingPlane
	.comm	mapplanes,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
