	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ni_dpm_set_power_state         ## -- Begin function ni_dpm_set_power_state
	.p2align	4, 0x90
_ni_dpm_set_power_state:                ## @ni_dpm_set_power_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	%rdi, %r12
	callq	_evergreen_get_pi
	movq	%rax, %r14
	movq	%r12, %rdi
	callq	_ni_restrict_performance_levels_before_switch
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %r13
	jmp	LBB0_25
LBB0_2:
	leaq	20(%r14), %r15
	leaq	16(%r14), %r13
	movq	%r12, %rdi
	movq	%r15, %rsi
	movq	%r13, %rdx
	callq	_ni_set_uvd_clock_before_set_eng_clock
	movq	%r12, %rdi
	movq	%r15, %rsi
	xorl	%edx, %edx
	callq	_ni_enable_power_containment
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rax
	testl	%ebx, %ebx
	je	LBB0_4
## %bb.3:
	movq	%rax, %r13
	jmp	LBB0_25
LBB0_4:
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	movq	%r15, %rsi
	xorl	%edx, %edx
	callq	_ni_enable_smc_cac
	leaq	L_.str.2(%rip), %r13
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %ebx
	jmp	LBB0_25
LBB0_6:
	movq	%r12, %rdi
	callq	_rv770_halt_smc
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movl	%eax, %ebx
	leaq	L_.str.3(%rip), %r13
	jmp	LBB0_25
LBB0_8:
	cmpq	$0, 8(%r14)
	je	LBB0_10
## %bb.9:
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_btc_notify_uvd_to_smc
LBB0_10:
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_ni_upload_sw_state
	testl	%eax, %eax
	je	LBB0_12
## %bb.11:
	movl	%eax, %ebx
	leaq	L_.str.4(%rip), %r13
LBB0_25:
	movq	%r13, %rdi
	callq	_DRM_ERROR
LBB0_26:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	cmpq	$0, (%r14)
	je	LBB0_15
## %bb.13:
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_ni_upload_mc_reg_table
	testl	%eax, %eax
	je	LBB0_15
## %bb.14:
	movl	%eax, %ebx
	leaq	L_.str.5(%rip), %r13
	jmp	LBB0_25
LBB0_15:
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_ni_program_memory_timing_parameters
	testl	%eax, %eax
	je	LBB0_17
## %bb.16:
	movl	%eax, %ebx
	leaq	L_.str.6(%rip), %r13
	jmp	LBB0_25
LBB0_17:
	movq	%r12, %rdi
	callq	_rv770_resume_smc
	testl	%eax, %eax
	je	LBB0_19
## %bb.18:
	movl	%eax, %ebx
	leaq	L_.str.7(%rip), %r13
	jmp	LBB0_25
LBB0_19:
	movq	%r12, %rdi
	callq	_rv770_set_sw_state
	testl	%eax, %eax
	je	LBB0_21
## %bb.20:
	movl	%eax, %ebx
	leaq	L_.str.8(%rip), %r13
	jmp	LBB0_25
LBB0_21:
	movq	%r12, %rdi
	movq	%r15, %rsi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	callq	_ni_set_uvd_clock_after_set_eng_clock
	movq	%r12, %rdi
	movq	%r15, %rsi
	movl	$1, %edx
	callq	_ni_enable_smc_cac
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_25
## %bb.22:
	movq	%r12, %rdi
	movq	%r15, %rsi
	movl	$1, %edx
	callq	_ni_enable_power_containment
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %r13
	testl	%eax, %eax
	jne	LBB0_25
## %bb.23:
	movq	%r12, %rdi
	callq	_ni_power_control_set_level
	testl	%eax, %eax
	je	LBB0_27
## %bb.24:
	movl	%eax, %ebx
	leaq	L_.str.9(%rip), %r13
	jmp	LBB0_25
LBB0_27:
	xorl	%ebx, %ebx
	jmp	LBB0_26
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ni_restrict_performance_levels_before_switch failed\n"

L_.str.1:                               ## @.str.1
	.asciz	"ni_enable_power_containment failed\n"

L_.str.2:                               ## @.str.2
	.asciz	"ni_enable_smc_cac failed\n"

L_.str.3:                               ## @.str.3
	.asciz	"rv770_halt_smc failed\n"

L_.str.4:                               ## @.str.4
	.asciz	"ni_upload_sw_state failed\n"

L_.str.5:                               ## @.str.5
	.asciz	"ni_upload_mc_reg_table failed\n"

L_.str.6:                               ## @.str.6
	.asciz	"ni_program_memory_timing_parameters failed\n"

L_.str.7:                               ## @.str.7
	.asciz	"rv770_resume_smc failed\n"

L_.str.8:                               ## @.str.8
	.asciz	"rv770_set_sw_state failed\n"

L_.str.9:                               ## @.str.9
	.asciz	"ni_power_control_set_level failed\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ni_dpm_set_power_state         ; -- Begin function ni_dpm_set_power_state
	.p2align	2
_ni_dpm_set_power_state:                ; @ni_dpm_set_power_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, x0
	bl	_evergreen_get_pi
	mov	x23, x0
	mov	x0, x19
	bl	_ni_restrict_performance_levels_before_switch
	cbz	w0, LBB0_2
