	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atl1_get_speed_and_duplex
_atl1_get_speed_and_duplex:             ## @atl1_get_speed_and_duplex
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r12
	movq	(%rdi), %rbx
	movq	(%rbx), %r15
	movq	_MII_ATLX_PSSR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-36(%rbp), %rdx
	callq	_atl1_read_phy_reg
	testq	%rax, %rax
	je	LBB0_1
LBB0_11:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movl	-36(%rbp), %eax
	movq	_MII_ATLX_PSSR_SPD_DPLX_RESOLVED@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_2
## %bb.3:
	movq	_MII_ATLX_PSSR_SPEED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	%eax, %ecx
	addl	$-128, %ecx
	cmpl	$3, %ecx
	jae	LBB0_4
## %bb.7:
	movslq	%ecx, %rcx
	leaq	l_switch.table.atl1_get_speed_and_duplex(%rip), %rdx
	movq	(%rdx,%rcx,8), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, (%r12)
	movq	_MII_ATLX_PSSR_DPLX@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	jne	LBB0_8
## %bb.9:
	movq	_HALF_DUPLEX@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_2:
	movq	_ATLX_ERR_PHY_RES@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	jmp	LBB0_11
LBB0_4:
	movq	%rbx, %rdi
	callq	_netif_msg_hw
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_dbg
LBB0_6:
	movq	_ATLX_ERR_PHY_SPEED@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	jmp	LBB0_11
LBB0_8:
	movq	_FULL_DUPLEX@GOTPCREL(%rip), %rax
LBB0_10:
	movl	(%rax), %eax
	movl	%eax, (%r14)
	xorl	%eax, %eax
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_MII_ATLX_PSSR,4,2              ## @MII_ATLX_PSSR
	.comm	_MII_ATLX_PSSR_SPD_DPLX_RESOLVED,4,2 ## @MII_ATLX_PSSR_SPD_DPLX_RESOLVED
	.comm	_ATLX_ERR_PHY_RES,8,3           ## @ATLX_ERR_PHY_RES
	.comm	_MII_ATLX_PSSR_SPEED,4,2        ## @MII_ATLX_PSSR_SPEED
	.comm	_SPEED_1000,4,2                 ## @SPEED_1000
	.comm	_SPEED_100,4,2                  ## @SPEED_100
	.comm	_SPEED_10,4,2                   ## @SPEED_10
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"error getting speed\n"

	.comm	_ATLX_ERR_PHY_SPEED,8,3         ## @ATLX_ERR_PHY_SPEED
	.comm	_MII_ATLX_PSSR_DPLX,4,2         ## @MII_ATLX_PSSR_DPLX
	.comm	_FULL_DUPLEX,4,2                ## @FULL_DUPLEX
	.comm	_HALF_DUPLEX,4,2                ## @HALF_DUPLEX
	.no_dead_strip	_atl1_get_speed_and_duplex
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.atl1_get_speed_and_duplex
l_switch.table.atl1_get_speed_and_duplex:
	.quad	_SPEED_10
	.quad	_SPEED_100
	.quad	_SPEED_1000

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function atl1_get_speed_and_duplex
_atl1_get_speed_and_duplex:             ; @atl1_get_speed_and_duplex
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x19, x2
	mov	x21, x1
	ldr	x22, [x0]
	ldr	x20, [x22]
Lloh0:
	adrp	x8, _MII_ATLX_PSSR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MII_ATLX_PSSR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_atl1_read_phy_reg
	cbz	x0, LBB0_2
LBB0_1:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_2:
	ldr	w8, [sp, #12]
Lloh3:
	adrp	x9, _MII_ATLX_PSSR_SPD_DPLX_RESOLVED@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MII_ATLX_PSSR_SPD_DPLX_RESOLVED@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.3:
Lloh6:
	adrp	x9, _MII_ATLX_PSSR_SPEED@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MII_ATLX_PSSR_SPEED@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	and	w9, w9, w8
	sub	w9, w9, #128
	cmp	w9, #3
	b.hs	LBB0_6
; %bb.4:
	mov	x0, #0
Lloh9:
	adrp	x10, l_switch.table.atl1_get_speed_and_duplex@PAGE
Lloh10:
	add	x10, x10, l_switch.table.atl1_get_speed_and_duplex@PAGEOFF
	ldr	x9, [x10, w9, sxtw #3]
	ldr	w9, [x9]
	str	w9, [x21]
Lloh11:
	adrp	x9, _MII_ATLX_PSSR_DPLX@GOTPAGE
Lloh12:
	ldr	x9, [x9, _MII_ATLX_PSSR_DPLX@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
Lloh14:
	adrp	x10, _HALF_DUPLEX@GOTPAGE
Lloh15:
	ldr	x10, [x10, _HALF_DUPLEX@GOTPAGEOFF]
Lloh16:
	adrp	x11, _FULL_DUPLEX@GOTPAGE
Lloh17:
	ldr	x11, [x11, _FULL_DUPLEX@GOTPAGEOFF]
	tst	w9, w8
	csel	x8, x10, x11, eq
	ldr	w8, [x8]
	str	w8, [x19]
	b	LBB0_1
LBB0_5:
Lloh18:
	adrp	x8, _ATLX_ERR_PHY_RES@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ATLX_ERR_PHY_RES@GOTPAGEOFF]
Lloh20:
	ldr	x0, [x8]
	b	LBB0_1
LBB0_6:
	mov	x0, x22
	bl	_netif_msg_hw
	cbz	w0, LBB0_8
; %bb.7:
Lloh21:
	adrp	x1, l_.str@PAGE
Lloh22:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_dbg
LBB0_8:
Lloh23:
	adrp	x8, _ATLX_ERR_PHY_SPEED@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ATLX_ERR_PHY_SPEED@GOTPAGEOFF]
Lloh25:
	ldr	x0, [x8]
	b	LBB0_1
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_MII_ATLX_PSSR,4,2              ; @MII_ATLX_PSSR
	.comm	_MII_ATLX_PSSR_SPD_DPLX_RESOLVED,4,2 ; @MII_ATLX_PSSR_SPD_DPLX_RESOLVED
	.comm	_ATLX_ERR_PHY_RES,8,3           ; @ATLX_ERR_PHY_RES
	.comm	_MII_ATLX_PSSR_SPEED,4,2        ; @MII_ATLX_PSSR_SPEED
	.comm	_SPEED_1000,4,2                 ; @SPEED_1000
	.comm	_SPEED_100,4,2                  ; @SPEED_100
	.comm	_SPEED_10,4,2                   ; @SPEED_10
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"error getting speed\n"

	.comm	_ATLX_ERR_PHY_SPEED,8,3         ; @ATLX_ERR_PHY_SPEED
	.comm	_MII_ATLX_PSSR_DPLX,4,2         ; @MII_ATLX_PSSR_DPLX
	.comm	_FULL_DUPLEX,4,2                ; @FULL_DUPLEX
	.comm	_HALF_DUPLEX,4,2                ; @HALF_DUPLEX
	.no_dead_strip	_atl1_get_speed_and_duplex
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.atl1_get_speed_and_duplex
l_switch.table.atl1_get_speed_and_duplex:
	.quad	_SPEED_10
	.quad	_SPEED_100
	.quad	_SPEED_1000

.subsections_via_symbols
