	.file	"extr_acpi_perf.c_acpi_px_set.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Px transition to %d failed\n"
	.text
	.p2align 4
	.type	acpi_px_set, @function
acpi_px_set:
.LFB0:
	.cfi_startproc
	endbr64
	test	rsi, rsi
	je	.L20
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15d, edi
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rsi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	call	device_get_softc@PLT
	cmp	QWORD PTR 32[rax], 0
	mov	rbx, rax
	jne	.L18
	mov	ebp, DWORD PTR [rax]
	mov	eax, DWORD PTR 4[rax]
	cmp	ebp, eax
	jge	.L5
	movsx	rax, ebp
	lea	r12, [rax+rax*2]
	sal	r12, 2
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L6:
	mov	eax, DWORD PTR 4[rbx]
	add	ebp, 1
	add	r12, 12
	cmp	eax, ebp
	jle	.L5
.L7:
	mov	rax, QWORD PTR 16[rbx]
	mov	edi, DWORD PTR 0[r13]
	mov	esi, DWORD PTR 4[rax+r12]
	call	CPUFREQ_CMP@PLT
	test	rax, rax
	je	.L6
	mov	eax, DWORD PTR 4[rbx]
.L5:
	cmp	eax, ebp
	je	.L21
	movsx	rax, ebp
	mov	edi, DWORD PTR 28[rbx]
	mov	r12d, 1000
	lea	rax, [rax+rax*2]
	lea	r14, 0[0+rax*4]
	mov	rax, QWORD PTR 16[rbx]
	mov	QWORD PTR 8[rsp], r14
	mov	esi, DWORD PTR 8[rax+r14]
	call	PX_SET_REG@PLT
	mov	rax, QWORD PTR 16[rbx]
	mov	r13d, DWORD PTR [rax+r14]
	mov	r14d, r13d
	xor	r14b, r14b
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L23:
	test	r14d, r14d
	jne	.L10
	movzx	eax, al
	cmp	eax, r13d
	je	.L9
.L10:
	mov	edi, 10
	call	DELAY@PLT
	sub	r12d, 1
	je	.L22
.L11:
	mov	edi, DWORD PTR 24[rbx]
	call	PX_GET_REG@PLT
	cmp	r13d, eax
	jne	.L23
.L9:
	mov	DWORD PTR 8[rbx], ebp
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
.L22:
	.cfi_restore_state
	mov	rax, QWORD PTR 16[rbx]
	mov	rcx, QWORD PTR 8[rsp]
	lea	rsi, .LC0[rip]
	mov	edi, r15d
	mov	edx, DWORD PTR 4[rax+rcx]
	call	device_printf@PLT
.L18:
	mov	eax, DWORD PTR ENXIO[rip]
	add	rsp, 24
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L20:
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	.cfi_restore 14
	.cfi_restore 15
	mov	eax, DWORD PTR EINVAL[rip]
	ret
	.p2align 4,,10
	.p2align 3
.L21:
	.cfi_def_cfa_offset 80
	.cfi_offset 3, -56
	.cfi_offset 6, -48
	.cfi_offset 12, -40
	.cfi_offset 13, -32
	.cfi_offset 14, -24
	.cfi_offset 15, -16
	mov	eax, DWORD PTR EINVAL[rip]
	add	rsp, 24
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	acpi_px_set, .-acpi_px_set
	.comm	ENXIO,4,4
	.comm	EINVAL,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_acpi_perf.c_acpi_px_set.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Px transition to %d failed\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	acpi_px_set, %function
acpi_px_set:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	subs	r7, r1, #0
	beq	.L16
	mov	r10, r0
	bl	device_get_softc
	ldr	r9, [r0, #24]
	mov	r4, r0
	cmp	r9, #0
	bne	.L17
	ldr	r5, [r0]
	ldr	r3, [r0, #4]
	cmp	r5, r3
	bge	.L5
	add	r6, r5, r5, lsl #1
	lsl	r6, r6, #2
	b	.L7
.L6:
	add	r5, r5, #1
	cmp	r3, r5
	add	r6, r6, #12
	ble	.L5
.L7:
	ldr	r3, [r4, #12]
	ldr	r0, [r7]
	add	r3, r3, r6
	ldr	r1, [r3, #4]
	bl	CPUFREQ_CMP
	cmp	r0, #0
	ldr	r3, [r4, #4]
	beq	.L6
.L5:
	cmp	r3, r5
	beq	.L16
	ldr	r3, [r4, #12]
	add	fp, r5, r5, lsl #1
	add	r3, r3, fp, lsl #2
	ldr	r1, [r3, #8]
	ldr	r0, [r4, #20]
	bl	PX_SET_REG
	ldr	r3, [r4, #12]
	lsl	fp, fp, #2
	ldr	r7, [r3, fp]
	mov	r6, #1000
	bic	r8, r7, #255
	b	.L11
.L20:
	cmp	r8, #0
	bne	.L10
	cmp	r3, r7
	beq	.L9
.L10:
	mov	r0, #10
	bl	DELAY
	subs	r6, r6, #1
	beq	.L19
.L11:
	ldr	r0, [r4, #16]
	bl	PX_GET_REG
	cmp	r7, r0
	and	r3, r0, #255
	bne	.L20
.L9:
	mov	r0, r9
	str	r5, [r4, #8]
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L19:
	ldr	r3, [r4, #12]
	mov	r0, r10
	add	fp, r3, fp
	ldr	r2, [fp, #4]
	ldr	r1, .L21
	bl	device_printf
.L17:
	ldr	r3, .L21+4
	ldr	r9, [r3]
	mov	r0, r9
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L16:
	ldr	r3, .L21+8
	ldr	r9, [r3]
	mov	r0, r9
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L22:
	.align	2
.L21:
	.word	.LC0
	.word	ENXIO
	.word	EINVAL
	.size	acpi_px_set, .-acpi_px_set
	.comm	ENXIO,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
