	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qlcnic_do_lb_test              ## -- Begin function qlcnic_do_lb_test
	.p2align	4, 0x90
_qlcnic_do_lb_test:                     ## @qlcnic_do_lb_test
	.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	_QLCNIC_NUM_ILB_PKT@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_1
## %bb.2:
	movq	%rdi, %r14
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	24(%rdi), %rax
	movq	(%rax), %r13
	movq	_QLCNIC_ILB_PKT_SIZE@GOTPCREL(%rip), %r12
	movq	_QLCNIC_LB_PKT_POLL_DELAY_MSEC@GOTPCREL(%rip), %rbx
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	xorl	%r15d, %r15d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	incl	-44(%rbp)                       ## 4-byte Folded Spill
	movl	-48(%rbp), %r15d                ## 4-byte Reload
	incl	%r15d
LBB0_10:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	_QLCNIC_ILB_PKT_SIZE@GOTPCREL(%rip), %r12
	movq	_QLCNIC_NUM_ILB_PKT@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jge	LBB0_11
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
	movl	16(%r14), %edi
	movl	(%r12), %esi
	callq	_netdev_alloc_skb
	testq	%rax, %rax
	je	LBB0_11
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%r15d, -48(%rbp)                ## 4-byte Spill
	movl	(%rax), %edi
	movl	20(%r14), %esi
	movq	%rax, %r15
	callq	_qlcnic_create_loopback_buff
	movl	(%r12), %esi
	movq	%r15, %rdi
	callq	_skb_put
	movq	8(%r14), %rax
	movq	$0, (%rax)
	movl	16(%r14), %esi
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	callq	_qlcnic_xmit_frame
	movl	$-1, %r15d
	movq	_QLCNIC_LB_PKT_POLL_COUNT@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_5:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%rbx), %edi
	callq	_msleep
	movq	%r13, %rdi
	callq	_qlcnic_process_rcv_ring_diag
	incl	%r15d
	cmpl	(%r12), %r15d
	jg	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=2
	movq	8(%r14), %rax
	cmpq	$0, (%rax)
	je	LBB0_5
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_dev_kfree_skb_any
	movq	8(%r14), %rax
	cmpq	$0, (%rax)
	jne	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	(%r14), %rdi
	movl	-48(%rbp), %r15d                ## 4-byte Reload
	incl	%r15d
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_dev_warn
	jmp	LBB0_10
LBB0_11:
	xorl	%ebx, %ebx
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	cmpl	%r15d, %ecx
	je	LBB0_14
## %bb.12:
	movq	(%r14), %rdi
	leaq	L_.str.1(%rip), %rsi
	movl	%r15d, %edx
	callq	_dev_err
	movq	_QLCNIC_ILB_MODE@GOTPCREL(%rip), %rax
	movl	$-1, %ebx
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	cmpq	%rcx, (%rax)
	je	LBB0_14
## %bb.13:
	movq	(%r14), %rdi
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_warn
	jmp	LBB0_14
LBB0_1:
	xorl	%ebx, %ebx
LBB0_14:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_QLCNIC_NUM_ILB_PKT,4,2         ## @QLCNIC_NUM_ILB_PKT
	.comm	_QLCNIC_ILB_PKT_SIZE,4,2        ## @QLCNIC_ILB_PKT_SIZE
	.comm	_QLCNIC_LB_PKT_POLL_DELAY_MSEC,4,2 ## @QLCNIC_LB_PKT_POLL_DELAY_MSEC
	.comm	_QLCNIC_LB_PKT_POLL_COUNT,4,2   ## @QLCNIC_LB_PKT_POLL_COUNT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"LB Test: packet #%d was not received\n"

L_.str.1:                               ## @.str.1
	.asciz	"LB Test: failed, TX[%d], RX[%d]\n"

	.comm	_QLCNIC_ILB_MODE,8,3            ## @QLCNIC_ILB_MODE
L_.str.2:                               ## @.str.2
	.asciz	"WARNING: Please check loopback cable\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qlcnic_do_lb_test              ; -- Begin function qlcnic_do_lb_test
	.p2align	2
