	.file	"23576602.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"socket failed"
.LC1:
	.string	"connect failed"
.LC2:
	.string	"connected to %s:%d\n"
.LC3:
	.string	"send failed"
.LC4:
	.string	"recv failed"
.LC5:
	.string	"%s"
	.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, 1360
	mov	DWORD PTR -1348[rbp], edi
	mov	QWORD PTR -1360[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -1104[rbp]
	movabs	rcx, 3328210909095473713
	mov	QWORD PTR [rax], rcx
	mov	WORD PTR 8[rax], 49
	lea	rax, -1168[rbp]
	mov	DWORD PTR [rax], 1919251317
	mov	BYTE PTR 4[rax], 0
	mov	DWORD PTR -1332[rbp], 8080
	cmp	DWORD PTR -1348[rbp], 4
	jle	.L2
	mov	rax, QWORD PTR -1360[rbp]
	add	rax, 8
	mov	rdx, QWORD PTR [rax]
	lea	rax, -1104[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	rax, QWORD PTR -1360[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -1332[rbp], eax
	mov	rax, QWORD PTR -1360[rbp]
	add	rax, 24
	mov	rdx, QWORD PTR [rax]
	lea	rax, -1168[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	jmp	.L3
.L2:
	cmp	DWORD PTR -1348[rbp], 3
	jle	.L4
	mov	rax, QWORD PTR -1360[rbp]
	add	rax, 8
	mov	rdx, QWORD PTR [rax]
	lea	rax, -1104[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	rax, QWORD PTR -1360[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -1332[rbp], eax
	jmp	.L3
.L4:
	cmp	DWORD PTR -1348[rbp], 2
	jle	.L3
	mov	rax, QWORD PTR -1360[rbp]
	add	rax, 8
	mov	rdx, QWORD PTR [rax]
	lea	rax, -1104[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
.L3:
	mov	edx, 0
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -1328[rbp], eax
	cmp	DWORD PTR -1328[rbp], -1
	jne	.L5
	lea	rdi, .LC0[rip]
	call	perror@PLT
	mov	eax, 1
	jmp	.L16
.L5:
	lea	rax, -1104[rbp]
	mov	rdi, rax
	call	inet_addr@PLT
	mov	DWORD PTR -1308[rbp], eax
	mov	WORD PTR -1312[rbp], 2
	mov	eax, DWORD PTR -1332[rbp]
	movzx	eax, ax
	mov	edi, eax
	call	htons@PLT
	mov	WORD PTR -1310[rbp], ax
	lea	rcx, -1312[rbp]
	mov	eax, DWORD PTR -1328[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	connect@PLT
	test	eax, eax
	jns	.L7
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	eax, 1
	jmp	.L16
.L7:
	mov	edx, DWORD PTR -1332[rbp]
	lea	rax, -1104[rbp]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
.L15:
	mov	eax, 0
	mov	ecx, 16
	lea	rdx, -1296[rbp]
	mov	rdi, rdx
#APP
# 50 "the_stack_data/23576602.c" 1
	cld; rep; stosq
# 0 "" 2
#NO_APP
	mov	eax, edi
	mov	edx, ecx
	mov	DWORD PTR -1324[rbp], edx
	mov	DWORD PTR -1320[rbp], eax
	mov	eax, DWORD PTR -1328[rbp]
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	mov	esi, eax
	movsx	rax, esi
	mov	rdi, QWORD PTR -1296[rbp+rax*8]
	mov	eax, DWORD PTR -1328[rbp]
	cdq
	shr	edx, 26
	add	eax, edx
	and	eax, 63
	sub	eax, edx
	mov	edx, 1
	mov	ecx, eax
	sal	rdx, cl
	mov	rax, rdx
	or	rdi, rax
	mov	rdx, rdi
	movsx	rax, esi
	mov	QWORD PTR -1296[rbp+rax*8], rdx
	mov	rax, QWORD PTR -1296[rbp]
	or	rax, 1
	mov	QWORD PTR -1296[rbp], rax
	mov	eax, DWORD PTR -1328[rbp]
	lea	edi, 1[rax]
	lea	rax, -1296[rbp]
	mov	r8d, 0
	mov	ecx, 0
	mov	edx, 0
	mov	rsi, rax
	call	select@PLT
	mov	DWORD PTR -1316[rbp], eax
	cmp	DWORD PTR -1316[rbp], 0
	je	.L18
	cmp	DWORD PTR -1316[rbp], -1
	je	.L19
	mov	rax, QWORD PTR -1296[rbp]
	and	eax, 1
	test	rax, rax
	je	.L11
	mov	rdx, QWORD PTR stdin[rip]
	lea	rax, -1040[rbp]
	mov	esi, 512
	mov	rdi, rax
	call	fgets@PLT
	test	rax, rax
	je	.L11
	lea	rax, -1040[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rsi, -1040[rbp]
	mov	eax, DWORD PTR -1328[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	send@PLT
	test	rax, rax
	jns	.L12
	lea	rdi, .LC3[rip]
	call	perror@PLT
	mov	eax, 1
	jmp	.L16
.L12:
	lea	rax, -1040[rbp]
	mov	rsi, rax
	mov	eax, 0
	mov	edx, 64
	mov	rdi, rsi
	mov	rcx, rdx
	rep stosq
.L11:
	mov	eax, DWORD PTR -1328[rbp]
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	cdqe
	mov	rsi, QWORD PTR -1296[rbp+rax*8]
	mov	eax, DWORD PTR -1328[rbp]
	cdq
	shr	edx, 26
	add	eax, edx
	and	eax, 63
	sub	eax, edx
	mov	edx, 1
	mov	ecx, eax
	sal	rdx, cl
	mov	rax, rdx
	and	rax, rsi
	test	rax, rax
	je	.L15
	lea	rsi, -528[rbp]
	mov	eax, DWORD PTR -1328[rbp]
	mov	ecx, 0
	mov	edx, 512
	mov	edi, eax
	call	recv@PLT
	test	rax, rax
	jns	.L14
	lea	rdi, .LC4[rip]
	call	perror@PLT
	mov	eax, 1
	jmp	.L16
.L14:
	lea	rax, -528[rbp]
	mov	rsi, rax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -528[rbp]
	mov	rsi, rax
	mov	eax, 0
	mov	edx, 64
	mov	rdi, rsi
	mov	rcx, rdx
	rep stosq
	jmp	.L15
.L18:
	nop
	jmp	.L9
.L19:
	nop
.L9:
	mov	eax, DWORD PTR -1328[rbp]
	mov	edi, eax
	mov	eax, 0
	call	close@PLT
	mov	eax, 0
.L16:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	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	"23576602.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"127.0.0.1\000"
	.align	2
.LC1:
	.ascii	"user\000"
	.align	2
.LC2:
	.ascii	"socket failed\000"
	.align	2
.LC3:
	.ascii	"connect failed\000"
	.align	2
.LC4:
	.ascii	"connected to %s:%d\012\000"
	.align	2
.LC5:
	.ascii	"send failed\000"
	.align	2
.LC6:
	.ascii	"recv failed\000"
	.align	2
.LC7:
	.ascii	"%s\000"
	.align	2
.LC8:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 1304
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1312
	str	r0, [fp, #-1304]
	str	r1, [fp, #-1308]
	ldr	r3, .L22
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #1072
	sub	r3, r3, #4
	sub	r3, r3, #8
	ldr	r2, .L22+4
	ldm	r2, {r0, r1, r2}
	stmia	r3!, {r0, r1}
	strh	r2, [r3]	@ movhi
	sub	r3, fp, #1120
	sub	r3, r3, #4
	sub	r3, r3, #12
	ldr	r2, .L22+8
	ldm	r2, {r0, r1}
	str	r0, [r3]
	add	r3, r3, #4
	strb	r1, [r3]
	ldr	r3, .L22+12
	str	r3, [fp, #-1300]
	ldr	r3, [fp, #-1304]
	cmp	r3, #4
	ble	.L2
	ldr	r3, [fp, #-1308]
	add	r3, r3, #4
	ldr	r2, [r3]
	sub	r3, fp, #1072
	sub	r3, r3, #4
	sub	r3, r3, #8
	mov	r1, r2
	mov	r0, r3
	bl	strcpy
	ldr	r3, [fp, #-1308]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-1300]
	ldr	r3, [fp, #-1308]
	add	r3, r3, #12
	ldr	r2, [r3]
	sub	r3, fp, #1120
	sub	r3, r3, #4
	sub	r3, r3, #12
	mov	r1, r2
	mov	r0, r3
	bl	strcpy
	b	.L3
.L2:
	ldr	r3, [fp, #-1304]
	cmp	r3, #3
	ble	.L4
	ldr	r3, [fp, #-1308]
	add	r3, r3, #4
	ldr	r2, [r3]
	sub	r3, fp, #1072
	sub	r3, r3, #4
	sub	r3, r3, #8
	mov	r1, r2
	mov	r0, r3
	bl	strcpy
	ldr	r3, [fp, #-1308]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-1300]
	b	.L3
.L4:
	ldr	r3, [fp, #-1304]
	cmp	r3, #2
	ble	.L3
	ldr	r3, [fp, #-1308]
	add	r3, r3, #4
	ldr	r2, [r3]
	sub	r3, fp, #1072
	sub	r3, r3, #4
	sub	r3, r3, #8
	mov	r1, r2
	mov	r0, r3
	bl	strcpy
.L3:
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-1292]
	ldr	r3, [fp, #-1292]
	cmn	r3, #1
	bne	.L5
	ldr	r0, .L22+16
	bl	perror
	mov	r3, #1
	b	.L18
.L5:
	sub	r3, fp, #1072
	sub	r3, r3, #4
	sub	r3, r3, #8
	mov	r0, r3
	bl	inet_addr
	mov	r3, r0
	str	r3, [fp, #-1276]
	sub	r3, fp, #4
	sub	r3, r3, #1264
	sub	r3, r3, #12
	mov	r2, #2
	strh	r2, [r3]	@ movhi
	ldr	r3, [fp, #-1300]
	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, #1264
	sub	r3, r3, #12
	strh	r2, [r3, #2]	@ movhi
	sub	r3, fp, #1264
	sub	r3, r3, #4
	sub	r3, r3, #12
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-1292]
	bl	connect
	mov	r3, r0
	cmp	r3, #0
	bge	.L7
	ldr	r0, .L22+20
	bl	perror
	mov	r3, #1
	b	.L18
.L7:
	sub	r3, fp, #1072
	sub	r3, r3, #4
	sub	r3, r3, #8
	ldr	r2, [fp, #-1300]
	mov	r1, r3
	ldr	r0, .L22+24
	bl	printf
.L17:
	sub	r3, fp, #1248
	sub	r3, r3, #4
	sub	r3, r3, #12
	str	r3, [fp, #-1288]
	mov	r3, #0
	str	r3, [fp, #-1296]
	b	.L8
.L9:
	ldr	r3, [fp, #-1288]
	ldr	r2, [fp, #-1296]
	mov	r1, #0
	str	r1, [r3, r2, lsl #2]
	ldr	r3, [fp, #-1296]
	add	r3, r3, #1
	str	r3, [fp, #-1296]
.L8:
	ldr	r3, [fp, #-1296]
	cmp	r3, #31
	bls	.L9
	ldr	r3, [fp, #-1292]
	add	r2, r3, #31
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #5
	mov	r2, r3
	lsl	r3, r2, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r1, [r3, #-1260]
	ldr	r3, [fp, #-1292]
	rsbs	r0, r3, #0
	and	r3, r3, #31
	and	r0, r0, #31
	rsbpl	r3, r0, #0
	mov	r0, #1
	lsl	r3, r0, r3
	orr	r1, r1, r3
	lsl	r3, r2, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	str	r1, [r3, #-1260]
	ldr	r3, [fp, #-1264]
	orr	r3, r3, #1
	str	r3, [fp, #-1264]
	ldr	r3, [fp, #-1292]
	add	r0, r3, #1
	sub	r1, fp, #1248
	sub	r1, r1, #4
	sub	r1, r1, #12
	mov	r3, #0
	str	r3, [sp]
	mov	r3, #0
	mov	r2, #0
	bl	select
	str	r0, [fp, #-1284]
	ldr	r3, [fp, #-1284]
	cmp	r3, #0
	beq	.L20
	ldr	r3, [fp, #-1284]
	cmn	r3, #1
	beq	.L21
	ldr	r3, [fp, #-1264]
	and	r3, r3, #1
	cmp	r3, #0
	beq	.L13
	ldr	r3, .L22+28
	ldr	r2, [r3]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, #512
	mov	r0, r3
	bl	fgets
	mov	r3, r0
	cmp	r3, #0
	beq	.L13
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	sub	r1, fp, #1024
	sub	r1, r1, #4
	sub	r1, r1, #4
	mov	r3, #0
	ldr	r0, [fp, #-1292]
	bl	send
	mov	r3, r0
	cmp	r3, #0
	bge	.L14
	ldr	r0, .L22+32
	bl	perror
	mov	r3, #1
	b	.L18
.L14:
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	mov	r3, #512
	mov	r2, r3
	mov	r1, #0
	bl	memset
.L13:
	ldr	r3, [fp, #-1292]
	add	r2, r3, #31
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #5
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-1260]
	ldr	r3, [fp, #-1292]
	rsbs	r1, r3, #0
	and	r3, r3, #31
	and	r1, r1, #31
	rsbpl	r3, r1, #0
	mov	r1, #1
	lsl	r3, r1, r3
	and	r3, r3, r2
	cmp	r3, #0
	beq	.L17
	sub	r1, fp, #520
	mov	r3, #0
	mov	r2, #512
	ldr	r0, [fp, #-1292]
	bl	recv
	mov	r3, r0
	cmp	r3, #0
	bge	.L16
	ldr	r0, .L22+36
	bl	perror
	mov	r3, #1
	b	.L18
.L16:
	sub	r3, fp, #520
	mov	r1, r3
	ldr	r0, .L22+40
	bl	printf
	sub	r3, fp, #520
	mov	r0, r3
	mov	r3, #512
	mov	r2, r3
	mov	r1, #0
	bl	memset
	b	.L17
.L20:
	nop
	b	.L11
.L21:
	nop
.L11:
	ldr	r0, [fp, #-1292]
	bl	close
	mov	r3, #0
.L18:
	ldr	r2, .L22
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L19
	bl	__stack_chk_fail
.L19:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L23:
	.align	2
.L22:
	.word	.LC8
	.word	.LC0
	.word	.LC1
	.word	8080
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	stdin
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
