	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_ttm_set_buffer_funcs_status ## -- Begin function amdgpu_ttm_set_buffer_funcs_status
	.p2align	4, 0x90
_amdgpu_ttm_set_buffer_funcs_status:    ## @amdgpu_ttm_set_buffer_funcs_status
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpl	$0, 16(%rdi)
	je	LBB0_8
## %bb.1:
	movq	%rdi, %rbx
	cmpq	$0, 40(%rdi)
	jne	LBB0_8
## %bb.2:
	movl	%esi, %r14d
	cmpl	%esi, (%rbx)
	je	LBB0_8
## %bb.3:
	movq	24(%rbx), %r15
	movq	_TTM_PL_VRAM@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	testl	%r14d, %r14d
	je	LBB0_6
## %bb.4:
	movq	8(%rbx), %rax
	movq	_DRM_SCHED_PRIORITY_KERNEL@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	shlq	$2, %rcx
	addq	(%rax), %rcx
	movq	%rcx, -48(%rbp)
	leaq	4(%rbx), %rdi
	leaq	-48(%rbp), %rsi
	movl	$1, %edx
	xorl	%ecx, %ecx
	callq	_drm_sched_entity_init
	testl	%eax, %eax
	je	LBB0_7
## %bb.5:
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_DRM_ERROR
	jmp	LBB0_8
LBB0_6:
	leaq	4(%rbx), %rdi
	callq	_drm_sched_entity_destroy
	movq	%r12, %r13
	shlq	$4, %r13
	movq	8(%r15,%r13), %rdi
	callq	_dma_fence_put
	movq	$0, 8(%r15,%r13)
LBB0_7:
	xorl	%eax, %eax
	testl	%r14d, %r14d
	sete	%al
	movl	32(%rbx,%rax,4), %eax
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarl	%cl, %eax
	shlq	$4, %r12
	movl	%eax, (%r15,%r12)
	movl	%r14d, (%rbx)
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TTM_PL_VRAM,8,3                ## @TTM_PL_VRAM
	.comm	_DRM_SCHED_PRIORITY_KERNEL,8,3  ## @DRM_SCHED_PRIORITY_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed setting up TTM BO move entity (%d)\n"

	.comm	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_ttm_set_buffer_funcs_status ; -- Begin function amdgpu_ttm_set_buffer_funcs_status
	.p2align	2
_amdgpu_ttm_set_buffer_funcs_status:    ; @amdgpu_ttm_set_buffer_funcs_status
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	ldr	w8, [x0, #16]
	cbz	w8, LBB0_8
; %bb.1:
	mov	x20, x0
	ldr	x8, [x0, #40]
	cbnz	x8, LBB0_8
; %bb.2:
	mov	x19, x1
	ldr	w8, [x20]
	cmp	w8, w1
	b.eq	LBB0_8
; %bb.3:
	ldr	x21, [x20, #24]
Lloh0:
	adrp	x8, _TTM_PL_VRAM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TTM_PL_VRAM@GOTPAGEOFF]
Lloh2:
	ldr	x22, [x8]
	cbz	w19, LBB0_6
; %bb.4:
	ldr	x8, [x20, #8]
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _DRM_SCHED_PRIORITY_KERNEL@GOTPAGE
Lloh4:
	ldr	x9, [x9, _DRM_SCHED_PRIORITY_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	add	x8, x8, x9, lsl #2
	str	x8, [sp, #8]
	add	x0, x20, #4
	add	x1, sp, #8
	mov	w2, #1
	mov	x3, #0
	bl	_drm_sched_entity_init
	cbz	w0, LBB0_7
; %bb.5:
	mov	x1, x0
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
	b	LBB0_8
LBB0_6:
	add	x0, x20, #4
	bl	_drm_sched_entity_destroy
	add	x23, x21, x22, lsl #4
	ldr	x0, [x23, #8]
	bl	_dma_fence_put
	str	xzr, [x23, #8]
LBB0_7:
	cmp	w19, #0
	mov	w8, #32
	mov	w9, #36
	csel	x8, x9, x8, eq
	ldr	w8, [x20, x8]
Lloh8:
	adrp	x9, _PAGE_SHIFT@GOTPAGE
Lloh9:
	ldr	x9, [x9, _PAGE_SHIFT@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	asr	w8, w8, w9
	lsl	x9, x22, #4
	str	w8, [x21, x9]
	str	w19, [x20]
LBB0_8:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_TTM_PL_VRAM,8,3                ; @TTM_PL_VRAM
	.comm	_DRM_SCHED_PRIORITY_KERNEL,8,3  ; @DRM_SCHED_PRIORITY_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed setting up TTM BO move entity (%d)\n"

	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
.subsections_via_symbols
