	.file	"154829655.c"
	.intel_syntax noprefix
	.text
	.globl	clear_input_stream
	.type	clear_input_stream, @function
clear_input_stream:
.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, 16
	nop
.L3:
	call	getchar@PLT
	mov	BYTE PTR -1[rbp], al
	cmp	BYTE PTR -1[rbp], 10
	je	.L4
	cmp	BYTE PTR -1[rbp], -1
	jne	.L3
.L4:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	clear_input_stream, .-clear_input_stream
	.section	.rodata
.LC0:
	.string	"\nenter the query: "
.LC1:
	.string	"\n[Server]: %d\n"
	.text
	.globl	cs_interation
	.type	cs_interation, @function
cs_interation:
.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, 144
	mov	DWORD PTR -132[rbp], edi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -116[rbp], 0
.L7:
	lea	rax, -112[rbp]
	mov	rdx, rax
	mov	eax, 0
	mov	ecx, 12
	mov	rdi, rdx
	rep stosq
	mov	rdx, rdi
	mov	DWORD PTR [rdx], eax
	add	rdx, 4
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -116[rbp], 0
	nop
.L6:
	call	getchar@PLT
	mov	ecx, eax
	mov	eax, DWORD PTR -116[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -116[rbp], edx
	movsx	rdx, eax
	mov	BYTE PTR -112[rbp+rdx], cl
	cdqe
	movzx	eax, BYTE PTR -112[rbp+rax]
	cmp	al, 10
	jne	.L6
	lea	rcx, -112[rbp]
	mov	eax, DWORD PTR -132[rbp]
	mov	edx, 100
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	DWORD PTR -120[rbp], 0
	lea	rcx, -120[rbp]
	mov	eax, DWORD PTR -132[rbp]
	mov	edx, 4
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	eax, DWORD PTR -120[rbp]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L7
	.cfi_endproc
.LFE7:
	.size	cs_interation, .-cs_interation
	.section	.rodata
.LC2:
	.string	"socket creation failed..."
.LC3:
	.string	"Socket successfully created.."
.LC4:
	.string	"127.0.0.1"
	.align 8
.LC5:
	.string	"connection with the server failed..."
.LC6:
	.string	"connected to the server"
	.text
	.globl	establish_connection
	.type	establish_connection, @function
establish_connection:
.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	edx, 0
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -36[rbp], eax
	cmp	DWORD PTR -36[rbp], -1
	jne	.L10
	lea	rdi, .LC2[rip]
	call	puts@PLT
	mov	edi, 0
	call	exit@PLT
.L10:
	lea	rdi, .LC3[rip]
	call	puts@PLT
	lea	rax, -32[rbp]
	mov	QWORD PTR [rax], 0
	mov	QWORD PTR 8[rax], 0
	mov	WORD PTR -32[rbp], 2
	lea	rdi, .LC4[rip]
	call	inet_addr@PLT
	mov	DWORD PTR -28[rbp], eax
	mov	edi, 8085
	call	htons@PLT
	mov	WORD PTR -30[rbp], ax
	lea	rcx, -32[rbp]
	mov	eax, DWORD PTR -36[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	connect@PLT
	test	eax, eax
	je	.L11
	lea	rdi, .LC5[rip]
	call	puts@PLT
	mov	edi, 0
	call	exit@PLT
.L11:
	lea	rdi, .LC6[rip]
	call	puts@PLT
	mov	eax, DWORD PTR -36[rbp]
	mov	edi, eax
	call	cs_interation
	mov	eax, DWORD PTR -36[rbp]
	mov	edi, eax
	call	close@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	establish_connection, .-establish_connection
	.globl	main
	.type	main, @function
main:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	eax, 0
	call	establish_connection
	mov	eax, 0
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.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	"154829655.c"
	.text
	.align	2
	.global	clear_input_stream
	.syntax unified
	.arm
	.fpu softvfp
	.type	clear_input_stream, %function
clear_input_stream:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	nop
.L2:
	bl	getchar
	mov	r3, r0
	strb	r3, [fp, #-5]
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #10
	bne	.L2
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	clear_input_stream, .-clear_input_stream
	.section	.rodata
	.align	2
.LC0:
	.ascii	"\012enter the query: \000"
	.align	2
.LC1:
	.ascii	"\012[Server]: %d\012\000"
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	cs_interation
	.syntax unified
	.arm
	.fpu softvfp
	.type	cs_interation, %function
cs_interation:
	@ args = 0, pretend = 0, frame = 120
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #120
	str	r0, [fp, #-120]
	ldr	r3, .L7
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-112]
.L5:
	sub	r3, fp, #108
	mov	r0, r3
	mov	r3, #100
	mov	r2, r3
	mov	r1, #0
	bl	memset
	ldr	r0, .L7+4
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-112]
	nop
.L4:
	bl	getchar
	mov	r1, r0
	ldr	r3, [fp, #-112]
	add	r2, r3, #1
	str	r2, [fp, #-112]
	and	r1, r1, #255
	sub	r2, fp, #4
	add	r2, r2, r3
	strb	r1, [r2, #-104]
	sub	r2, fp, #4
	add	r3, r2, r3
	ldrb	r3, [r3, #-104]	@ zero_extendqisi2
	cmp	r3, #10
	bne	.L4
	sub	r3, fp, #108
	mov	r2, #100
	mov	r1, r3
	ldr	r0, [fp, #-120]
	bl	write
	mov	r3, #0
	str	r3, [fp, #-116]
	sub	r3, fp, #116
	mov	r2, #4
	mov	r1, r3
	ldr	r0, [fp, #-120]
	bl	read
	ldr	r3, [fp, #-116]
	mov	r1, r3
	ldr	r0, .L7+8
	bl	printf
	b	.L5
.L8:
	.align	2
.L7:
	.word	.LC2
	.word	.LC0
	.word	.LC1
	.size	cs_interation, .-cs_interation
	.section	.rodata
	.align	2
.LC3:
	.ascii	"socket creation failed...\000"
	.align	2
.LC4:
	.ascii	"Socket successfully created..\000"
	.align	2
.LC5:
	.ascii	"127.0.0.1\000"
	.align	2
.LC6:
	.ascii	"connection with the server failed...\000"
	.align	2
.LC7:
	.ascii	"connected to the server\000"
	.align	2
.LC8:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	establish_connection
	.syntax unified
	.arm
	.fpu softvfp
	.type	establish_connection, %function
establish_connection:
	@ 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, .L13
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmn	r3, #1
	bne	.L10
	ldr	r0, .L13+4
	bl	puts
	mov	r0, #0
	bl	exit
.L10:
	ldr	r0, .L13+8
	bl	puts
	sub	r3, fp, #24
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2]
	str	r3, [r2, #4]
	str	r3, [r2, #8]
	str	r3, [r2, #12]
	mov	r3, #2
	strh	r3, [fp, #-24]	@ movhi
	ldr	r0, .L13+12
	bl	inet_addr
	mov	r3, r0
	str	r3, [fp, #-20]
	ldr	r0, .L13+16
	bl	htons
	mov	r3, r0
	strh	r3, [fp, #-22]	@ movhi
	sub	r3, fp, #24
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-28]
	bl	connect
	mov	r3, r0
	cmp	r3, #0
	beq	.L11
	ldr	r0, .L13+20
	bl	puts
	mov	r0, #0
	bl	exit
.L11:
	ldr	r0, .L13+24
	bl	puts
	ldr	r0, [fp, #-28]
	bl	cs_interation
	ldr	r0, [fp, #-28]
	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	.LC8
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	8085
	.word	.LC6
	.word	.LC7
	.size	establish_connection, .-establish_connection
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	bl	establish_connection
	mov	r3, #0
	mov	r0, r3
	pop	{fp, pc}
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
