	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __card_seek
___card_seek:                           ## @__card_seek
	.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	%rcx, %r14
	movq	$0, -48(%rbp)
	movq	(%rdi), %rax
	movq	_CARD_MAXFILES@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jae	LBB0_1
## %bb.2:
	movq	%rdx, %r15
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movl	32(%rdi), %edi
	leaq	-48(%rbp), %rsi
	callq	___card_getcntrlblock
	testq	%rax, %rax
	js	LBB0_23
## %bb.3:
	movq	8(%rbx), %rax
	movq	_CARD_SYSAREA@GOTPCREL(%rip), %r13
	movq	-48(%rbp), %rdi
	cmpq	(%r13), %rax
	jl	LBB0_5
## %bb.4:
	cmpq	(%rdi), %rax
	jge	LBB0_5
## %bb.7:
	callq	___card_getdirblock
	movq	(%rax), %rax
	movq	(%rbx), %rcx
	leaq	(%rcx,%rcx,2), %rcx
	movq	(%rax,%rcx,8), %rdx
	cmpl	$255, (%rdx)
	jne	LBB0_8
LBB0_21:
	movq	_CARD_ERROR_READY@GOTPCREL(%rip), %rax
	jmp	LBB0_22
LBB0_1:
	movq	_CARD_ERROR_FATAL_ERROR@GOTPCREL(%rip), %rax
LBB0_22:
	movq	(%rax), %rax
	jmp	LBB0_23
LBB0_5:
	movq	_CARD_ERROR_FATAL_ERROR@GOTPCREL(%rip), %rbx
LBB0_6:
	movq	(%rbx), %rsi
	callq	___card_putcntrlblock
	movq	(%rbx), %rax
LBB0_23:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	-48(%rbp), %rdi
	movq	8(%rdi), %rdx
	imulq	8(%rax,%rcx,8), %rdx
	cmpq	%r15, %rdx
	jl	LBB0_10
## %bb.9:
	leaq	(%r15,%r12), %rsi
	cmpq	%rsi, %rdx
	jl	LBB0_10
## %bb.11:
	movq	%rbx, 16(%rdi)
	movq	%r12, 24(%rbx)
	cmpq	%r15, 16(%rbx)
	jle	LBB0_15
## %bb.12:
	movq	$0, 16(%rbx)
	movq	16(%rax,%rcx,8), %rax
	movq	%rax, 8(%rbx)
	cmpq	(%r13), %rax
	jl	LBB0_14
## %bb.13:
	cmpq	(%rdi), %rax
	jge	LBB0_14
LBB0_15:
	callq	___card_getbatblock
	movq	8(%rbx), %rcx
	movq	-48(%rbp), %rdi
	movq	(%rdi), %r9
	movq	(%r13), %r8
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	cmpq	%r9, %rcx
	jge	LBB0_20
## %bb.17:                              ##   in Loop: Header=BB0_16 Depth=1
	movq	16(%rbx), %r10
	movq	8(%rdi), %rsi
	movq	%rsi, %rdx
	negq	%rdx
	andq	%r15, %rdx
	cmpq	%rdx, %r10
	jge	LBB0_20
## %bb.18:                              ##   in Loop: Header=BB0_16 Depth=1
	addq	%r10, %rsi
	movq	%rsi, 16(%rbx)
	movq	(%rax), %rdx
	subq	%r8, %rcx
	movq	(%rdx,%rcx,8), %rcx
	movq	%rcx, 8(%rbx)
	cmpq	%r8, %rcx
	jl	LBB0_14
## %bb.19:                              ##   in Loop: Header=BB0_16 Depth=1
	cmpq	%r9, %rcx
	jl	LBB0_16
LBB0_14:
	movq	_CARD_ERROR_BROKEN@GOTPCREL(%rip), %rbx
	jmp	LBB0_6
LBB0_10:
	movq	_CARD_ERROR_LIMIT@GOTPCREL(%rip), %rbx
	jmp	LBB0_6
