	.file	"extr_polylib.c_BaseWindingForPlane.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"BaseWindingForPlane: no axis found"
	.text
	.p2align 4
	.globl	BaseWindingForPlane
	.type	BaseWindingForPlane, @function
BaseWindingForPlane:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	mov	r14d, DWORD PTR BOGUS_RANGE[rip]
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13d, esi
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	neg	r14d
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	xor	ebp, ebp
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	ebx, -1
.L3:
	mov	edi, DWORD PTR [r12+rbp*4]
	call	fabs@PLT
	cmp	eax, r14d
	jle	.L2
	mov	r14d, eax
	mov	ebx, ebp
.L2:
	add	rbp, 1
	cmp	rbp, 3
	jne	.L3
	cmp	ebx, -1
	je	.L11
	xor	ebp, ebp
	mov	edi, DWORD PTR vec3_origin[rip]
	mov	rsi, rbp
	call	VectorCopy@PLT
	cmp	ebx, 1
	jle	.L6
	cmp	ebx, 2
	jne	.L5
	mov	DWORD PTR ds:0, 1
.L5:
	xor	ebp, ebp
	mov	rsi, r12
	xor	r14d, r14d
	mov	rdi, rbp
	call	DotProduct@PLT
	mov	rcx, rbp
	mov	rdx, r12
	mov	rdi, rbp
	neg	eax
	mov	esi, eax
	call	VectorMA@PLT
	mov	rsi, rbp
	mov	rdi, rbp
	call	VectorNormalize@PLT
	mov	rdx, r14
	mov	esi, r13d
	mov	rdi, r12
	call	VectorScale@PLT
	xor	r13d, r13d
	mov	rsi, r12
	mov	rdi, rbp
	mov	rdx, r13
	call	CrossProduct@PLT
	mov	esi, DWORD PTR MAX_WORLD_COORD[rip]
	mov	rdx, rbp
	mov	rdi, rbp
	call	VectorScale@PLT
	mov	esi, DWORD PTR MAX_WORLD_COORD[rip]
	mov	rdx, r13
	mov	rdi, r13
	call	VectorScale@PLT
	mov	edi, 4
	call	AllocWinding@PLT
	mov	rsi, r13
	mov	rdi, r14
	mov	r12, rax
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR [rax]
	call	VectorSubtract@PLT
	mov	rax, QWORD PTR [r12]
	mov	rsi, rbp
	mov	rdi, QWORD PTR [rax]
	mov	rdx, rdi
	call	VectorAdd@PLT
	mov	rax, QWORD PTR [r12]
	mov	rsi, r13
	mov	rdi, r14
	mov	rdx, QWORD PTR 8[rax]
	call	VectorAdd@PLT
	mov	rax, QWORD PTR [r12]
	mov	rsi, rbp
	mov	rdi, QWORD PTR 8[rax]
	mov	rdx, rdi
	call	VectorAdd@PLT
	mov	rax, QWORD PTR [r12]
	mov	rsi, r13
	mov	rdi, r14
	mov	rdx, QWORD PTR 16[rax]
	call	VectorAdd@PLT
	mov	rax, QWORD PTR [r12]
	mov	rsi, rbp
	mov	rdi, QWORD PTR 16[rax]
	mov	rdx, rdi
	call	VectorSubtract@PLT
	mov	rax, QWORD PTR [r12]
	mov	rsi, r13
	mov	rdi, r14
	mov	rdx, QWORD PTR 24[rax]
	call	VectorSubtract@PLT
	mov	rax, QWORD PTR [r12]
	mov	rsi, rbp
	mov	rdi, QWORD PTR 24[rax]
	mov	rdx, rdi
	call	VectorSubtract@PLT
	mov	rax, r12
	mov	DWORD PTR 8[r12], 4
	pop	rbx
	.cfi_remember_state
	.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
.L6:
	.cfi_restore_state
	mov	DWORD PTR ds:8, 1
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L11:
	lea	rdi, .LC0[rip]
	xor	ebp, ebp
	call	Error@PLT
	mov	edi, DWORD PTR vec3_origin[rip]
	mov	rsi, rbp
	call	VectorCopy@PLT
	jmp	.L5
	.cfi_endproc
