	.file	"extr_ni_dpm.c_ni_dpm_set_power_state.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"ni_restrict_performance_levels_before_switch failed\n"
	.align 8
.LC1:
	.string	"ni_enable_power_containment failed\n"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC2:
	.string	"ni_enable_smc_cac failed\n"
.LC3:
	.string	"rv770_halt_smc failed\n"
.LC4:
	.string	"ni_upload_sw_state failed\n"
	.section	.rodata.str1.8
	.align 8
.LC5:
	.string	"ni_upload_mc_reg_table failed\n"
	.align 8
.LC6:
	.string	"ni_program_memory_timing_parameters failed\n"
	.section	.rodata.str1.1
.LC7:
	.string	"rv770_resume_smc failed\n"
.LC8:
	.string	"rv770_set_sw_state failed\n"
	.section	.rodata.str1.8
	.align 8
.LC9:
	.string	"ni_power_control_set_level failed\n"
	.text
	.p2align 4
	.globl	ni_dpm_set_power_state
	.type	ni_dpm_set_power_state, @function
ni_dpm_set_power_state:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	call	evergreen_get_pi@PLT
	mov	rdi, rbp
	mov	rbx, rax
	call	ni_restrict_performance_levels_before_switch@PLT
	test	eax, eax
	jne	.L25
	lea	r13, 20[rbx]
	lea	r14, 16[rbx]
	mov	rdi, rbp
	mov	rdx, r14
	mov	rsi, r13
	call	ni_set_uvd_clock_before_set_eng_clock@PLT
	xor	edx, edx
	mov	rsi, r13
	mov	rdi, rbp
	call	ni_enable_power_containment@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L22
	xor	edx, edx
	mov	rsi, r13
	mov	rdi, rbp
	call	ni_enable_smc_cac@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L23
	mov	rdi, rbp
	call	rv770_halt_smc@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L26
	cmp	QWORD PTR 8[rbx], 0
	jne	.L27
.L7:
	mov	rsi, r13
	mov	rdi, rbp
	call	ni_upload_sw_state@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L28
	cmp	QWORD PTR [rbx], 0
	je	.L9
	mov	rsi, r13
	mov	rdi, rbp
	call	ni_upload_mc_reg_table@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L29
.L9:
	mov	rsi, r13
	mov	rdi, rbp
	call	ni_program_memory_timing_parameters@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L30
	mov	rdi, rbp
	call	rv770_resume_smc@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L31
	mov	rdi, rbp
	call	rv770_set_sw_state@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L32
	mov	rdx, r14
	mov	rsi, r13
	mov	rdi, rbp
	call	ni_set_uvd_clock_after_set_eng_clock@PLT
	mov	edx, 1
	mov	rsi, r13
	mov	rdi, rbp
	call	ni_enable_smc_cac@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L23
	mov	edx, 1
	mov	rsi, r13
	mov	rdi, rbp
	call	ni_enable_power_containment@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L22
	mov	rdi, rbp
	call	ni_power_control_set_level@PLT
	mov	r12d, eax
	test	eax, eax
	je	.L1
	lea	rdi, .LC9[rip]
	call	DRM_ERROR@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L22:
	lea	rdi, .LC1[rip]
	call	DRM_ERROR@PLT
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L25:
	.cfi_restore_state
	mov	r12d, eax
	lea	rdi, .LC0[rip]
	call	DRM_ERROR@PLT
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L27:
	.cfi_restore_state
	mov	rsi, r13
	mov	rdi, rbp
	call	btc_notify_uvd_to_smc@PLT
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L23:
	lea	rdi, .LC2[rip]
	call	DRM_ERROR@PLT
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L26:
	.cfi_restore_state
	lea	rdi, .LC3[rip]
	call	DRM_ERROR@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L30:
	lea	rdi, .LC6[rip]
	call	DRM_ERROR@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L28:
	lea	rdi, .LC4[rip]
	call	DRM_ERROR@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L32:
	lea	rdi, .LC8[rip]
	call	DRM_ERROR@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L31:
	lea	rdi, .LC7[rip]
	call	DRM_ERROR@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L29:
	lea	rdi, .LC5[rip]
	call	DRM_ERROR@PLT
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	ni_dpm_set_power_state, .-ni_dpm_set_power_state
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_ni_dpm.c_ni_dpm_set_power_state.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"ni_restrict_performance_levels_before_switch failed"
	.ascii	"\012\000"
	.align	2
.LC1:
	.ascii	"ni_enable_power_containment failed\012\000"
	.align	2
.LC2:
	.ascii	"ni_enable_smc_cac failed\012\000"
	.align	2
