	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dw_mci_exynos_execute_tuning
_dw_mci_exynos_execute_tuning:          ## @dw_mci_exynos_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	(%rdi), %r15
	movq	8(%rdi), %r13
	movq	(%r13), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	callq	_dw_mci_exynos_get_clksmpl
	movl	%eax, %r12d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	_TMOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movl	$-1, %edx
	callq	_mci_writel
	movq	%r13, %rdi
	callq	_dw_mci_exynos_move_next_clksmpl
	movl	%eax, %r14d
	movq	%r15, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	xorl	%edx, %edx
	callq	_mmc_send_tuning
	movl	$1, %edx
	movl	%r14d, %ecx
	shll	%cl, %edx
	testl	%eax, %eax
	movl	$0, %eax
	cmovnel	%eax, %edx
	orl	%edx, %ebx
	cmpl	%r14d, %r12d
	jne	LBB0_1
## %bb.2:
	movl	%ebx, %edi
	callq	_dw_mci_exynos_get_best_clksmpl
	testq	%rax, %rax
	js	LBB0_4
## %bb.3:
	movq	%rax, %rbx
	movq	%r13, %rdi
	movq	%rax, %rsi
	callq	_dw_mci_exynos_set_clksmpl
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rbx, (%rax)
	xorl	%eax, %eax
	jmp	LBB0_5
LBB0_4:
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_5:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TMOUT,4,2                      ## @TMOUT
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_dw_mci_exynos_execute_tuning
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dw_mci_exynos_execute_tuning
_dw_mci_exynos_execute_tuning:          ; @dw_mci_exynos_execute_tuning
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x1
	ldp	x21, x19, [x0]
	ldr	x25, [x19]
	mov	x0, x19
	bl	_dw_mci_exynos_get_clksmpl
	mov	x23, x0
	mov	w22, #0
Lloh0:
	adrp	x26, _TMOUT@GOTPAGE
Lloh1:
	ldr	x26, [x26, _TMOUT@GOTPAGEOFF]
	mov	w27, #1
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x26]
	mov	x0, x19
	mov	w2, #-1
	bl	_mci_writel
	mov	x0, x19
	bl	_dw_mci_exynos_move_next_clksmpl
	mov	x24, x0
	mov	x0, x21
	mov	x1, x20
	mov	x2, #0
	bl	_mmc_send_tuning
	lsl	w8, w27, w24
	cmp	w0, #0
	csel	w8, w8, wzr, eq
	orr	w22, w8, w22
	cmp	w23, w24
	b.ne	LBB0_1
; %bb.2:
	mov	x0, x22
	bl	_dw_mci_exynos_get_best_clksmpl
	tbnz	x0, #63, LBB0_4
; %bb.3:
	mov	x20, x0
	mov	x0, x19
	mov	x1, x20
	bl	_dw_mci_exynos_set_clksmpl
	mov	w0, #0
	str	x20, [x25]
	b	LBB0_5
LBB0_4:
Lloh2:
	adrp	x8, _EIO@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_TMOUT,4,2                      ; @TMOUT
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_dw_mci_exynos_execute_tuning
.subsections_via_symbols
