	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function toshsd_request
_toshsd_request:                        ## @toshsd_request
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	callq	_mmc_priv
	movq	%rax, %rbx
	movq	_SD_CARDSTATUS@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	16(%rbx), %rdi
	callq	_ioread16
	movq	_SD_CARD_PRESENT_0@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_4
## %bb.1:
	movq	%rbx, %rdi
	callq	_spin_lock_irqsave
	xorl	%edi, %edi
	cmpq	$0, 8(%rbx)
	setne	%dil
	callq	_WARN_ON
	movq	%r14, 8(%rbx)
	movl	8(%r14), %esi
	testl	%esi, %esi
	je	LBB0_3
## %bb.2:
	movq	%rbx, %rdi
	callq	_toshsd_start_data
LBB0_3:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_toshsd_set_led
	movq	(%r14), %rsi
	movq	%rbx, %rdi
	callq	_toshsd_start_cmd
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock_irqrestore         ## TAILCALL
LBB0_4:
	movq	_ENOMEDIUM@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
	movq	(%r14), %rax
	movl	%ecx, (%rax)
	movq	%r15, %rdi
	movq	%r14, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mmc_request_done               ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_SD_CARDSTATUS,8,3              ## @SD_CARDSTATUS
	.comm	_SD_CARD_PRESENT_0,4,2          ## @SD_CARD_PRESENT_0
	.comm	_ENOMEDIUM,4,2                  ## @ENOMEDIUM
	.no_dead_strip	_toshsd_request
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function toshsd_request
_toshsd_request:                        ; @toshsd_request
	.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
	mov	x19, x1
	mov	x21, x0
	bl	_mmc_priv
	mov	x20, x0
	ldr	x8, [x0, #16]
Lloh0:
	adrp	x9, _SD_CARDSTATUS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SD_CARDSTATUS@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_ioread16
Lloh3:
	adrp	x8, _SD_CARD_PRESENT_0@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SD_CARD_PRESENT_0@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_4
; %bb.1:
	mov	x0, x20
	bl	_spin_lock_irqsave
	ldr	x8, [x20, #8]
	cmp	x8, #0
	cset	w0, ne
	bl	_WARN_ON
	str	x19, [x20, #8]
	ldr	w1, [x19, #8]
	cbz	w1, LBB0_3
; %bb.2:
	mov	x0, x20
	bl	_toshsd_start_data
LBB0_3:
	mov	x0, x20
	mov	w1, #1
	bl	_toshsd_set_led
	ldr	x1, [x19]
	mov	x0, x20
	bl	_toshsd_start_cmd
	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
	b	_spin_unlock_irqrestore
LBB0_4:
Lloh6:
	adrp	x8, _ENOMEDIUM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEDIUM@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w8, w8
	ldr	x9, [x19]
	str	w8, [x9]
	mov	x0, x21
	mov	x1, 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	_mmc_request_done
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_SD_CARDSTATUS,8,3              ; @SD_CARDSTATUS
	.comm	_SD_CARD_PRESENT_0,4,2          ; @SD_CARD_PRESENT_0
	.comm	_ENOMEDIUM,4,2                  ; @ENOMEDIUM
	.no_dead_strip	_toshsd_request
.subsections_via_symbols
