	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gfx_v10_0_rlc_backdoor_autoload_enable
_gfx_v10_0_rlc_backdoor_autoload_enable: ## @gfx_v10_0_rlc_backdoor_autoload_enable
	.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, %rbx
	callq	_gfx_v10_0_rlc_backdoor_autoload_copy_toc_ucode
	movq	%rbx, %rdi
	callq	_gfx_v10_0_rlc_backdoor_autoload_copy_sdma_ucode
	movq	%rbx, %rdi
	callq	_gfx_v10_0_rlc_backdoor_autoload_copy_gfx_ucode
	movq	_rlc_autoload_info@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_FIRMWARE_ID_RLC_G_UCODE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	4(%rax,%rcx,8), %edx
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movl	(%rbx), %ebx
	addl	(%rax,%rcx,8), %ebx
	movq	_GC@GOTPCREL(%rip), %r14
	movl	(%r14), %r12d
	movq	_mmRLC_HYP_BOOTLOAD_ADDR_HI@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movl	%ebx, %edi
	callq	_upper_32_bits
	xorl	%r15d, %r15d
	movl	%r12d, %edi
	xorl	%esi, %esi
	movl	%r13d, %edx
	movl	%eax, %ecx
	callq	_WREG32_SOC15
	movl	(%r14), %r12d
	movq	_mmRLC_HYP_BOOTLOAD_ADDR_LO@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movl	%ebx, %edi
	callq	_lower_32_bits
	movl	%r12d, %edi
	xorl	%esi, %esi
	movl	%r13d, %edx
	movl	%eax, %ecx
	callq	_WREG32_SOC15
	movl	(%r14), %edi
	movq	_mmRLC_HYP_BOOTLOAD_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	callq	_WREG32_SOC15
	movl	(%r14), %edi
	movq	_mmRLC_HYP_RESET_VECTOR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	callq	_RREG32_SOC15
	movq	_RLC_HYP_RESET_VECTOR__COLD_BOOT_EXIT_MASK@GOTPCREL(%rip), %rcx
	movq	_RLC_HYP_RESET_VECTOR__VDDGFX_EXIT_MASK@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	testl	%eax, %edx
	je	LBB0_1
## %bb.2:
	movl	(%r14), %edi
	movq	_mmRLC_CNTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	callq	_RREG32_SOC15
	movq	_RLC_CNTL__RLC_ENABLE_F32_MASK@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_5
## %bb.3:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_4
LBB0_1:
	leaq	L_.str(%rip), %rdi
LBB0_4:
	callq	_DRM_ERROR
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_5:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_rlc_autoload_info,8,3          ## @rlc_autoload_info
	.comm	_FIRMWARE_ID_RLC_G_UCODE,8,3    ## @FIRMWARE_ID_RLC_G_UCODE
	.comm	_GC,4,2                         ## @GC
	.comm	_mmRLC_HYP_BOOTLOAD_ADDR_HI,4,2 ## @mmRLC_HYP_BOOTLOAD_ADDR_HI
	.comm	_mmRLC_HYP_BOOTLOAD_ADDR_LO,4,2 ## @mmRLC_HYP_BOOTLOAD_ADDR_LO
	.comm	_mmRLC_HYP_BOOTLOAD_SIZE,4,2    ## @mmRLC_HYP_BOOTLOAD_SIZE
	.comm	_mmRLC_HYP_RESET_VECTOR,4,2     ## @mmRLC_HYP_RESET_VECTOR
	.comm	_RLC_HYP_RESET_VECTOR__COLD_BOOT_EXIT_MASK,4,2 ## @RLC_HYP_RESET_VECTOR__COLD_BOOT_EXIT_MASK
	.comm	_RLC_HYP_RESET_VECTOR__VDDGFX_EXIT_MASK,4,2 ## @RLC_HYP_RESET_VECTOR__VDDGFX_EXIT_MASK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Neither COLD_BOOT_EXIT nor VDDGFX_EXIT is set\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_mmRLC_CNTL,4,2                 ## @mmRLC_CNTL
	.comm	_RLC_CNTL__RLC_ENABLE_F32_MASK,4,2 ## @RLC_CNTL__RLC_ENABLE_F32_MASK
L_.str.1:                               ## @.str.1
	.asciz	"RLC ROM should halt itself\n"

	.no_dead_strip	_gfx_v10_0_rlc_backdoor_autoload_enable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gfx_v10_0_rlc_backdoor_autoload_enable
_gfx_v10_0_rlc_backdoor_autoload_enable: ; @gfx_v10_0_rlc_backdoor_autoload_enable
	.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
	bl	_gfx_v10_0_rlc_backdoor_autoload_copy_toc_ucode
	mov	x0, x19
	bl	_gfx_v10_0_rlc_backdoor_autoload_copy_sdma_ucode
	mov	x0, x19
	bl	_gfx_v10_0_rlc_backdoor_autoload_copy_gfx_ucode
Lloh0:
	adrp	x8, _rlc_autoload_info@GOTPAGE