; %bb.1:
	mov	x20, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_12
LBB0_2:
	add	x21, x23, #20
	add	x22, x23, #16
	mov	x0, x19
	mov	x1, x21
	mov	x2, x22
	bl	_ni_set_uvd_clock_before_set_eng_clock
	mov	x0, x19
	mov	x1, x21
	mov	w2, #0
	bl	_ni_enable_power_containment
	cbz	w0, LBB0_4
LBB0_3:
	mov	x20, x0
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_12
LBB0_4:
	mov	x0, x19
	mov	x1, x21
	mov	w2, #0
	bl	_ni_enable_smc_cac
	cbz	w0, LBB0_6
LBB0_5:
	mov	x20, x0
Lloh4:
	adrp	x0, l_.str.2@PAGE
Lloh5:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_12
LBB0_6:
	mov	x0, x19
	bl	_rv770_halt_smc
	cbz	w0, LBB0_8
; %bb.7:
	mov	x20, x0
Lloh6:
	adrp	x0, l_.str.3@PAGE
Lloh7:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_12
LBB0_8:
	ldr	x8, [x23, #8]
	cbz	x8, LBB0_10
; %bb.9:
	mov	x0, x19
	mov	x1, x21
	bl	_btc_notify_uvd_to_smc
LBB0_10:
	mov	x0, x19
	mov	x1, x21
	bl	_ni_upload_sw_state
	cbz	w0, LBB0_14
; %bb.11:
	mov	x20, x0
Lloh8:
	adrp	x0, l_.str.4@PAGE
Lloh9:
	add	x0, x0, l_.str.4@PAGEOFF
LBB0_12:
	bl	_DRM_ERROR
LBB0_13:
	mov	x0, x20
	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
LBB0_14:
	ldr	x8, [x23]
	cbz	x8, LBB0_17
; %bb.15:
	mov	x0, x19
	mov	x1, x21
	bl	_ni_upload_mc_reg_table
	cbz	w0, LBB0_17
; %bb.16:
	mov	x20, x0
Lloh10:
	adrp	x0, l_.str.5@PAGE
Lloh11:
	add	x0, x0, l_.str.5@PAGEOFF
	b	LBB0_12
LBB0_17:
	mov	x0, x19
	mov	x1, x21
	bl	_ni_program_memory_timing_parameters
	cbz	w0, LBB0_19
; %bb.18:
	mov	x20, x0
Lloh12:
	adrp	x0, l_.str.6@PAGE
Lloh13:
	add	x0, x0, l_.str.6@PAGEOFF
	b	LBB0_12
LBB0_19:
	mov	x0, x19
	bl	_rv770_resume_smc
	cbz	w0, LBB0_21
; %bb.20:
	mov	x20, x0
Lloh14:
	adrp	x0, l_.str.7@PAGE
Lloh15:
	add	x0, x0, l_.str.7@PAGEOFF
	b	LBB0_12
LBB0_21:
	mov	x0, x19
	bl	_rv770_set_sw_state
	cbz	w0, LBB0_23
; %bb.22:
	mov	x20, x0
Lloh16:
	adrp	x0, l_.str.8@PAGE
Lloh17:
	add	x0, x0, l_.str.8@PAGEOFF
	b	LBB0_12
LBB0_23:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x22
	bl	_ni_set_uvd_clock_after_set_eng_clock
	mov	x0, x19
	mov	x1, x21
	mov	w2, #1
	bl	_ni_enable_smc_cac
	cbnz	w0, LBB0_5
; %bb.24:
	mov	x0, x19
	mov	x1, x21
	mov	w2, #1
	bl	_ni_enable_power_containment
	cbnz	w0, LBB0_3
; %bb.25:
	mov	x0, x19
	bl	_ni_power_control_set_level
	mov	x20, x0
	cbz	w0, LBB0_13
; %bb.26:
Lloh18:
	adrp	x0, l_.str.9@PAGE
Lloh19:
	add	x0, x0, l_.str.9@PAGEOFF
	b	LBB0_12
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ni_restrict_performance_levels_before_switch failed\n"

l_.str.1:                               ; @.str.1
	.asciz	"ni_enable_power_containment failed\n"

l_.str.2:                               ; @.str.2
	.asciz	"ni_enable_smc_cac failed\n"

l_.str.3:                               ; @.str.3
	.asciz	"rv770_halt_smc failed\n"

l_.str.4:                               ; @.str.4
	.asciz	"ni_upload_sw_state failed\n"

l_.str.5:                               ; @.str.5
	.asciz	"ni_upload_mc_reg_table failed\n"

l_.str.6:                               ; @.str.6
	.asciz	"ni_program_memory_timing_parameters failed\n"

l_.str.7:                               ; @.str.7
	.asciz	"rv770_resume_smc failed\n"

l_.str.8:                               ; @.str.8
	.asciz	"rv770_set_sw_state failed\n"

l_.str.9:                               ; @.str.9
	.asciz	"ni_power_control_set_level failed\n"

.subsections_via_symbols
