	.file	"662440.c"
	.intel_syntax noprefix
	.text
	.globl	count
	.bss
	.align 4
	.type	count, @object
	.size	count, 4
count:
	.zero	4
	.globl	barrier
	.align 32
	.type	barrier, @object
	.size	barrier, 32
barrier:
	.zero	32
	.globl	running
	.data
	.align 4
	.type	running, @object
	.size	running, 4
running:
	.long	1
	.section	.rodata
	.align 8
.LC0:
	.string	"task1 pthread_barrier_wait start"
	.align 8
.LC1:
	.string	"task1 pthread_barrier_wait end"
	.text
	.globl	task1
	.type	task1, @function
task1:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	jmp	.L2
.L3:
	lea	rdi, .LC0[rip]
	call	puts@PLT
	lea	rdi, barrier[rip]
	call	pthread_barrier_wait@PLT
	lea	rdi, .LC1[rip]
	call	puts@PLT
.L2:
	mov	eax, DWORD PTR running[rip]
	test	eax, eax
	jne	.L3
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	task1, .-task1
	.section	.rodata
	.align 8
.LC2:
	.string	"task2 pthread_barrier_wait start"
	.align 8
.LC3:
	.string	"task2 pthread_barrier_wait end"
	.text
	.globl	task2
	.type	task2, @function
task2:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	jmp	.L5
.L6:
	lea	rdi, .LC2[rip]
	call	puts@PLT
	lea	rdi, barrier[rip]
	call	pthread_barrier_wait@PLT
	lea	rdi, .LC3[rip]
	call	puts@PLT
.L5:
	mov	eax, DWORD PTR running[rip]
	test	eax, eax
	jne	.L6
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	task2, .-task2
	.section	.rodata
	.align 8
.LC4:
	.string	"task3 pthread_barrier_wait start"
	.align 8
.LC5:
	.string	"task3 pthread_barrier_wait end"
	.text
	.globl	task3
	.type	task3, @function
task3:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	jmp	.L8
.L9:
	lea	rdi, .LC4[rip]
	call	puts@PLT
	lea	rdi, barrier[rip]
	call	pthread_barrier_wait@PLT
	lea	rdi, .LC5[rip]
	call	puts@PLT
	mov	edi, 1
	call	sleep@PLT
.L8:
	mov	eax, DWORD PTR running[rip]
	test	eax, eax
	jne	.L9
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	task3, .-task3
	.section	.rodata
.LC6:
	.string	"create thread fail"
	.text
	.globl	do1
	.type	do1, @function
