	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ci_set_smc_sram_address
_ci_set_smc_sram_address:               ## @ci_set_smc_sram_address
	.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
	movl	%esi, %eax
	testb	$3, %al
	jne	LBB0_2
## %bb.1:
	leal	3(%rax), %ecx
	cmpl	%edx, %ecx
	jge	LBB0_2
## %bb.3:
	movq	%rdi, %rbx
	movl	(%rdi), %edi
	movq	_mmSMC_IND_INDEX_0@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edx
	callq	_cgs_write_register
	movl	(%rbx), %edi
	movq	_SMC_IND_ACCESS_CNTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AUTO_INCREMENT_IND_0@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%ebx, %ebx
	xorl	%ecx, %ecx
	callq	_PHM_WRITE_FIELD
	jmp	LBB0_4
LBB0_2:
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_4:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"smc_addr invalid \n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_mmSMC_IND_INDEX_0,4,2          ## @mmSMC_IND_INDEX_0
	.comm	_SMC_IND_ACCESS_CNTL,4,2        ## @SMC_IND_ACCESS_CNTL
	.comm	_AUTO_INCREMENT_IND_0,4,2       ## @AUTO_INCREMENT_IND_0
	.no_dead_strip	_ci_set_smc_sram_address
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ci_set_smc_sram_address
_ci_set_smc_sram_address:               ; @ci_set_smc_sram_address
	.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
	tst	w1, #0x3
	b.ne	LBB0_3
; %bb.1:
	mov	x8, x1
	add	w9, w1, #3
	cmp	w9, w2
	b.ge	LBB0_3
; %bb.2:
	mov	x19, x0
	ldr	w0, [x0]
Lloh0:
	adrp	x9, _mmSMC_IND_INDEX_0@GOTPAGE
Lloh1:
	ldr	x9, [x9, _mmSMC_IND_INDEX_0@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x9]
	mov	x2, x8
	bl	_cgs_write_register
	ldr	w0, [x19]
Lloh3:
	adrp	x8, _SMC_IND_ACCESS_CNTL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SMC_IND_ACCESS_CNTL@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, _AUTO_INCREMENT_IND_0@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AUTO_INCREMENT_IND_0@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	w3, #0
	bl	_PHM_WRITE_FIELD
	mov	w0, #0
	b	LBB0_4
LBB0_3:
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_4:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"smc_addr invalid \n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_mmSMC_IND_INDEX_0,4,2          ; @mmSMC_IND_INDEX_0
	.comm	_SMC_IND_ACCESS_CNTL,4,2        ; @SMC_IND_ACCESS_CNTL
	.comm	_AUTO_INCREMENT_IND_0,4,2       ; @AUTO_INCREMENT_IND_0
	.no_dead_strip	_ci_set_smc_sram_address
.subsections_via_symbols
