	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function iwl_trans_pcie_wait_txq_empty
_iwl_trans_pcie_wait_txq_empty:         ## @iwl_trans_pcie_wait_txq_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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %rbx
	callq	_IWL_TRANS_GET_PCIE_TRANS
	movq	%rax, %r14
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	movq	_STATUS_TRANS_DEAD@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_3:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	8(%r14), %rsi
	movl	%r15d, %edi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_18
## %bb.5:
	movq	%r12, -80(%rbp)                 ## 8-byte Spill
	leaq	L_.str(%rip), %rsi
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	movl	%r15d, %edx
	callq	_IWL_DEBUG_TX_QUEUES
	movq	(%r14), %rax
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	movslq	%r15d, %rcx
	movq	(%rax,%rcx,8), %r15
	leaq	16(%r15), %rbx
	movq	%rbx, %rdi
	callq	_spin_lock_bh
	movb	$1, %r12b
	cmpl	$0, 24(%r15)
	jne	LBB0_7
## %bb.6:
	leaq	20(%r15), %rdi
	callq	_skb_queue_empty
	testl	%eax, %eax
	sete	%r12b
LBB0_7:
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_spin_unlock_bh
	movq	(%r15), %rdi
	callq	_READ_ONCE
	movq	%rax, %r14
	movq	(%r15), %rdi
	movq	8(%r15), %rbx
	callq	_READ_ONCE
	cmpq	%rax, %rbx
	jne	LBB0_9
## %bb.8:
	testb	%r12b, %r12b
	je	LBB0_16
LBB0_9:
	leaq	20(%r15), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movq	_IWL_FLUSH_WAIT_MS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msecs_to_jiffies
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rax,%rcx), %rsi
	movq	%rbx, %rdi
	callq	_time_after
	testl	%eax, %eax
	jne	LBB0_16
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	(%r15), %rdi
	callq	_READ_ONCE
	movq	%rax, %r13
	cmpq	%rax, %r14
	setne	%al
	xorb	$1, %r12b
	andb	%al, %r12b
	movzbl	%r12b, %edi
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdx
	movq	%r13, %rcx
	callq	_WARN_ONCE
	testq	%rax, %rax
	jne	LBB0_20
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=1
	movl	$1000, %edi                     ## imm = 0x3E8
	movl	$2000, %esi                     ## imm = 0x7D0
	callq	_usleep_range
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_spin_lock_bh
	movb	$1, %r12b
	cmpl	$0, 24(%r15)
	jne	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_skb_queue_empty
	testl	%eax, %eax
	sete	%r12b
LBB0_14:                                ##   in Loop: Header=BB0_10 Depth=1
	movq	%rbx, %rdi
	callq	_spin_unlock_bh
	movq	(%r15), %rdi
	movq	8(%r15), %rbx
	callq	_READ_ONCE
	movq	%r13, %r14
	cmpq	%rax, %rbx
	jne	LBB0_10
## %bb.15:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	%r13, %r14
	testb	%r12b, %r12b
	jne	LBB0_10
LBB0_16:
	movq	8(%r15), %rax
	cmpq	(%r15), %rax
	jne	LBB0_19
## %bb.17:
	leaq	L_.str.3(%rip), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_IWL_DEBUG_TX_QUEUES
	xorl	%eax, %eax
	jmp	LBB0_3
LBB0_18:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_19:
	leaq	L_.str.2(%rip), %rsi
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_IWL_ERR
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_iwl_trans_pcie_log_scd_error
LBB0_20:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_STATUS_TRANS_DEAD,4,2          ## @STATUS_TRANS_DEAD
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Emptying queue %d...\n"

	.comm	_IWL_FLUSH_WAIT_MS,4,2          ## @IWL_FLUSH_WAIT_MS
L_.str.1:                               ## @.str.1
	.asciz	"WR pointer moved while flushing %d -> %d\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
L_.str.2:                               ## @.str.2
	.asciz	"fail to flush all tx fifo queues Q %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"Queue %d is now empty.\n"

	.no_dead_strip	_iwl_trans_pcie_wait_txq_empty
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function iwl_trans_pcie_wait_txq_empty
_iwl_trans_pcie_wait_txq_empty:         ; @iwl_trans_pcie_wait_txq_empty
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x20, x1
	mov	x19, x0
	bl	_IWL_TRANS_GET_PCIE_TRANS
	mov	x21, x0
Lloh0:
	adrp	x27, _jiffies@GOTPAGE
