	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_TH_TryEdge                     ## -- Begin function TH_TryEdge
	.p2align	4, 0x90
_TH_TryEdge:                            ## @TH_TryEdge
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r12d
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	callq	_TH_FindEdge
	movl	$1, %ecx
	testq	%rax, %rax
	jne	LBB0_16
## %bb.1:
	movq	_thworld@GOTPCREL(%rip), %r13
	cmpl	$2, (%r13)
	jl	LBB0_16
## %bb.2:
	movl	$1, %ebx
	movl	$88, %r14d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	-20(%r15,%r14), %ecx
	movl	-16(%r15,%r14), %edx
	movl	%r12d, %edi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_TH_OutsideBoundingBox
	testq	%rax, %rax
	je	LBB0_6
LBB0_14:                                ##   in Loop: Header=BB0_3 Depth=1
	incq	%rbx
	movslq	(%r13), %rax
	addq	$48, %r14
	cmpq	%rax, %rbx
	jge	LBB0_15
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	24(%r13), %r15
	cmpq	$0, (%r15,%r14)
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpq	$0, -8(%r15,%r14)
	jne	LBB0_14
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	16(%r13), %rax
	movq	-40(%r15,%r14), %rcx
	movq	(%rcx), %rdx
	movq	%rdx, %rsi
	negq	%rsi
	cmovsq	%rdx, %rsi
	movq	(%rax,%rsi,8), %rsi
	shrq	$63, %rdx
	movl	(%rsi,%rdx,4), %edx
	cmpl	%r12d, %edx
	je	LBB0_14
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	-44(%rbp), %edx                 ## 4-byte Folded Reload
	je	LBB0_14
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	8(%rcx), %rdx
	movq	%rdx, %rsi
	negq	%rsi
	cmovsq	%rdx, %rsi
	movq	(%rax,%rsi,8), %rsi
	shrq	$63, %rdx
	movl	(%rsi,%rdx,4), %edx
	cmpl	%r12d, %edx
	je	LBB0_14
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	-44(%rbp), %edx                 ## 4-byte Folded Reload
	je	LBB0_14
## %bb.10:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	16(%rcx), %rcx
	movq	%rcx, %rdx
	negq	%rdx
	cmovsq	%rcx, %rdx
	movq	(%rax,%rdx,8), %rax
	shrq	$63, %rcx
	movl	(%rax,%rcx,4), %eax
	cmpl	%r12d, %eax
	je	LBB0_14
## %bb.11:                              ##   in Loop: Header=BB0_3 Depth=1
	cmpl	-44(%rbp), %eax                 ## 4-byte Folded Reload
	je	LBB0_14
## %bb.12:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	-32(%r15,%r14), %rdx
	shlq	$2, %rdx
	addq	8(%r13), %rdx
	movl	-24(%r15,%r14), %ecx
	movl	%r12d, %edi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_TH_IntersectTrianglePlanes
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:
	xorl	%ecx, %ecx
	jmp	LBB0_16
LBB0_15:
	movl	$1, %ecx
LBB0_16:
	movl	%ecx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_thworld,32,3                   ## @thworld
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_TH_TryEdge                     ; -- Begin function TH_TryEdge
	.p2align	2
_TH_TryEdge:                            ; @TH_TryEdge
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, x1
	mov	x20, x0
	bl	_TH_FindEdge
	mov	x8, x0
	mov	w0, #1
	cbnz	x8, LBB0_13
; %bb.1:
Lloh0:
	adrp	x21, _thworld@GOTPAGE
Lloh1:
	ldr	x21, [x21, _thworld@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #2
	b.lt	LBB0_13
; %bb.2:
	mov	x22, #0
	mov	w23, #1
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldp	w3, w2, [x8, #68]
	mov	x0, x20
	mov	x1, x19
	bl	_TH_OutsideBoundingBox
	cbz	x0, LBB0_7
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x23, x23, #1
	ldrsw	x8, [x21]
	add	x22, x22, #48
	cmp	x23, x8
	b.ge	LBB0_12
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x24, [x21, #24]
	add	x8, x24, x22
	ldr	x9, [x8, #88]
	cbz	x9, LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x9, [x8, #80]
	cbnz	x9, LBB0_4
	b	LBB0_3
LBB0_7:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x21, #16]
	add	x9, x24, x22
	ldr	x9, [x9, #48]
	ldr	x10, [x9]
	cmp	x10, #0
	cneg	x11, x10, mi
	ldr	x11, [x8, x11, lsl #3]
	lsr	x10, x10, #61
	and	x10, x10, #0x4
	ldr	w10, [x11, x10]
	cmp	w10, w20
	ccmp	w10, w19, #4, ne
	b.eq	LBB0_4
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x10, [x9, #8]
	cmp	x10, #0
	cneg	x11, x10, mi
	ldr	x11, [x8, x11, lsl #3]
	lsr	x10, x10, #61
	and	x10, x10, #0x4
	ldr	w10, [x11, x10]
	cmp	w10, w20
	ccmp	w10, w19, #4, ne
	b.eq	LBB0_4
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x9, [x9, #16]
	cmp	x9, #0
	cneg	x10, x9, mi
	ldr	x8, [x8, x10, lsl #3]
	lsr	x9, x9, #61
	and	x9, x9, #0x4
	ldr	w8, [x8, x9]
	cmp	w8, w20
	ccmp	w8, w19, #4, ne
	b.eq	LBB0_4
; %bb.10:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x21, #8]
	add	x9, x24, x22
	ldr	x10, [x9, #56]
	add	x2, x8, x10, lsl #2
	ldr	w3, [x9, #64]
	mov	x0, x20
	mov	x1, x19
	bl	_TH_IntersectTrianglePlanes
	cbz	x0, LBB0_4
; %bb.11:
	mov	w0, #0
	b	LBB0_13
LBB0_12:
	mov	w0, #1
LBB0_13:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_thworld,32,3                   ; @thworld
.subsections_via_symbols
