	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function amdgpu_gem_va_update_vm
_amdgpu_gem_va_update_vm:               ## @amdgpu_gem_va_update_vm
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r12
	movq	%rdx, %r15
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	%rsi, %rdi
	callq	_amdgpu_vm_ready
	testl	%eax, %eax
	je	LBB0_7
## %bb.1:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	callq	_amdgpu_vm_clear_freed
	testl	%eax, %eax
	je	LBB0_2
LBB0_6:
	movq	_ERESTARTSYS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	addl	%eax, %ecx
	jne	LBB0_8
LBB0_7:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_DRM_ERROR                      ## TAILCALL
LBB0_2:
	movq	_AMDGPU_VA_OP_MAP@GOTPCREL(%rip), %rax
	cmpq	%r12, (%rax)
	je	LBB0_4
## %bb.3:
	movq	_AMDGPU_VA_OP_REPLACE@GOTPCREL(%rip), %rax
	cmpq	%r12, (%rax)
	jne	LBB0_5
LBB0_4:
	movq	%r14, %rdi
	movq	%r15, %rsi
	xorl	%edx, %edx
	callq	_amdgpu_vm_bo_update
	testl	%eax, %eax
	jne	LBB0_6
LBB0_5:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_amdgpu_vm_update_directories
	testl	%eax, %eax
	jne	LBB0_6
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_AMDGPU_VA_OP_MAP,8,3           ## @AMDGPU_VA_OP_MAP
	.comm	_AMDGPU_VA_OP_REPLACE,8,3       ## @AMDGPU_VA_OP_REPLACE
	.comm	_ERESTARTSYS,4,2                ## @ERESTARTSYS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Couldn't update BO_VA (%d)\n"

	.no_dead_strip	_amdgpu_gem_va_update_vm
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function amdgpu_gem_va_update_vm
_amdgpu_gem_va_update_vm:               ; @amdgpu_gem_va_update_vm
	.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	x22, x3
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
	mov	x0, x1
	bl	_amdgpu_vm_ready
	cbz	w0, LBB0_7
; %bb.1:
	mov	x0, x20
	mov	x1, x19
	mov	x2, #0
	bl	_amdgpu_vm_clear_freed
	mov	x1, x0
	cbz	w0, LBB0_4
LBB0_2:
Lloh0:
	adrp	x8, _ERESTARTSYS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ERESTARTSYS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmn	w1, w8
	b.eq	LBB0_7
; %bb.3:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	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	_DRM_ERROR
LBB0_4:
Lloh5:
	adrp	x8, _AMDGPU_VA_OP_MAP@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AMDGPU_VA_OP_MAP@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
Lloh8:
	adrp	x9, _AMDGPU_VA_OP_REPLACE@GOTPAGE
Lloh9:
	ldr	x9, [x9, _AMDGPU_VA_OP_REPLACE@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x8, x22
	ccmp	x9, x22, #4, ne
	b.ne	LBB0_6
; %bb.5:
	mov	x0, x20
	mov	x1, x21
	mov	w2, #0
	bl	_amdgpu_vm_bo_update
	mov	x1, x0
	cbnz	w0, LBB0_2
LBB0_6:
	mov	x0, x20
	mov	x1, x19
	bl	_amdgpu_vm_update_directories
	mov	x1, x0
	cbnz	w0, LBB0_2
LBB0_7:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_AMDGPU_VA_OP_MAP,8,3           ; @AMDGPU_VA_OP_MAP
	.comm	_AMDGPU_VA_OP_REPLACE,8,3       ; @AMDGPU_VA_OP_REPLACE
	.comm	_ERESTARTSYS,4,2                ; @ERESTARTSYS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Couldn't update BO_VA (%d)\n"

	.no_dead_strip	_amdgpu_gem_va_update_vm
.subsections_via_symbols
