	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cayman_dma_vm_flush            ## -- Begin function cayman_dma_vm_flush
	.p2align	4, 0x90
_cayman_dma_vm_flush:                   ## @cayman_dma_vm_flush
	.cfi_startproc
## %bb.0:
	testq	%rdx, %rdx
	je	LBB0_1
## %bb.2:
	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	%rdx, %r14
	movslq	%esi, %rbx
	shlq	$2, %rbx
	addq	(%rdi), %rbx
	movq	_DMA_PACKET_SRBM_WRITE@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_DMA_PACKET
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_radeon_ring_write
	movq	_VM_CONTEXT0_PAGE_TABLE_BASE_ADDR@GOTPCREL(%rip), %rax
	movl	(%r14), %esi
	shll	$2, %esi
	addl	(%rax), %esi
	sarl	$2, %esi
	orl	$983040, %esi                   ## imm = 0xF0000
	movq	%rbx, %rdi
	callq	_radeon_ring_write
	movl	4(%r14), %esi
	sarl	$12, %esi
	movq	%rbx, %rdi
	callq	_radeon_ring_write
	movl	(%r12), %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_DMA_PACKET
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_radeon_ring_write
	movq	_HDP_MEM_COHERENCY_FLUSH_CNTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	sarl	$2, %esi
	orl	$983040, %esi                   ## imm = 0xF0000
	movq	%rbx, %rdi
	callq	_radeon_ring_write
	movl	$1, %r15d
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_radeon_ring_write
	movl	(%r12), %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_DMA_PACKET
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_radeon_ring_write
	movq	_VM_INVALIDATE_REQUEST@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	sarl	$2, %esi
	orl	$983040, %esi                   ## imm = 0xF0000
	movq	%rbx, %rdi
	callq	_radeon_ring_write
	movb	(%r14), %cl
	shll	%cl, %r15d
	movq	%rbx, %rdi
	movl	%r15d, %esi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_radeon_ring_write              ## TAILCALL
LBB0_1:
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DMA_PACKET_SRBM_WRITE,4,2      ## @DMA_PACKET_SRBM_WRITE
	.comm	_VM_CONTEXT0_PAGE_TABLE_BASE_ADDR,4,2 ## @VM_CONTEXT0_PAGE_TABLE_BASE_ADDR
	.comm	_HDP_MEM_COHERENCY_FLUSH_CNTL,4,2 ## @HDP_MEM_COHERENCY_FLUSH_CNTL
	.comm	_VM_INVALIDATE_REQUEST,4,2      ## @VM_INVALIDATE_REQUEST
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cayman_dma_vm_flush            ; -- Begin function cayman_dma_vm_flush
	.p2align	2
_cayman_dma_vm_flush:                   ; @cayman_dma_vm_flush
	.cfi_startproc
; %bb.0:
	cbz	x2, LBB0_2
; %bb.1:
	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, x2
	ldr	x8, [x0]
	add	x20, x8, w1, sxtw #2
Lloh0:
	adrp	x21, _DMA_PACKET_SRBM_WRITE@GOTPAGE
Lloh1:
	ldr	x21, [x21, _DMA_PACKET_SRBM_WRITE@GOTPAGEOFF]
	ldr	w0, [x21]
	mov	w1, #0
	mov	w2, #0
	mov	w3, #0
	bl	_DMA_PACKET
	mov	x1, x0
	mov	x0, x20
	bl	_radeon_ring_write
Lloh2:
	adrp	x8, _VM_CONTEXT0_PAGE_TABLE_BASE_ADDR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _VM_CONTEXT0_PAGE_TABLE_BASE_ADDR@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	ldr	w9, [x19]
	add	w8, w8, w9, lsl #2
	asr	w8, w8, #2
	orr	w1, w8, #0xf0000
	mov	x0, x20
	bl	_radeon_ring_write
	ldr	w8, [x19, #4]
	asr	w1, w8, #12
	mov	x0, x20
	bl	_radeon_ring_write
	ldr	w0, [x21]
	mov	w1, #0
	mov	w2, #0
	mov	w3, #0
	bl	_DMA_PACKET
	mov	x1, x0
	mov	x0, x20
	bl	_radeon_ring_write
Lloh5:
	adrp	x8, _HDP_MEM_COHERENCY_FLUSH_CNTL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _HDP_MEM_COHERENCY_FLUSH_CNTL@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	asr	w8, w8, #2
	orr	w1, w8, #0xf0000
	mov	x0, x20
	bl	_radeon_ring_write
	mov	w22, #1
	mov	x0, x20
	mov	w1, #1
	bl	_radeon_ring_write
	ldr	w0, [x21]
	mov	w1, #0
	mov	w2, #0
	mov	w3, #0
	bl	_DMA_PACKET
	mov	x1, x0
	mov	x0, x20
	bl	_radeon_ring_write
Lloh8:
	adrp	x8, _VM_INVALIDATE_REQUEST@GOTPAGE
Lloh9:
	ldr	x8, [x8, _VM_INVALIDATE_REQUEST@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	asr	w8, w8, #2
	orr	w1, w8, #0xf0000
	mov	x0, x20
	bl	_radeon_ring_write
	ldr	w8, [x19]
	lsl	w1, w22, w8
	mov	x0, x20
	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
	b	_radeon_ring_write
LBB0_2:
	.cfi_def_cfa wsp, 0
	.cfi_same_value w30
	.cfi_same_value w29
	.cfi_same_value w19
	.cfi_same_value w20
	.cfi_same_value w21
	.cfi_same_value w22
	ret
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_DMA_PACKET_SRBM_WRITE,4,2      ; @DMA_PACKET_SRBM_WRITE
	.comm	_VM_CONTEXT0_PAGE_TABLE_BASE_ADDR,4,2 ; @VM_CONTEXT0_PAGE_TABLE_BASE_ADDR
	.comm	_HDP_MEM_COHERENCY_FLUSH_CNTL,4,2 ; @HDP_MEM_COHERENCY_FLUSH_CNTL
	.comm	_VM_INVALIDATE_REQUEST,4,2      ; @VM_INVALIDATE_REQUEST
.subsections_via_symbols
