	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_panfrost_devfreq_init          ## -- Begin function panfrost_devfreq_init
	.p2align	4, 0x90
_panfrost_devfreq_init:                 ## @panfrost_devfreq_init
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	(%rdi), %rdi
	callq	_dev_pm_opp_of_add_table
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	movl	(%rcx), %ecx
	addl	%eax, %ecx
	je	LBB0_5
## %bb.1:
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_2
LBB0_5:
	movl	%ebx, %eax
LBB0_6:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	%r14, %rdi
	callq	_panfrost_devfreq_reset
	movl	24(%r14), %edi
	callq	_clk_get_rate
	leaq	16(%r14), %rsi
	movl	%eax, 16(%r14)
	movq	(%r14), %rdi
	xorl	%ebx, %ebx
	xorl	%edx, %edx
	callq	_devfreq_recommended_opp
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_3
## %bb.7:
	movq	%r15, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_3:
	movl	16(%r14), %eax
	movq	_panfrost_devfreq_profile@GOTPCREL(%rip), %r12
	movl	%eax, (%r12)
	movq	%r15, %rdi
	callq	_dev_pm_opp_put
	movq	(%r14), %rdi
	movq	_DEVFREQ_GOV_SIMPLE_ONDEMAND@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rsi
	xorl	%ecx, %ecx
	callq	_devm_devfreq_add_device
	movq	%rax, 8(%r14)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_DRM_DEV_ERROR
	movq	8(%r14), %rdi
	callq	_PTR_ERR
	movl	%eax, %ebx
	movq	$0, 8(%r14)
	movq	(%r14), %rdi
	callq	_dev_pm_opp_of_remove_table
	movl	%ebx, %eax
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_panfrost_devfreq_profile,4,2   ## @panfrost_devfreq_profile
	.comm	_DEVFREQ_GOV_SIMPLE_ONDEMAND,4,2 ## @DEVFREQ_GOV_SIMPLE_ONDEMAND
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Couldn't initialize GPU devfreq\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_panfrost_devfreq_init          ; -- Begin function panfrost_devfreq_init
	.p2align	2
_panfrost_devfreq_init:                 ; @panfrost_devfreq_init
	.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
	ldr	x0, [x0]
	bl	_dev_pm_opp_of_add_table
Lloh0:
	adrp	x8, _ENODEV@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmn	w0, w8
	b.ne	LBB0_2
; %bb.1:
	mov	w0, #0
	b	LBB0_3
LBB0_2:
	cbz	w0, LBB0_4
LBB0_3:
	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
LBB0_4:
	mov	x0, x19
	bl	_panfrost_devfreq_reset
	ldr	w0, [x19, #24]
	bl	_clk_get_rate
	mov	x1, x19
	str	w0, [x1, #16]!
	ldr	x0, [x19]
	mov	w2, #0
	bl	_devfreq_recommended_opp
	mov	x20, x0
	bl	_IS_ERR
	cbz	x0, LBB0_6
; %bb.5:
	mov	x0, x20
	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	_PTR_ERR
LBB0_6:
	ldr	w8, [x19, #16]
Lloh3:
	adrp	x21, _panfrost_devfreq_profile@GOTPAGE
Lloh4:
	ldr	x21, [x21, _panfrost_devfreq_profile@GOTPAGEOFF]
	str	w8, [x21]
	mov	x0, x20
	bl	_dev_pm_opp_put
	ldr	x0, [x19]
Lloh5:
	adrp	x8, _DEVFREQ_GOV_SIMPLE_ONDEMAND@GOTPAGE
Lloh6:
	ldr	x8, [x8, _DEVFREQ_GOV_SIMPLE_ONDEMAND@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	mov	x1, x21
	mov	x3, #0
	bl	_devm_devfreq_add_device
	str	x0, [x19, #8]
	bl	_IS_ERR
	cbz	x0, LBB0_3
; %bb.7:
	ldr	x0, [x19]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	bl	_DRM_DEV_ERROR
	ldr	x0, [x19, #8]
	bl	_PTR_ERR
	mov	x20, x0
	str	xzr, [x19, #8]
	ldr	x0, [x19]
	bl	_dev_pm_opp_of_remove_table
	mov	x0, x20
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_panfrost_devfreq_profile,4,2   ; @panfrost_devfreq_profile
	.comm	_DEVFREQ_GOV_SIMPLE_ONDEMAND,4,2 ; @DEVFREQ_GOV_SIMPLE_ONDEMAND
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Couldn't initialize GPU devfreq\n"

.subsections_via_symbols
