	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function el3_netdev_get_ecmd
_el3_netdev_get_ecmd:                   ## @el3_netdev_get_ecmd
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movslq	(%rdi), %r15
	xorl	%edi, %edi
	callq	_EL3WINDOW
	movq	_WN0_ADDR_CONF@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	%r15, %rdi
	callq	_inw
	sarl	$14, %eax
	je	LBB0_1
## %bb.2:
	cmpl	$3, %eax
	je	LBB0_5
## %bb.3:
	cmpl	$1, %eax
	jne	LBB0_7
## %bb.4:
	movq	_PORT_AUI@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_1:
	movq	_PORT_TP@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_5:
	movq	_PORT_BNC@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %eax
	movl	%eax, 8(%r14)
LBB0_7:
	movq	_DUPLEX_HALF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r14)
	movq	_WN0_CONF_CTRL@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	%r15, %rdi
	callq	_inw
	movl	%eax, %ecx
	shll	$18, %ecx
	sarl	$31, %ecx
	movq	_SUPPORTED_AUI@GOTPCREL(%rip), %rdx
	andl	(%rdx), %ecx
	movl	%eax, %ebx
	shll	$19, %ebx
	sarl	$31, %ebx
	movq	_SUPPORTED_BNC@GOTPCREL(%rip), %rdx
	andl	(%rdx), %ebx
	orl	%ecx, %ebx
	testl	$512, %eax                      ## imm = 0x200
	je	LBB0_10
## %bb.8:
	movq	_SUPPORTED_TP@GOTPCREL(%rip), %rax
	movq	_SUPPORTED_10baseT_Half@GOTPCREL(%rip), %rcx
	movq	_SUPPORTED_10baseT_Full@GOTPCREL(%rip), %rdx
	orl	(%rax), %ebx
	orl	(%rcx), %ebx
	orl	(%rdx), %ebx
	movl	$4, %edi
	callq	_EL3WINDOW
	movq	_WN4_NETDIAG@GOTPCREL(%rip), %rax
	addq	(%rax), %r15
	movq	%r15, %rdi
	callq	_inw
	movq	_FD_ENABLE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_10
## %bb.9:
	movq	_DUPLEX_FULL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r14)
LBB0_10:
	movl	12(%r14), %edi
	movl	%ebx, %esi
	callq	_ethtool_convert_legacy_u32_to_link_mode
	movq	_SPEED_10@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r14)
	movl	$1, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_EL3WINDOW                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_WN0_ADDR_CONF,8,3              ## @WN0_ADDR_CONF
	.comm	_PORT_TP,4,2                    ## @PORT_TP
	.comm	_PORT_AUI,4,2                   ## @PORT_AUI
	.comm	_PORT_BNC,4,2                   ## @PORT_BNC
	.comm	_DUPLEX_HALF,4,2                ## @DUPLEX_HALF
	.comm	_WN0_CONF_CTRL,8,3              ## @WN0_CONF_CTRL
	.comm	_SUPPORTED_AUI,4,2              ## @SUPPORTED_AUI
	.comm	_SUPPORTED_BNC,4,2              ## @SUPPORTED_BNC
	.comm	_SUPPORTED_TP,4,2               ## @SUPPORTED_TP
	.comm	_SUPPORTED_10baseT_Half,4,2     ## @SUPPORTED_10baseT_Half
	.comm	_SUPPORTED_10baseT_Full,4,2     ## @SUPPORTED_10baseT_Full
	.comm	_WN4_NETDIAG,8,3                ## @WN4_NETDIAG
	.comm	_FD_ENABLE,4,2                  ## @FD_ENABLE
	.comm	_DUPLEX_FULL,4,2                ## @DUPLEX_FULL
	.comm	_SPEED_10,4,2                   ## @SPEED_10
	.no_dead_strip	_el3_netdev_get_ecmd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function el3_netdev_get_ecmd
_el3_netdev_get_ecmd:                   ; @el3_netdev_get_ecmd
	.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, x1
	ldrsw	x21, [x0]
	mov	w0, #0
	bl	_EL3WINDOW
Lloh0:
	adrp	x8, _WN0_ADDR_CONF@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WN0_ADDR_CONF@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	add	x0, x8, x21
	bl	_inw
	asr	w8, w0, #14
	cbz	w8, LBB0_4
; %bb.1:
	cmp	w8, #3
	b.eq	LBB0_5
; %bb.2:
	cmp	w8, #1
	b.ne	LBB0_7
; %bb.3:
Lloh3:
	adrp	x8, _PORT_AUI@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PORT_AUI@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:
Lloh5:
	adrp	x8, _PORT_TP@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PORT_TP@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
Lloh7:
	adrp	x8, _PORT_BNC@GOTPAGE
