	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ci_dpm_set_power_state         ## -- Begin function ci_dpm_set_power_state
	.p2align	4, 0x90
_ci_dpm_set_power_state:                ## @ci_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	_ci_get_pi
	movq	%rax, %r13
	leaq	20(%rax), %r15
	leaq	16(%rax), %r12
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_ci_find_dpm_states_clocks_in_dpm_table
	cmpq	$0, (%r13)
	je	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	callq	_ci_request_link_speed_change_before_state_change
LBB0_2:
	movq	%rbx, %rdi
	callq	_ci_freeze_sclk_mclk_dpm
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %r14d
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_12
LBB0_4:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_ci_populate_and_upload_sclk_mclk_dpm_levels
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %r14d
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_12
LBB0_6:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_ci_generate_dpm_level_enable_mask
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movl	%eax, %r14d
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_12
LBB0_8:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	callq	_ci_update_vce_dpm
	testl	%eax, %eax
	je	LBB0_10
## %bb.9:
	movl	%eax, %r14d
	leaq	L_.str.3(%rip), %rdi
	jmp	LBB0_12
LBB0_10:
	movq	%rbx, %rdi
	callq	_ci_update_sclk_t
	testl	%eax, %eax
	je	LBB0_14
## %bb.11:
	movl	%eax, %r14d
	leaq	L_.str.4(%rip), %rdi
LBB0_12:
	callq	_DRM_ERROR
LBB0_13:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	cmpq	$0, 8(%r13)
	je	LBB0_17
## %bb.15:
	movq	%rbx, %rdi
	callq	_ci_update_and_upload_mc_reg_table
	testl	%eax, %eax
	je	LBB0_17
## %bb.16:
	movl	%eax, %r14d
	leaq	L_.str.5(%rip), %rdi
	jmp	LBB0_12
LBB0_17:
	movq	%rbx, %rdi
	callq	_ci_program_memory_timing_parameters
	testl	%eax, %eax
	je	LBB0_19
## %bb.18:
	movl	%eax, %r14d
	leaq	L_.str.6(%rip), %rdi
	jmp	LBB0_12
LBB0_19:
	movq	%rbx, %rdi
	callq	_ci_unfreeze_sclk_mclk_dpm
	testl	%eax, %eax
	je	LBB0_21
## %bb.20:
	movl	%eax, %r14d
	leaq	L_.str.7(%rip), %rdi
	jmp	LBB0_12
LBB0_21:
	movq	%rbx, %rdi
	callq	_ci_upload_dpm_level_enable_mask
	testl	%eax, %eax
	je	LBB0_23
## %bb.22:
	movl	%eax, %r14d
	leaq	L_.str.8(%rip), %rdi
	jmp	LBB0_12
LBB0_23:
	xorl	%r14d, %r14d
	cmpq	$0, (%r13)
	je	LBB0_13
## %bb.24:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	callq	_ci_notify_link_speed_change_after_state_change
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ci_freeze_sclk_mclk_dpm failed\n"

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

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

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

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

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

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

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

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

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ci_dpm_set_power_state         ; -- Begin function ci_dpm_set_power_state
	.p2align	2
_ci_dpm_set_power_state:                ; @ci_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	x20, x0
	bl	_ci_get_pi
	mov	x22, x0
	add	x21, x0, #20
	mov	x0, x20
	mov	x1, x21
	bl	_ci_find_dpm_states_clocks_in_dpm_table
	mov	x23, x22
	ldr	x8, [x23], #16
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, x20
	mov	x1, x21
	mov	x2, x23
	bl	_ci_request_link_speed_change_before_state_change
LBB0_2:
	mov	x0, x20
	bl	_ci_freeze_sclk_mclk_dpm
	cbz	w0, LBB0_4
; %bb.3:
	mov	x19, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_12
LBB0_4:
	mov	x0, x20
	mov	x1, x21
	bl	_ci_populate_and_upload_sclk_mclk_dpm_levels
	cbz	w0, LBB0_6
; %bb.5:
	mov	x19, x0
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_12
LBB0_6:
	mov	x0, x20
	mov	x1, x21
	bl	_ci_generate_dpm_level_enable_mask
	cbz	w0, LBB0_8
; %bb.7:
	mov	x19, x0
Lloh4:
	adrp	x0, l_.str.2@PAGE
Lloh5:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_12
LBB0_8:
	mov	x0, x20
	mov	x1, x21
	mov	x2, x23
	bl	_ci_update_vce_dpm
	cbz	w0, LBB0_10
; %bb.9:
	mov	x19, x0
Lloh6:
	adrp	x0, l_.str.3@PAGE
Lloh7:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_12
LBB0_10:
	mov	x0, x20
	bl	_ci_update_sclk_t
	cbz	w0, LBB0_14
; %bb.11:
	mov	x19, 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, x19
	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, [x22, #8]
	cbz	x8, LBB0_17
; %bb.15:
	mov	x0, x20
	bl	_ci_update_and_upload_mc_reg_table
	cbz	w0, LBB0_17
; %bb.16:
	mov	x19, x0
Lloh10:
	adrp	x0, l_.str.5@PAGE
Lloh11:
	add	x0, x0, l_.str.5@PAGEOFF
	b	LBB0_12
LBB0_17:
	mov	x0, x20
	bl	_ci_program_memory_timing_parameters
	cbz	w0, LBB0_19
; %bb.18:
	mov	x19, x0
Lloh12:
	adrp	x0, l_.str.6@PAGE
Lloh13:
	add	x0, x0, l_.str.6@PAGEOFF
	b	LBB0_12
LBB0_19:
	mov	x0, x20
	bl	_ci_unfreeze_sclk_mclk_dpm
	cbz	w0, LBB0_21
; %bb.20:
	mov	x19, x0
Lloh14:
	adrp	x0, l_.str.7@PAGE
Lloh15:
	add	x0, x0, l_.str.7@PAGEOFF
	b	LBB0_12
LBB0_21:
	mov	x0, x20
	bl	_ci_upload_dpm_level_enable_mask
	cbz	w0, LBB0_23
; %bb.22:
	mov	x19, x0
Lloh16:
	adrp	x0, l_.str.8@PAGE
Lloh17:
	add	x0, x0, l_.str.8@PAGEOFF
	b	LBB0_12
LBB0_23:
	ldr	x8, [x22]
	cbz	x8, LBB0_25
; %bb.24:
	mov	x0, x20
	mov	x1, x21
	mov	x2, x23
	bl	_ci_notify_link_speed_change_after_state_change
LBB0_25:
	mov	w19, #0
	b	LBB0_13
	.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
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ci_freeze_sclk_mclk_dpm failed\n"

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

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

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

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

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

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

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

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

.subsections_via_symbols
