	.file	"20450827.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"Enter the number of elements: "
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\t"
.LC3:
	.string	"\nEnter the search query: "
	.align 8
.LC4:
	.string	"Enter the number of processes: "
.LC5:
	.string	"Failed to fork child proc %d\n"
	.align 8
.LC6:
	.string	"Child %d PID: %d ... Searching in Range: %d --- %d\n"
.LC7:
	.string	"Found at index %d\n"
.LC8:
	.string	"Search query not found"
	.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	DWORD PTR -36[rbp], 0
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -56[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -56[rbp]
	cdqe
	sal	rax, 2
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -16[rbp], rax
	mov	edi, 0
	call	time@PLT
	mov	edi, eax
	call	srand@PLT
	mov	DWORD PTR -44[rbp], 0
	jmp	.L2
.L3:
	call	rand@PLT
	mov	edx, DWORD PTR -44[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*4]
	mov	rdx, QWORD PTR -16[rbp]
	add	rcx, rdx
	movsx	rdx, eax
	imul	rdx, rdx, 274877907
	shr	rdx, 32
	sar	edx, 6
	mov	esi, eax
	sar	esi, 31
	sub	edx, esi
	imul	esi, edx, 1000
	sub	eax, esi
	mov	edx, eax
	mov	DWORD PTR [rcx], edx
	mov	eax, DWORD PTR -44[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -16[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -44[rbp], 1
.L2:
	mov	eax, DWORD PTR -56[rbp]
	cmp	DWORD PTR -44[rbp], eax
	jl	.L3
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -52[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -60[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -56[rbp]
	mov	ecx, DWORD PTR -60[rbp]
	cdq
	idiv	ecx
	mov	DWORD PTR -32[rbp], eax
	mov	DWORD PTR -44[rbp], 0
	jmp	.L4
.L12:
	call	fork@PLT
	mov	DWORD PTR -28[rbp], eax
	cmp	DWORD PTR -28[rbp], 0
	jns	.L5
	mov	eax, DWORD PTR -44[rbp]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 0
	call	exit@PLT
.L5:
	cmp	DWORD PTR -28[rbp], 0
	jne	.L6
	mov	eax, DWORD PTR -44[rbp]
	imul	eax, DWORD PTR -32[rbp]
	mov	DWORD PTR -24[rbp], eax
	mov	eax, DWORD PTR -60[rbp]
	sub	eax, 1
	cmp	DWORD PTR -44[rbp], eax
	je	.L7
	mov	eax, DWORD PTR -44[rbp]
	add	eax, 1
	imul	eax, DWORD PTR -32[rbp]
	jmp	.L8
.L7:
	mov	eax, DWORD PTR -56[rbp]
.L8:
	mov	DWORD PTR -20[rbp], eax
	call	getpid@PLT
	mov	edx, eax
	mov	eax, DWORD PTR -44[rbp]
	lea	esi, 1[rax]
	mov	ecx, DWORD PTR -20[rbp]
	mov	eax, DWORD PTR -24[rbp]
	mov	r8d, ecx
	mov	ecx, eax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -24[rbp]
	mov	DWORD PTR -40[rbp], eax
	jmp	.L9
.L11:
	mov	eax, DWORD PTR -40[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -16[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -52[rbp]
	cmp	edx, eax
	jne	.L10
	mov	eax, DWORD PTR -40[rbp]
	mov	esi, eax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L10:
	add	DWORD PTR -40[rbp], 1
.L9:
	mov	eax, DWORD PTR -40[rbp]
	cmp	eax, DWORD PTR -20[rbp]
	jl	.L11
	mov	edi, 0
	call	exit@PLT
.L6:
	add	DWORD PTR -44[rbp], 1
.L4:
	mov	eax, DWORD PTR -60[rbp]
	cmp	DWORD PTR -44[rbp], eax
	jl	.L12
	jmp	.L20
.L17:
	mov	eax, DWORD PTR -48[rbp]
	sub	eax, 256
	cmp	eax, 255
	ja	.L14
	mov	DWORD PTR -36[rbp], 1
.L14:
	cmp	DWORD PTR -36[rbp], 0
	jne	.L15
	lea	rdi, .LC8[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L15:
	mov	edi, 0
	call	exit@PLT
.L20:
	lea	rax, -48[rbp]
	mov	rdi, rax
	call	wait@PLT
	test	eax, eax
	jg	.L17
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	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	"20450827.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Enter the number of elements: \000"
	.align	2
.LC1:
	.ascii	"%d\000"
	.align	2
.LC2:
	.ascii	"%d\011\000"
	.align	2
.LC3:
	.ascii	"\012Enter the search query: \000"
	.align	2
.LC4:
	.ascii	"Enter the number of processes: \000"
	.global	__aeabi_idiv
	.align	2
.LC5:
	.ascii	"Failed to fork child proc %d\012\000"
	.align	2
.LC6:
	.ascii	"Child %d PID: %d ... Searching in Range: %d --- %d\012"
	.ascii	"\000"
	.align	2
.LC7:
	.ascii	"Found at index %d\012\000"
	.align	2
.LC8:
	.ascii	"Search query not found\000"
	.align	2
.LC9:
	.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	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #68
	ldr	r3, .L21
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-40]
	ldr	r0, .L21+4
	bl	printf
	sub	r3, fp, #60
	mov	r1, r3
	ldr	r0, .L21+8
	bl	__isoc99_scanf
	ldr	r3, [fp, #-60]
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-36]
	mov	r0, #0
	bl	time
	mov	r3, r0
	mov	r0, r3
	bl	srand
	mov	r3, #0
	str	r3, [fp, #-48]
	b	.L2
.L3:
	bl	rand
	mov	r1, r0
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-36]
	add	r0, r2, r3
	ldr	r3, .L21+12
	smull	r2, r3, r1, r3
	asr	r2, r3, #6
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #3
	sub	r2, r1, r3
	str	r2, [r0]
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-36]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L21+16
	bl	printf
	ldr	r3, [fp, #-48]
	add	r3, r3, #1
	str	r3, [fp, #-48]
.L2:
	ldr	r3, [fp, #-60]
	ldr	r2, [fp, #-48]
	cmp	r2, r3
	blt	.L3
	ldr	r0, .L21+20
	bl	printf
	sub	r3, fp, #56
	mov	r1, r3
	ldr	r0, .L21+8
	bl	__isoc99_scanf
	ldr	r0, .L21+24
	bl	printf
	sub	r3, fp, #64
	mov	r1, r3
	ldr	r0, .L21+8
	bl	__isoc99_scanf
	ldr	r3, [fp, #-60]
	ldr	r2, [fp, #-64]
	mov	r1, r2
	mov	r0, r3
	bl	__aeabi_idiv
	mov	r3, r0
	str	r3, [fp, #-32]
	mov	r3, #0
	str	r3, [fp, #-48]
	b	.L4
.L12:
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	bge	.L5
	ldr	r3, .L21+28
	ldr	r0, [r3]
	ldr	r3, [fp, #-48]
	add	r3, r3, #1
	mov	r2, r3
	ldr	r1, .L21+32
	bl	fprintf
	mov	r0, #0
	bl	exit
.L5:
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	bne	.L6
	ldr	r3, [fp, #-48]
	ldr	r2, [fp, #-32]
	mul	r3, r2, r3
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-64]
	sub	r3, r3, #1
	ldr	r2, [fp, #-48]
	cmp	r2, r3
	beq	.L7
	ldr	r3, [fp, #-48]
	add	r3, r3, #1
	ldr	r2, [fp, #-32]
	mul	r3, r2, r3
	b	.L8
.L7:
	ldr	r3, [fp, #-60]
.L8:
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-48]
	add	r4, r3, #1
	bl	getpid
	mov	r2, r0
	ldr	r3, [fp, #-20]
	str	r3, [sp]
	ldr	r3, [fp, #-24]
	mov	r1, r4
	ldr	r0, .L21+36
	bl	printf
	ldr	r3, [fp, #-24]
	str	r3, [fp, #-44]
	b	.L9
.L11:
	ldr	r3, [fp, #-44]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-36]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-56]
	cmp	r2, r3
	bne	.L10
	ldr	r1, [fp, #-44]
	ldr	r0, .L21+40
	bl	printf
	mov	r0, #1
	bl	exit
.L10:
	ldr	r3, [fp, #-44]
	add	r3, r3, #1
	str	r3, [fp, #-44]
.L9:
	ldr	r2, [fp, #-44]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	blt	.L11
	mov	r0, #0
	bl	exit
.L6:
	ldr	r3, [fp, #-48]
	add	r3, r3, #1
	str	r3, [fp, #-48]
.L4:
	ldr	r3, [fp, #-64]
	ldr	r2, [fp, #-48]
	cmp	r2, r3
	blt	.L12
	b	.L20
.L17:
	ldr	r3, [fp, #-52]
	sub	r3, r3, #256
	cmp	r3, #255
	bhi	.L14
	mov	r3, #1
	str	r3, [fp, #-40]
.L14:
	ldr	r3, [fp, #-40]
	cmp	r3, #0
	bne	.L15
	ldr	r0, .L21+44
	bl	puts
	mov	r0, #1
	bl	exit
.L15:
	mov	r0, #0
	bl	exit
.L20:
	sub	r3, fp, #52
	mov	r0, r3
	bl	wait
	mov	r3, r0
	cmp	r3, #0
	bgt	.L17
	mov	r3, #0
	ldr	r2, .L21
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L19
	bl	__stack_chk_fail
.L19:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L22:
	.align	2
.L21:
	.word	.LC9
	.word	.LC0
	.word	.LC1
	.word	274877907
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	stderr
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
