// File: /workspace/github_cpp_makefile_star2_O3/ctSkennerton[P]fxtract/util/msutil_t.c
// Function: main
int
main(void)
{
    char        buf[99];
    plan_tests(31);

    MEMREF  mr = fileref(__FILE__);
    ok(!nilref(mr), "fileref("__FILE__")");
    ok(!memcmp(mr.ptr, "// Copyright", 12), "readable");
    ok(!memcmp(mr.ptr + mr.len - 7, "\n//EOF\n", 7), "to the end");
    defileref(mr);  // coverage

    FILE *fp = popenf("r", "echo hello");
    ok(fp, "popenf works");
    ok(fgets(buf, 99, fp) && !strcmp(buf, "hello\n"), "popenf cmd works");
    ok(!systemf("PS4='# '; set -x; echo '# %d'", 666), "systemf works");
    int     act;
#undef TRY
#define TRY(x,exp) act=fls(x); if (!ok(act==exp, "fls(0x%X) = %d", x,exp)) fprintf(stderr, "# returned: %d\n", act)
    TRY( 0,  0);
    TRY( 1,  1);
    TRY(64,  7);
    TRY(66,  7);
    TRY(-1, 32);

    ok(!strcmp(getprogname(), "msutil_t"), "getprogname");

#undef TRY
#define TRY(x,exp) ok(!strcmp(strim(strcpy(buf,x)), exp), "strim('%s')", x)
    TRY("", "");
    TRY(" \t  \n  \r", "");
    TRY("abc", "abc");
    TRY(" abc", "abc");
    TRY(" abc  ", "abc");
    TRY("a b c", "a b c");

//TODO:
// addr_part(MEMREF r)
// belch(char const *filename, MEMREF data)
// bit_count(char const*vec, int len)
#if 0
    char    data[49] = {
        15,  0,  2,  0,  6,  0,  2,  0, 15,  0,  2,  0,  6,  0,  2,  0,
        15,  0,  2,  0,  6,  0,  2,  0, 15,  0,  2,  0,  6,  0,  2,  0,
        15,  0,  2,  0,  6,  0,  2,  0, 15,  0,  2,  0,  6,  0,  2,  0, 15
    };
    int     iact = bit_count(data, 49);
    ok(iact == 52, "bit_count is %d", iact);
    
    MEMBUF      mb = NILBUF;
    bufcat(&mb, strref("hello,"));
    bufcat(&mb, strref(" world"));
    ok(!refcmp(bufref(mb), strref("hello, world")), "bufcat works");
    ok(0 < refcmp(bufref(mb), strref("hello")), "refcmp works");
    char        *cp = refdup(bufref(mb));
    ok(!strcmp(cp, "hello, world"), "refdup works");
    buffree(mb);
// die(char const *fmt, ...)
// findbit_1
    int i, off, succ = 0;
    for (off = 0; off < 16; ++off) {
        for (i = 0; i < 256; i++) {
            uint8_t ff[50] = {};
            ff[off + (i >> 3)] = 1 << (i & 7);
            iact = findbit_1(ff + off, off + (i >> 3) + 2);
            if (iact == i) ++succ;
            else fprintf(stderr, "%3d %3d %3d\n", off, i, iact);
        }
    }
    ok(succ == 4096, "%d/4096 findbit_1 tests passed", succ);
#endif
// fopenf(char const *mode, char const *fmt, ...)
// memfind(char const *tgt, int tgtlen, char const *pat, int patlen)

    MEMREF  x[] = { strref("middle"), strref("head"), strref("tail") };
    qsort(x, 3, sizeof(MEMREF), (qsort_cmp)refpcmp);
    ok(refcmp(x[0], x[1]) < 0 && refcmp(x[1], x[2]) < 0, "refpcmp works");

// vec_new(int width, DTOR *dtor, void *context)
// vec_push(VEC* v, void *elem)
// vec_allow(VEC* v, int limit)
// vec_resize(VEC* v, int limit)
// vec_free(VEC* v)

    char    *cs = acstr("one\2\t\377\0'two\0\0\0", 14);
    ok(!strcmp(cs,  "\"one\\x02\\t\\xFF\\x00'two\""), "acstr formats buffer as %s", cs);

    uint32_t    a32 = revbit32(0x2357BD0F);
    ok(a32 == 0xF0BDEAC4, "rev(2357BD0F) = %8X", a32);

    uint64_t    a64 = revbit64(0xC23456789AB10DEFULL);
    ok(a64 == 0xF7B08D591E6A2C43ULL, "rev(C23456789AB10DEF) = %16llX", a64);

    YMD     ymd, exp;
    exp = (YMD) { 2004,02,29 };
    unsigned day = ymd2day(exp);
    ymd = day2ymd(day);
    ok(!memcmp(&ymd, &exp, sizeof(YMD)), "%d/%02d/%02d", exp.yyyy, exp.mm, exp.dd);

    exp = (YMD) { 2004,03,01 };
    ymd = day2ymd(day+1);
    ok(!memcmp(&ymd, &exp, sizeof(YMD)), "+ 1 = %d/%02d/%02d", exp.yyyy, exp.mm, exp.dd);

    exp = (YMD) { 2000,12,31 };
    ymd = day2ymd(ymd2day((YMD){2001,1,1}) - 1);
    ok(!memcmp(&ymd, &exp, sizeof(YMD)), "%d/%02d/%02d", exp.yyyy, exp.mm, exp.dd);

    exp = (YMD) { 2005,03,01 };
    ymd = day2ymd(ymd2day((YMD){2005,02,29}));
    ok(!memcmp(&ymd, &exp, sizeof(YMD)), "2005/02/29 => %d/%02d/%02d", exp.yyyy, exp.mm, exp.dd);

    return exit_status();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movl $0x1f, %edi
callq 0x5a52
leaq 0x2ad6(%rip), %rbx      # 0x6004
movq %rbx, %rdi
callq 0x448e
movq %rax, %r15
movq %rdx, %r12
xorl %esi, %esi
movq %rdx, %rax
orq %r15, %rax
setne %sil
subq $0x8, %rsp
leaq 0x2ac1(%rip), %r10      # 0x6014
leaq 0x2ab5(%rip), %r14      # 0x600f
xorl %edi, %edi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %r14, %r9
xorl %eax, %eax
pushq %r10
pushq $0x20
pushq %rbx
callq 0x516c
addq $0x20, %rsp
movabsq $0x7279706f43202f2f, %rax # imm = 0x7279706F43202F2F
xorq (%r15), %rax
movl 0x8(%r15), %ecx
xorq $0x74686769, %rcx       # imm = 0x74686769
xorl %esi, %esi
orq %rax, %rcx
sete %sil
subq $0x8, %rsp
leaq 0x2a93(%rip), %r10      # 0x6035
xorl %edi, %edi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %r14, %r9
xorl %eax, %eax
pushq %r10
pushq $0x21
pushq %rbx
callq 0x516c
addq $0x20, %rsp
movl $0x452f2f0a, %eax       # imm = 0x452F2F0A
xorl -0x7(%r15,%r12), %eax
movl $0xa464f45, %ecx        # imm = 0xA464F45
xorl -0x4(%r15,%r12), %ecx
xorl %esi, %esi
orl %eax, %ecx
sete %sil
subq $0x8, %rsp
leaq 0x2a61(%rip), %r10      # 0x6046
xorl %edi, %edi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %r14, %r9
xorl %eax, %eax
pushq %r10
pushq $0x22
pushq %rbx
callq 0x516c
addq $0x20, %rsp
movq %r15, %rdi
movq %r12, %rsi
callq 0x4d70
leaq 0x36e2(%rip), %rdi      # 0x6cf5
leaq 0x2a37(%rip), %rsi      # 0x6051
xorl %eax, %eax
callq 0x4ae1
movq %rax, %r15
xorl %esi, %esi
testq %rax, %rax
setne %sil
subq $0x8, %rsp
leaq 0x2a24(%rip), %r10      # 0x605c
xorl %edi, %edi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %r14, %r9
xorl %eax, %eax
pushq %r10
pushq $0x26
pushq %rbx
callq 0x516c
addq $0x20, %rsp
leaq 0x50(%rsp), %rdi
movl $0x63, %esi
movq %r15, %rdx
callq 0x32a0
testq %rax, %rax
je 0x3681
movl $0x6c6c6568, %eax       # imm = 0x6C6C6568
xorl 0x50(%rsp), %eax
movl $0xa6f6c, %ecx          # imm = 0xA6F6C
xorl 0x53(%rsp), %ecx
orl %eax, %ecx
je 0x3685
xorl %esi, %esi
jmp 0x368a
movl $0x1, %esi
subq $0x8, %rsp
leaq 0x29db(%rip), %r10      # 0x6070
leaq 0x2973(%rip), %r14      # 0x600f
xorl %r12d, %r12d
xorl %edi, %edi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %r14, %r9
xorl %eax, %eax
pushq %r10
pushq $0x27
pushq %rbx
callq 0x516c
addq $0x20, %rsp
leaq 0x29bf(%rip), %rdi      # 0x6081
movl $0x29a, %esi            # imm = 0x29A
xorl %eax, %eax
callq 0x4f4a
xorl %esi, %esi
testl %eax, %eax
sete %sil
subq $0x8, %rsp
leaq 0x29be(%rip), %r10      # 0x609f
xorl %edi, %edi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %r14, %r9
xorl %eax, %eax
pushq %r10
pushq $0x28
pushq %rbx
callq 0x516c
addq $0x18, %rsp
leaq 0x29a9(%rip), %r15      # 0x60ad
movl $0x1, %esi
xorl %edi, %edi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %r14, %r9
xorl %eax, %eax
pushq %r12
pushq %r12
pushq %r15
pushq $0x2c
pushq %rbx
callq 0x516c
addq $0x30, %rsp
testl %eax, %eax
je 0x3e04
movl $0x1, %r10d
movl $0x1, %eax
bsrl %eax, %eax
movl %eax, %ebp
subq $0x8, %rsp
testl %eax, %eax
je 0x3756
leaq 0x28bf(%rip), %r9       # 0x600f
xorl %edi, %edi
xorl %esi, %esi
jmp 0x3764
leaq 0x28b2(%rip), %r9       # 0x600f
movl $0x1, %esi
xorl %edi, %edi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
pushq %r10
pushq %r10
pushq %r15
pushq $0x2d
pushq %rbx
callq 0x516c
addq $0x30, %rsp
testl %eax, %eax
je 0x3e0e
movl $0x40, %eax
bsrl %eax, %eax
movl %eax, %ebp
incl %ebp
subq $0x8, %rsp
cmpl $0x7, %ebp
jne 0x37ac
leaq 0x286c(%rip), %r9       # 0x600f
movl $0x1, %esi
xorl %edi, %edi
jmp 0x37b7
leaq 0x285c(%rip), %r9       # 0x600f
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
pushq $0x7
pushq $0x40
pushq %r15
pushq $0x2e
pushq %rbx
callq 0x516c
addq $0x30, %rsp
testl %eax, %eax
je 0x3e2f
movl $0x42, %eax
bsrl %eax, %eax
movl %eax, %ebp
incl %ebp
subq $0x8, %rsp
cmpl $0x7, %ebp
jne 0x37ff
leaq 0x2819(%rip), %r9       # 0x600f
movl $0x1, %esi
xorl %edi, %edi
jmp 0x380a
leaq 0x2809(%rip), %r9       # 0x600f
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
pushq $0x7
pushq $0x42
pushq %r15
pushq $0x2f
pushq %rbx
callq 0x516c
addq $0x30, %rsp
testl %eax, %eax
je 0x3e4e
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
bsrl %eax, %eax
movl %eax, %ebp
incl %ebp
subq $0x8, %rsp
cmpl $0x20, %ebp
jne 0x3852
leaq 0x27c6(%rip), %r9       # 0x600f
movl $0x1, %esi
xorl %edi, %edi
jmp 0x385d
leaq 0x27b6(%rip), %r9       # 0x600f
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
pushq $0x20
pushq $-0x1
pushq %r15
pushq $0x30
pushq %rbx
callq 0x516c
addq $0x30, %rsp
testl %eax, %eax
je 0x3e6d
callq 0x485a
leaq 0x2840(%rip), %rsi      # 0x60cc
movq %rax, %rdi
callq 0x3250
xorl %esi, %esi
testl %eax, %eax
sete %sil
subq $0x8, %rsp
leaq 0x282e(%rip), %r10      # 0x60d5
leaq 0x2761(%rip), %r14      # 0x600f
xorl %ebp, %ebp
xorl %edi, %edi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %r14, %r9
xorl %eax, %eax
pushq %r10
pushq $0x32
pushq %rbx
callq 0x516c
addq $0x20, %rsp
leaq 0x50(%rsp), %r15
movb %bpl, (%r15)
movq %r15, %rdi
callq 0x4ef5
xorl %esi, %esi
cmpb %bpl, (%rax)
sete %sil
leaq 0x31d2(%rip), %r10      # 0x6abe
leaq 0x27ee(%rip), %r13      # 0x60e1
xorl %edi, %edi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %r14, %r9
xorl %eax, %eax
pushq %r10
pushq %r13
pushq $0x36
pushq %rbx
callq 0x516c
addq $0x20, %rsp
movabsq $0xd20200a20200920, %rax # imm = 0xD20200A20200920
movq %rax, (%r15)
movb %bpl, 0x8(%r15)
leaq 0x27c4(%rip), %rbx      # 0x60ed
movq %r15, %rdi
callq 0x4ef5
xorl %esi, %esi
cmpb %bpl, (%rax)
sete %sil
xorl %edi, %edi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %r14, %r9
xorl %eax, %eax
pushq %rbx
pushq %r13
pushq $0x37
leaq 0x26b0(%rip), %r10      # 0x6004
pushq %r10
callq 0x516c
addq $0x20, %rsp
movl $0x636261, (%r15)       # imm = 0x636261
movq %r15, %rdi
callq 0x4ef5
leaq 0x2782(%rip), %r12      # 0x60f7
movq %rax, %rdi
movq %r12, %rsi
callq 0x3250
xorl %esi, %esi
testl %eax, %eax
sete %sil
xorl %edi, %edi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %r14, %r9
xorl %eax, %eax
pushq %r12
pushq %r13
pushq $0x38
leaq 0x2661(%rip), %r10      # 0x6004
pushq %r10
callq 0x516c
addq $0x20, %rsp
movl $0x63626120, %ebx       # imm = 0x63626120
movl %ebx, (%r15)
movb %bpl, 0x4(%r15)
leaq 0x2735(%rip), %rbp      # 0x60f6
movq %r15, %rdi
callq 0x4ef5
movq %rax, %rdi
movq %r12, %rsi
callq 0x3250
xorl %esi, %esi
testl %eax, %eax
sete %sil
xorl %edi, %edi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %r14, %r9
xorl %eax, %eax
pushq %rbp
pushq %r13
pushq $0x39
leaq 0x260e(%rip), %r10      # 0x6004
pushq %r10
callq 0x516c
addq $0x20, %rsp
movl %ebx, (%r15)
movl $0x202063, 0x3(%r15)    # imm = 0x202063
leaq 0x26e8(%rip), %rbx      # 0x60fb
movq %r15, %rdi
callq 0x4ef5
movq %rax, %rdi
movq %r12, %rsi
callq 0x3250
xorl %esi, %esi
testl %eax, %eax
sete %sil
xorl %edi, %edi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %r14, %r9
xorl %eax, %eax
pushq %rbx
leaq 0x25c0(%rip), %rbx      # 0x6004
pushq %r13
pushq $0x3a
pushq %rbx
callq 0x516c
addq $0x20, %rsp
movl $0x20622061, (%r15)     # imm = 0x20622061
movw $0x63, 0x4(%r15)
leaq 0x269b(%rip), %r12      # 0x6102
movq %r15, %rdi
callq 0x4ef5
movq %rax, %rdi
movq %r12, %rsi
callq 0x3250
xorl %esi, %esi
testl %eax, %eax
sete %sil
xorl %edi, %edi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %r14, %r9
xorl %eax, %eax
pushq %r12
pushq %r13
pushq $0x3b
pushq %rbx
callq 0x516c
addq $0x20, %rsp
leaq 0x2661(%rip), %rax      # 0x6108
leaq 0x20(%rsp), %r14
movq %rax, (%r14)
movq $0x6, 0x8(%r14)
leaq 0x2651(%rip), %rax      # 0x610f
movq %rax, 0x10(%r14)
movl $0x4, %eax
movq %rax, 0x18(%r14)
leaq 0x2642(%rip), %rcx      # 0x6114
movq %rcx, 0x20(%r14)
movq %rax, 0x28(%r14)
leaq 0x1137(%rip), %rcx      # 0x4c18
movl $0x3, %esi
movl $0x10, %edx
movq %r14, %rdi
callq 0x3320
movq (%r14), %rdi
movq 0x8(%r14), %rsi
movq 0x10(%r14), %rdx
movq 0x18(%r14), %rcx
callq 0x4b94
testl %eax, %eax
jns 0x3b2c
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rsi
movq 0x40(%rsp), %rdx
movq 0x48(%rsp), %rcx
callq 0x4b94
testl %eax, %eax
js 0x3dfa
xorl %esi, %esi
subq $0x8, %rsp
leaq 0x25e0(%rip), %r10      # 0x6119
leaq 0x24cf(%rip), %r14      # 0x600f
xorl %edi, %edi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %r14, %r9
xorl %eax, %eax
pushq %r10
pushq $0x65
pushq %rbx
callq 0x516c
addq $0x20, %rsp
leaq 0x2658(%rip), %rdi      # 0x61bb
movl $0xe, %esi
callq 0x3e8c
movq %rax, %r15
leaq 0x25b0(%rip), %rsi      # 0x6127
movq %rax, %rdi
callq 0x3250
xorl %esi, %esi
testl %eax, %eax
sete %sil
leaq 0x25b1(%rip), %r10      # 0x613f
xorl %edi, %edi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %r14, %r9
xorl %eax, %eax
pushq %r15
pushq %r10
pushq $0x6e
pushq %rbx
callq 0x516c
addq $0x20, %rsp
leaq 0x25a7(%rip), %r10      # 0x615a
movl $0x1, %esi
xorl %edi, %edi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %r14, %r9
xorl %eax, %eax
pushq $-0xf42153c             # imm = 0xF0BDEAC4
pushq %r10
pushq $0x71
pushq %rbx
callq 0x516c
addq $0x20, %rsp
movabsq $-0x84f72a6e195d3bd, %r10 # imm = 0xF7B08D591E6A2C43
leaq 0x2584(%rip), %r11      # 0x616e
movl $0x1, %esi
xorl %edi, %edi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %r14, %r9
xorl %eax, %eax
pushq %r10
pushq %r11
pushq $0x74
pushq %rbx
callq 0x516c
addq $0x20, %rsp
movabsq $0x2000007d4, %rdi      # imm = 0x2000007D4
movq %rdi, (%rsp)
movq %rbx, %r13
movl $0x1d, %ebx
movl %ebx, 0x8(%rsp)
movl $0x1d, %esi
callq 0x502c
movl %eax, %ebp
movl %eax, %edi
callq 0x50af
movq %rax, 0x10(%rsp)
movl %edx, 0x18(%rsp)
xorq (%rsp), %rax
xorl 0x8(%rsp), %edx
xorl %esi, %esi
orq %rax, %rdx
sete %sil
movl $0x7d4, %r12d           # imm = 0x7D4
leaq 0x2532(%rip), %r10      # 0x6193
xorl %edi, %edi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %r14, %r9
xorl %eax, %eax
pushq %rbx
pushq $0x2
pushq %r12
pushq %r10
pushq $0x7a
pushq %r13
callq 0x516c
addq $0x30, %rsp
movabsq $0x3000007d4, %rax      # imm = 0x3000007D4
movq %rax, (%rsp)
movl $0x1, %r15d
movl %r15d, 0x8(%rsp)
incl %ebp
movl %ebp, %edi
callq 0x50af
movq %rax, 0x10(%rsp)
movl %edx, 0x18(%rsp)
xorq (%rsp), %rax
xorl 0x8(%rsp), %edx
xorl %esi, %esi
orq %rax, %rdx
sete %sil
movl $0x3, %ebx
leaq 0x24c2(%rip), %r10      # 0x618d
xorl %edi, %edi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %r14, %r9
xorl %eax, %eax
pushq %r15
pushq %rbx
pushq %r12
pushq %r10
pushq $0x7e
pushq %r13
callq 0x516c
addq $0x30, %rsp
movabsq $0xc000007d0, %rax      # imm = 0xC000007D0
movq %rax, (%rsp)
movl $0x1f, %r12d
movl %r12d, 0x8(%rsp)
movabsq $0x1000007d1, %rdi      # imm = 0x1000007D1
movl $0x1, %esi
callq 0x502c
leal -0x1(%rax), %edi
callq 0x50af
movq %rax, 0x10(%rsp)
movl %edx, 0x18(%rsp)
xorq (%rsp), %rax
xorl 0x8(%rsp), %edx
xorl %esi, %esi
orq %rax, %rdx
sete %sil
xorl %edi, %edi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %r14, %r9
xorl %eax, %eax
pushq %r12
pushq $0xc
pushq $0x7d0                  # imm = 0x7D0
leaq 0x2439(%rip), %r10      # 0x6193
pushq %r10
pushq $0x82
pushq %r13
callq 0x516c
addq $0x30, %rsp
movabsq $0x3000007d5, %rax      # imm = 0x3000007D5
movq %rax, (%rsp)
movl %r15d, 0x8(%rsp)
movabsq $0x2000007d5, %rdi      # imm = 0x2000007D5
movl $0x1d, %esi
callq 0x502c
movl %eax, %edi
callq 0x50af
movq %rax, 0x10(%rsp)
movl %edx, 0x18(%rsp)
xorq (%rsp), %rax
xorl 0x8(%rsp), %edx
xorl %esi, %esi
orq %rax, %rdx
sete %sil
leaq 0x23e5(%rip), %r10      # 0x61a0
xorl %edi, %edi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %r14, %r9
xorl %eax, %eax
pushq %r15
pushq %rbx
pushq $0x7d5                  # imm = 0x7D5
pushq %r10
pushq $0x86
pushq %r13
callq 0x516c
addq $0x30, %rsp
callq 0x5cf4
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x1, %esi
jmp 0x3b2e
callq 0x3370
jmp 0x3731
incl %ebp
movq 0x51c9(%rip), %rax      # 0x8fe0
movq (%rax), %rdi
leaq 0x229b(%rip), %rsi      # 0x60bc
movl %ebp, %edx
xorl %eax, %eax
callq 0x3270
jmp 0x3787
movq 0x51aa(%rip), %rax      # 0x8fe0
movq (%rax), %rdi
leaq 0x227c(%rip), %rsi      # 0x60bc
movl %ebp, %edx
xorl %eax, %eax
callq 0x3270
jmp 0x37da
movq 0x518b(%rip), %rax      # 0x8fe0
movq (%rax), %rdi
leaq 0x225d(%rip), %rsi      # 0x60bc
movl %ebp, %edx
xorl %eax, %eax
callq 0x3270
jmp 0x382d
movq 0x516c(%rip), %rax      # 0x8fe0
movq (%rax), %rdi
leaq 0x223e(%rip), %rsi      # 0x60bc
movl %ebp, %edx
xorl %eax, %eax
callq 0x3270
jmp 0x3880