	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ci_set_mc_special_registers
_ci_set_mc_special_registers:           ## @ci_set_mc_special_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	%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	%rsi, %r15
	callq	_ci_get_pi
	movq	(%r15), %rcx
	testq	%rcx, %rcx
	jle	LBB0_1
## %bb.2:
	movq	_SMU7_DISCRETE_MC_REGISTER_ARRAY_SIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	xorl	%ebx, %ebx
	movl	$1073741823, %r12d              ## imm = 0x3FFFFFFF
	movq	_MC_PMG_CMD_MRS1@GOTPCREL(%rip), %r14
	movq	%rcx, %r13
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	_SMU7_DISCRETE_MC_REGISTER_ARRAY_SIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	%rax, %r13
	jge	LBB0_4
## %bb.14:                              ##   in Loop: Header=BB0_3 Depth=1
	incq	%r13
	movq	(%r15), %rcx
LBB0_15:                                ##   in Loop: Header=BB0_3 Depth=1
	incq	%rbx
	cmpq	%rcx, %rbx
	jge	LBB0_16
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_10 Depth 2
	cmpq	%rax, %r13
	jge	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	24(%r15), %rdx
	movl	(%rdx,%rbx,8), %edx
	andl	%r12d, %edx
	cmpl	$32, %edx
	jne	LBB0_15
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	(%r14), %edi
	callq	_RREG32
	movl	(%r14), %ecx
	sarl	$2, %ecx
	movq	24(%r15), %rdx
	movl	%ecx, (%rdx,%r13,8)
	movq	_MC_SEQ_PMG_CMD_MRS1_LP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	sarl	$2, %ecx
	movl	%ecx, 4(%rdx,%r13,8)
	movq	8(%r15), %r8
	testq	%r8, %r8
	jle	LBB0_13
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	andl	$-65536, %eax                   ## imm = 0xFFFF0000
	movq	16(%r15), %rdx
	cmpq	$1, %r8
	jne	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	xorl	%esi, %esi
	jmp	LBB0_11
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%r8, %r9
	andq	$-2, %r9
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_10:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%rdx,%rsi,8), %rcx
	movzwl	(%rcx,%rbx,4), %edi
	orl	%eax, %edi
	movl	%edi, (%rcx,%r13,4)
	movq	8(%rdx,%rsi,8), %rcx
	movzwl	(%rcx,%rbx,4), %edi
	orl	%eax, %edi
	movl	%edi, (%rcx,%r13,4)
	addq	$2, %rsi
	cmpq	%rsi, %r9
	jne	LBB0_10
LBB0_11:                                ##   in Loop: Header=BB0_3 Depth=1
	testb	$1, %r8b
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	(%rdx,%rsi,8), %rcx
	movzwl	(%rcx,%rbx,4), %edx
	orl	%eax, %edx
	movl	%edx, (%rcx,%r13,4)
	jmp	LBB0_13
LBB0_1:
	movq	%rcx, %r13
LBB0_16:
	movq	%r13, (%r15)
	xorl	%eax, %eax
	jmp	LBB0_17
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_17:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SMU7_DISCRETE_MC_REGISTER_ARRAY_SIZE,8,3 ## @SMU7_DISCRETE_MC_REGISTER_ARRAY_SIZE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_MC_PMG_CMD_EMRS,4,2            ## @MC_PMG_CMD_EMRS
	.comm	_MC_SEQ_PMG_CMD_EMRS_LP,4,2     ## @MC_SEQ_PMG_CMD_EMRS_LP
	.comm	_MC_PMG_CMD_MRS,4,2             ## @MC_PMG_CMD_MRS
	.comm	_MC_SEQ_PMG_CMD_MRS_LP,4,2      ## @MC_SEQ_PMG_CMD_MRS_LP
	.comm	_MC_PMG_AUTO_CMD,4,2            ## @MC_PMG_AUTO_CMD
	.comm	_MC_PMG_CMD_MRS1,4,2            ## @MC_PMG_CMD_MRS1
	.comm	_MC_SEQ_PMG_CMD_MRS1_LP,4,2     ## @MC_SEQ_PMG_CMD_MRS1_LP
	.no_dead_strip	_ci_set_mc_special_registers
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ci_set_mc_special_registers
_ci_set_mc_special_registers:           ; @ci_set_mc_special_registers
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x1
	bl	_ci_get_pi
	ldr	x9, [x19]
	cmp	x9, #1
	b.lt	LBB0_10
