// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x308, %rsp            # imm = 0x308
movq %rsi, (%rsp)
cmpl $0x1, %edi
jne 0x461c
addq $0x308, %rsp            # imm = 0x308
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1b828
movl %edi, %r13d
leaq 0x88(%rsp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq 0xb8(%rsp), %rbp
andl $0x0, (%rbp)
andq $0x0, 0x8(%rbp)
movq %rbp, 0x10(%rbp)
movq %rbp, 0x18(%rbp)
andq $0x0, 0x20(%rbp)
leaq 0x40(%rsp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
cmpl $0x2, %edi
jl 0x489d
movq (%rsp), %rax
movq 0x8(%rax), %rsi
leaq 0x100(%rsp), %rdi
pushq $0x8
popq %rdx
callq 0x4480
movq 0x100(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x120(%rsp,%rax)
jne 0x4a63
movq 0x1e8(%rsp,%rax), %rsi
leaq 0x20(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x10(%rsp), %rdi
pushq $-0x1
popq %r15
movl %r15d, %edx
xorl %ecx, %ecx
movl %r15d, %r8d
callq 0x812e
leaq 0x68(%rsp), %rdi
leaq 0x80(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x82f4
xorl %r12d, %r12d
cmpl $0x0, 0x68(%rsp)
sete %r14b
jne 0x4a8f
leaq 0x10(%rsp), %rdi
callq 0x4130
leaq 0x100(%rsp), %rdi
callq 0x40a0
testb %r14b, %r14b
je 0x4a37
movl %r13d, 0x34(%rsp)
movl %r12d, 0xc(%rsp)
movq (%rsp), %rax
movq 0x8(%rax), %rsi
leaq 0x100(%rsp), %rdi
callq 0x687f
movq 0xc8(%rsp), %r13
leaq 0x10(%rsp), %r15
leaq 0x100(%rsp), %r12
cmpq %rbp, %r13
je 0x47a5
movq 0x60(%r13), %rbx
movq 0x68(%r13), %r14
cmpq %r14, %rbx
je 0x4798
movq (%rbx), %rdi
callq 0x6906
testb %al, %al
jne 0x4792
movq %r15, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x693b
movq %rbx, %rdi
movq %r15, %rsi
callq 0x42f0
movq %r15, %rdi
callq 0x4130
addq $0x20, %rbx
jmp 0x4760
movq %r13, %rdi
callq 0x41c0
movq %rax, %r13
jmp 0x4753
movb 0x59b25(%rip), %al      # 0x5e2d0
testb %al, %al
je 0x4b28
movl 0x34(%rsp), %eax
cmpl $0x2, %eax
jne 0x47f0
movq 0x98(%rsp), %rbx
movl 0xc(%rsp), %r12d
leaq 0x88(%rsp), %r14
cmpq %r14, %rbx
je 0x487d
leaq 0x40(%rbx), %rdi
callq 0x4bf2
movq %rbx, %rdi
callq 0x41c0
movq %rax, %rbx
jmp 0x47d1
movl %eax, %r14d
pushq $0x2
popq %rbp
leaq 0x10(%rsp), %r15
leaq 0xe0(%rsp), %r12
leaq 0x80(%rsp), %r13
cmpq %rbp, %r14
je 0x4881
movq (%rsp), %rax
movq (%rax,%rbp,8), %rsi
movq %r15, %rdi
movq %r12, %rdx
callq 0x40e0
movq %r13, %rdi
movq %r15, %rsi
callq 0xb0fe
movq %rax, %rbx
movq %r15, %rdi
callq 0x4130
leaq 0x88(%rsp), %rax
cmpq %rax, %rbx
je 0x4af9
movq (%rsp), %rax
movq (%rax,%rbp,8), %rsi
movq %r15, %rdi
movq %r12, %rdx
callq 0x40e0
movq %r13, %rdi
movq %r15, %rsi
callq 0x6974
movq %rax, %rdi
callq 0x4bf2
movq %r15, %rdi
callq 0x4130
incq %rbp
jmp 0x480b
movb $0x1, %bl
jmp 0x4888
movb $0x1, %bl
movl 0xc(%rsp), %r12d
leaq 0x100(%rsp), %rdi
callq 0x4130
testb %bl, %bl
je 0x4a37
leaq 0x37113(%rip), %rsi     # 0x3b9b7
leaq 0x100(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x40e0
leaq 0x38(%rsp), %rdi
leaq 0x100(%rsp), %rsi
callq 0x69da
movq (%rax), %rbx
movq 0x8(%rax), %r14
leaq 0x100(%rsp), %rdi
callq 0x4130
cmpq %r14, %rbx
je 0x4926
leaq 0x370cf(%rip), %rsi     # 0x3b9b7
leaq 0x100(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x40e0
leaq 0x38(%rsp), %rdi
leaq 0x100(%rsp), %rsi
callq 0x69da
movq %rax, %rdi
callq 0x4c43
movl %eax, %r12d
leaq 0x100(%rsp), %rdi
callq 0x4130
jmp 0x4929
xorl %r12d, %r12d
leaq 0x3708c(%rip), %rsi     # 0x3b9bc
leaq 0x100(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x40e0
leaq 0x38(%rsp), %rdi
leaq 0x100(%rsp), %rsi
callq 0x69da
movq (%rax), %rbx
movq 0x8(%rax), %r14
leaq 0x100(%rsp), %rdi
callq 0x4130
cmpq %r14, %rbx
je 0x49b0
leaq 0x37048(%rip), %rsi     # 0x3b9bc
leaq 0x100(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x40e0
leaq 0x38(%rsp), %rdi
leaq 0x100(%rsp), %rsi
callq 0x69da
movq %rax, %rdi
callq 0x502f
addl %eax, %r12d
leaq 0x100(%rsp), %rdi
callq 0x4130
leaq 0x37010(%rip), %rsi     # 0x3b9c7
leaq 0x100(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x40e0
leaq 0x38(%rsp), %rdi
leaq 0x100(%rsp), %rsi
callq 0x69da
movq (%rax), %rbx
movq 0x8(%rax), %r14
leaq 0x100(%rsp), %rdi
callq 0x4130
cmpq %r14, %rbx
je 0x4a37
leaq 0x36fcc(%rip), %rsi     # 0x3b9c7
leaq 0x100(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x40e0
leaq 0x38(%rsp), %rdi
leaq 0x100(%rsp), %rsi
callq 0x69da
movq %rax, %rdi
callq 0x572a
addl %eax, %r12d
leaq 0x100(%rsp), %rdi
callq 0x4130
leaq 0x38(%rsp), %rdi
callq 0x801a
leaq 0x80(%rsp), %rdi
callq 0x6a40
movl %r12d, %eax
addq $0x308, %rsp            # imm = 0x308
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $-0x1
popq %r12
movq 0x5956a(%rip), %rax     # 0x5dfd8
movq (%rax), %rdi
movq (%rsp), %rax
movq 0x8(%rax), %rdx
leaq 0x36f03(%rip), %rsi     # 0x3b983
xorl %r14d, %r14d
xorl %eax, %eax
callq 0x4380
jmp 0x4709
movq 0x59542(%rip), %rax     # 0x5dfd8
movq (%rax), %rbx
movq 0x10(%rsp), %rdx
leaq 0xe0(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x671f
leaq 0xe0(%rsp), %r12
movq (%r12), %rdx
leaq 0x36f4a(%rip), %rsi     # 0x3ba0d
movq %rbx, %rdi
xorl %eax, %eax
callq 0x4380
movq %r12, %rdi
callq 0x4130
movq 0x594fc(%rip), %rax     # 0x5dfd8
movq (%rax), %rcx
leaq 0x36e72(%rip), %rdi     # 0x3b958
pushq $0x2a
popq %rsi
pushq $0x1
popq %rdx
callq 0x44c0
movl %r15d, %r12d
jmp 0x46ff
movq 0x594d8(%rip), %rax     # 0x5dfd8
movq (%rax), %rdi
movq (%rsp), %rax
movq (%rax,%rbp,8), %rdx
movq 0x8(%rax), %rcx
leaq 0x36e85(%rip), %rsi     # 0x3b99b
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x4380
pushq $-0x1
popq %r12
jmp 0x4888
leaq 0x597a1(%rip), %rdi     # 0x5e2d0
callq 0x4470
testl %eax, %eax
je 0x47b3
leaq 0x38(%rsp), %rax
movq %rax, 0x59778(%rip)     # 0x5e2c0
leaq 0x80(%rsp), %rax
movq %rax, 0x59771(%rip)     # 0x5e2c8
leaq 0x59772(%rip), %rdi     # 0x5e2d0
callq 0x41b0
jmp 0x47b3
jmp 0x4b9f
jmp 0x4b9f
jmp 0x4b9f
jmp 0x4b9f
jmp 0x4b72
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x4130
jmp 0x4b84
movq %rax, %rbx
leaq 0x100(%rsp), %rdi
callq 0x40a0
jmp 0x4bd3
jmp 0x4b9f
jmp 0x4bc3
jmp 0x4b9f
jmp 0x4bc3
jmp 0x4b9f
jmp 0x4bc3
movq %rax, %rbx
jmp 0x4bd3
jmp 0x4bc3
jmp 0x4bc3
jmp 0x4bc3
jmp 0x4bc3
jmp 0x4bc3
jmp 0x4bb2
jmp 0x4bc3
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x4130
jmp 0x4bc6
jmp 0x4bc3
movq %rax, %rbx
leaq 0x100(%rsp), %rdi
callq 0x4130
leaq 0x38(%rsp), %rdi
callq 0x801a
leaq 0x80(%rsp), %rdi
callq 0x6a40
movq %rbx, %rdi
callq 0x4450