	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ql_wait_fifo_empty             ## -- Begin function ql_wait_fifo_empty
	.p2align	4, 0x90
_ql_wait_fifo_empty:                    ## @ql_wait_fifo_empty
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	_STS@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	callq	_ql_read32
	movl	%eax, %ebx
	movq	_STS_NFE@GOTPCREL(%rip), %r13
	andl	(%r13), %ebx
	leaq	-44(%rbp), %rsi
	movq	%r15, %rdi
	callq	_ql_mb_get_mgmnt_traffic_ctl
	movq	_MB_GET_MPI_TFK_FIFO_EMPTY@GOTPCREL(%rip), %rcx
	movl	-44(%rbp), %eax
	andl	(%rcx), %eax
	movl	%eax, -44(%rbp)
	xorl	%r14d, %r14d
	testl	%ebx, %ebx
	je	LBB0_2
## %bb.1:
	testl	%eax, %eax
	jne	LBB0_13
LBB0_2:
	movl	$100, %edi
	callq	_msleep
	movl	(%r12), %esi
	movq	%r15, %rdi
	callq	_ql_read32
	movl	%eax, %ebx
	andl	(%r13), %ebx
	leaq	-44(%rbp), %rsi
	movq	%r15, %rdi
	callq	_ql_mb_get_mgmnt_traffic_ctl
	movl	-44(%rbp), %eax
	movq	_MB_GET_MPI_TFK_FIFO_EMPTY@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movl	%eax, -44(%rbp)
	testl	%ebx, %ebx
	je	LBB0_4
## %bb.3:
	testl	%eax, %eax
	jne	LBB0_13
LBB0_4:
	movl	$100, %edi
	callq	_msleep
	movl	(%r12), %esi
	movq	%r15, %rdi
	callq	_ql_read32
	movl	%eax, %ebx
	andl	(%r13), %ebx
	leaq	-44(%rbp), %rsi
	movq	%r15, %rdi
	callq	_ql_mb_get_mgmnt_traffic_ctl
	movl	-44(%rbp), %eax
	movq	_MB_GET_MPI_TFK_FIFO_EMPTY@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movl	%eax, -44(%rbp)
	testl	%ebx, %ebx
	je	LBB0_6
## %bb.5:
	testl	%eax, %eax
	jne	LBB0_13
LBB0_6:
	movl	$100, %edi
	callq	_msleep
	movl	(%r12), %esi
	movq	%r15, %rdi
	callq	_ql_read32
	movl	%eax, %ebx
	andl	(%r13), %ebx
	leaq	-44(%rbp), %rsi
	movq	%r15, %rdi
	callq	_ql_mb_get_mgmnt_traffic_ctl
	movl	-44(%rbp), %eax
	movq	_MB_GET_MPI_TFK_FIFO_EMPTY@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movl	%eax, -44(%rbp)
	testl	%ebx, %ebx
	je	LBB0_8
## %bb.7:
	testl	%eax, %eax
	jne	LBB0_13
LBB0_8:
	movl	$100, %edi
	callq	_msleep
	movl	(%r12), %esi
	movq	%r15, %rdi
	callq	_ql_read32
	movl	%eax, %ebx
	andl	(%r13), %ebx
	leaq	-44(%rbp), %rsi
	movq	%r15, %rdi
	callq	_ql_mb_get_mgmnt_traffic_ctl
	movq	_MB_GET_MPI_TFK_FIFO_EMPTY@GOTPCREL(%rip), %rcx
	movl	-44(%rbp), %eax
	andl	(%rcx), %eax
	movl	%eax, -44(%rbp)
	testl	%ebx, %ebx
	je	LBB0_10
## %bb.9:
	testl	%eax, %eax
	jne	LBB0_13
LBB0_10:
	movl	$100, %edi
	callq	_msleep
	movl	(%r12), %esi
	movq	%r15, %rdi
	callq	_ql_read32
	movl	%eax, %ebx
	andl	(%r13), %ebx
	leaq	-44(%rbp), %rsi
	movq	%r15, %rdi
	callq	_ql_mb_get_mgmnt_traffic_ctl
	movl	-44(%rbp), %eax
	movq	_MB_GET_MPI_TFK_FIFO_EMPTY@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movl	%eax, -44(%rbp)
	testl	%ebx, %ebx
	je	LBB0_12
## %bb.11:
	testl	%eax, %eax
	jne	LBB0_13
LBB0_12:
	movl	$100, %edi
	callq	_msleep
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_13:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_STS,4,2                        ## @STS
	.comm	_STS_NFE,4,2                    ## @STS_NFE
	.comm	_MB_GET_MPI_TFK_FIFO_EMPTY,4,2  ## @MB_GET_MPI_TFK_FIFO_EMPTY
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ql_wait_fifo_empty             ; -- Begin function ql_wait_fifo_empty
	.p2align	2
