	.file	"630450.c"
	.intel_syntax noprefix
	.text
	.globl	server_fd
	.bss
	.align 4
	.type	server_fd, @object
	.size	server_fd, 4
server_fd:
	.zero	4
	.text
	.globl	ncurse_in
	.type	ncurse_in, @function
ncurse_in:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	call	initscr@PLT
	call	cbreak@PLT
	mov	rax, QWORD PTR stdscr[rip]
	mov	esi, 1
	mov	rdi, rax
	call	keypad@PLT
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	ncurse_in, .-ncurse_in
	.globl	ncurse_exit
	.type	ncurse_exit, @function
ncurse_exit:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	call	endwin@PLT
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	ncurse_exit, .-ncurse_exit
	.globl	timestamp
	.type	timestamp, @function
timestamp:
.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, 48
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	edi, 0
	call	time@PLT
	mov	QWORD PTR -32[rbp], rax
	lea	rax, -32[rbp]
	mov	rdi, rax
	call	localtime@PLT
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	asctime@PLT
	mov	QWORD PTR -16[rbp], rax
	mov	DWORD PTR -40[rbp], 0
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	strlen@PLT
	add	eax, 1
	mov	DWORD PTR -36[rbp], eax
	mov	DWORD PTR -40[rbp], 0
	jmp	.L4
