	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tmio_mmc_start_command
_tmio_mmc_start_command:                ## @tmio_mmc_start_command
	.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	%rsi, %rbx
	movq	%rdi, %r15
	movq	24(%rdi), %r12
	movl	(%rsi), %r14d
	movq	%rsi, %rdi
	callq	_mmc_resp_type
	addl	$-128, %eax
	cmpl	$6, %eax
	jae	LBB0_1
## %bb.2:
	cltq
	leaq	l_switch.table.tmio_mmc_start_command(%rip), %rcx
	movq	(%rcx,%rax,8), %rax
	orl	(%rax), %r14d
	movq	%rbx, 16(%r15)
	testq	%r12, %r12
	je	LBB0_10
## %bb.3:
	movq	_DATA_PRESENT@GOTPCREL(%rip), %rax
	orl	(%rax), %r14d
	cmpl	$2, (%r12)
	jl	LBB0_8
## %bb.4:
	movq	_CTL_STOP_INTERNAL_ACTION@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_TMIO_STOP_SEC@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_sd_ctrl_write16
	movq	_TRANSFER_MULTI@GOTPCREL(%rip), %rax
	orl	(%rax), %r14d
	movq	8(%r15), %rax
	movq	_TMIO_MMC_HAVE_CMD12_CTRL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_8
## %bb.5:
	movl	(%rbx), %eax
	movq	_SD_IO_RW_EXTENDED@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_7
## %bb.6:
	movq	(%r15), %rax
	cmpq	$0, (%rax)
	je	LBB0_8
LBB0_7:
	movq	_NO_CMD12_ISSUE@GOTPCREL(%rip), %rax
	orl	(%rax), %r14d
LBB0_8:
	movq	_MMC_DATA_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%r12)
	je	LBB0_10
## %bb.9:
	movq	_TRANSFER_READ@GOTPCREL(%rip), %rax
	orl	(%rax), %r14d
LBB0_10:
	movq	_TMIO_MASK_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_tmio_mmc_enable_mmc_irqs
	movq	_CTL_ARG_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	4(%rbx), %edx
	movq	%r15, %rdi
	callq	_sd_ctrl_write32_as_16_and_16
	movq	_CTL_SD_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	%r14d, %edx
	callq	_sd_ctrl_write16
	xorl	%eax, %eax
	jmp	LBB0_11
