	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function setup_sgmii_internal_phy
_setup_sgmii_internal_phy:              ## @setup_sgmii_internal_phy
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	xorl	%edi, %edi
	cmpl	$0, (%rbx)
	sete	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_1
## %bb.15:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_1:
	movq	_IF_MODE_SGMII_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	testq	%r14, %r14
	je	LBB0_2
## %bb.3:
	movl	(%r14), %eax
	cmpl	$10, %eax
	je	LBB0_8
## %bb.4:
	cmpl	$100, %eax
	jne	LBB0_6
## %bb.5:
	movq	_IF_MODE_SGMII_SPEED_100M@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_2:
	movq	_IF_MODE_USE_SGMII_AN@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_6:
	movq	_IF_MODE_SGMII_SPEED_1G@GOTPCREL(%rip), %rax
LBB0_7:
	orl	(%rax), %edx
LBB0_8:
	cmpl	$0, 4(%r14)
	jne	LBB0_11
## %bb.9:
	movq	_IF_MODE_SGMII_DUPLEX_HALF@GOTPCREL(%rip), %rax
LBB0_10:
	orl	(%rax), %edx
LBB0_11:
	movl	(%rbx), %edi
	movq	_MDIO_SGMII_IF_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_phy_write
	movq	_MDIO_SGMII_DEV_ABIL_SGMII_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	(%rbx), %edi
	movq	_MDIO_SGMII_DEV_ABIL_SGMII@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_phy_write
	movl	(%rbx), %edi
	movq	_MDIO_SGMII_LINK_TMR_H@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_LINK_TMR_H@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_phy_write
	movl	(%rbx), %edi
	movq	_MDIO_SGMII_LINK_TMR_L@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_LINK_TMR_L@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_phy_write
	movq	_SGMII_CR_DEF_VAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	testq	%r14, %r14
	je	LBB0_12
## %bb.13:
	movq	_SGMII_CR_AN_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, %edx
	jmp	LBB0_14
LBB0_12:
	movq	_SGMII_CR_RESTART_AN@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
LBB0_14:
	movl	(%rbx), %edi
	xorl	%esi, %esi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_phy_write                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_IF_MODE_SGMII_EN,4,2           ## @IF_MODE_SGMII_EN
	.comm	_IF_MODE_USE_SGMII_AN,4,2       ## @IF_MODE_USE_SGMII_AN
	.comm	_IF_MODE_SGMII_SPEED_100M,4,2   ## @IF_MODE_SGMII_SPEED_100M
	.comm	_IF_MODE_SGMII_SPEED_1G,4,2     ## @IF_MODE_SGMII_SPEED_1G
	.comm	_IF_MODE_SGMII_DUPLEX_HALF,4,2  ## @IF_MODE_SGMII_DUPLEX_HALF
	.comm	_MDIO_SGMII_IF_MODE,4,2         ## @MDIO_SGMII_IF_MODE
	.comm	_MDIO_SGMII_DEV_ABIL_SGMII_MODE,4,2 ## @MDIO_SGMII_DEV_ABIL_SGMII_MODE
	.comm	_MDIO_SGMII_DEV_ABIL_SGMII,4,2  ## @MDIO_SGMII_DEV_ABIL_SGMII
	.comm	_MDIO_SGMII_LINK_TMR_H,4,2      ## @MDIO_SGMII_LINK_TMR_H
	.comm	_LINK_TMR_H,4,2                 ## @LINK_TMR_H
	.comm	_MDIO_SGMII_LINK_TMR_L,4,2      ## @MDIO_SGMII_LINK_TMR_L
	.comm	_LINK_TMR_L,4,2                 ## @LINK_TMR_L
	.comm	_SGMII_CR_DEF_VAL,4,2           ## @SGMII_CR_DEF_VAL
	.comm	_SGMII_CR_RESTART_AN,4,2        ## @SGMII_CR_RESTART_AN
	.comm	_SGMII_CR_AN_EN,4,2             ## @SGMII_CR_AN_EN
	.no_dead_strip	_setup_sgmii_internal_phy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function setup_sgmii_internal_phy
_setup_sgmii_internal_phy:              ; @setup_sgmii_internal_phy
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	mov	x19, x0
	ldr	w8, [x0]
	cmp	w8, #0
	cset	w0, eq
	bl	_WARN_ON
	cbz	x0, LBB0_2
; %bb.1:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_2:
Lloh0:
	adrp	x8, _IF_MODE_SGMII_EN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IF_MODE_SGMII_EN@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	cbz	x20, LBB0_6
; %bb.3:
	ldr	w8, [x20]
	cmp	w8, #10
	b.eq	LBB0_9
; %bb.4:
	cmp	w8, #100
	b.ne	LBB0_7
; %bb.5:
Lloh3:
	adrp	x8, _IF_MODE_SGMII_SPEED_100M@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IF_MODE_SGMII_SPEED_100M@GOTPAGEOFF]
	b	LBB0_8
LBB0_6:
Lloh5:
	adrp	x8, _IF_MODE_USE_SGMII_AN@GOTPAGE
Lloh6:
	ldr	x8, [x8, _IF_MODE_USE_SGMII_AN@GOTPAGEOFF]
	b	LBB0_11
