// File: /workspace/github_cpp_makefile_star2_O1/Eba-M[P]E3DC-Control/awattar.cpp
// Function: SucheHT(std::vector<watt_s, std::allocator<watt_s>>&, int, long)
void SucheHT(std::vector<watt_s> &w,int ab,long bis)  // ab = Index bis zeitangabe in Minuten oder Sekunden seit 1970
{
    time_t  rawtime;
    struct tm * ptm;
    if (bis < 48*60) {// bis kann entweder Tagesminutensumme oder Sekunden set 1970 sein
    time(&rawtime);
    ptm = gmtime (&rawtime);
    ptm->tm_hour = bis/60;
    if (ptm->tm_hour>24) ptm->tm_hour = ptm->tm_hour-24;
    rawtime = mktime(ptm);
    if (bis/60 > 24)
    rawtime = rawtime + 24*3600;
//    ptm = gmtime (&rawtime);
    } else rawtime = bis;
    high = w[ab];
    low = w[ab];
    h1 = ab;
    l1 = ab;
    time_t  tm_dt;
    int zeit;
    for (int j = ab; ((j < w.size())&&(w[j].hh<=rawtime)); j++ )
    {
// Suchen nach Hoch und Tiefs
        zeit = w[j].hh%(24*3600)/60;
        if (w[j].pp > high.pp) {
            high = w[j];
            h1 = j;
        } else
          if  (w[j].pp < low.pp) {
              low = w[j];
              l1 = j;
          }
    }
    time(&rawtime);
    ptm = gmtime (&rawtime);

    return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
cmpq $0xb3f, %rdx            # imm = 0xB3F
jg 0x24fc9
movq %rsp, %r15
movq %r15, %rdi
callq 0x2250
movq %r15, %rdi
callq 0x2220
movq %rax, %rdi
movabsq $-0x7777777777777777, %rcx # imm = 0x8888888888888889
movq %r14, %rax
imulq %rcx
addq %r14, %rdx
movq %rdx, %rax
shrq $0x3f, %rax
shrq $0x5, %rdx
leal (%rdx,%rax), %ecx
cmpl $0x19, %ecx
leal -0x18(%rdx,%rax), %eax
cmovll %ecx, %eax
movl %eax, 0x8(%rdi)
callq 0x2180
movq %rax, (%r15)
cmpq $0x5dc, %r14            # imm = 0x5DC
jl 0x24fcd
addq $0x15180, %rax          # imm = 0x15180
movq %rax, (%rsp)
jmp 0x24fcd
movq %r14, (%rsp)
movslq %ebp, %rax
movq (%rbx), %rsi
leaq (%rax,%rax,2), %rdi
movq 0x10(%rsi,%rdi,8), %rcx
movq %rcx, 0x2013d(%rip)     # 0x45120
movups (%rsi,%rdi,8), %xmm0
movups %xmm0, 0x20122(%rip)    # 0x45110
movq 0x10(%rsi,%rdi,8), %rcx
movq %rcx, 0x2013e(%rip)     # 0x45138
movups (%rsi,%rdi,8), %xmm0
movups %xmm0, 0x20123(%rip)    # 0x45128
movl %eax, 0x20135(%rip)     # 0x45140
movl %eax, 0x20133(%rip)     # 0x45144
movq 0x8(%rbx), %rdx
subq %rsi, %rdx
sarq $0x3, %rdx
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rdx, %rcx
cmpq %rax, %rcx
jbe 0x250a6
movq (%rsp), %rdx
leaq (%rsi,%rdi,8), %rsi
leaq 0x20102(%rip), %rdi     # 0x45140
leaq 0x200ff(%rip), %r8      # 0x45144
cmpq %rdx, (%rsi)
jg 0x250a6
movss 0x8(%rsi), %xmm0
ucomiss 0x200c2(%rip), %xmm0    # 0x45118
jbe 0x25072
movq 0x10(%rsi), %r9
movq %r9, 0x200bd(%rip)      # 0x45120
movups (%rsi), %xmm0
movups %xmm0, 0x200a3(%rip)    # 0x45110
movq %rdi, %r9
jmp 0x25097
movss 0x200b6(%rip), %xmm1    # 0x45130
ucomiss %xmm0, %xmm1
jbe 0x2509a
movq 0x10(%rsi), %r9
movq %r9, 0x200ae(%rip)      # 0x45138
movups (%rsi), %xmm0
movups %xmm0, 0x20094(%rip)    # 0x45128
movq %r8, %r9
movl %eax, (%r9)
incq %rax
addq $0x18, %rsi
cmpq %rax, %rcx
ja 0x25045
movq %rsp, %rbx
movq %rbx, %rdi
callq 0x2250
movq %rbx, %rdi
callq 0x2220
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq