	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function usdhi6_cmd_flags
_usdhi6_cmd_flags:                      ## @usdhi6_cmd_flags
	.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	%rdi, %r15
	movq	8(%rdi), %rax
	movq	16(%rax), %r14
	movl	(%r14), %edx
	cmpl	$0, (%rdi)
	movl	%edx, %ebx
	je	LBB0_2
## %bb.1:
	movl	$0, (%r15)
	movq	_USDHI6_SD_CMD_APP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	orl	%edx, %ebx
LBB0_2:
	movq	8(%rax), %rcx
	testq	%rcx, %rcx
	je	LBB0_20
## %bb.3:
	movslq	%edx, %rdx
	movq	_USDHI6_SD_CMD_DATA@GOTPCREL(%rip), %rsi
	orl	(%rsi), %ebx
	movq	_MMC_DATA_READ@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	andl	(%rcx), %esi
	je	LBB0_5
## %bb.4:
	movq	_USDHI6_SD_CMD_READ@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
LBB0_5:
	orl	%esi, %ebx
	movq	_MMC_READ_MULTIPLE_BLOCK@GOTPCREL(%rip), %rsi
	cmpq	%rdx, (%rsi)
	je	LBB0_9
## %bb.6:
	movq	_MMC_WRITE_MULTIPLE_BLOCK@GOTPCREL(%rip), %rsi
	cmpq	%rdx, (%rsi)
	je	LBB0_9
## %bb.7:
	movq	_SD_IO_RW_EXTENDED@GOTPCREL(%rip), %rsi
	cmpq	%rdx, (%rsi)
	jne	LBB0_11
## %bb.8:
	cmpl	$2, 4(%rcx)
	jl	LBB0_11
LBB0_9:
	movq	_USDHI6_SD_CMD_MULTI@GOTPCREL(%rip), %rcx
	orl	(%rcx), %ebx
	cmpl	$0, (%rax)
	jne	LBB0_11
## %bb.10:
	movq	_USDHI6_SD_CMD_CMD12_AUTO_OFF@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
LBB0_11:
	movq	%r14, %rdi
	callq	_mmc_resp_type
                                        ## kill: def $eax killed $eax def $rax
	addl	$-128, %eax
	cmpl	$4, %eax
	ja	LBB0_14
## %bb.12:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_13:
	movq	_USDHI6_SD_CMD_MODE_RSP_R3@GOTPCREL(%rip), %rax
	jmp	LBB0_19
LBB0_14:
	movl	4(%r15), %edi
	callq	_mmc_dev
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_mmc_resp_type
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edi
	movl	%eax, %edx
	callq	_dev_warn
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_20
LBB0_15:
	movq	_USDHI6_SD_CMD_MODE_RSP_R2@GOTPCREL(%rip), %rax
	jmp	LBB0_19
LBB0_16:
	movq	_USDHI6_SD_CMD_MODE_RSP_R1B@GOTPCREL(%rip), %rax
	jmp	LBB0_19
LBB0_17:
	movq	_USDHI6_SD_CMD_MODE_RSP_R1@GOTPCREL(%rip), %rax
	jmp	LBB0_19
LBB0_18:
	movq	_USDHI6_SD_CMD_MODE_RSP_NONE@GOTPCREL(%rip), %rax
LBB0_19:
	orl	(%rax), %ebx
