	.file	"334788.c"
	.intel_syntax noprefix
	.text
	.globl	mem
	.data
	.align 4
	.type	mem, @object
	.size	mem, 4
mem:
	.long	-1
	.globl	semaphores
	.align 4
	.type	semaphores, @object
	.size	semaphores, 4
semaphores:
	.long	-1
	.globl	shmem
	.bss
	.align 8
	.type	shmem, @object
	.size	shmem, 8
shmem:
	.zero	8
	.text
	.globl	sig_INT
	.type	sig_INT, @function
sig_INT:
.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
	cmp	DWORD PTR -4[rbp], 2
	jne	.L3
	mov	edi, 0
	call	exit@PLT
.L3:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	sig_INT, .-sig_INT
	.section	.rodata
.LC0:
	.string	"Line %d: "
	.align 8
.LC1:
	.string	"Can't deatach shared memory segment\n"
	.text
	.globl	at_exit
	.type	at_exit, @function
at_exit:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	rax, QWORD PTR shmem[rip]
	mov	rdi, rax
	call	shmdt@PLT
	cmp	eax, -1
	jne	.L6
	mov	rax, QWORD PTR stderr[rip]
	mov	edx, 44
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	lea	rdi, .LC1[rip]
	call	perror@PLT
	call	__errno_location@PLT
	mov	DWORD PTR [rax], 0
.L6:
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	at_exit, .-at_exit
	.section	.rodata
	.align 8
.LC2:
	.string	"Consumer: wrong number of arguments\nThere should be <key for memory> <key for semaphore>\n"
.LC3:
	.string	"Can't get shared memory\n"
.LC4:
	.string	"Can't get semaphores set\n"
.LC5:
	.string	"Can't attach shered memory\n"
.LC6:
	.string	"Can't set exit action\n"
.LC7:
	.string	"Can't drop main semaphore\n"
	.align 8
.LC8:
	.string	"Can't drop element's semaphore\n"
.LC9:
	.string	"Can't get semaphore value\n"
	.align 8
.LC10:
	.string	"(%d %ld:%ld) Sprawdzi\305\202em liczb\304\231 %d na pozycji %d -  liczba parzysta. Liczba zadan oczekujacych %d\n"
	.align 8
.LC11:
	.string	"(%d %ld:%ld) Sprawdzi\305\202em liczb\304\231 %d na pozycji %d -  liczba nieparzysta. Liczba zadan oczekujacych %d\n"
.LC12:
	.string	"Undefined\n"
.LC13:
	.string	"Can't up element's semaphore\n"
