	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function niu_link_status_common
_niu_link_status_common:                ## @niu_link_status_common
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r15
	movq	8(%rdi), %r14
	movq	%r14, %rdi
	callq	_netif_carrier_ok
	testl	%ebx, %ebx
	je	LBB0_8
## %bb.1:
	testq	%rax, %rax
	jne	LBB0_8
## %bb.2:
	movq	_link@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	16(%r15), %rax
	movq	_SPEED_10000@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %r8
	jmp	LBB0_7
LBB0_8:
	movq	%r14, %rdi
	callq	_netif_carrier_ok
	testl	%ebx, %ebx
	jne	LBB0_11
## %bb.9:
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movq	_link@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.7(%rip), %rcx
	movq	%r15, %rdi
	movq	%r14, %rdx
	callq	_netif_warn
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_niu_handle_led
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	movq	%r14, %rdi
	callq	_netif_carrier_off
	jmp	LBB0_11
LBB0_4:
	movq	_SPEED_1000@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.5:
	leaq	L_.str.2(%rip), %r8
	jmp	LBB0_7
LBB0_6:
	movq	_SPEED_100@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	leaq	L_.str.3(%rip), %rax
	leaq	L_.str.4(%rip), %r8
	cmoveq	%rax, %r8
LBB0_7:
	movq	24(%r15), %rax
	movq	_DUPLEX_FULL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	leaq	L_.str.5(%rip), %rax
	leaq	L_.str.6(%rip), %r9
	cmoveq	%rax, %r9
	leaq	L_.str(%rip), %rcx
	movq	%r15, %rdi
	movq	%r14, %rdx
	callq	_netif_info
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	movq	%r15, %rdi
	callq	_niu_init_xif
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_niu_handle_led
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	movq	%r14, %rdi
	callq	_netif_carrier_on
LBB0_11:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_link,4,2                       ## @link
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Link is up at %s, %s duplex\n"

	.comm	_SPEED_10000,8,3                ## @SPEED_10000
L_.str.1:                               ## @.str.1
	.asciz	"10Gb/sec"

	.comm	_SPEED_1000,8,3                 ## @SPEED_1000
L_.str.2:                               ## @.str.2
	.asciz	"1Gb/sec"

	.comm	_SPEED_100,8,3                  ## @SPEED_100
L_.str.3:                               ## @.str.3
	.asciz	"100Mbit/sec"

L_.str.4:                               ## @.str.4
	.asciz	"10Mbit/sec"

	.comm	_DUPLEX_FULL,8,3                ## @DUPLEX_FULL
L_.str.5:                               ## @.str.5
	.asciz	"full"

L_.str.6:                               ## @.str.6
	.asciz	"half"

L_.str.7:                               ## @.str.7
	.asciz	"Link is down\n"

	.no_dead_strip	_niu_link_status_common
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function niu_link_status_common
_niu_link_status_common:                ; @niu_link_status_common
	.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
	mov	x21, x1
	mov	x20, x0
	ldr	x19, [x0, #8]
	mov	x0, x19
	bl	_netif_carrier_ok
	cbz	w21, LBB0_4
; %bb.1:
	cbnz	x0, LBB0_4
; %bb.2:
Lloh0:
	adrp	x8, _link@GOTPAGE
Lloh1:
	ldr	x8, [x8, _link@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	ldr	x8, [x20, #16]
Lloh3:
	adrp	x9, _SPEED_10000@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SPEED_10000@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.3:
Lloh6:
	adrp	x4, l_.str.1@PAGE
Lloh7:
	add	x4, x4, l_.str.1@PAGEOFF
	b	LBB0_10
LBB0_4:
	mov	x0, x19
	bl	_netif_carrier_ok
	cbnz	w21, LBB0_11
; %bb.5:
	cbz	x0, LBB0_11
; %bb.6:
Lloh8:
	adrp	x8, _link@GOTPAGE
Lloh9:
	ldr	x8, [x8, _link@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x3, l_.str.7@PAGE
Lloh12:
	add	x3, x3, l_.str.7@PAGEOFF
	mov	x0, x20
	mov	x2, x19
	bl	_netif_warn
	mov	x0, x20
	bl	_spin_lock_irqsave
	mov	x0, x20
	mov	w1, #0
	bl	_niu_handle_led
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	mov	x0, x19
	bl	_netif_carrier_off
	b	LBB0_11
LBB0_7:
Lloh13:
	adrp	x9, _SPEED_1000@GOTPAGE
Lloh14:
	ldr	x9, [x9, _SPEED_1000@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.8:
Lloh16:
	adrp	x4, l_.str.2@PAGE
Lloh17:
	add	x4, x4, l_.str.2@PAGEOFF
	b	LBB0_10
LBB0_9:
Lloh18:
	adrp	x9, _SPEED_100@GOTPAGE
Lloh19:
	ldr	x9, [x9, _SPEED_100@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
Lloh21:
	adrp	x10, l_.str.4@PAGE
Lloh22:
	add	x10, x10, l_.str.4@PAGEOFF
Lloh23:
	adrp	x11, l_.str.3@PAGE
Lloh24:
	add	x11, x11, l_.str.3@PAGEOFF
	cmp	x8, x9
	csel	x4, x11, x10, eq
LBB0_10:
	ldr	x8, [x20, #24]
Lloh25:
	adrp	x9, _DUPLEX_FULL@GOTPAGE
Lloh26:
	ldr	x9, [x9, _DUPLEX_FULL@GOTPAGEOFF]
Lloh27:
	ldr	x9, [x9]
Lloh28:
	adrp	x10, l_.str.6@PAGE
Lloh29:
	add	x10, x10, l_.str.6@PAGEOFF
Lloh30:
	adrp	x11, l_.str.5@PAGE
Lloh31:
	add	x11, x11, l_.str.5@PAGEOFF
	cmp	x8, x9
	csel	x5, x11, x10, eq
Lloh32:
	adrp	x3, l_.str@PAGE
Lloh33:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x19
	bl	_netif_info
	mov	x0, x20
	bl	_spin_lock_irqsave
	mov	x0, x20
	bl	_niu_init_xif
	mov	x0, x20
	mov	w1, #1
	bl	_niu_handle_led
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	mov	x0, x19
	bl	_netif_carrier_on
LBB0_11:
	mov	w0, #0
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_link,4,2                       ; @link
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Link is up at %s, %s duplex\n"

	.comm	_SPEED_10000,8,3                ; @SPEED_10000
l_.str.1:                               ; @.str.1
	.asciz	"10Gb/sec"

	.comm	_SPEED_1000,8,3                 ; @SPEED_1000
l_.str.2:                               ; @.str.2
	.asciz	"1Gb/sec"

	.comm	_SPEED_100,8,3                  ; @SPEED_100
l_.str.3:                               ; @.str.3
	.asciz	"100Mbit/sec"

l_.str.4:                               ; @.str.4
	.asciz	"10Mbit/sec"

	.comm	_DUPLEX_FULL,8,3                ; @DUPLEX_FULL
l_.str.5:                               ; @.str.5
	.asciz	"full"

l_.str.6:                               ; @.str.6
	.asciz	"half"

l_.str.7:                               ; @.str.7
	.asciz	"Link is down\n"

	.no_dead_strip	_niu_link_status_common
.subsections_via_symbols
