	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function netdev_set_ecmd
_netdev_set_ecmd:                       ## @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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	callq	_netdev_priv
	movq	(%rbx), %rcx
	movq	_PORT_TP@GOTPCREL(%rip), %r9
	movq	(%r9), %rdi
	cmpq	%rdi, %rcx
	je	LBB0_4
## %bb.1:
	movq	_PORT_MII@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_4
## %bb.2:
	movq	_PORT_FIBRE@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_3
LBB0_4:
	movq	8(%rbx), %rsi
	movq	_XCVR_INTERNAL@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rsi
	je	LBB0_6
## %bb.5:
	movq	_XCVR_EXTERNAL@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rsi
	je	LBB0_6
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_31:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_6:
	movq	16(%rbx), %rsi
	movq	_AUTONEG_ENABLE@GOTPCREL(%rip), %r8
	cmpq	(%r8), %rsi
	jne	LBB0_9
## %bb.7:
	movq	_ADVERTISED_10baseT_Half@GOTPCREL(%rip), %rdx
	movq	_ADVERTISED_10baseT_Full@GOTPCREL(%rip), %rdi
	movl	(%rdi), %edi
	orl	(%rdx), %edi
	movq	_ADVERTISED_100baseT_Half@GOTPCREL(%rip), %rdx
	orl	(%rdx), %edi
	movq	_ADVERTISED_100baseT_Full@GOTPCREL(%rip), %rdx
	orl	(%rdx), %edi
	testl	%edi, 24(%rbx)
	je	LBB0_3
## %bb.8:
	cmpq	$0, 40(%rax)
	jne	LBB0_3
LBB0_16:
	movq	%rcx, (%r14)
	movq	%rsi, (%rax)
	movq	_PhyAddrMask@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	andl	48(%rbx), %edx
	movl	%edx, 8(%rax)
	cmpq	(%r8), %rsi
	jne	LBB0_25
## %bb.17:
	movq	_ADVERTISE_ALL@GOTPCREL(%rip), %rdx
	movq	_ADVERTISE_100BASE4@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	orl	(%rdx), %esi
	notl	%esi
	andl	12(%rax), %esi
	movl	%esi, 12(%rax)
	movl	24(%rbx), %edi
	movq	_ADVERTISED_10baseT_Half@GOTPCREL(%rip), %rdx
	testl	%edi, (%rdx)
	je	LBB0_19
## %bb.18:
	movq	_ADVERTISE_10HALF@GOTPCREL(%rip), %rdx
	orl	(%rdx), %esi
	movl	%esi, 12(%rax)
LBB0_19:
	movq	_ADVERTISED_10baseT_Full@GOTPCREL(%rip), %rdx
	testl	%edi, (%rdx)
	je	LBB0_21
## %bb.20:
	movq	_ADVERTISE_10FULL@GOTPCREL(%rip), %rdx
	orl	(%rdx), %esi
	movl	%esi, 12(%rax)
LBB0_21:
	movq	_ADVERTISED_100baseT_Half@GOTPCREL(%rip), %rdx
	testl	%edi, (%rdx)
	je	LBB0_23
## %bb.22:
	movq	_ADVERTISE_100HALF@GOTPCREL(%rip), %rdx
	orl	(%rdx), %esi
	movl	%esi, 12(%rax)
LBB0_23:
	movq	_ADVERTISED_100baseT_Full@GOTPCREL(%rip), %rdx
	testl	%edi, (%rdx)
	je	LBB0_27
## %bb.24:
	movq	_ADVERTISE_100FULL@GOTPCREL(%rip), %rdx
	orl	(%rdx), %esi
	movl	%esi, 12(%rax)
	jmp	LBB0_27
LBB0_9:
	movq	_AUTONEG_DISABLE@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rsi
	jne	LBB0_3
## %bb.10:
	movq	32(%rbx), %r10
	movq	_SPEED_10@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %r10
	je	LBB0_12
## %bb.11:
	movq	_SPEED_100@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %r10
	jne	LBB0_3
LBB0_12:
	movq	40(%rbx), %r10
	movq	_DUPLEX_HALF@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %r10
	je	LBB0_14
