	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function uvd_v7_0_mmsch_start
LCPI0_0:
	.space	16
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_uvd_v7_0_mmsch_start:                  ## @uvd_v7_0_mmsch_start
	.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, %r12
	movl	8(%rsi), %edi
	movl	%edi, -44(%rbp)                 ## 4-byte Spill
	movq	(%rsi), %rax
	movl	4(%rax), %r14d
	addl	(%rax), %r14d
	addl	8(%rax), %r14d
	movq	_VCE@GOTPCREL(%rip), %r15
	movl	(%r15), %ebx
	movq	_mmVCE_MMSCH_VF_CTX_ADDR_LO@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	callq	_lower_32_bits
	movl	%ebx, %edi
	xorl	%esi, %esi
	movl	%r13d, %edx
	movl	%eax, %ecx
	callq	_WREG32_SOC15
	movl	(%r15), %ebx
	movq	_mmVCE_MMSCH_VF_CTX_ADDR_HI@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_upper_32_bits
	movl	%ebx, %edi
	xorl	%esi, %esi
	movl	%r13d, %edx
	movl	%eax, %ecx
	callq	_WREG32_SOC15
	movl	(%r15), %edi
	movq	_mmVCE_MMSCH_VF_VMID@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	xorl	%esi, %esi
	callq	_RREG32_SOC15
	movq	_VCE_MMSCH_VF_VMID__VF_CTX_VMID_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%eax, %ecx
	movl	(%r15), %edi
	movl	(%rbx), %edx
	xorl	%esi, %esi
	callq	_WREG32_SOC15
	movl	(%r15), %edi
	movq	_mmVCE_MMSCH_VF_CTX_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	movl	%r14d, %ecx
	callq	_WREG32_SOC15
	movl	(%r15), %edi
	movq	_mmVCE_MMSCH_VF_MAILBOX_RESP@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	xorl	%esi, %esi
	xorl	%ecx, %ecx
	callq	_WREG32_SOC15
	movl	8(%r12), %eax
	testl	%eax, %eax
	jle	LBB0_5
## %bb.1:
	xorl	%ebx, %ebx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	movslq	%eax, %rcx
	cmpq	%rcx, %rbx
	jge	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	12(%r12), %ecx
	btl	%ebx, %ecx
	jb	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	16(%r12), %rax
	movq	(%rax,%rbx,8), %rax
	movl	24(%rax), %edi
	xorl	%esi, %esi
	callq	_WDOORBELL32
	movq	16(%r12), %rax
	movq	24(%r12), %rcx
	movq	(%rax,%rbx,8), %rax
	movq	(%rax), %rdx
	movq	$0, (%rcx,%rdx,8)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 8(%rax)
	movl	8(%r12), %eax
	jmp	LBB0_4
LBB0_5:
	movl	(%r15), %edi
	movq	_mmVCE_MMSCH_VF_MAILBOX_HOST@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	movl	$268435457, %ecx                ## imm = 0x10000001
	callq	_WREG32_SOC15
	movl	(%r15), %edi
	movl	(%r14), %edx
	xorl	%esi, %esi
	callq	_RREG32_SOC15
	movl	$-1000, %ebx                    ## imm = 0xFC18
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	%eax, %ecx
	notl	%ecx
	testl	$268435458, %ecx                ## imm = 0x10000002
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	$10, %edi
	callq	_udelay
	movl	(%r15), %edi
	movl	(%r14), %edx
	xorl	%esi, %esi
	callq	_RREG32_SOC15
	incl	%ebx
	jne	LBB0_6
	jmp	LBB0_9
LBB0_8:
	xorl	%ecx, %ecx
	testl	%ebx, %ebx
	jne	LBB0_10
