	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_si_dpm_enable                  ## -- Begin function si_dpm_enable
	.p2align	4, 0x90
_si_dpm_enable:                         ## @si_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	%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	_rv770_get_pi
	movq	%rax, %r13
	movq	%rbx, %rdi
	callq	_evergreen_get_pi
	movq	%rax, %r12
	movq	%rbx, %rdi
	callq	_si_get_pi
	movq	%rax, %r15
	movq	(%rbx), %r14
	movq	%rbx, %rdi
	callq	_si_is_smc_running
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_31
LBB0_2:
	cmpq	$0, 16(%r13)
	jne	LBB0_4
## %bb.3:
	cmpq	$0, (%r15)
	je	LBB0_5
LBB0_4:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_si_enable_voltage_control
LBB0_5:
	cmpq	$0, 24(%r13)
	je	LBB0_7
## %bb.6:
	movq	%rbx, %rdi
	callq	_si_get_mvdd_configuration
LBB0_7:
	cmpq	$0, 16(%r13)
	jne	LBB0_9
## %bb.8:
	cmpq	$0, (%r15)
	je	LBB0_11
LBB0_9:
	movq	%rbx, %rdi
	callq	_si_construct_voltage_tables
	testl	%eax, %eax
	je	LBB0_11
## %bb.10:
	movl	%eax, %r15d
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_30
LBB0_11:
	cmpl	$0, (%r12)
	je	LBB0_14
## %bb.12:
	movq	%rbx, %rdi
	callq	_si_initialize_mc_reg_table
	testl	%eax, %eax
	je	LBB0_14
## %bb.13:
	movl	$0, (%r12)
LBB0_14:
	cmpq	$0, 8(%r13)
	je	LBB0_16
## %bb.15:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_si_enable_spread_spectrum
LBB0_16:
	cmpq	$0, (%r13)
	je	LBB0_18
## %bb.17:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_si_enable_thermal_protection
LBB0_18:
	movq	%rbx, %rdi
	callq	_si_setup_bsp
	movq	%rbx, %rdi
	callq	_si_program_git
	movq	%rbx, %rdi
	callq	_si_program_tp
	movq	%rbx, %rdi
	callq	_si_program_tpp
	movq	%rbx, %rdi
	callq	_si_program_sstp
	movq	%rbx, %rdi
	callq	_si_enable_display_gap
	movq	%rbx, %rdi
	callq	_si_program_vc
	movq	%rbx, %rdi
	callq	_si_upload_firmware
	testl	%eax, %eax
	je	LBB0_20
## %bb.19:
	movl	%eax, %r15d
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_30
LBB0_20:
	movq	%rbx, %rdi
	callq	_si_process_firmware_header
	testl	%eax, %eax
	je	LBB0_22
## %bb.21:
	movl	%eax, %r15d
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_30
LBB0_22:
	movq	%rbx, %rdi
	callq	_si_initial_switch_from_arb_f0_to_f1
	testl	%eax, %eax
	je	LBB0_24
## %bb.23:
	movl	%eax, %r15d
	leaq	L_.str.3(%rip), %rdi
	jmp	LBB0_30
LBB0_24:
	movq	%rbx, %rdi
	callq	_si_init_smc_table
	testl	%eax, %eax
	je	LBB0_26
## %bb.25:
	movl	%eax, %r15d
	leaq	L_.str.4(%rip), %rdi
	jmp	LBB0_30
LBB0_26:
	movq	%rbx, %rdi
	callq	_si_init_smc_spll_table
	testl	%eax, %eax
	je	LBB0_28
## %bb.27:
	movl	%eax, %r15d
	leaq	L_.str.5(%rip), %rdi
	jmp	LBB0_30
LBB0_28:
	movq	%rbx, %rdi
	callq	_si_init_arb_table_index
	testl	%eax, %eax
	je	LBB0_32
## %bb.29:
	movl	%eax, %r15d
	leaq	L_.str.6(%rip), %rdi
LBB0_30:
	callq	_DRM_ERROR
LBB0_31:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_32:
	cmpl	$0, (%r12)
	je	LBB0_35
## %bb.33:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_si_populate_mc_reg_table
	testl	%eax, %eax
	je	LBB0_35
## %bb.34:
	movl	%eax, %r15d
	leaq	L_.str.7(%rip), %rdi
	jmp	LBB0_30
LBB0_35:
	movq	%rbx, %rdi
	callq	_si_initialize_smc_cac_tables
	testl	%eax, %eax
	je	LBB0_37
## %bb.36:
	movl	%eax, %r15d
	leaq	L_.str.8(%rip), %rdi
	jmp	LBB0_30
LBB0_37:
	movq	%rbx, %rdi
	callq	_si_initialize_hardware_cac_manager
	testl	%eax, %eax
	je	LBB0_39
## %bb.38:
	movl	%eax, %r15d
	leaq	L_.str.9(%rip), %rdi
	jmp	LBB0_30
LBB0_39:
	movq	%rbx, %rdi
	callq	_si_initialize_smc_dte_tables
	testl	%eax, %eax
	je	LBB0_41
