	.file	"113941.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"%d "
	.text
	.globl	dowait
	.type	dowait, @function
dowait:
.LFB2:
	.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	rdi, rax
	call	pthread_barrier_wait@PLT
	mov	DWORD PTR -12[rbp], eax
	call	pthread_self@PLT
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	dowait, .-dowait
	.section	.rodata
.LC1:
	.string	"pthread_barrierattr_init"
	.align 8
.LC2:
	.string	"pthread_barrierattr_getpshared"
.LC3:
	.string	"the_stack_data/113941.c"
	.align 8
.LC4:
	.string	"i == PTHREAD_PROCESS_PRIVATE || i == PTHREAD_PROCESS_SHARED"
	.align 8
.LC5:
	.string	"pthread_barrierattr_setpshared"
.LC6:
	.string	"pthread_barrier_init"
.LC7:
	.string	"pthread_create (%d)"
	.align 8
.LC8:
	.string	"Manager will now call pthread_barrier_wait."
.LC9:
	.string	"pthread_join"
	.align 8
.LC10:
	.string	"!\"Unknown value returned from pthread_barrier_wait.\""
.LC11:
	.string	"havesyncs == 1"
	.text
	.globl	main
	.type	main, @function
main:
.LFB3:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 4096
	or	QWORD PTR [rsp], 0
	sub	rsp, 96
	mov	DWORD PTR -4180[rbp], edi
	mov	QWORD PTR -4192[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -4052[rbp]
	mov	rdi, rax
	call	pthread_barrierattr_init@PLT
	mov	DWORD PTR -4164[rbp], eax
	cmp	DWORD PTR -4164[rbp], 0
	je	.L4
	mov	DWORD PTR -4160[rbp], 1
	mov	eax, DWORD PTR -4164[rbp]
	mov	DWORD PTR -4156[rbp], eax
	lea	rax, .LC1[rip]
	mov	QWORD PTR -4104[rbp], rax
	mov	rdx, QWORD PTR -4104[rbp]
	mov	ecx, DWORD PTR -4156[rbp]
	mov	eax, DWORD PTR -4160[rbp]
	mov	esi, ecx
	mov	edi, eax
	mov	eax, 0
	call	error@PLT
	nop
.L4:
	lea	rdx, -4176[rbp]
	lea	rax, -4052[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	pthread_barrierattr_getpshared@PLT
	mov	DWORD PTR -4164[rbp], eax
	cmp	DWORD PTR -4164[rbp], 0
	je	.L5
	mov	DWORD PTR -4152[rbp], 1
	mov	eax, DWORD PTR -4164[rbp]
	mov	DWORD PTR -4148[rbp], eax
	lea	rax, .LC2[rip]
	mov	QWORD PTR -4096[rbp], rax
	mov	rdx, QWORD PTR -4096[rbp]
	mov	ecx, DWORD PTR -4148[rbp]
	mov	eax, DWORD PTR -4152[rbp]
	mov	esi, ecx
	mov	edi, eax
	mov	eax, 0
	call	error@PLT
	nop
.L5:
	mov	eax, DWORD PTR -4176[rbp]
	test	eax, eax
	je	.L6
	mov	eax, DWORD PTR -4176[rbp]
	cmp	eax, 1
	je	.L6
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 60
	lea	rsi, .LC3[rip]
	lea	rdi, .LC4[rip]
	call	__assert_fail@PLT
.L6:
	lea	rax, -4052[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_barrierattr_setpshared@PLT
	mov	DWORD PTR -4164[rbp], eax
	cmp	DWORD PTR -4164[rbp], 0
	je	.L7
	mov	DWORD PTR -4144[rbp], 1
	mov	eax, DWORD PTR -4164[rbp]
	mov	DWORD PTR -4140[rbp], eax
	lea	rax, .LC5[rip]
	mov	QWORD PTR -4088[rbp], rax
	mov	rdx, QWORD PTR -4088[rbp]
	mov	ecx, DWORD PTR -4140[rbp]
	mov	eax, DWORD PTR -4144[rbp]
	mov	esi, ecx
	mov	edi, eax
	mov	eax, 0
	call	error@PLT
	nop
.L7:
	lea	rcx, -4052[rbp]
	lea	rax, -4048[rbp]
	mov	edx, 501
	mov	rsi, rcx
	mov	rdi, rax
	call	pthread_barrier_init@PLT
	mov	DWORD PTR -4164[rbp], eax
	cmp	DWORD PTR -4164[rbp], 0
	je	.L8
	mov	DWORD PTR -4136[rbp], 1
	mov	eax, DWORD PTR -4164[rbp]
	mov	DWORD PTR -4132[rbp], eax
	lea	rax, .LC6[rip]
	mov	QWORD PTR -4080[rbp], rax
	mov	rdx, QWORD PTR -4080[rbp]
	mov	ecx, DWORD PTR -4132[rbp]
	mov	eax, DWORD PTR -4136[rbp]
	mov	esi, ecx
	mov	edi, eax
	mov	eax, 0
	call	error@PLT
	nop
.L8:
	mov	DWORD PTR -4172[rbp], 0
	jmp	.L9
.L20:
	mov	DWORD PTR -4176[rbp], 0
	jmp	.L10
.L12:
	mov	eax, DWORD PTR -4176[rbp]
	lea	rdx, -4016[rbp]
	cdqe
	sal	rax, 3
	lea	rdi, [rdx+rax]
	lea	rax, -4048[rbp]
	mov	rcx, rax
	lea	rdx, dowait[rip]
	mov	esi, 0
	call	pthread_create@PLT
	mov	DWORD PTR -4164[rbp], eax
	cmp	DWORD PTR -4164[rbp], 0
	je	.L11
	mov	ecx, DWORD PTR -4176[rbp]
	mov	DWORD PTR -4128[rbp], 1
	mov	eax, DWORD PTR -4164[rbp]
	mov	DWORD PTR -4124[rbp], eax
	lea	rax, .LC7[rip]
	mov	QWORD PTR -4072[rbp], rax
	mov	rdx, QWORD PTR -4072[rbp]
	mov	esi, DWORD PTR -4124[rbp]
	mov	eax, DWORD PTR -4128[rbp]
	mov	edi, eax
	mov	eax, 0
	call	error@PLT
	nop
.L11:
	mov	eax, DWORD PTR -4176[rbp]
	add	eax, 1
	mov	DWORD PTR -4176[rbp], eax
.L10:
	mov	eax, DWORD PTR -4176[rbp]
	cmp	eax, 499
	jle	.L12
	lea	rdi, .LC8[rip]
	call	puts@PLT
	lea	rax, -4048[rbp]
	mov	rdi, rax
	call	pthread_barrier_wait@PLT
	cmp	eax, -1
	sete	al
	movzx	eax, al
	mov	DWORD PTR -4168[rbp], eax
	mov	DWORD PTR -4176[rbp], 499
	jmp	.L13
.L18:
	mov	eax, DWORD PTR -4176[rbp]
	cdqe
	mov	rax, QWORD PTR -4016[rbp+rax*8]
	lea	rdx, -4112[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	pthread_join@PLT
	mov	DWORD PTR -4164[rbp], eax
	cmp	DWORD PTR -4164[rbp], 0
	je	.L14
	mov	DWORD PTR -4120[rbp], 1
	mov	eax, DWORD PTR -4164[rbp]
	mov	DWORD PTR -4116[rbp], eax
	lea	rax, .LC9[rip]
	mov	QWORD PTR -4064[rbp], rax
	mov	rdx, QWORD PTR -4064[rbp]
	mov	ecx, DWORD PTR -4116[rbp]
	mov	eax, DWORD PTR -4120[rbp]
	mov	esi, ecx
	mov	edi, eax
	mov	eax, 0
	call	error@PLT
	nop
.L14:
	mov	rax, QWORD PTR -4112[rbp]
	cmp	eax, -1
	je	.L15
	test	eax, eax
	jne	.L16
	jmp	.L17
.L15:
	add	DWORD PTR -4168[rbp], 1
	jmp	.L17
.L16:
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 103
	lea	rsi, .LC3[rip]
	lea	rdi, .LC10[rip]
	call	__assert_fail@PLT
.L17:
	mov	eax, DWORD PTR -4176[rbp]
	sub	eax, 1
	mov	DWORD PTR -4176[rbp], eax
.L13:
	mov	eax, DWORD PTR -4176[rbp]
	test	eax, eax
	jns	.L18
	mov	edi, 10
	call	putchar@PLT
	cmp	DWORD PTR -4168[rbp], 1
	je	.L19
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 110
	lea	rsi, .LC3[rip]
	lea	rdi, .LC11[rip]
	call	__assert_fail@PLT
.L19:
	add	DWORD PTR -4172[rbp], 1
.L9:
	cmp	DWORD PTR -4172[rbp], 2
	jle	.L20
	mov	eax, 0
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	main, .-main
	.section	.rodata
	.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	"113941.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%d \000"
	.text
	.align	2
	.global	dowait
	.syntax unified
	.arm
	.fpu softvfp
	.type	dowait, %function
dowait:
	@ 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, #-12]
	ldr	r0, [fp, #-12]
	bl	pthread_barrier_wait
	str	r0, [fp, #-8]
	bl	pthread_self
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L3
	bl	printf
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L4:
	.align	2
.L3:
	.word	.LC0
	.size	dowait, .-dowait
	.section	.rodata
	.align	2
.LC1:
	.ascii	"pthread_barrierattr_init\000"
	.align	2
.LC2:
	.ascii	"pthread_barrierattr_getpshared\000"
	.align	2
.LC3:
	.ascii	"the_stack_data/113941.c\000"
	.align	2
.LC4:
	.ascii	"i == PTHREAD_PROCESS_PRIVATE || i == PTHREAD_PROCES"
	.ascii	"S_SHARED\000"
	.align	2
.LC5:
	.ascii	"pthread_barrierattr_setpshared\000"
	.align	2
.LC6:
	.ascii	"pthread_barrier_init\000"
	.align	2
.LC7:
	.ascii	"pthread_create (%d)\000"
	.align	2
.LC8:
	.ascii	"Manager will now call pthread_barrier_wait.\000"
	.align	2
.LC9:
	.ascii	"pthread_join\000"
	.align	2
.LC10:
	.ascii	"!\"Unknown value returned from pthread_barrier_wait"
	.ascii	".\"\000"
	.align	2
.LC11:
	.ascii	"havesyncs == 1\000"
	.align	2
.LC12:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 2128
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #2128
	str	r0, [fp, #-2128]
	str	r1, [fp, #-2132]
	ldr	r3, .L25
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #2016
	sub	r3, r3, #4
	sub	r3, r3, #12
	mov	r0, r3
	bl	pthread_barrierattr_init
	str	r0, [fp, #-2108]
	ldr	r3, [fp, #-2108]
	cmp	r3, #0
	beq	.L6
	mov	r3, #1
	str	r3, [fp, #-2104]
	ldr	r3, [fp, #-2108]
	str	r3, [fp, #-2100]
	ldr	r3, .L25+4
	str	r3, [fp, #-2096]
	ldr	r2, [fp, #-2096]
	ldr	r1, [fp, #-2100]
	ldr	r0, [fp, #-2104]
	bl	error
	nop
.L6:
	sub	r2, fp, #2112
	sub	r2, r2, #4
	sub	r2, r2, #8
	sub	r3, fp, #2016
	sub	r3, r3, #4
	sub	r3, r3, #12
	mov	r1, r2
	mov	r0, r3
	bl	pthread_barrierattr_getpshared
	str	r0, [fp, #-2108]
	ldr	r3, [fp, #-2108]
	cmp	r3, #0
	beq	.L7
	mov	r3, #1
	str	r3, [fp, #-2092]
	ldr	r3, [fp, #-2108]
	str	r3, [fp, #-2088]
	ldr	r3, .L25+8
	str	r3, [fp, #-2084]
	ldr	r2, [fp, #-2084]
	ldr	r1, [fp, #-2088]
	ldr	r0, [fp, #-2092]
	bl	error
	nop
.L7:
	ldr	r3, [fp, #-2124]
	cmp	r3, #0
	beq	.L8
	ldr	r3, [fp, #-2124]
	cmp	r3, #1
	beq	.L8
	ldr	r3, .L25+12
	mov	r2, #60
	ldr	r1, .L25+16
	ldr	r0, .L25+20
	bl	__assert_fail
.L8:
	sub	r3, fp, #2016
	sub	r3, r3, #4
	sub	r3, r3, #12
	mov	r1, #0
	mov	r0, r3
	bl	pthread_barrierattr_setpshared
	str	r0, [fp, #-2108]
	ldr	r3, [fp, #-2108]
	cmp	r3, #0
	beq	.L9
	mov	r3, #1
	str	r3, [fp, #-2080]
	ldr	r3, [fp, #-2108]
	str	r3, [fp, #-2076]
	ldr	r3, .L25+24
	str	r3, [fp, #-2072]
	ldr	r2, [fp, #-2072]
	ldr	r1, [fp, #-2076]
	ldr	r0, [fp, #-2080]
	bl	error
	nop
.L9:
	sub	r1, fp, #2016
	sub	r1, r1, #4
	sub	r1, r1, #12
	sub	r3, fp, #2016
	sub	r3, r3, #4
	sub	r3, r3, #8
	ldr	r2, .L25+28
	mov	r0, r3
	bl	pthread_barrier_init
	str	r0, [fp, #-2108]
	ldr	r3, [fp, #-2108]
	cmp	r3, #0
	beq	.L10
	mov	r3, #1
	str	r3, [fp, #-2068]
	ldr	r3, [fp, #-2108]
	str	r3, [fp, #-2064]
	ldr	r3, .L25+32
	str	r3, [fp, #-2060]
	ldr	r2, [fp, #-2060]
	ldr	r1, [fp, #-2064]
	ldr	r0, [fp, #-2068]
	bl	error
	nop
.L10:
	mov	r3, #0
	str	r3, [fp, #-2116]
	b	.L11
.L22:
	mov	r3, #0
	str	r3, [fp, #-2124]
	b	.L12
.L14:
	ldr	r2, [fp, #-2124]
	sub	r3, fp, #2000
	sub	r3, r3, #4
	sub	r3, r3, #4
	lsl	r2, r2, #2
	add	r0, r3, r2
	sub	r3, fp, #2016
	sub	r3, r3, #4
	sub	r3, r3, #8
	ldr	r2, .L25+36
	mov	r1, #0
	bl	pthread_create
	str	r0, [fp, #-2108]
	ldr	r3, [fp, #-2108]
	cmp	r3, #0
	beq	.L13
	ldr	r2, [fp, #-2124]
	mov	r3, #1
	str	r3, [fp, #-2056]
	ldr	r3, [fp, #-2108]
	str	r3, [fp, #-2052]
	ldr	r3, .L25+40
	str	r3, [fp, #-2048]
	mov	r3, r2
	ldr	r2, [fp, #-2048]
	ldr	r1, [fp, #-2052]
	ldr	r0, [fp, #-2056]
	bl	error
	nop
.L13:
	ldr	r3, [fp, #-2124]
	add	r3, r3, #1
	str	r3, [fp, #-2124]
.L12:
	ldr	r3, [fp, #-2124]
	cmp	r3, #500
	blt	.L14
	ldr	r0, .L25+44
	bl	puts
	sub	r3, fp, #2016
	sub	r3, r3, #4
	sub	r3, r3, #8
	mov	r0, r3
	bl	pthread_barrier_wait
	mov	r3, r0
	cmn	r3, #1
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
	str	r3, [fp, #-2112]
	ldr	r3, .L25+48
	str	r3, [fp, #-2124]
	b	.L15
.L20:
	ldr	r3, [fp, #-2124]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-2004]
	sub	r3, fp, #2112
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r3
	mov	r0, r2
	bl	pthread_join
	str	r0, [fp, #-2108]
	ldr	r3, [fp, #-2108]
	cmp	r3, #0
	beq	.L16
	mov	r3, #1
	str	r3, [fp, #-2044]
	ldr	r3, [fp, #-2108]
	str	r3, [fp, #-2040]
	ldr	r3, .L25+52
	str	r3, [fp, #-2036]
	ldr	r2, [fp, #-2036]
	ldr	r1, [fp, #-2040]
	ldr	r0, [fp, #-2044]
	bl	error
	nop
.L16:
	ldr	r3, [fp, #-2120]
	cmn	r3, #1
	beq	.L17
	cmp	r3, #0
	bne	.L18
	b	.L19
.L17:
	ldr	r3, [fp, #-2112]
	add	r3, r3, #1
	str	r3, [fp, #-2112]
	b	.L19
.L18:
	ldr	r3, .L25+12
	mov	r2, #103
	ldr	r1, .L25+16
	ldr	r0, .L25+56
	bl	__assert_fail
.L19:
	ldr	r3, [fp, #-2124]
	sub	r3, r3, #1
	str	r3, [fp, #-2124]
.L15:
	ldr	r3, [fp, #-2124]
	cmp	r3, #0
	bge	.L20
	mov	r0, #10
	bl	putchar
	ldr	r3, [fp, #-2112]
	cmp	r3, #1
	beq	.L21
	ldr	r3, .L25+12
	mov	r2, #110
	ldr	r1, .L25+16
	ldr	r0, .L25+60
	bl	__assert_fail
.L21:
	ldr	r3, [fp, #-2116]
	add	r3, r3, #1
	str	r3, [fp, #-2116]
.L11:
	ldr	r3, [fp, #-2116]
	cmp	r3, #2
	ble	.L22
	mov	r3, #0
	ldr	r2, .L25
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L24
	bl	__stack_chk_fail
.L24:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L26:
	.align	2
.L25:
	.word	.LC12
	.word	.LC1
	.word	.LC2
	.word	__PRETTY_FUNCTION__.5521
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	501
	.word	.LC6
	.word	dowait
	.word	.LC7
	.word	.LC8
	.word	499
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.size	main, .-main
	.section	.rodata
	.align	2
	.type	__PRETTY_FUNCTION__.5521, %object
	.size	__PRETTY_FUNCTION__.5521, 5
__PRETTY_FUNCTION__.5521:
	.ascii	"main\000"
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