Lloh1:
	ldr	x8, [x8, _rlc_autoload_info@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _FIRMWARE_ID_RLC_G_UCODE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _FIRMWARE_ID_RLC_G_UCODE@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	add	x8, x8, x9, lsl #3
	ldp	w9, w20, [x8]
	ldr	w8, [x19]
	add	w19, w8, w9
Lloh6:
	adrp	x23, _GC@GOTPAGE
Lloh7:
	ldr	x23, [x23, _GC@GOTPAGEOFF]
	ldr	w21, [x23]
Lloh8:
	adrp	x8, _mmRLC_HYP_BOOTLOAD_ADDR_HI@GOTPAGE
Lloh9:
	ldr	x8, [x8, _mmRLC_HYP_BOOTLOAD_ADDR_HI@GOTPAGEOFF]
Lloh10:
	ldr	w22, [x8]
	mov	x0, x19
	bl	_upper_32_bits
	mov	x3, x0
	mov	x0, x21
	mov	w1, #0
	mov	x2, x22
	bl	_WREG32_SOC15
	ldr	w21, [x23]
Lloh11:
	adrp	x8, _mmRLC_HYP_BOOTLOAD_ADDR_LO@GOTPAGE
Lloh12:
	ldr	x8, [x8, _mmRLC_HYP_BOOTLOAD_ADDR_LO@GOTPAGEOFF]
Lloh13:
	ldr	w22, [x8]
	mov	x0, x19
	bl	_lower_32_bits
	mov	x3, x0
	mov	x0, x21
	mov	w1, #0
	mov	x2, x22
	bl	_WREG32_SOC15
	ldr	w0, [x23]
Lloh14:
	adrp	x8, _mmRLC_HYP_BOOTLOAD_SIZE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _mmRLC_HYP_BOOTLOAD_SIZE@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	mov	w1, #0
	mov	x3, x20
	bl	_WREG32_SOC15
	ldr	w0, [x23]
Lloh17:
	adrp	x8, _mmRLC_HYP_RESET_VECTOR@GOTPAGE
Lloh18:
	ldr	x8, [x8, _mmRLC_HYP_RESET_VECTOR@GOTPAGEOFF]
Lloh19:
	ldr	w2, [x8]
	mov	w1, #0
	bl	_RREG32_SOC15
Lloh20:
	adrp	x8, _RLC_HYP_RESET_VECTOR__COLD_BOOT_EXIT_MASK@GOTPAGE
Lloh21:
	ldr	x8, [x8, _RLC_HYP_RESET_VECTOR__COLD_BOOT_EXIT_MASK@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
Lloh23:
	adrp	x9, _RLC_HYP_RESET_VECTOR__VDDGFX_EXIT_MASK@GOTPAGE
Lloh24:
	ldr	x9, [x9, _RLC_HYP_RESET_VECTOR__VDDGFX_EXIT_MASK@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	orr	w8, w9, w8
	tst	w8, w0
	b.eq	LBB0_3
; %bb.1:
	ldr	w0, [x23]
Lloh26:
	adrp	x8, _mmRLC_CNTL@GOTPAGE
Lloh27:
	ldr	x8, [x8, _mmRLC_CNTL@GOTPAGEOFF]
Lloh28:
	ldr	w2, [x8]
	mov	w1, #0
	bl	_RREG32_SOC15
Lloh29:
	adrp	x8, _RLC_CNTL__RLC_ENABLE_F32_MASK@GOTPAGE
Lloh30:
	ldr	x8, [x8, _RLC_CNTL__RLC_ENABLE_F32_MASK@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_5
; %bb.2:
Lloh32:
	adrp	x0, l_.str.1@PAGE
Lloh33:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_4
LBB0_3:
Lloh34:
	adrp	x0, l_.str@PAGE
Lloh35:
	add	x0, x0, l_.str@PAGEOFF
LBB0_4:
	bl	_DRM_ERROR
Lloh36:
	adrp	x8, _EINVAL@GOTPAGE
Lloh37:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh38:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
LBB0_5:
	mov	w0, #0
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	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.cfi_endproc
                                        ; -- End function
	.comm	_rlc_autoload_info,8,3          ; @rlc_autoload_info
	.comm	_FIRMWARE_ID_RLC_G_UCODE,8,3    ; @FIRMWARE_ID_RLC_G_UCODE
	.comm	_GC,4,2                         ; @GC
	.comm	_mmRLC_HYP_BOOTLOAD_ADDR_HI,4,2 ; @mmRLC_HYP_BOOTLOAD_ADDR_HI
	.comm	_mmRLC_HYP_BOOTLOAD_ADDR_LO,4,2 ; @mmRLC_HYP_BOOTLOAD_ADDR_LO
	.comm	_mmRLC_HYP_BOOTLOAD_SIZE,4,2    ; @mmRLC_HYP_BOOTLOAD_SIZE
	.comm	_mmRLC_HYP_RESET_VECTOR,4,2     ; @mmRLC_HYP_RESET_VECTOR
	.comm	_RLC_HYP_RESET_VECTOR__COLD_BOOT_EXIT_MASK,4,2 ; @RLC_HYP_RESET_VECTOR__COLD_BOOT_EXIT_MASK
	.comm	_RLC_HYP_RESET_VECTOR__VDDGFX_EXIT_MASK,4,2 ; @RLC_HYP_RESET_VECTOR__VDDGFX_EXIT_MASK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Neither COLD_BOOT_EXIT nor VDDGFX_EXIT is set\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_mmRLC_CNTL,4,2                 ; @mmRLC_CNTL
	.comm	_RLC_CNTL__RLC_ENABLE_F32_MASK,4,2 ; @RLC_CNTL__RLC_ENABLE_F32_MASK
l_.str.1:                               ; @.str.1
	.asciz	"RLC ROM should halt itself\n"

	.no_dead_strip	_gfx_v10_0_rlc_backdoor_autoload_enable
.subsections_via_symbols
