	.file	"198581014.c"
	.intel_syntax noprefix
	.text
	.local	conds
	.comm	conds,240,32
	.local	mutexes
	.comm	mutexes,200,32
	.section	.rodata
.LC0:
	.string	"this is thread #%lu\n"
.LC1:
	.string	"%lu exited.\n"
	.text
	.globl	thread_entry
	.type	thread_entry, @function
thread_entry:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, mutexes[rip]
	call	pthread_mutex_lock@PLT
	lea	rsi, mutexes[rip]
	lea	rdi, conds[rip]
	call	pthread_cond_wait@PLT
	lea	rdi, mutexes[rip]
	call	pthread_mutex_unlock@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	thread_entry, .-thread_entry
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 96
	mov	DWORD PTR -84[rbp], edi
	mov	QWORD PTR -96[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -64[rbp], 0
	mov	QWORD PTR -56[rbp], 100000000
	mov	QWORD PTR -72[rbp], 0
	jmp	.L4
.L5:
	mov	rax, QWORD PTR -72[rbp]
	lea	rcx, -48[rbp]
	mov	rdx, QWORD PTR -72[rbp]
	sal	rdx, 3
	lea	rdi, [rcx+rdx]
	mov	rcx, rax
	lea	rdx, thread_entry[rip]
	mov	esi, 0
	call	pthread_create@PLT
	add	QWORD PTR -72[rbp], 1
.L4:
	cmp	QWORD PTR -72[rbp], 4
	jle	.L5
	lea	rax, -64[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	nanosleep@PLT
	lea	rdi, conds[rip]
	call	pthread_cond_broadcast@PLT
	mov	DWORD PTR -80[rbp], 0
	jmp	.L6
.L7:
	mov	eax, DWORD PTR -80[rbp]
	cdqe
	mov	rax, QWORD PTR -48[rbp+rax*8]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_join@PLT
	add	DWORD PTR -80[rbp], 1
.L6:
	cmp	DWORD PTR -80[rbp], 4
	jle	.L7
	mov	DWORD PTR -76[rbp], 0
	jmp	.L8
.L9:
	mov	eax, DWORD PTR -76[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 4
	lea	rdx, conds[rip]
	add	rax, rdx
	mov	rdi, rax
	call	pthread_cond_destroy@PLT
	add	DWORD PTR -76[rbp], 1
.L8:
	cmp	DWORD PTR -76[rbp], 4
	jle	.L9
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"198581014.c"
	.text
	.local	conds
	.comm	conds,240,8
	.local	mutexes
	.comm	mutexes,120,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"this is thread #%lu\012\000"
	.align	2
.LC1:
	.ascii	"%lu exited.\012\000"
	.text
	.align	2
	.global	thread_entry
	.syntax unified
	.arm
	.fpu softvfp
	.type	thread_entry, %function
thread_entry:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	str	r3, [fp, #-8]
	ldr	r1, [fp, #-8]
	ldr	r0, .L3
	bl	printf
	ldr	r0, .L3+4
	bl	pthread_mutex_lock
	ldr	r1, .L3+4
	ldr	r0, .L3+8
	bl	pthread_cond_wait
	ldr	r0, .L3+4
	bl	pthread_mutex_unlock
	ldr	r1, [fp, #-8]
	ldr	r0, .L3+12
	bl	printf
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L4:
	.align	2
.L3:
	.word	.LC0
	.word	mutexes
	.word	conds
	.word	.LC1
	.size	thread_entry, .-thread_entry
	.section	.rodata
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 56
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #56
	str	r0, [fp, #-56]
	str	r1, [fp, #-60]
	ldr	r3, .L14
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-36]
	ldr	r3, .L14+4
	str	r3, [fp, #-32]
	mov	r3, #0
	str	r3, [fp, #-48]
	b	.L6
.L7:
	sub	r2, fp, #28
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #2
	add	r0, r2, r3
	ldr	r3, [fp, #-48]
	ldr	r2, .L14+8
	mov	r1, #0
	bl	pthread_create
	ldr	r3, [fp, #-48]
	add	r3, r3, #1
	str	r3, [fp, #-48]
.L6:
	ldr	r3, [fp, #-48]
	cmp	r3, #4
	ble	.L7
	sub	r3, fp, #36
	mov	r1, #0
	mov	r0, r3
	bl	nanosleep
	ldr	r0, .L14+12
	bl	pthread_cond_broadcast
	mov	r3, #0
	str	r3, [fp, #-44]
	b	.L8
.L9:
	ldr	r3, [fp, #-44]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-24]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	ldr	r3, [fp, #-44]
	add	r3, r3, #1
	str	r3, [fp, #-44]
.L8:
	ldr	r3, [fp, #-44]
	cmp	r3, #4
	ble	.L9
	mov	r3, #0
	str	r3, [fp, #-40]
	b	.L10
.L11:
	ldr	r2, [fp, #-40]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #4
	ldr	r2, .L14+12
	add	r3, r3, r2
	mov	r0, r3
	bl	pthread_cond_destroy
	ldr	r3, [fp, #-40]
	add	r3, r3, #1
	str	r3, [fp, #-40]
.L10:
	ldr	r3, [fp, #-40]
	cmp	r3, #4
	ble	.L11
	mov	r3, #0
	ldr	r2, .L14
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L13
	bl	__stack_chk_fail
.L13:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L15:
	.align	2
.L14:
	.word	.LC2
	.word	100000000
	.word	thread_entry
	.word	conds
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
