	.file	"extr_l_poly.c_ClipWindingEpsilon.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"ClipWinding: points exceeded estimate"
	.align 8
.LC1:
	.string	"ClipWinding: MAX_POINTS_ON_WINDING"
	.text
	.p2align 4
	.globl	ClipWindingEpsilon
	.type	ClipWindingEpsilon, @function
ClipWindingEpsilon:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r15
	.cfi_offset 15, -24
	mov	r15, rdi
	push	r14
	push	r13
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	mov	r13, rsi
	push	r12
	push	rbx
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	mov	ebx, ecx
	sub	rsp, 120
	mov	DWORD PTR -88[rbp], edx
	mov	QWORD PTR -120[rbp], r8
	mov	rdi, rsp
	mov	QWORD PTR -128[rbp], r9
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	mov	eax, DWORD PTR MAX_POINTS_ON_WINDING[rip]
	mov	QWORD PTR -136[rbp], rsp
	add	eax, 4
	cdqe
	lea	rax, 15[0+rax*4]
	mov	rcx, rax
	mov	rdx, rax
	and	rcx, -4096
	and	rdx, -16
	sub	rdi, rcx
	mov	rcx, rdi
	cmp	rsp, rcx
	je	.L3
.L49:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rcx
	jne	.L49
.L3:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L50
.L4:
	lea	rdx, 3[rsp]
	mov	rdi, rdx
	and	rdx, -4
	shr	rdi, 2
	mov	QWORD PTR -112[rbp], rdx
	mov	rdx, rax
	and	rax, -4096
	mov	QWORD PTR -144[rbp], rdi
	mov	rdi, rsp
	and	rdx, -16
	sub	rdi, rax
	mov	rax, rdi
	cmp	rsp, rax
	je	.L6
.L51:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L51
.L6:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L52
.L7:
	lea	rax, 3[rsp]
	mov	esi, DWORD PTR [r15]
	mov	QWORD PTR -68[rbp], 0
	mov	rdi, rax
	and	rax, -4
	mov	DWORD PTR -60[rbp], 0
	shr	rdi, 2
	mov	QWORD PTR -96[rbp], rax
	mov	QWORD PTR -152[rbp], rdi
	test	esi, esi
	jle	.L8
	mov	r12d, ebx
	xor	r14d, r14d
	mov	rax, r15
	neg	r12d
	mov	r15, r14
	mov	r14, rax
	mov	DWORD PTR -104[rbp], r12d
	mov	r12, QWORD PTR -112[rbp]
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L54:
	movsx	rax, DWORD PTR SIDE_FRONT[rip]
	mov	rdi, QWORD PTR -96[rbp]
	mov	DWORD PTR [rdi+r15*4], eax
.L10:
	add	DWORD PTR -68[rbp+rax*4], 1
	mov	eax, DWORD PTR [r14]
	lea	ecx, 1[r15]
	add	r15, 1
	cmp	eax, r15d
	jle	.L53
.L12:
	mov	rax, QWORD PTR 8[r14]
	mov	rsi, r13
	mov	rdi, QWORD PTR [rax+r15*8]
	call	DotProduct@PLT
	sub	eax, DWORD PTR -88[rbp]
	mov	DWORD PTR [r12+r15*4], eax
	cmp	eax, ebx
	jg	.L54
	cmp	DWORD PTR -104[rbp], eax
	jle	.L11
	movsx	rax, DWORD PTR SIDE_BACK[rip]
	mov	rdi, QWORD PTR -96[rbp]
	mov	DWORD PTR [rdi+r15*4], eax
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L50:
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L11:
	movsx	rax, DWORD PTR SIDE_ON[rip]
	mov	rdi, QWORD PTR -96[rbp]
	mov	DWORD PTR [rdi+r15*4], eax
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L53:
	mov	rbx, QWORD PTR -152[rbp]
	movsx	rcx, ecx
	mov	r15, r14
	mov	edx, DWORD PTR 0[0+rbx*4]
	mov	rbx, QWORD PTR -96[rbp]
	mov	DWORD PTR [rbx+rcx*4], edx
	mov	rbx, QWORD PTR -144[rbp]
	mov	edx, DWORD PTR 0[0+rbx*4]
	mov	rbx, QWORD PTR -112[rbp]
	mov	DWORD PTR [rbx+rcx*4], edx
	mov	rbx, QWORD PTR -128[rbp]
	mov	ecx, DWORD PTR -68[rbp]
	mov	QWORD PTR [rbx], 0
	mov	rbx, QWORD PTR -120[rbp]
	mov	QWORD PTR [rbx], 0
	test	ecx, ecx
	je	.L32
	mov	edx, DWORD PTR -64[rbp]
	test	edx, edx
	je	.L55
	lea	ebx, 4[rax]
	mov	edi, ebx
	mov	DWORD PTR -152[rbp], ebx
	call	AllocWinding@PLT
	mov	edi, ebx
	xor	ebx, ebx
	mov	r12, rax
	mov	rax, QWORD PTR -120[rbp]
	mov	QWORD PTR [rax], r12
	call	AllocWinding@PLT
	mov	r9, rax
	mov	rax, QWORD PTR -128[rbp]
	mov	QWORD PTR [rax], r9
	mov	eax, DWORD PTR -88[rbp]
	neg	eax
	mov	DWORD PTR -120[rbp], eax
	mov	eax, DWORD PTR [r14]
	test	eax, eax
	jle	.L27
	mov	QWORD PTR -104[rbp], r13
	mov	r13, r14
	mov	r14, QWORD PTR -96[rbp]
	mov	r15, r12
	mov	r12, rbx
	mov	rbx, r9
	.p2align 4,,10
	.p2align 3
