	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function kv_dpm_enable
_kv_dpm_enable:                         ## @kv_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_kv_get_pi
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_kv_process_firmware_header
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %r14d
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_14
LBB0_2:
	movq	%rbx, %rdi
	callq	_kv_init_fps_limits
	movq	%rbx, %rdi
	callq	_kv_init_graphics_levels
	movq	%rbx, %rdi
	callq	_kv_program_bootup_state
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %r14d
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_14
LBB0_4:
	movq	%rbx, %rdi
	callq	_kv_calculate_dfs_bypass_settings
	movq	%rbx, %rdi
	callq	_kv_upload_dpm_settings
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %r14d
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_14
LBB0_6:
	movq	%rbx, %rdi
	callq	_kv_populate_uvd_table
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movl	%eax, %r14d
	leaq	L_.str.3(%rip), %rdi
	jmp	LBB0_14
LBB0_8:
	movq	%rbx, %rdi
	callq	_kv_populate_vce_table
	testl	%eax, %eax
	je	LBB0_10
## %bb.9:
	movl	%eax, %r14d
	leaq	L_.str.4(%rip), %rdi
	jmp	LBB0_14
LBB0_10:
	movq	%rbx, %rdi
	callq	_kv_populate_samu_table
	testl	%eax, %eax
	je	LBB0_12
## %bb.11:
	movl	%eax, %r14d
	leaq	L_.str.5(%rip), %rdi
	jmp	LBB0_14
LBB0_12:
	movq	%rbx, %rdi
	callq	_kv_populate_acp_table
	testl	%eax, %eax
	je	LBB0_16
## %bb.13:
	movl	%eax, %r14d
	leaq	L_.str.6(%rip), %rdi
LBB0_14:
	callq	_DRM_ERROR
LBB0_15:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	movq	%rbx, %rdi
	callq	_kv_program_vc
	movq	%rbx, %rdi
	callq	_kv_start_am
	cmpq	$0, (%r15)
	je	LBB0_19
## %bb.17:
	movq	%rbx, %rdi
	callq	_kv_enable_auto_thermal_throttling
	testl	%eax, %eax
	je	LBB0_19
## %bb.18:
	movl	%eax, %r14d
	leaq	L_.str.7(%rip), %rdi
	jmp	LBB0_14
LBB0_19:
	movq	%rbx, %rdi
	callq	_kv_enable_dpm_voltage_scaling
	testl	%eax, %eax
	je	LBB0_21
## %bb.20:
	movl	%eax, %r14d
	leaq	L_.str.8(%rip), %rdi
	jmp	LBB0_14
LBB0_21:
	movq	%rbx, %rdi
	callq	_kv_set_dpm_interval
	testl	%eax, %eax
	je	LBB0_23
## %bb.22:
	movl	%eax, %r14d
	leaq	L_.str.9(%rip), %rdi
	jmp	LBB0_14
LBB0_23:
	movq	%rbx, %rdi
	callq	_kv_set_dpm_boot_state
	testl	%eax, %eax
	je	LBB0_25
## %bb.24:
	movl	%eax, %r14d
	leaq	L_.str.10(%rip), %rdi
	jmp	LBB0_14
LBB0_25:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_kv_enable_ulv
	testl	%eax, %eax
	je	LBB0_27
## %bb.26:
	movl	%eax, %r14d
	leaq	L_.str.11(%rip), %rdi
	jmp	LBB0_14
LBB0_27:
	movq	%rbx, %rdi
	callq	_kv_start_dpm
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_kv_enable_didt
	testl	%eax, %eax
	je	LBB0_29
## %bb.28:
	movl	%eax, %r14d
	leaq	L_.str.12(%rip), %rdi
	jmp	LBB0_14
LBB0_29:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_kv_enable_smc_cac
	testl	%eax, %eax
	je	LBB0_31
## %bb.30:
	movl	%eax, %r14d
	leaq	L_.str.13(%rip), %rdi
	jmp	LBB0_14
LBB0_31:
	movq	%rbx, %rdi
	callq	_kv_reset_acp_boot_level
	xorl	%r14d, %r14d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_amdgpu_kv_smc_bapm_enable
	testl	%eax, %eax
	je	LBB0_34
## %bb.32:
	movl	%eax, %r15d
	leaq	L_.str.14(%rip), %rdi
LBB0_33:
	callq	_DRM_ERROR
	movl	%r15d, %r14d
	jmp	LBB0_15
LBB0_34:
	cmpq	$0, 8(%rbx)
	je	LBB0_15
## %bb.35:
	movl	4(%rbx), %edi
	callq	_amdgpu_is_internal_thermal_sensor
	testq	%rax, %rax
	je	LBB0_15
## %bb.36:
	movq	_KV_TEMP_RANGE_MIN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_KV_TEMP_RANGE_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_kv_set_thermal_temperature_range
	testl	%eax, %eax
	je	LBB0_38
