	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function greth_link_change
_greth_link_change:                     ## @greth_link_change
	.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	%rdi, %r15
	callq	_netdev_priv
	movq	%rax, %rbx
	movq	8(%r15), %r12
	leaq	24(%rax), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	(%r12), %rax
	testq	%rax, %rax
	je	LBB0_8
## %bb.1:
	movq	(%rbx), %rcx
	cmpq	8(%r12), %rcx
	jne	LBB0_3
## %bb.2:
	movl	8(%rbx), %ecx
	movb	$1, %r13b
	cmpl	16(%r12), %ecx
	je	LBB0_4
LBB0_3:
	movq	32(%rbx), %rax
	movl	(%rax), %edi
	callq	_GRETH_REGLOAD
	movq	_GRETH_CTRL_FD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_GRETH_CTRL_SP@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%edx, %edi
	orl	%ecx, %edi
	movq	_GRETH_CTRL_GB@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	orl	%esi, %edi
	notl	%edi
	andl	%eax, %edi
	movl	16(%r12), %eax
	testl	%eax, %eax
	cmovel	%eax, %ecx
	orl	%edi, %ecx
	movq	8(%r12), %rax
	movq	_SPEED_100@GOTPCREL(%rip), %r8
	movq	_SPEED_1000@GOTPCREL(%rip), %rdi
	xorl	%r13d, %r13d
	cmpq	(%rdi), %rax
	cmovnel	%r13d, %esi
	cmpq	(%r8), %rax
	cmovel	%edx, %esi
	orl	%ecx, %esi
	movq	32(%rbx), %rax
	movl	(%rax), %edi
	callq	_GRETH_REGSAVE
	movq	8(%r12), %rax
	movq	%rax, (%rbx)
	movl	16(%r12), %eax
	movl	%eax, 8(%rbx)
	movq	(%r12), %rax
LBB0_4:
	cmpq	16(%rbx), %rax
	jne	LBB0_5
## %bb.11:
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	testb	%r13b, %r13b
	je	LBB0_12
## %bb.14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	cmpq	$0, 16(%rbx)
	je	LBB0_10
## %bb.9:
	movq	%rbx, %rcx
	addq	$16, %rcx
	jmp	LBB0_6
LBB0_5:
	movq	%rbx, %rcx
	addq	$16, %rcx
	testq	%rax, %rax
	jne	LBB0_7
LBB0_6:
	movq	$0, (%rbx)
	movl	$-1, 8(%rbx)
	xorl	%eax, %eax
LBB0_7:
	movq	%rax, (%rcx)
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
LBB0_12:
	cmpq	$0, (%r12)
	movl	(%r15), %esi
	je	LBB0_13
## %bb.15:
	movq	8(%r12), %rdx
	movq	_DUPLEX_FULL@GOTPCREL(%rip), %rax
	movslq	16(%r12), %rcx
	cmpq	%rcx, (%rax)
	leaq	L_.str.1(%rip), %rax
	leaq	L_.str.2(%rip), %rcx
	cmoveq	%rax, %rcx
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pr_debug                       ## TAILCALL
LBB0_13:
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pr_debug                       ## TAILCALL
LBB0_10:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock_irqrestore         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_GRETH_CTRL_FD,4,2              ## @GRETH_CTRL_FD
	.comm	_GRETH_CTRL_SP,4,2              ## @GRETH_CTRL_SP
	.comm	_GRETH_CTRL_GB,4,2              ## @GRETH_CTRL_GB
	.comm	_SPEED_100,8,3                  ## @SPEED_100
	.comm	_SPEED_1000,8,3                 ## @SPEED_1000
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: link up (%d/%s)\n"

	.comm	_DUPLEX_FULL,8,3                ## @DUPLEX_FULL
L_.str.1:                               ## @.str.1
	.asciz	"Full"

L_.str.2:                               ## @.str.2
	.asciz	"Half"

