// File: oknenavin[P]cxon/test/src/cbor/cbor.node-main.cxx
// Function: test::kind::vector(std::vector<test::fixture, std::allocator<test::fixture>> const&)
int vector(const fixture::vector& fs) {
        int all = 0, err = 0, skip = 0;

        for (auto& fixture : fs) for (auto& file: fixture.group) {
            std::ifstream is(file);
                if (!is) {
                    CXON_ASSERT(0, "unexpected");
                    ++err, std::fprintf(stderr, "error: cannot be opened: '%s'\n", file.c_str());
                    continue;
                }
            test::vector vector;
                auto const r = cxon::from_bytes<cxon::JSON<>>(vector, std::istreambuf_iterator<char>(is), std::istreambuf_iterator<char>());
                if (!r) {
                    CXON_ASSERT(0, "unexpected");
                    ++err, std::fprintf(stderr, "error: test-vector invalid: '%s': %s\n", file.c_str(), r.ec.message().c_str());
                    continue;
                }

            for (auto& test : vector) {
                ++all;
                cxon::json::node decoded;
                std::string fail;
                {   auto const fix = fixture.fixup.find(test.hex);
                    if (fix != fixture.fixup.end()) {
                        if (fix->second.act == "json") {
#                           if !defined(__GNUC__) || (__GNUC__ > 10 || (__GNUC__ == 10 && __GNUC_MINOR__ >= 2)) || defined(__clang__)
                                auto const r = cxon::from_bytes<UQK_JSON>(
                                    decoded, fix->second.data,
                                    cxon::node::json::extract_nans::set<true>()
                                );
#                           else
                                // g++ (4.8.1->9.1) bug: overload resolution fail => workaround, add type parameters
                                // seems to be fixed around 10
                                auto const r = cxon::from_bytes<UQK_JSON, cxon::json::node_traits<>>(
                                    decoded, fix->second.data,
                                    cxon::node::json::extract_nans::set<true>()
                                );
#                           endif
                            CXON_ASSERT(r, "invalid fixture");
                        }
                        else if (fix->second.act == "skip") {
                            ++skip/*, std::fprintf(stdout, "skip: '%s' (%s)\n", test.hex.c_str(), fix->second.data.c_str()), std::fflush(stdout)*/;
                            continue;
                        }
                        fail = fix->second.fail;
                    }
                    else {
                        decoded = test.decoded;
                    }
                }
                {   cxon::json::node json;
                        auto const r = cxon::from_bytes(json, test.bin());
                    if (!r) {
                        fail.empty() ?
                            (++err, std::fprintf(stderr, "fail: '%s'\n", test.hex.c_str())) :
                            (/*std::fprintf(stderr, "must fail: '%s' (%s)\n", test.hex.c_str(), fail.c_str()), */0)
                        ;
                    }
                    else if (json != decoded) {
                        fail.empty() ?
                            (++err, std::fprintf(stderr, "fail: '%s'\n", test.hex.c_str())) :
                            (/*std::fprintf(stderr, "must fail: '%s' (%s)\n", test.hex.c_str(), fail.c_str()), */0)
                        ;
                    }
                    else if (!fail.empty()) {
                        ++err, std::fprintf(stderr, "must fail but passed: '%s' (%s)\n", test.hex.c_str(), fail.c_str());
                    }
                }
            }
        }

        std::fprintf(stdout, "%-21s: %d of %4d failed (%d skipped)\n", "cxon/cbor/node/suite", err, all, skip); std::fflush(stdout);

        return err;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x450, %rsp            # imm = 0x450
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movl $0x0, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0xa850
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
callq 0xa880
movq %rax, -0x30(%rbp)
leaq -0x28(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0xa8b0
testb $0x1, %al
jne 0x662c
jmp 0x6cd5
leaq -0x28(%rbp), %rdi
callq 0xa8f0
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
callq 0xa910
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rdi
callq 0xa940
movq %rax, -0x50(%rbp)
leaq -0x48(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0xa970
testb $0x1, %al
jne 0x6675
jmp 0x6cc5
leaq -0x48(%rbp), %rdi
callq 0xa9b0
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rsi
leaq -0x260(%rbp), %rdi
movl $0x8, %edx
callq 0x55f0
movq -0x260(%rbp), %rax
movq -0x18(%rax), %rax
leaq -0x260(%rbp,%rax), %rdi
callq 0x51b0
movb %al, -0x3e1(%rbp)
jmp 0x66b7
movb -0x3e1(%rbp), %al
testb $0x1, %al
jne 0x66c3
jmp 0x6724
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
movq 0x10f90d(%rip), %rax    # 0x115fe0
movq (%rax), %rax
movq %rax, -0x3f0(%rbp)
movq -0x58(%rbp), %rdi
callq 0x5150
movq -0x3f0(%rbp), %rdi
movq %rax, %rdx
leaq 0xbc205(%rip), %rsi     # 0xc28fc
movb $0x0, %al
callq 0x5540
movl $0x5, -0x270(%rbp)
jmp 0x6c81
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x268(%rbp)
movl %eax, -0x26c(%rbp)
jmp 0x6cb7
leaq -0x288(%rbp), %rdi
movq %rdi, -0x3f8(%rbp)
callq 0xa9d0
leaq -0x2b8(%rbp), %rdi
leaq -0x260(%rbp), %rsi
callq 0x9de0
leaq -0x2c8(%rbp), %rdi
callq 0x9e40
movq -0x3f8(%rbp), %rsi
movq -0x2b8(%rbp), %rdx
movl -0x2b0(%rbp), %ecx
movq -0x2c8(%rbp), %r8
movl -0x2c0(%rbp), %r9d
leaq -0x2a8(%rbp), %rdi
callq 0xa9f0
jmp 0x6786
leaq -0x2a8(%rbp), %rdi
callq 0xaa60
testb $0x1, %al
jne 0x6835
movl -0x10(%rbp), %eax
incl %eax
movl %eax, -0x10(%rbp)
movq 0x10f837(%rip), %rax    # 0x115fe0
movq (%rax), %rax
movq %rax, -0x408(%rbp)
movq -0x58(%rbp), %rdi
callq 0x5150
movq %rax, -0x400(%rbp)
leaq -0x2e8(%rbp), %rdi
leaq -0x2a8(%rbp), %rsi
callq 0xaa80
jmp 0x67d8
leaq -0x2e8(%rbp), %rdi
callq 0x5150
movq -0x408(%rbp), %rdi
movq -0x400(%rbp), %rdx
movq %rax, %rcx
leaq 0xbc11f(%rip), %rsi     # 0xc291b
movb $0x0, %al
callq 0x5540
leaq -0x2e8(%rbp), %rdi
callq 0x5260
movl $0x5, -0x270(%rbp)
jmp 0x6c75
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x268(%rbp)
movl %eax, -0x26c(%rbp)
jmp 0x6cab
leaq -0x288(%rbp), %rax
movq %rax, -0x2f0(%rbp)
movq -0x2f0(%rbp), %rdi
callq 0xaad0
movq %rax, -0x2f8(%rbp)
movq -0x2f0(%rbp), %rdi
callq 0xab00
movq %rax, -0x300(%rbp)
leaq -0x2f8(%rbp), %rdi
leaq -0x300(%rbp), %rsi
callq 0xab30
testb $0x1, %al
jne 0x6885
jmp 0x6c6b
leaq -0x2f8(%rbp), %rdi
callq 0xab70
movq %rax, -0x308(%rbp)
movl -0xc(%rbp), %eax
incl %eax
movl %eax, -0xc(%rbp)
leaq -0x330(%rbp), %rdi
callq 0xab90
leaq -0x350(%rbp), %rdi
callq 0x5510
movq -0x38(%rbp), %rdi
addq $0x38, %rdi
movq -0x308(%rbp), %rsi
callq 0xabc0
movq %rax, -0x410(%rbp)
jmp 0x68d5
movq -0x410(%rbp), %rax
movq %rax, -0x358(%rbp)
movq -0x38(%rbp), %rdi
addq $0x38, %rdi
callq 0xac20
movq %rax, -0x360(%rbp)
leaq -0x358(%rbp), %rdi
leaq -0x360(%rbp), %rsi
callq 0xabf0
testb $0x1, %al
jne 0x6913
jmp 0x6a10
leaq -0x358(%rbp), %rdi
callq 0xac80
movq %rax, %rdi
addq $0x20, %rdi
leaq 0xbc097(%rip), %rsi     # 0xc29c4
callq 0xac50
movb %al, -0x411(%rbp)
jmp 0x693a
movb -0x411(%rbp), %al
testb $0x1, %al
jne 0x6946
jmp 0x69a0
leaq -0x358(%rbp), %rdi
callq 0xac80
addq $0x40, %rax
movq %rax, -0x420(%rbp)
callq 0xad10
jmp 0x6964
movq -0x420(%rbp), %rdx
leaq -0x378(%rbp), %rdi
leaq -0x330(%rbp), %rsi
leaq -0x379(%rbp), %rcx
callq 0xaca0
jmp 0x6987
jmp 0x69ed
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x268(%rbp)
movl %eax, -0x26c(%rbp)
jmp 0x6c51
leaq -0x358(%rbp), %rdi
callq 0xac80
movq %rax, %rdi
addq $0x20, %rdi
leaq 0xbbf87(%rip), %rsi     # 0xc2941
callq 0xac50
movb %al, -0x421(%rbp)
jmp 0x69c7
movb -0x421(%rbp), %al
testb $0x1, %al
jne 0x69d3
jmp 0x69eb
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
movl $0x7, -0x270(%rbp)
jmp 0x6c0c
jmp 0x69ed
leaq -0x358(%rbp), %rdi
callq 0xac80
movq %rax, %rsi
addq $0x60, %rsi
leaq -0x350(%rbp), %rdi
callq 0x5050
jmp 0x6a0e
jmp 0x6a2b
movq -0x308(%rbp), %rsi
addq $0x28, %rsi
leaq -0x330(%rbp), %rdi
callq 0xad20
jmp 0x6a29
jmp 0x6a2b
leaq -0x3a8(%rbp), %rdi
callq 0xab90
movq -0x308(%rbp), %rsi
leaq -0x3e0(%rbp), %rdi
callq 0xae70
jmp 0x6a4c
leaq -0x3c0(%rbp), %rdi
leaq -0x3a8(%rbp), %rsi
leaq -0x3e0(%rbp), %rdx
callq 0xae10
jmp 0x6a68
leaq -0x3e0(%rbp), %rdi
callq 0x5260
leaq -0x3c0(%rbp), %rdi
callq 0x9f30
testb $0x1, %al
jne 0x6b1b
leaq -0x350(%rbp), %rdi
callq 0x5620
testb $0x1, %al
jne 0x6a9a
jmp 0x6ada
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
movq 0x10f536(%rip), %rax    # 0x115fe0
movq (%rax), %rax
movq %rax, -0x430(%rbp)
movq -0x308(%rbp), %rdi
callq 0x5150
movq -0x430(%rbp), %rdi
movq %rax, %rdx
leaq 0xbbe75(%rip), %rsi     # 0xc2946
movb $0x0, %al
callq 0x5540
jmp 0x6adc
jmp 0x6adc
jmp 0x6bf6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x268(%rbp)
movl %eax, -0x26c(%rbp)
jmp 0x6c45
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x268(%rbp)
movl %eax, -0x26c(%rbp)
leaq -0x3e0(%rbp), %rdi
callq 0x5260
jmp 0x6c45
leaq -0x3a8(%rbp), %rdi
leaq -0x330(%rbp), %rsi
callq 0xaed0
testb $0x1, %al
jne 0x6b34
jmp 0x6b8a
leaq -0x350(%rbp), %rdi
callq 0x5620
testb $0x1, %al
jne 0x6b46
jmp 0x6b86
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
movq 0x10f48a(%rip), %rax    # 0x115fe0
movq (%rax), %rax
movq %rax, -0x438(%rbp)
movq -0x308(%rbp), %rdi
callq 0x5150
movq -0x438(%rbp), %rdi
movq %rax, %rdx
leaq 0xbbdc9(%rip), %rsi     # 0xc2946
movb $0x0, %al
callq 0x5540
jmp 0x6b88
jmp 0x6b88
jmp 0x6bf4
leaq -0x350(%rbp), %rdi
callq 0x5620
testb $0x1, %al
jne 0x6bf2
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
movq 0x10f436(%rip), %rax    # 0x115fe0
movq (%rax), %rax
movq %rax, -0x448(%rbp)
movq -0x308(%rbp), %rdi
callq 0x5150
movq %rax, -0x440(%rbp)
leaq -0x350(%rbp), %rdi
callq 0x5150
movq -0x448(%rbp), %rdi
movq -0x440(%rbp), %rdx
movq %rax, %rcx
leaq 0xbbd67(%rip), %rsi     # 0xc2952
movb $0x0, %al
callq 0x5540
jmp 0x6bf4
jmp 0x6bf6
leaq -0x3a8(%rbp), %rdi
callq 0xaf00
movl $0x0, -0x270(%rbp)
leaq -0x350(%rbp), %rdi
callq 0x5260
leaq -0x330(%rbp), %rdi
callq 0xaf00
movl -0x270(%rbp), %eax
testl %eax, %eax
je 0x6c32
jmp 0x6c30
jmp 0x6c34
jmp 0x6c34
leaq -0x2f8(%rbp), %rdi
callq 0xaf30
jmp 0x6869
leaq -0x3a8(%rbp), %rdi
callq 0xaf00
leaq -0x350(%rbp), %rdi
callq 0x5260
leaq -0x330(%rbp), %rdi
callq 0xaf00
jmp 0x6cab
movl $0x0, -0x270(%rbp)
leaq -0x288(%rbp), %rdi
callq 0xaf50
leaq -0x260(%rbp), %rdi
callq 0x50d0
movl -0x270(%rbp), %eax
testl %eax, %eax
je 0x6c9b
jmp 0x6c99
jmp 0x6c9d
jmp 0x6c9d
leaq -0x48(%rbp), %rdi
callq 0xafb0
jmp 0x665f
leaq -0x288(%rbp), %rdi
callq 0xaf50
leaq -0x260(%rbp), %rdi
callq 0x50d0
jmp 0x6d1a
jmp 0x6cc7
leaq -0x28(%rbp), %rdi
callq 0xafd0
jmp 0x6616
movq 0x10f2e4(%rip), %rax    # 0x115fc0
movq (%rax), %rdi
movl -0x10(%rbp), %ecx
movl -0xc(%rbp), %r8d
movl -0x14(%rbp), %r9d
leaq 0xbbc82(%rip), %rsi     # 0xc2973
leaq 0xbbca1(%rip), %rdx     # 0xc2999
movb $0x0, %al
callq 0x5540
movq 0x10f2ba(%rip), %rax    # 0x115fc0
movq (%rax), %rdi
callq 0x5430
movl -0x10(%rbp), %eax
addq $0x450, %rsp            # imm = 0x450
popq %rbp
retq
movq -0x268(%rbp), %rdi
callq 0x5660
nopw %cs:(%rax,%rax)