	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_atl1c_get_speed_and_duplex     ## -- Begin function atl1c_get_speed_and_duplex
	.p2align	4, 0x90
_atl1c_get_speed_and_duplex:            ## @atl1c_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_GIGA_PSSR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-20(%rbp), %rdx
	callq	_atl1c_read_phy_reg
	testl	%eax, %eax
	je	LBB0_1
LBB0_7:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_1:
	movl	-20(%rbp), %ecx
	movq	_GIGA_PSSR_SPD_DPLX_RESOLVED@GOTPCREL(%rip), %rdx
	movl	$-1, %eax
	testl	%ecx, (%rdx)
	je	LBB0_7
## %bb.2:
	movq	_GIGA_PSSR_SPEED@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	andl	%ecx, %edx
	addl	$-128, %edx
	cmpl	$2, %edx
	ja	LBB0_7
## %bb.3:
	movslq	%edx, %rax
	leaq	l_switch.table.atl1c_get_speed_and_duplex(%rip), %rdx
	movq	(%rdx,%rax,8), %rax
	movl	(%rax), %eax
	movl	%eax, (%rbx)
	movq	_GIGA_PSSR_DPLX@GOTPCREL(%rip), %rax
	andl	(%rax), %ecx
	jne	LBB0_4
## %bb.5:
	movq	_HALF_DUPLEX@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_4:
	movq	_FULL_DUPLEX@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %eax
	movl	%eax, (%r14)
	xorl	%eax, %eax
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_MII_GIGA_PSSR,4,2              ## @MII_GIGA_PSSR
	.comm	_GIGA_PSSR_SPD_DPLX_RESOLVED,4,2 ## @GIGA_PSSR_SPD_DPLX_RESOLVED
	.comm	_GIGA_PSSR_SPEED,4,2            ## @GIGA_PSSR_SPEED
	.comm	_SPEED_1000,4,2                 ## @SPEED_1000
	.comm	_SPEED_100,4,2                  ## @SPEED_100
	.comm	_SPEED_10,4,2                   ## @SPEED_10
	.comm	_GIGA_PSSR_DPLX,4,2             ## @GIGA_PSSR_DPLX
	.comm	_FULL_DUPLEX,4,2                ## @FULL_DUPLEX
	.comm	_HALF_DUPLEX,4,2                ## @HALF_DUPLEX
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.atl1c_get_speed_and_duplex
l_switch.table.atl1c_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
	.globl	_atl1c_get_speed_and_duplex     ; -- Begin function atl1c_get_speed_and_duplex
	.p2align	2
_atl1c_get_speed_and_duplex:            ; @atl1c_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_GIGA_PSSR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MII_GIGA_PSSR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_atl1c_read_phy_reg
	cbnz	w0, LBB0_5
; %bb.1:
	ldr	w8, [sp, #12]
Lloh3:
	adrp	x9, _GIGA_PSSR_SPD_DPLX_RESOLVED@GOTPAGE
Lloh4:
	ldr	x9, [x9, _GIGA_PSSR_SPD_DPLX_RESOLVED@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.2:
Lloh6:
	adrp	x9, _GIGA_PSSR_SPEED@GOTPAGE
Lloh7:
	ldr	x9, [x9, _GIGA_PSSR_SPEED@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	and	w9, w9, w8
	sub	w9, w9, #128
	cmp	w9, #2
	b.hi	LBB0_4
; %bb.3:
	mov	w0, #0
Lloh9:
	adrp	x10, l_switch.table.atl1c_get_speed_and_duplex@PAGE
Lloh10:
	add	x10, x10, l_switch.table.atl1c_get_speed_and_duplex@PAGEOFF
	ldr	x9, [x10, w9, sxtw #3]
	ldr	w9, [x9]
	str	w9, [x20]
Lloh11:
	adrp	x9, _GIGA_PSSR_DPLX@GOTPAGE
Lloh12:
	ldr	x9, [x9, _GIGA_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_5
LBB0_4:
	mov	w0, #-1
LBB0_5:
	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	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_MII_GIGA_PSSR,4,2              ; @MII_GIGA_PSSR
	.comm	_GIGA_PSSR_SPD_DPLX_RESOLVED,4,2 ; @GIGA_PSSR_SPD_DPLX_RESOLVED
	.comm	_GIGA_PSSR_SPEED,4,2            ; @GIGA_PSSR_SPEED
	.comm	_SPEED_1000,4,2                 ; @SPEED_1000
	.comm	_SPEED_100,4,2                  ; @SPEED_100
	.comm	_SPEED_10,4,2                   ; @SPEED_10
	.comm	_GIGA_PSSR_DPLX,4,2             ; @GIGA_PSSR_DPLX
	.comm	_FULL_DUPLEX,4,2                ; @FULL_DUPLEX
	.comm	_HALF_DUPLEX,4,2                ; @HALF_DUPLEX
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.atl1c_get_speed_and_duplex
l_switch.table.atl1c_get_speed_and_duplex:
	.quad	_SPEED_10
	.quad	_SPEED_100
	.quad	_SPEED_1000

.subsections_via_symbols