L_.str.3:                               ## @.str.3
	.asciz	"%s: link down\n"

	.no_dead_strip	_greth_link_change
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function greth_link_change
_greth_link_change:                     ; @greth_link_change
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x0
	bl	_netdev_priv
	mov	x21, x0
	ldr	x22, [x19, #8]
	add	x20, x0, #24
	mov	x0, x20
	bl	_spin_lock_irqsave
	ldr	x8, [x22]
	cbz	x8, LBB0_7
; %bb.1:
	ldr	x9, [x21]
	ldr	x10, [x22, #8]
	cmp	x9, x10
	b.ne	LBB0_4
; %bb.2:
	ldr	w9, [x21, #8]
	ldr	w10, [x22, #16]
	cmp	w9, w10
	b.ne	LBB0_4
; %bb.3:
	mov	w23, #1
	b	LBB0_5
LBB0_4:
	ldr	x8, [x21, #32]
	ldr	w0, [x8]
	bl	_GRETH_REGLOAD
Lloh0:
	adrp	x8, _GRETH_CTRL_FD@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GRETH_CTRL_FD@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _GRETH_CTRL_SP@GOTPAGE
Lloh4:
	ldr	x9, [x9, _GRETH_CTRL_SP@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w10, w9, w8
Lloh6:
	adrp	x11, _GRETH_CTRL_GB@GOTPAGE
Lloh7:
	ldr	x11, [x11, _GRETH_CTRL_GB@GOTPAGEOFF]
Lloh8:
	ldr	w11, [x11]
	orr	w10, w10, w11
	bic	w10, w0, w10
	ldr	w12, [x22, #16]
	cmp	w12, #0
	csel	w8, wzr, w8, eq
	orr	w8, w8, w10
Lloh9:
	adrp	x10, _SPEED_100@GOTPAGE
Lloh10:
	ldr	x10, [x10, _SPEED_100@GOTPAGEOFF]
	ldr	x12, [x22, #8]
Lloh11:
	ldr	x10, [x10]
Lloh12:
	adrp	x13, _SPEED_1000@GOTPAGE
Lloh13:
	ldr	x13, [x13, _SPEED_1000@GOTPAGEOFF]
Lloh14:
	ldr	x13, [x13]
	cmp	x12, x13
	csel	w11, w11, wzr, eq
	cmp	x12, x10
	csel	w9, w9, w11, eq
	orr	w1, w8, w9
	ldr	x8, [x21, #32]
	ldr	w0, [x8]
	bl	_GRETH_REGSAVE
	mov	w23, #0
	ldp	x8, x9, [x22]
	str	x9, [x21]
	ldr	w9, [x22, #16]
	str	w9, [x21, #8]
LBB0_5:
	mov	x9, x21
	ldr	x10, [x9, #16]!
	cmp	x8, x10
	b.ne	LBB0_9
; %bb.6:
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	tbz	w23, #0, LBB0_12
	b	LBB0_14
LBB0_7:
	mov	x9, x21
	ldr	x8, [x9, #16]!
	cbnz	x8, LBB0_10
; %bb.8:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_spin_unlock_irqrestore
LBB0_9:
	cbnz	x8, LBB0_11
LBB0_10:
	mov	x8, #0
	str	xzr, [x21]
	mov	w10, #-1
	str	w10, [x21, #8]
LBB0_11:
	str	x8, [x9]
	mov	x0, x20
	bl	_spin_unlock_irqrestore
LBB0_12:
	ldr	x8, [x22]
	ldr	w1, [x19]
	cbz	x8, LBB0_15
; %bb.13:
	ldr	x8, [x22, #8]
Lloh15:
	adrp	x9, _DUPLEX_FULL@GOTPAGE
Lloh16:
	ldr	x9, [x9, _DUPLEX_FULL@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	ldrsw	x10, [x22, #16]
Lloh18:
	adrp	x11, l_.str.2@PAGE
Lloh19:
	add	x11, x11, l_.str.2@PAGEOFF
Lloh20:
	adrp	x12, l_.str.1@PAGE
Lloh21:
	add	x12, x12, l_.str.1@PAGEOFF
	cmp	x9, x10
	csel	x9, x12, x11, eq
	stp	x8, x9, [sp]
Lloh22:
	adrp	x0, l_.str@PAGE
Lloh23:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_debug
LBB0_14:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_15:
Lloh24:
	adrp	x0, l_.str.3@PAGE
Lloh25:
	add	x0, x0, l_.str.3@PAGEOFF
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_pr_debug
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_GRETH_CTRL_FD,4,2              ; @GRETH_CTRL_FD
	.comm	_GRETH_CTRL_SP,4,2              ; @GRETH_CTRL_SP
	.comm	_GRETH_CTRL_GB,4,2              ; @GRETH_CTRL_GB
	.comm	_SPEED_100,8,3                  ; @SPEED_100
	.comm	_SPEED_1000,8,3                 ; @SPEED_1000
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: link up (%d/%s)\n"

	.comm	_DUPLEX_FULL,8,3                ; @DUPLEX_FULL
l_.str.1:                               ; @.str.1
	.asciz	"Full"

l_.str.2:                               ; @.str.2
	.asciz	"Half"

l_.str.3:                               ; @.str.3
	.asciz	"%s: link down\n"

	.no_dead_strip	_greth_link_change
.subsections_via_symbols
