	.file	"556237.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Inside process %d\n"
.LC1:
	.string	"\nSize limit:  "
.LC2:
	.string	"%d"
.LC3:
	.string	"shmget"
.LC4:
	.string	"shmat"
.LC5:
	.string	"Enter %d numbers\n"
.LC6:
	.string	"\nLargest= %d \nSmallest= %d\n"
	.text
	.globl	main
	.type	main, @function
main:
.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, 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	eax, 0
	call	getpid@PLT
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -56[rbp]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -56[rbp]
	cdqe
	sal	eax, 3
	mov	DWORD PTR -40[rbp], eax
	mov	DWORD PTR -36[rbp], 0
	mov	eax, DWORD PTR -40[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR -36[rbp]
	mov	edx, 950
	mov	rsi, rcx
	mov	edi, eax
	call	shmget@PLT
	cdqe
	mov	QWORD PTR -24[rbp], rax
	cmp	QWORD PTR -24[rbp], 0
	jns	.L2
	lea	rdi, .LC3[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	call	shmat@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], -1
	jne	.L3
	lea	rdi, .LC4[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L3:
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR -32[rbp], rax
	mov	eax, DWORD PTR -56[rbp]
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -52[rbp], 0
	jmp	.L4
.L5:
	mov	rax, QWORD PTR -32[rbp]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	add	DWORD PTR -52[rbp], 1
	add	QWORD PTR -32[rbp], 4
.L4:
	mov	eax, DWORD PTR -56[rbp]
	cmp	DWORD PTR -52[rbp], eax
	jl	.L5
	call	fork@PLT
	test	eax, eax
	jne	.L6
	mov	eax, 0
	call	getpid@PLT
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR -32[rbp], rax
	mov	rax, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -48[rbp], eax
	mov	rax, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -44[rbp], eax
	mov	DWORD PTR -52[rbp], 1
	jmp	.L7
.L10:
	mov	eax, DWORD PTR -52[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -48[rbp], eax
	jge	.L8
	mov	eax, DWORD PTR -52[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -48[rbp], eax
	jmp	.L9
.L8:
	mov	eax, DWORD PTR -52[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -44[rbp], eax
	jle	.L9
	mov	eax, DWORD PTR -52[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -44[rbp], eax
.L9:
	add	DWORD PTR -52[rbp], 1
.L7:
	mov	eax, DWORD PTR -56[rbp]
	cmp	DWORD PTR -52[rbp], eax
	jl	.L10
	jmp	.L15
.L6:
	mov	edi, 0
	mov	eax, 0
	call	wait@PLT
	mov	eax, 0
	jmp	.L13
.L15:
	mov	edx, DWORD PTR -44[rbp]
	mov	eax, DWORD PTR -48[rbp]
	mov	esi, eax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
.L13:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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	"556237.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Inside process %d\012\000"
	.align	2
.LC1:
	.ascii	"\012Size limit:  \000"
	.align	2
.LC2:
	.ascii	"%d\000"
	.align	2
.LC3:
	.ascii	"shmget\000"
	.align	2
.LC4:
	.ascii	"shmat\000"
	.align	2
.LC5:
	.ascii	"Enter %d numbers\012\000"
	.align	2
.LC6:
	.ascii	"\012Largest= %d \012Smallest= %d\012\000"
	.align	2
.LC7:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	ldr	r3, .L16
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	bl	getpid
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L16+4
	bl	printf
	ldr	r0, .L16+8
	bl	printf
	sub	r3, fp, #44
	mov	r1, r3
	ldr	r0, .L16+12
	bl	__isoc99_scanf
	ldr	r3, [fp, #-44]
	lsl	r3, r3, #2
	str	r3, [fp, #-24]
	mov	r3, #0
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-24]
	ldr	r2, .L16+16
	mov	r1, r3
	ldr	r0, [fp, #-20]
	bl	shmget
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bge	.L2
	ldr	r0, .L16+20
	bl	perror
	mov	r0, #1
	bl	exit
.L2:
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-16]
	bl	shmat
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmn	r3, #1
	bne	.L3
	ldr	r0, .L16+24
	bl	perror
	mov	r0, #1
	bl	exit
.L3:
	ldr	r3, [fp, #-12]
	str	r3, [fp, #-40]
	ldr	r3, [fp, #-44]
	mov	r1, r3
	ldr	r0, .L16+28
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-36]
	b	.L4
.L5:
	ldr	r1, [fp, #-40]
	ldr	r0, .L16+12
	bl	__isoc99_scanf
	ldr	r3, [fp, #-36]
	add	r3, r3, #1
	str	r3, [fp, #-36]
	ldr	r3, [fp, #-40]
	add	r3, r3, #4
	str	r3, [fp, #-40]
.L4:
	ldr	r3, [fp, #-44]
	ldr	r2, [fp, #-36]
	cmp	r2, r3
	blt	.L5
	bl	fork
	mov	r3, r0
	cmp	r3, #0
	bne	.L6
	bl	getpid
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L16+4
	bl	printf
	ldr	r3, [fp, #-12]
	str	r3, [fp, #-40]
	ldr	r3, [fp, #-40]
	ldr	r3, [r3]
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-40]
	ldr	r3, [r3]
	str	r3, [fp, #-28]
	mov	r3, #1
	str	r3, [fp, #-36]
	b	.L7
.L10:
	ldr	r3, [fp, #-36]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-40]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-32]
	cmp	r2, r3
	bge	.L8
	ldr	r3, [fp, #-36]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-40]
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-32]
	b	.L9
.L8:
	ldr	r3, [fp, #-36]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-40]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-28]
	cmp	r2, r3
	ble	.L9
	ldr	r3, [fp, #-36]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-40]
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-28]
.L9:
	ldr	r3, [fp, #-36]
	add	r3, r3, #1
	str	r3, [fp, #-36]
.L7:
	ldr	r3, [fp, #-44]
	ldr	r2, [fp, #-36]
	cmp	r2, r3
	blt	.L10
	b	.L15
.L6:
	mov	r0, #0
	bl	wait
	mov	r3, #0
	b	.L13
.L15:
	ldr	r2, [fp, #-28]
	ldr	r1, [fp, #-32]
	ldr	r0, .L16+32
	bl	printf
	mov	r3, #0
.L13:
	ldr	r2, .L16
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L14
	bl	__stack_chk_fail
.L14:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L17:
	.align	2
.L16:
	.word	.LC7
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	950
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
