	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hclge_get_ring_chain_from_mbx
_hclge_get_ring_chain_from_mbx:         ## @hclge_get_ring_chain_from_mbx
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r12
	movq	(%rdi), %rcx
	movl	8(%rcx), %r15d
	movq	_HCLGE_MBX_VF_MSG_DATA_NUM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_HCLGE_MBX_RING_MAP_BASIC_MSG_NUM@GOTPCREL(%rip), %rdx
	subl	(%rdx), %eax
	movq	_HCLGE_MBX_RING_NODE_VARIABLE_NUM@GOTPCREL(%rip), %rsi
	cltd
	idivl	(%rsi)
	cmpl	%eax, %r15d
	jg	LBB0_7
## %bb.1:
	movq	%rdi, %rbx
	movl	24(%r12), %edi
	movq	_HNAE3_RING_TYPE_B@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	12(%rcx), %edx
	callq	_hnae3_set_bit
	movq	(%r14), %rax
	movq	(%rbx), %rcx
	movslq	16(%rcx), %rcx
	movl	(%rax,%rcx,4), %edi
	callq	_hclge_get_queue_id
	movq	%rax, 16(%r12)
	movl	8(%r12), %edi
	movq	_HNAE3_RING_GL_IDX_M@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_HNAE3_RING_GL_IDX_S@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movq	(%rbx), %rax
	movslq	20(%rax), %rcx
	callq	_hnae3_set_field
	xorl	%eax, %eax
	cmpl	$2, %r15d
	jl	LBB0_8
## %bb.2:
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movl	$1, %r14d
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movq	%r12, %r15
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$32, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rax, %rbx
	movl	24(%rax), %edi
	movq	_HNAE3_RING_TYPE_B@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	(%r12), %rax
	movq	_HCLGE_MBX_RING_NODE_VARIABLE_NUM@GOTPCREL(%rip), %r13
	movslq	(%r13), %rcx
	movslq	%r14d, %r14
	imulq	%r14, %rcx
	movq	%r15, -80(%rbp)                 ## 8-byte Spill
	movq	_HCLGE_MBX_RING_MAP_BASIC_MSG_NUM@GOTPCREL(%rip), %r15
	movslq	(%r15), %rdx
	addq	%rcx, %rdx
	movl	(%rax,%rdx,4), %edx
	callq	_hnae3_set_bit
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movq	(%r12), %rcx
	movl	(%r13), %edx
	imull	%r14d, %edx
	movl	(%r15), %esi
	addl	%esi, %edx
	incl	%edx
	movslq	%edx, %rdx
	movslq	(%rcx,%rdx,4), %rcx
	movl	(%rax,%rcx,4), %edi
	callq	_hclge_get_queue_id
	movq	%rax, 16(%rbx)
	movl	8(%rbx), %edi
	movq	_HNAE3_RING_GL_IDX_M@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_HNAE3_RING_GL_IDX_S@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	(%r12), %r8
	movl	(%r13), %ecx
	imull	%r14d, %ecx
	movl	(%r15), %eax
	addl	%ecx, %eax
	addl	$2, %eax
	cltq
	movslq	(%r8,%rax,4), %rcx
	callq	_hnae3_set_field
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	%rbx, (%rax)
	incl	%r14d
	movq	%rbx, %r15
	cmpl	%r14d, -44(%rbp)                ## 4-byte Folded Reload
	jne	LBB0_3
## %bb.5:
	xorl	%eax, %eax
	jmp	LBB0_8
