	.file	"extr_l_poly.c_WindingError.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"winding %i points"
.LC1:
	.string	"winding %f area"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC2:
	.string	"winding point %d BUGUS_RANGE '%f %f %f'"
	.section	.rodata.str1.1
.LC3:
	.string	"winding point %d off plane"
.LC4:
	.string	"winding degenerate edge %d-%d"
.LC5:
	.string	"winding non-convex"
	.text
	.p2align 4
	.globl	WindingError
	.type	WindingError, @function
WindingError:
.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
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	edx, DWORD PTR [rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	cmp	edx, 2
	jle	.L28
	mov	rbp, rdi
	call	WindingArea@PLT
	test	eax, eax
	jle	.L29
	xor	r8d, r8d
	lea	rdx, 20[rsp]
	mov	rdi, rbp
	mov	esi, r8d
	call	WindingPlane@PLT
	mov	edx, DWORD PTR 0[rbp]
	test	edx, edx
	jle	.L16
	xor	r12d, r12d
	xor	r14d, r14d
.L5:
	mov	edi, DWORD PTR BOGUS_RANGE[rip]
	mov	rax, QWORD PTR 8[rbp]
	mov	DWORD PTR 12[rsp], r12d
	mov	r15d, r12d
	mov	r8d, edi
	mov	rbx, QWORD PTR [rax+r12*8]
	xor	eax, eax
	neg	r8d
.L8:
	mov	esi, DWORD PTR [rbx+rax*4]
	mov	r10d, eax
	cmp	esi, edi
	jg	.L6
	cmp	esi, r8d
	jl	.L6
	add	rax, 1
	cmp	rax, 3
	jne	.L8
	add	r15d, 1
	mov	rdi, rbx
	cmp	edx, r15d
	cmove	r15d, r14d
	xor	r8d, r8d
	mov	esi, r8d
	call	DotProduct@PLT
	mov	edx, DWORD PTR ON_EPSILON[rip]
	sub	eax, DWORD PTR 20[rsp]
	mov	ecx, edx
	neg	ecx
	cmp	ecx, eax
	jg	.L20
	cmp	edx, eax
	jl	.L20
	mov	rdx, QWORD PTR 8[rbp]
	movsx	rax, r15d
	xor	r13d, r13d
	mov	rsi, rbx
	mov	rdi, QWORD PTR [rdx+rax*8]
	mov	edx, r13d
	call	VectorSubtract@PLT
	mov	edi, r13d
	call	VectorLength@PLT
	cmp	eax, DWORD PTR ON_EPSILON[rip]
	jl	.L30
	xor	r8d, r8d
	xor	r15d, r15d
	xor	r13d, r13d
	mov	edx, r15d
	mov	esi, r13d
	mov	edi, r8d
	call	CrossProduct@PLT
	mov	edi, r15d
	call	VectorNormalize@PLT
	mov	esi, r15d
	mov	rdi, rbx
	call	DotProduct@PLT
	mov	edx, DWORD PTR 0[rbp]
	add	eax, DWORD PTR ON_EPSILON[rip]
	mov	r13d, eax
	mov	eax, edx
	test	edx, edx
	jle	.L13
	xor	ebx, ebx
	.p2align 4,,10
	.p2align 3
.L15:
	cmp	ebx, r12d
	je	.L14
	mov	rax, QWORD PTR 8[rbp]
	xor	r15d, r15d
	mov	esi, r15d
	mov	rdi, QWORD PTR [rax+rbx*8]
	call	DotProduct@PLT
	cmp	r13d, eax
	jl	.L25
	mov	eax, DWORD PTR 0[rbp]
.L14:
	add	rbx, 1
	mov	edx, eax
	cmp	eax, ebx
	jg	.L15
.L13:
	add	r12, 1
	cmp	eax, r12d
	jg	.L5
.L16:
	mov	eax, DWORD PTR WE_NONE[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L28:
	mov	edi, DWORD PTR windingerror[rip]
	lea	rsi, .LC0[rip]
	call	sprintf@PLT
	mov	eax, DWORD PTR WE_NOTENOUGHPOINTS[rip]
.L1:
	mov	rcx, QWORD PTR 24[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L31
	add	rsp, 40
	.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
.L25:
	.cfi_restore_state
	mov	edi, DWORD PTR windingerror[rip]
	lea	rsi, .LC5[rip]
	xor	eax, eax
	call	sprintf@PLT
	mov	eax, DWORD PTR WE_NONCONVEX[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L29:
	mov	edi, DWORD PTR windingerror[rip]
	mov	edx, eax
	lea	rsi, .LC1[rip]
	xor	eax, eax
	call	sprintf@PLT
	mov	eax, DWORD PTR WE_SMALLAREA[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L6:
	mov	r9d, DWORD PTR 8[rbx]
	mov	r8d, DWORD PTR 4[rbx]
	mov	edx, r10d
	xor	eax, eax
	mov	ecx, DWORD PTR [rbx]
	mov	edi, DWORD PTR windingerror[rip]
	lea	rsi, .LC2[rip]
	call	sprintf@PLT
	mov	eax, DWORD PTR WE_POINTBOGUSRANGE[rip]
	jmp	.L1
.L20:
	mov	edx, DWORD PTR 12[rsp]
	mov	edi, DWORD PTR windingerror[rip]
	lea	rsi, .LC3[rip]
	xor	eax, eax
	call	sprintf@PLT
	mov	eax, DWORD PTR WE_POINTOFFPLANE[rip]
	jmp	.L1
.L30:
	mov	edx, DWORD PTR 12[rsp]
	mov	edi, DWORD PTR windingerror[rip]
	mov	ecx, r15d
	xor	eax, eax
	lea	rsi, .LC4[rip]
	call	sprintf@PLT
	mov	eax, DWORD PTR WE_DEGENERATEEDGE[rip]
	jmp	.L1
.L31:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	WindingError, .-WindingError
	.comm	windingerror,4,4
	.comm	WE_SMALLAREA,4,4
	.comm	WE_POINTOFFPLANE,4,4
	.comm	WE_POINTBOGUSRANGE,4,4
	.comm	WE_NOTENOUGHPOINTS,4,4
	.comm	WE_NONE,4,4
	.comm	WE_NONCONVEX,4,4
	.comm	WE_DEGENERATEEDGE,4,4
	.comm	ON_EPSILON,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_l_poly.c_WindingError.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"winding %i points\000"
	.align	2
.LC1:
	.ascii	"winding %f area\000"
	.align	2
.LC2:
	.ascii	"winding point %d BUGUS_RANGE '%f %f %f'\000"
	.align	2
.LC3:
	.ascii	"winding point %d off plane\000"
	.align	2
.LC4:
	.ascii	"winding degenerate edge %d-%d\000"
	.align	2
.LC5:
	.ascii	"winding non-convex\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	WindingError
	.syntax unified
	.arm
	.fpu softvfp
	.type	WindingError, %function
WindingError:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r2, [r0]
	ldr	r3, .L31
	sub	sp, sp, #20
	cmp	r2, #2
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	ble	.L26
	mov	r10, r0
	bl	WindingArea
	subs	r2, r0, #0
	ble	.L27
	mov	r1, #0
	mov	r0, r10
	add	r2, sp, #8
	bl	WindingPlane
	ldr	ip, [r10]
	cmp	ip, #0
	ble	.L15
	mov	r7, #0
	ldr	r9, .L31+4
	ldr	r8, .L31+8
.L5:
	mov	r5, r7
	mov	r2, #0
	ldr	r3, [r10, #4]
	ldr	r1, [r9]
	ldr	r6, [r3, r7, lsl #2]
	rsb	r0, r1, #0
.L8:
	ldr	r3, [r6, r2, lsl #2]
	cmp	r3, r1
	bgt	.L6
	cmp	r3, r0
	blt	.L6
	add	r2, r2, #1
	cmp	r2, #3
	bne	.L8
	mov	r1, #0
	add	r7, r7, #1
	cmp	ip, r7
	mov	r0, r6
	movne	fp, r7
	moveq	fp, r1
	bl	DotProduct
	ldr	r4, [sp, #8]
	ldr	r3, [r8]
	sub	r0, r0, r4
	cmp	r3, r0
	movge	r4, #0
	movlt	r4, #1
	rsb	r3, r3, #0
	cmp	r3, r0
	orrgt	r4, r4, #1
	cmp	r4, #0
	bne	.L28
	ldr	r3, [r10, #4]
	mov	r2, #0
	ldr	r0, [r3, fp, lsl #2]
	mov	r1, r6
	bl	VectorSubtract
	mov	r2, #0
	mov	r0, r2
	bl	VectorLength
	ldr	r3, [r8]
	cmp	r0, r3
	blt	.L29
	mov	fp, #0
	mov	r1, fp
	mov	r2, fp
	mov	r0, fp
	bl	CrossProduct
	mov	r0, fp
	bl	VectorNormalize
	mov	r0, r6
	mov	r1, fp
	bl	DotProduct
	ldr	ip, [r10]
	ldr	r3, [r8]
	cmp	ip, fp
	add	r6, r0, r3
	mov	r3, ip
	ble	.L12
.L14:
	cmp	r4, r5
	beq	.L13
	ldr	r3, [r10, #4]
	mov	r1, #0
	ldr	r0, [r3, r4, lsl #2]
	bl	DotProduct
	cmp	r6, r0
	blt	.L23
	ldr	r3, [r10]
.L13:
	add	r4, r4, #1
	cmp	r3, r4
	mov	ip, r3
	bgt	.L14
.L12:
	cmp	r7, r3
	blt	.L5
.L15:
	ldr	r3, .L31+12
	ldr	r0, [r3]
	b	.L1
.L26:
	ldr	r3, .L31+16
	ldr	r1, .L31+20
	ldr	r0, [r3]
	bl	sprintf
	ldr	r3, .L31+24
	ldr	r0, [r3]
.L1:
	ldr	r3, .L31
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L30
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L23:
	ldr	r3, .L31+16
	ldr	r1, .L31+28
	ldr	r0, [r3]
	bl	sprintf
	ldr	r3, .L31+32
	ldr	r0, [r3]
	b	.L1
.L27:
	ldr	r3, .L31+16
	ldr	r1, .L31+36
	ldr	r0, [r3]
	bl	sprintf
	ldr	r3, .L31+40
	ldr	r0, [r3]
	b	.L1
.L6:
	ldr	r1, [r6, #8]
	ldr	r3, [r6]
	str	r1, [sp, #4]
	ldr	r0, [r6, #4]
	ldr	r1, .L31+16
	str	r0, [sp]
	ldr	r0, [r1]
	ldr	r1, .L31+44
	bl	sprintf
	ldr	r3, .L31+48
	ldr	r0, [r3]
	b	.L1
.L28:
	ldr	r3, .L31+16
	mov	r2, r5
	ldr	r0, [r3]
	ldr	r1, .L31+52
	bl	sprintf
	ldr	r3, .L31+56
	ldr	r0, [r3]
	b	.L1
.L29:
	ldr	r1, .L31+16
	mov	r3, fp
	ldr	r0, [r1]
	mov	r2, r5
	ldr	r1, .L31+60
	bl	sprintf
	ldr	r3, .L31+64
	ldr	r0, [r3]
	b	.L1
.L30:
	bl	__stack_chk_fail
.L32:
	.align	2
.L31:
	.word	.LC6
	.word	BOGUS_RANGE
	.word	ON_EPSILON
	.word	WE_NONE
	.word	windingerror
	.word	.LC0
	.word	WE_NOTENOUGHPOINTS
	.word	.LC5
	.word	WE_NONCONVEX
	.word	.LC1
	.word	WE_SMALLAREA
	.word	.LC2
	.word	WE_POINTBOGUSRANGE
	.word	.LC3
	.word	WE_POINTOFFPLANE
	.word	.LC4
	.word	WE_DEGENERATEEDGE
	.size	WindingError, .-WindingError
	.comm	windingerror,4,4
	.comm	WE_SMALLAREA,4,4
	.comm	WE_POINTOFFPLANE,4,4
	.comm	WE_POINTBOGUSRANGE,4,4
	.comm	WE_NOTENOUGHPOINTS,4,4
	.comm	WE_NONE,4,4
	.comm	WE_NONCONVEX,4,4
	.comm	WE_DEGENERATEEDGE,4,4
	.comm	ON_EPSILON,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
