	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function amdgpu_set_pp_power_profile_mode
_amdgpu_set_pp_power_profile_mode:      ## @amdgpu_set_pp_power_profile_mode
	.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
	subq	$680, %rsp                      ## imm = 0x2A8
	.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
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	callq	_dev_get_drvdata
	movq	(%rax), %r14
	movq	$0, -712(%rbp)
	movb	$0, -692(%rbp)
	movw	$2592, -694(%rbp)               ## imm = 0xA20
	movb	(%r12), %al
	movb	%al, -690(%rbp)
	movb	$0, -689(%rbp)
	leaq	-690(%rbp), %rdi
	leaq	-712(%rbp), %rdx
	xorl	%esi, %esi
	callq	_kstrtol
	testl	%eax, %eax
	je	LBB0_1
LBB0_18:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subq	(%rax), %r15
LBB0_19:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_21
## %bb.20:
	movq	%r15, %rax
	addq	$680, %rsp                      ## imm = 0x2A8
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	-712(%rbp), %rax
	movq	_PP_SMC_POWER_PROFILE_CUSTOM@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.5:
	leaq	-128(%r15), %rax
	cmpq	$-126, %rax
	jb	LBB0_18
## %bb.6:
	leaq	1(%r15), %rbx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movsbl	1(%r12), %edi
	incq	%r12
	callq	_isspace
	decq	%rbx
	testq	%rax, %rax
	jne	LBB0_7
## %bb.8:
	leaq	-688(%rbp), %r13
	movq	%r13, %rdi
	movq	%r12, %rsi
	movq	%rbx, %rdx
	callq	_memcpy
	movq	%r13, -704(%rbp)
	cmpb	$0, -688(%rbp)
	je	LBB0_2
## %bb.9:
	xorl	%ebx, %ebx
	leaq	-704(%rbp), %r12
	leaq	-694(%rbp), %r13
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_11 Depth=1
	incq	%rbx
	movq	-704(%rbp), %rax
	cmpb	$0, (%rax)
	je	LBB0_3
LBB0_11:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_13 Depth 2
	movq	%r12, %rdi
	movq	%r13, %rsi
	callq	_strsep
	leaq	-560(,%rbx,8), %rdx
	addq	%rbp, %rdx
	movq	%rax, %rdi
	xorl	%esi, %esi
	callq	_kstrtol
	testl	%eax, %eax
	jne	LBB0_18
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	-704(%rbp), %rax
	movsbl	(%rax), %edi
	.p2align	4, 0x90
LBB0_13:                                ##   Parent Loop BB0_11 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	callq	_isspace
	testq	%rax, %rax
	je	LBB0_10
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=2
	movq	-704(%rbp), %rax
	leaq	1(%rax), %rcx
	movq	%rcx, -704(%rbp)
	movsbl	1(%rax), %edi
	jmp	LBB0_13
LBB0_2:
	xorl	%ebx, %ebx
LBB0_3:
	movq	-712(%rbp), %rax
	movq	%rax, -560(%rbp,%rbx,8)
	movq	%r14, %rdi
	callq	_is_support_sw_smu
	testq	%rax, %rax
	je	LBB0_15
## %bb.4:
	addq	$8, %r14
	leaq	-560(%rbp), %rsi
	movq	%r14, %rdi
	movq	%rbx, %rdx
	callq	_smu_set_power_profile_mode
	testl	%eax, %eax
	jne	LBB0_18
	jmp	LBB0_19
LBB0_15:
	movq	(%r14), %rax
	cmpq	$0, (%rax)
	je	LBB0_19
## %bb.16:
	leaq	-560(%rbp), %rsi
	movq	%r14, %rdi
	movq	%rbx, %rdx
	callq	_amdgpu_dpm_set_power_profile_mode
	testl	%eax, %eax
	jne	LBB0_18
	jmp	LBB0_19
LBB0_21:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L___const.amdgpu_set_pp_power_profile_mode.delimiter: ## @__const.amdgpu_set_pp_power_profile_mode.delimiter
	.asciz	" \n"

	.comm	_PP_SMC_POWER_PROFILE_CUSTOM,8,3 ## @PP_SMC_POWER_PROFILE_CUSTOM
	.comm	_EINVAL,8,3                     ## @EINVAL
	.no_dead_strip	_amdgpu_set_pp_power_profile_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function amdgpu_set_pp_power_profile_mode
