	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cypress_populate_smc_initial_state ## -- Begin function cypress_populate_smc_initial_state
	.p2align	4, 0x90
_cypress_populate_smc_initial_state:    ## @cypress_populate_smc_initial_state
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r12
	movq	%rdi, %r15
	movq	%rsi, %rdi
	callq	_rv770_get_ps
	movq	%rax, %rbx
	movq	%r15, %rdi
	callq	_rv770_get_pi
	movq	%rax, %r13
	movq	%r15, %rdi
	callq	_evergreen_get_pi
	movq	%rax, %r14
	movl	32(%r13), %edi
	callq	_cpu_to_be32
	leaq	8(%r12), %rcx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	8(%r12), %rcx
	movq	%rax, 176(%rcx)
	movl	36(%r13), %edi
	callq	_cpu_to_be32
	movq	8(%r12), %rcx
	movq	%rax, 168(%rcx)
	movl	40(%r13), %edi
	callq	_cpu_to_be32
	movq	8(%r12), %rcx
	movq	%rax, 160(%rcx)
	movl	44(%r13), %edi
	callq	_cpu_to_be32
	movq	8(%r12), %rcx
	movq	%rax, 152(%rcx)
	movl	48(%r13), %edi
	callq	_cpu_to_be32
	movq	8(%r12), %rcx
	movq	%rax, 144(%rcx)
	movl	52(%r13), %edi
	callq	_cpu_to_be32
	movq	8(%r12), %rcx
	movq	%rax, 136(%rcx)
	movl	56(%r13), %edi
	callq	_cpu_to_be32
	movq	8(%r12), %rcx
	movq	%rax, 128(%rcx)
	movl	60(%r13), %edi
	callq	_cpu_to_be32
	movq	8(%r12), %rcx
	movq	%rax, 120(%rcx)
	movl	(%rbx), %edi
	callq	_cpu_to_be32
	movq	8(%r12), %rcx
	movq	%rax, 112(%rcx)
	movl	64(%r13), %edi
	callq	_cpu_to_be32
	movq	8(%r12), %rcx
	movq	%rax, 104(%rcx)
	movl	68(%r13), %edi
	callq	_cpu_to_be32
	movq	8(%r12), %rcx
	movq	%rax, 96(%rcx)
	movl	72(%r13), %edi
	callq	_cpu_to_be32
	movq	8(%r12), %rcx
	movq	%rax, 88(%rcx)
	movl	76(%r13), %edi
	callq	_cpu_to_be32
	movq	8(%r12), %rcx
	movq	%rax, 80(%rcx)
	movl	80(%r13), %edi
	callq	_cpu_to_be32
	movq	8(%r12), %rcx
	movq	%rax, 72(%rcx)
	movl	4(%rbx), %edi
	callq	_cpu_to_be32
	movq	8(%r12), %rcx
	movq	%rax, 64(%rcx)
	movq	_MC_CG_ARB_FREQ_F0@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 56(%rcx)
	movq	$0, 48(%rcx)
	leaq	16(%r14), %rsi
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movl	16(%rbx), %edx
	addq	$40, %rcx
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	callq	_cypress_populate_voltage_value
	cmpq	$0, 8(%r14)
	je	LBB0_2
## %bb.1:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	12(%rax), %edx
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rcx
	addq	$36, %rcx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	callq	_cypress_populate_voltage_value
LBB0_2:
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movq	(%r15), %rsi
	addq	$32, %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_cypress_populate_initial_mvdd_value
	movl	$65535, %edi                    ## imm = 0xFFFF
	callq	_CG_R
	movl	%eax, %ebx
	xorl	%edi, %edi
	callq	_CG_L
	orl	%eax, %ebx
	movl	%ebx, %edi
	callq	_cpu_to_be32
	movq	(%r15), %rcx
	movq	%rax, 24(%rcx)
	movl	(%r13), %edi
	callq	_cpu_to_be32
	movq	(%r15), %rcx
	movq	%rax, 16(%rcx)
	xorl	%eax, %eax
	cmpq	$0, 24(%r13)
	setne	%al
	movl	%eax, (%rcx)
	movq	_ATOM_PPLIB_R600_FLAGS_PCIEGEN2@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%edx, %edx
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	andl	8(%rsi), %eax
	setne	%dl
	movl	%edx, 4(%rcx)
	cmpq	$0, 16(%r13)
	je	LBB0_3
## %bb.4:
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movslq	(%rbx), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_cypress_get_strobe_mode_settings
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rsi
	movl	%eax, 12(%rsi)
	movslq	(%rbx), %rax
	cmpq	%rax, 8(%r13)
	jge	LBB0_6
