	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gfx_v10_0_parse_rlc_toc
_gfx_v10_0_parse_rlc_toc:               ## @gfx_v10_0_parse_rlc_toc
	.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
	movl	16(%rdi), %esi
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_AMDGPU_GEM_DOMAIN_GTT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	12(%rdi), %r8
	leaq	8(%rdi), %r9
	movq	%rdi, (%rsp)
	callq	_amdgpu_bo_create_reserved
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	24(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	movl	%eax, %ebx
	callq	_dev_err
	movl	%ebx, %eax
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	(%rbx), %rdi
	movl	20(%rbx), %esi
	movl	16(%rbx), %edx
	callq	_memcpy
	movq	(%rbx), %rbx
	xorl	%eax, %eax
	testq	%rbx, %rbx
	je	LBB0_12
## %bb.3:
	movq	(%rbx), %rcx
	movq	_FIRMWARE_ID_INVALID@GOTPCREL(%rip), %r13
	cmpq	(%r13), %rcx
	jbe	LBB0_12
## %bb.4:
	movq	_FIRMWARE_ID_MAX@GOTPCREL(%rip), %r15
	cmpq	(%r15), %rcx
	jae	LBB0_12
## %bb.5:
	addq	$16, %rbx
	movq	_FIRMWARE_ID_CP_CE@GOTPCREL(%rip), %r12
	movq	_rlc_autoload_info@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	-8(%rbx), %eax
	cmpq	(%r12), %rcx
	jb	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	_FIRMWARE_ID_CP_MES@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	ja	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	shll	$2, %eax
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	callq	_ALIGN
	movl	%eax, -8(%rbx)
	movq	-16(%rbx), %rcx
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=1
	movq	(%r14), %rdx
	movq	%rcx, %rsi
	shlq	$4, %rsi
	movq	%rcx, (%rdx,%rsi)
	shll	$2, %eax
	movl	%eax, 8(%rdx,%rsi)
	movl	-4(%rbx), %eax
	shll	$2, %eax
	movl	%eax, 12(%rdx,%rsi)
	movq	(%rbx), %rcx
	cmpq	(%r13), %rcx
	jbe	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_6 Depth=1
	addq	$16, %rbx
	cmpq	(%r15), %rcx
	jb	LBB0_6
LBB0_11:
	xorl	%eax, %eax
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_AMDGPU_GEM_DOMAIN_GTT,4,2      ## @AMDGPU_GEM_DOMAIN_GTT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"(%d) failed to create rlc toc bo\n"

	.comm	_FIRMWARE_ID_INVALID,8,3        ## @FIRMWARE_ID_INVALID
	.comm	_FIRMWARE_ID_MAX,8,3            ## @FIRMWARE_ID_MAX
	.comm	_FIRMWARE_ID_CP_CE,8,3          ## @FIRMWARE_ID_CP_CE
	.comm	_FIRMWARE_ID_CP_MES,8,3         ## @FIRMWARE_ID_CP_MES
	.comm	_rlc_autoload_info,8,3          ## @rlc_autoload_info
	.no_dead_strip	_gfx_v10_0_parse_rlc_toc
.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_parse_rlc_toc
_gfx_v10_0_parse_rlc_toc:               ; @gfx_v10_0_parse_rlc_toc
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	ldr	w1, [x0, #16]
Lloh0:
	adrp	x21, _PAGE_SIZE@GOTPAGE
Lloh1:
	ldr	x21, [x21, _PAGE_SIZE@GOTPAGEOFF]
	ldr	w2, [x21]
Lloh2:
	adrp	x8, _AMDGPU_GEM_DOMAIN_GTT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AMDGPU_GEM_DOMAIN_GTT@GOTPAGEOFF]
Lloh4:
	ldr	w3, [x8]
	add	x4, x0, #12
	add	x5, x0, #8
	mov	x6, x0
	bl	_amdgpu_bo_create_reserved
	cbz	w0, LBB0_2
; %bb.1:
	mov	x20, x0
	ldr	w0, [x19, #24]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_dev_err
	b	LBB0_5
LBB0_2:
	ldr	x0, [x19]
	ldp	w2, w1, [x19, #16]
	bl	_memcpy
	ldr	x9, [x19]
	cbz	x9, LBB0_4
; %bb.3:
	ldr	x8, [x9]
Lloh7:
	adrp	x19, _FIRMWARE_ID_INVALID@GOTPAGE
Lloh8:
	ldr	x19, [x19, _FIRMWARE_ID_INVALID@GOTPAGEOFF]
	ldr	x10, [x19]
Lloh9:
	adrp	x20, _FIRMWARE_ID_MAX@GOTPAGE
Lloh10:
	ldr	x20, [x20, _FIRMWARE_ID_MAX@GOTPAGEOFF]
	ldr	x11, [x20]
	cmp	x8, x10
	ccmp	x8, x11, #2, hi
	b.lo	LBB0_6
LBB0_4:
	mov	w20, #0
LBB0_5:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_6:
	add	x22, x9, #8
Lloh11:
	adrp	x23, _FIRMWARE_ID_CP_CE@GOTPAGE
Lloh12:
	ldr	x23, [x23, _FIRMWARE_ID_CP_CE@GOTPAGEOFF]
Lloh13:
	adrp	x24, _FIRMWARE_ID_CP_MES@GOTPAGE
Lloh14:
	ldr	x24, [x24, _FIRMWARE_ID_CP_MES@GOTPAGEOFF]
Lloh15:
	adrp	x25, _rlc_autoload_info@GOTPAGE
Lloh16:
	ldr	x25, [x25, _rlc_autoload_info@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	ldr	x9, [x25]
	add	x9, x9, x8, lsl #4
	str	x8, [x9]
	lsl	w8, w0, #2
	ldr	w10, [x22, #4]
	lsl	w10, w10, #2
	stp	w8, w10, [x9, #8]
	ldr	x8, [x22, #8]
	ldr	x9, [x19]
	ldr	x10, [x20]
	add	x22, x22, #16
	cmp	x8, x9
	ccmp	x8, x10, #2, hi
	b.hs	LBB0_4
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x23]
	ldr	x10, [x24]
	ldr	w0, [x22]
	cmp	x8, x9
	ccmp	x8, x10, #2, hs
	b.hi	LBB0_7
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	lsl	w0, w0, #2
	ldr	w1, [x21]
	bl	_ALIGN
	str	w0, [x22]
	ldur	x8, [x22, #-8]
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_AMDGPU_GEM_DOMAIN_GTT,4,2      ; @AMDGPU_GEM_DOMAIN_GTT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"(%d) failed to create rlc toc bo\n"

	.comm	_FIRMWARE_ID_INVALID,8,3        ; @FIRMWARE_ID_INVALID
	.comm	_FIRMWARE_ID_MAX,8,3            ; @FIRMWARE_ID_MAX
	.comm	_FIRMWARE_ID_CP_CE,8,3          ; @FIRMWARE_ID_CP_CE
	.comm	_FIRMWARE_ID_CP_MES,8,3         ; @FIRMWARE_ID_CP_MES
	.comm	_rlc_autoload_info,8,3          ; @rlc_autoload_info
	.no_dead_strip	_gfx_v10_0_parse_rlc_toc
.subsections_via_symbols
