	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function iwl_pcie_tx_stop_fh
_iwl_pcie_tx_stop_fh:                   ## @iwl_pcie_tx_stop_fh
	.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
	callq	_IWL_TRANS_GET_PCIE_TRANS
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_spin_lock
	leaq	-48(%rbp), %rsi
	movq	%r15, %rdi
	callq	_iwl_trans_grab_nic_access
	testl	%eax, %eax
	je	LBB0_8
## %bb.1:
	movq	_FH_TCSR_CHNL_NUM@GOTPCREL(%rip), %r13
	cmpl	$0, (%r13)
	jle	LBB0_2
## %bb.3:
	xorl	%r12d, %r12d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	callq	_FH_TCSR_CHNL_TX_CONFIG_REG
	movq	%r15, %rdi
	movl	%eax, %esi
	xorl	%edx, %edx
	callq	_iwl_write32
	movl	%ebx, %edi
	callq	_FH_TSSR_TX_STATUS_REG_MSK_CHNL_IDLE
	orl	%eax, %r12d
	incl	%ebx
	cmpl	(%r13), %ebx
	jl	LBB0_4
	jmp	LBB0_5
LBB0_2:
	xorl	%ebx, %ebx
	xorl	%r12d, %r12d
LBB0_5:
	movq	_FH_TSSR_TX_STATUS_REG@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%r15, %rdi
	movl	%r12d, %edx
	movl	%r12d, %ecx
	movl	$5000, %r8d                     ## imm = 0x1388
	callq	_iwl_poll_bit
	testl	%eax, %eax
	jns	LBB0_7
## %bb.6:
	movl	(%r13), %esi
	movq	%r15, %rdi
	callq	_iwl_read32
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movl	%ebx, %edx
	movl	%eax, %ecx
	callq	_IWL_ERR
LBB0_7:
	leaq	-48(%rbp), %rsi
	movq	%r15, %rdi
	callq	_iwl_trans_release_nic_access
LBB0_8:
	movq	%r14, %rdi
	callq	_spin_unlock
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FH_TCSR_CHNL_NUM,4,2           ## @FH_TCSR_CHNL_NUM
	.comm	_FH_TSSR_TX_STATUS_REG,4,2      ## @FH_TSSR_TX_STATUS_REG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failing on timeout while stopping DMA channel %d [0x%08x]\n"

	.no_dead_strip	_iwl_pcie_tx_stop_fh
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function iwl_pcie_tx_stop_fh
_iwl_pcie_tx_stop_fh:                   ; @iwl_pcie_tx_stop_fh
	.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
	bl	_IWL_TRANS_GET_PCIE_TRANS
	mov	x20, x0
	bl	_spin_lock
	add	x1, sp, #8
	mov	x0, x19
	bl	_iwl_trans_grab_nic_access
	cbz	w0, LBB0_8
; %bb.1:
Lloh0:
	adrp	x23, _FH_TCSR_CHNL_NUM@GOTPAGE
Lloh1:
	ldr	x23, [x23, _FH_TCSR_CHNL_NUM@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.2:
	mov	w22, #0
	mov	w21, #0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_FH_TCSR_CHNL_TX_CONFIG_REG
	mov	x1, x0
	mov	x0, x19
	mov	w2, #0
	bl	_iwl_write32
	mov	x0, x21
	bl	_FH_TSSR_TX_STATUS_REG_MSK_CHNL_IDLE
	orr	w22, w0, w22
	add	w21, w21, #1
	ldr	w8, [x23]
	cmp	w21, w8
	b.lt	LBB0_3
	b	LBB0_5
LBB0_4:
	mov	w21, #0
	mov	w22, #0
LBB0_5:
Lloh2:
	adrp	x23, _FH_TSSR_TX_STATUS_REG@GOTPAGE
Lloh3:
	ldr	x23, [x23, _FH_TSSR_TX_STATUS_REG@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x19
	mov	x2, x22
	mov	x3, x22
	mov	w4, #5000
	bl	_iwl_poll_bit
	tbz	w0, #31, LBB0_7
; %bb.6:
	ldr	w1, [x23]
	mov	x0, x19
	bl	_iwl_read32
	mov	x3, x0
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	bl	_IWL_ERR
LBB0_7:
	add	x1, sp, #8
	mov	x0, x19
	bl	_iwl_trans_release_nic_access
LBB0_8:
	mov	x0, x20
	bl	_spin_unlock
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_FH_TCSR_CHNL_NUM,4,2           ; @FH_TCSR_CHNL_NUM
	.comm	_FH_TSSR_TX_STATUS_REG,4,2      ; @FH_TSSR_TX_STATUS_REG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failing on timeout while stopping DMA channel %d [0x%08x]\n"

	.no_dead_strip	_iwl_pcie_tx_stop_fh
.subsections_via_symbols
