	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function uvd_v7_0_set_enc_ring_funcs
_uvd_v7_0_set_enc_ring_funcs:           ## @uvd_v7_0_set_enc_ring_funcs
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	(%rdi), %eax
	testl	%eax, %eax
	jle	LBB0_12
## %bb.1:
	movq	%rdi, %r14
	xorl	%ebx, %ebx
	movq	_uvd_v7_0_enc_ring_vm_funcs@GOTPCREL(%rip), %r12
	leaq	L_.str(%rip), %r15
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_DRM_INFO
	movl	(%r14), %eax
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	movslq	%eax, %rcx
	cmpq	%rcx, %rbx
	jge	LBB0_12
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_7 Depth 2
	movl	4(%r14), %ecx
	btl	%ebx, %ecx
	jb	LBB0_11
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	8(%r14), %eax
	testl	%eax, %eax
	jle	LBB0_10
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	16(%r14), %rcx
	movq	(%rcx,%rbx,8), %rcx
	cmpl	$1, %eax
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%edx, %edx
	jmp	LBB0_8
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	%eax, %esi
	andl	$-2, %esi
	leaq	24(%rcx), %rdi
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_7:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%r12, -16(%rdi)
	movl	%ebx, -24(%rdi)
	movq	%r12, (%rdi)
	movl	%ebx, -8(%rdi)
	addq	$2, %rdx
	addq	$32, %rdi
	cmpq	%rdx, %rsi
	jne	LBB0_7
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	testb	$1, %al
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	shlq	$4, %rdx
	movq	%r12, 8(%rcx,%rdx)
	movl	%ebx, (%rcx,%rdx)
	jmp	LBB0_10
LBB0_12:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_uvd_v7_0_enc_ring_vm_funcs,4,2 ## @uvd_v7_0_enc_ring_vm_funcs
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"UVD(%d) ENC is enabled in VM mode\n"

	.no_dead_strip	_uvd_v7_0_set_enc_ring_funcs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function uvd_v7_0_set_enc_ring_funcs
_uvd_v7_0_set_enc_ring_funcs:           ; @uvd_v7_0_set_enc_ring_funcs
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_13
; %bb.1:
	mov	x19, x0
	mov	x20, #0
Lloh0:
	adrp	x22, _uvd_v7_0_enc_ring_vm_funcs@GOTPAGE
Lloh1:
	ldr	x22, [x22, _uvd_v7_0_enc_ring_vm_funcs@GOTPAGEOFF]
Lloh2:
	adrp	x21, l_.str@PAGE
Lloh3:
	add	x21, x21, l_.str@PAGEOFF
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x21
	mov	x1, x20
	bl	_DRM_INFO
	ldr	w8, [x19]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x20, x20, #1
	cmp	x20, w8, sxtw
	b.ge	LBB0_13
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_9 Depth 2
                                        ;     Child Loop BB0_12 Depth 2
	ldr	w9, [x19, #4]
	lsr	w9, w9, w20
	tbnz	w9, #0, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x19, #8]
	cmp	w8, #1
	b.lt	LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x9, [x19, #16]
	ldr	x9, [x9, x20, lsl #3]
	cmp	w8, #4
	b.hs	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x10, #0
	b	LBB0_11
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=1
	and	x10, x8, #0xfffffffc
	add	x11, x9, #32
	mov	x12, x10
LBB0_9:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	stur	x22, [x11, #-24]
	stur	x22, [x11, #-8]
	str	x22, [x11, #8]
	str	x22, [x11, #24]
	stur	w20, [x11, #-32]
	stur	w20, [x11, #-16]
	str	w20, [x11]
	str	w20, [x11, #16]
	add	x11, x11, #64
	subs	x12, x12, #4
	b.ne	LBB0_9
; %bb.10:                               ;   in Loop: Header=BB0_4 Depth=1
	cmp	x10, x8
	b.eq	LBB0_2
LBB0_11:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x9, x9, x10, lsl #4
	add	x9, x9, #8
	sub	x8, x8, x10
LBB0_12:                                ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	str	x22, [x9]
	stur	w20, [x9, #-8]
	add	x9, x9, #16
	subs	x8, x8, #1
	b.ne	LBB0_12
	b	LBB0_2
LBB0_13:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_uvd_v7_0_enc_ring_vm_funcs,4,2 ; @uvd_v7_0_enc_ring_vm_funcs
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"UVD(%d) ENC is enabled in VM mode\n"

	.no_dead_strip	_uvd_v7_0_set_enc_ring_funcs
.subsections_via_symbols
