	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vega10_smu_init
_vega10_smu_init:                       ## @vega10_smu_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	$0, -48(%rbp)
	movl	16(%rdi), %edi
	movq	_CGS_UCODE_ID_SMU@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdx
	callq	_cgs_get_firmware_info
	testl	%eax, %eax
	jne	LBB0_16
## %bb.1:
	cmpl	$0, -48(%rbp)
	je	LBB0_16
## %bb.2:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$8, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %r14
	movq	%rax, (%rbx)
	movq	8(%rbx), %rdi
	movq	_PAGE_SIZE@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	movq	_AMDGPU_GEM_DOMAIN_VRAM@GOTPCREL(%rip), %r12
	movl	(%r12), %ecx
	movq	(%rax), %rax
	movq	_PPTABLE@GOTPCREL(%rip), %r15
	movq	(%r15), %rsi
	shlq	$5, %rsi
	leaq	(%rax,%rsi), %r8
	addq	$20, %r8
	leaq	16(%rax,%rsi), %r9
	addq	%rsi, %rax
	addq	$8, %rax
	movq	%rax, (%rsp)
	movl	$4, %esi
	callq	_amdgpu_bo_create_kernel
	testl	%eax, %eax
	jne	LBB0_15
## %bb.5:
	movq	(%r14), %rax
	movq	(%r15), %rcx
	shlq	$5, %rcx
	movabsq	$17179869185, %rdx              ## imm = 0x400000001
	movq	%rdx, (%rax,%rcx)
	movq	_TABLE_PPTABLE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%edx, 24(%rax,%rcx)
	movq	8(%rbx), %rdi
	movl	(%r13), %edx
	movq	_WMTABLE@GOTPCREL(%rip), %r13
	movq	(%r13), %rcx
	shlq	$5, %rcx
	leaq	(%rax,%rcx), %r8
	addq	$20, %r8
	leaq	16(%rax,%rcx), %r9
	leaq	8(%rax,%rcx), %rax
	movl	(%r12), %ecx
	movq	%rax, (%rsp)
	movl	$4, %esi
	callq	_amdgpu_bo_create_kernel
	testl	%eax, %eax
	jne	LBB0_14
## %bb.6:
	movq	(%r14), %rax
	movq	(%r13), %rcx
	shlq	$5, %rcx
	movabsq	$17179869185, %r15              ## imm = 0x400000001
	movq	%r15, (%rax,%rcx)
	movq	_TABLE_WATERMARKS@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%edx, 24(%rax,%rcx)
	movq	8(%rbx), %rdi
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_AVFSTABLE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	shlq	$5, %rcx
	leaq	(%rax,%rcx), %r8
	addq	$20, %r8
	leaq	16(%rax,%rcx), %r9
	leaq	8(%rax,%rcx), %rax
	movl	(%r12), %ecx
	movq	%rax, (%rsp)
	movl	$4, %esi
	callq	_amdgpu_bo_create_kernel
	testl	%eax, %eax
	jne	LBB0_13
## %bb.7:
	movq	(%r14), %rax
	movq	_AVFSTABLE@GOTPCREL(%rip), %r13
	movq	(%r13), %rcx
	shlq	$5, %rcx
	movq	%r15, (%rax,%rcx)
	movq	_TABLE_AVFS@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%edx, 24(%rax,%rcx)
	movq	8(%rbx), %rdi
	movq	_PAGE_SIZE@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	movq	_TOOLSTABLE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	shlq	$5, %rcx
	leaq	(%rax,%rcx), %r8
	addq	$20, %r8
	leaq	16(%rax,%rcx), %r9
	leaq	8(%rax,%rcx), %rax
	movl	(%r12), %ecx
	movq	%rax, (%rsp)
	movl	$102400, %esi                   ## imm = 0x19000
	callq	_amdgpu_bo_create_kernel
	testl	%eax, %eax
	je	LBB0_8
LBB0_12:
	movq	(%r14), %rax
	movq	(%r13), %rcx
	shlq	$5, %rcx
	leaq	(%rax,%rcx), %rdi
	addq	$20, %rdi
	leaq	(%rax,%rcx), %rsi
	addq	$16, %rsi
	leaq	(%rax,%rcx), %rdx
	addq	$8, %rdx
	callq	_amdgpu_bo_free_kernel
	movq	_WMTABLE@GOTPCREL(%rip), %r13
LBB0_13:
	movq	(%r14), %rax
	movq	(%r13), %rcx
	shlq	$5, %rcx
	leaq	(%rax,%rcx), %rdi
	addq	$20, %rdi
	leaq	(%rax,%rcx), %rsi
	addq	$16, %rsi
	leaq	(%rax,%rcx), %rdx
	addq	$8, %rdx
	callq	_amdgpu_bo_free_kernel
	movq	_PPTABLE@GOTPCREL(%rip), %r15