.LC14:
	.string	"Can't up main semaphore\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r12
	push	rbx
	sub	rsp, 224
	.cfi_offset 12, -24
	.cfi_offset 3, -32
	mov	DWORD PTR -228[rbp], edi
	mov	QWORD PTR -240[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	edi, 0
	call	time@PLT
	mov	edi, eax
	call	srand@PLT
	lea	rax, -160[rbp]
	mov	rdi, rax
	call	sigfillset@PLT
	lea	rax, -160[rbp]
	mov	esi, 2
	mov	rdi, rax
	call	sigdelset@PLT
	lea	rax, -160[rbp]
	mov	edx, 0
	mov	rsi, rax
	mov	edi, 2
	call	sigprocmask@PLT
	cmp	DWORD PTR -228[rbp], 3
	je	.L8
	mov	rax, QWORD PTR stderr[rip]
	mov	edx, 52
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	lea	rdi, .LC2[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L8:
	mov	rax, QWORD PTR -240[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -220[rbp], eax
	mov	rax, QWORD PTR -240[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -216[rbp], eax
	mov	eax, DWORD PTR -220[rbp]
	mov	edx, 950
	mov	esi, 0
	mov	edi, eax
	call	shmget@PLT
	mov	DWORD PTR mem[rip], eax
	mov	eax, DWORD PTR mem[rip]
	cmp	eax, -1
	jne	.L9
	mov	rax, QWORD PTR stderr[rip]
	mov	edx, 56
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	lea	rdi, .LC3[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L9:
	mov	eax, DWORD PTR -216[rbp]
	mov	edx, 950
	mov	esi, 23
	mov	edi, eax
	call	semget@PLT
	mov	DWORD PTR semaphores[rip], eax
	mov	eax, DWORD PTR semaphores[rip]
	cmp	eax, -1
	jne	.L10
	mov	rax, QWORD PTR stderr[rip]
	mov	edx, 58
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	lea	rdi, .LC4[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L10:
	mov	rcx, QWORD PTR shmem[rip]
	mov	eax, DWORD PTR mem[rip]
	mov	edx, 0
	mov	rsi, rcx
	mov	edi, eax
	call	shmat@PLT
	mov	QWORD PTR shmem[rip], rax
	mov	rax, QWORD PTR shmem[rip]
	cmp	rax, -1
	jne	.L11
	mov	rax, QWORD PTR stderr[rip]
	mov	edx, 59
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	lea	rdi, .LC5[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L11:
	lea	rdi, at_exit[rip]
	call	atexit@PLT
	cmp	eax, -1
	jne	.L12
	mov	rax, QWORD PTR stderr[rip]
	mov	edx, 60
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	lea	rdi, .LC6[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L12:
	lea	rsi, sig_INT[rip]
	mov	edi, 2
	call	signal@PLT
.L22:
	mov	WORD PTR -172[rbp], 22
	mov	WORD PTR -170[rbp], -1
	mov	WORD PTR -168[rbp], 0
	mov	WORD PTR -166[rbp], 20
	mov	WORD PTR -164[rbp], -1
	mov	WORD PTR -162[rbp], 0
	mov	WORD PTR -196[rbp], -1
	mov	WORD PTR -194[rbp], 0
	mov	eax, DWORD PTR semaphores[rip]
	lea	rcx, -172[rbp]
	mov	edx, 2
	mov	rsi, rcx
	mov	edi, eax
	call	semop@PLT
	cmp	eax, -1
	jne	.L13
	mov	rax, QWORD PTR stderr[rip]
	mov	edx, 75
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	lea	rdi, .LC7[rip]
	call	perror@PLT
	call	__errno_location@PLT
	mov	DWORD PTR [rax], 0
.L13:
	mov	rax, QWORD PTR shmem[rip]
	mov	eax, DWORD PTR 80[rax]
	mov	DWORD PTR -212[rbp], eax
	mov	eax, DWORD PTR -212[rbp]
	lea	ecx, 1[rax]
	mov	rax, QWORD PTR shmem[rip]
	lea	rsi, 80[rax]
	movsx	rax, ecx
	imul	rax, rax, 1717986919
	shr	rax, 32
	sar	eax, 3
	mov	edi, ecx
	sar	edi, 31
	sub	eax, edi
	mov	edx, eax
	mov	eax, edx
	sal	eax, 2
	add	eax, edx
	sal	eax, 2
	sub	ecx, eax
	mov	edx, ecx
	mov	DWORD PTR [rsi], edx
	mov	eax, DWORD PTR -212[rbp]
	mov	WORD PTR -198[rbp], ax
	mov	eax, DWORD PTR semaphores[rip]
	lea	rcx, -198[rbp]
	mov	edx, 1
	mov	rsi, rcx
	mov	edi, eax
	call	semop@PLT
	cmp	eax, -1
	jne	.L14
	mov	rax, QWORD PTR stderr[rip]
	mov	edx, 79
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	lea	rdi, .LC8[rip]
	call	perror@PLT
	call	__errno_location@PLT
	mov	DWORD PTR [rax], 0
.L14:
	mov	DWORD PTR -208[rbp], 20
	mov	eax, DWORD PTR semaphores[rip]
	mov	edx, 12
	mov	esi, 22
	mov	edi, eax
	mov	eax, 0
	call	semctl@PLT
	sub	DWORD PTR -208[rbp], eax
	cmp	DWORD PTR -208[rbp], 20
	jle	.L15
	mov	rax, QWORD PTR stderr[rip]
	mov	edx, 82
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	lea	rdi, .LC9[rip]
	call	perror@PLT
	call	__errno_location@PLT
	mov	DWORD PTR [rax], 0
.L15:
	lea	rax, -192[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	gettimeofday@PLT
	mov	rdx, QWORD PTR shmem[rip]
	mov	eax, DWORD PTR -212[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -204[rbp], eax
	mov	eax, DWORD PTR -204[rbp]
	cdq
	shr	edx, 31
	add	eax, edx
	and	eax, 1
	sub	eax, edx
	test	eax, eax
	je	.L16
	cmp	eax, 1
	je	.L17
	jmp	.L24
.L16:
	mov	rcx, QWORD PTR -184[rbp]
	movabs	rdx, 2361183241434822607
	mov	rax, rcx
	imul	rdx
	mov	rax, rdx
	sar	rax, 7
	sar	rcx, 63
	mov	rdx, rcx
	sub	rax, rdx
	mov	r12, rax
	mov	rbx, QWORD PTR -192[rbp]
	call	getpid@PLT
	mov	esi, eax
	mov	ecx, DWORD PTR -212[rbp]
	mov	edx, DWORD PTR -204[rbp]
	sub	rsp, 8
	mov	eax, DWORD PTR -208[rbp]
	push	rax
	mov	r9d, ecx
	mov	r8d, edx
	mov	rcx, r12
	mov	rdx, rbx
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	printf@PLT
	add	rsp, 16
	jmp	.L19
.L17:
	mov	rcx, QWORD PTR -184[rbp]
	movabs	rdx, 2361183241434822607
	mov	rax, rcx
	imul	rdx
	mov	rax, rdx
	sar	rax, 7
	sar	rcx, 63
	mov	rdx, rcx
	sub	rax, rdx
	mov	r12, rax
	mov	rbx, QWORD PTR -192[rbp]
	call	getpid@PLT
	mov	esi, eax
	mov	ecx, DWORD PTR -212[rbp]
	mov	edx, DWORD PTR -204[rbp]
	sub	rsp, 8
	mov	eax, DWORD PTR -208[rbp]
	push	rax
	mov	r9d, ecx
	mov	r8d, edx
	mov	rcx, r12
	mov	rdx, rbx
	lea	rdi, .LC11[rip]
	mov	eax, 0
	call	printf@PLT
	add	rsp, 16
	jmp	.L19
.L24:
	mov	rax, QWORD PTR stderr[rip]
	mov	edx, 98
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	lea	rdi, .LC12[rip]
	call	perror@PLT
	call	__errno_location@PLT
	mov	DWORD PTR [rax], 0
.L19:
	mov	eax, DWORD PTR -212[rbp]
	mov	WORD PTR -198[rbp], ax
	mov	WORD PTR -196[rbp], 1
	mov	WORD PTR -194[rbp], 0
	mov	eax, DWORD PTR semaphores[rip]
	lea	rcx, -198[rbp]
	mov	edx, 1
	mov	rsi, rcx
	mov	edi, eax
	call	semop@PLT
	cmp	eax, -1
	jne	.L20
	mov	rax, QWORD PTR stderr[rip]
	mov	edx, 104
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	lea	rdi, .LC13[rip]
	call	perror@PLT
	call	__errno_location@PLT
	mov	DWORD PTR [rax], 0
.L20:
	mov	WORD PTR -164[rbp], 1
	mov	WORD PTR -162[rbp], 0
	mov	WORD PTR -166[rbp], 20
	mov	WORD PTR -172[rbp], 22
	mov	WORD PTR -170[rbp], 1
	mov	WORD PTR -168[rbp], 0
	mov	eax, DWORD PTR semaphores[rip]
	lea	rcx, -172[rbp]
	mov	edx, 2
	mov	rsi, rcx
	mov	edi, eax
	call	semop@PLT
	cmp	eax, -1
	jne	.L22
	mov	rax, QWORD PTR stderr[rip]
	mov	edx, 111
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	lea	rdi, .LC14[rip]
	call	perror@PLT
	call	__errno_location@PLT
	mov	DWORD PTR [rax], 0
	jmp	.L22
	.cfi_endproc
.LFE8:
	.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	"334788.c"
	.text
	.global	mem
	.data
	.align	2
	.type	mem, %object
	.size	mem, 4
mem:
	.word	-1
	.global	semaphores
	.align	2
	.type	semaphores, %object
	.size	semaphores, 4
semaphores:
	.word	-1
	.global	shmem
	.bss
	.align	2
	.type	shmem, %object
	.size	shmem, 4
shmem:
	.space	4
	.text
	.align	2
	.global	sig_INT
	.syntax unified
	.arm
	.fpu softvfp
	.type	sig_INT, %function
sig_INT:
	@ 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	r3, [fp, #-8]
	cmp	r3, #2
	bne	.L3
	mov	r0, #0
	bl	exit
.L3:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	sig_INT, .-sig_INT
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Line %d: \000"
	.align	2
.LC1:
	.ascii	"Can't deatach shared memory segment\012\000"
	.text
	.align	2
	.global	at_exit
	.syntax unified
	.arm
	.fpu softvfp
	.type	at_exit, %function
at_exit:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L7
	ldr	r3, [r3]
	mov	r0, r3
	bl	shmdt
	mov	r3, r0
	cmn	r3, #1
	bne	.L6
	ldr	r3, .L7+4
	ldr	r3, [r3]
	mov	r2, #44
	ldr	r1, .L7+8
	mov	r0, r3
	bl	fprintf
	ldr	r0, .L7+12
	bl	perror
	bl	__errno_location
	mov	r3, r0
	mov	r2, #0
	str	r2, [r3]
.L6:
	nop
	pop	{fp, pc}
.L8:
	.align	2
.L7:
	.word	shmem
	.word	stderr
	.word	.LC0
	.word	.LC1
	.size	at_exit, .-at_exit
	.section	.rodata
	.align	2
.LC2:
	.ascii	"Consumer: wrong number of arguments\012There should"
	.ascii	" be <key for memory> <key for semaphore>\012\000"
	.align	2
.LC3:
	.ascii	"Can't get shared memory\012\000"
	.align	2
.LC4:
	.ascii	"Can't get semaphores set\012\000"
	.align	2
.LC5:
	.ascii	"Can't attach shered memory\012\000"
	.align	2
.LC6:
	.ascii	"Can't set exit action\012\000"
	.align	2
.LC7:
	.ascii	"Can't drop main semaphore\012\000"
	.align	2
.LC8:
	.ascii	"Can't drop element's semaphore\012\000"
	.align	2
.LC9:
	.ascii	"Can't get semaphore value\012\000"
	.align	2
.LC10:
	.ascii	"(%d %ld:%ld) Sprawdzi\305\202em liczb\304\231 %d na"
	.ascii	" pozycji %d -  liczba parzysta. Liczba zadan oczeku"
	.ascii	"jacych %d\012\000"
	.align	2
.LC11:
	.ascii	"(%d %ld:%ld) Sprawdzi\305\202em liczb\304\231 %d na"
	.ascii	" pozycji %d -  liczba nieparzysta. Liczba zadan ocz"
	.ascii	"ekujacych %d\012\000"
	.align	2
.LC12:
	.ascii	"Undefined\012\000"
	.align	2
.LC13:
	.ascii	"Can't up element's semaphore\012\000"
	.align	2
.LC14:
	.ascii	"Can't up main semaphore\012\000"
	.align	2
.LC15:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 192
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #208
	str	r0, [fp, #-192]
	str	r1, [fp, #-196]
	ldr	r3, .L27
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r0, #0
	bl	time
	mov	r3, r0
	mov	r0, r3
	bl	srand
	sub	r3, fp, #136
	mov	r0, r3
	bl	sigfillset
	sub	r3, fp, #136
	mov	r1, #2
	mov	r0, r3
	bl	sigdelset
	sub	r3, fp, #136
	mov	r2, #0
	mov	r1, r3
	mov	r0, #2
	bl	sigprocmask
	ldr	r3, [fp, #-192]
	cmp	r3, #3
	beq	.L10
	ldr	r3, .L27+4
	ldr	r3, [r3]
	mov	r2, #52
	ldr	r1, .L27+8
	mov	r0, r3
	bl	fprintf
	ldr	r0, .L27+12
	bl	perror
	mov	r0, #1
	bl	exit
.L10:
	ldr	r3, [fp, #-196]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-184]
	ldr	r3, [fp, #-196]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-180]
	ldr	r2, .L27+16
	mov	r1, #0
	ldr	r0, [fp, #-184]
	bl	shmget
	mov	r3, r0
	ldr	r2, .L27+20
	str	r3, [r2]
	ldr	r3, .L27+20
	ldr	r3, [r3]
	cmn	r3, #1
	bne	.L11
	ldr	r3, .L27+4
	ldr	r3, [r3]
	mov	r2, #56
	ldr	r1, .L27+8
	mov	r0, r3
	bl	fprintf
	ldr	r0, .L27+24
	bl	perror
	mov	r0, #1
	bl	exit
.L11:
	ldr	r2, .L27+16
	mov	r1, #23
	ldr	r0, [fp, #-180]
	bl	semget
	mov	r3, r0
	ldr	r2, .L27+28
	str	r3, [r2]
	ldr	r3, .L27+28
	ldr	r3, [r3]
	cmn	r3, #1
	bne	.L12
	ldr	r3, .L27+4
	ldr	r3, [r3]
	mov	r2, #58
	ldr	r1, .L27+8
	mov	r0, r3
	bl	fprintf
	ldr	r0, .L27+32
	bl	perror
	mov	r0, #1
	bl	exit
.L12:
	ldr	r3, .L27+20
	ldr	r3, [r3]
	ldr	r2, .L27+36
	ldr	r1, [r2]
	mov	r2, #0
	mov	r0, r3
	bl	shmat
	mov	r3, r0
	ldr	r2, .L27+36
	str	r3, [r2]
	ldr	r3, .L27+36
	ldr	r3, [r3]
	cmn	r3, #1
	bne	.L13
	ldr	r3, .L27+4
	ldr	r3, [r3]
	mov	r2, #59
	ldr	r1, .L27+8
	mov	r0, r3
	bl	fprintf
	ldr	r0, .L27+40
	bl	perror
	mov	r0, #1
	bl	exit
.L13:
	ldr	r0, .L27+44
	bl	atexit
	mov	r3, r0
	cmn	r3, #1
	bne	.L14
	ldr	r3, .L27+4
	ldr	r3, [r3]
	mov	r2, #60
	ldr	r1, .L27+8
	mov	r0, r3
	bl	fprintf
	ldr	r0, .L27+48
	bl	perror
	mov	r0, #1
	bl	exit
.L14:
	ldr	r1, .L27+52
	mov	r0, #2
	bl	signal
.L24:
	mov	r3, #22
	strh	r3, [fp, #-148]	@ movhi
	mvn	r3, #0
	strh	r3, [fp, #-146]	@ movhi
	mov	r3, #0
	strh	r3, [fp, #-144]	@ movhi
	mov	r3, #20
	strh	r3, [fp, #-142]	@ movhi
	mvn	r3, #0
	strh	r3, [fp, #-140]	@ movhi
	mov	r3, #0
	strh	r3, [fp, #-138]	@ movhi
	mvn	r3, #0
	strh	r3, [fp, #-162]	@ movhi
	mov	r3, #0
	strh	r3, [fp, #-160]	@ movhi
	ldr	r3, .L27+28
	ldr	r3, [r3]
	sub	r1, fp, #148
	mov	r2, #2
	mov	r0, r3
	bl	semop
	mov	r3, r0
	cmn	r3, #1
	bne	.L15
	ldr	r3, .L27+4
	ldr	r3, [r3]
	mov	r2, #75
	ldr	r1, .L27+8
	mov	r0, r3
	bl	fprintf
	ldr	r0, .L27+56
	bl	perror
	bl	__errno_location
	mov	r3, r0
	mov	r2, #0
	str	r2, [r3]
.L15:
	ldr	r3, .L27+36
	ldr	r3, [r3]
	ldr	r3, [r3, #80]
	str	r3, [fp, #-176]
	ldr	r3, [fp, #-176]
	add	r1, r3, #1
	ldr	r3, .L27+36
	ldr	r3, [r3]
	add	r0, r3, #80
	ldr	r3, .L27+60
	smull	r2, r3, r1, r3
	asr	r2, r3, #3
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	sub	r2, r1, r3
	str	r2, [r0]
	ldr	r3, [fp, #-176]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	strh	r3, [fp, #-164]	@ movhi
	ldr	r3, .L27+28
	ldr	r3, [r3]
	sub	r1, fp, #164
	mov	r2, #1
	mov	r0, r3
	bl	semop
	mov	r3, r0
	cmn	r3, #1
	bne	.L16
	ldr	r3, .L27+4
	ldr	r3, [r3]
	mov	r2, #79
	ldr	r1, .L27+8
	mov	r0, r3
	bl	fprintf
	ldr	r0, .L27+64
	bl	perror
	bl	__errno_location
	mov	r3, r0
	mov	r2, #0
	str	r2, [r3]
.L16:
	mov	r3, #20
	str	r3, [fp, #-172]
	ldr	r3, .L27+28
	ldr	r3, [r3]
	mov	r2, #12
	mov	r1, #22
	mov	r0, r3
	bl	semctl
	mov	r2, r0
	ldr	r3, [fp, #-172]
	sub	r3, r3, r2
	str	r3, [fp, #-172]
	ldr	r3, [fp, #-172]
	cmp	r3, #20
	ble	.L17
	ldr	r3, .L27+4
	ldr	r3, [r3]
	mov	r2, #82
	ldr	r1, .L27+8
	mov	r0, r3
	bl	fprintf
	ldr	r0, .L27+68
	bl	perror
	bl	__errno_location
	mov	r3, r0
	mov	r2, #0
	str	r2, [r3]
.L17:
	sub	r3, fp, #156
	mov	r1, #0
	mov	r0, r3
	bl	gettimeofday
	ldr	r3, .L27+36
	ldr	r2, [r3]
	ldr	r3, [fp, #-176]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-168]
	ldr	r3, [fp, #-168]
	cmp	r3, #0
	and	r3, r3, #1
	rsblt	r3, r3, #0
	cmp	r3, #0
	beq	.L18
	cmp	r3, #1
	beq	.L19
	b	.L26
.L18:
	bl	getpid
	ldr	r1, [fp, #-156]
	ldr	r3, [fp, #-152]
	ldr	r2, .L27+72
	smull	ip, r2, r3, r2
	asr	r2, r2, #6
	asr	r3, r3, #31
	sub	r2, r2, r3
	ldr	r3, [fp, #-172]
	str	r3, [sp, #8]
	ldr	r3, [fp, #-176]
	str	r3, [sp, #4]
	ldr	r3, [fp, #-168]
	str	r3, [sp]
	mov	r3, r2
	mov	r2, r1
	mov	r1, r0
	ldr	r0, .L27+76
	bl	printf
	b	.L21
.L19:
	bl	getpid
	ldr	r1, [fp, #-156]
	ldr	r3, [fp, #-152]
	ldr	r2, .L27+72
	smull	ip, r2, r3, r2
	asr	r2, r2, #6
	asr	r3, r3, #31
	sub	r2, r2, r3
	ldr	r3, [fp, #-172]
	str	r3, [sp, #8]
	ldr	r3, [fp, #-176]
	str	r3, [sp, #4]
	ldr	r3, [fp, #-168]
	str	r3, [sp]
	mov	r3, r2
	mov	r2, r1
	mov	r1, r0
	ldr	r0, .L27+80
	bl	printf
	b	.L21
.L26:
	ldr	r3, .L27+4
	ldr	r3, [r3]
	mov	r2, #98
	ldr	r1, .L27+8
	mov	r0, r3
	bl	fprintf
	ldr	r0, .L27+84
	bl	perror
	bl	__errno_location
	mov	r3, r0
	mov	r2, #0
	str	r2, [r3]
.L21:
	ldr	r3, [fp, #-176]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	strh	r3, [fp, #-164]	@ movhi
	mov	r3, #1
	strh	r3, [fp, #-162]	@ movhi
	mov	r3, #0
	strh	r3, [fp, #-160]	@ movhi
	ldr	r3, .L27+28
	ldr	r3, [r3]
	sub	r1, fp, #164
	mov	r2, #1
	mov	r0, r3
	bl	semop
	mov	r3, r0
	cmn	r3, #1
	bne	.L22
	ldr	r3, .L27+4
	ldr	r3, [r3]
	mov	r2, #104
	ldr	r1, .L27+8
	mov	r0, r3
	bl	fprintf
	ldr	r0, .L27+88
	bl	perror
	bl	__errno_location
	mov	r3, r0
	mov	r2, #0
	str	r2, [r3]
.L22:
	mov	r3, #1
	strh	r3, [fp, #-140]	@ movhi
	mov	r3, #0
	strh	r3, [fp, #-138]	@ movhi
	mov	r3, #20
	strh	r3, [fp, #-142]	@ movhi
	mov	r3, #22
	strh	r3, [fp, #-148]	@ movhi
	mov	r3, #1
	strh	r3, [fp, #-146]	@ movhi
	mov	r3, #0
	strh	r3, [fp, #-144]	@ movhi
	ldr	r3, .L27+28
	ldr	r3, [r3]
	sub	r1, fp, #148
	mov	r2, #2
	mov	r0, r3
	bl	semop
	mov	r3, r0
	cmn	r3, #1
	bne	.L24
	ldr	r3, .L27+4
	ldr	r3, [r3]
	mov	r2, #111
	ldr	r1, .L27+8
	mov	r0, r3
	bl	fprintf
	ldr	r0, .L27+92
	bl	perror
	bl	__errno_location
	mov	r3, r0
	mov	r2, #0
	str	r2, [r3]
	b	.L24
.L28:
	.align	2
.L27:
	.word	.LC15
	.word	stderr
	.word	.LC0
	.word	.LC2
	.word	950
	.word	mem
	.word	.LC3
	.word	semaphores
	.word	.LC4
	.word	shmem
	.word	.LC5
	.word	at_exit
	.word	.LC6
	.word	sig_INT
	.word	.LC7
	.word	1717986919
	.word	.LC8
	.word	.LC9
	.word	274877907
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
