	.file	"494229.c"
	.intel_syntax noprefix
	.text
	.globl	t
	.bss
	.align 32
	.type	t, @object
	.size	t, 32
t:
	.zero	32
	.globl	cnt
	.align 4
	.type	cnt, @object
	.size	cnt, 4
cnt:
	.zero	4
	.globl	loop
	.align 4
	.type	loop, @object
	.size	loop, 4
loop:
	.zero	4
	.globl	m
	.align 32
	.type	m, @object
	.size	m, 40
m:
	.zero	40
	.text
	.globl	thread_code
	.type	thread_code, @function
thread_code:
.LFB0:
	.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, m[rip]
	call	pthread_mutex_lock@PLT
	mov	eax, DWORD PTR cnt[rip]
	add	eax, 1
	mov	DWORD PTR cnt[rip], eax
	lea	rdi, m[rip]
	call	pthread_mutex_unlock@PLT
	call	sched_yield@PLT
.L2:
	mov	eax, DWORD PTR loop[rip]
	test	eax, eax
	jne	.L3
	mov	edi, 0
	call	pthread_exit@PLT
	.cfi_endproc
.LFE0:
	.size	thread_code, .-thread_code
	.section	.rodata
.LC0:
	.string	"total runs: %i\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.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	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR loop[rip], 1
	mov	DWORD PTR -4[rbp], 0
	jmp	.L5
.L6:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	mov	rdx, rax
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rcx, 0[0+rax*8]
	lea	rax, t[rip]
	add	rax, rcx
	mov	rcx, rdx
	lea	rdx, thread_code[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	add	DWORD PTR -4[rbp], 1
.L5:
	cmp	DWORD PTR -4[rbp], 3
	jle	.L6
	mov	DWORD PTR -4[rbp], 0
	jmp	.L7
.L8:
	mov	edi, 1
	call	sleep@PLT
	add	DWORD PTR -4[rbp], 1
.L7:
	cmp	DWORD PTR -4[rbp], 4
	jle	.L8
	mov	DWORD PTR loop[rip], 0
	mov	DWORD PTR -4[rbp], 0
	jmp	.L9
.L10:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, t[rip]
	mov	rax, QWORD PTR [rdx+rax]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_join@PLT
	add	DWORD PTR -4[rbp], 1
.L9:
	cmp	DWORD PTR -4[rbp], 3
	jle	.L10
	mov	eax, DWORD PTR cnt[rip]
	movsx	rdx, eax
	imul	rdx, rdx, 1717986919
	shr	rdx, 32
	sar	edx
	sar	eax, 31
	mov	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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	"494229.c"
	.text
	.comm	t,16,4
	.comm	cnt,4,4
	.comm	loop,4,4
	.global	m
	.bss
	.align	2
	.type	m, %object
	.size	m, 24
m:
	.space	24
	.text
	.align	2
	.global	thread_code
	.syntax unified
	.arm
	.fpu softvfp
	.type	thread_code, %function
thread_code:
	@ 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	pthread_mutex_lock
	ldr	r3, .L4+4
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L4+4
	str	r3, [r2]
	ldr	r0, .L4
	bl	pthread_mutex_unlock
	bl	sched_yield
.L2:
	ldr	r3, .L4+8
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L3
	mov	r0, #0
	bl	pthread_exit
.L5:
	.align	2
.L4:
	.word	m
	.word	cnt
	.word	loop
	.size	thread_code, .-thread_code
	.section	.rodata
	.align	2
.LC0:
	.ascii	"total runs: %i\012\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ 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]
	str	r1, [fp, #-20]
	ldr	r3, .L14
	mov	r2, #1
	str	r2, [r3]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L7
.L8:
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, .L14+4
	add	r0, r3, r2
	ldr	r3, [fp, #-8]
	ldr	r2, .L14+8
	mov	r1, #0
	bl	pthread_create
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L7:
	ldr	r3, [fp, #-8]
	cmp	r3, #3
	ble	.L8
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L9
.L10:
	mov	r0, #1
	bl	sleep
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L9:
	ldr	r3, [fp, #-8]
	cmp	r3, #4
	ble	.L10
	ldr	r3, .L14
	mov	r2, #0
	str	r2, [r3]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L11
.L12:
	ldr	r2, .L14+4
	ldr	r3, [fp, #-8]
	ldr	r3, [r2, r3, lsl #2]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L11:
	ldr	r3, [fp, #-8]
	cmp	r3, #3
	ble	.L12
	ldr	r3, .L14+12
	ldr	r3, [r3]
	ldr	r2, .L14+16
	smull	r1, r2, r3, r2
	asr	r2, r2, #1
	asr	r3, r3, #31
	sub	r3, r2, r3
	mov	r1, r3
	ldr	r0, .L14+20
	bl	printf
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L15:
	.align	2
.L14:
	.word	loop
	.word	t
	.word	thread_code
	.word	cnt
	.word	1717986919
	.word	.LC0
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