LBB0_1:
	movq	%rbx, %rdi
	callq	_mmc_resp_type
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_pr_debug
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_11:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RESP_NONE,4,2                  ## @RESP_NONE
	.comm	_RESP_R1,4,2                    ## @RESP_R1
	.comm	_RESP_R1B,4,2                   ## @RESP_R1B
	.comm	_RESP_R2,4,2                    ## @RESP_R2
	.comm	_RESP_R3,4,2                    ## @RESP_R3
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unknown response type %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_DATA_PRESENT,4,2               ## @DATA_PRESENT
	.comm	_CTL_STOP_INTERNAL_ACTION,4,2   ## @CTL_STOP_INTERNAL_ACTION
	.comm	_TMIO_STOP_SEC,4,2              ## @TMIO_STOP_SEC
	.comm	_TRANSFER_MULTI,4,2             ## @TRANSFER_MULTI
	.comm	_TMIO_MMC_HAVE_CMD12_CTRL,4,2   ## @TMIO_MMC_HAVE_CMD12_CTRL
	.comm	_SD_IO_RW_EXTENDED,4,2          ## @SD_IO_RW_EXTENDED
	.comm	_NO_CMD12_ISSUE,4,2             ## @NO_CMD12_ISSUE
	.comm	_MMC_DATA_READ,4,2              ## @MMC_DATA_READ
	.comm	_TRANSFER_READ,4,2              ## @TRANSFER_READ
	.comm	_TMIO_MASK_CMD,4,2              ## @TMIO_MASK_CMD
	.comm	_CTL_ARG_REG,4,2                ## @CTL_ARG_REG
	.comm	_CTL_SD_CMD,4,2                 ## @CTL_SD_CMD
	.no_dead_strip	_tmio_mmc_start_command
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.tmio_mmc_start_command
l_switch.table.tmio_mmc_start_command:
	.quad	_RESP_R3
	.quad	_RESP_R2
	.quad	_RESP_R1
	.quad	_RESP_R1B
	.quad	_RESP_R1
	.quad	_RESP_NONE

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tmio_mmc_start_command
_tmio_mmc_start_command:                ; @tmio_mmc_start_command
	.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	x20, x1
	mov	x19, x0
	ldr	x22, [x0, #24]
	ldr	w21, [x1]
	mov	x0, x1
	bl	_mmc_resp_type
	sub	w8, w0, #128
	cmp	w8, #6
	b.hs	LBB0_10
; %bb.1:
Lloh0:
	adrp	x9, l_switch.table.tmio_mmc_start_command@PAGE
Lloh1:
	add	x9, x9, l_switch.table.tmio_mmc_start_command@PAGEOFF
	ldr	x8, [x9, w8, sxtw #3]
	ldr	w8, [x8]
	orr	w21, w8, w21
	str	x20, [x19, #16]
	cbz	x22, LBB0_9
; %bb.2:
Lloh2:
	adrp	x8, _DATA_PRESENT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _DATA_PRESENT@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	orr	w21, w8, w21
	ldr	w8, [x22]
	cmp	w8, #2
	b.lt	LBB0_7
; %bb.3:
Lloh5:
	adrp	x8, _CTL_STOP_INTERNAL_ACTION@GOTPAGE
Lloh6:
	ldr	x8, [x8, _CTL_STOP_INTERNAL_ACTION@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	adrp	x8, _TMIO_STOP_SEC@GOTPAGE
Lloh9:
	ldr	x8, [x8, _TMIO_STOP_SEC@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_sd_ctrl_write16
Lloh11:
	adrp	x8, _TRANSFER_MULTI@GOTPAGE
Lloh12:
	ldr	x8, [x8, _TRANSFER_MULTI@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	orr	w21, w8, w21
	ldr	x8, [x19, #8]
	ldr	w8, [x8]
Lloh14:
	adrp	x9, _TMIO_MMC_HAVE_CMD12_CTRL@GOTPAGE
Lloh15:
	ldr	x9, [x9, _TMIO_MMC_HAVE_CMD12_CTRL@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.4:
	ldr	w8, [x20]
Lloh17:
	adrp	x9, _SD_IO_RW_EXTENDED@GOTPAGE
Lloh18:
	ldr	x9, [x9, _SD_IO_RW_EXTENDED@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	cmp	w8, w9
	b.eq	LBB0_6
; %bb.5:
	ldr	x8, [x19]
	ldr	x8, [x8]
	cbz	x8, LBB0_7
LBB0_6:
Lloh20:
	adrp	x8, _NO_CMD12_ISSUE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _NO_CMD12_ISSUE@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	orr	w21, w8, w21
LBB0_7:
	ldr	w8, [x22, #4]
Lloh23:
	adrp	x9, _MMC_DATA_READ@GOTPAGE
Lloh24:
	ldr	x9, [x9, _MMC_DATA_READ@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.8:
Lloh26:
	adrp	x8, _TRANSFER_READ@GOTPAGE
Lloh27:
	ldr	x8, [x8, _TRANSFER_READ@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	orr	w21, w8, w21
LBB0_9:
Lloh29:
	adrp	x8, _TMIO_MASK_CMD@GOTPAGE
Lloh30:
	ldr	x8, [x8, _TMIO_MASK_CMD@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_tmio_mmc_enable_mmc_irqs
Lloh32:
	adrp	x8, _CTL_ARG_REG@GOTPAGE
Lloh33:
	ldr	x8, [x8, _CTL_ARG_REG@GOTPAGEOFF]
Lloh34:
	ldr	w1, [x8]
	ldr	w2, [x20, #4]
	mov	x0, x19
	bl	_sd_ctrl_write32_as_16_and_16
Lloh35:
	adrp	x8, _CTL_SD_CMD@GOTPAGE
Lloh36:
	ldr	x8, [x8, _CTL_SD_CMD@GOTPAGEOFF]
Lloh37:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x21
	bl	_sd_ctrl_write16
	mov	w0, #0
	b	LBB0_11
LBB0_10:
	mov	x0, x20
	bl	_mmc_resp_type
	mov	x1, x0
Lloh38:
	adrp	x0, l_.str@PAGE
Lloh39:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_debug
Lloh40:
	adrp	x8, _EINVAL@GOTPAGE
Lloh41:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh42:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_11:
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpAdd	Lloh38, Lloh39
	.cfi_endproc
                                        ; -- End function
	.comm	_RESP_NONE,4,2                  ; @RESP_NONE
	.comm	_RESP_R1,4,2                    ; @RESP_R1
	.comm	_RESP_R1B,4,2                   ; @RESP_R1B
	.comm	_RESP_R2,4,2                    ; @RESP_R2
	.comm	_RESP_R3,4,2                    ; @RESP_R3
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unknown response type %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_DATA_PRESENT,4,2               ; @DATA_PRESENT
	.comm	_CTL_STOP_INTERNAL_ACTION,4,2   ; @CTL_STOP_INTERNAL_ACTION
	.comm	_TMIO_STOP_SEC,4,2              ; @TMIO_STOP_SEC
	.comm	_TRANSFER_MULTI,4,2             ; @TRANSFER_MULTI
	.comm	_TMIO_MMC_HAVE_CMD12_CTRL,4,2   ; @TMIO_MMC_HAVE_CMD12_CTRL
	.comm	_SD_IO_RW_EXTENDED,4,2          ; @SD_IO_RW_EXTENDED
	.comm	_NO_CMD12_ISSUE,4,2             ; @NO_CMD12_ISSUE
	.comm	_MMC_DATA_READ,4,2              ; @MMC_DATA_READ
	.comm	_TRANSFER_READ,4,2              ; @TRANSFER_READ
	.comm	_TMIO_MASK_CMD,4,2              ; @TMIO_MASK_CMD
	.comm	_CTL_ARG_REG,4,2                ; @CTL_ARG_REG
	.comm	_CTL_SD_CMD,4,2                 ; @CTL_SD_CMD
	.no_dead_strip	_tmio_mmc_start_command
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.tmio_mmc_start_command
l_switch.table.tmio_mmc_start_command:
	.quad	_RESP_R3
	.quad	_RESP_R2
	.quad	_RESP_R1
	.quad	_RESP_R1B
	.quad	_RESP_R1
	.quad	_RESP_NONE

.subsections_via_symbols
