	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_vm_flush                ## -- Begin function radeon_vm_flush
	.p2align	4, 0x90
_radeon_vm_flush:                       ## @radeon_vm_flush
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movl	%edx, %ebx
	movq	%rsi, %r13
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movl	8(%rsi), %edi
	callq	_radeon_bo_gpu_offset
	movq	%rax, %r15
	movq	(%r13), %r12
	movslq	%ebx, %rbx
	leaq	(%rbx,%rbx,2), %r14
	movq	%r12, %rax
	cmpq	(%r12,%r14,8), %r15
	jne	LBB0_4
## %bb.1:
	movq	16(%r12,%r14,8), %rdi
	movq	%r12, %rax
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.2:
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_radeon_fence_is_earlier
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movq	(%r13), %rax
LBB0_4:
	leaq	(%r12,%r14,8), %r14
	leaq	(,%rbx,8), %rcx
	leaq	(%rcx,%rcx,2), %r13
	movl	8(%rax,%r13), %edx
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_trace_radeon_vm_flush
	leaq	(%r12,%r13), %rdi
	addq	$16, %rdi
	callq	_radeon_fence_unref
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_radeon_fence_ref
	movq	%rax, 16(%r12,%r13)
	movq	%r15, (%r14)
	shlq	$2, %rbx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	addq	(%rdi), %rbx
	movl	8(%r12,%r13), %edx
	movq	%rbx, %rsi
	movq	%r15, %rcx
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_radeon_ring_vm_flush           ## TAILCALL
LBB0_5:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_vm_flush                ; -- Begin function radeon_vm_flush
	.p2align	2
_radeon_vm_flush:                       ; @radeon_vm_flush
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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_offset w25, -72
	.cfi_offset w26, -80
	mov	x21, x3
	mov	x22, x2
	mov	x23, x1
	mov	x19, x0
	ldr	w0, [x1, #8]
	bl	_radeon_bo_gpu_offset
	mov	x20, x0
	ldr	x26, [x23]
	mov	x8, x26
	sxtw	x24, w22
	mov	w9, #24
	smaddl	x25, w22, w9, x26
	ldr	x9, [x25]
	cmp	x0, x9
	b.ne	LBB0_4
; %bb.1:
	mov	w9, #24
	madd	x9, x24, x9, x26
	ldr	x0, [x9, #16]
	cbz	x0, LBB0_4
; %bb.2:
	mov	x1, x21
	bl	_radeon_fence_is_earlier
	cbz	x0, LBB0_5
; %bb.3:
	ldr	x8, [x23]
LBB0_4:
	add	x9, x24, x24, lsl #1
	lsl	x23, x9, #3
	add	x8, x8, x23
	ldr	w2, [x8, #8]
	mov	x0, x20
	mov	x1, x22
	bl	_trace_radeon_vm_flush
	add	x22, x26, x23
	add	x0, x22, #16
	bl	_radeon_fence_unref
	mov	x0, x21
	bl	_radeon_fence_ref
	str	x0, [x22, #16]
	str	x20, [x25]
	ldr	x8, [x19]
	add	x1, x8, x24, lsl #2
	ldr	w2, [x22, #8]
	mov	x0, x19
	mov	x3, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_radeon_ring_vm_flush
LBB0_5:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
