	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ci_dpm_enable                  ## -- Begin function ci_dpm_enable
	.p2align	4, 0x90
_ci_dpm_enable:                         ## @ci_dpm_enable
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_ci_get_pi
	movq	%rax, %r12
	movq	(%rbx), %r14
	movq	%rbx, %rdi
	callq	_ci_is_smc_running
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_23
LBB0_2:
	movq	(%r12), %rax
	movq	_CISLANDS_VOLTAGE_CONTROL_NONE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_5
## %bb.3:
	movq	%rbx, %rdi
	callq	_ci_enable_voltage_control
	movq	%rbx, %rdi
	callq	_ci_construct_voltage_tables
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	%eax, %r15d
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_22
LBB0_5:
	cmpl	$0, 8(%r12)
	je	LBB0_8
## %bb.6:
	movq	%rbx, %rdi
	callq	_ci_initialize_mc_reg_table
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movl	$0, 8(%r12)
LBB0_8:
	cmpq	$0, 24(%r12)
	je	LBB0_10
## %bb.9:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_ci_enable_spread_spectrum
LBB0_10:
	cmpq	$0, 16(%r12)
	je	LBB0_12
## %bb.11:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_ci_enable_thermal_protection
LBB0_12:
	movq	%rbx, %rdi
	callq	_ci_program_sstp
	movq	%rbx, %rdi
	callq	_ci_enable_display_gap
	movq	%rbx, %rdi
	callq	_ci_program_vc
	movq	%rbx, %rdi
	callq	_ci_upload_firmware
	testl	%eax, %eax
	je	LBB0_14
## %bb.13:
	movl	%eax, %r15d
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_22
LBB0_14:
	movq	%rbx, %rdi
	callq	_ci_process_firmware_header
	testl	%eax, %eax
	je	LBB0_16
## %bb.15:
	movl	%eax, %r15d
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_22
LBB0_16:
	movq	%rbx, %rdi
	callq	_ci_initial_switch_from_arb_f0_to_f1
	testl	%eax, %eax
	je	LBB0_18
## %bb.17:
	movl	%eax, %r15d
	leaq	L_.str.3(%rip), %rdi
	jmp	LBB0_22
LBB0_18:
	movq	%rbx, %rdi
	callq	_ci_init_smc_table
	testl	%eax, %eax
	je	LBB0_20
## %bb.19:
	movl	%eax, %r15d
	leaq	L_.str.4(%rip), %rdi
	jmp	LBB0_22
LBB0_20:
	movq	%rbx, %rdi
	callq	_ci_init_arb_table_index
	testl	%eax, %eax
	je	LBB0_24
## %bb.21:
	movl	%eax, %r15d
	leaq	L_.str.5(%rip), %rdi
LBB0_22:
	callq	_DRM_ERROR
LBB0_23:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_24:
	cmpl	$0, 8(%r12)
	je	LBB0_27
## %bb.25:
	movq	%rbx, %rdi
	callq	_ci_populate_initial_mc_reg_table
	testl	%eax, %eax
	je	LBB0_27
## %bb.26:
	movl	%eax, %r15d
	leaq	L_.str.6(%rip), %rdi
	jmp	LBB0_22
LBB0_27:
	movq	%rbx, %rdi
	callq	_ci_populate_pm_base
	testl	%eax, %eax
	je	LBB0_29
## %bb.28:
	movl	%eax, %r15d
	leaq	L_.str.7(%rip), %rdi
	jmp	LBB0_22
LBB0_29:
	movq	%rbx, %rdi
	callq	_ci_dpm_start_smc
	movq	%rbx, %rdi
	callq	_ci_enable_vr_hot_gpio_interrupt
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_ci_notify_smc_display_change
	testl	%eax, %eax
	je	LBB0_31
## %bb.30:
	movl	%eax, %r15d
	leaq	L_.str.8(%rip), %rdi
	jmp	LBB0_22
LBB0_31:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_ci_enable_sclk_control
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_ci_enable_ulv
	testl	%eax, %eax
	je	LBB0_33
## %bb.32:
	movl	%eax, %r15d
	leaq	L_.str.9(%rip), %rdi
	jmp	LBB0_22
