	.file	"extr_pmcr.c_pmcr_get.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	pmcr_get, @function
pmcr_get:
.LFB0:
	.cfi_startproc
	endbr64
	test	rsi, rsi
	je	.L14
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	ebp, edi
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	mov	rbx, rsi
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	call	device_get_softc@PLT
	mov	esi, DWORD PTR CPUFREQ_VAL_UNKNOWN[rip]
	mov	edx, 16
	mov	rdi, rbx
	call	memset@PLT
	mov	edi, DWORD PTR SPR_PMCR[rip]
	call	mfspr@PLT
	mov	ecx, DWORD PTR PMCR_LOWERPS_SHIFT[rip]
	mov	esi, DWORD PTR npstates[rip]
	and	eax, DWORD PTR PMCR_LOWERPS_MASK[rip]
	sar	eax, cl
	test	esi, esi
	jle	.L4
	mov	rdi, QWORD PTR pstate_ids[rip]
	xor	edx, edx
	xor	ecx, ecx
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L7:
	add	ecx, 1
	add	rdx, 4
	cmp	esi, ecx
	je	.L6
.L5:
	cmp	DWORD PTR [rdi+rdx], eax
	jne	.L7
.L8:
	mov	rsi, QWORD PTR [rbx]
	mov	DWORD PTR [rsi], eax
	mov	rax, QWORD PTR pstate_freqs[rip]
	mov	DWORD PTR 4[rsi], ecx
	mov	eax, DWORD PTR [rax+rdx]
	mov	DWORD PTR 8[rbx], ebp
	mov	DWORD PTR 12[rbx], eax
	add	rsp, 8
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L14:
	.cfi_restore 3
	.cfi_restore 6
	mov	eax, DWORD PTR EINVAL[rip]
	ret
.L4:
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -24
	.cfi_offset 6, -16
	je	.L6
	xor	edx, edx
	xor	ecx, ecx
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L6:
	mov	eax, DWORD PTR EINVAL[rip]
	add	rsp, 8
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	pmcr_get, .-pmcr_get
	.comm	pstate_ids,8,8
	.comm	pstate_freqs,8,8
	.comm	npstates,4,4
	.comm	SPR_PMCR,4,4
	.comm	PMCR_LOWERPS_SHIFT,4,4
	.comm	PMCR_LOWERPS_MASK,4,4
	.comm	EINVAL,4,4
	.comm	CPUFREQ_VAL_UNKNOWN,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_pmcr.c_pmcr_get.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	pmcr_get, %function
pmcr_get:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	subs	r4, r1, #0
	beq	.L6
	mov	r5, r0
	bl	device_get_softc
	ldr	r3, .L13
	mov	r2, #12
	ldr	r1, [r3]
	mov	r0, r4
	bl	memset
	ldr	r3, .L13+4
	ldr	r0, [r3]
	bl	mfspr
	ldr	r1, .L13+8
	ldr	r2, .L13+12
	ldr	r3, .L13+16
	ldr	lr, [r1]
	ldr	r1, [r2]
	ldr	r3, [r3]
	and	lr, lr, r0
	cmp	r1, #0
	asr	lr, lr, r3
	ble	.L4
	ldr	r2, .L13+20
	mov	r3, #0
	ldr	r2, [r2]
	sub	r2, r2, #4
	b	.L5
.L7:
	add	r3, r3, #1
	cmp	r1, r3
	beq	.L6
.L5:
	ldr	ip, [r2, #4]!
	lsl	r6, r3, #2
	cmp	ip, lr
	bne	.L7
.L8:
	ldr	r1, .L13+24
	ldr	r2, [r4]
	ldr	r1, [r1]
	str	r3, [r2, #4]
	str	lr, [r2]
	ldr	r3, [r1, r6]
	mov	r0, #0
	str	r5, [r4, #4]
	str	r3, [r4, #8]
	pop	{r4, r5, r6, pc}
.L4:
	movne	r6, #0
	movne	r3, r6
	bne	.L8
.L6:
	ldr	r3, .L13+28
	ldr	r0, [r3]
	pop	{r4, r5, r6, pc}
.L14:
	.align	2
.L13:
	.word	CPUFREQ_VAL_UNKNOWN
	.word	SPR_PMCR
	.word	PMCR_LOWERPS_MASK
	.word	npstates
	.word	PMCR_LOWERPS_SHIFT
	.word	pstate_ids
	.word	pstate_freqs
	.word	EINVAL
	.size	pmcr_get, .-pmcr_get
	.comm	pstate_ids,4,4
	.comm	pstate_freqs,4,4
	.comm	npstates,4,4
	.comm	SPR_PMCR,4,4
	.comm	PMCR_LOWERPS_SHIFT,4,4
	.comm	PMCR_LOWERPS_MASK,4,4
	.comm	EINVAL,4,4
	.comm	CPUFREQ_VAL_UNKNOWN,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
