	.file	"912709.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"Usage: %s number_of_philosophers\nRuns the dining philosophers problem with specified number of them\n--help - show this message"
	.text
	.globl	print_help
	.type	print_help, @function
print_help:
.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	QWORD PTR -16[rbp], rsi
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	print_help, .-print_help
	.globl	barrier
	.bss
	.align 32
	.type	barrier, @object
	.size	barrier, 32
barrier:
	.zero	32
	.globl	table
	.align 16
	.type	table, @object
	.size	table, 16
table:
	.zero	16
	.text
	.globl	wait
	.type	wait, @function
wait:
.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, 16
	call	rand@PLT
	movsx	rdx, eax
	imul	rdx, rdx, 2001599835
	shr	rdx, 32
	sar	edx, 22
	mov	ecx, eax
	sar	ecx, 31
	sub	edx, ecx
	imul	ecx, edx, 9000000
	sub	eax, ecx
	mov	edx, eax
	lea	eax, 1000000[rdx]
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
	mov	edi, eax
	call	usleep@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	wait, .-wait
	.section	.rodata
.LC1:
	.string	"%d thinks\n"
	.text
	.globl	think
	.type	think, @function
think:
.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, 16
	mov	DWORD PTR -4[rbp], edi
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	call	wait
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	think, .-think
	.globl	left
	.type	left, @function
left:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -4[rbp], edi
	mov	rcx, QWORD PTR table[rip]
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 3
	add	rax, rcx
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	left, .-left
	.globl	right
	.type	right, @function
right:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -4[rbp], edi
	mov	rsi, QWORD PTR table[rip]
	mov	eax, DWORD PTR -4[rbp]
	add	eax, 1
	mov	ecx, DWORD PTR table[rip+8]
	cdq
	idiv	ecx
	mov	eax, edx
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 3
	add	rax, rsi
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	right, .-right
	.section	.rodata
.LC2:
	.string	"%d tries to aquire forks\n"
	.align 8
.LC3:
	.string	"%d failed to pickup second fork :(\n"
	.text
	.globl	aquire_forks
	.type	aquire_forks, @function
aquire_forks:
.LFB11:
	.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
.L11:
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -4[rbp]
	mov	edi, eax
	call	left
	mov	rdi, rax
	call	pthread_mutex_lock@PLT
	mov	eax, DWORD PTR -4[rbp]
	mov	edi, eax
	call	right
	mov	rdi, rax
	call	pthread_mutex_trylock@PLT
	test	eax, eax
	je	.L13
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -4[rbp]
	mov	edi, eax
	call	left
	mov	rdi, rax
	call	pthread_mutex_unlock@PLT
	mov	eax, 0
	call	wait
	jmp	.L11
.L13:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	aquire_forks, .-aquire_forks
	.globl	drop_forks
	.type	drop_forks, @function
drop_forks:
.LFB12:
	.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 -4[rbp]
	mov	edi, eax
	call	right
	mov	rdi, rax
	call	pthread_mutex_unlock@PLT
	mov	eax, DWORD PTR -4[rbp]
	mov	edi, eax
	call	left
	mov	rdi, rax
	call	pthread_mutex_unlock@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	drop_forks, .-drop_forks
	.section	.rodata
.LC4:
	.string	"%d eats\n"
	.text
	.globl	eat
	.type	eat, @function
eat:
.LFB13:
	.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 -4[rbp]
	mov	edi, eax
	call	aquire_forks
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	call	wait
	mov	eax, DWORD PTR -4[rbp]
	mov	edi, eax
	call	drop_forks
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	eat, .-eat
	.section	.rodata
.LC5:
	.string	"%d says hello!\n"
	.text
	.globl	philosopher
	.type	philosopher, @function
philosopher:
.LFB14:
	.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
	lea	rdi, barrier[rip]
	call	pthread_barrier_wait@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
.L17:
	mov	eax, DWORD PTR -4[rbp]
	mov	edi, eax
	call	think
	mov	eax, DWORD PTR -4[rbp]
	mov	edi, eax
	call	eat
	jmp	.L17
	.cfi_endproc