Lloh1:
	ldr	x27, [x27, _jiffies@GOTPAGEOFF]
	ldr	x28, [x27]
Lloh2:
	adrp	x8, _STATUS_TRANS_DEAD@GOTPAGE
Lloh3:
	ldr	x8, [x8, _STATUS_TRANS_DEAD@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_test_bit
	cbz	x0, LBB0_4
; %bb.1:
Lloh5:
	adrp	x8, _ENODEV@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_4:
	ldr	x1, [x21, #8]
	mov	x0, x20
	bl	_test_bit
	cbz	x0, LBB0_7
; %bb.5:
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	bl	_IWL_DEBUG_TX_QUEUES
	ldr	x8, [x21]
	ldr	x21, [x8, w20, sxtw #3]
	add	x22, x21, #16
	mov	x0, x22
	bl	_spin_lock_bh
	ldr	w8, [x21, #24]
	cbz	w8, LBB0_8
; %bb.6:
	mov	w23, #1
	b	LBB0_9
LBB0_7:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_2
LBB0_8:
	add	x0, x21, #20
	bl	_skb_queue_empty
	cmp	w0, #0
	cset	w23, eq
LBB0_9:
	mov	x0, x22
	bl	_spin_unlock_bh
	ldr	x0, [x21]
	bl	_READ_ONCE
	mov	x26, x0
	ldp	x0, x24, [x21]
	bl	_READ_ONCE
	cmp	x24, x0
	ccmp	w23, #0, #0, eq
	b.eq	LBB0_18
; %bb.10:
	add	x8, x21, #20
	str	x8, [sp, #8]                    ; 8-byte Folded Spill
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	x25, [x27]
Lloh11:
	adrp	x8, _IWL_FLUSH_WAIT_MS@GOTPAGE
Lloh12:
	ldr	x8, [x8, _IWL_FLUSH_WAIT_MS@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	bl	_msecs_to_jiffies
	add	x1, x0, x28
	mov	x0, x25
	bl	_time_after
	cbnz	w0, LBB0_18
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	x0, [x21]
	bl	_READ_ONCE
	mov	x25, x0
	cmp	x26, x0
	cset	w8, ne
	eor	w9, w23, #0x1
	and	w0, w8, w9
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x26
	mov	x3, x25
	bl	_WARN_ONCE
	cbnz	x0, LBB0_21
; %bb.13:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	w0, #1000
	mov	w1, #2000
	bl	_usleep_range
	mov	x0, x22
	bl	_spin_lock_bh
	ldr	w8, [x21, #24]
	cbz	w8, LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	w23, #1
	b	LBB0_16
LBB0_15:                                ;   in Loop: Header=BB0_11 Depth=1
	ldr	x0, [sp, #8]                    ; 8-byte Folded Reload
	bl	_skb_queue_empty
	cmp	w0, #0
	cset	w23, eq
LBB0_16:                                ;   in Loop: Header=BB0_11 Depth=1
	mov	x0, x22
	bl	_spin_unlock_bh
	ldp	x0, x24, [x21]
	bl	_READ_ONCE
	mov	x26, x25
	cmp	x24, x0
	b.ne	LBB0_11
; %bb.17:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	x26, x25
	tbnz	w23, #0, LBB0_11
LBB0_18:
	ldp	x9, x8, [x21]
	cmp	x8, x9
	b.ne	LBB0_20
; %bb.19:
Lloh16:
	adrp	x1, l_.str.3@PAGE
Lloh17:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	bl	_IWL_DEBUG_TX_QUEUES
	mov	w0, #0
	b	LBB0_3
LBB0_20:
Lloh18:
	adrp	x1, l_.str.2@PAGE
Lloh19:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	bl	_IWL_ERR
	mov	x0, x19
	mov	x1, x21
	bl	_iwl_trans_pcie_log_scd_error
LBB0_21:
Lloh20:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_STATUS_TRANS_DEAD,4,2          ; @STATUS_TRANS_DEAD
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Emptying queue %d...\n"

	.comm	_IWL_FLUSH_WAIT_MS,4,2          ; @IWL_FLUSH_WAIT_MS
l_.str.1:                               ; @.str.1
	.asciz	"WR pointer moved while flushing %d -> %d\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
l_.str.2:                               ; @.str.2
	.asciz	"fail to flush all tx fifo queues Q %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"Queue %d is now empty.\n"

	.no_dead_strip	_iwl_trans_pcie_wait_txq_empty
.subsections_via_symbols
