	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_si_vm_flush                    ## -- Begin function si_vm_flush
	.p2align	4, 0x90
_si_vm_flush:                           ## @si_vm_flush
	.cfi_startproc
## %bb.0:
	testq	%rdx, %rdx
	je	LBB0_5
## %bb.1:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movslq	%esi, %r12
	shlq	$2, %r12
	addq	(%rdi), %r12
	movq	_PACKET3_WRITE_DATA@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	movl	$3, %esi
	callq	_PACKET3
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_radeon_ring_write
	xorl	%edi, %edi
	callq	_WRITE_DATA_ENGINE_SEL
	movl	%eax, %ebx
	xorl	%edi, %edi
	callq	_WRITE_DATA_DST_SEL
	orl	%eax, %ebx
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_radeon_ring_write
	movl	(%r14), %esi
	cmpl	$7, %esi
	jg	LBB0_3
## %bb.2:
	movq	_VM_CONTEXT0_PAGE_TABLE_BASE_ADDR@GOTPCREL(%rip), %rax
	shll	$2, %esi
	addl	(%rax), %esi
	jmp	LBB0_4
LBB0_5:
	retq
LBB0_3:
	movq	_VM_CONTEXT8_PAGE_TABLE_BASE_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leal	(%rax,%rsi,4), %esi
	addl	$-32, %esi
LBB0_4:
	sarl	$2, %esi
	movq	%r12, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_radeon_ring_write
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_radeon_ring_write
	movl	4(%r14), %esi
	sarl	$12, %esi
	movq	%r12, %rdi
	callq	_radeon_ring_write
	movl	(%r13), %edi
	movl	$3, %esi
	callq	_PACKET3
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_radeon_ring_write
	xorl	%edi, %edi
	callq	_WRITE_DATA_ENGINE_SEL
	movl	%eax, %ebx
	xorl	%edi, %edi
	callq	_WRITE_DATA_DST_SEL
	orl	%eax, %ebx
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_radeon_ring_write
	movq	_HDP_MEM_COHERENCY_FLUSH_CNTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	sarl	$2, %esi
	movq	%r12, %rdi
	callq	_radeon_ring_write
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_radeon_ring_write
	movl	$1, %r15d
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_radeon_ring_write
	movl	(%r13), %edi
	movl	$3, %esi
	callq	_PACKET3
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_radeon_ring_write
	xorl	%edi, %edi
	callq	_WRITE_DATA_ENGINE_SEL
	movl	%eax, %ebx
	xorl	%edi, %edi
	callq	_WRITE_DATA_DST_SEL
	orl	%eax, %ebx
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_radeon_ring_write
	movq	_VM_INVALIDATE_REQUEST@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	sarl	$2, %esi
	movq	%r12, %rdi
	callq	_radeon_ring_write
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_radeon_ring_write
	movb	(%r14), %cl
	shll	%cl, %r15d
	movq	%r12, %rdi
	movl	%r15d, %esi
	callq	_radeon_ring_write
	movq	_PACKET3_PFP_SYNC_ME@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_PACKET3
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_radeon_ring_write
	movq	%r12, %rdi
	xorl	%esi, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_radeon_ring_write              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_PACKET3_WRITE_DATA,4,2         ## @PACKET3_WRITE_DATA
	.comm	_VM_CONTEXT0_PAGE_TABLE_BASE_ADDR,4,2 ## @VM_CONTEXT0_PAGE_TABLE_BASE_ADDR
	.comm	_VM_CONTEXT8_PAGE_TABLE_BASE_ADDR,4,2 ## @VM_CONTEXT8_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
	.comm	_PACKET3_PFP_SYNC_ME,4,2        ## @PACKET3_PFP_SYNC_ME
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_si_vm_flush                    ; -- Begin function si_vm_flush
	.p2align	2
_si_vm_flush:                           ; @si_vm_flush
	.cfi_startproc
; %bb.0:
	cbz	x2, LBB0_3
; %bb.1:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_remember_state
	mov	x20, x2
	ldr	x8, [x0]
	add	x19, x8, w1, sxtw #2
Lloh0:
	adrp	x22, _PACKET3_WRITE_DATA@GOTPAGE
