	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cypress_upload_sw_state        ## -- Begin function cypress_upload_sw_state
	.p2align	4, 0x90
_cypress_upload_sw_state:               ## @cypress_upload_sw_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %rbx
	callq	_rv770_get_pi
	movq	%rax, %r14
	movq	8(%rax), %r13
	movq	_RV770_SMC_STATETABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_driverState@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_offsetof
	movq	%rax, %r15
	movl	$0, -48(%rbp)
	leaq	-48(%rbp), %rdx
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_cypress_convert_power_state_to_smc
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	addq	%r13, %r15
	movl	(%r14), %r8d
	leaq	-48(%rbp), %rdx
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movl	$4, %ecx
	callq	_rv770_copy_bytes_to_smc
LBB0_2:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RV770_SMC_STATETABLE,4,2       ## @RV770_SMC_STATETABLE
	.comm	_driverState,4,2                ## @driverState
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cypress_upload_sw_state        ; -- Begin function cypress_upload_sw_state
	.p2align	2
_cypress_upload_sw_state:               ; @cypress_upload_sw_state
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x22, x1
	mov	x19, x0
	bl	_rv770_get_pi
	mov	x20, x0
	ldr	x23, [x0, #8]
Lloh0:
	adrp	x8, _RV770_SMC_STATETABLE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RV770_SMC_STATETABLE@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _driverState@GOTPAGE
Lloh4:
	ldr	x8, [x8, _driverState@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_offsetof
	mov	x21, x0
	str	wzr, [sp, #8]
	add	x2, sp, #8
	mov	x0, x19
	mov	x1, x22
	bl	_cypress_convert_power_state_to_smc
	cbnz	w0, LBB0_2
; %bb.1:
	add	x1, x21, x23
	ldr	w4, [x20]
	add	x2, sp, #8
	mov	x0, x19
	mov	w3, #4
	bl	_rv770_copy_bytes_to_smc
LBB0_2:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_RV770_SMC_STATETABLE,4,2       ; @RV770_SMC_STATETABLE
	.comm	_driverState,4,2                ; @driverState
.subsections_via_symbols
