	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ql_phy_get_speed
_ql_phy_get_speed:                      ## @ql_phy_get_speed
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	subq	$16, %rsp
	cmpl	$128, (%rdi)
	jne	LBB0_6
## %bb.1:
	leaq	-4(%rbp), %rdx
	movl	$26, %esi
	callq	_ql_mii_read_reg
	testl	%eax, %eax
	js	LBB0_10
## %bb.2:
	movl	-4(%rbp), %ecx
	sarl	$8, %ecx
	andl	$3, %ecx
	je	LBB0_8
LBB0_3:
	cmpl	$1, %ecx
	je	LBB0_11
## %bb.4:
	movl	$-1, %eax
	cmpl	$2, %ecx
	jne	LBB0_13
## %bb.5:
	movq	_SPEED_1000@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_6:
	movq	_AUX_CONTROL_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-4(%rbp), %rdx
	callq	_ql_mii_read_reg
	testl	%eax, %eax
	js	LBB0_10
## %bb.7:
	movl	-4(%rbp), %ecx
	shrl	$3, %ecx
	andl	$3, %ecx
	jne	LBB0_3
LBB0_8:
	movq	_SPEED_10@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_10:
	xorl	%eax, %eax
	jmp	LBB0_13
LBB0_11:
	movq	_SPEED_100@GOTPCREL(%rip), %rax
LBB0_12:
	movl	(%rax), %eax
LBB0_13:
	addq	$16, %rsp
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AUX_CONTROL_STATUS,4,2         ## @AUX_CONTROL_STATUS
	.comm	_SPEED_1000,4,2                 ## @SPEED_1000
	.comm	_SPEED_100,4,2                  ## @SPEED_100
	.comm	_SPEED_10,4,2                   ## @SPEED_10
	.no_dead_strip	_ql_phy_get_speed
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ql_phy_get_speed
_ql_phy_get_speed:                      ; @ql_phy_get_speed
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #32
	.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
	ldr	w8, [x0]
	cmp	w8, #128
	b.ne	LBB0_6
; %bb.1:
	sub	x2, x29, #4
	mov	w1, #26
	bl	_ql_mii_read_reg
	tbnz	w0, #31, LBB0_9
; %bb.2:
	ldur	w8, [x29, #-4]
	asr	w8, w8, #8
	ands	w8, w8, #0x3
	b.eq	LBB0_8
LBB0_3:
	cmp	w8, #1
	b.eq	LBB0_10
; %bb.4:
	cmp	w8, #2
	b.ne	LBB0_12
; %bb.5:
Lloh0:
	adrp	x8, _SPEED_1000@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SPEED_1000@GOTPAGEOFF]
	b	LBB0_11
LBB0_6:
Lloh2:
	adrp	x8, _AUX_CONTROL_STATUS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AUX_CONTROL_STATUS@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	sub	x2, x29, #4
	bl	_ql_mii_read_reg
	tbnz	w0, #31, LBB0_9
; %bb.7:
	ldur	w8, [x29, #-4]
	lsr	w8, w8, #3
	ands	w8, w8, #0x3
	b.ne	LBB0_3
LBB0_8:
Lloh5:
	adrp	x8, _SPEED_10@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SPEED_10@GOTPAGEOFF]
	b	LBB0_11
LBB0_9:
	mov	w0, #0
	b	LBB0_13
LBB0_10:
Lloh7:
	adrp	x8, _SPEED_100@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SPEED_100@GOTPAGEOFF]
LBB0_11:
	ldr	w0, [x8]
	b	LBB0_13
LBB0_12:
	mov	w0, #-1
LBB0_13:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #32
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_AUX_CONTROL_STATUS,4,2         ; @AUX_CONTROL_STATUS
	.comm	_SPEED_1000,4,2                 ; @SPEED_1000
	.comm	_SPEED_100,4,2                  ; @SPEED_100
	.comm	_SPEED_10,4,2                   ; @SPEED_10
	.no_dead_strip	_ql_phy_get_speed
.subsections_via_symbols
