	.file	"247019107.c"
	.intel_syntax noprefix
	.text
	.globl	m
	.bss
	.align 32
	.type	m, @object
	.size	m, 200
m:
	.zero	200
	.section	.rodata
.LC0:
	.string	"\t%c is eating \n"
	.text
	.globl	tfn
	.type	tfn, @function
tfn:
.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	edi, 0
	call	time@PLT
	mov	edi, eax
	call	srand@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR -8[rbp], eax
	cmp	DWORD PTR -8[rbp], 4
	jne	.L2
	mov	DWORD PTR -12[rbp], 0
	mov	eax, DWORD PTR -8[rbp]
	mov	DWORD PTR -4[rbp], eax
	jmp	.L3
.L2:
	mov	eax, DWORD PTR -8[rbp]
	mov	DWORD PTR -12[rbp], eax
.L3:
	mov	eax, DWORD PTR -8[rbp]
	add	eax, 1
	mov	DWORD PTR -4[rbp], eax
.L5:
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 3
	lea	rdx, m[rip]
	add	rax, rdx
	mov	rdi, rax
	call	pthread_mutex_lock@PLT
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 3
	lea	rdx, m[rip]
	add	rax, rdx
	mov	rdi, rax
	call	pthread_mutex_trylock@PLT
	test	eax, eax
	jne	.L4
	mov	eax, DWORD PTR -8[rbp]
	add	eax, 65
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 3
	lea	rdx, m[rip]
	add	rax, rdx
	mov	rdi, rax
	call	pthread_mutex_unlock@PLT
.L4:
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 3
	lea	rdx, m[rip]
	add	rax, rdx
	mov	rdi, rax
	call	pthread_mutex_unlock@PLT
	call	rand@PLT
	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	eax, edx
	mov	edi, eax
	call	sleep@PLT
	jmp	.L5
	.cfi_endproc
.LFE6:
	.size	tfn, .-tfn
	.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	DWORD PTR -52[rbp], 0
	jmp	.L7
.L8:
	mov	eax, DWORD PTR -52[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 3
	lea	rdx, m[rip]
	add	rax, rdx
	mov	esi, 0
	mov	rdi, rax
	call	pthread_mutex_init@PLT
	add	DWORD PTR -52[rbp], 1
.L7:
	cmp	DWORD PTR -52[rbp], 4
	jle	.L8
	mov	DWORD PTR -52[rbp], 0
	jmp	.L9
.L10:
	mov	eax, DWORD PTR -52[rbp]
	cdqe
	mov	rdx, rax
	lea	rcx, -48[rbp]
	mov	eax, DWORD PTR -52[rbp]
	cdqe
	sal	rax, 3
	add	rax, rcx
	mov	rcx, rdx
	lea	rdx, tfn[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	add	DWORD PTR -52[rbp], 1
.L9:
	cmp	DWORD PTR -52[rbp], 4
	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], 4
	jle	.L12
	mov	DWORD PTR -52[rbp], 0
	jmp	.L13
.L14:
	mov	eax, DWORD PTR -52[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 3
	lea	rdx, m[rip]
	add	rax, rdx
	mov	rdi, rax
	call	pthread_mutex_destroy@PLT
	add	DWORD PTR -52[rbp], 1
.L13:
	cmp	DWORD PTR -52[rbp], 4
	jle	.L14
	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	"247019107.c"
	.text
	.comm	m,120,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"\011%c is eating \012\000"
	.text
	.align	2
	.global	tfn
	.syntax unified
	.arm
	.fpu softvfp
	.type	tfn, %function
tfn:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	mov	r0, #0
	bl	time
	mov	r3, r0
	mov	r0, r3
	bl	srand
	ldr	r3, [fp, #-24]
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #4
	bne	.L2
	mov	r3, #0
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-12]
	str	r3, [fp, #-8]
	b	.L3
.L2:
	ldr	r3, [fp, #-12]
	str	r3, [fp, #-16]
.L3:
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L5:
	ldr	r2, [fp, #-16]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	ldr	r2, .L6
	add	r3, r3, r2
	mov	r0, r3
	bl	pthread_mutex_lock
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	ldr	r2, .L6
	add	r3, r3, r2
	mov	r0, r3
	bl	pthread_mutex_trylock
	mov	r3, r0
	cmp	r3, #0
	bne	.L4
	ldr	r3, [fp, #-12]
	add	r3, r3, #65
	mov	r1, r3
	ldr	r0, .L6+4
	bl	printf
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	ldr	r2, .L6
	add	r3, r3, r2
	mov	r0, r3
	bl	pthread_mutex_unlock
.L4:
	ldr	r2, [fp, #-16]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	ldr	r2, .L6
	add	r3, r3, r2
	mov	r0, r3
	bl	pthread_mutex_unlock
	bl	rand
	mov	r2, r0
	ldr	r3, .L6+8
	smull	r1, r3, r2, r3
	asr	r1, r3, #1
	asr	r3, r2, #31
	sub	r1, r1, r3
	mov	r3, r1
	lsl	r3, r3, #2
	add	r3, r3, r1
	sub	r1, r2, r3
	mov	r3, r1
	mov	r0, r3
	bl	sleep
	b	.L5
.L7:
	.align	2
.L6:
	.word	m
	.word	.LC0
	.word	1717986919
	.size	tfn, .-tfn
	.section	.rodata
	.align	2
.LC1:
	.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
	ldr	r3, .L19
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-32]
	b	.L9
.L10:
	ldr	r2, [fp, #-32]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	ldr	r2, .L19+4
	add	r3, r3, r2
	mov	r1, #0
	mov	r0, r3
	bl	pthread_mutex_init
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L9:
	ldr	r3, [fp, #-32]
	cmp	r3, #4
	ble	.L10
	mov	r3, #0
	str	r3, [fp, #-32]
	b	.L11
.L12:
	sub	r2, fp, #28
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	add	r0, r2, r3
	ldr	r3, [fp, #-32]
	ldr	r2, .L19+8
	mov	r1, #0
	bl	pthread_create
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L11:
	ldr	r3, [fp, #-32]
	cmp	r3, #4
	ble	.L12
	mov	r3, #0
	str	r3, [fp, #-32]
	b	.L13
.L14:
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-24]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L13:
	ldr	r3, [fp, #-32]
	cmp	r3, #4
	ble	.L14
	mov	r3, #0
	str	r3, [fp, #-32]
	b	.L15
.L16:
	ldr	r2, [fp, #-32]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	ldr	r2, .L19+4
	add	r3, r3, r2
	mov	r0, r3
	bl	pthread_mutex_destroy
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L15:
	ldr	r3, [fp, #-32]
	cmp	r3, #4
	ble	.L16
	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	.LC1
	.word	m
	.word	tfn
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
