	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mga_do_dma_wrap_end            ## -- Begin function mga_do_dma_wrap_end
	.p2align	4, 0x90
_mga_do_dma_wrap_end:                   ## @mga_do_dma_wrap_end
	.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
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movq	8(%rdi), %r15
	movl	(%rax), %r14d
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_DEBUG
	movl	(%r15), %esi
	incl	%esi
	movl	%esi, (%r15)
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_DEBUG
	xorl	%eax, %eax
	callq	_mga_flush_write_combine
	movq	_MGA_PRIMADDRESS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_MGA_DMA_GENERAL@GOTPCREL(%rip), %rax
	orl	(%rax), %r14d
	movl	%r14d, %esi
	callq	_MGA_WRITE
	addq	$16, %rbx
	xorl	%edi, %edi
	movq	%rbx, %rsi
	callq	_clear_bit
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_DRM_DEBUG                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"\n"

L_.str.1:                               ## @.str.1
	.asciz	"   wrap = %d\n"

	.comm	_MGA_PRIMADDRESS,4,2            ## @MGA_PRIMADDRESS
	.comm	_MGA_DMA_GENERAL,4,2            ## @MGA_DMA_GENERAL
L_.str.2:                               ## @.str.2
	.asciz	"done.\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mga_do_dma_wrap_end            ; -- Begin function mga_do_dma_wrap_end
	.p2align	2
_mga_do_dma_wrap_end:                   ; @mga_do_dma_wrap_end
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	ldp	x8, x20, [x0]
	ldr	w21, [x8]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG
	ldr	w8, [x20]
	add	w8, w8, #1
	str	w8, [x20]
	str	x8, [sp]
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_DEBUG
	bl	_mga_flush_write_combine
Lloh4:
	adrp	x8, _MGA_PRIMADDRESS@GOTPAGE
Lloh5:
	ldr	x8, [x8, _MGA_PRIMADDRESS@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
Lloh7:
	adrp	x8, _MGA_DMA_GENERAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _MGA_DMA_GENERAL@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	orr	w1, w8, w21
	bl	_MGA_WRITE
	add	x1, x19, #16
	mov	w0, #0
	bl	_clear_bit
Lloh10:
	adrp	x0, l_.str.2@PAGE
Lloh11:
	add	x0, x0, l_.str.2@PAGEOFF
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	b	_DRM_DEBUG
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"\n"

l_.str.1:                               ; @.str.1
	.asciz	"   wrap = %d\n"

	.comm	_MGA_PRIMADDRESS,4,2            ; @MGA_PRIMADDRESS
	.comm	_MGA_DMA_GENERAL,4,2            ; @MGA_DMA_GENERAL
l_.str.2:                               ; @.str.2
	.asciz	"done.\n"

.subsections_via_symbols
