	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atl1c_phy_setup_adv
_atl1c_phy_setup_adv:                   ## @atl1c_phy_setup_adv
	.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
	movq	%rdi, %r14
	movq	_ADVERTISE_DEFAULT_CAP@GOTPCREL(%rip), %rax
	movq	_ADVERTISE_ALL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	(%rax), %ecx
	movq	_GIGA_CR_1000T_DEFAULT_CAP@GOTPCREL(%rip), %rax
	movq	_GIGA_CR_1000T_SPEED_MASK@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r15d
	notl	%r15d
	andl	(%rax), %r15d
	movl	(%rdi), %eax
	movq	_ADVERTISED_10baseT_Half@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edi
	andl	%eax, %edi
	movq	_ADVERTISE_10HALF@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r9d
	cmovnel	%r9d, %edi
	movq	_ADVERTISED_10baseT_Full@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	andl	%eax, %esi
	movq	_ADVERTISE_10FULL@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	cmovnel	%edx, %esi
	orl	%edi, %esi
	movq	_ADVERTISED_100baseT_Half@GOTPCREL(%rip), %rdi
	movl	(%rdi), %edi
	andl	%eax, %edi
	movq	_ADVERTISE_100HALF@GOTPCREL(%rip), %rbx
	movl	(%rbx), %r10d
	cmovnel	%r10d, %edi
	orl	%esi, %edi
	orl	%ecx, %edi
	movq	_ADVERTISED_100baseT_Full@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	andl	%eax, %esi
	movq	_ADVERTISE_100FULL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %ebx
	cmovnel	%ebx, %esi
	orl	%edi, %esi
	movq	_ADVERTISED_Autoneg@GOTPCREL(%rip), %rdi
	movl	(%rdi), %r8d
	orl	%r9d, %edx
	orl	%r10d, %edx
	orl	%ebx, %edx
	orl	%ecx, %edx
	testl	%eax, %r8d
	cmovel	%esi, %edx
	movq	_ATL1C_LINK_CAP_1000M@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, 4(%r14)
	je	LBB0_4
## %bb.1:
	movq	_ADVERTISED_1000baseT_Half@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	%eax, %ecx
	movq	_ADVERTISE_1000HALF@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	cmovnel	%esi, %ecx
	movq	_ADVERTISED_1000baseT_Full@GOTPCREL(%rip), %rdi
	movl	(%rdi), %edi
	andl	%eax, %edi
	movq	_ADVERTISE_1000FULL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %r9d
	cmovnel	%r9d, %edi
	testl	%eax, %r8d
	je	LBB0_2
## %bb.3:
	orl	%r15d, %esi
	orl	%r9d, %esi
	movl	%esi, %r15d
	jmp	LBB0_4
LBB0_2:
	orl	%r15d, %ecx
	orl	%edi, %ecx
	movl	%ecx, %r15d
LBB0_4:
	movq	_MII_ADVERTISE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_atl1c_write_phy_reg
	movq	%rax, %rcx
	movl	$-1, %eax
	testq	%rcx, %rcx
	jne	LBB0_6
## %bb.5:
	movq	_MII_CTRL1000@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%r15d, %edx
	callq	_atl1c_write_phy_reg
	movq	%rax, %rcx
	xorl	%eax, %eax
	negq	%rcx
	sbbl	%eax, %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ADVERTISE_DEFAULT_CAP,4,2      ## @ADVERTISE_DEFAULT_CAP
	.comm	_ADVERTISE_ALL,4,2              ## @ADVERTISE_ALL
	.comm	_GIGA_CR_1000T_DEFAULT_CAP,4,2  ## @GIGA_CR_1000T_DEFAULT_CAP
	.comm	_GIGA_CR_1000T_SPEED_MASK,4,2   ## @GIGA_CR_1000T_SPEED_MASK
	.comm	_ADVERTISED_10baseT_Half,4,2    ## @ADVERTISED_10baseT_Half
	.comm	_ADVERTISE_10HALF,4,2           ## @ADVERTISE_10HALF
	.comm	_ADVERTISED_10baseT_Full,4,2    ## @ADVERTISED_10baseT_Full
	.comm	_ADVERTISE_10FULL,4,2           ## @ADVERTISE_10FULL
	.comm	_ADVERTISED_100baseT_Half,4,2   ## @ADVERTISED_100baseT_Half
	.comm	_ADVERTISE_100HALF,4,2          ## @ADVERTISE_100HALF
	.comm	_ADVERTISED_100baseT_Full,4,2   ## @ADVERTISED_100baseT_Full
	.comm	_ADVERTISE_100FULL,4,2          ## @ADVERTISE_100FULL
	.comm	_ADVERTISED_Autoneg,4,2         ## @ADVERTISED_Autoneg
	.comm	_ATL1C_LINK_CAP_1000M,4,2       ## @ATL1C_LINK_CAP_1000M
	.comm	_ADVERTISED_1000baseT_Half,4,2  ## @ADVERTISED_1000baseT_Half
	.comm	_ADVERTISE_1000HALF,4,2         ## @ADVERTISE_1000HALF
	.comm	_ADVERTISED_1000baseT_Full,4,2  ## @ADVERTISED_1000baseT_Full
	.comm	_ADVERTISE_1000FULL,4,2         ## @ADVERTISE_1000FULL
	.comm	_MII_ADVERTISE,4,2              ## @MII_ADVERTISE
	.comm	_MII_CTRL1000,4,2               ## @MII_CTRL1000
	.no_dead_strip	_atl1c_phy_setup_adv
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function atl1c_phy_setup_adv
_atl1c_phy_setup_adv:                   ; @atl1c_phy_setup_adv
	.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	x19, x0
