	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function amdgpu_uvd_cs_pass1
_amdgpu_uvd_cs_pass1:                   ## @amdgpu_uvd_cs_pass1
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	$0, -40(%rbp)
	callq	_amdgpu_uvd_get_addr_from_ctx
	movl	%eax, %r15d
	movq	8(%r14), %rdi
	leaq	-32(%rbp), %rdx
	leaq	-48(%rbp), %rcx
	movl	%eax, %esi
	callq	_amdgpu_cs_find_mapping
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rdi
	movl	%r15d, %esi
	callq	_DRM_ERROR
	jmp	LBB0_7
LBB0_2:
	movq	8(%r14), %rdi
	movq	(%rdi), %rax
	xorl	%ebx, %ebx
	cmpl	$0, (%rax)
	jne	LBB0_7
## %bb.3:
	movl	(%r14), %edx
	movl	4(%r14), %esi
	callq	_amdgpu_get_ib_value
	cmpl	$7, %eax
	ja	LBB0_6
## %bb.4:
	movl	$195, %ecx
	btl	%eax, %ecx
	jae	LBB0_6
## %bb.5:
	movq	_AMDGPU_GEM_DOMAIN_VRAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-32(%rbp), %rdi
	callq	_amdgpu_bo_placement_from_domain
LBB0_6:
	movq	-32(%rbp), %rdi
	callq	_amdgpu_uvd_force_into_uvd_segment
	movq	-32(%rbp), %rsi
	leaq	4(%rsi), %rdi
	leaq	-40(%rbp), %rdx
	callq	_ttm_bo_validate
	movl	%eax, %ebx
LBB0_7:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Can't find BO for addr 0x%08Lx\n"

	.comm	_AMDGPU_GEM_DOMAIN_VRAM,4,2     ## @AMDGPU_GEM_DOMAIN_VRAM
	.no_dead_strip	_amdgpu_uvd_cs_pass1
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function amdgpu_uvd_cs_pass1
_amdgpu_uvd_cs_pass1:                   ; @amdgpu_uvd_cs_pass1
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x19, x0
	str	xzr, [sp, #24]
	bl	_amdgpu_uvd_get_addr_from_ctx
	mov	x21, x0
	ldr	x0, [x19, #8]
	add	x2, sp, #8
	add	x3, sp, #16
	mov	x1, x21
	bl	_amdgpu_cs_find_mapping
	cbz	w0, LBB0_2
; %bb.1:
	mov	x20, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	bl	_DRM_ERROR
	b	LBB0_7
LBB0_2:
	ldr	x0, [x19, #8]
	ldr	x8, [x0]
	ldr	w8, [x8]
	cbz	w8, LBB0_4
; %bb.3:
	mov	w20, #0
	b	LBB0_7
LBB0_4:
	ldp	w2, w1, [x19]
	bl	_amdgpu_get_ib_value
	cmp	w0, #7
	mov	w8, #1
	lsl	w8, w8, w0
	mov	w9, #195
	and	w8, w8, w9
	ccmp	w8, #0, #4, ls
	b.eq	LBB0_6
; %bb.5:
Lloh2:
	adrp	x8, _AMDGPU_GEM_DOMAIN_VRAM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AMDGPU_GEM_DOMAIN_VRAM@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	ldr	x0, [sp, #8]
	bl	_amdgpu_bo_placement_from_domain
LBB0_6:
	ldr	x0, [sp, #8]
	bl	_amdgpu_uvd_force_into_uvd_segment
	ldr	x1, [sp, #8]
	add	x0, x1, #4
	add	x2, sp, #24
	bl	_ttm_bo_validate
	mov	x20, x0
LBB0_7:
	mov	x0, 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
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Can't find BO for addr 0x%08Lx\n"

	.comm	_AMDGPU_GEM_DOMAIN_VRAM,4,2     ; @AMDGPU_GEM_DOMAIN_VRAM
	.no_dead_strip	_amdgpu_uvd_cs_pass1
.subsections_via_symbols
