	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sdgecko_doUnmount              ## -- Begin function sdgecko_doUnmount
	.p2align	4, 0x90
_sdgecko_doUnmount:                     ## @sdgecko_doUnmount
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_MAX_DRIVE@GOTPCREL(%rip), %rax
	cmpq	%rdi, (%rax)
	jbe	LBB0_10
## %bb.1:
	movq	%rdi, %rbx
	callq	___card_check
	movq	_TRUE@GOTPCREL(%rip), %r14
	cmpq	(%r14), %rax
	jne	LBB0_6
## %bb.2:
	movq	__ioFlag@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax,%rbx,8), %rax
	movq	_NOT_INITIALIZED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
LBB0_6:
	movq	_NOT_INITIALIZED@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	__ioFlag@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rax, (%rcx,%rbx,8)
LBB0_7:
	movq	__ioCardInserted@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax,%rbx,8), %rcx
	cmpq	(%r14), %rcx
	jne	LBB0_9
## %bb.8:
	movq	_FALSE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, (%rax,%rbx,8)
	movq	%rbx, %rdi
	callq	_EXI_Detach
LBB0_9:
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	__ioRetryCB                     ## TAILCALL
LBB0_10:
	movq	_CARDIO_ERROR_NOCARD@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_3:
	movq	%rbx, %rdi
	callq	___card_sendappcmd
	testq	%rax, %rax
	jne	LBB0_7
## %bb.4:
	movq	%rbx, %rdi
	movl	$42, %esi
	xorl	%edx, %edx
	callq	___card_sendcmd
	testq	%rax, %rax
	jne	LBB0_7
## %bb.5:
	movq	%rbx, %rdi
	callq	___card_response1
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_DRIVE,8,3                  ## @MAX_DRIVE
	.comm	_CARDIO_ERROR_NOCARD,8,3        ## @CARDIO_ERROR_NOCARD
	.comm	_TRUE,8,3                       ## @TRUE
	.comm	__ioFlag,8,3                    ## @_ioFlag
	.comm	_NOT_INITIALIZED,8,3            ## @NOT_INITIALIZED
	.comm	__ioCardInserted,8,3            ## @_ioCardInserted
	.comm	_FALSE,8,3                      ## @FALSE
	.comm	_CARDIO_ERROR_READY,8,3         ## @CARDIO_ERROR_READY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sdgecko_doUnmount              ; -- Begin function sdgecko_doUnmount
	.p2align	2
_sdgecko_doUnmount:                     ; @sdgecko_doUnmount
	.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, _MAX_DRIVE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX_DRIVE@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x0
	b.ls	LBB0_7
; %bb.1:
	mov	x19, x0
	bl	___card_check
Lloh3:
	adrp	x20, _TRUE@GOTPAGE
Lloh4:
	ldr	x20, [x20, _TRUE@GOTPAGEOFF]
	ldr	x8, [x20]
Lloh5:
	adrp	x21, __ioFlag@GOTPAGE
Lloh6:
	ldr	x21, [x21, __ioFlag@GOTPAGEOFF]
Lloh7:
	adrp	x22, _NOT_INITIALIZED@GOTPAGE
Lloh8:
	ldr	x22, [x22, _NOT_INITIALIZED@GOTPAGEOFF]
	cmp	x0, x8
	b.ne	LBB0_3
; %bb.2:
	ldr	x8, [x21]
	ldr	x8, [x8, x19, lsl #3]
	ldr	x9, [x22]
	cmp	x8, x9
	b.ne	LBB0_8
LBB0_3:
	ldr	x8, [x22]
	ldr	x9, [x21]
	str	x8, [x9, x19, lsl #3]
LBB0_4:
Lloh9:
	adrp	x8, __ioCardInserted@GOTPAGE
Lloh10:
	ldr	x8, [x8, __ioCardInserted@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	ldr	x9, [x8, x19, lsl #3]
	ldr	x10, [x20]
	cmp	x9, x10
	b.ne	LBB0_6
; %bb.5:
Lloh12:
	adrp	x9, _FALSE@GOTPAGE
Lloh13:
	ldr	x9, [x9, _FALSE@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	str	x9, [x8, x19, lsl #3]
	mov	x0, x19
	bl	_EXI_Detach
LBB0_6:
	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	__ioRetryCB
LBB0_7:
Lloh15:
	adrp	x8, _CARDIO_ERROR_NOCARD@GOTPAGE
Lloh16:
	ldr	x8, [x8, _CARDIO_ERROR_NOCARD@GOTPAGEOFF]
Lloh17:
	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
LBB0_8:
	mov	x0, x19
	bl	___card_sendappcmd
	cbnz	x0, LBB0_4
; %bb.9:
	mov	x0, x19
	mov	w1, #42
	mov	x2, #0
	bl	___card_sendcmd
	cbnz	x0, LBB0_4
; %bb.10:
	mov	x0, x19
	bl	___card_response1
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_DRIVE,8,3                  ; @MAX_DRIVE
	.comm	_CARDIO_ERROR_NOCARD,8,3        ; @CARDIO_ERROR_NOCARD
	.comm	_TRUE,8,3                       ; @TRUE
	.comm	__ioFlag,8,3                    ; @_ioFlag
	.comm	_NOT_INITIALIZED,8,3            ; @NOT_INITIALIZED
	.comm	__ioCardInserted,8,3            ; @_ioCardInserted
	.comm	_FALSE,8,3                      ; @FALSE
	.comm	_CARDIO_ERROR_READY,8,3         ; @CARDIO_ERROR_READY
.subsections_via_symbols
