	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nouveau_pm_profile_set
_nouveau_pm_profile_set:                ## @nouveau_pm_profile_set
	.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
	subq	$48, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	callq	_nouveau_pm
	movq	%rax, %r14
	leaq	-64(%rbp), %rax
	movq	%rax, -72(%rbp)
	movq	_nouveau_perflvl_wr@GOTPCREL(%rip), %rax
	cmpl	$7777, (%rax)                   ## imm = 0x1E61
	jne	LBB0_1
## %bb.3:
	leaq	-64(%rbp), %r12
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movl	$16, %edx
	callq	_strncpy
	movb	$0, -49(%rbp)
	movq	%r12, %rdi
	movl	$10, %esi
	callq	_strchr
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movb	$0, (%rax)
LBB0_5:
	leaq	L_.str(%rip), %rsi
	leaq	-72(%rbp), %rdi
	callq	_strsep
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movq	%r15, %rdi
	movq	%rax, %rsi
	callq	_profile_find
	movq	%rax, %rbx
	jmp	LBB0_8
LBB0_1:
	movq	_EPERM@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_6:
	xorl	%ebx, %ebx
LBB0_8:
	leaq	L_.str(%rip), %rsi
	leaq	-72(%rbp), %rdi
	callq	_strsep
	movq	%rax, %rsi
	movq	%rbx, %rax
	testq	%rsi, %rsi
	je	LBB0_10
## %bb.9:
	movq	%r15, %rdi
	callq	_profile_find
LBB0_10:
	testq	%rbx, %rbx
	je	LBB0_12
## %bb.11:
	testq	%rax, %rax
	je	LBB0_12
## %bb.13:
	movq	%rbx, 8(%r14)
	movq	%rax, (%r14)
	movq	%r15, %rdi
	callq	_nouveau_pm_trigger
	xorl	%eax, %eax
	jmp	LBB0_14
LBB0_12:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_14:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-40(%rbp), %rcx
	jne	LBB0_16
## %bb.15:
	addq	$48, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_nouveau_perflvl_wr,4,2         ## @nouveau_perflvl_wr
	.comm	_EPERM,4,2                      ## @EPERM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	","

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_nouveau_pm_profile_set
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nouveau_pm_profile_set
_nouveau_pm_profile_set:                ; @nouveau_pm_profile_set
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	bl	_nouveau_pm
	add	x8, sp, #8
	str	x8, [sp]
Lloh3:
	adrp	x8, _nouveau_perflvl_wr@GOTPAGE
Lloh4:
	ldr	x8, [x8, _nouveau_perflvl_wr@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	mov	w9, #7777
	cmp	w8, w9
	b.ne	LBB0_5
; %bb.1:
	mov	x20, x0
	add	x0, sp, #8
	mov	x1, x21
	mov	w2, #16
	bl	_strncpy
	strb	wzr, [sp, #23]
	add	x0, sp, #8
	mov	w1, #10
	bl	_strchr
	cbz	x0, LBB0_3
; %bb.2:
	strb	wzr, [x0]
LBB0_3:
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, sp
	bl	_strsep
	cbz	x0, LBB0_6
; %bb.4:
	mov	x1, x0
	mov	x0, x19
	bl	_profile_find
	mov	x21, x0
	b	LBB0_7
LBB0_5:
Lloh8:
	adrp	x8, _EPERM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
	b	LBB0_13
LBB0_6:
	mov	x21, #0
LBB0_7:
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, sp
	bl	_strsep
	mov	x1, x0
	mov	x0, x21
	cbz	x1, LBB0_9
; %bb.8:
	mov	x0, x19
	bl	_profile_find
LBB0_9:
	cbz	x21, LBB0_12
; %bb.10:
	cbz	x0, LBB0_12
; %bb.11:
	stp	x0, x21, [x20]
	mov	x0, x19
	bl	_nouveau_pm_trigger
	mov	w0, #0
	b	LBB0_14
LBB0_12:
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_13:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_14:
	ldr	x8, [sp, #24]
Lloh14:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh15:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_16
; %bb.15:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_16:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_nouveau_perflvl_wr,4,2         ; @nouveau_perflvl_wr
	.comm	_EPERM,4,2                      ; @EPERM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	","

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_nouveau_pm_profile_set
.subsections_via_symbols
