	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atl2_get_speed_and_duplex
_atl2_get_speed_and_duplex:             ## @atl2_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	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdx, %r14
	movq	%rsi, %rbx
	movq	_MII_ATLX_PSSR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-20(%rbp), %rdx
	callq	_atl2_read_phy_reg
	testq	%rax, %rax
	jne	LBB0_11
## %bb.1:
	movl	-20(%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
	cmpl	$129, %ecx
	je	LBB0_4
## %bb.5:
	cmpl	$128, %ecx
	jne	LBB0_12
## %bb.6:
	movq	_SPEED_10@GOTPCREL(%rip), %rcx
	jmp	LBB0_7
LBB0_2:
	movq	_ATLX_ERR_PHY_RES@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	jmp	LBB0_11
LBB0_4:
	movq	_SPEED_100@GOTPCREL(%rip), %rcx
LBB0_7:
	movl	(%rcx), %ecx
	movl	%ecx, (%rbx)
	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_12:
	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
LBB0_11:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.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_100,4,2                  ## @SPEED_100
	.comm	_SPEED_10,4,2                   ## @SPEED_10
	.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	_atl2_get_speed_and_duplex
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function atl2_get_speed_and_duplex
_atl2_get_speed_and_duplex:             ; @atl2_get_speed_and_duplex
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x2
	mov	x20, x1
Lloh0:
	adrp	x8, _MII_ATLX_PSSR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MII_ATLX_PSSR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_atl2_read_phy_reg
	cbnz	x0, LBB0_10
; %bb.1:
	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.2:
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
	cmp	w9, #129
	b.eq	LBB0_6
; %bb.3:
	cmp	w9, #128
	b.ne	LBB0_8
; %bb.4:
Lloh9:
	adrp	x9, _SPEED_10@GOTPAGE
Lloh10:
	ldr	x9, [x9, _SPEED_10@GOTPAGEOFF]
	b	LBB0_7
LBB0_5:
Lloh11:
	adrp	x8, _ATLX_ERR_PHY_RES@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ATLX_ERR_PHY_RES@GOTPAGEOFF]
	b	LBB0_9
LBB0_6:
Lloh13:
	adrp	x9, _SPEED_100@GOTPAGE
Lloh14:
	ldr	x9, [x9, _SPEED_100@GOTPAGEOFF]
LBB0_7:
	mov	x0, #0
	ldr	w9, [x9]
	str	w9, [x20]
Lloh15:
	adrp	x9, _MII_ATLX_PSSR_DPLX@GOTPAGE
Lloh16:
	ldr	x9, [x9, _MII_ATLX_PSSR_DPLX@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
Lloh18:
	adrp	x10, _HALF_DUPLEX@GOTPAGE
Lloh19:
	ldr	x10, [x10, _HALF_DUPLEX@GOTPAGEOFF]
Lloh20:
	adrp	x11, _FULL_DUPLEX@GOTPAGE
Lloh21:
	ldr	x11, [x11, _FULL_DUPLEX@GOTPAGEOFF]
	tst	w9, w8
	csel	x8, x10, x11, eq
	ldr	w8, [x8]
	str	w8, [x19]
	b	LBB0_10
LBB0_8:
Lloh22:
	adrp	x8, _ATLX_ERR_PHY_SPEED@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ATLX_ERR_PHY_SPEED@GOTPAGEOFF]
LBB0_9:
	ldr	x0, [x8]
LBB0_10:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh22, Lloh23
	.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_100,4,2                  ; @SPEED_100
	.comm	_SPEED_10,4,2                   ; @SPEED_10
	.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	_atl2_get_speed_and_duplex
.subsections_via_symbols
