	.file	"extr_faces.c_SubdivideFace.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC4:
	.string	"SubdivideFace: didn't split the polygon"
	.text
	.p2align 4
	.globl	SubdivideFace
	.type	SubdivideFace, @function
SubdivideFace:
.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, 56
	.cfi_def_cfa_offset 112
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	cmp	QWORD PTR 32[rsi], 0
	jne	.L1
	mov	r12, QWORD PTR [rsi]
	mov	eax, DWORD PTR SURF_WARP[rip]
	mov	rbp, rsi
	or	eax, DWORD PTR SURF_SKY[rip]
	sal	r12, 4
	add	r12, QWORD PTR texinfo[rip]
	test	DWORD PTR [r12], eax
	jne	.L1
	mov	r14, rdi
	xor	r13d, r13d
.L12:
	mov	rax, QWORD PTR 8[r12]
	xor	esi, esi
	mov	edi, DWORD PTR [rax+r13]
	call	VectorCopy@PLT
	mov	r15, QWORD PTR 24[rbp]
	mov	eax, DWORD PTR [r15]
	test	eax, eax
	jle	.L14
	movss	xmm1, DWORD PTR .LC0[rip]
	movss	xmm2, DWORD PTR .LC1[rip]
	xor	ebx, ebx
	.p2align 4,,10
	.p2align 3
.L8:
	mov	rax, QWORD PTR 8[r15]
	xor	esi, esi
	movss	DWORD PTR 12[rsp], xmm1
	movss	DWORD PTR 8[rsp], xmm2
	mov	edi, DWORD PTR [rax+rbx*4]
	add	rbx, 1
	call	DotProduct@PLT
	movss	xmm2, DWORD PTR 8[rsp]
	movss	xmm1, DWORD PTR 12[rsp]
	movaps	xmm3, xmm0
	minss	xmm3, xmm2
	maxss	xmm0, xmm1
	movaps	xmm2, xmm3
	movaps	xmm1, xmm0
	cmp	DWORD PTR [r15], ebx
	jg	.L8
	subss	xmm1, xmm3
.L3:
	movss	xmm0, DWORD PTR subdivide_size[rip]
	comiss	xmm0, xmm1
	jb	.L21
	add	r13, 4
	cmp	r13, 8
	jne	.L12
