	.file	"12637460.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"\nSocket creation error."
.LC1:
	.string	"\nSocket created."
.LC2:
	.string	"\nBinding error."
.LC3:
	.string	"\nSocket binded."
.LC4:
	.string	"\nSocket listening."
.LC5:
	.string	"\nSocket accepting."
	.align 8
.LC6:
	.string	"Original Process, PID : %d && PPID : %d\n"
	.align 8
.LC7:
	.string	"Parent Process, PID : %d && PPID : %d\n"
.LC8:
	.string	"\n\nParent: "
.LC9:
	.string	"%s"
.LC10:
	.string	"\nMessage Sending Failed"
.LC11:
	.string	"BYE"
	.align 8
.LC12:
	.string	"Child Process, PID : %d && PPID : %d\n"
.LC13:
	.string	"\nMessage Recieving Failed"
.LC14:
	.string	"\nChild: "
	.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
	push	rbx
	sub	rsp, 200
	.cfi_offset 3, -24
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -204[rbp], 0
	mov	edx, 0
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -200[rbp], eax
	cmp	DWORD PTR -200[rbp], -1
	jne	.L2
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 0
	call	exit@PLT
.L2:
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	WORD PTR -176[rbp], 2
	mov	edi, 3388
	call	htons@PLT
	mov	WORD PTR -174[rbp], ax
	mov	edi, 0
	call	htonl@PLT
	mov	DWORD PTR -172[rbp], eax
	lea	rcx, -176[rbp]
	mov	eax, DWORD PTR -200[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	bind@PLT
	mov	DWORD PTR -196[rbp], eax
	cmp	DWORD PTR -196[rbp], -1
	jne	.L3
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 0
	call	exit@PLT
.L3:
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -200[rbp]
	mov	esi, 1
	mov	edi, eax
	call	listen@PLT
	mov	DWORD PTR -196[rbp], eax
	cmp	DWORD PTR -196[rbp], -1
	jne	.L4
	mov	eax, DWORD PTR -200[rbp]
	mov	edi, eax
	call	close@PLT
	mov	edi, 0
	call	exit@PLT
.L4:
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -208[rbp], 16
	lea	rdx, -208[rbp]
	lea	rcx, -160[rbp]
	mov	eax, DWORD PTR -200[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	accept@PLT
	mov	DWORD PTR -192[rbp], eax
	cmp	DWORD PTR -192[rbp], -1
	jne	.L5
	mov	eax, DWORD PTR -200[rbp]
	mov	edi, eax
	call	close@PLT
	mov	edi, 0
	call	exit@PLT
.L5:
	lea	rdi, .LC5[rip]
	call	puts@PLT
	call	getppid@PLT
	mov	ebx, eax
	call	getpid@PLT
	mov	edx, ebx
	mov	esi, eax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	call	fork@PLT
	mov	DWORD PTR -188[rbp], eax
.L12:
	cmp	DWORD PTR -188[rbp], 0
	jle	.L6
	call	getppid@PLT
	mov	ebx, eax
	call	getpid@PLT
	mov	edx, ebx
	mov	esi, eax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -80[rbp]
	mov	rsi, rax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	lea	rsi, -80[rbp]
	mov	eax, DWORD PTR -192[rbp]
	mov	ecx, 0
	mov	edx, 50
	mov	edi, eax
	call	send@PLT
	mov	DWORD PTR -180[rbp], eax
	cmp	DWORD PTR -180[rbp], -1
	jne	.L7
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -200[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -192[rbp]
	mov	edi, eax
	call	close@PLT
	mov	edi, 0
	call	exit@PLT
.L7:
	lea	rax, -80[rbp]
	lea	rsi, .LC11[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L12
	jmp	.L9
.L6:
	call	getppid@PLT
	mov	ebx, eax
	call	getpid@PLT
	mov	edx, ebx
	mov	esi, eax
	lea	rdi, .LC12[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rsi, -144[rbp]
	mov	eax, DWORD PTR -192[rbp]
	mov	ecx, 0
	mov	edx, 50
	mov	edi, eax
	call	recv@PLT
	mov	DWORD PTR -184[rbp], eax
	cmp	DWORD PTR -184[rbp], -1
	jne	.L10
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -200[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -192[rbp]
	mov	edi, eax
	call	close@PLT
	mov	edi, 0
	call	exit@PLT
.L10:
	lea	rax, -144[rbp]
	lea	rsi, .LC11[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L15
	lea	rdi, .LC14[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -144[rbp]
	mov	rdi, rax
	call	puts@PLT
	jmp	.L12
.L15:
	nop
.L9:
	mov	eax, DWORD PTR -192[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -200[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -24[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	mov	rbx, QWORD PTR -8[rbp]
	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	"12637460.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"\012Socket creation error.\000"
	.align	2
.LC1:
	.ascii	"\012Socket created.\000"
	.align	2
.LC2:
	.ascii	"\012Binding error.\000"
	.align	2
.LC3:
	.ascii	"\012Socket binded.\000"
	.align	2
.LC4:
	.ascii	"\012Socket listening.\000"
	.align	2
.LC5:
	.ascii	"\012Socket accepting.\000"
	.align	2
.LC6:
	.ascii	"Original Process, PID : %d && PPID : %d\012\000"
	.align	2
.LC7:
	.ascii	"Parent Process, PID : %d && PPID : %d\012\000"
	.align	2
.LC8:
	.ascii	"\012\012Parent: \000"
	.align	2
.LC9:
	.ascii	"%s\000"
	.align	2
.LC10:
	.ascii	"\012Message Sending Failed\000"
	.align	2
.LC11:
	.ascii	"BYE\000"
	.align	2
.LC12:
	.ascii	"Child Process, PID : %d && PPID : %d\012\000"
	.align	2
.LC13:
	.ascii	"\012Message Recieving Failed\000"
	.align	2
.LC14:
	.ascii	"\012Child: \000"
	.align	2
.LC15:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 176
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #180
	ldr	r3, .L16
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-180]
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-176]
	ldr	r3, [fp, #-176]
	cmn	r3, #1
	bne	.L2
	ldr	r0, .L16+4
	bl	printf
	mov	r0, #0
	bl	exit
.L2:
	ldr	r0, .L16+8
	bl	printf
	mov	r3, #2
	strh	r3, [fp, #-152]	@ movhi
	ldr	r0, .L16+12
	bl	htons
	mov	r3, r0
	strh	r3, [fp, #-150]	@ movhi
	mov	r0, #0
	bl	htonl
	mov	r3, r0
	str	r3, [fp, #-148]
	sub	r3, fp, #152
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-176]
	bl	bind
	str	r0, [fp, #-172]
	ldr	r3, [fp, #-172]
	cmn	r3, #1
	bne	.L3
	ldr	r0, .L16+16
	bl	printf
	mov	r0, #0
	bl	exit
.L3:
	ldr	r0, .L16+20
	bl	printf
	mov	r1, #1
	ldr	r0, [fp, #-176]
	bl	listen
	str	r0, [fp, #-172]
	ldr	r3, [fp, #-172]
	cmn	r3, #1
	bne	.L4
	ldr	r0, [fp, #-176]
	bl	close
	mov	r0, #0
	bl	exit
.L4:
	ldr	r0, .L16+24
	bl	printf
	mov	r3, #16
	str	r3, [fp, #-184]
	sub	r2, fp, #184
	sub	r3, fp, #136
	mov	r1, r3
	ldr	r0, [fp, #-176]
	bl	accept
	str	r0, [fp, #-168]
	ldr	r3, [fp, #-168]
	cmn	r3, #1
	bne	.L5
	ldr	r0, [fp, #-176]
	bl	close
	mov	r0, #0
	bl	exit
.L5:
	ldr	r0, .L16+28
	bl	puts
	bl	getpid
	mov	r4, r0
	bl	getppid
	mov	r3, r0
	mov	r2, r3
	mov	r1, r4
	ldr	r0, .L16+32
	bl	printf
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-164]
.L12:
	ldr	r3, [fp, #-164]
	cmp	r3, #0
	ble	.L6
	bl	getpid
	mov	r4, r0
	bl	getppid
	mov	r3, r0
	mov	r2, r3
	mov	r1, r4
	ldr	r0, .L16+36
	bl	printf
	ldr	r0, .L16+40
	bl	printf
	sub	r3, fp, #68
	mov	r1, r3
	ldr	r0, .L16+44
	bl	__isoc99_scanf
	sub	r1, fp, #68
	mov	r3, #0
	mov	r2, #50
	ldr	r0, [fp, #-168]
	bl	send
	str	r0, [fp, #-156]
	ldr	r3, [fp, #-156]
	cmn	r3, #1
	bne	.L7
	ldr	r0, .L16+48
	bl	printf
	ldr	r0, [fp, #-176]
	bl	close
	ldr	r0, [fp, #-168]
	bl	close
	mov	r0, #0
	bl	exit
.L7:
	sub	r3, fp, #68
	ldr	r1, .L16+52
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L12
	b	.L9
.L6:
	bl	getpid
	mov	r4, r0
	bl	getppid
	mov	r3, r0
	mov	r2, r3
	mov	r1, r4
	ldr	r0, .L16+56
	bl	printf
	sub	r1, fp, #120
	mov	r3, #0
	mov	r2, #50
	ldr	r0, [fp, #-168]
	bl	recv
	str	r0, [fp, #-160]
	ldr	r3, [fp, #-160]
	cmn	r3, #1
	bne	.L10
	ldr	r0, .L16+60
	bl	printf
	ldr	r0, [fp, #-176]
	bl	close
	ldr	r0, [fp, #-168]
	bl	close
	mov	r0, #0
	bl	exit
.L10:
	sub	r3, fp, #120
	ldr	r1, .L16+52
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L15
	ldr	r0, .L16+64
	bl	printf
	sub	r3, fp, #120
	mov	r0, r3
	bl	puts
	b	.L12
.L15:
	nop
.L9:
	ldr	r0, [fp, #-168]
	bl	close
	ldr	r0, [fp, #-176]
	bl	close
	mov	r3, #0
	ldr	r2, .L16
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L14
	bl	__stack_chk_fail
.L14:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L17:
	.align	2
.L16:
	.word	.LC15
	.word	.LC0
	.word	.LC1
	.word	3388
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
