	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vega10_populate_smc_uvd_levels
_vega10_populate_smc_uvd_levels:        ## @vega10_populate_smc_uvd_levels
	.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, %r14
	movq	(%rdi), %rax
	movq	8(%rdi), %r13
	movq	(%rax), %r15
	cmpq	$0, 16(%r13)
	je	LBB0_1
## %bb.2:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	24(%r13), %rax
	movq	(%rax,%rbx,8), %rsi
	leaq	(,%rbx,4), %rdx
	addq	48(%r13), %rdx
	movq	%r14, %rdi
	callq	_vega10_populate_single_vclock_level
	testl	%eax, %eax
	jne	LBB0_41
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	incq	%rbx
	cmpq	16(%r13), %rbx
	jb	LBB0_3
	jmp	LBB0_5
LBB0_1:
	xorl	%ebx, %ebx
LBB0_5:
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movq	_NUM_UVD_DPM_LEVELS@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	cmpq	%rdi, %rbx
	jae	LBB0_9
## %bb.6:
	leaq	(,%rbx,4), %r15
	movq	%rbx, %r12
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	24(%r13), %rax
	movq	-8(%rax,%rbx,8), %rsi
	movq	48(%r13), %rdx
	addq	%r15, %rdx
	movq	%r14, %rdi
	callq	_vega10_populate_single_vclock_level
	testl	%eax, %eax
	jne	LBB0_41
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	incq	%r12
	movq	_NUM_UVD_DPM_LEVELS@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	$4, %r15
	cmpq	%rdi, %r12
	jb	LBB0_7
LBB0_9:
	cmpq	$0, (%r13)
	je	LBB0_10
## %bb.11:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r13), %rax
	movq	(%rax,%rbx,8), %rsi
	leaq	(,%rbx,4), %rdx
	addq	40(%r13), %rdx
	movq	%r14, %rdi
	callq	_vega10_populate_single_dclock_level
	testl	%eax, %eax
	jne	LBB0_41
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	incq	%rbx
	cmpq	(%r13), %rbx
	jb	LBB0_12
## %bb.14:
	movq	_NUM_UVD_DPM_LEVELS@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	cmpq	%rdi, %rbx
	jb	LBB0_16
	jmp	LBB0_19
LBB0_10:
	xorl	%ebx, %ebx
	cmpq	%rdi, %rbx
	jae	LBB0_19
LBB0_16:
	leaq	(,%rbx,4), %r15
	movq	%rbx, %r12
	.p2align	4, 0x90
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r13), %rax
	movq	-8(%rax,%rbx,8), %rsi
	movq	40(%r13), %rdx
	addq	%r15, %rdx
	movq	%r14, %rdi
	callq	_vega10_populate_single_dclock_level
	testl	%eax, %eax
	jne	LBB0_41
## %bb.18:                              ##   in Loop: Header=BB0_17 Depth=1
	incq	%r12
	movq	_NUM_UVD_DPM_LEVELS@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	$4, %r15
	cmpq	%rdi, %r12
	jb	LBB0_17
LBB0_19:
	movq	-48(%rbp), %r9                  ## 8-byte Reload
	movq	(%r9), %r14
	testq	%r14, %r14
	je	LBB0_24
## %bb.20:
	movq	8(%r9), %rsi
	movq	24(%r13), %r8
	addq	$16, %rsi
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_21:                                ## =>This Inner Loop Header: Depth=1
	movq	-16(%rsi), %rcx
	movl	$-1, %eax
	cmpq	(%r8,%rbx,8), %rcx
	jne	LBB0_41
## %bb.22:                              ##   in Loop: Header=BB0_21 Depth=1
	movq	-8(%rsi), %rcx
	movq	8(%r13), %rdx
	cmpq	(%rdx,%rbx,8), %rcx
	jne	LBB0_41
## %bb.23:                              ##   in Loop: Header=BB0_21 Depth=1
	movl	(%rsi), %eax
	movq	32(%r13), %rcx
	movl	%eax, (%rcx,%rbx,4)
	incq	%rbx
	addq	$24, %rsi
	cmpq	%rbx, %r14
	jne	LBB0_21
LBB0_24:
	movq	%rdi, %r8
	subq	%r14, %r8
	jbe	LBB0_40
## %bb.25:
	leaq	(%r14,%r14,2), %rax
	movq	8(%r9), %rcx
	leaq	(%rcx,%rax,8), %r10
	addq	$-8, %r10
	movq	32(%r13), %rsi
	cmpq	$8, %r8
	jb	LBB0_36
