	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ni_dpm_enable                  ## -- Begin function ni_dpm_enable
	.p2align	4, 0x90
_ni_dpm_enable:                         ## @ni_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, %r12
	movq	%rbx, %rdi
	callq	_evergreen_get_pi
	movq	%rax, %r15
	movq	(%rbx), %r14
	cmpq	$0, 8(%r12)
	je	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_ni_cg_clockgating_default
LBB0_2:
	movq	%rbx, %rdi
	callq	_btc_dpm_enabled
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
LBB0_52:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	cmpq	$0, (%r12)
	je	LBB0_6
## %bb.5:
	movq	%rbx, %rdi
	callq	_ni_mg_clockgating_default
LBB0_6:
	cmpq	$0, 8(%r15)
	je	LBB0_8
## %bb.7:
	movq	%rbx, %rdi
	callq	_ni_ls_clockgating_default
LBB0_8:
	cmpq	$0, 40(%r12)
	je	LBB0_11
## %bb.9:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_rv770_enable_voltage_control
	movq	%rbx, %rdi
	callq	_cypress_construct_voltage_tables
	testl	%eax, %eax
	je	LBB0_11
## %bb.10:
	movl	%eax, %r13d
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
	jmp	LBB0_52
LBB0_11:
	cmpl	$0, (%r15)
	je	LBB0_14
## %bb.12:
	movq	%rbx, %rdi
	callq	_ni_initialize_mc_reg_table
	testl	%eax, %eax
	je	LBB0_14
## %bb.13:
	movl	$0, (%r15)
LBB0_14:
	cmpq	$0, 32(%r12)
	je	LBB0_16
## %bb.15:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_cypress_enable_spread_spectrum
LBB0_16:
	cmpq	$0, 24(%r12)
	je	LBB0_18
## %bb.17:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_rv770_enable_thermal_protection
LBB0_18:
	movq	%rbx, %rdi
	callq	_rv770_setup_bsp
	movq	%rbx, %rdi
	callq	_rv770_program_git
	movq	%rbx, %rdi
	callq	_rv770_program_tp
	movq	%rbx, %rdi
	callq	_rv770_program_tpp
	movq	%rbx, %rdi
	callq	_rv770_program_sstp
	movq	%rbx, %rdi
	callq	_cypress_enable_display_gap
	movq	%rbx, %rdi
	callq	_rv770_program_vc
	cmpq	$0, 16(%r12)
	je	LBB0_20
## %bb.19:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_ni_enable_dynamic_pcie_gen2
LBB0_20:
	movq	%rbx, %rdi
	callq	_rv770_upload_firmware
	testl	%eax, %eax
	je	LBB0_22
## %bb.21:
	movl	%eax, %r13d
	leaq	L_.str.1(%rip), %rdi
	callq	_DRM_ERROR
	jmp	LBB0_52
LBB0_22:
	movq	%rbx, %rdi
	callq	_ni_process_firmware_header
	testl	%eax, %eax
	je	LBB0_24
## %bb.23:
	movl	%eax, %r13d
	leaq	L_.str.2(%rip), %rdi
	callq	_DRM_ERROR
	jmp	LBB0_52
LBB0_24:
	movq	%rbx, %rdi
	callq	_ni_initial_switch_from_arb_f0_to_f1
	testl	%eax, %eax
	je	LBB0_26
## %bb.25:
	movl	%eax, %r13d
	leaq	L_.str.3(%rip), %rdi
	callq	_DRM_ERROR
	jmp	LBB0_52
LBB0_26:
	movq	%rbx, %rdi
	callq	_ni_init_smc_table
	testl	%eax, %eax
	je	LBB0_28
## %bb.27:
	movl	%eax, %r13d
	leaq	L_.str.4(%rip), %rdi
	callq	_DRM_ERROR
	jmp	LBB0_52
LBB0_28:
	movq	%rbx, %rdi
	callq	_ni_init_smc_spll_table
	testl	%eax, %eax
	je	LBB0_30
## %bb.29:
	movl	%eax, %r13d
	leaq	L_.str.5(%rip), %rdi
	callq	_DRM_ERROR
	jmp	LBB0_52
LBB0_30:
	movq	%rbx, %rdi
	callq	_ni_init_arb_table_index
	testl	%eax, %eax
	je	LBB0_32
## %bb.31:
	movl	%eax, %r13d
	leaq	L_.str.6(%rip), %rdi
	callq	_DRM_ERROR
	jmp	LBB0_52
LBB0_32:
	cmpl	$0, (%r15)
	je	LBB0_35
## %bb.33:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_ni_populate_mc_reg_table
	testl	%eax, %eax
	je	LBB0_35
## %bb.34:
	movl	%eax, %r13d
	leaq	L_.str.7(%rip), %rdi
	callq	_DRM_ERROR
	jmp	LBB0_52
LBB0_35:
	movq	%rbx, %rdi
	callq	_ni_initialize_smc_cac_tables
	testl	%eax, %eax
	je	LBB0_37
## %bb.36:
	movl	%eax, %r13d
	leaq	L_.str.8(%rip), %rdi
	callq	_DRM_ERROR
	jmp	LBB0_52