LBB0_9:
	movl	(%r12), %edi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_err
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
LBB0_10:
	movl	%ecx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VCE,4,2                        ## @VCE
	.comm	_mmVCE_MMSCH_VF_CTX_ADDR_LO,4,2 ## @mmVCE_MMSCH_VF_CTX_ADDR_LO
	.comm	_mmVCE_MMSCH_VF_CTX_ADDR_HI,4,2 ## @mmVCE_MMSCH_VF_CTX_ADDR_HI
	.comm	_mmVCE_MMSCH_VF_VMID,4,2        ## @mmVCE_MMSCH_VF_VMID
	.comm	_VCE_MMSCH_VF_VMID__VF_CTX_VMID_MASK,4,2 ## @VCE_MMSCH_VF_VMID__VF_CTX_VMID_MASK
	.comm	_VCE_MMSCH_VF_VMID__VF_CTX_VMID__SHIFT,4,2 ## @VCE_MMSCH_VF_VMID__VF_CTX_VMID__SHIFT
	.comm	_mmVCE_MMSCH_VF_CTX_SIZE,4,2    ## @mmVCE_MMSCH_VF_CTX_SIZE
	.comm	_mmVCE_MMSCH_VF_MAILBOX_RESP,4,2 ## @mmVCE_MMSCH_VF_MAILBOX_RESP
	.comm	_mmVCE_MMSCH_VF_MAILBOX_HOST,4,2 ## @mmVCE_MMSCH_VF_MAILBOX_HOST
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to init MMSCH, mmVCE_MMSCH_VF_MAILBOX_RESP = %x\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
	.no_dead_strip	_uvd_v7_0_mmsch_start
