// File: ctSkennerton[P]fxtract/util/map_x.c
// Function: main
int
main(int argc, char **argv)
{
    int	i, j;
    char	*skey, *sval;

    plan_tests(5*NKEYS + 3 + 2*(argc - 1));
    KVS	sh = kvs_create();

    fputs("# pass 1: add 11 kv pairs\n", stderr);
    for (i = 0; i < NKEYS-1; ++i) {
	kvs_set(sh, keyv[i], valv[i+1]);
	ok(kvs_count(sh) == i+1, "adding (%s => %s) makes count: %d", 
	    keyv[i], valv[i+1], kvs_count(sh));
    }
    for (i = 0; i < NKEYS-1; ++i) {
	const char *vp = kvs_get(sh, keyv[i]);
	ok(vp && !strcmp(vp, valv[i+1]), "%s => %s", keyv[i], vp);
    }

    fputs("# pass 2: add 12 kv pairs, with different values\n", stderr);
    for (i = 0; i < NKEYS; ++i) {
	kvs_set(sh, keyv[i], valv[i]);
    }

    for (i = 0; i < NKEYS; ++i) {
	const char *vp = kvs_get(sh, keyv[i]);
	ok(vp && !strcmp(vp, valv[i]), "%s => %s", keyv[i], valv[i]);
    }

    ok(kvs_count(sh) == NKEYS, "kvs_count %d", kvs_count(sh));

    for (i = 0, kvs_start(sh);  kvs_next(sh, &skey, &sval); ++i) {
	for (j = 0; j < NKEYS && strcmp(keyv[j], skey); ++j);
	ok(j < NKEYS && !strcmp(sval, valv[j]), "scan finds (%s => %s)", skey, sval);
    }
    ok(i == NKEYS, "scan finds %d keys", i);

    fputs("# Delete 3 keys\n", stderr);
    kvs_del(sh, keyv[0]);
    kvs_del(sh, keyv[2]);
    kvs_del(sh, keyv[3]);

    ok(!kvs_get(sh, keyv[0]), "%s deleted ok", keyv[0]);
    ok(!kvs_get(sh, keyv[2]), "%s deleted ok", keyv[2]);
    ok(!kvs_get(sh, keyv[3]), "%s deleted ok", keyv[3]);
    ok(kvs_count(sh) == NKEYS - 3, "kvs_count %d", kvs_count(sh));
    for (i = 0; i < NKEYS; ++i) {
	if (i == 0 || i == 2 || i == 3) continue;
	ok(!strcmp(valv[i], kvs_get(sh, keyv[i])), "%s still ok", keyv[i]);
    }
    ok(kvs_count(sh) == 9, "count is %d", kvs_count(sh));

    fputs("# Delete all keys, including 3 already deleted\n", stderr);
    for (i = 0; i < NKEYS; ++i) {
	kvs_del(sh, keyv[i]);
    }    
    ok(kvs_count(sh) == 0, "final count is %d", kvs_count(sh));

    kvs_destroy(sh);
    while (*++argv) {
	char    val[9], buf[999];;
	int	    num = 0;

	FILE    *fp = fopen(*argv, "r");
	if (!fp) {
	    fprintf(stderr, "t.map: %s: cannot open\n", *argv);
	    continue;
	}

	sh = kvs_create();

	while (fgets(buf, sizeof(buf), fp)) {
	    sprintf(val, "%d", num++);
	    kvs_set(sh, buf, val);
	}

	ok(kvs_count(sh) == num, "kvs_count %d matches file count %d", 
	    kvs_count(sh), num);

	rewind(fp);
	num = 0;
	int	    found = 0;
	while (fgets(buf, sizeof(buf), fp)) {
	    sprintf(val, "%d", num++);
	    const char *ret = kvs_get(sh,buf);

	    if (!strcmp(ret, val)) {
		++found;
	    } else {
		fprintf(stderr, "retrieved %s, not %s, for key %s", 
			ret ? ret : "<NULL>", val, buf);
	    }
	}
	ok(found == num, "found %d of %d values in kvs",  found, num);
	kvs_destroy(sh);
    }

    return exit_status();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x4c0, %rsp            # imm = 0x4C0
movl $0x0, -0x14(%rbp)
movl %edi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movl -0x18(%rbp), %edi
subl $0x1, %edi
shll %edi
addl $0x3f, %edi
callq 0x8490
callq 0x4490
movq %rax, -0x40(%rbp)
movq 0x9b2c(%rip), %rax      # 0xcfd8
movq (%rax), %rsi
leaq 0x5bca(%rip), %rdi      # 0x9080
callq 0x31f0
movl $0x0, -0x24(%rbp)
cmpl $0xb, -0x24(%rbp)
jge 0x364a
movq -0x40(%rbp), %rdi
movslq -0x24(%rbp), %rcx
leaq 0x9cf5(%rip), %rax      # 0xd1d0
movq (%rax,%rcx,8), %rsi
movl -0x24(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rcx
leaq 0x9d41(%rip), %rax      # 0xd230
movq (%rax,%rcx,8), %rdx
callq 0x5550
movq -0x40(%rbp), %rdi
callq 0x44b0
movl -0x24(%rbp), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jne 0x35a9
movslq -0x24(%rbp), %rcx
leaq 0x9cb6(%rip), %rax      # 0xd1d0
movq (%rax,%rcx,8), %rax
movq %rax, -0x470(%rbp)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rcx
leaq 0x9cfb(%rip), %rax      # 0xd230
movq (%rax,%rcx,8), %rax
movq %rax, -0x468(%rbp)
movq -0x40(%rbp), %rdi
callq 0x44b0
movq -0x470(%rbp), %r11
movq -0x468(%rbp), %r10
xorl %edi, %edi
movl $0x1, %esi
xorl %ecx, %ecx
movl %ecx, %r8d
leaq 0x5b31(%rip), %r9       # 0x909b
leaq 0x5b2f(%rip), %r14      # 0x90a0
leaq 0x5b30(%rip), %rbx      # 0x90a8
movq %r8, %rdx
movq %r8, %rcx
movq %r14, (%rsp)
movl $0x2f, 0x8(%rsp)
movq %rbx, 0x10(%rsp)
movq %r11, 0x18(%rsp)
movq %r10, 0x20(%rsp)
movl %eax, 0x28(%rsp)
movb $0x0, %al
callq 0x77b0
jmp 0x363c
movslq -0x24(%rbp), %rcx
leaq 0x9c1c(%rip), %rax      # 0xd1d0
movq (%rax,%rcx,8), %rax
movq %rax, -0x480(%rbp)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rcx
leaq 0x9c61(%rip), %rax      # 0xd230
movq (%rax,%rcx,8), %rax
movq %rax, -0x478(%rbp)
movq -0x40(%rbp), %rdi
callq 0x44b0
movq -0x480(%rbp), %r11
movq -0x478(%rbp), %r10
xorl %edi, %edi
xorl %ecx, %ecx
movl %ecx, %r8d
leaq 0x5a9c(%rip), %r9       # 0x909b
leaq 0x5a9a(%rip), %r14      # 0x90a0
leaq 0x5a9b(%rip), %rbx      # 0x90a8
movq %r8, %rsi
movq %r8, %rdx
movq %r8, %rcx
movq %r14, (%rsp)
movl $0x2f, 0x8(%rsp)
movq %rbx, 0x10(%rsp)
movq %r11, 0x18(%rsp)
movq %r10, 0x20(%rsp)
movl %eax, 0x28(%rsp)
movb $0x0, %al
callq 0x77b0
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x34c2
movl $0x0, -0x24(%rbp)
cmpl $0xb, -0x24(%rbp)
jge 0x376a
movq -0x40(%rbp), %rdi
movslq -0x24(%rbp), %rcx
leaq 0x9b66(%rip), %rax      # 0xd1d0
movq (%rax,%rcx,8), %rsi
callq 0x44d0
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
je 0x3702
movq -0x48(%rbp), %rdi
movl -0x24(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rcx
leaq 0x9b9a(%rip), %rax      # 0xd230
movq (%rax,%rcx,8), %rsi
callq 0x3378
cmpl $0x0, %eax
jne 0x3702
movslq -0x24(%rbp), %rcx
leaq 0x9b21(%rip), %rax      # 0xd1d0
movq (%rax,%rcx,8), %r10
movq -0x48(%rbp), %rax
xorl %edi, %edi
movl $0x1, %esi
xorl %ecx, %ecx
movl %ecx, %r8d
leaq 0x59d1(%rip), %r9       # 0x909b
leaq 0x59cf(%rip), %rbx      # 0x90a0
leaq 0x59f2(%rip), %r11      # 0x90ca
movq %r8, %rdx
movq %r8, %rcx
movq %rbx, (%rsp)
movl $0x33, 0x8(%rsp)
movq %r11, 0x10(%rsp)
movq %r10, 0x18(%rsp)
movq %rax, 0x20(%rsp)
movb $0x0, %al
callq 0x77b0
jmp 0x375c
movslq -0x24(%rbp), %rcx
leaq 0x9ac3(%rip), %rax      # 0xd1d0
movq (%rax,%rcx,8), %r10
movq -0x48(%rbp), %rax
xorl %edi, %edi
xorl %ecx, %ecx
movl %ecx, %r8d
leaq 0x5978(%rip), %r9       # 0x909b
leaq 0x5976(%rip), %rbx      # 0x90a0
leaq 0x5999(%rip), %r11      # 0x90ca
movq %r8, %rsi
movq %r8, %rdx
movq %r8, %rcx
movq %rbx, (%rsp)
movl $0x33, 0x8(%rsp)
movq %r11, 0x10(%rsp)
movq %r10, 0x18(%rsp)
movq %rax, 0x20(%rsp)
movb $0x0, %al
callq 0x77b0
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x3651
movq 0x9867(%rip), %rax      # 0xcfd8
movq (%rax), %rsi
leaq 0x5958(%rip), %rdi      # 0x90d3
callq 0x31f0
movl $0x0, -0x24(%rbp)
cmpl $0xc, -0x24(%rbp)
jge 0x37bf
movq -0x40(%rbp), %rdi
movslq -0x24(%rbp), %rcx
leaq 0x9a34(%rip), %rax      # 0xd1d0
movq (%rax,%rcx,8), %rsi
movslq -0x24(%rbp), %rcx
leaq 0x9a85(%rip), %rax      # 0xd230
movq (%rax,%rcx,8), %rdx
callq 0x5550
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x3787
movl $0x0, -0x24(%rbp)
cmpl $0xc, -0x24(%rbp)
jge 0x38f0
movq -0x40(%rbp), %rdi
movslq -0x24(%rbp), %rcx
leaq 0x99f1(%rip), %rax      # 0xd1d0
movq (%rax,%rcx,8), %rsi
callq 0x44d0
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x50(%rbp)
je 0x387d
movq -0x50(%rbp), %rdi
movslq -0x24(%rbp), %rcx
leaq 0x9a2a(%rip), %rax      # 0xd230
movq (%rax,%rcx,8), %rsi
callq 0x3378
cmpl $0x0, %eax
jne 0x387d
movslq -0x24(%rbp), %rcx
leaq 0x99b1(%rip), %rax      # 0xd1d0
movq (%rax,%rcx,8), %r10
movslq -0x24(%rbp), %rcx
leaq 0x9a02(%rip), %rax      # 0xd230
movq (%rax,%rcx,8), %rax
xorl %edi, %edi
movl $0x1, %esi
xorl %ecx, %ecx
movl %ecx, %r8d
leaq 0x5856(%rip), %r9       # 0x909b
leaq 0x5854(%rip), %rbx      # 0x90a0
leaq 0x5877(%rip), %r11      # 0x90ca
movq %r8, %rdx
movq %r8, %rcx
movq %rbx, (%rsp)
movl $0x3d, 0x8(%rsp)
movq %r11, 0x10(%rsp)
movq %r10, 0x18(%rsp)
movq %rax, 0x20(%rsp)
movb $0x0, %al
callq 0x77b0
jmp 0x38e2
movslq -0x24(%rbp), %rcx
leaq 0x9948(%rip), %rax      # 0xd1d0
movq (%rax,%rcx,8), %r10
movslq -0x24(%rbp), %rcx
leaq 0x9999(%rip), %rax      # 0xd230
movq (%rax,%rcx,8), %rax
xorl %edi, %edi
xorl %ecx, %ecx
movl %ecx, %r8d
leaq 0x57f2(%rip), %r9       # 0x909b
leaq 0x57f0(%rip), %rbx      # 0x90a0
leaq 0x5813(%rip), %r11      # 0x90ca
movq %r8, %rsi
movq %r8, %rdx
movq %r8, %rcx
movq %rbx, (%rsp)
movl $0x3d, 0x8(%rsp)
movq %r11, 0x10(%rsp)
movq %r10, 0x18(%rsp)
movq %rax, 0x20(%rsp)
movb $0x0, %al
callq 0x77b0
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x37c6
movq -0x40(%rbp), %rdi
callq 0x44b0
cmpl $0xc, %eax
jne 0x394c
movq -0x40(%rbp), %rdi
callq 0x44b0
xorl %edi, %edi
movl $0x1, %esi
xorl %ecx, %ecx
movl %ecx, %r8d
leaq 0x5781(%rip), %r9       # 0x909b
leaq 0x577f(%rip), %r11      # 0x90a0
leaq 0x57dd(%rip), %r10      # 0x9105
movq %r8, %rdx
movq %r8, %rcx
movq %r11, (%rsp)
movl $0x40, 0x8(%rsp)
movq %r10, 0x10(%rsp)
movl %eax, 0x18(%rsp)
movb $0x0, %al
callq 0x77b0
jmp 0x3996
movq -0x40(%rbp), %rdi
callq 0x44b0
xorl %edi, %edi
xorl %ecx, %ecx
movl %ecx, %r8d
leaq 0x5738(%rip), %r9       # 0x909b
leaq 0x5736(%rip), %r11      # 0x90a0
leaq 0x5794(%rip), %r10      # 0x9105
movq %r8, %rsi
movq %r8, %rdx
movq %r8, %rcx
movq %r11, (%rsp)
movl $0x40, 0x8(%rsp)
movq %r10, 0x10(%rsp)
movl %eax, 0x18(%rsp)
movb $0x0, %al
callq 0x77b0
movl $0x0, -0x24(%rbp)
movq -0x40(%rbp), %rdi
callq 0x4500
movq -0x40(%rbp), %rdi
leaq -0x30(%rbp), %rsi
leaq -0x38(%rbp), %rdx
callq 0x4520
cmpl $0x0, %eax
je 0x3ae5
movl $0x0, -0x28(%rbp)
xorl %eax, %eax
cmpl $0xc, -0x28(%rbp)
movb %al, -0x481(%rbp)
jge 0x39f9
movslq -0x28(%rbp), %rcx
leaq 0x97f0(%rip), %rax      # 0xd1d0
movq (%rax,%rcx,8), %rdi
movq -0x30(%rbp), %rsi
callq 0x3378
cmpl $0x0, %eax
setne %al
movb %al, -0x481(%rbp)
movb -0x481(%rbp), %al
testb $0x1, %al
jne 0x3a05
jmp 0x3a12
jmp 0x3a07
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x39c7
cmpl $0xc, -0x28(%rbp)
jge 0x3a88
movq -0x38(%rbp), %rdi
movslq -0x28(%rbp), %rcx
leaq 0x9809(%rip), %rax      # 0xd230
movq (%rax,%rcx,8), %rsi
callq 0x3378
cmpl $0x0, %eax
jne 0x3a88
movq -0x30(%rbp), %r10
movq -0x38(%rbp), %rax
xorl %edi, %edi
movl $0x1, %esi
xorl %ecx, %ecx
movl %ecx, %r8d
leaq 0x564b(%rip), %r9       # 0x909b
leaq 0x5649(%rip), %rbx      # 0x90a0
leaq 0x56b4(%rip), %r11      # 0x9112
movq %r8, %rdx
movq %r8, %rcx
movq %rbx, (%rsp)
movl $0x44, 0x8(%rsp)
movq %r11, 0x10(%rsp)
movq %r10, 0x18(%rsp)
movq %rax, 0x20(%rsp)
movb $0x0, %al
callq 0x77b0
jmp 0x3ad7
movq -0x30(%rbp), %r10
movq -0x38(%rbp), %rax
xorl %edi, %edi
xorl %ecx, %ecx
movl %ecx, %r8d
leaq 0x55fd(%rip), %r9       # 0x909b
leaq 0x55fb(%rip), %rbx      # 0x90a0
leaq 0x5666(%rip), %r11      # 0x9112
movq %r8, %rsi
movq %r8, %rdx
movq %r8, %rcx
movq %rbx, (%rsp)
movl $0x44, 0x8(%rsp)
movq %r11, 0x10(%rsp)
movq %r10, 0x18(%rsp)
movq %rax, 0x20(%rsp)
movb $0x0, %al
callq 0x77b0
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x39a6
cmpl $0xc, -0x24(%rbp)
jne 0x3b33
movl -0x24(%rbp), %eax
xorl %edi, %edi
movl $0x1, %esi
xorl %ecx, %ecx
movl %ecx, %r8d
leaq 0x559a(%rip), %r9       # 0x909b
leaq 0x5598(%rip), %r11      # 0x90a0
leaq 0x5619(%rip), %r10      # 0x9128
movq %r8, %rdx
movq %r8, %rcx
movq %r11, (%rsp)
movl $0x46, 0x8(%rsp)
movq %r10, 0x10(%rsp)
movl %eax, 0x18(%rsp)
movb $0x0, %al
callq 0x77b0
jmp 0x3b77
movl -0x24(%rbp), %eax
xorl %edi, %edi
xorl %ecx, %ecx
movl %ecx, %r8d
leaq 0x5557(%rip), %r9       # 0x909b
leaq 0x5555(%rip), %r11      # 0x90a0
leaq 0x55d6(%rip), %r10      # 0x9128
movq %r8, %rsi
movq %r8, %rdx
movq %r8, %rcx
movq %r11, (%rsp)
movl $0x46, 0x8(%rsp)
movq %r10, 0x10(%rsp)
movl %eax, 0x18(%rsp)
movb $0x0, %al
callq 0x77b0
movq 0x945a(%rip), %rax      # 0xcfd8
movq (%rax), %rsi
leaq 0x55b3(%rip), %rdi      # 0x913b
callq 0x31f0
movq -0x40(%rbp), %rdi
movq 0x9638(%rip), %rsi      # 0xd1d0
callq 0x52d0
movq -0x40(%rbp), %rdi
movq 0x9638(%rip), %rsi      # 0xd1e0
callq 0x52d0
movq -0x40(%rbp), %rdi
movq 0x9630(%rip), %rsi      # 0xd1e8
callq 0x52d0
movq -0x40(%rbp), %rdi
movq 0x9608(%rip), %rsi      # 0xd1d0
callq 0x44d0
cmpq $0x0, %rax
jne 0x3c20
movq 0x95f6(%rip), %rax      # 0xd1d0
xorl %edi, %edi
movl $0x1, %esi
xorl %ecx, %ecx
movl %ecx, %r8d
leaq 0x54ae(%rip), %r9       # 0x909b
leaq 0x54ac(%rip), %r11      # 0x90a0
leaq 0x5551(%rip), %r10      # 0x914c
movq %r8, %rdx
movq %r8, %rcx
movq %r11, (%rsp)
movl $0x4d, 0x8(%rsp)
movq %r10, 0x10(%rsp)
movq %rax, 0x18(%rsp)
movb $0x0, %al
callq 0x77b0
jmp 0x3c69
movq 0x95a9(%rip), %rax      # 0xd1d0
xorl %edi, %edi
xorl %ecx, %ecx
movl %ecx, %r8d
leaq 0x5466(%rip), %r9       # 0x909b
leaq 0x5464(%rip), %r11      # 0x90a0
leaq 0x5509(%rip), %r10      # 0x914c
movq %r8, %rsi
movq %r8, %rdx
movq %r8, %rcx
movq %r11, (%rsp)
movl $0x4d, 0x8(%rsp)
movq %r10, 0x10(%rsp)
movq %rax, 0x18(%rsp)
movb $0x0, %al
callq 0x77b0
movq -0x40(%rbp), %rdi
movq 0x956c(%rip), %rsi      # 0xd1e0
callq 0x44d0
cmpq $0x0, %rax
jne 0x3ccc
movq 0x955a(%rip), %rax      # 0xd1e0
xorl %edi, %edi
movl $0x1, %esi
xorl %ecx, %ecx
movl %ecx, %r8d
leaq 0x5402(%rip), %r9       # 0x909b
leaq 0x5400(%rip), %r11      # 0x90a0
leaq 0x54a5(%rip), %r10      # 0x914c
movq %r8, %rdx
movq %r8, %rcx
movq %r11, (%rsp)
movl $0x4e, 0x8(%rsp)
movq %r10, 0x10(%rsp)
movq %rax, 0x18(%rsp)
movb $0x0, %al
callq 0x77b0
jmp 0x3d15
movq 0x950d(%rip), %rax      # 0xd1e0
xorl %edi, %edi
xorl %ecx, %ecx
movl %ecx, %r8d
leaq 0x53ba(%rip), %r9       # 0x909b
leaq 0x53b8(%rip), %r11      # 0x90a0
leaq 0x545d(%rip), %r10      # 0x914c
movq %r8, %rsi
movq %r8, %rdx
movq %r8, %rcx
movq %r11, (%rsp)
movl $0x4e, 0x8(%rsp)
movq %r10, 0x10(%rsp)
movq %rax, 0x18(%rsp)
movb $0x0, %al
callq 0x77b0
movq -0x40(%rbp), %rdi
movq 0x94c8(%rip), %rsi      # 0xd1e8
callq 0x44d0
cmpq $0x0, %rax
jne 0x3d78
movq 0x94b6(%rip), %rax      # 0xd1e8
xorl %edi, %edi
movl $0x1, %esi
xorl %ecx, %ecx
movl %ecx, %r8d
leaq 0x5356(%rip), %r9       # 0x909b
leaq 0x5354(%rip), %r11      # 0x90a0
leaq 0x53f9(%rip), %r10      # 0x914c
movq %r8, %rdx
movq %r8, %rcx
movq %r11, (%rsp)
movl $0x4f, 0x8(%rsp)
movq %r10, 0x10(%rsp)
movq %rax, 0x18(%rsp)
movb $0x0, %al
callq 0x77b0
jmp 0x3dc1
movq 0x9469(%rip), %rax      # 0xd1e8
xorl %edi, %edi
xorl %ecx, %ecx
movl %ecx, %r8d
leaq 0x530e(%rip), %r9       # 0x909b
leaq 0x530c(%rip), %r11      # 0x90a0
leaq 0x53b1(%rip), %r10      # 0x914c
movq %r8, %rsi
movq %r8, %rdx
movq %r8, %rcx
movq %r11, (%rsp)
movl $0x4f, 0x8(%rsp)
movq %r10, 0x10(%rsp)
movq %rax, 0x18(%rsp)
movb $0x0, %al
callq 0x77b0
movq -0x40(%rbp), %rdi
callq 0x44b0
cmpl $0x9, %eax
jne 0x3e1d
movq -0x40(%rbp), %rdi
callq 0x44b0
xorl %edi, %edi
movl $0x1, %esi
xorl %ecx, %ecx
movl %ecx, %r8d
leaq 0x52b0(%rip), %r9       # 0x909b
leaq 0x52ae(%rip), %r11      # 0x90a0
leaq 0x530c(%rip), %r10      # 0x9105
movq %r8, %rdx
movq %r8, %rcx
movq %r11, (%rsp)
movl $0x50, 0x8(%rsp)
movq %r10, 0x10(%rsp)
movl %eax, 0x18(%rsp)
movb $0x0, %al
callq 0x77b0
jmp 0x3e67
movq -0x40(%rbp), %rdi
callq 0x44b0
xorl %edi, %edi
xorl %ecx, %ecx
movl %ecx, %r8d
leaq 0x5267(%rip), %r9       # 0x909b
leaq 0x5265(%rip), %r11      # 0x90a0
leaq 0x52c3(%rip), %r10      # 0x9105
movq %r8, %rsi
movq %r8, %rdx
movq %r8, %rcx
movq %r11, (%rsp)
movl $0x50, 0x8(%rsp)
movq %r10, 0x10(%rsp)
movl %eax, 0x18(%rsp)
movb $0x0, %al
callq 0x77b0
movl $0x0, -0x24(%rbp)
cmpl $0xc, -0x24(%rbp)
jge 0x3f85
cmpl $0x0, -0x24(%rbp)
je 0x3e8a
cmpl $0x2, -0x24(%rbp)
je 0x3e8a
cmpl $0x3, -0x24(%rbp)
jne 0x3e8f
jmp 0x3f77
movslq -0x24(%rbp), %rcx
leaq 0x9396(%rip), %rax      # 0xd230
movq (%rax,%rcx,8), %rax
movq %rax, -0x490(%rbp)
movq -0x40(%rbp), %rdi
movslq -0x24(%rbp), %rcx
leaq 0x931c(%rip), %rax      # 0xd1d0
movq (%rax,%rcx,8), %rsi
callq 0x44d0
movq -0x490(%rbp), %rdi
movq %rax, %rsi
callq 0x3378
cmpl $0x0, %eax
jne 0x3f26
movslq -0x24(%rbp), %rcx
leaq 0x92f4(%rip), %rax      # 0xd1d0
movq (%rax,%rcx,8), %rax
xorl %edi, %edi
movl $0x1, %esi
xorl %ecx, %ecx
movl %ecx, %r8d
leaq 0x51a8(%rip), %r9       # 0x909b
leaq 0x51a6(%rip), %r11      # 0x90a0
leaq 0x5259(%rip), %r10      # 0x915a
movq %r8, %rdx
movq %r8, %rcx
movq %r11, (%rsp)
movl $0x53, 0x8(%rsp)
movq %r10, 0x10(%rsp)
movq %rax, 0x18(%rsp)
movb $0x0, %al
callq 0x77b0
jmp 0x3f77
movslq -0x24(%rbp), %rcx
leaq 0x929f(%rip), %rax      # 0xd1d0
movq (%rax,%rcx,8), %rax
xorl %edi, %edi
xorl %ecx, %ecx
movl %ecx, %r8d
leaq 0x5158(%rip), %r9       # 0x909b
leaq 0x5156(%rip), %r11      # 0x90a0
leaq 0x5209(%rip), %r10      # 0x915a
movq %r8, %rsi
movq %r8, %rdx
movq %r8, %rcx
movq %r11, (%rsp)
movl $0x53, 0x8(%rsp)
movq %r10, 0x10(%rsp)
movq %rax, 0x18(%rsp)
movb $0x0, %al
callq 0x77b0
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x3e6e
movq -0x40(%rbp), %rdi
callq 0x44b0
cmpl $0x9, %eax
jne 0x3fe1
movq -0x40(%rbp), %rdi
callq 0x44b0
xorl %edi, %edi
movl $0x1, %esi
xorl %ecx, %ecx
movl %ecx, %r8d
leaq 0x50ec(%rip), %r9       # 0x909b
leaq 0x50ea(%rip), %r11      # 0x90a0
leaq 0x51df(%rip), %r10      # 0x919c
movq %r8, %rdx
movq %r8, %rcx
movq %r11, (%rsp)
movl $0x55, 0x8(%rsp)
movq %r10, 0x10(%rsp)
movl %eax, 0x18(%rsp)
movb $0x0, %al
callq 0x77b0
jmp 0x402b
movq -0x40(%rbp), %rdi
callq 0x44b0
xorl %edi, %edi
xorl %ecx, %ecx
movl %ecx, %r8d
leaq 0x50a3(%rip), %r9       # 0x909b
leaq 0x50a1(%rip), %r11      # 0x90a0
leaq 0x5196(%rip), %r10      # 0x919c
movq %r8, %rsi
movq %r8, %rdx
movq %r8, %rcx
movq %r11, (%rsp)
movl $0x55, 0x8(%rsp)
movq %r10, 0x10(%rsp)
movl %eax, 0x18(%rsp)
movb $0x0, %al
callq 0x77b0
movq 0x8fa6(%rip), %rax      # 0xcfd8
movq (%rax), %rsi
leaq 0x512a(%rip), %rdi      # 0x9166
callq 0x31f0
movl $0x0, -0x24(%rbp)
cmpl $0xc, -0x24(%rbp)
jge 0x4071
movq -0x40(%rbp), %rdi
movslq -0x24(%rbp), %rcx
leaq 0x9173(%rip), %rax      # 0xd1d0
movq (%rax,%rcx,8), %rsi
callq 0x52d0
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x4048
movq -0x40(%rbp), %rdi
callq 0x44b0
cmpl $0x0, %eax
jne 0x40cd
movq -0x40(%rbp), %rdi
callq 0x44b0
xorl %edi, %edi
movl $0x1, %esi
xorl %ecx, %ecx
movl %ecx, %r8d
leaq 0x5000(%rip), %r9       # 0x909b
leaq 0x4ffe(%rip), %r11      # 0x90a0
leaq 0x50ed(%rip), %r10      # 0x9196
movq %r8, %rdx
movq %r8, %rcx
movq %r11, (%rsp)
movl $0x5b, 0x8(%rsp)
movq %r10, 0x10(%rsp)
movl %eax, 0x18(%rsp)
movb $0x0, %al
callq 0x77b0
jmp 0x4117
movq -0x40(%rbp), %rdi
callq 0x44b0
xorl %edi, %edi
xorl %ecx, %ecx
movl %ecx, %r8d
leaq 0x4fb7(%rip), %r9       # 0x909b
leaq 0x4fb5(%rip), %r11      # 0x90a0
leaq 0x50a4(%rip), %r10      # 0x9196
movq %r8, %rsi
movq %r8, %rdx
movq %r8, %rcx
movq %r11, (%rsp)
movl $0x5b, 0x8(%rsp)
movq %r10, 0x10(%rsp)
movl %eax, 0x18(%rsp)
movb $0x0, %al
callq 0x77b0
movq -0x40(%rbp), %rdi
callq 0x5320
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, -0x20(%rbp)
cmpq $0x0, 0x8(%rax)
je 0x447d
movl $0x0, -0x444(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rdi
leaq 0x5b03(%rip), %rsi      # 0x9c55
callq 0x3200
movq %rax, -0x450(%rbp)
cmpq $0x0, -0x450(%rbp)
jne 0x4189
movq 0x8e69(%rip), %rax      # 0xcfd8
movq (%rax), %rdi
movq -0x20(%rbp), %rax
movq (%rax), %rdx
leaq 0x5028(%rip), %rsi      # 0x91a8
movb $0x0, %al
callq 0x3280
jmp 0x4120
callq 0x4490
movq %rax, -0x40(%rbp)
leaq -0x440(%rbp), %rdi
movq -0x450(%rbp), %rdx
movl $0x3e7, %esi            # imm = 0x3E7
callq 0x32c0
cmpq $0x0, %rax
je 0x41e9
leaq -0x59(%rbp), %rdi
movl -0x444(%rbp), %edx
movl %edx, %eax
addl $0x1, %eax
movl %eax, -0x444(%rbp)
leaq 0x4efb(%rip), %rsi      # 0x90c7
movb $0x0, %al
callq 0x3050
movq -0x40(%rbp), %rdi
leaq -0x440(%rbp), %rsi
leaq -0x59(%rbp), %rdx
callq 0x5550
jmp 0x4192
movq -0x40(%rbp), %rdi
callq 0x44b0
cmpl -0x444(%rbp), %eax
jne 0x4256
movq -0x40(%rbp), %rdi
callq 0x44b0
movl %eax, %r10d
movl -0x444(%rbp), %eax
xorl %edi, %edi
movl $0x1, %esi
xorl %ecx, %ecx
movl %ecx, %r8d
leaq 0x4e7c(%rip), %r9       # 0x909b
leaq 0x4e7a(%rip), %rbx      # 0x90a0
leaq 0x4f93(%rip), %r11      # 0x91c0
movq %r8, %rdx
movq %r8, %rcx
movq %rbx, (%rsp)
movl $0x70, 0x8(%rsp)
movq %r11, 0x10(%rsp)
movl %r10d, 0x18(%rsp)
movl %eax, 0x20(%rsp)
movb $0x0, %al
callq 0x77b0
jmp 0x42ae
movq -0x40(%rbp), %rdi
callq 0x44b0
movl %eax, %r10d
movl -0x444(%rbp), %eax
xorl %edi, %edi
xorl %ecx, %ecx
movl %ecx, %r8d
leaq 0x4e25(%rip), %r9       # 0x909b
leaq 0x4e23(%rip), %rbx      # 0x90a0
leaq 0x4f3c(%rip), %r11      # 0x91c0
movq %r8, %rsi
movq %r8, %rdx
movq %r8, %rcx
movq %rbx, (%rsp)
movl $0x70, 0x8(%rsp)
movq %r11, 0x10(%rsp)
movl %r10d, 0x18(%rsp)
movl %eax, 0x20(%rsp)
movb $0x0, %al
callq 0x77b0
movq -0x450(%rbp), %rdi
callq 0x3040
movl $0x0, -0x444(%rbp)
movl $0x0, -0x454(%rbp)
leaq -0x440(%rbp), %rdi
movq -0x450(%rbp), %rdx
movl $0x3e7, %esi            # imm = 0x3E7
callq 0x32c0
cmpq $0x0, %rax
je 0x43b7
leaq -0x59(%rbp), %rdi
movl -0x444(%rbp), %edx
movl %edx, %eax
addl $0x1, %eax
movl %eax, -0x444(%rbp)
leaq 0x4dbb(%rip), %rsi      # 0x90c7
movb $0x0, %al
callq 0x3050
movq -0x40(%rbp), %rdi
leaq -0x440(%rbp), %rsi
callq 0x44d0
movq %rax, -0x460(%rbp)
movq -0x460(%rbp), %rdi
leaq -0x59(%rbp), %rsi
callq 0x3378
cmpl $0x0, %eax
jne 0x4350
movl -0x454(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x454(%rbp)
jmp 0x43b2
movq 0x8c81(%rip), %rax      # 0xcfd8
movq (%rax), %rax
movq %rax, -0x498(%rbp)
cmpq $0x0, -0x460(%rbp)
je 0x437b
movq -0x460(%rbp), %rax
movq %rax, -0x4a0(%rbp)
jmp 0x438b
leaq 0x4e82(%rip), %rax      # 0x9204
movq %rax, -0x4a0(%rbp)
jmp 0x438b
movq -0x498(%rbp), %rdi
movq -0x4a0(%rbp), %rdx
leaq -0x59(%rbp), %rcx
leaq -0x440(%rbp), %r8
leaq 0x4e38(%rip), %rsi      # 0x91e3
movb $0x0, %al
callq 0x3280
jmp 0x42ce
movl -0x454(%rbp), %eax
cmpl -0x444(%rbp), %eax
jne 0x441c
movl -0x454(%rbp), %r10d
movl -0x444(%rbp), %eax
xorl %edi, %edi
movl $0x1, %esi
xorl %ecx, %ecx
movl %ecx, %r8d
leaq 0x4cb6(%rip), %r9       # 0x909b
leaq 0x4cb4(%rip), %rbx      # 0x90a0
leaq 0x4e18(%rip), %r11      # 0x920b
movq %r8, %rdx
movq %r8, %rcx
movq %rbx, (%rsp)
movl $0x80, 0x8(%rsp)
movq %r11, 0x10(%rsp)
movl %r10d, 0x18(%rsp)
movl %eax, 0x20(%rsp)
movb $0x0, %al
callq 0x77b0
jmp 0x446f
movl -0x454(%rbp), %r10d
movl -0x444(%rbp), %eax
xorl %edi, %edi
xorl %ecx, %ecx
movl %ecx, %r8d
leaq 0x4c64(%rip), %r9       # 0x909b
leaq 0x4c62(%rip), %rbx      # 0x90a0
leaq 0x4dc6(%rip), %r11      # 0x920b
movq %r8, %rsi
movq %r8, %rdx
movq %r8, %rcx
movq %rbx, (%rsp)
movl $0x80, 0x8(%rsp)
movq %r11, 0x10(%rsp)
movl %r10d, 0x18(%rsp)
movl %eax, 0x20(%rsp)
movb $0x0, %al
callq 0x77b0
movq -0x40(%rbp), %rdi
callq 0x5320
jmp 0x4120
callq 0x87e0
addq $0x4c0, %rsp            # imm = 0x4C0
popq %rbx
popq %r14
popq %rbp
retq
nop