	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sdhci_msm_execute_tuning
_sdhci_msm_execute_tuning:              ## @sdhci_msm_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	$168, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, -180(%rbp)                ## 4-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	%rdi, -200(%rbp)                ## 8-byte Spill
	callq	_mmc_priv
	movq	%rax, %rbx
	movq	8(%rax), %rax
	movl	(%rax), %r14d
	movq	%rbx, %rdi
	callq	_sdhci_priv
	movq	%rax, %rdi
	callq	_sdhci_pltfm_priv
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_sdhci_msm_is_tuning_needed
	testl	%eax, %eax
	je	LBB0_9
## %bb.1:
	movl	$1, (%r15)
	movq	_SDHCI_HS400_TUNING@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	testl	%eax, (%rbx)
	je	LBB0_3
## %bb.2:
	movq	%rbx, %rdi
	callq	_sdhci_msm_hc_select_mode
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_msm_set_clock_rate_for_bus_mode
	movl	(%r13), %eax
	notl	%eax
	andl	%eax, (%rbx)
LBB0_3:
	movq	%rbx, %rdi
	callq	_msm_init_cm_dll
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_23
## %bb.4:
	movq	%rbx, -192(%rbp)                ## 8-byte Spill
	movq	%r15, -208(%rbp)                ## 8-byte Spill
	xorl	%r15d, %r15d
	xorl	%r13d, %r13d
	movl	-180(%rbp), %r12d               ## 4-byte Reload
	movq	-200(%rbp), %rbx                ## 8-byte Reload
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_6 Depth=1
	incq	%r13
	leaq	-176(%rbp), %rdi
	callq	_ARRAY_SIZE
	cmpq	%rax, %r13
	jge	LBB0_11
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	-192(%rbp), %rdi                ## 8-byte Reload
	movq	%r13, %rsi
	callq	_msm_config_cm_dll_phase
	testl	%eax, %eax
	jne	LBB0_22
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	%rbx, %rdi
	movl	%r12d, %esi
	xorl	%edx, %edx
	callq	_mmc_send_tuning
	testl	%eax, %eax
	jne	LBB0_5
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	%r13, -176(%rbp,%r15,8)
	incq	%r15
	movq	%rbx, %rdi
	callq	_mmc_dev
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_mmc_hostname
	movl	%r14d, %edi
	movl	-180(%rbp), %r12d               ## 4-byte Reload
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	movq	%r13, %rcx
	xorl	%eax, %eax
	callq	_dev_dbg
	jmp	LBB0_5
LBB0_9:
	movl	$0, (%r15)
	xorl	%r14d, %r14d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_sdhci_msm_set_cdr
	jmp	LBB0_23
LBB0_11:
	testq	%r15, %r15
	je	LBB0_16
LBB0_12:
	leaq	-176(%rbp), %rsi
	movq	-192(%rbp), %rbx                ## 8-byte Reload
	movq	%rbx, %rdi
	movq	%r15, %rdx
	callq	_msm_find_most_appropriate_phase
	movl	%eax, %r14d
	testl	%eax, %eax
	movq	-208(%rbp), %r13                ## 8-byte Reload
	js	LBB0_23
## %bb.13:
	movl	%r14d, %r12d
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_msm_config_cm_dll_phase
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_23
## %bb.14:
	movq	%r12, 8(%r13)
	movq	-200(%rbp), %r15                ## 8-byte Reload
	movq	%r15, %rdi
	callq	_mmc_dev
	movl	%eax, %r14d
	movq	%r15, %rdi
	callq	_mmc_hostname
	leaq	L_.str.1(%rip), %rsi
	movl	%r14d, %edi
	movl	%eax, %edx
	movq	%r12, %rcx
	xorl	%eax, %eax
	callq	_dev_dbg
LBB0_15:
	movl	$1, 4(%r13)
	xorl	%r14d, %r14d
	jmp	LBB0_23
