	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ethqos_configure
_ethqos_configure:                      ## @ethqos_configure
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	cmpl	$0, (%rdi)
	je	LBB0_3
## %bb.1:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	24(%r15), %rax
	movl	(%rax,%rbx,8), %edx
	movl	4(%rax,%rbx,8), %esi
	movq	%r15, %rdi
	callq	_rgmii_writel
	incq	%rbx
	movl	(%r15), %eax
	cmpq	%rax, %rbx
	jb	LBB0_2
LBB0_3:
	movq	%r15, %rdi
	callq	_ethqos_set_func_clk_en
	movq	_SDCC_DLL_CONFIG_DLL_RST@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	movq	_SDCC_HC_REG_DLL_CONFIG@GOTPCREL(%rip), %r14
	movl	(%r14), %ecx
	movq	%r15, %rdi
	movl	%edx, %esi
	callq	_rgmii_updatel
	movq	_SDCC_DLL_CONFIG_PDN@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movl	(%r14), %ecx
	movq	%r15, %rdi
	movl	%edx, %esi
	callq	_rgmii_updatel
	movl	(%r12), %esi
	movl	(%r14), %ecx
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_rgmii_updatel
	movl	(%rbx), %esi
	movl	(%r14), %ecx
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_rgmii_updatel
	movq	8(%r15), %rax
	movq	_SPEED_100@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_8
## %bb.4:
	movq	_SPEED_10@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_8
## %bb.5:
	movq	_SDCC_DLL_CONFIG_DLL_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	(%r14), %ecx
	movq	%r15, %rdi
	movl	%edx, %esi
	callq	_rgmii_updatel
	movq	_SDCC_DLL_CONFIG_CK_OUT_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	(%r14), %ecx
	movq	%r15, %rdi
	movl	%edx, %esi
	callq	_rgmii_updatel
	movl	$26, %edi
	movl	$24, %esi
	callq	_GENMASK
	movl	%eax, %r14d
	movl	$26, %edi
	callq	_BIT
	movq	_SDCC_USR_CTL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	%r15, %rdi
	movl	%r14d, %esi
	movl	%eax, %edx
	callq	_rgmii_updatel
	movq	_SDC4_STATUS@GOTPCREL(%rip), %r14
	movq	_SDC4_STATUS_DLL_LOCK@GOTPCREL(%rip), %rbx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	$1, %edi
	callq	_mdelay
	movl	(%r14), %esi
	movq	%r15, %rdi
	callq	_rgmii_readl
	movl	%eax, -36(%rbp)
	movl	-36(%rbp), %eax
	andl	(%rbx), %eax
	je	LBB0_6
## %bb.7:
	movq	8(%r15), %rax
LBB0_8:
	movq	_SPEED_1000@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
## %bb.9:
	movq	%r15, %rdi
	callq	_ethqos_dll_configure
LBB0_10:
	movq	%r15, %rdi
	callq	_ethqos_rgmii_macro_init
	xorl	%eax, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SDCC_DLL_CONFIG_DLL_RST,4,2    ## @SDCC_DLL_CONFIG_DLL_RST
	.comm	_SDCC_HC_REG_DLL_CONFIG,4,2     ## @SDCC_HC_REG_DLL_CONFIG
	.comm	_SDCC_DLL_CONFIG_PDN,4,2        ## @SDCC_DLL_CONFIG_PDN
	.comm	_SPEED_100,8,3                  ## @SPEED_100
	.comm	_SPEED_10,8,3                   ## @SPEED_10
	.comm	_SDCC_DLL_CONFIG_DLL_EN,4,2     ## @SDCC_DLL_CONFIG_DLL_EN
	.comm	_SDCC_DLL_CONFIG_CK_OUT_EN,4,2  ## @SDCC_DLL_CONFIG_CK_OUT_EN
	.comm	_SDCC_USR_CTL,4,2               ## @SDCC_USR_CTL
	.comm	_SDC4_STATUS,4,2                ## @SDC4_STATUS
	.comm	_SDC4_STATUS_DLL_LOCK,4,2       ## @SDC4_STATUS_DLL_LOCK
	.comm	_SPEED_1000,8,3                 ## @SPEED_1000
	.no_dead_strip	_ethqos_configure
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ethqos_configure
_ethqos_configure:                      ; @ethqos_configure
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x0
	ldr	w8, [x0]
	cbz	w8, LBB0_3
; %bb.1:
	mov	x20, #0
	mov	x21, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #24]
	add	x8, x8, x20
	ldp	w2, w1, [x8]
	mov	x0, x19
	bl	_rgmii_writel
	add	x21, x21, #1
	ldr	w8, [x19]
	add	x20, x20, #8
	cmp	x21, x8
	b.lo	LBB0_2
LBB0_3:
	mov	x0, x19
	bl	_ethqos_set_func_clk_en
Lloh0:
	adrp	x21, _SDCC_DLL_CONFIG_DLL_RST@GOTPAGE
Lloh1:
	ldr	x21, [x21, _SDCC_DLL_CONFIG_DLL_RST@GOTPAGEOFF]
	ldr	w1, [x21]
