// File: /workspace/github_cpp_makefile_star2_O2/oknenavin[P]cxon/test/src/json/json.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::cases> 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-json-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]);
        static auto const load = [&](const test::config::set& ts) {
            auto& cs = sets[ts.label];
            for (auto& t : ts.group) {
                auto& ss = cf.sets[t];
                for (auto& s : ss.group) {
                    auto p = !test::is_absolute(s.c_str()) ? cfd + s : s;
                    cs.push_back({std::move(p), 0, {}, {}, false});
                }
            }
        };
        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::pass(sets["pass"]);
        if (!sets["fail"].empty())
            err += test::kind::fail(sets["fail"]);
        if (!sets["diff-node"].empty())
            err += test::kind::diff_node(sets["diff-node"]);
        if (!sets["diff-native"].empty())
            err += test::kind::diff_native(sets["diff-native"]);
#   endif
        if (!sets["time-node"].empty())
            test::kind::time(sets["time-node"], test::kind::time_cxon_node);
        if (!sets["time-native"].empty())
            test::kind::time(sets["time-native"], test::kind::time_cxon_native);

    return err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x308, %rsp            # imm = 0x308
movq %rsi, 0x8(%rsp)
cmpl $0x1, %edi
jne 0x3e979
addq $0x308, %rsp            # imm = 0x308
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x46954
movl %edi, %ebp
leaq 0x290(%rsp), %r13
andl $0x0, (%r13)
andq $0x0, 0x8(%r13)
movq %r13, 0x10(%r13)
movq %r13, 0x18(%r13)
andq $0x0, 0x20(%r13)
leaq 0x2c0(%rsp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
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 0x3eb82
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rsi
leaq 0x80(%rsp), %rdi
pushq $0x8
popq %rdx
callq 0xe4a0
movq 0x80(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x5, 0xa0(%rsp,%rax)
jne 0x3eee5
movq 0x168(%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 0x1380e
leaq 0x68(%rsp), %rdi
leaq 0x288(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x4164c
xorl %r12d, %r12d
cmpl $0x0, 0x68(%rsp)
sete %bl
jne 0x3ef11
leaq 0x10(%rsp), %rdi
callq 0xe150
leaq 0x80(%rsp), %rdi
callq 0xe0b0
testb %bl, %bl
je 0x3eeb9
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rsi
leaq 0x80(%rsp), %r15
movq %r15, %rdi
callq 0x4052c
movb 0xfec5e(%rip), %al      # 0x13d6f8
testb %al, %al
je 0x3efac
cmpl $0x2, %ebp
jne 0x3eace
movq 0x2a0(%rsp), %r14
cmpq %r13, %r14
je 0x3eb62
leaq 0x40(%r14), %rdi
callq 0x3f092
movq %r14, %rdi
callq 0xe1e0
movq %rax, %r14
jmp 0x3eaaf
movl %r12d, 0x34(%rsp)
movl %ebp, %r14d
pushq $0x2
popq %rbx
leaq 0x10(%rsp), %r15
leaq 0x2e8(%rsp), %r12
leaq 0x288(%rsp), %r13
cmpq %rbx, %r14
je 0x3eb66
movq 0x8(%rsp), %rax
movq (%rax,%rbx,8), %rsi
movq %r15, %rdi
movq %r12, %rdx
callq 0xe100
movq %r13, %rdi
movq %r15, %rsi
callq 0x4348e
movq %rax, %rbp
movq %r15, %rdi
callq 0xe150
leaq 0x290(%rsp), %rax
cmpq %rax, %rbp
je 0x3ef7c
movq 0x8(%rsp), %rax
movq (%rax,%rbx,8), %rsi
movq %r15, %rdi
movq %r12, %rdx
callq 0xe100
movq %r13, %rdi
movq %r15, %rsi
callq 0x405b4
movq %rax, %rdi
callq 0x3f092
movq %r15, %rdi
callq 0xe150
incq %rbx
jmp 0x3eaee
movb $0x1, %bl
jmp 0x3eb6d
movb $0x1, %bl
movl 0x34(%rsp), %r12d
leaq 0x80(%rsp), %rdi
callq 0xe150
testb %bl, %bl
je 0x3eeb9
leaq 0x7de82(%rip), %rsi     # 0xbca0b
leaq 0x80(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0xe100
leaq 0x38(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x4061a
movq (%rax), %rbx
movq 0x8(%rax), %r14
leaq 0x80(%rsp), %rdi
callq 0xe150
cmpq %r14, %rbx
je 0x3ec0b
leaq 0x7de3e(%rip), %rsi     # 0xbca0b
leaq 0x80(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0xe100
leaq 0x38(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x4061a
movq %rax, %rdi
callq 0x3f212
movl %eax, %r12d
leaq 0x80(%rsp), %rdi
callq 0xe150
jmp 0x3ec0e
xorl %r12d, %r12d
leaq 0x7de26(%rip), %rsi     # 0xbca3b
leaq 0x80(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0xe100
leaq 0x38(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x4061a
movq (%rax), %rbx
movq 0x8(%rax), %r14
leaq 0x80(%rsp), %rdi
callq 0xe150
cmpq %r14, %rbx
je 0x3ec95
leaq 0x7dde2(%rip), %rsi     # 0xbca3b
leaq 0x80(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0xe100
leaq 0x38(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x4061a
movq %rax, %rdi
callq 0x3f505
addl %eax, %r12d
leaq 0x80(%rsp), %rdi
callq 0xe150
leaq 0x7dd0b(%rip), %rsi     # 0xbc9a7
leaq 0x80(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0xe100
leaq 0x38(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x4061a
movq (%rax), %rbx
movq 0x8(%rax), %r14
leaq 0x80(%rsp), %rdi
callq 0xe150
cmpq %r14, %rbx
je 0x3ed1c
leaq 0x7dcc7(%rip), %rsi     # 0xbc9a7
leaq 0x80(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0xe100
leaq 0x38(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x4061a
movq %rax, %rdi
callq 0xed6c
addl %eax, %r12d
leaq 0x80(%rsp), %rdi
callq 0xe150
leaq 0x7dc8e(%rip), %rsi     # 0xbc9b1
leaq 0x80(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0xe100
leaq 0x38(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x4061a
movq (%rax), %rbx
movq 0x8(%rax), %r14
leaq 0x80(%rsp), %rdi
callq 0xe150
cmpq %r14, %rbx
je 0x3eda3
leaq 0x7dc4a(%rip), %rsi     # 0xbc9b1
leaq 0x80(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0xe100
leaq 0x38(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x4061a
movq %rax, %rdi
callq 0xf035
addl %eax, %r12d
leaq 0x80(%rsp), %rdi
callq 0xe150
leaq 0x7dc13(%rip), %rsi     # 0xbc9bd
leaq 0x80(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0xe100
leaq 0x38(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x4061a
movq (%rax), %rbx
movq 0x8(%rax), %r14
leaq 0x80(%rsp), %rdi
callq 0xe150
cmpq %r14, %rbx
je 0x3ee2e
leaq 0x7dbcf(%rip), %rsi     # 0xbc9bd
leaq 0x80(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0xe100
leaq 0x38(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x4061a
leaq 0x79fc3(%rip), %rsi     # 0xb8ddc
movq %rax, %rdi
callq 0x40680
leaq 0x80(%rsp), %rdi
callq 0xe150
leaq 0x7db92(%rip), %rsi     # 0xbc9c7
leaq 0x80(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0xe100
leaq 0x38(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x4061a
movq (%rax), %rbx
movq 0x8(%rax), %r14
leaq 0x80(%rsp), %rdi
callq 0xe150
cmpq %r14, %rbx
je 0x3eeb9
leaq 0x7db4e(%rip), %rsi     # 0xbc9c7
leaq 0x80(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0xe100
leaq 0x38(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x4061a
leaq 0x57261(%rip), %rsi     # 0x96105
movq %rax, %rdi
callq 0x40680
leaq 0x80(%rsp), %rdi
callq 0xe150
leaq 0x38(%rsp), %rdi
callq 0x415b8
leaq 0x288(%rsp), %rdi
callq 0x4079a
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 0xfe0e0(%rip), %rax     # 0x13cfd0
movq (%rax), %rdi
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rdx
leaq 0x7da70(%rip), %rsi     # 0xbc973
xorl %ebx, %ebx
xorl %eax, %eax
callq 0xe3c0
jmp 0x3ea66
movq 0xfe0b8(%rip), %r14     # 0x13cfd0
movq (%r14), %r13
movq 0x10(%rsp), %rdx
leaq 0x2e8(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x13620
leaq 0x2e8(%rsp), %r12
movq (%r12), %rdx
leaq 0x7c6e3(%rip), %rsi     # 0xbb628
movq %r13, %rdi
xorl %eax, %eax
callq 0xe3c0
movq %r12, %rdi
callq 0xe150
movq (%r14), %rcx
leaq 0x7d9e7(%rip), %rdi     # 0xbc948
pushq $0x2a
popq %rsi
pushq $0x1
popq %rdx
callq 0xe4f0
movl %r15d, %r12d
leaq 0x290(%rsp), %r13
jmp 0x3ea5c
movq 0xfe04d(%rip), %rax     # 0x13cfd0
movq (%rax), %rdi
movq 0x8(%rsp), %rax
movq (%rax,%rbx,8), %rdx
movq 0x8(%rax), %rcx
leaq 0x7d9f1(%rip), %rsi     # 0xbc98b
xorl %ebx, %ebx
xorl %eax, %eax
callq 0xe3c0
pushq $-0x1
popq %r12
jmp 0x3eb6d
leaq 0xfe745(%rip), %rdi     # 0x13d6f8
callq 0xe490
testl %eax, %eax
je 0x3eaa2
leaq 0x38(%rsp), %rax
movq %rax, 0xfe714(%rip)     # 0x13d6e0
leaq 0x288(%rsp), %rax
movq %rax, 0xfe70d(%rip)     # 0x13d6e8
movq %r15, 0xfe70e(%rip)     # 0x13d6f0
leaq 0xfe70f(%rip), %rdi     # 0x13d6f8
callq 0xe1d0
jmp 0x3eaa2
jmp 0x3f03c
jmp 0x3f03c
jmp 0x3f03c
jmp 0x3f03c
jmp 0x3f03c
jmp 0x3f03c
jmp 0x3f03c
jmp 0x3f003
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0xe150
jmp 0x3f015
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
callq 0xe0b0
jmp 0x3f072
jmp 0x3f03c
jmp 0x3f053
jmp 0x3f03c
jmp 0x3f053
jmp 0x3f03c
jmp 0x3f053
jmp 0x3f03c
jmp 0x3f053
jmp 0x3f03c
jmp 0x3f053
jmp 0x3f03c
jmp 0x3f053
movq %rax, %rbx
jmp 0x3f072
jmp 0x3f053
jmp 0x3f053
jmp 0x3f053
jmp 0x3f053
jmp 0x3f053
jmp 0x3f053
jmp 0x3f053
jmp 0x3f053
jmp 0x3f058
movq %rax, %rbx
jmp 0x3f065
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0xe150
leaq 0x80(%rsp), %rdi
callq 0xe150
leaq 0x38(%rsp), %rdi
callq 0x415b8
leaq 0x288(%rsp), %rdi
callq 0x4079a
movq %rbx, %rdi
callq 0xe470
nop