.LFE0:
	.size	BaseWindingForPlane, .-BaseWindingForPlane
	.comm	vec3_origin,4,4
	.comm	MAX_WORLD_COORD,4,4
	.comm	BOGUS_RANGE,4,4
	.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_polylib.c_BaseWindingForPlane.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"BaseWindingForPlane: no axis found\000"
	.text
	.align	2
	.global	BaseWindingForPlane
	.syntax unified
	.arm
	.fpu softvfp
	.type	BaseWindingForPlane, %function
BaseWindingForPlane:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r6, r0
	mov	r7, r1
	mvn	r8, #0
	mov	r4, #0
	ldr	r3, .L12
	sub	r9, r0, #4
	ldr	r5, [r3]
	rsb	r5, r5, #0
.L3:
	ldr	r0, [r9, #4]!
	bl	fabs
	cmp	r0, r5
	movgt	r8, r4
	add	r4, r4, #1
	movgt	r5, r0
	cmp	r4, #3
	bne	.L3
	cmn	r8, #1
	beq	.L11
	ldr	r3, .L12+4
	mov	r1, #0
	ldr	r0, [r3]
	bl	VectorCopy
	cmp	r8, #1
	ble	.L6
	cmp	r8, #2
	moveq	r3, #1
	moveq	r4, #0
	streq	r3, [r4]
.L5:
	mov	r4, #0
	mov	r1, r6
	mov	r0, r4
	bl	DotProduct
	mov	r3, r4
	mov	r2, r6
	rsb	r1, r0, #0
	mov	r0, r4
	bl	VectorMA
	mov	r1, r4
	mov	r0, r4
	bl	VectorNormalize
	ldr	r5, .L12+8
	mov	r1, r7
	mov	r2, r4
	mov	r0, r6
	bl	VectorScale
	mov	r1, r6
	mov	r2, r4
	mov	r0, r4
	bl	CrossProduct
	mov	r2, r4
	ldr	r1, [r5]
	mov	r0, r4
	bl	VectorScale
	mov	r2, r4
	ldr	r1, [r5]
	mov	r0, r4
	bl	VectorScale
	mov	r0, #4
	bl	AllocWinding
	mov	r5, r0
	ldr	r3, [r0]
	mov	r1, r4
	ldr	r2, [r3]
	mov	r0, r4
	bl	VectorSubtract
	ldr	r3, [r5]
	mov	r1, r4
	ldr	r2, [r3]
	mov	r9, r4
	mov	r0, r2
	bl	VectorAdd
	ldr	r3, [r5]
	mov	r1, r4
	ldr	r2, [r3, #4]
	mov	r0, r4
	bl	VectorAdd
	ldr	r3, [r5]
	mov	r1, r4
	ldr	r2, [r3, #4]
	mov	r8, r4
	mov	r0, r2
	bl	VectorAdd
	ldr	r3, [r5]
	mov	r1, r4
	ldr	r2, [r3, #8]
	mov	r0, r4
	bl	VectorAdd
	ldr	r3, [r5]
	mov	r1, r4
	ldr	r2, [r3, #8]
	mov	r0, r2
	bl	VectorSubtract
	ldr	r3, [r5]
	mov	r1, r4
	ldr	r2, [r3, #12]
	mov	r0, r4
	bl	VectorSubtract
	ldr	r3, [r5]
	mov	r1, r4
	ldr	r2, [r3, #12]
	mov	r0, r2
	bl	VectorSubtract
	mov	r3, #4
	mov	r0, r5
	str	r3, [r5, #4]
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L6:
	mov	r3, #1
	mov	r4, #0
	str	r3, [r4, #8]
	b	.L5
.L11:
	ldr	r0, .L12+12
	bl	Error
	ldr	r3, .L12+4
	mov	r1, #0
	ldr	r0, [r3]
	bl	VectorCopy
	b	.L5
.L13:
	.align	2
.L12:
	.word	BOGUS_RANGE
	.word	vec3_origin
	.word	MAX_WORLD_COORD
	.word	.LC0
	.size	BaseWindingForPlane, .-BaseWindingForPlane
	.comm	vec3_origin,4,4
	.comm	MAX_WORLD_COORD,4,4
	.comm	BOGUS_RANGE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
