	.file	"511682.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"w"
.LC1:
	.string	"prime_nos.txt"
.LC2:
	.string	"Enter the range (x-y): "
.LC3:
	.string	"%d-%d"
	.align 8
.LC4:
	.string	"Searching Primes in range %d --- %d\n"
	.align 8
.LC5:
	.string	"Enter number of child processes: "
.LC6:
	.string	"%d"
.LC7:
	.string	"Invalid range"
	.align 8
.LC8:
	.string	"Child %d PID: %d ... Searching in Range: %d --- %d\n"
.LC9:
	.string	"a"
.LC10:
	.string	"%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
	lea	rsi, .LC0[rip]
	lea	rdi, .LC1[rip]
	call	fopen@PLT
	mov	QWORD PTR -16[rbp], rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdx, -60[rbp]
	lea	rax, -64[rbp]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	ecx, DWORD PTR -60[rbp]
	mov	edx, DWORD PTR -64[rbp]
	mov	rax, QWORD PTR -16[rbp]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	fclose@PLT
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -56[rbp]
	mov	rsi, rax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -60[rbp]
	mov	edx, DWORD PTR -64[rbp]
	sub	eax, edx
	mov	ecx, DWORD PTR -56[rbp]
	cdq
	idiv	ecx
	mov	DWORD PTR -32[rbp], eax
	mov	edx, DWORD PTR -60[rbp]
	mov	eax, DWORD PTR -64[rbp]
	cmp	edx, eax
	jg	.L2
	lea	rdi, .LC7[rip]
	call	puts@PLT
	mov	edi, 0
	call	exit@PLT
.L2:
	mov	DWORD PTR -48[rbp], 0
	jmp	.L3
