user: Please show me the C implementation that matches the assembly code listed below:

```asm
<shortcut_cpu>:
  endbr64
  mov    %esi,%eax
  push   %r15
  mov    %edx,%r15d
  cltd
  push   %r14
  mov    %esi,%r14d
  idiv   %r9d
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %ecx,%r13d
  mov    %edi,0x24(%rsp)
  xor    %edi,%edi
  mov    0x78(%rsp),%ebx
  mov    %r8,0x10(%rsp)
  mov    %esi,0x8(%rsp)
  mov    %r9d,(%rsp)
  mov    %r15d,0xc(%rsp)
  movslq %eax,%r12
  mov    %r9d,%eax
  cltd
  idiv   %esi
  movslq %eax,%rbp
  mov    %r15d,%eax
  cltd
  idivl  0x70(%rsp)
  cmp    %r12d,%eax
  sete   %dil
  call   <assert@plt>
  mov    0x70(%rsp),%eax
  xor    %edi,%edi
  cltd
  idiv   %r15d
  cmp    %ebp,%eax
  sete   %dil
  call   <assert@plt>
  test   %r12d,%r12d
  mov    (%rsp),%ecx
  mov    $0x1,%eax
  cmovg  %r12,%rax
  mov    $0x1,%edx
  test   %ebp,%ebp
  mov    %r14d,%esi
  cmovg  %rbp,%rdx
  mov    %ecx,%r8d
  cmp    %ecx,%r14d
  mov    0x24(%rsp),%edi
  cmovle %r14d,%r8d
  mov    %r15d,%r12d
  cmp    0x70(%rsp),%r15d
  mov    %r13d,%r14d
  cmovg  0x70(%rsp),%r12d
  cmp    %r13d,%ebx
  cmovle %ebx,%r14d
  mov    %r14d,0x4(%rsp)
  test   %edi,%edi
  jle    L17
  test   %r14d,%r14d
  jle    L17
  test   %r12d,%r12d
  jle    L17
  test   %r8d,%r8d
  jle    L17
  imul   0x70(%rsp),%ebx
  mov    %ecx,%ebp
  movl   $0x0,0x20(%rsp)
  lea    0x0(,%rdx,4),%rdi
  imul   %r15d,%r13d
  movl   $0x0,0x1c(%rsp)
  imul   %edx,%ebp
  movl   $0x0,0x18(%rsp)
  mov    %ebx,0x28(%rsp)
  mov    %esi,%ebx
  lea    0x0(,%rax,4),%rsi
  imul   %eax,%ebx
  mov    %r13d,0x2c(%rsp)
  movslq %ebp,%rbp
  shl    $0x2,%rbp
  movslq %ebx,%rbx
  shl    $0x2,%rbx
L2:
  mov    0x20(%rsp),%r15d
  mov    0x1c(%rsp),%r14d
  xor    %r13d,%r13d
  nopl   0x0(%rax)
L12:
  mov    (%rsp),%eax
  mov    0x80(%rsp),%rcx
  xor    %r9d,%r9d
  mov    0x10(%rsp),%rdx
  imul   %r14d,%eax
  cltq
  lea    (%rcx,%rax,4),%r11
  mov    0x8(%rsp),%eax
  imul   %r15d,%eax
  cltq
  lea    (%rdx,%rax,4),%r10
  nopl   0x0(%rax,%rax,1)
L72:
  mov    %r10,%rcx
  mov    %r11,%rax
  xor    %edx,%edx
  nopl   0x0(%rax,%rax,1)
L66:
  movss  (%rax),%xmm0
  addss  (%rcx),%xmm0
  add    $0x1,%edx
  add    %rsi,%rcx
  movss  %xmm0,(%rax)
  add    %rdi,%rax
  cmp    %edx,%r8d
  jne    L66
  add    $0x1,%r9d
  add    %rbp,%r11
  add    %rbx,%r10
  cmp    %r9d,%r12d
  jne    L72
  add    $0x1,%r13d
  add    0x70(%rsp),%r14d
  add    0xc(%rsp),%r15d
  cmp    %r13d,0x4(%rsp)
  jne    L12
  addl   $0x1,0x18(%rsp)
  mov    0x28(%rsp),%ecx
  mov    0x2c(%rsp),%edx
  add    %ecx,0x1c(%rsp)
  add    %edx,0x20(%rsp)
  mov    0x18(%rsp),%eax
  cmp    %eax,0x24(%rsp)
  jne    L2
L17:
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
void shortcut_cpu(int batch, int w1, int h1, int c1, float *add, int w2, int h2, int c2, 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] += add[add_index];
        }
      }
    }
  }
}
```