	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hclgevf_get_mbx_resp
_hclgevf_get_mbx_resp:                  ## @hclgevf_get_mbx_resp
	.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	%r8, %r12
	movq	%rcx, %r9
	movq	%rdi, %r13
	movq	_HCLGE_MBX_MAX_RESP_DATA_SIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	cmpq	%r8, %rcx
	jge	LBB0_1
## %bb.19:
	movq	(%r13), %rdi
	leaq	L_.str(%rip), %rsi
	xorl	%r14d, %r14d
	movq	%r12, %rdx
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_17:
	subl	(%rax), %r14d
	jmp	LBB0_18
LBB0_1:
	movq	%rdx, %rbx
	movq	%rsi, %rdx
	cmpl	$0, 24(%r13)
	je	LBB0_2
LBB0_9:
	movl	12(%r13), %r14d
	testl	%r14d, %r14d
	jne	LBB0_18
## %bb.10:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r14
	movl	8(%r13), %eax
	movzbl	%al, %ebx
                                        ## kill: def $eax killed $eax killed $rax
	sarl	$16, %eax
	movslq	%eax, %r15
	testq	%r9, %r9
	je	LBB0_12
## %bb.11:
	movq	16(%r13), %rsi
	movq	%r9, %rdi
	movq	%r12, %rdx
	callq	_memcpy
LBB0_12:
	movq	%r13, %rdi
	callq	_hclgevf_reset_mbx_resp_status
	movl	12(%r13), %r8d
	movq	%r14, %rdx
	cmpq	%r14, %r15
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	jne	LBB0_15
## %bb.13:
	cmpq	%rcx, %rbx
	jne	LBB0_15
## %bb.14:
	xorl	%r14d, %r14d
	testl	%r8d, %r8d
	jne	LBB0_15
LBB0_18:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	%r9, -56(%rbp)                  ## 8-byte Spill
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	leaq	32(%r13), %rbx
	movl	$-1, %r15d
	movq	_HCLGEVF_STATE_CMD_DISABLE@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %edi
	movq	%rbx, %rsi
	callq	_test_bit
	testq	%rax, %rax
	jne	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	incl	%r15d
	movl	$1000, %edi                     ## imm = 0x3E8
	movl	$2000, %esi                     ## imm = 0x7D0
	callq	_usleep_range
	movl	24(%r13), %r8d
	testl	%r8d, %r8d
	jne	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$499, %r15d                     ## imm = 0x1F3
	jb	LBB0_3
LBB0_7:
	cmpl	$499, %r15d                     ## imm = 0x1F3
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movq	-56(%rbp), %r9                  ## 8-byte Reload
	jb	LBB0_9
## %bb.8:
	incl	%r15d
	movq	(%r13), %rdi
	leaq	L_.str.1(%rip), %rsi
	xorl	%r14d, %r14d
	movq	%rbx, %rcx
	movl	%r15d, %r9d
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_16
LBB0_4:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	jmp	LBB0_17
LBB0_15:
	movq	(%r13), %rdi
	leaq	L_.str.2(%rip), %rsi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_dev_err
	movq	(%r13), %rdi
	leaq	L_.str.3(%rip), %rsi
	movq	%r15, %rdx
	movq	%rbx, %rcx
	xorl	%eax, %eax
	callq	_dev_err
LBB0_16:
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_HCLGE_MBX_MAX_RESP_DATA_SIZE,8,3 ## @HCLGE_MBX_MAX_RESP_DATA_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"VF mbx response len(=%d) exceeds maximum(=%d)\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_HCLGEVF_STATE_CMD_DISABLE,4,2  ## @HCLGEVF_STATE_CMD_DISABLE
	.comm	_EIO,4,2                        ## @EIO
L_.str.1:                               ## @.str.1
	.asciz	"VF could not get mbx(%d,%d) resp(=%d) from PF in %d tries\n"

L_.str.2:                               ## @.str.2
	.asciz	"VF could not match resp code(code0=%d,code1=%d), %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"VF could not match resp r_code(r_code0=%d,r_code1=%d)\n"

	.comm	_HCLGEVF_MAX_TRY_TIMES,4,2      ## @HCLGEVF_MAX_TRY_TIMES
	.comm	_HCLGEVF_SLEEP_USECOND,4,2      ## @HCLGEVF_SLEEP_USECOND
	.no_dead_strip	_hclgevf_get_mbx_resp
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hclgevf_get_mbx_resp
_hclgevf_get_mbx_resp:                  ; @hclgevf_get_mbx_resp
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x22, x4
	mov	x23, x3
	mov	x21, x0
