	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hns_ae_wait_flow_down
_hns_ae_wait_flow_down:                 ## @hns_ae_wait_flow_down
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	cmpl	$0, (%rdi)
	jle	LBB0_4
## %bb.1:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r14), %rax
	movl	(%rax,%rbx,4), %edi
	callq	_hns_rcb_wait_tx_ring_clean
	testl	%eax, %eax
	jne	LBB0_10
## %bb.2:                               ##   in Loop: Header=BB0_3 Depth=1
	incq	%rbx
	movslq	(%r14), %rax
	cmpq	%rax, %rbx
	jl	LBB0_3
LBB0_4:
	movq	%r14, %rdi
	callq	_hns_get_ppe_cb
	movq	%rax, %rdi
	callq	_hns_ppe_wait_tx_fifo_clean
	testl	%eax, %eax
	je	LBB0_5
LBB0_10:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_5:
	movl	8(%r14), %edi
	callq	_hns_ae_get_dsaf_dev
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movl	4(%r14), %esi
	movq	%rax, %rdi
	callq	_hns_dsaf_wait_pkt_clean
	testl	%eax, %eax
	jne	LBB0_10
## %bb.8:
	movq	%r14, %rdi
	callq	_hns_ae_get_vf_cb
	movl	(%rax), %edi
	callq	_hns_mac_wait_fifo_clean
	testl	%eax, %eax
	jne	LBB0_10
## %bb.9:
	movl	$10, %edi
	callq	_mdelay
	xorl	%eax, %eax
	jmp	LBB0_10
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_hns_ae_wait_flow_down
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hns_ae_wait_flow_down
_hns_ae_wait_flow_down:                 ; @hns_ae_wait_flow_down
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x20, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #16]
	ldr	w0, [x8, x20, lsl #2]
	bl	_hns_rcb_wait_tx_ring_clean
	cbnz	w0, LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x20, x20, #1
	ldrsw	x8, [x19]
	cmp	x20, x8
	b.lt	LBB0_2
LBB0_4:
	mov	x0, x19
	bl	_hns_get_ppe_cb
	bl	_hns_ppe_wait_tx_fifo_clean
	cbz	w0, LBB0_6
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_6:
	ldr	w0, [x19, #8]
	bl	_hns_ae_get_dsaf_dev
	cbz	x0, LBB0_10
; %bb.7:
	ldr	w1, [x19, #4]
	bl	_hns_dsaf_wait_pkt_clean
	cbnz	w0, LBB0_5
; %bb.8:
	mov	x0, x19
	bl	_hns_ae_get_vf_cb
	ldr	w0, [x0]
	bl	_hns_mac_wait_fifo_clean
	cbnz	w0, LBB0_5
; %bb.9:
	mov	w0, #10
	bl	_mdelay
	mov	w0, #0
	b	LBB0_5
LBB0_10:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_hns_ae_wait_flow_down
.subsections_via_symbols
