	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pm_mng_profile_store
_pm_mng_profile_store:                  ## @pm_mng_profile_store
	.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, %rbx
	movq	%rdx, %r12
	callq	_dev_get_drvdata
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_hl_device_disabled_or_in_reset
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subq	(%rax), %rbx
	jmp	LBB0_13
LBB0_2:
	leaq	8(%r15), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	cmpq	$0, 24(%r15)
	je	LBB0_4
## %bb.3:
	movl	12(%r15), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_EPERM@GOTPCREL(%rip), %rax
LBB0_11:
	xorl	%ebx, %ebx
	subq	(%rax), %rbx
LBB0_12:
	movq	%r14, %rdi
	callq	_mutex_unlock
LBB0_13:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	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_5
## %bb.7:
	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_8
## %bb.10:
	movl	12(%r15), %edi
	leaq	L_.str.3(%rip), %rsi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_5:
	movq	(%r15), %rax
	movq	_PM_MANUAL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_12
## %bb.6:
	movq	_PLL_HIGH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%r15)
	movq	_PLL_LOW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_hl_device_set_frequency
	movq	_PM_AUTO@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r15)
	jmp	LBB0_12
LBB0_8:
	movq	(%r15), %rax
	movq	_PM_AUTO@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_12
## %bb.9:
	movq	_PM_MANUAL@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r15)
	movq	%r14, %rdi
	callq	_mutex_unlock
	addq	$16, %r15
	movq	%r15, %rdi
	callq	_flush_delayed_work
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,8,3                     ## @ENODEV
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Can't change PM profile while compute context is opened on the device\n"

	.comm	_EPERM,8,3                      ## @EPERM
L_.str.1:                               ## @.str.1
	.asciz	"auto"

	.comm	_PM_MANUAL,8,3                  ## @PM_MANUAL
	.comm	_PLL_HIGH,4,2                   ## @PLL_HIGH
	.comm	_PLL_LOW,4,2                    ## @PLL_LOW
	.comm	_PM_AUTO,8,3                    ## @PM_AUTO
L_.str.2:                               ## @.str.2
	.asciz	"manual"

L_.str.3:                               ## @.str.3
	.asciz	"value should be auto or manual\n"

	.comm	_EINVAL,8,3                     ## @EINVAL
	.no_dead_strip	_pm_mng_profile_store
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pm_mng_profile_store
_pm_mng_profile_store:                  ; @pm_mng_profile_store
	.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
	mov	x21, x0
	bl	_hl_device_disabled_or_in_reset
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _ENODEV@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	neg	x19, x8
	b	LBB0_6
LBB0_2:
	add	x20, x21, #8
	mov	x0, x20
	bl	_mutex_lock
	ldr	x8, [x21, #24]
	cbz	x8, LBB0_7
; %bb.3:
	ldr	w0, [x21, #12]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh5:
	adrp	x8, _EPERM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
LBB0_4:
	ldr	x8, [x8]
	neg	x19, x8
LBB0_5:
	mov	x0, x20
	bl	_mutex_unlock
LBB0_6:
	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
LBB0_7:
Lloh7:
	adrp	x23, l_.str.1@PAGE
Lloh8:
	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_10
; %bb.8:
Lloh9:
	adrp	x23, l_.str.2@PAGE
Lloh10:
	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.9:
	ldr	w0, [x21, #12]
Lloh11:
	adrp	x1, l_.str.3@PAGE
Lloh12:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_err
Lloh13:
	adrp	x8, _EINVAL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_4
LBB0_10:
	ldr	x8, [x21]
Lloh15:
	adrp	x9, _PM_MANUAL@GOTPAGE
Lloh16:
	ldr	x9, [x9, _PM_MANUAL@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.11:
Lloh18:
	adrp	x8, _PLL_HIGH@GOTPAGE
Lloh19:
	ldr	x8, [x8, _PLL_HIGH@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	str	w8, [x21, #20]
Lloh21:
	adrp	x8, _PLL_LOW@GOTPAGE
Lloh22:
	ldr	x8, [x8, _PLL_LOW@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_hl_device_set_frequency
Lloh24:
	adrp	x8, _PM_AUTO@GOTPAGE
Lloh25:
	ldr	x8, [x8, _PM_AUTO@GOTPAGEOFF]
Lloh26:
	ldr	x8, [x8]
	str	x8, [x21]
	b	LBB0_5
LBB0_12:
	ldr	x8, [x21]
Lloh27:
	adrp	x9, _PM_AUTO@GOTPAGE
Lloh28:
	ldr	x9, [x9, _PM_AUTO@GOTPAGEOFF]
Lloh29:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.13:
Lloh30:
	adrp	x8, _PM_MANUAL@GOTPAGE
Lloh31:
	ldr	x8, [x8, _PM_MANUAL@GOTPAGEOFF]
Lloh32:
	ldr	x8, [x8]
	str	x8, [x21], #16
	mov	x0, x20
	bl	_mutex_unlock
	mov	x0, x21
	bl	_flush_delayed_work
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,8,3                     ; @ENODEV
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Can't change PM profile while compute context is opened on the device\n"

	.comm	_EPERM,8,3                      ; @EPERM
l_.str.1:                               ; @.str.1
	.asciz	"auto"

	.comm	_PM_MANUAL,8,3                  ; @PM_MANUAL
	.comm	_PLL_HIGH,4,2                   ; @PLL_HIGH
	.comm	_PLL_LOW,4,2                    ; @PLL_LOW
	.comm	_PM_AUTO,8,3                    ; @PM_AUTO
l_.str.2:                               ; @.str.2
	.asciz	"manual"

l_.str.3:                               ; @.str.3
	.asciz	"value should be auto or manual\n"

	.comm	_EINVAL,8,3                     ; @EINVAL
	.no_dead_strip	_pm_mng_profile_store
.subsections_via_symbols