## %bb.37:
	movl	%eax, %r15d
	leaq	L_.str.15(%rip), %rdi
	jmp	LBB0_33
LBB0_38:
	movq	_AMDGPU_THERMAL_IRQ_LOW_TO_HIGH@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movq	%rbx, %rsi
	callq	_amdgpu_irq_get
	movq	_AMDGPU_THERMAL_IRQ_HIGH_TO_LOW@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movq	%rbx, %rsi
	callq	_amdgpu_irq_get
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"kv_process_firmware_header failed\n"

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

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

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

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

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

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

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

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

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

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

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

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

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

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

	.comm	_KV_TEMP_RANGE_MIN,4,2          ## @KV_TEMP_RANGE_MIN
	.comm	_KV_TEMP_RANGE_MAX,4,2          ## @KV_TEMP_RANGE_MAX
L_.str.15:                              ## @.str.15
	.asciz	"kv_set_thermal_temperature_range failed\n"

	.comm	_AMDGPU_THERMAL_IRQ_LOW_TO_HIGH,4,2 ## @AMDGPU_THERMAL_IRQ_LOW_TO_HIGH
	.comm	_AMDGPU_THERMAL_IRQ_HIGH_TO_LOW,4,2 ## @AMDGPU_THERMAL_IRQ_HIGH_TO_LOW
	.no_dead_strip	_kv_dpm_enable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function kv_dpm_enable
_kv_dpm_enable:                         ; @kv_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	_kv_get_pi
	mov	x21, x0
	mov	x0, x19
	bl	_kv_process_firmware_header
	cbz	w0, LBB0_2
; %bb.1:
	mov	x20, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_14
LBB0_2:
	mov	x0, x19
	bl	_kv_init_fps_limits
	mov	x0, x19
	bl	_kv_init_graphics_levels
	mov	x0, x19
	bl	_kv_program_bootup_state
	cbz	w0, LBB0_4
; %bb.3:
	mov	x20, x0
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_14
LBB0_4:
	mov	x0, x19
	bl	_kv_calculate_dfs_bypass_settings
	mov	x0, x19
	bl	_kv_upload_dpm_settings
	cbz	w0, LBB0_6
; %bb.5:
	mov	x20, x0
Lloh4:
	adrp	x0, l_.str.2@PAGE
Lloh5:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_14
LBB0_6:
	mov	x0, x19
	bl	_kv_populate_uvd_table
	cbz	w0, LBB0_8
; %bb.7:
	mov	x20, x0
Lloh6:
	adrp	x0, l_.str.3@PAGE
Lloh7:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_14
LBB0_8:
	mov	x0, x19
	bl	_kv_populate_vce_table
	cbz	w0, LBB0_10
; %bb.9:
	mov	x20, x0
Lloh8:
	adrp	x0, l_.str.4@PAGE
Lloh9:
	add	x0, x0, l_.str.4@PAGEOFF
	b	LBB0_14
LBB0_10:
	mov	x0, x19
	bl	_kv_populate_samu_table
	cbz	w0, LBB0_12
; %bb.11:
	mov	x20, x0
Lloh10:
	adrp	x0, l_.str.5@PAGE
Lloh11:
	add	x0, x0, l_.str.5@PAGEOFF
	b	LBB0_14
LBB0_12:
	mov	x0, x19
	bl	_kv_populate_acp_table
	cbz	w0, LBB0_16
; %bb.13:
	mov	x20, x0
Lloh12:
	adrp	x0, l_.str.6@PAGE
Lloh13:
	add	x0, x0, l_.str.6@PAGEOFF
LBB0_14:
	bl	_DRM_ERROR
LBB0_15:
	mov	x0, x20
	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_16:
	mov	x0, x19
	bl	_kv_program_vc
	mov	x0, x19
	bl	_kv_start_am
	ldr	x8, [x21]
	cbz	x8, LBB0_19
; %bb.17:
	mov	x0, x19
	bl	_kv_enable_auto_thermal_throttling
	cbz	w0, LBB0_19
; %bb.18:
	mov	x20, x0
Lloh14:
	adrp	x0, l_.str.7@PAGE
Lloh15:
	add	x0, x0, l_.str.7@PAGEOFF
	b	LBB0_14
LBB0_19:
	mov	x0, x19
	bl	_kv_enable_dpm_voltage_scaling
	cbz	w0, LBB0_21
; %bb.20:
	mov	x20, x0
Lloh16:
	adrp	x0, l_.str.8@PAGE
Lloh17:
	add	x0, x0, l_.str.8@PAGEOFF
	b	LBB0_14
LBB0_21:
	mov	x0, x19
	bl	_kv_set_dpm_interval
	cbz	w0, LBB0_23
; %bb.22:
	mov	x20, x0
