	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CDVD_findfile                  ## -- Begin function CDVD_findfile
	.p2align	4, 0x90
_CDVD_findfile:                         ## @CDVD_findfile
	.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
	movq	%rsi, %r12
	leaq	_CDVD_findfile.pathname(%rip), %rsi
	leaq	_CDVD_findfile.filename(%rip), %rdx
	callq	__splitpath
	movq	_CachedDirInfo@GOTPCREL(%rip), %r13
	movq	(%r13), %rax
	movq	_TRUE@GOTPCREL(%rip), %r15
	cmpq	(%r15), %rax
	jne	LBB0_14
## %bb.1:
	leaq	_CDVD_findfile.pathname(%rip), %rdi
	callq	_ComparePath
	movq	_MATCH@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_14
## %bb.2:
	movslq	16(%r13), %rax
	testq	%rax, %rax
	jle	LBB0_11
## %bb.3:
	movq	8(%r13), %rcx
	movq	%rax, %rdx
	shlq	$11, %rdx
	addq	%rcx, %rdx
	leaq	_CDVD_findfile.filename(%rip), %r14
	movq	%rcx, %rbx
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_4 Depth=1
	movslq	(%rbx), %rdx
	leaq	(%rbx,%rdx,4), %rbx
	movl	%eax, %edx
	shll	$11, %edx
	movslq	%edx, %rdx
	addq	%rcx, %rdx
	cmpq	%rdx, %rbx
	jae	LBB0_11
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$0, (%rbx)
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	subq	%rcx, %rbx
	leaq	2047(%rbx), %rsi
	testq	%rbx, %rbx
	cmovnsq	%rbx, %rsi
	andq	$-2048, %rsi                    ## imm = 0xF800
	leaq	(%rsi,%rcx), %rbx
	addq	$2048, %rbx                     ## imm = 0x800
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	cmpq	%rdx, %rbx
	jae	LBB0_11
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	testb	$2, 4(%rbx)
	jne	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_TocEntryCopy
	movq	(%r12), %rdi
	movq	%r14, %rsi
	callq	_strcasecmp
	testq	%rax, %rax
	je	LBB0_32
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	8(%r13), %rcx
	movl	16(%r13), %eax
	jmp	LBB0_10
LBB0_11:
	cmpl	20(%r13), %eax
	je	LBB0_29
## %bb.12:
	cmpq	$0, 24(%r13)
	je	LBB0_13
LBB0_14:
	movq	_CACHE_START@GOTPCREL(%rip), %rax
LBB0_15:
	movl	(%rax), %esi
	leaq	_CDVD_findfile.pathname(%rip), %rdi
	callq	_CDVD_Cache_Dir
	cmpq	(%r15), %rax
	jne	LBB0_29
## %bb.16:
	movl	16(%r13), %ecx
	testl	%ecx, %ecx
	jle	LBB0_29
## %bb.17:
	leaq	_CDVD_findfile.filename(%rip), %r14
	leaq	_CDVD_findfile.pathname(%rip), %r15
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_28:                                ##   in Loop: Header=BB0_18 Depth=1
	movq	_CACHE_NEXT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_CDVD_Cache_Dir
	movl	16(%r13), %ecx
	testl	%ecx, %ecx
	jle	LBB0_29
LBB0_18:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_22 Depth 2
	movq	8(%r13), %rax
	cmpq	$0, 24(%r13)
	movq	%rax, %rbx
	jne	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_18 Depth=1
	movslq	(%rax), %rdx
	leaq	(%rax,%rdx,4), %rbx
LBB0_20:                                ##   in Loop: Header=BB0_18 Depth=1
	shll	$8, %ecx
	movslq	%ecx, %rcx
	leaq	(%rax,%rcx,8), %rcx
	cmpq	%rcx, %rbx
	jae	LBB0_28
	.p2align	4, 0x90
LBB0_22:                                ##   Parent Loop BB0_18 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpl	$0, (%rbx)
	jne	LBB0_24
## %bb.23:                              ##   in Loop: Header=BB0_22 Depth=2
	subq	%rax, %rbx
	leaq	2047(%rbx), %rdx
	testq	%rbx, %rbx
	cmovnsq	%rbx, %rdx
	andq	$-2048, %rdx                    ## imm = 0xF800
	leaq	(%rdx,%rax), %rbx
	addq	$2048, %rbx                     ## imm = 0x800
LBB0_24:                                ##   in Loop: Header=BB0_22 Depth=2
	cmpq	%rcx, %rbx
	jae	LBB0_28
