	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlxsw_pci_cq_init
_mlxsw_pci_cq_init:                     ## @mlxsw_pci_cq_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
	movq	$0, 16(%rdx)
	cmpl	$0, (%rdx)
	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_elem_get
	movq	8(%r12), %rdi
	movq	%rax, %rsi
	movl	$1, %edx
	callq	_mlxsw_pci_cqe_owner_set
	incl	%ebx
	cmpl	(%r12), %ebx
	jl	LBB0_2
LBB0_3:
	movq	8(%r12), %rax
	movq	_MLXSW_PCI_CQE_V1@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.4:
	movq	_MLXSW_CMD_MBOX_SW2HW_CQ_CQE_VER_1@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_5:
	movq	_MLXSW_PCI_CQE_V2@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.6:
	movq	_MLXSW_CMD_MBOX_SW2HW_CQ_CQE_VER_2@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_mlxsw_cmd_mbox_sw2hw_cq_cqe_ver_set
LBB0_8:
	movq	_MLXSW_PCI_EQ_COMP_NUM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_mlxsw_cmd_mbox_sw2hw_cq_c_eqn_set
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_mlxsw_cmd_mbox_sw2hw_cq_st_set
	movl	(%r12), %edi
	callq	_ilog2
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_mlxsw_cmd_mbox_sw2hw_cq_log_cq_size_set
	movq	_MLXSW_PCI_AQ_PAGES@GOTPCREL(%rip), %r13
	cmpl	$0, (%r13)
	jle	LBB0_10
	.p2align	4, 0x90
LBB0_9:                                 ## =>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_cq_pa_set
	incl	%ebx
	cmpl	(%r13), %ebx
	jl	LBB0_9
LBB0_10:
	movl	(%r14), %edi
	movl	4(%r12), %edx
	movq	%r15, %rsi
	callq	_mlxsw_cmd_sw2hw_cq
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_12
## %bb.11:
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_mlxsw_pci_queue_doorbell_consumer_ring
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_mlxsw_pci_queue_doorbell_arm_consumer_ring
LBB0_12:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MLXSW_PCI_CQE_V1,8,3           ## @MLXSW_PCI_CQE_V1
	.comm	_MLXSW_CMD_MBOX_SW2HW_CQ_CQE_VER_1,4,2 ## @MLXSW_CMD_MBOX_SW2HW_CQ_CQE_VER_1
	.comm	_MLXSW_PCI_CQE_V2,8,3           ## @MLXSW_PCI_CQE_V2
	.comm	_MLXSW_CMD_MBOX_SW2HW_CQ_CQE_VER_2,4,2 ## @MLXSW_CMD_MBOX_SW2HW_CQ_CQE_VER_2
	.comm	_MLXSW_PCI_EQ_COMP_NUM,4,2      ## @MLXSW_PCI_EQ_COMP_NUM
	.comm	_MLXSW_PCI_AQ_PAGES,4,2         ## @MLXSW_PCI_AQ_PAGES
	.no_dead_strip	_mlxsw_pci_cq_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_cq_init
_mlxsw_pci_cq_init:                     ; @mlxsw_pci_cq_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
	str	xzr, [x2, #16]
	ldr	w8, [x2]
	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_elem_get
	mov	x1, x0
	ldr	x0, [x19, #8]
	mov	w2, #1
	bl	_mlxsw_pci_cqe_owner_set
	add	w22, w22, #1
	ldr	w8, [x19]
	cmp	w22, w8
	b.lt	LBB0_2
LBB0_3:
	ldr	x8, [x19, #8]
Lloh0:
	adrp	x9, _MLXSW_PCI_CQE_V1@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MLXSW_PCI_CQE_V1@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.4:
Lloh3:
	adrp	x8, _MLXSW_CMD_MBOX_SW2HW_CQ_CQE_VER_1@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MLXSW_CMD_MBOX_SW2HW_CQ_CQE_VER_1@GOTPAGEOFF]
	b	LBB0_7
LBB0_5:
Lloh5:
	adrp	x9, _MLXSW_PCI_CQE_V2@GOTPAGE
Lloh6:
	ldr	x9, [x9, _MLXSW_PCI_CQE_V2@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.6:
Lloh8:
	adrp	x8, _MLXSW_CMD_MBOX_SW2HW_CQ_CQE_VER_2@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MLXSW_CMD_MBOX_SW2HW_CQ_CQE_VER_2@GOTPAGEOFF]
LBB0_7:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_mlxsw_cmd_mbox_sw2hw_cq_cqe_ver_set
LBB0_8:
Lloh10:
	adrp	x8, _MLXSW_PCI_EQ_COMP_NUM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MLXSW_PCI_EQ_COMP_NUM@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_mlxsw_cmd_mbox_sw2hw_cq_c_eqn_set
	mov	x0, x21
	mov	w1, #0
	bl	_mlxsw_cmd_mbox_sw2hw_cq_st_set
	ldr	w0, [x19]
	bl	_ilog2
	mov	x1, x0
	mov	x0, x21
	bl	_mlxsw_cmd_mbox_sw2hw_cq_log_cq_size_set
Lloh13:
	adrp	x23, _MLXSW_PCI_AQ_PAGES@GOTPAGE
Lloh14:
	ldr	x23, [x23, _MLXSW_PCI_AQ_PAGES@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.9:
	mov	w22, #0
LBB0_10:                                ; =>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_cq_pa_set
	add	w22, w22, #1
	ldr	w8, [x23]
	cmp	w22, w8
	b.lt	LBB0_10
LBB0_11:
	ldr	w0, [x20]
	ldr	w2, [x19, #4]
	mov	x1, x21
	bl	_mlxsw_cmd_sw2hw_cq
	mov	x21, x0
	cbnz	w0, LBB0_13
; %bb.12:
	mov	x0, x20
	mov	x1, x19
	bl	_mlxsw_pci_queue_doorbell_consumer_ring
	mov	x0, x20
	mov	x1, x19
	bl	_mlxsw_pci_queue_doorbell_arm_consumer_ring
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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_MLXSW_PCI_CQE_V1,8,3           ; @MLXSW_PCI_CQE_V1
	.comm	_MLXSW_CMD_MBOX_SW2HW_CQ_CQE_VER_1,4,2 ; @MLXSW_CMD_MBOX_SW2HW_CQ_CQE_VER_1
	.comm	_MLXSW_PCI_CQE_V2,8,3           ; @MLXSW_PCI_CQE_V2
	.comm	_MLXSW_CMD_MBOX_SW2HW_CQ_CQE_VER_2,4,2 ; @MLXSW_CMD_MBOX_SW2HW_CQ_CQE_VER_2
	.comm	_MLXSW_PCI_EQ_COMP_NUM,4,2      ; @MLXSW_PCI_EQ_COMP_NUM
	.comm	_MLXSW_PCI_AQ_PAGES,4,2         ; @MLXSW_PCI_AQ_PAGES
	.no_dead_strip	_mlxsw_pci_cq_init
.subsections_via_symbols
