	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bam_dma_remove
_bam_dma_remove:                        ## @bam_dma_remove
	.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
	callq	_platform_get_drvdata
	movq	%rax, %r15
	movq	%r14, %rdi
	callq	_pm_runtime_force_suspend
	movl	(%r14), %edi
	callq	_of_dma_controller_free
	leaq	32(%r15), %rdi
	callq	_dma_async_device_unregister
	movq	_BAM_IRQ_SRCS_MSK_EE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_bam_addr
	xorl	%edi, %edi
	movl	%eax, %esi
	callq	_writel_relaxed
	movl	24(%r15), %edi
	movl	28(%r15), %esi
	movq	%r15, %rdx
	callq	_devm_free_irq
	cmpq	$0, (%r15)
	je	LBB0_5
## %bb.1:
	movl	$8, %ebx
	xorl	%r14d, %r14d
	movq	_BAM_DESC_FIFO_SIZE@GOTPCREL(%rip), %r12
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%r14
	addq	$16, %rbx
	cmpq	(%r15), %r14
	jae	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r15), %rax
	leaq	(%rax,%rbx), %rdi
	addq	$4, %rdi
	callq	_bam_dma_terminate_all
	movq	16(%r15), %rdi
	addq	%rbx, %rdi
	callq	_tasklet_kill
	movq	16(%r15), %rax
	movl	-4(%rax,%rbx), %edx
	testl	%edx, %edx
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	24(%r15), %edi
	movl	(%r12), %esi
	movl	-8(%rax,%rbx), %ecx
	callq	_dma_free_wc
	jmp	LBB0_4
LBB0_5:
	movq	%r15, %rdi
	addq	$12, %rdi
	callq	_tasklet_kill
	movl	8(%r15), %edi
	callq	_clk_disable_unprepare
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BAM_IRQ_SRCS_MSK_EE,4,2        ## @BAM_IRQ_SRCS_MSK_EE
	.comm	_BAM_DESC_FIFO_SIZE,4,2         ## @BAM_DESC_FIFO_SIZE
	.no_dead_strip	_bam_dma_remove
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bam_dma_remove
_bam_dma_remove:                        ; @bam_dma_remove
	.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	x20, x0
	bl	_platform_get_drvdata
	mov	x19, x0
	mov	x0, x20
	bl	_pm_runtime_force_suspend
	ldr	w0, [x20]
	bl	_of_dma_controller_free
	add	x0, x19, #32
	bl	_dma_async_device_unregister
Lloh0:
	adrp	x8, _BAM_IRQ_SRCS_MSK_EE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BAM_IRQ_SRCS_MSK_EE@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #0
	bl	_bam_addr
	mov	x1, x0
	mov	w0, #0
	bl	_writel_relaxed
	ldp	w0, w1, [x19, #24]
	mov	x2, x19
	bl	_devm_free_irq
	ldr	x8, [x19]
	cbz	x8, LBB0_5
; %bb.1:
	mov	x20, #0
	mov	x21, #0
Lloh3:
	adrp	x22, _BAM_DESC_FIFO_SIZE@GOTPAGE
Lloh4:
	ldr	x22, [x22, _BAM_DESC_FIFO_SIZE@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x21, x21, #1
	ldr	x8, [x19]
	add	x20, x20, #16
	cmp	x21, x8
	b.hs	LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #16]
	add	x8, x8, x20
	add	x0, x8, #12
	bl	_bam_dma_terminate_all
	ldr	x8, [x19, #16]
	add	x8, x8, x20
	add	x0, x8, #8
	bl	_tasklet_kill
	ldr	x8, [x19, #16]
	add	x9, x8, x20
	ldr	w2, [x9, #4]
	cbz	w2, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w0, [x19, #24]
	ldr	w1, [x22]
	ldr	w3, [x8, x20]
	bl	_dma_free_wc
	b	LBB0_2
LBB0_5:
	add	x0, x19, #12
	bl	_tasklet_kill
	ldr	w0, [x19, #8]
	bl	_clk_disable_unprepare
	mov	w0, #0
	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	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_BAM_IRQ_SRCS_MSK_EE,4,2        ; @BAM_IRQ_SRCS_MSK_EE
	.comm	_BAM_DESC_FIFO_SIZE,4,2         ; @BAM_DESC_FIFO_SIZE
	.no_dead_strip	_bam_dma_remove
.subsections_via_symbols
