	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qlcnic_process_cmd_ring
_qlcnic_process_cmd_ring:               ## @qlcnic_process_cmd_ring
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	8(%rdi), %rax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	movq	16(%rdi), %r13
	leaq	8(%rsi), %r14
	movq	%r14, %rdi
	callq	_spin_trylock
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	%rbx, -88(%rbp)                 ## 8-byte Spill
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movl	%r12d, %ebx
	movq	(%r15), %r12
	movq	16(%r15), %rax
	movl	(%rax), %edi
	callq	_le32_to_cpu
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	cmpl	$2, %ebx
	movl	$1, %eax
	cmovgel	%ebx, %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	xorl	%ebx, %ebx
	movq	_PCI_DMA_TODEVICE@GOTPCREL(%rip), %r14
	movq	%r15, -104(%rbp)                ## 8-byte Spill
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rax,%rcx,8), %rbx
	addq	$8, %rbx
	movq	-104(%rbp), %r15                ## 8-byte Reload
	incl	28(%r15)
	movq	(%rbx), %rdi
	callq	_dev_kfree_skb_any
	movq	$0, (%rbx)
	movq	-112(%rbp), %r12                ## 8-byte Reload
	movl	-56(%rbp), %ebx                 ## 4-byte Reload
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	36(%r15), %esi
	movq	%r12, %rdi
	callq	_get_next_index
	movq	%rax, %r12
	incl	%ebx
	cmpl	-52(%rbp), %ebx                 ## 4-byte Folded Reload
	je	LBB0_10
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_7 Depth 2
	cmpq	-48(%rbp), %r12                 ## 8-byte Folded Reload
	je	LBB0_11
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	40(%r15), %rax
	leaq	(%r12,%r12,2), %rcx
	cmpq	$0, 8(%rax,%rcx,8)
	je	LBB0_9
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%ebx, -56(%rbp)                 ## 4-byte Spill
	movq	%r12, -112(%rbp)                ## 8-byte Spill
	movq	16(%rax,%rcx,8), %r12
	movq	(%r12), %rsi
	movl	8(%r12), %edx
	movq	%rcx, %r15
	movl	(%r14), %ecx
	movq	%r13, %rdi
	movq	%rax, %rbx
	callq	_pci_unmap_single
	movq	$0, (%r12)
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	cmpl	$2, (%rbx,%r15,8)
	jl	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rax,%rcx,8), %rbx
	addq	$16, %r12
	movl	$1, %r15d
	.p2align	4, 0x90
LBB0_7:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%r12), %rsi
	movl	8(%r12), %edx
	movl	(%r14), %ecx
	movq	%r13, %rdi
	callq	_pci_unmap_page
	movq	$0, (%r12)
	incl	%r15d
	addq	$16, %r12
	cmpl	(%rbx), %r15d
	jl	LBB0_7
	jmp	LBB0_8
LBB0_1:
	movl	$1, %ebx
	jmp	LBB0_19
LBB0_11:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, (%r15)
	testl	%ebx, %ebx
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	jne	LBB0_12
	jmp	LBB0_18