.L1:
	mov	rax, QWORD PTR 40[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L22
	add	rsp, 56
	.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
.L14:
	.cfi_restore_state
	movss	xmm1, DWORD PTR .LC2[rip]
	movss	xmm2, DWORD PTR .LC1[rip]
	jmp	.L3
.L21:
	xor	esi, esi
	add	DWORD PTR c_subdivide[rip], 1
	mov	edi, esi
	mov	DWORD PTR 8[rsp], esi
	movss	DWORD PTR 12[rsp], xmm2
	call	VectorNormalize@PLT
	movss	xmm2, DWORD PTR 12[rsp]
	mov	edx, DWORD PTR ON_EPSILON[rip]
	lea	rcx, 24[rsp]
	addss	xmm2, DWORD PTR subdivide_size[rip]
	mov	esi, DWORD PTR 8[rsp]
	lea	r8, 32[rsp]
	mov	rdi, r15
	subss	xmm2, DWORD PTR .LC3[rip]
	divss	xmm2, xmm0
	movaps	xmm0, xmm2
	call	ClipWindingEpsilon@PLT
	cmp	QWORD PTR 24[rsp], 0
	je	.L10
	cmp	QWORD PTR 32[rsp], 0
	je	.L10
.L11:
	mov	rbx, QWORD PTR 8[rbp]
	mov	rdi, rbp
	call	NewFaceFromFace@PLT
	mov	rdx, QWORD PTR 24[rsp]
	mov	rdi, rbp
	mov	QWORD PTR [rbx], rax
	mov	rbx, QWORD PTR 8[rbp]
	mov	rax, QWORD PTR [rbx]
	mov	QWORD PTR 24[rax], rdx
	mov	rdx, QWORD PTR [r14]
	mov	QWORD PTR 16[rax], rdx
	mov	rax, QWORD PTR [rbx]
	mov	QWORD PTR [r14], rax
	call	NewFaceFromFace@PLT
	mov	rcx, QWORD PTR 32[rsp]
	mov	rdi, r14
	mov	QWORD PTR 8[rbx], rax
	mov	rax, QWORD PTR 8[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	QWORD PTR 24[rdx], rcx
	mov	rcx, QWORD PTR [r14]
	mov	QWORD PTR 16[rdx], rcx
	mov	rdx, QWORD PTR 8[rax]
	mov	QWORD PTR [r14], rdx
	mov	rsi, QWORD PTR [rax]
	call	SubdivideFace
	mov	rax, QWORD PTR 8[rbp]
	mov	rdi, r14
	mov	rsi, QWORD PTR 8[rax]
	call	SubdivideFace
	jmp	.L1
.L10:
	lea	rdi, .LC4[rip]
	call	Error@PLT
	jmp	.L11
.L22:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	SubdivideFace, .-SubdivideFace
	.comm	texinfo,8,8
	.comm	subdivide_size,4,4
	.comm	c_subdivide,4,4
	.comm	SURF_WARP,4,4
	.comm	SURF_SKY,4,4
	.comm	ON_EPSILON,4,4
	.section	.rodata.cst4,"aM",@progbits,4
	.align 4
.LC0:
	.long	3379831792
	.align 4
.LC1:
	.long	1232348144
	.align 4
.LC2:
	.long	3388220400
	.align 4
.LC3:
	.long	1098907648
	.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_faces.c_SubdivideFace.c"
	.text
	.global	__aeabi_fcmplt
	.global	__aeabi_fsub
	.global	__aeabi_fcmpge
	.global	__aeabi_fadd
	.global	__aeabi_fdiv
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"SubdivideFace: didn't split the polygon\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	SubdivideFace
	.syntax unified
	.arm
	.fpu softvfp
	.type	SubdivideFace, %function
SubdivideFace:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r3, [r1, #16]
	sub	sp, sp, #36
	cmp	r3, #0
	ldr	r3, .L26
	str	r0, [sp, #12]
	ldr	r3, [r3]
	str	r3, [sp, #28]
	mov	r3,#0
	bne	.L1
	mov	r9, r1
	ldr	r3, .L26+4
	ldr	r1, .L26+8
	ldr	r2, .L26+12
	ldr	r10, [r3]
	ldr	r3, [r9]
	ldr	r8, [r1]
	ldr	r1, [r2]
	ldr	r2, [r10, r3, lsl #3]
	orr	r8, r8, r1
	ands	r8, r8, r2
	add	r10, r10, r3, lsl #3
	bne	.L1
.L12:
	ldr	r3, [r10, #4]
	mov	r1, #0
	ldr	r0, [r3, r8]
	bl	VectorCopy
	ldr	r5, [r9, #12]
	ldr	r3, [r5]
	cmp	r3, #0
	ble	.L14
	mov	r7, #0
	ldr	fp, .L26+16
	ldr	r6, .L26+20
.L8:
	ldr	r3, [r5, #4]
	mov	r1, #0
	ldr	r0, [r3, r7, lsl #2]
	bl	DotProduct
	mov	r1, r6
	mov	r4, r0
	bl	__aeabi_fcmplt
	mov	r1, r4
	cmp	r0, #0
	mov	r0, fp
	movne	r6, r4
	bl	__aeabi_fcmplt
	ldr	r3, [r5]
	cmp	r0, #0
	add	r7, r7, #1
	movne	fp, r4
	cmp	r3, r7
	bgt	.L8
	mov	r1, r6
	mov	r0, fp
	bl	__aeabi_fsub
	mov	r1, r0
.L3:
	ldr	r3, .L26+24
	ldr	r0, [r3]	@ float
	bl	__aeabi_fcmpge
	cmp	r0, #0
	beq	.L24
	add	r8, r8, #4
	cmp	r8, #8
	bne	.L12
.L1:
	ldr	r3, .L26
	ldr	r2, [r3]
	ldr	r3, [sp, #28]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L25
	add	sp, sp, #36
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L14:
	ldr	r1, .L26+28
	ldr	r6, .L26+20
	b	.L3
.L24:
	mov	r7, #0
	ldr	r2, .L26+32
	mov	r0, r7
	ldr	r3, [r2]
	add	r3, r3, #1
	str	r3, [r2]
	bl	VectorNormalize
	mov	r4, r0
	ldr	r2, .L26+24
	ldr	r3, .L26+36
	ldr	r1, [r2]	@ float
	mov	r0, r6
	ldr	r6, [r3]
	bl	__aeabi_fadd
	ldr	r1, .L26+40
	bl	__aeabi_fsub
	mov	r1, r4
	bl	__aeabi_fdiv
	add	lr, sp, #24
	add	ip, sp, #20
	mov	r2, r0
	mov	r3, r6
	mov	r1, r7
	mov	r0, r5
	stm	sp, {ip, lr}
	bl	ClipWindingEpsilon
	ldr	r3, [sp, #20]
	cmp	r3, r7
	beq	.L10
	ldr	r3, [sp, #24]
	cmp	r3, r7
	beq	.L10
.L11:
	mov	r0, r9
	ldr	r5, [r9, #4]
	bl	NewFaceFromFace
	ldr	r4, [r9, #4]
	str	r0, [r5]
	ldr	r5, [sp, #12]
	ldr	r3, [r4]
	ldr	r2, [r5]
	ldr	r1, [sp, #20]
	str	r2, [r3, #8]
	ldr	r2, [r4]
	mov	r0, r9
	str	r1, [r3, #12]
	str	r2, [r5]
	bl	NewFaceFromFace
	ldr	r3, [r9, #4]
	str	r0, [r4, #4]
	ldr	r2, [r3, #4]
	ldr	r1, [r5]
	ldr	r0, [sp, #24]
	str	r1, [r2, #8]
	ldr	r1, [r3, #4]
	str	r0, [r2, #12]
	str	r1, [r5]
	mov	r0, r5
	ldr	r1, [r3]
	bl	SubdivideFace
	ldr	r3, [r9, #4]
	mov	r0, r5
	ldr	r1, [r3, #4]
	bl	SubdivideFace
	b	.L1
.L10:
	ldr	r0, .L26+44
	bl	Error
	b	.L11
.L25:
	bl	__stack_chk_fail
.L27:
	.align	2
.L26:
	.word	.LC1
	.word	texinfo
	.word	SURF_WARP
	.word	SURF_SKY
	.word	-915135504
	.word	1232348144
	.word	subdivide_size
	.word	-906746896
	.word	c_subdivide
	.word	ON_EPSILON
	.word	1098907648
	.word	.LC0
	.size	SubdivideFace, .-SubdivideFace
	.comm	texinfo,4,4
	.comm	subdivide_size,4,4
	.comm	c_subdivide,4,4
	.comm	SURF_WARP,4,4
	.comm	SURF_SKY,4,4
	.comm	ON_EPSILON,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