.L16:
	mov	rax, QWORD PTR 8[r13]
	mov	ecx, DWORD PTR [r14+r12*4]
	lea	edx, 1[r12]
	cmp	ecx, DWORD PTR SIDE_ON[rip]
	mov	rdi, QWORD PTR [rax+r12*8]
	je	.L56
	cmp	ecx, DWORD PTR SIDE_FRONT[rip]
	je	.L57
	cmp	ecx, DWORD PTR SIDE_BACK[rip]
	je	.L58
.L22:
	mov	eax, DWORD PTR 4[r14+r12*4]
	cmp	DWORD PTR SIDE_ON[rip], eax
	mov	esi, DWORD PTR 0[r13]
	je	.L20
	cmp	ecx, eax
	je	.L20
	mov	eax, edx
	cdq
	idiv	esi
	mov	rsi, QWORD PTR -112[rbp]
	mov	rax, QWORD PTR 8[r13]
	movsx	rdx, edx
	mov	r11, QWORD PTR [rax+rdx*8]
	mov	eax, DWORD PTR [rsi+r12*4]
	mov	ecx, eax
	cdq
	sub	ecx, DWORD PTR 4[rsi+r12*4]
	mov	rsi, QWORD PTR -104[rbp]
	idiv	ecx
	xor	ecx, ecx
.L26:
	mov	edx, DWORD PTR [rsi+rcx]
	cmp	edx, 1
	je	.L59
	cmp	edx, -1
	je	.L60
	mov	r8d, DWORD PTR [rdi+rcx]
	mov	edx, DWORD PTR [r11+rcx]
	sub	edx, r8d
	imul	edx, eax
	add	edx, r8d
	mov	DWORD PTR [rcx], edx
.L24:
	add	rcx, 4
	cmp	rcx, 12
	jne	.L26
	movsx	rdx, DWORD PTR [r15]
	mov	rax, QWORD PTR 8[r15]
	xor	edi, edi
	mov	rsi, QWORD PTR [rax+rdx*8]
	call	VectorCopy@PLT
	add	DWORD PTR [r15], 1
	mov	rax, QWORD PTR 8[rbx]
	xor	edi, edi
	movsx	rdx, DWORD PTR [rbx]
	mov	rsi, QWORD PTR [rax+rdx*8]
	call	VectorCopy@PLT
	add	DWORD PTR [rbx], 1
	mov	esi, DWORD PTR 0[r13]
.L20:
	add	r12, 1
	cmp	esi, r12d
	jg	.L16
	mov	r12, r15
	mov	r9, rbx
.L27:
	mov	eax, DWORD PTR [r12]
	cmp	eax, DWORD PTR -152[rbp]
	jg	.L17
	mov	ebx, DWORD PTR -152[rbp]
	cmp	DWORD PTR [r9], ebx
	jle	.L28
.L17:
	lea	rdi, .LC0[rip]
	mov	QWORD PTR -88[rbp], r9
	call	Error@PLT
	mov	eax, DWORD PTR [r12]
	mov	r9, QWORD PTR -88[rbp]
