	.file	"680.c"
	.intel_syntax noprefix
	.text
	.globl	v
	.bss
	.align 8
	.type	v, @object
	.size	v, 12
v:
	.zero	12
	.globl	mtx
	.align 32
	.type	mtx, @object
	.size	mtx, 40
mtx:
	.zero	40
	.section	.rodata
.LC0:
	.string	"Thread %lld generated %d\n"
.LC1:
	.string	"So the values are: %d %d %d\n"
	.text
	.globl	incVars
	.type	incVars, @function
incVars:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -8[rbp], 0
	jmp	.L2
.L6:
	call	rand@PLT
	mov	DWORD PTR -4[rbp], eax
	lea	rdi, mtx[rip]
	call	pthread_mutex_lock@PLT
	call	pthread_self@PLT
	mov	rcx, rax
	mov	eax, DWORD PTR -4[rbp]
	mov	edx, eax
	mov	rsi, rcx
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	imul	rdx, rdx, 1717986919
	shr	rdx, 32
	sar	edx
	mov	ecx, eax
	sar	ecx, 31
	sub	edx, ecx
	mov	ecx, edx
	sal	ecx, 2
	add	ecx, edx
	sub	eax, ecx
	mov	edx, eax
	mov	ecx, DWORD PTR -4[rbp]
	movsx	rax, ecx
	imul	rax, rax, 1431655766
	shr	rax, 32
	mov	esi, ecx
	sar	esi, 31
	sub	eax, esi
	mov	esi, eax
	add	esi, esi
	add	esi, eax
	mov	eax, ecx
	sub	eax, esi
	mov	ecx, DWORD PTR -4[rbp]
	mov	esi, ecx
	sar	esi, 31
	shr	esi, 31
	add	ecx, esi
	and	ecx, 1
	sub	ecx, esi
	mov	esi, ecx
	mov	ecx, edx
	mov	edx, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, mtx[rip]
	call	pthread_mutex_unlock@PLT
	mov	eax, DWORD PTR -4[rbp]
	and	eax, 1
	test	eax, eax
	jne	.L3
	lea	rdi, mtx[rip]
	call	pthread_mutex_lock@PLT
	mov	eax, DWORD PTR v[rip]
	add	eax, 1
	mov	DWORD PTR v[rip], eax
	lea	rdi, mtx[rip]
	call	pthread_mutex_unlock@PLT
.L3:
	mov	edx, DWORD PTR -4[rbp]
	movsx	rax, edx
	imul	rax, rax, 1431655766
	shr	rax, 32
	mov	ecx, edx
	sar	ecx, 31
	sub	eax, ecx
	mov	ecx, eax
	add	ecx, ecx
	add	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	test	eax, eax
	jne	.L4
	lea	rdi, mtx[rip]
	call	pthread_mutex_lock@PLT
	mov	eax, DWORD PTR v[rip+4]
	add	eax, 1
	mov	DWORD PTR v[rip+4], eax
	lea	rdi, mtx[rip]
	call	pthread_mutex_unlock@PLT
.L4:
	mov	edx, DWORD PTR -4[rbp]
	movsx	rax, edx
	imul	rax, rax, 1717986919
	shr	rax, 32
	sar	eax
	mov	ecx, edx
	sar	ecx, 31
	sub	eax, ecx
	mov	ecx, eax
	sal	ecx, 2
	add	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	test	eax, eax
	jne	.L5
	lea	rdi, mtx[rip]
	call	pthread_mutex_lock@PLT
	mov	eax, DWORD PTR v[rip+8]
	add	eax, 1
	mov	DWORD PTR v[rip+8], eax
	lea	rdi, mtx[rip]
	call	pthread_mutex_unlock@PLT
.L5:
	add	DWORD PTR -8[rbp], 1
.L2:
	cmp	DWORD PTR -8[rbp], 4
	jle	.L6
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	incVars, .-incVars
	.section	.rodata
.LC2:
	.string	"%d "
	.text
	.globl	main
	.type	main, @function
main:
.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, 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	edi, 0
	call	time@PLT
	mov	edi, eax
	call	srand@PLT
	mov	esi, 0
	lea	rdi, mtx[rip]
	call	pthread_mutex_init@PLT
	mov	DWORD PTR -52[rbp], 0
	jmp	.L9