Lloh0:
	adrp	x8, _ADVERTISE_DEFAULT_CAP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ADVERTISE_DEFAULT_CAP@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _ADVERTISE_ALL@GOTPAGE
Lloh4:
	ldr	x9, [x9, _ADVERTISE_ALL@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	bic	w8, w8, w9
Lloh6:
	adrp	x9, _GIGA_CR_1000T_DEFAULT_CAP@GOTPAGE
Lloh7:
	ldr	x9, [x9, _GIGA_CR_1000T_DEFAULT_CAP@GOTPAGEOFF]
Lloh8:
	adrp	x10, _GIGA_CR_1000T_SPEED_MASK@GOTPAGE
Lloh9:
	ldr	x10, [x10, _GIGA_CR_1000T_SPEED_MASK@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
Lloh11:
	ldr	w10, [x10]
	bic	w20, w9, w10
Lloh12:
	adrp	x9, _ADVERTISED_10baseT_Half@GOTPAGE
Lloh13:
	ldr	x9, [x9, _ADVERTISED_10baseT_Half@GOTPAGEOFF]
Lloh14:
	ldr	w10, [x9]
Lloh15:
	adrp	x9, _ADVERTISE_10HALF@GOTPAGE
Lloh16:
	ldr	x9, [x9, _ADVERTISE_10HALF@GOTPAGEOFF]
Lloh17:
	ldr	w11, [x9]
	ldp	w9, w12, [x0]
	tst	w10, w9
	csel	w10, wzr, w11, eq
	orr	w10, w10, w8
Lloh18:
	adrp	x13, _ADVERTISED_10baseT_Full@GOTPAGE
Lloh19:
	ldr	x13, [x13, _ADVERTISED_10baseT_Full@GOTPAGEOFF]
Lloh20:
	adrp	x14, _ADVERTISE_10FULL@GOTPAGE
Lloh21:
	ldr	x14, [x14, _ADVERTISE_10FULL@GOTPAGEOFF]
Lloh22:
	ldr	w13, [x13]
Lloh23:
	ldr	w14, [x14]
	tst	w13, w9
	csel	w13, wzr, w14, eq
Lloh24:
	adrp	x15, _ADVERTISED_100baseT_Half@GOTPAGE
Lloh25:
	ldr	x15, [x15, _ADVERTISED_100baseT_Half@GOTPAGEOFF]
	orr	w10, w10, w13
Lloh26:
	ldr	w13, [x15]
Lloh27:
	adrp	x15, _ADVERTISE_100HALF@GOTPAGE
Lloh28:
	ldr	x15, [x15, _ADVERTISE_100HALF@GOTPAGEOFF]
Lloh29:
	ldr	w15, [x15]
	tst	w13, w9
	csel	w13, wzr, w15, eq
	orr	w10, w13, w10
Lloh30:
	adrp	x13, _ADVERTISED_100baseT_Full@GOTPAGE
Lloh31:
	ldr	x13, [x13, _ADVERTISED_100baseT_Full@GOTPAGEOFF]
Lloh32:
	adrp	x16, _ADVERTISE_100FULL@GOTPAGE
Lloh33:
	ldr	x16, [x16, _ADVERTISE_100FULL@GOTPAGEOFF]
Lloh34:
	ldr	w13, [x13]
Lloh35:
	ldr	w16, [x16]
	tst	w13, w9
	csel	w13, wzr, w16, eq
	orr	w13, w10, w13
	orr	w11, w14, w11
Lloh36:
	adrp	x10, _ADVERTISED_Autoneg@GOTPAGE
Lloh37:
	ldr	x10, [x10, _ADVERTISED_Autoneg@GOTPAGEOFF]
Lloh38:
	ldr	w10, [x10]
	ands	w10, w10, w9
	orr	w11, w11, w15
	orr	w8, w11, w8
	orr	w8, w8, w16
	csel	w2, w13, w8, eq
Lloh39:
	adrp	x8, _ATL1C_LINK_CAP_1000M@GOTPAGE
Lloh40:
	ldr	x8, [x8, _ATL1C_LINK_CAP_1000M@GOTPAGEOFF]
Lloh41:
	ldr	w8, [x8]
	tst	w8, w12
	b.eq	LBB0_2
; %bb.1:
Lloh42:
	adrp	x8, _ADVERTISED_1000baseT_Half@GOTPAGE
Lloh43:
	ldr	x8, [x8, _ADVERTISED_1000baseT_Half@GOTPAGEOFF]
Lloh44:
	adrp	x11, _ADVERTISE_1000HALF@GOTPAGE
Lloh45:
	ldr	x11, [x11, _ADVERTISE_1000HALF@GOTPAGEOFF]
Lloh46:
	ldr	w8, [x8]
Lloh47:
	ldr	w11, [x11]
	tst	w8, w9
	csel	w8, wzr, w11, eq
Lloh48:
	adrp	x12, _ADVERTISED_1000baseT_Full@GOTPAGE
Lloh49:
	ldr	x12, [x12, _ADVERTISED_1000baseT_Full@GOTPAGEOFF]
	orr	w8, w8, w20
Lloh50:
	ldr	w12, [x12]
Lloh51:
	adrp	x13, _ADVERTISE_1000FULL@GOTPAGE
Lloh52:
	ldr	x13, [x13, _ADVERTISE_1000FULL@GOTPAGEOFF]
Lloh53:
	ldr	w13, [x13]
	tst	w12, w9
	csel	w9, wzr, w13, eq
	orr	w8, w8, w9
	orr	w9, w11, w20
	orr	w9, w9, w13
	cmp	w10, #0
	csel	w20, w8, w9, eq
LBB0_2:
Lloh54:
	adrp	x8, _MII_ADVERTISE@GOTPAGE
Lloh55:
	ldr	x8, [x8, _MII_ADVERTISE@GOTPAGEOFF]
Lloh56:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_atl1c_write_phy_reg
	cbz	x0, LBB0_4
; %bb.3:
	mov	w0, #-1
	b	LBB0_5
LBB0_4:
Lloh57:
	adrp	x8, _MII_CTRL1000@GOTPAGE
Lloh58:
	ldr	x8, [x8, _MII_CTRL1000@GOTPAGEOFF]
Lloh59:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_atl1c_write_phy_reg
	cmp	x0, #0
	csetm	w0, ne
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh34
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh22
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh10
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh47
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh46
	.loh AdrpLdrGotLdr	Lloh54, Lloh55, Lloh56
	.loh AdrpLdrGotLdr	Lloh57, Lloh58, Lloh59
	.cfi_endproc
                                        ; -- End function
	.comm	_ADVERTISE_DEFAULT_CAP,4,2      ; @ADVERTISE_DEFAULT_CAP
	.comm	_ADVERTISE_ALL,4,2              ; @ADVERTISE_ALL
	.comm	_GIGA_CR_1000T_DEFAULT_CAP,4,2  ; @GIGA_CR_1000T_DEFAULT_CAP
	.comm	_GIGA_CR_1000T_SPEED_MASK,4,2   ; @GIGA_CR_1000T_SPEED_MASK
	.comm	_ADVERTISED_10baseT_Half,4,2    ; @ADVERTISED_10baseT_Half
	.comm	_ADVERTISE_10HALF,4,2           ; @ADVERTISE_10HALF
	.comm	_ADVERTISED_10baseT_Full,4,2    ; @ADVERTISED_10baseT_Full
	.comm	_ADVERTISE_10FULL,4,2           ; @ADVERTISE_10FULL
	.comm	_ADVERTISED_100baseT_Half,4,2   ; @ADVERTISED_100baseT_Half
	.comm	_ADVERTISE_100HALF,4,2          ; @ADVERTISE_100HALF
	.comm	_ADVERTISED_100baseT_Full,4,2   ; @ADVERTISED_100baseT_Full
	.comm	_ADVERTISE_100FULL,4,2          ; @ADVERTISE_100FULL
	.comm	_ADVERTISED_Autoneg,4,2         ; @ADVERTISED_Autoneg
	.comm	_ATL1C_LINK_CAP_1000M,4,2       ; @ATL1C_LINK_CAP_1000M
	.comm	_ADVERTISED_1000baseT_Half,4,2  ; @ADVERTISED_1000baseT_Half
	.comm	_ADVERTISE_1000HALF,4,2         ; @ADVERTISE_1000HALF
	.comm	_ADVERTISED_1000baseT_Full,4,2  ; @ADVERTISED_1000baseT_Full
	.comm	_ADVERTISE_1000FULL,4,2         ; @ADVERTISE_1000FULL
	.comm	_MII_ADVERTISE,4,2              ; @MII_ADVERTISE
	.comm	_MII_CTRL1000,4,2               ; @MII_CTRL1000
	.no_dead_strip	_atl1c_phy_setup_adv
.subsections_via_symbols