.L28:
	mov	edx, DWORD PTR MAX_POINTS_ON_WINDING[rip]
	cmp	edx, eax
	jl	.L29
	cmp	edx, DWORD PTR [r9]
	jge	.L14
.L29:
	lea	rdi, .LC1[rip]
	call	Error@PLT
.L14:
	mov	rax, QWORD PTR -56[rbp]
	xor	rax, QWORD PTR fs:40
	mov	rsp, QWORD PTR -136[rbp]
	jne	.L61
	lea	rsp, -40[rbp]
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L59:
	.cfi_restore_state
	mov	edx, DWORD PTR -88[rbp]
	mov	DWORD PTR [rcx], edx
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L60:
	mov	edx, DWORD PTR -120[rbp]
	mov	DWORD PTR [rcx], edx
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L57:
	movsx	rsi, DWORD PTR [r15]
	mov	rax, QWORD PTR 8[r15]
	mov	DWORD PTR -144[rbp], edx
	mov	DWORD PTR -128[rbp], ecx
	mov	rsi, QWORD PTR [rax+rsi*8]
	mov	QWORD PTR -96[rbp], rdi
	call	VectorCopy@PLT
	add	DWORD PTR [r15], 1
	mov	ecx, DWORD PTR -128[rbp]
	cmp	ecx, DWORD PTR SIDE_BACK[rip]
	mov	edx, DWORD PTR -144[rbp]
	mov	rdi, QWORD PTR -96[rbp]
	jne	.L22
.L58:
	movsx	rsi, DWORD PTR [rbx]
	mov	rax, QWORD PTR 8[rbx]
	mov	DWORD PTR -144[rbp], edx
	mov	DWORD PTR -128[rbp], ecx
	mov	rsi, QWORD PTR [rax+rsi*8]
	mov	QWORD PTR -96[rbp], rdi
	call	VectorCopy@PLT
	add	DWORD PTR [rbx], 1
	mov	edx, DWORD PTR -144[rbp]
	mov	ecx, DWORD PTR -128[rbp]
	mov	rdi, QWORD PTR -96[rbp]
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L56:
	movsx	rdx, DWORD PTR [r15]
	mov	rax, QWORD PTR 8[r15]
	mov	QWORD PTR -96[rbp], rdi
	mov	rsi, QWORD PTR [rax+rdx*8]
	call	VectorCopy@PLT
	add	DWORD PTR [r15], 1
	mov	rax, QWORD PTR 8[rbx]
	movsx	rdx, DWORD PTR [rbx]
	mov	rdi, QWORD PTR -96[rbp]
	mov	rsi, QWORD PTR [rax+rdx*8]
	call	VectorCopy@PLT
	add	DWORD PTR [rbx], 1
	mov	esi, DWORD PTR 0[r13]
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L55:
	mov	rdi, r14
	call	CopyWinding@PLT
	mov	rbx, QWORD PTR -120[rbp]
	mov	QWORD PTR [rbx], rax
	jmp	.L14
.L8:
	mov	rax, QWORD PTR -128[rbp]
	mov	QWORD PTR [rax], 0
	mov	rax, QWORD PTR -120[rbp]
	mov	QWORD PTR [rax], 0
.L32:
	mov	rdi, r15
	call	CopyWinding@PLT
	mov	rbx, QWORD PTR -128[rbp]
	mov	QWORD PTR [rbx], rax
	jmp	.L14
.L52:
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L7
.L61:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	ClipWindingEpsilon, .-ClipWindingEpsilon
	.comm	SIDE_ON,4,4
	.comm	SIDE_FRONT,4,4
	.comm	SIDE_BACK,4,4
	.comm	MAX_POINTS_ON_WINDING,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_ClipWindingEpsilon.c"
	.text
	.global	__aeabi_idivmod
	.global	__aeabi_idiv
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"ClipWinding: points exceeded estimate\000"
	.align	2
.LC1:
	.ascii	"ClipWinding: MAX_POINTS_ON_WINDING\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	ClipWindingEpsilon
	.syntax unified
	.arm
	.fpu softvfp
	.type	ClipWindingEpsilon, %function
