	.file	"extr_umem.c_check_batteries.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"FAILURE"
.LC1:
	.string	"OK"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC2:
	.string	"checking battery status, 1 = %s, 2 = %s\n"
	.text
	.p2align 4
	.type	check_batteries, @function
check_batteries:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	mov	rdi, QWORD PTR MEMCTRLSTATUS_BATTERY[rip]
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	add	rdi, QWORD PTR 8[rbp]
	call	readb@PLT
	mov	ebx, eax
	mov	eax, DWORD PTR debug[rip]
	test	DWORD PTR DEBUG_BATTERY_POLLING[rip], eax
	je	.L2
	lea	rax, .LC1[rip]
	lea	rcx, .LC0[rip]
	test	BYTE PTR BATTERY_2_FAILURE[rip], bl
	mov	rsi, QWORD PTR 0[rbp]
	mov	r8, rax
	mov	edi, DWORD PTR KERN_DEBUG[rip]
	lea	rdx, .LC2[rip]
	cmovne	r8, rcx
	test	BYTE PTR BATTERY_1_FAILURE[rip], bl
	cmove	rcx, rax
	call	dev_printk@PLT
.L2:
	xor	edx, edx
	test	BYTE PTR BATTERY_1_FAILURE[rip], bl
	mov	rdi, rbp
	sete	dl
	xor	esi, esi
	call	check_battery@PLT
	xor	edx, edx
	test	BYTE PTR BATTERY_2_FAILURE[rip], bl
	mov	rdi, rbp
	sete	dl
	mov	esi, 1
	mov	r12d, eax
	call	check_battery@PLT
	or	r12d, eax
	jne	.L13
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	pop	rbx
	.cfi_def_cfa_offset 24
	mov	rdi, rbp
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	set_fault_to_battery_status@PLT
	.cfi_endproc
.LFE0:
	.size	check_batteries, .-check_batteries
	.comm	debug,4,4
	.comm	MEMCTRLSTATUS_BATTERY,8,8
	.comm	KERN_DEBUG,4,4
	.comm	DEBUG_BATTERY_POLLING,4,4
	.comm	BATTERY_2_FAILURE,1,1
	.comm	BATTERY_1_FAILURE,1,1
	.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_umem.c_check_batteries.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"FAILURE\000"
	.align	2
.LC1:
	.ascii	"OK\000"
	.align	2
.LC2:
	.ascii	"checking battery status, 1 = %s, 2 = %s\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	check_batteries, %function
check_batteries:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	ldr	r3, .L14
	mov	r4, r0
	ldr	r3, [r3]
	ldr	r0, [r0, #4]
	sub	sp, sp, #12
	add	r0, r0, r3
	bl	readb
	ldr	r2, .L14+4
	ldr	r3, .L14+8
	ldr	r2, [r2]
	ldr	r3, [r3]
	mov	r5, r0
	tst	r2, r3
	ldr	r7, .L14+12
	ldr	r6, .L14+16
	beq	.L2
	ldrb	r3, [r7]	@ zero_extendqisi2
	ldr	r2, .L14+20
	ldr	r1, .L14+24
	ldrb	r0, [r6]	@ zero_extendqisi2
	tst	r5, r3
	movne	r3, r2
	moveq	r3, r1
	tst	r5, r0
	moveq	r2, r1
	ldr	r1, .L14+28
	str	r2, [sp]
	ldr	r0, [r1]
	ldr	r2, .L14+32
	ldr	r1, [r4]
	bl	dev_printk
.L2:
	mov	r1, #0
	ldrb	r3, [r7]	@ zero_extendqisi2
	mov	r0, r4
	tst	r5, r3
	movne	r2, r1
	moveq	r2, #1
	bl	check_battery
	mov	r1, #1
	mov	r3, r0
	ldrb	r2, [r6]	@ zero_extendqisi2
	mov	r0, r4
	tst	r5, r2
	moveq	r2, r1
	movne	r2, #0
	mov	r5, r3
	bl	check_battery
	orrs	r3, r5, r0
	bne	.L13
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L13:
	mov	r0, r4
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, lr}
	b	set_fault_to_battery_status
.L15:
	.align	2
.L14:
	.word	MEMCTRLSTATUS_BATTERY
	.word	debug
	.word	DEBUG_BATTERY_POLLING
	.word	BATTERY_1_FAILURE
	.word	BATTERY_2_FAILURE
	.word	.LC0
	.word	.LC1
	.word	KERN_DEBUG
	.word	.LC2
	.size	check_batteries, .-check_batteries
	.comm	debug,4,4
	.comm	MEMCTRLSTATUS_BATTERY,4,4
	.comm	KERN_DEBUG,4,4
	.comm	DEBUG_BATTERY_POLLING,4,4
	.comm	BATTERY_2_FAILURE,1,1
	.comm	BATTERY_1_FAILURE,1,1
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
