// File: oknenavin[P]cxon/test/src/cbor/cbor.node-main.cxx
// Function: main
int main(int argc, char *argv[]) {
    if (argc == 1) {
#       ifndef CXON_TIME_ONLY
            return test::kind::self();
#       else
            return -1;
#       endif
    }

    test::config cf;
    std::map<std::string, test::fixture::vector> sets;

    if (argc > 1) {
        if (auto is = std::ifstream(argv[1])) {
            auto const str = std::string(std::istreambuf_iterator<char>(is), std::istreambuf_iterator<char>());
            auto const fbr = cxon::from_bytes<cxon::CXCF<>>(cf, str);
            if (!fbr) {
                std::fprintf(stderr, "%s\n", test::format_error(fbr, std::begin(str)).c_str());
                std::fprintf(stderr, "usage: cxon-cbor-node <tests>.cf <label>*\n");
                return -1;
            }
        }
        else {
            std::fprintf(stderr, "\"%s\": cannot be opened\n", argv[1]);
            return -1;
        }
        std::string const cfd = test::get_directory(argv[1]);
        for (auto& s : cf.sets)
            for (auto& f : s.second.group)
                if (!test::is_absolute(f.c_str())) f = cfd + f;
        static auto const load = [&](const test::fixture& ts) {
            auto& fs = sets[ts.label];
            for (auto& s : ts.group)
                fs.push_back(cf.sets[s]);
        };
        if (argc > 2) {
            for (int i = 2; i != argc; ++i)
                if (cf.tests.find(argv[i]) == cf.tests.end()) {
                        std::fprintf(stderr, "%s: test not found in \"%s\"\n", argv[i], argv[1]);
                        return -1;
                }
                else    load(cf.tests[argv[i]]);
        }
        else
            for (auto& ts : cf.tests) load(ts.second);
    }

    int err = 0;

#   ifndef CXON_TIME_ONLY
        if (!sets["pass"].empty())
            err += test::kind::vector(sets["pass"]);
        if (!sets["round-trip"].empty())
            err += test::kind::roundtrip(sets["round-trip"]);
#   endif
        if (!sets["time"].empty())
            err += test::kind::time(sets["time"]);

    return err;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x640, %rsp            # imm = 0x640
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0x1, -0x8(%rbp)
jne 0x584c
callq 0x5d1d0
movl %eax, -0x4(%rbp)
jmp 0x6505
leaq -0x70(%rbp), %rdi
callq 0x9d90
leaq -0xa0(%rbp), %rdi
callq 0x9dc0
cmpl $0x1, -0x8(%rbp)
jle 0x5ff2
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
leaq -0x2a8(%rbp), %rdi
movl $0x8, %edx
callq 0x56a0
jmp 0x5886
movq -0x2a8(%rbp), %rax
movq -0x18(%rax), %rax
leaq -0x2a8(%rbp,%rax), %rdi
callq 0x5470
movb %al, -0x542(%rbp)
jmp 0x58a6
movb -0x542(%rbp), %al
testb $0x1, %al
jne 0x58b5
jmp 0x5a93
leaq -0x2e8(%rbp), %rdi
leaq -0x2a8(%rbp), %rsi
callq 0x9de0
leaq -0x2f8(%rbp), %rdi
callq 0x9e40
leaq -0x2f9(%rbp), %rdi
movq %rdi, -0x550(%rbp)
callq 0x5670
movq -0x550(%rbp), %r9
movq -0x2e8(%rbp), %rsi
movl -0x2e0(%rbp), %edx
movq -0x2f8(%rbp), %rcx
movl -0x2f0(%rbp), %r8d
leaq -0x2d8(%rbp), %rdi
callq 0x9e70
jmp 0x5917
leaq -0x2f9(%rbp), %rdi
callq 0x53f0
leaq -0x318(%rbp), %rdi
leaq -0x70(%rbp), %rsi
leaq -0x2d8(%rbp), %rdx
callq 0x9f00
jmp 0x593c
leaq -0x318(%rbp), %rdi
callq 0x9f30
testb $0x1, %al
jne 0x5a6f
movq 0x110689(%rip), %rax    # 0x115fe0
movq (%rax), %rax
movq %rax, -0x560(%rbp)
leaq -0x2d8(%rbp), %rdi
callq 0xa180
movq %rax, -0x558(%rbp)
jmp 0x5976
movq -0x558(%rbp), %rax
movq %rax, -0x340(%rbp)
movq -0x340(%rbp), %rdx
leaq -0x338(%rbp), %rdi
leaq -0x318(%rbp), %rsi
callq 0x9f50
jmp 0x59a0
leaq -0x338(%rbp), %rdi
callq 0x5150
movq -0x560(%rbp), %rdi
movq %rax, %rdx
leaq 0xbcf80(%rip), %rsi     # 0xc293d
movb $0x0, %al
callq 0x5540
leaq -0x338(%rbp), %rdi
callq 0x5260
movq 0x110609(%rip), %rax    # 0x115fe0
movq (%rax), %rdi
leaq 0xbcea7(%rip), %rsi     # 0xc2888
movb $0x0, %al
callq 0x5540
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl $0x1, -0x344(%rbp)
jmp 0x5a79
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x2b0(%rbp)
movl %eax, -0x2b4(%rbp)
jmp 0x64ee
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x2b0(%rbp)
movl %eax, -0x2b4(%rbp)
jmp 0x5c36
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x2b0(%rbp)
movl %eax, -0x2b4(%rbp)
leaq -0x2f9(%rbp), %rdi
callq 0x53f0
jmp 0x5c36
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x2b0(%rbp)
movl %eax, -0x2b4(%rbp)
leaq -0x2d8(%rbp), %rdi
callq 0x5260
jmp 0x5c36
movl $0x0, -0x344(%rbp)
leaq -0x2d8(%rbp), %rdi
callq 0x5260
movl -0x344(%rbp), %eax
testl %eax, %eax
jne 0x5ad0
jmp 0x5a91
jmp 0x5ac6
movq 0x110546(%rip), %rax    # 0x115fe0
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdx
leaq 0xbce07(%rip), %rsi     # 0xc28b3
movb $0x0, %al
callq 0x5540
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl $0x1, -0x344(%rbp)
jmp 0x5ad0
movl $0x0, -0x344(%rbp)
leaq -0x2a8(%rbp), %rdi
callq 0x50d0
movl -0x344(%rbp), %eax
testl %eax, %eax
jne 0x64d7
jmp 0x5aec
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
leaq -0x368(%rbp), %rdi
callq 0xa1b0
jmp 0x5b02
leaq -0x70(%rbp), %rax
addq $0x30, %rax
movq %rax, -0x370(%rbp)
movq -0x370(%rbp), %rdi
callq 0xa2f0
movq %rax, -0x378(%rbp)
movq -0x370(%rbp), %rdi
callq 0xa320
movq %rax, -0x380(%rbp)
leaq -0x378(%rbp), %rdi
leaq -0x380(%rbp), %rsi
callq 0xa350
testb $0x1, %al
jne 0x5b53
jmp 0x5c84
leaq -0x378(%rbp), %rdi
callq 0xa380
movq %rax, -0x388(%rbp)
movq -0x388(%rbp), %rax
addq $0x20, %rax
addq $0x20, %rax
movq %rax, -0x390(%rbp)
movq -0x390(%rbp), %rdi
callq 0xa3a0
movq %rax, -0x398(%rbp)
movq -0x390(%rbp), %rdi
callq 0xa3d0
movq %rax, -0x3a0(%rbp)
leaq -0x398(%rbp), %rdi
leaq -0x3a0(%rbp), %rsi
callq 0xa400
testb $0x1, %al
jne 0x5bbe
jmp 0x5c71
leaq -0x398(%rbp), %rdi
callq 0xa440
movq %rax, -0x3a8(%rbp)
movq -0x3a8(%rbp), %rdi
callq 0x5150
movq %rax, %rdi
callq 0xa460
movb %al, -0x561(%rbp)
jmp 0x5bed
movb -0x561(%rbp), %al
testb $0x1, %al
jne 0x5c5e
jmp 0x5bf9
movq -0x3a8(%rbp), %rdx
leaq -0x3c8(%rbp), %rdi
leaq -0x368(%rbp), %rsi
callq 0xa4d0
jmp 0x5c15
movq -0x3a8(%rbp), %rdi
leaq -0x3c8(%rbp), %rsi
callq 0x5440
leaq -0x3c8(%rbp), %rdi
callq 0x5260
jmp 0x5c5e
leaq -0x2a8(%rbp), %rdi
callq 0x50d0
jmp 0x64ee
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x2b0(%rbp)
movl %eax, -0x2b4(%rbp)
jmp 0x5fe1
jmp 0x5c60
leaq -0x398(%rbp), %rdi
callq 0xa550
jmp 0x5ba2
jmp 0x5c73
leaq -0x378(%rbp), %rdi
callq 0xa570
jmp 0x5b37
cmpb $0x0, 0x11075d(%rip)    # 0x1163e8
jne 0x5cc3
leaq 0x110754(%rip), %rdi    # 0x1163e8
callq 0x5690
cmpl $0x0, %eax
je 0x5cc3
leaq -0xa0(%rbp), %rax
movq %rax, 0x11072c(%rip)    # 0x1163d8
leaq -0x70(%rbp), %rax
movq %rax, 0x110729(%rip)    # 0x1163e0
leaq 0x11072a(%rip), %rdi    # 0x1163e8
callq 0x5280
cmpl $0x2, -0x8(%rbp)
jle 0x5f31
movl $0x2, -0x3cc(%rbp)
movl -0x3cc(%rbp), %eax
cmpl -0x8(%rbp), %eax
je 0x5f2c
leaq -0x70(%rbp), %rax
movq %rax, -0x580(%rbp)
movq -0x10(%rbp), %rax
movslq -0x3cc(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x578(%rbp)
leaq -0x3f9(%rbp), %rdi
movq %rdi, -0x570(%rbp)
callq 0x5670
movq -0x578(%rbp), %rsi
movq -0x570(%rbp), %rdx
leaq -0x3f8(%rbp), %rdi
callq 0x54f0
jmp 0x5d36
movq -0x580(%rbp), %rdi
leaq -0x3f8(%rbp), %rsi
callq 0xa5d0
movq %rax, -0x588(%rbp)
jmp 0x5d52
movq -0x588(%rbp), %rax
movq %rax, -0x3d8(%rbp)
leaq -0x70(%rbp), %rdi
callq 0xa320
movq %rax, -0x408(%rbp)
leaq -0x3d8(%rbp), %rdi
leaq -0x408(%rbp), %rsi
callq 0xa5a0
movb %al, -0x589(%rbp)
leaq -0x3f8(%rbp), %rdi
callq 0x5260
leaq -0x3f9(%rbp), %rdi
callq 0x53f0
movb -0x589(%rbp), %al
testb $0x1, %al
jne 0x5db0
jmp 0x5e38
movq 0x110229(%rip), %rax    # 0x115fe0
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movslq -0x3cc(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
leaq 0xbcaf3(%rip), %rsi     # 0xc28cb
movb $0x0, %al
callq 0x5540
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl $0x1, -0x344(%rbp)
jmp 0x5fc3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x2b0(%rbp)
movl %eax, -0x2b4(%rbp)
jmp 0x5e27
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x2b0(%rbp)
movl %eax, -0x2b4(%rbp)
leaq -0x3f8(%rbp), %rdi
callq 0x5260
leaq -0x3f9(%rbp), %rdi
callq 0x53f0
jmp 0x5fe1
leaq -0x70(%rbp), %rax
movq %rax, -0x5a8(%rbp)
movq -0x10(%rbp), %rax
movslq -0x3cc(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x5a0(%rbp)
leaq -0x429(%rbp), %rdi
movq %rdi, -0x598(%rbp)
callq 0x5670
movq -0x5a0(%rbp), %rsi
movq -0x598(%rbp), %rdx
leaq -0x428(%rbp), %rdi
callq 0x54f0
jmp 0x5e88
movq -0x5a8(%rbp), %rdi
leaq -0x428(%rbp), %rsi
callq 0xa600
movq %rax, -0x5b0(%rbp)
jmp 0x5ea4
movq -0x5b0(%rbp), %rsi
leaq 0x110526(%rip), %rdi    # 0x1163d8
callq 0x6520
jmp 0x5eb9
leaq -0x428(%rbp), %rdi
callq 0x5260
leaq -0x429(%rbp), %rdi
callq 0x53f0
jmp 0x5f16
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x2b0(%rbp)
movl %eax, -0x2b4(%rbp)
jmp 0x5f05
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x2b0(%rbp)
movl %eax, -0x2b4(%rbp)
leaq -0x428(%rbp), %rdi
callq 0x5260
leaq -0x429(%rbp), %rdi
callq 0x53f0
jmp 0x5fe1
jmp 0x5f18
movl -0x3cc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3cc(%rbp)
jmp 0x5cd7
jmp 0x5fb9
leaq -0x70(%rbp), %rax
movq %rax, -0x438(%rbp)
movq -0x438(%rbp), %rdi
callq 0xa2f0
movq %rax, -0x440(%rbp)
movq -0x438(%rbp), %rdi
callq 0xa320
movq %rax, -0x448(%rbp)
leaq -0x440(%rbp), %rdi
leaq -0x448(%rbp), %rsi
callq 0xa350
testb $0x1, %al
jne 0x5f7b
jmp 0x5fb7
leaq -0x440(%rbp), %rdi
callq 0xa380
movq %rax, -0x450(%rbp)
movq -0x450(%rbp), %rsi
addq $0x20, %rsi
leaq 0x110438(%rip), %rdi    # 0x1163d8
callq 0x6520
jmp 0x5fa7
jmp 0x5fa9
leaq -0x440(%rbp), %rdi
callq 0xa570
jmp 0x5f62
jmp 0x5fb9
movl $0x0, -0x344(%rbp)
leaq -0x368(%rbp), %rdi
callq 0x5260
movl -0x344(%rbp), %eax
testl %eax, %eax
jne 0x64d7
jmp 0x5fdf
jmp 0x5ff2
leaq -0x368(%rbp), %rdi
callq 0x5260
jmp 0x64ee
movl $0x0, -0x454(%rbp)
leaq -0x479(%rbp), %rdi
movq %rdi, -0x5b8(%rbp)
callq 0x5670
movq -0x5b8(%rbp), %rdx
leaq 0xbc8ca(%rip), %rsi     # 0xc28e7
leaq -0x478(%rbp), %rdi
callq 0x54f0
jmp 0x602b
leaq -0xa0(%rbp), %rdi
leaq -0x478(%rbp), %rsi
callq 0xa6e0
movq %rax, -0x5c0(%rbp)
jmp 0x6047
movq -0x5c0(%rbp), %rdi
callq 0xa7c0
xorb $-0x1, %al
movb %al, -0x5c1(%rbp)
leaq -0x478(%rbp), %rdi
callq 0x5260
leaq -0x479(%rbp), %rdi
callq 0x53f0
movb -0x5c1(%rbp), %al
testb $0x1, %al
jne 0x6082
jmp 0x6196
leaq -0x4a1(%rbp), %rdi
movq %rdi, -0x5d0(%rbp)
callq 0x5670
movq -0x5d0(%rbp), %rdx
leaq 0xbc844(%rip), %rsi     # 0xc28e7
leaq -0x4a0(%rbp), %rdi
callq 0x54f0
jmp 0x60b1
leaq -0xa0(%rbp), %rdi
leaq -0x4a0(%rbp), %rsi
callq 0xa6e0
movq %rax, -0x5d8(%rbp)
jmp 0x60cd
movq -0x5d8(%rbp), %rdi
callq 0x65d0
movl %eax, -0x5dc(%rbp)
jmp 0x60e1
movl -0x5dc(%rbp), %eax
addl -0x454(%rbp), %eax
movl %eax, -0x454(%rbp)
leaq -0x4a0(%rbp), %rdi
callq 0x5260
leaq -0x4a1(%rbp), %rdi
callq 0x53f0
jmp 0x6196
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x2b0(%rbp)
movl %eax, -0x2b4(%rbp)
jmp 0x6142
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x2b0(%rbp)
movl %eax, -0x2b4(%rbp)
leaq -0x478(%rbp), %rdi
callq 0x5260
leaq -0x479(%rbp), %rdi
callq 0x53f0
jmp 0x64ee
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x2b0(%rbp)
movl %eax, -0x2b4(%rbp)
jmp 0x6185
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x2b0(%rbp)
movl %eax, -0x2b4(%rbp)
leaq -0x4a0(%rbp), %rdi
callq 0x5260
leaq -0x4a1(%rbp), %rdi
callq 0x53f0
jmp 0x64ee
leaq -0x4c9(%rbp), %rdi
movq %rdi, -0x5e8(%rbp)
callq 0x5670
movq -0x5e8(%rbp), %rdx
leaq 0xbc735(%rip), %rsi     # 0xc28ec
leaq -0x4c8(%rbp), %rdi
callq 0x54f0
jmp 0x61c5
leaq -0xa0(%rbp), %rdi
leaq -0x4c8(%rbp), %rsi
callq 0xa6e0
movq %rax, -0x5f0(%rbp)
jmp 0x61e1
movq -0x5f0(%rbp), %rdi
callq 0xa7c0
xorb $-0x1, %al
movb %al, -0x5f1(%rbp)
leaq -0x4c8(%rbp), %rdi
callq 0x5260
leaq -0x4c9(%rbp), %rdi
callq 0x53f0
movb -0x5f1(%rbp), %al
testb $0x1, %al
jne 0x621c
jmp 0x6330
leaq -0x4f1(%rbp), %rdi
movq %rdi, -0x600(%rbp)
callq 0x5670
movq -0x600(%rbp), %rdx
leaq 0xbc6af(%rip), %rsi     # 0xc28ec
leaq -0x4f0(%rbp), %rdi
callq 0x54f0
jmp 0x624b
leaq -0xa0(%rbp), %rdi
leaq -0x4f0(%rbp), %rsi
callq 0xa6e0
movq %rax, -0x608(%rbp)
jmp 0x6267
movq -0x608(%rbp), %rdi
callq 0x6d30
movl %eax, -0x60c(%rbp)
jmp 0x627b
movl -0x60c(%rbp), %eax
addl -0x454(%rbp), %eax
movl %eax, -0x454(%rbp)
leaq -0x4f0(%rbp), %rdi
callq 0x5260
leaq -0x4f1(%rbp), %rdi
callq 0x53f0
jmp 0x6330
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x2b0(%rbp)
movl %eax, -0x2b4(%rbp)
jmp 0x62dc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x2b0(%rbp)
movl %eax, -0x2b4(%rbp)
leaq -0x4c8(%rbp), %rdi
callq 0x5260
leaq -0x4c9(%rbp), %rdi
callq 0x53f0
jmp 0x64ee
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x2b0(%rbp)
movl %eax, -0x2b4(%rbp)
jmp 0x631f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x2b0(%rbp)
movl %eax, -0x2b4(%rbp)
leaq -0x4f0(%rbp), %rdi
callq 0x5260
leaq -0x4f1(%rbp), %rdi
callq 0x53f0
jmp 0x64ee
leaq -0x519(%rbp), %rdi
movq %rdi, -0x618(%rbp)
callq 0x5670
movq -0x618(%rbp), %rdx
leaq 0xbc5a6(%rip), %rsi     # 0xc28f7
leaq -0x518(%rbp), %rdi
callq 0x54f0
jmp 0x635f
leaq -0xa0(%rbp), %rdi
leaq -0x518(%rbp), %rsi
callq 0xa6e0
movq %rax, -0x620(%rbp)
jmp 0x637b
movq -0x620(%rbp), %rdi
callq 0xa7c0
xorb $-0x1, %al
movb %al, -0x621(%rbp)
leaq -0x518(%rbp), %rdi
callq 0x5260
leaq -0x519(%rbp), %rdi
callq 0x53f0
movb -0x621(%rbp), %al
testb $0x1, %al
jne 0x63b6
jmp 0x64c4
leaq -0x541(%rbp), %rdi
movq %rdi, -0x630(%rbp)
callq 0x5670
movq -0x630(%rbp), %rdx
leaq 0xbc520(%rip), %rsi     # 0xc28f7
leaq -0x540(%rbp), %rdi
callq 0x54f0
jmp 0x63e5
leaq -0xa0(%rbp), %rdi
leaq -0x540(%rbp), %rsi
callq 0xa6e0
movq %rax, -0x638(%rbp)
jmp 0x6401
movq -0x638(%rbp), %rdi
callq 0x78a0
movl %eax, -0x63c(%rbp)
jmp 0x6415
movl -0x63c(%rbp), %eax
addl -0x454(%rbp), %eax
movl %eax, -0x454(%rbp)
leaq -0x540(%rbp), %rdi
callq 0x5260
leaq -0x541(%rbp), %rdi
callq 0x53f0
jmp 0x64c4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x2b0(%rbp)
movl %eax, -0x2b4(%rbp)
jmp 0x6476
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x2b0(%rbp)
movl %eax, -0x2b4(%rbp)
leaq -0x518(%rbp), %rdi
callq 0x5260
leaq -0x519(%rbp), %rdi
callq 0x53f0
jmp 0x64ee
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x2b0(%rbp)
movl %eax, -0x2b4(%rbp)
jmp 0x64b6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x2b0(%rbp)
movl %eax, -0x2b4(%rbp)
leaq -0x540(%rbp), %rdi
callq 0x5260
leaq -0x541(%rbp), %rdi
callq 0x53f0
jmp 0x64ee
movl -0x454(%rbp), %eax
movl %eax, -0x4(%rbp)
movl $0x1, -0x344(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0xa800
leaq -0x70(%rbp), %rdi
callq 0xa820
jmp 0x6505
leaq -0xa0(%rbp), %rdi
callq 0xa800
leaq -0x70(%rbp), %rdi
callq 0xa820
jmp 0x6511
movl -0x4(%rbp), %eax
addq $0x640, %rsp            # imm = 0x640
popq %rbp
retq
movq -0x2b0(%rbp), %rdi
callq 0x5660
nopl (%rax)