	.file	"extr_sbs.c_acpi_battery_get_state.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	acpi_battery_get_state, @function
acpi_battery_get_state:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	mov	rbx, QWORD PTR [rdi]
	test	rbx, rbx
	jne	.L2
.L5:
	xor	ebx, ebx
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L7:
	mov	rax, QWORD PTR state_readers[rip]
	lea	rdx, [rbx+rbx*2]
	add	rbx, 1
	lea	rax, [rax+rdx*4]
	movsx	rdx, DWORD PTR [rax]
	mov	ecx, DWORD PTR 4[rax]
	mov	esi, DWORD PTR 8[rax]
	mov	rax, QWORD PTR 8[rbp]
	lea	r8, 0[rbp+rdx*4]
	mov	edx, DWORD PTR ACPI_SBS_BATTERY[rip]
	mov	edi, DWORD PTR [rax]
	call	acpi_smbus_read@PLT
	test	eax, eax
	jne	.L6
.L3:
	mov	rdi, QWORD PTR state_readers[rip]
	call	ARRAY_SIZE@PLT
	cmp	eax, ebx
	jg	.L7
	xor	eax, eax
.L6:
	mov	rdx, QWORD PTR jiffies[rip]
	mov	QWORD PTR 0[rbp], rdx
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	edi, DWORD PTR cache_time[rip]
	call	msecs_to_jiffies@PLT
	mov	rdi, QWORD PTR jiffies[rip]
	lea	rsi, [rbx+rax]
	call	time_before@PLT
	mov	r8, rax
	xor	eax, eax
	test	r8, r8
	je	.L5
	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	acpi_battery_get_state, .-acpi_battery_get_state
	.comm	state_readers,8,8
	.comm	jiffies,8,8
	.comm	cache_time,4,4
	.comm	ACPI_SBS_BATTERY,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_sbs.c_acpi_battery_get_state.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	acpi_battery_get_state, %function
acpi_battery_get_state:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r4, [r0]
	mov	r5, r0
	cmp	r4, #0
	sub	sp, sp, #8
	bne	.L2
	ldr	r8, .L11
.L5:
	mov	r4, #0
	ldr	r6, .L11+4
	ldr	r7, .L11+8
	b	.L3
.L7:
	ldr	r2, [r6]
	ldr	r0, [r5, #4]
	add	r1, r2, r3, lsl #2
	ldr	r2, [r2, r3, lsl #2]
	ldr	r0, [r0]
	add	r2, r5, r2, lsl #2
	ldr	r3, [r1, #4]
	ldr	r1, [r1, #8]
	str	r2, [sp]
	ldr	r2, [r7]
	bl	acpi_smbus_read
	cmp	r0, #0
	bne	.L6
	add	r4, r4, #1
.L3:
	ldr	r0, [r6]
	bl	ARRAY_SIZE
	cmp	r0, r4
	add	r3, r4, r4, lsl #1
	bgt	.L7
	mov	r0, #0
.L6:
	ldr	r3, [r8]
	str	r3, [r5]
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L2:
	ldr	r3, .L11+12
	ldr	r8, .L11
	ldr	r0, [r3]
	ldr	r6, [r8]
	bl	msecs_to_jiffies
	mov	r1, r0
	mov	r0, r6
	add	r1, r4, r1
	bl	time_before
	cmp	r0, #0
	beq	.L5
	mov	r0, #0
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L12:
	.align	2
.L11:
	.word	jiffies
	.word	state_readers
	.word	ACPI_SBS_BATTERY
	.word	cache_time
	.size	acpi_battery_get_state, .-acpi_battery_get_state
	.comm	state_readers,4,4
	.comm	jiffies,4,4
	.comm	cache_time,4,4
	.comm	ACPI_SBS_BATTERY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