## %bb.26:
	leaq	(%rsi,%r14,4), %rdx
	leaq	(%rcx,%rax,8), %rax
	addq	$-4, %rax
	cmpq	%rdx, %rax
	jbe	LBB0_28
## %bb.27:
	leaq	(%rsi,%rdi,4), %rax
	cmpq	%rax, %r10
	jb	LBB0_36
LBB0_28:
	movq	%r8, %r9
	andq	$-8, %r9
	leaq	-8(%r9), %rax
	movq	%rax, %r11
	shrq	$3, %r11
	incq	%r11
	testq	%rax, %rax
	je	LBB0_29
## %bb.30:
	movq	%r11, %rcx
	andq	$-2, %rcx
	movd	(%r10), %xmm0                   ## xmm0 = mem[0],zero,zero,zero
	pshufd	$0, %xmm0, %xmm0                ## xmm0 = xmm0[0,0,0,0]
	leaq	(%rsi,%r14,4), %rax
	addq	$48, %rax
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_31:                                ## =>This Inner Loop Header: Depth=1
	movdqu	%xmm0, -48(%rax,%rbx,4)
	movdqu	%xmm0, -32(%rax,%rbx,4)
	movdqu	%xmm0, -16(%rax,%rbx,4)
	movdqu	%xmm0, (%rax,%rbx,4)
	addq	$16, %rbx
	addq	$-2, %rcx
	jne	LBB0_31
	jmp	LBB0_32
LBB0_29:
	xorl	%ebx, %ebx
LBB0_32:
	testb	$1, %r11b
	je	LBB0_34
## %bb.33:
	addq	%r14, %rbx
	movd	(%r10), %xmm0                   ## xmm0 = mem[0],zero,zero,zero
	pshufd	$0, %xmm0, %xmm0                ## xmm0 = xmm0[0,0,0,0]
	movdqu	%xmm0, (%rsi,%rbx,4)
	movdqu	%xmm0, 16(%rsi,%rbx,4)
LBB0_34:
	xorl	%eax, %eax
	cmpq	%r9, %r8
	je	LBB0_41
## %bb.35:
	addq	%r9, %r14
LBB0_36:
	movl	%edi, %ecx
	subl	%r14d, %ecx
	movq	%r14, %rax
	notq	%rax
	addq	%rdi, %rax
	andq	$3, %rcx
	je	LBB0_38
	.p2align	4, 0x90
LBB0_37:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r10), %edx
	movl	%edx, (%rsi,%r14,4)
	incq	%r14
	decq	%rcx
	jne	LBB0_37
LBB0_38:
	cmpq	$3, %rax
	jb	LBB0_40
	.p2align	4, 0x90
LBB0_39:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r10), %eax
	movl	%eax, (%rsi,%r14,4)
	movl	(%r10), %eax
	movl	%eax, 4(%rsi,%r14,4)
	movl	(%r10), %eax
	movl	%eax, 8(%rsi,%r14,4)
	movl	(%r10), %eax
	movl	%eax, 12(%rsi,%r14,4)
	addq	$4, %r14
	cmpq	%r14, %rdi
	jne	LBB0_39
LBB0_40:
	xorl	%eax, %eax
