	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_pm_late_init            ## -- Begin function radeon_pm_late_init
	.p2align	4, 0x90
_radeon_pm_late_init:                   ## @radeon_pm_late_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	%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
	movq	(%rdi), %rax
	movq	_PM_METHOD_DPM@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_15
## %bb.1:
	xorl	%r14d, %r14d
	cmpl	$0, 8(%rbx)
	je	LBB0_23
## %bb.2:
	cmpl	$0, 12(%rbx)
	jne	LBB0_12
## %bb.3:
	movl	24(%rbx), %edi
	movq	_dev_attr_power_dpm_state@GOTPCREL(%rip), %rsi
	callq	_device_create_file
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
LBB0_5:
	movl	24(%rbx), %edi
	movq	_dev_attr_power_dpm_force_performance_level@GOTPCREL(%rip), %rsi
	callq	_device_create_file
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
LBB0_7:
	movl	24(%rbx), %edi
	movq	_dev_attr_power_profile@GOTPCREL(%rip), %rsi
	callq	_device_create_file
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	leaq	L_.str.1(%rip), %rdi
	callq	_DRM_ERROR
LBB0_9:
	movl	24(%rbx), %edi
	movq	_dev_attr_power_method@GOTPCREL(%rip), %rsi
	callq	_device_create_file
	testl	%eax, %eax
	je	LBB0_11
## %bb.10:
	leaq	L_.str.2(%rip), %rdi
	callq	_DRM_ERROR
LBB0_11:
	movl	$1, 12(%rbx)
LBB0_12:
	leaq	20(%rbx), %r12
	movq	%r12, %rdi
	callq	_mutex_lock
	movq	%rbx, %rdi
	callq	_radeon_dpm_late_enable
	movl	%eax, %r15d
	movq	%r12, %rdi
	callq	_mutex_unlock
	testl	%r15d, %r15d
	je	LBB0_14
## %bb.13:
	movl	$0, 8(%rbx)
	leaq	L_.str.3(%rip), %rdi
	jmp	LBB0_21
LBB0_15:
	xorl	%r14d, %r14d
	cmpl	$2, 16(%rbx)
	jl	LBB0_23
## %bb.16:
	cmpl	$0, 12(%rbx)
	jne	LBB0_23
