	.file	"extr_rt9455_charger.c_rt9455_charger_get_health.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Failed to read IRQ1 register\n"
.LC1:
	.string	"Failed to read IRQ2 register\n"
.LC2:
	.string	"Failed to read IRQ3 register\n"
.LC3:
	.string	"Failed to read STAT bits\n"
	.text
	.p2align 4
	.type	rt9455_charger_get_health, @function
rt9455_charger_get_health:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	rbx, rdi
	sub	rsp, 16
	.cfi_def_cfa_offset 64
	mov	r14, QWORD PTR 16[rdi]
	mov	edi, DWORD PTR 8[rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	rax, QWORD PTR POWER_SUPPLY_HEALTH_GOOD[rip]
	lea	r13, 4[rsp]
	mov	rdx, r13
	mov	QWORD PTR [rsi], rax
	mov	esi, DWORD PTR RT9455_REG_IRQ1[rip]
	call	regmap_read@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L22
	mov	edi, DWORD PTR F_TSDI[rip]
	call	GET_MASK@PLT
	test	DWORD PTR 4[rsp], eax
	je	.L4
	mov	rax, QWORD PTR POWER_SUPPLY_HEALTH_OVERHEAT[rip]
	mov	QWORD PTR 0[rbp], rax
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L23
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	mov	edi, DWORD PTR F_VINOVPI[rip]
	call	GET_MASK@PLT
	test	DWORD PTR 4[rsp], eax
	je	.L5
.L18:
	mov	rax, QWORD PTR POWER_SUPPLY_HEALTH_OVERVOLTAGE[rip]
	mov	QWORD PTR 0[rbp], rax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L22:
	lea	rsi, .LC0[rip]
	mov	rdi, r14
	call	dev_err@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L5:
	mov	edi, DWORD PTR F_BATAB[rip]
	call	GET_MASK@PLT
	test	DWORD PTR 4[rsp], eax
	jne	.L19
	mov	edi, DWORD PTR 8[rbx]
	mov	esi, DWORD PTR RT9455_REG_IRQ2[rip]
	mov	rdx, r13
	call	regmap_read@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L24
	mov	edi, DWORD PTR F_CHBATOVI[rip]
	call	GET_MASK@PLT
	test	DWORD PTR 4[rsp], eax
	je	.L8
.L19:
	mov	rax, QWORD PTR POWER_SUPPLY_HEALTH_UNSPEC_FAILURE[rip]
	mov	QWORD PTR 0[rbp], rax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L8:
	mov	edi, DWORD PTR F_CH32MI[rip]
	call	GET_MASK@PLT
	test	DWORD PTR 4[rsp], eax
	jne	.L20
	mov	edi, DWORD PTR 8[rbx]
	mov	esi, DWORD PTR RT9455_REG_IRQ3[rip]
	mov	rdx, r13
	call	regmap_read@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L25
	mov	edi, DWORD PTR F_BSTBUSOVI[rip]
	call	GET_MASK@PLT
	test	DWORD PTR 4[rsp], eax
	jne	.L19
	mov	edi, DWORD PTR F_BSTOLI[rip]
	call	GET_MASK@PLT
	test	DWORD PTR 4[rsp], eax
	jne	.L18
	mov	edi, DWORD PTR F_BSTLOWVI[rip]
	call	GET_MASK@PLT
	test	DWORD PTR 4[rsp], eax
	jne	.L19
	mov	edi, DWORD PTR F_BST32SI[rip]
	call	GET_MASK@PLT
	test	DWORD PTR 4[rsp], eax
	jne	.L20
	mov	rax, QWORD PTR [rbx]
	mov	rdx, QWORD PTR F_STAT[rip]
	mov	rsi, r13
	mov	edi, DWORD PTR [rax+rdx*4]
	call	regmap_field_read@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L26
	mov	eax, DWORD PTR RT9455_FAULT[rip]
	cmp	DWORD PTR 4[rsp], eax
	jne	.L1
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L24:
	lea	rsi, .LC1[rip]
	mov	rdi, r14
	call	dev_err@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L20:
	mov	rax, QWORD PTR POWER_SUPPLY_HEALTH_SAFETY_TIMER_EXPIRE[rip]
	mov	QWORD PTR 0[rbp], rax
	jmp	.L1
.L25:
	lea	rsi, .LC2[rip]
	mov	rdi, r14
	call	dev_err@PLT
	jmp	.L1
.L23:
	call	__stack_chk_fail@PLT
.L26:
	lea	rsi, .LC3[rip]
	mov	rdi, r14
	call	dev_err@PLT
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	rt9455_charger_get_health, .-rt9455_charger_get_health
	.comm	RT9455_REG_IRQ3,4,4
	.comm	RT9455_REG_IRQ2,4,4
	.comm	RT9455_REG_IRQ1,4,4
	.comm	RT9455_FAULT,4,4
	.comm	POWER_SUPPLY_HEALTH_UNSPEC_FAILURE,8,8
	.comm	POWER_SUPPLY_HEALTH_SAFETY_TIMER_EXPIRE,8,8
	.comm	POWER_SUPPLY_HEALTH_OVERVOLTAGE,8,8
	.comm	POWER_SUPPLY_HEALTH_OVERHEAT,8,8
	.comm	POWER_SUPPLY_HEALTH_GOOD,8,8
	.comm	F_VINOVPI,4,4
	.comm	F_TSDI,4,4
	.comm	F_STAT,8,8
	.comm	F_CHBATOVI,4,4
	.comm	F_CH32MI,4,4
	.comm	F_BSTOLI,4,4
	.comm	F_BSTLOWVI,4,4
	.comm	F_BSTBUSOVI,4,4
	.comm	F_BST32SI,4,4
	.comm	F_BATAB,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_rt9455_charger.c_rt9455_charger_get_health.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Failed to read IRQ1 register\012\000"
	.align	2
.LC1:
	.ascii	"Failed to read IRQ2 register\012\000"
	.align	2
.LC2:
	.ascii	"Failed to read IRQ3 register\012\000"
	.align	2
.LC3:
	.ascii	"Failed to read STAT bits\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	rt9455_charger_get_health, %function
rt9455_charger_get_health:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	mov	r6, r1
	ldr	r2, .L27
	ldr	r3, .L27+4
	ldr	r2, [r2]
	ldr	r1, .L27+8
	sub	sp, sp, #12
	ldr	r1, [r1]
	str	r1, [sp, #4]
	mov	r1,#0
	mov	r5, r0
	ldmib	r0, {r0, r7}
	ldr	r1, [r3]
	str	r2, [r6]
	mov	r2, sp
	bl	regmap_read
	subs	r4, r0, #0
	bne	.L22
	ldr	r3, .L27+12
	ldr	r0, [r3]
	bl	GET_MASK
	ldr	r3, [sp]
	tst	r0, r3
	beq	.L4
	ldr	r3, .L27+16
	ldr	r3, [r3]
	str	r3, [r6]
.L1:
	ldr	r3, .L27+8
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L23
	mov	r0, r4
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L4:
	ldr	r3, .L27+20
	ldr	r0, [r3]
	bl	GET_MASK
	ldr	r3, [sp]
	tst	r0, r3
	beq	.L5
.L18:
	ldr	r3, .L27+24
	ldr	r3, [r3]
	str	r3, [r6]
	b	.L1
.L22:
	mov	r0, r7
	ldr	r1, .L27+28
	bl	dev_err
	b	.L1
.L5:
	ldr	r3, .L27+32
	ldr	r0, [r3]
	bl	GET_MASK
	ldr	r3, [sp]
	tst	r0, r3
	bne	.L19
	ldr	r3, .L27+36
	mov	r2, sp
	ldr	r1, [r3]
	ldr	r0, [r5, #4]
	bl	regmap_read
	subs	r4, r0, #0
	bne	.L24
	ldr	r3, .L27+40
	ldr	r0, [r3]
	bl	GET_MASK
	ldr	r3, [sp]
	tst	r0, r3
	beq	.L8
.L19:
	ldr	r3, .L27+44
	ldr	r3, [r3]
	str	r3, [r6]
	b	.L1
.L8:
	ldr	r3, .L27+48
	ldr	r0, [r3]
	bl	GET_MASK
	ldr	r3, [sp]
	tst	r0, r3
	bne	.L20
	ldr	r3, .L27+52
	mov	r2, sp
	ldr	r1, [r3]
	ldr	r0, [r5, #4]
	bl	regmap_read
	subs	r4, r0, #0
	bne	.L25
	ldr	r3, .L27+56
	ldr	r0, [r3]
	bl	GET_MASK
	ldr	r3, [sp]
	tst	r0, r3
	bne	.L19
	ldr	r3, .L27+60
	ldr	r0, [r3]
	bl	GET_MASK
	ldr	r3, [sp]
	tst	r0, r3
	bne	.L18
	ldr	r3, .L27+64
	ldr	r0, [r3]
	bl	GET_MASK
	ldr	r3, [sp]
	tst	r0, r3
	bne	.L19
	ldr	r3, .L27+68
	ldr	r0, [r3]
	bl	GET_MASK
	ldr	r3, [sp]
	tst	r0, r3
	bne	.L20
	ldr	r2, .L27+72
	ldr	r3, [r5]
	ldr	r2, [r2]
	mov	r1, sp
	ldr	r0, [r3, r2, lsl #2]
	bl	regmap_field_read
	subs	r4, r0, #0
	bne	.L26
	ldr	r3, .L27+76
	ldr	r2, [sp]
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L1
	b	.L19
.L24:
	mov	r0, r7
	ldr	r1, .L27+80
	bl	dev_err
	b	.L1
.L20:
	ldr	r3, .L27+84
	ldr	r3, [r3]
	str	r3, [r6]
	b	.L1
.L25:
	mov	r0, r7
	ldr	r1, .L27+88
	bl	dev_err
	b	.L1
.L23:
	bl	__stack_chk_fail
.L26:
	mov	r0, r7
	ldr	r1, .L27+92
	bl	dev_err
	b	.L1
.L28:
	.align	2
.L27:
	.word	POWER_SUPPLY_HEALTH_GOOD
	.word	RT9455_REG_IRQ1
	.word	.LC4
	.word	F_TSDI
	.word	POWER_SUPPLY_HEALTH_OVERHEAT
	.word	F_VINOVPI
	.word	POWER_SUPPLY_HEALTH_OVERVOLTAGE
	.word	.LC0
	.word	F_BATAB
	.word	RT9455_REG_IRQ2
	.word	F_CHBATOVI
	.word	POWER_SUPPLY_HEALTH_UNSPEC_FAILURE
	.word	F_CH32MI
	.word	RT9455_REG_IRQ3
	.word	F_BSTBUSOVI
	.word	F_BSTOLI
	.word	F_BSTLOWVI
	.word	F_BST32SI
	.word	F_STAT
	.word	RT9455_FAULT
	.word	.LC1
	.word	POWER_SUPPLY_HEALTH_SAFETY_TIMER_EXPIRE
	.word	.LC2
	.word	.LC3
	.size	rt9455_charger_get_health, .-rt9455_charger_get_health
	.comm	RT9455_REG_IRQ3,4,4
	.comm	RT9455_REG_IRQ2,4,4
	.comm	RT9455_REG_IRQ1,4,4
	.comm	RT9455_FAULT,4,4
	.comm	POWER_SUPPLY_HEALTH_UNSPEC_FAILURE,4,4
	.comm	POWER_SUPPLY_HEALTH_SAFETY_TIMER_EXPIRE,4,4
	.comm	POWER_SUPPLY_HEALTH_OVERVOLTAGE,4,4
	.comm	POWER_SUPPLY_HEALTH_OVERHEAT,4,4
	.comm	POWER_SUPPLY_HEALTH_GOOD,4,4
	.comm	F_VINOVPI,4,4
	.comm	F_TSDI,4,4
	.comm	F_STAT,4,4
	.comm	F_CHBATOVI,4,4
	.comm	F_CH32MI,4,4
	.comm	F_BSTOLI,4,4
	.comm	F_BSTLOWVI,4,4
	.comm	F_BSTBUSOVI,4,4
	.comm	F_BST32SI,4,4
	.comm	F_BATAB,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
