	.file	"extr_ip22-time.c_dosample.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	dosample, @function
dosample:
.LFB0:
	.cfi_startproc
	endbr64
	mov	rdx, QWORD PTR sgint[rip]
	mov	eax, DWORD PTR SGINT_TCWORD_CNT2[rip]
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	or	eax, DWORD PTR SGINT_TCWORD_CALL[rip]
	or	eax, DWORD PTR SGINT_TCWORD_MRGEN[rip]
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	DWORD PTR [rdx], eax
	mov	eax, DWORD PTR SGINT_TCSAMP_COUNTER[rip]
	sar	eax, 8
	mov	DWORD PTR 4[rdx], eax
	xor	eax, eax
	call	read_c0_count@PLT
	mov	r12d, eax
	.p2align 4,,10
	.p2align 3
.L2:
	mov	rsi, QWORD PTR sgint[rip]
	mov	edi, DWORD PTR SGINT_TCWORD_CNT2[rip]
	or	edi, DWORD PTR SGINT_TCWORD_CLAT[rip]
	call	writeb@PLT
	mov	rax, QWORD PTR sgint[rip]
	lea	rdi, 4[rax]
	call	readb@PLT
	mov	rax, QWORD PTR sgint[rip]
	lea	rdi, 4[rax]
	call	readb@PLT
	mov	rbp, rax
	xor	eax, eax
	call	read_c0_count@PLT
	mov	ebx, eax
	test	rbp, rbp
	jne	.L2
	mov	rsi, QWORD PTR sgint[rip]
	mov	edi, DWORD PTR SGINT_TCWORD_CNT2[rip]
	or	edi, DWORD PTR SGINT_TCWORD_CALL[rip]
	or	edi, DWORD PTR SGINT_TCWORD_MSWST[rip]
	call	writeb@PLT
	mov	eax, 500000
	cdq
	idiv	DWORD PTR HZ[rip]
	mov	ecx, eax
	mov	eax, ebx
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	sub	eax, r12d
	pop	r12
	.cfi_def_cfa_offset 8
	cdq
	idiv	ecx
	imul	eax, ecx
	cdqe
	ret
	.cfi_endproc
.LFE0:
	.size	dosample, .-dosample
	.comm	sgint,8,8
	.comm	SGINT_TCWORD_MSWST,4,4
	.comm	SGINT_TCWORD_MRGEN,4,4
	.comm	SGINT_TCWORD_CNT2,4,4
	.comm	SGINT_TCWORD_CLAT,4,4
	.comm	SGINT_TCWORD_CALL,4,4
	.comm	SGINT_TCSAMP_COUNTER,4,4
	.comm	HZ,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_ip22-time.c_dosample.c"
	.text
	.global	__aeabi_idiv
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	dosample, %function
dosample:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r8, .L6
	ldr	r7, .L6+4
	ldr	r1, .L6+8
	ldr	r3, [r8]
	ldr	r0, [r7]
	ldr	r2, .L6+12
	ldr	r1, [r1]
	ldr	r5, .L6+16
	ldr	r2, [r2]
	orr	r3, r3, r0
	orr	r3, r3, r1
	ldr	r1, [r5]
	asr	r2, r2, #8
	str	r3, [r1]
	str	r2, [r1, #4]
	bl	read_c0_count
	mov	r6, r0
	ldr	r9, .L6+20
.L2:
	ldr	r3, [r9]
	ldr	r0, [r8]
	ldr	r1, [r5]
	orr	r0, r0, r3
	bl	writeb
	ldr	r0, [r5]
	add	r0, r0, #4
	bl	readb
	ldr	r0, [r5]
	add	r0, r0, #4
	bl	readb
	mov	r4, r0
	bl	read_c0_count
	cmp	r4, #0
	mov	r4, r0
	bne	.L2
	ldr	r1, .L6+24
	ldr	r2, [r7]
	ldr	r3, [r8]
	ldr	r0, [r1]
	orr	r3, r3, r2
	ldr	r1, [r5]
	orr	r0, r3, r0
	bl	writeb
	ldr	r3, .L6+28
	ldr	r0, .L6+32
	ldr	r1, [r3]
	bl	__aeabi_idiv
	mov	r5, r0
	sub	r0, r4, r6
	mov	r1, r5
	bl	__aeabi_idiv
	mul	r0, r5, r0
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L7:
	.align	2
.L6:
	.word	SGINT_TCWORD_CNT2
	.word	SGINT_TCWORD_CALL
	.word	SGINT_TCWORD_MRGEN
	.word	SGINT_TCSAMP_COUNTER
	.word	sgint
	.word	SGINT_TCWORD_CLAT
	.word	SGINT_TCWORD_MSWST
	.word	HZ
	.word	500000
	.size	dosample, .-dosample
	.comm	sgint,4,4
	.comm	SGINT_TCWORD_MSWST,4,4
	.comm	SGINT_TCWORD_MRGEN,4,4
	.comm	SGINT_TCWORD_CNT2,4,4
	.comm	SGINT_TCWORD_CLAT,4,4
	.comm	SGINT_TCWORD_CALL,4,4
	.comm	SGINT_TCSAMP_COUNTER,4,4
	.comm	HZ,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
