	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_pm_init                 ## -- Begin function radeon_pm_init
	.p2align	4, 0x90
_radeon_pm_init:                        ## @radeon_pm_init
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	_PM_METHOD_PROFILE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 100(%rdi)
	movq	_PM_PROFILE_DEFAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 96(%rdi)
	movq	_DYNPM_STATE_DISABLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 92(%rdi)
	movq	_DYNPM_ACTION_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 88(%rdi)
	movabsq	$4294967297, %rax               ## imm = 0x100000001
	movq	%rax, 16(%rdi)
	movq	128(%rdi), %rax
	movq	136(%rdi), %rcx
	movq	%rcx, 40(%rdi)
	movq	%rax, 32(%rdi)
	movq	%rcx, 80(%rdi)
	movq	%rax, 72(%rdi)
	movq	_THERMAL_TYPE_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 64(%rdi)
	cmpq	$0, 120(%rdi)
	je	LBB0_15
## %bb.1:
	cmpq	$0, 112(%rbx)
	je	LBB0_3
## %bb.2:
	movq	%rbx, %rdi
	callq	_radeon_atombios_get_power_modes
	jmp	LBB0_4
LBB0_3:
	movq	%rbx, %rdi
	callq	_radeon_combios_get_power_modes
LBB0_4:
	movq	%rbx, %rdi
	callq	_radeon_pm_print_states
	movq	%rbx, %rdi
	callq	_radeon_pm_init_profile
	movq	(%rbx), %rax
	movq	_CHIP_BARTS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jl	LBB0_15
## %bb.5:
	movq	_CHIP_CAYMAN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jg	LBB0_15
## %bb.6:
	cmpq	$0, 104(%rbx)
	je	LBB0_15
## %bb.7:
	movq	56(%rbx), %rsi
	testq	%rsi, %rsi
	je	LBB0_9
## %bb.8:
	movq	_SET_VOLTAGE_TYPE_ASIC_VDDC@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_radeon_atom_set_voltage
LBB0_9:
	movq	48(%rbx), %rsi
	testq	%rsi, %rsi
	je	LBB0_11
## %bb.10:
	movq	_SET_VOLTAGE_TYPE_ASIC_VDDCI@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_radeon_atom_set_voltage
LBB0_11:
	movq	40(%rbx), %rsi
	testq	%rsi, %rsi
	je	LBB0_13
## %bb.12:
	movq	%rbx, %rdi
	callq	_radeon_set_engine_clock
LBB0_13:
	movq	32(%rbx), %rsi
	testq	%rsi, %rsi
	je	LBB0_15
## %bb.14:
	movq	%rbx, %rdi
	callq	_radeon_set_memory_clock
LBB0_15:
	movq	%rbx, %rdi
	callq	_radeon_hwmon_init
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_24
## %bb.16:
	leaq	28(%rbx), %rdi
	movq	_radeon_dynpm_idle_work_handler@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_INIT_DELAYED_WORK
	cmpl	$2, 24(%rbx)
	jl	LBB0_24
## %bb.17:
	movl	8(%rbx), %edi
	movq	_dev_attr_power_profile@GOTPCREL(%rip), %rsi
	callq	_device_create_file
	testl	%eax, %eax
	je	LBB0_19
## %bb.18:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
LBB0_19:
	movl	8(%rbx), %edi
	movq	_dev_attr_power_method@GOTPCREL(%rip), %rsi
	callq	_device_create_file
	testl	%eax, %eax
	je	LBB0_21
## %bb.20:
	leaq	L_.str.1(%rip), %rdi
	callq	_DRM_ERROR
LBB0_21:
	movq	%rbx, %rdi
	callq	_radeon_debugfs_pm_init
	testq	%rax, %rax
	je	LBB0_23
## %bb.22:
	leaq	L_.str.2(%rip), %rdi
	callq	_DRM_ERROR
LBB0_23:
	leaq	L_.str.3(%rip), %rdi
	callq	_DRM_INFO
