	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tegra_eqos_fix_speed
_tegra_eqos_fix_speed:                  ## @tegra_eqos_fix_speed
	.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
	movq	%rdi, %r15
	cmpl	$128, %esi
	je	LBB0_1
## %bb.2:
	movl	%esi, %edx
	cmpl	$130, %esi
	je	LBB0_3
## %bb.4:
	cmpl	$129, %edx
	jne	LBB0_12
## %bb.5:
	movl	$25000000, %eax                 ## imm = 0x17D7840
	jmp	LBB0_6
LBB0_1:
	movl	$125000000, %eax                ## imm = 0x7735940
LBB0_6:
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_SDMEMCOMPPADCTRL@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	addq	8(%r15), %rdi
	callq	_readl
	movq	_SDMEMCOMPPADCTRL_PAD_E_INPUT_OR_E_PWRD@GOTPCREL(%rip), %r13
	orl	(%r13), %eax
	movq	(%r12), %rsi
	addq	8(%r15), %rsi
	movl	%eax, %edi
	callq	_writel
	movl	$1, %edi
	callq	_udelay
	movq	_AUTO_CAL_CONFIG@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	addq	8(%r15), %rdi
	callq	_readl
	movl	%eax, %ebx
	movq	_AUTO_CAL_CONFIG_START@GOTPCREL(%rip), %rax
	movq	_AUTO_CAL_CONFIG_ENABLE@GOTPCREL(%rip), %rcx
	orl	(%rax), %ebx
	orl	(%rcx), %ebx
	movq	(%r14), %rsi
	addq	8(%r15), %rsi
	movl	%ebx, %edi
	callq	_writel
	movq	_AUTO_CAL_STATUS@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	addq	8(%r15), %rdi
	movq	_AUTO_CAL_STATUS_ACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	andl	%ebx, %edx
	movl	%ebx, %esi
	movl	$1, %ecx
	movl	$10, %r8d
	callq	_readl_poll_timeout_atomic
	testl	%eax, %eax
	js	LBB0_7
## %bb.8:
	movq	(%r14), %rdi
	addq	8(%r15), %rdi
	xorl	%edx, %edx
	movq	_AUTO_CAL_STATUS_ACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%ebx, %eax
	sete	%dl
	movl	%ebx, %esi
	movl	$20, %ecx
	movl	$200, %r8d
	callq	_readl_poll_timeout_atomic
	testl	%eax, %eax
	js	LBB0_10
## %bb.9:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_14
LBB0_3:
	movl	$2500000, %ebx                  ## imm = 0x2625A0
	jmp	LBB0_13
LBB0_12:
	movl	(%r15), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_err
	movl	$125000000, %ebx                ## imm = 0x7735940
LBB0_13:
	movq	_AUTO_CAL_CONFIG_ENABLE@GOTPCREL(%rip), %r13
	movq	_AUTO_CAL_CONFIG@GOTPCREL(%rip), %r12
	jmp	LBB0_14
LBB0_7:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_11
LBB0_10:
	leaq	L_.str.2(%rip), %rsi
LBB0_11:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movl	(%r15), %edi
	xorl	%eax, %eax
	callq	_dev_err
LBB0_14:
	movq	(%r12), %rdi
	addq	8(%r15), %rdi
	callq	_readl
	movl	(%r13), %edi
	notl	%edi
	andl	%eax, %edi
	movq	(%r12), %rsi
	addq	8(%r15), %rsi
	callq	_writel
	movl	4(%r15), %edi
	movq	%rbx, %rsi
	callq	_clk_set_rate
	testl	%eax, %eax
	js	LBB0_16