Lloh8:
	ldr	x8, [x8, _PORT_BNC@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	str	w8, [x19, #8]
LBB0_7:
Lloh9:
	adrp	x8, _DUPLEX_HALF@GOTPAGE
Lloh10:
	ldr	x8, [x8, _DUPLEX_HALF@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	str	w8, [x19, #4]
Lloh12:
	adrp	x8, _WN0_CONF_CTRL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _WN0_CONF_CTRL@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	add	x0, x8, x21
	bl	_inw
	lsl	w8, w0, #18
Lloh15:
	adrp	x9, _SUPPORTED_AUI@GOTPAGE
Lloh16:
	ldr	x9, [x9, _SUPPORTED_AUI@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	and	w8, w9, w8, asr #31
	lsl	w9, w0, #19
Lloh18:
	adrp	x10, _SUPPORTED_BNC@GOTPAGE
Lloh19:
	ldr	x10, [x10, _SUPPORTED_BNC@GOTPAGEOFF]
Lloh20:
	ldr	w10, [x10]
	and	w9, w10, w9, asr #31
	orr	w20, w8, w9
	tbz	w0, #9, LBB0_10
; %bb.8:
Lloh21:
	adrp	x8, _SUPPORTED_TP@GOTPAGE
Lloh22:
	ldr	x8, [x8, _SUPPORTED_TP@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
Lloh24:
	adrp	x9, _SUPPORTED_10baseT_Half@GOTPAGE
Lloh25:
	ldr	x9, [x9, _SUPPORTED_10baseT_Half@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
Lloh27:
	adrp	x10, _SUPPORTED_10baseT_Full@GOTPAGE
Lloh28:
	ldr	x10, [x10, _SUPPORTED_10baseT_Full@GOTPAGEOFF]
Lloh29:
	ldr	w10, [x10]
	orr	w8, w8, w20
	orr	w8, w8, w9
	orr	w20, w8, w10
	mov	w0, #4
	bl	_EL3WINDOW
Lloh30:
	adrp	x8, _WN4_NETDIAG@GOTPAGE
Lloh31:
	ldr	x8, [x8, _WN4_NETDIAG@GOTPAGEOFF]
Lloh32:
	ldr	x8, [x8]
	add	x0, x8, x21
	bl	_inw
Lloh33:
	adrp	x8, _FD_ENABLE@GOTPAGE
Lloh34:
	ldr	x8, [x8, _FD_ENABLE@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_10
; %bb.9:
Lloh36:
	adrp	x8, _DUPLEX_FULL@GOTPAGE
Lloh37:
	ldr	x8, [x8, _DUPLEX_FULL@GOTPAGEOFF]
Lloh38:
	ldr	w8, [x8]
	str	w8, [x19, #4]
LBB0_10:
	ldr	w0, [x19, #12]
	mov	x1, x20
	bl	_ethtool_convert_legacy_u32_to_link_mode
Lloh39:
	adrp	x8, _SPEED_10@GOTPAGE
Lloh40:
	ldr	x8, [x8, _SPEED_10@GOTPAGEOFF]
Lloh41:
	ldr	w8, [x8]
	str	w8, [x19]
	mov	w0, #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	_EL3WINDOW
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.cfi_endproc
                                        ; -- End function
	.comm	_WN0_ADDR_CONF,8,3              ; @WN0_ADDR_CONF
	.comm	_PORT_TP,4,2                    ; @PORT_TP
	.comm	_PORT_AUI,4,2                   ; @PORT_AUI
	.comm	_PORT_BNC,4,2                   ; @PORT_BNC
	.comm	_DUPLEX_HALF,4,2                ; @DUPLEX_HALF
	.comm	_WN0_CONF_CTRL,8,3              ; @WN0_CONF_CTRL
	.comm	_SUPPORTED_AUI,4,2              ; @SUPPORTED_AUI
	.comm	_SUPPORTED_BNC,4,2              ; @SUPPORTED_BNC
	.comm	_SUPPORTED_TP,4,2               ; @SUPPORTED_TP
	.comm	_SUPPORTED_10baseT_Half,4,2     ; @SUPPORTED_10baseT_Half
	.comm	_SUPPORTED_10baseT_Full,4,2     ; @SUPPORTED_10baseT_Full
	.comm	_WN4_NETDIAG,8,3                ; @WN4_NETDIAG
	.comm	_FD_ENABLE,4,2                  ; @FD_ENABLE
	.comm	_DUPLEX_FULL,4,2                ; @DUPLEX_FULL
	.comm	_SPEED_10,4,2                   ; @SPEED_10
	.no_dead_strip	_el3_netdev_get_ecmd
.subsections_via_symbols
