	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __card_sectorerase
___card_sectorerase:                    ## @__card_sectorerase
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_EXI_CHANNEL_0@GOTPCREL(%rip), %rax
	cmpq	%rdi, (%rax)
	ja	LBB0_3
## %bb.1:
	movq	%rdi, %rbx
	movq	_EXI_CHANNEL_2@GOTPCREL(%rip), %rax
	cmpq	%rdi, (%rax)
	jbe	LBB0_3
## %bb.2:
	movl	%edx, %ecx
	movq	_cardmap@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	leaq	(%rbx,%rbx,4), %r12
	movl	%esi, %eax
	cltd
	idivl	(%r15,%r12,8)
	testl	%edx, %edx
	je	LBB0_6
LBB0_3:
	movq	_CARD_ERROR_FATAL_ERROR@GOTPCREL(%rip), %rax
LBB0_4:
	movq	(%rax), %r14
LBB0_5:
	movq	%r14, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	8(%r15,%r12,8), %rax
	movl	$241, (%rax)
	movl	%esi, %edx
	shrl	$17, %edx
	andl	$127, %edx
	movl	%edx, 4(%rax)
	shrl	$9, %esi
	movzbl	%sil, %edx
	movl	%edx, 8(%rax)
	movabsq	$-4294967293, %rax              ## imm = 0xFFFFFFFF00000003
	movq	%rax, 16(%r15,%r12,8)
	movl	$3, 24(%r15,%r12,8)
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	%ecx, %edx
	callq	___card_start
	movq	%rax, %r14
	movq	8(%r15,%r12,8), %rsi
	movl	16(%r15,%r12,8), %edx
	movq	_EXI_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	callq	_EXI_ImmEx
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movq	%rbx, %rdi
	callq	_EXI_Deselect
	movq	%rbx, %rdi
	callq	_EXI_Unlock
	jmp	LBB0_5
LBB0_8:
	movq	$0, 32(%r15,%r12,8)
	movq	_CARD_ERROR_NOCARD@GOTPCREL(%rip), %rax
	jmp	LBB0_4
	.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	_EXI_WRITE,4,2                  ## @EXI_WRITE
	.comm	_CARD_ERROR_NOCARD,8,3          ## @CARD_ERROR_NOCARD
	.no_dead_strip	___card_sectorerase
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function __card_sectorerase
lCPI0_0:
	.long	4294967279                      ; 0xffffffef
	.long	4294967287                      ; 0xfffffff7
lCPI0_1:
	.long	127                             ; 0x7f
	.long	255                             ; 0xff
lCPI0_2:
	.long	3                               ; 0x3
	.long	4294967295                      ; 0xffffffff
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
___card_sectorerase:                    ; @__card_sectorerase
	.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.ls	LBB0_2
; %bb.1:
	mov	x19, x0
Lloh6:
	adrp	x8, _cardmap@GOTPAGE
Lloh7:
	ldr	x8, [x8, _cardmap@GOTPAGEOFF]
Lloh8:
	ldr	x21, [x8]
	mov	w8, #40
	mul	x8, x0, x8
	ldr	w8, [x21, x8]
	sdiv	w9, w1, w8
	msub	w8, w9, w8, w1
	cbz	w8, LBB0_5
LBB0_2:
Lloh9:
	adrp	x8, _CARD_ERROR_FATAL_ERROR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CARD_ERROR_FATAL_ERROR@GOTPAGEOFF]
LBB0_3:
	ldr	x20, [x8]
LBB0_4:
	mov	x0, x20
	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
LBB0_5:
	mov	w8, #40
	madd	x22, x19, x8, x21
	ldr	x8, [x22, #8]
	mov	w9, #241
	str	w9, [x8]
	dup.2s	v0, w1
Lloh11:
	adrp	x9, lCPI0_0@PAGE
Lloh12:
	ldr	d1, [x9, lCPI0_0@PAGEOFF]
	ushl.2s	v0, v0, v1
Lloh13:
	adrp	x9, lCPI0_1@PAGE
Lloh14:
	ldr	d1, [x9, lCPI0_1@PAGEOFF]
	and.8b	v0, v0, v1
	stur	d0, [x8, #4]
Lloh15:
	adrp	x8, lCPI0_2@PAGE
Lloh16:
	ldr	d0, [x8, lCPI0_2@PAGEOFF]
	str	d0, [x22, #16]
	mov	w8, #3
	str	w8, [x22, #24]
	mov	x0, x19
	mov	x1, #0
	bl	___card_start
	mov	x20, x0
	ldr	x1, [x22, #8]
	ldr	w2, [x22, #16]
Lloh17:
	adrp	x8, _EXI_WRITE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EXI_WRITE@GOTPAGEOFF]
Lloh19:
	ldr	w3, [x8]
	mov	x0, x19
	bl	_EXI_ImmEx
	cbz	x0, LBB0_7
; %bb.6:
	mov	x0, x19
	bl	_EXI_Deselect
	mov	x0, x19
	bl	_EXI_Unlock
	b	LBB0_4
LBB0_7:
	mov	w8, #40
	madd	x8, x19, x8, x21
	str	xzr, [x8, #32]
Lloh20:
	adrp	x8, _CARD_ERROR_NOCARD@GOTPAGE
Lloh21:
	ldr	x8, [x8, _CARD_ERROR_NOCARD@GOTPAGEOFF]
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdr	Lloh15, Lloh16
	.loh AdrpLdr	Lloh13, Lloh14
	.loh AdrpAdrp	Lloh11, Lloh13
	.loh AdrpLdr	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh20, Lloh21
	.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	_EXI_WRITE,4,2                  ; @EXI_WRITE
	.comm	_CARD_ERROR_NOCARD,8,3          ; @CARD_ERROR_NOCARD
	.no_dead_strip	___card_sectorerase
.subsections_via_symbols
