	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function panfrost_devfreq_target
_panfrost_devfreq_target:               ## @panfrost_devfreq_target
	.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
	movl	%edx, %r15d
	movq	%rsi, %rbx
	movq	%rdi, %r12
	callq	_to_platform_device
	movl	%eax, %edi
	callq	_platform_get_drvdata
	movq	%rax, %r14
	movq	(%rax), %r13
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movl	%r15d, %edx
	callq	_devfreq_recommended_opp
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_1
## %bb.12:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_1:
	movq	%rbx, %rdi
	callq	_dev_pm_opp_get_freq
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_dev_pm_opp_get_voltage
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_dev_pm_opp_put
	xorl	%ebx, %ebx
	cmpq	%r15, %r13
	je	LBB0_11
## %bb.2:
	jae	LBB0_5
## %bb.3:
	movl	16(%r14), %edi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	%rdx, %rsi
	callq	_regulator_set_voltage
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movl	%eax, %ebx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_11
LBB0_5:
	movl	20(%r14), %edi
	movq	%r15, %rsi
	callq	_clk_set_rate
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	movq	%r15, %rdx
	movl	%eax, %ecx
	movl	%eax, %ebx
	xorl	%eax, %eax
	callq	_dev_err
	movl	16(%r14), %edi
	movq	8(%r14), %rdx
	movq	%rdx, %rsi
	callq	_regulator_set_voltage
	jmp	LBB0_11
LBB0_7:
	cmpq	%r15, %r13
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	jbe	LBB0_10
## %bb.8:
	movl	16(%r14), %edi
	movq	%r13, %rsi
	movq	%r13, %rdx
	callq	_regulator_set_voltage
	testl	%eax, %eax
	je	LBB0_10
## %bb.9:
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	movq	%r13, %rdx
	xorl	%eax, %eax
	callq	_dev_err
LBB0_10:
	movq	%r15, (%r14)
	movq	%r13, 8(%r14)
LBB0_11:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Cannot set voltage %lu uV\n"

L_.str.1:                               ## @.str.1
	.asciz	"Cannot set frequency %lu (%d)\n"

	.no_dead_strip	_panfrost_devfreq_target
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function panfrost_devfreq_target
_panfrost_devfreq_target:               ; @panfrost_devfreq_target
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
	bl	_to_platform_device
	bl	_platform_get_drvdata
	mov	x20, x0
	ldr	x24, [x0]
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	bl	_devfreq_recommended_opp
	mov	x23, x0
	bl	_IS_ERR
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x23
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_PTR_ERR
LBB0_2:
	mov	x0, x23
	bl	_dev_pm_opp_get_freq
	mov	x21, x0
	mov	x0, x23
	bl	_dev_pm_opp_get_voltage
	mov	x22, x0
	mov	x0, x23
	bl	_dev_pm_opp_put
	cmp	x24, x21
	b.ne	LBB0_4
; %bb.3:
	mov	w23, #0
	b	LBB0_13
LBB0_4:
	b.hs	LBB0_7
; %bb.5:
	ldr	w0, [x20, #16]
	mov	x1, x22
	mov	x2, x22
	bl	_regulator_set_voltage
	cbz	w0, LBB0_7
; %bb.6:
	mov	x23, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x22
	bl	_dev_err
	b	LBB0_13
LBB0_7:
	ldr	w0, [x20, #20]
	mov	x1, x21
	bl	_clk_set_rate
	cbz	w0, LBB0_9
; %bb.8:
	mov	x23, x0
	str	x23, [sp]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	bl	_dev_err
	ldr	w0, [x20, #16]
	ldr	x1, [x20, #8]
	mov	x2, x1
	bl	_regulator_set_voltage
	b	LBB0_13
LBB0_9:
	cmp	x24, x21
	b.ls	LBB0_12
; %bb.10:
	ldr	w0, [x20, #16]
	mov	x1, x22
	mov	x2, x22
	bl	_regulator_set_voltage
	cbz	w0, LBB0_12
; %bb.11:
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x22
	bl	_dev_err
LBB0_12:
	mov	w23, #0
	stp	x21, x22, [x20]
LBB0_13:
	mov	x0, x23
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Cannot set voltage %lu uV\n"

l_.str.1:                               ; @.str.1
	.asciz	"Cannot set frequency %lu (%d)\n"

	.no_dead_strip	_panfrost_devfreq_target
.subsections_via_symbols