_amdgpu_set_pp_power_profile_mode:      ; @amdgpu_set_pp_power_profile_mode
	.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
	sub	sp, sp, #688
	mov	x19, x3
	mov	x21, x2
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	bl	_dev_get_drvdata
	ldr	x20, [x0]
	str	xzr, [sp, #16]
	strb	wzr, [sp, #14]
	mov	w8, #2592
	strh	w8, [sp, #12]
	ldrb	w8, [x21]
	strb	w8, [sp, #30]
	strb	wzr, [sp, #31]
	add	x0, sp, #30
	add	x2, sp, #16
	mov	w1, #0
	bl	_kstrtol
	cbz	w0, LBB0_4
LBB0_1:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	neg	x19, x8
LBB0_2:
	ldur	x8, [x29, #-56]
Lloh6:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh7:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_19
; %bb.3:
	mov	x0, x19
	add	sp, sp, #688
	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
LBB0_4:
	ldr	x8, [sp, #16]
Lloh9:
	adrp	x9, _PP_SMC_POWER_PROFILE_CUSTOM@GOTPAGE
Lloh10:
	ldr	x9, [x9, _PP_SMC_POWER_PROFILE_CUSTOM@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_14
; %bb.5:
	sub	x8, x19, #128
	cmn	x8, #126
	b.lo	LBB0_1
; %bb.6:
	add	x22, x19, #1
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldrsb	w0, [x21, #1]!
	bl	_isspace
	sub	x22, x22, #1
	cbnz	x0, LBB0_7
; %bb.8:
	add	x23, sp, #40
	add	x0, sp, #40
	mov	x1, x21
	mov	x2, x22
	bl	_memcpy
	str	x23, [sp, #32]
	ldrb	w8, [sp, #40]
	cbz	w8, LBB0_14
; %bb.9:
	mov	x21, #0
	add	x22, sp, #168
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	add	x21, x21, #1
	ldr	x8, [sp, #32]
	ldrb	w8, [x8]
	cbz	w8, LBB0_15
LBB0_11:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_13 Depth 2
	add	x0, sp, #32
	add	x1, sp, #12
	bl	_strsep
	add	x2, x22, x21, lsl #3
	mov	w1, #0
	bl	_kstrtol
	cbnz	w0, LBB0_1
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	x8, [sp, #32]
	ldrsb	w0, [x8]
	bl	_isspace
	cbz	x0, LBB0_10
LBB0_13:                                ;   Parent Loop BB0_11 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [sp, #32]
	add	x9, x8, #1
	str	x9, [sp, #32]
	ldrsb	w0, [x8, #1]
	bl	_isspace
	cbnz	x0, LBB0_13
	b	LBB0_10
LBB0_14:
	mov	x21, #0
LBB0_15:
	ldr	x8, [sp, #16]
	add	x9, sp, #168
	str	x8, [x9, x21, lsl #3]
	mov	x0, x20
	bl	_is_support_sw_smu
	cbz	x0, LBB0_17
; %bb.16:
	add	x0, x20, #8
	add	x1, sp, #168
	mov	x2, x21
	bl	_smu_set_power_profile_mode
	cbnz	w0, LBB0_1
	b	LBB0_2
LBB0_17:
	ldr	x8, [x20]
	ldr	x8, [x8]
	cbz	x8, LBB0_2
; %bb.18:
	add	x1, sp, #168
	mov	x0, x20
	mov	x2, x21
	bl	_amdgpu_dpm_set_power_profile_mode
	cbnz	w0, LBB0_1
	b	LBB0_2
LBB0_19:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l___const.amdgpu_set_pp_power_profile_mode.delimiter: ; @__const.amdgpu_set_pp_power_profile_mode.delimiter
	.asciz	" \n"

	.comm	_PP_SMC_POWER_PROFILE_CUSTOM,8,3 ; @PP_SMC_POWER_PROFILE_CUSTOM
	.comm	_EINVAL,8,3                     ; @EINVAL
	.no_dead_strip	_amdgpu_set_pp_power_profile_mode
.subsections_via_symbols
