// File: travisdowns[P]avx-turbo/./util.hpp
// Function: double nconc_ratio<__gnu_cxx::__normal_iterator<std::pair<unsigned long, unsigned long>*, std::vector<std::pair<unsigned long, unsigned long>, std::allocator<std::pair<unsigned long, unsigned long>>>>>(__gnu_cxx::__normal_iterator<std::pair<unsigned long, unsigned long>*, std::vector<std::pair<unsigned long, unsigned long>, std::allocator<std::pair<unsigned long, unsigned long>>>>, __gnu_cxx::__normal_iterator<std::pair<unsigned long, unsigned long>*, std::vector<std::pair<unsigned long, unsigned long>, std::allocator<std::pair<unsigned long, unsigned long>>>>, __gnu_cxx::__normal_iterator<std::pair<unsigned long, unsigned long>*, std::vector<std::pair<unsigned long, unsigned long>, std::allocator<std::pair<unsigned long, unsigned long>>>>, __gnu_cxx::__normal_iterator<std::pair<unsigned long, unsigned long>*, std::vector<std::pair<unsigned long, unsigned long>, std::allocator<std::pair<unsigned long, unsigned long>>>>)
static inline double nconc_ratio(Itr starto, Itr stopo, Itr starti, Itr stopi) {
    size_t ocount = std::distance(starto, stopo);
    if (ocount == 0) {
        return 0.0;
    }
    auto conc = nested_concurrency(starto, stopo, starti, stopi);
    // gives a ratio between N and 1 where N is the number of ranges
    double raw_ratio = conc.first/((double)conc.second);
    if (ocount == 1) {
        return raw_ratio;
    }
    return remap(raw_ratio, 1, ocount, 0.0, 1.0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x20290
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0xdc40
xorps %xmm0, %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0xdd1c
movq -0x10(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x58(%rbp), %rdi
movq -0x60(%rbp), %rsi
movq -0x68(%rbp), %rdx
movq -0x70(%rbp), %rcx
callq 0xdd30
movq %rax, -0x50(%rbp)
movq %rdx, -0x48(%rbp)
movaps 0x3238c(%rip), %xmm3    # 0x40010
movq -0x50(%rbp), %xmm0
punpckldq %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1]
movapd 0x3238b(%rip), %xmm2    # 0x40020
subpd %xmm2, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movq -0x48(%rbp), %xmm1
punpckldq %xmm3, %xmm1    # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
subpd %xmm2, %xmm1
movaps %xmm1, %xmm2
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm2, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x78(%rbp)
cmpq $0x1, -0x30(%rbp)
jne 0xdcd8
movsd -0x78(%rbp), %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0xdd1c
movsd -0x78(%rbp), %xmm0
movaps 0x3232c(%rip), %xmm1    # 0x40010
movq -0x30(%rbp), %xmm2
punpckldq %xmm1, %xmm2    # xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1]
movapd 0x3232b(%rip), %xmm1    # 0x40020
subpd %xmm1, %xmm2
movaps %xmm2, %xmm1
unpckhpd %xmm2, %xmm2            # xmm2 = xmm2[1,1]
addsd %xmm1, %xmm2
movsd 0x3232c(%rip), %xmm4    # 0x40038
xorps %xmm3, %xmm3
movaps %xmm4, %xmm1
callq 0xe230
movsd %xmm0, -0x8(%rbp)
movsd -0x8(%rbp), %xmm0
addq $0x80, %rsp
popq %rbp
retq
nopw (%rax,%rax)