	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlxsw_pci_rdq_init
_mlxsw_pci_rdq_init:                    ## @mlxsw_pci_rdq_init
	.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	%rdx, %r12
	movq	%rsi, %r15
	movq	%rdi, %r14
	callq	_mlxsw_pci_sdq_count
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%r12)
	addq	8(%r12), %rax
	movq	%r15, %rdi
	movq	%rax, %rsi
	callq	_mlxsw_cmd_mbox_sw2hw_dq_cq_set
	movq	%r15, %rdi
	movl	$3, %esi
	callq	_mlxsw_cmd_mbox_sw2hw_dq_log2_dq_sz_set
	movq	_MLXSW_PCI_AQ_PAGES@GOTPCREL(%rip), %r13
	cmpl	$0, (%r13)
	jle	LBB0_3
## %bb.1:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	___mlxsw_pci_queue_page_get
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_mlxsw_cmd_mbox_sw2hw_dq_pa_set
	incl	%ebx
	cmpl	(%r13), %ebx
	jl	LBB0_2
LBB0_3:
	movl	(%r14), %edi
	movq	8(%r12), %rdx
	movq	%r15, %rsi
	callq	_mlxsw_cmd_sw2hw_rdq
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_13
## %bb.4:
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_mlxsw_pci_queue_doorbell_producer_ring
	cmpl	$0, (%r12)
	jle	LBB0_12
## %bb.5:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	callq	_mlxsw_pci_queue_elem_info_producer_get
	movq	%rax, %r15
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_BUG_ON
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_mlxsw_pci_rdq_skb_alloc
	testl	%eax, %eax
	jne	LBB0_7
## %bb.11:                              ##   in Loop: Header=BB0_6 Depth=1
	incq	16(%r12)
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_mlxsw_pci_queue_doorbell_producer_ring
	incl	%ebx
	cmpl	(%r12), %ebx
	jl	LBB0_6
LBB0_12:
	xorl	%r15d, %r15d
	jmp	LBB0_13
LBB0_7:
	movl	%eax, %r15d
	testl	%ebx, %ebx
	je	LBB0_10
## %bb.8:
	incl	%ebx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	leal	-2(%rbx), %esi
	movq	%r12, %rdi
	callq	_mlxsw_pci_queue_elem_info_get
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_mlxsw_pci_rdq_skb_free
	decl	%ebx
	cmpl	$1, %ebx
	jg	LBB0_9
LBB0_10:
	movl	(%r14), %edi
	movq	8(%r12), %rsi
	callq	_mlxsw_cmd_hw2sw_rdq
LBB0_13:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MLXSW_PCI_AQ_PAGES,4,2         ## @MLXSW_PCI_AQ_PAGES
	.no_dead_strip	_mlxsw_pci_rdq_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlxsw_pci_rdq_init
_mlxsw_pci_rdq_init:                    ; @mlxsw_pci_rdq_init
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, x2
	mov	x21, x1
	mov	x20, x0
	bl	_mlxsw_pci_sdq_count
	stp	xzr, xzr, [x19, #16]
	ldr	x8, [x19, #8]
	add	x1, x8, x0
	mov	x0, x21
	bl	_mlxsw_cmd_mbox_sw2hw_dq_cq_set
	mov	x0, x21
	mov	w1, #3
	bl	_mlxsw_cmd_mbox_sw2hw_dq_log2_dq_sz_set
Lloh0:
	adrp	x23, _MLXSW_PCI_AQ_PAGES@GOTPAGE
Lloh1:
	ldr	x23, [x23, _MLXSW_PCI_AQ_PAGES@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.1:
	mov	w22, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x22
	bl	___mlxsw_pci_queue_page_get
	mov	x2, x0
	mov	x0, x21
	mov	x1, x22
	bl	_mlxsw_cmd_mbox_sw2hw_dq_pa_set
	add	w22, w22, #1
	ldr	w8, [x23]
	cmp	w22, w8
	b.lt	LBB0_2
LBB0_3:
	ldr	w0, [x20]
	ldr	x2, [x19, #8]
	mov	x1, x21
	bl	_mlxsw_cmd_sw2hw_rdq
	mov	x21, x0
	cbnz	w0, LBB0_13
; %bb.4:
	mov	x0, x20
	mov	x1, x19
	bl	_mlxsw_pci_queue_doorbell_producer_ring
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.5:
	mov	w22, #0
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_mlxsw_pci_queue_elem_info_producer_get
	mov	x21, x0
	cmp	x0, #0
	cset	w0, eq
	bl	_BUG_ON
	mov	x0, x20
	mov	x1, x21
	bl	_mlxsw_pci_rdq_skb_alloc
	cbnz	w0, LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x19, #16]
	add	x8, x8, #1
	str	x8, [x19, #16]
	mov	x0, x20
	mov	x1, x19
	bl	_mlxsw_pci_queue_doorbell_producer_ring
	add	w22, w22, #1
	ldr	w8, [x19]
	cmp	w22, w8
	b.lt	LBB0_6
LBB0_8:
	mov	w21, #0
	b	LBB0_13
LBB0_9:
	mov	x21, x0
	cbz	w22, LBB0_12
; %bb.10:
	add	w22, w22, #1
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	sub	w1, w22, #2
	mov	x0, x19
	bl	_mlxsw_pci_queue_elem_info_get
	mov	x1, x0
	mov	x0, x20
	bl	_mlxsw_pci_rdq_skb_free
	sub	w22, w22, #1
	cmp	w22, #1
	b.gt	LBB0_11
LBB0_12:
	ldr	w0, [x20]
	ldr	x1, [x19, #8]
	bl	_mlxsw_cmd_hw2sw_rdq
LBB0_13:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_MLXSW_PCI_AQ_PAGES,4,2         ; @MLXSW_PCI_AQ_PAGES
	.no_dead_strip	_mlxsw_pci_rdq_init
.subsections_via_symbols
