	.file	"82951379.c"
	.intel_syntax noprefix
	.text
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 40
a:
	.zero	40
	.globl	b
	.align 32
	.type	b, @object
	.size	b, 40
b:
	.zero	40
	.globl	c
	.align 32
	.type	c, @object
	.size	c, 40
c:
	.zero	40
	.globl	d
	.align 32
	.type	d, @object
	.size	d, 40
d:
	.zero	40
	.section	.rodata
	.align 8
.LC0:
	.string	"ab starting writing to files a & b"
	.align 8
.LC1:
	.string	"ab finished writing to files a & b"
	.text
	.globl	ab
	.type	ab, @function
ab:
.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 -4[rbp], 0
	jmp	.L2
.L3:
	call	random@PLT
	mov	rcx, rax
	movabs	rdx, 3777893186295716171
	mov	rax, rcx
	imul	rdx
	mov	rax, rdx
	sar	rax, 11
	mov	rdx, rcx
	sar	rdx, 63
	sub	rax, rdx
	imul	rdx, rax, 10000
	mov	rax, rcx
	sub	rax, rdx
	add	eax, 10000
	mov	edi, eax
	call	usleep@PLT
	lea	rdi, a[rip]
	call	pthread_mutex_lock@PLT
	lea	rdi, b[rip]
	call	pthread_mutex_lock@PLT
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	edi, 1
	call	sleep@PLT
	lea	rdi, .LC1[rip]
	call	puts@PLT
	lea	rdi, a[rip]
	call	pthread_mutex_unlock@PLT
	lea	rdi, b[rip]
	call	pthread_mutex_unlock@PLT
	add	DWORD PTR -4[rbp], 1
.L2:
	cmp	DWORD PTR -4[rbp], 3
	jle	.L3
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	ab, .-ab
	.section	.rodata
	.align 8
.LC2:
	.string	"bc starting writing to files b & c"
	.align 8
.LC3:
	.string	"bc finished writing to files b & c"
	.text
	.globl	bc
	.type	bc, @function
bc:
.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
	jmp	.L6
.L7:
	call	random@PLT
	mov	rcx, rax
	movabs	rdx, 3777893186295716171
	mov	rax, rcx
	imul	rdx
	mov	rax, rdx
	sar	rax, 11
	mov	rdx, rcx
	sar	rdx, 63
	sub	rax, rdx
	imul	rdx, rax, 10000
	mov	rax, rcx
	sub	rax, rdx
	add	eax, 10000
	mov	edi, eax
	call	usleep@PLT
	lea	rdi, b[rip]
	call	pthread_mutex_lock@PLT
	lea	rdi, c[rip]
	call	pthread_mutex_lock@PLT
	lea	rdi, .LC2[rip]
	call	puts@PLT
	mov	edi, 1
	call	sleep@PLT
	lea	rdi, .LC3[rip]
	call	puts@PLT
	lea	rdi, b[rip]
	call	pthread_mutex_unlock@PLT
	lea	rdi, c[rip]
	call	pthread_mutex_unlock@PLT
	add	DWORD PTR -4[rbp], 1
.L6:
	cmp	DWORD PTR -4[rbp], 3
	jle	.L7
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	bc, .-bc
	.section	.rodata
	.align 8
.LC4:
	.string	"cd starting writing to files c & d"
	.align 8
.LC5:
	.string	"cd finished writing to files c & d"
	.text
	.globl	cd
	.type	cd, @function
cd:
.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
	jmp	.L10
.L11:
	call	random@PLT
	mov	rcx, rax
	movabs	rdx, 3777893186295716171
	mov	rax, rcx
	imul	rdx
	mov	rax, rdx
	sar	rax, 11
	mov	rdx, rcx
	sar	rdx, 63
	sub	rax, rdx
	imul	rdx, rax, 10000
	mov	rax, rcx
	sub	rax, rdx
	add	eax, 10000
	mov	edi, eax
	call	usleep@PLT
	lea	rdi, c[rip]
	call	pthread_mutex_lock@PLT
	lea	rdi, d[rip]
	call	pthread_mutex_lock@PLT
	lea	rdi, .LC4[rip]
	call	puts@PLT
	mov	edi, 1
	call	sleep@PLT
	lea	rdi, .LC5[rip]
	call	puts@PLT
	lea	rdi, c[rip]
	call	pthread_mutex_unlock@PLT
	lea	rdi, d[rip]
	call	pthread_mutex_unlock@PLT
	add	DWORD PTR -4[rbp], 1
.L10:
	cmp	DWORD PTR -4[rbp], 3
	jle	.L11
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	cd, .-cd
	.section	.rodata
	.align 8
.LC6:
	.string	"da starting writing to files d & a"
	.align 8
.LC7:
	.string	"da finished writing to files d & a"
	.text
	.globl	da
	.type	da, @function
da:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -4[rbp], 0
	jmp	.L14