LBB0_24:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PM_METHOD_PROFILE,4,2          ## @PM_METHOD_PROFILE
	.comm	_PM_PROFILE_DEFAULT,4,2         ## @PM_PROFILE_DEFAULT
	.comm	_DYNPM_STATE_DISABLED,4,2       ## @DYNPM_STATE_DISABLED
	.comm	_DYNPM_ACTION_NONE,4,2          ## @DYNPM_ACTION_NONE
	.comm	_THERMAL_TYPE_NONE,4,2          ## @THERMAL_TYPE_NONE
	.comm	_CHIP_BARTS,8,3                 ## @CHIP_BARTS
	.comm	_CHIP_CAYMAN,8,3                ## @CHIP_CAYMAN
	.comm	_SET_VOLTAGE_TYPE_ASIC_VDDC,4,2 ## @SET_VOLTAGE_TYPE_ASIC_VDDC
	.comm	_SET_VOLTAGE_TYPE_ASIC_VDDCI,4,2 ## @SET_VOLTAGE_TYPE_ASIC_VDDCI
	.comm	_radeon_dynpm_idle_work_handler,4,2 ## @radeon_dynpm_idle_work_handler
	.comm	_dev_attr_power_profile,4,2     ## @dev_attr_power_profile
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to create device file for power profile\n"

	.comm	_dev_attr_power_method,4,2      ## @dev_attr_power_method
L_.str.1:                               ## @.str.1
	.asciz	"failed to create device file for power method\n"

L_.str.2:                               ## @.str.2
	.asciz	"Failed to register debugfs file for PM!\n"

L_.str.3:                               ## @.str.3
	.asciz	"radeon: power management initialized\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_pm_init                 ; -- Begin function radeon_pm_init
	.p2align	2
