	.file	"extr_ltc2978.c_ltc2978_read_word_data_common.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	ltc2978_read_word_data_common, @function
ltc2978_read_word_data_common:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movsx	r12, esi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	ebx, edx
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	pmbus_get_driver_info@PLT
	mov	rdi, rax
	call	to_ltc2978_data@PLT
	mov	r13, rax
	cmp	ebx, 132
	je	.L2
	jg	.L3
	cmp	ebx, 131
	jne	.L14
	mov	edx, DWORD PTR LTC2978_MFR_VOUT_PEAK[rip]
	mov	esi, r12d
	mov	rdi, rbp
	call	ltc_read_word_data@PLT
	test	eax, eax
	js	.L1
	mov	rdx, QWORD PTR 0[r13]
	lea	rcx, [rdx+r12*4]
	mov	edx, DWORD PTR [rcx]
	cmp	edx, eax
	jge	.L10
	mov	DWORD PTR [rcx], eax
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L14:
	.cfi_restore_state
	xor	eax, eax
	cmp	ebx, 127
	jg	.L1
.L6:
	mov	rdi, rbp
	call	ltc_wait_ready@PLT
	test	eax, eax
	js	.L1
	mov	eax, DWORD PTR ENODATA[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	neg	eax
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	cmp	ebx, 133
	jne	.L6
	mov	rax, QWORD PTR 8[rax]
	movsx	rdx, r12d
	mov	ecx, DWORD PTR LTC2978_MFR_TEMPERATURE_PEAK[rip]
	lea	r8, [rax+rdx*4]
.L12:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	edx, r12d
	mov	rsi, rbp
	mov	rdi, r13
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	jmp	ltc_get_max@PLT
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	ecx, DWORD PTR LTC2978_MFR_VIN_PEAK[rip]
	lea	r8, 16[rax]
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L10:
	mov	eax, edx
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	ltc2978_read_word_data_common, .-ltc2978_read_word_data_common
	.comm	LTC2978_MFR_VOUT_PEAK,4,4
	.comm	LTC2978_MFR_VIN_PEAK,4,4
	.comm	LTC2978_MFR_TEMPERATURE_PEAK,4,4
	.comm	ENODATA,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_ltc2978.c_ltc2978_read_word_data_common.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ltc2978_read_word_data_common, %function
ltc2978_read_word_data_common:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	sub	sp, sp, #8
	mov	r4, r2
	mov	r5, r1
	mov	r6, r0
	bl	pmbus_get_driver_info
	bl	to_ltc2978_data
	sub	r2, r4, #128
	mov	r4, r0
	cmp	r2, #5
	ldrls	pc, [pc, r2, asl #2]
	b	.L2
.L4:
	.word	.L9
	.word	.L9
	.word	.L9
	.word	.L6
	.word	.L5
	.word	.L3
.L9:
	mov	r0, #0
.L1:
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, pc}
.L3:
	ldr	r3, [r0, #4]
	ldr	ip, .L13
	add	r3, r3, r5, lsl #2
	str	r3, [sp]
	mov	r1, r6
	mov	r2, r5
	ldr	r3, [ip]
	bl	ltc_get_max
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, pc}
.L6:
	ldr	r3, .L13+4
	mov	r0, r6
	mov	r1, r5
	ldr	r2, [r3]
	bl	ltc_read_word_data
	cmp	r0, #0
	blt	.L1
	ldr	r2, [r4]
	ldr	r3, [r2, r5, lsl #2]
	cmp	r3, r0
	movge	r0, r3
	strlt	r0, [r2, r5, lsl #2]
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, pc}
.L5:
	ldr	r3, .L13+8
	add	r0, r0, #8
	ldr	r3, [r3]
	mov	r2, r5
	str	r0, [sp]
	mov	r1, r6
	mov	r0, r4
	bl	ltc_get_max
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, pc}
.L2:
	mov	r0, r6
	bl	ltc_wait_ready
	cmp	r0, #0
	ldrge	r3, .L13+12
	ldrge	r0, [r3]
	rsbge	r0, r0, #0
	b	.L1
.L14:
	.align	2
.L13:
	.word	LTC2978_MFR_TEMPERATURE_PEAK
	.word	LTC2978_MFR_VOUT_PEAK
	.word	LTC2978_MFR_VIN_PEAK
	.word	ENODATA
	.size	ltc2978_read_word_data_common, .-ltc2978_read_word_data_common
	.comm	LTC2978_MFR_VOUT_PEAK,4,4
	.comm	LTC2978_MFR_VIN_PEAK,4,4
	.comm	LTC2978_MFR_TEMPERATURE_PEAK,4,4
	.comm	ENODATA,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
