// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]kivaloo/kvlds/main.c
// Function: main
int
main(int argc, char * argv[])
{
	/* State variables. */
	struct wire_requestqueue * Q_lbs;
	struct btree * T;
	struct dispatch_state * dstate;
	int s;
	int s_lbs;

	/* Command-line parameters. */
	uint64_t opt_C = (uint64_t)(-1);
	uint64_t opt_c = (uint64_t)(-1);
	uint64_t opt_g = (uint64_t)(-1);
	uint64_t opt_k = (uint64_t)(-1);
	char * opt_l = NULL;
	char * opt_p = NULL;
	double opt_S = 1.0;
	char * opt_s = NULL;
	uint64_t opt_v = (uint64_t)(-1);
	double opt_w = 0.0;
	int opt_1 = 0;

	/* Working variables. */
	struct sock_addr ** sas_s;
	struct sock_addr ** sas_l;
	const char * ch;

	WARNP_INIT;

	/* Parse the command line. */
	while ((ch = GETOPT(argc, argv)) != NULL) {
		GETOPT_SWITCH(ch) {
		GETOPT_OPTARG("-C"):
			if (opt_C != (uint64_t)(-1))
				usage();
			if (humansize_parse(optarg, &opt_C))
				OPT_EINVAL(ch, optarg);
			break;
		GETOPT_OPTARG("-c"):
			if (opt_c != (uint64_t)(-1))
				usage();
			if (humansize_parse(optarg, &opt_c))
				OPT_EINVAL(ch, optarg);
			break;
		GETOPT_OPTARG("-g"):
			if (opt_g != (uint64_t)(-1))
				usage();
			if (humansize_parse(optarg, &opt_g))
				OPT_EINVAL(ch, optarg);
			break;
		GETOPT_OPTARG("-k"):
			if (opt_k != (uint64_t)(-1))
				usage();
			if (humansize_parse(optarg, &opt_k))
				OPT_EINVAL(ch, optarg);
			break;
		GETOPT_OPTARG("-l"):
			if (opt_l != NULL)
				usage();
			if ((opt_l = strdup(optarg)) == NULL)
				OPT_EPARSE(ch, optarg);
			break;
		GETOPT_OPTARG("-p"):
			if (opt_p != NULL)
				usage();
			if ((opt_p = strdup(optarg)) == NULL)
				OPT_EPARSE(ch, optarg);
			break;
		GETOPT_OPTARG("-S"):
			if (opt_S != 1.0)
				usage();
			if (PARSENUM(&opt_S, optarg, 0, INFINITY))
				OPT_EPARSE(ch, optarg);
			break;
		GETOPT_OPTARG("-s"):
			if (opt_s != NULL)
				usage();
			if ((opt_s = strdup(optarg)) == NULL)
				OPT_EPARSE(ch, optarg);
			break;
		GETOPT_OPTARG("-v"):
			if (opt_v != (uint64_t)(-1))
				usage();
			if (humansize_parse(optarg, &opt_v))
				OPT_EINVAL(ch, optarg);
			break;
		GETOPT_OPTARG("-w"):
			if (opt_w != 0.0)
				usage();
			if (PARSENUM(&opt_w, optarg, 0, INFINITY))
				OPT_EPARSE(ch, optarg);
			break;
		GETOPT_OPT("--version"):
			fprintf(stderr, "kivaloo-kvlds @VERSION@\n");
			exit(0);
		GETOPT_OPT("-1"):
			if (opt_1 != 0)
				usage();
			opt_1 = 1;
			break;
		GETOPT_MISSING_ARG:
			warn0("Missing argument to %s", ch);
			usage();
		GETOPT_DEFAULT:
			warn0("illegal option -- %s", ch);
			usage();
		}
	}
	argc -= optind;
	argv += optind;

	/* We should have processed all the arguments. */
	if (argc != 0)
		usage();
	(void)argv; /* argv is not used beyond this point. */

	/* Sanity-check options. */
	if (opt_s == NULL)
		usage();
	if (opt_l == NULL)
		usage();
	if ((opt_C != (uint64_t)(-1)) && (opt_c != (uint64_t)(-1)))
		usage();
	if ((opt_C != (uint64_t)(-1)) &&
	    ((opt_C < 1024) || (opt_C > 1024 * 1024 * 1024))) {
		warn0("Cache size in pages must be in [2^10, 2^30]");
		exit(1);
	}
	if ((opt_C != (uint64_t)(-1)) && (opt_C > SIZE_MAX)) {
		warn0("Maximum cache size in pages on this system is %zu",
		    SIZE_MAX);
		exit(1);
	}
	if ((opt_c != (uint64_t)(-1)) && (opt_c > SIZE_MAX)) {
		warn0("Maximum cache size on this system is %zu", SIZE_MAX);
		exit(1);
	}
	if ((opt_k != (uint64_t)(-1)) && (opt_k > 255)) {
		warn0("Keys longer than 255 bytes are not supported");
		exit(1);
	}
	if ((opt_v != (uint64_t)(-1)) && (opt_v > 255)) {
		warn0("Values longer than 255 bytes are not supported");
		exit(1);
	}
	if ((opt_w < 0.0) || (opt_w > 1.0)) {
		warn0("Commit delay time in [0.0, 1.0]: -w %f", opt_w);
		exit(1);
	}
	if ((opt_g != (uint64_t)(-1)) &&
	    ((opt_g < 1) || (opt_g > 1024))) {
		warn0("Forced commit size must be in [1, 1024]: "
		    "-g %" PRIu64, opt_g);
		exit(1);
	}

	/* Resolve listening address. */
	if ((sas_s = sock_resolve(opt_s)) == NULL) {
		warnp("Error resolving socket address: %s", opt_s);
		exit(1);
	}
	if (sas_s[0] == NULL) {
		warn0("No addresses found for %s", opt_s);
		exit(1);
	}

	/* Resolve LBS address. */
	if ((sas_l = sock_resolve(opt_l)) == NULL) {
		warnp("Error resolving socket address: %s", opt_l);
		exit(1);
	}
	if (sas_l[0] == NULL) {
		warn0("No addresses found for %s", opt_l);
		exit(1);
	}

	/* Create and bind a socket, and mark it as listening. */
	if (sas_s[1] != NULL)
		warn0("Listening on first of multiple addresses found for %s",
		    opt_s);
	if ((s = sock_listener(sas_s[0])) == -1)
		exit(1);

	/* Create a socket, connect to the LBS, and mark it non-blocking. */
	if ((s_lbs = sock_connect(sas_l)) == -1)
		exit(1);

	/* Create a queue of requests to the block store. */
	if ((Q_lbs = wire_requestqueue_init(s_lbs)) == NULL) {
		warnp("Cannot create LBS request queue");
		exit(1);
	}

	/* Initialize the B+Tree. */
	if ((T =
	    btree_init(Q_lbs, opt_C, opt_c, &opt_k, &opt_v, opt_S)) == NULL) {
		warnp("Cannot initialize B+Tree");
		exit(1);
	}

	/* Daemonize and write pid. */
	if (opt_p == NULL) {
		if (asprintf(&opt_p, "%s.pid", opt_s) == -1) {
			warnp("asprintf");
			exit(1);
		}
	}
	if (daemonize(opt_p)) {
		warnp("Failed to daemonize");
		exit(1);
	}

	/* Handle connections, one at a time. */
	do {
		/* Accept a connection. */
		if ((dstate = dispatch_accept(s, T,
		    (size_t)opt_k, (size_t)opt_v, opt_w, (size_t)opt_g))
		    == NULL)
			exit(1);

		/* Loop until the connection is dead. */
		do {
			if (events_run()) {
				warnp("Error running event loop");
				exit(1);
			}
		} while (dispatch_alive(dstate));

		/* Close and free the connection. */
		if (dispatch_done(dstate))
			exit(1);
	} while (opt_1 == 0);

	/* Free the B+Tree. */
	btree_free(T);

	/* Shut down the LBS request queue. */
	wire_requestqueue_destroy(Q_lbs);
	wire_requestqueue_free(Q_lbs);

	/* Close sockets. */
	if (close(s_lbs))
		warnp("close");
	if (close(s))
		warnp("close");

	/* Free socket addresses. */
	sock_addr_freelist(sas_l);
	sock_addr_freelist(sas_s);

	/* Free option strings. */
	free(opt_l);
	free(opt_p);
	free(opt_s);

	/* Success! */
	return (0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movl %edi, %ebp
movq $-0x1, %rax
movq %rax, 0x48(%rsp)
movq %rax, 0x70(%rsp)
movq %rax, 0x68(%rsp)
movq %rax, 0x40(%rsp)
movq $0x0, 0x18(%rsp)
movq %rax, 0x38(%rsp)
movq %rsi, 0x60(%rsp)
movq (%rsi), %rdi
testq %rdi, %rdi
je 0x29ea
callq 0xffc8
movl %ebp, %edi
movq 0x60(%rsp), %rsi
callq 0xe0c0
testq %rax, %rax
je 0x3076
movq %rax, %r15
movq $0x0, 0x20(%rsp)
movsd 0x115f5(%rip), %xmm0    # 0x14008
leaq 0x42e6e(%rip), %r12     # 0x45888
leaq 0x11624(%rip), %rbx     # 0x14045
movsd %xmm0, 0x58(%rsp)
xorpd %xmm0, %xmm0
movsd %xmm0, 0x10(%rsp)
leaq 0x11664(%rip), %r13     # 0x1409c
leaq 0x12c2a(%rip), %r14     # 0x15669
movq $0x0, 0x30(%rsp)
movq $0x0, 0x28(%rsp)
movl %ebp, 0xc(%rsp)
movq $0x4d, (%rsp)
movq (%rsp), %rax
decq %rax
movq %rax, 0x80(%rsp)
movl $0x0, 0x54(%rsp)
cmpl $0x0, (%r12)
je 0x2a89
movq %r15, %rdi
callq 0xe3eb
addq (%rsp), %rax
jmp 0x2a9d
movq 0x80(%rsp), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x80(%rsp)
cmpq $0x77, %rax
jg 0x2aeb
cmpq $0x5f, %rax
jle 0x2b79
cmpq $0x6b, %rax
jg 0x2bb7
cmpq $0x60, %rax
je 0x2c58
cmpq $0x66, %rax
jne 0x2cfa
cmpl $0x0, (%r12)
jne 0x2dc3
movl $0x66, %esi
subq (%rsp), %rsi
leaq 0x11586(%rip), %rdi     # 0x1406c
jmp 0x2ce3
cmpq $0x89, %rax
movsd 0x10(%rsp), %xmm0
jle 0x2b39
cmpq $0x91, %rax
jg 0x2beb
cmpq $0x8a, %rax
je 0x2c15
cmpq $0x8d, %rax
jne 0x2cfa
cmpl $0x0, (%r12)
jne 0x2f20
movl $0x8d, %esi
subq (%rsp), %rsi
movq %r14, %rdi
jmp 0x2c2c
cmpq $0x78, %rax
je 0x2c38
cmpq $0x7e, %rax
je 0x2c92
cmpq $0x84, %rax
jne 0x2cfa
cmpl $0x0, (%r12)
jne 0x2d38
movl $0x84, %esi
subq (%rsp), %rsi
leaq 0x11525(%rip), %rdi     # 0x14099
jmp 0x2ce3
cmpq $0x4e, %rax
je 0x2caf
cmpq $0x54, %rax
je 0x2cc8
cmpq $0x5a, %rax
jne 0x2cfa
cmpl $0x0, (%r12)
jne 0x2fe0
movl $0x5a, %esi
subq (%rsp), %rsi
leaq 0x114b4(%rip), %rdi     # 0x14066
jmp 0x2ce3
cmpq $0x6c, %rax
je 0x2c75
cmpq $0x72, %rax
jne 0x2cfa
cmpl $0x0, (%r12)
jne 0x2e8f
movl $0x72, %esi
subq (%rsp), %rsi
leaq 0x114aa(%rip), %rdi     # 0x14090
jmp 0x2ce3
cmpq $0x92, %rax
jne 0x2cf2
cmpl $0x0, (%r12)
jne 0x33f7
movl $0x92, %edi
subq (%rsp), %rdi
callq 0xe5bf
jmp 0x2a74
cmpl $0x0, (%r12)
jne 0x33e9
movl $0x8a, %esi
subq (%rsp), %rsi
movq %r13, %rdi
xorl %edx, %edx
callq 0xe4a8
jmp 0x2a74
cmpl $0x0, (%r12)
jne 0x2f70
movl $0x78, %esi
subq (%rsp), %rsi
leaq 0x11440(%rip), %rdi     # 0x14093
jmp 0x2ce3
cmpl $0x0, (%r12)
jne 0x2e5e
movl $0x60, %esi
subq (%rsp), %rsi
leaq 0x113f6(%rip), %rdi     # 0x14069
jmp 0x2ce3
cmpl $0x0, (%r12)
jne 0x2f3a
movl $0x6c, %esi
subq (%rsp), %rsi
leaq 0x113fd(%rip), %rdi     # 0x1408d
jmp 0x2ce3
cmpl $0x0, (%r12)
jne 0x2fb2
movl $0x7e, %esi
subq (%rsp), %rsi
leaq 0x113e9(%rip), %rdi     # 0x14096
jmp 0x2ce3
cmpl $0x0, (%r12)
jne 0x2dfc
movl $0x4e, %esi
subq (%rsp), %rsi
movq %rbx, %rdi
jmp 0x2ce3
cmpl $0x0, (%r12)
jne 0x2e2d
movl $0x54, %esi
subq (%rsp), %rsi
leaq 0x11380(%rip), %rdi     # 0x14063
movl $0x1, %edx
callq 0xe4a8
jmp 0x2a74
cmpq $0x95, %rax
je 0x2d2b
cmpl $0x0, (%r12)
jne 0x33ee
cmpl $0x0, 0x54(%rsp)
jne 0x2a74
movl $0x95, %edi
subq (%rsp), %rdi
callq 0xe5ff
movl $0x1, 0x54(%rsp)
jmp 0x2a74
movl $0x1, (%r12)
jmp 0x303d
leaq 0x42b41(%rip), %rax     # 0x45880
cmpq $0x0, (%rax)
je 0x3517
ucomisd 0x112bf(%rip), %xmm0    # 0x14010
jne 0x3413
jp 0x3413
callq 0x20a0
movq %rax, %rbx
movl $0x0, (%rax)
leaq 0x42b0e(%rip), %rax     # 0x45880
movq (%rax), %rbp
testq %rbp, %rbp
je 0x3478
movq %rbp, %rdi
leaq 0x78(%rsp), %rsi
callq 0x20f0
movq 0x78(%rsp), %rcx
movl $0x16, %eax
cmpq %rbp, %rcx
je 0x301a
cmpb $0x0, (%rcx)
movl 0xc(%rsp), %ebp
jne 0x301e
movl $0x22, %eax
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
ja 0x301e
jmp 0x3020
leaq 0x42ab6(%rip), %rax     # 0x45880
cmpq $0x0, (%rax)
je 0x35b2
cmpq $0x0, 0x30(%rsp)
jne 0x3413
leaq 0x42a99(%rip), %rax     # 0x45880
movq (%rax), %rbx
movq %rbx, %rdi
callq 0x23c0
movq %rax, 0x30(%rsp)
jmp 0x2fa4
leaq 0x42a7d(%rip), %rax     # 0x45880
cmpq $0x0, (%rax)
je 0x34f8
cmpq $-0x1, 0x48(%rsp)
jne 0x3413
leaq 0x42a60(%rip), %rax     # 0x45880
movq (%rax), %rdi
leaq 0x48(%rsp), %rsi
jmp 0x300c
leaq 0x42a4c(%rip), %rax     # 0x45880
cmpq $0x0, (%rax)
je 0x34d9
cmpq $-0x1, 0x70(%rsp)
jne 0x3413
leaq 0x42a2f(%rip), %rax     # 0x45880
movq (%rax), %rdi
leaq 0x70(%rsp), %rsi
jmp 0x300c
leaq 0x42a1b(%rip), %rax     # 0x45880
cmpq $0x0, (%rax)
je 0x35d1
cmpq $-0x1, 0x40(%rsp)
jne 0x3413
leaq 0x429fe(%rip), %rax     # 0x45880
movq (%rax), %rdi
leaq 0x40(%rsp), %rsi
jmp 0x300c
leaq 0x429ea(%rip), %rax     # 0x45880
cmpq $0x0, (%rax)
je 0x3574
movsd 0x58(%rsp), %xmm0
ucomisd 0x1115a(%rip), %xmm0    # 0x14008
jne 0x3413
jp 0x3413
callq 0x20a0
movq %rax, %rbx
movl $0x0, (%rax)
leaq 0x429b1(%rip), %rax     # 0x45880
movq (%rax), %rbp
testq %rbp, %rbp
je 0x3478
movq %rbp, %rdi
leaq 0x78(%rsp), %rsi
callq 0x20f0
movq 0x78(%rsp), %rcx
movl $0x16, %eax
cmpq %rbp, %rcx
je 0x3028
cmpb $0x0, (%rcx)
movl 0xc(%rsp), %ebp
jne 0x302c
movl $0x22, %eax
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
ja 0x302c
jmp 0x302e
cmpl $0x0, 0x20(%rsp)
movl $0x1, %eax
movq %rax, 0x20(%rsp)
je 0x303d
jmp 0x3413
leaq 0x4293f(%rip), %rax     # 0x45880
cmpq $0x0, (%rax)
je 0x3593
cmpq $0x0, 0x18(%rsp)
jne 0x3413
leaq 0x42922(%rip), %rax     # 0x45880
movq (%rax), %rbx
movq %rbx, %rdi
callq 0x23c0
movq %rax, 0x18(%rsp)
jmp 0x2fa4
leaq 0x42909(%rip), %rax     # 0x45880
cmpq $0x0, (%rax)
je 0x3555
cmpq $0x0, 0x28(%rsp)
jne 0x3413
leaq 0x428ec(%rip), %rax     # 0x45880
movq (%rax), %rbx
movq %rbx, %rdi
callq 0x23c0
movq %rax, 0x28(%rsp)
testq %rax, %rax
jne 0x303d
jmp 0x3438
leaq 0x428c7(%rip), %rax     # 0x45880
cmpq $0x0, (%rax)
je 0x3536
cmpq $-0x1, 0x38(%rsp)
jne 0x3413
leaq 0x428aa(%rip), %rax     # 0x45880
movq (%rax), %rdi
leaq 0x38(%rsp), %rsi
jmp 0x300c
leaq 0x42899(%rip), %rax     # 0x45880
cmpq $0x0, (%rax)
je 0x34ba
cmpq $-0x1, 0x68(%rsp)
jne 0x3413
leaq 0x4287c(%rip), %rax     # 0x45880
movq (%rax), %rdi
leaq 0x68(%rsp), %rsi
callq 0xe7d0
testl %eax, %eax
je 0x303d
jmp 0x3418
movl 0xc(%rsp), %ebp
movl %eax, (%rbx)
movsd %xmm0, 0x10(%rsp)
jmp 0x3034
movl 0xc(%rsp), %ebp
movl %eax, (%rbx)
movsd %xmm0, 0x58(%rsp)
cmpl $0x0, (%rbx)
jne 0x3458
movl %ebp, %edi
movq 0x60(%rsp), %rsi
callq 0xe0c0
movq %rax, %r15
testq %rax, %rax
leaq 0x10fef(%rip), %rbx     # 0x14045
jne 0x2a55
cmpl $0x0, 0x20(%rsp)
sete %bl
movq 0x28(%rsp), %r14
movq 0x30(%rsp), %r12
movsd 0x10(%rsp), %xmm0
jmp 0x3090
movsd 0x10f8a(%rip), %xmm0    # 0x14008
movsd %xmm0, 0x58(%rsp)
movb $0x1, %bl
xorpd %xmm0, %xmm0
xorl %r14d, %r14d
xorl %r12d, %r12d
leaq 0x1a551(%rip), %rax     # 0x1d5e8
cmpl %ebp, (%rax)
jne 0x3413
testq %r14, %r14
je 0x3413
testq %r12, %r12
je 0x3413
cmpq $-0x1, 0x48(%rsp)
je 0x30c5
cmpq $-0x1, 0x70(%rsp)
jne 0x3413
movq 0x48(%rsp), %rax
cmpq $-0x1, %rax
sete %cl
addq $-0x40000001, %rax      # imm = 0xBFFFFFFF
cmpq $-0x3ffffc01, %rax      # imm = 0xC00003FF
setae %al
orb %cl, %al
je 0x35f0
movq $-0x100, %rax
movq 0x40(%rsp), %rcx
addq %rax, %rcx
cmpq $-0x102, %rcx           # imm = 0xFEFE
jbe 0x35f9
addq 0x38(%rsp), %rax
cmpq $-0x102, %rax           # imm = 0xFEFE
jbe 0x3602
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
ja 0x3612
ucomisd 0x10edd(%rip), %xmm0    # 0x14008
ja 0x3612
movsd %xmm0, 0x10(%rsp)
movq 0x68(%rsp), %rsi
cmpq $-0x1, %rsi
sete %al
leaq -0x401(%rsi), %rcx
cmpq $-0x400, %rcx           # imm = 0xFC00
setae %cl
orb %al, %cl
je 0x3622
movq %r14, %rdi
callq 0xefa0
testq %rax, %rax
je 0x362b
movq %rax, %r13
cmpq $0x0, (%rax)
je 0x3645
movq %r12, %rdi
callq 0xefa0
testq %rax, %rax
je 0x3651
movq %rax, %r15
cmpq $0x0, (%rax)
je 0x3675
cmpq $0x0, 0x8(%r13)
je 0x31bb
leaq 0x11061(%rip), %rdi     # 0x14207
movq %r14, %rsi
xorl %eax, %eax
callq 0x10167
callq 0x20a0
movl $0x0, (%rax)
movq (%r13), %rdi
callq 0xf6fb
cmpl $-0x1, %eax
je 0x33df
movl %eax, %ebp
movq %r15, 0x60(%rsp)
movq %r15, %rdi
callq 0xf8bd
cmpl $-0x1, %eax
je 0x33df
movl %eax, %r15d
movq %r13, 0x20(%rsp)
movq %r12, 0x30(%rsp)
movl %eax, %edi
callq 0x11e40
testq %rax, %rax
je 0x3696
movq %rax, %r12
movq 0x48(%rsp), %rsi
movq 0x70(%rsp), %rdx
leaq 0x40(%rsp), %rcx
leaq 0x38(%rsp), %r8
movq %rax, %rdi
movsd 0x58(%rsp), %xmm0
callq 0x5a74
testq %rax, %rax
je 0x36ac
movq %rax, %r13
cmpq $0x0, 0x18(%rsp)
jne 0x325a
leaq 0x11034(%rip), %rsi     # 0x14276
leaq 0x18(%rsp), %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0xddcc
cmpl $-0x1, %eax
je 0x372d
movq 0x18(%rsp), %rdi
callq 0xded0
testl %eax, %eax
jne 0x36c2
movq %r14, 0x28(%rsp)
movsd 0x10(%rsp), %xmm0
movq 0x40(%rsp), %rdx
movq 0x38(%rsp), %rcx
movq 0x68(%rsp), %r8
movl %ebp, %edi
movq %r13, %rsi
callq 0x3798
movq %rax, %r14
testq %rax, %rax
je 0x33df
callq 0xb774
testl %eax, %eax
jne 0x33ae
movq %r14, %rdi
callq 0x3af4
testl %eax, %eax
jne 0x329c
movq %r14, %rdi
callq 0x3b0a
testl %eax, %eax
jne 0x33df
testb %bl, %bl
movsd 0x10(%rsp), %xmm0
jne 0x3277
movq %r13, %rdi
callq 0x60d6
movq %r12, %rdi
callq 0x12505
movq %r12, %rdi
callq 0x12519
movl %r15d, %edi
callq 0x21f0
testl %eax, %eax
movq 0x30(%rsp), %rbx
movq 0x20(%rsp), %r15
je 0x332f
callq 0x20a0
cmpl $0x0, (%rax)
je 0x3321
movq %rax, %r14
leaq 0x12c19(%rip), %rdi     # 0x15f2a
xorl %eax, %eax
callq 0x10048
movl $0x0, (%r14)
jmp 0x332f
leaq 0x12c02(%rip), %rdi     # 0x15f2a
xorl %eax, %eax
callq 0x10167
movl %ebp, %edi
callq 0x21f0
testl %eax, %eax
je 0x336c
callq 0x20a0
cmpl $0x0, (%rax)
je 0x335e
movq %rax, %r14
leaq 0x12bdc(%rip), %rdi     # 0x15f2a
xorl %eax, %eax
callq 0x10048
movl $0x0, (%r14)
jmp 0x336c
leaq 0x12bc5(%rip), %rdi     # 0x15f2a
xorl %eax, %eax
callq 0x10167
movq 0x60(%rsp), %rdi
callq 0xf6b7
movq %r15, %rdi
callq 0xf6b7
movq %rbx, %rdi
callq 0x2040
movq 0x18(%rsp), %rdi
callq 0x2040
movq 0x28(%rsp), %rdi
callq 0x2040
xorl %eax, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x20a0
cmpl $0x0, (%rax)
jne 0x33c8
leaq 0x10edb(%rip), %rdi     # 0x1429a
xorl %eax, %eax
callq 0x10167
jmp 0x33df
movq %rax, %rbx
leaq 0x10ec8(%rip), %rdi     # 0x1429a
xorl %eax, %eax
callq 0x10048
movl $0x0, (%rbx)
movl $0x1, %edi
callq 0x2370
callq 0x2420
leaq 0x10ce1(%rip), %rdi     # 0x140d6
jmp 0x33fe
leaq 0x10cc1(%rip), %rdi     # 0x140bf
movq %r15, %rsi
xorl %eax, %eax
callq 0x10167
callq 0x20a0
movl $0x0, (%rax)
callq 0x3752
leaq 0x42461(%rip), %rax     # 0x45880
movq (%rax), %rdx
leaq 0x10c1f(%rip), %rdi     # 0x14048
movq %r15, %rsi
xorl %eax, %eax
callq 0x10167
jmp 0x3686
callq 0x20a0
cmpl $0x0, (%rax)
jne 0x3497
leaq 0x10c26(%rip), %rdi     # 0x1406f
movq %r15, %rsi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x10167
jmp 0x33df
leaq 0x42421(%rip), %rax     # 0x45880
movq (%rax), %rdx
leaq 0x10c06(%rip), %rdi     # 0x1406f
movq %r15, %rsi
xorl %eax, %eax
callq 0x10048
jmp 0x33d9
leaq 0x132a5(%rip), %rdi     # 0x16724
leaq 0x10f3f(%rip), %rsi     # 0x143c5
leaq 0x10f57(%rip), %rcx     # 0x143e4
movl $0x95, %edx
callq 0x21c0
movq %rax, %r14
leaq 0x10bce(%rip), %rdi     # 0x1406f
movq %r15, %rsi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x10048
movl $0x0, (%r14)
jmp 0x33df
leaq 0x10b57(%rip), %rdi     # 0x14018
leaq 0x10b5f(%rip), %rsi     # 0x14027
leaq 0x10b5f(%rip), %rcx     # 0x1402e
movl $0x5a, %edx
callq 0x21c0
leaq 0x10b38(%rip), %rdi     # 0x14018
leaq 0x10b40(%rip), %rsi     # 0x14027
leaq 0x10b40(%rip), %rcx     # 0x1402e
movl $0x54, %edx
callq 0x21c0
leaq 0x10b19(%rip), %rdi     # 0x14018
leaq 0x10b21(%rip), %rsi     # 0x14027
leaq 0x10b21(%rip), %rcx     # 0x1402e
movl $0x4e, %edx
callq 0x21c0
leaq 0x10afa(%rip), %rdi     # 0x14018
leaq 0x10b02(%rip), %rsi     # 0x14027
leaq 0x10b02(%rip), %rcx     # 0x1402e
movl $0x84, %edx
callq 0x21c0
leaq 0x10adb(%rip), %rdi     # 0x14018
leaq 0x10ae3(%rip), %rsi     # 0x14027
leaq 0x10ae3(%rip), %rcx     # 0x1402e
movl $0x7e, %edx
callq 0x21c0
leaq 0x10abc(%rip), %rdi     # 0x14018
leaq 0x10ac4(%rip), %rsi     # 0x14027
leaq 0x10ac4(%rip), %rcx     # 0x1402e
movl $0x78, %edx
callq 0x21c0
leaq 0x10a9d(%rip), %rdi     # 0x14018
leaq 0x10aa5(%rip), %rsi     # 0x14027
leaq 0x10aa5(%rip), %rcx     # 0x1402e
movl $0x72, %edx
callq 0x21c0
leaq 0x10a7e(%rip), %rdi     # 0x14018
leaq 0x10a86(%rip), %rsi     # 0x14027
leaq 0x10a86(%rip), %rcx     # 0x1402e
movl $0x6c, %edx
callq 0x21c0
leaq 0x10a5f(%rip), %rdi     # 0x14018
leaq 0x10a67(%rip), %rsi     # 0x14027
leaq 0x10a67(%rip), %rcx     # 0x1402e
movl $0x66, %edx
callq 0x21c0
leaq 0x10a40(%rip), %rdi     # 0x14018
leaq 0x10a48(%rip), %rsi     # 0x14027
leaq 0x10a48(%rip), %rcx     # 0x1402e
movl $0x60, %edx
callq 0x21c0
leaq 0x10af4(%rip), %rdi     # 0x140eb
jmp 0x3609
leaq 0x10b17(%rip), %rdi     # 0x14117
jmp 0x3609
leaq 0x10b3b(%rip), %rdi     # 0x14144
xorl %eax, %eax
callq 0x10167
jmp 0x3686
leaq 0x10b5a(%rip), %rdi     # 0x14173
movb $0x1, %al
callq 0x10167
jmp 0x3686
leaq 0x10b71(%rip), %rdi     # 0x1419a
jmp 0x367f
callq 0x20a0
cmpl $0x0, (%rax)
jne 0x36d8
leaq 0x10b8a(%rip), %rdi     # 0x141ca
movq %r14, %rsi
jmp 0x3669
leaq 0x10ba1(%rip), %rdi     # 0x141ed
movq %r14, %rsi
jmp 0x367f
callq 0x20a0
cmpl $0x0, (%rax)
jne 0x36e7
leaq 0x10b64(%rip), %rdi     # 0x141ca
movq %r12, %rsi
xorl %eax, %eax
callq 0x10167
jmp 0x33df
leaq 0x10b71(%rip), %rdi     # 0x141ed
movq %r12, %rsi
xorl %eax, %eax
callq 0x10167
callq 0x20a0
movl $0x0, (%rax)
jmp 0x33df
callq 0x20a0
cmpl $0x0, (%rax)
jne 0x3700
leaq 0x10b96(%rip), %rdi     # 0x1423d
jmp 0x33bf
callq 0x20a0
cmpl $0x0, (%rax)
jne 0x370f
leaq 0x10ba0(%rip), %rdi     # 0x1425d
jmp 0x33bf
callq 0x20a0
cmpl $0x0, (%rax)
jne 0x371e
leaq 0x10bb3(%rip), %rdi     # 0x14286
jmp 0x33bf
movq %rax, %rbx
leaq 0x10ae8(%rip), %rdi     # 0x141ca
movq %r14, %rsi
jmp 0x36f4
movq %rax, %rbx
leaq 0x10ad9(%rip), %rdi     # 0x141ca
movq %r12, %rsi
xorl %eax, %eax
callq 0x10048
jmp 0x33d9
movq %rax, %rbx
leaq 0x10b33(%rip), %rdi     # 0x1423d
jmp 0x33d2
movq %rax, %rbx
leaq 0x10b44(%rip), %rdi     # 0x1425d
jmp 0x33d2
movq %rax, %rbx
leaq 0x10b5e(%rip), %rdi     # 0x14286
jmp 0x33d2
callq 0x20a0
cmpl $0x0, (%rax)
jne 0x3743
leaq 0x10b3f(%rip), %rdi     # 0x1427d
jmp 0x33bf
movq %rax, %rbx
leaq 0x10b30(%rip), %rdi     # 0x1427d
jmp 0x33d2