	.file	"extr_ucb1x00-core.c_ucb1x00_adc_read.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	ucb1x00_adc_read
	.type	ucb1x00_adc_read, @function
ucb1x00_adc_read:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	ebp, esi
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	test	edx, edx
	je	.L2
	or	ebp, DWORD PTR UCB_ADC_SYNC_ENA[rip]
.L2:
	mov	edx, DWORD PTR [rbx]
	mov	esi, DWORD PTR UCB_ADC_CR[rip]
	mov	rdi, rbx
	or	edx, ebp
	call	ucb1x00_reg_write@PLT
	mov	edx, DWORD PTR [rbx]
	mov	esi, DWORD PTR UCB_ADC_CR[rip]
	mov	rdi, rbx
	or	edx, DWORD PTR UCB_ADC_START[rip]
	or	edx, ebp
	call	ucb1x00_reg_write@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L10:
	mov	edi, DWORD PTR TASK_INTERRUPTIBLE[rip]
	call	set_current_state@PLT
	mov	edi, 1
	call	schedule_timeout@PLT
.L4:
	mov	esi, DWORD PTR UCB_ADC_DATA[rip]
	mov	rdi, rbx
	call	ucb1x00_reg_read@PLT
	test	DWORD PTR UCB_ADC_DAT_VAL[rip], eax
	je	.L10
	add	rsp, 8
	.cfi_def_cfa_offset 24
	mov	edi, eax
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	jmp	UCB_ADC_DAT@PLT
	.cfi_endproc
.LFE0:
	.size	ucb1x00_adc_read, .-ucb1x00_adc_read
	.comm	UCB_ADC_SYNC_ENA,4,4
	.comm	UCB_ADC_START,4,4
	.comm	UCB_ADC_DAT_VAL,4,4
	.comm	UCB_ADC_DATA,4,4
	.comm	UCB_ADC_CR,4,4
	.comm	TASK_INTERRUPTIBLE,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_ucb1x00-core.c_ucb1x00_adc_read.c"
	.text
	.align	2
	.global	ucb1x00_adc_read
	.syntax unified
	.arm
	.fpu softvfp
	.type	ucb1x00_adc_read, %function
ucb1x00_adc_read:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r5, r1
	mov	r4, r0
	cmp	r2, #0
	ldrne	r3, .L11
	ldr	r6, .L11+4
	ldrne	r3, [r3]
	ldr	r2, [r0]
	orrne	r5, r1, r3
	orr	r2, r5, r2
	ldr	r1, [r6]
	bl	ucb1x00_reg_write
	ldr	r3, .L11+8
	ldr	r2, [r4]
	ldr	r3, [r3]
	ldr	r1, [r6]
	orr	r2, r2, r3
	orr	r2, r2, r5
	mov	r0, r4
	bl	ucb1x00_reg_write
	ldr	r6, .L11+12
	ldr	r5, .L11+16
	ldr	r7, .L11+20
	b	.L4
.L10:
	ldr	r0, [r7]
	bl	set_current_state
	mov	r0, #1
	bl	schedule_timeout
.L4:
	mov	r0, r4
	ldr	r1, [r6]
	bl	ucb1x00_reg_read
	ldr	r3, [r5]
	tst	r0, r3
	beq	.L10
	pop	{r4, r5, r6, r7, r8, lr}
	b	UCB_ADC_DAT
.L12:
	.align	2
.L11:
	.word	UCB_ADC_SYNC_ENA
	.word	UCB_ADC_CR
	.word	UCB_ADC_START
	.word	UCB_ADC_DATA
	.word	UCB_ADC_DAT_VAL
	.word	TASK_INTERRUPTIBLE
	.size	ucb1x00_adc_read, .-ucb1x00_adc_read
	.comm	UCB_ADC_SYNC_ENA,4,4
	.comm	UCB_ADC_START,4,4
	.comm	UCB_ADC_DAT_VAL,4,4
	.comm	UCB_ADC_DATA,4,4
	.comm	UCB_ADC_CR,4,4
	.comm	TASK_INTERRUPTIBLE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
