	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function el3_netdev_set_ecmd
_el3_netdev_set_ecmd:                   ## @el3_netdev_set_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rsi), %rax
	movq	_SPEED_10@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.3:
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movslq	(%rdi), %r14
	movq	8(%rsi), %rax
	movq	_DUPLEX_HALF@GOTPCREL(%rip), %rcx
	movq	_DUPLEX_FULL@GOTPCREL(%rip), %r12
	cmpq	(%rcx), %rax
	je	LBB0_5
## %bb.4:
	cmpq	(%r12), %rax
	jne	LBB0_1
LBB0_5:
	xorl	%edi, %edi
	callq	_EL3WINDOW
	movq	_WN0_ADDR_CONF@GOTPCREL(%rip), %r13
	movq	(%r13), %rdi
	addq	%r14, %rdi
	callq	_inw
	movl	16(%rbx), %ecx
	cmpl	$130, %ecx
	je	LBB0_10
## %bb.6:
	cmpl	$129, %ecx
	je	LBB0_9
## %bb.7:
	cmpl	$128, %ecx
	jne	LBB0_1
## %bb.8:
	andl	$-49153, %eax                   ## imm = 0xFFFF3FFF
	xorl	%ecx, %ecx
	jmp	LBB0_11
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_15:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	orl	$16384, %eax                    ## imm = 0x4000
	movl	$1, %ecx
	jmp	LBB0_11
LBB0_9:
	orl	$49152, %eax                    ## imm = 0xC000
	movl	$3, %ecx
LBB0_11:
	movl	%ecx, 4(%r15)
	movq	(%r13), %rsi
	addq	%r14, %rsi
	movl	%eax, %edi
	callq	_outw
	cmpl	$3, 4(%r15)
	jne	LBB0_14
## %bb.12:
	movq	(%r13), %rdi
	addq	%r14, %rdi
	callq	_inw
	testl	$49152, %eax                    ## imm = 0xC000
	je	LBB0_16
## %bb.13:
	movq	_StartCoax@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_EL3_CMD@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	%r14, %rsi
	callq	_outw
	movl	$800, %edi                      ## imm = 0x320
	callq	_udelay
LBB0_14:
	movl	$4, %edi
	callq	_EL3WINDOW
	movq	_WN4_NETDIAG@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	addq	%r14, %rdi
	callq	_inw
	movq	8(%rbx), %rcx
	movq	_FD_ENABLE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edi
	movl	%edi, %edx
	orl	%eax, %edx
	notl	%edi
	andl	%eax, %edi
	cmpq	(%r12), %rcx
	cmovel	%edx, %edi
	addq	(%r15), %r14
	movq	%r14, %rsi
	callq	_outw
	movl	$1, %edi
	callq	_EL3WINDOW
	xorl	%eax, %eax
	jmp	LBB0_15
LBB0_16:
	movq	_EIO@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.comm	_SPEED_10,8,3                   ## @SPEED_10
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_DUPLEX_HALF,8,3                ## @DUPLEX_HALF
	.comm	_DUPLEX_FULL,8,3                ## @DUPLEX_FULL
	.comm	_WN0_ADDR_CONF,8,3              ## @WN0_ADDR_CONF
	.comm	_StartCoax,4,2                  ## @StartCoax
	.comm	_EL3_CMD,8,3                    ## @EL3_CMD
	.comm	_EIO,4,2                        ## @EIO
	.comm	_WN4_NETDIAG,8,3                ## @WN4_NETDIAG
	.comm	_FD_ENABLE,4,2                  ## @FD_ENABLE
	.no_dead_strip	_el3_netdev_set_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_set_ecmd