## %bb.40:
	movl	%eax, %r15d
	leaq	L_.str.10(%rip), %rdi
	jmp	LBB0_30
LBB0_41:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_si_populate_smc_tdp_limits
	testl	%eax, %eax
	je	LBB0_43
## %bb.42:
	movl	%eax, %r15d
	leaq	L_.str.11(%rip), %rdi
	jmp	LBB0_30
LBB0_43:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_si_populate_smc_tdp_limits_2
	testl	%eax, %eax
	je	LBB0_45
## %bb.44:
	movl	%eax, %r15d
	leaq	L_.str.12(%rip), %rdi
	jmp	LBB0_30
LBB0_45:
	movq	%rbx, %rdi
	callq	_si_program_response_times
	movq	%rbx, %rdi
	callq	_si_program_ds_registers
	movq	%rbx, %rdi
	callq	_si_dpm_start_smc
	xorl	%r15d, %r15d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_si_notify_smc_display_change
	testl	%eax, %eax
	je	LBB0_47
## %bb.46:
	movl	%eax, %r12d
	leaq	L_.str.13(%rip), %rdi
	callq	_DRM_ERROR
	movl	%r12d, %r15d
	jmp	LBB0_31
LBB0_47:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_si_enable_sclk_control
	movq	%rbx, %rdi
	callq	_si_start_dpm
	movq	_RADEON_DPM_AUTO_THROTTLE_SRC_THERMAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_si_enable_auto_throttle_source
	movq	%rbx, %rdi
	callq	_si_thermal_start_thermal_controller
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_ni_update_current_ps
	jmp	LBB0_31
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"si_construct_voltage_tables failed\n"

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

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

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

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

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

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

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

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

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

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

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

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

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

	.comm	_RADEON_DPM_AUTO_THROTTLE_SRC_THERMAL,4,2 ## @RADEON_DPM_AUTO_THROTTLE_SRC_THERMAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_si_dpm_enable                  ; -- Begin function si_dpm_enable
	.p2align	2
_si_dpm_enable:                         ; @si_dpm_enable
	.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	_rv770_get_pi
	mov	x23, x0
	mov	x0, x19
	bl	_evergreen_get_pi
	mov	x22, x0
	mov	x0, x19
	bl	_si_get_pi
	mov	x21, x0
	ldr	x20, [x19]
	mov	x0, x19
	bl	_si_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_31
