	.file	"28261572.c"
	.intel_syntax noprefix
	.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, 32
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -16[rbp]
	mov	rdi, rax
	mov	eax, 0
	call	pipe@PLT
	test	eax, eax
	jns	.L2
	call	fork@PLT
	mov	DWORD PTR -20[rbp], eax
.L2:
	cmp	DWORD PTR -20[rbp], 0
	jne	.L3
	mov	eax, DWORD PTR -12[rbp]
	mov	edi, eax
	mov	eax, 0
	call	close@PLT
	mov	eax, DWORD PTR -16[rbp]
	mov	edi, eax
	call	child
	jmp	.L4
.L3:
	mov	eax, DWORD PTR -16[rbp]
	mov	edi, eax
	mov	eax, 0
	call	close@PLT
	mov	eax, DWORD PTR -12[rbp]
	mov	edi, eax
	call	parent
.L4:
	mov	eax, 0
	mov	rdx, QWORD PTR -8[rbp]
	sub	rdx, QWORD PTR fs:40
	je	.L6
	call	__stack_chk_fail@PLT
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
.LC0:
	.string	"enter a number"
.LC1:
	.string	"%d"
	.text
	.globl	parent
	.type	parent, @function
parent:
.LFB7:
	.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	DWORD PTR -20[rbp], edi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -12[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	DWORD PTR -16[rbp], 2
	jmp	.L8
.L9:
	lea	rcx, -16[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	edx, 4
	mov	rsi, rcx
	mov	edi, eax
	mov	eax, 0
	call	write@PLT
	mov	eax, DWORD PTR -16[rbp]
	add	eax, 1
	mov	DWORD PTR -16[rbp], eax
.L8:
	mov	edx, DWORD PTR -16[rbp]
	mov	eax, DWORD PTR -12[rbp]
	cmp	edx, eax
	jle	.L9
	mov	eax, DWORD PTR -20[rbp]
	mov	edi, eax
	mov	eax, 0
	call	close@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	parent, .-parent
	.globl	child
	.type	child, @function
child:
.LFB8:
	.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	DWORD PTR -20[rbp], edi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	jmp	.L12
.L13:
	mov	eax, DWORD PTR -12[rbp]
	mov	edi, eax
	call	isprime
	test	eax, eax
	je	.L12
	mov	eax, DWORD PTR -12[rbp]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
.L12:
	lea	rcx, -12[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	edx, 4
	mov	rsi, rcx
	mov	edi, eax
	mov	eax, 0
	call	read@PLT
	test	eax, eax
	jne	.L13
	mov	eax, DWORD PTR -20[rbp]
	mov	edi, eax
	mov	eax, 0
	call	close@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	child, .-child
	.globl	isprime
	.type	isprime, @function
isprime:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -20[rbp], edi
	mov	DWORD PTR -4[rbp], 2
	jmp	.L16
.L19:
	mov	eax, DWORD PTR -20[rbp]
	cdq
	idiv	DWORD PTR -4[rbp]
	mov	eax, edx
	test	eax, eax
	jne	.L17
	mov	eax, 0
	jmp	.L18
.L17:
	add	DWORD PTR -4[rbp], 2
.L16:
	mov	eax, DWORD PTR -20[rbp]
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	cmp	DWORD PTR -4[rbp], eax
	jle	.L19
	mov	eax, 1
.L18:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	isprime, .-isprime
	.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	"28261572.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	ldr	r3, .L7
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #16
	mov	r0, r3
	bl	pipe
	mov	r3, r0
	cmp	r3, #0
	bge	.L2
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-20]
.L2:
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L3
	ldr	r3, [fp, #-12]
	mov	r0, r3
	bl	close
	ldr	r3, [fp, #-16]
	mov	r0, r3
	bl	child
	b	.L4
.L3:
	ldr	r3, [fp, #-16]
	mov	r0, r3
	bl	close
	ldr	r3, [fp, #-12]
	mov	r0, r3
	bl	parent
.L4:
	mov	r3, #0
	ldr	r2, .L7
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L6
	bl	__stack_chk_fail
.L6:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L8:
	.align	2
.L7:
	.word	.LC0
	.size	main, .-main
	.section	.rodata
	.align	2
.LC1:
	.ascii	"enter a number\000"
	.align	2
.LC2:
	.ascii	"%d\000"
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	parent
	.syntax unified
	.arm
	.fpu softvfp
	.type	parent, %function
parent:
	@ 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, .L13
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, .L13+4
	bl	printf
	sub	r3, fp, #12
	mov	r1, r3
	ldr	r0, .L13+8
	bl	__isoc99_scanf
	mov	r3, #2
	str	r3, [fp, #-16]
	b	.L10
.L11:
	sub	r3, fp, #16
	mov	r2, #4
	mov	r1, r3
	ldr	r0, [fp, #-24]
	bl	write
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L10:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-12]
	cmp	r2, r3
	ble	.L11
	ldr	r0, [fp, #-24]
	bl	close
	nop
	ldr	r3, .L13
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L12
	bl	__stack_chk_fail
.L12:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L14:
	.align	2
.L13:
	.word	.LC3
	.word	.LC1
	.word	.LC2
	.size	parent, .-parent
	.section	.rodata
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	child
	.syntax unified
	.arm
	.fpu softvfp
	.type	child, %function
child:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	ldr	r3, .L19
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	b	.L16
.L17:
	ldr	r3, [fp, #-12]
	mov	r0, r3
	bl	isprime
	mov	r3, r0
	cmp	r3, #0
	beq	.L16
	ldr	r3, [fp, #-12]
	mov	r1, r3
	ldr	r0, .L19+4
	bl	printf
.L16:
	sub	r3, fp, #12
	mov	r2, #4
	mov	r1, r3
	ldr	r0, [fp, #-16]
	bl	read
	mov	r3, r0
	cmp	r3, #0
	bne	.L17
	ldr	r0, [fp, #-16]
	bl	close
	nop
	ldr	r3, .L19
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L18
	bl	__stack_chk_fail
.L18:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L20:
	.align	2
.L19:
	.word	.LC4
	.word	.LC2
	.size	child, .-child
	.global	__aeabi_idivmod
	.align	2
	.global	isprime
	.syntax unified
	.arm
	.fpu softvfp
	.type	isprime, %function
isprime:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	mov	r3, #2
	str	r3, [fp, #-8]
	b	.L22
.L25:
	ldr	r3, [fp, #-16]
	ldr	r1, [fp, #-8]
	mov	r0, r3
	bl	__aeabi_idivmod
	mov	r3, r1
	cmp	r3, #0
	bne	.L23
	mov	r3, #0
	b	.L24
.L23:
	ldr	r3, [fp, #-8]
	add	r3, r3, #2
	str	r3, [fp, #-8]
.L22:
	ldr	r3, [fp, #-16]
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	mov	r2, r3
	ldr	r3, [fp, #-8]
	cmp	r3, r2
	ble	.L25
	mov	r3, #1
.L24:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	isprime, .-isprime
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