## %bb.25:                              ##   in Loop: Header=BB0_22 Depth=2
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_TocEntryCopy
	movq	(%r12), %rdi
	movq	%r14, %rsi
	callq	_strcasecmp
	testq	%rax, %rax
	je	LBB0_26
## %bb.27:                              ##   in Loop: Header=BB0_22 Depth=2
	movslq	(%rbx), %rax
	leaq	(%rbx,%rax,4), %rbx
	movq	8(%r13), %rax
	movslq	16(%r13), %rcx
	shlq	$11, %rcx
	addq	%rax, %rcx
	cmpq	%rcx, %rbx
	jb	LBB0_22
	jmp	LBB0_28
LBB0_29:
	movq	_FALSE@GOTPCREL(%rip), %rax
	jmp	LBB0_30
LBB0_26:
	movq	_TRUE@GOTPCREL(%rip), %rax
LBB0_30:
	movl	(%rax), %eax
LBB0_31:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movq	_CACHE_NEXT@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_32:
	movl	(%r15), %eax
	jmp	LBB0_31
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_CDVD_findfile.filename,129,4 ## @CDVD_findfile.filename
.zerofill __DATA,__bss,_CDVD_findfile.pathname,1025,4 ## @CDVD_findfile.pathname
	.comm	_CachedDirInfo,32,3             ## @CachedDirInfo
	.comm	_TRUE,8,3                       ## @TRUE
	.comm	_MATCH,8,3                      ## @MATCH
	.comm	_FALSE,4,2                      ## @FALSE
	.comm	_CACHE_NEXT,4,2                 ## @CACHE_NEXT
	.comm	_CACHE_START,4,2                ## @CACHE_START
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CDVD_findfile                  ; -- Begin function CDVD_findfile
	.p2align	2
_CDVD_findfile:                         ; @CDVD_findfile
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x1
Lloh0:
	adrp	x1, _CDVD_findfile.pathname@PAGE
Lloh1:
	add	x1, x1, _CDVD_findfile.pathname@PAGEOFF
Lloh2:
	adrp	x2, _CDVD_findfile.filename@PAGE
Lloh3:
	add	x2, x2, _CDVD_findfile.filename@PAGEOFF
	bl	__splitpath
Lloh4:
	adrp	x24, _CachedDirInfo@GOTPAGE
Lloh5:
	ldr	x24, [x24, _CachedDirInfo@GOTPAGEOFF]
	ldr	x8, [x24]
Lloh6:
	adrp	x23, _TRUE@GOTPAGE
Lloh7:
	ldr	x23, [x23, _TRUE@GOTPAGEOFF]
	ldr	x9, [x23]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.1:
Lloh8:
	adrp	x0, _CDVD_findfile.pathname@PAGE
Lloh9:
	add	x0, x0, _CDVD_findfile.pathname@PAGEOFF
	bl	_ComparePath
Lloh10:
	adrp	x8, _MATCH@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MATCH@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_11
