// File: Eba-M[P]E3DC-Control/awattar.cpp
// Function: SucheDiff(std::vector<watt_s, std::allocator<watt_s>>&, int, float, float)
bool SucheDiff(std::vector<watt_s> &w,int ab, float aufschlag,float Diff)  // ab = Index bis Diff zwischen high und low erreicht
{
    high = w[ab];
    low = w[ab];
    h1 = ab;
    l1 = ab;
 
    for (int j = ab; (j < w.size()); j++ )
    {
// Suchen nach Hoch und Tiefs
        if (w[j].pp > high.pp) {
            high = w[j];
            h1 = j;
        } else
          if  (w[j].pp < low.pp) {
              low = w[j];
              l1 = j;
          }
        float erg = (low.pp )*(aufschlag-1)+ Diff;
        if ((high.pp - low.pp) > (low.pp)*(aufschlag-1)+ Diff)
        return true;
    }

    return false;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movl %esi, 0x24(%rsp)
movss %xmm0, 0x20(%rsp)
movss %xmm1, 0x1c(%rsp)
movq 0x28(%rsp), %rdi
movslq 0x24(%rsp), %rsi
callq 0x1ce20
movq (%rax), %rcx
movq %rcx, 0x35f0e(%rip)     # 0x7a170
movq 0x8(%rax), %rcx
movq %rcx, 0x35f0b(%rip)     # 0x7a178
movq 0x10(%rax), %rax
movq %rax, 0x35f08(%rip)     # 0x7a180
movq 0x28(%rsp), %rdi
movslq 0x24(%rsp), %rsi
callq 0x1ce20
movq (%rax), %rcx
movq %rcx, 0x35ef7(%rip)     # 0x7a188
movq 0x8(%rax), %rcx
movq %rcx, 0x35ef4(%rip)     # 0x7a190
movq 0x10(%rax), %rax
movq %rax, 0x35ef1(%rip)     # 0x7a198
movl 0x24(%rsp), %eax
movl %eax, 0x35eef(%rip)     # 0x7a1a0
movl 0x24(%rsp), %eax
movl %eax, 0x35ee9(%rip)     # 0x7a1a4
movl 0x24(%rsp), %eax
movl %eax, 0x18(%rsp)
movslq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x28(%rsp), %rdi
callq 0x1ce80
movq %rax, %rcx
movq 0x8(%rsp), %rax
cmpq %rcx, %rax
jae 0x44420
movq 0x28(%rsp), %rdi
movslq 0x18(%rsp), %rsi
callq 0x1ce20
movss 0x8(%rax), %xmm0
ucomiss 0x35e75(%rip), %xmm0    # 0x7a178
jbe 0x44340
movq 0x28(%rsp), %rdi
movslq 0x18(%rsp), %rsi
callq 0x1ce20
movq (%rax), %rcx
movq %rcx, 0x35e52(%rip)     # 0x7a170
movq 0x8(%rax), %rcx
movq %rcx, 0x35e4f(%rip)     # 0x7a178
movq 0x10(%rax), %rax
movq %rax, 0x35e4c(%rip)     # 0x7a180
movl 0x18(%rsp), %eax
movl %eax, 0x35e62(%rip)     # 0x7a1a0
jmp 0x4439c
movq 0x28(%rsp), %rdi
movslq 0x18(%rsp), %rsi
callq 0x1ce20
movss 0x8(%rax), %xmm1
movss 0x35e34(%rip), %xmm0    # 0x7a190
ucomiss %xmm1, %xmm0
jbe 0x4439a
movq 0x28(%rsp), %rdi
movslq 0x18(%rsp), %rsi
callq 0x1ce20
movq (%rax), %rcx
movq %rcx, 0x35e0e(%rip)     # 0x7a188
movq 0x8(%rax), %rcx
movq %rcx, 0x35e0b(%rip)     # 0x7a190
movq 0x10(%rax), %rax
movq %rax, 0x35e08(%rip)     # 0x7a198
movl 0x18(%rsp), %eax
movl %eax, 0x35e0a(%rip)     # 0x7a1a4
jmp 0x4439c
movss 0x35dec(%rip), %xmm0    # 0x7a190
movss 0x20(%rsp), %xmm2
movss 0x1bc6a(%rip), %xmm1    # 0x6001c
subss %xmm1, %xmm2
movss 0x1c(%rsp), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, 0x14(%rsp)
movss 0x35da6(%rip), %xmm0    # 0x7a178
subss 0x35db6(%rip), %xmm0    # 0x7a190
movss 0x35dae(%rip), %xmm1    # 0x7a190
movss 0x20(%rsp), %xmm3
movss 0x1bc2c(%rip), %xmm2    # 0x6001c
subss %xmm2, %xmm3
movss 0x1c(%rsp), %xmm2
mulss %xmm3, %xmm1
addss %xmm2, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x4440e
movb $0x1, 0x37(%rsp)
jmp 0x44425
jmp 0x44410
movl 0x18(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x18(%rsp)
jmp 0x442c3
movb $0x0, 0x37(%rsp)
movb 0x37(%rsp), %al
andb $0x1, %al
addq $0x38, %rsp
retq