	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ttm_bo_validate                ## -- Begin function ttm_bo_validate
	.p2align	4, 0x90
_ttm_bo_validate:                       ## @ttm_bo_validate
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movl	24(%rdi), %edi
	callq	_dma_resv_assert_held
	leaq	8(%rbx), %r14
	leaq	-36(%rbp), %rdx
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_ttm_bo_mem_compat
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	leaq	16(%rbx), %rdi
	movl	-36(%rbp), %esi
	movq	_TTM_PL_MASK_MEMTYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	notl	%edx
	callq	_ttm_flag_masked
LBB0_3:
	movq	(%r14), %rax
	movq	_TTM_PL_SYSTEM@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.4:
	cmpq	$0, (%rbx)
	jne	LBB0_6
## %bb.5:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_ttm_tt_create
	testl	%eax, %eax
	jne	LBB0_7
LBB0_6:
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_1:
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movq	%r15, %rdx
	callq	_ttm_bo_move_buffer
	testl	%eax, %eax
	je	LBB0_3
LBB0_7:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TTM_PL_MASK_MEMTYPE,4,2        ## @TTM_PL_MASK_MEMTYPE
	.comm	_TTM_PL_SYSTEM,8,3              ## @TTM_PL_SYSTEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ttm_bo_validate                ; -- Begin function ttm_bo_validate
	.p2align	2
_ttm_bo_validate:                       ; @ttm_bo_validate
	.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	x21, x2
	mov	x22, x1
	mov	x19, x0
	ldr	w0, [x0, #24]
	bl	_dma_resv_assert_held
	add	x20, x19, #8
	add	x2, sp, #12
	mov	x0, x22
	mov	x1, x20
	bl	_ttm_bo_mem_compat
	cbz	w0, LBB0_6
; %bb.1:
	add	x0, x19, #16
	ldr	w1, [sp, #12]
Lloh0:
	adrp	x8, _TTM_PL_MASK_MEMTYPE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TTM_PL_MASK_MEMTYPE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	mvn	w2, w8
	bl	_ttm_flag_masked
LBB0_2:
	ldr	x8, [x20]
Lloh3:
	adrp	x9, _TTM_PL_SYSTEM@GOTPAGE
Lloh4:
	ldr	x9, [x9, _TTM_PL_SYSTEM@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.3:
	ldr	x8, [x19]
	cbnz	x8, LBB0_5
; %bb.4:
	mov	x0, x19
	mov	w1, #1
	bl	_ttm_tt_create
	cbnz	w0, LBB0_7
LBB0_5:
	mov	w0, #0
	b	LBB0_7
LBB0_6:
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	bl	_ttm_bo_move_buffer
	cbz	w0, LBB0_2
LBB0_7:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_TTM_PL_MASK_MEMTYPE,4,2        ; @TTM_PL_MASK_MEMTYPE
	.comm	_TTM_PL_SYSTEM,8,3              ; @TTM_PL_SYSTEM
.subsections_via_symbols
