	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function amdgpu_uvd_cs_reg
_amdgpu_uvd_cs_reg:                     ## @amdgpu_uvd_cs_reg
	.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	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	40(%rdi), %rax
	movq	(%rax), %rax
	movq	(%rax), %r12
	movq	(%rdi), %r13
	movq	8(%rdi), %rax
	incq	%rax
	movq	%rax, 8(%rdi)
	movl	16(%rdi), %ecx
	xorl	%r14d, %r14d
	testl	%ecx, %ecx
	js	LBB0_15
## %bb.1:
	movq	%rdi, %rbx
	movl	$-1, %r14d
	leaq	LJTI0_0(%rip), %r15
	jmp	LBB0_2
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, 24(%rbx)
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=1
	incq	%rax
	movq	%rax, 8(%rbx)
	incl	%r14d
	cmpl	%ecx, %r14d
	jge	LBB0_14
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	(%r12,%r13,8), %rax
	jge	LBB0_3
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	20(%rbx), %edx
	leal	(%r14,%rdx), %esi
	addl	$-127, %esi
	cmpl	$4, %esi
	ja	LBB0_11
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movslq	(%r15,%rsi,4), %rdx
	addq	%r15, %rdx
	jmpq	*%rdx
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, 32(%rbx)
	jmp	LBB0_13
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	callq	*-48(%rbp)                      ## 8-byte Folded Reload
	testl	%eax, %eax
	jne	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%rbx), %rax
	movl	16(%rbx), %ecx
	jmp	LBB0_13
LBB0_3:
	leaq	L_.str(%rip), %rdi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_DRM_ERROR
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	jmp	LBB0_15
LBB0_14:
	xorl	%r14d, %r14d
LBB0_15:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	leal	(%r14,%rdx), %esi
	incl	%esi
	leaq	L_.str.1(%rip), %rdi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_DRM_ERROR
	jmp	LBB0_4
LBB0_9:
	movl	%eax, %r14d
	jmp	LBB0_15
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_13, LBB0_13-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
LJTI0_0:
	.long	L0_0_set_13
	.long	L0_0_set_7
	.long	L0_0_set_12
	.long	L0_0_set_8
	.long	L0_0_set_13
	.end_data_region
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Register command after end of CS!\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"Invalid reg 0x%X!\n"

	.no_dead_strip	_amdgpu_uvd_cs_reg
.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_reg
_amdgpu_uvd_cs_reg:                     ; @amdgpu_uvd_cs_reg
	.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	x8, [x0, #40]
	ldr	x8, [x8]
	ldr	x21, [x8]
	ldp	x22, x8, [x0]
	add	x8, x8, #1
	str	x8, [x0, #8]
	ldr	w9, [x0, #16]
	tbnz	w9, #31, LBB0_10
; %bb.1:
	mov	x19, x1
	mov	x20, x0
	mov	w23, #-1
Lloh0:
	adrp	x24, lJTI0_0@PAGE
Lloh1:
	add	x24, x24, lJTI0_0@PAGEOFF
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	str	x8, [x20, #24]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x8, x8, #1
	str	x8, [x20, #8]
	add	w23, w23, #1
	cmp	w23, w9
	b.ge	LBB0_10
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x21, x22, lsl #3]
	cmp	x8, x10
	b.ge	LBB0_11
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w10, [x20, #20]
	add	w11, w23, w10
	sub	w10, w11, #127
	cmp	w10, #4
	b.hi	LBB0_14
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	adr	x11, LBB0_2
	ldrb	w12, [x24, x10]
	add	x11, x11, x12, lsl #2
	br	x11
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=1
	str	x8, [x20, #32]
	b	LBB0_3
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x20
	blr	x19
	cbnz	w0, LBB0_13
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x20, #8]
	ldr	w9, [x20, #16]
	b	LBB0_3
LBB0_10:
	mov	w0, #0
	b	LBB0_13
LBB0_11:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
LBB0_12:
	bl	_DRM_ERROR
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_13:
	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
LBB0_14:
	add	w8, w11, #1
	str	x8, [sp]
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_12
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_7-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_8-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Register command after end of CS!\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"Invalid reg 0x%X!\n"

	.no_dead_strip	_amdgpu_uvd_cs_reg
.subsections_via_symbols
