	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ath5k_hw_dma_stop              ## -- Begin function ath5k_hw_dma_stop
	.p2align	4, 0x90
_ath5k_hw_dma_stop:                     ## @ath5k_hw_dma_stop
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	xorl	%esi, %esi
	callq	_ath5k_hw_set_imr
	movq	%r14, %rdi
	callq	_ath5k_hw_stop_rx_dma
	testl	%eax, %eax
	jne	LBB0_10
## %bb.1:
	movq	(%r14), %rax
	movq	_AR5K_AR5210@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.3:
	movq	_AR5K_ISR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_ath5k_hw_reg_read
	movq	_AR5K_NUM_TX_QUEUES_NOQCU@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_2:
	movq	_AR5K_PISR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	$-1, %esi
	callq	_ath5k_hw_reg_write
	movq	_AR5K_NUM_TX_QUEUES@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %r15d
	testl	%r15d, %r15d
	jle	LBB0_9
## %bb.5:
	xorl	%ebx, %ebx
	movq	_EINVAL@GOTPCREL(%rip), %r12
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=1
	incl	%ebx
	cmpl	%ebx, %r15d
	je	LBB0_9
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_ath5k_hw_stop_tx_dma
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	(%r12), %ecx
	addl	%eax, %ecx
	je	LBB0_8
	jmp	LBB0_10
LBB0_9:
	xorl	%eax, %eax
LBB0_10:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AR5K_AR5210,8,3                ## @AR5K_AR5210
	.comm	_AR5K_PISR,4,2                  ## @AR5K_PISR
	.comm	_AR5K_NUM_TX_QUEUES,4,2         ## @AR5K_NUM_TX_QUEUES
	.comm	_AR5K_ISR,4,2                   ## @AR5K_ISR
	.comm	_AR5K_NUM_TX_QUEUES_NOQCU,4,2   ## @AR5K_NUM_TX_QUEUES_NOQCU
	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ath5k_hw_dma_stop              ; -- Begin function ath5k_hw_dma_stop
	.p2align	2
_ath5k_hw_dma_stop:                     ; @ath5k_hw_dma_stop
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	mov	w1, #0
	bl	_ath5k_hw_set_imr
	mov	x0, x19
	bl	_ath5k_hw_stop_rx_dma
	cbnz	w0, LBB0_10
; %bb.1:
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _AR5K_AR5210@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AR5K_AR5210@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.2:
Lloh3:
	adrp	x8, _AR5K_ISR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AR5K_ISR@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ath5k_hw_reg_read
Lloh6:
	adrp	x8, _AR5K_NUM_TX_QUEUES_NOQCU@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AR5K_NUM_TX_QUEUES_NOQCU@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:
Lloh8:
	adrp	x8, _AR5K_PISR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _AR5K_PISR@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #-1
	bl	_ath5k_hw_reg_write
Lloh11:
	adrp	x8, _AR5K_NUM_TX_QUEUES@GOTPAGE
Lloh12:
	ldr	x8, [x8, _AR5K_NUM_TX_QUEUES@GOTPAGEOFF]
LBB0_4:
	ldr	w21, [x8]
	cmp	w21, #1
	b.lt	LBB0_9
; %bb.5:
	mov	w20, #0
Lloh13:
	adrp	x22, _EINVAL@GOTPAGE
Lloh14:
	ldr	x22, [x22, _EINVAL@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	w20, w20, #1
	cmp	w21, w20
	b.eq	LBB0_9
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x20
	bl	_ath5k_hw_stop_tx_dma
	cbz	w0, LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w8, [x22]
	cmn	w0, w8
	b.eq	LBB0_6
	b	LBB0_10
LBB0_9:
	mov	w0, #0
LBB0_10:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_AR5K_AR5210,8,3                ; @AR5K_AR5210
	.comm	_AR5K_PISR,4,2                  ; @AR5K_PISR
	.comm	_AR5K_NUM_TX_QUEUES,4,2         ; @AR5K_NUM_TX_QUEUES
	.comm	_AR5K_ISR,4,2                   ; @AR5K_ISR
	.comm	_AR5K_NUM_TX_QUEUES_NOQCU,4,2   ; @AR5K_NUM_TX_QUEUES_NOQCU
	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