.L15:
	call	random@PLT
	mov	rcx, rax
	movabs	rdx, 3777893186295716171
	mov	rax, rcx
	imul	rdx
	mov	rax, rdx
	sar	rax, 11
	mov	rdx, rcx
	sar	rdx, 63
	sub	rax, rdx
	imul	rdx, rax, 10000
	mov	rax, rcx
	sub	rax, rdx
	add	eax, 10000
	mov	edi, eax
	call	usleep@PLT
	lea	rdi, a[rip]
	call	pthread_mutex_lock@PLT
	lea	rdi, d[rip]
	call	pthread_mutex_lock@PLT
	lea	rdi, .LC6[rip]
	call	puts@PLT
	mov	edi, 1
	call	sleep@PLT
	lea	rdi, .LC7[rip]
	call	puts@PLT
	lea	rdi, d[rip]
	call	pthread_mutex_unlock@PLT
	lea	rdi, a[rip]
	call	pthread_mutex_unlock@PLT
	add	DWORD PTR -4[rbp], 1
.L14:
	cmp	DWORD PTR -4[rbp], 3
	jle	.L15
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	da, .-da
	.section	.rodata
.LC8:
	.string	"All done"
	.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, 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	esi, 0
	lea	rdi, a[rip]
	call	pthread_mutex_init@PLT
	mov	esi, 0
	lea	rdi, b[rip]
	call	pthread_mutex_init@PLT
	mov	esi, 0
	lea	rdi, c[rip]
	call	pthread_mutex_init@PLT
	mov	esi, 0
	lea	rdi, d[rip]
	call	pthread_mutex_init@PLT
	lea	rax, -48[rbp]
	mov	ecx, 0
	lea	rdx, ab[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	lea	rax, -48[rbp]
	add	rax, 8
	mov	ecx, 0
	lea	rdx, bc[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	lea	rax, -48[rbp]
	add	rax, 16
	mov	ecx, 0
	lea	rdx, cd[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	lea	rax, -48[rbp]
	add	rax, 24
	mov	ecx, 0
	lea	rdx, da[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	mov	DWORD PTR -52[rbp], 0
	jmp	.L18
.L19:
	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
.L18:
	cmp	DWORD PTR -52[rbp], 3
	jle	.L19
	lea	rdi, .LC8[rip]
	call	puts@PLT
	mov	eax, 0
	mov	rdx, QWORD PTR -8[rbp]
	sub	rdx, QWORD PTR fs:40
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.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	"82951379.c"
	.text
	.comm	a,24,4
	.comm	b,24,4
	.comm	c,24,4
	.comm	d,24,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"ab starting writing to files a & b\000"
	.align	2
.LC1:
	.ascii	"ab finished writing to files a & b\000"
	.text
	.align	2
	.global	ab
	.syntax unified
	.arm
	.fpu softvfp
	.type	ab, %function
ab:
	@ 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]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L2
.L3:
	bl	random
	mov	r1, r0
	ldr	r3, .L5
	smull	r2, r3, r1, r3
	asr	r2, r3, #12
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #4
	sub	r2, r1, r3
	add	r3, r2, #9984
	add	r3, r3, #16
	mov	r0, r3
	bl	usleep
	ldr	r0, .L5+4
	bl	pthread_mutex_lock
	ldr	r0, .L5+8
	bl	pthread_mutex_lock
	ldr	r0, .L5+12
	bl	puts
	mov	r0, #1
	bl	sleep
	ldr	r0, .L5+16
	bl	puts
	ldr	r0, .L5+4
	bl	pthread_mutex_unlock
	ldr	r0, .L5+8
	bl	pthread_mutex_unlock
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L2:
	ldr	r3, [fp, #-8]
	cmp	r3, #3
	ble	.L3
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L6:
	.align	2
.L5:
	.word	1759218605
	.word	a
	.word	b
	.word	.LC0
	.word	.LC1
	.size	ab, .-ab
	.section	.rodata
	.align	2
.LC2:
	.ascii	"bc starting writing to files b & c\000"
	.align	2
.LC3:
	.ascii	"bc finished writing to files b & c\000"
	.text
	.align	2
	.global	bc
	.syntax unified
	.arm
	.fpu softvfp
	.type	bc, %function
bc:
	@ 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]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L8
.L9:
	bl	random
	mov	r1, r0
	ldr	r3, .L11
	smull	r2, r3, r1, r3
	asr	r2, r3, #12
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #4
	sub	r2, r1, r3
	add	r3, r2, #9984
	add	r3, r3, #16
	mov	r0, r3
	bl	usleep
	ldr	r0, .L11+4
	bl	pthread_mutex_lock
	ldr	r0, .L11+8
	bl	pthread_mutex_lock
	ldr	r0, .L11+12
	bl	puts
	mov	r0, #1
	bl	sleep
	ldr	r0, .L11+16
	bl	puts
	ldr	r0, .L11+4
	bl	pthread_mutex_unlock
	ldr	r0, .L11+8
	bl	pthread_mutex_unlock
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L8:
	ldr	r3, [fp, #-8]
	cmp	r3, #3
	ble	.L9
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L12:
	.align	2
.L11:
	.word	1759218605
	.word	b
	.word	c
	.word	.LC2
	.word	.LC3
	.size	bc, .-bc
	.section	.rodata
	.align	2
.LC4:
	.ascii	"cd starting writing to files c & d\000"
	.align	2
.LC5:
	.ascii	"cd finished writing to files c & d\000"
	.text
	.align	2
	.global	cd
	.syntax unified
	.arm
	.fpu softvfp
	.type	cd, %function
cd:
	@ 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]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L14
.L15:
	bl	random
	mov	r1, r0
	ldr	r3, .L17
	smull	r2, r3, r1, r3
	asr	r2, r3, #12
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #4
	sub	r2, r1, r3
	add	r3, r2, #9984
	add	r3, r3, #16
	mov	r0, r3
	bl	usleep
	ldr	r0, .L17+4
	bl	pthread_mutex_lock
	ldr	r0, .L17+8
	bl	pthread_mutex_lock
	ldr	r0, .L17+12
	bl	puts
	mov	r0, #1
	bl	sleep
	ldr	r0, .L17+16
	bl	puts
	ldr	r0, .L17+4
	bl	pthread_mutex_unlock
	ldr	r0, .L17+8
	bl	pthread_mutex_unlock
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L14:
	ldr	r3, [fp, #-8]
	cmp	r3, #3
	ble	.L15
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L18:
	.align	2
.L17:
	.word	1759218605
	.word	c
	.word	d
	.word	.LC4
	.word	.LC5
	.size	cd, .-cd
	.section	.rodata
	.align	2
.LC6:
	.ascii	"da starting writing to files d & a\000"
	.align	2
.LC7:
	.ascii	"da finished writing to files d & a\000"
	.text
	.align	2
	.global	da
	.syntax unified
	.arm
	.fpu softvfp
	.type	da, %function
da:
	@ 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]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L20
.L21:
	bl	random
	mov	r1, r0
	ldr	r3, .L23
	smull	r2, r3, r1, r3
	asr	r2, r3, #12
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #4
	sub	r2, r1, r3
	add	r3, r2, #9984
	add	r3, r3, #16
	mov	r0, r3
	bl	usleep
	ldr	r0, .L23+4
	bl	pthread_mutex_lock
	ldr	r0, .L23+8
	bl	pthread_mutex_lock
	ldr	r0, .L23+12
	bl	puts
	mov	r0, #1
	bl	sleep
	ldr	r0, .L23+16
	bl	puts
	ldr	r0, .L23+8
	bl	pthread_mutex_unlock
	ldr	r0, .L23+4
	bl	pthread_mutex_unlock
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L20:
	ldr	r3, [fp, #-8]
	cmp	r3, #3
	ble	.L21
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L24:
	.align	2
.L23:
	.word	1759218605
	.word	a
	.word	d
	.word	.LC6
	.word	.LC7
	.size	da, .-da
	.section	.rodata
	.align	2
.LC8:
	.ascii	"All done\000"
	.align	2
.LC9:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-32]
	str	r1, [fp, #-36]
	ldr	r3, .L30
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r1, #0
	ldr	r0, .L30+4
	bl	pthread_mutex_init
	mov	r1, #0
	ldr	r0, .L30+8
	bl	pthread_mutex_init
	mov	r1, #0
	ldr	r0, .L30+12
	bl	pthread_mutex_init
	mov	r1, #0
	ldr	r0, .L30+16
	bl	pthread_mutex_init
	sub	r0, fp, #24
	mov	r3, #0
	ldr	r2, .L30+20
	mov	r1, #0
	bl	pthread_create
	sub	r3, fp, #24
	add	r0, r3, #4
	mov	r3, #0
	ldr	r2, .L30+24
	mov	r1, #0
	bl	pthread_create
	sub	r3, fp, #24
	add	r0, r3, #8
	mov	r3, #0
	ldr	r2, .L30+28
	mov	r1, #0
	bl	pthread_create
	sub	r3, fp, #24
	add	r0, r3, #12
	mov	r3, #0
	ldr	r2, .L30+32
	mov	r1, #0
	bl	pthread_create
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L26
.L27:
	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]
.L26:
	ldr	r3, [fp, #-28]
	cmp	r3, #3
	ble	.L27
	ldr	r0, .L30+36
	bl	puts
	mov	r3, #0
	ldr	r2, .L30
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L29
	bl	__stack_chk_fail
.L29:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L31:
	.align	2
.L30:
	.word	.LC9
	.word	a
	.word	b
	.word	c
	.word	d
	.word	ab
	.word	bc
	.word	cd
	.word	da
	.word	.LC8
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
