	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mmc_submit_one
_mmc_submit_one:                        ## @mmc_submit_one
	.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	%rdx, %rbx
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	32(%rbp), %r12
	movq	16(%rbp), %rsi
	movl	%ecx, (%rdi)
	movl	%r8d, %eax
	cltd
	idivl	%r9d
	movl	%eax, 4(%rdi)
	movl	(%rsi), %ecx
	shll	$9, %ecx
	andl	$67108352, %ecx                 ## imm = 0x3FFFE00
	andl	$511, %eax                      ## imm = 0x1FF
	orl	(%rbx), %eax
	orl	%ecx, %eax
	movl	%eax, (%rbx)
	cmpl	$1, (%r12)
	jne	LBB0_2
## %bb.1:
	addl	%r8d, (%rsi)
LBB0_2:
	movq	8(%r12), %rsi
	movq	%r14, %rdi
	callq	_mmc_set_data_timeout
	movq	8(%r12), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	callq	_mmc_wait_for_req
	movl	4(%rbx), %ebx
	testl	%ebx, %ebx
	jne	LBB0_4
## %bb.3:
	movl	8(%r14), %ebx
LBB0_4:
	movq	_ENOMEDIUM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%ebx, %eax
	jne	LBB0_6
## %bb.5:
	movq	24(%rbp), %rdi
	movq	_BRCMF_SDIOD_NOMEDIUM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_brcmf_sdiod_change_state
	jmp	LBB0_9
LBB0_6:
	testl	%ebx, %ebx
	je	LBB0_7
## %bb.8:
	cmpl	$0, 40(%rbp)
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.1(%rip), %rsi
	cmoveq	%rax, %rsi
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %edx
	callq	_brcmf_err
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_9
LBB0_7:
	xorl	%ebx, %ebx
LBB0_9:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEDIUM,4,2                  ## @ENOMEDIUM
	.comm	_BRCMF_SDIOD_NOMEDIUM,4,2       ## @BRCMF_SDIOD_NOMEDIUM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"CMD53 sg block %s failed %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"write"

L_.str.2:                               ## @.str.2
	.asciz	"read"

	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_mmc_submit_one
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mmc_submit_one
_mmc_submit_one:                        ; @mmc_submit_one
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x7
	mov	x20, x2
	mov	x22, x1
	mov	x21, x0
	ldr	x23, [x29, #16]
	sdiv	w8, w4, w5
	stp	w3, w8, [x0]
	ldr	w9, [x6]
	ubfiz	w9, w9, #9, #17
	ldr	w10, [x2]
	and	w8, w8, #0x1ff
	orr	w8, w10, w8
	orr	w8, w8, w9
	str	w8, [x2]
	ldr	w8, [x23]
	cmp	w8, #1
	b.ne	LBB0_2
; %bb.1:
	ldr	w8, [x6]
	add	w8, w8, w4
	str	w8, [x6]
LBB0_2:
	ldr	x1, [x23, #8]
	mov	x0, x21
	bl	_mmc_set_data_timeout
	ldr	x8, [x23, #8]
	ldr	w0, [x8]
	mov	x1, x22
	bl	_mmc_wait_for_req
	ldr	w20, [x20, #4]
	cbnz	w20, LBB0_4
; %bb.3:
	ldr	w20, [x21, #8]
LBB0_4:
Lloh0:
	adrp	x8, _ENOMEDIUM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOMEDIUM@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmn	w20, w8
	b.ne	LBB0_6
; %bb.5:
Lloh3:
	adrp	x8, _BRCMF_SDIOD_NOMEDIUM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BRCMF_SDIOD_NOMEDIUM@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_brcmf_sdiod_change_state
	b	LBB0_8
LBB0_6:
	cbz	w20, LBB0_8
; %bb.7:
	ldr	w8, [x29, #24]
Lloh6:
	adrp	x9, l_.str.1@PAGE
Lloh7:
	add	x9, x9, l_.str.1@PAGEOFF
Lloh8:
	adrp	x10, l_.str.2@PAGE
Lloh9:
	add	x10, x10, l_.str.2@PAGEOFF
	cmp	w8, #0
	csel	x1, x10, x9, eq
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, x20
	bl	_brcmf_err
Lloh12:
	adrp	x8, _EIO@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_8:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEDIUM,4,2                  ; @ENOMEDIUM
	.comm	_BRCMF_SDIOD_NOMEDIUM,4,2       ; @BRCMF_SDIOD_NOMEDIUM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"CMD53 sg block %s failed %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"write"

l_.str.2:                               ; @.str.2
	.asciz	"read"

	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_mmc_submit_one
.subsections_via_symbols
