	.file	"extr_isl29003.c_isl29003_get_adc_value.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	isl29003_get_adc_value, @function
isl29003_get_adc_value:
.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
	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
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	i2c_get_clientdata@PLT
	mov	rdi, rax
	mov	r13, rax
	call	mutex_lock@PLT
	mov	esi, DWORD PTR ISL29003_REG_LSB_SENSOR[rip]
	mov	rdi, rbp
	call	i2c_smbus_read_byte_data@PLT
	mov	ebx, eax
	test	eax, eax
	js	.L6
	mov	esi, DWORD PTR ISL29003_REG_MSB_SENSOR[rip]
	mov	rdi, rbp
	call	i2c_smbus_read_byte_data@PLT
	mov	rdi, r13
	mov	r12d, eax
	call	mutex_unlock@PLT
	test	r12d, r12d
	js	.L1
	mov	rdi, rbp
	sal	r12d, 8
	call	isl29003_get_range@PLT
	mov	rdi, rbp
	or	r12d, ebx
	movsx	r13, eax
	call	isl29003_get_resolution@PLT
	mov	rdx, QWORD PTR gain_range[rip]
	mov	ecx, 4
	sub	ecx, eax
	imul	r12d, DWORD PTR [rdx+r13*4]
	sal	ecx, 2
	sar	r12d, cl
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	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
.L6:
	.cfi_restore_state
	mov	rdi, r13
	mov	r12d, ebx
	call	mutex_unlock@PLT
	add	rsp, 8
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	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
	.cfi_endproc
.LFE0:
	.size	isl29003_get_adc_value, .-isl29003_get_adc_value
	.comm	gain_range,8,8
	.comm	ISL29003_REG_MSB_SENSOR,4,4
	.comm	ISL29003_REG_LSB_SENSOR,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_isl29003.c_isl29003_get_adc_value.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	isl29003_get_adc_value, %function
isl29003_get_adc_value:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r7, r0
	bl	i2c_get_clientdata
	mov	r5, r0
	bl	mutex_lock
	ldr	r3, .L7
	mov	r0, r7
	ldr	r1, [r3]
	bl	i2c_smbus_read_byte_data
	subs	r6, r0, #0
	blt	.L6
	ldr	r3, .L7+4
	mov	r0, r7
	ldr	r1, [r3]
	bl	i2c_smbus_read_byte_data
	mov	r4, r0
	mov	r0, r5
	bl	mutex_unlock
	cmp	r4, #0
	blt	.L1
	mov	r0, r7
	bl	isl29003_get_range
	mov	r5, r0
	mov	r0, r7
	bl	isl29003_get_resolution
	ldr	r3, .L7+8
	orr	r4, r6, r4, lsl #8
	ldr	r2, [r3]
	rsb	r3, r0, #4
	ldr	r2, [r2, r5, lsl #2]
	lsl	r0, r3, #2
	mul	r4, r2, r4
	asr	r4, r4, r0
.L1:
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L6:
	mov	r4, r6
	mov	r0, r5
	bl	mutex_unlock
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L8:
	.align	2
.L7:
	.word	ISL29003_REG_LSB_SENSOR
	.word	ISL29003_REG_MSB_SENSOR
	.word	gain_range
	.size	isl29003_get_adc_value, .-isl29003_get_adc_value
	.comm	gain_range,4,4
	.comm	ISL29003_REG_MSB_SENSOR,4,4
	.comm	ISL29003_REG_LSB_SENSOR,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