LBB0_14:
	movq	(%r14), %rax
	movq	(%r15), %rcx
	shlq	$5, %rcx
	leaq	(%rax,%rcx), %rdi
	addq	$20, %rdi
	leaq	(%rax,%rcx), %rsi
	addq	$16, %rsi
	leaq	(%rax,%rcx), %rdx
	addq	$8, %rdx
	callq	_amdgpu_bo_free_kernel
LBB0_15:
	movq	(%rbx), %rdi
	callq	_kfree
LBB0_16:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_17:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_18:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	jmp	LBB0_17
LBB0_8:
	movabsq	$17179869185, %r13              ## imm = 0x400000001
	movq	(%r14), %rax
	movq	_TOOLSTABLE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	shlq	$5, %rcx
	movabsq	$439804651110401, %rdx          ## imm = 0x1900000000001
	movq	%rdx, (%rax,%rcx)
	movq	_TABLE_PMSTATUSLOG@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%edx, 24(%rax,%rcx)
	movq	8(%rbx), %rdi
	movl	(%r15), %edx
	movl	(%r12), %ecx
	movq	_AVFSFUSETABLE@GOTPCREL(%rip), %r12
	movq	(%r12), %rsi
	shlq	$5, %rsi
	leaq	(%rax,%rsi), %r8
	addq	$20, %r8
	leaq	16(%rax,%rsi), %r9
	addq	%rsi, %rax
	addq	$8, %rax
	movq	%rax, (%rsp)
	movl	$4, %esi
	callq	_amdgpu_bo_create_kernel
	movq	(%r14), %rcx
	testl	%eax, %eax
	je	LBB0_9
## %bb.10:
	movq	_TOOLSTABLE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	shlq	$5, %rax
	cmpq	$0, 8(%rcx,%rax)
	movq	_AVFSTABLE@GOTPCREL(%rip), %r13
	je	LBB0_12
## %bb.11:
	leaq	(%rcx,%rax), %rdx
	addq	$8, %rdx
	leaq	(%rcx,%rax), %rdi
	addq	$20, %rdi
	leaq	(%rcx,%rax), %rsi
	addq	$16, %rsi
	callq	_amdgpu_bo_free_kernel
	jmp	LBB0_12
LBB0_9:
	movq	(%r12), %rax
	shlq	$5, %rax
	movq	%r13, (%rcx,%rax)
	movq	_TABLE_AVFS_FUSE_OVERRIDE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%edx, 24(%rcx,%rax)
	xorl	%eax, %eax
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.comm	_CGS_UCODE_ID_SMU,4,2           ## @CGS_UCODE_ID_SMU
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_AMDGPU_GEM_DOMAIN_VRAM,4,2     ## @AMDGPU_GEM_DOMAIN_VRAM
	.comm	_PPTABLE,8,3                    ## @PPTABLE
	.comm	_TABLE_PPTABLE,4,2              ## @TABLE_PPTABLE
	.comm	_WMTABLE,8,3                    ## @WMTABLE
	.comm	_TABLE_WATERMARKS,4,2           ## @TABLE_WATERMARKS
	.comm	_AVFSTABLE,8,3                  ## @AVFSTABLE
	.comm	_TABLE_AVFS,4,2                 ## @TABLE_AVFS
	.comm	_TOOLSTABLE,8,3                 ## @TOOLSTABLE
	.comm	_TABLE_PMSTATUSLOG,4,2          ## @TABLE_PMSTATUSLOG
	.comm	_AVFSFUSETABLE,8,3              ## @AVFSFUSETABLE
	.comm	_TABLE_AVFS_FUSE_OVERRIDE,4,2   ## @TABLE_AVFS_FUSE_OVERRIDE
	.no_dead_strip	_vega10_smu_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function vega10_smu_init
lCPI0_0:
	.long	1                               ; 0x1
	.long	4                               ; 0x4