## %bb.5:
	movq	_SMC_MC_EDC_RD_FLAG@GOTPCREL(%rip), %rax
	movq	_SMC_MC_EDC_WR_FLAG@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	%ecx, 8(%rsi)
	jmp	LBB0_7
LBB0_3:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rsi
	jmp	LBB0_7
LBB0_6:
	movl	$0, 8(%rsi)
LBB0_7:
	leaq	184(%rsi), %rdi
	movl	$184, %edx
	callq	_memcpy
	movq	8(%r12), %rsi
	leaq	368(%rsi), %rdi
	movl	$184, %edx
	callq	_memcpy
	movq	_PPSMC_SWSTATE_FLAG_DC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r12)
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MC_CG_ARB_FREQ_F0,4,2          ## @MC_CG_ARB_FREQ_F0
	.comm	_ATOM_PPLIB_R600_FLAGS_PCIEGEN2,4,2 ## @ATOM_PPLIB_R600_FLAGS_PCIEGEN2
	.comm	_SMC_MC_EDC_RD_FLAG,4,2         ## @SMC_MC_EDC_RD_FLAG
	.comm	_SMC_MC_EDC_WR_FLAG,4,2         ## @SMC_MC_EDC_WR_FLAG
	.comm	_PPSMC_SWSTATE_FLAG_DC,4,2      ## @PPSMC_SWSTATE_FLAG_DC
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cypress_populate_smc_initial_state ; -- Begin function cypress_populate_smc_initial_state
	.p2align	2
