	.file	"extr_sysfs.c_sysfs_idlestate_get_one_string.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	sysfs_idlestate_get_one_string, @function
sysfs_idlestate_get_one_string:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r12
	sub	rsp, 24
	.cfi_offset 12, -24
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	movsx	rax, DWORD PTR MAX_LINE_LEN[rip]
	mov	r9, rsp
	mov	r8, rax
	add	rax, 15
	mov	rcx, rax
	and	rax, -4096
	sub	r9, rax
	and	rcx, -16
	mov	rax, r9
	cmp	rsp, rax
	je	.L3
.L20:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L20
.L3:
	and	ecx, 4095
	sub	rsp, rcx
	test	rcx, rcx
	jne	.L21
.L4:
	cmp	DWORD PTR MAX_IDLESTATE_STRING_FILES[rip], edx
	jbe	.L7
	mov	rax, QWORD PTR idlestate_string_files[rip]
	mov	edx, edx
	mov	rcx, rsp
	mov	edx, DWORD PTR [rax+rdx*4]
	call	sysfs_idlestate_read_file@PLT
	test	eax, eax
	je	.L7
	mov	rdi, rsp
	call	strdup@PLT
	mov	r12, rax
	test	rax, rax
	je	.L7
	mov	rdi, rax
	call	strlen@PLT
	cdqe
	cmp	BYTE PTR -1[r12+rax], 10
	je	.L22
.L1:
	mov	rax, QWORD PTR -24[rbp]
	xor	rax, QWORD PTR fs:40
	jne	.L23
	mov	rax, r12
	mov	r12, QWORD PTR -8[rbp]
	leave
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	xor	r12d, r12d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L21:
	or	QWORD PTR -8[rsp+rcx], 0
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L22:
	mov	rdi, r12
	call	strlen@PLT
	cdqe
	mov	BYTE PTR -1[r12+rax], 0
	jmp	.L1
.L23:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	sysfs_idlestate_get_one_string, .-sysfs_idlestate_get_one_string
	.comm	idlestate_string_files,8,8
	.comm	MAX_LINE_LEN,4,4
	.comm	MAX_IDLESTATE_STRING_FILES,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_sysfs.c_sysfs_idlestate_get_one_string.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	sysfs_idlestate_get_one_string, %function
sysfs_idlestate_get_one_string:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #20
	ldr	ip, .L15
	ldr	r3, .L15+4
	ldr	ip, [ip]
	ldr	lr, [r3]
	add	r3, ip, #7
	bic	r3, r3, #7
	sub	sp, sp, r3
	ldr	r3, .L15+8
	cmp	lr, r2
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	bls	.L4
	ldr	lr, .L15+12
	add	r4, sp, #8
	ldr	lr, [lr]
	mov	r3, r4
	ldr	r2, [lr, r2, lsl #2]
	str	ip, [sp]
	bl	sysfs_idlestate_read_file
	cmp	r0, #0
	beq	.L4
	mov	r0, r4
	bl	strdup
	subs	r4, r0, #0
	beq	.L4
	bl	strlen
	sub	r0, r0, #1
	ldrb	r3, [r4, r0]	@ zero_extendqisi2
	cmp	r3, #10
	moveq	r3, #0
	strbeq	r3, [r4, r0]
	b	.L1
.L4:
	mov	r4, #0
.L1:
	ldr	r3, .L15+8
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L14
	mov	r0, r4
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L14:
	bl	__stack_chk_fail
.L16:
	.align	2
.L15:
	.word	MAX_LINE_LEN
	.word	MAX_IDLESTATE_STRING_FILES
	.word	.LC0
	.word	idlestate_string_files
	.size	sysfs_idlestate_get_one_string, .-sysfs_idlestate_get_one_string
	.comm	idlestate_string_files,4,4
	.comm	MAX_LINE_LEN,4,4
	.comm	MAX_IDLESTATE_STRING_FILES,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
