	.file	"99825.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"Usage : %s [num1] [num2] [op]\n"
.LC1:
	.string	"127.0.0.1"
.LC2:
	.string	"fail to connect"
.LC3:
	.string	"CALC Error %d\n"
.LC4:
	.string	"%d %c %d = %d\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
	push	r13
	push	r12
	push	rbx
	sub	rsp, 104
	.cfi_offset 13, -24
	.cfi_offset 12, -32
	.cfi_offset 3, -40
	mov	DWORD PTR -116[rbp], edi
	mov	QWORD PTR -128[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -40[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -116[rbp], 4
	je	.L2
	mov	rax, QWORD PTR -128[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 1
	jmp	.L9
.L2:
	lea	rax, -96[rbp]
	mov	edx, 20
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	rax, QWORD PTR -128[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -96[rbp], eax
	mov	rax, QWORD PTR -128[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -92[rbp], eax
	mov	rax, QWORD PTR -128[rbp]
	add	rax, 24
	mov	rax, QWORD PTR [rax]
	movzx	eax, BYTE PTR [rax]
	mov	BYTE PTR -88[rbp], al
	mov	edx, 6
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -112[rbp], eax
	cmp	DWORD PTR -112[rbp], -1
	jne	.L4
	mov	eax, 1
	jmp	.L9
.L4:
	mov	WORD PTR -64[rbp], 2
	mov	edi, 3600
	call	htons@PLT
	mov	WORD PTR -62[rbp], ax
	lea	rdi, .LC1[rip]
	call	inet_addr@PLT
	mov	DWORD PTR -60[rbp], eax
	lea	rcx, -64[rbp]
	mov	eax, DWORD PTR -112[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	connect@PLT
	cmp	eax, -1
	jne	.L5
	lea	rdi, .LC2[rip]
	call	puts@PLT
	mov	eax, DWORD PTR -112[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, 1
	jmp	.L9
.L5:
	mov	DWORD PTR -108[rbp], 20
	mov	eax, DWORD PTR -96[rbp]
	mov	edi, eax
	call	htonl@PLT
	mov	DWORD PTR -96[rbp], eax
	mov	eax, DWORD PTR -92[rbp]
	mov	edi, eax
	call	htonl@PLT
	mov	DWORD PTR -92[rbp], eax
	mov	eax, DWORD PTR -108[rbp]
	movsx	rdx, eax
	lea	rcx, -96[rbp]
	mov	eax, DWORD PTR -112[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	DWORD PTR -104[rbp], eax
	mov	eax, DWORD PTR -104[rbp]
	cmp	eax, DWORD PTR -108[rbp]
	je	.L6
	mov	eax, 1
	jmp	.L9
.L6:
	mov	eax, DWORD PTR -108[rbp]
	movsx	rdx, eax
	lea	rcx, -96[rbp]
	mov	eax, DWORD PTR -112[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -100[rbp], eax
	mov	eax, DWORD PTR -100[rbp]
	cmp	eax, DWORD PTR -108[rbp]
	je	.L7
	mov	eax, 1
	jmp	.L9
.L7:
	movzx	eax, WORD PTR -80[rbp]
	test	ax, ax
	setne	al
	movzx	eax, al
	mov	edi, eax
	call	ntohs@PLT
	test	ax, ax
	je	.L8
	movzx	eax, WORD PTR -80[rbp]
	movzx	eax, ax
	mov	edi, eax
	call	ntohs@PLT
	movzx	eax, ax
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
.L8:
	mov	eax, DWORD PTR -84[rbp]
	mov	edi, eax
	call	ntohl@PLT
	mov	r13d, eax
	mov	eax, DWORD PTR -92[rbp]
	mov	edi, eax
	call	ntohl@PLT
	mov	r12d, eax
	movzx	eax, BYTE PTR -88[rbp]
	movsx	ebx, al
	mov	eax, DWORD PTR -96[rbp]
	mov	edi, eax
	call	ntohl@PLT
	mov	r8d, r13d
	mov	ecx, r12d
	mov	edx, ebx
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -112[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, 0
.L9:
	mov	rbx, QWORD PTR -40[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	add	rsp, 104
	pop	rbx
	pop	r12
	pop	r13
	pop	rbp
	.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	"99825.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Usage : %s [num1] [num2] [op]\012\000"
	.align	2
.LC1:
	.ascii	"127.0.0.1\000"
	.align	2
.LC2:
	.ascii	"fail to connect\000"
	.align	2
.LC3:
	.ascii	"CALC Error %d\012\000"
	.align	2
.LC4:
	.ascii	"%d %c %d = %d\012\000"
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 64
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, fp, lr}
	add	fp, sp, #16
	sub	sp, sp, #76
	str	r0, [fp, #-80]
	str	r1, [fp, #-84]
	ldr	r3, .L11
	ldr	r3, [r3]
	str	r3, [fp, #-24]
	mov	r3,#0
	ldr	r3, [fp, #-80]
	cmp	r3, #4
	beq	.L2
	ldr	r3, [fp, #-84]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L11+4
	bl	printf
	mov	r3, #1
	b	.L9
.L2:
	sub	r3, fp, #60
	mov	r2, #20
	mov	r1, #0
	mov	r0, r3
	bl	memset
	ldr	r3, [fp, #-84]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r3, r0
	str	r3, [fp, #-60]
	ldr	r3, [fp, #-84]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r3, r0
	str	r3, [fp, #-56]
	ldr	r3, [fp, #-84]
	add	r3, r3, #12
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	strb	r3, [fp, #-52]
	mov	r2, #6
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-76]
	ldr	r3, [fp, #-76]
	cmn	r3, #1
	bne	.L4
	mov	r3, #1
	b	.L9
.L4:
	mov	r3, #2
	strh	r3, [fp, #-40]	@ movhi
	mov	r0, #3600
	bl	htons
	mov	r3, r0
	strh	r3, [fp, #-38]	@ movhi
	ldr	r0, .L11+8
	bl	inet_addr
	mov	r3, r0
	str	r3, [fp, #-36]
	sub	r3, fp, #40
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-76]
	bl	connect
	mov	r3, r0
	cmn	r3, #1
	bne	.L5
	ldr	r0, .L11+12
	bl	puts
	ldr	r0, [fp, #-76]
	bl	close
	mov	r3, #1
	b	.L9
.L5:
	mov	r3, #20
	str	r3, [fp, #-72]
	ldr	r3, [fp, #-60]
	mov	r0, r3
	bl	htonl
	mov	r3, r0
	str	r3, [fp, #-60]
	ldr	r3, [fp, #-56]
	mov	r0, r3
	bl	htonl
	mov	r3, r0
	str	r3, [fp, #-56]
	ldr	r2, [fp, #-72]
	sub	r3, fp, #60
	mov	r1, r3
	ldr	r0, [fp, #-76]
	bl	write
	str	r0, [fp, #-68]
	ldr	r2, [fp, #-68]
	ldr	r3, [fp, #-72]
	cmp	r2, r3
	beq	.L6
	mov	r3, #1
	b	.L9
.L6:
	ldr	r2, [fp, #-72]
	sub	r3, fp, #60
	mov	r1, r3
	ldr	r0, [fp, #-76]
	bl	read
	str	r0, [fp, #-64]
	ldr	r2, [fp, #-64]
	ldr	r3, [fp, #-72]
	cmp	r2, r3
	beq	.L7
	mov	r3, #1
	b	.L9
.L7:
	ldrsh	r3, [fp, #-44]
	cmp	r3, #0
	movne	r3, #1
	moveq	r3, #0
	and	r3, r3, #255
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	mov	r0, r3
	bl	ntohs
	mov	r3, r0
	cmp	r3, #0
	beq	.L8
	ldrsh	r3, [fp, #-44]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	mov	r0, r3
	bl	ntohs
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L11+16
	bl	printf
.L8:
	ldr	r3, [fp, #-60]
	mov	r0, r3
	bl	ntohl
	mov	r4, r0
	ldrb	r3, [fp, #-52]	@ zero_extendqisi2
	mov	r6, r3
	ldr	r3, [fp, #-56]
	mov	r0, r3
	bl	ntohl
	mov	r5, r0
	ldr	r3, [fp, #-48]
	mov	r0, r3
	bl	ntohl
	mov	r3, r0
	str	r3, [sp]
	mov	r3, r5
	mov	r2, r6
	mov	r1, r4
	ldr	r0, .L11+20
	bl	printf
	ldr	r0, [fp, #-76]
	bl	close
	mov	r3, #0
.L9:
	ldr	r2, .L11
	ldr	r1, [r2]
	ldr	r2, [fp, #-24]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L10
	bl	__stack_chk_fail
.L10:
	mov	r0, r3
	sub	sp, fp, #16
	@ sp needed
	pop	{r4, r5, r6, fp, pc}
.L12:
	.align	2
.L11:
	.word	.LC5
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
