// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/blas.c
// Function: shortcut_cpu
void shortcut_cpu(int batch, int w1, int h1, int c1, float *add, int w2, int h2, int c2, float s1, float s2, float *out)
{
    int stride = w1/w2;
    int sample = w2/w1;
    assert(stride == h1/h2);
    assert(sample == h2/h1);
    if(stride < 1) stride = 1;
    if(sample < 1) sample = 1;
    int minw = (w1 < w2) ? w1 : w2;
    int minh = (h1 < h2) ? h1 : h2;
    int minc = (c1 < c2) ? c1 : c2;

    int i,j,k,b;
    for(b = 0; b < batch; ++b){
        for(k = 0; k < minc; ++k){
            for(j = 0; j < minh; ++j){
                for(i = 0; i < minw; ++i){
                    int out_index = i*sample + w2*(j*sample + h2*(k + c2*b));
                    int add_index = i*stride + w1*(j*stride + h1*(k + c1*b));
                    out[out_index] = s1*out[out_index] + s2*add[add_index];
                }
            }
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq 0x20(%rbp), %rax
movl 0x18(%rbp), %eax
movl 0x10(%rbp), %eax
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
movl %ecx, -0x10(%rbp)
movq %r8, -0x18(%rbp)
movl %r9d, -0x1c(%rbp)
movss %xmm0, -0x20(%rbp)
movss %xmm1, -0x24(%rbp)
movl -0x8(%rbp), %eax
cltd
idivl -0x1c(%rbp)
movl %eax, -0x28(%rbp)
movl -0x1c(%rbp), %eax
cltd
idivl -0x8(%rbp)
movl %eax, -0x2c(%rbp)
movl -0x28(%rbp), %eax
movl %eax, -0x54(%rbp)
movl -0xc(%rbp), %eax
cltd
idivl 0x10(%rbp)
movl %eax, %ecx
movl -0x54(%rbp), %eax
cmpl %ecx, %eax
jne 0x2eecc
jmp 0x2eeeb
leaq 0x452a5(%rip), %rdi     # 0x74178
leaq 0x452ae(%rip), %rsi     # 0x74188
movl $0x48, %edx
leaq 0x452a9(%rip), %rcx     # 0x7418f
callq 0x3180
movl -0x2c(%rbp), %eax
movl %eax, -0x58(%rbp)
movl 0x10(%rbp), %eax
cltd
idivl -0xc(%rbp)
movl %eax, %ecx
movl -0x58(%rbp), %eax
cmpl %ecx, %eax
jne 0x2ef03
jmp 0x2ef22
leaq 0x452da(%rip), %rdi     # 0x741e4
leaq 0x45277(%rip), %rsi     # 0x74188
movl $0x49, %edx
leaq 0x45272(%rip), %rcx     # 0x7418f
callq 0x3180
cmpl $0x1, -0x28(%rbp)
jge 0x2ef2f
movl $0x1, -0x28(%rbp)
cmpl $0x1, -0x2c(%rbp)
jge 0x2ef3c
movl $0x1, -0x2c(%rbp)
movl -0x8(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x2ef4c
movl -0x8(%rbp), %eax
movl %eax, -0x5c(%rbp)
jmp 0x2ef52
movl -0x1c(%rbp), %eax
movl %eax, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
movl %eax, -0x30(%rbp)
movl -0xc(%rbp), %eax
cmpl 0x10(%rbp), %eax
jge 0x2ef68
movl -0xc(%rbp), %eax
movl %eax, -0x60(%rbp)
jmp 0x2ef6e
movl 0x10(%rbp), %eax
movl %eax, -0x60(%rbp)
movl -0x60(%rbp), %eax
movl %eax, -0x34(%rbp)
movl -0x10(%rbp), %eax
cmpl 0x18(%rbp), %eax
jge 0x2ef84
movl -0x10(%rbp), %eax
movl %eax, -0x64(%rbp)
jmp 0x2ef8a
movl 0x18(%rbp), %eax
movl %eax, -0x64(%rbp)
movl -0x64(%rbp), %eax
movl %eax, -0x38(%rbp)
movl $0x0, -0x48(%rbp)
movl -0x48(%rbp), %eax
cmpl -0x4(%rbp), %eax
jge 0x2f0b3
movl $0x0, -0x44(%rbp)
movl -0x44(%rbp), %eax
cmpl -0x38(%rbp), %eax
jge 0x2f0a3
movl $0x0, -0x40(%rbp)
movl -0x40(%rbp), %eax
cmpl -0x34(%rbp), %eax
jge 0x2f093
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x30(%rbp), %eax
jge 0x2f083
movl -0x3c(%rbp), %eax
imull -0x2c(%rbp), %eax
movl -0x1c(%rbp), %ecx
movl -0x40(%rbp), %edx
imull -0x2c(%rbp), %edx
movl 0x10(%rbp), %esi
movl -0x44(%rbp), %edi
movl 0x18(%rbp), %r8d
imull -0x48(%rbp), %r8d
addl %r8d, %edi
imull %edi, %esi
addl %esi, %edx
imull %edx, %ecx
addl %ecx, %eax
movl %eax, -0x4c(%rbp)
movl -0x3c(%rbp), %eax
imull -0x28(%rbp), %eax
movl -0x8(%rbp), %ecx
movl -0x40(%rbp), %edx
imull -0x28(%rbp), %edx
movl -0xc(%rbp), %esi
movl -0x44(%rbp), %edi
movl -0x10(%rbp), %r8d
imull -0x48(%rbp), %r8d
addl %r8d, %edi
imull %edi, %esi
addl %esi, %edx
imull %edx, %ecx
addl %ecx, %eax
movl %eax, -0x50(%rbp)
movss -0x20(%rbp), %xmm0
movq 0x20(%rbp), %rax
movslq -0x4c(%rbp), %rcx
movss (%rax,%rcx,4), %xmm2
movss -0x24(%rbp), %xmm1
movq -0x18(%rbp), %rax
movslq -0x50(%rbp), %rcx
mulss (%rax,%rcx,4), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movq 0x20(%rbp), %rax
movslq -0x4c(%rbp), %rcx
movss %xmm0, (%rax,%rcx,4)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x2efd0
jmp 0x2f085
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x2efbd
jmp 0x2f095
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x2efaa
jmp 0x2f0a5
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
jmp 0x2ef97
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax)