	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function radeon_uvd_cs_msg_decode
_radeon_uvd_cs_msg_decode:              ## @radeon_uvd_cs_msg_decode
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movl	16(%rdi), %r13d
	movl	24(%rdi), %r15d
	movl	28(%rdi), %ebx
	movl	36(%rdi), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	112(%rdi), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movl	%ebx, %edi
	shrl	$4, %edi
	movl	$2, %esi
	callq	_ALIGN
	movl	%eax, %r12d
	imull	%r15d, %ebx
	movl	%ebx, %edi
	shrl	%edi
	addl	%ebx, %edi
	movl	$1024, %esi                     ## imm = 0x400
	callq	_ALIGN
	cmpq	$4, %r13
	ja	LBB0_5
## %bb.1:
	movl	%eax, %ebx
	movl	%r15d, %r14d
	shrl	$4, %r14d
	leaq	LJTI0_0(%rip), %rax
	movslq	(%rax,%r13,4), %rcx
	addq	%rax, %rcx
	jmpq	*%rcx
LBB0_6:
	movl	%ebx, %eax
	shll	$4, %eax
	addl	%ebx, %eax
	imull	%r14d, %r12d
	imull	$3296, %r12d, %r13d             ## imm = 0xCE0
	jmp	LBB0_7
LBB0_2:
	leal	(%rbx,%rbx,2), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	%r12d, %r13d
	shll	$7, %r13d
	movl	%r14d, %edi
	movl	%r12d, %esi
	callq	_max
	imull	$112, %eax, %edi
	movl	$64, %esi
	callq	_ALIGN
	addl	$192, %r13d
	imull	%r14d, %r13d
	addl	-44(%rbp), %r13d                ## 4-byte Folded Reload
LBB0_7:
	addl	%eax, %r13d
	cmpl	-52(%rbp), %r15d                ## 4-byte Folded Reload
	jbe	LBB0_11
	jmp	LBB0_9
LBB0_5:
	leaq	L_.str(%rip), %rdi
	xorl	%ebx, %ebx
	movl	%r13d, %esi
	xorl	%eax, %eax
	callq	_DRM_ERROR
	jmp	LBB0_10
LBB0_3:
	leal	(%rbx,%rbx,2), %r13d
	cmpl	-52(%rbp), %r15d                ## 4-byte Folded Reload
	ja	LBB0_9
LBB0_11:
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	cmpl	%r13d, %esi
	jae	LBB0_13
## %bb.12:
	leaq	L_.str.2(%rip), %rdi
	xorl	%ebx, %ebx
	movl	%r13d, %edx
	xorl	%eax, %eax
	callq	_DRM_ERROR
	jmp	LBB0_10
LBB0_4:
	leal	(%rbx,%rbx,2), %eax
	imull	%r14d, %r12d
	movq	%rbx, %r14
	movl	%r12d, %ebx
	shll	$6, %ebx
	addl	%eax, %ebx
	shll	$5, %r12d
	movl	%r12d, %edi
	movl	$64, %esi
	callq	_ALIGN
	movl	%eax, %r13d
	addl	%ebx, %r13d
	movq	%r14, %rbx
	cmpl	-52(%rbp), %r15d                ## 4-byte Folded Reload
	jbe	LBB0_11
LBB0_9:
	leaq	L_.str.1(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_DRM_ERROR
LBB0_10:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_14
LBB0_13:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	%esi, 4(%rax)
	movl	%ebx, 8(%rax)
	xorl	%ebx, %ebx
LBB0_14:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
LJTI0_0:
	.long	L0_0_set_6
	.long	L0_0_set_2
	.long	L0_0_set_5
	.long	L0_0_set_3
	.long	L0_0_set_4
	.end_data_region
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"UVD codec not handled %d!\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"Invalid UVD decoding target pitch!\n"

L_.str.2:                               ## @.str.2
	.asciz	"Invalid dpb_size in UVD message (%d / %d)!\n"

	.no_dead_strip	_radeon_uvd_cs_msg_decode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function radeon_uvd_cs_msg_decode
_radeon_uvd_cs_msg_decode:              ; @radeon_uvd_cs_msg_decode
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x1
	ldr	w26, [x0, #16]
	ldp	w24, w20, [x0, #24]
	ldr	w23, [x0, #36]
	ldr	w25, [x0, #112]
	lsr	w0, w20, #4
	mov	w1, #2
	bl	_ALIGN
	mov	x22, x0
	mul	w8, w20, w24
	add	w0, w8, w8, lsr #1
	mov	w1, #1024
	bl	_ALIGN
	cmp	w26, #4
	b.hi	LBB0_4
; %bb.1:
	mov	x20, x0
	lsr	w21, w24, #4
Lloh0:
	adrp	x8, lJTI0_0@PAGE
Lloh1:
	add	x8, x8, lJTI0_0@PAGEOFF
	adr	x9, LBB0_2
	ldrb	w10, [x8, x26]
	add	x9, x9, x10, lsl #2
	br	x9
LBB0_2:
	add	w8, w20, w20, lsl #4
	mul	w9, w22, w21
	mov	w10, #3296
	madd	w8, w9, w10, w8
	cmp	w24, w25
	b.ls	LBB0_6
	b	LBB0_9
LBB0_3:
	lsl	w26, w22, #7
	add	w27, w20, w20, lsl #1
	mov	x0, x21
	mov	x1, x22
	bl	_max
	mov	w8, #112
	mul	w0, w0, w8
	mov	w1, #64
	bl	_ALIGN
	add	w8, w26, #192
	madd	w8, w8, w21, w27
	add	w8, w8, w0
	cmp	w24, w25
	b.ls	LBB0_6
	b	LBB0_9
LBB0_4:
                                        ; kill: def $w26 killed $w26 killed $x26 def $x26
	str	x26, [sp]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_10
LBB0_5:
	add	w8, w20, w20, lsl #1
	cmp	w24, w25
	b.hi	LBB0_9
LBB0_6:
	cmp	w23, w8
	b.hs	LBB0_11
; %bb.7:
	stp	x23, x8, [sp]
Lloh4:
	adrp	x0, l_.str.2@PAGE
Lloh5:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_10
LBB0_8:
	add	w8, w20, w20, lsl #1
	mul	w9, w22, w21
	add	w21, w8, w9, lsl #6
	lsl	w0, w9, #5
	mov	w1, #64
	bl	_ALIGN
	add	w8, w21, w0
	cmp	w24, w25
	b.ls	LBB0_6
LBB0_9:
Lloh6:
	adrp	x0, l_.str.1@PAGE
Lloh7:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_10:
	bl	_DRM_ERROR
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_12
LBB0_11:
	mov	w0, #0
	stp	w23, w20, [x19, #4]
LBB0_12:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_5-LBB0_2)>>2
	.byte	(LBB0_8-LBB0_2)>>2
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"UVD codec not handled %d!\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"Invalid UVD decoding target pitch!\n"

l_.str.2:                               ; @.str.2
	.asciz	"Invalid dpb_size in UVD message (%d / %d)!\n"

	.no_dead_strip	_radeon_uvd_cs_msg_decode
.subsections_via_symbols
