	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hns_rcb_wait_fbd_clean         ## -- Begin function hns_rcb_wait_fbd_clean
	.p2align	4, 0x90
_hns_rcb_wait_fbd_clean:                ## @hns_rcb_wait_fbd_clean
	.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	%rdi, -56(%rbp)                 ## 8-byte Spill
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	testl	%esi, %esi
	jle	LBB0_1
## %bb.2:
	movl	%edx, %r12d
	xorl	%ebx, %ebx
	movl	$10000, %r15d                   ## imm = 0x2710
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	$200, %edi
	movl	$300, %esi                      ## imm = 0x12C
	callq	_usleep_range
	movl	%ebx, %r14d
	movl	$0, %r13d
	movq	_RCB_INT_FLAG_TX@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax,%r14,8), %rdi
	movq	_RCB_RING_TX_RING_FBDNUM_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_dsaf_read_dev
	movl	%eax, %r13d
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	_RCB_INT_FLAG_RX@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax,%r14,8), %rdi
	movq	_RCB_RING_RX_RING_FBDNUM_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_dsaf_read_dev
	addl	%eax, %r13d
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$1, %r13d
	adcl	$0, %ebx
	addl	$-1, %r15d
	jae	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	-44(%rbp), %ebx                 ## 4-byte Folded Reload
	jl	LBB0_3
LBB0_9:
	cmpl	-44(%rbp), %ebx                 ## 4-byte Folded Reload
	jge	LBB0_10
LBB0_11:
	movslq	%ebx, %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx,%rax,8), %rax
	movq	(%rax), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	movl	%r13d, %ecx
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_err                        ## TAILCALL
LBB0_1:
	xorl	%ebx, %ebx
                                        ## implicit-def: $r13d
	cmpl	-44(%rbp), %ebx                 ## 4-byte Folded Reload
	jl	LBB0_11
LBB0_10:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RCB_INT_FLAG_TX,4,2            ## @RCB_INT_FLAG_TX
	.comm	_RCB_RING_TX_RING_FBDNUM_REG,4,2 ## @RCB_RING_TX_RING_FBDNUM_REG
	.comm	_RCB_INT_FLAG_RX,4,2            ## @RCB_INT_FLAG_RX
	.comm	_RCB_RING_RX_RING_FBDNUM_REG,4,2 ## @RCB_RING_RX_RING_FBDNUM_REG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"queue(%d) wait fbd(%d) clean fail!!\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hns_rcb_wait_fbd_clean         ; -- Begin function hns_rcb_wait_fbd_clean
	.p2align	2
_hns_rcb_wait_fbd_clean:                ; @hns_rcb_wait_fbd_clean
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x1
	mov	x19, x0
	cmp	w1, #1
	b.lt	LBB0_11
; %bb.1:
	mov	x22, x2
	mov	w20, #0
	mov	w24, #10000
Lloh0:
	adrp	x25, _RCB_INT_FLAG_TX@GOTPAGE
Lloh1:
	ldr	x25, [x25, _RCB_INT_FLAG_TX@GOTPAGEOFF]
Lloh2:
	adrp	x26, _RCB_INT_FLAG_RX@GOTPAGE
Lloh3:
	ldr	x26, [x26, _RCB_INT_FLAG_RX@GOTPAGEOFF]
Lloh4:
	adrp	x27, _RCB_RING_RX_RING_FBDNUM_REG@GOTPAGE
Lloh5:
	ldr	x27, [x27, _RCB_RING_RX_RING_FBDNUM_REG@GOTPAGEOFF]
Lloh6:
	adrp	x28, _RCB_RING_TX_RING_FBDNUM_REG@GOTPAGE
Lloh7:
	ldr	x28, [x28, _RCB_RING_TX_RING_FBDNUM_REG@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #200
	mov	w1, #300
	bl	_usleep_range
	ldr	w8, [x25]
	tst	w8, w22
	b.eq	LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x0, [x19, w20, uxtw #3]
	ldr	w1, [x28]
	bl	_dsaf_read_dev
	mov	x23, x0
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	w23, #0
LBB0_5:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x26]
	tst	w8, w22
	b.eq	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x0, [x19, w20, uxtw #3]
	ldr	w1, [x27]
	bl	_dsaf_read_dev
	add	w23, w0, w23
LBB0_7:                                 ;   in Loop: Header=BB0_2 Depth=1
	cmp	w23, #0
	cinc	w20, w20, eq
	subs	w24, w24, #1
	b.lo	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_2 Depth=1
	cmp	w20, w21
	b.lt	LBB0_2
LBB0_9:
	cmp	w20, w21
	b.ge	LBB0_12
LBB0_10:
	ldr	x8, [x19, w20, sxtw #3]
	ldr	x8, [x8]
	ldr	w0, [x8]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	mov	x3, x23
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_dev_err
LBB0_11:
	mov	w20, #0
                                        ; implicit-def: $w23
	cmp	w20, w21
	b.lt	LBB0_10
LBB0_12:
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_RCB_INT_FLAG_TX,4,2            ; @RCB_INT_FLAG_TX
	.comm	_RCB_RING_TX_RING_FBDNUM_REG,4,2 ; @RCB_RING_TX_RING_FBDNUM_REG
	.comm	_RCB_INT_FLAG_RX,4,2            ; @RCB_INT_FLAG_RX
	.comm	_RCB_RING_RX_RING_FBDNUM_REG,4,2 ; @RCB_RING_RX_RING_FBDNUM_REG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"queue(%d) wait fbd(%d) clean fail!!\n"

.subsections_via_symbols
