	.file	"extr_nxprtc.c_read_timeregs.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	read_timeregs, @function
read_timeregs:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12, rdx
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rsi
	sub	rsp, 40
	.cfi_def_cfa_offset 80
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	mov	rbp, rsp
	mov	rax, QWORD PTR [rdi]
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L5:
	mov	rcx, QWORD PTR [rsp]
	cmp	QWORD PTR [rbx], rcx
	je	.L20
.L9:
	mov	esi, DWORD PTR 8[r13]
	test	rax, rax
	je	.L2
	mov	rdx, rbp
	mov	rdi, r13
	call	read_reg@PLT
	mov	r8d, eax
	test	eax, eax
	jne	.L3
	mov	esi, DWORD PTR 16[r13]
	lea	rdx, 8[rsp]
	mov	rdi, r13
	call	read_reg@PLT
	mov	r8d, eax
	test	eax, eax
	jne	.L3
	mov	esi, DWORD PTR 16[r13]
	lea	rdx, 16[rsp]
	mov	rdi, r13
	call	read_reg@PLT
	mov	r8d, eax
	test	eax, eax
	jne	.L3
	mov	rax, QWORD PTR 16[rsp]
	cmp	QWORD PTR 8[rsp], rax
	jne	.L7
	mov	esi, DWORD PTR 8[r13]
.L2:
	mov	r8d, DWORD PTR WAITFLAGS[rip]
	mov	edi, DWORD PTR 12[r13]
	mov	ecx, 8
	mov	rdx, rbx
	call	nxprtc_readfrom@PLT
	mov	r8d, eax
	test	eax, eax
	jne	.L3
.L7:
	mov	rax, QWORD PTR 0[r13]
	test	rax, rax
	jne	.L5
	mov	rcx, QWORD PTR TMR_TICKS_SEC[rip]
	xor	r8d, r8d
.L8:
	mov	rax, rcx
.L11:
	add	rax, QWORD PTR TMR_TICKS_HALFSEC[rip]
	cqo
	idiv	rcx
	mov	QWORD PTR [r12], rdx
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L21
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r8d
	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
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	cmp	QWORD PTR 0[r13], 0
	mov	rcx, QWORD PTR TMR_TICKS_SEC[rip]
	je	.L8
.L10:
	mov	rax, QWORD PTR 8[rsp]
	cmp	rax, rcx
	jg	.L8
	mov	rbx, rcx
	sub	rbx, rax
	mov	rax, rbx
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L20:
	mov	rcx, QWORD PTR TMR_TICKS_SEC[rip]
	xor	r8d, r8d
	jmp	.L10
.L21:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	read_timeregs, .-read_timeregs
	.comm	WAITFLAGS,4,4
	.comm	TMR_TICKS_SEC,8,8
	.comm	TMR_TICKS_HALFSEC,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_nxprtc.c_read_timeregs.c"
	.text
	.global	__aeabi_idivmod
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	read_timeregs, %function
read_timeregs:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r3, .L25
	sub	sp, sp, #24
	mov	r5, r0
	mov	r6, r1
	mov	r8, r2
	ldr	r3, [r3]
	str	r3, [sp, #20]
	mov	r3,#0
	ldr	r4, [r0]
	ldr	r7, .L25+4
	b	.L9
.L5:
	ldr	r2, [r6]
	ldr	r3, [sp, #8]
	cmp	r2, r3
	beq	.L23
.L9:
	cmp	r4, #0
	ldr	r1, [r5, #4]
	beq	.L2
	mov	r0, r5
	add	r2, sp, #8
	bl	read_reg
	subs	r4, r0, #0
	bne	.L3
	mov	r0, r5
	ldr	r1, [r5, #12]
	add	r2, sp, #12
	bl	read_reg
	subs	r4, r0, #0
	bne	.L3
	mov	r0, r5
	ldr	r1, [r5, #12]
	add	r2, sp, #16
	bl	read_reg
	subs	r4, r0, #0
	bne	.L3
	ldr	r2, [sp, #12]
	ldr	r3, [sp, #16]
	cmp	r2, r3
	bne	.L7
	ldr	r1, [r5, #4]
.L2:
	ldr	r3, [r7]
	mov	r2, r6
	str	r3, [sp]
	ldr	r0, [r5, #8]
	mov	r3, #4
	bl	nxprtc_readfrom
	subs	r4, r0, #0
	bne	.L3
.L7:
	ldr	r4, [r5]
	cmp	r4, #0
	bne	.L5
	ldr	r3, .L25+8
	ldr	r1, [r3]
.L8:
	mov	r3, r1
.L11:
	ldr	r2, .L25+12
	ldr	r0, [r2]
	add	r0, r3, r0
	bl	__aeabi_idivmod
	ldr	r3, .L25
	str	r1, [r8]
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L24
	mov	r0, r4
	add	sp, sp, #24
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L3:
	ldr	r2, [r5]
	ldr	r3, .L25+8
	cmp	r2, #0
	ldr	r1, [r3]
	beq	.L8
	ldr	r3, [sp, #12]
	cmp	r3, r1
	suble	r3, r1, r3
	ble	.L11
	b	.L8
.L23:
	ldr	r3, .L25+8
	mov	r4, #0
	ldr	r1, [r3]
	ldr	r3, [sp, #12]
	cmp	r3, r1
	suble	r3, r1, r3
	ble	.L11
	b	.L8
.L24:
	bl	__stack_chk_fail
.L26:
	.align	2
.L25:
	.word	.LC0
	.word	WAITFLAGS
	.word	TMR_TICKS_SEC
	.word	TMR_TICKS_HALFSEC
	.size	read_timeregs, .-read_timeregs
	.comm	WAITFLAGS,4,4
	.comm	TMR_TICKS_SEC,4,4
	.comm	TMR_TICKS_HALFSEC,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
