	.file	"extr_mss.c_wait_for_calibration.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"mss: Auto calibration timed out(1).\n"
	.text
	.p2align 4
	.type	wait_for_calibration, @function
wait_for_calibration:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	esi, 1000000
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	call	ad_wait_init@PLT
	test	DWORD PTR MSS_IDXBUSY[rip], eax
	jne	.L24
.L2:
	mov	rax, QWORD PTR 0[rbp]
	cmp	rax, QWORD PTR MD_GUSMAX[rip]
	mov	ebx, 100
	je	.L5
	cmp	rax, QWORD PTR MD_GUSPNP[rip]
	jne	.L4
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L7:
	sub	ebx, 1
	je	.L6
.L5:
	mov	esi, 11
	mov	rdi, rbp
	call	ad_read@PLT
	test	al, 32
	je	.L7
.L6:
	mov	ebx, 100
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L10:
	mov	edi, 100
	call	DELAY@PLT
	sub	ebx, 1
	je	.L1
.L9:
	mov	esi, 11
	mov	rdi, rbp
	call	ad_read@PLT
	test	al, 32
	jne	.L10
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	mov	edi, 100
	call	DELAY@PLT
	sub	ebx, 1
	je	.L6
.L4:
	mov	esi, 11
	mov	rdi, rbp
	call	ad_read@PLT
	test	al, 32
	je	.L8
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L24:
	lea	rdi, .LC0[rip]
	call	printf@PLT
	jmp	.L2
	.cfi_endproc
.LFE0:
	.size	wait_for_calibration, .-wait_for_calibration
	.comm	MSS_IDXBUSY,4,4
	.comm	MD_GUSPNP,8,8
	.comm	MD_GUSMAX,8,8
	.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_mss.c_wait_for_calibration.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"mss: Auto calibration timed out(1).\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	wait_for_calibration, %function
wait_for_calibration:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	ldr	r1, .L26
	mov	r5, r0
	bl	ad_wait_init
	ldr	r3, .L26+4
	ldr	r3, [r3]
	tst	r0, r3
	bne	.L25
.L2:
	ldr	r2, .L26+8
	ldr	r3, [r5]
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L12
	ldr	r2, .L26+12
	mov	r4, #100
	ldr	r2, [r2]
	cmp	r3, r2
	bne	.L4
	b	.L5
.L7:
	subs	r4, r4, #1
	beq	.L6
.L5:
	mov	r1, #11
	mov	r0, r5
	bl	ad_read
	tst	r0, #32
	beq	.L7
.L6:
	mov	r4, #100
.L9:
	mov	r1, #11
	mov	r0, r5
	bl	ad_read
	tst	r0, #32
	popeq	{r4, r5, r6, pc}
	mov	r0, #100
	bl	DELAY
	subs	r4, r4, #1
	bne	.L9
	pop	{r4, r5, r6, pc}
.L8:
	mov	r0, #100
	bl	DELAY
	subs	r4, r4, #1
	beq	.L6
.L4:
	mov	r1, #11
	mov	r0, r5
	bl	ad_read
	tst	r0, #32
	beq	.L8
	b	.L6
.L12:
	mov	r4, #100
	b	.L5
.L25:
	ldr	r0, .L26+16
	bl	printf
	b	.L2
.L27:
	.align	2
.L26:
	.word	1000000
	.word	MSS_IDXBUSY
	.word	MD_GUSMAX
	.word	MD_GUSPNP
	.word	.LC0
	.size	wait_for_calibration, .-wait_for_calibration
	.comm	MSS_IDXBUSY,4,4
	.comm	MD_GUSPNP,4,4
	.comm	MD_GUSMAX,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
