	.file	"6387882.c"
	.intel_syntax noprefix
	.text
	.local	verbose
	.comm	verbose,4,4
	.section	.rodata
.LC0:
	.string	"common_routine (%d)\n"
	.text
	.type	common_routine, @function
common_routine:
.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	DWORD PTR -4[rbp], edi
	mov	eax, DWORD PTR verbose[rip]
	test	eax, eax
	je	.L2
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
.L2:
	mov	eax, DWORD PTR hits.4[rip]
	add	eax, 1
	mov	DWORD PTR hits.4[rip], eax
	cmp	DWORD PTR -4[rbp], 2
	je	.L3
	cmp	DWORD PTR -4[rbp], 2
	jg	.L4
	cmp	DWORD PTR -4[rbp], 0
	je	.L5
	cmp	DWORD PTR -4[rbp], 1
	je	.L6
	jmp	.L4
.L5:
	mov	eax, DWORD PTR from_main.3[rip]
	add	eax, 1
	mov	DWORD PTR from_main.3[rip], eax
	jmp	.L4
.L6:
	mov	eax, DWORD PTR from_thread1.2[rip]
	add	eax, 1
	mov	DWORD PTR from_thread1.2[rip], eax
	jmp	.L4
.L3:
	mov	eax, DWORD PTR from_thread2.1[rip]
	add	eax, 1
	mov	DWORD PTR from_thread2.1[rip], eax
	nop
.L4:
	mov	eax, DWORD PTR from_main.3[rip]
	test	eax, eax
	je	.L8
	mov	eax, DWORD PTR from_thread1.2[rip]
	test	eax, eax
	je	.L8
	mov	eax, DWORD PTR from_thread2.1[rip]
	test	eax, eax
	je	.L8
	mov	DWORD PTR full_coverage.0[rip], 1
.L8:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	common_routine, .-common_routine
	.section	.rodata
.LC1:
	.string	"thread1 (%0lx) ; pid = %d\n"
.LC2:
	.string	"thread1 %ld\n"
	.text
	.type	thread1, @function
thread1:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -4[rbp], 0
	mov	eax, DWORD PTR verbose[rip]
	test	eax, eax
	je	.L10
	call	getpid@PLT
	mov	edx, eax
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
.L10:
	mov	DWORD PTR -8[rbp], 1
	jmp	.L11
.L13:
	mov	eax, DWORD PTR verbose[rip]
	test	eax, eax
	je	.L12
	call	pthread_self@PLT
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
.L12:
	mov	eax, DWORD PTR -8[rbp]
	add	DWORD PTR -4[rbp], eax
	mov	edi, 1
	mov	eax, 0
	call	common_routine
	mov	edi, 1
	call	sleep@PLT
	add	DWORD PTR -8[rbp], 1
.L11:
	cmp	DWORD PTR -8[rbp], 10000000
	jle	.L13
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	thread1, .-thread1
	.section	.rodata
.LC3:
	.string	"thread2 (%0lx) ; pid = %d\n"
.LC4:
	.string	"thread2 %ld\n"
	.text
	.type	thread2, @function
thread2:
.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	DWORD PTR -4[rbp], 0
	mov	eax, DWORD PTR verbose[rip]
	test	eax, eax
	je	.L16
	call	getpid@PLT
	mov	edx, eax
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
.L16:
	mov	DWORD PTR -8[rbp], 1
	jmp	.L17
.L19:
	mov	eax, DWORD PTR verbose[rip]
	test	eax, eax
	je	.L18
	call	pthread_self@PLT
	mov	rsi, rax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
.L18:
	mov	eax, DWORD PTR -8[rbp]
	add	DWORD PTR -4[rbp], eax
	mov	edi, 2
	mov	eax, 0
	call	common_routine
	mov	edi, 1
	call	sleep@PLT
	add	DWORD PTR -8[rbp], 1
.L17:
	cmp	DWORD PTR -8[rbp], 10000000
	jle	.L19
	mov	edi, 100
	call	sleep@PLT
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	thread2, .-thread2
	.section	.rodata
.LC5:
	.string	"a=%d\n"
	.text
	.globl	foo
	.type	foo, @function
