	.file	"extr_sx9500.c_sx9500_read_samp_freq.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	sx9500_read_samp_freq, @function
sx9500_read_samp_freq:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13, rsi
	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
	mov	rbx, rdx
	sub	rsp, 24
	.cfi_def_cfa_offset 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	call	mutex_lock@PLT
	mov	edi, DWORD PTR 4[rbp]
	mov	esi, DWORD PTR SX9500_REG_PROX_CTRL0[rip]
	lea	rdx, 4[rsp]
	call	regmap_read@PLT
	mov	rdi, rbp
	mov	r12d, eax
	call	mutex_unlock@PLT
	test	r12d, r12d
	js	.L1
	mov	ecx, DWORD PTR SX9500_SCAN_PERIOD_SHIFT[rip]
	mov	rdx, QWORD PTR sx9500_samp_freq_table[rip]
	mov	eax, DWORD PTR 4[rsp]
	and	eax, DWORD PTR SX9500_SCAN_PERIOD_MASK[rip]
	shr	eax, cl
	lea	rax, [rdx+rax*8]
	mov	edx, DWORD PTR [rax]
	mov	DWORD PTR 0[r13], edx
	mov	eax, DWORD PTR 4[rax]
	mov	DWORD PTR [rbx], eax
	mov	r12d, DWORD PTR IIO_VAL_INT_PLUS_MICRO[rip]
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L6
	add	rsp, 24
	.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
.L6:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	sx9500_read_samp_freq, .-sx9500_read_samp_freq
	.comm	sx9500_samp_freq_table,8,8
	.comm	SX9500_SCAN_PERIOD_SHIFT,4,4
	.comm	SX9500_SCAN_PERIOD_MASK,4,4
	.comm	SX9500_REG_PROX_CTRL0,4,4
	.comm	IIO_VAL_INT_PLUS_MICRO,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_sx9500.c_sx9500_read_samp_freq.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	sx9500_read_samp_freq, %function
sx9500_read_samp_freq:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	mov	r5, r0
	ldr	r3, .L7
	sub	sp, sp, #12
	mov	r7, r1
	mov	r6, r2
	ldr	r3, [r3]
	str	r3, [sp, #4]
	mov	r3,#0
	bl	mutex_lock
	ldr	r3, .L7+4
	mov	r2, sp
	ldr	r1, [r3]
	ldr	r0, [r5, #4]
	bl	regmap_read
	mov	r4, r0
	mov	r0, r5
	bl	mutex_unlock
	cmp	r4, #0
	blt	.L1
	ldr	r3, .L7+8
	ldr	r1, .L7+12
	ldr	r0, [r3]
	ldr	r2, .L7+16
	ldr	r3, [sp]
	ldr	r1, [r1]
	ldr	r2, [r2]
	and	r3, r3, r0
	lsr	r3, r3, r1
	ldr	r1, [r2, r3, lsl #3]
	add	r3, r2, r3, lsl #3
	str	r1, [r7]
	ldr	r2, [r3, #4]
	ldr	r3, .L7+20
	str	r2, [r6]
	ldr	r4, [r3]
.L1:
	ldr	r3, .L7
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L6
	mov	r0, r4
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L6:
	bl	__stack_chk_fail
.L8:
	.align	2
.L7:
	.word	.LC0
	.word	SX9500_REG_PROX_CTRL0
	.word	SX9500_SCAN_PERIOD_MASK
	.word	SX9500_SCAN_PERIOD_SHIFT
	.word	sx9500_samp_freq_table
	.word	IIO_VAL_INT_PLUS_MICRO
	.size	sx9500_read_samp_freq, .-sx9500_read_samp_freq
	.comm	sx9500_samp_freq_table,4,4
	.comm	SX9500_SCAN_PERIOD_SHIFT,4,4
	.comm	SX9500_SCAN_PERIOD_MASK,4,4
	.comm	SX9500_REG_PROX_CTRL0,4,4
	.comm	IIO_VAL_INT_PLUS_MICRO,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
