	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___card_findnext                ## -- Begin function __card_findnext
	.p2align	4, 0x90
___card_findnext:                       ## @__card_findnext
	.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	%rdi, %rbx
	movq	$0, -48(%rbp)
	movq	(%rdi), %rdi
	movq	_EXI_CHANNEL_0@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdi
	jl	LBB0_2
## %bb.1:
	movq	_EXI_CHANNEL_2@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdi
	jge	LBB0_2
## %bb.3:
	movq	8(%rbx), %rax
	movq	_CARD_MAXFILES@GOTPCREL(%rip), %r15
	cmpq	(%r15), %rax
	jae	LBB0_4
## %bb.5:
	leaq	-48(%rbp), %rsi
	callq	___card_getcntrlblock
	testl	%eax, %eax
	js	LBB0_17
## %bb.6:
	movq	-48(%rbp), %rdi
	cmpl	$0, 4(%rdi)
	je	LBB0_2
## %bb.7:
	callq	___card_getdirblock
	movq	(%rax), %r14
	movq	8(%rbx), %rax
	movq	_card_gamecode@GOTPCREL(%rip), %r12
	movq	_card_company@GOTPCREL(%rip), %r13
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	8(%rbx), %rax
	incq	%rax
	movq	%rax, 8(%rbx)
	cmpq	(%r15), %rax
	jae	LBB0_15
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	shlq	$5, %rax
	movq	(%r14,%rax), %rdi
	cmpl	$255, (%rdi)
	je	LBB0_14
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	cmpq	$0, 32(%rbx)
	jne	LBB0_13
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=1
	movl	(%r12), %esi
	movl	$4, %edx
	callq	_memcmp
	testq	%rax, %rax
	jne	LBB0_14
## %bb.11:                              ##   in Loop: Header=BB0_8 Depth=1
	cmpq	$0, 32(%rbx)
	jne	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	8(%rbx), %rax
	shlq	$5, %rax
	movq	8(%r14,%rax), %rdi
	movl	(%r13), %esi
	movl	$2, %edx
	callq	_memcmp
	testq	%rax, %rax
	jne	LBB0_14
LBB0_13:
	movq	8(%rbx), %rax
	shlq	$5, %rax
	movq	-48(%rbp), %rcx
	movl	(%rcx), %ecx
	imull	16(%r14,%rax), %ecx
	movl	%ecx, 16(%rbx)
	movl	28(%rbx), %edi
	movq	24(%r14,%rax), %rsi
	movq	_CARD_FILENAMELEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_memcpy
	movl	24(%rbx), %edi
	movq	8(%rbx), %rax
	shlq	$5, %rax
	movq	(%r14,%rax), %rsi
	movl	$4, %edx
	callq	_memcpy
	movl	20(%rbx), %edi
	movq	8(%rbx), %rax
	shlq	$5, %rax
	movq	8(%r14,%rax), %rsi
	movl	$2, %edx
	callq	_memcpy
	movq	-48(%rbp), %rdi
	movq	_CARD_ERROR_READY@GOTPCREL(%rip), %rbx
	jmp	LBB0_16
LBB0_2:
	movq	_CARD_ERROR_NOCARD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_17
LBB0_4:
	movq	_CARD_ERROR_NOFILE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_17
LBB0_15:
	movq	-48(%rbp), %rdi
	movq	_CARD_ERROR_NOFILE@GOTPCREL(%rip), %rbx
LBB0_16:
	movl	(%rbx), %esi
	callq	___card_putcntrlblock
	movl	(%rbx), %eax
LBB0_17:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EXI_CHANNEL_0,8,3              ## @EXI_CHANNEL_0
	.comm	_EXI_CHANNEL_2,8,3              ## @EXI_CHANNEL_2
	.comm	_CARD_ERROR_NOCARD,4,2          ## @CARD_ERROR_NOCARD
	.comm	_CARD_MAXFILES,8,3              ## @CARD_MAXFILES
	.comm	_CARD_ERROR_NOFILE,4,2          ## @CARD_ERROR_NOFILE
	.comm	_card_gamecode,4,2              ## @card_gamecode
	.comm	_card_company,4,2               ## @card_company
	.comm	_CARD_FILENAMELEN,4,2           ## @CARD_FILENAMELEN
	.comm	_CARD_ERROR_READY,4,2           ## @CARD_ERROR_READY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___card_findnext                ; -- Begin function __card_findnext
	.p2align	2
