	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pcnet32_set_link_ksettings
_pcnet32_set_link_ksettings:            ## @pcnet32_set_link_ksettings
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r13
	movq	%rdi, %r15
	callq	_netdev_priv
	movq	%rax, %rbx
	movl	(%r15), %r14d
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	leaq	20(%rbx), %rdi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_spin_lock_irqsave
	cmpq	$0, 48(%rbx)
	je	LBB0_2
## %bb.1:
	addq	$40, %rbx
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	_mii_ethtool_set_link_ksettings
	movl	%eax, %r12d
	jmp	LBB0_13
LBB0_2:
	movl	%r14d, -52(%rbp)                ## 4-byte Spill
	movq	(%rbx), %rax
	movq	_PCNET32_79C970A@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.4:
	leaq	-64(%rbp), %rsi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_pcnet32_suspend
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	testl	%eax, %eax
	jne	LBB0_6
## %bb.5:
	movq	24(%rbx), %rax
	movq	_CSR0@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_CSR0_STOP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	-52(%rbp), %edi                 ## 4-byte Reload
	callq	*24(%rax)
LBB0_6:
	movq	(%r13), %rax
	movq	_AUTONEG_ENABLE@GOTPCREL(%rip), %r12
	xorl	%ecx, %ecx
	cmpq	(%r12), %rax
	sete	%cl
	movl	%ecx, 8(%rbx)
	movq	24(%rbx), %rax
	movl	-52(%rbp), %edi                 ## 4-byte Reload
	movl	%edi, %r14d
	movl	$2, %esi
	callq	*(%rax)
	movq	(%r13), %rdx
	movq	24(%rbx), %rcx
	movq	16(%rcx), %rcx
	cmpq	(%r12), %rdx
	jne	LBB0_8
