// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]kivaloo/dynamodb-kv/main.c
// Function: main
int
main(int argc, char * argv[])
{
	/* State variables. */
	struct serverpool * SP;
	struct dynamodb_request_queue * QW;
	struct dynamodb_request_queue * QR;
	struct dispatch_state * D;
	int s;

	/* Command-line parameters. */
	char * opt_k = NULL;
	char * opt_l = NULL;
	char * opt_p = NULL;
	char * opt_r = NULL;
	char * opt_s = NULL;
	char * opt_t = NULL;
	int opt_1 = 0;

	/* Working variable. */
	char * dynamodb_host;
	char * key_id;
	char * key_secret;
	struct sock_addr ** sas;
	struct logging_file * logfile;
	struct capacity_reader * M;
	const char * ch;

	WARNP_INIT;

	/* Parse the command line. */
	while ((ch = GETOPT(argc, argv)) != NULL) {
		GETOPT_SWITCH(ch) {
		GETOPT_OPTARG("-k"):
			if (opt_k != NULL)
				usage();
			if ((opt_k = strdup(optarg)) == NULL)
				OPT_EPARSE(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("-r"):
			if (opt_r != NULL)
				usage();
			if ((opt_r = strdup(optarg)) == NULL)
				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("-t"):
			if (opt_t != NULL)
				usage();
			if ((opt_t = strdup(optarg)) == NULL)
				OPT_EPARSE(ch, optarg);
			break;
		GETOPT_OPT("--version"):
			fprintf(stderr, "dynamodb-kv @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. */

	/* Verify that we have mandatory options. */
	if (opt_k == NULL)
		usage();
	if (opt_r == NULL)
		usage();
	if (opt_s == NULL)
		usage();
	if (opt_t == NULL)
		usage();

	/* Construct the DynamoDB endpoint host name. */
	if (asprintf(&dynamodb_host, "dynamodb.%s.amazonaws.com:443",
	    opt_r) == -1) {
		warnp("asprintf");
		exit(1);
	}

	/* Start looking up addresses for DynamoDB endpoints. */
	if ((SP = serverpool_create(dynamodb_host, 15, 120)) == NULL) {
		warnp("Error starting DNS lookups for %s", dynamodb_host);
		exit(1);
	}

	/* Read the key file. */
	if (aws_readkeys(opt_k, &key_id, &key_secret)) {
		warnp("Error reading AWS keys from %s", opt_k);
		exit(1);
	}

	/* Create DynamoDB request queues for writes and reads. */
	if ((QW = dynamodb_request_queue_init(key_id, key_secret,
	    opt_r, SP)) == NULL) {
		warnp("Error creating DynamoDB request queue");
		exit(1);
	}
	if ((QR = dynamodb_request_queue_init(key_id, key_secret,
	    opt_r, SP)) == NULL) {
		warnp("Error creating DynamoDB request queue");
		exit(1);
	}

	/* Start reading table throughput parameters. */
	if ((M = capacity_init(key_id, key_secret, opt_t, opt_r,
	    SP, QW, QR)) == NULL) {
		warnp("Error reading DynamoDB table metadata");
		exit(1);
	}

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

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

	/* If requested, create a log file. */
	if (opt_l != NULL) {
		if ((logfile = logging_open(opt_l)) == NULL) {
			warnp("Cannot open log file");
			exit(1);
		}
		dynamodb_request_queue_log(QW, logfile);
		dynamodb_request_queue_log(QR, logfile);
	} else {
		logfile = NULL;
	}

	/* 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 once. */
	do {
		/* accept a connection. */
		if ((D = dispatch_accept(QW, QR, opt_t, s)) == NULL) {
			warnp("Error accepting new connection");
			exit(1);
		}

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

		/* Clean up the connection. */
		if (dispatch_done(D))
			exit(1);
	} while (opt_1 == 0);

	/* Close the log file, if we have one. */
	if (logfile != NULL)
		logging_close(logfile);

	/* Close the listening socket. */
	if (close(s))
		warnp("close");

	/* Free the address structures. */
	sock_addr_freelist(sas);

	/* Stop performing DescribeTable requests. */
	capacity_free(M);

	/* Free DynamoDB request queues. */
	dynamodb_request_queue_free(QR);
	dynamodb_request_queue_free(QW);

	/* Stop DNS lookups. */
	serverpool_free(SP);

	/* Free string allocated by asprintf. */
	free(dynamodb_host);

	/* Free key strings. */
	free(key_id);
	insecure_memzero(key_secret, strlen(key_secret));
	free(key_secret);

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

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movl %edi, %ebx
movq $0x0, 0x58(%rsp)
movq %rsi, 0x28(%rsp)
movq (%rsi), %rdi
testq %rdi, %rdi
je 0x3c7a
callq 0xb8b8
movl %ebx, %edi
movq 0x28(%rsp), %rsi
callq 0x9704
testq %rax, %rax
jne 0x3c99
leaq 0x199d6(%rip), %rax     # 0x1d668
cmpl %ebx, (%rax)
callq 0x46c4
movq %rax, %rbp
movq $0x0, 0x20(%rsp)
leaq 0x29c9c(%rip), %r14     # 0x2d948
leaq 0x103ab(%rip), %r15     # 0x1405e
leaq 0x103a7(%rip), %r12     # 0x14061
leaq 0x103c1(%rip), %r13     # 0x14082
movq $0x0, 0x48(%rsp)
movl $0x0, 0x34(%rsp)
movq $0x0, 0x40(%rsp)
movq $0x0, 0x18(%rsp)
movq $0x0, 0x38(%rsp)
movq $0x0, 0x78(%rsp)
movl %ebx, 0x10(%rsp)
movq $0x48, 0x8(%rsp)
movq 0x8(%rsp), %rax
decq %rax
movq %rax, 0x80(%rsp)
movl $0x0, 0x64(%rsp)
cmpl $0x0, (%r14)
je 0x3d30
movq %rbp, %rdi
callq 0x9a4b
addq 0x8(%rsp), %rax
jmp 0x3d44
movq 0x80(%rsp), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x80(%rsp)
cmpq $0x66, %rax
jg 0x3d8e
cmpq $0x54, %rax
jle 0x3dc6
cmpq $0x55, %rax
je 0x3e75
cmpq $0x5b, %rax
je 0x3e3f
cmpq $0x61, %rax
jne 0x3ec8
cmpl $0x0, (%r14)
jne 0x3fde
movl $0x61, %esi
subq 0x8(%rsp), %rsi
leaq 0x102d2(%rip), %rdi     # 0x1405b
jmp 0x3e90
cmpq $0x6f, %rax
jle 0x3df6
cmpq $0x70, %rax
je 0x3e9f
cmpq $0x75, %rax
jne 0x3ec2
cmpl $0x0, (%r14)
jne 0x4081
movl $0x75, %edi
subq 0x8(%rsp), %rdi
callq 0x9c19
jmp 0x3d1b
cmpq $0x49, %rax
je 0x3e22
cmpq $0x4f, %rax
jne 0x3ec8
cmpl $0x0, (%r14)
jne 0x3f05
movl $0x4f, %esi
subq 0x8(%rsp), %rsi
leaq 0x10261(%rip), %rdi     # 0x14052
jmp 0x3e90
cmpq $0x67, %rax
je 0x3e5c
cmpq $0x6d, %rax
jne 0x3ec8
cmpl $0x0, (%r14)
jne 0x40ab
movl $0x6d, %esi
subq 0x8(%rsp), %rsi
movq %r12, %rdi
jmp 0x3eb6
cmpl $0x0, (%r14)
jne 0x3f3f
movl $0x49, %esi
subq 0x8(%rsp), %rsi
leaq 0x101f4(%rip), %rdi     # 0x14031
jmp 0x3e90
cmpl $0x0, (%r14)
jne 0x3fa7
movl $0x5b, %esi
subq 0x8(%rsp), %rsi
leaq 0x101fe(%rip), %rdi     # 0x14058
jmp 0x3e90
cmpl $0x0, (%r14)
jne 0x3f6d
movl $0x67, %esi
subq 0x8(%rsp), %rsi
movq %r15, %rdi
jmp 0x3e90
cmpl $0x0, (%r14)
jne 0x4015
movl $0x55, %esi
subq 0x8(%rsp), %rsi
leaq 0x101c5(%rip), %rdi     # 0x14055
movl $0x1, %edx
callq 0x9b08
jmp 0x3d1b
cmpl $0x0, (%r14)
jne 0x406d
movl $0x70, %esi
subq 0x8(%rsp), %rsi
movq %r13, %rdi
xorl %edx, %edx
callq 0x9b08
jmp 0x3d1b
cmpq $0x78, %rax
je 0x3ef9
cmpl $0x0, (%r14)
jne 0x408a
cmpl $0x0, 0x64(%rsp)
jne 0x3d1b
movl $0x78, %edi
subq 0x8(%rsp), %rdi
callq 0x9c59
movl $0x1, 0x64(%rsp)
jmp 0x3d1b
movl $0x1, (%r14)
jmp 0x4053
leaq 0x29a34(%rip), %rax     # 0x2d940
movq (%rax), %rbx
testq %rbx, %rbx
je 0x4150
cmpq $0x0, 0x48(%rsp)
jne 0x4103
movq %rbx, %rdi
callq 0x3610
testq %rax, %rax
je 0x4108
movq %rax, 0x48(%rsp)
jmp 0x404f
leaq 0x299fa(%rip), %rax     # 0x2d940
movq (%rax), %rbx
testq %rbx, %rbx
je 0x416f
cmpq $0x0, 0x20(%rsp)
jne 0x4103
movq %rbx, %rdi
callq 0x3610
movq %rax, 0x20(%rsp)
jmp 0x3f99
leaq 0x299cc(%rip), %rax     # 0x2d940
movq (%rax), %rbx
testq %rbx, %rbx
je 0x418e
cmpq $0x0, 0x40(%rsp)
jne 0x4103
movq %rbx, %rdi
callq 0x3610
movq %rax, 0x40(%rsp)
testq %rax, %rax
jne 0x404f
jmp 0x4108
leaq 0x29992(%rip), %rax     # 0x2d940
movq (%rax), %rbx
testq %rbx, %rbx
je 0x41cc
cmpq $0x0, 0x38(%rsp)
jne 0x4103
movq %rbx, %rdi
callq 0x3610
testq %rax, %rax
je 0x4108
movq %rax, 0x38(%rsp)
jmp 0x404f
leaq 0x2995b(%rip), %rax     # 0x2d940
movq (%rax), %rbx
testq %rbx, %rbx
je 0x41eb
cmpq $0x0, 0x18(%rsp)
jne 0x4103
movq %rbx, %rdi
callq 0x3610
testq %rax, %rax
je 0x4108
movq %rax, 0x18(%rsp)
jmp 0x404f
leaq 0x29924(%rip), %rax     # 0x2d940
movq (%rax), %rbx
testq %rbx, %rbx
je 0x41ad
cmpq $0x0, 0x78(%rsp)
jne 0x4103
movq %rbx, %rdi
callq 0x3610
movq %rax, 0x58(%rsp)
testq %rax, %rax
je 0x4108
movq %rax, 0x78(%rsp)
movl 0x10(%rsp), %ebx
movl %ebx, %edi
movq 0x28(%rsp), %rsi
callq 0x9704
movq %rax, %rbp
testq %rax, %rax
jne 0x3cfa
jmp 0x40d2
cmpl $0x0, 0x34(%rsp)
movl $0x1, 0x34(%rsp)
je 0x4053
jmp 0x4103
leaq 0xfffd(%rip), %rdi      # 0x14085
jmp 0x4091
leaq 0x1000b(%rip), %rdi     # 0x1409c
movq %rbp, %rsi
xorl %eax, %eax
callq 0xba57
callq 0x3040
movl $0x0, (%rax)
callq 0x46c4
movq 0x18f2e(%rip), %rax     # 0x1cfe0
movq (%rax), %rcx
leaq 0xffaf(%rip), %rdi      # 0x1406b
movl $0x16, %esi
movl $0x1, %edx
callq 0x3660
xorl %edi, %edi
callq 0x3480
leaq 0x1958f(%rip), %rax     # 0x1d668
cmpl %ebx, (%rax)
jne 0x4103
cmpq $0x0, 0x20(%rsp)
je 0x4103
movq 0x38(%rsp), %rdx
testq %rdx, %rdx
je 0x4103
cmpq $0x0, 0x18(%rsp)
je 0x4103
cmpq $0x0, 0x40(%rsp)
jne 0x420a
callq 0x46c4
callq 0x3040
cmpl $0x0, (%rax)
jne 0x4128
leaq 0xff1b(%rip), %rdi      # 0x14034
movq %rbp, %rsi
movq %rbx, %rdx
xorl %eax, %eax
callq 0xba57
jmp 0x4146
movq %rax, %r14
leaq 0xff02(%rip), %rdi      # 0x14034
movq %rbp, %rsi
movq %rbx, %rdx
xorl %eax, %eax
callq 0xb938
movl $0x0, (%r14)
movl $0x1, %edi
callq 0x3480
leaq 0xfead(%rip), %rdi      # 0x14004
leaq 0xfeb5(%rip), %rsi      # 0x14013
leaq 0xfeb5(%rip), %rcx      # 0x1401a
movl $0x4f, %edx
callq 0x3210
leaq 0xfe8e(%rip), %rdi      # 0x14004
leaq 0xfe96(%rip), %rsi      # 0x14013
leaq 0xfe96(%rip), %rcx      # 0x1401a
movl $0x49, %edx
callq 0x3210
leaq 0xfe6f(%rip), %rdi      # 0x14004
leaq 0xfe77(%rip), %rsi      # 0x14013
leaq 0xfe77(%rip), %rcx      # 0x1401a
movl $0x67, %edx
callq 0x3210
leaq 0xfe50(%rip), %rdi      # 0x14004
leaq 0xfe58(%rip), %rsi      # 0x14013
leaq 0xfe58(%rip), %rcx      # 0x1401a
movl $0x55, %edx
callq 0x3210
leaq 0xfe31(%rip), %rdi      # 0x14004
leaq 0xfe39(%rip), %rsi      # 0x14013
leaq 0xfe39(%rip), %rcx      # 0x1401a
movl $0x5b, %edx
callq 0x3210
leaq 0xfe12(%rip), %rdi      # 0x14004
leaq 0xfe1a(%rip), %rsi      # 0x14013
leaq 0xfe1a(%rip), %rcx      # 0x1401a
movl $0x61, %edx
callq 0x3210
leaq 0xfea0(%rip), %rsi      # 0x140b1
leaq 0x70(%rsp), %rdi
xorl %eax, %eax
callq 0x9410
cmpl $-0x1, %eax
jne 0x423f
callq 0x3040
cmpl $0x0, (%rax)
jne 0x4277
leaq 0xfe9c(%rip), %rdi      # 0x140cf
xorl %eax, %eax
callq 0xba57
jmp 0x4146
movq 0x70(%rsp), %rdi
movl $0x78, %edx
movl $0xf, %esi
callq 0xdef0
testq %rax, %rax
jne 0x428d
callq 0x3040
cmpl $0x0, (%rax)
movq 0x70(%rsp), %rsi
jne 0x42fa
leaq 0xfe66(%rip), %rdi      # 0x140d8
jmp 0x431c
movq %rax, %rbx
leaq 0xfe4e(%rip), %rdi      # 0x140cf
xorl %eax, %eax
callq 0xb938
jmp 0x433e
movq %rax, %rbx
leaq 0x68(%rsp), %rsi
leaq 0x50(%rsp), %rdx
movq 0x20(%rsp), %rdi
callq 0x5578
testl %eax, %eax
jne 0x4306
movq 0x68(%rsp), %rdi
movq 0x50(%rsp), %rsi
movq 0x38(%rsp), %r15
movq %r15, %rdx
movq %rbx, %rcx
callq 0xc748
testq %rax, %rax
je 0x42e4
movq %rax, %r14
movq 0x68(%rsp), %rdi
movq 0x50(%rsp), %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0xc748
testq %rax, %rax
jne 0x4358
callq 0x3040
cmpl $0x0, (%rax)
jne 0x4349
leaq 0xfe24(%rip), %rdi      # 0x14119
jmp 0x4233
movq %rax, %rbx
leaq 0xfdd4(%rip), %rdi      # 0x140d8
jmp 0x4337
callq 0x3040
cmpl $0x0, (%rax)
jne 0x4328
leaq 0xfde3(%rip), %rdi      # 0x140fa
movq 0x20(%rsp), %rsi
xorl %eax, %eax
callq 0xba57
jmp 0x4146
movq %rax, %rbx
leaq 0xfdc8(%rip), %rdi      # 0x140fa
movq 0x20(%rsp), %rsi
xorl %eax, %eax
callq 0xb938
movl $0x0, (%rbx)
jmp 0x4146
movq %rax, %rbx
leaq 0xfdc6(%rip), %rdi      # 0x14119
jmp 0x4281
movq %rax, %r15
movq 0x68(%rsp), %rdi
movq 0x50(%rsp), %rsi
movq %rax, (%rsp)
movq 0x40(%rsp), %rdx
movq 0x38(%rsp), %rcx
movq %rbx, %r8
movq %r14, %r9
callq 0x4744
testq %rax, %rax
jne 0x4399
callq 0x3040
cmpl $0x0, (%rax)
jne 0x43cb
leaq 0xfdab(%rip), %rdi      # 0x1413f
jmp 0x4233
movq %rax, %r12
movq 0x18(%rsp), %rdi
callq 0xa8b4
movq %rax, 0x28(%rsp)
testq %rax, %rax
jne 0x43da
callq 0x3040
cmpl $0x0, (%rax)
jne 0x440a
leaq 0xfda4(%rip), %rdi      # 0x14165
movq 0x18(%rsp), %rsi
jmp 0x431c
movq %rax, %rbx
leaq 0xfd6a(%rip), %rdi      # 0x1413f
jmp 0x4281
movq 0x28(%rsp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
jne 0x441e
leaq 0xfd9a(%rip), %rdi      # 0x14188
movq 0x18(%rsp), %rsi
xorl %eax, %eax
callq 0xba57
callq 0x3040
movl $0x0, (%rax)
jmp 0x4146
movq %rax, %rbx
leaq 0xfd51(%rip), %rdi      # 0x14165
movq 0x18(%rsp), %rsi
jmp 0x4337
movq 0x28(%rsp), %rax
cmpq $0x0, 0x8(%rax)
je 0x4450
leaq 0xfd71(%rip), %rdi      # 0x141a2
movq 0x18(%rsp), %rsi
xorl %eax, %eax
callq 0xba57
callq 0x3040
movl $0x0, (%rax)
movq 0x28(%rsp), %rax
movq (%rax), %rdi
callq 0xb00a
cmpl $-0x1, %eax
je 0x4146
movl %eax, %ebp
cmpq $0x0, 0x48(%rsp)
jne 0x4473
movq $0x0, 0x10(%rsp)
jmp 0x44bc
movq 0x48(%rsp), %rdi
callq 0xd474
movq %rax, 0x10(%rsp)
testq %rax, %rax
jne 0x44a1
callq 0x3040
cmpl $0x0, (%rax)
jne 0x45cf
leaq 0xfd3c(%rip), %rdi      # 0x141d8
jmp 0x4233
movq %r14, %rdi
movq 0x10(%rsp), %r13
movq %r13, %rsi
callq 0xc928
movq %r15, %rdi
movq %r13, %rsi
callq 0xc928
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
jne 0x44ec
leaq 0xfd20(%rip), %rsi      # 0x141ed
leaq 0x58(%rsp), %rdi
movq 0x18(%rsp), %rdx
xorl %eax, %eax
callq 0x9410
cmpl $-0x1, %eax
je 0x4222
movq 0x58(%rsp), %rdi
callq 0x9514
testl %eax, %eax
jne 0x4585
movq %r14, %rdi
movq %r15, %rsi
movq 0x40(%rsp), %rdx
movl %ebp, %ecx
callq 0x4ce4
movq %rax, %r13
testq %rax, %rax
je 0x45de
callq 0x59e0
testl %eax, %eax
jne 0x459b
movq %r13, %rdi
callq 0x4f30
testl %eax, %eax
jne 0x4517
movq %r13, %rdi
callq 0x4f47
testl %eax, %eax
jne 0x4146
cmpl $0x0, 0x34(%rsp)
je 0x44f9
cmpq $0x0, 0x10(%rsp)
je 0x4555
movq 0x10(%rsp), %rdi
callq 0xdb05
movl %ebp, %edi
callq 0x3670
testl %eax, %eax
je 0x461c
callq 0x3040
cmpl $0x0, (%rax)
jne 0x4603
leaq 0x101b3(%rip), %rdi     # 0x1472c
xorl %eax, %eax
callq 0xba57
jmp 0x461c
callq 0x3040
cmpl $0x0, (%rax)
jne 0x45b1
leaq 0xfc5e(%rip), %rdi      # 0x141f4
jmp 0x4233
callq 0x3040
cmpl $0x0, (%rax)
jne 0x45c0
leaq 0xfc7b(%rip), %rdi      # 0x14227
jmp 0x4233
movq %rax, %rbx
leaq 0xfc39(%rip), %rdi      # 0x141f4
jmp 0x4281
movq %rax, %rbx
leaq 0xfc5d(%rip), %rdi      # 0x14227
jmp 0x4281
movq %rax, %rbx
leaq 0xfbff(%rip), %rdi      # 0x141d8
jmp 0x4281
callq 0x3040
cmpl $0x0, (%rax)
jne 0x45f4
leaq 0xfc19(%rip), %rdi      # 0x14208
jmp 0x4233
movq %rax, %rbx
leaq 0xfc0a(%rip), %rdi      # 0x14208
jmp 0x4281
movq %rax, %r13
leaq 0x1011f(%rip), %rdi     # 0x1472c
xorl %eax, %eax
callq 0xb938
movl $0x0, (%r13)
movq 0x28(%rsp), %rdi
callq 0xafc6
movq %r12, %rdi
callq 0x493f
movq %r15, %rdi
callq 0xcad6
movq %r14, %rdi
callq 0xcad6
movq %rbx, %rdi
callq 0xe677
movq 0x70(%rsp), %rdi
callq 0x3460
movq 0x68(%rsp), %rdi
callq 0x3460
movq 0x50(%rsp), %rbx
movq %rbx, %rdi
callq 0x3180
leaq 0x19012(%rip), %rcx     # 0x1d680
movq (%rcx), %rcx
movq %rbx, %rdi
movq %rax, %rsi
callq *%rcx
movq 0x50(%rsp), %rdi
callq 0x3460
movq 0x20(%rsp), %rdi
callq 0x3460
movq 0x48(%rsp), %rdi
callq 0x3460
movq 0x58(%rsp), %rdi
callq 0x3460
movq 0x38(%rsp), %rdi
callq 0x3460
movq 0x18(%rsp), %rdi
callq 0x3460
movq 0x40(%rsp), %rdi
callq 0x3460
jmp 0x40cb