LBB0_37:
	movq	%rbx, %rdi
	callq	_ni_initialize_hardware_cac_manager
	testl	%eax, %eax
	je	LBB0_39
## %bb.38:
	movl	%eax, %r13d
	leaq	L_.str.9(%rip), %rdi
	callq	_DRM_ERROR
	jmp	LBB0_52
LBB0_39:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_ni_populate_smc_tdp_limits
	testl	%eax, %eax
	je	LBB0_41
## %bb.40:
	movl	%eax, %r13d
	leaq	L_.str.10(%rip), %rdi
	callq	_DRM_ERROR
	jmp	LBB0_52
LBB0_41:
	movq	%rbx, %rdi
	callq	_ni_program_response_times
	movq	%rbx, %rdi
	callq	_r7xx_start_smc
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_cypress_notify_smc_display_change
	testl	%eax, %eax
	je	LBB0_43
## %bb.42:
	movl	%eax, %r13d
	leaq	L_.str.11(%rip), %rdi
	callq	_DRM_ERROR
	jmp	LBB0_52
LBB0_43:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_cypress_enable_sclk_control
	cmpq	$0, 16(%r15)
	je	LBB0_45
## %bb.44:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_cypress_enable_mclk_control
LBB0_45:
	movq	%rbx, %rdi
	callq	_cypress_start_dpm
	cmpq	$0, 8(%r12)
	je	LBB0_47
## %bb.46:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_ni_gfx_clockgating_enable
LBB0_47:
	cmpq	$0, (%r12)
	je	LBB0_49
## %bb.48:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_ni_mg_clockgating_enable
LBB0_49:
	cmpq	$0, 8(%r15)
	je	LBB0_51
## %bb.50:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_ni_ls_clockgating_enable
LBB0_51:
	movq	_RADEON_DPM_AUTO_THROTTLE_SRC_THERMAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_rv770_enable_auto_throttle_source
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_ni_update_current_ps
	xorl	%r13d, %r13d
	jmp	LBB0_52
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cypress_construct_voltage_tables failed\n"

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

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

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

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

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

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

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

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

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

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

L_.str.11:                              ## @.str.11
	.asciz	"cypress_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	_ni_dpm_enable                  ; -- Begin function ni_dpm_enable
	.p2align	2