LBB0_10:
	movq	%r12, (%r15)
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	movq	-64(%rbp), %r14                 ## 8-byte Reload
LBB0_12:
	movq	-96(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_netif_running
	testq	%rax, %rax
	je	LBB0_18
## %bb.13:
	xorl	%eax, %eax
	callq	_smp_mb
	movl	32(%r15), %edi
	callq	_netif_tx_queue_stopped
	testq	%rax, %rax
	je	LBB0_17
## %bb.14:
	movq	%rbx, %rdi
	callq	_netif_carrier_ok
	testq	%rax, %rax
	je	LBB0_17
## %bb.15:
	movq	%r15, %rdi
	callq	_qlcnic_tx_avail
	movq	_TX_STOP_THRESH@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jle	LBB0_17
## %bb.16:
	movl	32(%r15), %edi
	callq	_netif_tx_wake_queue
	incl	24(%r15)
LBB0_17:
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movq	$0, (%rax)
LBB0_18:
	movq	16(%r15), %rax
	movl	(%rax), %edi
	callq	_le32_to_cpu
	xorl	%ebx, %ebx
	cmpq	%rax, -48(%rbp)                 ## 8-byte Folded Reload
	sete	%bl
	movq	%r14, %rdi
	callq	_spin_unlock
LBB0_19:
	movl	%ebx, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_DMA_TODEVICE,4,2           ## @PCI_DMA_TODEVICE
	.comm	_TX_STOP_THRESH,8,3             ## @TX_STOP_THRESH
	.no_dead_strip	_qlcnic_process_cmd_ring
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qlcnic_process_cmd_ring
_qlcnic_process_cmd_ring:               ; @qlcnic_process_cmd_ring
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	mov	x26, x2
	mov	x20, x1
	mov	x21, x0
	ldp	x22, x24, [x0, #8]
	add	x19, x1, #8
	mov	x0, x19
	bl	_spin_trylock
	cbz	w0, LBB0_9
; %bb.1:
	stp	x21, x22, [sp]                  ; 16-byte Folded Spill
	str	x19, [sp, #16]                  ; 8-byte Folded Spill
	ldr	x25, [x20]
	ldr	x8, [x20, #16]
	ldr	w0, [x8]
	bl	_le32_to_cpu
	str	x0, [sp, #24]                   ; 8-byte Folded Spill
	mov	w27, #0
	cmp	w26, #1
	csinc	w26, w26, wzr, gt
	mov	w21, #24
Lloh0:
	adrp	x23, _PCI_DMA_TODEVICE@GOTPAGE
Lloh1:
	ldr	x23, [x23, _PCI_DMA_TODEVICE@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x20, #28]
	add	w8, w8, #1
	str	w8, [x20, #28]
	ldr	x0, [x19]
	bl	_dev_kfree_skb_any
	str	xzr, [x19]
	mov	w21, #24
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w1, [x20, #36]
	mov	x0, x25
	bl	_get_next_index
	mov	x25, x0
	add	w27, w27, #1
	cmp	w27, w26
	b.eq	LBB0_11
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
	ldr	x8, [sp, #24]                   ; 8-byte Folded Reload
	cmp	x25, x8
	b.eq	LBB0_10
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x20, #40]
	madd	x19, x25, x21, x8
	ldr	x9, [x19, #8]!
	cbz	x9, LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w9, #24
	madd	x21, x25, x9, x8
	ldr	x22, [x21, #16]
	ldr	x1, [x22]
	ldr	w2, [x22, #8]
	ldr	w3, [x23]
	mov	x0, x24
	bl	_pci_unmap_single
	str	xzr, [x22]
	ldr	w8, [x21]
	cmp	w8, #2
	b.lt	LBB0_2
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x22, x22, #16
	mov	w28, #1
LBB0_8:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x1, [x22]
	ldr	w2, [x22, #8]
	ldr	w3, [x23]
	mov	x0, x24
	bl	_pci_unmap_page
	str	xzr, [x22], #16
	add	w28, w28, #1
	ldr	w8, [x21]
	cmp	w28, w8
	b.lt	LBB0_8
	b	LBB0_2
LBB0_9:
	mov	w20, #1
	b	LBB0_19
LBB0_10:
	ldp	x19, x8, [sp, #16]              ; 16-byte Folded Reload
	str	x8, [x20]
	cbnz	w27, LBB0_12
	b	LBB0_18
LBB0_11:
	str	x25, [x20]
	str	x25, [sp, #24]                  ; 8-byte Folded Spill
	ldr	x19, [sp, #16]                  ; 8-byte Folded Reload
LBB0_12:
	ldr	x21, [sp, #8]                   ; 8-byte Folded Reload
	mov	x0, x21
	bl	_netif_running
	cbz	x0, LBB0_18
; %bb.13:
	bl	_smp_mb
	ldr	w0, [x20, #32]
	bl	_netif_tx_queue_stopped
	cbz	x0, LBB0_17
; %bb.14:
	mov	x0, x21
	bl	_netif_carrier_ok
	cbz	x0, LBB0_17
; %bb.15:
	mov	x0, x20
	bl	_qlcnic_tx_avail
Lloh2:
	adrp	x8, _TX_STOP_THRESH@GOTPAGE
Lloh3:
	ldr	x8, [x8, _TX_STOP_THRESH@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cmp	x0, x8
	b.le	LBB0_17
; %bb.16:
	ldr	w0, [x20, #32]
	bl	_netif_tx_wake_queue
	ldr	w8, [x20, #24]
	add	w8, w8, #1
	str	w8, [x20, #24]
LBB0_17:
	ldr	x8, [sp]                        ; 8-byte Folded Reload
	str	xzr, [x8]
LBB0_18:
	ldr	x8, [x20, #16]
	ldr	w0, [x8]
	bl	_le32_to_cpu
	ldr	x8, [sp, #24]                   ; 8-byte Folded Reload
	cmp	x8, x0
	cset	w20, eq
	mov	x0, x19
	bl	_spin_unlock
LBB0_19:
	mov	x0, x20
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_DMA_TODEVICE,4,2           ; @PCI_DMA_TODEVICE
	.comm	_TX_STOP_THRESH,8,3             ; @TX_STOP_THRESH
	.no_dead_strip	_qlcnic_process_cmd_ring
.subsections_via_symbols
