// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/test/hfile.c
// Function: main
int main(void)
{
    static const int size[] = { 1, 13, 403, 999, 30000 };

    char buffer[40000];
    char *original;
    int c, i;
    ssize_t n;
    off_t off;

    reopen("vcf.c", "test/hfile1.tmp");
    while ((c = hgetc(fin)) != EOF) {
        if (hputc(c, fout) == EOF) fail("hputc");
    }
    if (herrno(fin)) { errno = herrno(fin); fail("hgetc"); }

    reopen("test/hfile1.tmp", "test/hfile2.tmp");
    if (hpeek(fin, buffer, 50) < 0) fail("hpeek");
    while ((n = hread(fin, buffer, 17)) > 0) {
        if (hwrite(fout, buffer, n) != n) fail("hwrite");
    }
    if (n < 0) fail("hread");

    reopen("test/hfile2.tmp", "test/hfile3.tmp");
    while ((n = hread(fin, buffer, sizeof buffer)) > 0) {
        if (hwrite(fout, buffer, n) != n) fail("hwrite");
        if (hpeek(fin, buffer, 700) < 0) fail("hpeek");
    }
    if (n < 0) fail("hread");

    reopen("test/hfile3.tmp", "test/hfile4.tmp");
    i = 0;
    off = 0;
    while ((n = hread(fin, buffer, size[i++ % 5])) > 0) {
        off += n;
        buffer[n] = '\0';
        check_offset(fin, off, "pre-peek");
        if (hputs(buffer, fout) == EOF) fail("hputs");
        if ((n = hpeek(fin, buffer, size[(i+3) % 5])) < 0) fail("hpeek");
        check_offset(fin, off, "post-peek");
    }
    if (n < 0) fail("hread");

    reopen("test/hfile4.tmp", "test/hfile5.tmp");
    while (hgets(buffer, 80, fin) != NULL) {
        size_t l = strlen(buffer);
        if (l > 79) fail("hgets read %zu bytes, should be < 80", l);
        if (hwrite(fout, buffer, l) != l) fail("hwrite");
    }
    if (herrno(fin)) fail("hgets");

    reopen("test/hfile5.tmp", "test/hfile6.tmp");
    n = hread(fin, buffer, 200);
    if (n < 0) fail("hread");
    else if (n != 200) fail("hread only got %d", (int)n);
    if (hwrite(fout, buffer, 1000) != 1000) fail("hwrite");
    check_offset(fin, 200, "input/first200");
    check_offset(fout, 1000, "output/first200");

    if (hseek(fin, 800, SEEK_CUR) < 0) fail("hseek/cur");
    check_offset(fin, 1000, "input/seek");
    for (off = 1000; (n = hread(fin, buffer, sizeof buffer)) > 0; off += n)
        if (hwrite(fout, buffer, n) != n) fail("hwrite");
    if (n < 0) fail("hread");
    check_offset(fin, off, "input/eof");
    check_offset(fout, off, "output/eof");

    if (hseek(fin, 200, SEEK_SET) < 0) fail("hseek/set");
    if (hseek(fout, 200, SEEK_SET) < 0) fail("hseek(output)");
    check_offset(fin, 200, "input/backto200");
    check_offset(fout, 200, "output/backto200");
    n = hread(fin, buffer, 800);
    if (n < 0) fail("hread");
    else if (n != 800) fail("hread only got %d", (int)n);
    if (hwrite(fout, buffer, 800) != 800) fail("hwrite");
    check_offset(fin, 1000, "input/wrote800");
    check_offset(fout, 1000, "output/wrote800");

    if (hflush(fout) == EOF) fail("hflush");

    original = slurp("vcf.c");
    for (i = 1; i <= 6; i++) {
        char *text;
        snprintf(buffer, sizeof(buffer), "test/hfile%d.tmp", i);
        text = slurp(buffer);
        if (strcmp(original, text) != 0) {
            fprintf(stderr, "%s differs from vcf.c\n", buffer);
            free(text);
            free(original);
            return EXIT_FAILURE;
        }
        free(text);
    }
    free(original);

    if (hclose(fin) != 0) fail("hclose(input)");
    if (hclose(fout) != 0) fail("hclose(output)");

    fout = hopen("test/hfile_chars.tmp", "w");
    if (fout == NULL) fail("hopen(\"test/hfile_chars.tmp\")");
    for (i = 0; i < 256; i++)
        if (hputc(i, fout) != i) fail("chars: hputc (%d)", i);
    if (hclose(fout) != 0) fail("hclose(test/hfile_chars.tmp)");

    fin = hopen("test/hfile_chars.tmp", "r");
    if (fin == NULL) fail("hopen(\"test/hfile_chars.tmp\") for reading");
    for (i = 0; i < 256; i++)
        if ((c = hgetc(fin)) != i)
            fail("chars: hgetc (%d = 0x%x) returned %d = 0x%x", i, i, c, c);
    if ((c = hgetc(fin)) != EOF) fail("chars: hgetc (EOF) returned %d", c);
    if (hclose(fin) != 0) fail("hclose(test/hfile_chars.tmp) for reading");

    fin = hopen("preload:test/hfile_chars.tmp", "r");
    if (fin == NULL) fail("preloading \"test/hfile_chars.tmp\" for reading");
    for (i = 0; i < 256; i++)
        if ((c = hgetc(fin)) != i)
            fail("preloading chars: hgetc (%d = 0x%x) returned %d = 0x%x", i, i, c, c);
    if ((c = hgetc(fin)) != EOF) fail("preloading chars: hgetc (EOF) returned %d", c);
    if (hclose(fin) != 0) fail("preloading hclose(test/hfile_chars.tmp) for reading");

    char* test_string = strdup("Test string");
    fin = hopen("mem:", "r:", test_string, 12);
    if (fin == NULL) fail("hopen(\"mem:\", \"r:\", ...)");
    if (hread(fin, buffer, 12) != 12)
        fail("hopen('mem:', 'r') failed read");
    if(strcmp(buffer, test_string) != 0)
        fail("hopen('mem:', 'r') missread '%s' != '%s'", buffer, test_string);
    char* internal_buf;
    size_t interval_buf_len;
    if((internal_buf = hfile_mem_get_buffer(fin, &interval_buf_len)) == NULL){
        fail("hopen('mem:', 'r') failed to get internal buffer");
    }
    if (hclose(fin) != 0) fail("hclose mem for reading");

    test_string = strdup("Test string");
    fin = hopen("mem:", "wr:", test_string, 12);
    if (fin == NULL) fail("hopen(\"mem:\", \"w:\", ...)");
    if (hseek(fin, -1, SEEK_END) < 0)
        fail("hopen('mem:', 'wr') failed seek");
    if (hwrite(fin, " extra", 7) != 7)
        fail("hopen('mem:', 'wr') failed write");
    if (hseek(fin, 0, SEEK_SET) < 0)
        fail("hopen('mem:', 'wr') failed seek");
    if (hread(fin, buffer, 18) != 18)
        fail("hopen('mem:', 'wr') failed read");
    if (strcmp(buffer, "Test string extra") != 0)
        fail("hopen('mem:', 'wr') misswrote '%s' != '%s'", buffer, "Test string extra");
    if((internal_buf = hfile_mem_steal_buffer(fin, &interval_buf_len)) == NULL){
        fail("hopen('mem:', 'wr') failed to get internal buffer");
    }
    free(internal_buf);
    if (hclose(fin) != 0) fail("hclose mem for writing");

    fin = hopen("data:,hello, world!%0A", "r");
    if (fin == NULL) fail("hopen(\"data:...\")");
    n = hread(fin, buffer, 300);
    if (n < 0) fail("hread");
    buffer[n] = '\0';
    if (strcmp(buffer, "hello, world!\x0A") != 0) fail("hread result");
    if (hclose(fin) != 0) fail("hclose(\"data:...\")");

    fin = hopen("test/emptyfile", "r");
    if (fin == NULL) fail("hopen(\"test/emptyfile\") for reading");
    if (hread(fin, buffer, 100) != 0) fail("test/emptyfile is non-empty");
    if (hclose(fin) != 0) fail("hclose(\"test/emptyfile\") for reading");

    fin = hopen("data:,", "r");
    if (fin == NULL) fail("hopen(\"data:\") for reading");
    if (hread(fin, buffer, 100) != 0) fail("empty data: URL is non-empty");
    if (hclose(fin) != 0) fail("hclose(\"data:\") for reading");

    fin = hopen("data:;base64,"
// Wikipedia's example quote from Thomas Hobbes' Leviathan
"TWFuIGlzIGRpc3Rpbmd1aXNoZWQsIG5vdCBvbmx5IGJ5IGhpcyByZWFzb24sIGJ1dCBieSB0aGlz"
"IHNpbmd1bGFyIHBhc3Npb24gZnJvbSBvdGhlciBhbmltYWxzLCB3aGljaCBpcyBhIGx1c3Qgb2Yg"
"dGhlIG1pbmQsIHRoYXQgYnkgYSBwZXJzZXZlcmFuY2Ugb2YgZGVsaWdodCBpbiB0aGUgY29udGlu"
"dWVkIGFuZCBpbmRlZmF0aWdhYmxlIGdlbmVyYXRpb24gb2Yga25vd2xlZGdlLCBleGNlZWRzIHRo"
"ZSBzaG9ydCB2ZWhlbWVuY2Ugb2YgYW55IGNhcm5hbCBwbGVhc3VyZS4=", "r");
    if (fin == NULL) fail("hopen(\"data:;base64,...\")");
    n = hread(fin, buffer, 300);
    if (n < 0) fail("hread for base64");
    buffer[n] = '\0';
    if (strcmp(buffer, "Man is distinguished, not only by his reason, but by "
"this singular passion from other animals, which is a lust of the mind, that "
"by a perseverance of delight in the continued and indefatigable generation "
"of knowledge, exceeds the short vehemence of any carnal pleasure.") != 0)
        fail("hread result for base64");
    if (hclose(fin) != 0) fail("hclose(\"data:;base64,...\")");

    kstring_t kstr = { 0, 0, NULL };

    if (strcmp(haddextension(&kstr, "foo/bar.bam", 0, ".bai"),
               "foo/bar.bam.bai") != 0) fail("haddextension foo/bar.bam[.bai]");
    if (strcmp(haddextension(&kstr, "foo/bar.bam", 1, ".bai"),
               "foo/bar.bai") != 0) fail("haddextension foo/bar[.bai]");
    if (strcmp(haddextension(&kstr, "foo.bar/baz", 1, ".bai"),
               "foo.bar/baz.bai") != 0) fail("haddextension foo.bar/baz[.bai]");
    if (strcmp(haddextension(&kstr, "foo#bar.bam", 0, ".bai"),
               "foo#bar.bam.bai") != 0) fail("haddextension foo#bar.bam[.bai]");
    if (strcmp(haddextension(&kstr, ".bam", 1, ".bai"),
               ".bai") != 0) fail("haddextension [.bai]");
    if (strcmp(haddextension(&kstr, "foo", 1, ".csi"),
               "foo.csi") != 0) fail("haddextension foo[.csi]");

    if (strcmp(haddextension(&kstr, "http://host/bar.cram?a&b&c", 0, ".crai"),
               "http://host/bar.cram.crai?a&b&c") != 0)
        fail("haddextension http://host/bar.cram[.crai]?a&b&c");

    if (strcmp(haddextension(&kstr, "http://host/bar.cram#frag", 1, ".crai"),
               "http://host/bar.crai#frag") != 0)
        fail("haddextension http://host/bar[.crai]#frag");

    free(ks_release(&kstr));

    return EXIT_SUCCESS;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x9cc0, %rsp           # imm = 0x9CC0
movl $0x0, -0x4(%rbp)
leaq 0xe1231(%rip), %rdi     # 0xe709a
leaq 0xe1230(%rip), %rsi     # 0xe70a0
callq 0x5d70
movq 0x103e2c(%rip), %rdi    # 0x109ca8
callq 0x7070
movl %eax, -0x9c5c(%rbp)
cmpl $-0x1, %eax
je 0x5eb3
movl -0x9c5c(%rbp), %edi
movq 0x103e17(%rip), %rsi    # 0x109cb0
callq 0x70c0
cmpl $-0x1, %eax
jne 0x5eb1
leaq 0xe1206(%rip), %rdi     # 0xe70b0
movb $0x0, %al
callq 0x5aa0
jmp 0x5e75
movq 0x103dee(%rip), %rdi    # 0x109ca8
callq 0x7120
cmpl $0x0, %eax
je 0x5ef1
movq 0x103ddd(%rip), %rdi    # 0x109ca8
callq 0x7120
movl %eax, -0x9cb4(%rbp)
callq 0x4050
movl -0x9cb4(%rbp), %ecx
movl %ecx, (%rax)
leaq 0xe11cc(%rip), %rdi     # 0xe70b6
movb $0x0, %al
callq 0x5aa0
leaq 0xe11a8(%rip), %rdi     # 0xe70a0
leaq 0xe11bd(%rip), %rsi     # 0xe70bc
callq 0x5d70
movq 0x103d9d(%rip), %rdi    # 0x109ca8
leaq -0x9c50(%rbp), %rsi
movl $0x32, %edx
callq 0x7cc0
cmpq $0x0, %rax
jge 0x5f30
leaq 0xe11a3(%rip), %rdi     # 0xe70cc
movb $0x0, %al
callq 0x5aa0
jmp 0x5f32
movq 0x103d6f(%rip), %rdi    # 0x109ca8
leaq -0x9c50(%rbp), %rsi
movl $0x11, %edx
callq 0x7140
movq %rax, -0x9c68(%rbp)
cmpq $0x0, %rax
jle 0x5f8a
movq 0x103d52(%rip), %rdi    # 0x109cb0
leaq -0x9c50(%rbp), %rsi
movq -0x9c68(%rbp), %rdx
callq 0x71f0
cmpq -0x9c68(%rbp), %rax
je 0x5f88
leaq 0xe1151(%rip), %rdi     # 0xe70d2
movb $0x0, %al
callq 0x5aa0
jmp 0x5f32
cmpq $0x0, -0x9c68(%rbp)
jge 0x5fa2
leaq 0xe7d92(%rip), %rdi     # 0xedd2d
movb $0x0, %al
callq 0x5aa0
leaq 0xe1113(%rip), %rdi     # 0xe70bc
leaq 0xe1129(%rip), %rsi     # 0xe70d9
callq 0x5d70
movq 0x103cec(%rip), %rdi    # 0x109ca8
leaq -0x9c50(%rbp), %rsi
movl $0x9c40, %edx           # imm = 0x9C40
callq 0x7140
movq %rax, -0x9c68(%rbp)
cmpq $0x0, %rax
jle 0x603c
movq 0x103ccf(%rip), %rdi    # 0x109cb0
leaq -0x9c50(%rbp), %rsi
movq -0x9c68(%rbp), %rdx
callq 0x71f0
cmpq -0x9c68(%rbp), %rax
je 0x600b
leaq 0xe10ce(%rip), %rdi     # 0xe70d2
movb $0x0, %al
callq 0x5aa0
movq 0x103c96(%rip), %rdi    # 0x109ca8
leaq -0x9c50(%rbp), %rsi
movl $0x2bc, %edx            # imm = 0x2BC
callq 0x7cc0
cmpq $0x0, %rax
jge 0x6037
leaq 0xe109c(%rip), %rdi     # 0xe70cc
movb $0x0, %al
callq 0x5aa0
jmp 0x5fb5
cmpq $0x0, -0x9c68(%rbp)
jge 0x6054
leaq 0xe7ce0(%rip), %rdi     # 0xedd2d
movb $0x0, %al
callq 0x5aa0
leaq 0xe107e(%rip), %rdi     # 0xe70d9
leaq 0xe1087(%rip), %rsi     # 0xe70e9
callq 0x5d70
movl $0x0, -0x9c60(%rbp)
movq $0x0, -0x9c70(%rbp)
movq 0x103c25(%rip), %rdi    # 0x109ca8
leaq -0x9c50(%rbp), %rsi
movl -0x9c60(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x9c60(%rbp)
movl $0x5, %ecx
cltd
idivl %ecx
movslq %edx, %rcx
leaq 0xe1aa3(%rip), %rax     # 0xe7b50
movslq (%rax,%rcx,4), %rdx
callq 0x7140
movq %rax, -0x9c68(%rbp)
cmpq $0x0, %rax
jle 0x6197
movq -0x9c68(%rbp), %rax
addq -0x9c70(%rbp), %rax
movq %rax, -0x9c70(%rbp)
movq -0x9c68(%rbp), %rax
movb $0x0, -0x9c50(%rbp,%rax)
movq 0x103bb6(%rip), %rdi    # 0x109ca8
movq -0x9c70(%rbp), %rsi
leaq 0xe0ff9(%rip), %rdx     # 0xe70f9
callq 0x5bb0
leaq -0x9c50(%rbp), %rdi
movq 0x103b9d(%rip), %rsi    # 0x109cb0
callq 0x7330
cmpl $-0x1, %eax
jne 0x612b
leaq 0xe0fde(%rip), %rdi     # 0xe7102
movb $0x0, %al
callq 0x5aa0
movq 0x103b76(%rip), %rdi    # 0x109ca8
leaq -0x9c50(%rbp), %rsi
movl -0x9c60(%rbp), %eax
addl $0x3, %eax
movl $0x5, %ecx
cltd
idivl %ecx
movslq %edx, %rcx
leaq 0xe19fc(%rip), %rax     # 0xe7b50
movslq (%rax,%rcx,4), %rdx
callq 0x7cc0
movq %rax, -0x9c68(%rbp)
cmpq $0x0, %rax
jge 0x6178
leaq 0xe0f5b(%rip), %rdi     # 0xe70cc
movb $0x0, %al
callq 0x5aa0
movq 0x103b29(%rip), %rdi    # 0x109ca8
movq -0x9c70(%rbp), %rsi
leaq 0xe0f7b(%rip), %rdx     # 0xe7108
callq 0x5bb0
jmp 0x607c
cmpq $0x0, -0x9c68(%rbp)
jge 0x61af
leaq 0xe7b85(%rip), %rdi     # 0xedd2d
movb $0x0, %al
callq 0x5aa0
leaq 0xe0f33(%rip), %rdi     # 0xe70e9
leaq 0xe0f55(%rip), %rsi     # 0xe7112
callq 0x5d70
leaq -0x9c50(%rbp), %rdi
movq 0x103ad8(%rip), %rdx    # 0x109ca8
movl $0x50, %esi
callq 0x7c10
cmpq $0x0, %rax
je 0x6248
leaq -0x9c50(%rbp), %rdi
callq 0x41a0
movq %rax, -0x9c78(%rbp)
cmpq $0x4f, -0x9c78(%rbp)
jbe 0x6212
movq -0x9c78(%rbp), %rsi
leaq 0xe0f17(%rip), %rdi     # 0xe7122
movb $0x0, %al
callq 0x5aa0
movq 0x103a97(%rip), %rdi    # 0x109cb0
leaq -0x9c50(%rbp), %rsi
movq -0x9c78(%rbp), %rdx
callq 0x71f0
cmpq -0x9c78(%rbp), %rax
je 0x6243
leaq 0xe0e96(%rip), %rdi     # 0xe70d2
movb $0x0, %al
callq 0x5aa0
jmp 0x61c2
movq 0x103a59(%rip), %rdi    # 0x109ca8
callq 0x7120
cmpl $0x0, %eax
je 0x6267
leaq 0xe0ee7(%rip), %rdi     # 0xe7147
movb $0x0, %al
callq 0x5aa0
leaq 0xe0ea4(%rip), %rdi     # 0xe7112
leaq 0xe0ed8(%rip), %rsi     # 0xe714d
callq 0x5d70
movq 0x103a27(%rip), %rdi    # 0x109ca8
leaq -0x9c50(%rbp), %rsi
movl $0xc8, %edx
callq 0x7140
movq %rax, -0x9c68(%rbp)
cmpq $0x0, -0x9c68(%rbp)
jge 0x62b1
leaq 0xe7a83(%rip), %rdi     # 0xedd2d
movb $0x0, %al
callq 0x5aa0
cmpq $0xc8, -0x9c68(%rbp)
je 0x62d5
movq -0x9c68(%rbp), %rax
movl %eax, %esi
leaq 0xe0e8f(%rip), %rdi     # 0xe715d
movb $0x0, %al
callq 0x5aa0
jmp 0x62d7
movq 0x1039d2(%rip), %rdi    # 0x109cb0
leaq -0x9c50(%rbp), %rsi
movl $0x3e8, %edx            # imm = 0x3E8
callq 0x71f0
cmpq $0x3e8, %rax            # imm = 0x3E8
je 0x6305
leaq 0xe0dd4(%rip), %rdi     # 0xe70d2
movb $0x0, %al
callq 0x5aa0
movq 0x10399c(%rip), %rdi    # 0x109ca8
movl $0xc8, %esi
leaq 0xe0e57(%rip), %rdx     # 0xe716f
callq 0x5bb0
movq 0x10398c(%rip), %rdi    # 0x109cb0
movl $0x3e8, %esi            # imm = 0x3E8
leaq 0xe0e4e(%rip), %rdx     # 0xe717e
callq 0x5bb0
movq 0x10396c(%rip), %rdi    # 0x109ca8
movl $0x320, %esi            # imm = 0x320
movl $0x1, %edx
callq 0x82b0
cmpq $0x0, %rax
jge 0x635f
leaq 0xe0e36(%rip), %rdi     # 0xe718e
movb $0x0, %al
callq 0x5aa0
movq 0x103942(%rip), %rdi    # 0x109ca8
movl $0x3e8, %esi            # imm = 0x3E8
leaq 0xe0e26(%rip), %rdx     # 0xe7198
callq 0x5bb0
movq $0x3e8, -0x9c70(%rbp) # imm = 0x3E8
movq 0x10391f(%rip), %rdi    # 0x109ca8
leaq -0x9c50(%rbp), %rsi
movl $0x9c40, %edx           # imm = 0x9C40
callq 0x7140
movq %rax, -0x9c68(%rbp)
cmpq $0x0, %rax
jle 0x63f1
movq 0x103902(%rip), %rdi    # 0x109cb0
leaq -0x9c50(%rbp), %rsi
movq -0x9c68(%rbp), %rdx
callq 0x71f0
cmpq -0x9c68(%rbp), %rax
je 0x63d8
leaq 0xe0d01(%rip), %rdi     # 0xe70d2
movb $0x0, %al
callq 0x5aa0
jmp 0x63da
movq -0x9c68(%rbp), %rax
addq -0x9c70(%rbp), %rax
movq %rax, -0x9c70(%rbp)
jmp 0x6382
cmpq $0x0, -0x9c68(%rbp)
jge 0x6409
leaq 0xe792b(%rip), %rdi     # 0xedd2d
movb $0x0, %al
callq 0x5aa0
movq 0x103898(%rip), %rdi    # 0x109ca8
movq -0x9c70(%rbp), %rsi
leaq 0xe0d85(%rip), %rdx     # 0xe71a3
callq 0x5bb0
movq 0x103886(%rip), %rdi    # 0x109cb0
movq -0x9c70(%rbp), %rsi
leaq 0xe0d75(%rip), %rdx     # 0xe71ad
callq 0x5bb0
movq 0x103864(%rip), %rdi    # 0x109ca8
movl $0xc8, %esi
xorl %edx, %edx
callq 0x82b0
cmpq $0x0, %rax
jge 0x6464
leaq 0xe0d5b(%rip), %rdi     # 0xe71b8
movb $0x0, %al
callq 0x5aa0
movq 0x103845(%rip), %rdi    # 0x109cb0
movl $0xc8, %esi
xorl %edx, %edx
callq 0x82b0
cmpq $0x0, %rax
jge 0x648b
leaq 0xe0d3e(%rip), %rdi     # 0xe71c2
movb $0x0, %al
callq 0x5aa0
movq 0x103816(%rip), %rdi    # 0x109ca8
movl $0xc8, %esi
leaq 0xe0d32(%rip), %rdx     # 0xe71d0
callq 0x5bb0
movq 0x103806(%rip), %rdi    # 0x109cb0
movl $0xc8, %esi
leaq 0xe0d2a(%rip), %rdx     # 0xe71e0
callq 0x5bb0
movq 0x1037e6(%rip), %rdi    # 0x109ca8
leaq -0x9c50(%rbp), %rsi
movl $0x320, %edx            # imm = 0x320
callq 0x7140
movq %rax, -0x9c68(%rbp)
cmpq $0x0, -0x9c68(%rbp)
jge 0x64f2
leaq 0xe7842(%rip), %rdi     # 0xedd2d
movb $0x0, %al
callq 0x5aa0
cmpq $0x320, -0x9c68(%rbp) # imm = 0x320
je 0x6516
movq -0x9c68(%rbp), %rax
movl %eax, %esi
leaq 0xe0c4e(%rip), %rdi     # 0xe715d
movb $0x0, %al
callq 0x5aa0
jmp 0x6518
movq 0x103791(%rip), %rdi    # 0x109cb0
leaq -0x9c50(%rbp), %rsi
movl $0x320, %edx            # imm = 0x320
callq 0x71f0
cmpq $0x320, %rax            # imm = 0x320
je 0x6546
leaq 0xe0b93(%rip), %rdi     # 0xe70d2
movb $0x0, %al
callq 0x5aa0
movq 0x10375b(%rip), %rdi    # 0x109ca8
movl $0x3e8, %esi            # imm = 0x3E8
leaq 0xe0c98(%rip), %rdx     # 0xe71f1
callq 0x5bb0
movq 0x10374b(%rip), %rdi    # 0x109cb0
movl $0x3e8, %esi            # imm = 0x3E8
leaq 0xe0c8f(%rip), %rdx     # 0xe7200
callq 0x5bb0
movq 0x103733(%rip), %rdi    # 0x109cb0
callq 0x7fc0
cmpl $-0x1, %eax
jne 0x6595
leaq 0xe0c82(%rip), %rdi     # 0xe7210
movb $0x0, %al
callq 0x5aa0
leaq 0xe0afe(%rip), %rdi     # 0xe709a
callq 0x5c60
movq %rax, -0x9c58(%rbp)
movl $0x1, -0x9c60(%rbp)
cmpl $0x6, -0x9c60(%rbp)
jg 0x666d
leaq -0x9c50(%rbp), %rdi
movl -0x9c60(%rbp), %ecx
movl $0x9c40, %esi           # imm = 0x9C40
leaq 0xe0c3f(%rip), %rdx     # 0xe7217
movb $0x0, %al
callq 0x47d0
leaq -0x9c50(%rbp), %rdi
callq 0x5c60
movq %rax, -0x9c80(%rbp)
movq -0x9c58(%rbp), %rdi
movq -0x9c80(%rbp), %rsi
callq 0x4680
cmpl $0x0, %eax
je 0x664d
movq 0xfe9cf(%rip), %rax     # 0x104fe0
movq (%rax), %rdi
leaq -0x9c50(%rbp), %rdx
leaq 0xe0c06(%rip), %rsi     # 0xe7228
movb $0x0, %al
callq 0x46c0
movq -0x9c80(%rbp), %rdi
callq 0x4590
movq -0x9c58(%rbp), %rdi
callq 0x4590
movl $0x1, -0x4(%rbp)
jmp 0x7064
movq -0x9c80(%rbp), %rdi
callq 0x4590
movl -0x9c60(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x9c60(%rbp)
jmp 0x65b2
movq -0x9c58(%rbp), %rdi
callq 0x4590
movq 0x103628(%rip), %rdi    # 0x109ca8
callq 0x8530
cmpl $0x0, %eax
je 0x6698
leaq 0xe09e0(%rip), %rdi     # 0xe7071
movb $0x0, %al
callq 0x5aa0
movq 0x103611(%rip), %rdi    # 0x109cb0
callq 0x8530
cmpl $0x0, %eax
je 0x66b7
leaq 0xe09cf(%rip), %rdi     # 0xe707f
movb $0x0, %al
callq 0x5aa0
leaq 0xe0c00(%rip), %rdi     # 0xe72be
leaq 0xe39f7(%rip), %rsi     # 0xea0bc
movb $0x0, %al
callq 0x94c0
movq %rax, 0x1035dd(%rip)    # 0x109cb0
cmpq $0x0, 0x1035d5(%rip)    # 0x109cb0
jne 0x66eb
leaq 0xe0b5b(%rip), %rdi     # 0xe723f
movb $0x0, %al
callq 0x5aa0
movl $0x0, -0x9c60(%rbp)
cmpl $0x100, -0x9c60(%rbp)   # imm = 0x100
jge 0x6742
movl -0x9c60(%rbp), %edi
movq 0x1035a2(%rip), %rsi    # 0x109cb0
callq 0x70c0
cmpl -0x9c60(%rbp), %eax
je 0x672f
movl -0x9c60(%rbp), %esi
leaq 0xe0b35(%rip), %rdi     # 0xe725d
movb $0x0, %al
callq 0x5aa0
jmp 0x6731
movl -0x9c60(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x9c60(%rbp)
jmp 0x66f5
movq 0x103567(%rip), %rdi    # 0x109cb0
callq 0x8530
cmpl $0x0, %eax
je 0x6761
leaq 0xe0b15(%rip), %rdi     # 0xe726f
movb $0x0, %al
callq 0x5aa0
leaq 0xe0b56(%rip), %rdi     # 0xe72be
leaq 0xe4733(%rip), %rsi     # 0xeaea2
movb $0x0, %al
callq 0x94c0
movq %rax, 0x10352b(%rip)    # 0x109ca8
cmpq $0x0, 0x103523(%rip)    # 0x109ca8
jne 0x6795
leaq 0xe0afe(%rip), %rdi     # 0xe728c
movb $0x0, %al
callq 0x5aa0
movl $0x0, -0x9c60(%rbp)
cmpl $0x100, -0x9c60(%rbp)   # imm = 0x100
jge 0x67ff
movq 0x1034f6(%rip), %rdi    # 0x109ca8
callq 0x7070
movl %eax, -0x9c5c(%rbp)
cmpl -0x9c60(%rbp), %eax
je 0x67ec
movl -0x9c60(%rbp), %esi
movl -0x9c60(%rbp), %edx
movl -0x9c5c(%rbp), %ecx
movl -0x9c5c(%rbp), %r8d
leaq 0xe0b27(%rip), %rdi     # 0xe730c
movb $0x0, %al
callq 0x5aa0
jmp 0x67ee
movl -0x9c60(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x9c60(%rbp)
jmp 0x679f
movq 0x1034a2(%rip), %rdi    # 0x109ca8
callq 0x7070
movl %eax, -0x9c5c(%rbp)
cmpl $-0x1, %eax
je 0x682a
movl -0x9c5c(%rbp), %esi
leaq 0xe0b20(%rip), %rdi     # 0xe7343
movb $0x0, %al
callq 0x5aa0
movq 0x103477(%rip), %rdi    # 0x109ca8
callq 0x8530
cmpl $0x0, %eax
je 0x6849
leaq 0xe0b2b(%rip), %rdi     # 0xe736d
movb $0x0, %al
callq 0x5aa0
leaq 0xe0a66(%rip), %rdi     # 0xe72b6
leaq 0xe464b(%rip), %rsi     # 0xeaea2
movb $0x0, %al
callq 0x94c0
movq %rax, 0x103443(%rip)    # 0x109ca8
cmpq $0x0, 0x10343b(%rip)    # 0x109ca8
jne 0x687d
leaq 0xe0a5d(%rip), %rdi     # 0xe72d3
movb $0x0, %al
callq 0x5aa0
movl $0x0, -0x9c60(%rbp)
cmpl $0x100, -0x9c60(%rbp)   # imm = 0x100
jge 0x68e7
movq 0x10340e(%rip), %rdi    # 0x109ca8
callq 0x7070
movl %eax, -0x9c5c(%rbp)
cmpl -0x9c60(%rbp), %eax
je 0x68d4
movl -0x9c60(%rbp), %esi
movl -0x9c60(%rbp), %edx
movl -0x9c5c(%rbp), %ecx
movl -0x9c5c(%rbp), %r8d
leaq 0xe0a34(%rip), %rdi     # 0xe7301
movb $0x0, %al
callq 0x5aa0
jmp 0x68d6
movl -0x9c60(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x9c60(%rbp)
jmp 0x6887
movq 0x1033ba(%rip), %rdi    # 0x109ca8
callq 0x7070
movl %eax, -0x9c5c(%rbp)
cmpl $-0x1, %eax
je 0x6912
movl -0x9c5c(%rbp), %esi
leaq 0xe0a2d(%rip), %rdi     # 0xe7338
movb $0x0, %al
callq 0x5aa0
movq 0x10338f(%rip), %rdi    # 0x109ca8
callq 0x8530
cmpl $0x0, %eax
je 0x6931
leaq 0xe0a38(%rip), %rdi     # 0xe7362
movb $0x0, %al
callq 0x5aa0
leaq 0xe0a5e(%rip), %rdi     # 0xe7396
callq 0x48f0
movq %rax, -0x9c88(%rbp)
movq -0x9c88(%rbp), %rdx
leaq 0xe0a50(%rip), %rdi     # 0xe73a2
leaq 0xe0af8(%rip), %rsi     # 0xe7451
movl $0xc, %ecx
movb $0x0, %al
callq 0x94c0
movq %rax, 0x10333c(%rip)    # 0x109ca8
cmpq $0x0, 0x103334(%rip)    # 0x109ca8
jne 0x6984
leaq 0xe0a2a(%rip), %rdi     # 0xe73a7
movb $0x0, %al
callq 0x5aa0
movq 0x10331d(%rip), %rdi    # 0x109ca8
leaq -0x9c50(%rbp), %rsi
movl $0xc, %edx
callq 0x7140
cmpq $0xc, %rax
je 0x69b0
leaq 0xe0a17(%rip), %rdi     # 0xe73c0
movb $0x0, %al
callq 0x5aa0
leaq -0x9c50(%rbp), %rdi
movq -0x9c88(%rbp), %rsi
callq 0x4680
cmpl $0x0, %eax
je 0x69e4
leaq -0x9c50(%rbp), %rsi
movq -0x9c88(%rbp), %rdx
leaq 0xe0a02(%rip), %rdi     # 0xe73df
movb $0x0, %al
callq 0x5aa0
movq 0x1032bd(%rip), %rdi    # 0x109ca8
leaq -0x9c98(%rbp), %rsi
callq 0x8860
movq %rax, -0x9c90(%rbp)
cmpq $0x0, %rax
jne 0x6a12
leaq 0xe09fd(%rip), %rdi     # 0xe7408
movb $0x0, %al
callq 0x5aa0
movq 0x10328f(%rip), %rdi    # 0x109ca8
callq 0x8530
cmpl $0x0, %eax
je 0x6a31
leaq 0xe0a0f(%rip), %rdi     # 0xe7439
movb $0x0, %al
callq 0x5aa0
leaq 0xe095e(%rip), %rdi     # 0xe7396
callq 0x48f0
movq %rax, -0x9c88(%rbp)
movq -0x9c88(%rbp), %rdx
leaq 0xe0950(%rip), %rdi     # 0xe73a2
leaq 0xe09f7(%rip), %rsi     # 0xe7450
movl $0xc, %ecx
movb $0x0, %al
callq 0x94c0
movq %rax, 0x10323c(%rip)    # 0x109ca8
cmpq $0x0, 0x103234(%rip)    # 0x109ca8
jne 0x6a84
leaq 0xe09d7(%rip), %rdi     # 0xe7454
movb $0x0, %al
callq 0x5aa0
movq 0x10321d(%rip), %rdi    # 0x109ca8
movq $-0x1, %rsi
movl $0x2, %edx
callq 0x82b0
cmpq $0x0, %rax
jge 0x6ab0
leaq 0xe09c4(%rip), %rdi     # 0xe746d
movb $0x0, %al
callq 0x5aa0
movq 0x1031f1(%rip), %rdi    # 0x109ca8
leaq 0xe0a1b(%rip), %rsi     # 0xe74d9
movl $0x7, %edx
callq 0x71f0
cmpq $0x7, %rax
je 0x6adc
leaq 0xe09b8(%rip), %rdi     # 0xe748d
movb $0x0, %al
callq 0x5aa0
movq 0x1031c5(%rip), %rdi    # 0x109ca8
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
callq 0x82b0
cmpq $0x0, %rax
jge 0x6b02
leaq 0xe0972(%rip), %rdi     # 0xe746d
movb $0x0, %al
callq 0x5aa0
movq 0x10319f(%rip), %rdi    # 0x109ca8
leaq -0x9c50(%rbp), %rsi
movl $0x12, %edx
callq 0x7140
cmpq $0x12, %rax
je 0x6b2e
leaq 0xe0987(%rip), %rdi     # 0xe74ae
movb $0x0, %al
callq 0x5aa0
leaq -0x9c50(%rbp), %rdi
leaq 0xe0992(%rip), %rsi     # 0xe74ce
callq 0x4680
cmpl $0x0, %eax
je 0x6b62
leaq -0x9c50(%rbp), %rsi
leaq 0xe098c(%rip), %rdi     # 0xe74e0
leaq 0xe0973(%rip), %rdx     # 0xe74ce
movb $0x0, %al
callq 0x5aa0
movq 0x10313f(%rip), %rdi    # 0x109ca8
leaq -0x9c98(%rbp), %rsi
callq 0x88d0
movq %rax, -0x9c90(%rbp)
cmpq $0x0, %rax
jne 0x6b90
leaq 0xe0982(%rip), %rdi     # 0xe750b
movb $0x0, %al
callq 0x5aa0
movq -0x9c90(%rbp), %rdi
callq 0x4590
movq 0x103105(%rip), %rdi    # 0x109ca8
callq 0x8530
cmpl $0x0, %eax
je 0x6bbb
leaq 0xe0989(%rip), %rdi     # 0xe753d
movb $0x0, %al
callq 0x5aa0
leaq 0xe0992(%rip), %rdi     # 0xe7554
leaq 0xe42d9(%rip), %rsi     # 0xeaea2
movb $0x0, %al
callq 0x94c0
movq %rax, 0x1030d1(%rip)    # 0x109ca8
cmpq $0x0, 0x1030c9(%rip)    # 0x109ca8
jne 0x6bef
leaq 0xe0983(%rip), %rdi     # 0xe756b
movb $0x0, %al
callq 0x5aa0
movq 0x1030b2(%rip), %rdi    # 0x109ca8
leaq -0x9c50(%rbp), %rsi
movl $0x12c, %edx            # imm = 0x12C
callq 0x7140
movq %rax, -0x9c68(%rbp)
cmpq $0x0, -0x9c68(%rbp)
jge 0x6c26
leaq 0xe710e(%rip), %rdi     # 0xedd2d
movb $0x0, %al
callq 0x5aa0
movq -0x9c68(%rbp), %rax
movb $0x0, -0x9c50(%rbp,%rax)
leaq -0x9c50(%rbp), %rdi
leaq 0xe093a(%rip), %rsi     # 0xe757d
callq 0x4680
cmpl $0x0, %eax
je 0x6c5b
leaq 0xe0938(%rip), %rdi     # 0xe758c
movb $0x0, %al
callq 0x5aa0
movq 0x103046(%rip), %rdi    # 0x109ca8
callq 0x8530
cmpl $0x0, %eax
je 0x6c7a
leaq 0xe0926(%rip), %rdi     # 0xe7599
movb $0x0, %al
callq 0x5aa0
leaq 0xe092b(%rip), %rdi     # 0xe75ac
leaq 0xe421a(%rip), %rsi     # 0xeaea2
movb $0x0, %al
callq 0x94c0
movq %rax, 0x103012(%rip)    # 0x109ca8
cmpq $0x0, 0x10300a(%rip)    # 0x109ca8
jne 0x6cae
leaq 0xe0914(%rip), %rdi     # 0xe75bb
movb $0x0, %al
callq 0x5aa0
movq 0x102ff3(%rip), %rdi    # 0x109ca8
leaq -0x9c50(%rbp), %rsi
movl $0x64, %edx
callq 0x7140
cmpq $0x0, %rax
je 0x6cda
leaq 0xe090c(%rip), %rdi     # 0xe75df
movb $0x0, %al
callq 0x5aa0
movq 0x102fc7(%rip), %rdi    # 0x109ca8
callq 0x8530
cmpl $0x0, %eax
je 0x6cf9
leaq 0xe0909(%rip), %rdi     # 0xe75fb
movb $0x0, %al
callq 0x5aa0
leaq 0xe0920(%rip), %rdi     # 0xe7620
leaq 0xe419b(%rip), %rsi     # 0xeaea2
movb $0x0, %al
callq 0x94c0
movq %rax, 0x102f93(%rip)    # 0x109ca8
cmpq $0x0, 0x102f8b(%rip)    # 0x109ca8
jne 0x6d2d
leaq 0xe0901(%rip), %rdi     # 0xe7627
movb $0x0, %al
callq 0x5aa0
movq 0x102f74(%rip), %rdi    # 0x109ca8
leaq -0x9c50(%rbp), %rsi
movl $0x64, %edx
callq 0x7140
cmpq $0x0, %rax
je 0x6d59
leaq 0xe08f0(%rip), %rdi     # 0xe7642
movb $0x0, %al
callq 0x5aa0
movq 0x102f48(%rip), %rdi    # 0x109ca8
callq 0x8530
cmpl $0x0, %eax
je 0x6d78
leaq 0xe08ee(%rip), %rdi     # 0xe765f
movb $0x0, %al
callq 0x5aa0
leaq 0xe08fc(%rip), %rdi     # 0xe767b
leaq 0xe411c(%rip), %rsi     # 0xeaea2
movb $0x0, %al
callq 0x94c0
movq %rax, 0x102f14(%rip)    # 0x109ca8
cmpq $0x0, 0x102f0c(%rip)    # 0x109ca8
jne 0x6dac
leaq 0xe0a4c(%rip), %rdi     # 0xe77f1
movb $0x0, %al
callq 0x5aa0
movq 0x102ef5(%rip), %rdi    # 0x109ca8
leaq -0x9c50(%rbp), %rsi
movl $0x12c, %edx            # imm = 0x12C
callq 0x7140
movq %rax, -0x9c68(%rbp)
cmpq $0x0, -0x9c68(%rbp)
jge 0x6de3
leaq 0xe0a2f(%rip), %rdi     # 0xe780b
movb $0x0, %al
callq 0x5aa0
movq -0x9c68(%rbp), %rax
movb $0x0, -0x9c50(%rbp,%rax)
leaq -0x9c50(%rbp), %rdi
leaq 0xe0a1c(%rip), %rsi     # 0xe781c
callq 0x4680
cmpl $0x0, %eax
je 0x6e18
leaq 0xe0b19(%rip), %rdi     # 0xe792a
movb $0x0, %al
callq 0x5aa0
movq 0x102e89(%rip), %rdi    # 0x109ca8
callq 0x8530
cmpl $0x0, %eax
je 0x6e37
leaq 0xe0b12(%rip), %rdi     # 0xe7942
movb $0x0, %al
callq 0x5aa0
leaq -0x9cb0(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x4240
leaq -0x9cb0(%rbp), %rdi
leaq 0xe0b05(%rip), %rsi     # 0xe795d
xorl %edx, %edx
leaq 0xe0bb3(%rip), %rcx     # 0xe7a14
callq 0x9950
movq %rax, %rdi
leaq 0xe0af9(%rip), %rsi     # 0xe7969
callq 0x4680
cmpl $0x0, %eax
je 0x6e88
leaq 0xe0af8(%rip), %rdi     # 0xe7979
movb $0x0, %al
callq 0x5aa0
leaq -0x9cb0(%rbp), %rdi
leaq 0xe0ac7(%rip), %rsi     # 0xe795d
movl $0x1, %edx
leaq 0xe0b72(%rip), %rcx     # 0xe7a14
callq 0x9950
movq %rax, %rdi
leaq 0xe0ae8(%rip), %rsi     # 0xe7999
callq 0x4680
cmpl $0x0, %eax
je 0x6ec9
leaq 0xe0ae3(%rip), %rdi     # 0xe79a5
movb $0x0, %al
callq 0x5aa0
leaq -0x9cb0(%rbp), %rdi
leaq 0xe0aea(%rip), %rsi     # 0xe79c1
movl $0x1, %edx
leaq 0xe0b31(%rip), %rcx     # 0xe7a14
callq 0x9950
movq %rax, %rdi
leaq 0xe0adb(%rip), %rsi     # 0xe79cd
callq 0x4680
cmpl $0x0, %eax
je 0x6f0a
leaq 0xe0ada(%rip), %rdi     # 0xe79dd
movb $0x0, %al
callq 0x5aa0
leaq -0x9cb0(%rbp), %rdi
leaq 0xe0ae5(%rip), %rsi     # 0xe79fd
xorl %edx, %edx
leaq 0xe0af3(%rip), %rcx     # 0xe7a14
callq 0x9950
movq %rax, %rdi
leaq 0xe0ad9(%rip), %rsi     # 0xe7a09
callq 0x4680
cmpl $0x0, %eax
je 0x6f48
leaq 0xe0ad8(%rip), %rdi     # 0xe7a19
movb $0x0, %al
callq 0x5aa0
leaq -0x9cb0(%rbp), %rdi
leaq 0xe0aae(%rip), %rsi     # 0xe7a04
movl $0x1, %edx
leaq 0xe0ab2(%rip), %rcx     # 0xe7a14
callq 0x9950
movq %rax, %rdi
leaq 0xe0aa3(%rip), %rsi     # 0xe7a14
callq 0x4680
cmpl $0x0, %eax
je 0x6f89
leaq 0xe0ab7(%rip), %rdi     # 0xe7a39
movb $0x0, %al
callq 0x5aa0
leaq -0x9cb0(%rbp), %rdi
leaq 0xe0ab7(%rip), %rsi     # 0xe7a4e
movl $0x1, %edx
leaq 0xe0ab2(%rip), %rcx     # 0xe7a55
callq 0x9950
movq %rax, %rdi
leaq 0xe0aa0(%rip), %rsi     # 0xe7a52
callq 0x4680
cmpl $0x0, %eax
je 0x6fca
leaq 0xe0a97(%rip), %rdi     # 0xe7a5a
movb $0x0, %al
callq 0x5aa0
leaq -0x9cb0(%rbp), %rdi
leaq 0xe0a9a(%rip), %rsi     # 0xe7a72
xorl %edx, %edx
leaq 0xe0aac(%rip), %rcx     # 0xe7a8d
callq 0x9950
movq %rax, %rdi
leaq 0xe0aa3(%rip), %rsi     # 0xe7a93
callq 0x4680
cmpl $0x0, %eax
je 0x7008
leaq 0xe0ab2(%rip), %rdi     # 0xe7ab3
movb $0x0, %al
callq 0x5aa0
leaq -0x9cb0(%rbp), %rdi
leaq 0xe0acd(%rip), %rsi     # 0xe7ae3
movl $0x1, %edx
leaq 0xe0a6b(%rip), %rcx     # 0xe7a8d
callq 0x9950
movq %rax, %rdi
leaq 0xe0acc(%rip), %rsi     # 0xe7afd
callq 0x4680
cmpl $0x0, %eax
je 0x7049
leaq 0xe0ad5(%rip), %rdi     # 0xe7b17
movb $0x0, %al
callq 0x5aa0
leaq -0x9cb0(%rbp), %rdi
callq 0x73d0
movq %rax, %rdi
callq 0x4590
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x9cc0, %rsp           # imm = 0x9CC0
popq %rbp
retq