_ql_wait_fifo_empty:                    ; @ql_wait_fifo_empty
	.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	x19, x0
Lloh0:
	adrp	x20, _STS@GOTPAGE
Lloh1:
	ldr	x20, [x20, _STS@GOTPAGEOFF]
	ldr	w1, [x20]
	bl	_ql_read32
Lloh2:
	adrp	x21, _STS_NFE@GOTPAGE
Lloh3:
	ldr	x21, [x21, _STS_NFE@GOTPAGEOFF]
	ldr	w8, [x21]
	and	w23, w8, w0
	add	x1, sp, #12
	mov	x0, x19
	bl	_ql_mb_get_mgmnt_traffic_ctl
Lloh4:
	adrp	x22, _MB_GET_MPI_TFK_FIFO_EMPTY@GOTPAGE
Lloh5:
	ldr	x22, [x22, _MB_GET_MPI_TFK_FIFO_EMPTY@GOTPAGEOFF]
	ldr	w8, [x22]
	ldr	w9, [sp, #12]
	and	w8, w9, w8
	str	w8, [sp, #12]
	cmp	w23, #0
	ccmp	w8, #0, #4, ne
	b.ne	LBB0_10
; %bb.1:
	mov	w0, #100
	bl	_msleep
	ldr	w1, [x20]
	mov	x0, x19
	bl	_ql_read32
	ldr	w8, [x21]
	and	w23, w8, w0
	add	x1, sp, #12
	mov	x0, x19
	bl	_ql_mb_get_mgmnt_traffic_ctl
	ldr	w8, [x22]
	ldr	w9, [sp, #12]
	and	w8, w9, w8
	str	w8, [sp, #12]
	cmp	w23, #0
	ccmp	w8, #0, #4, ne
	b.ne	LBB0_10
; %bb.2:
	mov	w0, #100
	bl	_msleep
	ldr	w1, [x20]
	mov	x0, x19
	bl	_ql_read32
	ldr	w8, [x21]
	and	w23, w8, w0
	add	x1, sp, #12
	mov	x0, x19
	bl	_ql_mb_get_mgmnt_traffic_ctl
	ldr	w8, [x22]
	ldr	w9, [sp, #12]
	and	w8, w9, w8
	str	w8, [sp, #12]
	cbz	w23, LBB0_4
; %bb.3:
	cbnz	w8, LBB0_10
LBB0_4:
	mov	w0, #100
	bl	_msleep
	ldr	w1, [x20]
	mov	x0, x19
	bl	_ql_read32
	ldr	w8, [x21]
	and	w23, w8, w0
	add	x1, sp, #12
	mov	x0, x19
	bl	_ql_mb_get_mgmnt_traffic_ctl
	ldr	w8, [x22]
	ldr	w9, [sp, #12]
	and	w8, w9, w8
	str	w8, [sp, #12]
	cbz	w23, LBB0_6
; %bb.5:
	cbnz	w8, LBB0_10
LBB0_6:
	mov	w0, #100
	bl	_msleep
	ldr	w1, [x20]
	mov	x0, x19
	bl	_ql_read32
	ldr	w8, [x21]
	and	w23, w8, w0
	add	x1, sp, #12
	mov	x0, x19
	bl	_ql_mb_get_mgmnt_traffic_ctl
	ldr	w8, [x22]
	ldr	w9, [sp, #12]
	and	w8, w9, w8
	str	w8, [sp, #12]
	cbz	w23, LBB0_8
; %bb.7:
	cbnz	w8, LBB0_10
LBB0_8:
	mov	w0, #100
	bl	_msleep
	ldr	w1, [x20]
	mov	x0, x19
	bl	_ql_read32
	ldr	w8, [x21]
	and	w20, w8, w0
	add	x1, sp, #12
	mov	x0, x19
	bl	_ql_mb_get_mgmnt_traffic_ctl
	ldr	w8, [x22]
	ldr	w9, [sp, #12]
	and	w8, w9, w8
	str	w8, [sp, #12]
	cbz	w20, LBB0_12
; %bb.9:
	cbz	w8, LBB0_12
LBB0_10:
	mov	w0, #0
LBB0_11:
	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_12:
	mov	w0, #100
	bl	_msleep
Lloh6:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_11
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_STS,4,2                        ; @STS
	.comm	_STS_NFE,4,2                    ; @STS_NFE
	.comm	_MB_GET_MPI_TFK_FIFO_EMPTY,4,2  ; @MB_GET_MPI_TFK_FIFO_EMPTY
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
.subsections_via_symbols