## %bb.7:
	orl	$2, %eax
	movl	%r14d, %edi
	movl	$2, %esi
	movl	%eax, %edx
	callq	*%rcx
	cmpl	$0, -56(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_11
LBB0_10:
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_pcnet32_clr_suspend
	xorl	%r12d, %r12d
	jmp	LBB0_13
LBB0_3:
	negl	%r12d
	jmp	LBB0_13
LBB0_8:
	andl	$-3, %eax
	movl	%r14d, %edi
	movl	$2, %esi
	movl	%eax, %edx
	callq	*%rcx
	movq	8(%r13), %rax
	movq	_PORT_TP@GOTPCREL(%rip), %rdx
	xorl	%ecx, %ecx
	cmpq	(%rdx), %rax
	sete	%cl
	movl	%ecx, 12(%rbx)
	movq	24(%rbx), %rax
	movq	_CSR15@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%r14d, %edi
	callq	*8(%rax)
                                        ## kill: def $eax killed $eax def $rax
	andl	$-385, %eax                     ## imm = 0xFE7F
	movq	8(%r13), %rcx
	leal	128(%rax), %r12d
	movq	_PORT_TP@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	cmovnel	%eax, %r12d
	movq	24(%rbx), %rax
	movq	_CSR15@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%r14d, %edi
	movl	%r12d, %edx
	callq	*24(%rax)
	movl	%r12d, %edi
	callq	_cpu_to_le16
	movq	32(%rbx), %rcx
	movl	%eax, (%rcx)
	movq	16(%r13), %rax
	movq	_DUPLEX_FULL@GOTPCREL(%rip), %r12
	xorl	%ecx, %ecx
	cmpq	(%r12), %rax
	sete	%cl
	movl	%ecx, 16(%rbx)
	movq	24(%rbx), %rax
	movl	%r14d, %edi
	movl	$9, %esi
	callq	*(%rax)
	andl	$-4, %eax
	movq	16(%r13), %rcx
	xorl	%edx, %edx
	cmpq	(%r12), %rcx
	sete	%dl
	leal	(%rdx,%rdx,2), %edx
	orl	%eax, %edx
	movq	24(%rbx), %rax
	movl	%r14d, %edi
	movl	$9, %esi
	callq	*16(%rax)
	cmpl	$0, -56(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_10
LBB0_11:
	movq	%r15, %rdi
	callq	_netif_running
	xorl	%r12d, %r12d
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movq	_CSR0_NORMAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_pcnet32_restart
LBB0_13:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	-64(%rbp), %rsi
	callq	_spin_unlock_irqrestore
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_PCNET32_79C970A,8,3            ## @PCNET32_79C970A
	.comm	_CSR0,4,2                       ## @CSR0
	.comm	_CSR0_STOP,4,2                  ## @CSR0_STOP
	.comm	_AUTONEG_ENABLE,8,3             ## @AUTONEG_ENABLE
	.comm	_PORT_TP,8,3                    ## @PORT_TP
	.comm	_CSR15,4,2                      ## @CSR15
	.comm	_DUPLEX_FULL,8,3                ## @DUPLEX_FULL
	.comm	_CSR0_NORMAL,4,2                ## @CSR0_NORMAL
	.no_dead_strip	_pcnet32_set_link_ksettings
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pcnet32_set_link_ksettings
_pcnet32_set_link_ksettings:            ; @pcnet32_set_link_ksettings
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x23, x1
	mov	x20, x0
	bl	_netdev_priv
	mov	x21, x0
	ldr	w22, [x20]
Lloh0:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
Lloh2:
	ldr	w24, [x8]
	add	x19, x0, #20
	mov	x0, x19
	bl	_spin_lock_irqsave
	ldr	x8, [x21, #48]
	cbz	x8, LBB0_2
; %bb.1:
	add	x0, x21, #40
	mov	x1, x23
	bl	_mii_ethtool_set_link_ksettings
	mov	x20, x0
	b	LBB0_13
LBB0_2:
	ldr	x8, [x21]
Lloh3:
	adrp	x9, _PCNET32_79C970A@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PCNET32_79C970A@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.3:
	add	x1, sp, #8
	mov	x0, x20
	mov	w2, #0
	bl	_pcnet32_suspend
	mov	x24, x0
	cbnz	w0, LBB0_5
; %bb.4:
	ldr	x8, [x21, #24]
	ldr	x8, [x8, #24]
Lloh6:
	adrp	x9, _CSR0@GOTPAGE
Lloh7:
	ldr	x9, [x9, _CSR0@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x9]
Lloh9:
	adrp	x9, _CSR0_STOP@GOTPAGE
Lloh10:
	ldr	x9, [x9, _CSR0_STOP@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x9]
	mov	x0, x22
	blr	x8
LBB0_5:
	ldr	x8, [x23]
Lloh12:
	adrp	x25, _AUTONEG_ENABLE@GOTPAGE
Lloh13:
	ldr	x25, [x25, _AUTONEG_ENABLE@GOTPAGEOFF]
	ldr	x9, [x25]
	cmp	x8, x9
	cset	w8, eq
	str	w8, [x21, #8]
	ldr	x8, [x21, #24]
	ldr	x8, [x8]
	mov	x0, x22
	mov	w1, #2
	blr	x8
	ldr	x9, [x23]
	ldr	x10, [x25]
	ldr	x8, [x21, #24]
	ldr	x8, [x8, #16]
	cmp	x9, x10
	b.ne	LBB0_9
; %bb.6:
	orr	w2, w0, #0x2
	mov	x0, x22
	mov	w1, #2
	blr	x8
	cbz	w24, LBB0_10
LBB0_7:
	mov	x0, x21
	mov	x1, x22
	bl	_pcnet32_clr_suspend
	b	LBB0_12
LBB0_8:
	neg	w20, w24
	b	LBB0_13
LBB0_9:
	and	w2, w0, #0xfffffffd
	mov	x0, x22
	mov	w1, #2
	blr	x8
	ldr	x8, [x23, #8]
Lloh14:
	adrp	x25, _PORT_TP@GOTPAGE
Lloh15:
	ldr	x25, [x25, _PORT_TP@GOTPAGEOFF]
	ldr	x9, [x25]
	cmp	x8, x9
	cset	w8, eq
	str	w8, [x21, #12]
	ldr	x8, [x21, #24]
	ldr	x8, [x8, #8]
Lloh16:
	adrp	x26, _CSR15@GOTPAGE
Lloh17:
	ldr	x26, [x26, _CSR15@GOTPAGEOFF]
	ldr	w1, [x26]
	mov	x0, x22
	blr	x8
	and	w8, w0, #0xfffffe7f
	ldr	x9, [x23, #8]
	ldr	x10, [x25]
	orr	w11, w8, #0x80
	cmp	x9, x10
	csel	w25, w11, w8, eq
	ldr	x8, [x21, #24]
	ldr	x8, [x8, #24]
	ldr	w1, [x26]
	mov	x0, x22
	mov	x2, x25
	blr	x8
	mov	x0, x25
	bl	_cpu_to_le16
	ldp	x9, x8, [x21, #24]
	str	w0, [x8]
Lloh18:
	adrp	x25, _DUPLEX_FULL@GOTPAGE
Lloh19:
	ldr	x25, [x25, _DUPLEX_FULL@GOTPAGEOFF]
	ldr	x8, [x23, #16]
	ldr	x10, [x25]
	cmp	x8, x10
	cset	w8, eq
	str	w8, [x21, #16]
	ldr	x8, [x9]
	mov	x0, x22
	mov	w1, #9
	blr	x8
	and	w8, w0, #0xfffffffc
	ldr	x9, [x23, #16]
	ldr	x10, [x25]
	cmp	x9, x10
	mov	w9, #3
	csel	w9, w9, wzr, eq
	orr	w2, w9, w8
	ldr	x8, [x21, #24]
	ldr	x8, [x8, #16]
	mov	x0, x22
	mov	w1, #9
	blr	x8
	cbnz	w24, LBB0_7
LBB0_10:
	mov	x0, x20
	bl	_netif_running
	cbz	x0, LBB0_12
; %bb.11:
Lloh20:
	adrp	x8, _CSR0_NORMAL@GOTPAGE
Lloh21:
	ldr	x8, [x8, _CSR0_NORMAL@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_pcnet32_restart
LBB0_12:
	mov	w20, #0
LBB0_13:
	ldr	x1, [sp, #8]
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	mov	x0, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_PCNET32_79C970A,8,3            ; @PCNET32_79C970A
	.comm	_CSR0,4,2                       ; @CSR0
	.comm	_CSR0_STOP,4,2                  ; @CSR0_STOP
	.comm	_AUTONEG_ENABLE,8,3             ; @AUTONEG_ENABLE
	.comm	_PORT_TP,8,3                    ; @PORT_TP
	.comm	_CSR15,4,2                      ; @CSR15
	.comm	_DUPLEX_FULL,8,3                ; @DUPLEX_FULL
	.comm	_CSR0_NORMAL,4,2                ; @CSR0_NORMAL
	.no_dead_strip	_pcnet32_set_link_ksettings
.subsections_via_symbols
