	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function smc_netdev_set_ecmd
_smc_netdev_set_ecmd:                   ## @smc_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.2:
	movq	%rsi, %r15
	movl	(%rdi), %r14d
	movq	8(%rsi), %rax
	movq	_DUPLEX_HALF@GOTPCREL(%rip), %rcx
	movq	_DUPLEX_FULL@GOTPCREL(%rip), %r12
	cmpq	(%rcx), %rax
	je	LBB0_4
## %bb.3:
	cmpq	(%r12), %rax
	jne	LBB0_1
LBB0_4:
	movq	16(%r15), %rax
	movq	_PORT_TP@GOTPCREL(%rip), %rdx
	movq	_PORT_AUI@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	(%rdx), %rax
	je	LBB0_6
## %bb.5:
	cmpq	%rcx, %rax
	je	LBB0_6
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_7:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	xorl	%esi, %esi
	cmpq	%rcx, %rax
	sete	%sil
	callq	_smc_set_xcvr
	xorl	%ebx, %ebx
	xorl	%edi, %edi
	callq	_SMC_SELECT_BANK
	movq	_TCR@GOTPCREL(%rip), %r13
	movq	(%r13), %rdi
	addq	%r14, %rdi
	callq	_inw
	movq	8(%r15), %rcx
	movq	_TCR_FDUPLX@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edi
	movl	%edi, %edx
	orl	%eax, %edx
	notl	%edi
	andl	%eax, %edi
	cmpq	(%r12), %rcx
	cmovel	%edx, %edi
	addq	(%r13), %r14
	movq	%r14, %rsi
	callq	_outw
	jmp	LBB0_7
	.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	_PORT_TP,8,3                    ## @PORT_TP
	.comm	_PORT_AUI,8,3                   ## @PORT_AUI
	.comm	_TCR,8,3                        ## @TCR
	.comm	_TCR_FDUPLX,4,2                 ## @TCR_FDUPLX
	.no_dead_strip	_smc_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 smc_netdev_set_ecmd
_smc_netdev_set_ecmd:                   ; @smc_netdev_set_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
	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_4
; %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	x20, _DUPLEX_FULL@GOTPAGE
Lloh7:
	ldr	x20, [x20, _DUPLEX_FULL@GOTPAGEOFF]
	ldr	x10, [x20]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_4
; %bb.2:
	ldr	x8, [x19, #16]
Lloh8:
	adrp	x9, _PORT_TP@GOTPAGE
Lloh9:
	ldr	x9, [x9, _PORT_TP@GOTPAGEOFF]
Lloh10:
	ldr	x10, [x9]
Lloh11:
	adrp	x9, _PORT_AUI@GOTPAGE
Lloh12:
	ldr	x9, [x9, _PORT_AUI@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x8, x10
	ccmp	x8, x9, #4, ne
	b.ne	LBB0_4
; %bb.3:
	ldr	w21, [x0]
	cmp	x8, x9
	cset	w1, eq
	bl	_smc_set_xcvr
	mov	w0, #0
	bl	_SMC_SELECT_BANK
Lloh14:
	adrp	x22, _TCR@GOTPAGE
Lloh15:
	ldr	x22, [x22, _TCR@GOTPAGEOFF]
	ldr	x8, [x22]
	add	x0, x8, x21
	bl	_inw
	ldr	x8, [x19, #8]
	ldr	x9, [x20]
Lloh16:
	adrp	x10, _TCR_FDUPLX@GOTPAGE
Lloh17:
	ldr	x10, [x10, _TCR_FDUPLX@GOTPAGEOFF]
Lloh18:
	ldr	w10, [x10]
	orr	w11, w10, w0
	bic	w10, w0, w10
	cmp	x8, x9
	csel	w0, w11, w10, eq
	ldr	x8, [x22]
	add	x1, x8, x21
	bl	_outw
	mov	w0, #0
	b	LBB0_5
LBB0_4:
Lloh19:
	adrp	x8, _EINVAL@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	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
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.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	_PORT_TP,8,3                    ; @PORT_TP
	.comm	_PORT_AUI,8,3                   ; @PORT_AUI
	.comm	_TCR,8,3                        ; @TCR
	.comm	_TCR_FDUPLX,4,2                 ; @TCR_FDUPLX
	.no_dead_strip	_smc_netdev_set_ecmd
.subsections_via_symbols
