	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ipq806x_gmac_set_speed
_ipq806x_gmac_set_speed:                ## @ipq806x_gmac_set_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, %rbx
	movl	(%rdi), %edi
	cmpl	$128, %edi
	je	LBB0_4
## %bb.1:
	cmpl	$129, %edi
	jne	LBB0_5
## %bb.2:
	movq	%rbx, %rdi
	callq	_get_clk_div_rgmii
	movl	%eax, %r14d
	movl	8(%rbx), %edi
	callq	_NSS_COMMON_CLK_GATE_RGMII_RX_EN
	movl	%eax, %r12d
	movl	8(%rbx), %edi
	callq	_NSS_COMMON_CLK_GATE_RGMII_TX_EN
	jmp	LBB0_3
LBB0_4:
	movq	%rbx, %rdi
	callq	_get_clk_div_sgmii
	movl	%eax, %r14d
	movl	8(%rbx), %edi
	callq	_NSS_COMMON_CLK_GATE_GMII_RX_EN
	movl	%eax, %r12d
	movl	8(%rbx), %edi
	callq	_NSS_COMMON_CLK_GATE_GMII_TX_EN
LBB0_3:
	movl	%eax, %r15d
	orl	%r12d, %r15d
	movl	4(%rbx), %edi
	movq	_NSS_COMMON_CLK_GATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rax, %r12
	leaq	-44(%rbp), %r13
	movq	%r13, %rdx
	callq	_regmap_read
	movl	%r15d, %edx
	notl	%edx
	andl	-44(%rbp), %edx
	movl	%edx, -44(%rbp)
	movl	4(%rbx), %edi
	movl	(%r12), %esi
	callq	_regmap_write
	movl	4(%rbx), %edi
	movq	_NSS_COMMON_CLK_DIV0@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%r13, %rdx
	callq	_regmap_read
	movq	_NSS_COMMON_CLK_DIV_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movl	8(%rbx), %edi
	callq	_NSS_COMMON_CLK_DIV_OFFSET
	movl	%eax, %ecx
	shll	%cl, %r13d
	notl	%r13d
	andl	%r13d, -44(%rbp)
	movl	8(%rbx), %edi
	callq	_NSS_COMMON_CLK_DIV_OFFSET
	movl	%eax, %ecx
	shll	%cl, %r14d
	orl	-44(%rbp), %r14d
	movl	%r14d, -44(%rbp)
	movl	4(%rbx), %edi
	movl	(%r12), %esi
	movl	%r14d, %edx
	callq	_regmap_write
	movl	4(%rbx), %edi
	movq	_NSS_COMMON_CLK_GATE@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	leaq	-44(%rbp), %rdx
	callq	_regmap_read
	orl	-44(%rbp), %r15d
	movl	%r15d, -44(%rbp)
	movl	4(%rbx), %edi
	movl	(%r14), %esi
	movl	%r15d, %edx
	callq	_regmap_write
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_5:
	movq	16(%rbx), %rbx
	callq	_phy_modes
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unsupported PHY mode: \"%s\"\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_NSS_COMMON_CLK_GATE,4,2        ## @NSS_COMMON_CLK_GATE
	.comm	_NSS_COMMON_CLK_DIV0,4,2        ## @NSS_COMMON_CLK_DIV0
	.comm	_NSS_COMMON_CLK_DIV_MASK,4,2    ## @NSS_COMMON_CLK_DIV_MASK
	.no_dead_strip	_ipq806x_gmac_set_speed
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ipq806x_gmac_set_speed
_ipq806x_gmac_set_speed:                ; @ipq806x_gmac_set_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
	mov	x19, x0
	ldr	w0, [x0]
	cmp	w0, #128
	b.eq	LBB0_3
; %bb.1:
	cmp	w0, #129
	b.ne	LBB0_5
; %bb.2:
	mov	x0, x19
	bl	_get_clk_div_rgmii
	mov	x20, x0
	ldr	w0, [x19, #8]
	bl	_NSS_COMMON_CLK_GATE_RGMII_RX_EN
	mov	x21, x0
	ldr	w0, [x19, #8]
	bl	_NSS_COMMON_CLK_GATE_RGMII_TX_EN
	b	LBB0_4
LBB0_3:
	mov	x0, x19
	bl	_get_clk_div_sgmii
	mov	x20, x0
	ldr	w0, [x19, #8]
	bl	_NSS_COMMON_CLK_GATE_GMII_RX_EN
	mov	x21, x0
	ldr	w0, [x19, #8]
	bl	_NSS_COMMON_CLK_GATE_GMII_TX_EN
LBB0_4:
	orr	w21, w0, w21
	ldr	w0, [x19, #4]
Lloh0:
	adrp	x22, _NSS_COMMON_CLK_GATE@GOTPAGE
Lloh1:
	ldr	x22, [x22, _NSS_COMMON_CLK_GATE@GOTPAGEOFF]
	ldr	w1, [x22]
	add	x2, sp, #12
	bl	_regmap_read
	ldr	w8, [sp, #12]
	bic	w2, w8, w21
	str	w2, [sp, #12]
	ldr	w0, [x19, #4]
	ldr	w1, [x22]
	bl	_regmap_write
	ldr	w0, [x19, #4]
Lloh2:
	adrp	x23, _NSS_COMMON_CLK_DIV0@GOTPAGE
Lloh3:
	ldr	x23, [x23, _NSS_COMMON_CLK_DIV0@GOTPAGEOFF]
	ldr	w1, [x23]
	add	x2, sp, #12
	bl	_regmap_read
Lloh4:
	adrp	x8, _NSS_COMMON_CLK_DIV_MASK@GOTPAGE
Lloh5:
	ldr	x8, [x8, _NSS_COMMON_CLK_DIV_MASK@GOTPAGEOFF]
Lloh6:
	ldr	w24, [x8]
	ldr	w0, [x19, #8]
	bl	_NSS_COMMON_CLK_DIV_OFFSET
	lsl	w8, w24, w0
	ldr	w9, [sp, #12]
	bic	w8, w9, w8
	str	w8, [sp, #12]
	ldr	w0, [x19, #8]
	bl	_NSS_COMMON_CLK_DIV_OFFSET
	lsl	w8, w20, w0
	ldr	w9, [sp, #12]
	orr	w2, w9, w8
	str	w2, [sp, #12]
	ldr	w0, [x19, #4]
	ldr	w1, [x23]
	bl	_regmap_write
	ldr	w0, [x19, #4]
	ldr	w1, [x22]
	add	x2, sp, #12
	bl	_regmap_read
	ldr	w8, [sp, #12]
	orr	w2, w8, w21
	str	w2, [sp, #12]
	ldr	w0, [x19, #4]
	ldr	w1, [x22]
	bl	_regmap_write
	mov	w0, #0
	b	LBB0_6
LBB0_5:
	ldr	x19, [x19, #16]
	bl	_phy_modes
	mov	x2, x0
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	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 AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unsupported PHY mode: \"%s\"\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_NSS_COMMON_CLK_GATE,4,2        ; @NSS_COMMON_CLK_GATE
	.comm	_NSS_COMMON_CLK_DIV0,4,2        ; @NSS_COMMON_CLK_DIV0
	.comm	_NSS_COMMON_CLK_DIV_MASK,4,2    ; @NSS_COMMON_CLK_DIV_MASK
	.no_dead_strip	_ipq806x_gmac_set_speed
.subsections_via_symbols
