// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, 0x30(%rsp)
movl %ecx, 0x4(%rsp)
movl %edx, %r14d
movl %esi, %r11d
movl %edi, 0x10(%rsp)
movl 0x70(%rsp), %esi
movl %r11d, %eax
cltd
idivl %r9d
movl %eax, %ebp
movl %r9d, %eax
cltd
idivl %r11d
movl %eax, %ebx
movl %r14d, %eax
cltd
idivl %esi
cmpl %eax, %ebp
jne 0x2979d
movl %esi, %eax
cltd
idivl %r14d
cmpl %eax, %ebx
jne 0x297bc
movl 0x78(%rsp), %ecx
movl 0x4(%rsp), %eax
cmpl %ecx, %eax
movl %ecx, 0x8(%rsp)
cmovll %eax, %ecx
movl %ecx, 0x14(%rsp)
cmpl $0x0, 0x10(%rsp)
jle 0x2978e
cmpl %esi, %r14d
movl %esi, %r15d
cmovll %r14d, %r15d
cmpl %r9d, %r11d
movl %r9d, %edi
cmovll %r11d, %edi
cmpl $0x2, %ebx
movl $0x1, %eax
cmovll %eax, %ebx
cmpl $0x2, %ebp
cmovgel %ebp, %eax
imull %r9d, %esi
imull %r11d, %r14d
movl 0x4(%rsp), %ecx
imull %r14d, %ecx
movl %ecx, 0x4(%rsp)
leaq (,%rax,4), %r13
movl %eax, %ebp
imull %r11d, %ebp
movl 0x8(%rsp), %eax
imull %esi, %eax
movl %eax, 0x8(%rsp)
movl %ebx, %r11d
imull %r9d, %r11d
leaq (,%rbx,4), %r10
movq $0x0, 0x18(%rsp)
movl $0x0, 0xc(%rsp)
xorl %ecx, %ecx
movl %r14d, 0x2c(%rsp)
movl %esi, 0x28(%rsp)
movl %ecx, 0x24(%rsp)
cmpl $0x0, 0x14(%rsp)
jle 0x29764
xorl %ecx, %ecx
movq 0x18(%rsp), %rax
movl %eax, %r8d
movl 0xc(%rsp), %r9d
testl %r15d, %r15d
jle 0x2974d
movl %r8d, %ebx
movl %r9d, %eax
xorl %esi, %esi
testl %edi, %edi
jle 0x29740
movslq %eax, %rdx
movq 0x30(%rsp), %r14
leaq (%r14,%rdx,4), %rdx
movslq %ebx, %r14
movq 0x80(%rsp), %r12
leaq (%r12,%r14,4), %r14
movq %rdi, %r12
movss (%rdx), %xmm2
mulss %xmm1, %xmm2
movss (%r14), %xmm3
mulss %xmm0, %xmm3
addss %xmm2, %xmm3
movss %xmm3, (%r14)
addq %r13, %rdx
addq %r10, %r14
decq %r12
jne 0x2971b
incq %rsi
addl %ebp, %eax
addl %r11d, %ebx
cmpq %r15, %rsi
jne 0x296f9
incl %ecx
movl 0x2c(%rsp), %r14d
addl %r14d, %r9d
movl 0x28(%rsp), %esi
addl %esi, %r8d
cmpl 0x14(%rsp), %ecx
jne 0x296ec
movl 0x24(%rsp), %ecx
incl %ecx
movl 0xc(%rsp), %eax
addl 0x4(%rsp), %eax
movl %eax, 0xc(%rsp)
movq 0x18(%rsp), %rax
addl 0x8(%rsp), %eax
movq %rax, 0x18(%rsp)
cmpl 0x10(%rsp), %ecx
jne 0x296ce
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2f05c(%rip), %rdi     # 0x58800
leaq 0x2f065(%rip), %rsi     # 0x58810
leaq 0x2f065(%rip), %rcx     # 0x58817
movl $0x48, %edx
callq 0x31b0
leaq 0x2f0a9(%rip), %rdi     # 0x5886c
leaq 0x2f046(%rip), %rsi     # 0x58810
leaq 0x2f046(%rip), %rcx     # 0x58817
movl $0x49, %edx
callq 0x31b0