foo:
.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, 16
	mov	DWORD PTR -4[rbp], edi
	mov	DWORD PTR -8[rbp], esi
	mov	DWORD PTR -12[rbp], edx
	mov	eax, DWORD PTR verbose[rip]
	test	eax, eax
	je	.L23
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
.L23:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	foo, .-foo
	.section	.rodata
.LC6:
	.string	"pid = %d\n"
.LC7:
	.string	"pthread_attr_init 1"
.LC8:
	.string	"pthread_attr_setscope 1"
.LC9:
	.string	"pthread_create 1"
.LC10:
	.string	"Made thread %ld\n"
.LC11:
	.string	"pthread_create 2"
.LC12:
	.string	"top %ld\n"
	.text
	.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, 112
	mov	DWORD PTR -100[rbp], edi
	mov	QWORD PTR -112[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -84[rbp], 0
	mov	eax, DWORD PTR verbose[rip]
	test	eax, eax
	je	.L25
	call	getpid@PLT
	mov	esi, eax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
.L25:
	mov	edx, 3
	mov	esi, 2
	mov	edi, 1
	mov	eax, 0
	call	foo
	lea	rax, -64[rbp]
	mov	rdi, rax
	call	pthread_attr_init@PLT
	test	eax, eax
	je	.L26
	lea	rdi, .LC7[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L26:
	lea	rax, -64[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_attr_setscope@PLT
	test	eax, eax
	je	.L27
	lea	rdi, .LC8[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L27:
	lea	rsi, -64[rbp]
	lea	rax, -80[rbp]
	mov	ecx, 4277009102
	lea	rdx, thread1[rip]
	mov	rdi, rax
	call	pthread_create@PLT
	test	eax, eax
	je	.L28
	lea	rdi, .LC9[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L28:
	mov	eax, DWORD PTR verbose[rip]
	test	eax, eax
	je	.L29
	mov	rax, QWORD PTR -80[rbp]
	mov	rsi, rax
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	printf@PLT
.L29:
	mov	edi, 1
	call	sleep@PLT
	lea	rax, -72[rbp]
	mov	ecx, 3735928559
	lea	rdx, thread2[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	test	eax, eax
	je	.L30
	lea	rdi, .LC11[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L30:
	mov	eax, DWORD PTR verbose[rip]
	test	eax, eax
	je	.L31
	mov	rax, QWORD PTR -72[rbp]
	mov	rsi, rax
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	printf@PLT
.L31:
	mov	edi, 1
	call	sleep@PLT
	mov	DWORD PTR -88[rbp], 1
	jmp	.L32
.L34:
	mov	eax, DWORD PTR verbose[rip]
	test	eax, eax
	je	.L33
	call	pthread_self@PLT
	mov	rsi, rax
	lea	rdi, .LC12[rip]
	mov	eax, 0
	call	printf@PLT
.L33:
	mov	edi, 0
	mov	eax, 0
	call	common_routine
	mov	edi, 1
	call	sleep@PLT
	mov	eax, DWORD PTR -88[rbp]
	add	DWORD PTR -84[rbp], eax
	add	DWORD PTR -88[rbp], 1
.L32:
	cmp	DWORD PTR -88[rbp], 10000000
	jle	.L34
	mov	edi, 0
	call	exit@PLT
	.cfi_endproc
.LFE10:
	.size	main, .-main
	.local	hits.4
	.comm	hits.4,4,4
	.local	from_main.3
	.comm	from_main.3,4,4
	.local	from_thread1.2
	.comm	from_thread1.2,4,4
	.local	from_thread2.1
	.comm	from_thread2.1,4,4
	.local	full_coverage.0
	.comm	full_coverage.0,4,4
	.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	"6387882.c"
	.text
	.local	verbose
	.comm	verbose,4,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"common_routine (%d)\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	common_routine, %function
common_routine:
	@ 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]
	ldr	r3, .L9
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L2
	ldr	r1, [fp, #-8]
	ldr	r0, .L9+4
	bl	printf
.L2:
	ldr	r3, .L9+8
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L9+8
	str	r3, [r2]
	ldr	r3, [fp, #-8]
	cmp	r3, #2
	beq	.L3
	ldr	r3, [fp, #-8]
	cmp	r3, #2
	bgt	.L4
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L5
	ldr	r3, [fp, #-8]
	cmp	r3, #1
	beq	.L6
	b	.L4
.L5:
	ldr	r3, .L9+12
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L9+12
	str	r3, [r2]
	b	.L4
.L6:
	ldr	r3, .L9+16
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L9+16
	str	r3, [r2]
	b	.L4
.L3:
	ldr	r3, .L9+20
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L9+20
	str	r3, [r2]
	nop
.L4:
	ldr	r3, .L9+12
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L8
	ldr	r3, .L9+16
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L8
	ldr	r3, .L9+20
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L8
	ldr	r3, .L9+24
	mov	r2, #1
	str	r2, [r3]
.L8:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L10:
	.align	2
.L9:
	.word	verbose
	.word	.LC0
	.word	hits.6230
	.word	from_main.6229
	.word	from_thread1.6227
	.word	from_thread2.6228
	.word	full_coverage.6231
	.size	common_routine, .-common_routine
	.section	.rodata
	.align	2
.LC1:
	.ascii	"thread1 (%0lx) ; pid = %d\012\000"
	.align	2
.LC2:
	.ascii	"thread1 %ld\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	thread1, %function
thread1:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #20
	str	r0, [fp, #-24]
	mov	r3, #0
	str	r3, [fp, #-16]
	ldr	r3, .L17
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L12
	ldr	r4, [fp, #-24]
	bl	getpid
	mov	r3, r0
	mov	r2, r3
	mov	r1, r4
	ldr	r0, .L17+4
	bl	printf
.L12:
	mov	r3, #1
	str	r3, [fp, #-20]
	b	.L13
.L15:
	ldr	r3, .L17
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L14
	bl	pthread_self
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L17+8
	bl	printf
.L14:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-20]
	add	r3, r2, r3
	str	r3, [fp, #-16]
	mov	r0, #1
	bl	common_routine
	mov	r0, #1
	bl	sleep
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L13:
	ldr	r3, [fp, #-20]
	ldr	r2, .L17+12
	cmp	r3, r2
	ble	.L15
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L18:
	.align	2
.L17:
	.word	verbose
	.word	.LC1
	.word	.LC2
	.word	10000000
	.size	thread1, .-thread1
	.section	.rodata
	.align	2
.LC3:
	.ascii	"thread2 (%0lx) ; pid = %d\012\000"
	.align	2
.LC4:
	.ascii	"thread2 %ld\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	thread2, %function
thread2:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #20
	str	r0, [fp, #-24]
	mov	r3, #0
	str	r3, [fp, #-16]
	ldr	r3, .L25
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L20
	ldr	r4, [fp, #-24]
	bl	getpid
	mov	r3, r0
	mov	r2, r3
	mov	r1, r4
	ldr	r0, .L25+4
	bl	printf
.L20:
	mov	r3, #1
	str	r3, [fp, #-20]
	b	.L21
.L23:
	ldr	r3, .L25
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L22
	bl	pthread_self
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L25+8
	bl	printf
.L22:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-20]
	add	r3, r2, r3
	str	r3, [fp, #-16]
	mov	r0, #2
	bl	common_routine
	mov	r0, #1
	bl	sleep
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L21:
	ldr	r3, [fp, #-20]
	ldr	r2, .L25+12
	cmp	r3, r2
	ble	.L23
	mov	r0, #100
	bl	sleep
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L26:
	.align	2
.L25:
	.word	verbose
	.word	.LC3
	.word	.LC4
	.word	10000000
	.size	thread2, .-thread2
	.section	.rodata
	.align	2
.LC5:
	.ascii	"a=%d\012\000"
	.text
	.align	2
	.global	foo
	.syntax unified
	.arm
	.fpu softvfp
	.type	foo, %function
foo:
	@ 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, #-8]
	str	r1, [fp, #-12]
	str	r2, [fp, #-16]
	ldr	r3, .L30
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L29
	ldr	r1, [fp, #-8]
	ldr	r0, .L30+4
	bl	printf
.L29:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L31:
	.align	2
.L30:
	.word	verbose
	.word	.LC5
	.size	foo, .-foo
	.section	.rodata
	.align	2
.LC6:
	.ascii	"pid = %d\012\000"
	.align	2
.LC7:
	.ascii	"pthread_attr_init 1\000"
	.align	2
.LC8:
	.ascii	"pthread_attr_setscope 1\000"
	.align	2
.LC9:
	.ascii	"pthread_create 1\000"
	.align	2
.LC10:
	.ascii	"Made thread %ld\012\000"
	.align	2
.LC11:
	.ascii	"pthread_create 2\000"
	.align	2
.LC12:
	.ascii	"top %ld\012\000"
	.align	2
.LC13:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 64
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #64
	str	r0, [fp, #-64]
	str	r1, [fp, #-68]
	ldr	r3, .L44
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-48]
	ldr	r3, .L44+4
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L33
	bl	getpid
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L44+8
	bl	printf
.L33:
	mov	r2, #3
	mov	r1, #2
	mov	r0, #1
	bl	foo
	sub	r3, fp, #44
	mov	r0, r3
	bl	pthread_attr_init
	mov	r3, r0
	cmp	r3, #0
	beq	.L34
	ldr	r0, .L44+12
	bl	perror
	mov	r0, #1
	bl	exit
.L34:
	sub	r3, fp, #44
	mov	r1, #0
	mov	r0, r3
	bl	pthread_attr_setscope
	mov	r3, r0
	cmp	r3, #0
	beq	.L35
	ldr	r0, .L44+16
	bl	perror
	mov	r0, #1
	bl	exit
.L35:
	sub	r1, fp, #44
	sub	r0, fp, #60
	ldr	r3, .L44+20
	ldr	r2, .L44+24
	bl	pthread_create
	mov	r3, r0
	cmp	r3, #0
	beq	.L36
	ldr	r0, .L44+28
	bl	perror
	mov	r0, #1
	bl	exit
.L36:
	ldr	r3, .L44+4
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L37
	ldr	r3, [fp, #-60]
	mov	r1, r3
	ldr	r0, .L44+32
	bl	printf
.L37:
	mov	r0, #1
	bl	sleep
	sub	r0, fp, #56
	ldr	r3, .L44+36
	ldr	r2, .L44+40
	mov	r1, #0
	bl	pthread_create
	mov	r3, r0
	cmp	r3, #0
	beq	.L38
	ldr	r0, .L44+44
	bl	perror
	mov	r0, #1
	bl	exit
.L38:
	ldr	r3, .L44+4
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L39
	ldr	r3, [fp, #-56]
	mov	r1, r3
	ldr	r0, .L44+32
	bl	printf
.L39:
	mov	r0, #1
	bl	sleep
	mov	r3, #1
	str	r3, [fp, #-52]
	b	.L40
.L42:
	ldr	r3, .L44+4
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L41
	bl	pthread_self
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L44+48
	bl	printf
.L41:
	mov	r0, #0
	bl	common_routine
	mov	r0, #1
	bl	sleep
	ldr	r2, [fp, #-48]
	ldr	r3, [fp, #-52]
	add	r3, r2, r3
	str	r3, [fp, #-48]
	ldr	r3, [fp, #-52]
	add	r3, r3, #1
	str	r3, [fp, #-52]
.L40:
	ldr	r3, [fp, #-52]
	ldr	r2, .L44+52
	cmp	r3, r2
	ble	.L42
	mov	r0, #0
	bl	exit
.L45:
	.align	2
.L44:
	.word	.LC13
	.word	verbose
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	-17958194
	.word	thread1
	.word	.LC9
	.word	.LC10
	.word	-559038737
	.word	thread2
	.word	.LC11
	.word	.LC12
	.word	10000000
	.size	main, .-main
	.local	hits.6230
	.comm	hits.6230,4,4
	.local	from_main.6229
	.comm	from_main.6229,4,4
	.local	from_thread1.6227
	.comm	from_thread1.6227,4,4
	.local	from_thread2.6228
	.comm	from_thread2.6228,4,4
	.local	full_coverage.6231
	.comm	full_coverage.6231,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
