	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vce_v4_0_mmsch_start
_vce_v4_0_mmsch_start:                  ## @vce_v4_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, %r14
	movl	8(%rsi), %r15d
	movq	(%rsi), %rax
	movl	4(%rax), %r12d
	addl	(%rax), %r12d
	addl	8(%rax), %r12d
	movq	_VCE@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	movq	_mmVCE_MMSCH_VF_CTX_ADDR_LO@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	callq	_SOC15_REG_OFFSET
	movl	%eax, %ebx
	movl	%r15d, %edi
	callq	_lower_32_bits
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_WREG32
	movl	(%r13), %edi
	movq	_mmVCE_MMSCH_VF_CTX_ADDR_HI@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	callq	_SOC15_REG_OFFSET
	movl	%eax, %ebx
	movl	%r15d, %edi
	callq	_upper_32_bits
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_WREG32
	movl	(%r13), %edi
	movq	_mmVCE_MMSCH_VF_VMID@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	xorl	%esi, %esi
	callq	_SOC15_REG_OFFSET
	movl	%eax, %edi
	callq	_RREG32
	movq	_VCE_MMSCH_VF_VMID__VF_CTX_VMID_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	notl	%ebx
	andl	%eax, %ebx
	movl	(%r13), %edi
	movl	(%r15), %edx
	xorl	%esi, %esi
	callq	_SOC15_REG_OFFSET
	movl	%eax, %edi
	movl	%ebx, %esi
	callq	_WREG32
	movl	(%r13), %edi
	movq	_mmVCE_MMSCH_VF_CTX_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	callq	_SOC15_REG_OFFSET
	movl	%eax, %edi
	movl	%r12d, %esi
	callq	_WREG32
	movl	(%r13), %edi
	movq	_mmVCE_MMSCH_VF_MAILBOX_RESP@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	xorl	%esi, %esi
	callq	_SOC15_REG_OFFSET
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_WREG32
	movq	8(%r14), %rax
	movl	24(%rax), %edi
	xorl	%esi, %esi
	callq	_WDOORBELL32
	movq	8(%r14), %rax
	movq	16(%r14), %rcx
	movq	(%rax), %rdx
	movq	$0, (%rcx,%rdx,8)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 8(%rax)
	movl	(%r13), %edi
	movq	_mmVCE_MMSCH_VF_MAILBOX_HOST@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	callq	_SOC15_REG_OFFSET
	movl	%eax, %edi
	movl	$268435457, %esi                ## imm = 0x10000001
	callq	_WREG32
	movl	(%r13), %edi
	movl	(%r15), %edx
	xorl	%esi, %esi
	callq	_SOC15_REG_OFFSET
	movl	%eax, %edi
	callq	_RREG32
	movl	$-1000, %ebx                    ## imm = 0xFC18
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	%eax, %ecx
	notl	%ecx
	testl	$268435458, %ecx                ## imm = 0x10000002
	je	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$10, %edi
	callq	_udelay
	movl	(%r13), %edi
	movl	(%r15), %edx
	xorl	%esi, %esi
	callq	_SOC15_REG_OFFSET
	movl	%eax, %edi
	callq	_RREG32
	incl	%ebx
	jne	LBB0_1
	jmp	LBB0_4
LBB0_3:
	xorl	%ecx, %ecx
	testl	%ebx, %ebx
	jne	LBB0_5
LBB0_4:
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_err
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
LBB0_5:
	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	_vce_v4_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 vce_v4_0_mmsch_start
_vce_v4_0_mmsch_start:                  ; @vce_v4_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
	mov	w23, #2
	movk	w23, #4096, lsl #16
	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	w0, [x24]
Lloh2:
	adrp	x8, _mmVCE_MMSCH_VF_CTX_ADDR_LO@GOTPAGE
Lloh3:
	ldr	x8, [x8, _mmVCE_MMSCH_VF_CTX_ADDR_LO@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	mov	w1, #0
	bl	_SOC15_REG_OFFSET
	mov	x22, x0
	mov	x0, x21
	bl	_lower_32_bits
	mov	x1, x0
	mov	x0, x22
	bl	_WREG32
	ldr	w0, [x24]
Lloh5:
	adrp	x8, _mmVCE_MMSCH_VF_CTX_ADDR_HI@GOTPAGE
Lloh6:
	ldr	x8, [x8, _mmVCE_MMSCH_VF_CTX_ADDR_HI@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	mov	w1, #0
	bl	_SOC15_REG_OFFSET
	mov	x22, x0
	mov	x0, x21
	bl	_upper_32_bits
	mov	x1, x0
	mov	x0, x22
	bl	_WREG32
	ldr	w0, [x24]
Lloh8:
	adrp	x22, _mmVCE_MMSCH_VF_VMID@GOTPAGE
Lloh9:
	ldr	x22, [x22, _mmVCE_MMSCH_VF_VMID@GOTPAGEOFF]
	ldr	w2, [x22]
	mov	w1, #0
	bl	_SOC15_REG_OFFSET
	bl	_RREG32
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	w21, w0, w8
	ldr	w0, [x24]
	ldr	w2, [x22]
	mov	w1, #0
	bl	_SOC15_REG_OFFSET
	mov	x1, x21
	bl	_WREG32
	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
	bl	_SOC15_REG_OFFSET
	mov	x1, x20
	bl	_WREG32
	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
	bl	_SOC15_REG_OFFSET
	mov	w1, #0
	bl	_WREG32
	ldr	x8, [x19, #8]
	ldr	w0, [x8, #24]
	mov	w1, #0
	bl	_WDOORBELL32
	ldp	x9, x8, [x19, #8]
	ldr	x10, [x9]
	str	xzr, [x8, x10, lsl #3]
	stp	xzr, xzr, [x9, #8]
	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]
	mov	w1, #0
	bl	_SOC15_REG_OFFSET
	sub	w1, w23, #1
	bl	_WREG32
	ldr	w0, [x24]
	ldr	w2, [x20]
	mov	w1, #0
	bl	_SOC15_REG_OFFSET
	bl	_RREG32
	mov	x2, x0
	mov	w21, #-1000
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	bics	wzr, w23, w2
	b.eq	LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w0, #10
	bl	_udelay
	ldr	w0, [x24]
	ldr	w2, [x20]
	mov	w1, #0
	bl	_SOC15_REG_OFFSET
	bl	_RREG32
	mov	x2, x0
	adds	w21, w21, #1
	b.lo	LBB0_1
	b	LBB0_5
LBB0_3:
	cbz	w21, LBB0_5
; %bb.4:
	mov	w0, #0
	b	LBB0_6
LBB0_5:
	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_6:
	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 AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.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	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	_vce_v4_0_mmsch_start
.subsections_via_symbols
