	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gmc_v8_0_hw_init
_gmc_v8_0_hw_init:                      ## @gmc_v8_0_hw_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	callq	_gmc_v8_0_init_golden_registers
	movq	%rbx, %rdi
	callq	_gmc_v8_0_mc_program
	movq	(%rbx), %rax
	movq	_CHIP_TONGA@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.1:
	movq	%rbx, %rdi
	callq	_gmc_v8_0_tonga_mc_load_microcode
	testl	%eax, %eax
	jne	LBB0_3
	jmp	LBB0_8
LBB0_4:
	movq	_CHIP_POLARIS11@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_7
## %bb.5:
	movq	_CHIP_POLARIS10@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_7
## %bb.6:
	movq	_CHIP_POLARIS12@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
LBB0_7:
	movq	%rbx, %rdi
	callq	_gmc_v8_0_polaris_mc_load_microcode
	testl	%eax, %eax
	je	LBB0_8
LBB0_3:
	movl	%eax, %r14d
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
	movl	%r14d, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_8:
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_gmc_v8_0_gart_enable           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_CHIP_TONGA,8,3                 ## @CHIP_TONGA
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to load MC firmware!\n"

	.comm	_CHIP_POLARIS11,8,3             ## @CHIP_POLARIS11
	.comm	_CHIP_POLARIS10,8,3             ## @CHIP_POLARIS10
	.comm	_CHIP_POLARIS12,8,3             ## @CHIP_POLARIS12
	.no_dead_strip	_gmc_v8_0_hw_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gmc_v8_0_hw_init
_gmc_v8_0_hw_init:                      ; @gmc_v8_0_hw_init
	.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	_gmc_v8_0_init_golden_registers
	mov	x0, x19
	bl	_gmc_v8_0_mc_program
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _CHIP_TONGA@GOTPAGE
Lloh1:
	ldr	x9, [x9, _CHIP_TONGA@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_gmc_v8_0_tonga_mc_load_microcode
	cbnz	w0, LBB0_4
	b	LBB0_5
LBB0_2:
Lloh3:
	adrp	x9, _CHIP_POLARIS11@GOTPAGE
Lloh4:
	ldr	x9, [x9, _CHIP_POLARIS11@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
Lloh6:
	adrp	x10, _CHIP_POLARIS10@GOTPAGE
Lloh7:
	ldr	x10, [x10, _CHIP_POLARIS10@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x10]
Lloh9:
	adrp	x11, _CHIP_POLARIS12@GOTPAGE
Lloh10:
	ldr	x11, [x11, _CHIP_POLARIS12@GOTPAGEOFF]
Lloh11:
	ldr	x11, [x11]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	ccmp	x8, x11, #4, ne
	b.ne	LBB0_5
; %bb.3:
	mov	x0, x19
	bl	_gmc_v8_0_polaris_mc_load_microcode
	cbz	w0, LBB0_5
LBB0_4:
	mov	x20, x0
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_5:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_gmc_v8_0_gart_enable
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_CHIP_TONGA,8,3                 ; @CHIP_TONGA
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to load MC firmware!\n"

	.comm	_CHIP_POLARIS11,8,3             ; @CHIP_POLARIS11
	.comm	_CHIP_POLARIS10,8,3             ; @CHIP_POLARIS10
	.comm	_CHIP_POLARIS12,8,3             ; @CHIP_POLARIS12
	.no_dead_strip	_gmc_v8_0_hw_init
.subsections_via_symbols