ClipWindingEpsilon:
	@ args = 8, pretend = 0, frame = 48
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	add	fp, sp, #32
	sub	sp, sp, #52
	mov	ip, #0
	ldr	lr, [r0]
	mov	r4, r0
	ldr	r0, .L43
	mov	r6, r3
	ldr	r0, [r0]
	ldr	r3, .L43+4
	str	sp, [fp, #-72]
	str	r1, [fp, #-68]
	str	r2, [fp, #-56]
	ldr	r3, [r3]
	str	r3, [fp, #-40]
	mov	r3,#0
	lsl	r0, r0, #2
	ldr	r3, [fp, #4]
	add	r0, r0, #23
	bic	r0, r0, #7
	str	r3, [fp, #-60]
	ldr	r3, [fp, #8]
	sub	sp, sp, r0
	cmp	lr, ip
	mov	r9, sp
	str	ip, [fp, #-44]
	sub	sp, sp, r0
	str	ip, [fp, #-48]
	str	ip, [fp, #-52]
	str	r3, [fp, #-64]
	ble	.L2
	sub	r10, r9, #4
	str	r9, [fp, #-76]
	mov	r5, sp
	mov	r9, r10
	mov	r8, ip
	mov	r10, r1
	ldr	r7, .L43+8
	b	.L6
.L37:
	ldr	r1, [r7]
	str	r1, [r5, r8, lsl #2]
.L4:
	sub	r3, fp, #36
	add	r1, r3, r1, lsl #2
	ldr	r0, [r1, #-16]
	ldr	ip, [r4]
	add	r8, r8, #1
	add	r0, r0, #1
	cmp	ip, r8
	str	r0, [r1, #-16]
	ble	.L36
.L6:
	ldr	r0, [r4, #4]
	mov	r1, r10
	ldr	r0, [r0, r8, lsl #2]
	bl	DotProduct
	ldr	r3, [fp, #-56]
	sub	r0, r0, r3
	cmp	r0, r6
	str	r0, [r9, #4]!
	bgt	.L37
	rsb	r1, r6, #0
	cmp	r1, r0
	ldrgt	r3, .L43+12
	ldrle	r3, .L43+16
	ldr	r1, [r3]
	str	r1, [r5, r8, lsl #2]
	b	.L4
.L36:
	mov	r6, #0
	ldr	r9, [fp, #-76]
	ldr	r2, [fp, #-52]
	ldr	r3, [fp, #-64]
	ldr	r1, [r5]
	str	r6, [r3]
	cmp	r2, r6
	ldr	r3, [fp, #-60]
	ldr	r2, [r9]
	str	r1, [r5, r8, lsl #2]
	str	r6, [r3]
	str	r2, [r9, r8, lsl #2]
	beq	.L27
	ldr	r3, [fp, #-48]
	cmp	r3, #0
	beq	.L38
	add	r8, ip, #4
	mov	r0, r8
	str	r8, [fp, #-80]
	bl	AllocWinding
	ldr	r3, [fp, #-60]
	mov	r7, r0
	str	r0, [r3]
	mov	r0, r8
	bl	AllocWinding
	ldr	r3, [r4]
	ldr	r2, [fp, #-64]
	cmp	r3, #0
	mov	r8, r0
	str	r0, [r2]
	ble	.L22
	ldr	r3, [fp, #-56]
	rsb	r3, r3, #0
	str	r3, [fp, #-76]
	b	.L21
.L14:
	cmp	r6, r1
	add	r9, r9, #4
	bge	.L22
.L21:
	ldr	r3, .L43+16
	ldr	r2, [r5], #4
	ldr	r1, [r3]
	ldr	r3, [r4, #4]
	cmp	r2, r1
	ldr	r10, [r3, r6, lsl #2]
	add	r6, r6, #1
	beq	.L34
	ldr	r3, .L43+8
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L39
.L15:
	ldr	r3, .L43+12
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L40
.L16:
	ldr	r1, .L43+16
	ldr	r3, [r5]
	ldr	r0, [r1]
	ldr	r1, [r4]
	cmp	r2, r3
	cmpne	r0, r3
	moveq	r3, #1
	movne	r3, #0
	str	r3, [fp, #-60]
	beq	.L14
	mov	r0, r6
	bl	__aeabi_idivmod
	mov	ip, r1
	ldm	r9, {r0, r1}
	ldr	r2, [r4, #4]
	sub	r1, r0, r1
	ldr	r2, [r2, ip, lsl #2]
	str	r2, [fp, #-64]
	bl	__aeabi_idiv
	ldr	r2, [fp, #-68]
	mov	lr, r0
	sub	r0, r2, #4
	ldr	r2, [fp, #-64]
	ldr	r3, [fp, #-60]
	str	r4, [fp, #-60]
.L20:
	ldr	r1, [r0, #4]!
	mov	ip, #0
	cmp	r1, #1
	beq	.L41
	cmn	r1, #1
	ldrne	r1, [r2, r3, lsl #2]
	ldrne	r4, [r10, r3, lsl #2]
	ldreq	r1, [fp, #-76]
	subne	r1, r1, r4
	mlane	r4, lr, r1, r4
	movne	r1, r4
	str	r1, [ip, r3, lsl #2]
.L18:
	add	r3, r3, #1
	cmp	r3, #3
	bne	.L20
	mov	r10, #0
	ldr	r4, [fp, #-60]
.L34:
	ldm	r7, {r2, r3}
	mov	r0, r10
	ldr	r1, [r3, r2, lsl #2]
	bl	VectorCopy
	ldr	r3, [r7]
	ldr	r2, [r8, #4]
	add	r3, r3, #1
	str	r3, [r7]
	ldr	r3, [r8]
	mov	r0, r10
	ldr	r1, [r2, r3, lsl #2]
	bl	VectorCopy
	ldr	r3, [r8]
	add	r9, r9, #4
	add	r3, r3, #1
	str	r3, [r8]
	ldr	r1, [r4]
	cmp	r6, r1
	blt	.L21
.L22:
	ldr	r3, [r7]
	ldr	r2, [fp, #-80]
	cmp	r3, r2
	bgt	.L11
	ldr	r2, [r8]
	ldr	r1, [fp, #-80]
	cmp	r2, r1
	bgt	.L11
.L23:
	ldr	r2, .L43
	ldr	r2, [r2]
	cmp	r2, r3
	blt	.L24
	ldr	r3, [r8]
	cmp	r2, r3
	blt	.L24
.L8:
	ldr	r3, .L43+4
	ldr	sp, [fp, #-72]
	ldr	r2, [r3]
	ldr	r3, [fp, #-40]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L42
	sub	sp, fp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L24:
	ldr	r0, .L43+20
	bl	Error
	b	.L8
.L11:
	ldr	r0, .L43+24
	bl	Error
	ldr	r3, [r7]
	b	.L23
.L41:
	ldr	r1, [fp, #-56]
	str	r1, [ip, r3, lsl #2]
	b	.L18
.L40:
	ldm	r8, {r1, r3}
	mov	r0, r10
	ldr	r1, [r3, r1, lsl #2]
	str	r2, [fp, #-60]
	bl	VectorCopy
	ldr	r3, [r8]
	ldr	r2, [fp, #-60]
	add	r3, r3, #1
	str	r3, [r8]
	b	.L16
.L39:
	ldm	r7, {r1, r3}
	mov	r0, r10
	ldr	r1, [r3, r1, lsl #2]
	str	r2, [fp, #-60]
	bl	VectorCopy
	ldr	r3, [r7]
	ldr	r2, [fp, #-60]
	add	r3, r3, #1
	str	r3, [r7]
	b	.L15
.L38:
	mov	r0, r4
	bl	CopyWinding
	ldr	r3, [fp, #-60]
	str	r0, [r3]
	b	.L8
.L2:
	ldr	r3, [fp, #-64]
	str	ip, [r3]
	ldr	r3, [fp, #-60]
	str	ip, [r3]
.L27:
	mov	r0, r4
	bl	CopyWinding
	ldr	r3, [fp, #-64]
	str	r0, [r3]
	b	.L8
.L42:
	bl	__stack_chk_fail
.L44:
	.align	2
.L43:
	.word	MAX_POINTS_ON_WINDING
	.word	.LC2
	.word	SIDE_FRONT
	.word	SIDE_BACK
	.word	SIDE_ON
	.word	.LC1
	.word	.LC0
	.size	ClipWindingEpsilon, .-ClipWindingEpsilon
	.comm	SIDE_ON,4,4
	.comm	SIDE_FRONT,4,4
	.comm	SIDE_BACK,4,4
	.comm	MAX_POINTS_ON_WINDING,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
