	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tegra_sdhci_tap_correction
_tegra_sdhci_tap_correction:            ## @tegra_sdhci_tap_correction
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r14d
	movl	%edx, -72(%rbp)                 ## 4-byte Spill
	movl	%esi, -80(%rbp)                 ## 4-byte Spill
	movq	%rdi, %rbx
	callq	_sdhci_priv
	movq	%rax, %rdi
	callq	_sdhci_pltfm_priv
	movq	%rax, %rcx
	movq	%rbx, -104(%rbp)                ## 8-byte Spill
	movl	(%rbx), %eax
	movq	_TUNING_WORD_BIT_SIZE@GOTPCREL(%rip), %rsi
	cltd
	idivl	(%rsi)
	movl	%eax, -76(%rbp)                 ## 4-byte Spill
	testl	%eax, %eax
	jle	LBB0_11
## %bb.1:
	movq	%rcx, -88(%rbp)                 ## 8-byte Spill
	movl	%r14d, -68(%rbp)                ## 4-byte Spill
	xorl	%r15d, %r15d
	xorl	%r11d, %r11d
	xorl	%r10d, %r10d
	movl	$0, -64(%rbp)                   ## 4-byte Folded Spill
	xorl	%ebx, %ebx
	movl	$0, -48(%rbp)                   ## 4-byte Folded Spill
	xorl	%r13d, %r13d
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	xorl	%r14d, %r14d
	xorl	%r12d, %r12d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	%ebx, %edi
	movq	-96(%rbp), %r10                 ## 8-byte Reload
	movl	-60(%rbp), %r11d                ## 4-byte Reload
	movl	-56(%rbp), %r15d                ## 4-byte Reload
	movl	-52(%rbp), %r13d                ## 4-byte Reload
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	incl	%r15d
	movl	%edi, %ebx
	cmpl	-76(%rbp), %r15d                ## 4-byte Folded Reload
	je	LBB0_10
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
	movl	%r13d, -52(%rbp)                ## 4-byte Spill
	movl	%r11d, -60(%rbp)                ## 4-byte Spill
	movq	%r10, -96(%rbp)                 ## 8-byte Spill
	movq	_SDHCI_VNDR_TUN_CTRL0_0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r15d, %r13d
	movq	-104(%rbp), %r15                ## 8-byte Reload
	movq	%r15, %rdi
	callq	_sdhci_readl
	movq	_SDHCI_VNDR_TUN_CTRL0_TUN_WORD_SEL_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	notl	%esi
	andl	%eax, %esi
	movl	%r13d, -56(%rbp)                ## 4-byte Spill
	orl	%r13d, %esi
	movq	_SDHCI_VNDR_TUN_CTRL0_0@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_sdhci_writel
	movq	_SDHCI_TEGRA_VNDR_TUN_STATUS0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_sdhci_readl
	movq	_TUNING_WORD_BIT_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	testl	%r8d, %r8d
	jle	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%r8d, %r9d
	movl	-56(%rbp), %r15d                ## 4-byte Reload
	imull	%r15d, %r9d
	xorl	%ecx, %ecx
	movq	-96(%rbp), %r10                 ## 8-byte Reload
	movl	-60(%rbp), %r11d                ## 4-byte Reload
	movl	-52(%rbp), %r13d                ## 4-byte Reload
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_5 Depth=2
	testl	%r13d, %r13d
	cmovel	%edi, %r10d
	movl	$1, %r12d
	movl	$1, %r13d
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=2
	movl	%ebx, %edi
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=2
	incl	%ecx
	movl	%edi, %ebx
	cmpl	%ecx, %r8d
	je	LBB0_9
LBB0_5:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	$1, %esi
	shll	%cl, %esi
	leal	(%r9,%rcx), %edi
	andl	%eax, %esi
	movl	%esi, %edx
	orl	%r12d, %edx
	je	LBB0_6
## %bb.12:                              ##   in Loop: Header=BB0_5 Depth=2
	testl	%esi, %esi
	je	LBB0_16
