	.file	"442269.c"
	.intel_syntax noprefix
	.text
	.globl	forks
	.bss
	.align 32
	.type	forks, @object
	.size	forks, 200
forks:
	.zero	200
	.globl	waiter
	.align 32
	.type	waiter, @object
	.size	waiter, 40
waiter:
	.zero	40
	.section	.rodata
	.align 8
.LC0:
	.string	"Philosopher %d started thinking\n"
.LC1:
	.string	"Philosopher %d starts to eat\n"
	.text
	.globl	philosopher
	.type	philosopher, @function
philosopher:
.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	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -16[rbp], eax
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR [rax]
	add	eax, 1
	movsx	rdx, eax
	imul	rdx, rdx, 1717986919
	shr	rdx, 32
	sar	edx
	mov	ecx, eax
	sar	ecx, 31
	sub	edx, ecx
	mov	DWORD PTR -12[rbp], edx
	mov	ecx, DWORD PTR -12[rbp]
	mov	edx, ecx
	sal	edx, 2
	add	edx, ecx
	sub	eax, edx
	mov	DWORD PTR -12[rbp], eax
.L3:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR stdout[rip]
	mov	rdi, rax
	call	fflush@PLT
	lea	rdi, waiter[rip]
	call	pthread_mutex_lock@PLT
	mov	eax, DWORD PTR -16[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 3
	lea	rdx, forks[rip]
	add	rax, rdx
	mov	rdi, rax
	call	pthread_mutex_trylock@PLT
	mov	DWORD PTR -8[rbp], eax
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 3
	lea	rdx, forks[rip]
	add	rax, rdx
	mov	rdi, rax
	call	pthread_mutex_trylock@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -8[rbp], 0
	jne	.L2
	cmp	DWORD PTR -4[rbp], 0
	jne	.L2
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR stdout[rip]
	mov	rdi, rax
	call	fflush@PLT
.L2:
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 3
	lea	rdx, forks[rip]
	add	rax, rdx
	mov	rdi, rax
	call	pthread_mutex_unlock@PLT
	mov	eax, DWORD PTR -16[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 3
	lea	rdx, forks[rip]
	add	rax, rdx
	mov	rdi, rax
	call	pthread_mutex_unlock@PLT
	lea	rdi, waiter[rip]
	call	pthread_mutex_unlock@PLT
	jmp	.L3
	.cfi_endproc
.LFE6:
	.size	philosopher, .-philosopher
	.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
	push	rbx
	sub	rsp, 104
	.cfi_offset 3, -24
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -104[rbp], 0
	jmp	.L5
.L6:
	mov	QWORD PTR -64[rbp], 0
	mov	QWORD PTR -56[rbp], 0
	mov	QWORD PTR -48[rbp], 0
	mov	QWORD PTR -40[rbp], 0
	mov	QWORD PTR -32[rbp], 0
	mov	eax, DWORD PTR -104[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 3
	mov	rdx, rax
	lea	rax, forks[rip]
	mov	rcx, QWORD PTR -64[rbp]
	mov	rbx, QWORD PTR -56[rbp]
	mov	QWORD PTR [rdx+rax], rcx
	mov	QWORD PTR 8[rdx+rax], rbx
	mov	rcx, QWORD PTR -48[rbp]
	mov	rbx, QWORD PTR -40[rbp]
	mov	QWORD PTR 16[rdx+rax], rcx
	mov	QWORD PTR 24[rdx+rax], rbx
	mov	rcx, QWORD PTR -32[rbp]
	mov	QWORD PTR 32[rdx+rax], rcx
	add	DWORD PTR -104[rbp], 1
.L5:
	cmp	DWORD PTR -104[rbp], 4
	jle	.L6
	mov	DWORD PTR -100[rbp], 0
	jmp	.L7
.L8:
	mov	eax, DWORD PTR -100[rbp]
	cdqe
	mov	edx, DWORD PTR -100[rbp]
	mov	DWORD PTR -96[rbp+rax*4], edx
	lea	rdx, -96[rbp]
	mov	eax, DWORD PTR -100[rbp]
	cdqe
	sal	rax, 2
	add	rdx, rax
	lea	rcx, -64[rbp]
	mov	eax, DWORD PTR -100[rbp]
	cdqe
	sal	rax, 3
	add	rax, rcx
	mov	rcx, rdx
	lea	rdx, philosopher[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	add	DWORD PTR -100[rbp], 1
.L7:
	cmp	DWORD PTR -100[rbp], 4
	jle	.L8
.L9:
	jmp	.L9
	.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	"442269.c"
	.text
	.comm	forks,120,4
	.global	waiter
	.bss
	.align	2
	.type	waiter, %object
	.size	waiter, 24
waiter:
	.space	24
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Philosopher %d started thinking\012\000"
	.align	2
.LC1:
	.ascii	"Philosopher %d starts to eat\012\000"
	.text
	.align	2
	.global	philosopher
	.syntax unified
	.arm
	.fpu softvfp
	.type	philosopher, %function
philosopher:
	@ 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	r3, [fp, #-24]
	ldr	r3, [r3]
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r3, .L4
	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	r3, r2, r3
	str	r3, [fp, #-16]
.L3:
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L4+4
	bl	printf
	ldr	r3, .L4+8
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	ldr	r0, .L4+12
	bl	pthread_mutex_lock
	ldr	r2, [fp, #-20]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	ldr	r2, .L4+16
	add	r3, r3, r2
	mov	r0, r3
	bl	pthread_mutex_trylock
	str	r0, [fp, #-12]
	ldr	r2, [fp, #-16]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	ldr	r2, .L4+16
	add	r3, r3, r2
	mov	r0, r3
	bl	pthread_mutex_trylock
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L2
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L2
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L4+20
	bl	printf
	ldr	r3, .L4+8
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
.L2:
	ldr	r2, [fp, #-16]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	ldr	r2, .L4+16
	add	r3, r3, r2
	mov	r0, r3
	bl	pthread_mutex_unlock
	ldr	r2, [fp, #-20]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	ldr	r2, .L4+16
	add	r3, r3, r2
	mov	r0, r3
	bl	pthread_mutex_unlock
	ldr	r0, .L4+12
	bl	pthread_mutex_unlock
	b	.L3
.L5:
	.align	2
.L4:
	.word	1717986919
	.word	.LC0
	.word	stdout
	.word	waiter
	.word	forks
	.word	.LC1
	.size	philosopher, .-philosopher
	.section	.rodata
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 56
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #56
	ldr	r3, .L13
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-60]
	b	.L7
.L8:
	sub	r3, fp, #32
	mov	r2, #0
	str	r2, [r3]
	str	r2, [r3, #4]
	str	r2, [r3, #8]
	str	r2, [r3, #12]
	str	r2, [r3, #16]
	str	r2, [r3, #20]
	ldr	r1, .L13+4
	ldr	r2, [fp, #-60]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	mov	lr, r3
	sub	ip, fp, #32
	ldmia	ip!, {r0, r1, r2, r3}
	stmia	lr!, {r0, r1, r2, r3}
	ldm	ip, {r0, r1}
	stm	lr, {r0, r1}
	ldr	r3, [fp, #-60]
	add	r3, r3, #1
	str	r3, [fp, #-60]
.L7:
	ldr	r3, [fp, #-60]
	cmp	r3, #4
	ble	.L8
	mov	r3, #0
	str	r3, [fp, #-56]
	b	.L9
.L10:
	ldr	r3, [fp, #-56]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [fp, #-56]
	str	r2, [r3, #-48]
	sub	r2, fp, #32
	ldr	r3, [fp, #-56]
	lsl	r3, r3, #2
	add	r0, r2, r3
	sub	r2, fp, #52
	ldr	r3, [fp, #-56]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, .L13+8
	mov	r1, #0
	bl	pthread_create
	ldr	r3, [fp, #-56]
	add	r3, r3, #1
	str	r3, [fp, #-56]
.L9:
	ldr	r3, [fp, #-56]
	cmp	r3, #4
	ble	.L10
.L11:
	b	.L11
.L14:
	.align	2
.L13:
	.word	.LC2
	.word	forks
	.word	philosopher
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
