	.file	"extr_amd_fam14h_idle.c_amd_fam14h_stop.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	amd_fam14h_stop, @function
amd_fam14h_stop:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	xor	r12d, r12d
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	sub	rsp, 16
	.cfi_def_cfa_offset 48
	mov	edi, DWORD PTR CLOCK_REALTIME[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	lea	rsi, 4[rsp]
	call	clock_gettime@PLT
	mov	edx, DWORD PTR AMD_FAM14H_STATE_NUM[rip]
	test	edx, edx
	jle	.L3
	.p2align 4,,10
	.p2align 3
.L2:
	mov	eax, DWORD PTR cpu_count[rip]
	lea	rbp, 0[0+r12*4]
	xor	ebx, ebx
	test	eax, eax
	jle	.L6
	.p2align 4,,10
	.p2align 3
.L4:
	mov	rdi, QWORD PTR amd_fam14h_cstates[rip]
	mov	esi, ebx
	add	ebx, 1
	add	rdi, rbp
	call	amd_fam14h_disable@PLT
	cmp	DWORD PTR cpu_count[rip], ebx
	jg	.L4
.L6:
	add	r12, 1
	cmp	DWORD PTR AMD_FAM14H_STATE_NUM[rip], r12d
	jg	.L2
.L3:
	mov	esi, DWORD PTR 4[rsp]
	mov	edi, DWORD PTR start_time[rip]
	call	timespec_diff_us@PLT
	mov	ecx, DWORD PTR OVERFLOW_MS[rip]
	movsx	rdx, eax
	mov	esi, eax
	mov	DWORD PTR timediff[rip], eax
	imul	rdx, rdx, 274877907
	sar	esi, 31
	sar	rdx, 38
	sub	edx, esi
	cmp	edx, ecx
	jg	.L16
.L7:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L17
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
.L16:
	.cfi_restore_state
	movsx	rsi, ecx
	mov	edi, eax
	sar	ecx, 31
	imul	rsi, rsi, 274877907
	imul	rdi, rdi, 1125899907
	sar	rsi, 38
	sub	esi, ecx
	shr	rdi, 50
	call	print_overflow_err@PLT
	jmp	.L7
.L17:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	amd_fam14h_stop, .-amd_fam14h_stop
	.comm	timediff,4,4
	.comm	start_time,4,4
	.comm	dbg_timediff,8,8
	.comm	dbg_time,4,4
	.comm	cpu_count,4,4
	.comm	amd_fam14h_cstates,8,8
	.comm	OVERFLOW_MS,4,4
	.comm	CLOCK_REALTIME,4,4
	.comm	AMD_FAM14H_STATE_NUM,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_amd_fam14h_idle.c_amd_fam14h_stop.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	amd_fam14h_stop, %function
amd_fam14h_stop:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	ldr	r3, .L15
	sub	sp, sp, #12
	ldr	r0, [r3]
	ldr	r9, .L15+4
	ldr	r3, .L15+8
	mov	r1, sp
	ldr	r3, [r3]
	str	r3, [sp, #4]
	mov	r3,#0
	bl	clock_gettime
	ldr	r3, [r9]
	cmp	r3, #0
	ble	.L3
	mov	r8, #0
	ldr	r5, .L15+12
	ldr	r7, .L15+16
.L2:
	ldr	r3, [r5]
	cmp	r3, #0
	movgt	r4, #0
	lslgt	r6, r8, #2
	ble	.L6
.L4:
	ldr	r0, [r7]
	mov	r1, r4
	add	r0, r0, r6
	bl	amd_fam14h_disable
	ldr	r3, [r5]
	add	r4, r4, #1
	cmp	r3, r4
	bgt	.L4
.L6:
	ldr	r3, [r9]
	add	r8, r8, #1
	cmp	r3, r8
	bgt	.L2
.L3:
	ldr	r3, .L15+20
	ldr	r1, [sp]
	ldr	r0, [r3]
	bl	timespec_diff_us
	ldr	r1, .L15+24
	ldr	r3, .L15+28
	smull	r2, lr, r1, r0
	ldr	r2, [r3]
	asr	r3, r0, #31
	ldr	ip, .L15+32
	rsb	r3, r3, lr, asr #6
	cmp	r3, r2
	str	r0, [ip]
	bgt	.L13
.L7:
	ldr	r3, .L15+8
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L14
	mov	r0, #0
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L13:
	ldr	r3, .L15+36
	smull	ip, r1, r2, r1
	umull	ip, r0, r3, r0
	asr	r2, r2, #31
	rsb	r1, r2, r1, asr #6
	lsr	r0, r0, #18
	bl	print_overflow_err
	b	.L7
.L14:
	bl	__stack_chk_fail
.L16:
	.align	2
.L15:
	.word	CLOCK_REALTIME
	.word	AMD_FAM14H_STATE_NUM
	.word	.LC0
	.word	cpu_count
	.word	amd_fam14h_cstates
	.word	start_time
	.word	274877907
	.word	OVERFLOW_MS
	.word	timediff
	.word	1125899907
	.size	amd_fam14h_stop, .-amd_fam14h_stop
	.comm	timediff,4,4
	.comm	start_time,4,4
	.comm	dbg_timediff,4,4
	.comm	dbg_time,4,4
	.comm	cpu_count,4,4
	.comm	amd_fam14h_cstates,4,4
	.comm	OVERFLOW_MS,4,4
	.comm	CLOCK_REALTIME,4,4
	.comm	AMD_FAM14H_STATE_NUM,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