; %bb.2:
	ldr	w8, [x24, #16]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.3:
	sxtw	x10, w8
	ldr	x9, [x24, #8]
	add	x10, x9, x10, lsl #11
Lloh13:
	adrp	x20, _CDVD_findfile.filename@PAGE
Lloh14:
	add	x20, x20, _CDVD_findfile.filename@PAGEOFF
	mov	x11, x9
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldrsw	x10, [x21]
	add	x11, x21, x10, lsl #2
	lsl	w10, w8, #11
	add	x10, x9, w10, sxtw
	cmp	x11, x10
	b.hs	LBB0_9
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w12, [x11]
	sub	x13, x11, x9
	add	x14, x13, #2047
	cmp	x13, #0
	csel	x13, x14, x13, lt
	and	x13, x13, #0xfffffffffffff800
	add	x13, x13, x9
	add	x13, x13, #2048
	cmp	w12, #0
	csel	x21, x11, x13, ne
	cmp	x21, x10
	b.hs	LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldrb	w10, [x21, #4]
	tbnz	w10, #1, LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x19
	mov	x1, x21
	bl	_TocEntryCopy
	ldr	x0, [x19]
	mov	x1, x20
	bl	_strcasecmp
	cbz	x0, LBB0_23
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x9, [x24, #8]
	ldr	w8, [x24, #16]
	b	LBB0_4
LBB0_9:
	ldr	w9, [x24, #20]
	cmp	w8, w9
	b.eq	LBB0_22
; %bb.10:
	ldr	x8, [x24, #24]
	cbz	x8, LBB0_25
LBB0_11:
Lloh15:
	adrp	x8, _CACHE_START@GOTPAGE
Lloh16:
	ldr	x8, [x8, _CACHE_START@GOTPAGEOFF]
LBB0_12:
	ldr	w1, [x8]
Lloh17:
	adrp	x0, _CDVD_findfile.pathname@PAGE
Lloh18:
	add	x0, x0, _CDVD_findfile.pathname@PAGEOFF
	bl	_CDVD_Cache_Dir
	ldr	x8, [x23]
	cmp	x0, x8
	b.ne	LBB0_22
; %bb.13:
	ldr	w10, [x24, #16]
	cmp	w10, #1
	b.lt	LBB0_22
; %bb.14:
Lloh19:
	adrp	x20, _CDVD_findfile.filename@PAGE
Lloh20:
	add	x20, x20, _CDVD_findfile.filename@PAGEOFF
Lloh21:
	adrp	x25, _CACHE_NEXT@GOTPAGE
Lloh22:
	ldr	x25, [x25, _CACHE_NEXT@GOTPAGEOFF]
Lloh23:
	adrp	x21, _CDVD_findfile.pathname@PAGE
Lloh24:
	add	x21, x21, _CDVD_findfile.pathname@PAGEOFF
	b	LBB0_16
LBB0_15:                                ;   in Loop: Header=BB0_16 Depth=1
	ldr	w1, [x25]
	mov	x0, x21
	bl	_CDVD_Cache_Dir
	ldr	w10, [x24, #16]
	cmp	w10, #0
	b.le	LBB0_22
LBB0_16:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_19 Depth 2
	ldr	x8, [x24, #8]
	ldr	x11, [x24, #24]
	mov	x9, x8
	cbnz	x11, LBB0_18
; %bb.17:                               ;   in Loop: Header=BB0_16 Depth=1
	ldrsw	x9, [x8]
	add	x9, x8, x9, lsl #2
LBB0_18:                                ;   in Loop: Header=BB0_16 Depth=1
	lsl	w10, w10, #8
	add	x10, x8, w10, sxtw #3
	cmp	x9, x10
	b.hs	LBB0_15
LBB0_19:                                ;   Parent Loop BB0_16 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w11, [x9]
	sub	x12, x9, x8
	add	x13, x12, #2047
	cmp	x12, #0
	csel	x12, x13, x12, lt
	and	x12, x12, #0xfffffffffffff800
	add	x8, x12, x8
	add	x8, x8, #2048
	cmp	w11, #0
	csel	x22, x9, x8, ne
	cmp	x22, x10
	b.hs	LBB0_15
; %bb.20:                               ;   in Loop: Header=BB0_19 Depth=2
	mov	x0, x19
	mov	x1, x22
	bl	_TocEntryCopy
	ldr	x0, [x19]
	mov	x1, x20
	bl	_strcasecmp
	cbz	x0, LBB0_23
; %bb.21:                               ;   in Loop: Header=BB0_19 Depth=2
	ldrsw	x8, [x22]
	add	x9, x22, x8, lsl #2
	ldr	x8, [x24, #8]
	ldrsw	x10, [x24, #16]
	add	x10, x8, x10, lsl #11
	cmp	x9, x10
	b.lo	LBB0_19
	b	LBB0_15
LBB0_22:
Lloh25:
	adrp	x8, _FALSE@GOTPAGE
Lloh26:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh27:
	ldr	w0, [x8]
	b	LBB0_24
LBB0_23:
	ldr	w0, [x23]
LBB0_24:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_25:
Lloh28:
	adrp	x8, _CACHE_NEXT@GOTPAGE
Lloh29:
	ldr	x8, [x8, _CACHE_NEXT@GOTPAGEOFF]
	b	LBB0_12
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_CDVD_findfile.filename,129,0 ; @CDVD_findfile.filename
.zerofill __DATA,__bss,_CDVD_findfile.pathname,1025,0 ; @CDVD_findfile.pathname
	.comm	_CachedDirInfo,32,3             ; @CachedDirInfo
	.comm	_TRUE,8,3                       ; @TRUE
	.comm	_MATCH,8,3                      ; @MATCH
	.comm	_FALSE,4,2                      ; @FALSE
	.comm	_CACHE_NEXT,4,2                 ; @CACHE_NEXT
	.comm	_CACHE_START,4,2                ; @CACHE_START
.subsections_via_symbols