Lloh1:
	ldr	x22, [x22, _PACKET3_WRITE_DATA@GOTPAGEOFF]
	ldr	w0, [x22]
	mov	w1, #3
	bl	_PACKET3
	mov	x1, x0
	mov	x0, x19
	bl	_radeon_ring_write
	mov	w0, #0
	bl	_WRITE_DATA_ENGINE_SEL
	mov	x21, x0
	mov	w0, #0
	bl	_WRITE_DATA_DST_SEL
	orr	w1, w0, w21
	mov	x0, x19
	bl	_radeon_ring_write
	ldr	w8, [x20]
	cmp	w8, #7
	b.gt	LBB0_4
; %bb.2:
Lloh2:
	adrp	x9, _VM_CONTEXT0_PAGE_TABLE_BASE_ADDR@GOTPAGE
Lloh3:
	ldr	x9, [x9, _VM_CONTEXT0_PAGE_TABLE_BASE_ADDR@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	add	w8, w9, w8, lsl #2
	b	LBB0_5
LBB0_3:
	.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
	.cfi_same_value w23
	.cfi_same_value w24
	ret
LBB0_4:
	.cfi_restore_state
Lloh5:
	adrp	x9, _VM_CONTEXT8_PAGE_TABLE_BASE_ADDR@GOTPAGE
Lloh6:
	ldr	x9, [x9, _VM_CONTEXT8_PAGE_TABLE_BASE_ADDR@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	add	w8, w9, w8, lsl #2
	sub	w8, w8, #32
LBB0_5:
	asr	w1, w8, #2
	mov	x0, x19
	bl	_radeon_ring_write
	mov	x0, x19
	mov	w1, #0
	bl	_radeon_ring_write
	ldr	w8, [x20, #4]
	asr	w1, w8, #12
	mov	x0, x19
	bl	_radeon_ring_write
	ldr	w0, [x22]
	mov	w1, #3
	bl	_PACKET3
	mov	x1, x0
	mov	x0, x19
	bl	_radeon_ring_write
	mov	w0, #0
	bl	_WRITE_DATA_ENGINE_SEL
	mov	x21, x0
	mov	w0, #0
	bl	_WRITE_DATA_DST_SEL
	orr	w1, w0, w21
	mov	x0, x19
	bl	_radeon_ring_write
Lloh8:
	adrp	x8, _HDP_MEM_COHERENCY_FLUSH_CNTL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _HDP_MEM_COHERENCY_FLUSH_CNTL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	asr	w1, w8, #2
	mov	x0, x19
	bl	_radeon_ring_write
	mov	x0, x19
	mov	w1, #0
	bl	_radeon_ring_write
	mov	w23, #1
	mov	x0, x19
	mov	w1, #1
	bl	_radeon_ring_write
	ldr	w0, [x22]
	mov	w1, #3
	bl	_PACKET3
	mov	x1, x0
	mov	x0, x19
	bl	_radeon_ring_write
	mov	w0, #0
	bl	_WRITE_DATA_ENGINE_SEL
	mov	x21, x0
	mov	w0, #0
	bl	_WRITE_DATA_DST_SEL
	orr	w1, w0, w21
	mov	x0, x19
	bl	_radeon_ring_write
Lloh11:
	adrp	x8, _VM_INVALIDATE_REQUEST@GOTPAGE
Lloh12:
	ldr	x8, [x8, _VM_INVALIDATE_REQUEST@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	asr	w1, w8, #2
	mov	x0, x19
	bl	_radeon_ring_write
	mov	x0, x19
	mov	w1, #0
	bl	_radeon_ring_write
	ldr	w8, [x20]
	lsl	w1, w23, w8
	mov	x0, x19
	bl	_radeon_ring_write
Lloh14:
	adrp	x8, _PACKET3_PFP_SYNC_ME@GOTPAGE
Lloh15:
	ldr	x8, [x8, _PACKET3_PFP_SYNC_ME@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_PACKET3
	mov	x1, x0
	mov	x0, x19
	bl	_radeon_ring_write
	mov	x0, x19
	mov	w1, #0
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_radeon_ring_write
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_PACKET3_WRITE_DATA,4,2         ; @PACKET3_WRITE_DATA
	.comm	_VM_CONTEXT0_PAGE_TABLE_BASE_ADDR,4,2 ; @VM_CONTEXT0_PAGE_TABLE_BASE_ADDR
	.comm	_VM_CONTEXT8_PAGE_TABLE_BASE_ADDR,4,2 ; @VM_CONTEXT8_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
	.comm	_PACKET3_PFP_SYNC_ME,4,2        ; @PACKET3_PFP_SYNC_ME
.subsections_via_symbols
