	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_gfx_rlc_init_sr         ## -- Begin function amdgpu_gfx_rlc_init_sr
	.p2align	4, 0x90
_amdgpu_gfx_rlc_init_sr:                ## @amdgpu_gfx_rlc_init_sr
	.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
	shll	$2, %esi
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_AMDGPU_GEM_DOMAIN_VRAM@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	20(%rdi), %r14
	leaq	24(%rdi), %r9
	movq	%rdi, (%rsp)
	movq	%r14, %r8
	callq	_amdgpu_bo_create_reserved
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %r15d
	movl	32(%r12), %edi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_warn
	movq	%r12, %rdi
	callq	_amdgpu_gfx_rlc_fini
	jmp	LBB0_6
LBB0_2:
	cmpl	$0, 16(%r12)
	jle	LBB0_5
## %bb.3:
	movq	(%r12), %r15
	movq	8(%r12), %r13
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13,%rbx,4), %edi
	callq	_cpu_to_le32
	movl	%eax, (%r15,%rbx,4)
	incq	%rbx
	movslq	16(%r12), %rax
	cmpq	%rax, %rbx
	jl	LBB0_4
LBB0_5:
	movl	(%r14), %edi
	callq	_amdgpu_bo_kunmap
	movl	(%r14), %edi
	callq	_amdgpu_bo_unreserve
	xorl	%r15d, %r15d
LBB0_6:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.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 sr bo failed\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_gfx_rlc_init_sr         ; -- Begin function amdgpu_gfx_rlc_init_sr
	.p2align	2
_amdgpu_gfx_rlc_init_sr:                ; @amdgpu_gfx_rlc_init_sr
	.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
	lsl	w1, w1, #2
Lloh0:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
Lloh3:
	adrp	x8, _AMDGPU_GEM_DOMAIN_VRAM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AMDGPU_GEM_DOMAIN_VRAM@GOTPAGEOFF]
Lloh5:
	ldr	w3, [x8]
	add	x20, x0, #20
	add	x5, x0, #24
	mov	x4, x20
	mov	x6, x0
	bl	_amdgpu_bo_create_reserved
	cbz	w0, LBB0_2
; %bb.1:
	mov	x21, x0
	ldr	w0, [x19, #32]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	bl	_dev_warn
	mov	x0, x19
	bl	_amdgpu_gfx_rlc_fini
	b	LBB0_6
LBB0_2:
	ldr	w8, [x19, #16]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.3:
	mov	x21, #0
	ldp	x23, x22, [x19]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	lsl	x24, x21, #2
	ldr	w0, [x22, x24]
	bl	_cpu_to_le32
	str	w0, [x23, x24]
	add	x21, x21, #1
	ldrsw	x8, [x19, #16]
	cmp	x21, x8
	b.lt	LBB0_4
LBB0_5:
	ldr	w0, [x20]
	bl	_amdgpu_bo_kunmap
	ldr	w0, [x20]
	bl	_amdgpu_bo_unreserve
	mov	w21, #0
LBB0_6:
	mov	x0, x21
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.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 sr bo failed\n"

.subsections_via_symbols