lCPI0_1:
	.long	1                               ; 0x1
	.long	102400                          ; 0x19000
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_vega10_smu_init:                       ; @vega10_smu_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	d9, d8, [sp, #16]               ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset b8, -88
	.cfi_offset b9, -96
	mov	x19, x0
	str	xzr, [sp, #8]
	ldr	w0, [x0, #16]
Lloh0:
	adrp	x8, _CGS_UCODE_ID_SMU@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CGS_UCODE_ID_SMU@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #8
	bl	_cgs_get_firmware_info
	ldr	w8, [sp, #8]
	cmp	w0, #0
	ccmp	w8, #0, #4, eq
	b.eq	LBB0_10
; %bb.1:
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	w0, #8
	bl	_kzalloc
	cbz	x0, LBB0_13
; %bb.2:
	mov	x20, x0
	str	x0, [x19]
	ldr	x0, [x19, #8]
Lloh6:
	adrp	x24, _PAGE_SIZE@GOTPAGE
Lloh7:
	ldr	x24, [x24, _PAGE_SIZE@GOTPAGEOFF]
	ldr	w2, [x24]
Lloh8:
	adrp	x23, _AMDGPU_GEM_DOMAIN_VRAM@GOTPAGE
Lloh9:
	ldr	x23, [x23, _AMDGPU_GEM_DOMAIN_VRAM@GOTPAGEOFF]
	ldr	w3, [x23]
Lloh10:
	adrp	x21, _PPTABLE@GOTPAGE
Lloh11:
	ldr	x21, [x21, _PPTABLE@GOTPAGEOFF]
	ldr	x8, [x20]
	ldr	x9, [x21]
	add	x8, x8, x9, lsl #5
	add	x4, x8, #20
	add	x5, x8, #16
	add	x6, x8, #8
	mov	w1, #4
	bl	_amdgpu_bo_create_kernel
	cbnz	w0, LBB0_9
; %bb.3:
	ldr	x8, [x20]
	ldr	x9, [x21]
	add	x9, x8, x9, lsl #5
Lloh12:
	adrp	x10, lCPI0_0@PAGE
Lloh13:
	ldr	d8, [x10, lCPI0_0@PAGEOFF]
	str	d8, [x9]
Lloh14:
	adrp	x10, _TABLE_PPTABLE@GOTPAGE
Lloh15:
	ldr	x10, [x10, _TABLE_PPTABLE@GOTPAGEOFF]
Lloh16:
	ldr	w10, [x10]
	str	w10, [x9, #24]
	ldr	x0, [x19, #8]
	ldr	w2, [x24]
Lloh17:
	adrp	x22, _WMTABLE@GOTPAGE
Lloh18:
	ldr	x22, [x22, _WMTABLE@GOTPAGEOFF]
	ldr	w3, [x23]
	ldr	x9, [x22]
	add	x8, x8, x9, lsl #5
	add	x4, x8, #20
	add	x5, x8, #16
	add	x6, x8, #8
	mov	w1, #4
	bl	_amdgpu_bo_create_kernel
	cbnz	w0, LBB0_8
; %bb.4:
	ldr	x8, [x20]
	ldr	x9, [x22]
	add	x9, x8, x9, lsl #5
	str	d8, [x9]
Lloh19:
	adrp	x10, _TABLE_WATERMARKS@GOTPAGE
Lloh20:
	ldr	x10, [x10, _TABLE_WATERMARKS@GOTPAGEOFF]
Lloh21:
	ldr	w10, [x10]
	str	w10, [x9, #24]
	ldr	x0, [x19, #8]
	ldr	w2, [x24]
Lloh22:
	adrp	x25, _AVFSTABLE@GOTPAGE
Lloh23:
	ldr	x25, [x25, _AVFSTABLE@GOTPAGEOFF]
	ldr	w3, [x23]
	ldr	x9, [x25]
	add	x8, x8, x9, lsl #5
	add	x4, x8, #20
	add	x5, x8, #16
	add	x6, x8, #8
	mov	w1, #4
	bl	_amdgpu_bo_create_kernel
	cbnz	w0, LBB0_7
; %bb.5:
	ldr	x8, [x20]
	ldr	x9, [x25]
	add	x9, x8, x9, lsl #5
	str	d8, [x9]
Lloh24:
	adrp	x10, _TABLE_AVFS@GOTPAGE
Lloh25:
	ldr	x10, [x10, _TABLE_AVFS@GOTPAGEOFF]
Lloh26:
	ldr	w10, [x10]
	str	w10, [x9, #24]
	ldr	x0, [x19, #8]
	ldr	w2, [x24]
Lloh27:
	adrp	x26, _TOOLSTABLE@GOTPAGE
Lloh28:
	ldr	x26, [x26, _TOOLSTABLE@GOTPAGEOFF]
	ldr	w3, [x23]
	ldr	x9, [x26]
	add	x8, x8, x9, lsl #5
	add	x4, x8, #20
	add	x5, x8, #16
	add	x6, x8, #8
	mov	w1, #36864
	movk	w1, #1, lsl #16
	bl	_amdgpu_bo_create_kernel
	cbz	w0, LBB0_14
LBB0_6:
	ldr	x8, [x20]
	ldr	x9, [x25]
	add	x8, x8, x9, lsl #5
	add	x0, x8, #20
	add	x1, x8, #16
	add	x2, x8, #8
	bl	_amdgpu_bo_free_kernel
LBB0_7:
	ldr	x8, [x20]
	ldr	x9, [x22]
	add	x8, x8, x9, lsl #5
	add	x0, x8, #20
	add	x1, x8, #16
	add	x2, x8, #8
	bl	_amdgpu_bo_free_kernel
LBB0_8:
	ldr	x8, [x20]
	ldr	x9, [x21]
	add	x8, x8, x9, lsl #5
	add	x0, x8, #20
	add	x1, x8, #16
	add	x2, x8, #8
	bl	_amdgpu_bo_free_kernel
LBB0_9:
	ldr	x0, [x19]
	bl	_kfree
LBB0_10:
Lloh29:
	adrp	x8, _EINVAL@GOTPAGE
Lloh30:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_12:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #16]               ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_13:
Lloh31:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh32:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_11
LBB0_14:
	ldr	x8, [x20]
	ldr	x9, [x26]
	add	x9, x8, x9, lsl #5
Lloh33:
	adrp	x10, lCPI0_1@PAGE
Lloh34:
	ldr	d0, [x10, lCPI0_1@PAGEOFF]
	str	d0, [x9]
Lloh35:
	adrp	x10, _TABLE_PMSTATUSLOG@GOTPAGE
Lloh36:
	ldr	x10, [x10, _TABLE_PMSTATUSLOG@GOTPAGEOFF]
Lloh37:
	ldr	w10, [x10]
	str	w10, [x9, #24]
	ldr	x0, [x19, #8]
	ldr	w2, [x24]
Lloh38:
	adrp	x24, _AVFSFUSETABLE@GOTPAGE
Lloh39:
	ldr	x24, [x24, _AVFSFUSETABLE@GOTPAGEOFF]
	ldr	w3, [x23]
	ldr	x9, [x24]
	add	x8, x8, x9, lsl #5
	add	x4, x8, #20
	add	x5, x8, #16
	add	x6, x8, #8
	mov	w1, #4
	bl	_amdgpu_bo_create_kernel
	ldr	x8, [x20]
	cbz	w0, LBB0_17
; %bb.15:
	ldr	x9, [x26]
	add	x8, x8, x9, lsl #5
	mov	x2, x8
	ldr	x9, [x2, #8]!
	cbz	x9, LBB0_6
; %bb.16:
	add	x0, x8, #20
	add	x1, x8, #16
	bl	_amdgpu_bo_free_kernel
	b	LBB0_6
LBB0_17:
	ldr	x9, [x24]
	add	x8, x8, x9, lsl #5
	str	d8, [x8]
Lloh40:
	adrp	x9, _TABLE_AVFS_FUSE_OVERRIDE@GOTPAGE
Lloh41:
	ldr	x9, [x9, _TABLE_AVFS_FUSE_OVERRIDE@GOTPAGEOFF]
Lloh42:
	ldr	w9, [x9]
	str	w9, [x8, #24]
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdrp	Lloh12, Lloh14
	.loh AdrpLdr	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpAdrp	Lloh33, Lloh35
	.loh AdrpLdr	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.cfi_endproc
                                        ; -- End function
	.comm	_CGS_UCODE_ID_SMU,4,2           ; @CGS_UCODE_ID_SMU
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_AMDGPU_GEM_DOMAIN_VRAM,4,2     ; @AMDGPU_GEM_DOMAIN_VRAM
	.comm	_PPTABLE,8,3                    ; @PPTABLE
	.comm	_TABLE_PPTABLE,4,2              ; @TABLE_PPTABLE
	.comm	_WMTABLE,8,3                    ; @WMTABLE
	.comm	_TABLE_WATERMARKS,4,2           ; @TABLE_WATERMARKS
	.comm	_AVFSTABLE,8,3                  ; @AVFSTABLE
	.comm	_TABLE_AVFS,4,2                 ; @TABLE_AVFS
	.comm	_TOOLSTABLE,8,3                 ; @TOOLSTABLE
	.comm	_TABLE_PMSTATUSLOG,4,2          ; @TABLE_PMSTATUSLOG
	.comm	_AVFSFUSETABLE,8,3              ; @AVFSFUSETABLE
	.comm	_TABLE_AVFS_FUSE_OVERRIDE,4,2   ; @TABLE_AVFS_FUSE_OVERRIDE
	.no_dead_strip	_vega10_smu_init
.subsections_via_symbols
