// File: /workspace/github_c_makefile_star2_O3/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 0x39f4
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
callq 0x2fbc
testb %al, %al
je 0x3a0e
cmpq $0x0, 0x28(%r14)
je 0x3a1a
cmpb $0x40, 0x38(%r14)
jb 0x3a26
leaq 0x3d8d(%rip), %rdi      # 0x7796
jmp 0x4159
leaq 0x3d5a(%rip), %rdi      # 0x776f
jmp 0x4159
leaq 0x3d5c(%rip), %rdi      # 0x777d
jmp 0x4159
cmpq $0x0, 0x30(%r14)
je 0x4140
cmpq $0x0, (%r14)
je 0x4149
cmpw $0x0, 0x3a(%r14)
je 0x4152
movb 0x3c(%r14), %al
leaq 0x79d2(%rip), %r13      # 0xb424
movb %al, (%r13)
cmpb $0x2, %al
jb 0x3a68
leaq 0x3d9b(%rip), %rdi      # 0x77fc
xorl %eax, %eax
callq 0x5fb8
movq 0x18(%r14), %rdi
movl $0x1, %esi
callq 0x60d4
movl %eax, 0x78e8(%rip)      # 0xb364
movq 0x18(%r14), %rsi
testl %eax, %eax
js 0x4188
leaq 0x3db7(%rip), %rdi      # 0x7846
xorl %eax, %eax
callq 0x5fb8
cmpb $0x0, (%r13)
je 0x3aab
leaq 0x3dcd(%rip), %rdi      # 0x7871
xorl %eax, %eax
callq 0x5fb8
movl $0x2, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x2410
movl %eax, 0x789e(%rip)      # 0xb360
testl %eax, %eax
js 0x41c6
cmpb $0x0, (%r13)
je 0x3adf
leaq 0x3dc7(%rip), %rdi      # 0x789f
xorl %eax, %eax
callq 0x5fb8
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 0x38fc(%rip), %rdi      # 0x7415
xorl %eax, %eax
callq 0x5fb8
movl 0x783a(%rip), %edi      # 0xb360
movq %rbx, %rsi
movl $0x10, %edx
callq 0x23a0
testl %eax, %eax
js 0x41cd
leaq 0x1022(%rsp), %r15
movl $0x1, -0x12(%r15)
movw $0x212, -0xe(%r15)      # imm = 0x212
movb 0x38(%r14), %al
movb %al, -0x2(%r15)
movb 0x39(%r14), %al
movb %al, -0x1(%r15)
movq 0x28(%r14), %rsi
movq %r15, %rdi
callq 0x2070
leaq 0x1122(%rsp), %r12
movq 0x30(%r14), %rsi
movq %r12, %rdi
callq 0x2070
cmpb $0x3, (%r13)
jb 0x3bec
leaq 0x38ad(%rip), %rdi      # 0x743d
movq %r15, %rsi
xorl %eax, %eax
callq 0x5fb8
cmpb $0x3, (%r13)
jb 0x3bec
leaq 0x38a4(%rip), %rdi      # 0x744c
movq %r12, %rsi
xorl %eax, %eax
callq 0x5fb8
cmpb $0x3, (%r13)
jb 0x3bec
movzbl 0x1020(%rsp), %esi
leaq 0x3893(%rip), %rdi      # 0x745b
xorl %eax, %eax
callq 0x5fb8
cmpb $0x3, (%r13)
jb 0x3bec
movzbl 0x1021(%rsp), %esi
leaq 0x3887(%rip), %rdi      # 0x746c
xorl %eax, %eax
callq 0x5fb8
leaq 0x1010(%rsp), %rsi
movq $0x1, 0x8(%rsi)
movl 0x775e(%rip), %edi      # 0xb360
movl $0x212, %edx            # imm = 0x212
callq 0x20c0
movq %rax, %r15
cmpb $0x3, (%r13)
jb 0x3c2c
leaq 0x3860(%rip), %rdi      # 0x747d
movl $0x1, %esi
movq %r15, %rdx
xorl %eax, %eax
callq 0x5fb8
testq %r15, %r15
je 0x4198
js 0x41ed
movl 0x771f(%rip), %edi      # 0xb360
leaq 0x1010(%rsp), %rsi
movl $0x1010, %edx           # imm = 0x1010
callq 0x21d0
movq %rax, %r15
cmpb $0x3, (%r13)
jb 0x3c96
movq 0x1018(%rsp), %r8
cmpq $0x2, %r8
leaq 0x38b8(%rip), %rax      # 0x7528
leaq 0x38b7(%rip), %r9       # 0x752e
cmoveq %rax, %r9
leaq 0x3856(%rip), %rdi      # 0x74d8
movl $0x2, %esi
movl $0x2, %ecx
movq %r15, %rdx
xorl %eax, %eax
callq 0x5fb8
testq %r15, %r15
je 0x4198
movq 0x1018(%rsp), %rdx
cmpq $0x2, %rdx
jne 0x41a8
cmpl $0x4, 0x1010(%rsp)
jne 0x41bd
movl 0x1020(%rsp), %eax
cmpl $0x2, %eax
jne 0x41d4
leaq 0x389c(%rip), %rdi      # 0x7572
xorl %eax, %eax
callq 0x5fb8
leaq 0x1010(%rsp), %r15
movl $0x4, (%r15)
movl $0x10, 0x10(%r15)
movq $0x3, 0x8(%r15)
leaq 0x388f(%rip), %rdi      # 0x7592
movl $0x4, %esi
movl $0x4, %edx
xorl %eax, %eax
callq 0x2150
movl 0x10(%r15), %esi
leaq 0x3887(%rip), %rdi      # 0x75a6
movl $0x10, %edx
xorl %eax, %eax
callq 0x2150
movq 0x729e(%rip), %rax      # 0xafd0
movq (%rax), %rdi
callq 0x22d0
movl 0x7620(%rip), %edi      # 0xb360
movl $0x14, %edx
movq %r15, %rsi
callq 0x20c0
movq %rax, %r15
cmpb $0x2, (%r13)
jbe 0x3d6d
leaq 0x385a(%rip), %rdi      # 0x75b8
movl $0x3, %esi
movq %r15, %rdx
xorl %eax, %eax
callq 0x5fb8
testq %r15, %r15
je 0x4198
js 0x423c
movl 0x75de(%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 0x4216
cmpl $0x8, 0x1010(%rsp)
jne 0x4224
cmpb $0x3, (%r13)
jb 0x3de8
leaq 0x382e(%rip), %rdi      # 0x75ef
movq %rbx, %rsi
xorl %eax, %eax
callq 0x5fb8
cmpb $0x3, (%r13)
jb 0x3de8
leaq 0x1033(%rsp), %rsi
leaq 0x381b(%rip), %rdi      # 0x75fc
xorl %eax, %eax
callq 0x5fb8
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4248
testb %al, %al
je 0x4230
movl 0x7563(%rip), %eax      # 0xb364
movl 0x7558(%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 0x37f2(%rip), %r12      # 0x762b
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 0x74de(%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 0x74b8(%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 0x3f14
callq 0x2050
cmpl $0x4, (%rax)
jne 0x3f0a
cmpb $0x2, (%r13)
jb 0x3e39
movq %r12, %rdi
xorl %eax, %eax
callq 0x5fb8
jmp 0x3e39
callq 0x24a1
jmp 0x3e39
movl 0x744a(%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 0x3fd8
movl $0xbb8, %edx            # imm = 0xBB8
movq %rbx, %rsi
callq 0x21d0
movq %rax, %r12
cmpb $0x4, (%r13)
jb 0x3f61
leaq 0x3713(%rip), %rdi      # 0x766a
movq %r12, %rsi
xorl %eax, %eax
callq 0x5fb8
testq %r12, %r12
js 0x4118
movq 0x8(%rsp), %rax
incq %rax
movq %rax, 0x8(%rsp)
movq %rax, 0x1018(%rsp)
addq $0x10, %r12
movw %r12w, 0x1014(%rsp)
movl 0x73ce(%rip), %edi      # 0xb360
leaq 0x1010(%rsp), %rsi
movq %r12, %rdx
callq 0x20c0
movq %rax, %r12
cmpb $0x3, (%r13)
jb 0x3fc2
leaq 0x36e9(%rip), %rdi      # 0x769c
movq 0x8(%rsp), %rsi
movq %r12, %rdx
xorl %eax, %eax
callq 0x5fb8
testq %r12, %r12
je 0x4198
leaq 0x34f0(%rip), %r12      # 0x74c2
js 0x411f
movl 0x7382(%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 0x3e32
incq 0x8(%rsp)
movl $0x1010, %edx           # imm = 0x1010
leaq 0x1010(%rsp), %rsi
callq 0x21d0
testq %rax, %rax
je 0x4198
js 0x4136
cmpl $0x2, 0x1010(%rsp)
jne 0x3e32
movq %rax, %r12
movzwl 0x1014(%rsp), %eax
cmpq %rax, %r12
jae 0x40a5
cmpb $0x3, (%r13)
jb 0x4064
movzwl %ax, %edx
leaq 0x3686(%rip), %rdi      # 0x76d8
movq %r12, %rsi
xorl %eax, %eax
callq 0x5fb8
movzwl 0x1014(%rsp), %eax
movl 0x72f6(%rip), %edi      # 0xb360
leaq (%rsp,%r12), %rsi
addq $0x1010, %rsi           # imm = 0x1010
movzwl %ax, %edx
subq %r12, %rdx
callq 0x21d0
testq %rax, %rax
js 0x4097
addq %rax, %r12
movzwl 0x1014(%rsp), %eax
cmpq %rax, %r12
jl 0x4041
jmp 0x40a5
leaq 0x3653(%rip), %rdi      # 0x76f1
callq 0x2350
jmp 0x4088
cmpb $0x3, (%r13)
jb 0x40e2
movq 0x1018(%rsp), %r8
movq 0x8(%rsp), %rcx
cmpq %r8, %rcx
leaq 0x346b(%rip), %r9       # 0x752e
leaq 0x345e(%rip), %rax      # 0x7528
cmoveq %rax, %r9
leaq 0x362d(%rip), %rdi      # 0x7702
movq %rcx, %rsi
movq %r12, %rdx
xorl %eax, %eax
callq 0x5fb8
movl 0x727c(%rip), %edi      # 0xb364
addq $-0x10, %r12
movq %rbx, %rsi
movq %r12, %rdx
callq 0x20c0
cmpb $0x4, (%r13)
jb 0x3e32
leaq 0x364c(%rip), %rdi      # 0x7755
movq %rax, %rsi
xorl %eax, %eax
callq 0x5fb8
jmp 0x3e32
leaq 0x3566(%rip), %r12      # 0x7685
movq %r12, %rdi
xorl %eax, %eax
callq 0x5fb8
movq %r12, %rdi
callq 0x2350
jmp 0x3fd8
callq 0x2474
jmp 0x3e32
leaq 0x3667(%rip), %rdi      # 0x77ae
jmp 0x4159
leaq 0x3677(%rip), %rdi      # 0x77c7
jmp 0x4159
leaq 0x3688(%rip), %rdi      # 0x77e1
xorl %eax, %eax
callq 0x5fb8
movq %fs:0x28, %rax
cmpq 0x20a0(%rsp), %rax
jne 0x4243
movb $0x1, %al
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x368d(%rip), %rdi      # 0x781c
xorl %eax, %eax
callq 0x5fb8
jmp 0x4160
leaq 0x330a(%rip), %rdi      # 0x74a9
xorl %eax, %eax
callq 0x5fb8
jmp 0x41f2
leaq 0x3387(%rip), %rdi      # 0x7536
movl $0x2, %esi
xorl %eax, %eax
callq 0x5fb8
jmp 0x41f2
leaq 0x33b6(%rip), %rdi      # 0x757a
jmp 0x419f
callq 0x254f
jmp 0x4160
callq 0x2522
jmp 0x41f2
decb %al
cmpb $0x7, %al
ja 0x420d
movzbl %al, %eax
leaq 0x3878(%rip), %rcx      # 0x7a5c
movslq (%rcx,%rax,4), %rdi
addq %rcx, %rdi
jmp 0x419f
callq 0x24f5
movl 0x716c(%rip), %edi      # 0xb364
callq 0x21a0
movl 0x715d(%rip), %edi      # 0xb360
callq 0x21a0
jmp 0x4160
leaq 0x3712(%rip), %rdi      # 0x7926
jmp 0x419f
leaq 0x3319(%rip), %rdi      # 0x7536
movl $0x4, %esi
jmp 0x41b4
leaq 0x33b5(%rip), %rdi      # 0x75e0
jmp 0x419f
leaq 0x33d5(%rip), %rdi      # 0x760c
jmp 0x419f
callq 0x24c8
jmp 0x41f2
callq 0x2110