	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function usdhi6_set_ios
_usdhi6_set_ios:                        ## @usdhi6_set_ios
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r15
	callq	_mmc_priv
	movq	%rax, %r14
	movq	%r15, %rdi
	callq	_mmc_dev
	movq	(%rbx), %rdx
	movl	20(%rbx), %ecx
	movl	8(%rbx), %r8d
	movl	16(%rbx), %r9d
	movl	12(%rbx), %esi
	movl	%esi, (%rsp)
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	callq	_dev_dbg
	movl	8(%rbx), %eax
	cmpl	$128, %eax
	je	LBB0_4
## %bb.1:
	cmpl	$129, %eax
	je	LBB0_6
## %bb.2:
	cmpl	$130, %eax
	je	LBB0_3
	jmp	LBB0_12
LBB0_4:
	movq	%r14, %rdi
	callq	_usdhi6_reset
	testl	%eax, %eax
	js	LBB0_5
LBB0_3:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_usdhi6_set_power
	movq	%r14, %rdi
	callq	_usdhi6_only_cd
	jmp	LBB0_12
LBB0_6:
	movq	_USDHI6_SD_OPTION@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%r14, %rdi
	callq	_usdhi6_read
	movl	%eax, %r12d
	movl	16(%rbx), %eax
	movq	_MMC_BUS_WIDTH_1@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_10
## %bb.7:
	movl	12(%rbx), %eax
	movq	_MMC_TIMING_UHS_DDR50@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_9
## %bb.8:
	movq	%r15, %rdi
	callq	_mmc_dev
	leaq	L_.str.2(%rip), %rsi
	movl	%eax, %edi
	callq	_dev_err
LBB0_9:
	movq	_USDHI6_SD_OPTION_WIDTH_1@GOTPCREL(%rip), %rax
	orl	(%rax), %r12d
	xorl	%r15d, %r15d
	jmp	LBB0_11
LBB0_10:
	movq	_USDHI6_SD_OPTION_WIDTH_1@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, %r12d
	movl	12(%rbx), %eax
	movq	_MMC_TIMING_UHS_DDR50@GOTPCREL(%rip), %rcx
	xorl	%r15d, %r15d
	cmpl	(%rcx), %eax
	sete	%r15b
LBB0_11:
	movl	(%r13), %esi
	movq	%r14, %rdi
	movl	%r12d, %edx
	callq	_usdhi6_write
	movq	_USDHI6_SDIF_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%r15d, %edx
	callq	_usdhi6_write
	jmp	LBB0_12
LBB0_5:
	movq	%r15, %rdi
	callq	_mmc_dev
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edi
	callq	_dev_err
LBB0_12:
	movq	(%r14), %rax
	cmpq	(%rbx), %rax
	jne	LBB0_14
## %bb.13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_usdhi6_clk_set                 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%uHz, OCR: %u, power %u, bus-width %u, timing %u\n"

L_.str.1:                               ## @.str.1
	.asciz	"Cannot reset the interface!\n"

	.comm	_USDHI6_SD_OPTION,4,2           ## @USDHI6_SD_OPTION
	.comm	_MMC_BUS_WIDTH_1,4,2            ## @MMC_BUS_WIDTH_1
	.comm	_MMC_TIMING_UHS_DDR50,4,2       ## @MMC_TIMING_UHS_DDR50
