	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qlcnic_handle_linkevent
_qlcnic_handle_linkevent:               ## @qlcnic_handle_linkevent
	.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
	movq	(%rdi), %rax
	movq	8(%rdi), %rdi
	movl	$1, (%rax)
	movq	(%rsi), %rax
	movl	8(%rax), %ebx
	movzbl	%bl, %r14d
	movl	%ebx, %ecx
	shrl	$16, %ecx
	movzbl	%cl, %r12d
	movzbl	%bh, %edx
	movq	_LINKEVENT_MODULE_TWINAX_UNSUPPORTED_CABLE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %edx
	jne	LBB0_2
## %bb.1:
	movl	%edx, %r13d
	movl	4(%rax), %edx
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_info
	jmp	LBB0_4
LBB0_2:
	movq	_LINKEVENT_MODULE_TWINAX_UNSUPPORTED_CABLELEN@GOTPCREL(%rip), %rax
	movl	%edx, %r13d
	cmpl	(%rax), %edx
	jne	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_info
LBB0_4:
	shrl	$24, %ebx
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_qlcnic_advert_link_change
	movq	_LINKEVENT_FULL_DUPLEX@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r12d
	jne	LBB0_5
## %bb.6:
	movq	_DUPLEX_FULL@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_5:
	movq	_DUPLEX_HALF@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %ecx
	movq	(%r15), %rax
	movl	%ecx, 16(%rax)
	movl	%r13d, 4(%rax)
	movl	%ebx, 8(%rax)
	testl	%r14d, %r14d
	jne	LBB0_9
## %bb.8:
	movq	_SPEED_UNKNOWN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 12(%rax)
	movq	_DUPLEX_UNKNOWN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 16(%rax)
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LINKEVENT_MODULE_TWINAX_UNSUPPORTED_CABLE,4,2 ## @LINKEVENT_MODULE_TWINAX_UNSUPPORTED_CABLE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unsupported cable: OUI 0x%x, length %d\n"

	.comm	_LINKEVENT_MODULE_TWINAX_UNSUPPORTED_CABLELEN,4,2 ## @LINKEVENT_MODULE_TWINAX_UNSUPPORTED_CABLELEN
L_.str.1:                               ## @.str.1
	.asciz	"unsupported cable length %d\n"

	.comm	_QLCNIC_ILB_MODE,4,2            ## @QLCNIC_ILB_MODE
	.comm	_QLCNIC_ELB_MODE,4,2            ## @QLCNIC_ELB_MODE
	.comm	_QLCNIC_LINKEVENT,4,2           ## @QLCNIC_LINKEVENT
	.comm	_LINKEVENT_FULL_DUPLEX,4,2      ## @LINKEVENT_FULL_DUPLEX
	.comm	_DUPLEX_FULL,4,2                ## @DUPLEX_FULL
	.comm	_DUPLEX_HALF,4,2                ## @DUPLEX_HALF
	.comm	_SPEED_UNKNOWN,4,2              ## @SPEED_UNKNOWN
	.comm	_DUPLEX_UNKNOWN,4,2             ## @DUPLEX_UNKNOWN
	.no_dead_strip	_qlcnic_handle_linkevent
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qlcnic_handle_linkevent
_qlcnic_handle_linkevent:               ; @qlcnic_handle_linkevent
	.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
	ldr	x0, [x0, #8]
	ldr	x8, [x19]
	mov	w9, #1
	str	w9, [x8]
	ldr	x8, [x1]
	ldr	w9, [x8, #8]
	and	w20, w9, #0xff
	ubfx	w23, w9, #16, #8
	lsr	w21, w9, #24
	ubfx	w22, w9, #8, #8
Lloh0:
	adrp	x9, _LINKEVENT_MODULE_TWINAX_UNSUPPORTED_CABLE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _LINKEVENT_MODULE_TWINAX_UNSUPPORTED_CABLE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w22, w9
	b.ne	LBB0_2
; %bb.1:
	ldr	w2, [x8, #4]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_4
LBB0_2:
Lloh5:
	adrp	x8, _LINKEVENT_MODULE_TWINAX_UNSUPPORTED_CABLELEN@GOTPAGE
Lloh6:
	ldr	x8, [x8, _LINKEVENT_MODULE_TWINAX_UNSUPPORTED_CABLELEN@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cmp	w22, w8
	b.ne	LBB0_5
; %bb.3:
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
                                        ; implicit-def: $w2
LBB0_4:
	bl	_dev_info
LBB0_5:
	mov	x0, x19
	mov	x1, x20
	bl	_qlcnic_advert_link_change
Lloh10:
	adrp	x8, _LINKEVENT_FULL_DUPLEX@GOTPAGE
Lloh11:
	ldr	x8, [x8, _LINKEVENT_FULL_DUPLEX@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
Lloh13:
	adrp	x9, _DUPLEX_FULL@GOTPAGE
Lloh14:
	ldr	x9, [x9, _DUPLEX_FULL@GOTPAGEOFF]
Lloh15:
	adrp	x10, _DUPLEX_HALF@GOTPAGE
Lloh16:
	ldr	x10, [x10, _DUPLEX_HALF@GOTPAGEOFF]
	cmp	w23, w8
	csel	x8, x9, x10, eq
	ldr	w9, [x8]
	ldr	x8, [x19]
	str	w9, [x8, #16]
	stp	w22, w21, [x8, #4]
	cbnz	w20, LBB0_7
; %bb.6:
Lloh17:
	adrp	x9, _SPEED_UNKNOWN@GOTPAGE
Lloh18:
	ldr	x9, [x9, _SPEED_UNKNOWN@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
Lloh20:
	adrp	x10, _DUPLEX_UNKNOWN@GOTPAGE
Lloh21:
	ldr	x10, [x10, _DUPLEX_UNKNOWN@GOTPAGEOFF]
Lloh22:
	ldr	w10, [x10]
	stp	w9, w10, [x8, #12]
LBB0_7:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_LINKEVENT_MODULE_TWINAX_UNSUPPORTED_CABLE,4,2 ; @LINKEVENT_MODULE_TWINAX_UNSUPPORTED_CABLE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unsupported cable: OUI 0x%x, length %d\n"

	.comm	_LINKEVENT_MODULE_TWINAX_UNSUPPORTED_CABLELEN,4,2 ; @LINKEVENT_MODULE_TWINAX_UNSUPPORTED_CABLELEN
l_.str.1:                               ; @.str.1
	.asciz	"unsupported cable length %d\n"

	.comm	_QLCNIC_ILB_MODE,4,2            ; @QLCNIC_ILB_MODE
	.comm	_QLCNIC_ELB_MODE,4,2            ; @QLCNIC_ELB_MODE
	.comm	_QLCNIC_LINKEVENT,4,2           ; @QLCNIC_LINKEVENT
	.comm	_LINKEVENT_FULL_DUPLEX,4,2      ; @LINKEVENT_FULL_DUPLEX
	.comm	_DUPLEX_FULL,4,2                ; @DUPLEX_FULL
	.comm	_DUPLEX_HALF,4,2                ; @DUPLEX_HALF
	.comm	_SPEED_UNKNOWN,4,2              ; @SPEED_UNKNOWN
	.comm	_DUPLEX_UNKNOWN,4,2             ; @DUPLEX_UNKNOWN
	.no_dead_strip	_qlcnic_handle_linkevent
.subsections_via_symbols