.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_mmsch_start
_uvd_v7_0_mmsch_start:                  ; @uvd_v7_0_mmsch_start
	.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	x19, x0
	ldr	w21, [x1, #8]
	ldr	x8, [x1]
	ldp	w9, w10, [x8]
	ldr	w8, [x8, #8]
	add	w9, w10, w9
	add	w20, w9, w8
Lloh0:
	adrp	x24, _VCE@GOTPAGE
Lloh1:
	ldr	x24, [x24, _VCE@GOTPAGEOFF]
	ldr	w22, [x24]
Lloh2:
	adrp	x8, _mmVCE_MMSCH_VF_CTX_ADDR_LO@GOTPAGE
Lloh3:
	ldr	x8, [x8, _mmVCE_MMSCH_VF_CTX_ADDR_LO@GOTPAGEOFF]
Lloh4:
	ldr	w23, [x8]
	mov	x0, x21
	bl	_lower_32_bits
	mov	x3, x0
	mov	x0, x22
	mov	w1, #0
	mov	x2, x23
	bl	_WREG32_SOC15
	ldr	w22, [x24]
Lloh5:
	adrp	x8, _mmVCE_MMSCH_VF_CTX_ADDR_HI@GOTPAGE
Lloh6:
	ldr	x8, [x8, _mmVCE_MMSCH_VF_CTX_ADDR_HI@GOTPAGEOFF]
Lloh7:
	ldr	w23, [x8]
	mov	x0, x21
	bl	_upper_32_bits
	mov	x3, x0
	mov	x0, x22
	mov	w1, #0
	mov	x2, x23
	bl	_WREG32_SOC15
	ldr	w0, [x24]
Lloh8:
	adrp	x21, _mmVCE_MMSCH_VF_VMID@GOTPAGE
Lloh9:
	ldr	x21, [x21, _mmVCE_MMSCH_VF_VMID@GOTPAGEOFF]
	ldr	w2, [x21]
	mov	w1, #0
	bl	_RREG32_SOC15
Lloh10:
	adrp	x8, _VCE_MMSCH_VF_VMID__VF_CTX_VMID_MASK@GOTPAGE
Lloh11:
	ldr	x8, [x8, _VCE_MMSCH_VF_VMID__VF_CTX_VMID_MASK@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	bic	w3, w0, w8
	ldr	w0, [x24]
	ldr	w2, [x21]
	mov	w1, #0
	bl	_WREG32_SOC15
	ldr	w0, [x24]
Lloh13:
	adrp	x8, _mmVCE_MMSCH_VF_CTX_SIZE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _mmVCE_MMSCH_VF_CTX_SIZE@GOTPAGEOFF]
Lloh15:
	ldr	w2, [x8]
	mov	w1, #0
	mov	x3, x20
	bl	_WREG32_SOC15
	ldr	w0, [x24]
Lloh16:
	adrp	x20, _mmVCE_MMSCH_VF_MAILBOX_RESP@GOTPAGE
Lloh17:
	ldr	x20, [x20, _mmVCE_MMSCH_VF_MAILBOX_RESP@GOTPAGEOFF]
	ldr	w2, [x20]
	mov	w1, #0
	mov	w3, #0
	bl	_WREG32_SOC15
	ldr	w8, [x19, #8]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.1:
	mov	x21, #0
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x21, x21, #1
	cmp	x21, w8, sxtw
	b.ge	LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w9, [x19, #12]
	lsr	w9, w9, w21
	tbnz	w9, #0, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x19, #16]
	lsl	x22, x21, #3
	ldr	x8, [x8, x22]
	ldr	w0, [x8, #24]
	mov	w1, #0
	bl	_WDOORBELL32
	ldp	x9, x8, [x19, #16]
	ldr	x9, [x9, x22]
	ldr	x10, [x9]
	str	xzr, [x8, x10, lsl #3]
	stp	xzr, xzr, [x9, #8]
	ldr	w8, [x19, #8]
	b	LBB0_2
LBB0_5:
	mov	w21, #2
	movk	w21, #4096, lsl #16
	ldr	w0, [x24]
Lloh18:
	adrp	x8, _mmVCE_MMSCH_VF_MAILBOX_HOST@GOTPAGE
Lloh19:
	ldr	x8, [x8, _mmVCE_MMSCH_VF_MAILBOX_HOST@GOTPAGEOFF]
Lloh20:
	ldr	w2, [x8]
	sub	w3, w21, #1
	mov	w1, #0
	bl	_WREG32_SOC15
	ldr	w0, [x24]
	ldr	w2, [x20]
	mov	w1, #0
	bl	_RREG32_SOC15
	mov	x2, x0
	mov	w22, #-1000
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	bics	wzr, w21, w2
	b.eq	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	w0, #10
	bl	_udelay
	ldr	w0, [x24]
	ldr	w2, [x20]
	mov	w1, #0
	bl	_RREG32_SOC15
	mov	x2, x0
	adds	w22, w22, #1
	b.lo	LBB0_6
	b	LBB0_10
LBB0_8:
	cbz	w22, LBB0_10
; %bb.9:
	mov	w0, #0
	b	LBB0_11
LBB0_10:
	ldr	w0, [x19]
Lloh21:
	adrp	x1, l_.str@PAGE
Lloh22:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh23:
	adrp	x8, _EBUSY@GOTPAGE
Lloh24:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh25:
	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 AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_VCE,4,2                        ; @VCE
	.comm	_mmVCE_MMSCH_VF_CTX_ADDR_LO,4,2 ; @mmVCE_MMSCH_VF_CTX_ADDR_LO
	.comm	_mmVCE_MMSCH_VF_CTX_ADDR_HI,4,2 ; @mmVCE_MMSCH_VF_CTX_ADDR_HI
	.comm	_mmVCE_MMSCH_VF_VMID,4,2        ; @mmVCE_MMSCH_VF_VMID
	.comm	_VCE_MMSCH_VF_VMID__VF_CTX_VMID_MASK,4,2 ; @VCE_MMSCH_VF_VMID__VF_CTX_VMID_MASK
	.comm	_VCE_MMSCH_VF_VMID__VF_CTX_VMID__SHIFT,4,2 ; @VCE_MMSCH_VF_VMID__VF_CTX_VMID__SHIFT
	.comm	_mmVCE_MMSCH_VF_CTX_SIZE,4,2    ; @mmVCE_MMSCH_VF_CTX_SIZE
	.comm	_mmVCE_MMSCH_VF_MAILBOX_RESP,4,2 ; @mmVCE_MMSCH_VF_MAILBOX_RESP
	.comm	_mmVCE_MMSCH_VF_MAILBOX_HOST,4,2 ; @mmVCE_MMSCH_VF_MAILBOX_HOST
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to init MMSCH, mmVCE_MMSCH_VF_MAILBOX_RESP = %x\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
	.no_dead_strip	_uvd_v7_0_mmsch_start
.subsections_via_symbols
