	.file	"749228.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"ashish> "
.LC1:
	.string	"fgets"
.LC2:
	.string	"fork"
	.align 8
.LC3:
	.string	"Child exited due to signal = %d\n"
.LC4:
	.string	"Core Dump flag = %d\n"
.LC5:
	.string	"\n"
.LC6:
	.string	"Unknown command %s\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, 4096
	or	QWORD PTR [rsp], 0
	sub	rsp, 48
	mov	DWORD PTR -4132[rbp], edi
	mov	QWORD PTR -4144[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
.L6:
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rdx, QWORD PTR stdin[rip]
	lea	rax, -4112[rbp]
	mov	esi, 4096
	mov	rdi, rax
	call	fgets@PLT
	test	rax, rax
	jne	.L2
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	call	fork@PLT
	mov	DWORD PTR -4116[rbp], eax
	cmp	DWORD PTR -4116[rbp], -1
	jne	.L3
	lea	rdi, .LC2[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L3:
	cmp	DWORD PTR -4116[rbp], 0
	je	.L4
	lea	rcx, -4120[rbp]
	mov	eax, DWORD PTR -4116[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	edi, eax
	call	waitpid@PLT
	mov	eax, DWORD PTR -4120[rbp]
	and	eax, 127
	add	eax, 1
	sar	al
	test	al, al
	jle	.L6
	mov	eax, DWORD PTR -4120[rbp]
	and	eax, 127
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -4120[rbp]
	and	eax, 128
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L6
.L4:
	call	getpid@PLT
	mov	DWORD PTR -4116[rbp], eax
	lea	rax, -4112[rbp]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	call	strtok@PLT
	lea	rcx, -4112[rbp]
	lea	rax, -4112[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	rdi, rax
	mov	eax, 0
	call	execlp@PLT
	lea	rax, -4112[rbp]
	mov	rsi, rax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
	.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	"749228.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"ashish> \000"
	.align	2
.LC1:
	.ascii	"fgets\000"
	.align	2
.LC2:
	.ascii	"fork\000"
	.align	2
.LC3:
	.ascii	"Child exited due to signal = %d\012\000"
	.align	2
.LC4:
	.ascii	"Core Dump flag = %d\012\000"
	.align	2
.LC5:
	.ascii	"\012\000"
	.align	2
.LC6:
	.ascii	"Unknown command %s\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 = 4120
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #4096
	sub	sp, sp, #28
	sub	r3, fp, #4096
	sub	r3, r3, #12
	str	r0, [r3, #-20]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	str	r1, [r3, #-24]
	ldr	r3, .L8
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
.L6:
	ldr	r0, .L8+4
	bl	printf
	ldr	r3, .L8+8
	ldr	r2, [r3]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #8
	mov	r1, #4096
	mov	r0, r3
	bl	fgets
	mov	r3, r0
	cmp	r3, #0
	bne	.L2
	ldr	r0, .L8+12
	bl	perror
	mov	r0, #1
	bl	exit
.L2:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	bl	fork
	mov	r3, r0
	str	r3, [r4, #-12]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-12]
	cmn	r3, #1
	bne	.L3
	ldr	r0, .L8+16
	bl	perror
	mov	r0, #1
	bl	exit
.L3:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-12]
	cmp	r3, #0
	beq	.L4
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #16
	sub	r2, fp, #4096
	sub	r2, r2, #12
	mov	r0, r2
	mov	r2, #0
	mov	r1, r3
	ldr	r0, [r0, #-12]
	bl	waitpid
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-16]
	and	r3, r3, #255
	and	r3, r3, #127
	and	r3, r3, #255
	add	r3, r3, #1
	and	r3, r3, #255
	lsl	r3, r3, #24
	asr	r3, r3, #24
	asr	r3, r3, #1
	lsl	r3, r3, #24
	asr	r3, r3, #24
	cmp	r3, #0
	ble	.L6
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-16]
	and	r3, r3, #127
	mov	r1, r3
	ldr	r0, .L8+20
	bl	printf
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-16]
	and	r3, r3, #128
	mov	r1, r3
	ldr	r0, .L8+24
	bl	printf
	b	.L6
.L4:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	bl	getpid
	str	r0, [r4, #-12]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #8
	ldr	r1, .L8+28
	mov	r0, r3
	bl	strtok
	sub	r1, fp, #4096
	sub	r1, r1, #12
	sub	r1, r1, #8
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #8
	mov	r2, #0
	mov	r0, r3
	bl	execlp
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #8
	mov	r1, r3
	ldr	r0, .L8+32
	bl	printf
	mov	r0, #1
	bl	exit
.L9:
	.align	2
.L8:
	.word	.LC7
	.word	.LC0
	.word	stdin
	.word	.LC1
	.word	.LC2
	.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