## %bb.13:                              ##   in Loop: Header=BB0_5 Depth=2
	testl	%r12d, %r12d
	je	LBB0_16
## %bb.14:                              ##   in Loop: Header=BB0_5 Depth=2
	testl	%r14d, %r14d
	jne	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_5 Depth=2
	cmpl	$0, -48(%rbp)                   ## 4-byte Folded Reload
	cmovel	%edi, %r11d
	movl	$1, %r14d
	movl	$1, -48(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_5 Depth=2
	testl	%esi, %esi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	jne	LBB0_21
## %bb.17:                              ##   in Loop: Header=BB0_5 Depth=2
	testl	%r12d, %r12d
	je	LBB0_21
## %bb.18:                              ##   in Loop: Header=BB0_5 Depth=2
	testl	%r14d, %r14d
	je	LBB0_21
## %bb.19:                              ##   in Loop: Header=BB0_5 Depth=2
	testl	%edx, %edx
	jne	LBB0_21
## %bb.20:                              ##   in Loop: Header=BB0_5 Depth=2
	leal	(%r9,%rcx), %edx
	decl	%edx
	movl	%edx, -64(%rbp)                 ## 4-byte Spill
	movl	$1, -44(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_7
LBB0_21:                                ##   in Loop: Header=BB0_5 Depth=2
	testl	%esi, %esi
	je	LBB0_7
## %bb.22:                              ##   in Loop: Header=BB0_5 Depth=2
	testl	%r14d, %r14d
	je	LBB0_7
## %bb.23:                              ##   in Loop: Header=BB0_5 Depth=2
	testl	%r12d, %r12d
	je	LBB0_7
## %bb.24:                              ##   in Loop: Header=BB0_5 Depth=2
	testl	%edx, %edx
	je	LBB0_7
## %bb.25:                              ##   in Loop: Header=BB0_5 Depth=2
	movl	-64(%rbp), %edx                 ## 4-byte Reload
	subl	%ebx, %edx
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	movl	$1, %r12d
	cmpl	-80(%rbp), %edx                 ## 4-byte Folded Reload
	jge	LBB0_26
## %bb.27:                              ##   in Loop: Header=BB0_5 Depth=2
	movl	$1, %r14d
	cmpl	-72(%rbp), %edx                 ## 4-byte Folded Reload
	jl	LBB0_8
	jmp	LBB0_28
LBB0_26:                                ##   in Loop: Header=BB0_5 Depth=2
	movl	$1, %r14d
	jmp	LBB0_8
LBB0_28:
	movl	%edx, %eax
	shrl	$31, %eax
	addl	%edx, %eax
	sarl	%eax
	addl	%ebx, %eax
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	jmp	LBB0_34
LBB0_10:
	testl	%r13d, %r13d
	movl	-68(%rbp), %edx                 ## 4-byte Reload
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	je	LBB0_11
## %bb.29:
	cmpl	$0, -48(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_34
## %bb.30:
	subl	%r10d, %r11d
	movl	%r11d, %eax
	shrl	$31, %eax
	addl	%r11d, %eax
	sarl	%eax
	leal	(%rax,%r10), %ecx
	decl	%ecx
                                        ## kill: def $eax killed $eax killed $rax
	addl	%r10d, %eax
	cmpl	%edx, %ecx
	jle	LBB0_32
## %bb.31:
	subl	%edx, %eax
	jmp	LBB0_33
LBB0_11:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_WARN                           ## TAILCALL
LBB0_32:
	addl	%edx, %eax
LBB0_33:
	movl	%eax, (%rsi)
LBB0_34:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TUNING_WORD_BIT_SIZE,4,2       ## @TUNING_WORD_BIT_SIZE
	.comm	_SDHCI_VNDR_TUN_CTRL0_0,4,2     ## @SDHCI_VNDR_TUN_CTRL0_0
	.comm	_SDHCI_VNDR_TUN_CTRL0_TUN_WORD_SEL_MASK,4,2 ## @SDHCI_VNDR_TUN_CTRL0_TUN_WORD_SEL_MASK
	.comm	_SDHCI_TEGRA_VNDR_TUN_STATUS0,4,2 ## @SDHCI_TEGRA_VNDR_TUN_STATUS0
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"no edge detected, continue with hw tuned delay.\n"

	.no_dead_strip	_tegra_sdhci_tap_correction
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tegra_sdhci_tap_correction
_tegra_sdhci_tap_correction:            ; @tegra_sdhci_tap_correction
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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	x19, x3
	str	w2, [sp, #16]                   ; 4-byte Folded Spill
	str	w1, [sp, #32]                   ; 4-byte Folded Spill
	mov	x20, x0
	bl	_sdhci_priv
	bl	_sdhci_pltfm_priv
	str	x20, [sp, #24]                  ; 8-byte Folded Spill
	ldr	w8, [x20]
Lloh0:
	adrp	x9, _TUNING_WORD_BIT_SIZE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _TUNING_WORD_BIT_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	sdiv	w8, w8, w9
	str	w8, [sp, #20]                   ; 4-byte Folded Spill
	cmp	w8, #1
	b.lt	LBB0_28
; %bb.1:
	str	x0, [sp, #8]                    ; 8-byte Folded Spill
	str	w19, [sp, #4]                   ; 4-byte Folded Spill
	mov	w26, #0
	mov	w16, #0
	mov	w24, #0
	mov	w15, #0
	mov	w19, #0
	mov	w20, #0
	mov	w27, #0
	mov	w17, #0
	mov	w23, #0
	mov	w22, #0
	mov	w21, #1
Lloh3:
	adrp	x25, _SDHCI_VNDR_TUN_CTRL0_0@GOTPAGE
Lloh4:
	ldr	x25, [x25, _SDHCI_VNDR_TUN_CTRL0_0@GOTPAGEOFF]
	ldr	x28, [sp, #24]                  ; 8-byte Folded Reload
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x11, x19
	ldp	w16, w15, [sp, #40]             ; 8-byte Folded Reload
	ldr	w17, [sp, #36]                  ; 4-byte Folded Reload
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	w26, w26, #1
	mov	x19, x11
	ldr	w8, [sp, #20]                   ; 4-byte Folded Reload
	cmp	w26, w8
	b.eq	LBB0_24
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
	stp	w17, w16, [sp, #36]             ; 8-byte Folded Spill
	str	w15, [sp, #44]                  ; 4-byte Folded Spill
	ldr	w1, [x25]
	mov	x0, x28
	bl	_sdhci_readl
Lloh5:
	adrp	x8, _SDHCI_VNDR_TUN_CTRL0_TUN_WORD_SEL_MASK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SDHCI_VNDR_TUN_CTRL0_TUN_WORD_SEL_MASK@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	bic	w8, w0, w8
	orr	w1, w8, w26
	ldr	w2, [x25]
	mov	x0, x28
	bl	_sdhci_writel
Lloh8:
	adrp	x8, _SDHCI_TEGRA_VNDR_TUN_STATUS0@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SDHCI_TEGRA_VNDR_TUN_STATUS0@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x28
	bl	_sdhci_readl
Lloh11:
	adrp	x8, _TUNING_WORD_BIT_SIZE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _TUNING_WORD_BIT_SIZE@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w9, #0
	mul	w10, w8, w26
	ldp	w16, w15, [sp, #40]             ; 8-byte Folded Reload
	ldr	w17, [sp, #36]                  ; 4-byte Folded Reload
	b	LBB0_8
LBB0_6:                                 ;   in Loop: Header=BB0_8 Depth=2
	cmp	w20, #0
	csel	w16, w11, w16, eq
	mov	w23, #1
	mov	w20, #1
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=2
	add	w9, w9, #1
	mov	x19, x11
	cmp	w8, w9
	b.eq	LBB0_3
LBB0_8:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	w11, w10, w9
	lsl	w12, w21, w9
	and	w12, w12, w0
	orr	w13, w12, w22
	cbz	w13, LBB0_15
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=2
	cmp	w12, #0
	ccmp	w22, #0, #4, ne
	ccmp	w23, #0, #0, ne
	b.eq	LBB0_6
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=2
	cbnz	w12, LBB0_17
; %bb.11:                               ;   in Loop: Header=BB0_8 Depth=2
	cbz	w22, LBB0_17
; %bb.12:                               ;   in Loop: Header=BB0_8 Depth=2
	cbz	w23, LBB0_17
; %bb.13:                               ;   in Loop: Header=BB0_8 Depth=2
	cbnz	w17, LBB0_17
; %bb.14:                               ;   in Loop: Header=BB0_8 Depth=2
	add	w11, w10, w9
	sub	w15, w11, #1
	mov	w17, #1
	b	LBB0_16
LBB0_15:                                ;   in Loop: Header=BB0_8 Depth=2
	cmp	w27, #0
	csel	w24, w11, w24, eq
	mov	w22, #1
	mov	w27, #1
LBB0_16:                                ;   in Loop: Header=BB0_8 Depth=2
	mov	x11, x19
	b	LBB0_7
LBB0_17:                                ;   in Loop: Header=BB0_8 Depth=2
	cbz	w12, LBB0_16
; %bb.18:                               ;   in Loop: Header=BB0_8 Depth=2
	cbz	w23, LBB0_16
; %bb.19:                               ;   in Loop: Header=BB0_8 Depth=2
	cbz	w22, LBB0_16
; %bb.20:                               ;   in Loop: Header=BB0_8 Depth=2
	cbz	w17, LBB0_16
; %bb.21:                               ;   in Loop: Header=BB0_8 Depth=2
	mov	w17, #0
	mov	w22, #1
	sub	w12, w15, w19
	ldr	w13, [sp, #32]                  ; 4-byte Folded Reload
	mov	w23, #1
	cmp	w12, w13
	b.ge	LBB0_7
; %bb.22:                               ;   in Loop: Header=BB0_8 Depth=2
	ldr	w13, [sp, #16]                  ; 4-byte Folded Reload
	cmp	w12, w13
	b.lt	LBB0_7
; %bb.23:
	cmp	w12, #0
	cinc	w8, w12, lt
	add	w8, w19, w8, asr #1
	ldr	x9, [sp, #8]                    ; 8-byte Folded Reload
	str	w8, [x9]
	b	LBB0_31
LBB0_24:
	ldr	w10, [sp, #4]                   ; 4-byte Folded Reload
	ldr	x11, [sp, #8]                   ; 8-byte Folded Reload
	cbz	w27, LBB0_28
; %bb.25:
	cbz	w20, LBB0_31
; %bb.26:
	sub	w8, w16, w24
	cmp	w8, #0
	cinc	w8, w8, lt
	add	w8, w24, w8, asr #1
	sub	w9, w8, #1
	cmp	w9, w10
	b.le	LBB0_29
; %bb.27:
	sub	w8, w8, w10
	b	LBB0_30
LBB0_28:
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	b	_WARN
LBB0_29:
	add	w8, w8, w10
LBB0_30:
	str	w8, [x11]
LBB0_31:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_TUNING_WORD_BIT_SIZE,4,2       ; @TUNING_WORD_BIT_SIZE
	.comm	_SDHCI_VNDR_TUN_CTRL0_0,4,2     ; @SDHCI_VNDR_TUN_CTRL0_0
	.comm	_SDHCI_VNDR_TUN_CTRL0_TUN_WORD_SEL_MASK,4,2 ; @SDHCI_VNDR_TUN_CTRL0_TUN_WORD_SEL_MASK
	.comm	_SDHCI_TEGRA_VNDR_TUN_STATUS0,4,2 ; @SDHCI_TEGRA_VNDR_TUN_STATUS0
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"no edge detected, continue with hw tuned delay.\n"

	.no_dead_strip	_tegra_sdhci_tap_correction
.subsections_via_symbols