.LC3:
	.ascii	"rv770_halt_smc failed\012\000"
	.align	2
.LC4:
	.ascii	"ni_upload_sw_state failed\012\000"
	.align	2
.LC5:
	.ascii	"ni_upload_mc_reg_table failed\012\000"
	.align	2
.LC6:
	.ascii	"ni_program_memory_timing_parameters failed\012\000"
	.align	2
.LC7:
	.ascii	"rv770_resume_smc failed\012\000"
	.align	2
.LC8:
	.ascii	"rv770_set_sw_state failed\012\000"
	.align	2
.LC9:
	.ascii	"ni_power_control_set_level failed\012\000"
	.text
	.align	2
	.global	ni_dpm_set_power_state
	.syntax unified
	.arm
	.fpu softvfp
	.type	ni_dpm_set_power_state, %function
ni_dpm_set_power_state:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r5, r0
	bl	evergreen_get_pi
	mov	r6, r0
	mov	r0, r5
	bl	ni_restrict_performance_levels_before_switch
	subs	r4, r0, #0
	bne	.L31
	add	r7, r6, #12
	add	r8, r6, #8
	mov	r1, r7
	mov	r2, r8
	mov	r0, r5
	bl	ni_set_uvd_clock_before_set_eng_clock
	mov	r2, r4
	mov	r1, r7
	mov	r0, r5
	bl	ni_enable_power_containment
	subs	r4, r0, #0
	bne	.L28
	mov	r2, r4
	mov	r1, r7
	mov	r0, r5
	bl	ni_enable_smc_cac
	subs	r4, r0, #0
	bne	.L29
	mov	r0, r5
	bl	rv770_halt_smc
	subs	r4, r0, #0
	bne	.L32
	ldr	r3, [r6, #4]
	cmp	r3, #0
	bne	.L33
.L7:
	mov	r1, r7
	mov	r0, r5
	bl	ni_upload_sw_state
	subs	r4, r0, #0
	bne	.L34
	ldr	r3, [r6]
	cmp	r3, #0
	beq	.L9
	mov	r1, r7
	mov	r0, r5
	bl	ni_upload_mc_reg_table
	subs	r4, r0, #0
	bne	.L35
.L9:
	mov	r1, r7
	mov	r0, r5
	bl	ni_program_memory_timing_parameters
	subs	r4, r0, #0
	bne	.L36
	mov	r0, r5
	bl	rv770_resume_smc
	subs	r4, r0, #0
	bne	.L37
	mov	r0, r5
	bl	rv770_set_sw_state
	subs	r4, r0, #0
	bne	.L38
	mov	r2, r8
	mov	r1, r7
	mov	r0, r5
	bl	ni_set_uvd_clock_after_set_eng_clock
	mov	r2, #1
	mov	r1, r7
	mov	r0, r5
	bl	ni_enable_smc_cac
	subs	r4, r0, #0
	bne	.L29
	mov	r1, r7
	mov	r2, #1
	mov	r0, r5
	bl	ni_enable_power_containment
	subs	r4, r0, #0
	bne	.L28
	mov	r0, r5
	bl	ni_power_control_set_level
	subs	r4, r0, #0
	beq	.L1
	ldr	r0, .L39
	bl	DRM_ERROR
	b	.L1
.L28:
	ldr	r0, .L39+4
	bl	DRM_ERROR
.L1:
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L31:
	ldr	r0, .L39+8
	bl	DRM_ERROR
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L33:
	mov	r1, r7
	mov	r0, r5
	bl	btc_notify_uvd_to_smc
	b	.L7
.L29:
	ldr	r0, .L39+12
	bl	DRM_ERROR
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L32:
	ldr	r0, .L39+16
	bl	DRM_ERROR
	b	.L1
.L36:
	ldr	r0, .L39+20
	bl	DRM_ERROR
	b	.L1
.L34:
	ldr	r0, .L39+24
	bl	DRM_ERROR
	b	.L1
.L38:
	ldr	r0, .L39+28
	bl	DRM_ERROR
	b	.L1
.L37:
	ldr	r0, .L39+32
	bl	DRM_ERROR
	b	.L1
.L35:
	ldr	r0, .L39+36
	bl	DRM_ERROR
	b	.L1
.L40:
	.align	2
.L39:
	.word	.LC9
	.word	.LC1
	.word	.LC0
	.word	.LC2
	.word	.LC3
	.word	.LC6
	.word	.LC4
	.word	.LC8
	.word	.LC7
	.word	.LC5
	.size	ni_dpm_set_power_state, .-ni_dpm_set_power_state
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
