	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __card_updatefat
___card_updatefat:                      ## @__card_updatefat
	.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	_EXI_CHANNEL_0@GOTPCREL(%rip), %rax
	cmpq	%rdi, (%rax)
	ja	LBB0_2
## %bb.1:
	movq	%rdi, %r14
	movq	_EXI_CHANNEL_2@GOTPCREL(%rip), %rax
	cmpq	%rdi, (%rax)
	jbe	LBB0_2
## %bb.3:
	movq	_cardmap@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	leaq	(%r14,%r14,2), %r13
	cmpl	$0, 20(%r12,%r13,8)
	je	LBB0_4
## %bb.6:
	movl	%edx, %r15d
	movq	%rsi, %rbx
	incl	8(%rsi)
	leal	4(%rsi), %eax
	movslq	%eax, %rdi
	leaq	4(%rsi), %rdx
	movl	$8188, %esi                     ## imm = 0x1FFC
	movq	%rbx, %rcx
	callq	___card_checksum
	movq	%rbx, %rdi
	movl	$8192, %esi                     ## imm = 0x2000
	callq	_DCStoreRange
	movl	%r15d, 16(%r12,%r13,8)
	movl	8(%r12,%r13,8), %eax
	subl	%eax, %ebx
	sarl	$13, %ebx
	imull	(%r12,%r13,8), %ebx
	movq	___card_faterasecallback@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	%ebx, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	___card_sectorerase             ## TAILCALL
LBB0_2:
	movq	_CARD_ERROR_FATAL_ERROR@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_4:
	movq	_CARD_ERROR_NOCARD@GOTPCREL(%rip), %rax
LBB0_5:
	movq	(%rax), %rax
	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_FATAL_ERROR,8,3     ## @CARD_ERROR_FATAL_ERROR
	.comm	_cardmap,8,3                    ## @cardmap
	.comm	_CARD_ERROR_NOCARD,8,3          ## @CARD_ERROR_NOCARD
	.comm	___card_faterasecallback,4,2    ## @__card_faterasecallback
	.no_dead_strip	___card_updatefat
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __card_updatefat
___card_updatefat:                      ; @__card_updatefat
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
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	x8, x0
	ccmp	x9, x0, #0, ls
	b.hi	LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _CARD_ERROR_FATAL_ERROR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CARD_ERROR_FATAL_ERROR@GOTPAGEOFF]
	b	LBB0_5
LBB0_2:
	mov	x19, x0
Lloh8:
	adrp	x8, _cardmap@GOTPAGE
Lloh9:
	ldr	x8, [x8, _cardmap@GOTPAGEOFF]
Lloh10:
	ldr	x22, [x8]
	mov	w8, #24
	madd	x8, x0, x8, x22
	ldr	w8, [x8, #20]
	cbz	w8, LBB0_4
; %bb.3:
	mov	x21, x2
	mov	x20, x1
	ldr	w8, [x1, #8]
	add	w8, w8, #1
	str	w8, [x1, #8]
	add	w8, w20, #4
	sxtw	x0, w8
	add	x2, x1, #4
	mov	w1, #8188
	mov	x3, x20
	bl	___card_checksum
	mov	x0, x20
	mov	w1, #8192
	bl	_DCStoreRange
	mov	w8, #24
	madd	x8, x19, x8, x22
	str	w21, [x8, #16]
	ldr	w9, [x8, #8]
	sub	w9, w20, w9
	asr	w9, w9, #13
	ldr	w8, [x8]
	mul	w1, w9, w8
Lloh11:
	adrp	x8, ___card_faterasecallback@GOTPAGE
Lloh12:
	ldr	x8, [x8, ___card_faterasecallback@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	___card_sectorerase
LBB0_4:
Lloh14:
	adrp	x8, _CARD_ERROR_NOCARD@GOTPAGE
Lloh15:
	ldr	x8, [x8, _CARD_ERROR_NOCARD@GOTPAGEOFF]
LBB0_5:
	ldr	x0, [x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.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_FATAL_ERROR,8,3     ; @CARD_ERROR_FATAL_ERROR
	.comm	_cardmap,8,3                    ; @cardmap
	.comm	_CARD_ERROR_NOCARD,8,3          ; @CARD_ERROR_NOCARD
	.comm	___card_faterasecallback,4,2    ; @__card_faterasecallback
	.no_dead_strip	___card_updatefat
.subsections_via_symbols