L_.str.2:                               ## @.str.2
	.asciz	"4 bits are required for DDR\n"

	.comm	_USDHI6_SD_OPTION_WIDTH_1,4,2   ## @USDHI6_SD_OPTION_WIDTH_1
	.comm	_USDHI6_SDIF_MODE,4,2           ## @USDHI6_SDIF_MODE
	.no_dead_strip	_usdhi6_set_ios
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function usdhi6_set_ios
_usdhi6_set_ios:                        ; @usdhi6_set_ios
	.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, x1
	mov	x21, x0
	bl	_mmc_priv
	mov	x20, x0
	mov	x0, x21
	bl	_mmc_dev
	ldr	x2, [x19]
	ldp	w5, w3, [x19, #16]
	ldp	w4, w6, [x19, #8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
	ldr	w8, [x19, #8]
	cmp	w8, #128
	b.eq	LBB0_3
; %bb.1:
	cmp	w8, #129
	b.eq	LBB0_5
; %bb.2:
	cmp	w8, #130
	b.eq	LBB0_4
	b	LBB0_12
LBB0_3:
	mov	x0, x20
	bl	_usdhi6_reset
	tbnz	w0, #31, LBB0_11
LBB0_4:
	mov	x0, x20
	mov	x1, x19
	bl	_usdhi6_set_power
	mov	x0, x20
	bl	_usdhi6_only_cd
	b	LBB0_12
LBB0_5:
Lloh2:
	adrp	x23, _USDHI6_SD_OPTION@GOTPAGE
Lloh3:
	ldr	x23, [x23, _USDHI6_SD_OPTION@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x20
	bl	_usdhi6_read
	mov	x22, x0
	ldr	w8, [x19, #16]
Lloh4:
	adrp	x9, _MMC_BUS_WIDTH_1@GOTPAGE
Lloh5:
	ldr	x9, [x9, _MMC_BUS_WIDTH_1@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_9
; %bb.6:
	ldr	w8, [x19, #12]
Lloh7:
	adrp	x9, _MMC_TIMING_UHS_DDR50@GOTPAGE
Lloh8:
	ldr	x9, [x9, _MMC_TIMING_UHS_DDR50@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_8
; %bb.7:
	mov	x0, x21
	bl	_mmc_dev
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
LBB0_8:
	mov	w21, #0
Lloh12:
	adrp	x8, _USDHI6_SD_OPTION_WIDTH_1@GOTPAGE
Lloh13:
	ldr	x8, [x8, _USDHI6_SD_OPTION_WIDTH_1@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	orr	w2, w8, w22
	b	LBB0_10
LBB0_9:
Lloh15:
	adrp	x8, _USDHI6_SD_OPTION_WIDTH_1@GOTPAGE
Lloh16:
	ldr	x8, [x8, _USDHI6_SD_OPTION_WIDTH_1@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	bic	w2, w22, w8
	ldr	w8, [x19, #12]
Lloh18:
	adrp	x9, _MMC_TIMING_UHS_DDR50@GOTPAGE
Lloh19:
	ldr	x9, [x9, _MMC_TIMING_UHS_DDR50@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	cmp	w8, w9
	cset	w21, eq
LBB0_10:
	ldr	w1, [x23]
	mov	x0, x20
	bl	_usdhi6_write
Lloh21:
	adrp	x8, _USDHI6_SDIF_MODE@GOTPAGE
Lloh22:
	ldr	x8, [x8, _USDHI6_SDIF_MODE@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, x21
	bl	_usdhi6_write
	b	LBB0_12
LBB0_11:
	mov	x0, x21
	bl	_mmc_dev
Lloh24:
	adrp	x1, l_.str.1@PAGE
Lloh25:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
LBB0_12:
	ldr	x8, [x20]
	ldr	x9, [x19]
	cmp	x8, x9
	b.ne	LBB0_14
; %bb.13:
	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
LBB0_14:
	mov	x0, x20
	mov	x1, x19
	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
	b	_usdhi6_clk_set
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%uHz, OCR: %u, power %u, bus-width %u, timing %u\n"

l_.str.1:                               ; @.str.1
	.asciz	"Cannot reset the interface!\n"

	.comm	_USDHI6_SD_OPTION,4,2           ; @USDHI6_SD_OPTION
	.comm	_MMC_BUS_WIDTH_1,4,2            ; @MMC_BUS_WIDTH_1
	.comm	_MMC_TIMING_UHS_DDR50,4,2       ; @MMC_TIMING_UHS_DDR50
l_.str.2:                               ; @.str.2
	.asciz	"4 bits are required for DDR\n"

	.comm	_USDHI6_SD_OPTION_WIDTH_1,4,2   ; @USDHI6_SD_OPTION_WIDTH_1
	.comm	_USDHI6_SDIF_MODE,4,2           ; @USDHI6_SDIF_MODE
	.no_dead_strip	_usdhi6_set_ios
.subsections_via_symbols