.LFE14:
	.size	philosopher, .-philosopher
	.globl	simulate
	.type	simulate, @function
simulate:
.LFB15:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	DWORD PTR -36[rbp], edi
	mov	eax, DWORD PTR -36[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 3
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	eax, DWORD PTR -36[rbp]
	add	eax, 1
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 3
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR table[rip], rax
	mov	eax, DWORD PTR -36[rbp]
	mov	DWORD PTR table[rip+8], eax
	mov	DWORD PTR -20[rbp], 0
	jmp	.L19
.L20:
	mov	rcx, QWORD PTR table[rip]
	mov	eax, DWORD PTR -20[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 3
	add	rax, rcx
	mov	esi, 0
	mov	rdi, rax
	call	pthread_mutex_init@PLT
	add	DWORD PTR -20[rbp], 1
.L19:
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, DWORD PTR -36[rbp]
	jl	.L20
	mov	eax, DWORD PTR -36[rbp]
	add	eax, 1
	mov	edx, eax
	mov	esi, 0
	lea	rdi, barrier[rip]
	call	pthread_barrier_init@PLT
	mov	DWORD PTR -16[rbp], 0
	jmp	.L21
.L22:
	mov	eax, DWORD PTR -16[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 3
	mov	rdx, rax
	mov	rax, QWORD PTR -8[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -16[rbp]
	mov	DWORD PTR 8[rdx], eax
	mov	eax, DWORD PTR -16[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 3
	mov	rdx, rax
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	lea	rdx, 8[rax]
	mov	eax, DWORD PTR -16[rbp]
	movsx	rcx, eax
	mov	rax, rcx
	add	rax, rax
	add	rax, rcx
	sal	rax, 3
	mov	rcx, rax
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rcx
	mov	rcx, rdx
	lea	rdx, philosopher[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	add	DWORD PTR -16[rbp], 1
.L21:
	mov	eax, DWORD PTR -16[rbp]
	cmp	eax, DWORD PTR -36[rbp]
	jl	.L22
	lea	rdi, barrier[rip]
	call	pthread_barrier_wait@PLT
	lea	rdi, barrier[rip]
	call	pthread_barrier_destroy@PLT
	mov	DWORD PTR -12[rbp], 0
	jmp	.L23
.L24:
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 3
	mov	rdx, rax
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	lea	rdx, 16[rax]
	mov	eax, DWORD PTR -12[rbp]
	movsx	rcx, eax
	mov	rax, rcx
	add	rax, rax
	add	rax, rcx
	sal	rax, 3
	mov	rcx, rax
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rcx
	mov	rax, QWORD PTR [rax]
	mov	rsi, rdx
	mov	rdi, rax
	call	pthread_join@PLT
	add	DWORD PTR -12[rbp], 1
.L23:
	mov	eax, DWORD PTR -12[rbp]
	cmp	eax, DWORD PTR -36[rbp]
	jl	.L24
	mov	rax, QWORD PTR table[rip]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	free@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	simulate, .-simulate
	.section	.rodata
.LC6:
	.string	"--help"
.LC7:
	.string	"Simulation finished!"
	.text
	.globl	main
	.type	main, @function
main:
.LFB16:
	.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	QWORD PTR -16[rbp], rsi
	cmp	DWORD PTR -4[rbp], 1
	jg	.L26
	mov	rdx, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR -4[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	print_help
	mov	eax, 1
	jmp	.L27
.L26:
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L28
	mov	rdx, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR -4[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	print_help
	mov	eax, 1
	jmp	.L27
.L28:
	mov	edi, 0
	call	time@PLT
	mov	edi, eax
	call	srand@PLT
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	edi, eax
	call	simulate
	lea	rdi, .LC7[rip]
	call	puts@PLT
	mov	eax, 0
.L27:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.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	"912709.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Usage: %s number_of_philosophers\012Runs the dining"
	.ascii	" philosophers problem with specified number of them"
	.ascii	"\012--help - show this message\000"
	.text
	.align	2
	.global	print_help
	.syntax unified
	.arm
	.fpu softvfp
	.type	print_help, %function
print_help:
	@ 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]
	str	r1, [fp, #-12]
	ldr	r3, [fp, #-12]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L2
	bl	printf
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L3:
	.align	2
.L2:
	.word	.LC0
	.size	print_help, .-print_help
	.comm	barrier,20,4
	.comm	table,8,4
	.align	2
	.global	wait
	.syntax unified
	.arm
	.fpu softvfp
	.type	wait, %function
wait:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	bl	rand
	mov	r1, r0
	ldr	r3, .L5
	smull	r2, r3, r1, r3
	asr	r2, r3, #22
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #7
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r0, r3, #4
	add	r3, r3, r0
	lsl	r3, r3, #4
	add	r3, r3, r2
	lsl	r3, r3, #6
	sub	r2, r1, r3
	add	r3, r2, #999424
	add	r3, r3, #576
	str	r3, [fp, #-8]
	ldr	r0, [fp, #-8]
	bl	usleep
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L6:
	.align	2
.L5:
	.word	2001599835
	.size	wait, .-wait
	.section	.rodata
	.align	2
.LC1:
	.ascii	"%d thinks\012\000"
	.text
	.align	2
	.global	think
	.syntax unified
	.arm
	.fpu softvfp
	.type	think, %function
think:
	@ 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	r1, [fp, #-8]
	ldr	r0, .L8
	bl	printf
	bl	wait
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L9:
	.align	2
.L8:
	.word	.LC1
	.size	think, .-think
	.align	2
	.global	left
	.syntax unified
	.arm
	.fpu softvfp
	.type	left, %function
left:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	ldr	r3, .L12
	ldr	r1, [r3]
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L13:
	.align	2
.L12:
	.word	table
	.size	left, .-left
	.global	__aeabi_idivmod
	.align	2
	.global	right
	.syntax unified
	.arm
	.fpu softvfp
	.type	right, %function
right:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #12
	str	r0, [fp, #-16]
	ldr	r3, .L16
	ldr	r4, [r3]
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	ldr	r2, .L16
	ldr	r2, [r2, #4]
	mov	r1, r2
	mov	r0, r3
	bl	__aeabi_idivmod
	mov	r3, r1
	mov	r2, r3
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r4, r3
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L17:
	.align	2
.L16:
	.word	table
	.size	right, .-right
	.section	.rodata
	.align	2
.LC2:
	.ascii	"%d tries to aquire forks\012\000"
	.align	2
.LC3:
	.ascii	"%d failed to pickup second fork :(\012\000"
	.text
	.align	2
	.global	aquire_forks
	.syntax unified
	.arm
	.fpu softvfp
	.type	aquire_forks, %function
aquire_forks:
	@ 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]
.L21:
	ldr	r1, [fp, #-8]
	ldr	r0, .L24
	bl	printf
	ldr	r0, [fp, #-8]
	bl	left
	mov	r3, r0
	mov	r0, r3
	bl	pthread_mutex_lock
	ldr	r0, [fp, #-8]
	bl	right
	mov	r3, r0
	mov	r0, r3
	bl	pthread_mutex_trylock
	mov	r3, r0
	cmp	r3, #0
	beq	.L23
	ldr	r1, [fp, #-8]
	ldr	r0, .L24+4
	bl	printf
	ldr	r0, [fp, #-8]
	bl	left
	mov	r3, r0
	mov	r0, r3
	bl	pthread_mutex_unlock
	bl	wait
	b	.L21
.L23:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L25:
	.align	2
.L24:
	.word	.LC2
	.word	.LC3
	.size	aquire_forks, .-aquire_forks
	.align	2
	.global	drop_forks
	.syntax unified
	.arm
	.fpu softvfp
	.type	drop_forks, %function
drop_forks:
	@ 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	r0, [fp, #-8]
	bl	right
	mov	r3, r0
	mov	r0, r3
	bl	pthread_mutex_unlock
	ldr	r0, [fp, #-8]
	bl	left
	mov	r3, r0
	mov	r0, r3
	bl	pthread_mutex_unlock
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	drop_forks, .-drop_forks
	.section	.rodata
	.align	2
.LC4:
	.ascii	"%d eats\012\000"
	.text
	.align	2
	.global	eat
	.syntax unified
	.arm
	.fpu softvfp
	.type	eat, %function
eat:
	@ 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	r0, [fp, #-8]
	bl	aquire_forks
	ldr	r1, [fp, #-8]
	ldr	r0, .L28
	bl	printf
	bl	wait
	ldr	r0, [fp, #-8]
	bl	drop_forks
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L29:
	.align	2
.L28:
	.word	.LC4
	.size	eat, .-eat
	.section	.rodata
	.align	2
.LC5:
	.ascii	"%d says hello!\012\000"
	.text
	.align	2
	.global	philosopher
	.syntax unified
	.arm
	.fpu softvfp
	.type	philosopher, %function
philosopher:
	@ 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]
	ldr	r0, .L32
	bl	pthread_barrier_wait
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	ldr	r1, [fp, #-8]
	ldr	r0, .L32+4
	bl	printf
.L31:
	ldr	r0, [fp, #-8]
	bl	think
	ldr	r0, [fp, #-8]
	bl	eat
	b	.L31
.L33:
	.align	2
.L32:
	.word	barrier
	.word	.LC5
	.size	philosopher, .-philosopher
	.align	2
	.global	simulate
	.syntax unified
	.arm
	.fpu softvfp
	.type	simulate, %function
simulate:
	@ 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]
	ldr	r2, [fp, #-24]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	mov	r2, r3
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L41
	str	r2, [r3]
	ldr	r2, .L41
	ldr	r3, [fp, #-24]
	str	r3, [r2, #4]
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L35
.L36:
	ldr	r3, .L41
	ldr	r1, [r3]
	ldr	r2, [fp, #-20]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	mov	r1, #0
	mov	r0, r3
	bl	pthread_mutex_init
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L35:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	blt	.L36
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	mov	r2, r3
	mov	r1, #0
	ldr	r0, .L41+4
	bl	pthread_barrier_init
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L37
.L38:
	ldr	r2, [fp, #-16]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-8]
	add	r3, r3, r2
	ldr	r2, [fp, #-16]
	str	r2, [r3, #4]
	ldr	r2, [fp, #-16]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-8]
	add	r3, r3, r2
	mov	r0, r3
	ldr	r2, [fp, #-16]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-8]
	add	r3, r3, r2
	add	r3, r3, #4
	ldr	r2, .L41+8
	mov	r1, #0
	bl	pthread_create
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L37:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	blt	.L38
	ldr	r0, .L41+4
	bl	pthread_barrier_wait
	ldr	r0, .L41+4
	bl	pthread_barrier_destroy
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L39
.L40:
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-8]
	add	r3, r3, r2
	ldr	r0, [r3]
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-8]
	add	r3, r3, r2
	add	r3, r3, #8
	mov	r1, r3
	bl	pthread_join
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L39:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	blt	.L40
	ldr	r3, .L41
	ldr	r3, [r3]
	mov	r0, r3
	bl	free
	ldr	r0, [fp, #-8]
	bl	free
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L42:
	.align	2
.L41:
	.word	table
	.word	barrier
	.word	philosopher
	.size	simulate, .-simulate
	.section	.rodata
	.align	2
.LC6:
	.ascii	"--help\000"
	.align	2
.LC7:
	.ascii	"Simulation finished!\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ 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]
	str	r1, [fp, #-12]
	ldr	r3, [fp, #-8]
	cmp	r3, #1
	bgt	.L44
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-8]
	bl	print_help
	mov	r3, #1
	b	.L45
.L44:
	ldr	r3, [fp, #-12]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L47
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L46
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-8]
	bl	print_help
	mov	r3, #1
	b	.L45
.L46:
	mov	r0, #0
	bl	time
	mov	r3, r0
	mov	r0, r3
	bl	srand
	ldr	r3, [fp, #-12]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r3, r0
	mov	r0, r3
	bl	simulate
	ldr	r0, .L47+4
	bl	puts
	mov	r3, #0
.L45:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L48:
	.align	2
.L47:
	.word	.LC6
	.word	.LC7
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
