	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function amdgpu_uvd_cs_packets
_amdgpu_uvd_cs_packets:                 ## @amdgpu_uvd_cs_packets
	.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
	movq	%rdi, %r15
	movq	(%rdi), %r12
	movq	24(%rdi), %rdi
	movq	(%rdi), %rax
	movq	(%rax), %r13
	movq	$0, 8(%r15)
	cmpq	$0, (%r13,%r12,8)
	jle	LBB0_9
## %bb.1:
	movq	%rsi, %r14
	xorl	%edx, %edx
	movq	%r12, %rsi
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%r15), %rdx
	incq	%rdx
	movq	%rdx, 8(%r15)
	cmpq	(%r13,%r12,8), %rdx
	jge	LBB0_9
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r15), %rsi
	movq	24(%r15), %rdi
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	callq	_amdgpu_get_ib_value
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_CP_PACKET_GET_TYPE
	cmpl	$128, %eax
	je	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$129, %eax
	jne	LBB0_10
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%ebx, %edi
	callq	_CP_PACKET0_GET_REG
	movl	%eax, 20(%r15)
	movl	%ebx, %edi
	callq	_CP_PACKET_GET_COUNT
	movl	%eax, 16(%r15)
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_amdgpu_uvd_cs_reg
	testl	%eax, %eax
	jne	LBB0_11
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%r15), %rdx
	cmpq	(%r13,%r12,8), %rdx
	jl	LBB0_7
LBB0_9:
	xorl	%eax, %eax
	jmp	LBB0_11
LBB0_10:
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_DRM_ERROR
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unknown packet type %d !\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_amdgpu_uvd_cs_packets
.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_packets
_amdgpu_uvd_cs_packets:                 ; @amdgpu_uvd_cs_packets
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x0
	ldr	x0, [x0, #24]
	ldr	x8, [x0]
	ldr	x22, [x8]
	ldr	x23, [x20]
	str	xzr, [x20, #8]
	ldr	x8, [x22, x23, lsl #3]
	cmp	x8, #1
	b.lt	LBB0_9
; %bb.1:
	mov	x19, x1
	mov	x2, #0
	mov	x1, x23
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	bl	_amdgpu_get_ib_value
	mov	x21, x0
	bl	_CP_PACKET_GET_TYPE
	cmp	w0, #128
	b.eq	LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x1, x0
	cmp	w0, #129
	b.ne	LBB0_10
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x21
	bl	_CP_PACKET0_GET_REG
	str	w0, [x20, #20]
	mov	x0, x21
	bl	_CP_PACKET_GET_COUNT
	str	w0, [x20, #16]
	mov	x0, x20
	mov	x1, x19
	bl	_amdgpu_uvd_cs_reg
	cbnz	w0, LBB0_11
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x2, [x20, #8]
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x20, #8]
	add	x2, x8, #1
	str	x2, [x20, #8]
LBB0_7:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x22, x23, lsl #3]
	cmp	x2, x8
	b.ge	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x0, [x20, #24]
	ldr	x1, [x20]
	b	LBB0_2
LBB0_9:
	mov	w0, #0
	b	LBB0_11
LBB0_10:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_11:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unknown packet type %d !\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_amdgpu_uvd_cs_packets
.subsections_via_symbols
