	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gfx_v10_0_calc_toc_total_size
_gfx_v10_0_calc_toc_total_size:         ## @gfx_v10_0_calc_toc_total_size
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	callq	_gfx_v10_0_parse_rlc_toc
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	xorl	%eax, %eax
	jmp	LBB0_13
LBB0_2:
	movq	_FIRMWARE_ID_RLC_G_UCODE@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movq	_FIRMWARE_ID_MAX@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	%rcx, %rdi
	movq	_rlc_autoload_info@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	subq	%rbx, %rdi
	jbe	LBB0_3
## %bb.4:
	cmpq	$4, %rdi
	jae	LBB0_6
## %bb.5:
	xorl	%eax, %eax
	movq	%rbx, %rsi
	jmp	LBB0_9
LBB0_3:
	xorl	%eax, %eax
	jmp	LBB0_11
LBB0_6:
	movq	%rdi, %r8
	andq	$-4, %r8
	leaq	(%rbx,%r8), %rsi
	shlq	$4, %rbx
	leaq	(%rbx,%rdx), %rax
	addq	$48, %rax
	pxor	%xmm0, %xmm0
	movq	%r8, %rbx
	pxor	%xmm1, %xmm1
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	-32(%rax), %xmm2                ## xmm2 = mem[0],zero
	movq	-48(%rax), %xmm3                ## xmm3 = mem[0],zero
	punpcklqdq	%xmm2, %xmm3            ## xmm3 = xmm3[0],xmm2[0]
	paddq	%xmm3, %xmm0
	movq	(%rax), %xmm2                   ## xmm2 = mem[0],zero
	movq	-16(%rax), %xmm3                ## xmm3 = mem[0],zero
	punpcklqdq	%xmm2, %xmm3            ## xmm3 = xmm3[0],xmm2[0]
	paddq	%xmm3, %xmm1
	addq	$64, %rax
	addq	$-4, %rbx
	jne	LBB0_7
## %bb.8:
	paddq	%xmm0, %xmm1
	pshufd	$238, %xmm1, %xmm0              ## xmm0 = xmm1[2,3,2,3]
	paddq	%xmm1, %xmm0
	movq	%xmm0, %rax
	cmpq	%r8, %rdi
	je	LBB0_11
LBB0_9:
	movq	%rcx, %rdi
	subq	%rsi, %rdi
	shlq	$4, %rsi
	addq	%rdx, %rsi
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	addq	(%rsi), %rax
	addq	$16, %rsi
	decq	%rdi
	jne	LBB0_10
LBB0_11:
	decq	%rcx
	shlq	$4, %rcx
	movq	8(%rdx,%rcx), %rsi
	cmpq	%rsi, %rax
	jge	LBB0_13
## %bb.12:
	addq	(%rdx,%rcx), %rsi
	movq	%rsi, %rax
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to parse rlc toc\n"

	.comm	_FIRMWARE_ID_RLC_G_UCODE,8,3    ## @FIRMWARE_ID_RLC_G_UCODE
	.comm	_FIRMWARE_ID_MAX,8,3            ## @FIRMWARE_ID_MAX
	.comm	_rlc_autoload_info,8,3          ## @rlc_autoload_info
	.no_dead_strip	_gfx_v10_0_calc_toc_total_size
.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_calc_toc_total_size
_gfx_v10_0_calc_toc_total_size:         ; @gfx_v10_0_calc_toc_total_size
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	bl	_gfx_v10_0_parse_rlc_toc
	cbz	w0, LBB0_2
; %bb.1:
	ldr	w0, [x19]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	mov	x0, #0
	b	LBB0_13
LBB0_2:
Lloh2:
	adrp	x8, _FIRMWARE_ID_RLC_G_UCODE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _FIRMWARE_ID_RLC_G_UCODE@GOTPAGEOFF]
Lloh4:
	adrp	x9, _FIRMWARE_ID_MAX@GOTPAGE
Lloh5:
	ldr	x9, [x9, _FIRMWARE_ID_MAX@GOTPAGEOFF]
Lloh6:
	ldr	x17, [x8]
Lloh7:
	ldr	x9, [x9]
Lloh8:
	adrp	x8, _rlc_autoload_info@GOTPAGE
Lloh9:
	ldr	x8, [x8, _rlc_autoload_info@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	subs	x11, x9, x17
	b.ls	LBB0_5
; %bb.3:
	cmp	x11, #4
	b.hs	LBB0_6
; %bb.4:
	mov	x0, #0
	mov	x10, x17
	b	LBB0_9
LBB0_5:
	mov	x0, #0
	b	LBB0_11
LBB0_6:
	mov	x15, #0
	mov	x16, #0
	mov	x14, #0
	mov	x13, #0
	and	x12, x11, #0xfffffffffffffffc
	add	x10, x17, x12
	add	x17, x8, x17, lsl #4
	add	x17, x17, #32
	mov	x0, x12
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldur	x1, [x17, #-32]
	ldur	x2, [x17, #-16]
	ldr	x3, [x17]
	add	x15, x1, x15
	add	x16, x2, x16
	ldr	x1, [x17, #16]
	add	x14, x3, x14
	add	x13, x1, x13
	add	x17, x17, #64
	subs	x0, x0, #4
	b.ne	LBB0_7
; %bb.8:
	add	x15, x16, x15
	add	x14, x14, x15
	add	x0, x13, x14
	cmp	x11, x12
	b.eq	LBB0_11
LBB0_9:
	sub	x11, x9, x10
	add	x10, x8, x10, lsl #4
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x12, [x10], #16
	add	x0, x12, x0
	subs	x11, x11, #1
	b.ne	LBB0_10
LBB0_11:
	sub	x9, x9, #1
	add	x10, x8, x9, lsl #4
	ldr	x10, [x10, #8]
	cmp	x0, x10
	b.ge	LBB0_13
; %bb.12:
	lsl	x9, x9, #4
	ldr	x8, [x8, x9]
	add	x0, x8, x10
LBB0_13:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to parse rlc toc\n"

	.comm	_FIRMWARE_ID_RLC_G_UCODE,8,3    ; @FIRMWARE_ID_RLC_G_UCODE
	.comm	_FIRMWARE_ID_MAX,8,3            ; @FIRMWARE_ID_MAX
	.comm	_rlc_autoload_info,8,3          ; @rlc_autoload_info
	.no_dead_strip	_gfx_v10_0_calc_toc_total_size
.subsections_via_symbols