_radeon_pm_init:                        ; @radeon_pm_init
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x8, _PM_METHOD_PROFILE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PM_METHOD_PROFILE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _PM_PROFILE_DEFAULT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PM_PROFILE_DEFAULT@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	stp	w9, w8, [x0, #96]
Lloh6:
	adrp	x8, _DYNPM_STATE_DISABLED@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DYNPM_STATE_DISABLED@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _DYNPM_ACTION_NONE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _DYNPM_ACTION_NONE@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	stp	w9, w8, [x0, #88]
	movi.2s	v0, #1
	str	d0, [x0, #16]
	ldp	x9, x8, [x0, #128]
	ldr	x10, [x0, #120]
	stp	x9, x8, [x0, #32]
	stp	x9, x8, [x0, #72]
Lloh12:
	adrp	x8, _THERMAL_TYPE_NONE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _THERMAL_TYPE_NONE@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	str	w8, [x0, #64]
	cbz	x10, LBB0_15
; %bb.1:
	ldr	x8, [x19, #112]
	cbz	x8, LBB0_3
; %bb.2:
	mov	x0, x19
	bl	_radeon_atombios_get_power_modes
	b	LBB0_4
LBB0_3:
	mov	x0, x19
	bl	_radeon_combios_get_power_modes
LBB0_4:
	mov	x0, x19
	bl	_radeon_pm_print_states
	mov	x0, x19
	bl	_radeon_pm_init_profile
	ldr	x8, [x19]
Lloh15:
	adrp	x9, _CHIP_BARTS@GOTPAGE
Lloh16:
	ldr	x9, [x9, _CHIP_BARTS@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x8, x9
	b.lt	LBB0_15
; %bb.5:
Lloh18:
	adrp	x9, _CHIP_CAYMAN@GOTPAGE
Lloh19:
	ldr	x9, [x9, _CHIP_CAYMAN@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	cmp	x8, x9
	b.gt	LBB0_15
; %bb.6:
	ldr	x8, [x19, #104]
	cbz	x8, LBB0_15
; %bb.7:
	ldr	x1, [x19, #56]
	cbz	x1, LBB0_9
; %bb.8:
Lloh21:
	adrp	x8, _SET_VOLTAGE_TYPE_ASIC_VDDC@GOTPAGE
Lloh22:
	ldr	x8, [x8, _SET_VOLTAGE_TYPE_ASIC_VDDC@GOTPAGEOFF]
Lloh23:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_radeon_atom_set_voltage
LBB0_9:
	ldr	x1, [x19, #48]
	cbz	x1, LBB0_11
; %bb.10:
Lloh24:
	adrp	x8, _SET_VOLTAGE_TYPE_ASIC_VDDCI@GOTPAGE
Lloh25:
	ldr	x8, [x8, _SET_VOLTAGE_TYPE_ASIC_VDDCI@GOTPAGEOFF]
Lloh26:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_radeon_atom_set_voltage
LBB0_11:
	ldr	x1, [x19, #40]
	cbz	x1, LBB0_13
; %bb.12:
	mov	x0, x19
	bl	_radeon_set_engine_clock
LBB0_13:
	ldr	x1, [x19, #32]
	cbz	x1, LBB0_15
; %bb.14:
	mov	x0, x19
	bl	_radeon_set_memory_clock
LBB0_15:
	mov	x0, x19
	bl	_radeon_hwmon_init
	mov	x20, x0
	cbnz	w0, LBB0_24
; %bb.16:
	add	x0, x19, #28
Lloh27:
	adrp	x8, _radeon_dynpm_idle_work_handler@GOTPAGE
Lloh28:
	ldr	x8, [x8, _radeon_dynpm_idle_work_handler@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	bl	_INIT_DELAYED_WORK
	ldr	w8, [x19, #24]
	cmp	w8, #2
	b.lt	LBB0_24
; %bb.17:
	ldr	w0, [x19, #8]
Lloh30:
	adrp	x1, _dev_attr_power_profile@GOTPAGE
Lloh31:
	ldr	x1, [x1, _dev_attr_power_profile@GOTPAGEOFF]
	bl	_device_create_file
	cbz	w0, LBB0_19
; %bb.18:
Lloh32:
	adrp	x0, l_.str@PAGE
Lloh33:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
LBB0_19:
	ldr	w0, [x19, #8]
Lloh34:
	adrp	x1, _dev_attr_power_method@GOTPAGE
Lloh35:
	ldr	x1, [x1, _dev_attr_power_method@GOTPAGEOFF]
	bl	_device_create_file
	cbz	w0, LBB0_21
; %bb.20:
Lloh36:
	adrp	x0, l_.str.1@PAGE
Lloh37:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_ERROR
LBB0_21:
	mov	x0, x19
	bl	_radeon_debugfs_pm_init
	cbz	x0, LBB0_23
; %bb.22:
Lloh38:
	adrp	x0, l_.str.2@PAGE
Lloh39:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DRM_ERROR
LBB0_23:
Lloh40:
	adrp	x0, l_.str.3@PAGE
Lloh41:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_DRM_INFO
LBB0_24:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpAdd	Lloh40, Lloh41
	.cfi_endproc
                                        ; -- End function
	.comm	_PM_METHOD_PROFILE,4,2          ; @PM_METHOD_PROFILE
	.comm	_PM_PROFILE_DEFAULT,4,2         ; @PM_PROFILE_DEFAULT
	.comm	_DYNPM_STATE_DISABLED,4,2       ; @DYNPM_STATE_DISABLED
	.comm	_DYNPM_ACTION_NONE,4,2          ; @DYNPM_ACTION_NONE
	.comm	_THERMAL_TYPE_NONE,4,2          ; @THERMAL_TYPE_NONE
	.comm	_CHIP_BARTS,8,3                 ; @CHIP_BARTS
	.comm	_CHIP_CAYMAN,8,3                ; @CHIP_CAYMAN
	.comm	_SET_VOLTAGE_TYPE_ASIC_VDDC,4,2 ; @SET_VOLTAGE_TYPE_ASIC_VDDC
	.comm	_SET_VOLTAGE_TYPE_ASIC_VDDCI,4,2 ; @SET_VOLTAGE_TYPE_ASIC_VDDCI
	.comm	_radeon_dynpm_idle_work_handler,4,2 ; @radeon_dynpm_idle_work_handler
	.comm	_dev_attr_power_profile,4,2     ; @dev_attr_power_profile
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to create device file for power profile\n"

	.comm	_dev_attr_power_method,4,2      ; @dev_attr_power_method
l_.str.1:                               ; @.str.1
	.asciz	"failed to create device file for power method\n"

l_.str.2:                               ; @.str.2
	.asciz	"Failed to register debugfs file for PM!\n"

l_.str.3:                               ; @.str.3
	.asciz	"radeon: power management initialized\n"

.subsections_via_symbols
