	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function radeon_pm_resume_dpm
_radeon_pm_resume_dpm:                  ## @radeon_pm_resume_dpm
	.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
	leaq	48(%rdi), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movl	52(%rbx), %eax
	movl	%eax, 56(%rbx)
	movl	%eax, 60(%rbx)
	movq	%rbx, %rdi
	callq	_radeon_dpm_setup_asic
	movq	%rbx, %rdi
	callq	_radeon_dpm_enable
	movl	%eax, %r15d
	movq	%r14, %rdi
	callq	_mutex_unlock
	testl	%r15d, %r15d
	je	LBB0_1
## %bb.2:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
	movq	(%rbx), %rax
	movq	_CHIP_BARTS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jl	LBB0_12
## %bb.3:
	movq	_CHIP_CAYMAN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jg	LBB0_12
## %bb.4:
	cmpq	$0, 64(%rbx)
	je	LBB0_12
## %bb.5:
	movq	40(%rbx), %rsi
	testq	%rsi, %rsi
	je	LBB0_7
## %bb.6:
	movq	_SET_VOLTAGE_TYPE_ASIC_VDDC@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_radeon_atom_set_voltage
LBB0_7:
	movq	32(%rbx), %rsi
	testq	%rsi, %rsi
	je	LBB0_9
## %bb.8:
	movq	_SET_VOLTAGE_TYPE_ASIC_VDDCI@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_radeon_atom_set_voltage
LBB0_9:
	movq	24(%rbx), %rsi
	testq	%rsi, %rsi
	je	LBB0_11
## %bb.10:
	movq	%rbx, %rdi
	callq	_radeon_set_engine_clock
LBB0_11:
	movq	16(%rbx), %rsi
	testq	%rsi, %rsi
	je	LBB0_12
## %bb.13:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_radeon_set_memory_clock        ## TAILCALL
LBB0_1:
	movl	$1, 8(%rbx)
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"radeon: dpm resume failed\n"

	.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
	.no_dead_strip	_radeon_pm_resume_dpm
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function radeon_pm_resume_dpm
_radeon_pm_resume_dpm:                  ; @radeon_pm_resume_dpm
	.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
	add	x20, x0, #48
	mov	x0, x20
	bl	_mutex_lock
	ldr	w8, [x19, #52]
	stp	w8, w8, [x19, #56]
	mov	x0, x19
	bl	_radeon_dpm_setup_asic
	mov	x0, x19
	bl	_radeon_dpm_enable
	mov	x21, x0
	mov	x0, x20
	bl	_mutex_unlock
	cbz	w21, LBB0_11
; %bb.1:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
	ldr	x8, [x19]
Lloh2:
	adrp	x9, _CHIP_BARTS@GOTPAGE
Lloh3:
	ldr	x9, [x9, _CHIP_BARTS@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
Lloh5:
	adrp	x10, _CHIP_CAYMAN@GOTPAGE
Lloh6:
	ldr	x10, [x10, _CHIP_CAYMAN@GOTPAGEOFF]
Lloh7:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #0, ge
	b.gt	LBB0_12
; %bb.2:
	ldr	x8, [x19, #64]
	cbz	x8, LBB0_12
; %bb.3:
	ldr	x1, [x19, #40]
	cbz	x1, LBB0_5
; %bb.4:
Lloh8:
	adrp	x8, _SET_VOLTAGE_TYPE_ASIC_VDDC@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SET_VOLTAGE_TYPE_ASIC_VDDC@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_radeon_atom_set_voltage
LBB0_5:
	ldr	x1, [x19, #32]
	cbz	x1, LBB0_7
; %bb.6:
Lloh11:
	adrp	x8, _SET_VOLTAGE_TYPE_ASIC_VDDCI@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SET_VOLTAGE_TYPE_ASIC_VDDCI@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_radeon_atom_set_voltage
LBB0_7:
	ldr	x1, [x19, #24]
	cbz	x1, LBB0_9
; %bb.8:
	mov	x0, x19
	bl	_radeon_set_engine_clock
LBB0_9:
	ldr	x1, [x19, #16]
	cbz	x1, LBB0_12
; %bb.10:
	mov	x0, x19
	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
	b	_radeon_set_memory_clock
LBB0_11:
	mov	w8, #1
	str	w8, [x19, #8]
LBB0_12:
	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
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"radeon: dpm resume failed\n"

	.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
	.no_dead_strip	_radeon_pm_resume_dpm
.subsections_via_symbols
