	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_TH_FindEdge                    ## -- Begin function TH_FindEdge
	.p2align	4, 0x90
_TH_FindEdge:                           ## @TH_FindEdge
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
                                        ## kill: def $esi killed $esi def $rsi
                                        ## kill: def $edi killed $edi def $rdi
	leal	(%rsi,%rdi), %eax
	movq	_EDGEHASH_SIZE@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	decq	%rcx
	cltq
	andq	%rcx, %rax
	movq	_thworld@GOTPCREL(%rip), %r8
	movq	8(%r8), %rcx
	movq	(%rcx,%rax,8), %rcx
	xorl	%eax, %eax
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	8(%rcx), %rcx
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	testq	%rcx, %rcx
	je	LBB0_9
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	(%rcx), %rdx
	movl	(%rdx), %r9d
	movl	4(%rdx), %edx
	cmpl	%edi, %r9d
	jne	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpl	%esi, %edx
	je	LBB0_4
LBB0_5:                                 ##   in Loop: Header=BB0_1 Depth=1
	cmpl	%edi, %edx
	jne	LBB0_10
## %bb.6:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpl	%esi, %r9d
	jne	LBB0_10
## %bb.7:
	subq	(%r8), %rcx
	shrq	$4, %rcx
	negl	%ecx
	jmp	LBB0_8
LBB0_4:
	subq	(%r8), %rcx
	shrq	$4, %rcx
LBB0_8:
	movl	%ecx, %eax
LBB0_9:
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EDGEHASH_SIZE,4,2              ## @EDGEHASH_SIZE
	.comm	_thworld,16,3                   ## @thworld
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_TH_FindEdge                    ; -- Begin function TH_FindEdge
	.p2align	2
_TH_FindEdge:                           ; @TH_FindEdge
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _EDGEHASH_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EDGEHASH_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	sub	w8, w8, #1
	add	w9, w1, w0
	and	w8, w8, w9
Lloh3:
	adrp	x9, _thworld@GOTPAGE
Lloh4:
	ldr	x9, [x9, _thworld@GOTPAGEOFF]
	ldr	x10, [x9, #8]
	ldr	x8, [x10, w8, sxtw #3]
	cbz	x8, LBB0_4
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x8]
	ldp	w10, w11, [x11]
	cmp	w10, w0
	ccmp	w11, w1, #0, eq
	b.eq	LBB0_5
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	cmp	w11, w0
	ccmp	w10, w1, #0, eq
	b.eq	LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x8, [x8, #8]
	cbnz	x8, LBB0_1
LBB0_4:
	mov	w0, #0
                                        ; kill: def $w0 killed $w0 killed $x0
	ret
LBB0_5:
	ldr	x9, [x9]
	sub	x8, x8, x9
	lsr	x0, x8, #4
                                        ; kill: def $w0 killed $w0 killed $x0
	ret
LBB0_6:
	ldr	x9, [x9]
	sub	x8, x8, x9
	lsr	x8, x8, #4
	neg	w0, w8
                                        ; kill: def $w0 killed $w0 killed $x0
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EDGEHASH_SIZE,4,2              ; @EDGEHASH_SIZE
	.comm	_thworld,16,3                   ; @thworld
.subsections_via_symbols
