	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function goldfish_mmc_start_command
_goldfish_mmc_start_command:            ## @goldfish_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	%rsi, 16(%rdi)
	movq	%rsi, %rdi
	callq	_mmc_resp_type
	addl	$-128, %eax
	cmpl	$5, %eax
	jae	LBB0_1
## %bb.2:
	cltq
	leaq	l_switch.table.goldfish_mmc_start_command(%rip), %rcx
	movl	(%rcx,%rax,4), %ebx
	jmp	LBB0_3
LBB0_1:
	movq	%r14, %rdi
	callq	_mmc_from_priv
	movl	%eax, %edi
	callq	_mmc_dev
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_mmc_resp_type
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edi
	movl	%eax, %edx
	callq	_dev_err
	xorl	%ebx, %ebx
LBB0_3:
	movq	%r15, %rdi
	callq	_mmc_cmd_type
	movq	_MMC_CMD_ADTC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.4:
	movq	_OMAP_MMC_CMDTYPE_ADTC@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_5:
	movq	%r15, %rdi
	callq	_mmc_cmd_type
	movq	_MMC_CMD_BC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.6:
	movq	_OMAP_MMC_CMDTYPE_BC@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_7:
	movq	%r15, %rdi
	callq	_mmc_cmd_type
	movq	_MMC_CMD_BCR@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.9:
	movq	_OMAP_MMC_CMDTYPE_BCR@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_8:
	movq	_OMAP_MMC_CMDTYPE_AC@GOTPCREL(%rip), %rax
LBB0_10:
	orl	(%r15), %ebx
	movl	(%rax), %eax
	shll	$12, %eax
	orl	%ebx, %eax
	movq	_MMC_BUSMODE_OPENDRAIN@GOTPCREL(%rip), %rcx
	movl	%eax, %edx
	orl	$64, %edx
	movq	(%r14), %rsi
	cmpq	(%rcx), %rsi
	cmovnel	%eax, %edx
	movq	_MMC_RSP_BUSY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%edx, %ebx
	orl	$2048, %ebx                     ## imm = 0x800
	testl	%eax, 4(%r15)
	movq	8(%r14), %rax
	cmovel	%edx, %ebx
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	movq	_MMC_DATA_WRITE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ebx, %edx
	orl	$32768, %edx                    ## imm = 0x8000
	testl	%ecx, (%rax)
	cmovel	%edx, %ebx
LBB0_12:
	movq	_MMC_ARG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	8(%r15), %edx
	movq	%r14, %rdi
	callq	_GOLDFISH_MMC_WRITE
	movq	_MMC_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_GOLDFISH_MMC_WRITE             ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid response type: %04x\n"

	.comm	_MMC_CMD_ADTC,8,3               ## @MMC_CMD_ADTC
	.comm	_OMAP_MMC_CMDTYPE_ADTC,4,2      ## @OMAP_MMC_CMDTYPE_ADTC
	.comm	_MMC_CMD_BC,8,3                 ## @MMC_CMD_BC
	.comm	_OMAP_MMC_CMDTYPE_BC,4,2        ## @OMAP_MMC_CMDTYPE_BC
	.comm	_MMC_CMD_BCR,8,3                ## @MMC_CMD_BCR
	.comm	_OMAP_MMC_CMDTYPE_BCR,4,2       ## @OMAP_MMC_CMDTYPE_BCR
	.comm	_OMAP_MMC_CMDTYPE_AC,4,2        ## @OMAP_MMC_CMDTYPE_AC
	.comm	_MMC_BUSMODE_OPENDRAIN,8,3      ## @MMC_BUSMODE_OPENDRAIN
	.comm	_MMC_RSP_BUSY,4,2               ## @MMC_RSP_BUSY
	.comm	_MMC_DATA_WRITE,4,2             ## @MMC_DATA_WRITE
	.comm	_MMC_ARG,4,2                    ## @MMC_ARG
	.comm	_MMC_CMD,4,2                    ## @MMC_CMD
	.no_dead_strip	_goldfish_mmc_start_command
	.section	__TEXT,__const
	.p2align	2                               ## @switch.table.goldfish_mmc_start_command