LBB0_20:
	movq	%r15, 16(%rbx)
	movq	%rdi, (%r14)
	jmp	LBB0_21
	.cfi_endproc
                                        ## -- End function
	.comm	_CARD_MAXFILES,8,3              ## @CARD_MAXFILES
	.comm	_CARD_ERROR_FATAL_ERROR,8,3     ## @CARD_ERROR_FATAL_ERROR
	.comm	_CARD_SYSAREA,8,3               ## @CARD_SYSAREA
	.comm	_CARD_ERROR_LIMIT,8,3           ## @CARD_ERROR_LIMIT
	.comm	_CARD_ERROR_BROKEN,8,3          ## @CARD_ERROR_BROKEN
	.comm	_CARD_ERROR_READY,8,3           ## @CARD_ERROR_READY
	.no_dead_strip	___card_seek
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __card_seek
___card_seek:                           ; @__card_seek
	.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
	str	xzr, [sp, #8]
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _CARD_MAXFILES@GOTPAGE
Lloh1:
	ldr	x9, [x9, _CARD_MAXFILES@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.hs	LBB0_6
; %bb.1:
	mov	x19, x3
	mov	x20, x2
	mov	x22, x1
	mov	x21, x0
	ldr	w0, [x0, #32]
	add	x1, sp, #8
	bl	___card_getcntrlblock
	tbnz	x0, #63, LBB0_10
; %bb.2:
	ldr	x8, [x21, #8]
Lloh3:
	adrp	x23, _CARD_SYSAREA@GOTPAGE
Lloh4:
	ldr	x23, [x23, _CARD_SYSAREA@GOTPAGEOFF]
	ldr	x9, [x23]
	ldr	x0, [sp, #8]
	cmp	x8, x9
	b.lt	LBB0_8
; %bb.3:
	ldr	x9, [x0]
	cmp	x8, x9
	b.ge	LBB0_8
; %bb.4:
	bl	___card_getdirblock
	ldr	x8, [x0]
	ldr	x9, [x21]
	mov	w10, #24
	mul	x10, x9, x10
	ldr	x10, [x8, x10]
	ldr	w10, [x10]
	cmp	w10, #255
	b.ne	LBB0_11
LBB0_5:
Lloh5:
	adrp	x8, _CARD_ERROR_READY@GOTPAGE
Lloh6:
	ldr	x8, [x8, _CARD_ERROR_READY@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh7:
	adrp	x8, _CARD_ERROR_FATAL_ERROR@GOTPAGE
Lloh8:
	ldr	x8, [x8, _CARD_ERROR_FATAL_ERROR@GOTPAGEOFF]
LBB0_7:
	ldr	x0, [x8]
	b	LBB0_10
LBB0_8:
Lloh9:
	adrp	x19, _CARD_ERROR_FATAL_ERROR@GOTPAGE
Lloh10:
	ldr	x19, [x19, _CARD_ERROR_FATAL_ERROR@GOTPAGEOFF]
LBB0_9:
	ldr	x1, [x19]
	bl	___card_putcntrlblock
	ldr	x0, [x19]
LBB0_10:
	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
LBB0_11:
	mov	w10, #24
	madd	x10, x9, x10, x8
	ldr	x10, [x10, #8]
	ldr	x0, [sp, #8]
	ldr	x11, [x0, #8]
	mul	x10, x11, x10
	add	x11, x20, x22
	cmp	x10, x20
	ccmp	x10, x11, #8, ge
	b.ge	LBB0_13
; %bb.12:
Lloh11:
	adrp	x19, _CARD_ERROR_LIMIT@GOTPAGE
Lloh12:
	ldr	x19, [x19, _CARD_ERROR_LIMIT@GOTPAGEOFF]
	b	LBB0_9
LBB0_13:
	str	x21, [x0, #16]
	str	x22, [x21, #24]
	ldr	x10, [x21, #16]
	cmp	x10, x20
	b.le	LBB0_16
; %bb.14:
	mov	w10, #24
	madd	x8, x9, x10, x8
	ldr	x8, [x8, #16]
	stp	x8, xzr, [x21, #8]
	ldr	x9, [x23]
	cmp	x8, x9
	b.lt	LBB0_20
; %bb.15:
	ldr	x9, [x0]
	cmp	x8, x9
	b.ge	LBB0_20
LBB0_16:
	bl	___card_getbatblock
	mov	x8, x0
	ldr	x9, [x21, #8]
	ldr	x0, [sp, #8]
	ldr	x10, [x0]
	ldr	x11, [x23]
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	cmp	x9, x10
	b.ge	LBB0_21
; %bb.18:                               ;   in Loop: Header=BB0_17 Depth=1
	ldr	x12, [x21, #16]
	ldr	x13, [x0, #8]
	neg	x14, x13
	and	x14, x14, x20
	cmp	x12, x14
	b.ge	LBB0_21
; %bb.19:                               ;   in Loop: Header=BB0_17 Depth=1
	add	x12, x13, x12
	str	x12, [x21, #16]
	ldr	x12, [x8]
	sub	x9, x9, x11
	ldr	x9, [x12, x9, lsl #3]
	str	x9, [x21, #8]
	cmp	x9, x11
	ccmp	x9, x10, #0, ge
	b.lt	LBB0_17
LBB0_20:
Lloh13:
	adrp	x19, _CARD_ERROR_BROKEN@GOTPAGE
Lloh14:
	ldr	x19, [x19, _CARD_ERROR_BROKEN@GOTPAGEOFF]
	b	LBB0_9
LBB0_21:
	str	x20, [x21, #16]
	str	x0, [x19]
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_CARD_MAXFILES,8,3              ; @CARD_MAXFILES
	.comm	_CARD_ERROR_FATAL_ERROR,8,3     ; @CARD_ERROR_FATAL_ERROR
	.comm	_CARD_SYSAREA,8,3               ; @CARD_SYSAREA
	.comm	_CARD_ERROR_LIMIT,8,3           ; @CARD_ERROR_LIMIT
	.comm	_CARD_ERROR_BROKEN,8,3          ; @CARD_ERROR_BROKEN
	.comm	_CARD_ERROR_READY,8,3           ; @CARD_ERROR_READY
	.no_dead_strip	___card_seek
.subsections_via_symbols
