	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function radeon_set_pm_profile
_radeon_set_pm_profile:                 ## @radeon_set_pm_profile
	.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	%rcx, %r15
	movq	%rdx, %r12
	callq	_dev_get_drvdata
	movq	8(%rax), %rbx
	movq	_RADEON_IS_PX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rbx)
	je	LBB0_3
## %bb.1:
	movq	(%rax), %rax
	movq	_DRM_SWITCH_POWER_ON@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
LBB0_3:
	leaq	16(%rbx), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	8(%rbx), %rax
	movq	_PM_METHOD_PROFILE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_15
## %bb.4:
	leaq	L_.str(%rip), %r13
	movq	%r13, %rdi
	callq	_strlen
	movq	%r13, %rdi
	movq	%r12, %rsi
	movl	%eax, %edx
	callq	_strncmp
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	leaq	L_.str.1(%rip), %r13
	movq	%r13, %rdi
	callq	_strlen
	movq	%r13, %rdi
	movq	%r12, %rsi
	movl	%eax, %edx
	callq	_strncmp
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	leaq	L_.str.2(%rip), %r13
	movq	%r13, %rdi
	callq	_strlen
	movq	%r13, %rdi
	movq	%r12, %rsi
	movl	%eax, %edx
	callq	_strncmp
	testq	%rax, %rax
	je	LBB0_9
## %bb.10:
	leaq	L_.str.3(%rip), %r13
	movq	%r13, %rdi
	callq	_strlen
	movq	%r13, %rdi
	movq	%r12, %rsi
	movl	%eax, %edx
	callq	_strncmp
	testq	%rax, %rax
	je	LBB0_11
## %bb.12:
	leaq	L_.str.4(%rip), %r13
	movq	%r13, %rdi
	callq	_strlen
	movq	%r13, %rdi
	movq	%r12, %rsi
	movl	%eax, %edx
	callq	_strncmp
	testq	%rax, %rax
	je	LBB0_13
LBB0_15:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subq	(%rax), %r15
	jmp	LBB0_16
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subq	(%rax), %r15
	jmp	LBB0_17
LBB0_5:
	movq	_PM_PROFILE_DEFAULT@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_7:
	movq	_PM_PROFILE_AUTO@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_9:
	movq	_PM_PROFILE_LOW@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_11:
	movq	_PM_PROFILE_MID@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_13:
	movq	_PM_PROFILE_HIGH@GOTPCREL(%rip), %rax
LBB0_14:
	movl	(%rax), %eax
	movl	%eax, 20(%rbx)
	movq	%rbx, %rdi
	callq	_radeon_pm_update_profile
	movq	%rbx, %rdi
	callq	_radeon_pm_set_clocks
LBB0_16:
	movq	%r14, %rdi
	callq	_mutex_unlock
LBB0_17:
	movq	%r15, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RADEON_IS_PX,4,2               ## @RADEON_IS_PX
	.comm	_DRM_SWITCH_POWER_ON,8,3        ## @DRM_SWITCH_POWER_ON
	.comm	_EINVAL,8,3                     ## @EINVAL
	.comm	_PM_METHOD_PROFILE,8,3          ## @PM_METHOD_PROFILE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"default"

	.comm	_PM_PROFILE_DEFAULT,4,2         ## @PM_PROFILE_DEFAULT
L_.str.1:                               ## @.str.1
	.asciz	"auto"

	.comm	_PM_PROFILE_AUTO,4,2            ## @PM_PROFILE_AUTO
L_.str.2:                               ## @.str.2
	.asciz	"low"

	.comm	_PM_PROFILE_LOW,4,2             ## @PM_PROFILE_LOW
L_.str.3:                               ## @.str.3
	.asciz	"mid"

	.comm	_PM_PROFILE_MID,4,2             ## @PM_PROFILE_MID