LBB0_33:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_ci_enable_ds_master_switch
	testl	%eax, %eax
	je	LBB0_35
## %bb.34:
	movl	%eax, %r15d
	leaq	L_.str.10(%rip), %rdi
	jmp	LBB0_22
LBB0_35:
	movq	%rbx, %rdi
	callq	_ci_start_dpm
	testl	%eax, %eax
	je	LBB0_37
## %bb.36:
	movl	%eax, %r15d
	leaq	L_.str.11(%rip), %rdi
	jmp	LBB0_22
LBB0_37:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_ci_enable_didt
	testl	%eax, %eax
	je	LBB0_39
## %bb.38:
	movl	%eax, %r15d
	leaq	L_.str.12(%rip), %rdi
	jmp	LBB0_22
LBB0_39:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_ci_enable_smc_cac
	testl	%eax, %eax
	je	LBB0_41
## %bb.40:
	movl	%eax, %r15d
	leaq	L_.str.13(%rip), %rdi
	jmp	LBB0_22
LBB0_41:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_ci_enable_power_containment
	testl	%eax, %eax
	je	LBB0_43
## %bb.42:
	movl	%eax, %r15d
	leaq	L_.str.14(%rip), %rdi
	jmp	LBB0_22
LBB0_43:
	movq	%rbx, %rdi
	callq	_ci_power_control_set_level
	testl	%eax, %eax
	je	LBB0_45
## %bb.44:
	movl	%eax, %r15d
	leaq	L_.str.15(%rip), %rdi
	jmp	LBB0_22
LBB0_45:
	movq	_RADEON_DPM_AUTO_THROTTLE_SRC_THERMAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_ci_enable_auto_throttle_source
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_ci_enable_thermal_based_sclk_dpm
	testl	%eax, %eax
	je	LBB0_47
## %bb.46:
	movl	%eax, %r15d
	leaq	L_.str.16(%rip), %rdi
	jmp	LBB0_22
LBB0_47:
	movq	%rbx, %rdi
	callq	_ci_thermal_start_thermal_controller
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_ci_update_current_ps
	xorl	%r15d, %r15d
	jmp	LBB0_23
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_CISLANDS_VOLTAGE_CONTROL_NONE,8,3 ## @CISLANDS_VOLTAGE_CONTROL_NONE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ci_construct_voltage_tables failed\n"

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

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

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

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

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

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

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

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

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

L_.str.10:                              ## @.str.10
	.asciz	"ci_enable_ds_master_switch failed\n"

L_.str.11:                              ## @.str.11
	.asciz	"ci_start_dpm failed\n"

L_.str.12:                              ## @.str.12
	.asciz	"ci_enable_didt failed\n"

L_.str.13:                              ## @.str.13
	.asciz	"ci_enable_smc_cac failed\n"

L_.str.14:                              ## @.str.14
	.asciz	"ci_enable_power_containment failed\n"

L_.str.15:                              ## @.str.15
	.asciz	"ci_power_control_set_level failed\n"

	.comm	_RADEON_DPM_AUTO_THROTTLE_SRC_THERMAL,4,2 ## @RADEON_DPM_AUTO_THROTTLE_SRC_THERMAL
L_.str.16:                              ## @.str.16
	.asciz	"ci_enable_thermal_based_sclk_dpm failed\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ci_dpm_enable                  ; -- Begin function ci_dpm_enable
	.p2align	2
_ci_dpm_enable:                         ; @ci_dpm_enable
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	bl	_ci_get_pi
	mov	x22, x0
	ldr	x20, [x19]
	mov	x0, x19
	bl	_ci_is_smc_running
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_23
LBB0_2:
	ldr	x8, [x22]
Lloh3:
	adrp	x9, _CISLANDS_VOLTAGE_CONTROL_NONE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _CISLANDS_VOLTAGE_CONTROL_NONE@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_5
; %bb.3:
	mov	x0, x19
	bl	_ci_enable_voltage_control
	mov	x0, x19
	bl	_ci_construct_voltage_tables
	cbz	w0, LBB0_5
