// File: travisdowns[P]avx-turbo/avx-turbo.cpp
// Function: make_default_tests(ISA, std::vector<int, std::allocator<int>>)
std::vector<test_spec> make_default_tests(ISA isas_supported, std::vector<int> cpus) {
    std::vector<test_spec> ret;

    size_t maxcpus;
    if (arg_max_threads) {
        auto max = arg_max_threads.Get();
        if (max > (int)cpus.size()) {
            printf("WARNING: can't run the requested number of threads (%d) because there are only %d available logical CPUs.\n",
                    max, (int)cpus.size());
            maxcpus = (int)cpus.size();
        } else {
            maxcpus = max;
        }
    } else {
        maxcpus = cpus.size();
    }

    printf("Will test up to %lu CPUs\n", maxcpus);

    auto try_add = [&ret](const test_func& t, size_t thread_count) {
        test_spec spec(t.id, t.description);
        spec.thread_funcs.resize(thread_count, t); // fill with thread_count copies of t
        ret.push_back(std::move(spec));
    };

    std::vector<test_func> funcs; // the selected test functions
    if (arg_focus) {
        for (auto& focus : split(arg_focus.Get(), ",")) {
            auto t = find_one_test(focus);
            if (!t) {
                printf("WARNING: Can't find specified test: %s\n", focus.c_str());
            } else {
                funcs.push_back(*t);
            }
        }
    } else {
        funcs.insert(funcs.begin(), std::begin(ALL_FUNCS), std::end(ALL_FUNCS));
    }

    for (size_t thread_count = arg_min_threads.Get(); thread_count <= maxcpus; thread_count++) {
        for (const auto& t : funcs) {
            if (should_run(t, isas_supported)) {
                try_add(t, thread_count);
            }
        }
    }

    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x160, %rsp            # imm = 0x160
movq %rdx, -0x120(%rbp)
movq %rdi, -0x118(%rbp)
movq %rdi, %rax
movq %rax, -0x110(%rbp)
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movb $0x0, -0x19(%rbp)
callq 0x10ec0
leaq 0x51902(%rip), %rdi     # 0x5c0f0
callq 0x10ee0
testb $0x1, %al
jne 0xa7fc
jmp 0xa88b
leaq 0x518ed(%rip), %rdi     # 0x5c0f0
callq 0x10f00
movq -0x120(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, -0x124(%rbp)
callq 0x10f20
movq %rax, %rcx
movl -0x124(%rbp), %eax
cmpl %ecx, %eax
jle 0xa881
movq -0x120(%rbp), %rdi
movl -0x2c(%rbp), %eax
movl %eax, -0x128(%rbp)
callq 0x10f20
movl -0x128(%rbp), %esi
movl %eax, %edx
leaq 0x35d3f(%rip), %rdi     # 0x40592
xorl %eax, %eax
callq 0x7080
jmp 0xa85c
movq -0x120(%rbp), %rdi
callq 0x10f20
cltq
movq %rax, -0x28(%rbp)
jmp 0xa889
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0xac26
movslq -0x2c(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0xa89b
movq -0x120(%rbp), %rdi
callq 0x10f20
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rsi
leaq 0x35d57(%rip), %rdi     # 0x405fd
xorl %eax, %eax
callq 0x7080
jmp 0xa8af
movq -0x118(%rbp), %rax
movq %rax, -0x48(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x10f40
leaq 0x5149e(%rip), %rdi     # 0x5bd68
callq 0x10ee0
testb $0x1, %al
jne 0xa8d8
jmp 0xaa76
leaq 0x51489(%rip), %rdi     # 0x5bd68
callq 0x10f60
movq %rax, -0x138(%rbp)
leaq -0xa1(%rbp), %rdi
movq %rdi, -0x130(%rbp)
callq 0x77c0
movq -0x130(%rbp), %rdx
leaq 0x35d0b(%rip), %rsi     # 0x40617
leaq -0xa0(%rbp), %rdi
callq 0x7630
jmp 0xa91a
movq -0x138(%rbp), %rsi
leaq -0x80(%rbp), %rdi
leaq -0xa0(%rbp), %rdx
callq 0xac40
jmp 0xa933
leaq -0xa0(%rbp), %rdi
callq 0x7290
leaq -0xa1(%rbp), %rdi
callq 0x74d0
leaq -0x80(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rdi
callq 0x10f80
movq %rax, -0xb0(%rbp)
movq -0x68(%rbp), %rdi
callq 0x10fb0
movq %rax, -0xb8(%rbp)
leaq -0xb0(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
callq 0x10fe0
testb $0x1, %al
jne 0xa9cf
leaq -0x80(%rbp), %rdi
callq 0x110d0
jmp 0xaa71
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0xa9be
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x7290
leaq -0xa1(%rbp), %rdi
callq 0x74d0
jmp 0xabff
leaq -0xb0(%rbp), %rdi
callq 0x11020
movq %rax, -0xc0(%rbp)
movq -0xc0(%rbp), %rdi
callq 0xa720
movq %rax, -0x140(%rbp)
jmp 0xa9f7
movq -0x140(%rbp), %rax
movq %rax, -0xc8(%rbp)
cmpq $0x0, -0xc8(%rbp)
jne 0xaa4a
movq -0xc0(%rbp), %rdi
callq 0x71a0
movq %rax, %rsi
leaq 0x35bf4(%rip), %rdi     # 0x40619
xorl %eax, %eax
callq 0x7080
jmp 0xaa2e
jmp 0xaa5e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x110d0
jmp 0xabff
movq -0xc8(%rbp), %rsi
leaq -0x60(%rbp), %rdi
callq 0x11040
jmp 0xaa5c
jmp 0xaa5e
jmp 0xaa60
leaq -0xb0(%rbp), %rdi
callq 0x110b0
jmp 0xa973
jmp 0xab0d
leaq -0x60(%rbp), %rdi
movq %rdi, -0x158(%rbp)
callq 0x111d0
movq %rax, -0xd8(%rbp)
leaq -0xd0(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
callq 0x11200
leaq 0x4f549(%rip), %rdi     # 0x59ff0
movq %rdi, -0x160(%rbp)
callq 0x11240
movq -0x160(%rbp), %rdi
movq %rax, -0x150(%rbp)
callq 0x11250
movq -0x158(%rbp), %rdi
movq -0x150(%rbp), %rdx
movq %rax, %rcx
movq -0xd0(%rbp), %rsi
callq 0x11130
movq %rax, -0x148(%rbp)
jmp 0xaaec
movq -0x148(%rbp), %rax
movq %rax, -0xe0(%rbp)
jmp 0xab0d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0xabff
leaq 0x5150c(%rip), %rdi     # 0x5c020
callq 0x10f00
movslq (%rax), %rax
movq %rax, -0xe8(%rbp)
movq -0xe8(%rbp), %rax
cmpq -0x28(%rbp), %rax
ja 0xabea
leaq -0x60(%rbp), %rax
movq %rax, -0xf0(%rbp)
movq -0xf0(%rbp), %rdi
callq 0x111d0
movq %rax, -0xf8(%rbp)
movq -0xf0(%rbp), %rdi
callq 0x11270
movq %rax, -0x100(%rbp)
leaq -0xf8(%rbp), %rdi
leaq -0x100(%rbp), %rsi
callq 0x112a0
testb $0x1, %al
jne 0xab7e
jmp 0xabd1
leaq -0xf8(%rbp), %rdi
callq 0x112e0
movq %rax, -0x108(%rbp)
movq -0x108(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0xa6f0
testb $0x1, %al
jne 0xaba6
jmp 0xabc1
movq -0x108(%rbp), %rsi
movq -0xe8(%rbp), %rdx
leaq -0x48(%rbp), %rdi
callq 0xadb0
jmp 0xabbf
jmp 0xabc1
jmp 0xabc3
leaq -0xf8(%rbp), %rdi
callq 0x11300
jmp 0xab65
jmp 0xabd3
movq -0xe8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xe8(%rbp)
jmp 0xab23
movb $0x1, -0x19(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x11320
testb $0x1, -0x19(%rbp)
jne 0xac16
jmp 0xac0a
leaq -0x60(%rbp), %rdi
callq 0x11320
jmp 0xac26
movq -0x118(%rbp), %rdi
callq 0x11380
movq -0x110(%rbp), %rax
addq $0x160, %rsp            # imm = 0x160
popq %rbp
retq
movq -0x118(%rbp), %rdi
callq 0x11380
movq -0x38(%rbp), %rdi
callq 0x77b0
nopl (%rax,%rax)