LBB0_16:
	movq	-192(%rbp), %rdi                ## 8-byte Reload
	callq	_msm_init_cm_dll
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_23
## %bb.17:
	xorl	%r15d, %r15d
	xorl	%r13d, %r13d
	movl	-180(%rbp), %r12d               ## 4-byte Reload
	movq	-200(%rbp), %rbx                ## 8-byte Reload
	jmp	LBB0_19
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_19 Depth=1
	incq	%r13
	leaq	-176(%rbp), %rdi
	callq	_ARRAY_SIZE
	cmpq	%rax, %r13
	jge	LBB0_25
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movq	-192(%rbp), %rdi                ## 8-byte Reload
	movq	%r13, %rsi
	callq	_msm_config_cm_dll_phase
	testl	%eax, %eax
	jne	LBB0_22
## %bb.20:                              ##   in Loop: Header=BB0_19 Depth=1
	movq	%rbx, %rdi
	movl	%r12d, %esi
	xorl	%edx, %edx
	callq	_mmc_send_tuning
	testl	%eax, %eax
	jne	LBB0_18
## %bb.21:                              ##   in Loop: Header=BB0_19 Depth=1
	movq	%r13, -176(%rbp,%r15,8)
	incq	%r15
	movq	%rbx, %rdi
	callq	_mmc_dev
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_mmc_hostname
	movl	%r14d, %edi
	movl	-180(%rbp), %r12d               ## 4-byte Reload
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	movq	%r13, %rcx
	xorl	%eax, %eax
	callq	_dev_dbg
	jmp	LBB0_18
LBB0_25:
	testq	%r15, %r15
	jne	LBB0_12
## %bb.26:
	movq	-192(%rbp), %rdi                ## 8-byte Reload
	callq	_msm_init_cm_dll
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_23
## %bb.27:
	xorl	%r15d, %r15d
	xorl	%r13d, %r13d
	movl	-180(%rbp), %r12d               ## 4-byte Reload
	movq	-200(%rbp), %rbx                ## 8-byte Reload
	jmp	LBB0_29
LBB0_28:                                ##   in Loop: Header=BB0_29 Depth=1
	incq	%r13
	leaq	-176(%rbp), %rdi
	callq	_ARRAY_SIZE
	cmpq	%rax, %r13
	jge	LBB0_33
LBB0_29:                                ## =>This Inner Loop Header: Depth=1
	movq	-192(%rbp), %rdi                ## 8-byte Reload
	movq	%r13, %rsi
	callq	_msm_config_cm_dll_phase
	testl	%eax, %eax
	jne	LBB0_22
## %bb.30:                              ##   in Loop: Header=BB0_29 Depth=1
	movq	%rbx, %rdi
	movl	%r12d, %esi
	xorl	%edx, %edx
	callq	_mmc_send_tuning
	testl	%eax, %eax
	jne	LBB0_28
## %bb.31:                              ##   in Loop: Header=BB0_29 Depth=1
	movq	%r13, -176(%rbp,%r15,8)
	incq	%r15
	movq	%rbx, %rdi
	callq	_mmc_dev
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_mmc_hostname
	movl	%r14d, %edi
	movl	-180(%rbp), %r12d               ## 4-byte Reload
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	movq	%r13, %rcx
	xorl	%eax, %eax
	callq	_dev_dbg
	jmp	LBB0_28
LBB0_22:
	movl	%eax, %r14d
LBB0_23:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_36
## %bb.24:
	movl	%r14d, %eax
	addq	$168, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_33:
	testq	%r15, %r15
	jne	LBB0_12
## %bb.34:
	movq	-200(%rbp), %rbx                ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_mmc_dev
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_mmc_hostname
	leaq	L_.str.2(%rip), %rsi
	movl	%r14d, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	_EIO@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	testl	%r14d, %r14d
	movq	-208(%rbp), %r13                ## 8-byte Reload
	je	LBB0_15
## %bb.35:
	negl	%r14d
	jmp	LBB0_23
