	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hns_roce_v2_chk_mbox
_hns_roce_v2_chk_mbox:                  ## @hns_roce_v2_chk_mbox
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	(%rdi), %r14
	movq	%rsi, %rdi
	callq	_msecs_to_jiffies
	movq	%rax, %rbx
	movq	_jiffies@GOTPCREL(%rip), %r12
	addq	(%r12), %rbx
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	callq	_hns_roce_v2_cmd_pending
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	(%r12), %rdi
	movq	%rbx, %rsi
	callq	_time_before
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	xorl	%eax, %eax
	callq	_cond_resched
	jmp	LBB0_1
LBB0_4:
	movq	%r15, %rdi
	callq	_hns_roce_v2_cmd_pending
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
LBB0_10:
	subl	(%rax), %ebx
LBB0_11:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	%r15, %rdi
	callq	_hns_roce_v2_cmd_complete
	xorl	%ebx, %ebx
	cmpl	$1, %eax
	je	LBB0_11
## %bb.7:
	movq	_CMD_RST_PRC_EBUSY@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_9
## %bb.8:
	movl	%eax, %ebx
	jmp	LBB0_11
LBB0_9:
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EBUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_jiffies,8,3                    ## @jiffies
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[cmd_poll]hw run cmd TIMEDOUT!\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.comm	_CMD_RST_PRC_EBUSY,4,2          ## @CMD_RST_PRC_EBUSY
L_.str.1:                               ## @.str.1
	.asciz	"mailbox status 0x%x!\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
	.no_dead_strip	_hns_roce_v2_chk_mbox
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hns_roce_v2_chk_mbox
_hns_roce_v2_chk_mbox:                  ; @hns_roce_v2_chk_mbox
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x20, x0
	ldr	x19, [x0]
	mov	x0, x1
	bl	_msecs_to_jiffies
	mov	x21, x0
Lloh0:
	adrp	x22, _jiffies@GOTPAGE
Lloh1:
	ldr	x22, [x22, _jiffies@GOTPAGEOFF]
	ldr	x23, [x22]
	mov	x0, x20
	bl	_hns_roce_v2_cmd_pending
	cbz	x0, LBB0_4
; %bb.1:
	add	x21, x23, x21
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x22]
	mov	x1, x21
	bl	_time_before
	cbz	x0, LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	bl	_cond_resched
	mov	x0, x20
	bl	_hns_roce_v2_cmd_pending
	cbnz	x0, LBB0_2
LBB0_4:
	mov	x0, x20
	bl	_hns_roce_v2_cmd_pending
	cbz	x0, LBB0_8
; %bb.5:
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh4:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
                                        ; kill: def $w0 killed $w0 killed $x0
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_8:
	mov	x0, x20
	bl	_hns_roce_v2_cmd_complete
                                        ; kill: def $w0 killed $w0 def $x0
	cmp	w0, #1
	b.ne	LBB0_10
; %bb.9:
	mov	w0, #0
	b	LBB0_7
LBB0_10:
Lloh6:
	adrp	x8, _CMD_RST_PRC_EBUSY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CMD_RST_PRC_EBUSY@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w0, w8
	b.eq	LBB0_7
; %bb.11:
	str	x0, [sp]
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh11:
	adrp	x8, _EBUSY@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_6
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_jiffies,8,3                    ; @jiffies
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[cmd_poll]hw run cmd TIMEDOUT!\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.comm	_CMD_RST_PRC_EBUSY,4,2          ; @CMD_RST_PRC_EBUSY
l_.str.1:                               ; @.str.1
	.asciz	"mailbox status 0x%x!\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
	.no_dead_strip	_hns_roce_v2_chk_mbox
.subsections_via_symbols