LBB0_7:
Lloh7:
	adrp	x8, _IF_MODE_SGMII_SPEED_1G@GOTPAGE
Lloh8:
	ldr	x8, [x8, _IF_MODE_SGMII_SPEED_1G@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	orr	w2, w8, w2
LBB0_9:
	ldr	w8, [x20, #4]
	cbnz	w8, LBB0_12
; %bb.10:
Lloh9:
	adrp	x8, _IF_MODE_SGMII_DUPLEX_HALF@GOTPAGE
Lloh10:
	ldr	x8, [x8, _IF_MODE_SGMII_DUPLEX_HALF@GOTPAGEOFF]
LBB0_11:
	ldr	w8, [x8]
	orr	w2, w8, w2
LBB0_12:
	ldr	w0, [x19]
Lloh11:
	adrp	x8, _MDIO_SGMII_IF_MODE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MDIO_SGMII_IF_MODE@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	bl	_phy_write
Lloh14:
	adrp	x8, _MDIO_SGMII_DEV_ABIL_SGMII_MODE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MDIO_SGMII_DEV_ABIL_SGMII_MODE@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	ldr	w0, [x19]
Lloh17:
	adrp	x8, _MDIO_SGMII_DEV_ABIL_SGMII@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MDIO_SGMII_DEV_ABIL_SGMII@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	bl	_phy_write
	ldr	w0, [x19]
Lloh20:
	adrp	x8, _MDIO_SGMII_LINK_TMR_H@GOTPAGE
Lloh21:
	ldr	x8, [x8, _MDIO_SGMII_LINK_TMR_H@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
Lloh23:
	adrp	x8, _LINK_TMR_H@GOTPAGE
Lloh24:
	ldr	x8, [x8, _LINK_TMR_H@GOTPAGEOFF]
Lloh25:
	ldr	w2, [x8]
	bl	_phy_write
	ldr	w0, [x19]
Lloh26:
	adrp	x8, _MDIO_SGMII_LINK_TMR_L@GOTPAGE
Lloh27:
	ldr	x8, [x8, _MDIO_SGMII_LINK_TMR_L@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
Lloh29:
	adrp	x8, _LINK_TMR_L@GOTPAGE
Lloh30:
	ldr	x8, [x8, _LINK_TMR_L@GOTPAGEOFF]
Lloh31:
	ldr	w2, [x8]
	bl	_phy_write
Lloh32:
	adrp	x8, _SGMII_CR_DEF_VAL@GOTPAGE
Lloh33:
	ldr	x8, [x8, _SGMII_CR_DEF_VAL@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	cbz	x20, LBB0_14
; %bb.13:
Lloh35:
	adrp	x9, _SGMII_CR_AN_EN@GOTPAGE
Lloh36:
	ldr	x9, [x9, _SGMII_CR_AN_EN@GOTPAGEOFF]
Lloh37:
	ldr	w9, [x9]
	bic	w2, w8, w9
	b	LBB0_15
LBB0_14:
Lloh38:
	adrp	x9, _SGMII_CR_RESTART_AN@GOTPAGE
Lloh39:
	ldr	x9, [x9, _SGMII_CR_RESTART_AN@GOTPAGEOFF]
Lloh40:
	ldr	w9, [x9]
	orr	w2, w9, w8
LBB0_15:
	ldr	w0, [x19]
	mov	w1, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_phy_write
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.comm	_IF_MODE_SGMII_EN,4,2           ; @IF_MODE_SGMII_EN
	.comm	_IF_MODE_USE_SGMII_AN,4,2       ; @IF_MODE_USE_SGMII_AN
	.comm	_IF_MODE_SGMII_SPEED_100M,4,2   ; @IF_MODE_SGMII_SPEED_100M
	.comm	_IF_MODE_SGMII_SPEED_1G,4,2     ; @IF_MODE_SGMII_SPEED_1G
	.comm	_IF_MODE_SGMII_DUPLEX_HALF,4,2  ; @IF_MODE_SGMII_DUPLEX_HALF
	.comm	_MDIO_SGMII_IF_MODE,4,2         ; @MDIO_SGMII_IF_MODE
	.comm	_MDIO_SGMII_DEV_ABIL_SGMII_MODE,4,2 ; @MDIO_SGMII_DEV_ABIL_SGMII_MODE
	.comm	_MDIO_SGMII_DEV_ABIL_SGMII,4,2  ; @MDIO_SGMII_DEV_ABIL_SGMII
	.comm	_MDIO_SGMII_LINK_TMR_H,4,2      ; @MDIO_SGMII_LINK_TMR_H
	.comm	_LINK_TMR_H,4,2                 ; @LINK_TMR_H
	.comm	_MDIO_SGMII_LINK_TMR_L,4,2      ; @MDIO_SGMII_LINK_TMR_L
	.comm	_LINK_TMR_L,4,2                 ; @LINK_TMR_L
	.comm	_SGMII_CR_DEF_VAL,4,2           ; @SGMII_CR_DEF_VAL
	.comm	_SGMII_CR_RESTART_AN,4,2        ; @SGMII_CR_RESTART_AN
	.comm	_SGMII_CR_AN_EN,4,2             ; @SGMII_CR_AN_EN
	.no_dead_strip	_setup_sgmii_internal_phy
.subsections_via_symbols
