	.file	"239183.c"
	.intel_syntax noprefix
	.text
	.data
	.align 4
	.type	nthread, @object
	.size	nthread, 4
nthread:
	.long	1
	.local	round
	.comm	round,4,4
	.globl	bstate
	.bss
	.align 32
	.type	bstate, @object
	.size	bstate, 96
bstate:
	.zero	96
	.section	.rodata
.LC0:
	.string	"the_stack_data/239183.c"
	.align 8
.LC1:
	.string	"pthread_mutex_init(&bstate.barrier_mutex, NULL) == 0"
	.align 8
.LC2:
	.string	"pthread_cond_init(&bstate.barrier_cond, NULL) == 0"
	.text
	.type	barrier_init, @function
barrier_init:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	esi, 0
	lea	rdi, bstate[rip]
	call	pthread_mutex_init@PLT
	test	eax, eax
	je	.L2
	lea	rcx, __PRETTY_FUNCTION__.2[rip]
	mov	edx, 22
	lea	rsi, .LC0[rip]
	lea	rdi, .LC1[rip]
	call	__assert_fail@PLT
.L2:
	mov	esi, 0
	lea	rdi, bstate[rip+40]
	call	pthread_cond_init@PLT
	test	eax, eax
	je	.L3
	lea	rcx, __PRETTY_FUNCTION__.2[rip]
	mov	edx, 23
	lea	rsi, .LC0[rip]
	lea	rdi, .LC2[rip]
	call	__assert_fail@PLT
.L3:
	mov	DWORD PTR bstate[rip+88], 0
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	barrier_init, .-barrier_init
	.type	barrier, @function
barrier:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	lea	rdi, bstate[rip]
	call	pthread_mutex_lock@PLT
	mov	eax, DWORD PTR bstate[rip+88]
	add	eax, 1
	mov	DWORD PTR bstate[rip+88], eax
	mov	edx, DWORD PTR bstate[rip+88]
	mov	eax, DWORD PTR nthread[rip]
	cmp	edx, eax
	jne	.L5
	lea	rdi, bstate[rip+40]
	call	pthread_cond_broadcast@PLT
	mov	DWORD PTR bstate[rip+88], 0
	mov	eax, DWORD PTR bstate[rip+92]
	add	eax, 1
	mov	DWORD PTR bstate[rip+92], eax
	jmp	.L6
.L5:
	lea	rsi, bstate[rip]
	lea	rdi, bstate[rip+40]
	call	pthread_cond_wait@PLT
.L6:
	lea	rdi, bstate[rip]
	call	pthread_mutex_unlock@PLT
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	barrier, .-barrier
	.section	.rodata
.LC3:
	.string	"i == t"
	.text
	.type	thread, @function
thread:
.LFB8:
	.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	DWORD PTR -16[rbp], 0
	jmp	.L8
.L10:
	mov	eax, DWORD PTR bstate[rip+92]
	mov	DWORD PTR -12[rbp], eax
	mov	eax, DWORD PTR -16[rbp]
	cmp	eax, DWORD PTR -12[rbp]
	je	.L9
	lea	rcx, __PRETTY_FUNCTION__.1[rip]
	mov	edx, 52
	lea	rsi, .LC0[rip]
	lea	rdi, .LC3[rip]
	call	__assert_fail@PLT
.L9:
	mov	eax, 0
	call	barrier
	call	random@PLT
	mov	rcx, rax
	movabs	rdx, -6640827866535438581
	mov	rax, rcx
	imul	rdx
	lea	rax, [rdx+rcx]
	sar	rax, 6
	mov	rsi, rcx
	sar	rsi, 63
	sub	rax, rsi
	mov	rdx, rax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	add	rax, rdx
	sal	rax, 2
	sub	rcx, rax
	mov	rdx, rcx
	mov	eax, edx
	mov	edi, eax
	call	usleep@PLT
	add	DWORD PTR -16[rbp], 1
.L8:
	cmp	DWORD PTR -16[rbp], 19999
	jle	.L10
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	thread, .-thread
	.section	.rodata
.LC4:
	.string	"%s: %s nthread\n"
	.align 8
.LC5:
	.string	"pthread_create(&tha[i], NULL, thread, (void *) i) == 0"
	.align 8
.LC6:
	.string	"pthread_join(tha[i], &value) == 0"
.LC7:
	.string	"OK; passed"
	.text
	.globl	main
	.type	main, @function
main:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	DWORD PTR -36[rbp], edi
	mov	QWORD PTR -48[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -36[rbp], 1
	jg	.L12
	mov	rax, QWORD PTR -48[rbp]
	mov	rcx, QWORD PTR [rax]
	mov	rax, QWORD PTR -48[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, -1
	call	exit@PLT
.L12:
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR nthread[rip], eax
	mov	eax, DWORD PTR nthread[rip]
	cdqe
	sal	rax, 3
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -16[rbp], rax
	mov	edi, 0
	call	srandom@PLT
	call	barrier_init
	mov	QWORD PTR -24[rbp], 0
	jmp	.L13
.L15:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR -24[rbp]
	lea	rcx, 0[0+rdx*8]
	mov	rdx, QWORD PTR -16[rbp]
	lea	rdi, [rcx+rdx]
	mov	rcx, rax
	lea	rdx, thread[rip]
	mov	esi, 0
	call	pthread_create@PLT
	test	eax, eax
	je	.L14
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 77
	lea	rsi, .LC0[rip]
	lea	rdi, .LC5[rip]
	call	__assert_fail@PLT
.L14:
	add	QWORD PTR -24[rbp], 1
.L13:
	mov	eax, DWORD PTR nthread[rip]
	cdqe
	cmp	QWORD PTR -24[rbp], rax
	jl	.L15
	mov	QWORD PTR -24[rbp], 0
	jmp	.L16
.L18:
	mov	rax, QWORD PTR -24[rbp]
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -16[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	lea	rdx, -32[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	pthread_join@PLT
	test	eax, eax
	je	.L17
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 80
	lea	rsi, .LC0[rip]
	lea	rdi, .LC6[rip]
	call	__assert_fail@PLT
.L17:
	add	QWORD PTR -24[rbp], 1
.L16:
	mov	eax, DWORD PTR nthread[rip]
	cdqe
	cmp	QWORD PTR -24[rbp], rax
	jl	.L18
	lea	rdi, .LC7[rip]
	call	puts@PLT
	mov	eax, 0
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	main, .-main
	.section	.rodata
	.align 8
	.type	__PRETTY_FUNCTION__.2, @object
	.size	__PRETTY_FUNCTION__.2, 13
__PRETTY_FUNCTION__.2:
	.string	"barrier_init"
	.type	__PRETTY_FUNCTION__.1, @object
	.size	__PRETTY_FUNCTION__.1, 7
__PRETTY_FUNCTION__.1:
	.string	"thread"
	.type	__PRETTY_FUNCTION__.0, @object
	.size	__PRETTY_FUNCTION__.0, 5
__PRETTY_FUNCTION__.0:
	.string	"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	"239183.c"
	.text
	.data
	.align	2
	.type	nthread, %object
	.size	nthread, 4
nthread:
	.word	1
	.local	round
	.comm	round,4,4
	.comm	bstate,80,8
	.section	.rodata
	.align	2
.LC0:
	.ascii	"the_stack_data/239183.c\000"
	.align	2
.LC1:
	.ascii	"pthread_mutex_init(&bstate.barrier_mutex, NULL) == "
	.ascii	"0\000"
	.align	2
.LC2:
	.ascii	"pthread_cond_init(&bstate.barrier_cond, NULL) == 0\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	barrier_init, %function
barrier_init:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	mov	r1, #0
	ldr	r0, .L4
	bl	pthread_mutex_init
	mov	r3, r0
	cmp	r3, #0
	beq	.L2
	ldr	r3, .L4+4
	mov	r2, #22
	ldr	r1, .L4+8
	ldr	r0, .L4+12
	bl	__assert_fail
.L2:
	mov	r1, #0
	ldr	r0, .L4+16
	bl	pthread_cond_init
	mov	r3, r0
	cmp	r3, #0
	beq	.L3
	ldr	r3, .L4+4
	mov	r2, #23
	ldr	r1, .L4+8
	ldr	r0, .L4+20
	bl	__assert_fail
.L3:
	ldr	r3, .L4
	mov	r2, #0
	str	r2, [r3, #72]
	nop
	pop	{fp, pc}
.L5:
	.align	2
.L4:
	.word	bstate
	.word	__PRETTY_FUNCTION__.6248
	.word	.LC0
	.word	.LC1
	.word	bstate+24
	.word	.LC2
	.size	barrier_init, .-barrier_init
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	barrier, %function
barrier:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r0, .L9
	bl	pthread_mutex_lock
	ldr	r3, .L9
	ldr	r3, [r3, #72]
	add	r3, r3, #1
	ldr	r2, .L9
	str	r3, [r2, #72]
	ldr	r3, .L9
	ldr	r2, [r3, #72]
	ldr	r3, .L9+4
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L7
	ldr	r0, .L9+8
	bl	pthread_cond_broadcast
	ldr	r3, .L9
	mov	r2, #0
	str	r2, [r3, #72]
	ldr	r3, .L9
	ldr	r3, [r3, #76]
	add	r3, r3, #1
	ldr	r2, .L9
	str	r3, [r2, #76]
	b	.L8
.L7:
	ldr	r1, .L9
	ldr	r0, .L9+8
	bl	pthread_cond_wait
.L8:
	ldr	r0, .L9
	bl	pthread_mutex_unlock
	nop
	pop	{fp, pc}
.L10:
	.align	2
.L9:
	.word	bstate
	.word	nthread
	.word	bstate+24
	.size	barrier, .-barrier
	.section	.rodata
	.align	2
.LC3:
	.ascii	"i == t\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	thread, %function
thread:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	ldr	r3, [fp, #-24]
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L12
.L14:
	ldr	r3, .L15
	ldr	r3, [r3, #76]
	str	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-8]
	cmp	r2, r3
	beq	.L13
	ldr	r3, .L15+4
	mov	r2, #52
	ldr	r1, .L15+8
	ldr	r0, .L15+12
	bl	__assert_fail
.L13:
	bl	barrier
	bl	random
	mov	r2, r0
	ldr	r3, .L15+16
	smull	r1, r3, r2, r3
	asr	r1, r3, #5
	asr	r3, r2, #31
	sub	r1, r1, r3
	mov	r3, r1
	lsl	r3, r3, #2
	add	r3, r3, r1
	lsl	r1, r3, #2
	add	r3, r3, r1
	lsl	r3, r3, #2
	sub	r1, r2, r3
	mov	r3, r1
	mov	r0, r3
	bl	usleep
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L12:
	ldr	r3, [fp, #-16]
	ldr	r2, .L15+20
	cmp	r3, r2
	ble	.L14
	nop
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L16:
	.align	2
.L15:
	.word	bstate
	.word	__PRETTY_FUNCTION__.6258
	.word	.LC0
	.word	.LC3
	.word	1374389535
	.word	19999
	.size	thread, .-thread
	.section	.rodata
	.align	2
.LC4:
	.ascii	"%s: %s nthread\012\000"
	.align	2
.LC5:
	.ascii	"pthread_create(&tha[i], NULL, thread, (void *) i) ="
	.ascii	"= 0\000"
	.align	2
.LC6:
	.ascii	"pthread_join(tha[i], &value) == 0\000"
	.align	2
.LC7:
	.ascii	"OK; passed\000"
	.align	2
.LC8:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	ldr	r3, .L27
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-24]
	cmp	r3, #1
	bgt	.L18
	ldr	r3, .L27+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-28]
	ldr	r2, [r3]
	ldr	r3, [fp, #-28]
	ldr	r3, [r3]
	ldr	r1, .L27+8
	bl	fprintf
	mvn	r0, #0
	bl	exit
.L18:
	ldr	r3, [fp, #-28]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r3, r0
	ldr	r2, .L27+12
	str	r3, [r2]
	ldr	r3, .L27+12
	ldr	r3, [r3]
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-12]
	mov	r0, #0
	bl	srandom
	bl	barrier_init
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L19
.L21:
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-12]
	add	r0, r2, r3
	ldr	r3, [fp, #-16]
	ldr	r2, .L27+16
	mov	r1, #0
	bl	pthread_create
	mov	r3, r0
	cmp	r3, #0
	beq	.L20
	ldr	r3, .L27+20
	mov	r2, #77
	ldr	r1, .L27+24
	ldr	r0, .L27+28
	bl	__assert_fail
.L20:
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L19:
	ldr	r3, .L27+12
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	blt	.L21
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L22
.L24:
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-12]
	add	r3, r2, r3
	ldr	r3, [r3]
	sub	r2, fp, #20
	mov	r1, r2
	mov	r0, r3
	bl	pthread_join
	mov	r3, r0
	cmp	r3, #0
	beq	.L23
	ldr	r3, .L27+20
	mov	r2, #80
	ldr	r1, .L27+24
	ldr	r0, .L27+32
	bl	__assert_fail
.L23:
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L22:
	ldr	r3, .L27+12
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	blt	.L24
	ldr	r0, .L27+36
	bl	puts
	mov	r3, #0
	ldr	r2, .L27
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L26
	bl	__stack_chk_fail
.L26:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L28:
	.align	2
.L27:
	.word	.LC8
	.word	stderr
	.word	.LC4
	.word	nthread
	.word	thread
	.word	__PRETTY_FUNCTION__.6271
	.word	.LC0
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.size	main, .-main
	.section	.rodata
	.align	2
	.type	__PRETTY_FUNCTION__.6248, %object
	.size	__PRETTY_FUNCTION__.6248, 13
__PRETTY_FUNCTION__.6248:
	.ascii	"barrier_init\000"
	.align	2
	.type	__PRETTY_FUNCTION__.6258, %object
	.size	__PRETTY_FUNCTION__.6258, 7
__PRETTY_FUNCTION__.6258:
	.ascii	"thread\000"
	.align	2
	.type	__PRETTY_FUNCTION__.6271, %object
	.size	__PRETTY_FUNCTION__.6271, 5
__PRETTY_FUNCTION__.6271:
	.ascii	"main\000"
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