.L10:
	lea	rdx, -48[rbp]
	mov	eax, DWORD PTR -52[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	ecx, 0
	lea	rdx, incVars[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	add	DWORD PTR -52[rbp], 1
.L9:
	cmp	DWORD PTR -52[rbp], 3
	jle	.L10
	mov	DWORD PTR -52[rbp], 0
	jmp	.L11
.L12:
	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
.L11:
	cmp	DWORD PTR -52[rbp], 3
	jle	.L12
	mov	DWORD PTR -52[rbp], 0
	jmp	.L13
.L14:
	mov	eax, DWORD PTR -52[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, v[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -52[rbp], 1
.L13:
	cmp	DWORD PTR -52[rbp], 2
	jle	.L14
	mov	edi, 10
	call	putchar@PLT
	lea	rdi, mtx[rip]
	call	pthread_mutex_destroy@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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	"680.c"
	.text
	.comm	v,12,4
	.comm	mtx,24,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Thread %lld generated %d\012\000"
	.align	2
.LC1:
	.ascii	"So the values are: %d %d %d\012\000"
	.text
	.align	2
	.global	incVars
	.syntax unified
	.arm
	.fpu softvfp
	.type	incVars, %function
incVars:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L2
.L6:
	bl	rand
	str	r0, [fp, #-8]
	ldr	r0, .L8
	bl	pthread_mutex_lock
	bl	pthread_self
	mov	r3, r0
	mov	r2, r3
	mov	r3, #0
	ldr	r1, [fp, #-8]
	str	r1, [sp]
	ldr	r0, .L8+4
	bl	printf
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	and	r3, r3, #1
	rsblt	r3, r3, #0
	mov	ip, r3
	ldr	r2, [fp, #-8]
	ldr	r3, .L8+8
	smull	r0, r1, r3, r2
	asr	r3, r2, #31
	sub	r1, r1, r3
	mov	r3, r1
	lsl	r3, r3, #1
	add	r3, r3, r1
	sub	r1, r2, r3
	ldr	r2, [fp, #-8]
	ldr	r3, .L8+12
	smull	r0, r3, r2, r3
	asr	r0, r3, #1
	asr	r3, r2, #31
	sub	r0, r0, r3
	mov	r3, r0
	lsl	r3, r3, #2
	add	r3, r3, r0
	sub	r0, r2, r3
	mov	r3, r0
	mov	r2, r1
	mov	r1, ip
	ldr	r0, .L8+16
	bl	printf
	ldr	r0, .L8
	bl	pthread_mutex_unlock
	ldr	r3, [fp, #-8]
	and	r3, r3, #1
	cmp	r3, #0
	bne	.L3
	ldr	r0, .L8
	bl	pthread_mutex_lock
	ldr	r3, .L8+20
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L8+20
	str	r3, [r2]
	ldr	r0, .L8
	bl	pthread_mutex_unlock
.L3:
	ldr	r1, [fp, #-8]
	ldr	r3, .L8+8
	smull	r0, r2, r3, r1
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	sub	r2, r1, r3
	cmp	r2, #0
	bne	.L4
	ldr	r0, .L8
	bl	pthread_mutex_lock
	ldr	r3, .L8+20
	ldr	r3, [r3, #4]
	add	r3, r3, #1
	ldr	r2, .L8+20
	str	r3, [r2, #4]
	ldr	r0, .L8
	bl	pthread_mutex_unlock
.L4:
	ldr	r1, [fp, #-8]
	ldr	r3, .L8+12
	smull	r2, r3, r1, r3
	asr	r2, r3, #1
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	sub	r2, r1, r3
	cmp	r2, #0
	bne	.L5
	ldr	r0, .L8
	bl	pthread_mutex_lock
	ldr	r3, .L8+20
	ldr	r3, [r3, #8]
	add	r3, r3, #1
	ldr	r2, .L8+20
	str	r3, [r2, #8]
	ldr	r0, .L8
	bl	pthread_mutex_unlock
.L5:
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L2:
	ldr	r3, [fp, #-12]
	cmp	r3, #4
	ble	.L6
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L9:
	.align	2
.L8:
	.word	mtx
	.word	.LC0
	.word	1431655766
	.word	1717986919
	.word	.LC1
	.word	v
	.size	incVars, .-incVars
	.section	.rodata
	.align	2
.LC2:
	.ascii	"%d \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 = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	ldr	r3, .L19
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r0, #0
	bl	time
	mov	r3, r0
	mov	r0, r3
	bl	srand
	mov	r1, #0
	ldr	r0, .L19+4
	bl	pthread_mutex_init
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L11
.L12:
	sub	r2, fp, #24
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	add	r0, r2, r3
	mov	r3, #0
	ldr	r2, .L19+8
	mov	r1, #0
	bl	pthread_create
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L11:
	ldr	r3, [fp, #-28]
	cmp	r3, #3
	ble	.L12
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L13
.L14:
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-20]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L13:
	ldr	r3, [fp, #-28]
	cmp	r3, #3
	ble	.L14
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L15
.L16:
	ldr	r2, .L19+12
	ldr	r3, [fp, #-28]
	ldr	r3, [r2, r3, lsl #2]
	mov	r1, r3
	ldr	r0, .L19+16
	bl	printf
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L15:
	ldr	r3, [fp, #-28]
	cmp	r3, #2
	ble	.L16
	mov	r0, #10
	bl	putchar
	ldr	r0, .L19+4
	bl	pthread_mutex_destroy
	mov	r3, #0
	ldr	r2, .L19
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L18
	bl	__stack_chk_fail
.L18:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L20:
	.align	2
.L19:
	.word	.LC3
	.word	mtx
	.word	incVars
	.word	v
	.word	.LC2
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
