	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_btc_dpm_set_power_state        ## -- Begin function btc_dpm_set_power_state
	.p2align	4, 0x90
_btc_dpm_set_power_state:               ## @btc_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, %rbx
	callq	_evergreen_get_pi
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_btc_disable_ulv
	movq	%rbx, %rdi
	callq	_btc_set_boot_state_timing
	movq	%rbx, %rdi
	callq	_rv770_restrict_performance_levels_before_switch
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %r13d
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_21
LBB0_2:
	leaq	28(%r14), %r15
	movq	%r14, %r12
	addq	$24, %r12
	cmpq	$0, (%r14)
	je	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	callq	_cypress_notify_link_speed_change_before_state_change
LBB0_4:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	callq	_rv770_set_uvd_clock_before_set_eng_clock
	movq	%rbx, %rdi
	callq	_rv770_halt_smc
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %r13d
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_21
LBB0_6:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_btc_set_at_for_uvd
	cmpq	$0, 16(%r14)
	je	LBB0_8
## %bb.7:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_btc_notify_uvd_to_smc
LBB0_8:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_cypress_upload_sw_state
	testl	%eax, %eax
	je	LBB0_10
## %bb.9:
	movl	%eax, %r13d
	leaq	L_.str.2(%rip), %rdi
LBB0_21:
	callq	_DRM_ERROR
LBB0_22:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	cmpq	$0, 8(%r14)
	je	LBB0_13
## %bb.11:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_cypress_upload_mc_reg_table
	testl	%eax, %eax
	je	LBB0_13
## %bb.12:
	movl	%eax, %r13d
	leaq	L_.str.3(%rip), %rdi
	jmp	LBB0_21
LBB0_13:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_cypress_program_memory_timing_parameters
	movq	%rbx, %rdi
	callq	_rv770_resume_smc
	testl	%eax, %eax
	je	LBB0_15
## %bb.14:
	movl	%eax, %r13d
	leaq	L_.str.4(%rip), %rdi
	jmp	LBB0_21
LBB0_15:
	movq	%rbx, %rdi
	callq	_rv770_set_sw_state
	testl	%eax, %eax
	je	LBB0_17
## %bb.16:
	movl	%eax, %r13d
	leaq	L_.str.5(%rip), %rdi
	jmp	LBB0_21
LBB0_17:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	callq	_rv770_set_uvd_clock_after_set_eng_clock
	cmpq	$0, (%r14)
	je	LBB0_19
## %bb.18:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	callq	_cypress_notify_link_speed_change_after_state_change
LBB0_19:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_btc_set_power_state_conditionally_enable_ulv
	testl	%eax, %eax
	je	LBB0_23
## %bb.20:
	movl	%eax, %r13d
	leaq	L_.str.6(%rip), %rdi
	jmp	LBB0_21
LBB0_23:
	xorl	%r13d, %r13d
	jmp	LBB0_22
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"rv770_restrict_performance_levels_before_switch failed\n"

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

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

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

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

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

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

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_btc_dpm_set_power_state        ; -- Begin function btc_dpm_set_power_state
	.p2align	2
_btc_dpm_set_power_state:               ; @btc_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	x20, x0
	mov	x0, x19
	bl	_btc_disable_ulv
	mov	x0, x19
	bl	_btc_set_boot_state_timing
	mov	x0, x19
	bl	_rv770_restrict_performance_levels_before_switch
	cbz	w0, LBB0_2
; %bb.1:
	mov	x23, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_10
LBB0_2:
	add	x21, x20, #28
	add	x22, x20, #24
	ldr	x8, [x20]
	cbz	x8, LBB0_4
; %bb.3:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x22
	bl	_cypress_notify_link_speed_change_before_state_change
LBB0_4:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x22
	bl	_rv770_set_uvd_clock_before_set_eng_clock
	mov	x0, x19
	bl	_rv770_halt_smc
	cbz	w0, LBB0_6
; %bb.5:
	mov	x23, x0
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_10
LBB0_6:
	mov	x0, x19
	mov	x1, x21
	bl	_btc_set_at_for_uvd
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_8
; %bb.7:
	mov	x0, x19
	mov	x1, x21
	bl	_btc_notify_uvd_to_smc
LBB0_8:
	mov	x0, x19
	mov	x1, x21
	bl	_cypress_upload_sw_state
	cbz	w0, LBB0_12
; %bb.9:
	mov	x23, x0
Lloh4:
	adrp	x0, l_.str.2@PAGE
Lloh5:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_10:
	bl	_DRM_ERROR
LBB0_11:
	mov	x0, x23
	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_12:
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_15
; %bb.13:
	mov	x0, x19
	mov	x1, x21
	bl	_cypress_upload_mc_reg_table
	cbz	w0, LBB0_15
; %bb.14:
	mov	x23, x0
Lloh6:
	adrp	x0, l_.str.3@PAGE
Lloh7:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_10
LBB0_15:
	mov	x0, x19
	mov	x1, x21
	bl	_cypress_program_memory_timing_parameters
	mov	x0, x19
	bl	_rv770_resume_smc
	cbz	w0, LBB0_17
; %bb.16:
	mov	x23, x0
Lloh8:
	adrp	x0, l_.str.4@PAGE
Lloh9:
	add	x0, x0, l_.str.4@PAGEOFF
	b	LBB0_10
LBB0_17:
	mov	x0, x19
	bl	_rv770_set_sw_state
	cbz	w0, LBB0_19
; %bb.18:
	mov	x23, x0
Lloh10:
	adrp	x0, l_.str.5@PAGE
Lloh11:
	add	x0, x0, l_.str.5@PAGEOFF
	b	LBB0_10
LBB0_19:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x22
	bl	_rv770_set_uvd_clock_after_set_eng_clock
	ldr	x8, [x20]
	cbz	x8, LBB0_21
; %bb.20:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x22
	bl	_cypress_notify_link_speed_change_after_state_change
LBB0_21:
	mov	x0, x19
	mov	x1, x21
	bl	_btc_set_power_state_conditionally_enable_ulv
	mov	x23, x0
	cbz	w0, LBB0_11
; %bb.22:
Lloh12:
	adrp	x0, l_.str.6@PAGE
Lloh13:
	add	x0, x0, l_.str.6@PAGEOFF
	b	LBB0_10
	.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
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"rv770_restrict_performance_levels_before_switch failed\n"

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

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

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

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

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

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

.subsections_via_symbols
