// File: /workspace/github_c_makefile_star2_O1/GangZhuo[P]dohclient/src/dohclient-cache.c
// Function: main
int main(int argc, char **argv)
{
	int ch, i, n, r;
	char buf[1024];
	char *pkg = buf + 2; /* 2 bytes length for TCP */
	int pkgsize = sizeof(buf) - 2;

#ifdef WINDOWS
	win_init();
#endif

	while ((ch = getopt(argc, argv, "s:t:Tvh")) != -1) {
		switch (ch) {
		case 'h':
			usage();
			exit(0);
			break;
		case 'v':
			fprintf(stdout, DOHCLIENT_NAME "-cache v" DOHCLIENT_VERSION "%s\n", git_version());
			exit(0);
			break;
		case 's':
			host = optarg;
			break;
		case 't':
			if (!is_digitstr(optarg)) {
				fprintf(stderr, "Invalid timeout -- %s\n", optarg);
				exit(1);
			}
			timeout = atoi(optarg);
			break;
		case 'T':
			tcp_mode = TRUE;
			break;
		case '?':
		default:
			exit(1);
			break;
		}
	}

	if (optind < argc)
		cmd = argv[optind++];

	for (i = optind; i < argc && cmd_arg_len < MAX_CMD_ARGS; i++) {
		cmd_args[cmd_arg_len++] = argv[i];
	}

	if (!cmd) {
		fprintf(stderr, "No command\n");
		exit(1);
	}

	if (timeout <= 0) {
		fprintf(stderr, "Invalid timeout\n");
		exit(1);
	}

	if (str2addr(host, server_addr, "5354")) {
		fprintf(stderr, "Invalid host address\n");
		exit(1);
	}

	if (strcasecmp(cmd, "GET") == 0) {
		if (cmd_arg_len < 2) {
			fprintf(stderr, "Missing arguments\n");
			exit(1);
		}
		else if (cmd_arg_len > 2) {
			for (i = 2; i < cmd_arg_len; i++) {
				fprintf(stderr, "Invalid argument -- %s\n", cmd_args[i]);
			}
			exit(1);
		}
		if (strcmp(cmd_args[0], "A") && strcmp(cmd_args[0], "AAAA")) {
			fprintf(stderr,
					"Invalid qtype -- %s\n"
					"Available value should be \"A\" or \"AAAA\".\n",
					cmd_args[0]);
			exit(1);
		}
		n = snprintf(pkg, pkgsize,
				"GET '%s IN %s.'", cmd_args[0], cmd_args[1]);
		if (n <= 0 || n >= pkgsize) {
			fprintf(stderr, "Domain too long -- %s\n", cmd_args[1]);
			exit(1);
		}
	}
	else if (strcasecmp(cmd, "LIST") == 0) {
		const char *keyword = "";
		int offset = 0, limit = 0;
		if (cmd_arg_len > 4) {
			for (i = 4; i < cmd_arg_len; i++) {
				fprintf(stderr, "Invalid argument -- %s\n", cmd_args[i]);
			}
			exit(1);
		}
		if (cmd_arg_len > 0)
			keyword = cmd_args[0];
		if (cmd_arg_len > 1)
			offset = atoi(cmd_args[1]);
		if (cmd_arg_len > 2)
			limit = atoi(cmd_args[2]);
		n = snprintf(pkg, pkgsize, "LIST '%s' %d %d", keyword, offset, limit);
		assert(n > 0 && n < pkgsize);
	}
	else if (strcasecmp(cmd, "PUT") == 0) {
		if (cmd_arg_len < 3) {
			fprintf(stderr, "Missing arguments\n");
			exit(1);
		}
		else if (cmd_arg_len > 4) {
			for (i = 4; i < cmd_arg_len; i++) {
				fprintf(stderr, "Invalid argument -- %s\n", cmd_args[i]);
			}
			exit(1);
		}
		if (strcmp(cmd_args[1], "A") && strcmp(cmd_args[1], "AAAA")) {
			fprintf(stderr,
					"Invalid type -- %s\n"
					"Available value should be \"A\" or \"AAAA\".\n",
					cmd_args[1]);
			exit(1);
		}
		if (cmd_arg_len == 4) {
			if (!is_digitstr(cmd_args[3])) {
				fprintf(stderr, "Invalid TTL -- %s\n", cmd_args[3]);
				exit(1);
			}
		}
		if (cmd_arg_len == 4) {
			n = snprintf(pkg, pkgsize,
					"PUT %s. %s %s %s",
					cmd_args[0], cmd_args[1], cmd_args[2], cmd_args[3]);
		}
		else {
			n = snprintf(pkg, pkgsize,
					"PUT %s. %s %s",
					cmd_args[0], cmd_args[1], cmd_args[2]);
		}
		if (n <= 0 || n >= pkgsize) {
			fprintf(stderr, "Domain or IP too long -- %s %s\n", cmd_args[0], cmd_args[2]);
			exit(1);
		}
	}
	else if (strcasecmp(cmd, "DELETE") == 0) {
		if (cmd_arg_len < 2) {
			fprintf(stderr, "Missing arguments\n");
			exit(1);
		}
		else if (cmd_arg_len > 2) {
			for (i = 2; i < cmd_arg_len; i++) {
				fprintf(stderr, "Invalid argument -- %s\n", cmd_args[i]);
			}
			exit(1);
		}
		if (strcasecmp(cmd_args[0], "A") && strcasecmp(cmd_args[0], "AAAA")) {
			fprintf(stderr,
					"Invalid qtype -- %s\n"
					"Available value should be \"A\" or \"AAAA\".\n",
					cmd_args[0]);
			exit(1);
		}
		n = snprintf(pkg, pkgsize,
				"DELETE '%s IN %s.'", cmd_args[0], cmd_args[1]);
		if (n <= 0 || n >= pkgsize) {
			fprintf(stderr, "Domain too long -- %s\n", cmd_args[1]);
			exit(1);
		}
	}
	else if (strcasecmp(cmd, "SAVE") == 0) {
		if (cmd_arg_len < 1) {
			fprintf(stderr, "Missing arguments\n");
			exit(1);
		}
		else if (cmd_arg_len > 1) {
			for (i = 1; i < cmd_arg_len; i++) {
				fprintf(stderr, "Invalid argument -- %s\n", cmd_args[i]);
			}
			exit(1);
		}
		n = snprintf(pkg, pkgsize,
				"SAVE \"%s\"", cmd_args[0]);
		if (n <= 0 || n >= pkgsize) {
			fprintf(stderr, "Filename too long -- %s\n", cmd_args[0]);
			exit(1);
		}
	}
	else if (strcasecmp(cmd, "LOAD") == 0) {
		const char *override = "";
		if (cmd_arg_len < 1) {
			fprintf(stderr, "Missing arguments\n");
			exit(1);
		}
		else if (cmd_arg_len > 2) {
			for (i = 2; i < cmd_arg_len; i++) {
				fprintf(stderr, "Invalid argument -- %s\n", cmd_args[i]);
			}
			exit(1);
		}
		if (cmd_arg_len > 1) {
			if (strcasecmp(cmd_args[1], "override")) {
				fprintf(stderr,
						"Unknown argument -- %s\n"
						"May be \"override\"?\n",
						cmd_args[1]);
				exit(1);
			}
			else {
				override = cmd_args[1];
			}
		}
		n = snprintf(pkg, pkgsize,
				"LOAD \"%s\" \"%s\"", cmd_args[0], override);
		if (n <= 0 || n >= pkgsize) {
			fprintf(stderr, "Filename too long -- %s\n", cmd_args[0]);
			exit(1);
		}
	}
	else {
		fprintf(stderr, "Invalid command -- %s\n", cmd);
		exit(1);
	}

	/*fprintf(stdout, "%s\n", pkg);*/

	if (tcp_mode)
		r = send_by_tcp(pkg, n);
	else
		r = send_by_udp(pkg, n);

	print_leak();

	return r;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x648, %rsp            # imm = 0x648
movq %rsi, %r14
movl %edi, %ebx
leaq 0x1623(%rip), %r15      # 0x76e0
movq 0x5f04(%rip), %r13      # 0xbfc8
movl %ebx, %edi
movq %r14, %rsi
movq %r15, %rdx
callq 0x2090
cmpl $0x72, %eax
jle 0x6108
cmpl $0x73, %eax
je 0x6116
cmpl $0x74, %eax
jne 0x6d52
movq (%r13), %r12
movq %r12, %rdi
callq 0x6e3b
movq %r12, %rdi
testl %eax, %eax
je 0x6d91
callq 0x2320
movl %eax, 0x6112(%rip)      # 0xc218
jmp 0x60c4
cmpl $0x54, %eax
jne 0x6123
movb $0x1, 0x61ec(%rip)      # 0xc300
jmp 0x60c4
movq (%r13), %rax
movq %rax, 0x60ef(%rip)      # 0xc210
jmp 0x60c4
cmpl $-0x1, %eax
jne 0x6d7c
movq 0x5ead(%rip), %rax      # 0xbfe0
movslq (%rax), %rcx
cmpl %ebx, %ecx
jge 0x614a
leal 0x1(%rcx), %edx
movl %edx, (%rax)
movq (%r14,%rcx,8), %rcx
movq %rcx, 0x61be(%rip)      # 0xc308
movslq (%rax), %r15
movl 0x61bc(%rip), %r12d     # 0xc310
cmpl %ebx, %r15d
setl %al
cmpl $0x4, %r12d
setl %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x61bd
movl %r12d, %eax
leaq 0x61ae(%rip), %rcx      # 0xc320
leaq (%rcx,%rax,8), %rdi
leaq (%r14,%r15,8), %rsi
movl %r15d, %eax
notl %eax
addl %ebx, %eax
movl $0x3, %ecx
subl %r12d, %ecx
cmpl %ecx, %eax
cmovbl %eax, %ecx
leaq 0x8(,%rcx,8), %rdx
callq 0x21a0
movslq %ebx, %rax
incq %r15
leal 0x1(%r12), %ecx
cmpq %rax, %r15
jge 0x61b7
incq %r15
cmpl $0x3, %r12d
movl %ecx, %r12d
jl 0x61a1
movl %ecx, 0x6153(%rip)      # 0xc310
cmpq $0x0, 0x6143(%rip)      # 0xc308
je 0x6d96
cmpl $0x0, 0x6046(%rip)      # 0xc218
jle 0x6d9b
movq 0x6031(%rip), %rdi      # 0xc210
leaq 0x615a(%rip), %rsi      # 0xc340
leaq 0x1c66(%rip), %rdx      # 0x7e53
callq 0x38b1
testl %eax, %eax
jne 0x6da0
movq 0x6107(%rip), %rbx      # 0xc308
leaq 0x1544(%rip), %rsi      # 0x774c
movq %rbx, %rdi
callq 0x2240
testl %eax, %eax
je 0x62b7
leaq 0x15c6(%rip), %rsi      # 0x77e5
movq %rbx, %rdi
callq 0x2240
testl %eax, %eax
je 0x633c
leaq 0x1606(%rip), %rsi      # 0x783c
movq %rbx, %rdi
callq 0x2240
testl %eax, %eax
je 0x6358
leaq 0x1682(%rip), %rsi      # 0x78cf
movq %rbx, %rdi
callq 0x2240
testl %eax, %eax
je 0x64b4
leaq 0x1685(%rip), %rsi      # 0x78e9
movq %rbx, %rdi
callq 0x2240
testl %eax, %eax
je 0x6539
leaq 0x1696(%rip), %rsi      # 0x7911
movq %rbx, %rdi
callq 0x2240
testl %eax, %eax
jne 0x6dc7
movl 0x607f(%rip), %eax      # 0xc310
testl %eax, %eax
jle 0x6dcf
cmpl $0x3, %eax
jge 0x6dd4
cmpl $0x1, %eax
jne 0x6585
leaq 0x1cf1(%rip), %rbx      # 0x7fa3
jmp 0x65a3
movl 0x6053(%rip), %eax      # 0xc310
cmpl $0x1, %eax
jle 0x6da5
cmpl $0x2, %eax
jne 0x6daa
movq 0x604a(%rip), %rbx      # 0xc320
leaq 0x14a1(%rip), %rsi      # 0x777e
movq %rbx, %rdi
callq 0x2300
testl %eax, %eax
je 0x6300
leaq 0x148b(%rip), %rsi      # 0x777b
movq %rbx, %rdi
callq 0x2300
testl %eax, %eax
jne 0x6dba
movq 0x6021(%rip), %r8       # 0xc328
leaq 0x14b0(%rip), %rdx      # 0x77be
movl $0x3fe, %esi            # imm = 0x3FE
leaq 0x242(%rsp), %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x2330
movl %eax, %ebx
movl $0xfffffc02, %eax       # imm = 0xFFFFFC02
leal (%rbx,%rax), %ecx
cmpl %eax, %ecx
ja 0x65da
callq 0x2bda
movl 0x5fcd(%rip), %r15d     # 0xc310
testl %r15d, %r15d
jle 0x63e6
movq 0x5fcd(%rip), %rbx      # 0xc320
jmp 0x63ed
movl 0x5fb2(%rip), %ebp      # 0xc310
cmpl $0x2, %ebp
jle 0x6dc2
movq 0x5fba(%rip), %rbx      # 0xc328
leaq 0x1409(%rip), %rsi      # 0x777e
movq %rbx, %rdi
callq 0x2300
testl %eax, %eax
je 0x6398
leaq 0x13f3(%rip), %rsi      # 0x777b
movq %rbx, %rdi
callq 0x2300
testl %eax, %eax
jne 0x6dee
cmpl $0x4, %ebp
jne 0x6471
movq 0x5f90(%rip), %r14      # 0xc338
movq %r14, %rdi
callq 0x6e3b
testl %eax, %eax
je 0x6e06
cmpl $0x4, %ebp
jne 0x6471
movq 0x5f58(%rip), %rcx      # 0xc320
movq 0x5f61(%rip), %r9       # 0xc330
movq 0x5f62(%rip), %rax      # 0xc338
movq %rax, (%rsp)
leaq 0x14af(%rip), %rdx      # 0x7890
jmp 0x6486
leaq 0x1bb6(%rip), %rbx      # 0x7fa3
xorl %ebp, %ebp
movl $0x0, %r14d
cmpl $0x2, %r15d
jl 0x640a
movq 0x5f26(%rip), %rdi      # 0xc328
callq 0x2320
movl %eax, %r14d
cmpl $0x3, %r15d
jl 0x641e
movq 0x5f19(%rip), %rdi      # 0xc330
callq 0x2320
movl %eax, %ebp
leaq 0x13c5(%rip), %rdx      # 0x77ea
movl $0x3fe, %esi            # imm = 0x3FE
leaq 0x242(%rsp), %rdi
movq %rbx, %rcx
movl %r14d, %r8d
movl %ebp, %r9d
xorl %eax, %eax
callq 0x2330
movl %eax, %ebx
leal -0x1(%rbx), %eax
cmpl $0x3fd, %eax            # imm = 0x3FD
jb 0x65da
leaq 0x13a1(%rip), %rdi      # 0x77fa
leaq 0x13af(%rip), %rsi      # 0x780f
leaq 0x13be(%rip), %rcx      # 0x7825
movl $0x1e4, %edx            # imm = 0x1E4
callq 0x2140
movq 0x5ea8(%rip), %rcx      # 0xc320
movq 0x5eb1(%rip), %r9       # 0xc330
leaq 0x141b(%rip), %rdx      # 0x78a1
movl $0x3fe, %esi            # imm = 0x3FE
leaq 0x242(%rsp), %rdi
movq %rbx, %r8
xorl %eax, %eax
callq 0x2330
movl %eax, %ebx
movl $0xfffffc02, %eax       # imm = 0xFFFFFC02
leal (%rbx,%rax), %ecx
cmpl %eax, %ecx
ja 0x65da
callq 0x2677
movl 0x5e56(%rip), %eax      # 0xc310
cmpl $0x1, %eax
jle 0x6de9
cmpl $0x2, %eax
jne 0x6df6
movq 0x5e4d(%rip), %rbx      # 0xc320
leaq 0x12a4(%rip), %rsi      # 0x777e
movq %rbx, %rdi
callq 0x2240
testl %eax, %eax
je 0x64fd
leaq 0x128e(%rip), %rsi      # 0x777b
movq %rbx, %rdi
callq 0x2240
testl %eax, %eax
jne 0x6e2b
movq 0x5e24(%rip), %r8       # 0xc328
leaq 0x13cb(%rip), %rdx      # 0x78d6
movl $0x3fe, %esi            # imm = 0x3FE
leaq 0x242(%rsp), %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x2330
movl %eax, %ebx
movl $0xfffffc02, %eax       # imm = 0xFFFFFC02
leal (%rbx,%rax), %ecx
cmpl %eax, %ecx
ja 0x65da
callq 0x2606
movl 0x5dd1(%rip), %eax      # 0xc310
testl %eax, %eax
jle 0x6e0e
cmpl $0x1, %eax
jne 0x6e13
movq 0x5dc9(%rip), %rcx      # 0xc320
leaq 0x1390(%rip), %rdx      # 0x78ee
movl $0x3fe, %esi            # imm = 0x3FE
leaq 0x242(%rsp), %rdi
xorl %eax, %eax
callq 0x2330
movl %eax, %ebx
movl $0xfffffc02, %eax       # imm = 0xFFFFFC02
leal (%rbx,%rax), %ecx
cmpl %eax, %ecx
ja 0x65da
callq 0x2548
movq 0x5d9c(%rip), %rbx      # 0xc328
leaq 0x1383(%rip), %rsi      # 0x7916
movq %rbx, %rdi
callq 0x2240
testl %eax, %eax
jne 0x6e33
movq 0x5d76(%rip), %rcx      # 0xc320
leaq 0x1399(%rip), %rdx      # 0x794a
movl $0x3fe, %esi            # imm = 0x3FE
leaq 0x242(%rsp), %rdi
movq %rbx, %r8
xorl %eax, %eax
callq 0x2330
movl %eax, %ebx
movl $0xfffffc02, %eax       # imm = 0xFFFFFC02
leal (%rbx,%rax), %ecx
cmpl %eax, %ecx
jbe 0x6de4
cmpb $0x1, 0x5d1f(%rip)      # 0xc300
jne 0x69c4
xorps %xmm0, %xmm0
leaq 0x1c0(%rsp), %rdi
movaps %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movl 0x5dbd(%rip), %ebp      # 0xc3c0
leaq 0x240(%rsp), %rax
movq %rax, (%rdi)
movl $0x0, 0xc(%rdi)
leal 0x2(%rbx), %eax
movl %eax, 0x8(%rdi)
movl %eax, 0x10(%rdi)
xorl %esi, %esi
movl %ebx, %edx
movl $0x2, %ecx
callq 0x4f97
movzwl 0x5d0d(%rip), %edi      # 0xc340
movl $0x1, %esi
movl $0x6, %edx
callq 0x20a0
cmpl $-0x1, %eax
je 0x6ca5
movl %eax, %r14d
movl %eax, %ebx
movl %r14d, %edi
callq 0x33cf
testl %eax, %eax
jne 0x6cb9
movl %ebx, %edi
callq 0x3477
testl %eax, %eax
jne 0x6ccc
movl %ebx, %edi
callq 0x34fa
testl %eax, %eax
jne 0x6cdf
leaq 0x5cbb(%rip), %rsi      # 0xc340
movl %ebx, %edi
movl %ebp, %edx
callq 0x21b0
testl %eax, %eax
je 0x66a7
callq 0x2030
movl (%rax), %edi
cmpl $0xb, %edi
je 0x66a7
cmpl $0x73, %edi
jne 0x6d34
movq $0x0, 0x10(%rsp)
xorl %edi, %edi
callq 0x21e0
movq %rax, 0x8(%rsp)
leal 0x3f(%r14), %eax
testl %r14d, %r14d
cmovnsl %r14d, %eax
movl %eax, %edx
andl $-0x40, %edx
movl %r14d, %ecx
subl %edx, %ecx
movl $0x1, %r13d
shlq %cl, %r13
sarl $0x6, %eax
movslq %eax, %r12
incl %r14d
movq %r14, 0x18(%rsp)
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
xorl %ebp, %ebp
xorps %xmm0, %xmm0
movaps %xmm0, 0x1b0(%rsp)
movaps %xmm0, 0x1a0(%rsp)
movaps %xmm0, 0x190(%rsp)
movaps %xmm0, 0x180(%rsp)
movaps %xmm0, 0x170(%rsp)
movaps %xmm0, 0x160(%rsp)
movaps %xmm0, 0x150(%rsp)
movaps %xmm0, 0x140(%rsp)
movaps %xmm0, 0xc0(%rsp)
movaps %xmm0, 0xd0(%rsp)
movaps %xmm0, 0xe0(%rsp)
movaps %xmm0, 0xf0(%rsp)
movaps %xmm0, 0x100(%rsp)
movaps %xmm0, 0x110(%rsp)
movaps %xmm0, 0x120(%rsp)
movaps %xmm0, 0x130(%rsp)
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x60(%rsp)
movaps %xmm0, 0x70(%rsp)
movaps %xmm0, 0x80(%rsp)
movaps %xmm0, 0x90(%rsp)
testl %ebp, %ebp
leaq 0x140(%rsp), %rsi
movq %rsi, %rax
leaq 0xc0(%rsp), %rdx
cmoveq %rdx, %rax
movaps %xmm0, 0xa0(%rsp)
orq %r13, (%rax,%r12,8)
movaps %xmm0, 0xb0(%rsp)
orq %r13, 0x40(%rsp,%r12,8)
movq $0x0, 0x20(%rsp)
movq $0xc350, 0x28(%rsp)     # imm = 0xC350
movq 0x18(%rsp), %rdi
leaq 0x40(%rsp), %rcx
leaq 0x20(%rsp), %r8
callq 0x21f0
cmpl $-0x1, %eax
je 0x6d19
testq %r13, 0x40(%rsp,%r12,8)
jne 0x6d22
testq %r13, 0x140(%rsp,%r12,8)
je 0x693f
movslq 0x1c8(%rsp), %rdx
movq %rdx, %rsi
addq 0x1c0(%rsp), %rsi
notl %edx
addl 0x1d0(%rsp), %edx
movl %ebx, %edi
callq 0x4630
testl %eax, %eax
jle 0x687f
movl %eax, %r15d
movq 0x1c0(%rsp), %rax
movslq 0x1c8(%rsp), %rcx
movslq %r15d, %rdx
addq %rcx, %rdx
movb $0x0, (%rax,%rdx)
cmpl $-0x1, %r14d
je 0x68a5
movq 0x5756(%rip), %rax      # 0xbfb8
movq (%rax), %rsi
movq 0x1c0(%rsp), %rdi
callq 0x2260
movq 0x10(%rsp), %rax
addl %r15d, %eax
jmp 0x6910
jns 0x691a
callq 0x2030
movl (%rax), %edi
testl %edi, %edi
jne 0x69ba
movl %ebx, %edi
callq 0x23b0
movl $0x1, %ecx
jmp 0x6937
addl 0x1c8(%rsp), %r15d
movl %r15d, 0x1c8(%rsp)
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
cmpl $0x2, %r15d
movq 0x10(%rsp), %rax
jl 0x6910
leaq 0x1c0(%rsp), %rdi
movl $0x2, %esi
callq 0x52fb
movl %eax, %r14d
movl 0x1c8(%rsp), %r15d
addl $-0x2, %r15d
movl $0x0, 0x1c8(%rsp)
movq 0x56bf(%rip), %rax      # 0xbfb8
movq (%rax), %rsi
movq 0x1c0(%rsp), %rdi
addq $0x2, %rdi
callq 0x2260
movq %r15, %rax
cmpl %r14d, %eax
movq %rax, 0x10(%rsp)
jge 0x691e
xorl %ecx, %ecx
jmp 0x6937
movq 0x5693(%rip), %rax      # 0xbfb8
movq (%rax), %rsi
movl $0xa, %edi
callq 0x22b0
movl $0x3, %ecx
testl %ecx, %ecx
jne 0x6beb
testq %r13, 0xc0(%rsp,%r12,8)
je 0x6995
movl %ebx, %edi
leaq 0x1c0(%rsp), %rsi
callq 0x4502
movl %eax, %r15d
cmpl $-0x1, %eax
je 0x69b1
leaq 0x5a69(%rip), %rax      # 0xc3d0
movq %rax, 0x1c0(%rsp)
movq $0x0, 0x1c8(%rsp)
movl $0x200000, 0x1d0(%rsp) # imm = 0x200000
movl $0x1, %ebp
cmpl $-0x1, %r15d
je 0x6d3b
xorl %edi, %edi
callq 0x21e0
subl 0x8(%rsp), %eax
cmpl %eax, 0x5872(%rip)      # 0xc218
jge 0x66f0
jmp 0x6d2b
movl %ebx, %edi
callq 0x2adf
jmp 0x698b
callq 0x2aac
jmp 0x6894
movl 0x59f6(%rip), %eax      # 0xc3c0
movl %eax, 0x10(%rsp)
movzwl 0x596b(%rip), %edi      # 0xc340
movl $0x2, %esi
movl $0x11, %edx
callq 0x20a0
cmpl $-0x1, %eax
je 0x6caf
movl %eax, %r13d
movl %eax, %edi
callq 0x33cf
testl %eax, %eax
jne 0x6cc2
movl %r13d, %edi
callq 0x3477
testl %eax, %eax
jne 0x6cd5
xorl %r15d, %r15d
xorl %edi, %edi
callq 0x21e0
movq %rax, 0x18(%rsp)
leal 0x3f(%r13), %eax
testl %r13d, %r13d
cmovnsl %r13d, %eax
movl %eax, %edx
andl $-0x40, %edx
movl %r13d, %ecx
subl %edx, %ecx
movl $0x1, %r14d
shlq %cl, %r14
sarl $0x6, %eax
movslq %eax, %r12
movq %r13, 0x8(%rsp)
incl %r13d
movl %ebx, %eax
movq %rax, 0x30(%rsp)
leaq 0x140(%rsp), %rbp
xorps %xmm0, %xmm0
movaps %xmm0, 0x1b0(%rsp)
movaps %xmm0, 0x1a0(%rsp)
movaps %xmm0, 0x190(%rsp)
movaps %xmm0, 0x180(%rsp)
movaps %xmm0, 0x170(%rsp)
movaps %xmm0, 0x160(%rsp)
movaps %xmm0, 0x150(%rsp)
movaps %xmm0, 0x140(%rsp)
movaps %xmm0, 0xc0(%rsp)
movaps %xmm0, 0xd0(%rsp)
movaps %xmm0, 0xe0(%rsp)
movaps %xmm0, 0xf0(%rsp)
movaps %xmm0, 0x100(%rsp)
movaps %xmm0, 0x110(%rsp)
movaps %xmm0, 0x120(%rsp)
movaps %xmm0, 0x130(%rsp)
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x60(%rsp)
movaps %xmm0, 0x70(%rsp)
movaps %xmm0, 0x80(%rsp)
movaps %xmm0, 0x90(%rsp)
testl %r15d, %r15d
movq %rbp, %rax
leaq 0xc0(%rsp), %rdx
cmoveq %rdx, %rax
movaps %xmm0, 0xa0(%rsp)
orq %r14, (%rax,%r12,8)
movaps %xmm0, 0xb0(%rsp)
orq %r14, 0x40(%rsp,%r12,8)
movq $0x0, 0x20(%rsp)
movq $0xc350, 0x28(%rsp)     # imm = 0xC350
movl %r13d, %edi
movq %rbp, %rsi
leaq 0x40(%rsp), %rcx
leaq 0x20(%rsp), %r8
callq 0x21f0
cmpl $-0x1, %eax
je 0x6ce8
testq %r14, 0x40(%rsp,%r12,8)
jne 0x6cf4
testq %r14, 0x140(%rsp,%r12,8)
jne 0x6c00
testq %r14, 0xc0(%rsp,%r12,8)
je 0x6bc0
movq 0x8(%rsp), %rdi
leaq 0x242(%rsp), %rsi
movq 0x30(%rsp), %rdx
xorl %ecx, %ecx
leaq 0x57a7(%rip), %r8       # 0xc340
movl 0x10(%rsp), %r9d
callq 0x2050
movl %eax, %ebx
movl $0x1, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpq %rcx, %rbx
je 0x6bdc
movl %eax, %r15d
cmpl $-0x1, %ebx
je 0x6d3b
xorl %edi, %edi
callq 0x21e0
subl 0x18(%rsp), %eax
cmpl %eax, 0x5647(%rip)      # 0xc218
jge 0x6a59
jmp 0x6d00
movq 0x8(%rsp), %rdi
callq 0x285e
movl %r15d, %eax
jmp 0x6bb4
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl $0x3, %ecx
jne 0x6d40
movl %ebx, %edi
jmp 0x6c99
xorps %xmm0, %xmm0
leaq 0x1c0(%rsp), %r8
movaps %xmm0, 0x70(%r8)
movaps %xmm0, 0x60(%r8)
movaps %xmm0, 0x50(%r8)
movaps %xmm0, 0x40(%r8)
movaps %xmm0, 0x30(%r8)
movaps %xmm0, 0x20(%r8)
movaps %xmm0, 0x10(%r8)
movaps %xmm0, (%r8)
leaq 0x3c(%rsp), %r9
movl $0x80, (%r9)
leaq 0x578b(%rip), %r15      # 0xc3d0
movl $0x1fffff, %edx         # imm = 0x1FFFFF
movq 0x8(%rsp), %r14
movl %r14d, %edi
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x2180
movq %rax, %rbx
testl %ebx, %ebx
jle 0x6d0c
movl %ebx, %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movb $0x0, (%rax,%r15)
movq 0x533e(%rip), %rax      # 0xbfb8
movq (%rax), %rdi
leaq 0xd05(%rip), %rsi       # 0x7989
movq %r15, %rdx
xorl %eax, %eax
callq 0x2310
testl %ebx, %ebx
jle 0x6d3b
movl %r14d, %edi
callq 0x23b0
xorl %eax, %eax
jmp 0x6d40
callq 0x2ba2
jmp 0x6d3b
callq 0x2921
jmp 0x6d3b
movl %ebx, %edi
callq 0x2958
jmp 0x6d3b
movl %r13d, %edi
callq 0x2760
jmp 0x6d3b
movl %ebx, %edi
callq 0x2998
jmp 0x6d3b
movl %r13d, %edi
callq 0x279f
jmp 0x6d3b
movl %ebx, %edi
callq 0x29d8
jmp 0x6d3b
movq 0x8(%rsp), %rdi
callq 0x28e1
jmp 0x6d3b
movq 0x8(%rsp), %rdi
callq 0x27de
jmp 0x6d3b
movq 0x8(%rsp), %rdi
callq 0x28b9
jmp 0x6d3b
movl %r14d, %edi
callq 0x281e
jmp 0x6c8e
movl %ebx, %edi
callq 0x2b62
jmp 0x6d3b
movl %ebx, %edi
callq 0x2a6c
jmp 0x6d3b
movl %ebx, %edi
callq 0x2b3a
jmp 0x6d3b
movl %ebx, %esi
callq 0x2a18
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x648, %rsp            # imm = 0x648
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x76, %eax
jne 0x6e21
movq 0x5256(%rip), %rax      # 0xbfb8
movq (%rax), %rdi
leaq 0x97c(%rip), %rsi       # 0x76e8
leaq 0x10cd(%rip), %rdx      # 0x7e40
xorl %eax, %eax
callq 0x2310
jmp 0x6d8a
cmpl $0x68, %eax
jne 0x6e21
callq 0x6e7b
xorl %edi, %edi
callq 0x22a0
callq 0x23d0
callq 0x2c4c
callq 0x2c27
callq 0x23f4
callq 0x2c02
cmpl $0x3, 0x555f(%rip)      # 0xc310
jl 0x6e21
callq 0x26ef
jmp 0x6e21
movq %rbx, %rdi
callq 0x273c
callq 0x26ca
movq %rbx, %rdi
callq 0x2419
callq 0x24d6
cmpl $0x3, 0x5535(%rip)      # 0xc310
jl 0x6e21
callq 0x2489
jmp 0x6e21
callq 0x2461
callq 0x262e
movq %rbx, %rdi
callq 0x2653
cmpl $0x3, 0x5513(%rip)      # 0xc310
jl 0x6e21
callq 0x2595
jmp 0x6e21
movq %r14, %rdi
callq 0x26a6
callq 0x2570
cmpl $0x2, 0x54f6(%rip)      # 0xc310
jl 0x6e21
callq 0x24fb
movl $0x1, %edi
callq 0x22a0
movq %rbx, %rdi
callq 0x25e2
movq %rbx, %rdi
callq 0x243d