// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/darknet.c
// Function: numops
long numops(network *net)
{
    int i;
    long ops = 0;
    for(i = 0; i < net->n; ++i){
        layer l = net->layers[i];
        if(l.type == CONVOLUTIONAL){
            ops += 2l * l.n * l.size*l.size*l.c/l.groups * l.out_h*l.out_w;
        } else if(l.type == CONNECTED){
            ops += 2l * l.inputs * l.outputs;
        } else if (l.type == RNN){
            ops += 2l * l.input_layer->inputs * l.input_layer->outputs;
            ops += 2l * l.self_layer->inputs * l.self_layer->outputs;
            ops += 2l * l.output_layer->inputs * l.output_layer->outputs;
        } else if (l.type == GRU){
            ops += 2l * l.uz->inputs * l.uz->outputs;
            ops += 2l * l.uh->inputs * l.uh->outputs;
            ops += 2l * l.ur->inputs * l.ur->outputs;
            ops += 2l * l.wz->inputs * l.wz->outputs;
            ops += 2l * l.wh->inputs * l.wh->outputs;
            ops += 2l * l.wr->inputs * l.wr->outputs;
        } else if (l.type == LSTM){
            ops += 2l * l.uf->inputs * l.uf->outputs;
            ops += 2l * l.ui->inputs * l.ui->outputs;
            ops += 2l * l.ug->inputs * l.ug->outputs;
            ops += 2l * l.uo->inputs * l.uo->outputs;
            ops += 2l * l.wf->inputs * l.wf->outputs;
            ops += 2l * l.wi->inputs * l.wi->outputs;
            ops += 2l * l.wg->inputs * l.wg->outputs;
            ops += 2l * l.wo->inputs * l.wo->outputs;
        }
    }
    return ops;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x4c0, %rsp            # imm = 0x4C0
movq %rdi, -0x8(%rbp)
movq $0x0, -0x18(%rbp)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x6edda
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rsi
movslq -0xc(%rbp), %rax
imulq $0x4a0, %rax, %rax      # imm = 0x4A0
addq %rax, %rsi
leaq -0x4b8(%rbp), %rdi
movl $0x4a0, %edx            # imm = 0x4A0
callq 0x3280
cmpl $0x0, -0x4b8(%rbp)
jne 0x6eb37
movslq -0x434(%rbp), %rax
shlq %rax
movslq -0x428(%rbp), %rcx
imulq %rcx, %rax
movslq -0x428(%rbp), %rcx
imulq %rcx, %rax
movslq -0x444(%rbp), %rcx
imulq %rcx, %rax
movslq -0x42c(%rbp), %rcx
cqto
idivq %rcx
movslq -0x440(%rbp), %rcx
imulq %rcx, %rax
movslq -0x43c(%rbp), %rcx
imulq %rcx, %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x6edca
cmpl $0x2, -0x4b8(%rbp)
jne 0x6eb62
movslq -0x464(%rbp), %rax
shlq %rax
movslq -0x460(%rbp), %rcx
imulq %rcx, %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x6edc8
cmpl $0xf, -0x4b8(%rbp)
jne 0x6ebdf
movq -0x128(%rbp), %rax
movslq 0x54(%rax), %rax
shlq %rax
movq -0x128(%rbp), %rcx
movslq 0x58(%rcx), %rcx
imulq %rcx, %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x120(%rbp), %rax
movslq 0x54(%rax), %rax
shlq %rax
movq -0x120(%rbp), %rcx
movslq 0x58(%rcx), %rcx
imulq %rcx, %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x118(%rbp), %rax
movslq 0x54(%rax), %rax
shlq %rax
movq -0x118(%rbp), %rcx
movslq 0x58(%rcx), %rcx
imulq %rcx, %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x6edc6
cmpl $0x10, -0x4b8(%rbp)
jne 0x6ecbd
movq -0x90(%rbp), %rax
movslq 0x54(%rax), %rax
shlq %rax
movq -0x90(%rbp), %rcx
movslq 0x58(%rcx), %rcx
imulq %rcx, %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x70(%rbp), %rax
movslq 0x54(%rax), %rax
shlq %rax
movq -0x70(%rbp), %rcx
movslq 0x58(%rcx), %rcx
imulq %rcx, %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x80(%rbp), %rax
movslq 0x54(%rax), %rax
shlq %rax
movq -0x80(%rbp), %rcx
movslq 0x58(%rcx), %rcx
imulq %rcx, %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x98(%rbp), %rax
movslq 0x54(%rax), %rax
shlq %rax
movq -0x98(%rbp), %rcx
movslq 0x58(%rcx), %rcx
imulq %rcx, %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x78(%rbp), %rax
movslq 0x54(%rax), %rax
shlq %rax
movq -0x78(%rbp), %rcx
movslq 0x58(%rcx), %rcx
imulq %rcx, %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x88(%rbp), %rax
movslq 0x54(%rax), %rax
shlq %rax
movq -0x88(%rbp), %rcx
movslq 0x58(%rcx), %rcx
imulq %rcx, %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x6edc4
cmpl $0x11, -0x4b8(%rbp)
jne 0x6edc2
movq -0x58(%rbp), %rax
movslq 0x54(%rax), %rax
shlq %rax
movq -0x58(%rbp), %rcx
movslq 0x58(%rcx), %rcx
imulq %rcx, %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x48(%rbp), %rax
movslq 0x54(%rax), %rax
shlq %rax
movq -0x48(%rbp), %rcx
movslq 0x58(%rcx), %rcx
imulq %rcx, %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x38(%rbp), %rax
movslq 0x54(%rax), %rax
shlq %rax
movq -0x38(%rbp), %rcx
movslq 0x58(%rcx), %rcx
imulq %rcx, %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x68(%rbp), %rax
movslq 0x54(%rax), %rax
shlq %rax
movq -0x68(%rbp), %rcx
movslq 0x58(%rcx), %rcx
imulq %rcx, %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x50(%rbp), %rax
movslq 0x54(%rax), %rax
shlq %rax
movq -0x50(%rbp), %rcx
movslq 0x58(%rcx), %rcx
imulq %rcx, %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x40(%rbp), %rax
movslq 0x54(%rax), %rax
shlq %rax
movq -0x40(%rbp), %rcx
movslq 0x58(%rcx), %rcx
imulq %rcx, %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x30(%rbp), %rax
movslq 0x54(%rax), %rax
shlq %rax
movq -0x30(%rbp), %rcx
movslq 0x58(%rcx), %rcx
imulq %rcx, %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x60(%rbp), %rax
movslq 0x54(%rax), %rax
shlq %rax
movq -0x60(%rbp), %rcx
movslq 0x58(%rcx), %rcx
imulq %rcx, %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x6edc4
jmp 0x6edc6
jmp 0x6edc8
jmp 0x6edca
jmp 0x6edcc
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x6ea9e
movq -0x18(%rbp), %rax
addq $0x4c0, %rsp            # imm = 0x4C0
popq %rbp
retq
nopw (%rax,%rax)