.L6:
	mov	eax, DWORD PTR -40[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -16[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 10
	jne	.L5
	mov	eax, DWORD PTR -36[rbp]
	sub	eax, DWORD PTR -40[rbp]
	cdqe
	mov	edx, DWORD PTR -40[rbp]
	movsx	rdx, edx
	lea	rcx, 1[rdx]
	mov	rdx, QWORD PTR -16[rbp]
	lea	rsi, [rcx+rdx]
	mov	edx, DWORD PTR -40[rbp]
	movsx	rcx, edx
	mov	rdx, QWORD PTR -16[rbp]
	add	rcx, rdx
	mov	rdx, rax
	mov	rdi, rcx
	call	strncpy@PLT
.L5:
	add	DWORD PTR -40[rbp], 1
.L4:
	mov	eax, DWORD PTR -40[rbp]
	cmp	eax, DWORD PTR -36[rbp]
	jl	.L6
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	timestamp, .-timestamp
	.section	.rodata
.LC0:
	.string	"!q"
	.text
	.globl	sigint_handler
	.type	sigint_handler, @function
sigint_handler:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	DWORD PTR -4[rbp], edi
	mov	eax, DWORD PTR server_fd[rip]
	mov	ecx, 0
	mov	edx, 2
	lea	rsi, .LC0[rip]
	mov	edi, eax
	call	send@PLT
	mov	eax, DWORD PTR server_fd[rip]
	mov	edi, eax
	call	close@PLT
	mov	eax, 0
	call	ncurse_exit
	mov	edi, 0
	call	exit@PLT
	.cfi_endproc
.LFE9:
	.size	sigint_handler, .-sigint_handler
	.section	.rodata
.LC1:
	.string	"USAGE: <portno>"
.LC2:
	.string	""
	.align 8
.LC3:
	.string	"ERROR: Enter a valid port number"
.LC4:
	.string	"127.0.0.1"
.LC5:
	.string	"ERROR socket()"
	.align 8
.LC6:
	.string	"[%s] Connection request sent, waiting for server to response\n"
.LC7:
	.string	"ERROR connect()"
.LC8:
	.string	"ERROR recv()"
.LC9:
	.string	"[%s] %s"
	.align 8
.LC10:
	.string	"[%s] Remote Terminal is Ready\n"
	.align 8
.LC11:
	.string	"[%s] Type your message (hit ^C to quit):\n"
.LC12:
	.string	"you@server:~$"
.LC13:
	.string	"\nyou@server:~$"
.LC14:
	.string	"ERROR"
	.text
	.globl	main
	.type	main, @function
main:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 192
	mov	DWORD PTR -180[rbp], edi
	mov	QWORD PTR -192[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -180[rbp], 2
	je	.L11
	lea	rdi, .LC1[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L11:
	mov	rax, QWORD PTR -192[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rdx, .LC2[rip]
	cmp	rax, rdx
	je	.L12
	mov	rax, QWORD PTR -192[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L13
.L12:
	lea	rdi, .LC3[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L13:
	mov	rax, QWORD PTR -192[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -164[rbp], eax
	lea	rax, -144[rbp]
	mov	edx, 16
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	WORD PTR -144[rbp], 2
	mov	eax, DWORD PTR -164[rbp]
	movzx	eax, ax
	mov	edi, eax
	call	htons@PLT
	mov	WORD PTR -142[rbp], ax
	lea	rax, -144[rbp]
	add	rax, 4
	mov	rdx, rax
	lea	rsi, .LC4[rip]
	mov	edi, 2
	call	inet_pton@PLT
	mov	edx, 0
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR server_fd[rip], eax
	mov	DWORD PTR -168[rbp], 2
	mov	eax, DWORD PTR server_fd[rip]
	lea	rdx, -168[rbp]
	mov	r8d, 4
	mov	rcx, rdx
	mov	edx, 7
	mov	esi, 6
	mov	edi, eax
	call	setsockopt@PLT
	mov	eax, DWORD PTR server_fd[rip]
	test	eax, eax
	jns	.L14
	lea	rdi, .LC5[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L14:
	mov	eax, 0
	call	timestamp
	mov	rsi, rax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR server_fd[rip]
	lea	rcx, -144[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	connect@PLT
	mov	DWORD PTR -160[rbp], eax
	cmp	DWORD PTR -160[rbp], 0
	jns	.L15
	lea	rdi, .LC7[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L15:
	mov	eax, DWORD PTR server_fd[rip]
	lea	rsi, -112[rbp]
	mov	ecx, 0
	mov	edx, 100
	mov	edi, eax
	call	recv@PLT
	mov	DWORD PTR -156[rbp], eax
	cmp	DWORD PTR -156[rbp], 0
	jns	.L16
	lea	rdi, .LC8[rip]
	call	perror@PLT
	jmp	.L17
.L16:
	mov	eax, 0
	call	timestamp
	mov	rcx, rax
	lea	rax, -112[rbp]
	mov	rdx, rax
	mov	rsi, rcx
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
.L17:
	mov	eax, 0
	call	timestamp
	mov	rsi, rax
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	call	timestamp
	mov	rsi, rax
	lea	rdi, .LC11[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	call	ncurse_in
	lea	rdi, .LC12[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -152[rbp], 0
	mov	BYTE PTR -113[rbp], 0
	lea	rsi, sigint_handler[rip]
	mov	edi, 2
	call	signal@PLT
	mov	rax, QWORD PTR stdscr[rip]
	mov	esi, 1
	mov	rdi, rax
	call	nodelay@PLT
.L20:
	mov	rax, QWORD PTR stdscr[rip]
	mov	rdi, rax
	call	wgetch@PLT
	mov	BYTE PTR -169[rbp], al
	movzx	eax, BYTE PTR -169[rbp]
	cmp	al, -1
	je	.L20
	movzx	eax, BYTE PTR -169[rbp]
	cmp	al, 10
	jne	.L19
	mov	rax, QWORD PTR stdout[rip]
	mov	rdi, rax
	call	fflush@PLT
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	call	ncurse_in
.L19:
	mov	eax, DWORD PTR server_fd[rip]
	lea	rsi, -169[rbp]
	mov	ecx, 0
	mov	edx, 1
	mov	edi, eax
	call	send@PLT
	mov	DWORD PTR -148[rbp], eax
	cmp	DWORD PTR -148[rbp], -1
	jne	.L20
	lea	rdi, .LC14[rip]
	call	perror@PLT
	jmp	.L20
	.cfi_endproc
.LFE10:
	.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	"630450.c"
	.text
	.comm	server_fd,4,4
	.align	2
	.global	ncurse_in
	.syntax unified
	.arm
	.fpu softvfp
	.type	ncurse_in, %function
ncurse_in:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	bl	initscr
	bl	cbreak
	ldr	r3, .L2
	ldr	r3, [r3]
	mov	r1, #1
	mov	r0, r3
	bl	keypad
	nop
	pop	{fp, pc}
.L3:
	.align	2
.L2:
	.word	stdscr
	.size	ncurse_in, .-ncurse_in
	.align	2
	.global	ncurse_exit
	.syntax unified
	.arm
	.fpu softvfp
	.type	ncurse_exit, %function
ncurse_exit:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	bl	endwin
	nop
	pop	{fp, pc}
	.size	ncurse_exit, .-ncurse_exit
	.section	.rodata
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	timestamp
	.syntax unified
	.arm
	.fpu softvfp
	.type	timestamp, %function
timestamp:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	ldr	r3, .L11
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r0, #0
	bl	time
	mov	r3, r0
	str	r3, [fp, #-28]
	sub	r3, fp, #28
	mov	r0, r3
	bl	localtime
	str	r0, [fp, #-20]
	ldr	r0, [fp, #-20]
	bl	asctime
	str	r0, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-24]
	ldr	r0, [fp, #-16]
	bl	strlen
	mov	r3, r0
	add	r3, r3, #1
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-24]
	b	.L6
.L8:
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #10
	bne	.L7
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-16]
	add	r0, r2, r3
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	ldr	r2, [fp, #-16]
	add	r1, r2, r3
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-24]
	sub	r3, r2, r3
	mov	r2, r3
	bl	strncpy
.L7:
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L6:
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-12]
	cmp	r2, r3
	blt	.L8
	ldr	r3, [fp, #-16]
	ldr	r2, .L11
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L10
	bl	__stack_chk_fail
.L10:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L12:
	.align	2
.L11:
	.word	.LC0
	.size	timestamp, .-timestamp
	.section	.rodata
	.align	2
.LC1:
	.ascii	"!q\000"
	.text
	.align	2
	.global	sigint_handler
	.syntax unified
	.arm
	.fpu softvfp
	.type	sigint_handler, %function
sigint_handler:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	ldr	r3, .L14
	ldr	r0, [r3]
	mov	r3, #0
	mov	r2, #2
	ldr	r1, .L14+4
	bl	send
	ldr	r3, .L14
	ldr	r3, [r3]
	mov	r0, r3
	bl	close
	bl	ncurse_exit
	mov	r0, #0
	bl	exit
.L15:
	.align	2
.L14:
	.word	server_fd
	.word	.LC1
	.size	sigint_handler, .-sigint_handler
	.section	.rodata
	.align	2
.LC2:
	.ascii	"USAGE: <portno>\000"
	.align	2
.LC3:
	.ascii	"\000"
	.align	2
.LC4:
	.ascii	"ERROR: Enter a valid port number\000"
	.align	2
.LC5:
	.ascii	"127.0.0.1\000"
	.align	2
.LC6:
	.ascii	"ERROR socket()\000"
	.align	2
.LC7:
	.ascii	"[%s] Connection request sent, waiting for server to"
	.ascii	" response\012\000"
	.align	2
.LC8:
	.ascii	"ERROR connect()\000"
	.align	2
.LC9:
	.ascii	"ERROR recv()\000"
	.align	2
.LC10:
	.ascii	"[%s] %s\000"
	.align	2
.LC11:
	.ascii	"[%s] Remote Terminal is Ready\012\000"
	.align	2
.LC12:
	.ascii	"[%s] Type your message (hit ^C to quit):\012\000"
	.align	2
.LC13:
	.ascii	"you@server:~$\000"
	.align	2
.LC14:
	.ascii	"\012you@server:~$\000"
	.align	2
.LC15:
	.ascii	"ERROR\000"
	.align	2
.LC16:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 160
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #168
	str	r0, [fp, #-160]
	str	r1, [fp, #-164]
	ldr	r3, .L28
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-160]
	cmp	r3, #2
	beq	.L17
	ldr	r0, .L28+4
	bl	puts
	mov	r0, #1
	bl	exit
.L17:
	ldr	r3, [fp, #-164]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r2, .L28+8
	cmp	r3, r2
	beq	.L18
	ldr	r3, [fp, #-164]
	add	r3, r3, #4
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L19
.L18:
	ldr	r0, .L28+12
	bl	puts
	mov	r0, #1
	bl	exit
.L19:
	ldr	r3, [fp, #-164]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-148]
	sub	r3, fp, #128
	mov	r2, #16
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #2
	strh	r3, [fp, #-128]	@ movhi
	ldr	r3, [fp, #-148]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	mov	r0, r3
	bl	htons
	mov	r3, r0
	strh	r3, [fp, #-126]	@ movhi
	sub	r3, fp, #128
	add	r3, r3, #4
	mov	r2, r3
	ldr	r1, .L28+16
	mov	r0, #2
	bl	inet_pton
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	mov	r3, r0
	ldr	r2, .L28+20
	str	r3, [r2]
	mov	r3, #2
	str	r3, [fp, #-152]
	ldr	r3, .L28+20
	ldr	r0, [r3]
	sub	r3, fp, #152
	mov	r2, #4
	str	r2, [sp]
	mov	r2, #7
	mov	r1, #6
	bl	setsockopt
	ldr	r3, .L28+20
	ldr	r3, [r3]
	cmp	r3, #0
	bge	.L20
	ldr	r0, .L28+24
	bl	perror
	mov	r0, #1
	bl	exit
.L20:
	bl	timestamp
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L28+28
	bl	printf
	ldr	r3, .L28+20
	ldr	r3, [r3]
	sub	r1, fp, #128
	mov	r2, #16
	mov	r0, r3
	bl	connect
	str	r0, [fp, #-144]
	ldr	r3, [fp, #-144]
	cmp	r3, #0
	bge	.L21
	ldr	r0, .L28+32
	bl	perror
	mov	r0, #1
	bl	exit
.L21:
	ldr	r3, .L28+20
	ldr	r0, [r3]
	sub	r1, fp, #108
	mov	r3, #0
	mov	r2, #100
	bl	recv
	str	r0, [fp, #-140]
	ldr	r3, [fp, #-140]
	cmp	r3, #0
	bge	.L22
	ldr	r0, .L28+36
	bl	perror
	b	.L23
.L22:
	bl	timestamp
	mov	r1, r0
	sub	r3, fp, #108
	mov	r2, r3
	ldr	r0, .L28+40
	bl	printf
.L23:
	bl	timestamp
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L28+44
	bl	printf
	bl	timestamp
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L28+48
	bl	printf
	bl	ncurse_in
	ldr	r0, .L28+52
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-136]
	mov	r3, #0
	strb	r3, [fp, #-112]
	ldr	r1, .L28+56
	mov	r0, #2
	bl	signal
	ldr	r3, .L28+60
	ldr	r3, [r3]
	mov	r1, #1
	mov	r0, r3
	bl	nodelay
.L26:
	ldr	r3, .L28+60
	ldr	r3, [r3]
	mov	r0, r3
	bl	wgetch
	mov	r3, r0
	and	r3, r3, #255
	strb	r3, [fp, #-153]
	ldrb	r3, [fp, #-153]	@ zero_extendqisi2
	cmp	r3, #10
	bne	.L24
	ldr	r3, .L28+64
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	ldr	r0, .L28+68
	bl	printf
	bl	ncurse_in
.L24:
	ldr	r3, .L28+20
	ldr	r0, [r3]
	sub	r1, fp, #153
	mov	r3, #0
	mov	r2, #1
	bl	send
	str	r0, [fp, #-132]
	ldr	r3, [fp, #-132]
	cmn	r3, #1
	bne	.L26
	ldr	r0, .L28+72
	bl	perror
	b	.L26
.L29:
	.align	2
.L28:
	.word	.LC16
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	server_fd
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.word	sigint_handler
	.word	stdscr
	.word	stdout
	.word	.LC14
	.word	.LC15
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