LBB0_2:
	ldr	x8, [x23, #16]
	cbnz	x8, LBB0_4
; %bb.3:
	ldr	x8, [x21]
	cbz	x8, LBB0_5
LBB0_4:
	mov	x0, x19
	mov	w1, #1
	bl	_si_enable_voltage_control
LBB0_5:
	ldr	x8, [x23, #24]
	cbz	x8, LBB0_7
; %bb.6:
	mov	x0, x19
	bl	_si_get_mvdd_configuration
LBB0_7:
	ldr	x8, [x23, #16]
	cbnz	x8, LBB0_9
; %bb.8:
	ldr	x8, [x21]
	cbz	x8, LBB0_11
LBB0_9:
	mov	x0, x19
	bl	_si_construct_voltage_tables
	cbz	w0, LBB0_11
; %bb.10:
	mov	x21, x0
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_30
LBB0_11:
	ldr	w8, [x22]
	cbz	w8, LBB0_14
; %bb.12:
	mov	x0, x19
	bl	_si_initialize_mc_reg_table
	cbz	w0, LBB0_14
; %bb.13:
	str	wzr, [x22]
LBB0_14:
	ldr	x8, [x23, #8]
	cbz	x8, LBB0_16
; %bb.15:
	mov	x0, x19
	mov	w1, #1
	bl	_si_enable_spread_spectrum
LBB0_16:
	ldr	x8, [x23]
	cbz	x8, LBB0_18
; %bb.17:
	mov	x0, x19
	mov	w1, #1
	bl	_si_enable_thermal_protection
LBB0_18:
	mov	x0, x19
	bl	_si_setup_bsp
	mov	x0, x19
	bl	_si_program_git
	mov	x0, x19
	bl	_si_program_tp
	mov	x0, x19
	bl	_si_program_tpp
	mov	x0, x19
	bl	_si_program_sstp
	mov	x0, x19
	bl	_si_enable_display_gap
	mov	x0, x19
	bl	_si_program_vc
	mov	x0, x19
	bl	_si_upload_firmware
	cbz	w0, LBB0_20
; %bb.19:
	mov	x21, x0
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_30
LBB0_20:
	mov	x0, x19
	bl	_si_process_firmware_header
	cbz	w0, LBB0_22
; %bb.21:
	mov	x21, x0
Lloh7:
	adrp	x0, l_.str.2@PAGE
Lloh8:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_30
LBB0_22:
	mov	x0, x19
	bl	_si_initial_switch_from_arb_f0_to_f1
	cbz	w0, LBB0_24
; %bb.23:
	mov	x21, x0
Lloh9:
	adrp	x0, l_.str.3@PAGE
Lloh10:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_30
LBB0_24:
	mov	x0, x19
	bl	_si_init_smc_table
	cbz	w0, LBB0_26
; %bb.25:
	mov	x21, x0
Lloh11:
	adrp	x0, l_.str.4@PAGE
Lloh12:
	add	x0, x0, l_.str.4@PAGEOFF
	b	LBB0_30
LBB0_26:
	mov	x0, x19
	bl	_si_init_smc_spll_table
	cbz	w0, LBB0_28
; %bb.27:
	mov	x21, x0
Lloh13:
	adrp	x0, l_.str.5@PAGE
Lloh14:
	add	x0, x0, l_.str.5@PAGEOFF
	b	LBB0_30
LBB0_28:
	mov	x0, x19
	bl	_si_init_arb_table_index
	cbz	w0, LBB0_32
; %bb.29:
	mov	x21, x0
Lloh15:
	adrp	x0, l_.str.6@PAGE
Lloh16:
	add	x0, x0, l_.str.6@PAGEOFF
LBB0_30:
	bl	_DRM_ERROR
LBB0_31:
	mov	x0, x21
	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_32:
	ldr	w8, [x22]
	cbz	w8, LBB0_35
; %bb.33:
	mov	x0, x19
	mov	x1, x20
	bl	_si_populate_mc_reg_table
	cbz	w0, LBB0_35
; %bb.34:
	mov	x21, x0
Lloh17:
	adrp	x0, l_.str.7@PAGE
Lloh18:
	add	x0, x0, l_.str.7@PAGEOFF
	b	LBB0_30
LBB0_35:
	mov	x0, x19
	bl	_si_initialize_smc_cac_tables
	cbz	w0, LBB0_37
; %bb.36:
	mov	x21, x0
Lloh19:
	adrp	x0, l_.str.8@PAGE
Lloh20:
	add	x0, x0, l_.str.8@PAGEOFF
	b	LBB0_30
LBB0_37:
	mov	x0, x19
	bl	_si_initialize_hardware_cac_manager
	cbz	w0, LBB0_39
; %bb.38:
	mov	x21, x0
Lloh21:
	adrp	x0, l_.str.9@PAGE
Lloh22:
	add	x0, x0, l_.str.9@PAGEOFF
	b	LBB0_30
LBB0_39:
	mov	x0, x19
	bl	_si_initialize_smc_dte_tables
	cbz	w0, LBB0_41
; %bb.40:
	mov	x21, x0
Lloh23:
	adrp	x0, l_.str.10@PAGE
Lloh24:
	add	x0, x0, l_.str.10@PAGEOFF
	b	LBB0_30
LBB0_41:
	mov	x0, x19
	mov	x1, x20
	bl	_si_populate_smc_tdp_limits
	cbz	w0, LBB0_43
; %bb.42:
	mov	x21, x0
Lloh25:
	adrp	x0, l_.str.11@PAGE
Lloh26:
	add	x0, x0, l_.str.11@PAGEOFF
	b	LBB0_30
LBB0_43:
	mov	x0, x19
	mov	x1, x20
	bl	_si_populate_smc_tdp_limits_2
	cbz	w0, LBB0_45
; %bb.44:
	mov	x21, x0
Lloh27:
	adrp	x0, l_.str.12@PAGE
Lloh28:
	add	x0, x0, l_.str.12@PAGEOFF
	b	LBB0_30
LBB0_45:
	mov	x0, x19
	bl	_si_program_response_times
	mov	x0, x19
	bl	_si_program_ds_registers
	mov	x0, x19
	bl	_si_dpm_start_smc
	mov	x0, x19
	mov	w1, #0
	bl	_si_notify_smc_display_change
	mov	x21, x0
	cbz	w0, LBB0_47
; %bb.46:
Lloh29:
	adrp	x0, l_.str.13@PAGE
Lloh30:
	add	x0, x0, l_.str.13@PAGEOFF
	b	LBB0_30
LBB0_47:
	mov	x0, x19
	mov	w1, #1
	bl	_si_enable_sclk_control
	mov	x0, x19
	bl	_si_start_dpm
Lloh31:
	adrp	x8, _RADEON_DPM_AUTO_THROTTLE_SRC_THERMAL@GOTPAGE
Lloh32:
	ldr	x8, [x8, _RADEON_DPM_AUTO_THROTTLE_SRC_THERMAL@GOTPAGEOFF]
Lloh33:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #1
	bl	_si_enable_auto_throttle_source
	mov	x0, x19
	bl	_si_thermal_start_thermal_controller
	mov	x0, x19
	mov	x1, x20
	bl	_ni_update_current_ps
	b	LBB0_31
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"si_construct_voltage_tables failed\n"

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

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

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

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

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

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

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

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

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

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

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

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

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

	.comm	_RADEON_DPM_AUTO_THROTTLE_SRC_THERMAL,4,2 ; @RADEON_DPM_AUTO_THROTTLE_SRC_THERMAL
.subsections_via_symbols