.L14:
	call	fork@PLT
	mov	DWORD PTR -28[rbp], eax
	cmp	DWORD PTR -28[rbp], 0
	jne	.L4
	mov	eax, DWORD PTR -48[rbp]
	imul	eax, DWORD PTR -32[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -64[rbp]
	add	eax, edx
	mov	DWORD PTR -24[rbp], eax
	mov	eax, DWORD PTR -56[rbp]
	sub	eax, 1
	cmp	DWORD PTR -48[rbp], eax
	je	.L5
	mov	edx, DWORD PTR -24[rbp]
	mov	eax, DWORD PTR -32[rbp]
	add	eax, edx
	add	eax, 1
	jmp	.L6
.L5:
	mov	eax, DWORD PTR -60[rbp]
	add	eax, 1
.L6:
	mov	DWORD PTR -20[rbp], eax
	call	getpid@PLT
	mov	edx, eax
	mov	eax, DWORD PTR -48[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, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rsi, .LC9[rip]
	lea	rdi, .LC1[rip]
	call	fopen@PLT
	mov	QWORD PTR -16[rbp], rax
	mov	eax, DWORD PTR -24[rbp]
	mov	DWORD PTR -44[rbp], eax
	jmp	.L7
.L13:
	mov	DWORD PTR -40[rbp], 0
	mov	DWORD PTR -36[rbp], 2
	jmp	.L8
.L11:
	mov	eax, DWORD PTR -44[rbp]
	cdq
	idiv	DWORD PTR -36[rbp]
	mov	eax, edx
	test	eax, eax
	jne	.L9
	mov	DWORD PTR -40[rbp], 1
	jmp	.L10
.L9:
	add	DWORD PTR -36[rbp], 1
.L8:
	mov	eax, DWORD PTR -44[rbp]
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	cmp	DWORD PTR -36[rbp], eax
	jle	.L11
.L10:
	cmp	DWORD PTR -40[rbp], 0
	jne	.L12
	mov	edx, DWORD PTR -44[rbp]
	mov	rax, QWORD PTR -16[rbp]
	lea	rsi, .LC10[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
.L12:
	add	DWORD PTR -44[rbp], 1
.L7:
	mov	eax, DWORD PTR -44[rbp]
	cmp	eax, DWORD PTR -20[rbp]
	jl	.L13
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	edi, 0
	call	exit@PLT
.L4:
	add	DWORD PTR -48[rbp], 1
.L3:
	mov	eax, DWORD PTR -56[rbp]
	cmp	DWORD PTR -48[rbp], eax
	jl	.L14
	nop
.L15:
	lea	rax, -52[rbp]
	mov	edx, 0
	mov	rsi, rax
	mov	edi, -1
	call	waitpid@PLT
	test	eax, eax
	jg	.L15
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	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	"511682.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"w\000"
	.align	2
.LC1:
	.ascii	"prime_nos.txt\000"
	.align	2
.LC2:
	.ascii	"Enter the range (x-y): \000"
	.align	2
.LC3:
	.ascii	"%d-%d\000"
	.align	2
.LC4:
	.ascii	"Searching Primes in range %d --- %d\012\000"
	.align	2
.LC5:
	.ascii	"Enter number of child processes: \000"
	.align	2
.LC6:
	.ascii	"%d\000"
	.global	__aeabi_idiv
	.align	2
.LC7:
	.ascii	"Invalid range\000"
	.align	2
.LC8:
	.ascii	"Child %d PID: %d ... Searching in Range: %d --- %d\012"
	.ascii	"\000"
	.align	2
.LC9:
	.ascii	"a\000"
	.global	__aeabi_idivmod
	.align	2
.LC10:
	.ascii	"%d\012\000"
	.align	2
.LC11:
	.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, .L18
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r1, .L18+4
	ldr	r0, .L18+8
	bl	fopen
	str	r0, [fp, #-36]
	ldr	r0, .L18+12
	bl	printf
	sub	r2, fp, #64
	sub	r3, fp, #68
	mov	r1, r3
	ldr	r0, .L18+16
	bl	__isoc99_scanf
	ldr	r2, [fp, #-68]
	ldr	r3, [fp, #-64]
	ldr	r1, .L18+20
	ldr	r0, [fp, #-36]
	bl	fprintf
	ldr	r0, [fp, #-36]
	bl	fclose
	ldr	r0, .L18+24
	bl	printf
	sub	r3, fp, #60
	mov	r1, r3
	ldr	r0, .L18+28
	bl	__isoc99_scanf
	ldr	r2, [fp, #-64]
	ldr	r3, [fp, #-68]
	sub	r3, r2, r3
	ldr	r2, [fp, #-60]
	mov	r1, r2
	mov	r0, r3
	bl	__aeabi_idiv
	mov	r3, r0
	str	r3, [fp, #-32]
	ldr	r2, [fp, #-64]
	ldr	r3, [fp, #-68]
	cmp	r2, r3
	bgt	.L2
	ldr	r0, .L18+32
	bl	puts
	mov	r0, #0
	bl	exit
.L2:
	mov	r3, #0
	str	r3, [fp, #-52]
	b	.L3
.L14:
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	bne	.L4
	ldr	r3, [fp, #-52]
	ldr	r2, [fp, #-32]
	mul	r2, r3, r2
	ldr	r3, [fp, #-68]
	add	r3, r2, r3
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-60]
	sub	r3, r3, #1
	ldr	r2, [fp, #-52]
	cmp	r2, r3
	beq	.L5
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-32]
	add	r3, r2, r3
	add	r3, r3, #1
	b	.L6
.L5:
	ldr	r3, [fp, #-64]
	add	r3, r3, #1
.L6:
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-52]
	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, .L18+36
	bl	printf
	ldr	r1, .L18+40
	ldr	r0, .L18+8
	bl	fopen
	str	r0, [fp, #-36]
	ldr	r3, [fp, #-24]
	str	r3, [fp, #-48]
	b	.L7
.L13:
	mov	r3, #0
	str	r3, [fp, #-44]
	mov	r3, #2
	str	r3, [fp, #-40]
	b	.L8
.L11:
	ldr	r3, [fp, #-48]
	ldr	r1, [fp, #-40]
	mov	r0, r3
	bl	__aeabi_idivmod
	mov	r3, r1
	cmp	r3, #0
	bne	.L9
	mov	r3, #1
	str	r3, [fp, #-44]
	b	.L10
.L9:
	ldr	r3, [fp, #-40]
	add	r3, r3, #1
	str	r3, [fp, #-40]
.L8:
	ldr	r3, [fp, #-48]
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	mov	r2, r3
	ldr	r3, [fp, #-40]
	cmp	r3, r2
	ble	.L11
.L10:
	ldr	r3, [fp, #-44]
	cmp	r3, #0
	bne	.L12
	ldr	r2, [fp, #-48]
	ldr	r1, .L18+44
	ldr	r0, [fp, #-36]
	bl	fprintf
.L12:
	ldr	r3, [fp, #-48]
	add	r3, r3, #1
	str	r3, [fp, #-48]
.L7:
	ldr	r2, [fp, #-48]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	blt	.L13
	ldr	r0, [fp, #-36]
	bl	fclose
	mov	r0, #0
	bl	exit
.L4:
	ldr	r3, [fp, #-52]
	add	r3, r3, #1
	str	r3, [fp, #-52]
.L3:
	ldr	r3, [fp, #-60]
	ldr	r2, [fp, #-52]
	cmp	r2, r3
	blt	.L14
	nop
.L15:
	sub	r3, fp, #56
	mov	r2, #0
	mov	r1, r3
	mvn	r0, #0
	bl	waitpid
	mov	r3, r0
	cmp	r3, #0
	bgt	.L15
	mov	r3, #0
	ldr	r2, .L18
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L17
	bl	__stack_chk_fail
.L17:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L19:
	.align	2
.L18:
	.word	.LC11
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
