	.file	"1186001.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"w"
.LC1:
	.string	"unsupported port %d\n"
.LC2:
	.string	"\346\227\245\345\277\227\347\233\221\345\220\254\347\253\257\345\217\243: %d\n"
.LC3:
	.string	"127.0.0.1"
.LC4:
	.string	"socket"
.LC5:
	.string	"connect"
.LC6:
	.string	"\n"
.LC7:
	.string	"recv"
.LC8:
	.string	"%s"
.LC9:
	.string	"\nDisconnected.\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, 4096
	or	QWORD PTR [rsp], 0
	sub	rsp, 4096
	or	QWORD PTR [rsp], 0
	sub	rsp, 2128
	mov	DWORD PTR -10308[rbp], edi
	mov	QWORD PTR -10320[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	BYTE PTR -10297[rbp], 0
	jmp	.L2
.L4:
	cmp	DWORD PTR -10288[rbp], 119
	jne	.L24
	mov	BYTE PTR -10297[rbp], 1
	jmp	.L2
.L24:
	nop
.L2:
	mov	rcx, QWORD PTR -10320[rbp]
	mov	eax, DWORD PTR -10308[rbp]
	lea	rdx, .LC0[rip]
	mov	rsi, rcx
	mov	edi, eax
	call	getopt@PLT
	mov	DWORD PTR -10288[rbp], eax
	cmp	DWORD PTR -10288[rbp], -1
	jne	.L4
	mov	eax, DWORD PTR optind[rip]
	cmp	DWORD PTR -10308[rbp], eax
	jle	.L5
	mov	eax, DWORD PTR optind[rip]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -10320[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -10296[rbp], eax
	cmp	DWORD PTR -10296[rbp], 0
	jg	.L6
	mov	eax, DWORD PTR -10296[rbp]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, -1
	jmp	.L20
.L5:
	mov	DWORD PTR -10296[rbp], 15003
.L6:
	mov	eax, DWORD PTR -10296[rbp]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -10272[rbp]
	mov	edx, 16
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	WORD PTR -10272[rbp], 2
	lea	rdi, .LC3[rip]
	call	inet_addr@PLT
	mov	DWORD PTR -10268[rbp], eax
	mov	eax, DWORD PTR -10296[rbp]
	movzx	eax, ax
	mov	edi, eax
	call	htons@PLT
	mov	WORD PTR -10270[rbp], ax
	lea	rax, -10256[rbp]
	mov	edx, 10240
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	DWORD PTR -10292[rbp], -1
.L8:
	cmp	DWORD PTR -10292[rbp], 0
	jle	.L9
	mov	eax, DWORD PTR -10292[rbp]
	mov	edi, eax
	call	close@PLT
.L9:
	mov	edx, 6
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -10292[rbp], eax
	cmp	DWORD PTR -10292[rbp], -1
	jne	.L22
	lea	rdi, .LC4[rip]
	call	perror@PLT
	mov	eax, -1
	jmp	.L20
.L22:
	nop
.L10:
	lea	rcx, -10272[rbp]
	mov	eax, DWORD PTR -10292[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	connect@PLT
	mov	DWORD PTR -10284[rbp], eax
	cmp	DWORD PTR -10284[rbp], -1
	jne	.L11
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	cmp	eax, 106
	je	.L11
	cmp	BYTE PTR -10297[rbp], 0
	je	.L12
	mov	edi, 100
	call	usleep@PLT
	jmp	.L10
.L12:
	lea	rdi, .LC5[rip]
	call	perror@PLT
	mov	eax, -1
	jmp	.L20
.L11:
	lea	rdi, .LC6[rip]
	call	puts@PLT
.L19:
	lea	rsi, -10256[rbp]
	mov	eax, DWORD PTR -10292[rbp]
	mov	ecx, 0
	mov	edx, 10224
	mov	edi, eax
	call	recv@PLT
	mov	QWORD PTR -10280[rbp], rax
	cmp	QWORD PTR -10280[rbp], -1
	jne	.L13
	cmp	BYTE PTR -10297[rbp], 0
	je	.L14
	jmp	.L10
.L14:
	lea	rdi, .LC7[rip]
	call	perror@PLT
	mov	eax, -1
	jmp	.L20
.L13:
	cmp	QWORD PTR -10280[rbp], 0
	je	.L15
	lea	rdx, -10256[rbp]
	mov	rax, QWORD PTR -10280[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 0
	lea	rax, -10256[rbp]
	mov	rsi, rax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR stdout[rip]
	mov	rdi, rax
	call	fflush@PLT
	jmp	.L19
.L15:
	cmp	QWORD PTR -10280[rbp], 0
	jne	.L19
	lea	rdi, .LC9[rip]
	call	puts@PLT
	cmp	BYTE PTR -10297[rbp], 0
	je	.L23
	jmp	.L8
.L23:
	nop
	mov	eax, DWORD PTR -10292[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, 0
.L20:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	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	"1186001.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"w\000"
	.align	2
.LC1:
	.ascii	"unsupported port %d\012\000"
	.align	2
.LC2:
	.ascii	"\346\227\245\345\277\227\347\233\221\345\220\254\347"
	.ascii	"\253\257\345\217\243: %d\012\000"
	.align	2
.LC3:
	.ascii	"127.0.0.1\000"
	.align	2
.LC4:
	.ascii	"socket\000"
	.align	2
.LC5:
	.ascii	"connect\000"
	.align	2
.LC6:
	.ascii	"\012\000"
	.align	2
.LC7:
	.ascii	"recv\000"
	.align	2
.LC8:
	.ascii	"%s\000"
	.align	2
.LC9:
	.ascii	"\012Disconnected.\012\000"
	.align	2
.LC10:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 10296
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #10240
	sub	sp, sp, #60
	sub	r3, fp, #8192
	sub	r3, r3, #12
	str	r0, [r3, #-2100]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	str	r1, [r3, #-2104]
	ldr	r3, .L25
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, #0
	strb	r2, [r3, #-2089]
	b	.L2
.L4:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-2080]
	cmp	r3, #119
	bne	.L24
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, #1
	strb	r2, [r3, #-2089]
	b	.L2
.L24:
	nop
.L2:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r4, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r1, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r2, .L25+4
	ldr	r1, [r1, #-2104]
	ldr	r0, [r3, #-2100]
	bl	getopt
	str	r0, [r4, #-2080]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-2080]
	cmn	r3, #1
	bne	.L4
	ldr	r3, .L25+8
	ldr	r3, [r3]
	sub	r2, fp, #8192
	sub	r2, r2, #12
	ldr	r2, [r2, #-2100]
	cmp	r2, r3
	ble	.L5
	ldr	r3, .L25+8
	ldr	r3, [r3]
	lsl	r3, r3, #2
	sub	r2, fp, #8192
	sub	r2, r2, #12
	ldr	r2, [r2, #-2104]
	add	r3, r2, r3
	ldr	r3, [r3]
	sub	r2, fp, #8192
	sub	r2, r2, #12
	mov	r4, r2
	mov	r0, r3
	bl	atoi
	str	r0, [r4, #-2088]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-2088]
	cmp	r3, #0
	bgt	.L6
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r1, [r3, #-2088]
	ldr	r0, .L25+12
	bl	printf
	mvn	r3, #0
	b	.L20
.L5:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	ldr	r3, .L25+16
	str	r3, [r2, #-2088]
.L6:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r1, [r3, #-2088]
	ldr	r0, .L25+20
	bl	printf
	sub	r3, fp, #10240
	sub	r3, r3, #12
	sub	r3, r3, #20
	mov	r2, #16
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r3, fp, #8192
	sub	r3, r3, #12
	sub	r3, r3, #2064
	sub	r3, r3, #4
	mov	r2, #2
	strh	r2, [r3]	@ movhi
	ldr	r0, .L25+24
	bl	inet_addr
	mov	r3, r0
	sub	r2, fp, #8192
	sub	r2, r2, #12
	str	r3, [r2, #-2064]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-2088]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	mov	r0, r3
	bl	htons
	mov	r3, r0
	mov	r2, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	sub	r3, r3, #2064
	sub	r3, r3, #4
	strh	r2, [r3, #2]	@ movhi
	sub	r3, fp, #10240
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r2, #10240
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	mvn	r3, #0
	str	r3, [r2, #-2084]
.L8:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-2084]
	cmp	r3, #0
	ble	.L9
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r0, [r3, #-2084]
	bl	close
.L9:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r4, r3
	mov	r2, #6
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [r4, #-2084]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-2084]
	cmn	r3, #1
	bne	.L22
	ldr	r0, .L25+28
	bl	perror
	mvn	r3, #0
	b	.L20
.L22:
	nop
.L10:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r4, r3
	sub	r3, fp, #10240
	sub	r3, r3, #12
	sub	r3, r3, #20
	sub	r2, fp, #8192
	sub	r2, r2, #12
	mov	r0, r2
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [r0, #-2084]
	bl	connect
	str	r0, [r4, #-2076]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-2076]
	cmn	r3, #1
	bne	.L11
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #106
	beq	.L11
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldrb	r3, [r3, #-2089]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L12
	mov	r0, #100
	bl	usleep
	b	.L10
.L12:
	ldr	r0, .L25+32
	bl	perror
	mvn	r3, #0
	b	.L20
.L11:
	ldr	r0, .L25+36
	bl	puts
.L19:
	sub	r1, fp, #10240
	sub	r1, r1, #12
	sub	r1, r1, #4
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r0, r3
	mov	r3, #0
	ldr	r2, .L25+40
	ldr	r0, [r0, #-2084]
	bl	recv
	mov	r3, r0
	sub	r2, fp, #8192
	sub	r2, r2, #12
	str	r3, [r2, #-2072]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-2072]
	cmn	r3, #1
	bne	.L13
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldrb	r3, [r3, #-2089]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L14
	b	.L10
.L14:
	ldr	r0, .L25+44
	bl	perror
	mvn	r3, #0
	b	.L20
.L13:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-2072]
	cmp	r3, #0
	beq	.L15
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-2072]
	add	r3, r2, r3
	sub	r3, r3, #2048
	sub	r3, r3, #4
	mov	r2, #0
	strb	r2, [r3]
	sub	r3, fp, #10240
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, .L25+48
	bl	printf
	ldr	r3, .L25+52
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	b	.L19
.L15:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-2072]
	cmp	r3, #0
	bne	.L19
	ldr	r0, .L25+56
	bl	puts
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldrb	r3, [r3, #-2089]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L23
	b	.L8
.L23:
	nop
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r0, [r3, #-2084]
	bl	close
	mov	r3, #0
.L20:
	ldr	r2, .L25
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L21
	bl	__stack_chk_fail
.L21:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L26:
	.align	2
.L25:
	.word	.LC10
	.word	.LC0
	.word	optind
	.word	.LC1
	.word	15003
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	10224
	.word	.LC7
	.word	.LC8
	.word	stdout
	.word	.LC9
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