## %bb.13:
	movq	_DUPLEX_FULL@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %r10
	jne	LBB0_3
LBB0_14:
	cmpq	$0, 40(%rax)
	je	LBB0_16
## %bb.15:
	cmpq	%rdi, %rcx
	je	LBB0_3
	jmp	LBB0_16
LBB0_25:
	movq	40(%rbx), %rdx
	movups	32(%rbx), %xmm0
	movups	%xmm0, 16(%rax)
	movq	_DUPLEX_HALF@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rdx
	jne	LBB0_27
## %bb.26:
	movq	$0, 32(%rax)
LBB0_27:
	cmpq	(%r9), %rcx
	jne	LBB0_29
## %bb.28:
	movq	%r14, %rdi
	callq	_switch_port_internal
	jmp	LBB0_30
LBB0_29:
	movq	%r14, %rdi
	callq	_switch_port_external
LBB0_30:
	movq	%r14, %rdi
	callq	_init_phy_fixup
	movq	%r14, %rdi
	callq	_check_link
	xorl	%eax, %eax
	jmp	LBB0_31
	.cfi_endproc
                                        ## -- End function
	.comm	_PORT_TP,8,3                    ## @PORT_TP
	.comm	_PORT_MII,8,3                   ## @PORT_MII
	.comm	_PORT_FIBRE,8,3                 ## @PORT_FIBRE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_XCVR_INTERNAL,8,3              ## @XCVR_INTERNAL
	.comm	_XCVR_EXTERNAL,8,3              ## @XCVR_EXTERNAL
	.comm	_AUTONEG_ENABLE,8,3             ## @AUTONEG_ENABLE
	.comm	_ADVERTISED_10baseT_Half,4,2    ## @ADVERTISED_10baseT_Half
	.comm	_ADVERTISED_10baseT_Full,4,2    ## @ADVERTISED_10baseT_Full
	.comm	_ADVERTISED_100baseT_Half,4,2   ## @ADVERTISED_100baseT_Half
	.comm	_ADVERTISED_100baseT_Full,4,2   ## @ADVERTISED_100baseT_Full
	.comm	_AUTONEG_DISABLE,8,3            ## @AUTONEG_DISABLE
	.comm	_SPEED_10,8,3                   ## @SPEED_10
	.comm	_SPEED_100,8,3                  ## @SPEED_100
	.comm	_DUPLEX_HALF,8,3                ## @DUPLEX_HALF
	.comm	_DUPLEX_FULL,8,3                ## @DUPLEX_FULL
	.comm	_PhyAddrMask,4,2                ## @PhyAddrMask
	.comm	_ADVERTISE_ALL,4,2              ## @ADVERTISE_ALL
	.comm	_ADVERTISE_100BASE4,4,2         ## @ADVERTISE_100BASE4
	.comm	_ADVERTISE_10HALF,4,2           ## @ADVERTISE_10HALF
	.comm	_ADVERTISE_10FULL,4,2           ## @ADVERTISE_10FULL
	.comm	_ADVERTISE_100HALF,4,2          ## @ADVERTISE_100HALF
	.comm	_ADVERTISE_100FULL,4,2          ## @ADVERTISE_100FULL
	.no_dead_strip	_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 netdev_set_ecmd
_netdev_set_ecmd:                       ; @netdev_set_ecmd
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	mov	x19, x0
	bl	_netdev_priv
	ldr	x8, [x20]
Lloh0:
	adrp	x9, _PORT_TP@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PORT_TP@GOTPAGEOFF]
	ldr	x12, [x9]
Lloh2:
	adrp	x10, _PORT_MII@GOTPAGE
Lloh3:
	ldr	x10, [x10, _PORT_MII@GOTPAGEOFF]
Lloh4:
	ldr	x10, [x10]
Lloh5:
	adrp	x11, _PORT_FIBRE@GOTPAGE
Lloh6:
	ldr	x11, [x11, _PORT_FIBRE@GOTPAGEOFF]
Lloh7:
	ldr	x11, [x11]
	cmp	x8, x12
	ccmp	x8, x10, #4, ne
	ccmp	x8, x11, #4, ne
	b.ne	LBB0_21
