	.file	"extr_da9052-core.c_da9052_adc_manual_read.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"timeout waiting for ADC conversion interrupt\n"
	.text
	.p2align 4
	.globl	da9052_adc_manual_read
	.type	da9052_adc_manual_read, @function
da9052_adc_manual_read:
.LFB0:
	.cfi_startproc
	endbr64
	cmp	BYTE PTR DA9052_ADC_VBBAT[rip], sil
	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
	jnb	.L2
	mov	r12d, DWORD PTR EINVAL[rip]
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	neg	r12d
	mov	eax, r12d
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	rbp, rdi
	movzx	r12d, sil
	call	mutex_lock@PLT
	lea	r13, 8[rbp]
	mov	rdi, r13
	call	reinit_completion@PLT
	mov	rax, QWORD PTR chan_mux[rip]
	mov	esi, DWORD PTR DA9052_ADC_MAN_REG[rip]
	mov	rdi, rbp
	movzx	edx, BYTE PTR [rax+r12]
	or	dl, BYTE PTR DA9052_ADC_MAN_MAN_CONV[rip]
	movzx	edx, dl
	call	da9052_reg_write@PLT
	mov	r12d, eax
	test	eax, eax
	js	.L4
	mov	edi, 500
	call	msecs_to_jiffies@PLT
	mov	rdi, r13
	mov	esi, eax
	call	wait_for_completion_timeout@PLT
	test	eax, eax
	je	.L9
	mov	esi, DWORD PTR DA9052_ADC_RES_H_REG[rip]
	mov	rdi, rbp
	call	da9052_reg_read@PLT
	mov	r12d, eax
	test	eax, eax
	js	.L4
	mov	esi, DWORD PTR DA9052_ADC_RES_L_REG[rip]
	mov	rdi, rbp
	call	da9052_reg_read@PLT
	test	eax, eax
	js	.L6
	sal	r12d, 2
	and	ax, WORD PTR DA9052_ADC_RES_LSB[rip]
	or	r12d, eax
	movzx	r12d, r12w
.L4:
	mov	rdi, rbp
	call	mutex_unlock@PLT
	mov	eax, r12d
	pop	rbp
	.cfi_remember_state
	.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
.L9:
	.cfi_restore_state
	mov	edi, DWORD PTR 4[rbp]
	lea	rsi, .LC0[rip]
	call	dev_err@PLT
	mov	r12d, DWORD PTR ETIMEDOUT[rip]
	neg	r12d
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L6:
	mov	r12d, eax
	jmp	.L4
	.cfi_endproc
.LFE0:
	.size	da9052_adc_manual_read, .-da9052_adc_manual_read
	.comm	chan_mux,8,8
	.comm	ETIMEDOUT,4,4
	.comm	EINVAL,4,4
	.comm	DA9052_ADC_VBBAT,1,1
	.comm	DA9052_ADC_RES_L_REG,4,4
	.comm	DA9052_ADC_RES_LSB,4,4
	.comm	DA9052_ADC_RES_H_REG,4,4
	.comm	DA9052_ADC_MAN_REG,4,4
	.comm	DA9052_ADC_MAN_MAN_CONV,1,1
	.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_da9052-core.c_da9052_adc_manual_read.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"timeout waiting for ADC conversion interrupt\012\000"
	.text
	.align	2
	.global	da9052_adc_manual_read
	.syntax unified
	.arm
	.fpu softvfp
	.type	da9052_adc_manual_read, %function
da9052_adc_manual_read:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	ldr	r3, .L10
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, r1
	bcs	.L2
	ldr	r3, .L10+4
	ldr	r4, [r3]
	rsb	r4, r4, #0
	mov	r0, r4
	pop	{r4, r5, r6, pc}
.L2:
	mov	r4, r1
	mov	r5, r0
	add	r6, r0, #8
	bl	mutex_lock
	mov	r0, r6
	bl	reinit_completion
	ldr	r3, .L10+8
	ldr	r2, .L10+12
	ldr	r3, [r3]
	ldrb	r2, [r2]	@ zero_extendqisi2
	ldrb	r1, [r3, r4]	@ zero_extendqisi2
	ldr	r3, .L10+16
	orr	r2, r1, r2
	mov	r0, r5
	ldr	r1, [r3]
	bl	da9052_reg_write
	subs	r4, r0, #0
	blt	.L4
	mov	r0, #500
	bl	msecs_to_jiffies
	mov	r1, r0
	mov	r0, r6
	bl	wait_for_completion_timeout
	cmp	r0, #0
	beq	.L9
	ldr	r3, .L10+20
	mov	r0, r5
	ldr	r1, [r3]
	bl	da9052_reg_read
	subs	r4, r0, #0
	blt	.L4
	ldr	r3, .L10+24
	mov	r0, r5
	ldr	r1, [r3]
	bl	da9052_reg_read
	cmp	r0, #0
	movlt	r4, r0
	ldrge	r3, .L10+28
	ldrge	r3, [r3]
	andge	r0, r0, r3
	orrge	r4, r0, r4, lsl #2
	lslge	r4, r4, #16
	lsrge	r4, r4, #16
.L4:
	mov	r0, r5
	bl	mutex_unlock
	mov	r0, r4
	pop	{r4, r5, r6, pc}
.L9:
	ldr	r1, .L10+32
	ldr	r0, [r5, #4]
	bl	dev_err
	ldr	r3, .L10+36
	ldr	r4, [r3]
	rsb	r4, r4, #0
	b	.L4
.L11:
	.align	2
.L10:
	.word	DA9052_ADC_VBBAT
	.word	EINVAL
	.word	chan_mux
	.word	DA9052_ADC_MAN_MAN_CONV
	.word	DA9052_ADC_MAN_REG
	.word	DA9052_ADC_RES_H_REG
	.word	DA9052_ADC_RES_L_REG
	.word	DA9052_ADC_RES_LSB
	.word	.LC0
	.word	ETIMEDOUT
	.size	da9052_adc_manual_read, .-da9052_adc_manual_read
	.comm	chan_mux,4,4
	.comm	ETIMEDOUT,4,4
	.comm	EINVAL,4,4
	.comm	DA9052_ADC_VBBAT,1,1
	.comm	DA9052_ADC_RES_L_REG,4,4
	.comm	DA9052_ADC_RES_LSB,4,4
	.comm	DA9052_ADC_RES_H_REG,4,4
	.comm	DA9052_ADC_MAN_REG,4,4
	.comm	DA9052_ADC_MAN_MAN_CONV,1,1
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
