	.file	"extr_stts751.c_stts751_read_chip_config.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Unrecognized conversion rate 0x%x\n"
	.text
	.p2align 4
	.type	stts751_read_chip_config, @function
stts751_read_chip_config:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	mov	rbx, rdi
	sub	rsp, 24
	.cfi_def_cfa_offset 48
	mov	edi, DWORD PTR 32[rdi]
	mov	esi, DWORD PTR STTS751_REG_CONF[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	call	i2c_smbus_read_byte_data@PLT
	mov	r12d, eax
	test	eax, eax
	js	.L1
	mov	ecx, DWORD PTR STTS751_CONF_RES_SHIFT[rip]
	mov	edi, DWORD PTR 32[rbx]
	mov	DWORD PTR [rbx], eax
	mov	eax, DWORD PTR STTS751_CONF_RES_MASK[rip]
	mov	esi, DWORD PTR STTS751_REG_RATE[rip]
	and	eax, r12d
	sar	eax, cl
	mov	DWORD PTR 4[rbx], eax
	call	i2c_smbus_read_byte_data@PLT
	mov	r12d, eax
	test	eax, eax
	js	.L1
	mov	edi, DWORD PTR stts751_intervals[rip]
	call	ARRAY_SIZE@PLT
	cmp	eax, r12d
	jle	.L7
	mov	DWORD PTR 8[rbx], r12d
	mov	ecx, DWORD PTR STTS751_REG_HLIM_L[rip]
	lea	rsi, 24[rbx]
	mov	rdi, rbx
	mov	edx, DWORD PTR STTS751_REG_HLIM_H[rip]
	call	stts751_read_reg16@PLT
	mov	r12d, eax
	test	eax, eax
	je	.L8
	.p2align 4,,10
	.p2align 3
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L9
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	mov	ecx, DWORD PTR STTS751_REG_LLIM_L[rip]
	mov	edx, DWORD PTR STTS751_REG_LLIM_H[rip]
	lea	rsi, 20[rbx]
	mov	rdi, rbx
	call	stts751_read_reg16@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L1
	mov	edx, DWORD PTR STTS751_REG_TLIM[rip]
	lea	rsi, 12[rbx]
	mov	rdi, rbx
	call	stts751_read_reg8@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L1
	mov	edx, DWORD PTR STTS751_REG_HYST[rip]
	lea	rsi, 4[rsp]
	mov	rdi, rbx
	call	stts751_read_reg8@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L1
	mov	eax, DWORD PTR 12[rbx]
	sub	eax, DWORD PTR 4[rsp]
	mov	DWORD PTR 16[rbx], eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L7:
	mov	edi, DWORD PTR 28[rbx]
	mov	edx, r12d
	lea	rsi, .LC0[rip]
	call	dev_err@PLT
	mov	r12d, DWORD PTR ENODEV[rip]
	neg	r12d
	jmp	.L1
.L9:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	stts751_read_chip_config, .-stts751_read_chip_config
	.comm	stts751_intervals,4,4
	.comm	STTS751_REG_TLIM,4,4
	.comm	STTS751_REG_RATE,4,4
	.comm	STTS751_REG_LLIM_L,4,4
	.comm	STTS751_REG_LLIM_H,4,4
	.comm	STTS751_REG_HYST,4,4
	.comm	STTS751_REG_HLIM_L,4,4
	.comm	STTS751_REG_HLIM_H,4,4
	.comm	STTS751_REG_CONF,4,4
	.comm	STTS751_CONF_RES_SHIFT,4,4
	.comm	STTS751_CONF_RES_MASK,4,4
	.comm	ENODEV,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_stts751.c_stts751_read_chip_config.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Unrecognized conversion rate 0x%x\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	stts751_read_chip_config, %function
stts751_read_chip_config:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, lr}
	ldr	r3, .L10
	sub	sp, sp, #12
	ldr	r1, [r3]
	ldr	r3, .L10+4
	mov	r5, r0
	ldr	r0, [r0, #32]
	ldr	r3, [r3]
	str	r3, [sp, #4]
	mov	r3,#0
	bl	i2c_smbus_read_byte_data
	subs	r4, r0, #0
	blt	.L1
	ldr	r3, .L10+8
	ldr	r2, .L10+12
	ldr	r3, [r3]
	ldr	r1, [r2]
	and	r3, r3, r4
	ldr	r2, .L10+16
	asr	r3, r3, r1
	str	r4, [r5]
	ldr	r1, [r2]
	ldr	r0, [r5, #32]
	str	r3, [r5, #4]
	bl	i2c_smbus_read_byte_data
	subs	r4, r0, #0
	blt	.L1
	ldr	r3, .L10+20
	ldr	r0, [r3]
	bl	ARRAY_SIZE
	cmp	r0, r4
	ble	.L7
	ldr	r3, .L10+24
	ldr	r2, .L10+28
	str	r4, [r5, #8]
	mov	r0, r5
	ldr	r3, [r3]
	ldr	r2, [r2]
	add	r1, r5, #24
	bl	stts751_read_reg16
	subs	r4, r0, #0
	beq	.L8
.L1:
	ldr	r3, .L10+4
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L9
	mov	r0, r4
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, pc}
.L8:
	ldr	r3, .L10+32
	ldr	r2, .L10+36
	mov	r0, r5
	ldr	r3, [r3]
	ldr	r2, [r2]
	add	r1, r5, #20
	bl	stts751_read_reg16
	subs	r4, r0, #0
	bne	.L1
	ldr	r3, .L10+40
	mov	r0, r5
	ldr	r2, [r3]
	add	r1, r5, #12
	bl	stts751_read_reg8
	subs	r4, r0, #0
	bne	.L1
	ldr	r3, .L10+44
	mov	r1, sp
	ldr	r2, [r3]
	mov	r0, r5
	bl	stts751_read_reg8
	subs	r4, r0, #0
	ldreq	r3, [r5, #12]
	ldreq	r2, [sp]
	subeq	r3, r3, r2
	streq	r3, [r5, #16]
	b	.L1
.L7:
	mov	r2, r4
	ldr	r0, [r5, #28]
	ldr	r1, .L10+48
	bl	dev_err
	ldr	r3, .L10+52
	ldr	r0, [r3]
	rsb	r4, r0, #0
	b	.L1
.L9:
	bl	__stack_chk_fail
.L11:
	.align	2
.L10:
	.word	STTS751_REG_CONF
	.word	.LC1
	.word	STTS751_CONF_RES_MASK
	.word	STTS751_CONF_RES_SHIFT
	.word	STTS751_REG_RATE
	.word	stts751_intervals
	.word	STTS751_REG_HLIM_L
	.word	STTS751_REG_HLIM_H
	.word	STTS751_REG_LLIM_L
	.word	STTS751_REG_LLIM_H
	.word	STTS751_REG_TLIM
	.word	STTS751_REG_HYST
	.word	.LC0
	.word	ENODEV
	.size	stts751_read_chip_config, .-stts751_read_chip_config
	.comm	stts751_intervals,4,4
	.comm	STTS751_REG_TLIM,4,4
	.comm	STTS751_REG_RATE,4,4
	.comm	STTS751_REG_LLIM_L,4,4
	.comm	STTS751_REG_LLIM_H,4,4
	.comm	STTS751_REG_HYST,4,4
	.comm	STTS751_REG_HLIM_L,4,4
	.comm	STTS751_REG_HLIM_H,4,4
	.comm	STTS751_REG_CONF,4,4
	.comm	STTS751_CONF_RES_SHIFT,4,4
	.comm	STTS751_CONF_RES_MASK,4,4
	.comm	ENODEV,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