; %bb.1:
	mov	x20, #0
Lloh0:
	adrp	x21, _SMU7_DISCRETE_MC_REGISTER_ARRAY_SIZE@GOTPAGE
Lloh1:
	ldr	x21, [x21, _SMU7_DISCRETE_MC_REGISTER_ARRAY_SIZE@GOTPAGEOFF]
	ldr	x8, [x21]
Lloh2:
	adrp	x23, _MC_PMG_CMD_MRS1@GOTPAGE
Lloh3:
	ldr	x23, [x23, _MC_PMG_CMD_MRS1@GOTPAGEOFF]
Lloh4:
	adrp	x24, _MC_SEQ_PMG_CMD_MRS1_LP@GOTPAGE
Lloh5:
	ldr	x24, [x24, _MC_SEQ_PMG_CMD_MRS1_LP@GOTPAGEOFF]
	mov	x22, x9
	b	LBB0_5
LBB0_2:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x21]
	cmp	x22, x8
	b.ge	LBB0_12
; %bb.3:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x22, x22, #1
	ldr	x9, [x19]
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x20, x20, #1
	cmp	x20, x9
	b.ge	LBB0_11
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_9 Depth 2
	cmp	x22, x8
	b.ge	LBB0_12
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x10, [x19, #24]
	lsl	x11, x20, #3
	ldr	w10, [x10, x11]
	and	w10, w10, #0x3fffffff
	cmp	w10, #32
	b.ne	LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [x23]
	bl	_RREG32
	ldr	w8, [x23]
	asr	w8, w8, #2
	ldr	x9, [x19, #24]
	add	x9, x9, x22, lsl #3
	str	w8, [x9]
	ldr	w8, [x24]
	asr	w8, w8, #2
	str	w8, [x9, #4]
	ldr	x8, [x19, #8]
	cmp	x8, #1
	b.lt	LBB0_2
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	and	w9, w0, #0xffff0000
	ldr	x10, [x19, #16]
LBB0_9:                                 ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x11, [x10], #8
	lsl	x12, x20, #2
	ldrh	w12, [x11, x12]
	orr	w12, w12, w9
	str	w12, [x11, x22, lsl #2]
	subs	x8, x8, #1
	b.ne	LBB0_9
	b	LBB0_2
LBB0_10:
	mov	x22, x9
LBB0_11:
	mov	w0, #0
	str	x22, [x19]
	b	LBB0_13
LBB0_12:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_13:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_SMU7_DISCRETE_MC_REGISTER_ARRAY_SIZE,8,3 ; @SMU7_DISCRETE_MC_REGISTER_ARRAY_SIZE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_MC_PMG_CMD_EMRS,4,2            ; @MC_PMG_CMD_EMRS
	.comm	_MC_SEQ_PMG_CMD_EMRS_LP,4,2     ; @MC_SEQ_PMG_CMD_EMRS_LP
	.comm	_MC_PMG_CMD_MRS,4,2             ; @MC_PMG_CMD_MRS
	.comm	_MC_SEQ_PMG_CMD_MRS_LP,4,2      ; @MC_SEQ_PMG_CMD_MRS_LP
	.comm	_MC_PMG_AUTO_CMD,4,2            ; @MC_PMG_AUTO_CMD
	.comm	_MC_PMG_CMD_MRS1,4,2            ; @MC_PMG_CMD_MRS1
	.comm	_MC_SEQ_PMG_CMD_MRS1_LP,4,2     ; @MC_SEQ_PMG_CMD_MRS1_LP
	.no_dead_strip	_ci_set_mc_special_registers
.subsections_via_symbols