_qlcnic_do_lb_test:                     ; @qlcnic_do_lb_test
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
Lloh0:
	adrp	x26, _QLCNIC_NUM_ILB_PKT@GOTPAGE
Lloh1:
	ldr	x26, [x26, _QLCNIC_NUM_ILB_PKT@GOTPAGEOFF]
	ldr	w8, [x26]
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.1:
	mov	x19, x0
	str	x1, [sp, #8]                    ; 8-byte Folded Spill
	mov	w21, #0
	mov	w22, #0
	ldr	x8, [x0, #24]
	ldr	x23, [x8]
Lloh2:
	adrp	x27, _QLCNIC_ILB_PKT_SIZE@GOTPAGE
Lloh3:
	ldr	x27, [x27, _QLCNIC_ILB_PKT_SIZE@GOTPAGEOFF]
Lloh4:
	adrp	x28, _QLCNIC_LB_PKT_POLL_DELAY_MSEC@GOTPAGE
Lloh5:
	ldr	x28, [x28, _QLCNIC_LB_PKT_POLL_DELAY_MSEC@GOTPAGEOFF]
Lloh6:
	adrp	x20, _QLCNIC_LB_PKT_POLL_COUNT@GOTPAGE
Lloh7:
	ldr	x20, [x20, _QLCNIC_LB_PKT_POLL_COUNT@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	w21, w21, #1
	add	w22, w22, #1
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x26]
	cmp	w22, w8
	b.ge	LBB0_10
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	ldr	w0, [x19, #16]
	ldr	w1, [x27]
	bl	_netdev_alloc_skb
	cbz	x0, LBB0_10
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x25, x0
	ldr	w0, [x0]
	ldr	w1, [x19, #20]
	bl	_qlcnic_create_loopback_buff
	ldr	w1, [x27]
	mov	x0, x25
	bl	_skb_put
	ldr	x8, [x19, #8]
	str	xzr, [x8]
	ldr	w1, [x19, #16]
	mov	x0, x25
	bl	_qlcnic_xmit_frame
	mov	w24, #-1
LBB0_6:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w0, [x28]
	bl	_msleep
	mov	x0, x23
	bl	_qlcnic_process_rcv_ring_diag
	ldr	w8, [x20]
	add	w24, w24, #1
	cmp	w24, w8
	b.gt	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	cbz	x8, LBB0_6
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x25
	bl	_dev_kfree_skb_any
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	cbnz	x8, LBB0_2
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x0, [x19]
	add	w22, w22, #1
	str	x22, [sp]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_warn
	b	LBB0_3
LBB0_10:
	cmp	w21, w22
	b.ne	LBB0_12
LBB0_11:
	mov	w0, #0
	b	LBB0_15
LBB0_12:
	ldr	x0, [x19]
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x22
	mov	x3, x21
	bl	_dev_err
Lloh12:
	adrp	x8, _QLCNIC_ILB_MODE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _QLCNIC_ILB_MODE@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	ldr	x9, [sp, #8]                    ; 8-byte Folded Reload
	cmp	x8, x9
	b.eq	LBB0_14
; %bb.13:
	ldr	x0, [x19]
Lloh15:
	adrp	x1, l_.str.2@PAGE
Lloh16:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_warn
LBB0_14:
	mov	w0, #-1
LBB0_15:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_QLCNIC_NUM_ILB_PKT,4,2         ; @QLCNIC_NUM_ILB_PKT
	.comm	_QLCNIC_ILB_PKT_SIZE,4,2        ; @QLCNIC_ILB_PKT_SIZE
	.comm	_QLCNIC_LB_PKT_POLL_DELAY_MSEC,4,2 ; @QLCNIC_LB_PKT_POLL_DELAY_MSEC
	.comm	_QLCNIC_LB_PKT_POLL_COUNT,4,2   ; @QLCNIC_LB_PKT_POLL_COUNT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"LB Test: packet #%d was not received\n"

l_.str.1:                               ; @.str.1
	.asciz	"LB Test: failed, TX[%d], RX[%d]\n"

	.comm	_QLCNIC_ILB_MODE,8,3            ; @QLCNIC_ILB_MODE
l_.str.2:                               ; @.str.2
	.asciz	"WARNING: Please check loopback cable\n"

.subsections_via_symbols
