	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vm_validate_pt_pd_bos
_vm_validate_pt_pd_bos:                 ## @vm_validate_pt_pd_bos
	.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, %r15
	movq	8(%rdi), %r14
	movl	(%r14), %edi
	callq	_amdgpu_ttm_adev
	movq	_AMDGPU_GEM_DOMAIN_VRAM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, -28(%rbp)
	movl	$0, -32(%rbp)
	movq	_amdgpu_amdkfd_validate@GOTPCREL(%rip), %rdx
	leaq	-32(%rbp), %rcx
	movq	%rax, %rdi
	movq	%r15, %rsi
	callq	_amdgpu_vm_validate_pt_bos
	testl	%eax, %eax
	je	LBB0_3
## %bb.1:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_2
LBB0_3:
	leaq	-32(%rbp), %rdi
	movq	%r14, %rsi
	callq	_amdgpu_amdkfd_validate
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rdi
LBB0_2:
	xorl	%eax, %eax
	callq	_pr_err
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	8(%r15), %rdi
	callq	_amdgpu_gmc_pd_addr
	movl	%eax, 16(%r15)
	cmpq	$0, (%r15)
	je	LBB0_6
## %bb.7:
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_amdgpu_bo_kmap
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	movl	%eax, %r14d
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_pr_err
	movl	%r14d, %ebx
	jmp	LBB0_9
LBB0_6:
	xorl	%ebx, %ebx
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_AMDGPU_GEM_DOMAIN_VRAM,4,2     ## @AMDGPU_GEM_DOMAIN_VRAM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"amdgpu: failed to validate PT BOs\n"

L_.str.1:                               ## @.str.1
	.asciz	"amdgpu: failed to validate PD\n"

L_.str.2:                               ## @.str.2
	.asciz	"amdgpu: failed to kmap PD, ret=%d\n"

	.no_dead_strip	_vm_validate_pt_pd_bos
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vm_validate_pt_pd_bos
_vm_validate_pt_pd_bos:                 ; @vm_validate_pt_pd_bos
	.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	x20, x0
	ldr	x19, [x0, #8]
	ldr	w0, [x19]
	bl	_amdgpu_ttm_adev
Lloh0:
	adrp	x8, _AMDGPU_GEM_DOMAIN_VRAM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AMDGPU_GEM_DOMAIN_VRAM@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	stp	wzr, w8, [sp, #8]
Lloh3:
	adrp	x2, _amdgpu_amdkfd_validate@GOTPAGE
Lloh4:
	ldr	x2, [x2, _amdgpu_amdkfd_validate@GOTPAGEOFF]
	add	x3, sp, #8
	mov	x1, x20
	bl	_amdgpu_vm_validate_pt_bos
	cbz	w0, LBB0_2
; %bb.1:
	mov	x21, x0
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_4
LBB0_2:
	add	x0, sp, #8
	mov	x1, x19
	bl	_amdgpu_amdkfd_validate
	cbz	w0, LBB0_6
; %bb.3:
	mov	x21, x0
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_4:
	bl	_pr_err
LBB0_5:
	mov	x0, x21
	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
	ret
LBB0_6:
	ldr	x0, [x20, #8]
	bl	_amdgpu_gmc_pd_addr
	str	w0, [x20, #16]
	ldr	x8, [x20]
	cbz	x8, LBB0_9
; %bb.7:
	mov	x0, x19
	mov	x1, #0
	bl	_amdgpu_bo_kmap
	mov	x21, x0
	cbz	w0, LBB0_5
; %bb.8:
	str	x21, [sp]
Lloh9:
	adrp	x0, l_.str.2@PAGE
Lloh10:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_4
LBB0_9:
	mov	w21, #0
	b	LBB0_5
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_AMDGPU_GEM_DOMAIN_VRAM,4,2     ; @AMDGPU_GEM_DOMAIN_VRAM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"amdgpu: failed to validate PT BOs\n"

l_.str.1:                               ; @.str.1
	.asciz	"amdgpu: failed to validate PD\n"

l_.str.2:                               ; @.str.2
	.asciz	"amdgpu: failed to kmap PD, ret=%d\n"

	.no_dead_strip	_vm_validate_pt_pd_bos
.subsections_via_symbols
