	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vi_init_golden_registers
_vi_init_golden_registers:              ## @vi_init_golden_registers
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	leaq	4(%rdi), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	%rbx, %rdi
	callq	_amdgpu_sriov_vf
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_xgpu_vi_init_golden_registers
	jmp	LBB0_5
LBB0_2:
	movl	$-129, %eax
	addl	(%rbx), %eax
	cmpl	$7, %eax
	ja	LBB0_5
## %bb.3:
	movl	$199, %ecx
	btl	%eax, %ecx
	jae	LBB0_5
## %bb.4:
	cltq
	leaq	l_switch.table.vi_init_golden_registers(%rip), %rcx
	movq	(%rcx,%rax,8), %rax
	movl	(%rax), %r15d
	movl	%r15d, %edi
	callq	_ARRAY_SIZE
	movq	%rbx, %rdi
	movl	%r15d, %esi
	movl	%eax, %edx
	callq	_amdgpu_device_program_register_sequence
LBB0_5:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mutex_unlock                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_iceland_mgcg_cgcg_init,4,2     ## @iceland_mgcg_cgcg_init
	.comm	_fiji_mgcg_cgcg_init,4,2        ## @fiji_mgcg_cgcg_init
	.comm	_tonga_mgcg_cgcg_init,4,2       ## @tonga_mgcg_cgcg_init
	.comm	_cz_mgcg_cgcg_init,4,2          ## @cz_mgcg_cgcg_init
	.comm	_stoney_mgcg_cgcg_init,4,2      ## @stoney_mgcg_cgcg_init
	.no_dead_strip	_vi_init_golden_registers
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.vi_init_golden_registers
l_switch.table.vi_init_golden_registers:
	.quad	_iceland_mgcg_cgcg_init
	.quad	_tonga_mgcg_cgcg_init
	.quad	_stoney_mgcg_cgcg_init
	.quad	_iceland_mgcg_cgcg_init
	.quad	_iceland_mgcg_cgcg_init
	.quad	_iceland_mgcg_cgcg_init
	.quad	_fiji_mgcg_cgcg_init
	.quad	_cz_mgcg_cgcg_init

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vi_init_golden_registers
_vi_init_golden_registers:              ; @vi_init_golden_registers
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x0
	add	x19, x0, #4
	mov	x0, x19
	bl	_mutex_lock
	mov	x0, x20
	bl	_amdgpu_sriov_vf
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x20
	bl	_xgpu_vi_init_golden_registers
	b	LBB0_5
LBB0_2:
	ldr	w8, [x20]
	sub	w8, w8, #129
	cmp	w8, #7
	b.hi	LBB0_5
; %bb.3:
	mov	w9, #199
	lsr	w9, w9, w8
	tbz	w9, #0, LBB0_5
; %bb.4:
Lloh0:
	adrp	x9, l_switch.table.vi_init_golden_registers@PAGE
Lloh1:
	add	x9, x9, l_switch.table.vi_init_golden_registers@PAGEOFF
	ldr	x8, [x9, w8, sxtw #3]
	ldr	w21, [x8]
	mov	x0, x21
	bl	_ARRAY_SIZE
	mov	x2, x0
	mov	x0, x20
	mov	x1, x21
	bl	_amdgpu_device_program_register_sequence
LBB0_5:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_mutex_unlock
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_iceland_mgcg_cgcg_init,4,2     ; @iceland_mgcg_cgcg_init
	.comm	_fiji_mgcg_cgcg_init,4,2        ; @fiji_mgcg_cgcg_init
	.comm	_tonga_mgcg_cgcg_init,4,2       ; @tonga_mgcg_cgcg_init
	.comm	_cz_mgcg_cgcg_init,4,2          ; @cz_mgcg_cgcg_init
	.comm	_stoney_mgcg_cgcg_init,4,2      ; @stoney_mgcg_cgcg_init
	.no_dead_strip	_vi_init_golden_registers
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.vi_init_golden_registers
l_switch.table.vi_init_golden_registers:
	.quad	_iceland_mgcg_cgcg_init
	.quad	_tonga_mgcg_cgcg_init
	.quad	_stoney_mgcg_cgcg_init
	.quad	_iceland_mgcg_cgcg_init
	.quad	_iceland_mgcg_cgcg_init
	.quad	_iceland_mgcg_cgcg_init
	.quad	_fiji_mgcg_cgcg_init
	.quad	_cz_mgcg_cgcg_init

.subsections_via_symbols