_ni_dpm_enable:                         ; @ni_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	x22, x0
	mov	x0, x19
	bl	_evergreen_get_pi
	mov	x21, x0
	ldr	x20, [x19]
	ldr	x8, [x22, #8]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_ni_cg_clockgating_default
LBB0_2:
	mov	x0, x19
	bl	_btc_dpm_enabled
	cbz	x0, LBB0_5
; %bb.3:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_4:
	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_5:
	ldr	x8, [x22]
	cbz	x8, LBB0_7
; %bb.6:
	mov	x0, x19
	bl	_ni_mg_clockgating_default
LBB0_7:
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_9
; %bb.8:
	mov	x0, x19
	bl	_ni_ls_clockgating_default
LBB0_9:
	ldr	x8, [x22, #40]
	cbz	x8, LBB0_12
; %bb.10:
	mov	x0, x19
	mov	w1, #1
	bl	_rv770_enable_voltage_control
	mov	x0, x19
	bl	_cypress_construct_voltage_tables
	cbz	w0, LBB0_12
; %bb.11:
	mov	x23, x0
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
	b	LBB0_4
LBB0_12:
	ldr	w8, [x21]
	cbz	w8, LBB0_15
; %bb.13:
	mov	x0, x19
	bl	_ni_initialize_mc_reg_table
	cbz	w0, LBB0_15
; %bb.14:
	str	wzr, [x21]
LBB0_15:
	ldr	x8, [x22, #32]
	cbz	x8, LBB0_17
; %bb.16:
	mov	x0, x19
	mov	w1, #1
	bl	_cypress_enable_spread_spectrum
LBB0_17:
	ldr	x8, [x22, #24]
	cbz	x8, LBB0_19
; %bb.18:
	mov	x0, x19
	mov	w1, #1
	bl	_rv770_enable_thermal_protection
LBB0_19:
	mov	x0, x19
	bl	_rv770_setup_bsp
	mov	x0, x19
	bl	_rv770_program_git
	mov	x0, x19
	bl	_rv770_program_tp
	mov	x0, x19
	bl	_rv770_program_tpp
	mov	x0, x19
	bl	_rv770_program_sstp
	mov	x0, x19
	bl	_cypress_enable_display_gap
	mov	x0, x19
	bl	_rv770_program_vc
	ldr	x8, [x22, #16]
	cbz	x8, LBB0_21
; %bb.20:
	mov	x0, x19
	mov	w1, #1
	bl	_ni_enable_dynamic_pcie_gen2
LBB0_21:
	mov	x0, x19
	bl	_rv770_upload_firmware
	cbz	w0, LBB0_23
; %bb.22:
	mov	x23, x0
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_ERROR
	b	LBB0_4
LBB0_23:
	mov	x0, x19
	bl	_ni_process_firmware_header
	cbz	w0, LBB0_25
; %bb.24:
	mov	x23, x0
Lloh7:
	adrp	x0, l_.str.2@PAGE
Lloh8:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DRM_ERROR
	b	LBB0_4
LBB0_25:
	mov	x0, x19
	bl	_ni_initial_switch_from_arb_f0_to_f1
	cbz	w0, LBB0_27
; %bb.26:
	mov	x23, x0
Lloh9:
	adrp	x0, l_.str.3@PAGE
Lloh10:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_DRM_ERROR
	b	LBB0_4
LBB0_27:
	mov	x0, x19
	bl	_ni_init_smc_table
	cbz	w0, LBB0_29
; %bb.28:
	mov	x23, x0
Lloh11:
	adrp	x0, l_.str.4@PAGE
Lloh12:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_DRM_ERROR
	b	LBB0_4
LBB0_29:
	mov	x0, x19
	bl	_ni_init_smc_spll_table
	cbz	w0, LBB0_31
; %bb.30:
	mov	x23, x0
Lloh13:
	adrp	x0, l_.str.5@PAGE
Lloh14:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_DRM_ERROR
	b	LBB0_4
LBB0_31:
	mov	x0, x19
	bl	_ni_init_arb_table_index
	cbz	w0, LBB0_33
; %bb.32:
	mov	x23, x0
Lloh15:
	adrp	x0, l_.str.6@PAGE
Lloh16:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_DRM_ERROR
	b	LBB0_4
LBB0_33:
	ldr	w8, [x21]
	cbz	w8, LBB0_36
; %bb.34:
	mov	x0, x19
	mov	x1, x20
	bl	_ni_populate_mc_reg_table
	cbz	w0, LBB0_36
; %bb.35:
	mov	x23, x0
Lloh17:
	adrp	x0, l_.str.7@PAGE
Lloh18:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_DRM_ERROR
	b	LBB0_4
LBB0_36:
	mov	x0, x19
	bl	_ni_initialize_smc_cac_tables
	cbz	w0, LBB0_38
; %bb.37:
	mov	x23, x0
Lloh19:
	adrp	x0, l_.str.8@PAGE
Lloh20:
	add	x0, x0, l_.str.8@PAGEOFF
	bl	_DRM_ERROR
	b	LBB0_4
LBB0_38:
	mov	x0, x19
	bl	_ni_initialize_hardware_cac_manager
	cbz	w0, LBB0_40
; %bb.39:
	mov	x23, x0
Lloh21:
	adrp	x0, l_.str.9@PAGE
Lloh22:
	add	x0, x0, l_.str.9@PAGEOFF
	bl	_DRM_ERROR
	b	LBB0_4
LBB0_40:
	mov	x0, x19
	mov	x1, x20
	bl	_ni_populate_smc_tdp_limits
	cbz	w0, LBB0_42
; %bb.41:
	mov	x23, x0
Lloh23:
	adrp	x0, l_.str.10@PAGE
Lloh24:
	add	x0, x0, l_.str.10@PAGEOFF
	bl	_DRM_ERROR
	b	LBB0_4
LBB0_42:
	mov	x0, x19
	bl	_ni_program_response_times
	mov	x0, x19
	bl	_r7xx_start_smc
	mov	x0, x19
	mov	w1, #0
	bl	_cypress_notify_smc_display_change
	cbz	w0, LBB0_44
; %bb.43:
	mov	x23, x0
Lloh25:
	adrp	x0, l_.str.11@PAGE
Lloh26:
	add	x0, x0, l_.str.11@PAGEOFF
	bl	_DRM_ERROR
	b	LBB0_4
LBB0_44:
	mov	x0, x19
	mov	w1, #1
	bl	_cypress_enable_sclk_control
	ldr	x8, [x21, #16]
	cbz	x8, LBB0_46
; %bb.45:
	mov	x0, x19
	mov	w1, #1
	bl	_cypress_enable_mclk_control
LBB0_46:
	mov	x0, x19
	bl	_cypress_start_dpm
	ldr	x8, [x22, #8]
	cbz	x8, LBB0_48
; %bb.47:
	mov	x0, x19
	mov	w1, #1
	bl	_ni_gfx_clockgating_enable
LBB0_48:
	ldr	x8, [x22]
	cbz	x8, LBB0_50
; %bb.49:
	mov	x0, x19
	mov	w1, #1
	bl	_ni_mg_clockgating_enable
LBB0_50:
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_52
; %bb.51:
	mov	x0, x19
	mov	w1, #1
	bl	_ni_ls_clockgating_enable
LBB0_52:
Lloh27:
	adrp	x8, _RADEON_DPM_AUTO_THROTTLE_SRC_THERMAL@GOTPAGE
Lloh28:
	ldr	x8, [x8, _RADEON_DPM_AUTO_THROTTLE_SRC_THERMAL@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #1
	bl	_rv770_enable_auto_throttle_source
	mov	x0, x19
	mov	x1, x20
	bl	_ni_update_current_ps
	mov	w23, #0
	b	LBB0_4
	.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 AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cypress_construct_voltage_tables failed\n"

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

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

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

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

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

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

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

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

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

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

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

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