Lloh0:
	adrp	x8, _HCLGE_MBX_MAX_RESP_DATA_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HCLGE_MBX_MAX_RESP_DATA_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	x3, [x8]
	cmp	x3, x4
	b.ge	LBB0_2
; %bb.1:
	ldr	x0, [x21]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x22
	bl	_dev_err
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_19
LBB0_2:
	mov	x19, x2
	mov	x20, x1
	ldr	w8, [x21, #24]
	cbz	w8, LBB0_10
LBB0_3:
	ldr	w0, [x21, #12]
	cbnz	w0, LBB0_20
; %bb.4:
	ldr	w25, [x21, #8]
	mov	x8, x25
	sbfx	x24, x8, #16, #16
	cbz	x23, LBB0_6
; %bb.5:
	ldr	x1, [x21, #16]
	mov	x0, x23
	mov	x2, x22
	bl	_memcpy
LBB0_6:
	and	x22, x25, #0xff
	mov	x0, x21
	bl	_hclgevf_reset_mbx_resp_status
	ldr	w8, [x21, #12]
	cmp	x24, x20
	b.ne	LBB0_16
; %bb.7:
	cmp	x22, x19
	b.ne	LBB0_16
; %bb.8:
	cbnz	w8, LBB0_16
; %bb.9:
	mov	w0, #0
	b	LBB0_20
LBB0_10:
	add	x24, x21, #32
	mov	w25, #-1
Lloh7:
	adrp	x26, _HCLGEVF_STATE_CMD_DISABLE@GOTPAGE
Lloh8:
	ldr	x26, [x26, _HCLGEVF_STATE_CMD_DISABLE@GOTPAGEOFF]
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x26]
	mov	x1, x24
	bl	_test_bit
	cbnz	x0, LBB0_18
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	add	w25, w25, #1
	mov	w0, #1000
	mov	w1, #2000
	bl	_usleep_range
	ldr	w8, [x21, #24]
	cbnz	w8, LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_11 Depth=1
	cmp	w25, #499
	b.lo	LBB0_11
LBB0_14:
	cmp	w25, #499
	b.lo	LBB0_3
; %bb.15:
	add	w9, w25, #1
	ldr	x0, [x21]
	stp	x8, x9, [sp]
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x20
	mov	x3, x19
	b	LBB0_17
LBB0_16:
	ldr	x0, [x21]
	str	x8, [sp]
Lloh11:
	adrp	x1, l_.str.2@PAGE
Lloh12:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x20
	mov	x3, x19
	bl	_dev_err
	ldr	x0, [x21]
Lloh13:
	adrp	x1, l_.str.3@PAGE
Lloh14:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x2, x24
	mov	x3, x22
LBB0_17:
	bl	_dev_err
LBB0_18:
Lloh15:
	adrp	x8, _EIO@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_19:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_20:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_HCLGE_MBX_MAX_RESP_DATA_SIZE,8,3 ; @HCLGE_MBX_MAX_RESP_DATA_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"VF mbx response len(=%d) exceeds maximum(=%d)\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_HCLGEVF_STATE_CMD_DISABLE,4,2  ; @HCLGEVF_STATE_CMD_DISABLE
	.comm	_EIO,4,2                        ; @EIO
l_.str.1:                               ; @.str.1
	.asciz	"VF could not get mbx(%d,%d) resp(=%d) from PF in %d tries\n"

l_.str.2:                               ; @.str.2
	.asciz	"VF could not match resp code(code0=%d,code1=%d), %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"VF could not match resp r_code(r_code0=%d,r_code1=%d)\n"

	.comm	_HCLGEVF_MAX_TRY_TIMES,4,2      ; @HCLGEVF_MAX_TRY_TIMES
	.comm	_HCLGEVF_SLEEP_USECOND,4,2      ; @HCLGEVF_SLEEP_USECOND
	.no_dead_strip	_hclgevf_get_mbx_resp
.subsections_via_symbols
