	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sdhci_o2_execute_tuning
_sdhci_o2_execute_tuning:               ## @sdhci_o2_execute_tuning
	.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
	movl	%esi, %r15d
	movq	%rdi, %r14
	callq	_mmc_priv
	movq	%rax, %rbx
	movq	(%rax), %rax
	movq	_MMC_TIMING_MMC_HS200@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_12
## %bb.1:
	movq	_MMC_SEND_TUNING_BLOCK_HS200@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpl	%r15d, (%rax)
	setne	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_3
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_11
LBB0_12:
	movq	%r14, %rdi
	movl	%r15d, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_sdhci_execute_tuning           ## TAILCALL
LBB0_3:
	movq	%rbx, %rdi
	callq	_sdhci_o2_wait_dll_detect_lock
	testl	%eax, %eax
	jne	LBB0_6
## %bb.4:
	movq	%rbx, %rdi
	callq	_sdhci_o2_dll_recovery
	testl	%eax, %eax
	je	LBB0_5
LBB0_6:
	movl	(%r14), %r13d
	movq	_MMC_BUS_WIDTH_8@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	cmpl	(%rax), %r13d
	jne	LBB0_8
## %bb.7:
	movq	_MMC_BUS_WIDTH_4@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%ecx, (%r14)
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_sdhci_set_bus_width
	movl	%r13d, %r12d
LBB0_8:
	movq	%rbx, %rdi
	callq	_sdhci_o2_set_tuning_mode
	movq	%rbx, %rdi
	callq	_sdhci_start_tuning
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	___sdhci_o2_execute_tuning
	movq	%rbx, %rdi
	callq	_sdhci_end_tuning
	movq	_MMC_BUS_WIDTH_8@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r12d
	jne	LBB0_10
## %bb.9:
	movl	%r12d, (%r14)
	movq	%rbx, %rdi
	movl	%r12d, %esi
	callq	_sdhci_set_bus_width
LBB0_10:
	movq	_SDHCI_HS400_TUNING@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, 8(%rbx)
	xorl	%eax, %eax
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movl	12(%rbx), %edi
	callq	_mmc_hostname
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_pr_err
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.comm	_MMC_TIMING_MMC_HS200,8,3       ## @MMC_TIMING_MMC_HS200
	.comm	_MMC_SEND_TUNING_BLOCK_HS200,4,2 ## @MMC_SEND_TUNING_BLOCK_HS200
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: o2 dll recovery failed\n"

	.comm	_MMC_BUS_WIDTH_8,4,2            ## @MMC_BUS_WIDTH_8
	.comm	_MMC_BUS_WIDTH_4,4,2            ## @MMC_BUS_WIDTH_4
	.comm	_SDHCI_HS400_TUNING,4,2         ## @SDHCI_HS400_TUNING
	.no_dead_strip	_sdhci_o2_execute_tuning
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sdhci_o2_execute_tuning
_sdhci_o2_execute_tuning:               ; @sdhci_o2_execute_tuning
	.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	x21, x1
	mov	x20, x0
	bl	_mmc_priv
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _MMC_TIMING_MMC_HS200@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MMC_TIMING_MMC_HS200@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.1:
	mov	x19, x0
Lloh3:
	adrp	x8, _MMC_SEND_TUNING_BLOCK_HS200@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MMC_SEND_TUNING_BLOCK_HS200@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w8, w21
	cset	w0, ne
	bl	_WARN_ON
	cbz	x0, LBB0_4
LBB0_2:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_12
LBB0_3:
	mov	x0, x20
	mov	x1, x21
	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	_sdhci_execute_tuning
LBB0_4:
	mov	x0, x19
	bl	_sdhci_o2_wait_dll_detect_lock
	cbnz	w0, LBB0_6
; %bb.5:
	mov	x0, x19
	bl	_sdhci_o2_dll_recovery
	cbz	w0, LBB0_13
LBB0_6:
	ldr	w22, [x20]
Lloh9:
	adrp	x23, _MMC_BUS_WIDTH_8@GOTPAGE
Lloh10:
	ldr	x23, [x23, _MMC_BUS_WIDTH_8@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w22, w8
	b.ne	LBB0_8
; %bb.7:
Lloh11:
	adrp	x8, _MMC_BUS_WIDTH_4@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MMC_BUS_WIDTH_4@GOTPAGEOFF]
	ldr	w9, [x8]
	str	w9, [x20]
	ldr	w1, [x8]
	mov	x0, x19
	bl	_sdhci_set_bus_width
	b	LBB0_9
LBB0_8:
	mov	w22, #0
LBB0_9:
	mov	x0, x19
	bl	_sdhci_o2_set_tuning_mode
	mov	x0, x19
	bl	_sdhci_start_tuning
	mov	x0, x19
	mov	x1, x21
	bl	___sdhci_o2_execute_tuning
	mov	x0, x19
	bl	_sdhci_end_tuning
	ldr	w8, [x23]
	cmp	w22, w8
	b.ne	LBB0_11
; %bb.10:
	str	w22, [x20]
	mov	x0, x19
	mov	x1, x22
	bl	_sdhci_set_bus_width
LBB0_11:
	mov	w0, #0
Lloh13:
	adrp	x8, _SDHCI_HS400_TUNING@GOTPAGE
Lloh14:
	ldr	x8, [x8, _SDHCI_HS400_TUNING@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	ldr	w9, [x19, #8]
	bic	w8, w9, w8
	str	w8, [x19, #8]
LBB0_12:
	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_13:
	ldr	w0, [x19, #12]
	bl	_mmc_hostname
	mov	x1, x0
Lloh16:
	adrp	x0, l_.str@PAGE
Lloh17:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_MMC_TIMING_MMC_HS200,8,3       ; @MMC_TIMING_MMC_HS200
	.comm	_MMC_SEND_TUNING_BLOCK_HS200,4,2 ; @MMC_SEND_TUNING_BLOCK_HS200
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: o2 dll recovery failed\n"

	.comm	_MMC_BUS_WIDTH_8,4,2            ; @MMC_BUS_WIDTH_8
	.comm	_MMC_BUS_WIDTH_4,4,2            ; @MMC_BUS_WIDTH_4
	.comm	_SDHCI_HS400_TUNING,4,2         ; @SDHCI_HS400_TUNING
	.no_dead_strip	_sdhci_o2_execute_tuning
.subsections_via_symbols
