	.file	"extr_ad9523.c_ad9523_read_raw.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	ad9523_read_raw, @function
ad9523_read_raw:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rdx
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, r8
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	QWORD PTR 8[rsp], rcx
	call	iio_priv@PLT
	lea	r15, 16[rax]
	mov	r14, rax
	mov	rdi, r15
	call	mutex_lock@PLT
	mov	rdi, QWORD PTR 0[rbp]
	call	AD9523_CHANNEL_CLOCK_DIST@PLT
	mov	rdi, r12
	mov	esi, eax
	call	ad9523_read@PLT
	mov	rdi, r15
	mov	r12d, eax
	call	mutex_unlock@PLT
	test	r12d, r12d
	js	.L1
	cmp	rbx, 129
	je	.L3
	cmp	rbx, 130
	je	.L4
	cmp	rbx, 128
	je	.L8
	mov	r12d, DWORD PTR EINVAL[rip]
	neg	r12d
.L1:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	xor	eax, eax
	test	DWORD PTR AD9523_CLK_DIST_PWR_DOWN_EN[rip], r12d
	sete	al
	mov	DWORD PTR 0[r13], eax
	mov	r12d, DWORD PTR IIO_VAL_INT[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L4:
	mov	rax, QWORD PTR 8[r14]
	mov	rcx, QWORD PTR 0[rbp]
	mov	edi, r12d
	mov	rcx, QWORD PTR [rax+rcx*8]
	mov	rax, QWORD PTR [r14]
	mov	ebx, DWORD PTR [rax+rcx*4]
	call	AD9523_CLK_DIST_DIV_REV@PLT
	mov	r8d, eax
	mov	eax, ebx
	cdq
	idiv	r8d
	mov	DWORD PTR 0[r13], eax
	mov	r12d, DWORD PTR IIO_VAL_INT[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L3:
	mov	edi, r12d
	call	AD9523_CLK_DIST_DIV_PHASE_REV@PLT
	mov	edi, r12d
	mov	ebx, eax
	call	AD9523_CLK_DIST_DIV_REV@PLT
	mov	rcx, QWORD PTR 8[rsp]
	mov	r8d, eax
	imul	eax, ebx, 3141592
	cdq
	idiv	r8d
	mov	edx, eax
	imul	rdx, rdx, 1125899907
	shr	rdx, 50
	mov	DWORD PTR 0[r13], edx
	imul	edx, edx, 1000000
	sub	eax, edx
	mov	DWORD PTR [rcx], eax
	mov	r12d, DWORD PTR IIO_VAL_INT_PLUS_MICRO[rip]
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	ad9523_read_raw, .-ad9523_read_raw
	.comm	IIO_VAL_INT_PLUS_MICRO,4,4
	.comm	IIO_VAL_INT,4,4
	.comm	EINVAL,4,4
	.comm	AD9523_CLK_DIST_PWR_DOWN_EN,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_ad9523.c_ad9523_read_raw.c"
	.text
	.global	__aeabi_idiv
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ad9523_read_raw, %function
ad9523_read_raw:
	@ args = 4, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r9, [sp, #32]
	mov	r6, r1
	mov	r7, r2
	mov	r8, r3
	mov	r4, r0
	bl	iio_priv
	add	r5, r0, #8
	mov	r10, r0
	mov	r0, r5
	bl	mutex_lock
	ldr	r0, [r6]
	bl	AD9523_CHANNEL_CLOCK_DIST
	mov	r1, r0
	mov	r0, r4
	bl	ad9523_read
	mov	r4, r0
	mov	r0, r5
	bl	mutex_unlock
	cmp	r4, #0
	blt	.L1
	cmp	r9, #129
	beq	.L3
	cmp	r9, #130
	beq	.L4
	cmp	r9, #128
	beq	.L8
	ldr	r3, .L9
	ldr	r4, [r3]
	rsb	r4, r4, #0
.L1:
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L8:
	ldr	r2, .L9+4
	ldr	r3, .L9+8
	ldr	r2, [r2]
	tst	r4, r2
	moveq	r2, #1
	movne	r2, #0
	str	r2, [r7]
	ldr	r4, [r3]
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L4:
	ldr	r1, [r6]
	ldr	r2, [r10, #4]
	ldr	r3, [r10]
	ldr	r2, [r2, r1, lsl #2]
	mov	r0, r4
	ldr	r4, [r3, r2, lsl #2]
	bl	AD9523_CLK_DIST_DIV_REV
	mov	r1, r0
	mov	r0, r4
	bl	__aeabi_idiv
	ldr	r3, .L9+8
	str	r0, [r7]
	ldr	r4, [r3]
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L3:
	mov	r0, r4
	bl	AD9523_CLK_DIST_DIV_PHASE_REV
	mov	r5, r0
	mov	r0, r4
	bl	AD9523_CLK_DIST_DIV_REV
	add	r3, r5, r5, lsl #1
	add	r3, r5, r3, lsl #7
	rsb	r3, r3, r3, lsl #8
	rsb	r5, r5, r3, lsl #2
	mov	r1, r0
	lsl	r0, r5, #3
	bl	__aeabi_idiv
	ldr	r3, .L9+12
	ldr	r1, .L9+16
	umull	r2, r3, r0, r3
	lsr	r3, r3, #18
	rsb	r2, r3, r3, lsl #5
	rsb	r2, r2, r2, lsl #6
	add	r2, r3, r2, lsl #3
	sub	r0, r0, r2, lsl #6
	str	r3, [r7]
	str	r0, [r8]
	ldr	r4, [r1]
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L10:
	.align	2
.L9:
	.word	EINVAL
	.word	AD9523_CLK_DIST_PWR_DOWN_EN
	.word	IIO_VAL_INT
	.word	1125899907
	.word	IIO_VAL_INT_PLUS_MICRO
	.size	ad9523_read_raw, .-ad9523_read_raw
	.comm	IIO_VAL_INT_PLUS_MICRO,4,4
	.comm	IIO_VAL_INT,4,4
	.comm	EINVAL,4,4
	.comm	AD9523_CLK_DIST_PWR_DOWN_EN,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