## %bb.15:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	movl	(%r15), %edi
	leaq	L_.str.3(%rip), %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_err                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid speed %u\n"

	.comm	_SDMEMCOMPPADCTRL,8,3           ## @SDMEMCOMPPADCTRL
	.comm	_SDMEMCOMPPADCTRL_PAD_E_INPUT_OR_E_PWRD,4,2 ## @SDMEMCOMPPADCTRL_PAD_E_INPUT_OR_E_PWRD
	.comm	_AUTO_CAL_CONFIG,8,3            ## @AUTO_CAL_CONFIG
	.comm	_AUTO_CAL_CONFIG_START,4,2      ## @AUTO_CAL_CONFIG_START
	.comm	_AUTO_CAL_CONFIG_ENABLE,4,2     ## @AUTO_CAL_CONFIG_ENABLE
	.comm	_AUTO_CAL_STATUS,8,3            ## @AUTO_CAL_STATUS
	.comm	_AUTO_CAL_STATUS_ACTIVE,4,2     ## @AUTO_CAL_STATUS_ACTIVE
L_.str.1:                               ## @.str.1
	.asciz	"calibration did not start\n"

L_.str.2:                               ## @.str.2
	.asciz	"calibration didn't finish\n"

L_.str.3:                               ## @.str.3
	.asciz	"failed to set TX rate: %d\n"

	.no_dead_strip	_tegra_eqos_fix_speed
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tegra_eqos_fix_speed
_tegra_eqos_fix_speed:                  ; @tegra_eqos_fix_speed
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
                                        ; kill: def $w1 killed $w1 def $x1
	mov	x19, x0
	mov	w20, #22848
	movk	w20, #1907, lsl #16
	cmp	w1, #128
	b.eq	LBB0_4
; %bb.1:
	cmp	w1, #130
	b.eq	LBB0_7
; %bb.2:
	cmp	w1, #129
	b.ne	LBB0_8
; %bb.3:
	mov	w20, #30784
	movk	w20, #381, lsl #16