; %bb.4:
	mov	x21, x0
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_22
LBB0_5:
	ldr	w8, [x22, #8]
	cbz	w8, LBB0_8
; %bb.6:
	mov	x0, x19
	bl	_ci_initialize_mc_reg_table
	cbz	w0, LBB0_8
; %bb.7:
	str	wzr, [x22, #8]
LBB0_8:
	ldr	x8, [x22, #24]
	cbz	x8, LBB0_10
; %bb.9:
	mov	x0, x19
	mov	w1, #1
	bl	_ci_enable_spread_spectrum
LBB0_10:
	ldr	x8, [x22, #16]
	cbz	x8, LBB0_12
; %bb.11:
	mov	x0, x19
	mov	w1, #1
	bl	_ci_enable_thermal_protection
LBB0_12:
	mov	x0, x19
	bl	_ci_program_sstp
	mov	x0, x19
	bl	_ci_enable_display_gap
	mov	x0, x19
	bl	_ci_program_vc
	mov	x0, x19
	bl	_ci_upload_firmware
	cbz	w0, LBB0_14
; %bb.13:
	mov	x21, x0
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_22
LBB0_14:
	mov	x0, x19
	bl	_ci_process_firmware_header
	cbz	w0, LBB0_16
; %bb.15:
	mov	x21, x0
Lloh10:
	adrp	x0, l_.str.2@PAGE
Lloh11:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_22
LBB0_16:
	mov	x0, x19
	bl	_ci_initial_switch_from_arb_f0_to_f1
	cbz	w0, LBB0_18
; %bb.17:
	mov	x21, x0
Lloh12:
	adrp	x0, l_.str.3@PAGE
Lloh13:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_22
LBB0_18:
	mov	x0, x19
	bl	_ci_init_smc_table
	cbz	w0, LBB0_20
; %bb.19:
	mov	x21, x0
Lloh14:
	adrp	x0, l_.str.4@PAGE
Lloh15:
	add	x0, x0, l_.str.4@PAGEOFF
	b	LBB0_22
LBB0_20:
	mov	x0, x19
	bl	_ci_init_arb_table_index
	cbz	w0, LBB0_24
; %bb.21:
	mov	x21, x0
Lloh16:
	adrp	x0, l_.str.5@PAGE
Lloh17:
	add	x0, x0, l_.str.5@PAGEOFF
LBB0_22:
	bl	_DRM_ERROR
LBB0_23:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_24:
	ldr	w8, [x22, #8]
	cbz	w8, LBB0_27
; %bb.25:
	mov	x0, x19
	bl	_ci_populate_initial_mc_reg_table
	cbz	w0, LBB0_27
; %bb.26:
	mov	x21, x0
Lloh18:
	adrp	x0, l_.str.6@PAGE
Lloh19:
	add	x0, x0, l_.str.6@PAGEOFF
	b	LBB0_22
LBB0_27:
	mov	x0, x19
	bl	_ci_populate_pm_base
	cbz	w0, LBB0_29
; %bb.28:
	mov	x21, x0
Lloh20:
	adrp	x0, l_.str.7@PAGE
Lloh21:
	add	x0, x0, l_.str.7@PAGEOFF
	b	LBB0_22
LBB0_29:
	mov	x0, x19
	bl	_ci_dpm_start_smc
	mov	x0, x19
	bl	_ci_enable_vr_hot_gpio_interrupt
	mov	x0, x19
	mov	w1, #0
	bl	_ci_notify_smc_display_change
	cbz	w0, LBB0_31
; %bb.30:
	mov	x21, x0
Lloh22:
	adrp	x0, l_.str.8@PAGE
Lloh23:
	add	x0, x0, l_.str.8@PAGEOFF
	b	LBB0_22
LBB0_31:
	mov	x0, x19
	mov	w1, #1
	bl	_ci_enable_sclk_control
	mov	x0, x19
	mov	w1, #1
	bl	_ci_enable_ulv
	cbz	w0, LBB0_33
; %bb.32:
	mov	x21, x0
Lloh24:
	adrp	x0, l_.str.9@PAGE
Lloh25:
	add	x0, x0, l_.str.9@PAGEOFF
	b	LBB0_22
LBB0_33:
	mov	x0, x19
	mov	w1, #1
	bl	_ci_enable_ds_master_switch
	cbz	w0, LBB0_35
; %bb.34:
	mov	x21, x0
Lloh26:
	adrp	x0, l_.str.10@PAGE
Lloh27:
	add	x0, x0, l_.str.10@PAGEOFF
	b	LBB0_22
LBB0_35:
	mov	x0, x19
	bl	_ci_start_dpm
	cbz	w0, LBB0_37
; %bb.36:
	mov	x21, x0
Lloh28:
	adrp	x0, l_.str.11@PAGE
Lloh29:
	add	x0, x0, l_.str.11@PAGEOFF
	b	LBB0_22
LBB0_37:
	mov	x0, x19
	mov	w1, #1
	bl	_ci_enable_didt
	cbz	w0, LBB0_39
; %bb.38:
	mov	x21, x0
Lloh30:
	adrp	x0, l_.str.12@PAGE
Lloh31:
	add	x0, x0, l_.str.12@PAGEOFF
	b	LBB0_22
LBB0_39:
	mov	x0, x19
	mov	w1, #1
	bl	_ci_enable_smc_cac
	cbz	w0, LBB0_41
; %bb.40:
	mov	x21, x0
Lloh32:
	adrp	x0, l_.str.13@PAGE
Lloh33:
	add	x0, x0, l_.str.13@PAGEOFF
	b	LBB0_22
LBB0_41:
	mov	x0, x19
	mov	w1, #1
	bl	_ci_enable_power_containment
	cbz	w0, LBB0_43
; %bb.42:
	mov	x21, x0
Lloh34:
	adrp	x0, l_.str.14@PAGE
Lloh35:
	add	x0, x0, l_.str.14@PAGEOFF
	b	LBB0_22
LBB0_43:
	mov	x0, x19
	bl	_ci_power_control_set_level
	cbz	w0, LBB0_45
; %bb.44:
	mov	x21, x0
Lloh36:
	adrp	x0, l_.str.15@PAGE
Lloh37:
	add	x0, x0, l_.str.15@PAGEOFF
	b	LBB0_22
LBB0_45:
Lloh38:
	adrp	x8, _RADEON_DPM_AUTO_THROTTLE_SRC_THERMAL@GOTPAGE
Lloh39:
	ldr	x8, [x8, _RADEON_DPM_AUTO_THROTTLE_SRC_THERMAL@GOTPAGEOFF]
Lloh40:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #1
	bl	_ci_enable_auto_throttle_source
	mov	x0, x19
	mov	w1, #1
	bl	_ci_enable_thermal_based_sclk_dpm
	mov	x21, x0
	cbz	w0, LBB0_47
; %bb.46:
Lloh41:
	adrp	x0, l_.str.16@PAGE
Lloh42:
	add	x0, x0, l_.str.16@PAGEOFF
	b	LBB0_22
LBB0_47:
	mov	x0, x19
	bl	_ci_thermal_start_thermal_controller
	mov	x0, x19
	mov	x1, x20
	bl	_ci_update_current_ps
	b	LBB0_23
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, 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
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpAdd	Lloh41, Lloh42
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_CISLANDS_VOLTAGE_CONTROL_NONE,8,3 ; @CISLANDS_VOLTAGE_CONTROL_NONE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ci_construct_voltage_tables failed\n"

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

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

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

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

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

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

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

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

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

l_.str.10:                              ; @.str.10
	.asciz	"ci_enable_ds_master_switch failed\n"

l_.str.11:                              ; @.str.11
	.asciz	"ci_start_dpm failed\n"

l_.str.12:                              ; @.str.12
	.asciz	"ci_enable_didt failed\n"

l_.str.13:                              ; @.str.13
	.asciz	"ci_enable_smc_cac failed\n"

l_.str.14:                              ; @.str.14
	.asciz	"ci_enable_power_containment failed\n"

l_.str.15:                              ; @.str.15
	.asciz	"ci_power_control_set_level failed\n"

	.comm	_RADEON_DPM_AUTO_THROTTLE_SRC_THERMAL,4,2 ; @RADEON_DPM_AUTO_THROTTLE_SRC_THERMAL
l_.str.16:                              ; @.str.16
	.asciz	"ci_enable_thermal_based_sclk_dpm failed\n"

.subsections_via_symbols
