	.file	"extr_tetrahedron.c_TH_TryTriangle.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	TH_TryTriangle
	.type	TH_TryTriangle, @function
TH_TryTriangle:
.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
	xor	r14d, r14d
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	xor	r12d, r12d
	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
	movsx	rdx, DWORD PTR [rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	mov	rax, QWORD PTR thworld[rip+16]
	mov	rbp, QWORD PTR [rax+rdx*8]
	movsx	rdx, DWORD PTR 4[rdi]
	mov	r15, QWORD PTR [rax+rdx*8]
	movsx	rdx, DWORD PTR 8[rdi]
	mov	rdi, rbp
	mov	rbx, QWORD PTR [rax+rdx*8]
	mov	rsi, r15
	mov	edx, r12d
	call	VectorSubtract@PLT
	mov	edx, r14d
	mov	rsi, r15
	mov	rdi, rbx
	call	VectorSubtract@PLT
	mov	edx, DWORD PTR 8[rsp]
	mov	esi, r14d
	mov	edi, r12d
	lea	r12, 16[rsp]
	call	CrossProduct@PLT
	mov	edi, DWORD PTR 8[rsp]
	call	VectorNormalize@PLT
	mov	esi, DWORD PTR 8[rsp]
	mov	rdi, rbp
	lea	rbp, 8[rsp]
	call	DotProduct@PLT
	mov	rdx, r12
	mov	rsi, rbp
	mov	rdi, r13
	mov	DWORD PTR 12[rsp], eax
	call	TH_CreateTrianglePlanes@PLT
	cmp	DWORD PTR thworld[rip], 1
	jle	.L2
	xor	eax, eax
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L3:
	lea	edx, 1[rbx]
	cmp	DWORD PTR thworld[rip], edx
	mov	rax, rbx
	jle	.L2
.L6:
	lea	rbx, 1[rax]
	mov	rdi, QWORD PTR thworld[rip+8]
	mov	rdx, rbx
	sal	rdx, 4
	add	rdx, rdi
	mov	eax, DWORD PTR 8[rdx]
	test	eax, eax
	je	.L3
	xor	eax, eax
.L4:
	mov	rcx, rax
	mov	esi, DWORD PTR 0[r13+rax*4]
	sal	rcx, 4
	mov	rcx, QWORD PTR [rdi+rcx]
	cmp	esi, DWORD PTR [rcx]
	je	.L3
	cmp	esi, DWORD PTR 4[rcx]
	je	.L3
	add	rax, 1
	cmp	rax, 3
	jne	.L4
	mov	rax, QWORD PTR [rdx]
	mov	rcx, r12
	mov	rdx, rbp
	mov	esi, DWORD PTR 4[rax]
	mov	edi, DWORD PTR [rax]
	call	TH_IntersectTrianglePlanes@PLT
	test	rax, rax
	je	.L3
	xor	eax, eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L2:
	mov	eax, 1
.L1:
	mov	rbx, QWORD PTR 40[rsp]
	xor	rbx, QWORD PTR fs:40
	jne	.L15
	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
.L15:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	TH_TryTriangle, .-TH_TryTriangle
	.comm	thworld,24,16
	.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_tetrahedron.c_TH_TryTriangle.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	TH_TryTriangle
	.syntax unified
	.arm
	.fpu softvfp
	.type	TH_TryTriangle, %function
TH_TryTriangle:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r6, r0
	mov	r7, #0
	ldmib	r6, {r1, r2}
	ldr	r5, .L19
	ldr	r0, [r0]
	ldr	r3, [r5, #8]
	sub	sp, sp, #40
	ldr	r4, [r3, r0, lsl #2]
	ldr	r9, [r3, r1, lsl #2]
	ldr	r10, [r3, r2, lsl #2]
	ldr	r3, .L19+4
	mov	r1, r9
	mov	r2, r7
	mov	r0, r4
	ldr	r3, [r3]
	str	r3, [sp, #36]
	mov	r3,#0
	bl	VectorSubtract
	mov	r1, r9
	mov	r2, r7
	mov	r0, r10
	bl	VectorSubtract
	ldr	r2, [sp, #4]
	mov	r1, r7
	mov	r0, r7
	bl	CrossProduct
	ldr	r0, [sp, #4]
	bl	VectorNormalize
	ldr	r1, [sp, #4]
	mov	r0, r4
	bl	DotProduct
	mov	r3, r0
	add	r2, sp, #12
	mov	r0, r6
	add	r1, sp, #4
	str	r3, [sp, #8]
	bl	TH_CreateTrianglePlanes
	ldr	r3, [r5]
	cmp	r3, #1
	ble	.L2
	mov	r4, #1
	b	.L6
.L3:
	ldr	r3, [r5]
	add	r4, r4, #1
	cmp	r3, r4
	ble	.L2
.L6:
	ldr	r2, [r5, #4]
	lsl	r7, r4, #3
	add	r3, r2, r4, lsl #3
	ldr	r3, [r3, #4]
	cmp	r3, #0
	beq	.L3
	mov	r3, #0
	sub	lr, r6, #4
.L4:
	ldr	ip, [r2, r3, lsl #3]
	ldr	r1, [lr, #4]!
	ldr	r0, [ip]
	cmp	r1, r0
	beq	.L3
	ldr	r0, [ip, #4]
	cmp	r1, r0
	beq	.L3
	add	r3, r3, #1
	cmp	r3, #3
	bne	.L4
	ldr	r2, [r2, r7]
	add	r3, sp, #12
	ldm	r2, {r0, r1}
	add	r2, sp, #4
	bl	TH_IntersectTrianglePlanes
	cmp	r0, #0
	beq	.L3
	mov	r0, #0
	b	.L1
.L2:
	mov	r0, #1
.L1:
	ldr	r3, .L19+4
	ldr	r2, [r3]
	ldr	r3, [sp, #36]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L18
	add	sp, sp, #40
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L18:
	bl	__stack_chk_fail
.L20:
	.align	2
.L19:
	.word	thworld
	.word	.LC0
	.size	TH_TryTriangle, .-TH_TryTriangle
	.comm	thworld,12,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
