	.file	"26701254.c"
	.intel_syntax noprefix
	.text
	.local	bkpt_resumed_count
	.comm	bkpt_resumed_count,4,4
	.local	thread_count
	.comm	thread_count,4,4
	.globl	bkpt
	.type	bkpt, @function
bkpt:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	bkpt, .-bkpt
	.globl	foo
	.type	foo, @function
foo:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	lock add	DWORD PTR thread_count[rip], 1
	call	bkpt
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	foo, .-foo
	.globl	threaded
	.type	threaded, @function
threaded:
.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, 8
	mov	QWORD PTR -8[rbp], rdi
	call	foo
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	threaded, .-threaded
	.section	.rodata
.LC0:
	.string	"the_stack_data/26701254.c"
	.align 8
.LC1:
	.string	"pthread_create(&threadid[i], NULL, threaded, NULL) == 0"
.LC2:
	.string	"%d %d\n"
	.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, 80
	mov	DWORD PTR -68[rbp], edi
	mov	QWORD PTR -80[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -60[rbp], 0
	jmp	.L6
.L12:
	mov	DWORD PTR -56[rbp], 0
	jmp	.L7
.L9:
	lea	rdx, -48[rbp]
	mov	eax, DWORD PTR -56[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	ecx, 0
	lea	rdx, threaded[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	test	eax, eax
	je	.L8
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 48
	lea	rsi, .LC0[rip]
	lea	rdi, .LC1[rip]
	call	__assert_fail@PLT
.L8:
	add	DWORD PTR -56[rbp], 1
.L7:
	cmp	DWORD PTR -56[rbp], 3
	jle	.L9
	mov	DWORD PTR -52[rbp], 0
	jmp	.L10
.L11:
	mov	eax, DWORD PTR -52[rbp]
	cdqe
	mov	rax, QWORD PTR -48[rbp+rax*8]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_join@PLT
	add	DWORD PTR -52[rbp], 1
.L10:
	cmp	DWORD PTR -52[rbp], 3
	jle	.L11
	add	DWORD PTR -60[rbp], 1
.L6:
	cmp	DWORD PTR -60[rbp], 1
	jle	.L12
	mov	edx, DWORD PTR bkpt_resumed_count[rip]
	mov	eax, DWORD PTR thread_count[rip]
	mov	DWORD PTR -64[rbp], eax
	mov	eax, DWORD PTR -64[rbp]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.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	"26701254.c"
	.text
	.local	bkpt_resumed_count
	.comm	bkpt_resumed_count,4,4
	.local	thread_count
	.comm	thread_count,4,4
	.align	2
	.global	bkpt
	.syntax unified
	.arm
	.fpu softvfp
	.type	bkpt, %function
bkpt:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	bkpt, .-bkpt
	.global	__sync_fetch_and_add_4
	.align	2
	.global	foo
	.syntax unified
	.arm
	.fpu softvfp
	.type	foo, %function
foo:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L3
	mov	r1, #1
	mov	r0, r3
	bl	__sync_fetch_and_add_4
	bl	bkpt
	nop
	pop	{fp, pc}
.L4:
	.align	2
.L3:
	.word	thread_count
	.size	foo, .-foo
	.align	2
	.global	threaded
	.syntax unified
	.arm
	.fpu softvfp
	.type	threaded, %function
threaded:
	@ 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]
	bl	foo
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	threaded, .-threaded
	.section	.rodata
	.align	2
.LC0:
	.ascii	"the_stack_data/26701254.c\000"
	.align	2
.LC1:
	.ascii	"pthread_create(&threadid[i], NULL, threaded, NULL) "
	.ascii	"== 0\000"
	.global	__sync_synchronize
	.align	2
.LC2:
	.ascii	"%d %d\012\000"
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #52
	str	r0, [fp, #-56]
	str	r1, [fp, #-60]
	ldr	r3, .L17
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-44]
	b	.L8
.L14:
	mov	r3, #0
	str	r3, [fp, #-40]
	b	.L9
.L11:
	sub	r2, fp, #32
	ldr	r3, [fp, #-40]
	lsl	r3, r3, #2
	add	r0, r2, r3
	mov	r3, #0
	ldr	r2, .L17+4
	mov	r1, #0
	bl	pthread_create
	mov	r3, r0
	cmp	r3, #0
	beq	.L10
	ldr	r3, .L17+8
	mov	r2, #48
	ldr	r1, .L17+12
	ldr	r0, .L17+16
	bl	__assert_fail
.L10:
	ldr	r3, [fp, #-40]
	add	r3, r3, #1
	str	r3, [fp, #-40]
.L9:
	ldr	r3, [fp, #-40]
	cmp	r3, #3
	ble	.L11
	mov	r3, #0
	str	r3, [fp, #-36]
	b	.L12
.L13:
	ldr	r3, [fp, #-36]
	lsl	r3, r3, #2
	sub	r2, fp, #12
	add	r3, r2, r3
	ldr	r3, [r3, #-20]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	ldr	r3, [fp, #-36]
	add	r3, r3, #1
	str	r3, [fp, #-36]
.L12:
	ldr	r3, [fp, #-36]
	cmp	r3, #3
	ble	.L13
	ldr	r3, [fp, #-44]
	add	r3, r3, #1
	str	r3, [fp, #-44]
.L8:
	ldr	r3, [fp, #-44]
	cmp	r3, #1
	ble	.L14
	ldr	r4, .L17+20
	bl	__sync_synchronize
	ldr	r4, [r4]
	bl	__sync_synchronize
	str	r4, [fp, #-48]
	ldr	r3, [fp, #-48]
	ldr	r2, .L17+24
	ldr	r2, [r2]
	mov	r1, r3
	ldr	r0, .L17+28
	bl	printf
	mov	r3, #0
	ldr	r2, .L17
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L16
	bl	__stack_chk_fail
.L16:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L18:
	.align	2
.L17:
	.word	.LC3
	.word	threaded
	.word	__PRETTY_FUNCTION__.6538
	.word	.LC0
	.word	.LC1
	.word	thread_count
	.word	bkpt_resumed_count
	.word	.LC2
	.size	main, .-main
	.section	.rodata
	.align	2
	.type	__PRETTY_FUNCTION__.6538, %object
	.size	__PRETTY_FUNCTION__.6538, 5
__PRETTY_FUNCTION__.6538:
	.ascii	"main\000"
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