LBB0_36:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_SDHCI_HS400_TUNING,4,2         ## @SDHCI_HS400_TUNING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: Found good phase = %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"%s: Setting the tuning phase to %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"%s: No tuning point found\n"

	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_sdhci_msm_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_msm_execute_tuning
_sdhci_msm_execute_tuning:              ; @sdhci_msm_execute_tuning
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #240
	.cfi_def_cfa_offset 240
	stp	x28, x27, [sp, #144]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #160]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #176]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #192]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #208]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #224]            ; 16-byte Folded Spill
	add	x29, sp, #224
	.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	x22, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
	bl	_mmc_priv
	mov	x21, x0
	ldr	x8, [x0, #8]
	ldr	w23, [x8]
	bl	_sdhci_priv
	bl	_sdhci_pltfm_priv
	mov	x19, x0
	mov	x0, x21
	bl	_sdhci_msm_is_tuning_needed
	cbz	w0, LBB0_9
; %bb.1:
	mov	w8, #1
	str	w8, [x19]
	ldr	w8, [x21]
Lloh3:
	adrp	x24, _SDHCI_HS400_TUNING@GOTPAGE
Lloh4:
	ldr	x24, [x24, _SDHCI_HS400_TUNING@GOTPAGEOFF]
	ldr	w9, [x24]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.2:
	mov	x0, x21
	bl	_sdhci_msm_hc_select_mode
	mov	x0, x21
	mov	x1, x23
	bl	_msm_set_clock_rate_for_bus_mode
	ldr	w8, [x24]
	ldr	w9, [x21]
	bic	w8, w9, w8
	str	w8, [x21]
LBB0_3:
	mov	x0, x21
	bl	_msm_init_cm_dll
	cbnz	w0, LBB0_10
; %bb.4:
	mov	x23, #0
	mov	x24, #0
	add	x26, sp, #8
Lloh5:
	adrp	x25, l_.str@PAGE
Lloh6:
	add	x25, x25, l_.str@PAGEOFF
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x24, x24, #1
	add	x0, sp, #8
	bl	_ARRAY_SIZE
	cmp	x24, x0
	b.ge	LBB0_12
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	mov	x1, x24
	bl	_msm_config_cm_dll_phase
	cbnz	w0, LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x20
	mov	x1, x22
	mov	x2, #0
	bl	_mmc_send_tuning
	cbnz	w0, LBB0_5
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	add	x27, x23, #1
	str	x24, [x26, x23, lsl #3]
	mov	x0, x20
	bl	_mmc_dev
	mov	x23, x0
	mov	x0, x20
	bl	_mmc_hostname
	mov	x2, x0
	str	x24, [sp]
	mov	x0, x23
	mov	x1, x25
	bl	_dev_dbg
	mov	x23, x27
	b	LBB0_5
LBB0_9:
	str	wzr, [x19]
	mov	x0, x21
	mov	w1, #0
	bl	_sdhci_msm_set_cdr
	mov	w0, #0
LBB0_10:
	ldur	x8, [x29, #-88]
Lloh7:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh8:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_33
; %bb.11:
	ldp	x29, x30, [sp, #224]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #208]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #192]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #176]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #160]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #144]            ; 16-byte Folded Reload
	add	sp, sp, #240
	ret
LBB0_12:
	cbz	x23, LBB0_17
LBB0_13:
	add	x1, sp, #8
	mov	x0, x21
	mov	x2, x23
	bl	_msm_find_most_appropriate_phase
	tbnz	w0, #31, LBB0_10
; %bb.14:
	mov	w22, w0
	mov	x0, x21
	mov	x1, x22
	bl	_msm_config_cm_dll_phase
	cbnz	w0, LBB0_10
; %bb.15:
	str	x22, [x19, #8]
	mov	x0, x20
	bl	_mmc_dev
	mov	x21, x0
	mov	x0, x20
	bl	_mmc_hostname
	mov	x2, x0
	str	x22, [sp]
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_dev_dbg
LBB0_16:
	mov	w0, #0
	mov	w8, #1
	str	w8, [x19, #4]
	b	LBB0_10
LBB0_17:
	mov	x0, x21
	bl	_msm_init_cm_dll
	cbnz	w0, LBB0_10
; %bb.18:
	mov	x23, #0
	mov	x24, #0
	add	x26, sp, #8
Lloh12:
	adrp	x25, l_.str@PAGE
Lloh13:
	add	x25, x25, l_.str@PAGEOFF
	b	LBB0_20
LBB0_19:                                ;   in Loop: Header=BB0_20 Depth=1
	add	x24, x24, #1
	add	x0, sp, #8
	bl	_ARRAY_SIZE
	cmp	x24, x0
	b.ge	LBB0_23
LBB0_20:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	mov	x1, x24
	bl	_msm_config_cm_dll_phase
	cbnz	w0, LBB0_10
; %bb.21:                               ;   in Loop: Header=BB0_20 Depth=1
	mov	x0, x20
	mov	x1, x22
	mov	x2, #0
	bl	_mmc_send_tuning
	cbnz	w0, LBB0_19
; %bb.22:                               ;   in Loop: Header=BB0_20 Depth=1
	add	x27, x23, #1
	str	x24, [x26, x23, lsl #3]
	mov	x0, x20
	bl	_mmc_dev
	mov	x23, x0
	mov	x0, x20
	bl	_mmc_hostname
	mov	x2, x0
	str	x24, [sp]
	mov	x0, x23
	mov	x1, x25
	bl	_dev_dbg
	mov	x23, x27
	b	LBB0_19
LBB0_23:
	cbnz	x23, LBB0_13
; %bb.24:
	mov	x0, x21
	bl	_msm_init_cm_dll
	cbnz	w0, LBB0_10
; %bb.25:
	mov	x23, #0
	mov	x24, #0
	add	x26, sp, #8
Lloh14:
	adrp	x25, l_.str@PAGE
Lloh15:
	add	x25, x25, l_.str@PAGEOFF
	b	LBB0_27
LBB0_26:                                ;   in Loop: Header=BB0_27 Depth=1
	add	x24, x24, #1
	add	x0, sp, #8
	bl	_ARRAY_SIZE
	cmp	x24, x0
	b.ge	LBB0_30
LBB0_27:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	mov	x1, x24
	bl	_msm_config_cm_dll_phase
	cbnz	w0, LBB0_10
; %bb.28:                               ;   in Loop: Header=BB0_27 Depth=1
	mov	x0, x20
	mov	x1, x22
	mov	x2, #0
	bl	_mmc_send_tuning
	cbnz	w0, LBB0_26
; %bb.29:                               ;   in Loop: Header=BB0_27 Depth=1
	add	x27, x23, #1
	str	x24, [x26, x23, lsl #3]
	mov	x0, x20
	bl	_mmc_dev
	mov	x23, x0
	mov	x0, x20
	bl	_mmc_hostname
	mov	x2, x0
	str	x24, [sp]
	mov	x0, x23
	mov	x1, x25
	bl	_dev_dbg
	mov	x23, x27
	b	LBB0_26
LBB0_30:
	cbnz	x23, LBB0_13
; %bb.31:
	mov	x0, x20
	bl	_mmc_dev
	mov	x21, x0
	mov	x0, x20
	bl	_mmc_hostname
	mov	x2, x0
Lloh16:
	adrp	x1, l_.str.2@PAGE
Lloh17:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x21
	bl	_dev_dbg
Lloh18:
	adrp	x8, _EIO@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	cbz	w8, LBB0_16
; %bb.32:
	neg	w0, w8
	b	LBB0_10
LBB0_33:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_SDHCI_HS400_TUNING,4,2         ; @SDHCI_HS400_TUNING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: Found good phase = %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"%s: Setting the tuning phase to %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"%s: No tuning point found\n"

	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_sdhci_msm_execute_tuning
.subsections_via_symbols