## %bb.17:
	movl	24(%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.1(%rip), %rdi
	callq	_DRM_ERROR
LBB0_19:
	movl	24(%rbx), %edi
	movq	_dev_attr_power_method@GOTPCREL(%rip), %rsi
	callq	_device_create_file
	testl	%eax, %eax
	je	LBB0_22
## %bb.20:
	movl	%eax, %r15d
	leaq	L_.str.2(%rip), %rdi
LBB0_21:
	callq	_DRM_ERROR
	movl	%r15d, %r14d
	jmp	LBB0_23
LBB0_14:
	movq	%rbx, %rdi
	callq	_radeon_pm_compute_clocks
	jmp	LBB0_23
LBB0_22:
	movl	$1, 12(%rbx)
LBB0_23:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PM_METHOD_DPM,8,3              ## @PM_METHOD_DPM
	.comm	_dev_attr_power_dpm_state,4,2   ## @dev_attr_power_dpm_state
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to create device file for dpm state\n"

	.comm	_dev_attr_power_dpm_force_performance_level,4,2 ## @dev_attr_power_dpm_force_performance_level
	.comm	_dev_attr_power_profile,4,2     ## @dev_attr_power_profile
L_.str.1:                               ## @.str.1
	.asciz	"failed to create device file for power profile\n"

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

L_.str.3:                               ## @.str.3
	.asciz	"radeon_pm_late_init failed, disabling dpm\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_pm_late_init            ; -- Begin function radeon_pm_late_init
	.p2align	2
_radeon_pm_late_init:                   ; @radeon_pm_late_init
	.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
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _PM_METHOD_DPM@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PM_METHOD_DPM@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_14
; %bb.1:
	ldr	w8, [x19, #8]
	cbz	w8, LBB0_16
; %bb.2:
	ldr	w8, [x19, #12]
	cbnz	w8, LBB0_12
; %bb.3:
	ldr	w0, [x19, #24]
Lloh3:
	adrp	x1, _dev_attr_power_dpm_state@GOTPAGE
Lloh4:
	ldr	x1, [x1, _dev_attr_power_dpm_state@GOTPAGEOFF]
	bl	_device_create_file
	cbz	w0, LBB0_5
; %bb.4:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
LBB0_5:
	ldr	w0, [x19, #24]
Lloh7:
	adrp	x1, _dev_attr_power_dpm_force_performance_level@GOTPAGE
Lloh8:
	ldr	x1, [x1, _dev_attr_power_dpm_force_performance_level@GOTPAGEOFF]
	bl	_device_create_file
	cbz	w0, LBB0_7
; %bb.6:
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
LBB0_7:
	ldr	w0, [x19, #24]
Lloh11:
	adrp	x1, _dev_attr_power_profile@GOTPAGE
Lloh12:
	ldr	x1, [x1, _dev_attr_power_profile@GOTPAGEOFF]
	bl	_device_create_file
	cbz	w0, LBB0_9
; %bb.8:
Lloh13:
	adrp	x0, l_.str.1@PAGE
Lloh14:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_ERROR
LBB0_9:
	ldr	w0, [x19, #24]
Lloh15:
	adrp	x1, _dev_attr_power_method@GOTPAGE
Lloh16:
	ldr	x1, [x1, _dev_attr_power_method@GOTPAGEOFF]
	bl	_device_create_file
	cbz	w0, LBB0_11
; %bb.10:
Lloh17:
	adrp	x0, l_.str.2@PAGE
Lloh18:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DRM_ERROR
LBB0_11:
	mov	w8, #1
	str	w8, [x19, #12]
LBB0_12:
	add	x21, x19, #20
	mov	x0, x21
	bl	_mutex_lock
	mov	x0, x19
	bl	_radeon_dpm_late_enable
	mov	x20, x0
	mov	x0, x21
	bl	_mutex_unlock
	cbz	w20, LBB0_18
; %bb.13:
	str	wzr, [x19, #8]
Lloh19:
	adrp	x0, l_.str.3@PAGE
Lloh20:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_DRM_ERROR
	b	LBB0_17
LBB0_14:
	ldr	w8, [x19, #16]
	cmp	w8, #2
	b.lt	LBB0_16
; %bb.15:
	ldr	w8, [x19, #12]
	cbz	w8, LBB0_19
LBB0_16:
	mov	w20, #0
LBB0_17:
	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_18:
	mov	x0, x19
	bl	_radeon_pm_compute_clocks
	b	LBB0_17
LBB0_19:
	ldr	w0, [x19, #24]
Lloh21:
	adrp	x1, _dev_attr_power_profile@GOTPAGE
Lloh22:
	ldr	x1, [x1, _dev_attr_power_profile@GOTPAGEOFF]
	bl	_device_create_file
	cbz	w0, LBB0_21
; %bb.20:
Lloh23:
	adrp	x0, l_.str.1@PAGE
Lloh24:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_ERROR
LBB0_21:
	ldr	w0, [x19, #24]
Lloh25:
	adrp	x1, _dev_attr_power_method@GOTPAGE
Lloh26:
	ldr	x1, [x1, _dev_attr_power_method@GOTPAGEOFF]
	bl	_device_create_file
	mov	x20, x0
	cbz	w0, LBB0_23
; %bb.22:
Lloh27:
	adrp	x0, l_.str.2@PAGE
Lloh28:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DRM_ERROR
	b	LBB0_17
LBB0_23:
	mov	w8, #1
	str	w8, [x19, #12]
	b	LBB0_17
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_PM_METHOD_DPM,8,3              ; @PM_METHOD_DPM
	.comm	_dev_attr_power_dpm_state,4,2   ; @dev_attr_power_dpm_state
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to create device file for dpm state\n"

	.comm	_dev_attr_power_dpm_force_performance_level,4,2 ; @dev_attr_power_dpm_force_performance_level
	.comm	_dev_attr_power_profile,4,2     ; @dev_attr_power_profile
l_.str.1:                               ; @.str.1
	.asciz	"failed to create device file for power profile\n"

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

l_.str.3:                               ; @.str.3
	.asciz	"radeon_pm_late_init failed, disabling dpm\n"

.subsections_via_symbols