_cypress_populate_smc_initial_state:    ; @cypress_populate_smc_initial_state
	.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, x2
	mov	x21, x0
	mov	x0, x1
	bl	_rv770_get_ps
	mov	x20, x0
	mov	x0, x21
	bl	_rv770_get_pi
	mov	x22, x0
	mov	x0, x21
	bl	_evergreen_get_pi
	mov	x23, x0
	ldr	w0, [x22, #32]
	bl	_cpu_to_be32
	mov	x24, x19
	ldr	x8, [x24, #8]!
	str	x0, [x8, #176]
	ldr	w0, [x22, #36]
	bl	_cpu_to_be32
	ldr	x8, [x24]
	str	x0, [x8, #168]
	ldr	w0, [x22, #40]
	bl	_cpu_to_be32
	ldr	x8, [x24]
	str	x0, [x8, #160]
	ldr	w0, [x22, #44]
	bl	_cpu_to_be32
	ldr	x8, [x24]
	str	x0, [x8, #152]
	ldr	w0, [x22, #48]
	bl	_cpu_to_be32
	ldr	x8, [x24]
	str	x0, [x8, #144]
	ldr	w0, [x22, #52]
	bl	_cpu_to_be32
	ldr	x8, [x24]
	str	x0, [x8, #136]
	ldr	w0, [x22, #56]
	bl	_cpu_to_be32
	ldr	x8, [x24]
	str	x0, [x8, #128]
	ldr	w0, [x22, #60]
	bl	_cpu_to_be32
	ldr	x8, [x24]
	str	x0, [x8, #120]
	ldr	w0, [x20]
	bl	_cpu_to_be32
	ldr	x8, [x24]
	str	x0, [x8, #112]
	ldr	w0, [x22, #64]
	bl	_cpu_to_be32
	ldr	x8, [x24]
	str	x0, [x8, #104]
	ldr	w0, [x22, #68]
	bl	_cpu_to_be32
	ldr	x8, [x24]
	str	x0, [x8, #96]
	ldr	w0, [x22, #72]
	bl	_cpu_to_be32
	ldr	x8, [x24]
	str	x0, [x8, #88]
	ldr	w0, [x22, #76]
	bl	_cpu_to_be32
	ldr	x8, [x24]
	str	x0, [x8, #80]
	ldr	w0, [x22, #80]
	bl	_cpu_to_be32
	ldr	x8, [x24]
	str	x0, [x8, #72]
	ldr	w0, [x20, #4]
	bl	_cpu_to_be32
	ldr	x8, [x24]
	str	x0, [x8, #64]
Lloh0:
	adrp	x9, _MC_CG_ARB_FREQ_F0@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MC_CG_ARB_FREQ_F0@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	str	w9, [x8, #56]
	str	xzr, [x8, #48]
	add	x1, x23, #16
	ldr	w2, [x20, #16]
	add	x3, x8, #40
	mov	x0, x21
	bl	_cypress_populate_voltage_value
	ldr	x8, [x23, #8]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	w2, [x20, #12]
	ldr	x8, [x24]
	add	x3, x8, #36
	mov	x0, x21
	mov	x1, x23
	bl	_cypress_populate_voltage_value
LBB0_2:
	ldr	x8, [x24]
	add	x1, x8, #32
	mov	x0, x21
	bl	_cypress_populate_initial_mvdd_value
	mov	w0, #65535
	bl	_CG_R
	mov	x23, x0
	mov	w0, #0
	bl	_CG_L
	orr	w0, w0, w23
	bl	_cpu_to_be32
	ldr	x8, [x24]
	str	x0, [x8, #24]
	ldr	w0, [x22]
	bl	_cpu_to_be32
	ldr	x8, [x24]
	str	x0, [x8, #16]
	ldr	x9, [x22, #24]
	cmp	x9, #0
	cset	w9, ne
	str	w9, [x8]
Lloh3:
	adrp	x9, _ATOM_PPLIB_R600_FLAGS_PCIEGEN2@GOTPAGE
Lloh4:
	ldr	x9, [x9, _ATOM_PPLIB_R600_FLAGS_PCIEGEN2@GOTPAGEOFF]
	ldr	w10, [x20, #8]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w10
	cset	w9, ne
	str	w9, [x8, #4]
	ldr	x8, [x22, #16]
	cbz	x8, LBB0_5
; %bb.3:
	ldrsw	x1, [x20]
	mov	x0, x21
	bl	_cypress_get_strobe_mode_settings
	ldr	x8, [x24]
	str	w0, [x8, #12]
	ldrsw	x9, [x20]
	ldr	x10, [x22, #8]
	cmp	x10, x9
	b.ge	LBB0_6
; %bb.4:
Lloh6:
	adrp	x9, _SMC_MC_EDC_RD_FLAG@GOTPAGE
Lloh7:
	ldr	x9, [x9, _SMC_MC_EDC_RD_FLAG@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
Lloh9:
	adrp	x10, _SMC_MC_EDC_WR_FLAG@GOTPAGE
Lloh10:
	ldr	x10, [x10, _SMC_MC_EDC_WR_FLAG@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	orr	w9, w10, w9
	str	w9, [x8, #8]
	b	LBB0_7
LBB0_5:
	ldr	x8, [x24]
	b	LBB0_7
LBB0_6:
	str	wzr, [x8, #8]
LBB0_7:
	add	x9, x8, #184
	ldp	q0, q1, [x8, #128]
	ldr	q2, [x8, #160]
	stp	q1, q2, [x9, #144]
	ldp	q1, q2, [x8, #64]
	stur	q1, [x8, #248]
	ldp	q1, q3, [x8, #96]
	stp	q2, q1, [x9, #80]
	ldr	x10, [x8, #176]
	str	x10, [x9, #176]
	stp	q3, q0, [x9, #112]
	ldp	q0, q1, [x8]
	stur	q0, [x8, #184]
	stur	q1, [x8, #200]
	ldp	q0, q1, [x8, #32]
	stur	q0, [x8, #216]
	stur	q1, [x8, #232]
	ldr	x8, [x19, #8]
	ldp	q0, q1, [x8]
	stp	q0, q1, [x8, #368]
	ldp	q0, q1, [x8, #32]
	stp	q0, q1, [x8, #400]
	ldp	q1, q0, [x8, #96]
	stp	q1, q0, [x8, #464]
	ldp	q1, q0, [x8, #64]
	stp	q1, q0, [x8, #432]
	ldr	x9, [x8, #176]
	str	x9, [x8, #544]
	ldr	q0, [x8, #160]
	str	q0, [x8, #528]
	ldp	q1, q0, [x8, #128]
Lloh12:
	adrp	x9, _PPSMC_SWSTATE_FLAG_DC@GOTPAGE
Lloh13:
	ldr	x9, [x9, _PPSMC_SWSTATE_FLAG_DC@GOTPAGEOFF]
	stp	q1, q0, [x8, #496]
Lloh14:
	ldr	w8, [x9]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
	mov	w0, #0
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_MC_CG_ARB_FREQ_F0,4,2          ; @MC_CG_ARB_FREQ_F0
	.comm	_ATOM_PPLIB_R600_FLAGS_PCIEGEN2,4,2 ; @ATOM_PPLIB_R600_FLAGS_PCIEGEN2
	.comm	_SMC_MC_EDC_RD_FLAG,4,2         ; @SMC_MC_EDC_RD_FLAG
	.comm	_SMC_MC_EDC_WR_FLAG,4,2         ; @SMC_MC_EDC_WR_FLAG
	.comm	_PPSMC_SWSTATE_FLAG_DC,4,2      ; @PPSMC_SWSTATE_FLAG_DC
.subsections_via_symbols