Lloh2:
	adrp	x20, _SDCC_HC_REG_DLL_CONFIG@GOTPAGE
Lloh3:
	ldr	x20, [x20, _SDCC_HC_REG_DLL_CONFIG@GOTPAGEOFF]
	ldr	w3, [x20]
	mov	x0, x19
	mov	x2, x1
	bl	_rgmii_updatel
Lloh4:
	adrp	x22, _SDCC_DLL_CONFIG_PDN@GOTPAGE
Lloh5:
	ldr	x22, [x22, _SDCC_DLL_CONFIG_PDN@GOTPAGEOFF]
	ldr	w1, [x22]
	ldr	w3, [x20]
	mov	x0, x19
	mov	x2, x1
	bl	_rgmii_updatel
	ldr	w1, [x21]
	ldr	w3, [x20]
	mov	x0, x19
	mov	w2, #0
	bl	_rgmii_updatel
	ldr	w1, [x22]
	ldr	w3, [x20]
	mov	x0, x19
	mov	w2, #0
	bl	_rgmii_updatel
	ldr	x8, [x19, #8]
Lloh6:
	adrp	x9, _SPEED_100@GOTPAGE
Lloh7:
	ldr	x9, [x9, _SPEED_100@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
Lloh9:
	adrp	x10, _SPEED_10@GOTPAGE
Lloh10:
	ldr	x10, [x10, _SPEED_10@GOTPAGEOFF]
Lloh11:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.eq	LBB0_7
; %bb.4:
Lloh12:
	adrp	x8, _SDCC_DLL_CONFIG_DLL_EN@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SDCC_DLL_CONFIG_DLL_EN@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	ldr	w3, [x20]
	mov	x0, x19
	mov	x2, x1
	bl	_rgmii_updatel
Lloh15:
	adrp	x8, _SDCC_DLL_CONFIG_CK_OUT_EN@GOTPAGE
Lloh16:
	ldr	x8, [x8, _SDCC_DLL_CONFIG_CK_OUT_EN@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	ldr	w3, [x20]
	mov	x0, x19
	mov	x2, x1
	bl	_rgmii_updatel
	mov	w0, #26
	mov	w1, #24
	bl	_GENMASK
	mov	x20, x0
	mov	w0, #26
	bl	_BIT
	mov	x2, x0
Lloh18:
	adrp	x8, _SDCC_USR_CTL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _SDCC_USR_CTL@GOTPAGEOFF]
Lloh20:
	ldr	w3, [x8]
	mov	x0, x19
	mov	x1, x20
	bl	_rgmii_updatel
Lloh21:
	adrp	x20, _SDC4_STATUS@GOTPAGE
Lloh22:
	ldr	x20, [x20, _SDC4_STATUS@GOTPAGEOFF]
Lloh23:
	adrp	x21, _SDC4_STATUS_DLL_LOCK@GOTPAGE
Lloh24:
	ldr	x21, [x21, _SDC4_STATUS_DLL_LOCK@GOTPAGEOFF]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #1
	bl	_mdelay
	ldr	w1, [x20]
	mov	x0, x19
	bl	_rgmii_readl
	str	w0, [sp, #12]
	ldr	w8, [sp, #12]
	ldr	w9, [x21]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.6:
	ldr	x8, [x19, #8]
LBB0_7:
Lloh25:
	adrp	x9, _SPEED_1000@GOTPAGE
Lloh26:
	ldr	x9, [x9, _SPEED_1000@GOTPAGEOFF]
Lloh27:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.8:
	mov	x0, x19
	bl	_ethqos_dll_configure
LBB0_9:
	mov	x0, x19
	bl	_ethqos_rgmii_macro_init
	mov	w0, #0
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_SDCC_DLL_CONFIG_DLL_RST,4,2    ; @SDCC_DLL_CONFIG_DLL_RST
	.comm	_SDCC_HC_REG_DLL_CONFIG,4,2     ; @SDCC_HC_REG_DLL_CONFIG
	.comm	_SDCC_DLL_CONFIG_PDN,4,2        ; @SDCC_DLL_CONFIG_PDN
	.comm	_SPEED_100,8,3                  ; @SPEED_100
	.comm	_SPEED_10,8,3                   ; @SPEED_10
	.comm	_SDCC_DLL_CONFIG_DLL_EN,4,2     ; @SDCC_DLL_CONFIG_DLL_EN
	.comm	_SDCC_DLL_CONFIG_CK_OUT_EN,4,2  ; @SDCC_DLL_CONFIG_CK_OUT_EN
	.comm	_SDCC_USR_CTL,4,2               ; @SDCC_USR_CTL
	.comm	_SDC4_STATUS,4,2                ; @SDC4_STATUS
	.comm	_SDC4_STATUS_DLL_LOCK,4,2       ; @SDC4_STATUS_DLL_LOCK
	.comm	_SPEED_1000,8,3                 ; @SPEED_1000
	.no_dead_strip	_ethqos_configure
.subsections_via_symbols