___card_findnext:                       ; @__card_findnext
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x0
	str	xzr, [sp, #8]
	ldr	x0, [x0]
Lloh0:
	adrp	x8, _EXI_CHANNEL_0@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EXI_CHANNEL_0@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _EXI_CHANNEL_2@GOTPAGE
Lloh4:
	ldr	x9, [x9, _EXI_CHANNEL_2@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x0, x8
	ccmp	x0, x9, #0, ge
	b.lt	LBB0_2
LBB0_1:
Lloh6:
	adrp	x8, _CARD_ERROR_NOCARD@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CARD_ERROR_NOCARD@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	b	LBB0_16
LBB0_2:
	ldr	x8, [x19, #8]
Lloh9:
	adrp	x21, _CARD_MAXFILES@GOTPAGE
Lloh10:
	ldr	x21, [x21, _CARD_MAXFILES@GOTPAGEOFF]
	ldr	x9, [x21]
	cmp	x8, x9
	b.hs	LBB0_13
; %bb.3:
	add	x1, sp, #8
	bl	___card_getcntrlblock
	tbnz	w0, #31, LBB0_16
; %bb.4:
	ldr	x0, [sp, #8]
	ldr	w8, [x0, #4]
	cbz	w8, LBB0_1
; %bb.5:
	bl	___card_getdirblock
	ldr	x20, [x0]
	ldr	x8, [x19, #8]
Lloh11:
	adrp	x22, _card_gamecode@GOTPAGE
Lloh12:
	ldr	x22, [x22, _card_gamecode@GOTPAGEOFF]
Lloh13:
	adrp	x23, _card_company@GOTPAGE
Lloh14:
	ldr	x23, [x23, _card_company@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x19, #8]
	add	x8, x8, #1
	str	x8, [x19, #8]
	ldr	x9, [x21]
	cmp	x8, x9
	b.hs	LBB0_14
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	lsl	x8, x8, #5
	ldr	x0, [x20, x8]
	ldr	w8, [x0]
	cmp	w8, #255
	b.eq	LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x19, #32]
	cbnz	x8, LBB0_12
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w1, [x22]
	mov	w2, #4
	bl	_memcmp
	cbnz	x0, LBB0_6
; %bb.10:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x19, #32]
	cbnz	x8, LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x19, #8]
	add	x8, x20, x8, lsl #5
	ldr	x0, [x8, #8]
	ldr	w1, [x23]
	mov	w2, #2
	bl	_memcmp
	cbnz	x0, LBB0_6
LBB0_12:
	ldr	x8, [x19, #8]
	add	x8, x20, x8, lsl #5
	ldr	w9, [x8, #16]
	ldr	x10, [sp, #8]
	ldr	w10, [x10]
	mul	w9, w10, w9
	str	w9, [x19, #16]
	ldr	w0, [x19, #28]
	ldr	x1, [x8, #24]
Lloh15:
	adrp	x8, _CARD_FILENAMELEN@GOTPAGE
Lloh16:
	ldr	x8, [x8, _CARD_FILENAMELEN@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	bl	_memcpy
	ldr	w0, [x19, #24]
	ldr	x8, [x19, #8]
	lsl	x8, x8, #5
	ldr	x1, [x20, x8]
	mov	w2, #4
	bl	_memcpy
	ldr	w0, [x19, #20]
	ldr	x8, [x19, #8]
	add	x8, x20, x8, lsl #5
	ldr	x1, [x8, #8]
	mov	w2, #2
	bl	_memcpy
	ldr	x0, [sp, #8]
Lloh18:
	adrp	x19, _CARD_ERROR_READY@GOTPAGE
Lloh19:
	ldr	x19, [x19, _CARD_ERROR_READY@GOTPAGEOFF]
	b	LBB0_15
LBB0_13:
Lloh20:
	adrp	x8, _CARD_ERROR_NOFILE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _CARD_ERROR_NOFILE@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
	b	LBB0_16
LBB0_14:
	ldr	x0, [sp, #8]
Lloh23:
	adrp	x19, _CARD_ERROR_NOFILE@GOTPAGE
Lloh24:
	ldr	x19, [x19, _CARD_ERROR_NOFILE@GOTPAGEOFF]
LBB0_15:
	ldr	w1, [x19]
	bl	___card_putcntrlblock
	ldr	w0, [x19]
LBB0_16:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_EXI_CHANNEL_0,8,3              ; @EXI_CHANNEL_0
	.comm	_EXI_CHANNEL_2,8,3              ; @EXI_CHANNEL_2
	.comm	_CARD_ERROR_NOCARD,4,2          ; @CARD_ERROR_NOCARD
	.comm	_CARD_MAXFILES,8,3              ; @CARD_MAXFILES
	.comm	_CARD_ERROR_NOFILE,4,2          ; @CARD_ERROR_NOFILE
	.comm	_card_gamecode,4,2              ; @card_gamecode
	.comm	_card_company,4,2               ; @card_company
	.comm	_CARD_FILENAMELEN,4,2           ; @CARD_FILENAMELEN
	.comm	_CARD_ERROR_READY,4,2           ; @CARD_ERROR_READY
.subsections_via_symbols
