	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function smu8_set_smc_sram_address
_smu8_set_smc_sram_address:             ## @smu8_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
                                        ## kill: def $esi killed $esi def $rsi
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.1:
	movq	(%rdi), %rdi
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.2:
	testb	$3, %sil
	je	LBB0_4
## %bb.3:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_7
LBB0_4:
	leal	3(%rsi), %eax
	cmpl	%edx, %eax
	jge	LBB0_6
## %bb.5:
	movq	_mmMP0PUB_IND_INDEX_0@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_SMN_MP1_SRAM_START_ADDR@GOTPCREL(%rip), %rcx
	movslq	%esi, %rdx
	addq	(%rcx), %rdx
	movl	%eax, %esi
	callq	_cgs_write_register
	xorl	%eax, %eax
	popq	%rbp
	retq
LBB0_6:
	leaq	L_.str.1(%rip), %rdi
LBB0_7:
	callq	_pr_err
LBB0_8:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SMC address must be 4 byte aligned\n"

L_.str.1:                               ## @.str.1
	.asciz	"SMC address beyond the SMC RAM area\n"

	.comm	_mmMP0PUB_IND_INDEX_0,4,2       ## @mmMP0PUB_IND_INDEX_0
	.comm	_SMN_MP1_SRAM_START_ADDR,8,3    ## @SMN_MP1_SRAM_START_ADDR
	.no_dead_strip	_smu8_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 smu8_set_smc_sram_address
_smu8_set_smc_sram_address:             ; @smu8_set_smc_sram_address
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	cbz	x0, LBB0_8
; %bb.1:
	ldr	x0, [x0]
	cbz	x0, LBB0_8
; %bb.2:
	tst	w1, #0x3
	b.eq	LBB0_4
; %bb.3:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_7
LBB0_4:
	add	w8, w1, #3
	cmp	w8, w2
	b.ge	LBB0_6
; %bb.5:
Lloh2:
	adrp	x8, _mmMP0PUB_IND_INDEX_0@GOTPAGE
Lloh3:
	ldr	x8, [x8, _mmMP0PUB_IND_INDEX_0@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _SMN_MP1_SRAM_START_ADDR@GOTPAGE
Lloh6:
	ldr	x9, [x9, _SMN_MP1_SRAM_START_ADDR@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	add	x2, x9, w1, sxtw
	mov	x1, x8
	bl	_cgs_write_register
	mov	w0, #0
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_6:
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_7:
	bl	_pr_err
LBB0_8:
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SMC address must be 4 byte aligned\n"

l_.str.1:                               ; @.str.1
	.asciz	"SMC address beyond the SMC RAM area\n"

	.comm	_mmMP0PUB_IND_INDEX_0,4,2       ; @mmMP0PUB_IND_INDEX_0
	.comm	_SMN_MP1_SRAM_START_ADDR,8,3    ; @SMN_MP1_SRAM_START_ADDR
	.no_dead_strip	_smu8_set_smc_sram_address
.subsections_via_symbols