LBB0_6:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_hclge_free_vector_ring_chain
LBB0_7:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_8:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HCLGE_MBX_VF_MSG_DATA_NUM,4,2  ## @HCLGE_MBX_VF_MSG_DATA_NUM
	.comm	_HCLGE_MBX_RING_MAP_BASIC_MSG_NUM,4,2 ## @HCLGE_MBX_RING_MAP_BASIC_MSG_NUM
	.comm	_HCLGE_MBX_RING_NODE_VARIABLE_NUM,4,2 ## @HCLGE_MBX_RING_NODE_VARIABLE_NUM
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_HNAE3_RING_TYPE_B,4,2          ## @HNAE3_RING_TYPE_B
	.comm	_HNAE3_RING_GL_IDX_M,4,2        ## @HNAE3_RING_GL_IDX_M
	.comm	_HNAE3_RING_GL_IDX_S,4,2        ## @HNAE3_RING_GL_IDX_S
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.no_dead_strip	_hclge_get_ring_chain_from_mbx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hclge_get_ring_chain_from_mbx
_hclge_get_ring_chain_from_mbx:         ; @hclge_get_ring_chain_from_mbx
	.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
	ldr	x8, [x0]
	ldr	w23, [x8, #8]
Lloh0:
	adrp	x9, _HCLGE_MBX_VF_MSG_DATA_NUM@GOTPAGE
Lloh1:
	ldr	x9, [x9, _HCLGE_MBX_VF_MSG_DATA_NUM@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
Lloh3:
	adrp	x24, _HCLGE_MBX_RING_MAP_BASIC_MSG_NUM@GOTPAGE
Lloh4:
	ldr	x24, [x24, _HCLGE_MBX_RING_MAP_BASIC_MSG_NUM@GOTPAGEOFF]
	ldr	w10, [x24]
	sub	w9, w9, w10
Lloh5:
	adrp	x25, _HCLGE_MBX_RING_NODE_VARIABLE_NUM@GOTPAGE
Lloh6:
	ldr	x25, [x25, _HCLGE_MBX_RING_NODE_VARIABLE_NUM@GOTPAGEOFF]
	ldr	w10, [x25]
	sdiv	w9, w9, w10
	cmp	w23, w9
	b.gt	LBB0_7
; %bb.1:
	mov	x20, x2
	mov	x27, x1
	mov	x21, x0
	ldr	w0, [x1, #24]
Lloh7:
	adrp	x9, _HNAE3_RING_TYPE_B@GOTPAGE
Lloh8:
	ldr	x9, [x9, _HNAE3_RING_TYPE_B@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x9]
	ldr	w2, [x8, #12]
	bl	_hnae3_set_bit
	ldr	x8, [x20]
	ldr	x9, [x21]
	ldrsw	x9, [x9, #16]
	ldr	w0, [x8, x9, lsl #2]
	bl	_hclge_get_queue_id
	str	x0, [x27, #16]
	ldr	w0, [x27, #8]
Lloh10:
	adrp	x8, _HNAE3_RING_GL_IDX_M@GOTPAGE
Lloh11:
	ldr	x8, [x8, _HNAE3_RING_GL_IDX_M@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
Lloh13:
	adrp	x28, _HNAE3_RING_GL_IDX_S@GOTPAGE
Lloh14:
	ldr	x28, [x28, _HNAE3_RING_GL_IDX_S@GOTPAGEOFF]
	ldr	w2, [x28]
	ldr	x8, [x21]
	ldrsw	x3, [x8, #20]
	bl	_hnae3_set_field
	cmp	w23, #2
	b.lt	LBB0_5
; %bb.2:
	mov	w26, #1
Lloh15:
	adrp	x19, _GFP_KERNEL@GOTPAGE
Lloh16:
	ldr	x19, [x19, _GFP_KERNEL@GOTPAGEOFF]
	str	x27, [sp, #8]                   ; 8-byte Folded Spill
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x19]
	mov	w0, #32
	bl	_kzalloc
	cbz	x0, LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x22, x0
	ldr	w0, [x0, #24]
Lloh17:
	adrp	x8, _HNAE3_RING_TYPE_B@GOTPAGE
Lloh18:
	ldr	x8, [x8, _HNAE3_RING_TYPE_B@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	ldr	x8, [x21]
	ldr	w9, [x25]
	ldr	w10, [x24]
	madd	w9, w9, w26, w10
	ldr	w2, [x8, w9, sxtw #2]
	bl	_hnae3_set_bit
	ldr	x8, [x20]
	ldr	x9, [x21]
	ldr	w10, [x25]
	ldr	w11, [x24]
	madd	w10, w10, w26, w11
	add	w10, w10, #1
	ldrsw	x9, [x9, w10, sxtw #2]
	ldr	w0, [x8, x9, lsl #2]
	bl	_hclge_get_queue_id
	str	x0, [x22, #16]
	ldr	w0, [x22, #8]
Lloh20:
	adrp	x8, _HNAE3_RING_GL_IDX_M@GOTPAGE
Lloh21:
	ldr	x8, [x8, _HNAE3_RING_GL_IDX_M@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	ldr	w2, [x28]
	ldr	x8, [x21]
	ldr	w9, [x25]
	ldr	w10, [x24]
	madd	w9, w9, w26, w10
	add	w9, w9, #2
	ldrsw	x3, [x8, w9, sxtw #2]
	bl	_hnae3_set_field
	str	x22, [x27]
	add	w26, w26, #1
	mov	x27, x22
	cmp	w23, w26
	b.ne	LBB0_3
LBB0_5:
	mov	w0, #0
	b	LBB0_8
LBB0_6:
	ldr	x0, [sp, #8]                    ; 8-byte Folded Reload
	bl	_hclge_free_vector_ring_chain
LBB0_7:
Lloh23:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	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	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_HCLGE_MBX_VF_MSG_DATA_NUM,4,2  ; @HCLGE_MBX_VF_MSG_DATA_NUM
	.comm	_HCLGE_MBX_RING_MAP_BASIC_MSG_NUM,4,2 ; @HCLGE_MBX_RING_MAP_BASIC_MSG_NUM
	.comm	_HCLGE_MBX_RING_NODE_VARIABLE_NUM,4,2 ; @HCLGE_MBX_RING_NODE_VARIABLE_NUM
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_HNAE3_RING_TYPE_B,4,2          ; @HNAE3_RING_TYPE_B
	.comm	_HNAE3_RING_GL_IDX_M,4,2        ; @HNAE3_RING_GL_IDX_M
	.comm	_HNAE3_RING_GL_IDX_S,4,2        ; @HNAE3_RING_GL_IDX_S
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.no_dead_strip	_hclge_get_ring_chain_from_mbx
.subsections_via_symbols