LBB0_41:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_NUM_UVD_DPM_LEVELS,8,3         ## @NUM_UVD_DPM_LEVELS
	.no_dead_strip	_vega10_populate_smc_uvd_levels
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vega10_populate_smc_uvd_levels
_vega10_populate_smc_uvd_levels:        ; @vega10_populate_smc_uvd_levels
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	ldp	x8, x20, [x0]
	ldr	x21, [x8]
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_4
; %bb.1:
	mov	x22, #0
	mov	x23, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #24]
	ldr	x1, [x8, x23, lsl #3]
	ldr	x8, [x20, #48]
	add	x2, x8, x22
	mov	x0, x19
	bl	_vega10_populate_single_vclock_level
	cbnz	w0, LBB0_34
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x23, x23, #1
	ldr	x8, [x20, #16]
	add	x22, x22, #4
	cmp	x23, x8
	b.lo	LBB0_2
	b	LBB0_5
LBB0_4:
	mov	x23, #0
LBB0_5:
Lloh0:
	adrp	x22, _NUM_UVD_DPM_LEVELS@GOTPAGE
Lloh1:
	ldr	x22, [x22, _NUM_UVD_DPM_LEVELS@GOTPAGEOFF]
	ldr	x8, [x22]
	cmp	x23, x8
	b.hs	LBB0_9
; %bb.6:
	sub	x24, x23, #1
	lsl	x25, x23, #2
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #24]
	ldr	x1, [x8, x24, lsl #3]
	ldr	x8, [x20, #48]
	add	x2, x8, x25
	mov	x0, x19
	bl	_vega10_populate_single_vclock_level
	cbnz	w0, LBB0_34
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	add	x23, x23, #1
	ldr	x8, [x22]
	add	x25, x25, #4
	cmp	x23, x8
	b.lo	LBB0_7
LBB0_9:
	ldr	x9, [x20]
	cbz	x9, LBB0_14
; %bb.10:
	mov	x24, #0
	mov	x23, #0
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #8]
	ldr	x1, [x8, x23, lsl #3]
	ldr	x8, [x20, #40]
	add	x2, x8, x24
	mov	x0, x19
	bl	_vega10_populate_single_dclock_level
	cbnz	w0, LBB0_34
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	add	x23, x23, #1
	ldr	x8, [x20]
	add	x24, x24, #4
	cmp	x23, x8
	b.lo	LBB0_11
; %bb.13:
	ldr	x8, [x22]
	cmp	x23, x8
	b.lo	LBB0_15
	b	LBB0_18
LBB0_14:
	mov	x23, #0
	cmp	x23, x8
	b.hs	LBB0_18
LBB0_15:
	sub	x24, x23, #1
	lsl	x25, x23, #2
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #8]
	ldr	x1, [x8, x24, lsl #3]
	ldr	x8, [x20, #40]
	add	x2, x8, x25
	mov	x0, x19
	bl	_vega10_populate_single_dclock_level
	cbnz	w0, LBB0_34
; %bb.17:                               ;   in Loop: Header=BB0_16 Depth=1
	add	x23, x23, #1
	ldr	x8, [x22]
	add	x25, x25, #4
	cmp	x23, x8
	b.lo	LBB0_16
LBB0_18:
	ldr	x9, [x21]
	cbz	x9, LBB0_23
; %bb.19:
	mov	x10, #0
	ldr	x12, [x21, #8]
	ldr	x11, [x20, #24]
	add	x12, x12, #8
LBB0_20:                                ; =>This Inner Loop Header: Depth=1
	ldur	x13, [x12, #-8]
	ldr	x14, [x11, x10, lsl #3]
	cmp	x13, x14
	b.ne	LBB0_33
; %bb.21:                               ;   in Loop: Header=BB0_20 Depth=1
	ldr	x13, [x12]
	ldr	x14, [x20, #8]
	ldr	x14, [x14, x10, lsl #3]
	cmp	x13, x14
	b.ne	LBB0_33
; %bb.22:                               ;   in Loop: Header=BB0_20 Depth=1
	ldr	w13, [x12, #8]
	ldr	x14, [x20, #32]
	str	w13, [x14, x10, lsl #2]
	add	x10, x10, #1
	add	x12, x12, #24
	cmp	x9, x10
	b.ne	LBB0_20
LBB0_23:
	subs	x11, x8, x9
	b.ls	LBB0_32
; %bb.24:
	mov	w10, #24
	ldr	x13, [x21, #8]
	madd	x10, x9, x10, x13
	sub	x10, x10, #8
	ldr	x12, [x20, #32]
	cmp	x11, #16
	b.lo	LBB0_30
; %bb.25:
	add	x14, x12, x9, lsl #2
	mov	w15, #24
	madd	x13, x9, x15, x13
	sub	x15, x13, #4
	cmp	x15, x14
	b.ls	LBB0_27
; %bb.26:
	add	x15, x12, x8, lsl #2
	sub	x13, x13, #8
	cmp	x13, x15
	b.lo	LBB0_30
LBB0_27:
	and	x13, x11, #0xfffffffffffffff0
	add	x9, x9, x13
	ld1r.4s	{ v0 }, [x10]
	add	x14, x14, #32
	mov	x15, x13
LBB0_28:                                ; =>This Inner Loop Header: Depth=1
	stp	q0, q0, [x14, #-32]
	stp	q0, q0, [x14], #64
	subs	x15, x15, #16
	b.ne	LBB0_28
; %bb.29:
	cmp	x11, x13
	b.eq	LBB0_32
LBB0_30:
	sub	x8, x8, x9
	add	x9, x12, x9, lsl #2
LBB0_31:                                ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x10]
	str	w11, [x9], #4
	subs	x8, x8, #1
	b.ne	LBB0_31
LBB0_32:
	mov	w0, #0
	b	LBB0_34
LBB0_33:
	mov	w0, #-1
LBB0_34:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_NUM_UVD_DPM_LEVELS,8,3         ; @NUM_UVD_DPM_LEVELS
	.no_dead_strip	_vega10_populate_smc_uvd_levels
.subsections_via_symbols
