	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_TH_TryTriangle                 ## -- Begin function TH_TryTriangle
	.p2align	4, 0x90
_TH_TryTriangle:                        ## @TH_TryTriangle
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_thworld@GOTPCREL(%rip), %rbx
	movq	16(%rbx), %rax
	movslq	(%rdi), %rcx
	movq	(%rax,%rcx,8), %r14
	movslq	4(%rdi), %rcx
	movq	(%rax,%rcx,8), %r15
	movslq	8(%rdi), %rcx
	movq	(%rax,%rcx,8), %r12
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_VectorSubtract
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_VectorSubtract
	callq	_CrossProduct
	callq	_VectorNormalize
	movq	%r14, %rdi
	callq	_DotProduct
	movl	%eax, -84(%rbp)
	leaq	-88(%rbp), %rsi
	leaq	-80(%rbp), %rdx
	movq	%r13, %rdi
	callq	_TH_CreateTrianglePlanes
	movl	(%rbx), %r8d
	movl	$1, %eax
	cmpl	$2, %r8d
	jl	LBB0_13
## %bb.1:
	movl	$1, %r15d
	movl	$24, %r12d
	leaq	-88(%rbp), %rdx
	leaq	-80(%rbp), %rcx
	jmp	LBB0_2
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	(%rbx), %r8d
	leaq	-88(%rbp), %rdx
	movl	$1, %eax
	movq	%r14, %rcx
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	incq	%r15
	movslq	%r8d, %rsi
	addq	$16, %r12
	cmpq	%rsi, %r15
	jge	LBB0_13
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%rbx), %r9
	cmpl	$0, (%r9,%r12)
	je	LBB0_12
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r13), %edi
	movq	(%r9), %rsi
	cmpl	(%rsi), %edi
	je	LBB0_12
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	4(%rsi), %edi
	je	LBB0_12
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	4(%r13), %edi
	movq	16(%r9), %rsi
	cmpl	(%rsi), %edi
	je	LBB0_12
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	4(%rsi), %edi
	je	LBB0_12
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	8(%r13), %edi
	movq	32(%r9), %rsi
	cmpl	(%rsi), %edi
	je	LBB0_12
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	4(%rsi), %edi
	je	LBB0_12
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-8(%r9,%r12), %rax
	movl	(%rax), %edi
	movl	4(%rax), %esi
	movq	%rcx, %r14
	callq	_TH_IntersectTrianglePlanes
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	xorl	%eax, %eax
LBB0_13:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_15
## %bb.14:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_thworld,24,3                   ## @thworld
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_TH_TryTriangle                 ; -- Begin function TH_TryTriangle
	.p2align	2
_TH_TryTriangle:                        ; @TH_TryTriangle
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x23, _thworld@GOTPAGE
Lloh4:
	ldr	x23, [x23, _thworld@GOTPAGEOFF]
	str	x8, [sp, #40]
	ldr	x8, [x23, #16]
	ldpsw	x9, x10, [x0]
	ldr	x20, [x8, x9, lsl #3]
	ldr	x21, [x8, x10, lsl #3]
	ldrsw	x9, [x0, #8]
	ldr	x22, [x8, x9, lsl #3]
	mov	x0, x20
	mov	x1, x21
	bl	_VectorSubtract
	mov	x0, x22
	mov	x1, x21
	bl	_VectorSubtract
	bl	_CrossProduct
	bl	_VectorNormalize
	mov	x0, x20
	bl	_DotProduct
	str	w0, [sp, #12]
	add	x1, sp, #8
	add	x2, sp, #16
	mov	x0, x19
	bl	_TH_CreateTrianglePlanes
	ldr	w8, [x23]
	cmp	w8, #2
	b.lt	LBB0_13
; %bb.1:
	mov	x20, #0
	mov	w21, #1
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x23]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x21, x21, #1
	add	x20, x20, #16
	cmp	x21, w8, sxtw
	b.ge	LBB0_13
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x23, #8]
	add	x10, x9, x20
	ldr	w10, [x10, #24]
	cbz	w10, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w10, [x19]
	ldr	x11, [x9]
	ldr	w12, [x11]
	cmp	w10, w12
	b.eq	LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w11, [x11, #4]
	cmp	w10, w11
	b.eq	LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w10, [x19, #4]
	ldr	x11, [x9, #16]
	ldr	w12, [x11]
	cmp	w10, w12
	b.eq	LBB0_3
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w11, [x11, #4]
	cmp	w10, w11
	b.eq	LBB0_3
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w10, [x19, #8]
	ldr	x11, [x9, #32]
	ldr	w12, [x11]
	cmp	w10, w12
	b.eq	LBB0_3
; %bb.10:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	w11, [x11, #4]
	cmp	w10, w11
	b.eq	LBB0_3
; %bb.11:                               ;   in Loop: Header=BB0_4 Depth=1
	add	x8, x9, x20
	ldr	x8, [x8, #16]
	ldp	w0, w1, [x8]
	add	x2, sp, #8
	add	x3, sp, #16
	bl	_TH_IntersectTrianglePlanes
	cbz	x0, LBB0_2
; %bb.12:
	mov	w0, #0
	b	LBB0_14
LBB0_13:
	mov	w0, #1
LBB0_14:
	ldr	x8, [sp, #40]
Lloh5:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh6:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_16
; %bb.15:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_16:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_thworld,24,3                   ; @thworld
.subsections_via_symbols