_el3_netdev_set_ecmd:                   ; @el3_netdev_set_ecmd
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	ldr	x8, [x1]
Lloh0:
	adrp	x9, _SPEED_10@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SPEED_10@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.1:
	mov	x19, x1
	ldr	x8, [x1, #8]
Lloh3:
	adrp	x9, _DUPLEX_HALF@GOTPAGE
Lloh4:
	ldr	x9, [x9, _DUPLEX_HALF@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
Lloh6:
	adrp	x22, _DUPLEX_FULL@GOTPAGE
Lloh7:
	ldr	x22, [x22, _DUPLEX_FULL@GOTPAGEOFF]
	ldr	x10, [x22]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_6
; %bb.2:
	mov	x20, x0
	ldrsw	x21, [x0]
	mov	w0, #0
	bl	_EL3WINDOW
Lloh8:
	adrp	x23, _WN0_ADDR_CONF@GOTPAGE
Lloh9:
	ldr	x23, [x23, _WN0_ADDR_CONF@GOTPAGEOFF]
	ldr	x8, [x23]
	add	x0, x8, x21
	bl	_inw
	ldr	w8, [x19, #16]
	cmp	w8, #130
	b.eq	LBB0_9
; %bb.3:
	cmp	w8, #129
	b.eq	LBB0_10
; %bb.4:
	cmp	w8, #128
	b.ne	LBB0_6
; %bb.5:
	mov	w8, #0
	and	w0, w0, #0xffff3fff
	b	LBB0_11
LBB0_6:
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_9:
	orr	w0, w0, #0x4000
	mov	w8, #1
	b	LBB0_11
LBB0_10:
	orr	w0, w0, #0xc000
	mov	w8, #3
LBB0_11:
	str	w8, [x20, #4]
	ldr	x8, [x23]
	add	x1, x8, x21
	bl	_outw
	ldr	w8, [x20, #4]
	cmp	w8, #3
	b.ne	LBB0_14
; %bb.12:
	ldr	x8, [x23]
	add	x0, x8, x21
	bl	_inw
	tst	w0, #0xc000
	b.eq	LBB0_15
; %bb.13:
Lloh12:
	adrp	x8, _StartCoax@GOTPAGE
Lloh13:
	ldr	x8, [x8, _StartCoax@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
Lloh15:
	adrp	x8, _EL3_CMD@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EL3_CMD@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
	add	x1, x8, x21
	bl	_outw
	mov	w0, #800
	bl	_udelay
LBB0_14:
	mov	w0, #4
	bl	_EL3WINDOW
Lloh18:
	adrp	x20, _WN4_NETDIAG@GOTPAGE
Lloh19:
	ldr	x20, [x20, _WN4_NETDIAG@GOTPAGEOFF]
	ldr	x8, [x20]
	add	x0, x8, x21
	bl	_inw
	ldr	x8, [x19, #8]
	ldr	x9, [x22]
Lloh20:
	adrp	x10, _FD_ENABLE@GOTPAGE
Lloh21:
	ldr	x10, [x10, _FD_ENABLE@GOTPAGEOFF]
Lloh22:
	ldr	w10, [x10]
	orr	w11, w10, w0
	bic	w10, w0, w10
	cmp	x8, x9
	csel	w0, w11, w10, eq
	ldr	x8, [x20]
	add	x1, x8, x21
	bl	_outw
	mov	w0, #1
	bl	_EL3WINDOW
	mov	w0, #0
	b	LBB0_8
LBB0_15:
Lloh23:
	adrp	x8, _EIO@GOTPAGE
Lloh24:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_SPEED_10,8,3                   ; @SPEED_10
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_DUPLEX_HALF,8,3                ; @DUPLEX_HALF
	.comm	_DUPLEX_FULL,8,3                ; @DUPLEX_FULL
	.comm	_WN0_ADDR_CONF,8,3              ; @WN0_ADDR_CONF
	.comm	_StartCoax,4,2                  ; @StartCoax
	.comm	_EL3_CMD,8,3                    ; @EL3_CMD
	.comm	_EIO,4,2                        ; @EIO
	.comm	_WN4_NETDIAG,8,3                ; @WN4_NETDIAG
	.comm	_FD_ENABLE,4,2                  ; @FD_ENABLE
	.no_dead_strip	_el3_netdev_set_ecmd
.subsections_via_symbols
