	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gfx_v6_0_rlc_init
_gfx_v6_0_rlc_init:                     ## @gfx_v6_0_rlc_init
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	_verde_rlc_save_restore_register_list@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	%rcx, (%rdi)
	movq	(%rax), %rdi
	callq	_ARRAY_SIZE
	movl	%eax, 8(%rbx)
	movq	_si_cs_data@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r15
	movq	%r15, 40(%rbx)
	cmpq	$0, (%rbx)
	je	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_amdgpu_gfx_rlc_init_sr
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_6
LBB0_2:
	xorl	%r14d, %r14d
	testq	%r15, %r15
	je	LBB0_6
## %bb.3:
	movq	%rbx, %rdi
	callq	_gfx_v6_0_get_csb_size
                                        ## kill: def $eax killed $eax def $rax
	movl	%eax, 12(%rbx)
	leal	256(,%rax,4), %esi
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_AMDGPU_GEM_DOMAIN_VRAM@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	24(%rbx), %r8
	leaq	32(%rbx), %r9
	leaq	16(%rbx), %rax
	movq	%rax, (%rsp)
	movq	%rbx, %rdi
	callq	_amdgpu_bo_create_reserved
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	%eax, %r15d
	movl	48(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_warn
	movq	%rbx, %rdi
	callq	_amdgpu_gfx_rlc_fini
	movl	%r15d, %r14d
	jmp	LBB0_6
LBB0_5:
	movq	16(%rbx), %r15
	movl	$256, %r12d                     ## imm = 0x100
	addq	32(%rbx), %r12
	movq	%r12, %rdi
	callq	_upper_32_bits
	movl	%eax, %edi
	callq	_cpu_to_le32
	movl	%eax, (%r15)
	movq	%r12, %rdi
	callq	_lower_32_bits
	movl	%eax, %edi
	callq	_cpu_to_le32
	movl	%eax, 4(%r15)
	movl	12(%rbx), %edi
	callq	_cpu_to_le32
	movl	%eax, 8(%r15)
	addq	$256, %r15                      ## imm = 0x100
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_gfx_v6_0_get_csb_buffer
	movl	24(%rbx), %edi
	callq	_amdgpu_bo_kunmap
	movl	24(%rbx), %edi
	callq	_amdgpu_bo_unreserve
LBB0_6:
	movl	%r14d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_verde_rlc_save_restore_register_list,8,3 ## @verde_rlc_save_restore_register_list
	.comm	_si_cs_data,8,3                 ## @si_cs_data
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_AMDGPU_GEM_DOMAIN_VRAM,4,2     ## @AMDGPU_GEM_DOMAIN_VRAM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"(%d) create RLC c bo failed\n"

	.no_dead_strip	_gfx_v6_0_rlc_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gfx_v6_0_rlc_init
_gfx_v6_0_rlc_init:                     ; @gfx_v6_0_rlc_init
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _verde_rlc_save_restore_register_list@GOTPAGE
Lloh1:
	ldr	x8, [x8, _verde_rlc_save_restore_register_list@GOTPAGEOFF]
	ldr	x9, [x8]
	str	x9, [x0]
	ldr	x0, [x8]
	bl	_ARRAY_SIZE
	mov	x1, x0
	str	w1, [x19, #8]
Lloh2:
	adrp	x8, _si_cs_data@GOTPAGE
Lloh3:
	ldr	x8, [x8, _si_cs_data@GOTPAGEOFF]
Lloh4:
	ldr	x21, [x8]
	str	x21, [x19, #40]
	ldr	x8, [x19]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, x19
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_amdgpu_gfx_rlc_init_sr
	mov	x20, x0
	cbnz	w0, LBB0_7
LBB0_2:
	cbz	x21, LBB0_6
; %bb.3:
	mov	x0, x19
	bl	_gfx_v6_0_get_csb_size
	str	w0, [x19, #12]
	lsl	w8, w0, #2
	add	w1, w8, #256
Lloh5:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
Lloh8:
	adrp	x8, _AMDGPU_GEM_DOMAIN_VRAM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _AMDGPU_GEM_DOMAIN_VRAM@GOTPAGEOFF]
Lloh10:
	ldr	w3, [x8]
	add	x4, x19, #24
	add	x5, x19, #32
	add	x6, x19, #16
	mov	x0, x19
	bl	_amdgpu_bo_create_reserved
	cbz	w0, LBB0_5
; %bb.4:
	mov	x20, x0
	ldr	w0, [x19, #48]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_dev_warn
	mov	x0, x19
	bl	_amdgpu_gfx_rlc_fini
	b	LBB0_7
LBB0_5:
	ldr	x21, [x19, #16]
	ldr	x8, [x19, #32]
	add	x20, x8, #256
	mov	x0, x20
	bl	_upper_32_bits
	bl	_cpu_to_le32
	str	w0, [x21]
	mov	x0, x20
	bl	_lower_32_bits
	bl	_cpu_to_le32
	str	w0, [x21, #4]
	ldr	w0, [x19, #12]
	bl	_cpu_to_le32
	str	w0, [x21, #8]
	add	x1, x21, #256
	mov	x0, x19
	bl	_gfx_v6_0_get_csb_buffer
	ldr	w0, [x19, #24]
	bl	_amdgpu_bo_kunmap
	ldr	w0, [x19, #24]
	bl	_amdgpu_bo_unreserve
LBB0_6:
	mov	w20, #0
LBB0_7:
	mov	x0, x20
	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 AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_verde_rlc_save_restore_register_list,8,3 ; @verde_rlc_save_restore_register_list
	.comm	_si_cs_data,8,3                 ; @si_cs_data
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_AMDGPU_GEM_DOMAIN_VRAM,4,2     ; @AMDGPU_GEM_DOMAIN_VRAM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"(%d) create RLC c bo failed\n"

	.no_dead_strip	_gfx_v6_0_rlc_init
.subsections_via_symbols