L_.str.4:                               ## @.str.4
	.asciz	"high"

	.comm	_PM_PROFILE_HIGH,4,2            ## @PM_PROFILE_HIGH
	.no_dead_strip	_radeon_set_pm_profile
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function radeon_set_pm_profile
_radeon_set_pm_profile:                 ; @radeon_set_pm_profile
	.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, x3
	mov	x22, x2
	bl	_dev_get_drvdata
	ldr	x21, [x0, #8]
	ldr	w8, [x21]
Lloh0:
	adrp	x9, _RADEON_IS_PX@GOTPAGE
Lloh1:
	ldr	x9, [x9, _RADEON_IS_PX@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	ldr	x8, [x0]
Lloh3:
	adrp	x9, _DRM_SWITCH_POWER_ON@GOTPAGE
Lloh4:
	ldr	x9, [x9, _DRM_SWITCH_POWER_ON@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
LBB0_2:
	add	x20, x21, #16
	mov	x0, x20
	bl	_mutex_lock
	ldr	x8, [x21, #8]
Lloh6:
	adrp	x9, _PM_METHOD_PROFILE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _PM_METHOD_PROFILE@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.3:
Lloh9:
	adrp	x23, l_.str@PAGE
Lloh10:
	add	x23, x23, l_.str@PAGEOFF
	mov	x0, x23
	bl	_strlen
	mov	x2, x0
	mov	x0, x23
	mov	x1, x22
	bl	_strncmp
	cbz	x0, LBB0_10
; %bb.4:
Lloh11:
	adrp	x23, l_.str.1@PAGE
Lloh12:
	add	x23, x23, l_.str.1@PAGEOFF
	mov	x0, x23
	bl	_strlen
	mov	x2, x0
	mov	x0, x23
	mov	x1, x22
	bl	_strncmp
	cbz	x0, LBB0_11
; %bb.5:
Lloh13:
	adrp	x23, l_.str.2@PAGE
Lloh14:
	add	x23, x23, l_.str.2@PAGEOFF
	mov	x0, x23
	bl	_strlen
	mov	x2, x0
	mov	x0, x23
	mov	x1, x22
	bl	_strncmp
	cbz	x0, LBB0_12
; %bb.6:
Lloh15:
	adrp	x23, l_.str.3@PAGE
Lloh16:
	add	x23, x23, l_.str.3@PAGEOFF
	mov	x0, x23
	bl	_strlen
	mov	x2, x0
	mov	x0, x23
	mov	x1, x22
	bl	_strncmp
	cbz	x0, LBB0_13
; %bb.7:
Lloh17:
	adrp	x23, l_.str.4@PAGE
Lloh18:
	add	x23, x23, l_.str.4@PAGEOFF
	mov	x0, x23
	bl	_strlen
	mov	x2, x0
	mov	x0, x23
	mov	x1, x22
	bl	_strncmp
	cbz	x0, LBB0_14
LBB0_8:
Lloh19:
	adrp	x8, _EINVAL@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh21:
	ldr	x8, [x8]
	neg	x19, x8
	b	LBB0_16
LBB0_9:
Lloh22:
	adrp	x8, _EINVAL@GOTPAGE
Lloh23:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh24:
	ldr	x8, [x8]
	neg	x19, x8
	b	LBB0_17
LBB0_10:
Lloh25:
	adrp	x8, _PM_PROFILE_DEFAULT@GOTPAGE
Lloh26:
	ldr	x8, [x8, _PM_PROFILE_DEFAULT@GOTPAGEOFF]
	b	LBB0_15
LBB0_11:
Lloh27:
	adrp	x8, _PM_PROFILE_AUTO@GOTPAGE
Lloh28:
	ldr	x8, [x8, _PM_PROFILE_AUTO@GOTPAGEOFF]
	b	LBB0_15
LBB0_12:
Lloh29:
	adrp	x8, _PM_PROFILE_LOW@GOTPAGE
Lloh30:
	ldr	x8, [x8, _PM_PROFILE_LOW@GOTPAGEOFF]
	b	LBB0_15
LBB0_13:
Lloh31:
	adrp	x8, _PM_PROFILE_MID@GOTPAGE
Lloh32:
	ldr	x8, [x8, _PM_PROFILE_MID@GOTPAGEOFF]
	b	LBB0_15
LBB0_14:
Lloh33:
	adrp	x8, _PM_PROFILE_HIGH@GOTPAGE
Lloh34:
	ldr	x8, [x8, _PM_PROFILE_HIGH@GOTPAGEOFF]
LBB0_15:
	ldr	w8, [x8]
	str	w8, [x21, #20]
	mov	x0, x21
	bl	_radeon_pm_update_profile
	mov	x0, x21
	bl	_radeon_pm_set_clocks
LBB0_16:
	mov	x0, x20
	bl	_mutex_unlock
LBB0_17:
	mov	x0, x19
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_RADEON_IS_PX,4,2               ; @RADEON_IS_PX
	.comm	_DRM_SWITCH_POWER_ON,8,3        ; @DRM_SWITCH_POWER_ON
	.comm	_EINVAL,8,3                     ; @EINVAL
	.comm	_PM_METHOD_PROFILE,8,3          ; @PM_METHOD_PROFILE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"default"

	.comm	_PM_PROFILE_DEFAULT,4,2         ; @PM_PROFILE_DEFAULT
l_.str.1:                               ; @.str.1
	.asciz	"auto"

	.comm	_PM_PROFILE_AUTO,4,2            ; @PM_PROFILE_AUTO
l_.str.2:                               ; @.str.2
	.asciz	"low"

	.comm	_PM_PROFILE_LOW,4,2             ; @PM_PROFILE_LOW
l_.str.3:                               ; @.str.3
	.asciz	"mid"

	.comm	_PM_PROFILE_MID,4,2             ; @PM_PROFILE_MID
l_.str.4:                               ; @.str.4
	.asciz	"high"

	.comm	_PM_PROFILE_HIGH,4,2            ; @PM_PROFILE_HIGH
	.no_dead_strip	_radeon_set_pm_profile
.subsections_via_symbols