Lloh18:
	adrp	x0, l_.str.9@PAGE
Lloh19:
	add	x0, x0, l_.str.9@PAGEOFF
	b	LBB0_14
LBB0_23:
	mov	x0, x19
	bl	_kv_set_dpm_boot_state
	cbz	w0, LBB0_25
; %bb.24:
	mov	x20, x0
Lloh20:
	adrp	x0, l_.str.10@PAGE
Lloh21:
	add	x0, x0, l_.str.10@PAGEOFF
	b	LBB0_14
LBB0_25:
	mov	x0, x19
	mov	w1, #1
	bl	_kv_enable_ulv
	cbz	w0, LBB0_27
; %bb.26:
	mov	x20, x0
Lloh22:
	adrp	x0, l_.str.11@PAGE
Lloh23:
	add	x0, x0, l_.str.11@PAGEOFF
	b	LBB0_14
LBB0_27:
	mov	x0, x19
	bl	_kv_start_dpm
	mov	x0, x19
	mov	w1, #1
	bl	_kv_enable_didt
	cbz	w0, LBB0_29
; %bb.28:
	mov	x20, x0
Lloh24:
	adrp	x0, l_.str.12@PAGE
Lloh25:
	add	x0, x0, l_.str.12@PAGEOFF
	b	LBB0_14
LBB0_29:
	mov	x0, x19
	mov	w1, #1
	bl	_kv_enable_smc_cac
	cbz	w0, LBB0_31
; %bb.30:
	mov	x20, x0
Lloh26:
	adrp	x0, l_.str.13@PAGE
Lloh27:
	add	x0, x0, l_.str.13@PAGEOFF
	b	LBB0_14
LBB0_31:
	mov	x0, x19
	bl	_kv_reset_acp_boot_level
	mov	x0, x19
	mov	w1, #0
	bl	_amdgpu_kv_smc_bapm_enable
	cbz	w0, LBB0_33
; %bb.32:
	mov	x20, x0
Lloh28:
	adrp	x0, l_.str.14@PAGE
Lloh29:
	add	x0, x0, l_.str.14@PAGEOFF
	b	LBB0_14
LBB0_33:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_37
; %bb.34:
	ldr	w0, [x19, #4]
	bl	_amdgpu_is_internal_thermal_sensor
	cbz	x0, LBB0_37
; %bb.35:
Lloh30:
	adrp	x8, _KV_TEMP_RANGE_MIN@GOTPAGE
Lloh31:
	ldr	x8, [x8, _KV_TEMP_RANGE_MIN@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x8]
Lloh33:
	adrp	x8, _KV_TEMP_RANGE_MAX@GOTPAGE
Lloh34:
	ldr	x8, [x8, _KV_TEMP_RANGE_MAX@GOTPAGEOFF]
Lloh35:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_kv_set_thermal_temperature_range
	mov	x20, x0
	cbz	w0, LBB0_38
; %bb.36:
Lloh36:
	adrp	x0, l_.str.15@PAGE
Lloh37:
	add	x0, x0, l_.str.15@PAGEOFF
	b	LBB0_14
LBB0_37:
	mov	w20, #0
	b	LBB0_15
LBB0_38:
Lloh38:
	adrp	x8, _AMDGPU_THERMAL_IRQ_LOW_TO_HIGH@GOTPAGE
Lloh39:
	ldr	x8, [x8, _AMDGPU_THERMAL_IRQ_LOW_TO_HIGH@GOTPAGEOFF]
Lloh40:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x19
	bl	_amdgpu_irq_get
Lloh41:
	adrp	x8, _AMDGPU_THERMAL_IRQ_HIGH_TO_LOW@GOTPAGE
Lloh42:
	ldr	x8, [x8, _AMDGPU_THERMAL_IRQ_HIGH_TO_LOW@GOTPAGEOFF]
Lloh43:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x19
	bl	_amdgpu_irq_get
	b	LBB0_15
	.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
	.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 AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"kv_process_firmware_header failed\n"

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

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

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

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

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

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

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

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

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

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

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

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

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

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

	.comm	_KV_TEMP_RANGE_MIN,4,2          ; @KV_TEMP_RANGE_MIN
	.comm	_KV_TEMP_RANGE_MAX,4,2          ; @KV_TEMP_RANGE_MAX
l_.str.15:                              ; @.str.15
	.asciz	"kv_set_thermal_temperature_range failed\n"

	.comm	_AMDGPU_THERMAL_IRQ_LOW_TO_HIGH,4,2 ; @AMDGPU_THERMAL_IRQ_LOW_TO_HIGH
	.comm	_AMDGPU_THERMAL_IRQ_HIGH_TO_LOW,4,2 ; @AMDGPU_THERMAL_IRQ_HIGH_TO_LOW
	.no_dead_strip	_kv_dpm_enable
.subsections_via_symbols