; %bb.1:
	ldr	x10, [x20, #8]
Lloh8:
	adrp	x11, _XCVR_INTERNAL@GOTPAGE
Lloh9:
	ldr	x11, [x11, _XCVR_INTERNAL@GOTPAGEOFF]
Lloh10:
	ldr	x11, [x11]
Lloh11:
	adrp	x13, _XCVR_EXTERNAL@GOTPAGE
Lloh12:
	ldr	x13, [x13, _XCVR_EXTERNAL@GOTPAGEOFF]
Lloh13:
	ldr	x13, [x13]
	cmp	x10, x11
	ccmp	x10, x13, #4, ne
	b.ne	LBB0_21
; %bb.2:
	ldr	x10, [x20, #16]
Lloh14:
	adrp	x11, _AUTONEG_ENABLE@GOTPAGE
Lloh15:
	ldr	x11, [x11, _AUTONEG_ENABLE@GOTPAGEOFF]
	ldr	x13, [x11]
	cmp	x10, x13
	b.ne	LBB0_14
; %bb.3:
	ldr	w12, [x20, #24]
Lloh16:
	adrp	x13, _ADVERTISED_10baseT_Half@GOTPAGE
Lloh17:
	ldr	x13, [x13, _ADVERTISED_10baseT_Half@GOTPAGEOFF]
Lloh18:
	adrp	x14, _ADVERTISED_10baseT_Full@GOTPAGE
Lloh19:
	ldr	x14, [x14, _ADVERTISED_10baseT_Full@GOTPAGEOFF]
Lloh20:
	ldr	w13, [x13]
Lloh21:
	ldr	w14, [x14]
	orr	w13, w14, w13
Lloh22:
	adrp	x14, _ADVERTISED_100baseT_Half@GOTPAGE
Lloh23:
	ldr	x14, [x14, _ADVERTISED_100baseT_Half@GOTPAGEOFF]
Lloh24:
	ldr	w14, [x14]
	orr	w13, w13, w14
Lloh25:
	adrp	x14, _ADVERTISED_100baseT_Full@GOTPAGE
Lloh26:
	ldr	x14, [x14, _ADVERTISED_100baseT_Full@GOTPAGEOFF]
Lloh27:
	ldr	w14, [x14]
	orr	w13, w13, w14
	tst	w13, w12
	b.eq	LBB0_21
; %bb.4:
	ldr	x12, [x0, #40]
	cbnz	x12, LBB0_21
LBB0_5:
	str	x8, [x19]
	str	x10, [x0]
Lloh28:
	adrp	x12, _PhyAddrMask@GOTPAGE
Lloh29:
	ldr	x12, [x12, _PhyAddrMask@GOTPAGEOFF]
	ldr	w13, [x20, #48]
Lloh30:
	ldr	w12, [x12]
	and	w12, w12, w13
	str	w12, [x0, #8]
	ldr	x11, [x11]
	cmp	x10, x11
	b.ne	LBB0_23
; %bb.6:
Lloh31:
	adrp	x10, _ADVERTISE_ALL@GOTPAGE
Lloh32:
	ldr	x10, [x10, _ADVERTISE_ALL@GOTPAGEOFF]
Lloh33:
	ldr	w10, [x10]
Lloh34:
	adrp	x11, _ADVERTISE_100BASE4@GOTPAGE
Lloh35:
	ldr	x11, [x11, _ADVERTISE_100BASE4@GOTPAGEOFF]
Lloh36:
	ldr	w11, [x11]
	orr	w10, w11, w10
	ldr	w11, [x0, #12]
	bic	w10, w11, w10
	str	w10, [x0, #12]
	ldr	w11, [x20, #24]
Lloh37:
	adrp	x12, _ADVERTISED_10baseT_Half@GOTPAGE
Lloh38:
	ldr	x12, [x12, _ADVERTISED_10baseT_Half@GOTPAGEOFF]
Lloh39:
	ldr	w12, [x12]
	tst	w12, w11
	b.eq	LBB0_8
; %bb.7:
Lloh40:
	adrp	x12, _ADVERTISE_10HALF@GOTPAGE
Lloh41:
	ldr	x12, [x12, _ADVERTISE_10HALF@GOTPAGEOFF]
Lloh42:
	ldr	w12, [x12]
	orr	w10, w12, w10
	str	w10, [x0, #12]
LBB0_8:
Lloh43:
	adrp	x12, _ADVERTISED_10baseT_Full@GOTPAGE
Lloh44:
	ldr	x12, [x12, _ADVERTISED_10baseT_Full@GOTPAGEOFF]
Lloh45:
	ldr	w12, [x12]
	tst	w12, w11
	b.eq	LBB0_10
; %bb.9:
Lloh46:
	adrp	x12, _ADVERTISE_10FULL@GOTPAGE
Lloh47:
	ldr	x12, [x12, _ADVERTISE_10FULL@GOTPAGEOFF]
Lloh48:
	ldr	w12, [x12]
	orr	w10, w10, w12
	str	w10, [x0, #12]
LBB0_10:
Lloh49:
	adrp	x12, _ADVERTISED_100baseT_Half@GOTPAGE
Lloh50:
	ldr	x12, [x12, _ADVERTISED_100baseT_Half@GOTPAGEOFF]
Lloh51:
	ldr	w12, [x12]
	tst	w12, w11
	b.eq	LBB0_12
; %bb.11:
Lloh52:
	adrp	x12, _ADVERTISE_100HALF@GOTPAGE
Lloh53:
	ldr	x12, [x12, _ADVERTISE_100HALF@GOTPAGEOFF]
Lloh54:
	ldr	w12, [x12]
	orr	w10, w10, w12
	str	w10, [x0, #12]
LBB0_12:
Lloh55:
	adrp	x12, _ADVERTISED_100baseT_Full@GOTPAGE
Lloh56:
	ldr	x12, [x12, _ADVERTISED_100baseT_Full@GOTPAGEOFF]
Lloh57:
	ldr	w12, [x12]
	tst	w12, w11
	b.eq	LBB0_25
; %bb.13:
Lloh58:
	adrp	x11, _ADVERTISE_100FULL@GOTPAGE
Lloh59:
	ldr	x11, [x11, _ADVERTISE_100FULL@GOTPAGEOFF]
Lloh60:
	ldr	w11, [x11]
	orr	w10, w10, w11
	str	w10, [x0, #12]
	b	LBB0_25
LBB0_14:
Lloh61:
	adrp	x13, _AUTONEG_DISABLE@GOTPAGE
Lloh62:
	ldr	x13, [x13, _AUTONEG_DISABLE@GOTPAGEOFF]
Lloh63:
	ldr	x13, [x13]
	cmp	x10, x13
	b.ne	LBB0_21
; %bb.15:
	ldr	x13, [x20, #32]
Lloh64:
	adrp	x14, _SPEED_10@GOTPAGE
Lloh65:
	ldr	x14, [x14, _SPEED_10@GOTPAGEOFF]
Lloh66:
	ldr	x14, [x14]
	cmp	x13, x14
	b.eq	LBB0_17
; %bb.16:
Lloh67:
	adrp	x14, _SPEED_100@GOTPAGE
Lloh68:
	ldr	x14, [x14, _SPEED_100@GOTPAGEOFF]
Lloh69:
	ldr	x14, [x14]
	cmp	x13, x14
	b.ne	LBB0_21
LBB0_17:
	ldr	x13, [x20, #40]
Lloh70:
	adrp	x14, _DUPLEX_HALF@GOTPAGE
Lloh71:
	ldr	x14, [x14, _DUPLEX_HALF@GOTPAGEOFF]
Lloh72:
	ldr	x14, [x14]
	cmp	x13, x14
	b.eq	LBB0_19
; %bb.18:
Lloh73:
	adrp	x14, _DUPLEX_FULL@GOTPAGE
Lloh74:
	ldr	x14, [x14, _DUPLEX_FULL@GOTPAGEOFF]
Lloh75:
	ldr	x14, [x14]
	cmp	x13, x14
	b.ne	LBB0_21
LBB0_19:
	ldr	x13, [x0, #40]
	cbz	x13, LBB0_5
; %bb.20:
	cmp	x8, x12
	b.ne	LBB0_5
LBB0_21:
Lloh76:
	adrp	x8, _EINVAL@GOTPAGE
Lloh77:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh78:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_22:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_23:
	ldp	x10, x11, [x20, #32]
	stp	x10, x11, [x0, #16]
Lloh79:
	adrp	x10, _DUPLEX_HALF@GOTPAGE
Lloh80:
	ldr	x10, [x10, _DUPLEX_HALF@GOTPAGEOFF]
Lloh81:
	ldr	x10, [x10]
	cmp	x11, x10
	b.ne	LBB0_25
; %bb.24:
	str	xzr, [x0, #32]
LBB0_25:
	ldr	x9, [x9]
	mov	x0, x19
	cmp	x8, x9
	b.ne	LBB0_27
; %bb.26:
	bl	_switch_port_internal
	b	LBB0_28
LBB0_27:
	bl	_switch_port_external
LBB0_28:
	mov	x0, x19
	bl	_init_phy_fixup
	mov	x0, x19
	bl	_check_link
	mov	w0, #0
	b	LBB0_22
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh20
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh55, Lloh56, Lloh57
	.loh AdrpLdrGotLdr	Lloh58, Lloh59, Lloh60
	.loh AdrpLdrGotLdr	Lloh61, Lloh62, Lloh63
	.loh AdrpLdrGotLdr	Lloh64, Lloh65, Lloh66
	.loh AdrpLdrGotLdr	Lloh67, Lloh68, Lloh69
	.loh AdrpLdrGotLdr	Lloh70, Lloh71, Lloh72
	.loh AdrpLdrGotLdr	Lloh73, Lloh74, Lloh75
	.loh AdrpLdrGotLdr	Lloh76, Lloh77, Lloh78
	.loh AdrpLdrGotLdr	Lloh79, Lloh80, Lloh81
	.cfi_endproc
                                        ; -- End function
	.comm	_PORT_TP,8,3                    ; @PORT_TP
	.comm	_PORT_MII,8,3                   ; @PORT_MII
	.comm	_PORT_FIBRE,8,3                 ; @PORT_FIBRE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_XCVR_INTERNAL,8,3              ; @XCVR_INTERNAL
	.comm	_XCVR_EXTERNAL,8,3              ; @XCVR_EXTERNAL
	.comm	_AUTONEG_ENABLE,8,3             ; @AUTONEG_ENABLE
	.comm	_ADVERTISED_10baseT_Half,4,2    ; @ADVERTISED_10baseT_Half
	.comm	_ADVERTISED_10baseT_Full,4,2    ; @ADVERTISED_10baseT_Full
	.comm	_ADVERTISED_100baseT_Half,4,2   ; @ADVERTISED_100baseT_Half
	.comm	_ADVERTISED_100baseT_Full,4,2   ; @ADVERTISED_100baseT_Full
	.comm	_AUTONEG_DISABLE,8,3            ; @AUTONEG_DISABLE
	.comm	_SPEED_10,8,3                   ; @SPEED_10
	.comm	_SPEED_100,8,3                  ; @SPEED_100
	.comm	_DUPLEX_HALF,8,3                ; @DUPLEX_HALF
	.comm	_DUPLEX_FULL,8,3                ; @DUPLEX_FULL
	.comm	_PhyAddrMask,4,2                ; @PhyAddrMask
	.comm	_ADVERTISE_ALL,4,2              ; @ADVERTISE_ALL
	.comm	_ADVERTISE_100BASE4,4,2         ; @ADVERTISE_100BASE4
	.comm	_ADVERTISE_10HALF,4,2           ; @ADVERTISE_10HALF
	.comm	_ADVERTISE_10FULL,4,2           ; @ADVERTISE_10FULL
	.comm	_ADVERTISE_100HALF,4,2          ; @ADVERTISE_100HALF
	.comm	_ADVERTISE_100FULL,4,2          ; @ADVERTISE_100FULL
	.no_dead_strip	_netdev_set_ecmd
.subsections_via_symbols
