	.file	"231392550.c"
	.intel_syntax noprefix
	.text
	.local	forward_port
	.comm	forward_port,4,4
	.section	.rodata
.LC0:
	.string	"socket"
.LC1:
	.string	"setsockopt"
.LC2:
	.string	"bind"
	.align 8
.LC3:
	.string	"accepting connections on port %d\n"
	.text
	.type	listen_socket, @function
listen_socket:
.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, 64
	mov	DWORD PTR -52[rbp], edi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	edx, 0
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -36[rbp], eax
	cmp	DWORD PTR -36[rbp], -1
	jne	.L2
	lea	rdi, .LC0[rip]
	call	perror@PLT
	mov	eax, -1
	jmp	.L6
.L2:
	mov	DWORD PTR -40[rbp], 1
	lea	rdx, -40[rbp]
	mov	eax, DWORD PTR -36[rbp]
	mov	r8d, 4
	mov	rcx, rdx
	mov	edx, 2
	mov	esi, 1
	mov	edi, eax
	call	setsockopt@PLT
	cmp	eax, -1
	jne	.L4
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	eax, DWORD PTR -36[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, -1
	jmp	.L6
.L4:
	lea	rax, -32[rbp]
	mov	edx, 16
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	eax, DWORD PTR -52[rbp]
	movzx	eax, ax
	mov	edi, eax
	call	htons@PLT
	mov	WORD PTR -30[rbp], ax
	mov	WORD PTR -32[rbp], 2
	lea	rcx, -32[rbp]
	mov	eax, DWORD PTR -36[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	bind@PLT
	cmp	eax, -1
	jne	.L5
	lea	rdi, .LC2[rip]
	call	perror@PLT
	mov	eax, DWORD PTR -36[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, -1
	jmp	.L6
.L5:
	mov	eax, DWORD PTR -52[rbp]
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -36[rbp]
	mov	esi, 10
	mov	edi, eax
	call	listen@PLT
	mov	eax, DWORD PTR -36[rbp]
.L6:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L7
	call	__stack_chk_fail@PLT
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	listen_socket, .-listen_socket
	.section	.rodata
	.align 8
.LC4:
	.string	"inet_aton(): bad IP address format\n"
.LC5:
	.string	"connect()"
	.text
	.type	connect_socket, @function
connect_socket:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 64
	mov	DWORD PTR -52[rbp], edi
	mov	QWORD PTR -64[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	edx, 0
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -36[rbp], eax
	cmp	DWORD PTR -36[rbp], -1
	jne	.L9
	lea	rdi, .LC0[rip]
	call	perror@PLT
	mov	eax, -1
	jmp	.L13
.L9:
	lea	rax, -32[rbp]
	mov	edx, 16
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	eax, DWORD PTR -52[rbp]
	movzx	eax, ax
	mov	edi, eax
	call	htons@PLT
	mov	WORD PTR -30[rbp], ax
	mov	WORD PTR -32[rbp], 2
	lea	rax, -32[rbp]
	lea	rdx, 4[rax]
	mov	rax, QWORD PTR -64[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	inet_aton@PLT
	test	eax, eax
	jne	.L11
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 35
	mov	esi, 1
	lea	rdi, .LC4[rip]
	call	fwrite@PLT
	mov	eax, DWORD PTR -36[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, -1
	jmp	.L13
.L11:
	lea	rcx, -32[rbp]
	mov	eax, DWORD PTR -36[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	connect@PLT
	cmp	eax, -1
	jne	.L12
	lea	rdi, .LC5[rip]
	call	perror@PLT
	mov	eax, DWORD PTR -36[rbp]
	mov	esi, 2
	mov	edi, eax
	call	shutdown@PLT
	mov	eax, DWORD PTR -36[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, -1
	jmp	.L13
.L12:
	mov	eax, DWORD PTR -36[rbp]
.L13:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	connect_socket, .-connect_socket
	.section	.rodata
	.align 8
.LC6:
	.string	"Usage\n\tfwd <listen-port> <forward-to-port> <forward-to-ip-address>\n"
.LC7:
	.string	"select()"
.LC8:
	.string	"accept()"
.LC9:
	.string	"connect from %s\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 2560
	mov	DWORD PTR -2548[rbp], edi
	mov	QWORD PTR -2560[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -2536[rbp], -1
	mov	DWORD PTR -2532[rbp], -1
	mov	DWORD PTR -2528[rbp], 0
	mov	DWORD PTR -2524[rbp], 0
	mov	DWORD PTR -2520[rbp], 0
	mov	DWORD PTR -2516[rbp], 0
	cmp	DWORD PTR -2548[rbp], 4
	je	.L16
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 67
	mov	esi, 1
	lea	rdi, .LC6[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L16:
	mov	esi, 1
	mov	edi, 13
	call	signal@PLT
	mov	rax, QWORD PTR -2560[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR forward_port[rip], eax
	mov	rax, QWORD PTR -2560[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	edi, eax
	call	listen_socket
	mov	DWORD PTR -2508[rbp], eax
	cmp	DWORD PTR -2508[rbp], -1
	jne	.L17
	mov	edi, 1
	call	exit@PLT
.L17:
	mov	DWORD PTR -2512[rbp], 0
	mov	eax, 0
	mov	ecx, 16
	lea	rdx, -2448[rbp]
	mov	rdi, rdx
#APP
# 148 "the_stack_data/231392550.c" 1
	cld; rep; stosq
# 0 "" 2
#NO_APP
	mov	eax, edi
	mov	edx, ecx
	mov	DWORD PTR -2504[rbp], edx
	mov	DWORD PTR -2500[rbp], eax
	mov	eax, 0
	mov	ecx, 16
	lea	rdx, -2320[rbp]
	mov	rdi, rdx
#APP
# 149 "the_stack_data/231392550.c" 1
	cld; rep; stosq
# 0 "" 2
#NO_APP
	mov	eax, edi
	mov	edx, ecx
	mov	DWORD PTR -2496[rbp], edx
	mov	DWORD PTR -2492[rbp], eax
	mov	eax, 0
	mov	ecx, 16
	lea	rdx, -2192[rbp]
	mov	rdi, rdx
#APP
# 150 "the_stack_data/231392550.c" 1
	cld; rep; stosq
# 0 "" 2
#NO_APP
	mov	eax, edi
	mov	edx, ecx
	mov	DWORD PTR -2488[rbp], edx
	mov	DWORD PTR -2484[rbp], eax
	mov	eax, DWORD PTR -2508[rbp]
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	mov	esi, eax
	movsx	rax, esi
	mov	rdi, QWORD PTR -2448[rbp+rax*8]
	mov	eax, DWORD PTR -2508[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 -2448[rbp+rax*8], rdx
	mov	eax, DWORD PTR -2512[rbp]
	cmp	DWORD PTR -2508[rbp], eax
	cmovge	eax, DWORD PTR -2508[rbp]
	mov	DWORD PTR -2512[rbp], eax
	cmp	DWORD PTR -2536[rbp], 0
	jle	.L18
	cmp	DWORD PTR -2528[rbp], 1023
	jg	.L18
	mov	eax, DWORD PTR -2536[rbp]
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	mov	esi, eax
	movsx	rax, esi
	mov	rdi, QWORD PTR -2448[rbp+rax*8]
	mov	eax, DWORD PTR -2536[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 -2448[rbp+rax*8], rdx
.L18:
	cmp	DWORD PTR -2532[rbp], 0
	jle	.L19
	cmp	DWORD PTR -2520[rbp], 1023
	jg	.L19
	mov	eax, DWORD PTR -2532[rbp]
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	mov	esi, eax
	movsx	rax, esi
	mov	rdi, QWORD PTR -2448[rbp+rax*8]
	mov	eax, DWORD PTR -2532[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 -2448[rbp+rax*8], rdx
.L19:
	cmp	DWORD PTR -2536[rbp], 0
	jle	.L20
	mov	eax, DWORD PTR -2520[rbp]
	sub	eax, DWORD PTR -2516[rbp]
	test	eax, eax
	jle	.L20
	mov	eax, DWORD PTR -2536[rbp]
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	mov	esi, eax
	movsx	rax, esi
	mov	rdi, QWORD PTR -2320[rbp+rax*8]
	mov	eax, DWORD PTR -2536[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 -2320[rbp+rax*8], rdx
.L20:
	cmp	DWORD PTR -2532[rbp], 0
	jle	.L21
	mov	eax, DWORD PTR -2528[rbp]
	sub	eax, DWORD PTR -2524[rbp]
	test	eax, eax
	jle	.L21
	mov	eax, DWORD PTR -2532[rbp]
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	mov	esi, eax
	movsx	rax, esi
	mov	rdi, QWORD PTR -2320[rbp+rax*8]
	mov	eax, DWORD PTR -2532[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 -2320[rbp+rax*8], rdx
.L21:
	cmp	DWORD PTR -2536[rbp], 0
	jle	.L22
	mov	eax, DWORD PTR -2536[rbp]
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	mov	esi, eax
	movsx	rax, esi
	mov	rdi, QWORD PTR -2192[rbp+rax*8]
	mov	eax, DWORD PTR -2536[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 -2192[rbp+rax*8], rdx
	mov	eax, DWORD PTR -2512[rbp]
	cmp	DWORD PTR -2536[rbp], eax
	cmovge	eax, DWORD PTR -2536[rbp]
	mov	DWORD PTR -2512[rbp], eax
.L22:
	cmp	DWORD PTR -2532[rbp], 0
	jle	.L23
	mov	eax, DWORD PTR -2532[rbp]
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	mov	esi, eax
	movsx	rax, esi
	mov	rdi, QWORD PTR -2192[rbp+rax*8]
	mov	eax, DWORD PTR -2532[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 -2192[rbp+rax*8], rdx
	mov	eax, DWORD PTR -2512[rbp]
	cmp	DWORD PTR -2532[rbp], eax
	cmovge	eax, DWORD PTR -2532[rbp]
	mov	DWORD PTR -2512[rbp], eax
.L23:
	mov	eax, DWORD PTR -2512[rbp]
	lea	edi, 1[rax]
	lea	rcx, -2192[rbp]
	lea	rdx, -2320[rbp]
	lea	rax, -2448[rbp]
	mov	r8d, 0
	mov	rsi, rax
	call	select@PLT
	mov	DWORD PTR -2480[rbp], eax
	cmp	DWORD PTR -2480[rbp], -1
	jne	.L24
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	cmp	eax, 4
	je	.L53
.L24:
	cmp	DWORD PTR -2480[rbp], -1
	jne	.L26
	lea	rdi, .LC7[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L26:
	mov	eax, DWORD PTR -2508[rbp]
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	cdqe
	mov	rsi, QWORD PTR -2448[rbp+rax*8]
	mov	eax, DWORD PTR -2508[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	.L27
	mov	DWORD PTR -2540[rbp], 16
	mov	eax, DWORD PTR -2540[rbp]
	mov	edx, eax
	lea	rax, -2464[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	lea	rdx, -2540[rbp]
	lea	rcx, -2464[rbp]
	mov	eax, DWORD PTR -2508[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	accept@PLT
	mov	DWORD PTR -2476[rbp], eax
	cmp	DWORD PTR -2476[rbp], -1
	jne	.L28
	lea	rdi, .LC8[rip]
	call	perror@PLT
	jmp	.L27
.L28:
	cmp	DWORD PTR -2536[rbp], 0
	js	.L29
	mov	eax, DWORD PTR -2536[rbp]
	mov	esi, 2
	mov	edi, eax
	call	shutdown@PLT
	mov	eax, DWORD PTR -2536[rbp]
	mov	edi, eax
	call	close@PLT
	mov	DWORD PTR -2536[rbp], -1
.L29:
	cmp	DWORD PTR -2532[rbp], 0
	js	.L30
	mov	eax, DWORD PTR -2532[rbp]
	mov	esi, 2
	mov	edi, eax
	call	shutdown@PLT
	mov	eax, DWORD PTR -2532[rbp]
	mov	edi, eax
	call	close@PLT
	mov	DWORD PTR -2532[rbp], -1
.L30:
	mov	DWORD PTR -2524[rbp], 0
	mov	eax, DWORD PTR -2524[rbp]
	mov	DWORD PTR -2528[rbp], eax
	mov	DWORD PTR -2516[rbp], 0
	mov	eax, DWORD PTR -2516[rbp]
	mov	DWORD PTR -2520[rbp], eax
	mov	eax, DWORD PTR -2476[rbp]
	mov	DWORD PTR -2536[rbp], eax
	mov	rax, QWORD PTR -2560[rbp]
	add	rax, 24
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR forward_port[rip]
	mov	rsi, rdx
	mov	edi, eax
	call	connect_socket
	mov	DWORD PTR -2532[rbp], eax
	cmp	DWORD PTR -2532[rbp], -1
	jne	.L31
	cmp	DWORD PTR -2536[rbp], 0
	js	.L54
	mov	eax, DWORD PTR -2536[rbp]
	mov	esi, 2
	mov	edi, eax
	call	shutdown@PLT
	mov	eax, DWORD PTR -2536[rbp]
	mov	edi, eax
	call	close@PLT
	mov	DWORD PTR -2536[rbp], -1
	jmp	.L54
.L31:
	mov	eax, DWORD PTR -2460[rbp]
	mov	edi, eax
	call	inet_ntoa@PLT
	mov	rsi, rax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L17
.L27:
	cmp	DWORD PTR -2536[rbp], 0
	jle	.L33
	mov	eax, DWORD PTR -2536[rbp]
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	cdqe
	mov	rsi, QWORD PTR -2192[rbp+rax*8]
	mov	eax, DWORD PTR -2536[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	.L33
	lea	rsi, -2540[rbp]
	mov	eax, DWORD PTR -2536[rbp]
	mov	ecx, 1
	mov	edx, 1
	mov	edi, eax
	call	recv@PLT
	mov	QWORD PTR -2472[rbp], rax
	cmp	QWORD PTR -2472[rbp], 0
	jg	.L34
	cmp	DWORD PTR -2536[rbp], 0
	js	.L33
	mov	eax, DWORD PTR -2536[rbp]
	mov	esi, 2
	mov	edi, eax
	call	shutdown@PLT
	mov	eax, DWORD PTR -2536[rbp]
	mov	edi, eax
	call	close@PLT
	mov	DWORD PTR -2536[rbp], -1
	jmp	.L33
.L34:
	lea	rsi, -2540[rbp]
	mov	eax, DWORD PTR -2532[rbp]
	mov	ecx, 1
	mov	edx, 1
	mov	edi, eax
	call	send@PLT
.L33:
	cmp	DWORD PTR -2532[rbp], 0
	jle	.L36
	mov	eax, DWORD PTR -2532[rbp]
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	cdqe
	mov	rsi, QWORD PTR -2192[rbp+rax*8]
	mov	eax, DWORD PTR -2532[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	.L36
	lea	rsi, -2540[rbp]
	mov	eax, DWORD PTR -2532[rbp]
	mov	ecx, 1
	mov	edx, 1
	mov	edi, eax
	call	recv@PLT
	mov	QWORD PTR -2472[rbp], rax
	cmp	QWORD PTR -2472[rbp], 0
	jg	.L37
	cmp	DWORD PTR -2532[rbp], 0
	js	.L36
	mov	eax, DWORD PTR -2532[rbp]
	mov	esi, 2
	mov	edi, eax
	call	shutdown@PLT
	mov	eax, DWORD PTR -2532[rbp]
	mov	edi, eax
	call	close@PLT
	mov	DWORD PTR -2532[rbp], -1
	jmp	.L36
.L37:
	lea	rsi, -2540[rbp]
	mov	eax, DWORD PTR -2536[rbp]
	mov	ecx, 1
	mov	edx, 1
	mov	edi, eax
	call	send@PLT
.L36:
	cmp	DWORD PTR -2536[rbp], 0
	jle	.L39
	mov	eax, DWORD PTR -2536[rbp]
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	cdqe
	mov	rsi, QWORD PTR -2448[rbp+rax*8]
	mov	eax, DWORD PTR -2536[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	.L39
	mov	eax, 1024
	sub	eax, DWORD PTR -2528[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -2528[rbp]
	cdqe
	lea	rcx, -2064[rbp]
	add	rcx, rax
	mov	eax, DWORD PTR -2536[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	QWORD PTR -2472[rbp], rax
	cmp	QWORD PTR -2472[rbp], 0
	jg	.L40
	cmp	DWORD PTR -2536[rbp], 0
	js	.L39
	mov	eax, DWORD PTR -2536[rbp]
	mov	esi, 2
	mov	edi, eax
	call	shutdown@PLT
	mov	eax, DWORD PTR -2536[rbp]
	mov	edi, eax
	call	close@PLT
	mov	DWORD PTR -2536[rbp], -1
	jmp	.L39
.L40:
	mov	rax, QWORD PTR -2472[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -2528[rbp]
	add	eax, edx
	mov	DWORD PTR -2528[rbp], eax
.L39:
	cmp	DWORD PTR -2532[rbp], 0
	jle	.L41
	mov	eax, DWORD PTR -2532[rbp]
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	cdqe
	mov	rsi, QWORD PTR -2448[rbp+rax*8]
	mov	eax, DWORD PTR -2532[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	.L41
	mov	eax, 1024
	sub	eax, DWORD PTR -2520[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -2520[rbp]
	cdqe
	lea	rcx, -1040[rbp]
	add	rcx, rax
	mov	eax, DWORD PTR -2532[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	QWORD PTR -2472[rbp], rax
	cmp	QWORD PTR -2472[rbp], 0
	jg	.L42
	cmp	DWORD PTR -2532[rbp], 0
	js	.L41
	mov	eax, DWORD PTR -2532[rbp]
	mov	esi, 2
	mov	edi, eax
	call	shutdown@PLT
	mov	eax, DWORD PTR -2532[rbp]
	mov	edi, eax
	call	close@PLT
	mov	DWORD PTR -2532[rbp], -1
	jmp	.L41
.L42:
	mov	rax, QWORD PTR -2472[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -2520[rbp]
	add	eax, edx
	mov	DWORD PTR -2520[rbp], eax
.L41:
	cmp	DWORD PTR -2536[rbp], 0
	jle	.L43
	mov	eax, DWORD PTR -2536[rbp]
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	cdqe
	mov	rsi, QWORD PTR -2320[rbp+rax*8]
	mov	eax, DWORD PTR -2536[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	.L43
	cmp	DWORD PTR -2520[rbp], 0
	jle	.L43
	mov	eax, DWORD PTR -2520[rbp]
	sub	eax, DWORD PTR -2516[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -2516[rbp]
	cdqe
	lea	rcx, -1040[rbp]
	add	rcx, rax
	mov	eax, DWORD PTR -2536[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	QWORD PTR -2472[rbp], rax
	cmp	QWORD PTR -2472[rbp], 0
	jg	.L44
	cmp	DWORD PTR -2536[rbp], 0
	js	.L43
	mov	eax, DWORD PTR -2536[rbp]
	mov	esi, 2
	mov	edi, eax
	call	shutdown@PLT
	mov	eax, DWORD PTR -2536[rbp]
	mov	edi, eax
	call	close@PLT
	mov	DWORD PTR -2536[rbp], -1
	jmp	.L43
.L44:
	mov	rax, QWORD PTR -2472[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -2516[rbp]
	add	eax, edx
	mov	DWORD PTR -2516[rbp], eax
.L43:
	cmp	DWORD PTR -2532[rbp], 0
	jle	.L45
	mov	eax, DWORD PTR -2532[rbp]
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	cdqe
	mov	rsi, QWORD PTR -2320[rbp+rax*8]
	mov	eax, DWORD PTR -2532[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	.L45
	cmp	DWORD PTR -2528[rbp], 0
	jle	.L45
	mov	eax, DWORD PTR -2528[rbp]
	sub	eax, DWORD PTR -2524[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -2524[rbp]
	cdqe
	lea	rcx, -2064[rbp]
	add	rcx, rax
	mov	eax, DWORD PTR -2532[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	QWORD PTR -2472[rbp], rax
	cmp	QWORD PTR -2472[rbp], 0
	jg	.L46
	cmp	DWORD PTR -2532[rbp], 0
	js	.L45
	mov	eax, DWORD PTR -2532[rbp]
	mov	esi, 2
	mov	edi, eax
	call	shutdown@PLT
	mov	eax, DWORD PTR -2532[rbp]
	mov	edi, eax
	call	close@PLT
	mov	DWORD PTR -2532[rbp], -1
	jmp	.L45
.L46:
	mov	rax, QWORD PTR -2472[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -2524[rbp]
	add	eax, edx
	mov	DWORD PTR -2524[rbp], eax
.L45:
	mov	eax, DWORD PTR -2524[rbp]
	cmp	eax, DWORD PTR -2528[rbp]
	jne	.L47
	mov	DWORD PTR -2528[rbp], 0
	mov	eax, DWORD PTR -2528[rbp]
	mov	DWORD PTR -2524[rbp], eax
.L47:
	mov	eax, DWORD PTR -2516[rbp]
	cmp	eax, DWORD PTR -2520[rbp]
	jne	.L48
	mov	DWORD PTR -2520[rbp], 0
	mov	eax, DWORD PTR -2520[rbp]
	mov	DWORD PTR -2516[rbp], eax
.L48:
	cmp	DWORD PTR -2536[rbp], 0
	jns	.L49
	mov	eax, DWORD PTR -2528[rbp]
	cmp	eax, DWORD PTR -2524[rbp]
	jne	.L49
	cmp	DWORD PTR -2532[rbp], 0
	js	.L49
	mov	eax, DWORD PTR -2532[rbp]
	mov	esi, 2
	mov	edi, eax
	call	shutdown@PLT
	mov	eax, DWORD PTR -2532[rbp]
	mov	edi, eax
	call	close@PLT
	mov	DWORD PTR -2532[rbp], -1
.L49:
	cmp	DWORD PTR -2532[rbp], 0
	jns	.L17
	mov	eax, DWORD PTR -2520[rbp]
	cmp	eax, DWORD PTR -2516[rbp]
	jne	.L17
	cmp	DWORD PTR -2536[rbp], 0
	js	.L17
	mov	eax, DWORD PTR -2536[rbp]
	mov	esi, 2
	mov	edi, eax
	call	shutdown@PLT
	mov	eax, DWORD PTR -2536[rbp]
	mov	edi, eax
	call	close@PLT
	mov	DWORD PTR -2536[rbp], -1
	jmp	.L17
.L53:
	nop
	jmp	.L17
.L54:
	nop
	jmp	.L17
	.cfi_endproc
.LFE8:
	.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	"231392550.c"
	.text
	.local	forward_port
	.comm	forward_port,4,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"socket\000"
	.align	2
.LC1:
	.ascii	"setsockopt\000"
	.align	2
.LC2:
	.ascii	"bind\000"
	.align	2
.LC3:
	.ascii	"accepting connections on port %d\012\000"
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	listen_socket, %function
listen_socket:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #48
	str	r0, [fp, #-40]
	ldr	r3, .L8
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmn	r3, #1
	bne	.L2
	ldr	r0, .L8+4
	bl	perror
	mvn	r3, #0
	b	.L6
.L2:
	mov	r3, #1
	str	r3, [fp, #-32]
	sub	r3, fp, #32
	mov	r2, #4
	str	r2, [sp]
	mov	r2, #2
	mov	r1, #1
	ldr	r0, [fp, #-28]
	bl	setsockopt
	mov	r3, r0
	cmn	r3, #1
	bne	.L4
	ldr	r0, .L8+8
	bl	perror
	ldr	r0, [fp, #-28]
	bl	close
	mvn	r3, #0
	b	.L6
.L4:
	sub	r3, fp, #24
	mov	r2, #16
	mov	r1, #0
	mov	r0, r3
	bl	memset
	ldr	r3, [fp, #-40]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	mov	r0, r3
	bl	htons
	mov	r3, r0
	strh	r3, [fp, #-22]	@ movhi
	mov	r3, #2
	strh	r3, [fp, #-24]	@ movhi
	sub	r3, fp, #24
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-28]
	bl	bind
	mov	r3, r0
	cmn	r3, #1
	bne	.L5
	ldr	r0, .L8+12
	bl	perror
	ldr	r0, [fp, #-28]
	bl	close
	mvn	r3, #0
	b	.L6
.L5:
	ldr	r1, [fp, #-40]
	ldr	r0, .L8+16
	bl	printf
	mov	r1, #10
	ldr	r0, [fp, #-28]
	bl	listen
	ldr	r3, [fp, #-28]
.L6:
	ldr	r2, .L8
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L7
	bl	__stack_chk_fail
.L7:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L9:
	.align	2
.L8:
	.word	.LC4
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.size	listen_socket, .-listen_socket
	.section	.rodata
	.align	2
.LC5:
	.ascii	"inet_aton(): bad IP address format\012\000"
	.align	2
.LC6:
	.ascii	"connect()\000"
	.align	2
.LC7:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	connect_socket, %function
connect_socket:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-32]
	str	r1, [fp, #-36]
	ldr	r3, .L17
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmn	r3, #1
	bne	.L11
	ldr	r0, .L17+4
	bl	perror
	mvn	r3, #0
	b	.L15
.L11:
	sub	r3, fp, #24
	mov	r2, #16
	mov	r1, #0
	mov	r0, r3
	bl	memset
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	mov	r0, r3
	bl	htons
	mov	r3, r0
	strh	r3, [fp, #-22]	@ movhi
	mov	r3, #2
	strh	r3, [fp, #-24]	@ movhi
	sub	r3, fp, #24
	add	r3, r3, #4
	mov	r1, r3
	ldr	r0, [fp, #-36]
	bl	inet_aton
	mov	r3, r0
	cmp	r3, #0
	bne	.L13
	ldr	r3, .L17+8
	ldr	r3, [r3]
	mov	r2, #35
	mov	r1, #1
	ldr	r0, .L17+12
	bl	fwrite
	ldr	r0, [fp, #-28]
	bl	close
	mvn	r3, #0
	b	.L15
.L13:
	sub	r3, fp, #24
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-28]
	bl	connect
	mov	r3, r0
	cmn	r3, #1
	bne	.L14
	ldr	r0, .L17+16
	bl	perror
	mov	r1, #2
	ldr	r0, [fp, #-28]
	bl	shutdown
	ldr	r0, [fp, #-28]
	bl	close
	mvn	r3, #0
	b	.L15
.L14:
	ldr	r3, [fp, #-28]
.L15:
	ldr	r2, .L17
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L16
	bl	__stack_chk_fail
.L16:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L18:
	.align	2
.L17:
	.word	.LC7
	.word	.LC0
	.word	stderr
	.word	.LC5
	.word	.LC6
	.size	connect_socket, .-connect_socket
	.section	.rodata
	.align	2
.LC8:
	.ascii	"Usage\012\011fwd <listen-port> <forward-to-port> <f"
	.ascii	"orward-to-ip-address>\012\000"
	.align	2
.LC9:
	.ascii	"select()\000"
	.align	2
.LC10:
	.ascii	"accept()\000"
	.align	2
.LC11:
	.ascii	"connect from %s\012\000"
	.align	2
.LC12:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 2536
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #2544
	str	r0, [fp, #-2536]
	str	r1, [fp, #-2540]
	ldr	r3, .L65
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mvn	r3, #0
	str	r3, [fp, #-2524]
	mvn	r3, #0
	str	r3, [fp, #-2520]
	mov	r3, #0
	str	r3, [fp, #-2516]
	mov	r3, #0
	str	r3, [fp, #-2512]
	mov	r3, #0
	str	r3, [fp, #-2508]
	mov	r3, #0
	str	r3, [fp, #-2504]
	ldr	r3, [fp, #-2536]
	cmp	r3, #4
	beq	.L20
	ldr	r3, .L65+4
	ldr	r3, [r3]
	mov	r2, #67
	mov	r1, #1
	ldr	r0, .L65+8
	bl	fwrite
	mov	r0, #1
	bl	exit
.L20:
	mov	r1, #1
	mov	r0, #13
	bl	signal
	ldr	r3, [fp, #-2540]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r3, r0
	ldr	r2, .L65+12
	str	r3, [r2]
	ldr	r3, [fp, #-2540]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r3, r0
	mov	r0, r3
	bl	listen_socket
	str	r0, [fp, #-2484]
	ldr	r3, [fp, #-2484]
	cmn	r3, #1
	bne	.L21
	mov	r0, #1
	bl	exit
.L21:
	mov	r3, #0
	str	r3, [fp, #-2500]
	sub	r3, fp, #2432
	sub	r3, r3, #4
	sub	r3, r3, #4
	str	r3, [fp, #-2480]
	mov	r3, #0
	str	r3, [fp, #-2496]
	b	.L22
.L23:
	ldr	r3, [fp, #-2480]
	ldr	r2, [fp, #-2496]
	mov	r1, #0
	str	r1, [r3, r2, lsl #2]
	ldr	r3, [fp, #-2496]
	add	r3, r3, #1
	str	r3, [fp, #-2496]
.L22:
	ldr	r3, [fp, #-2496]
	cmp	r3, #31
	bls	.L23
	sub	r3, fp, #2304
	sub	r3, r3, #4
	sub	r3, r3, #4
	str	r3, [fp, #-2476]
	mov	r3, #0
	str	r3, [fp, #-2492]
	b	.L24
.L25:
	ldr	r3, [fp, #-2476]
	ldr	r2, [fp, #-2492]
	mov	r1, #0
	str	r1, [r3, r2, lsl #2]
	ldr	r3, [fp, #-2492]
	add	r3, r3, #1
	str	r3, [fp, #-2492]
.L24:
	ldr	r3, [fp, #-2492]
	cmp	r3, #31
	bls	.L25
	sub	r3, fp, #2176
	sub	r3, r3, #4
	sub	r3, r3, #4
	str	r3, [fp, #-2472]
	mov	r3, #0
	str	r3, [fp, #-2488]
	b	.L26
.L27:
	ldr	r3, [fp, #-2472]
	ldr	r2, [fp, #-2488]
	mov	r1, #0
	str	r1, [r3, r2, lsl #2]
	ldr	r3, [fp, #-2488]
	add	r3, r3, #1
	str	r3, [fp, #-2488]
.L26:
	ldr	r3, [fp, #-2488]
	cmp	r3, #31
	bls	.L27
	ldr	r3, [fp, #-2484]
	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, #-2436]
	ldr	r3, [fp, #-2484]
	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, #-2436]
	ldr	r2, [fp, #-2500]
	ldr	r3, [fp, #-2484]
	cmp	r2, r3
	movge	r3, r2
	movlt	r3, r3
	str	r3, [fp, #-2500]
	ldr	r3, [fp, #-2524]
	cmp	r3, #0
	ble	.L28
	ldr	r3, [fp, #-2516]
	cmp	r3, #1024
	bge	.L28
	ldr	r3, [fp, #-2524]
	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, #-2436]
	ldr	r3, [fp, #-2524]
	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, #-2436]
.L28:
	ldr	r3, [fp, #-2520]
	cmp	r3, #0
	ble	.L29
	ldr	r3, [fp, #-2508]
	cmp	r3, #1024
	bge	.L29
	ldr	r3, [fp, #-2520]
	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, #-2436]
	ldr	r3, [fp, #-2520]
	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, #-2436]
.L29:
	ldr	r3, [fp, #-2524]
	cmp	r3, #0
	ble	.L30
	ldr	r2, [fp, #-2508]
	ldr	r3, [fp, #-2504]
	sub	r3, r2, r3
	cmp	r3, #0
	ble	.L30
	ldr	r3, [fp, #-2524]
	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, #-2308]
	ldr	r3, [fp, #-2524]
	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, #-2308]
.L30:
	ldr	r3, [fp, #-2520]
	cmp	r3, #0
	ble	.L31
	ldr	r2, [fp, #-2516]
	ldr	r3, [fp, #-2512]
	sub	r3, r2, r3
	cmp	r3, #0
	ble	.L31
	ldr	r3, [fp, #-2520]
	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, #-2308]
	ldr	r3, [fp, #-2520]
	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, #-2308]
.L31:
	ldr	r3, [fp, #-2524]
	cmp	r3, #0
	ble	.L32
	ldr	r3, [fp, #-2524]
	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, #-2180]
	ldr	r3, [fp, #-2524]
	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, #-2180]
	ldr	r2, [fp, #-2500]
	ldr	r3, [fp, #-2524]
	cmp	r2, r3
	movge	r3, r2
	movlt	r3, r3
	str	r3, [fp, #-2500]
.L32:
	ldr	r3, [fp, #-2520]
	cmp	r3, #0
	ble	.L33
	ldr	r3, [fp, #-2520]
	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, #-2180]
	ldr	r3, [fp, #-2520]
	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, #-2180]
	ldr	r2, [fp, #-2500]
	ldr	r3, [fp, #-2520]
	cmp	r2, r3
	movge	r3, r2
	movlt	r3, r3
	str	r3, [fp, #-2500]
.L33:
	ldr	r3, [fp, #-2500]
	add	r0, r3, #1
	sub	r3, fp, #2176
	sub	r3, r3, #4
	sub	r3, r3, #4
	sub	r2, fp, #2304
	sub	r2, r2, #4
	sub	r2, r2, #4
	sub	r1, fp, #2432
	sub	r1, r1, #4
	sub	r1, r1, #4
	mov	ip, #0
	str	ip, [sp]
	bl	select
	str	r0, [fp, #-2468]
	ldr	r3, [fp, #-2468]
	cmn	r3, #1
	bne	.L34
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #4
	beq	.L63
.L34:
	ldr	r3, [fp, #-2468]
	cmn	r3, #1
	bne	.L36
	ldr	r0, .L65+16
	bl	perror
	mov	r0, #1
	bl	exit
.L36:
	ldr	r3, [fp, #-2484]
	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, #-2436]
	ldr	r3, [fp, #-2484]
	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	.L37
	mov	r3, #16
	str	r3, [fp, #-2528]
	ldr	r2, [fp, #-2528]
	sub	r3, fp, #2448
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r2, fp, #2512
	sub	r2, r2, #4
	sub	r2, r2, #12
	sub	r3, fp, #2448
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, [fp, #-2484]
	bl	accept
	str	r0, [fp, #-2464]
	ldr	r3, [fp, #-2464]
	cmn	r3, #1
	bne	.L38
	ldr	r0, .L65+20
	bl	perror
	b	.L37
.L38:
	ldr	r3, [fp, #-2524]
	cmp	r3, #0
	blt	.L39
	mov	r1, #2
	ldr	r0, [fp, #-2524]
	bl	shutdown
	ldr	r0, [fp, #-2524]
	bl	close
	mvn	r3, #0
	str	r3, [fp, #-2524]
.L39:
	ldr	r3, [fp, #-2520]
	cmp	r3, #0
	blt	.L40
	mov	r1, #2
	ldr	r0, [fp, #-2520]
	bl	shutdown
	ldr	r0, [fp, #-2520]
	bl	close
	mvn	r3, #0
	str	r3, [fp, #-2520]
.L40:
	mov	r3, #0
	str	r3, [fp, #-2512]
	ldr	r3, [fp, #-2512]
	str	r3, [fp, #-2516]
	mov	r3, #0
	str	r3, [fp, #-2504]
	ldr	r3, [fp, #-2504]
	str	r3, [fp, #-2508]
	ldr	r3, [fp, #-2464]
	str	r3, [fp, #-2524]
	ldr	r3, .L65+12
	ldr	r2, [r3]
	ldr	r3, [fp, #-2540]
	add	r3, r3, #12
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, r2
	bl	connect_socket
	str	r0, [fp, #-2520]
	ldr	r3, [fp, #-2520]
	cmn	r3, #1
	bne	.L41
	ldr	r3, [fp, #-2524]
	cmp	r3, #0
	blt	.L64
	mov	r1, #2
	ldr	r0, [fp, #-2524]
	bl	shutdown
	ldr	r0, [fp, #-2524]
	bl	close
	mvn	r3, #0
	str	r3, [fp, #-2524]
	b	.L64
.L41:
	ldr	r0, [fp, #-2452]
	bl	inet_ntoa
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L65+24
	bl	printf
	b	.L21
.L37:
	ldr	r3, [fp, #-2524]
	cmp	r3, #0
	ble	.L43
	ldr	r3, [fp, #-2524]
	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, #-2180]
	ldr	r3, [fp, #-2524]
	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	.L43
	sub	r1, fp, #2512
	sub	r1, r1, #4
	sub	r1, r1, #12
	mov	r3, #1
	mov	r2, #1
	ldr	r0, [fp, #-2524]
	bl	recv
	str	r0, [fp, #-2460]
	ldr	r3, [fp, #-2460]
	cmp	r3, #0
	bgt	.L44
	ldr	r3, [fp, #-2524]
	cmp	r3, #0
	blt	.L43
	mov	r1, #2
	ldr	r0, [fp, #-2524]
	bl	shutdown
	ldr	r0, [fp, #-2524]
	bl	close
	mvn	r3, #0
	str	r3, [fp, #-2524]
	b	.L43
.L44:
	sub	r1, fp, #2512
	sub	r1, r1, #4
	sub	r1, r1, #12
	mov	r3, #1
	mov	r2, #1
	ldr	r0, [fp, #-2520]
	bl	send
.L43:
	ldr	r3, [fp, #-2520]
	cmp	r3, #0
	ble	.L46
	ldr	r3, [fp, #-2520]
	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, #-2180]
	ldr	r3, [fp, #-2520]
	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	.L46
	sub	r1, fp, #2512
	sub	r1, r1, #4
	sub	r1, r1, #12
	mov	r3, #1
	mov	r2, #1
	ldr	r0, [fp, #-2520]
	bl	recv
	str	r0, [fp, #-2460]
	ldr	r3, [fp, #-2460]
	cmp	r3, #0
	bgt	.L47
	ldr	r3, [fp, #-2520]
	cmp	r3, #0
	blt	.L46
	mov	r1, #2
	ldr	r0, [fp, #-2520]
	bl	shutdown
	ldr	r0, [fp, #-2520]
	bl	close
	mvn	r3, #0
	str	r3, [fp, #-2520]
	b	.L46
.L47:
	sub	r1, fp, #2512
	sub	r1, r1, #4
	sub	r1, r1, #12
	mov	r3, #1
	mov	r2, #1
	ldr	r0, [fp, #-2524]
	bl	send
.L46:
	ldr	r3, [fp, #-2524]
	cmp	r3, #0
	ble	.L49
	ldr	r3, [fp, #-2524]
	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, #-2436]
	ldr	r3, [fp, #-2524]
	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	.L49
	ldr	r2, [fp, #-2516]
	sub	r3, fp, #2048
	sub	r3, r3, #4
	sub	r3, r3, #4
	add	r1, r3, r2
	ldr	r3, [fp, #-2516]
	rsb	r3, r3, #1024
	mov	r2, r3
	ldr	r0, [fp, #-2524]
	bl	read
	str	r0, [fp, #-2460]
	ldr	r3, [fp, #-2460]
	cmp	r3, #0
	bgt	.L50
	ldr	r3, [fp, #-2524]
	cmp	r3, #0
	blt	.L49
	mov	r1, #2
	ldr	r0, [fp, #-2524]
	bl	shutdown
	ldr	r0, [fp, #-2524]
	bl	close
	mvn	r3, #0
	str	r3, [fp, #-2524]
	b	.L49
.L50:
	ldr	r2, [fp, #-2516]
	ldr	r3, [fp, #-2460]
	add	r3, r2, r3
	str	r3, [fp, #-2516]
.L49:
	ldr	r3, [fp, #-2520]
	cmp	r3, #0
	ble	.L51
	ldr	r3, [fp, #-2520]
	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, #-2436]
	ldr	r3, [fp, #-2520]
	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	.L51
	ldr	r2, [fp, #-2508]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	add	r1, r3, r2
	ldr	r3, [fp, #-2508]
	rsb	r3, r3, #1024
	mov	r2, r3
	ldr	r0, [fp, #-2520]
	bl	read
	str	r0, [fp, #-2460]
	ldr	r3, [fp, #-2460]
	cmp	r3, #0
	bgt	.L52
	ldr	r3, [fp, #-2520]
	cmp	r3, #0
	blt	.L51
	mov	r1, #2
	ldr	r0, [fp, #-2520]
	bl	shutdown
	ldr	r0, [fp, #-2520]
	bl	close
	mvn	r3, #0
	str	r3, [fp, #-2520]
	b	.L51
.L52:
	ldr	r2, [fp, #-2508]
	ldr	r3, [fp, #-2460]
	add	r3, r2, r3
	str	r3, [fp, #-2508]
.L51:
	ldr	r3, [fp, #-2524]
	cmp	r3, #0
	ble	.L53
	ldr	r3, [fp, #-2524]
	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, #-2308]
	ldr	r3, [fp, #-2524]
	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	.L53
	ldr	r3, [fp, #-2508]
	cmp	r3, #0
	ble	.L53
	ldr	r2, [fp, #-2504]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	add	r1, r3, r2
	ldr	r2, [fp, #-2508]
	ldr	r3, [fp, #-2504]
	sub	r3, r2, r3
	mov	r2, r3
	ldr	r0, [fp, #-2524]
	bl	write
	str	r0, [fp, #-2460]
	ldr	r3, [fp, #-2460]
	cmp	r3, #0
	bgt	.L54
	ldr	r3, [fp, #-2524]
	cmp	r3, #0
	blt	.L53
	mov	r1, #2
	ldr	r0, [fp, #-2524]
	bl	shutdown
	ldr	r0, [fp, #-2524]
	bl	close
	mvn	r3, #0
	str	r3, [fp, #-2524]
	b	.L53
.L54:
	ldr	r2, [fp, #-2504]
	ldr	r3, [fp, #-2460]
	add	r3, r2, r3
	str	r3, [fp, #-2504]
.L53:
	ldr	r3, [fp, #-2520]
	cmp	r3, #0
	ble	.L55
	ldr	r3, [fp, #-2520]
	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, #-2308]
	ldr	r3, [fp, #-2520]
	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	.L55
	ldr	r3, [fp, #-2516]
	cmp	r3, #0
	ble	.L55
	ldr	r2, [fp, #-2512]
	sub	r3, fp, #2048
	sub	r3, r3, #4
	sub	r3, r3, #4
	add	r1, r3, r2
	ldr	r2, [fp, #-2516]
	ldr	r3, [fp, #-2512]
	sub	r3, r2, r3
	mov	r2, r3
	ldr	r0, [fp, #-2520]
	bl	write
	str	r0, [fp, #-2460]
	ldr	r3, [fp, #-2460]
	cmp	r3, #0
	bgt	.L56
	ldr	r3, [fp, #-2520]
	cmp	r3, #0
	blt	.L55
	mov	r1, #2
	ldr	r0, [fp, #-2520]
	bl	shutdown
	ldr	r0, [fp, #-2520]
	bl	close
	mvn	r3, #0
	str	r3, [fp, #-2520]
	b	.L55
.L56:
	ldr	r2, [fp, #-2512]
	ldr	r3, [fp, #-2460]
	add	r3, r2, r3
	str	r3, [fp, #-2512]
.L55:
	ldr	r2, [fp, #-2512]
	ldr	r3, [fp, #-2516]
	cmp	r2, r3
	bne	.L57
	mov	r3, #0
	str	r3, [fp, #-2516]
	ldr	r3, [fp, #-2516]
	str	r3, [fp, #-2512]
.L57:
	ldr	r2, [fp, #-2504]
	ldr	r3, [fp, #-2508]
	cmp	r2, r3
	bne	.L58
	mov	r3, #0
	str	r3, [fp, #-2508]
	ldr	r3, [fp, #-2508]
	str	r3, [fp, #-2504]
.L58:
	ldr	r3, [fp, #-2524]
	cmp	r3, #0
	bge	.L59
	ldr	r2, [fp, #-2516]
	ldr	r3, [fp, #-2512]
	cmp	r2, r3
	bne	.L59
	ldr	r3, [fp, #-2520]
	cmp	r3, #0
	blt	.L59
	mov	r1, #2
	ldr	r0, [fp, #-2520]
	bl	shutdown
	ldr	r0, [fp, #-2520]
	bl	close
	mvn	r3, #0
	str	r3, [fp, #-2520]
.L59:
	ldr	r3, [fp, #-2520]
	cmp	r3, #0
	bge	.L21
	ldr	r2, [fp, #-2508]
	ldr	r3, [fp, #-2504]
	cmp	r2, r3
	bne	.L21
	ldr	r3, [fp, #-2524]
	cmp	r3, #0
	blt	.L21
	mov	r1, #2
	ldr	r0, [fp, #-2524]
	bl	shutdown
	ldr	r0, [fp, #-2524]
	bl	close
	mvn	r3, #0
	str	r3, [fp, #-2524]
	b	.L21
.L63:
	nop
	b	.L21
.L64:
	nop
	b	.L21
.L66:
	.align	2
.L65:
	.word	.LC12
	.word	stderr
	.word	.LC8
	.word	forward_port
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