LBB0_4:
	ldr	x8, [x19, #8]
Lloh0:
	adrp	x21, _SDMEMCOMPPADCTRL@GOTPAGE
Lloh1:
	ldr	x21, [x21, _SDMEMCOMPPADCTRL@GOTPAGEOFF]
	ldr	x9, [x21]
	add	x0, x9, x8
	bl	_readl
Lloh2:
	adrp	x8, _SDMEMCOMPPADCTRL_PAD_E_INPUT_OR_E_PWRD@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SDMEMCOMPPADCTRL_PAD_E_INPUT_OR_E_PWRD@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	orr	w0, w8, w0
	ldr	x8, [x19, #8]
	ldr	x9, [x21]
	add	x1, x9, x8
	bl	_writel
	mov	w0, #1
	bl	_udelay
	ldr	x8, [x19, #8]
Lloh5:
	adrp	x22, _AUTO_CAL_CONFIG@GOTPAGE
Lloh6:
	ldr	x22, [x22, _AUTO_CAL_CONFIG@GOTPAGEOFF]
	ldr	x9, [x22]
	add	x0, x9, x8
	bl	_readl
Lloh7:
	adrp	x8, _AUTO_CAL_CONFIG_START@GOTPAGE
Lloh8:
	ldr	x8, [x8, _AUTO_CAL_CONFIG_START@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
Lloh10:
	adrp	x9, _AUTO_CAL_CONFIG_ENABLE@GOTPAGE
Lloh11:
	ldr	x9, [x9, _AUTO_CAL_CONFIG_ENABLE@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	orr	w8, w8, w0
	orr	w21, w8, w9
	ldr	x8, [x19, #8]
	ldr	x9, [x22]
	add	x1, x9, x8
	mov	x0, x21
	bl	_writel
	ldr	x8, [x19, #8]
Lloh13:
	adrp	x22, _AUTO_CAL_STATUS@GOTPAGE
Lloh14:
	ldr	x22, [x22, _AUTO_CAL_STATUS@GOTPAGEOFF]
	ldr	x9, [x22]
	add	x0, x9, x8
Lloh15:
	adrp	x23, _AUTO_CAL_STATUS_ACTIVE@GOTPAGE
Lloh16:
	ldr	x23, [x23, _AUTO_CAL_STATUS_ACTIVE@GOTPAGEOFF]
	ldr	w8, [x23]
	and	w2, w8, w21
	mov	x1, x21
	mov	w3, #1
	mov	w4, #10
	bl	_readl_poll_timeout_atomic
	tbnz	w0, #31, LBB0_10
; %bb.5:
	ldr	x8, [x19, #8]
	ldr	x9, [x22]
	add	x0, x9, x8
	ldr	w8, [x23]
	tst	w8, w21
	cset	w2, eq
	mov	x1, x21
	mov	w3, #20
	mov	w4, #200
	bl	_readl_poll_timeout_atomic
	tbz	w0, #31, LBB0_12
; %bb.6:
Lloh17:
	adrp	x1, l_.str.2@PAGE
Lloh18:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_11
LBB0_7:
	mov	w20, #9632
	movk	w20, #38, lsl #16
	b	LBB0_9
LBB0_8:
	ldr	w0, [x19]
	str	x1, [sp]
Lloh19:
	adrp	x1, l_.str@PAGE
Lloh20:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
LBB0_9:
Lloh21:
	adrp	x21, _AUTO_CAL_CONFIG_ENABLE@GOTPAGE
Lloh22:
	ldr	x21, [x21, _AUTO_CAL_CONFIG_ENABLE@GOTPAGEOFF]
Lloh23:
	adrp	x22, _AUTO_CAL_CONFIG@GOTPAGE
Lloh24:
	ldr	x22, [x22, _AUTO_CAL_CONFIG@GOTPAGEOFF]
	b	LBB0_13
LBB0_10:
Lloh25:
	adrp	x1, l_.str.1@PAGE
Lloh26:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_11:
	ldr	w0, [x19]
	bl	_dev_err
LBB0_12:
Lloh27:
	adrp	x21, _SDMEMCOMPPADCTRL_PAD_E_INPUT_OR_E_PWRD@GOTPAGE
Lloh28:
	ldr	x21, [x21, _SDMEMCOMPPADCTRL_PAD_E_INPUT_OR_E_PWRD@GOTPAGEOFF]
Lloh29:
	adrp	x22, _SDMEMCOMPPADCTRL@GOTPAGE
Lloh30:
	ldr	x22, [x22, _SDMEMCOMPPADCTRL@GOTPAGEOFF]
LBB0_13:
	ldr	x8, [x19, #8]
	ldr	x9, [x22]
	add	x0, x9, x8
	bl	_readl
	ldr	w8, [x21]
	bic	w0, w0, w8
	ldr	x8, [x19, #8]
	ldr	x9, [x22]
	add	x1, x9, x8
	bl	_writel
	ldr	w0, [x19, #4]
	mov	x1, x20
	bl	_clk_set_rate
                                        ; kill: def $w0 killed $w0 def $x0
	tbz	w0, #31, LBB0_15
; %bb.14:
	ldr	w8, [x19]
	str	x0, [sp]
Lloh31:
	adrp	x1, l_.str.3@PAGE
Lloh32:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x8
	bl	_dev_err
LBB0_15:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpAdd	Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid speed %u\n"

	.comm	_SDMEMCOMPPADCTRL,8,3           ; @SDMEMCOMPPADCTRL
	.comm	_SDMEMCOMPPADCTRL_PAD_E_INPUT_OR_E_PWRD,4,2 ; @SDMEMCOMPPADCTRL_PAD_E_INPUT_OR_E_PWRD
	.comm	_AUTO_CAL_CONFIG,8,3            ; @AUTO_CAL_CONFIG
	.comm	_AUTO_CAL_CONFIG_START,4,2      ; @AUTO_CAL_CONFIG_START
	.comm	_AUTO_CAL_CONFIG_ENABLE,4,2     ; @AUTO_CAL_CONFIG_ENABLE
	.comm	_AUTO_CAL_STATUS,8,3            ; @AUTO_CAL_STATUS
	.comm	_AUTO_CAL_STATUS_ACTIVE,4,2     ; @AUTO_CAL_STATUS_ACTIVE
l_.str.1:                               ; @.str.1
	.asciz	"calibration did not start\n"

l_.str.2:                               ; @.str.2
	.asciz	"calibration didn't finish\n"

l_.str.3:                               ; @.str.3
	.asciz	"failed to set TX rate: %d\n"

	.no_dead_strip	_tegra_eqos_fix_speed
.subsections_via_symbols
