	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sdhci_cdns_execute_tuning
_sdhci_cdns_execute_tuning:             ## @sdhci_cdns_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, %r14d
	movq	%rdi, %rbx
	callq	_mmc_priv
	movq	%rax, %r12
	movq	(%rax), %rax
	movq	_MMC_TIMING_MMC_HS200@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_14
## %bb.1:
	movq	_MMC_SEND_TUNING_BLOCK_HS200@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpl	%r14d, (%rax)
	setne	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_2
## %bb.6:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_7
LBB0_14:
	movq	%rbx, %rdi
	movl	%r14d, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_sdhci_execute_tuning           ## TAILCALL
LBB0_2:
	movq	_SDHCI_CDNS_MAX_TUNING_LOOP@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_12
## %bb.3:
	xorl	%ebx, %ebx
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	movl	$0, -48(%rbp)                   ## 4-byte Folded Spill
	xorl	%r13d, %r13d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_4 Depth=1
	xorl	%r15d, %r15d
LBB0_10:                                ##   in Loop: Header=BB0_4 Depth=1
	incl	%ebx
	movl	%r15d, %r13d
	movq	_SDHCI_CDNS_MAX_TUNING_LOOP@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jge	LBB0_11
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_sdhci_cdns_set_tune_val
	testl	%eax, %eax
	jne	LBB0_5
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	8(%r12), %edi
	xorl	%r15d, %r15d
	movl	%r14d, %esi
	xorl	%edx, %edx
	callq	_mmc_send_tuning
	testq	%rax, %rax
	jne	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=1
	leal	1(%r13), %r15d
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	cmpl	%eax, %r13d
	cmovgel	%r15d, %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	cmovgel	%ebx, %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	jmp	LBB0_10
LBB0_11:
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	testl	%ecx, %ecx
	je	LBB0_12
## %bb.13:
	movl	%ecx, %eax
	shrl	$31, %eax
	addl	%ecx, %eax
	sarl	%eax
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	subl	%eax, %esi
	movq	%r12, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_sdhci_cdns_set_tune_val        ## TAILCALL
LBB0_12:
	movl	8(%r12), %edi
	callq	_mmc_dev
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	callq	_dev_err
	movq	_EIO@GOTPCREL(%rip), %rcx
LBB0_7:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.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
	.comm	_SDHCI_CDNS_MAX_TUNING_LOOP,4,2 ## @SDHCI_CDNS_MAX_TUNING_LOOP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"no tuning point found\n"

	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_sdhci_cdns_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_cdns_execute_tuning
_sdhci_cdns_execute_tuning:             ; @sdhci_cdns_execute_tuning
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x20, x1
	mov	x21, 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, w20
	cset	w0, ne
	bl	_WARN_ON
	cbz	x0, LBB0_4
; %bb.2:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_13
LBB0_3:
	mov	x0, x21
	mov	x1, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_sdhci_execute_tuning
LBB0_4:
Lloh8:
	adrp	x22, _SDHCI_CDNS_MAX_TUNING_LOOP@GOTPAGE
Lloh9:
	ldr	x22, [x22, _SDHCI_CDNS_MAX_TUNING_LOOP@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_12
; %bb.5:
	mov	w21, #0
	mov	w23, #0
	mov	w24, #0
	mov	w25, #0
	b	LBB0_8
LBB0_6:                                 ;   in Loop: Header=BB0_8 Depth=1
	ldr	w0, [x19, #8]
	mov	x1, x20
	mov	x2, #0
	bl	_mmc_send_tuning
	cmp	w25, w24
	csel	w8, w23, w21, lt
	csinc	w9, w24, w25, lt
	cmp	x0, #0
	csinc	w25, wzr, w25, ne
	csel	w24, w24, w9, ne
	csel	w23, w23, w8, ne
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	add	w21, w21, #1
	ldr	w8, [x22]
	cmp	w21, w8
	b.ge	LBB0_10
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x21
	bl	_sdhci_cdns_set_tune_val
	cbz	w0, LBB0_6
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	mov	w25, #0
	b	LBB0_7
LBB0_10:
	cbz	w24, LBB0_12
; %bb.11:
	cmp	w24, #0
	cinc	w8, w24, lt
	sub	w1, w23, w8, asr #1
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_sdhci_cdns_set_tune_val
LBB0_12:
	ldr	w0, [x19, #8]
	bl	_mmc_dev
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh12:
	adrp	x8, _EIO@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_13:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.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
	.comm	_SDHCI_CDNS_MAX_TUNING_LOOP,4,2 ; @SDHCI_CDNS_MAX_TUNING_LOOP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"no tuning point found\n"

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