// File: Eba-M[P]E3DC-Control/awattar.cpp
// Function: suchenstrompreis(int)
float suchenstrompreis(int x2)
{
    if (strompreis.size() == 1)
        return(strompreis[0].strompreis*10);
    if (strompreis.size() == 2)
    {
        if (x2 >= strompreis[0].stunde&&x2 < strompreis[1].stunde)
            return(strompreis[0].strompreis*10);
        else
            return(strompreis[1].strompreis*10);

    }
    if (strompreis.size() > 2)
    {
        
        for(int x1=0;x1+1<=strompreis.size();x1++)
        {
            if (
                (x2 >= strompreis[x1].stunde&&x2 < strompreis[x1+1].stunde)
                ||
                (x2 >= strompreis[x1].stunde&&x1+1 == strompreis.size())
                )
            {
                return(strompreis[x1].strompreis*10);
                break;
            }
            if (x1+1 == strompreis.size())
                return(strompreis[x1].strompreis*10);
        }
    }
    return(-1);
}

// Assembly:
subq $0x48, %rsp
movl %edi, 0x40(%rsp)
leaq 0x32249(%rip), %rdi     # 0x7a138
callq 0x54b30
cmpq $0x1, %rax
jne 0x47f22
leaq 0x32237(%rip), %rdi     # 0x7a138
xorl %eax, %eax
movl %eax, %esi
callq 0x54b50
movss 0x18112(%rip), %xmm0    # 0x60024
mulss 0x4(%rax), %xmm0
movss %xmm0, 0x44(%rsp)
jmp 0x48146
leaq 0x3220f(%rip), %rdi     # 0x7a138
callq 0x54b30
cmpq $0x2, %rax
jne 0x47fd0
movl 0x40(%rsp), %eax
movl %eax, 0x38(%rsp)
leaq 0x321f1(%rip), %rdi     # 0x7a138
xorl %eax, %eax
movl %eax, %esi
callq 0x54b50
movq %rax, %rcx
movl 0x38(%rsp), %eax
cmpl (%rcx), %eax
jl 0x47fa7
movl 0x40(%rsp), %eax
movl %eax, 0x34(%rsp)
leaq 0x321ce(%rip), %rdi     # 0x7a138
movl $0x1, %esi
callq 0x54b50
movq %rax, %rcx
movl 0x34(%rsp), %eax
cmpl (%rcx), %eax
jge 0x47fa7
leaq 0x321b2(%rip), %rdi     # 0x7a138
xorl %eax, %eax
movl %eax, %esi
callq 0x54b50
movss 0x1808d(%rip), %xmm0    # 0x60024
mulss 0x4(%rax), %xmm0
movss %xmm0, 0x44(%rsp)
jmp 0x48146
leaq 0x3218a(%rip), %rdi     # 0x7a138
movl $0x1, %esi
callq 0x54b50
movss 0x18064(%rip), %xmm0    # 0x60024
mulss 0x4(%rax), %xmm0
movss %xmm0, 0x44(%rsp)
jmp 0x48146
leaq 0x32161(%rip), %rdi     # 0x7a138
callq 0x54b30
cmpq $0x2, %rax
jbe 0x48138
movl $0x0, 0x3c(%rsp)
movl 0x3c(%rsp), %eax
addl $0x1, %eax
cltq
movq %rax, 0x28(%rsp)
leaq 0x32135(%rip), %rdi     # 0x7a138
callq 0x54b30
movq %rax, %rcx
movq 0x28(%rsp), %rax
cmpq %rcx, %rax
ja 0x48136
movl 0x40(%rsp), %eax
movl %eax, 0x24(%rsp)
movslq 0x3c(%rsp), %rsi
leaq 0x3210b(%rip), %rdi     # 0x7a138
callq 0x54b50
movq %rax, %rcx
movl 0x24(%rsp), %eax
cmpl (%rcx), %eax
jl 0x48066
movl 0x40(%rsp), %eax
movl %eax, 0x20(%rsp)
movl 0x3c(%rsp), %eax
addl $0x1, %eax
movslq %eax, %rsi
leaq 0x320e2(%rip), %rdi     # 0x7a138
callq 0x54b50
movq %rax, %rcx
movl 0x20(%rsp), %eax
cmpl (%rcx), %eax
jl 0x480b1
movl 0x40(%rsp), %eax
movl %eax, 0x1c(%rsp)
movslq 0x3c(%rsp), %rsi
leaq 0x320be(%rip), %rdi     # 0x7a138
callq 0x54b50
movq %rax, %rcx
movl 0x1c(%rsp), %eax
cmpl (%rcx), %eax
jl 0x480d7
movl 0x3c(%rsp), %eax
addl $0x1, %eax
cltq
movq %rax, 0x10(%rsp)
leaq 0x32099(%rip), %rdi     # 0x7a138
callq 0x54b30
movq %rax, %rcx
movq 0x10(%rsp), %rax
cmpq %rcx, %rax
jne 0x480d7
movslq 0x3c(%rsp), %rsi
leaq 0x3207b(%rip), %rdi     # 0x7a138
callq 0x54b50
movss 0x17f5a(%rip), %xmm0    # 0x60024
mulss 0x4(%rax), %xmm0
movss %xmm0, 0x44(%rsp)
jmp 0x48146
movl 0x3c(%rsp), %eax
addl $0x1, %eax
cltq
movq %rax, 0x8(%rsp)
leaq 0x3204c(%rip), %rdi     # 0x7a138
callq 0x54b30
movq %rax, %rcx
movq 0x8(%rsp), %rax
cmpq %rcx, %rax
jne 0x48124
movslq 0x3c(%rsp), %rsi
leaq 0x3202e(%rip), %rdi     # 0x7a138
callq 0x54b50
movss 0x17f0d(%rip), %xmm0    # 0x60024
mulss 0x4(%rax), %xmm0
movss %xmm0, 0x44(%rsp)
jmp 0x48146
jmp 0x48126
movl 0x3c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x3c(%rsp)
jmp 0x47fee
jmp 0x48138
movss 0x17ec8(%rip), %xmm0    # 0x60008
movss %xmm0, 0x44(%rsp)
movss 0x44(%rsp), %xmm0
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)