l_switch.table.goldfish_mmc_start_command:
	.long	768                             ## 0x300
	.long	512                             ## 0x200
	.long	256                             ## 0x100
	.long	256                             ## 0x100
	.long	0                               ## 0x0

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function goldfish_mmc_start_command
_goldfish_mmc_start_command:            ; @goldfish_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
	str	x1, [x0, #16]
	mov	x0, x1
	bl	_mmc_resp_type
	sub	w8, w0, #128
	cmp	w8, #5
	b.hs	LBB0_2
; %bb.1:
Lloh0:
	adrp	x9, l_switch.table.goldfish_mmc_start_command@PAGE
Lloh1:
	add	x9, x9, l_switch.table.goldfish_mmc_start_command@PAGEOFF
	ldr	w21, [x9, w8, sxtw #2]
	b	LBB0_3
LBB0_2:
	mov	x0, x19
	bl	_mmc_from_priv
	bl	_mmc_dev
	mov	x21, x0
	mov	x0, x20
	bl	_mmc_resp_type
	mov	x2, x0
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_dev_err
	mov	w21, #0
LBB0_3:
	mov	x0, x20
	bl	_mmc_cmd_type
Lloh4:
	adrp	x8, _MMC_CMD_ADTC@GOTPAGE
Lloh5:
	ldr	x8, [x8, _MMC_CMD_ADTC@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_5
; %bb.4:
Lloh7:
	adrp	x8, _OMAP_MMC_CMDTYPE_ADTC@GOTPAGE
Lloh8:
	ldr	x8, [x8, _OMAP_MMC_CMDTYPE_ADTC@GOTPAGEOFF]
	b	LBB0_8
LBB0_5:
	mov	x0, x20
	bl	_mmc_cmd_type
Lloh9:
	adrp	x8, _MMC_CMD_BC@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MMC_CMD_BC@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_7
; %bb.6:
Lloh12:
	adrp	x8, _OMAP_MMC_CMDTYPE_BC@GOTPAGE
Lloh13:
	ldr	x8, [x8, _OMAP_MMC_CMDTYPE_BC@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
	mov	x0, x20
	bl	_mmc_cmd_type
Lloh14:
	adrp	x8, _MMC_CMD_BCR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MMC_CMD_BCR@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
Lloh17:
	adrp	x9, _OMAP_MMC_CMDTYPE_AC@GOTPAGE
Lloh18:
	ldr	x9, [x9, _OMAP_MMC_CMDTYPE_AC@GOTPAGEOFF]
Lloh19:
	adrp	x10, _OMAP_MMC_CMDTYPE_BCR@GOTPAGE
Lloh20:
	ldr	x10, [x10, _OMAP_MMC_CMDTYPE_BCR@GOTPAGEOFF]
	cmp	x0, x8
	csel	x8, x10, x9, eq
LBB0_8:
Lloh21:
	adrp	x9, _MMC_BUSMODE_OPENDRAIN@GOTPAGE
Lloh22:
	ldr	x9, [x9, _MMC_BUSMODE_OPENDRAIN@GOTPAGEOFF]
Lloh23:
	ldr	x10, [x9]
	ldp	x11, x9, [x19]
	cmp	x11, x10
	ldp	w10, w11, [x20]
	orr	w10, w10, w21
	ldr	w8, [x8]
	orr	w8, w10, w8, lsl #12
	orr	w10, w8, #0x40
	csel	w8, w10, w8, eq
Lloh24:
	adrp	x10, _MMC_RSP_BUSY@GOTPAGE
Lloh25:
	ldr	x10, [x10, _MMC_RSP_BUSY@GOTPAGEOFF]
Lloh26:
	ldr	w10, [x10]
	tst	w10, w11
	orr	w10, w8, #0x800
	csel	w21, w8, w10, eq
	cbz	x9, LBB0_10
; %bb.9:
	ldr	w8, [x9]
Lloh27:
	adrp	x9, _MMC_DATA_WRITE@GOTPAGE
Lloh28:
	ldr	x9, [x9, _MMC_DATA_WRITE@GOTPAGEOFF]
Lloh29:
	ldr	w9, [x9]
	orr	w10, w21, #0x8000
	tst	w9, w8
	csel	w21, w10, w21, eq
LBB0_10:
Lloh30:
	adrp	x8, _MMC_ARG@GOTPAGE
Lloh31:
	ldr	x8, [x8, _MMC_ARG@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x8]
	ldr	w2, [x20, #8]
	mov	x0, x19
	bl	_GOLDFISH_MMC_WRITE
Lloh33:
	adrp	x8, _MMC_CMD@GOTPAGE
Lloh34:
	ldr	x8, [x8, _MMC_CMD@GOTPAGEOFF]
Lloh35:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x21
	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	_GOLDFISH_MMC_WRITE
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid response type: %04x\n"

	.comm	_MMC_CMD_ADTC,8,3               ; @MMC_CMD_ADTC
	.comm	_OMAP_MMC_CMDTYPE_ADTC,4,2      ; @OMAP_MMC_CMDTYPE_ADTC
	.comm	_MMC_CMD_BC,8,3                 ; @MMC_CMD_BC
	.comm	_OMAP_MMC_CMDTYPE_BC,4,2        ; @OMAP_MMC_CMDTYPE_BC
	.comm	_MMC_CMD_BCR,8,3                ; @MMC_CMD_BCR
	.comm	_OMAP_MMC_CMDTYPE_BCR,4,2       ; @OMAP_MMC_CMDTYPE_BCR
	.comm	_OMAP_MMC_CMDTYPE_AC,4,2        ; @OMAP_MMC_CMDTYPE_AC
	.comm	_MMC_BUSMODE_OPENDRAIN,8,3      ; @MMC_BUSMODE_OPENDRAIN
	.comm	_MMC_RSP_BUSY,4,2               ; @MMC_RSP_BUSY
	.comm	_MMC_DATA_WRITE,4,2             ; @MMC_DATA_WRITE
	.comm	_MMC_ARG,4,2                    ; @MMC_ARG
	.comm	_MMC_CMD,4,2                    ; @MMC_CMD
	.no_dead_strip	_goldfish_mmc_start_command
	.section	__TEXT,__const
	.p2align	2                               ; @switch.table.goldfish_mmc_start_command
l_switch.table.goldfish_mmc_start_command:
	.long	768                             ; 0x300
	.long	512                             ; 0x200
	.long	256                             ; 0x100
	.long	256                             ; 0x100
	.long	0                               ; 0x0

.subsections_via_symbols
