// File: travisdowns[P]avx-turbo/avx-turbo.cpp
// Function: make_from_spec(ISA, std::vector<int, std::allocator<int>>)
std::vector<test_spec> make_from_spec(ISA, std::vector<int> cpus) {
    std::string str = arg_spec.Get();
    if (verbose) printf("Making tests from spec string: %s\n", str.c_str());

    test_spec spec{str, "<multiple descriptions>"};
    for (auto& elem : split(str,",")) {
        if (verbose) printf("Elem: %s\n", elem.c_str());
        std::vector<std::string> halves = split(elem,"/");
        assert(halves.size() > 0);
        if (halves.size() > 2) {
            throw std::runtime_error(std::string("bad spec syntax in element: '" + elem + "'"));
        }
        int count = (halves.size() == 1 ? 1 : std::atoi(halves[1].c_str()));
        const test_func* test = find_one_test(halves[0]);
        if (!test) {
            throw std::runtime_error("couldn't find test: '" + halves[0] + "'");
        }

        spec.thread_funcs.insert(spec.thread_funcs.end(), count, *test);
    }

    if (spec.count() > cpus.size()) {
        printf("ERROR: this spec requires %d CPUs but only %d are available.\n", (int)spec.count(), (int)cpus.size());
        exit(EXIT_FAILURE);
    }

    return {spec};
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x380, %rsp            # imm = 0x380
movq %rdx, -0x2c8(%rbp)
movq %rdi, -0x2c0(%rbp)
movq %rdi, %rax
movq %rax, -0x2b8(%rbp)
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
leaq 0x50eb3(%rip), %rdi     # 0x5be58
callq 0x10f60
movq %rax, %rsi
leaq -0x38(%rbp), %rdi
callq 0x71b0
testb $0x1, 0x513ab(%rip)     # 0x5c368
je 0xafee
leaq -0x38(%rbp), %rdi
callq 0x71a0
movq %rax, %rsi
leaq 0x3566f(%rip), %rdi     # 0x40641
xorl %eax, %eax
callq 0x7080
jmp 0xafdb
jmp 0xafee
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xb83b
leaq -0xc0(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x71b0
jmp 0xb000
leaq -0xe1(%rbp), %rdi
movq %rdi, -0x2d0(%rbp)
callq 0x77c0
movq -0x2d0(%rbp), %rdx
leaq 0x35643(%rip), %rsi     # 0x40664
leaq -0xe0(%rbp), %rdi
callq 0x7630
jmp 0xb02f
leaq -0xa0(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
leaq -0xe0(%rbp), %rdx
callq 0x113e0
jmp 0xb04b
leaq -0xe0(%rbp), %rdi
callq 0x7290
leaq -0xe1(%rbp), %rdi
callq 0x74d0
leaq -0xc0(%rbp), %rdi
callq 0x7290
leaq -0x129(%rbp), %rdi
movq %rdi, -0x2d8(%rbp)
callq 0x77c0
movq -0x2d8(%rbp), %rdx
leaq 0x35587(%rip), %rsi     # 0x40617
leaq -0x128(%rbp), %rdi
callq 0x7630
jmp 0xb09e
leaq -0x108(%rbp), %rdi
leaq -0x38(%rbp), %rsi
leaq -0x128(%rbp), %rdx
callq 0xac40
jmp 0xb0b7
leaq -0x128(%rbp), %rdi
callq 0x7290
leaq -0x129(%rbp), %rdi
callq 0x74d0
leaq -0x108(%rbp), %rax
movq %rax, -0xf0(%rbp)
movq -0xf0(%rbp), %rdi
callq 0x10f80
movq %rax, -0x138(%rbp)
movq -0xf0(%rbp), %rdi
callq 0x10fb0
movq %rax, -0x140(%rbp)
leaq -0x138(%rbp), %rdi
leaq -0x140(%rbp), %rsi
callq 0x10fe0
testb $0x1, %al
jne 0xb1a9
leaq -0x108(%rbp), %rdi
callq 0x110d0
jmp 0xb5fb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xb155
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0xe0(%rbp), %rdi
callq 0x7290
leaq -0xe1(%rbp), %rdi
callq 0x74d0
leaq -0xc0(%rbp), %rdi
callq 0x7290
jmp 0xb83b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xb198
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x128(%rbp), %rdi
callq 0x7290
leaq -0x129(%rbp), %rdi
callq 0x74d0
jmp 0xb82f
leaq -0x138(%rbp), %rdi
callq 0x11020
movq %rax, -0x148(%rbp)
testb $0x1, 0x511a5(%rip)     # 0x5c368
je 0xb1f7
movq -0x148(%rbp), %rdi
callq 0x71a0
movq %rax, %rsi
leaq 0x354a1(%rip), %rdi     # 0x4067c
xorl %eax, %eax
callq 0x7080
jmp 0xb1e4
jmp 0xb1f7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xb5ea
movq -0x148(%rbp), %rax
movq %rax, -0x2e8(%rbp)
leaq -0x181(%rbp), %rdi
movq %rdi, -0x2e0(%rbp)
callq 0x77c0
movq -0x2e0(%rbp), %rdx
leaq 0x35460(%rip), %rsi     # 0x40686
leaq -0x180(%rbp), %rdi
callq 0x7630
jmp 0xb234
movq -0x2e8(%rbp), %rsi
leaq -0x160(%rbp), %rdi
leaq -0x180(%rbp), %rdx
callq 0xac40
jmp 0xb250
leaq -0x180(%rbp), %rdi
callq 0x7290
leaq -0x181(%rbp), %rdi
callq 0x74d0
leaq -0x160(%rbp), %rdi
callq 0x11450
cmpq $0x0, %rax
jbe 0xb27c
jmp 0xb2d2
leaq 0x35405(%rip), %rdi     # 0x40688
leaq 0x35410(%rip), %rsi     # 0x4069a
movl $0x216, %edx            # imm = 0x216
leaq 0x35412(%rip), %rcx     # 0x406a8
callq 0x72e0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xb2c1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x180(%rbp), %rdi
callq 0x7290
leaq -0x181(%rbp), %rdi
callq 0x74d0
jmp 0xb5ea
leaq -0x160(%rbp), %rdi
callq 0x11450
cmpq $0x2, %rax
jbe 0xb3cf
movb $0x1, -0x1c9(%rbp)
movl $0x10, %edi
callq 0x7210
movq %rax, -0x2f0(%rbp)
movq -0x148(%rbp), %rdx
leaq 0x353d7(%rip), %rsi     # 0x406e5
leaq -0x1c8(%rbp), %rdi
callq 0x114c0
jmp 0xb31c
leaq 0x3643e(%rip), %rdx     # 0x41761
leaq -0x1a8(%rbp), %rdi
leaq -0x1c8(%rbp), %rsi
callq 0x11470
jmp 0xb338
movq -0x2f0(%rbp), %rdi
leaq -0x1a8(%rbp), %rsi
callq 0x7720
jmp 0xb34d
movq -0x2f0(%rbp), %rdi
movb $0x0, -0x1c9(%rbp)
movq 0x4fc96(%rip), %rsi     # 0x5aff8
movq 0x4fc57(%rip), %rdx     # 0x5afc0
callq 0x7790
jmp 0xb84d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xb3b3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xb3a7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x1a8(%rbp), %rdi
callq 0x7290
leaq -0x1c8(%rbp), %rdi
callq 0x7290
testb $0x1, -0x1c9(%rbp)
jne 0xb3be
jmp 0xb3ca
movq -0x2f0(%rbp), %rdi
callq 0x7350
jmp 0xb5de
leaq -0x160(%rbp), %rdi
callq 0x11450
cmpq $0x1, %rax
jne 0xb3ee
movl $0x1, %eax
movl %eax, -0x2f4(%rbp)
jmp 0xb415
leaq -0x160(%rbp), %rdi
movl $0x1, %esi
callq 0x115d0
movq %rax, %rdi
callq 0x71a0
movq %rax, %rdi
callq 0x76e0
movl %eax, -0x2f4(%rbp)
movl -0x2f4(%rbp), %eax
movl %eax, -0x1d0(%rbp)
xorl %eax, %eax
movl %eax, %esi
leaq -0x160(%rbp), %rdi
callq 0x115d0
movq %rax, %rdi
callq 0xa720
movq %rax, -0x300(%rbp)
jmp 0xb442
movq -0x300(%rbp), %rax
movq %rax, -0x1d8(%rbp)
cmpq $0x0, -0x1d8(%rbp)
jne 0xb55f
movb $0x1, -0x219(%rbp)
movl $0x10, %edi
callq 0x7210
movq %rax, -0x308(%rbp)
xorl %eax, %eax
movl %eax, %esi
leaq -0x160(%rbp), %rdi
callq 0x115d0
movq %rax, %rdx
leaq 0x35273(%rip), %rsi     # 0x40703
leaq -0x218(%rbp), %rdi
callq 0x114c0
jmp 0xb49e
leaq 0x362bc(%rip), %rdx     # 0x41761
leaq -0x1f8(%rbp), %rdi
leaq -0x218(%rbp), %rsi
callq 0x11470
jmp 0xb4ba
movq -0x308(%rbp), %rdi
leaq -0x1f8(%rbp), %rsi
callq 0x7720
jmp 0xb4cf
movq -0x308(%rbp), %rdi
movb $0x0, -0x219(%rbp)
movq 0x4fb14(%rip), %rsi     # 0x5aff8
movq 0x4fad5(%rip), %rdx     # 0x5afc0
callq 0x7790
jmp 0xb84d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xb5de
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xb546
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xb53a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x1f8(%rbp), %rdi
callq 0x7290
leaq -0x218(%rbp), %rdi
callq 0x7290
testb $0x1, -0x219(%rbp)
jne 0xb551
jmp 0xb55d
movq -0x308(%rbp), %rdi
callq 0x7350
jmp 0xb5de
leaq -0x60(%rbp), %rdi
movq %rdi, -0x318(%rbp)
callq 0x11270
movq %rax, -0x230(%rbp)
leaq -0x228(%rbp), %rdi
leaq -0x230(%rbp), %rsi
callq 0x11200
movq -0x318(%rbp), %rdi
movslq -0x1d0(%rbp), %rdx
movq -0x1d8(%rbp), %rcx
movq -0x228(%rbp), %rsi
callq 0x115f0
movq %rax, -0x310(%rbp)
jmp 0xb5b3
movq -0x310(%rbp), %rax
movq %rax, -0x238(%rbp)
leaq -0x160(%rbp), %rdi
callq 0x110d0
leaq -0x138(%rbp), %rdi
callq 0x110b0
jmp 0xb103
leaq -0x160(%rbp), %rdi
callq 0x110d0
leaq -0x108(%rbp), %rdi
callq 0x110d0
jmp 0xb82f
leaq -0xa0(%rbp), %rdi
callq 0x11690
movq %rax, -0x320(%rbp)
jmp 0xb610
movq -0x2c8(%rbp), %rdi
callq 0x10f20
movq %rax, %rcx
movq -0x320(%rbp), %rax
cmpq %rcx, %rax
jbe 0xb68c
leaq -0xa0(%rbp), %rdi
callq 0x11690
movq %rax, -0x328(%rbp)
jmp 0xb640
movq -0x2c8(%rbp), %rdi
movq -0x328(%rbp), %rax
movl %eax, -0x32c(%rbp)
callq 0x10f20
movl -0x32c(%rbp), %esi
movl %eax, %edx
leaq 0x350b1(%rip), %rdi     # 0x40719
xorl %eax, %eax
callq 0x7080
jmp 0xb671
movl $0x1, %edi
callq 0x7550
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xb82f
leaq -0x2a0(%rbp), %rdi
movq %rdi, -0x2a8(%rbp)
leaq -0xa0(%rbp), %rsi
callq 0x116b0
jmp 0xb6a8
leaq -0x2a0(%rbp), %rax
movq %rax, -0x248(%rbp)
movq $0x1, -0x240(%rbp)
leaq -0x2a9(%rbp), %rdi
movq %rdi, -0x338(%rbp)
callq 0x11790
movq -0x2c0(%rbp), %rdi
movq -0x338(%rbp), %rcx
movq -0x248(%rbp), %rsi
movq -0x240(%rbp), %rdx
callq 0x117b0
jmp 0xb6f7
leaq -0x2a9(%rbp), %rdi
callq 0x11830
leaq -0x2a0(%rbp), %rax
movq %rax, -0x348(%rbp)
addq $0x58, %rax
movq %rax, -0x340(%rbp)
movq -0x340(%rbp), %rdi
addq $-0x58, %rdi
movq %rdi, -0x350(%rbp)
callq 0x11750
movq -0x348(%rbp), %rcx
movq -0x350(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x340(%rbp)
jne 0xb71c
leaq -0xa0(%rbp), %rdi
callq 0x11750
leaq -0x38(%rbp), %rdi
callq 0x7290
movq -0x2b8(%rbp), %rax
addq $0x380, %rsp            # imm = 0x380
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
movq -0x2a8(%rbp), %rax
leaq -0x2a0(%rbp), %rcx
cmpq %rax, %rcx
movq %rax, -0x358(%rbp)
je 0xb7c9
movq -0x358(%rbp), %rdi
addq $-0x58, %rdi
movq %rdi, -0x360(%rbp)
callq 0x11750
movq -0x360(%rbp), %rax
leaq -0x2a0(%rbp), %rcx
cmpq %rcx, %rax
movq %rax, -0x358(%rbp)
jne 0xb798
jmp 0xb82f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x2a9(%rbp), %rdi
callq 0x11830
leaq -0x2a0(%rbp), %rax
movq %rax, -0x370(%rbp)
addq $0x58, %rax
movq %rax, -0x368(%rbp)
movq -0x368(%rbp), %rdi
addq $-0x58, %rdi
movq %rdi, -0x378(%rbp)
callq 0x11750
movq -0x370(%rbp), %rcx
movq -0x378(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x368(%rbp)
jne 0xb7fc
jmp 0xb82f
leaq -0xa0(%rbp), %rdi
callq 0x11750
leaq -0x38(%rbp), %rdi
callq 0x7290
movq -0x40(%rbp), %rdi
callq 0x77b0
nopl (%rax)