do1:
.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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -36[rbp], -1
	mov	edx, 3
	mov	esi, 0
	lea	rdi, barrier[rip]
	call	pthread_barrier_init@PLT
	lea	rax, -32[rbp]
	mov	ecx, 0
	lea	rdx, task1[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	mov	DWORD PTR -36[rbp], eax
	cmp	DWORD PTR -36[rbp], 0
	je	.L11
	lea	rdi, .LC6[rip]
	call	puts@PLT
	jmp	.L10
.L11:
	lea	rax, -24[rbp]
	mov	ecx, 0
	lea	rdx, task2[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	mov	DWORD PTR -36[rbp], eax
	cmp	DWORD PTR -36[rbp], 0
	je	.L13
	lea	rdi, .LC6[rip]
	call	puts@PLT
	jmp	.L10
.L13:
	lea	rax, -16[rbp]
	mov	ecx, 0
	lea	rdx, task3[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	mov	DWORD PTR -36[rbp], eax
	cmp	DWORD PTR -36[rbp], 0
	je	.L14
	lea	rdi, .LC6[rip]
	call	puts@PLT
	jmp	.L10
.L14:
	mov	edi, 4
	call	sleep@PLT
	mov	DWORD PTR running[rip], 0
	mov	edi, 1
	call	sleep@PLT
	lea	rdi, barrier[rip]
	call	pthread_barrier_wait@PLT
	mov	rax, QWORD PTR -32[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_join@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_join@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_join@PLT
	lea	rdi, barrier[rip]
	call	pthread_barrier_destroy@PLT
.L10:
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	do1, .-do1
	.globl	main
	.type	main, @function
main:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	DWORD PTR -4[rbp], edi
	mov	QWORD PTR -16[rbp], rsi
	mov	eax, 0
	call	do1
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.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	"662440.c"
	.text
	.global	count
	.bss
	.align	2
	.type	count, %object
	.size	count, 4
count:
	.space	4
	.comm	barrier,20,4
	.global	running
	.data
	.align	2
	.type	running, %object
	.size	running, 4
running:
	.word	1
	.section	.rodata
	.align	2
.LC0:
	.ascii	"task1 pthread_barrier_wait start\000"
	.align	2
.LC1:
	.ascii	"task1 pthread_barrier_wait end\000"
	.text
	.align	2
	.global	task1
	.syntax unified
	.arm
	.fpu softvfp
	.type	task1, %function
task1:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	b	.L2
.L3:
	ldr	r0, .L4
	bl	puts
	ldr	r0, .L4+4
	bl	pthread_barrier_wait
	ldr	r0, .L4+8
	bl	puts
.L2:
	ldr	r3, .L4+12
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L3
	nop
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L5:
	.align	2
.L4:
	.word	.LC0
	.word	barrier
	.word	.LC1
	.word	running
	.size	task1, .-task1
	.section	.rodata
	.align	2
.LC2:
	.ascii	"task2 pthread_barrier_wait start\000"
	.align	2
.LC3:
	.ascii	"task2 pthread_barrier_wait end\000"
	.text
	.align	2
	.global	task2
	.syntax unified
	.arm
	.fpu softvfp
	.type	task2, %function
task2:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	b	.L7
.L8:
	ldr	r0, .L9
	bl	puts
	ldr	r0, .L9+4
	bl	pthread_barrier_wait
	ldr	r0, .L9+8
	bl	puts
.L7:
	ldr	r3, .L9+12
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L8
	nop
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L10:
	.align	2
.L9:
	.word	.LC2
	.word	barrier
	.word	.LC3
	.word	running
	.size	task2, .-task2
	.section	.rodata
	.align	2
.LC4:
	.ascii	"task3 pthread_barrier_wait start\000"
	.align	2
.LC5:
	.ascii	"task3 pthread_barrier_wait end\000"
	.text
	.align	2
	.global	task3
	.syntax unified
	.arm
	.fpu softvfp
	.type	task3, %function
task3:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	b	.L12
.L13:
	ldr	r0, .L14
	bl	puts
	ldr	r0, .L14+4
	bl	pthread_barrier_wait
	ldr	r0, .L14+8
	bl	puts
	mov	r0, #1
	bl	sleep
.L12:
	ldr	r3, .L14+12
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L13
	nop
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L15:
	.align	2
.L14:
	.word	.LC4
	.word	barrier
	.word	.LC5
	.word	running
	.size	task3, .-task3
	.section	.rodata
	.align	2
.LC6:
	.ascii	"create thread fail\000"
	.align	2
.LC7:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	do1
	.syntax unified
	.arm
	.fpu softvfp
	.type	do1, %function
do1:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	ldr	r3, .L23
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mvn	r3, #0
	str	r3, [fp, #-12]
	mov	r2, #3
	mov	r1, #0
	ldr	r0, .L23+4
	bl	pthread_barrier_init
	sub	r0, fp, #24
	mov	r3, #0
	ldr	r2, .L23+8
	mov	r1, #0
	bl	pthread_create
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	beq	.L17
	ldr	r0, .L23+12
	bl	puts
	b	.L16
.L17:
	sub	r0, fp, #20
	mov	r3, #0
	ldr	r2, .L23+16
	mov	r1, #0
	bl	pthread_create
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	beq	.L19
	ldr	r0, .L23+12
	bl	puts
	b	.L16
.L19:
	sub	r0, fp, #16
	mov	r3, #0
	ldr	r2, .L23+20
	mov	r1, #0
	bl	pthread_create
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	beq	.L20
	ldr	r0, .L23+12
	bl	puts
	b	.L16
.L20:
	mov	r0, #4
	bl	sleep
	ldr	r3, .L23+24
	mov	r2, #0
	str	r2, [r3]
	mov	r0, #1
	bl	sleep
	ldr	r0, .L23+4
	bl	pthread_barrier_wait
	ldr	r3, [fp, #-24]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	ldr	r3, [fp, #-20]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	ldr	r3, [fp, #-16]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	ldr	r0, .L23+4
	bl	pthread_barrier_destroy
.L16:
	ldr	r3, .L23
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L22
	bl	__stack_chk_fail
.L22:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L24:
	.align	2
.L23:
	.word	.LC7
	.word	barrier
	.word	task1
	.word	.LC6
	.word	task2
	.word	task3
	.word	running
	.size	do1, .-do1
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	bl	do1
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
