// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/network.c
// Function: get_current_rate
float get_current_rate(network *net)
{
    size_t batch_num = get_current_batch(net);
    int i;
    float rate;
    if (batch_num < net->burn_in) return net->learning_rate * pow((float)batch_num / net->burn_in, net->power);
    switch (net->policy) {
        case CONSTANT:
            return net->learning_rate;
        case STEP:
            return net->learning_rate * pow(net->scale, batch_num/net->step);
        case STEPS:
            rate = net->learning_rate;
            for(i = 0; i < net->num_steps; ++i){
                if(net->steps[i] > batch_num) return rate;
                rate *= net->scales[i];
            }
            return rate;
        case EXP:
            return net->learning_rate * pow(net->gamma, batch_num);
        case POLY:
            return net->learning_rate * pow(1 - (float)batch_num / net->max_batches, net->power);
        case RANDOM:
            return net->learning_rate * pow(rand_uniform(0,1), net->power);
        case SIG:
            return net->learning_rate * (1./(1.+exp(net->gamma*(batch_num - net->step))));
        default:
            fprintf(stderr, "Policy is weird!\n");
            return net->learning_rate;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x39ad0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movslq 0x6c(%rcx), %rcx
cmpq %rcx, %rax
jae 0x39c1e
movq -0x10(%rbp), %rax
movss 0x34(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq %rax, %rdx
shrq %rdx
movl %eax, %ecx
andl $0x1, %ecx
orq %rdx, %rcx
cvtsi2ss %rcx, %xmm0
addss %xmm0, %xmm0
cvtsi2ss %rax, %xmm1
movss %xmm1, -0x28(%rbp)
testq %rax, %rax
movss %xmm0, -0x24(%rbp)
js 0x39bdc
movss -0x28(%rbp), %xmm0
movss %xmm0, -0x24(%rbp)
movss -0x24(%rbp), %xmm0
movq -0x10(%rbp), %rax
cvtsi2ssl 0x6c(%rax), %xmm1
divss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
movq -0x10(%rbp), %rax
movss 0x48(%rax), %xmm1
cvtss2sd %xmm1, %xmm1
callq 0x30e0
movaps %xmm0, %xmm1
movsd -0x30(%rbp), %xmm0
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x4(%rbp)
jmp 0x39f57
movq -0x10(%rbp), %rax
movl 0x30(%rax), %eax
movq %rax, -0x38(%rbp)
subq $0x6, %rax
ja 0x39f31
movq -0x38(%rbp), %rax
leaq 0x3a8a2(%rip), %rcx     # 0x744e0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x10(%rbp), %rax
movss 0x34(%rax), %xmm0
movss %xmm0, -0x4(%rbp)
jmp 0x39f57
movq -0x10(%rbp), %rcx
movss 0x34(%rcx), %xmm1
movss 0x44(%rcx), %xmm0
cvtss2sd %xmm1, %xmm1
movsd %xmm1, -0x40(%rbp)
cvtss2sd %xmm0, %xmm0
movq -0x18(%rbp), %rax
movslq 0x50(%rcx), %rcx
xorl %edx, %edx
divq %rcx
movq %rax, %xmm1
movaps 0x3a832(%rip), %xmm2    # 0x744c0
punpckldq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
movapd 0x3a836(%rip), %xmm2    # 0x744d0
subpd %xmm2, %xmm1
movaps %xmm1, %xmm2
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm2, %xmm1
callq 0x30e0
movaps %xmm0, %xmm1
movsd -0x40(%rbp), %xmm0
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x4(%rbp)
jmp 0x39f57
movq -0x10(%rbp), %rax
movss 0x34(%rax), %xmm0
movss %xmm0, -0x20(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x68(%rcx), %eax
jge 0x39d34
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rax
movslq -0x1c(%rbp), %rcx
movslq (%rax,%rcx,4), %rax
cmpq -0x18(%rbp), %rax
jbe 0x39d0e
movss -0x20(%rbp), %xmm0
movss %xmm0, -0x4(%rbp)
jmp 0x39f57
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movslq -0x1c(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
mulss -0x20(%rbp), %xmm0
movss %xmm0, -0x20(%rbp)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x39cdd
movss -0x20(%rbp), %xmm0
movss %xmm0, -0x4(%rbp)
jmp 0x39f57
movq -0x10(%rbp), %rax
movss 0x34(%rax), %xmm1
movss 0x40(%rax), %xmm0
cvtss2sd %xmm1, %xmm1
movsd %xmm1, -0x48(%rbp)
cvtss2sd %xmm0, %xmm0
movaps 0x3a75b(%rip), %xmm2    # 0x744c0
movq -0x18(%rbp), %xmm1
punpckldq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
movapd 0x3a75a(%rip), %xmm2    # 0x744d0
subpd %xmm2, %xmm1
movaps %xmm1, %xmm2
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm2, %xmm1
callq 0x30e0
movaps %xmm0, %xmm1
movsd -0x48(%rbp), %xmm0
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x4(%rbp)
jmp 0x39f57
movq -0x10(%rbp), %rax
movss 0x34(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, -0x58(%rbp)
movq -0x18(%rbp), %rax
movq %rax, %rdx
shrq %rdx
movl %eax, %ecx
andl $0x1, %ecx
orq %rdx, %rcx
cvtsi2ss %rcx, %xmm0
addss %xmm0, %xmm0
cvtsi2ss %rax, %xmm1
movss %xmm1, -0x50(%rbp)
testq %rax, %rax
movss %xmm0, -0x4c(%rbp)
js 0x39def
movss -0x50(%rbp), %xmm0
movss %xmm0, -0x4c(%rbp)
movss -0x4c(%rbp), %xmm1
movq -0x10(%rbp), %rax
cvtsi2ssl 0x54(%rax), %xmm0
divss %xmm0, %xmm1
movss 0x37203(%rip), %xmm0    # 0x7100c
subss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
movq -0x10(%rbp), %rax
movss 0x48(%rax), %xmm1
cvtss2sd %xmm1, %xmm1
callq 0x30e0
movaps %xmm0, %xmm1
movsd -0x58(%rbp), %xmm0
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x4(%rbp)
jmp 0x39f57
movq -0x10(%rbp), %rax
movss 0x34(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, -0x60(%rbp)
xorps %xmm0, %xmm0
movss 0x371b2(%rip), %xmm1    # 0x7100c
callq 0x5b30
cvtss2sd %xmm0, %xmm0
movq -0x10(%rbp), %rax
movss 0x48(%rax), %xmm1
cvtss2sd %xmm1, %xmm1
callq 0x30e0
movaps %xmm0, %xmm1
movsd -0x60(%rbp), %xmm0
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x4(%rbp)
jmp 0x39f57
movq -0x10(%rbp), %rcx
movss 0x34(%rcx), %xmm0
movss 0x40(%rcx), %xmm1
movss %xmm1, -0x74(%rbp)
cvtss2sd %xmm0, %xmm0
movsd %xmm0, -0x70(%rbp)
movq -0x18(%rbp), %rax
movslq 0x50(%rcx), %rcx
subq %rcx, %rax
movq %rax, %rdx
shrq %rdx
movl %eax, %ecx
andl $0x1, %ecx
orq %rdx, %rcx
cvtsi2ss %rcx, %xmm0
addss %xmm0, %xmm0
cvtsi2ss %rax, %xmm1
movss %xmm1, -0x68(%rbp)
testq %rax, %rax
movss %xmm0, -0x64(%rbp)
js 0x39eeb
movss -0x68(%rbp), %xmm0
movss %xmm0, -0x64(%rbp)
movss -0x74(%rbp), %xmm0
movss -0x64(%rbp), %xmm1
mulss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x34a0
movaps %xmm0, %xmm1
movsd -0x70(%rbp), %xmm0
movsd 0x3714e(%rip), %xmm2    # 0x71060
addsd %xmm1, %xmm2
movsd 0x37142(%rip), %xmm1    # 0x71060
divsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x4(%rbp)
jmp 0x39f57
movq 0x490c0(%rip), %rax     # 0x82ff8
movq (%rax), %rdi
leaq 0x3a622(%rip), %rsi     # 0x74564
movb $0x0, %al
callq 0x3240
movq -0x10(%rbp), %rax
movss 0x34(%rax), %xmm0
movss %xmm0, -0x4(%rbp)
movss -0x4(%rbp), %xmm0
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)