LBB0_20:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_13, LBB0_13-LJTI0_0
.set L0_0_set_15, LBB0_15-LJTI0_0
.set L0_0_set_16, LBB0_16-LJTI0_0
.set L0_0_set_17, LBB0_17-LJTI0_0
.set L0_0_set_18, LBB0_18-LJTI0_0
LJTI0_0:
	.long	L0_0_set_13
	.long	L0_0_set_15
	.long	L0_0_set_16
	.long	L0_0_set_17
	.long	L0_0_set_18
	.end_data_region
                                        ## -- End function
	.comm	_USDHI6_SD_CMD_APP,4,2          ## @USDHI6_SD_CMD_APP
	.comm	_USDHI6_SD_CMD_DATA,4,2         ## @USDHI6_SD_CMD_DATA
	.comm	_MMC_DATA_READ,4,2              ## @MMC_DATA_READ
	.comm	_USDHI6_SD_CMD_READ,4,2         ## @USDHI6_SD_CMD_READ
	.comm	_MMC_READ_MULTIPLE_BLOCK,8,3    ## @MMC_READ_MULTIPLE_BLOCK
	.comm	_MMC_WRITE_MULTIPLE_BLOCK,8,3   ## @MMC_WRITE_MULTIPLE_BLOCK
	.comm	_SD_IO_RW_EXTENDED,8,3          ## @SD_IO_RW_EXTENDED
	.comm	_USDHI6_SD_CMD_MULTI,4,2        ## @USDHI6_SD_CMD_MULTI
	.comm	_USDHI6_SD_CMD_CMD12_AUTO_OFF,4,2 ## @USDHI6_SD_CMD_CMD12_AUTO_OFF
	.comm	_USDHI6_SD_CMD_MODE_RSP_NONE,4,2 ## @USDHI6_SD_CMD_MODE_RSP_NONE
	.comm	_USDHI6_SD_CMD_MODE_RSP_R1,4,2  ## @USDHI6_SD_CMD_MODE_RSP_R1
	.comm	_USDHI6_SD_CMD_MODE_RSP_R1B,4,2 ## @USDHI6_SD_CMD_MODE_RSP_R1B
	.comm	_USDHI6_SD_CMD_MODE_RSP_R2,4,2  ## @USDHI6_SD_CMD_MODE_RSP_R2
	.comm	_USDHI6_SD_CMD_MODE_RSP_R3,4,2  ## @USDHI6_SD_CMD_MODE_RSP_R3
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unknown response type %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_usdhi6_cmd_flags
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function usdhi6_cmd_flags
_usdhi6_cmd_flags:                      ; @usdhi6_cmd_flags
	.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, x0
	ldr	x8, [x0, #8]
	ldr	x19, [x8, #16]
	ldr	w10, [x19]
	ldr	w9, [x0]
	cbz	w9, LBB0_2
; %bb.1:
	str	wzr, [x20]
Lloh0:
	adrp	x9, _USDHI6_SD_CMD_APP@GOTPAGE
Lloh1:
	ldr	x9, [x9, _USDHI6_SD_CMD_APP@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	orr	w0, w9, w10
	ldr	x9, [x8, #8]
	cbnz	x9, LBB0_3
	b	LBB0_17
LBB0_2:
	mov	x0, x10
	ldr	x9, [x8, #8]
	cbz	x9, LBB0_17
LBB0_3:
	sxtw	x10, w10
Lloh3:
	adrp	x11, _USDHI6_SD_CMD_DATA@GOTPAGE
Lloh4:
	ldr	x11, [x11, _USDHI6_SD_CMD_DATA@GOTPAGEOFF]
Lloh5:
	ldr	w11, [x11]
	orr	w11, w11, w0
	ldr	w12, [x9]
Lloh6:
	adrp	x13, _MMC_DATA_READ@GOTPAGE
Lloh7:
	ldr	x13, [x13, _MMC_DATA_READ@GOTPAGEOFF]
Lloh8:
	ldr	w13, [x13]
Lloh9:
	adrp	x14, _USDHI6_SD_CMD_READ@GOTPAGE
Lloh10:
	ldr	x14, [x14, _USDHI6_SD_CMD_READ@GOTPAGEOFF]
Lloh11:
	ldr	w14, [x14]
	tst	w13, w12
	csel	w12, wzr, w14, eq
	orr	w21, w11, w12
Lloh12:
	adrp	x11, _MMC_READ_MULTIPLE_BLOCK@GOTPAGE
Lloh13:
	ldr	x11, [x11, _MMC_READ_MULTIPLE_BLOCK@GOTPAGEOFF]
Lloh14:
	ldr	x11, [x11]
Lloh15:
	adrp	x12, _MMC_WRITE_MULTIPLE_BLOCK@GOTPAGE
Lloh16:
	ldr	x12, [x12, _MMC_WRITE_MULTIPLE_BLOCK@GOTPAGEOFF]
Lloh17:
	ldr	x12, [x12]
	cmp	x11, x10
	ccmp	x12, x10, #4, ne
	b.eq	LBB0_6
; %bb.4:
Lloh18:
	adrp	x11, _SD_IO_RW_EXTENDED@GOTPAGE
Lloh19:
	ldr	x11, [x11, _SD_IO_RW_EXTENDED@GOTPAGEOFF]
Lloh20:
	ldr	x11, [x11]
	cmp	x11, x10
	b.ne	LBB0_8
; %bb.5:
	ldr	w9, [x9, #4]
	cmp	w9, #2
	b.lt	LBB0_8
LBB0_6:
Lloh21:
	adrp	x9, _USDHI6_SD_CMD_MULTI@GOTPAGE
Lloh22:
	ldr	x9, [x9, _USDHI6_SD_CMD_MULTI@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	orr	w21, w9, w21
	ldr	w8, [x8]
	cbnz	w8, LBB0_8
; %bb.7:
Lloh24:
	adrp	x8, _USDHI6_SD_CMD_CMD12_AUTO_OFF@GOTPAGE
Lloh25:
	ldr	x8, [x8, _USDHI6_SD_CMD_CMD12_AUTO_OFF@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	orr	w21, w8, w21
LBB0_8:
	mov	x0, x19
	bl	_mmc_resp_type
	sub	w8, w0, #128
	cmp	w8, #4
	b.hi	LBB0_11
; %bb.9:
Lloh27:
	adrp	x9, lJTI0_0@PAGE
Lloh28:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_10
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_10:
Lloh29:
	adrp	x8, _USDHI6_SD_CMD_MODE_RSP_R3@GOTPAGE
Lloh30:
	ldr	x8, [x8, _USDHI6_SD_CMD_MODE_RSP_R3@GOTPAGEOFF]
	b	LBB0_16
LBB0_11:
	ldr	w0, [x20, #4]
	bl	_mmc_dev
	mov	x20, x0
	mov	x0, x19
	bl	_mmc_resp_type
	mov	x2, x0
Lloh31:
	adrp	x1, l_.str@PAGE
Lloh32:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_warn
Lloh33:
	adrp	x8, _EINVAL@GOTPAGE
Lloh34:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_17
LBB0_12:
Lloh36:
	adrp	x8, _USDHI6_SD_CMD_MODE_RSP_R2@GOTPAGE
Lloh37:
	ldr	x8, [x8, _USDHI6_SD_CMD_MODE_RSP_R2@GOTPAGEOFF]
	b	LBB0_16
LBB0_13:
Lloh38:
	adrp	x8, _USDHI6_SD_CMD_MODE_RSP_R1B@GOTPAGE
Lloh39:
	ldr	x8, [x8, _USDHI6_SD_CMD_MODE_RSP_R1B@GOTPAGEOFF]
	b	LBB0_16
LBB0_14:
Lloh40:
	adrp	x8, _USDHI6_SD_CMD_MODE_RSP_R1@GOTPAGE
Lloh41:
	ldr	x8, [x8, _USDHI6_SD_CMD_MODE_RSP_R1@GOTPAGEOFF]
	b	LBB0_16
LBB0_15:
Lloh42:
	adrp	x8, _USDHI6_SD_CMD_MODE_RSP_NONE@GOTPAGE
Lloh43:
	ldr	x8, [x8, _USDHI6_SD_CMD_MODE_RSP_NONE@GOTPAGEOFF]
LBB0_16:
	ldr	w8, [x8]
	orr	w0, w8, w21
LBB0_17:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh36, Lloh37
	.loh AdrpLdrGot	Lloh38, Lloh39
	.loh AdrpLdrGot	Lloh40, Lloh41
	.loh AdrpLdrGot	Lloh42, Lloh43
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_10-LBB0_10)>>2
	.byte	(LBB0_12-LBB0_10)>>2
	.byte	(LBB0_13-LBB0_10)>>2
	.byte	(LBB0_14-LBB0_10)>>2
	.byte	(LBB0_15-LBB0_10)>>2
                                        ; -- End function
	.comm	_USDHI6_SD_CMD_APP,4,2          ; @USDHI6_SD_CMD_APP
	.comm	_USDHI6_SD_CMD_DATA,4,2         ; @USDHI6_SD_CMD_DATA
	.comm	_MMC_DATA_READ,4,2              ; @MMC_DATA_READ
	.comm	_USDHI6_SD_CMD_READ,4,2         ; @USDHI6_SD_CMD_READ
	.comm	_MMC_READ_MULTIPLE_BLOCK,8,3    ; @MMC_READ_MULTIPLE_BLOCK
	.comm	_MMC_WRITE_MULTIPLE_BLOCK,8,3   ; @MMC_WRITE_MULTIPLE_BLOCK
	.comm	_SD_IO_RW_EXTENDED,8,3          ; @SD_IO_RW_EXTENDED
	.comm	_USDHI6_SD_CMD_MULTI,4,2        ; @USDHI6_SD_CMD_MULTI
	.comm	_USDHI6_SD_CMD_CMD12_AUTO_OFF,4,2 ; @USDHI6_SD_CMD_CMD12_AUTO_OFF
	.comm	_USDHI6_SD_CMD_MODE_RSP_NONE,4,2 ; @USDHI6_SD_CMD_MODE_RSP_NONE
	.comm	_USDHI6_SD_CMD_MODE_RSP_R1,4,2  ; @USDHI6_SD_CMD_MODE_RSP_R1
	.comm	_USDHI6_SD_CMD_MODE_RSP_R1B,4,2 ; @USDHI6_SD_CMD_MODE_RSP_R1B
	.comm	_USDHI6_SD_CMD_MODE_RSP_R2,4,2  ; @USDHI6_SD_CMD_MODE_RSP_R2
	.comm	_USDHI6_SD_CMD_MODE_RSP_R3,4,2  ; @USDHI6_SD_CMD_MODE_RSP_R3
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unknown response type %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_usdhi6_cmd_flags
.subsections_via_symbols
