	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function a38x_comphy_set_mode
_a38x_comphy_set_mode:                  ## @a38x_comphy_set_mode
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movl	%esi, %ebx
	callq	_phy_get_drvdata
	movq	%rax, %r14
	movq	_PHY_MODE_ETHERNET@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	jne	LBB0_2
## %bb.1:
	addl	$-128, %r15d
	cmpl	$3, %r15d
	jae	LBB0_2
## %bb.3:
	movslq	%r15d, %rax
	leaq	l_switch.table.a38x_comphy_set_mode(%rip), %rcx
	movq	(%rcx,%rax,8), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	%edx, %esi
	callq	_a38x_comphy_set_speed
	movq	_COMPHY_STAT1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_COMPHY_STAT1_PLL_RDY_TX@GOTPCREL(%rip), %rax
	movq	_COMPHY_STAT1_PLL_RDY_RX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	%r14, %rdi
	movl	%ecx, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_a38x_comphy_poll               ## TAILCALL
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PHY_MODE_ETHERNET,4,2          ## @PHY_MODE_ETHERNET
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GEN_SGMII_1_25GBPS,4,2         ## @GEN_SGMII_1_25GBPS
	.comm	_GEN_SGMII_3_125GBPS,4,2        ## @GEN_SGMII_3_125GBPS
	.comm	_COMPHY_STAT1,4,2               ## @COMPHY_STAT1
	.comm	_COMPHY_STAT1_PLL_RDY_TX,4,2    ## @COMPHY_STAT1_PLL_RDY_TX
	.comm	_COMPHY_STAT1_PLL_RDY_RX,4,2    ## @COMPHY_STAT1_PLL_RDY_RX
	.no_dead_strip	_a38x_comphy_set_mode
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.a38x_comphy_set_mode
l_switch.table.a38x_comphy_set_mode:
	.quad	_GEN_SGMII_1_25GBPS
	.quad	_GEN_SGMII_3_125GBPS
	.quad	_GEN_SGMII_1_25GBPS

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function a38x_comphy_set_mode
_a38x_comphy_set_mode:                  ; @a38x_comphy_set_mode
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x20, x2
	mov	x21, x1
	bl	_phy_get_drvdata
Lloh0:
	adrp	x8, _PHY_MODE_ETHERNET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PHY_MODE_ETHERNET@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w21
	b.ne	LBB0_3
; %bb.1:
	sub	w8, w20, #128
	cmp	w8, #3
	b.hs	LBB0_3
; %bb.2:
	mov	x19, x0
Lloh3:
	adrp	x9, l_switch.table.a38x_comphy_set_mode@PAGE
Lloh4:
	add	x9, x9, l_switch.table.a38x_comphy_set_mode@PAGEOFF
	ldr	x8, [x9, w8, sxtw #3]
	ldr	w1, [x8]
	mov	x2, x1
	bl	_a38x_comphy_set_speed
Lloh5:
	adrp	x8, _COMPHY_STAT1@GOTPAGE
Lloh6:
	ldr	x8, [x8, _COMPHY_STAT1@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	adrp	x8, _COMPHY_STAT1_PLL_RDY_TX@GOTPAGE
Lloh9:
	ldr	x8, [x8, _COMPHY_STAT1_PLL_RDY_TX@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _COMPHY_STAT1_PLL_RDY_RX@GOTPAGE
Lloh12:
	ldr	x9, [x9, _COMPHY_STAT1_PLL_RDY_RX@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x19
	mov	x3, x2
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_a38x_comphy_poll
LBB0_3:
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_PHY_MODE_ETHERNET,4,2          ; @PHY_MODE_ETHERNET
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GEN_SGMII_1_25GBPS,4,2         ; @GEN_SGMII_1_25GBPS
	.comm	_GEN_SGMII_3_125GBPS,4,2        ; @GEN_SGMII_3_125GBPS
	.comm	_COMPHY_STAT1,4,2               ; @COMPHY_STAT1
	.comm	_COMPHY_STAT1_PLL_RDY_TX,4,2    ; @COMPHY_STAT1_PLL_RDY_TX
	.comm	_COMPHY_STAT1_PLL_RDY_RX,4,2    ; @COMPHY_STAT1_PLL_RDY_RX
	.no_dead_strip	_a38x_comphy_set_mode
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.a38x_comphy_set_mode
l_switch.table.a38x_comphy_set_mode:
	.quad	_GEN_SGMII_1_25GBPS
	.quad	_GEN_SGMII_3_125GBPS
	.quad	_GEN_SGMII_1_25GBPS

.subsections_via_symbols
