	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bgmac_mac_speed
_bgmac_mac_speed:                       ## @bgmac_mac_speed
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_BGMAC_CMDCFG_ES_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_BGMAC_CMDCFG_HD@GOTPCREL(%rip), %r12
	movl	(%r12), %ebx
	movl	(%rdi), %edx
	leal	-128(%rdx), %eax
	cmpl	$3, %eax
	ja	LBB0_7
## %bb.1:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_6:
	movq	_BGMAC_CMDCFG_ES_2500@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_7:
	movl	16(%r14), %edi
	leaq	L_.str(%rip), %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_dev_err
	movl	(%r12), %ecx
	xorl	%eax, %eax
	jmp	LBB0_8
LBB0_5:
	movq	_BGMAC_CMDCFG_ES_1000@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_4:
	movq	_BGMAC_CMDCFG_ES_100@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_2:
	movq	_BGMAC_CMDCFG_ES_10@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %eax
	movl	%ebx, %ecx
LBB0_8:
	movq	8(%r14), %rsi
	movq	_DUPLEX_HALF@GOTPCREL(%rip), %rdi
	xorl	%edx, %edx
	cmpq	(%rdi), %rsi
	cmovel	%ecx, %edx
	orl	%eax, %edx
	orl	%r15d, %ebx
	notl	%ebx
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	$1, %ecx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_bgmac_cmdcfg_maskset           ## TAILCALL
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
LJTI0_0:
	.long	L0_0_set_6
	.long	L0_0_set_5
	.long	L0_0_set_4
	.long	L0_0_set_2
	.end_data_region
                                        ## -- End function
	.comm	_BGMAC_CMDCFG_ES_MASK,4,2       ## @BGMAC_CMDCFG_ES_MASK
	.comm	_BGMAC_CMDCFG_HD,4,2            ## @BGMAC_CMDCFG_HD
	.comm	_BGMAC_CMDCFG_ES_10,4,2         ## @BGMAC_CMDCFG_ES_10
	.comm	_BGMAC_CMDCFG_ES_100,4,2        ## @BGMAC_CMDCFG_ES_100
	.comm	_BGMAC_CMDCFG_ES_1000,4,2       ## @BGMAC_CMDCFG_ES_1000
	.comm	_BGMAC_CMDCFG_ES_2500,4,2       ## @BGMAC_CMDCFG_ES_2500
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unsupported speed: %d\n"

	.comm	_DUPLEX_HALF,8,3                ## @DUPLEX_HALF
	.no_dead_strip	_bgmac_mac_speed
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bgmac_mac_speed
_bgmac_mac_speed:                       ; @bgmac_mac_speed
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x0
Lloh0:
	adrp	x8, _BGMAC_CMDCFG_ES_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BGMAC_CMDCFG_ES_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
Lloh3:
	adrp	x22, _BGMAC_CMDCFG_HD@GOTPAGE
Lloh4:
	ldr	x22, [x22, _BGMAC_CMDCFG_HD@GOTPAGEOFF]
	ldr	w21, [x22]
	ldr	w2, [x0]
	sub	w8, w2, #128
	cmp	w8, #3
	b.hi	LBB0_3
; %bb.1:
Lloh5:
	adrp	x9, lJTI0_0@PAGE
Lloh6:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
Lloh7:
	adrp	x8, _BGMAC_CMDCFG_ES_2500@GOTPAGE
Lloh8:
	ldr	x8, [x8, _BGMAC_CMDCFG_ES_2500@GOTPAGEOFF]
	b	LBB0_7
LBB0_3:
	ldr	w0, [x19, #16]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	mov	w8, #0
	ldr	w9, [x22]
	b	LBB0_8
LBB0_4:
Lloh11:
	adrp	x8, _BGMAC_CMDCFG_ES_1000@GOTPAGE
Lloh12:
	ldr	x8, [x8, _BGMAC_CMDCFG_ES_1000@GOTPAGEOFF]
	b	LBB0_7
LBB0_5:
Lloh13:
	adrp	x8, _BGMAC_CMDCFG_ES_100@GOTPAGE
Lloh14:
	ldr	x8, [x8, _BGMAC_CMDCFG_ES_100@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh15:
	adrp	x8, _BGMAC_CMDCFG_ES_10@GOTPAGE
Lloh16:
	ldr	x8, [x8, _BGMAC_CMDCFG_ES_10@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	mov	x9, x21
LBB0_8:
	ldr	x10, [x19, #8]
Lloh17:
	adrp	x11, _DUPLEX_HALF@GOTPAGE
Lloh18:
	ldr	x11, [x11, _DUPLEX_HALF@GOTPAGEOFF]
Lloh19:
	ldr	x11, [x11]
	cmp	x10, x11
	csel	w9, w9, wzr, eq
	orr	w2, w9, w8
	orr	w8, w21, w20
	mvn	w1, w8
	mov	x0, x19
	mov	w3, #1
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_bgmac_cmdcfg_maskset
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_5-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
                                        ; -- End function
	.comm	_BGMAC_CMDCFG_ES_MASK,4,2       ; @BGMAC_CMDCFG_ES_MASK
	.comm	_BGMAC_CMDCFG_HD,4,2            ; @BGMAC_CMDCFG_HD
	.comm	_BGMAC_CMDCFG_ES_10,4,2         ; @BGMAC_CMDCFG_ES_10
	.comm	_BGMAC_CMDCFG_ES_100,4,2        ; @BGMAC_CMDCFG_ES_100
	.comm	_BGMAC_CMDCFG_ES_1000,4,2       ; @BGMAC_CMDCFG_ES_1000
	.comm	_BGMAC_CMDCFG_ES_2500,4,2       ; @BGMAC_CMDCFG_ES_2500
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unsupported speed: %d\n"

	.comm	_DUPLEX_HALF,8,3                ; @DUPLEX_HALF
	.no_dead_strip	_bgmac_mac_speed
.subsections_via_symbols
