	.file	"extr_bq24190_charger.c_bq24190_charger_get_current.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	bq24190_charger_get_current, @function
bq24190_charger_get_current:
.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
	mov	rbx, rsi
	sub	rsp, 40
	.cfi_def_cfa_offset 64
	mov	edi, DWORD PTR bq24190_ccc_ichg_values[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	call	ARRAY_SIZE@PLT
	sub	rsp, 8
	.cfi_def_cfa_offset 72
	mov	rdi, rbp
	mov	ecx, DWORD PTR BQ24190_REG_CCC_ICHG_SHIFT[rip]
	mov	r9d, eax
	lea	rax, 20[rsp]
	mov	edx, DWORD PTR BQ24190_REG_CCC_ICHG_MASK[rip]
	mov	r8d, DWORD PTR bq24190_ccc_ichg_values[rip]
	push	rax
	.cfi_def_cfa_offset 80
	mov	esi, DWORD PTR BQ24190_REG_CCC[rip]
	call	bq24190_get_field_val@PLT
	pop	rdx
	.cfi_def_cfa_offset 72
	pop	rcx
	.cfi_def_cfa_offset 64
	test	eax, eax
	js	.L1
	mov	ecx, DWORD PTR BQ24190_REG_CCC_FORCE_20PCT_SHIFT[rip]
	mov	edx, DWORD PTR BQ24190_REG_CCC_FORCE_20PCT_MASK[rip]
	lea	r8, 16[rsp]
	mov	rdi, rbp
	mov	esi, DWORD PTR BQ24190_REG_CCC[rip]
	call	bq24190_read_mask@PLT
	test	eax, eax
	js	.L1
	cmp	QWORD PTR 16[rsp], 0
	mov	eax, DWORD PTR 12[rsp]
	je	.L3
	movsx	rdx, eax
	sar	eax, 31
	imul	rdx, rdx, 1717986919
	sar	rdx, 33
	sub	edx, eax
	mov	eax, edx
.L3:
	mov	DWORD PTR [rbx], eax
	xor	eax, eax
.L1:
	mov	rbx, QWORD PTR 24[rsp]
	xor	rbx, QWORD PTR fs:40
	jne	.L7
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
.L7:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	bq24190_charger_get_current, .-bq24190_charger_get_current
	.comm	bq24190_ccc_ichg_values,4,4
	.comm	BQ24190_REG_CCC_ICHG_SHIFT,4,4
	.comm	BQ24190_REG_CCC_ICHG_MASK,4,4
	.comm	BQ24190_REG_CCC_FORCE_20PCT_SHIFT,4,4
	.comm	BQ24190_REG_CCC_FORCE_20PCT_MASK,4,4
	.comm	BQ24190_REG_CCC,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_bq24190_charger.c_bq24190_charger_get_current.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	bq24190_charger_get_current, %function
bq24190_charger_get_current:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r3, .L11
	ldr	r2, .L11+4
	ldr	r6, [r3]
	mov	r5, r1
	ldr	r3, .L11+8
	ldr	r1, .L11+12
	ldr	r7, .L11+16
	sub	sp, sp, #32
	mov	r4, r0
	mov	r0, r6
	ldr	r1, [r1]
	str	r1, [sp, #28]
	mov	r1,#0
	ldr	r8, [r7]
	ldr	r9, [r2]
	ldr	r10, [r3]
	bl	ARRAY_SIZE
	add	ip, sp, #24
	str	r0, [sp, #4]
	mov	r3, r10
	mov	r2, r9
	mov	r1, r8
	mov	r0, r4
	str	r6, [sp]
	str	ip, [sp, #8]
	bl	bq24190_get_field_val
	cmp	r0, #0
	blt	.L1
	ldr	r3, .L11+20
	ldr	r2, .L11+24
	add	ip, sp, #20
	ldr	r3, [r3]
	ldr	r2, [r2]
	mov	r0, r4
	ldr	r1, [r7]
	str	ip, [sp]
	bl	bq24190_read_mask
	cmp	r0, #0
	blt	.L1
	ldr	r2, [sp, #20]
	ldr	r3, [sp, #24]
	cmp	r2, #0
	ldrne	r1, .L11+28
	asrne	r2, r3, #31
	smullne	r0, r3, r1, r3
	mov	r0, #0
	rsbne	r3, r2, r3, asr #1
	str	r3, [r5]
.L1:
	ldr	r3, .L11+12
	ldr	r2, [r3]
	ldr	r3, [sp, #28]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L10
	add	sp, sp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L10:
	bl	__stack_chk_fail
.L12:
	.align	2
.L11:
	.word	bq24190_ccc_ichg_values
	.word	BQ24190_REG_CCC_ICHG_MASK
	.word	BQ24190_REG_CCC_ICHG_SHIFT
	.word	.LC0
	.word	BQ24190_REG_CCC
	.word	BQ24190_REG_CCC_FORCE_20PCT_SHIFT
	.word	BQ24190_REG_CCC_FORCE_20PCT_MASK
	.word	1717986919
	.size	bq24190_charger_get_current, .-bq24190_charger_get_current
	.comm	bq24190_ccc_ichg_values,4,4
	.comm	BQ24190_REG_CCC_ICHG_SHIFT,4,4
	.comm	BQ24190_REG_CCC_ICHG_MASK,4,4
	.comm	BQ24190_REG_CCC_FORCE_20PCT_SHIFT,4,4
	.comm	BQ24190_REG_CCC_FORCE_20PCT_MASK,4,4
	.comm	BQ24190_REG_CCC,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
