	.file	"extr_regress_thread.c_basic_thread.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	basic_thread, @function
basic_thread:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13, rdi
	xor	esi, esi
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 56
	.cfi_def_cfa_offset 96
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	mov	edi, DWORD PTR 8[rsp]
	lea	r12, 4[rsp]
	call	EVTHREAD_ALLOC_LOCK@PLT
	mov	edi, DWORD PTR 12[rsp]
	call	EVTHREAD_ALLOC_COND@PLT
	mov	edi, DWORD PTR 8[rsp]
	call	assert@PLT
	mov	edi, DWORD PTR 12[rsp]
	call	assert@PLT
	lea	rcx, 8[rsp]
	mov	rsi, r13
	mov	rdi, r12
	mov	edx, DWORD PTR wake_all_timeout[rip]
	call	evtimer_assign@PLT
	mov	eax, DWORD PTR NUM_ITERATIONS[rip]
	test	eax, eax
	jle	.L2
	xor	ebx, ebx
	lea	rbp, 16[rsp]
	.p2align 4,,10
	.p2align 3
.L3:
	mov	rdi, rbp
	call	evutil_timerclear@PLT
	mov	edi, DWORD PTR 8[rsp]
	xor	esi, esi
	mov	QWORD PTR 24[rsp], 0
	mov	DWORD PTR 16[rsp], 3000
	call	EVLOCK_LOCK@PLT
	mov	rsi, rbp
	mov	rdi, r12
	call	evtimer_add@PLT
	xor	edi, edi
	test	rax, rax
	sete	dil
	call	assert@PLT
	mov	esi, DWORD PTR 8[rsp]
	mov	edi, DWORD PTR 12[rsp]
	call	EVTHREAD_COND_WAIT@PLT
	xor	edi, edi
	test	rax, rax
	sete	dil
	add	ebx, 1
	call	assert@PLT
	mov	edi, DWORD PTR 8[rsp]
	xor	esi, esi
	call	EVLOCK_UNLOCK@PLT
	mov	edi, DWORD PTR count_lock[rip]
	xor	esi, esi
	call	EVLOCK_LOCK@PLT
	mov	edi, DWORD PTR count_lock[rip]
	xor	esi, esi
	add	DWORD PTR count[rip], 1
	call	EVLOCK_UNLOCK@PLT
	cmp	DWORD PTR NUM_ITERATIONS[rip], ebx
	jg	.L3
.L2:
	mov	edi, DWORD PTR count_lock[rip]
	xor	esi, esi
	call	EVLOCK_LOCK@PLT
	mov	eax, DWORD PTR NUM_THREADS[rip]
	imul	eax, DWORD PTR NUM_ITERATIONS[rip]
	cmp	eax, DWORD PTR count[rip]
	jle	.L9
.L4:
	mov	edi, DWORD PTR count_lock[rip]
	xor	esi, esi
	call	EVLOCK_UNLOCK@PLT
	mov	edi, DWORD PTR 8[rsp]
	xor	esi, esi
	call	EVTHREAD_FREE_LOCK@PLT
	mov	edi, DWORD PTR 12[rsp]
	call	EVTHREAD_FREE_COND@PLT
	xor	eax, eax
	call	THREAD_RETURN@PLT
	mov	rax, QWORD PTR 40[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L10
	add	rsp, 56
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xor	eax, eax
	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
.L9:
	.cfi_restore_state
	xor	esi, esi
	mov	rdi, r13
	call	event_base_loopexit@PLT
	jmp	.L4
.L10:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	basic_thread, .-basic_thread
	.comm	wake_all_timeout,4,4
	.comm	count_lock,4,4
	.comm	count,4,4
	.comm	NUM_THREADS,4,4
	.comm	NUM_ITERATIONS,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_regress_thread.c_basic_thread.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	basic_thread, %function
basic_thread:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r9, r0
	sub	sp, sp, #24
	ldr	r3, .L14
	mov	r1, #0
	ldr	r0, [sp, #4]
	ldr	r3, [r3]
	str	r3, [sp, #20]
	mov	r3,#0
	bl	EVTHREAD_ALLOC_LOCK
	ldr	r0, [sp, #8]
	bl	EVTHREAD_ALLOC_COND
	ldr	r0, [sp, #4]
	bl	assert
	ldr	r0, [sp, #8]
	bl	assert
	ldr	r3, .L14+4
	ldr	r6, .L14+8
	ldr	r2, [r3]
	mov	r1, r9
	add	r3, sp, #4
	mov	r0, sp
	bl	evtimer_assign
	ldr	r3, [r6]
	cmp	r3, #0
	ble	.L11
	mov	r10, #0
	mov	r8, r10
	ldr	r4, .L14+12
	ldr	r5, .L14+16
	ldr	r7, .L14+20
.L3:
	add	r0, sp, #12
	bl	evutil_timerclear
	mov	r1, #0
	ldr	r0, [sp, #4]
	str	r8, [sp, #16]
	str	r7, [sp, #12]
	bl	EVLOCK_LOCK
	add	r1, sp, #12
	mov	r0, sp
	bl	evtimer_add
	clz	r0, r0
	lsr	r0, r0, #5
	bl	assert
	ldr	r1, [sp, #4]
	ldr	r0, [sp, #8]
	bl	EVTHREAD_COND_WAIT
	clz	r0, r0
	lsr	r0, r0, #5
	bl	assert
	mov	r1, #0
	ldr	r0, [sp, #4]
	bl	EVLOCK_UNLOCK
	mov	r1, #0
	ldr	r0, [r4]
	bl	EVLOCK_LOCK
	ldr	r3, [r5]
	mov	r1, #0
	add	r3, r3, #1
	ldr	r0, [r4]
	str	r3, [r5]
	bl	EVLOCK_UNLOCK
	ldr	r3, [r6]
	add	r10, r10, #1
	cmp	r3, r10
	bgt	.L3
.L2:
	mov	r1, #0
	ldr	r0, [r4]
	bl	EVLOCK_LOCK
	ldr	r3, .L14+24
	ldr	r1, [r6]
	ldr	r3, [r3]
	ldr	r2, [r5]
	mul	r3, r1, r3
	cmp	r3, r2
	ble	.L12
.L4:
	mov	r1, #0
	ldr	r0, [r4]
	bl	EVLOCK_UNLOCK
	mov	r1, #0
	ldr	r0, [sp, #4]
	bl	EVTHREAD_FREE_LOCK
	ldr	r0, [sp, #8]
	bl	EVTHREAD_FREE_COND
	bl	THREAD_RETURN
	ldr	r3, .L14
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L13
	mov	r0, #0
	add	sp, sp, #24
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L12:
	mov	r0, r9
	mov	r1, #0
	bl	event_base_loopexit
	b	.L4
.L11:
	ldr	r4, .L14+12
	ldr	r5, .L14+16
	b	.L2
.L13:
	bl	__stack_chk_fail
.L15:
	.align	2
.L14:
	.word	.LC0
	.word	wake_all_timeout
	.word	NUM_ITERATIONS
	.word	count_lock
	.word	count
	.word	3000
	.word	NUM_THREADS
	.size	basic_thread, .-basic_thread
	.comm	wake_all_timeout,4,4
	.comm	count_lock,4,4
	.comm	count,4,4
	.comm	NUM_THREADS,4,4
	.comm	NUM_ITERATIONS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
