	.file	"510877.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"in qemu client"
.LC1:
	.string	"linux client"
	.align 8
.LC2:
	.string	"incorrect number of parameters"
.LC3:
	.string	"10.0.0.1"
.LC4:
	.string	"connecting to %x \n"
.LC5:
	.string	"socket error"
.LC6:
	.string	"tcp_test: sockfd %d \n"
	.align 8
.LC7:
	.string	"send operation failed error code %d \n"
.LC8:
	.string	"recv failed"
	.align 8
.LC9:
	.string	"[OUTPUT] recv %d with length %d from 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
	push	rbx
	sub	rsp, 2312
	.cfi_offset 3, -24
	mov	DWORD PTR -2308[rbp], edi
	mov	QWORD PTR -2320[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	movabs	rax, 8031924123371070824
	mov	edx, 6581362
	mov	QWORD PTR -2112[rbp], rax
	mov	QWORD PTR -2104[rbp], rdx
	movabs	rax, 111520779560308
	mov	edx, 0
	mov	QWORD PTR -2080[rbp], rax
	mov	QWORD PTR -2072[rbp], rdx
	lea	rdx, -2064[rbp]
	mov	eax, 0
	mov	ecx, 254
	mov	rdi, rdx
	rep stosq
	cmp	DWORD PTR -2308[rbp], 2
	jne	.L2
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	DWORD PTR -2292[rbp], 1
	jmp	.L3
.L2:
	cmp	DWORD PTR -2308[rbp], 3
	jne	.L4
	lea	rdi, .LC1[rip]
	call	puts@PLT
	mov	DWORD PTR -2292[rbp], 0
	jmp	.L3
.L4:
	lea	rdi, .LC2[rip]
	call	puts@PLT
.L3:
	cmp	DWORD PTR -2292[rbp], 0
	jne	.L5
	mov	rax, QWORD PTR -2320[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	gethostbyname@PLT
	mov	QWORD PTR -2256[rbp], rax
.L5:
	lea	rax, -2240[rbp]
	mov	QWORD PTR [rax], 0
	mov	QWORD PTR 8[rax], 0
	mov	WORD PTR -2240[rbp], 2
	cmp	DWORD PTR -2292[rbp], 0
	je	.L6
	mov	rax, QWORD PTR -2320[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	movzx	eax, ax
	mov	edi, eax
	call	htons@PLT
	mov	WORD PTR -2238[rbp], ax
	jmp	.L7
.L6:
	mov	rax, QWORD PTR -2320[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 -2238[rbp], ax
.L7:
	cmp	DWORD PTR -2292[rbp], 0
	je	.L8
	lea	rdi, .LC3[rip]
	call	inet_addr@PLT
	mov	DWORD PTR -2236[rbp], eax
	jmp	.L9
.L8:
	mov	rax, QWORD PTR -2256[rbp]
	mov	eax, DWORD PTR 20[rax]
	movsx	rdx, eax
	mov	rax, QWORD PTR -2256[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	rax, QWORD PTR [rax]
	lea	rcx, -2240[rbp]
	add	rcx, 4
	mov	rsi, rax
	mov	rdi, rcx
	call	memcpy@PLT
.L9:
	lea	rax, -2240[rbp]
	add	rax, 4
	mov	QWORD PTR -2248[rbp], rax
	mov	DWORD PTR -2280[rbp], 4
	mov	DWORD PTR -2288[rbp], 0
	jmp	.L10
.L11:
	mov	eax, DWORD PTR -2288[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -2248[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -2288[rbp], 1
.L10:
	mov	eax, DWORD PTR -2288[rbp]
	cmp	eax, DWORD PTR -2280[rbp]
	jl	.L11
	mov	edx, 0
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -2276[rbp], eax
	cmp	DWORD PTR -2276[rbp], -1
	jne	.L12
	lea	rdi, .LC5[rip]
	call	puts@PLT
	mov	eax, -1
	mov	rbx, QWORD PTR -24[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L20
	jmp	.L21
.L12:
	mov	eax, DWORD PTR -2276[rbp]
	mov	esi, eax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -2272[rbp], 16
	lea	rcx, -2240[rbp]
	mov	eax, DWORD PTR -2276[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	connect@PLT
	mov	DWORD PTR -2268[rbp], eax
	cmp	DWORD PTR -2268[rbp], 0
	jns	.L14
	mov	eax, DWORD PTR -2276[rbp]
	mov	edi, eax
	call	close@PLT
	mov	edi, -1
	call	exit@PLT
.L14:
	lea	rax, -2112[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rsi, -2112[rbp]
	mov	eax, DWORD PTR -2276[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	send@PLT
	mov	DWORD PTR -2264[rbp], eax
	mov	eax, DWORD PTR -2264[rbp]
	movsx	rbx, eax
	lea	rax, -2112[rbp]
	mov	rdi, rax
	call	strlen@PLT
	cmp	rbx, rax
	je	.L15
	mov	eax, DWORD PTR -2264[rbp]
	mov	esi, eax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
.L15:
	mov	DWORD PTR -2284[rbp], 0
	mov	DWORD PTR -2284[rbp], 0
	jmp	.L16
.L18:
	movabs	rax, 5063529506963277124
	movabs	rdx, 19497924308321604
	mov	QWORD PTR -2096[rbp], rax
	mov	QWORD PTR -2088[rbp], rdx
	lea	rsi, -2096[rbp]
	mov	eax, DWORD PTR -2276[rbp]
	mov	ecx, 0
	mov	edx, 14
	mov	edi, eax
	call	recv@PLT
	mov	DWORD PTR -2260[rbp], eax
	cmp	DWORD PTR -2260[rbp], 0
	jns	.L17
	lea	rdi, .LC8[rip]
	call	puts@PLT
.L17:
	lea	rcx, -2096[rbp]
	mov	edx, DWORD PTR -2260[rbp]
	mov	eax, DWORD PTR -2284[rbp]
	mov	esi, eax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -2284[rbp], 1
.L16:
	cmp	DWORD PTR -2284[rbp], 9
	jle	.L18
.L19:
	jmp	.L19
.L21:
	call	__stack_chk_fail@PLT
.L20:
	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	"510877.c"
	.text
	.section	.rodata
	.align	2
.LC2:
	.ascii	"in qemu client\000"
	.align	2
.LC3:
	.ascii	"linux client\000"
	.align	2
.LC4:
	.ascii	"incorrect number of parameters\000"
	.align	2
.LC5:
	.ascii	"10.0.0.1\000"
	.align	2
.LC6:
	.ascii	"connecting to %x \012\000"
	.align	2
.LC7:
	.ascii	"socket error\000"
	.align	2
.LC8:
	.ascii	"tcp_test: sockfd %d \012\000"
	.align	2
.LC9:
	.ascii	"send operation failed error code %d \012\000"
	.align	2
.LC10:
	.ascii	"DEADBEEFDEADBEE\000"
	.align	2
.LC11:
	.ascii	"recv failed\000"
	.align	2
.LC12:
	.ascii	"[OUTPUT] recv %d with length %d from result %s\012\000"
	.align	2
.LC0:
	.ascii	"hello world\000"
	.space	4
	.align	2
.LC1:
	.ascii	"testme\000"
	.space	2041
	.align	2
.LC13:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 2264
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #2256
	sub	sp, sp, #8
	str	r0, [fp, #-2264]
	str	r1, [fp, #-2268]
	ldr	r3, .L22
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r2, .L22+4
	sub	r3, fp, #2080
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldm	r2, {r0, r1, r2}
	stm	r3, {r0, r1, r2}
	mov	r3, #0
	str	r3, [fp, #-2076]
	ldr	r2, .L22+8
	sub	r3, fp, #2048
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldm	r2, {r0, r1}
	str	r0, [r3]
	add	r3, r3, #4
	strh	r1, [r3]	@ movhi
	add	r3, r3, #2
	lsr	r2, r1, #16
	strb	r2, [r3]
	sub	r3, fp, #2032
	sub	r3, r3, #4
	sub	r3, r3, #13
	ldr	r2, .L22+12
	mov	r1, #0
	mov	r0, r3
	bl	memset
	ldr	r3, [fp, #-2264]
	cmp	r3, #2
	bne	.L2
	ldr	r0, .L22+16
	bl	puts
	mov	r3, #1
	str	r3, [fp, #-2260]
	b	.L3
.L2:
	ldr	r3, [fp, #-2264]
	cmp	r3, #3
	bne	.L4
	ldr	r0, .L22+20
	bl	puts
	mov	r3, #0
	str	r3, [fp, #-2260]
	b	.L3
.L4:
	ldr	r0, .L22+24
	bl	puts
.L3:
	ldr	r3, [fp, #-2260]
	cmp	r3, #0
	bne	.L5
	ldr	r3, [fp, #-2268]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	gethostbyname
	str	r0, [fp, #-2256]
.L5:
	sub	r3, fp, #2208
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2]
	str	r3, [r2, #4]
	str	r3, [r2, #8]
	str	r3, [r2, #12]
	sub	r3, fp, #4
	sub	r3, r3, #2208
	sub	r3, r3, #4
	mov	r2, #2
	strh	r2, [r3]	@ movhi
	ldr	r3, [fp, #-2260]
	cmp	r3, #0
	beq	.L6
	ldr	r3, [fp, #-2268]
	add	r3, r3, #4
	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, #2208
	sub	r3, r3, #4
	strh	r2, [r3, #2]	@ movhi
	b	.L7
.L6:
	ldr	r3, [fp, #-2268]
	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, #2208
	sub	r3, r3, #4
	strh	r2, [r3, #2]	@ movhi
.L7:
	ldr	r3, [fp, #-2260]
	cmp	r3, #0
	beq	.L8
	ldr	r0, .L22+28
	bl	inet_addr
	mov	r3, r0
	str	r3, [fp, #-2212]
	b	.L9
.L8:
	ldr	r3, [fp, #-2256]
	ldr	r3, [r3, #16]
	ldr	r1, [r3]
	ldr	r3, [fp, #-2256]
	ldr	r3, [r3, #12]
	mov	r2, r3
	sub	r3, fp, #2208
	sub	r3, r3, #4
	sub	r3, r3, #4
	add	r3, r3, #4
	mov	r0, r3
	bl	memcpy
.L9:
	sub	r3, fp, #2208
	sub	r3, r3, #4
	sub	r3, r3, #4
	add	r3, r3, #4
	str	r3, [fp, #-2244]
	mov	r3, #4
	str	r3, [fp, #-2240]
	mov	r3, #0
	str	r3, [fp, #-2252]
	b	.L10
.L11:
	ldr	r3, [fp, #-2252]
	ldr	r2, [fp, #-2244]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, .L22+32
	bl	printf
	ldr	r3, [fp, #-2252]
	add	r3, r3, #1
	str	r3, [fp, #-2252]
.L10:
	ldr	r2, [fp, #-2252]
	ldr	r3, [fp, #-2240]
	cmp	r2, r3
	blt	.L11
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-2236]
	ldr	r3, [fp, #-2236]
	cmn	r3, #1
	bne	.L12
	ldr	r0, .L22+36
	bl	puts
	mvn	r3, #0
	ldr	r2, .L22
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L20
	b	.L21
.L12:
	ldr	r1, [fp, #-2236]
	ldr	r0, .L22+40
	bl	printf
	mov	r3, #16
	str	r3, [fp, #-2232]
	sub	r3, fp, #2208
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-2236]
	bl	connect
	str	r0, [fp, #-2228]
	ldr	r3, [fp, #-2228]
	cmp	r3, #0
	bge	.L14
	ldr	r0, [fp, #-2236]
	bl	close
	mvn	r0, #0
	bl	exit
.L14:
	sub	r3, fp, #2080
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	sub	r1, fp, #2080
	sub	r1, r1, #4
	sub	r1, r1, #4
	mov	r3, #0
	ldr	r0, [fp, #-2236]
	bl	send
	str	r0, [fp, #-2224]
	sub	r3, fp, #2080
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	ldr	r3, [fp, #-2224]
	cmp	r2, r3
	beq	.L15
	ldr	r1, [fp, #-2224]
	ldr	r0, .L22+44
	bl	printf
.L15:
	mov	r3, #0
	str	r3, [fp, #-2248]
	mov	r3, #0
	str	r3, [fp, #-2248]
	b	.L16
.L18:
	ldr	r3, .L22+48
	sub	ip, fp, #2064
	sub	ip, ip, #4
	sub	ip, ip, #4
	ldm	r3, {r0, r1, r2, r3}
	stm	ip, {r0, r1, r2, r3}
	sub	r1, fp, #2064
	sub	r1, r1, #4
	sub	r1, r1, #4
	mov	r3, #0
	mov	r2, #14
	ldr	r0, [fp, #-2236]
	bl	recv
	str	r0, [fp, #-2220]
	ldr	r3, [fp, #-2220]
	cmp	r3, #0
	bge	.L17
	ldr	r0, .L22+52
	bl	puts
.L17:
	sub	r3, fp, #2064
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r2, [fp, #-2220]
	ldr	r1, [fp, #-2248]
	ldr	r0, .L22+56
	bl	printf
	ldr	r3, [fp, #-2248]
	add	r3, r3, #1
	str	r3, [fp, #-2248]
.L16:
	ldr	r3, [fp, #-2248]
	cmp	r3, #9
	ble	.L18
.L19:
	b	.L19
.L21:
	bl	__stack_chk_fail
.L20:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L23:
	.align	2
.L22:
	.word	.LC13
	.word	.LC0
	.word	.LC1
	.word	2041
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
