	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atl1_nway_reset
_atl1_nway_reset:                       ## @atl1_nway_reset
	.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	%rdi, %rbx
	callq	_netdev_priv
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_netif_running
	testq	%rax, %rax
	je	LBB0_13
## %bb.1:
	movq	%r14, %rdi
	callq	_atl1_down
	movl	(%r14), %eax
	movq	_MEDIA_TYPE_AUTO_SENSOR@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_3
## %bb.2:
	movq	_MEDIA_TYPE_1000M_FULL@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_3
## %bb.4:
	cmpl	$128, %eax
	je	LBB0_10
## %bb.5:
	cmpl	$129, %eax
	je	LBB0_9
## %bb.6:
	cmpl	$130, %eax
	jne	LBB0_11
## %bb.7:
	movq	_MII_CR_FULL_DUPLEX@GOTPCREL(%rip), %rax
	movq	_MII_CR_SPEED_100@GOTPCREL(%rip), %rcx
	jmp	LBB0_8
LBB0_3:
	movq	_MII_CR_AUTO_NEG_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_MII_CR_RESET@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_10:
	movq	_MII_CR_FULL_DUPLEX@GOTPCREL(%rip), %rax
	movq	_MII_CR_SPEED_10@GOTPCREL(%rip), %rcx
LBB0_8:
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	_MII_CR_RESET@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_9:
	movq	_MII_CR_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_MII_CR_SPEED_100@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_11:
	movq	_MII_CR_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_MII_CR_SPEED_10@GOTPCREL(%rip), %rax
LBB0_12:
	orl	(%rax), %edx
	movq	_MII_BMCR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_atl1_write_phy_reg
	movq	%r14, %rdi
	callq	_atl1_up
LBB0_13:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MEDIA_TYPE_AUTO_SENSOR,4,2     ## @MEDIA_TYPE_AUTO_SENSOR
	.comm	_MEDIA_TYPE_1000M_FULL,4,2      ## @MEDIA_TYPE_1000M_FULL
	.comm	_MII_CR_RESET,4,2               ## @MII_CR_RESET
	.comm	_MII_CR_AUTO_NEG_EN,4,2         ## @MII_CR_AUTO_NEG_EN
	.comm	_MII_CR_FULL_DUPLEX,4,2         ## @MII_CR_FULL_DUPLEX
	.comm	_MII_CR_SPEED_100,4,2           ## @MII_CR_SPEED_100
	.comm	_MII_CR_SPEED_10,4,2            ## @MII_CR_SPEED_10
	.comm	_MII_BMCR,4,2                   ## @MII_BMCR
	.no_dead_strip	_atl1_nway_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function atl1_nway_reset
_atl1_nway_reset:                       ; @atl1_nway_reset
	.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, x0
	bl	_netdev_priv
	mov	x19, x0
	mov	x0, x20
	bl	_netif_running
	cbz	x0, LBB0_11
; %bb.1:
	mov	x0, x19
	bl	_atl1_down
	ldr	w8, [x19]
Lloh0:
	adrp	x9, _MEDIA_TYPE_AUTO_SENSOR@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MEDIA_TYPE_AUTO_SENSOR@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
Lloh3:
	adrp	x10, _MEDIA_TYPE_1000M_FULL@GOTPAGE
Lloh4:
	ldr	x10, [x10, _MEDIA_TYPE_1000M_FULL@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	cmp	w8, w9
	ccmp	w8, w10, #4, ne
	b.ne	LBB0_3
; %bb.2:
Lloh6:
	adrp	x8, _MII_CR_AUTO_NEG_EN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MII_CR_AUTO_NEG_EN@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	b	LBB0_9
LBB0_3:
	cmp	w8, #128
	b.eq	LBB0_7
; %bb.4:
	cmp	w8, #129
	b.eq	LBB0_12
; %bb.5:
	cmp	w8, #130
	b.ne	LBB0_13
; %bb.6:
Lloh9:
	adrp	x8, _MII_CR_FULL_DUPLEX@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MII_CR_FULL_DUPLEX@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x9, _MII_CR_SPEED_100@GOTPAGE
Lloh13:
	ldr	x9, [x9, _MII_CR_SPEED_100@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh14:
	adrp	x8, _MII_CR_FULL_DUPLEX@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MII_CR_FULL_DUPLEX@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
Lloh17:
	adrp	x9, _MII_CR_SPEED_10@GOTPAGE
Lloh18:
	ldr	x9, [x9, _MII_CR_SPEED_10@GOTPAGEOFF]
LBB0_8:
	ldr	w9, [x9]
	orr	w8, w9, w8
LBB0_9:
Lloh19:
	adrp	x9, _MII_CR_RESET@GOTPAGE
Lloh20:
	ldr	x9, [x9, _MII_CR_RESET@GOTPAGEOFF]
LBB0_10:
	ldr	w9, [x9]
	orr	w2, w8, w9
Lloh21:
	adrp	x8, _MII_BMCR@GOTPAGE
Lloh22:
	ldr	x8, [x8, _MII_BMCR@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_atl1_write_phy_reg
	mov	x0, x19
	bl	_atl1_up
LBB0_11:
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_12:
Lloh24:
	adrp	x8, _MII_CR_RESET@GOTPAGE
Lloh25:
	ldr	x8, [x8, _MII_CR_RESET@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
Lloh27:
	adrp	x9, _MII_CR_SPEED_100@GOTPAGE
Lloh28:
	ldr	x9, [x9, _MII_CR_SPEED_100@GOTPAGEOFF]
	b	LBB0_10
LBB0_13:
Lloh29:
	adrp	x8, _MII_CR_RESET@GOTPAGE
Lloh30:
	ldr	x8, [x8, _MII_CR_RESET@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
Lloh32:
	adrp	x9, _MII_CR_SPEED_10@GOTPAGE
Lloh33:
	ldr	x9, [x9, _MII_CR_SPEED_10@GOTPAGEOFF]
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_MEDIA_TYPE_AUTO_SENSOR,4,2     ; @MEDIA_TYPE_AUTO_SENSOR
	.comm	_MEDIA_TYPE_1000M_FULL,4,2      ; @MEDIA_TYPE_1000M_FULL
	.comm	_MII_CR_RESET,4,2               ; @MII_CR_RESET
	.comm	_MII_CR_AUTO_NEG_EN,4,2         ; @MII_CR_AUTO_NEG_EN
	.comm	_MII_CR_FULL_DUPLEX,4,2         ; @MII_CR_FULL_DUPLEX
	.comm	_MII_CR_SPEED_100,4,2           ; @MII_CR_SPEED_100
	.comm	_MII_CR_SPEED_10,4,2            ; @MII_CR_SPEED_10
	.comm	_MII_BMCR,4,2                   ; @MII_BMCR
	.no_dead_strip	_atl1_nway_reset
.subsections_via_symbols
