	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mga_do_cleanup_dma
_mga_do_cleanup_dma:                    ## @mga_do_cleanup_dma
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r15
	leaq	L_.str(%rip), %rdi
	callq	_DRM_DEBUG
	cmpq	$0, 24(%r15)
	je	LBB0_2
## %bb.1:
	movq	%r15, %rdi
	callq	_drm_irq_uninstall
LBB0_2:
	movq	16(%r15), %rbx
	testq	%rbx, %rbx
	je	LBB0_15
## %bb.3:
	movq	88(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.4:
	movq	(%rdi), %rax
	movq	__DRM_CONSISTENT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_6
## %bb.5:
	movq	%r15, %rsi
	callq	_drm_core_ioremapfree
LBB0_6:
	movq	80(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_9
## %bb.7:
	movq	(%rdi), %rax
	movq	__DRM_CONSISTENT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_9
## %bb.8:
	movq	%r15, %rsi
	callq	_drm_core_ioremapfree
LBB0_9:
	movq	(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_11
## %bb.10:
	movq	%r15, %rsi
	callq	_drm_core_ioremapfree
LBB0_11:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 80(%rbx)
	movups	%xmm0, 64(%rbx)
	movq	$0, (%r15)
	testl	%r14d, %r14d
	je	LBB0_13
## %bb.12:
	movups	%xmm0, 40(%rbx)
	movq	$0, 56(%rbx)
LBB0_13:
	leaq	32(%rbx), %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movq	$0, 24(%rbx)
	movq	16(%rbx), %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	cmpq	$0, 8(%rbx)
	je	LBB0_15
## %bb.14:
	movq	%r15, %rdi
	callq	_mga_freelist_cleanup
LBB0_15:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"\n"

	.comm	__DRM_CONSISTENT,8,3            ## @_DRM_CONSISTENT
	.no_dead_strip	_mga_do_cleanup_dma
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mga_do_cleanup_dma
_mga_do_cleanup_dma:                    ; @mga_do_cleanup_dma
	.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, x1
	mov	x19, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_drm_irq_uninstall
LBB0_2:
	ldr	x21, [x19, #16]
	cbz	x21, LBB0_15
; %bb.3:
	ldr	x0, [x21, #88]
Lloh2:
	adrp	x22, __DRM_CONSISTENT@GOTPAGE
Lloh3:
	ldr	x22, [x22, __DRM_CONSISTENT@GOTPAGEOFF]
	cbz	x0, LBB0_6
; %bb.4:
	ldr	x8, [x0]
	ldr	x9, [x22]
	cmp	x8, x9
	b.eq	LBB0_6
; %bb.5:
	mov	x1, x19
	bl	_drm_core_ioremapfree
LBB0_6:
	ldr	x0, [x21, #80]
	cbz	x0, LBB0_9
; %bb.7:
	ldr	x8, [x0]
	ldr	x9, [x22]
	cmp	x8, x9
	b.eq	LBB0_9
; %bb.8:
	mov	x1, x19
	bl	_drm_core_ioremapfree
LBB0_9:
	ldr	x0, [x19]
	cbz	x0, LBB0_11
; %bb.10:
	mov	x1, x19
	bl	_drm_core_ioremapfree
LBB0_11:
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [x21, #64]
	str	xzr, [x19]
	cbz	w20, LBB0_13
; %bb.12:
	stp	xzr, xzr, [x21, #40]
	str	xzr, [x21, #56]
LBB0_13:
	add	x0, x21, #32
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	str	xzr, [x21, #24]
	ldr	x0, [x21, #16]
	mov	w1, #0
	mov	w2, #8
	bl	_memset
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_15
; %bb.14:
	mov	x0, x19
	bl	_mga_freelist_cleanup
LBB0_15:
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"\n"

	.comm	__DRM_CONSISTENT,8,3            ; @_DRM_CONSISTENT
	.no_dead_strip	_mga_do_cleanup_dma
.subsections_via_symbols
