	.file	"19326.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"Error! Pass IP addr and port number as an argument"
	.align 8
.LC1:
	.string	"Error! Could not create socket!"
.LC2:
	.string	"Error! Invalid address"
.LC3:
	.string	"Error! Connection failed"
	.align 8
.LC4:
	.string	"Enter a query in the form <operand> <operator> <operand>:"
.LC5:
	.string	"Result: %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, 1088
	mov	DWORD PTR -1076[rbp], edi
	mov	QWORD PTR -1088[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -1076[rbp], 2
	jg	.L2
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	eax, 1
	jmp	.L7
.L2:
	mov	edx, 0
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -1064[rbp], eax
	cmp	DWORD PTR -1064[rbp], 0
	jns	.L4
	lea	rdi, .LC1[rip]
	call	puts@PLT
	mov	eax, 1
	jmp	.L7
.L4:
	mov	WORD PTR -1056[rbp], 2
	mov	rax, QWORD PTR -1088[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	movzx	eax, ax
	mov	edi, eax
	call	htons@PLT
	mov	WORD PTR -1054[rbp], ax
	mov	rax, QWORD PTR -1088[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rdx, -1056[rbp]
	add	rdx, 4
	mov	rsi, rax
	mov	edi, 2
	call	inet_pton@PLT
	test	eax, eax
	jns	.L5
	lea	rdi, .LC2[rip]
	call	puts@PLT
	mov	eax, 1
	jmp	.L7
.L5:
	lea	rcx, -1056[rbp]
	mov	eax, DWORD PTR -1064[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	connect@PLT
	test	eax, eax
	je	.L6
	lea	rdi, .LC3[rip]
	call	puts@PLT
	mov	eax, 1
	jmp	.L7
.L6:
	lea	rdi, .LC4[rip]
	call	puts@PLT
	mov	rdx, QWORD PTR stdin[rip]
	lea	rax, -1040[rbp]
	mov	esi, 1023
	mov	rdi, rax
	call	fgets@PLT
	lea	rsi, -1040[rbp]
	mov	eax, DWORD PTR -1064[rbp]
	mov	ecx, 0
	mov	edx, 1024
	mov	edi, eax
	call	send@PLT
	lea	rcx, -1040[rbp]
	mov	eax, DWORD PTR -1064[rbp]
	mov	edx, 1024
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -1060[rbp], eax
	mov	eax, DWORD PTR -1060[rbp]
	cdqe
	mov	BYTE PTR -1040[rbp+rax], 0
	lea	rax, -1040[rbp]
	mov	rsi, rax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
.L7:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	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	"19326.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Error! Pass IP addr and port number as an argument\000"
	.align	2
.LC1:
	.ascii	"Error! Could not create socket!\000"
	.align	2
.LC2:
	.ascii	"Error! Invalid address\000"
	.align	2
.LC3:
	.ascii	"Error! Connection failed\000"
	.align	2
.LC4:
	.ascii	"Enter a query in the form <operand> <operator> <ope"
	.ascii	"rand>:\000"
	.align	2
.LC5:
	.ascii	"Result: %s\012\000"
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 1064
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1056
	sub	sp, sp, #8
	str	r0, [fp, #-1064]
	str	r1, [fp, #-1068]
	ldr	r3, .L9
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-1064]
	cmp	r3, #2
	bgt	.L2
	ldr	r0, .L9+4
	bl	puts
	mov	r3, #1
	b	.L7
.L2:
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-1056]
	ldr	r3, [fp, #-1056]
	cmp	r3, #0
	bge	.L4
	ldr	r0, .L9+8
	bl	puts
	mov	r3, #1
	b	.L7
.L4:
	sub	r3, fp, #4
	sub	r3, r3, #1040
	sub	r3, r3, #4
	mov	r2, #2
	strh	r2, [r3]	@ movhi
	ldr	r3, [fp, #-1068]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r3, r0
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	mov	r0, r3
	bl	htons
	mov	r3, r0
	mov	r2, r3
	sub	r3, fp, #4
	sub	r3, r3, #1040
	sub	r3, r3, #4
	strh	r2, [r3, #2]	@ movhi
	ldr	r3, [fp, #-1068]
	add	r3, r3, #4
	ldr	r1, [r3]
	sub	r3, fp, #1040
	sub	r3, r3, #4
	sub	r3, r3, #4
	add	r3, r3, #4
	mov	r2, r3
	mov	r0, #2
	bl	inet_pton
	mov	r3, r0
	cmp	r3, #0
	bge	.L5
	ldr	r0, .L9+12
	bl	puts
	mov	r3, #1
	b	.L7
.L5:
	sub	r3, fp, #1040
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-1056]
	bl	connect
	mov	r3, r0
	cmp	r3, #0
	beq	.L6
	ldr	r0, .L9+16
	bl	puts
	mov	r3, #1
	b	.L7
.L6:
	ldr	r0, .L9+20
	bl	puts
	ldr	r3, .L9+24
	ldr	r2, [r3]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r1, .L9+28
	mov	r0, r3
	bl	fgets
	sub	r1, fp, #1024
	sub	r1, r1, #4
	sub	r1, r1, #4
	mov	r3, #0
	mov	r2, #1024
	ldr	r0, [fp, #-1056]
	bl	send
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #1024
	mov	r1, r3
	ldr	r0, [fp, #-1056]
	bl	read
	str	r0, [fp, #-1052]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r2, [fp, #-1052]
	add	r3, r3, r2
	mov	r2, #0
	strb	r2, [r3]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, .L9+32
	bl	printf
	mov	r3, #0
.L7:
	ldr	r2, .L9
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L8
	bl	__stack_chk_fail
.L8:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L10:
	.align	2
.L9:
	.word	.LC6
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	stdin
	.word	1023
	.word	.LC5
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
