// File: /workspace/github_c_makefile_star2_O1/TeaInside[P]teavpn/src/teavpn/client/tcp.c
// Function: teavpn_tcp_client
__attribute__((force_align_arg_pointer)) uint8_t teavpn_tcp_client(client_config *config)
{
	fd_set rd_set;
	uint64_t seq = 0;
	int fd_ret, max_fd;
	teavpn_packet packet;
	register ssize_t nwrite, nread;

	/**
	 * To store config file buffer (parsing).
	 *
	 * Avoid to use heap as long as it
	 * is still eligible to use stack.
	 *
	 * (heap is slower than stack)
	 */
	char config_buffer[4096];

	/**
	 * Use packet buffer as struct sockadd_in.
	 */
	#define server_addr ((struct sockaddr_in *)&(packet.data.data))


	if (teavpn_tcp_client_init(config_buffer, config)) {
		return 1;
	}


	/**
	 * Prepare server address.
	 */
	memset(server_addr, 0, sizeof(struct sockaddr_in));
	server_addr->sin_family = AF_INET;
	server_addr->sin_port = htons(config->server_port);
	server_addr->sin_addr.s_addr = inet_addr(config->server_ip);



	/**
	 * Conncet to TeaVPN server.
	 */
	debug_log(0, "Connecting to %s:%d...", config->server_ip, config->server_port);
	if (connect(net_fd, (struct sockaddr *)server_addr, sizeof(struct sockaddr_in)) < 0) {
		debug_log(0, "Error on connect");
		perror("Error on connect");
		goto close;
	}


	/**
	 * Prepare auth packet.
	 */
	packet.info.type = TEAVPN_PACKET_AUTH;
	packet.info.len = OFFSETOF(teavpn_packet, data) + sizeof(struct teavpn_packet_auth);
	packet.data.auth.username_len = config->username_len;
	packet.data.auth.password_len = config->password_len;
	strcpy(packet.data.auth.username, config->username);
	strcpy(packet.data.auth.password, config->password);

	/**
	 * Debug only.
	 */
	#ifdef TEAVPN_DEBUG
	debug_log(3, "username: \"%s\"", packet.data.auth.username);
	debug_log(3, "password: \"%s\"", packet.data.auth.password);
	debug_log(3, "username_len: %d", packet.data.auth.username_len);
	debug_log(3, "password_len: %d", packet.data.auth.password_len);
	#endif

	/**
	 * Send auth packet to server.
	 */
	packet.info.seq = ++seq; // seq 1
	nwrite = write(net_fd, &packet, TEAVPN_PACK(sizeof(packet.data.auth)));

	debug_log(3, "[%ld] Write auth packet to server %ld bytes", seq, nwrite);

	if (nwrite == 0) {
		debug_log(0, "Connection reset by peer");
		goto close;
	}

	if (nwrite < 0) {
		debug_log(0, "Error write to net_fd");
		perror("Error write to net_fd");
		goto close;
	}



	/**
	 * Read server response.
	 */
	seq++; // seq 2
	nread = read(net_fd, &packet, sizeof(packet));

	debug_log(
		3,
		"[%ld] Read server signal %ld bytes (client_seq: %ld) (server_seq: %ld) (seq %s)",
		seq, nread, seq, packet.info.seq, (seq == packet.info.seq) ? "match" : "invalid"
	);

	if (nread == 0) {
		debug_log(0, "Connection reset by peer");
		goto close;
	}

	if (seq != packet.info.seq) {
		debug_log(0, "Invalid packet sequence (client_seq: %ld) (server_seq: %ld)",
			seq, packet.info.seq);
		goto close;
	}

	/**
	 * Check server response.
	 */
	if (packet.info.type == TEAVPN_PACKET_SIG) {
		if (packet.data.sig.sig == TEAVPN_SIG_AUTH_OK) {
			debug_log(0, "Auth OK");
		} else {
			print_err_sig(packet.data.sig.sig);
			goto close;
		}
	} else {
		debug_log(0, "Invalid server response");
		goto close;
	}



	/**
	 * Send sig ack to server.
	 */
	packet.info.type = TEAVPN_PACKET_SIG;
	packet.data.sig.sig = TEAVPN_SIG_ACK;
	packet.info.seq = ++seq; // seq 3

	printf("info.type: %d = %d\n", packet.info.type, TEAVPN_PACKET_SIG);
	printf("sig.sig: %d = %d\n", packet.data.sig.sig, TEAVPN_SIG_ACK);
	fflush(stdout);
	nwrite = write(net_fd, &packet, TEAVPN_PACK(sizeof(packet.data.sig)));

	debug_log(3, "[%ld] Write sig ack to server %ld bytes", seq, nwrite);

	if (nwrite == 0) {
		debug_log(0, "Connection reset by peer");
		goto close;
	}

	if (nwrite < 0) {
		debug_log(0, "Error write to net_fd");
		perror("Error write to net_fd");
		goto close;
	}



	/**
	 * Read network interface configuration.
	 */
	seq++; // seq 4
	nread = read(net_fd, &packet, sizeof(packet));

	if (seq != packet.info.seq) {
		debug_log(0, "Invalid packet sequence (client_seq: %ld) (server_seq: %ld)",
			seq, packet.info.seq);
		goto close;
	}

	if (packet.info.type != TEAVPN_PACKET_CONF) {
		debug_log(0, "Invalid packet");
		goto close;
	}

	/**
	 * Debug only.
	 */
	#ifdef TEAVPN_DEBUG
	debug_log(3, "inet4: \"%s\"\n", packet.data.conf.inet4);
	debug_log(3, "inet4_bc: \"%s\"\n", packet.data.conf.inet4_broadcast);
	#endif



	/**
	 * Apply network interface configuration to TUN/TAP interface.
	 */
	if (!teavpn_tcp_client_init_iface(config, &(packet.data.conf))) {
		debug_log(0, "Cannot init TUN/TAP interface\n");
		goto close;
	}



	/**
	 * Calculate maximum value between tap_fd and net_fd.
	 */
	max_fd = (tap_fd > net_fd) ? tap_fd : net_fd;

	packet.info.type = TEAVPN_PACKET_DATA;

	/**
	 * TeaVPN client event loop.
	 */
	while (true) {
		/**
		 * Set rd_set to zero.
		 *
		 * This is a compulsory step in using
		 * select(2) inside of an event loop.
		 */
		FD_ZERO(&rd_set);


		/**
		 * Add file descriptors to rd_set.
		 */
		FD_SET(net_fd, &rd_set);
		FD_SET(tap_fd, &rd_set);


		/**
		 * Block main process until there is one or more ready fd.
		 * Read `man 2 select_tut` for details.
		 */
		fd_ret = select(max_fd + 1, &rd_set, NULL, NULL, NULL);

		/**
		 * Got interrupt signal.
		 */
		if ((fd_ret < 0) && (errno == EINTR)) {
			debug_log(2, "select(2) got interrupt signal");
			continue;
		}

		/**
		 * Got an error.
		 */
		if (fd_ret < 0) {
			debug_log(0, "select(2) got an error");
			perror("select()");
			continue;
		}


		/**
		 * Read data from client TUN/TAP and write it to server fd.
		 */
		if (FD_ISSET(tap_fd, &rd_set)) {
			/**
			 * Read from TUN/TAP.
			 */
			nread = read(tap_fd, &(packet.data.data), TEAVPN_TAP_READ_SIZE);
			debug_log(4, "Read from tap_fd %ld bytes", nread);
			if (nread < 0) {
				debug_log(0, "Error read from tap_fd");
				perror("Error read from tap_fd");
				goto next_1;
			}

			/**
			 * Write to server fd.
			 */
			packet.info.seq = ++seq;
			packet.info.len = TEAVPN_PACK(nread);
			nwrite = write(net_fd, &packet, TEAVPN_PACK(nread));
			debug_log(3, "[%ld] Write data to server %ld bytes", seq, nwrite);
			if (nwrite == 0) {
				debug_log(0, "Connection reset by peer");
				goto close;
			}
			if (nwrite < 0) {
				debug_log(0, "Error write to net_fd");
				perror("Error write to net_fd");
				goto next_1;
			}
		}


		next_1:
		/**
		 * Read data from server and write it to TUN/TAP interface.
		 */
		if (FD_ISSET(net_fd, &rd_set)) {
			/**
			 * Read from server fd.
			 */
			seq++;
			nread = read(net_fd, &packet, sizeof(packet));

			if (nread == 0) {
				debug_log(0, "Connection reset by peer");
				goto close;
			}
			if (nread < 0) {
				debug_log(0, "Error read from net_fd");
				perror("Error read from net_fd");
				goto next_2;
			}

			if (packet.info.type == TEAVPN_PACKET_DATA) {

				while (nread < (packet.info.len)) {
					register ssize_t tmp_nread;

					debug_log(3, "Read extra %ld/%ld bytes", nread, packet.info.len);
					tmp_nread = read(
						net_fd,
						&(((char *)&packet)[nread]),
						packet.info.len - nread
					);

					if (tmp_nread < 0) {
						perror("Error read extra");

					} else {
						nread += tmp_nread;
					}
				}

				debug_log(3, "[%ld] Read data from server %ld bytes (client_seq: %ld) (server_seq: %ld) (seq %s)",
					seq, nread, seq, packet.info.seq, (seq == packet.info.seq) ? "match" : "invalid");

				/**
				 * Write to TUN/TAP.
				 */
				nwrite = write(tap_fd, &(packet.data.data), nread - OFFSETOF(teavpn_packet, data));
				debug_log(4, "Write to tap_fd %ld bytes", nwrite);
				if (nread < 0) {
					debug_log(0, "Error read from tap_fd");
					perror("Error read from tap_fd");
					goto next_2;
				}
			}
		}

		next_2:
		(void)1;
	}

close:
	close(tap_fd);
	close(net_fd);

	return 1;

	#undef server_addr
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
andq $-0x10, %rsp
subq $0x20b0, %rsp           # imm = 0x20B0
movq %rdi, %r14
movq %fs:0x28, %rax
movq %rax, 0x20a0(%rsp)
cmpq $0x0, 0x8(%rdi)
je 0x3a38
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
callq 0x2fc9
testb %al, %al
je 0x3a52
cmpq $0x0, 0x28(%r14)
je 0x3a5e
cmpb $0x40, 0x38(%r14)
jb 0x3a6a
leaq 0x3d6c(%rip), %rdi      # 0x77b9
jmp 0x4191
leaq 0x3d39(%rip), %rdi      # 0x7792
jmp 0x4191
leaq 0x3d3b(%rip), %rdi      # 0x77a0
jmp 0x4191
cmpq $0x0, 0x30(%r14)
je 0x4178
cmpq $0x0, (%r14)
je 0x4181
cmpw $0x0, 0x3a(%r14)
je 0x418a
movb 0x3c(%r14), %al
leaq 0x798e(%rip), %r13      # 0xb424
movb %al, (%r13)
cmpb $0x2, %al
jb 0x3aac
leaq 0x3d7a(%rip), %rdi      # 0x781f
xorl %eax, %eax
callq 0x605c
movq 0x18(%r14), %rdi
movl $0x1, %esi
callq 0x6178
movl %eax, 0x78a4(%rip)      # 0xb364
movq 0x18(%r14), %rsi
testl %eax, %eax
js 0x41c0
leaq 0x3d96(%rip), %rdi      # 0x7869
xorl %eax, %eax
callq 0x605c
cmpb $0x0, (%r13)
je 0x3aef
leaq 0x3dac(%rip), %rdi      # 0x7894
xorl %eax, %eax
callq 0x605c
movl $0x2, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x2410
movl %eax, 0x785a(%rip)      # 0xb360
testl %eax, %eax
js 0x41fe
cmpb $0x0, (%r13)
je 0x3b23
leaq 0x3da6(%rip), %rdi      # 0x78c2
xorl %eax, %eax
callq 0x605c
leaq 0x1020(%rsp), %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movw $0x2, (%rbx)
movzwl 0x3a(%r14), %eax
rolw $0x8, %ax
movw %ax, 0x2(%rbx)
movq (%r14), %rdi
callq 0x2210
movl %eax, 0x4(%rbx)
movq (%r14), %rsi
movzwl 0x3a(%r14), %edx
leaq 0x38db(%rip), %rdi      # 0x7438
xorl %eax, %eax
callq 0x605c
movl 0x77f6(%rip), %edi      # 0xb360
movq %rbx, %rsi
movl $0x10, %edx
callq 0x23a0
testl %eax, %eax
js 0x4205
leaq 0x1022(%rsp), %r12
movl $0x1, -0x12(%r12)
movw $0x212, -0xe(%r12)      # imm = 0x212
movb 0x38(%r14), %al
movb %al, -0x2(%r12)
movb 0x39(%r14), %al
movb %al, -0x1(%r12)
movq 0x28(%r14), %rsi
movq %r12, %rdi
callq 0x2070
leaq 0x1122(%rsp), %r15
movq 0x30(%r14), %rsi
movq %r15, %rdi
callq 0x2070
cmpb $0x3, (%r13)
jb 0x3be2
leaq 0x3888(%rip), %rdi      # 0x7460
movq %r12, %rsi
xorl %eax, %eax
callq 0x605c
cmpb $0x3, (%r13)
jb 0x3bfa
leaq 0x387f(%rip), %rdi      # 0x746f
movq %r15, %rsi
xorl %eax, %eax
callq 0x605c
cmpb $0x3, (%r13)
jb 0x3c17
movzbl 0x1020(%rsp), %esi
leaq 0x386e(%rip), %rdi      # 0x747e
xorl %eax, %eax
callq 0x605c
cmpb $0x3, (%r13)
jb 0x3c34
movzbl 0x1021(%rsp), %esi
leaq 0x3862(%rip), %rdi      # 0x748f
xorl %eax, %eax
callq 0x605c
leaq 0x1010(%rsp), %rsi
movq $0x1, 0x8(%rsi)
movl 0x7716(%rip), %edi      # 0xb360
movl $0x212, %edx            # imm = 0x212
callq 0x20c0
movq %rax, %r15
cmpb $0x3, (%r13)
jb 0x3c74
leaq 0x383b(%rip), %rdi      # 0x74a0
movl $0x1, %esi
movq %r15, %rdx
xorl %eax, %eax
callq 0x605c
testq %r15, %r15
je 0x41d0
js 0x422f
movl 0x76d7(%rip), %edi      # 0xb360
leaq 0x1010(%rsp), %rsi
movl $0x1010, %edx           # imm = 0x1010
callq 0x21d0
movq %rax, %r15
cmpb $0x3, (%r13)
jb 0x3cde
movq 0x1018(%rsp), %r8
cmpq $0x2, %r8
leaq 0x3893(%rip), %rax      # 0x754b
leaq 0x3892(%rip), %r9       # 0x7551
cmoveq %rax, %r9
leaq 0x3831(%rip), %rdi      # 0x74fb
movl $0x2, %esi
movl $0x2, %ecx
movq %r15, %rdx
xorl %eax, %eax
callq 0x605c
testq %r15, %r15
je 0x41d0
movq 0x1018(%rsp), %rdx
cmpq $0x2, %rdx
jne 0x41e0
cmpl $0x4, 0x1010(%rsp)
jne 0x41f5
movl 0x1020(%rsp), %eax
cmpl $0x2, %eax
jne 0x420c
leaq 0x3877(%rip), %rdi      # 0x7595
xorl %eax, %eax
callq 0x605c
leaq 0x1010(%rsp), %r15
movl $0x4, (%r15)
movl $0x10, 0x10(%r15)
movq $0x3, 0x8(%r15)
leaq 0x386a(%rip), %rdi      # 0x75b5
movl $0x4, %esi
movl $0x4, %edx
xorl %eax, %eax
callq 0x2150
movl 0x10(%r15), %esi
leaq 0x3862(%rip), %rdi      # 0x75c9
movl $0x10, %edx
xorl %eax, %eax
callq 0x2150
movq 0x7256(%rip), %rax      # 0xafd0
movq (%rax), %rdi
callq 0x22d0
movl 0x75d8(%rip), %edi      # 0xb360
movl $0x14, %edx
movq %r15, %rsi
callq 0x20c0
movq %rax, %r15
cmpb $0x2, (%r13)
jbe 0x3db5
leaq 0x3835(%rip), %rdi      # 0x75db
movl $0x3, %esi
movq %r15, %rdx
xorl %eax, %eax
callq 0x605c
testq %r15, %r15
je 0x41d0
js 0x42a5
movl 0x7596(%rip), %edi      # 0xb360
leaq 0x1010(%rsp), %r15
movl $0x1010, %edx           # imm = 0x1010
movq %r15, %rsi
callq 0x21d0
movq 0x8(%r15), %rdx
cmpq $0x4, %rdx
jne 0x424f
cmpl $0x8, 0x1010(%rsp)
jne 0x428d
cmpb $0x3, (%r13)
jb 0x3e13
leaq 0x3809(%rip), %rdi      # 0x7612
movq %rbx, %rsi
xorl %eax, %eax
callq 0x605c
cmpb $0x3, (%r13)
jb 0x3e30
leaq 0x1033(%rsp), %rsi
leaq 0x37f6(%rip), %rdi      # 0x761f
xorl %eax, %eax
callq 0x605c
movq %r14, %rdi
movq %rbx, %rsi
callq 0x42b1
testb %al, %al
je 0x4299
movl 0x751b(%rip), %eax      # 0xb364
movl 0x7510(%rip), %r14d     # 0xb360
cmpl %r14d, %eax
cmovgl %eax, %r14d
leaq 0x1010(%rsp), %rax
movl $0x2, (%rax)
incl %r14d
movl $0x4, %eax
movq %rax, 0x8(%rsp)
leaq 0x2020(%rsp), %r15
leaq 0x37cd(%rip), %r12      # 0x764e
xorps %xmm0, %xmm0
movaps %xmm0, 0x2090(%rsp)
movaps %xmm0, 0x2080(%rsp)
movaps %xmm0, 0x2070(%rsp)
movaps %xmm0, 0x2060(%rsp)
movaps %xmm0, 0x2050(%rsp)
movaps %xmm0, 0x2040(%rsp)
movaps %xmm0, 0x2030(%rsp)
movaps %xmm0, 0x2020(%rsp)
movl 0x7496(%rip), %ecx      # 0xb360
leal 0x3f(%rcx), %eax
testl %ecx, %ecx
cmovnsl %ecx, %eax
movl %eax, %edx
andl $-0x40, %edx
subl %edx, %ecx
movl $0x1, %edx
shlq %cl, %rdx
sarl $0x6, %eax
cltq
orq %rdx, 0x2020(%rsp,%rax,8)
movl 0x7470(%rip), %ecx      # 0xb364
leal 0x3f(%rcx), %eax
testl %ecx, %ecx
cmovnsl %ecx, %eax
movl %eax, %edx
andl $-0x40, %edx
subl %edx, %ecx
movl $0x1, %edx
shlq %cl, %rdx
sarl $0x6, %eax
cltq
orq %rdx, 0x2020(%rsp,%rax,8)
movl %r14d, %edi
movq %r15, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x2290
testl %eax, %eax
jns 0x3f5c
callq 0x2050
cmpl $0x4, (%rax)
jne 0x3f52
cmpb $0x2, (%r13)
jb 0x3e81
movq %r12, %rdi
xorl %eax, %eax
callq 0x605c
jmp 0x3e81
callq 0x24a1
jmp 0x3e81
movl 0x7402(%rip), %edi      # 0xb364
leal 0x3f(%rdi), %eax
testl %edi, %edi
cmovnsl %edi, %eax
sarl $0x6, %eax
cltq
movq 0x2020(%rsp,%rax,8), %rax
btq %rdi, %rax
jae 0x4020
movl $0xbb8, %edx            # imm = 0xBB8
movq %rbx, %rsi
callq 0x21d0
movq %rax, %r12
cmpb $0x4, (%r13)
jb 0x3fa9
leaq 0x36ee(%rip), %rdi      # 0x768d
movq %r12, %rsi
xorl %eax, %eax
callq 0x605c
testq %r12, %r12
js 0x4150
movq 0x8(%rsp), %rax
incq %rax
movq %rax, 0x8(%rsp)
movq %rax, 0x1018(%rsp)
addq $0x10, %r12
movw %r12w, 0x1014(%rsp)
movl 0x7386(%rip), %edi      # 0xb360
leaq 0x1010(%rsp), %rsi
movq %r12, %rdx
callq 0x20c0
movq %rax, %r12
cmpb $0x3, (%r13)
jb 0x400a
leaq 0x36c4(%rip), %rdi      # 0x76bf
movq 0x8(%rsp), %rsi
movq %r12, %rdx
xorl %eax, %eax
callq 0x605c
testq %r12, %r12
je 0x41d0
leaq 0x34cb(%rip), %r12      # 0x74e5
js 0x4157
movl 0x733a(%rip), %edi      # 0xb360
leal 0x3f(%rdi), %eax
testl %edi, %edi
cmovnsl %edi, %eax
sarl $0x6, %eax
cltq
movq 0x2020(%rsp,%rax,8), %rax
btq %rdi, %rax
jae 0x3e7a
incq 0x8(%rsp)
movl $0x1010, %edx           # imm = 0x1010
leaq 0x1010(%rsp), %rsi
callq 0x21d0
testq %rax, %rax
je 0x41d0
js 0x416e
cmpl $0x2, 0x1010(%rsp)
jne 0x3e7a
movq %rax, %r12
movzwl 0x1014(%rsp), %eax
cmpq %rax, %r12
jge 0x40dd
cmpb $0x3, (%r13)
jb 0x40a4
movzwl %ax, %edx
leaq 0x3661(%rip), %rdi      # 0x76fb
movq %r12, %rsi
xorl %eax, %eax
callq 0x605c
movl 0x72b6(%rip), %edi      # 0xb360
leaq (%rsp,%r12), %rsi
addq $0x1010, %rsi           # imm = 0x1010
movzwl 0x1014(%rsp), %edx
subq %r12, %rdx
callq 0x21d0
testq %rax, %rax
js 0x40cf
addq %rax, %r12
jmp 0x407c
leaq 0x363e(%rip), %rdi      # 0x7714
callq 0x2350
jmp 0x407c
cmpb $0x3, (%r13)
jb 0x411a
movq 0x1018(%rsp), %r8
movq 0x8(%rsp), %rcx
cmpq %r8, %rcx
leaq 0x3456(%rip), %r9       # 0x7551
leaq 0x3449(%rip), %rax      # 0x754b
cmoveq %rax, %r9
leaq 0x3618(%rip), %rdi      # 0x7725
movq %rcx, %rsi
movq %r12, %rdx
xorl %eax, %eax
callq 0x605c
movl 0x7244(%rip), %edi      # 0xb364
addq $-0x10, %r12
movq %rbx, %rsi
movq %r12, %rdx
callq 0x20c0
cmpb $0x4, (%r13)
jb 0x3e7a
leaq 0x3637(%rip), %rdi      # 0x7778
movq %rax, %rsi
xorl %eax, %eax
callq 0x605c
jmp 0x3e7a
leaq 0x3551(%rip), %r12      # 0x76a8
movq %r12, %rdi
xorl %eax, %eax
callq 0x605c
movq %r12, %rdi
callq 0x2350
jmp 0x4020
callq 0x2474
jmp 0x3e7a
leaq 0x3652(%rip), %rdi      # 0x77d1
jmp 0x4191
leaq 0x3662(%rip), %rdi      # 0x77ea
jmp 0x4191
leaq 0x3673(%rip), %rdi      # 0x7804
xorl %eax, %eax
callq 0x605c
movq %fs:0x28, %rax
cmpq 0x20a0(%rsp), %rax
jne 0x42ac
movb $0x1, %al
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3678(%rip), %rdi      # 0x783f
xorl %eax, %eax
callq 0x605c
jmp 0x4198
leaq 0x32f5(%rip), %rdi      # 0x74cc
xorl %eax, %eax
callq 0x605c
jmp 0x4234
leaq 0x3372(%rip), %rdi      # 0x7559
movl $0x2, %esi
xorl %eax, %eax
callq 0x605c
jmp 0x4234
leaq 0x33a1(%rip), %rdi      # 0x759d
jmp 0x41d7
callq 0x254f
jmp 0x4198
callq 0x2522
jmp 0x4234
movzbl %al, %eax
decl %eax
cmpl $0x7, %eax
ja 0x4281
leaq 0x31fb(%rip), %rcx      # 0x7418
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x36b5(%rip), %rdi      # 0x78e2
jmp 0x41d7
callq 0x24f5
movl 0x712a(%rip), %edi      # 0xb364
callq 0x21a0
movl 0x711b(%rip), %edi      # 0xb360
callq 0x21a0
jmp 0x4198
leaq 0x3303(%rip), %rdi      # 0x7559
movl $0x4, %esi
jmp 0x41ec
leaq 0x369b(%rip), %rdi      # 0x78ff
jmp 0x41d7
leaq 0x36d1(%rip), %rdi      # 0x7941
jmp 0x41d7
leaq 0x36b1(%rip), %rdi      # 0x792d
jmp 0x41d7
leaq 0x36c1(%rip), %rdi      # 0x7949
jmp 0x41d7
leaq 0x336f(%rip), %rdi      # 0x7603
jmp 0x41d7
leaq 0x338f(%rip), %rdi      # 0x762f
jmp 0x41d7
callq 0x24c8
jmp 0x4234
callq 0x2110