user: What would the C source look like for the assembly code provided here?

```asm
<dehdif>:
  endbr64
  push   %r15
  mov    %esi,%r8d
  mov    %rdi,%rax
  mov    %edx,%esi
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  lea    -0x1(%r8),%ebx
  mov    %ebx,-0x28(%rsp)
  cmp    $0x8,%ecx
  je     L199
  cmp    $0x10,%ecx
  je     L202
L115:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L202:
  mov    -0x28(%rsp),%edx
  test   %edx,%edx
  jle    L115
  test   %esi,%esi
  jle    L115
  lea    -0x1(%rsi),%ebx
  mov    %esi,%ecx
  movslq %esi,%r14
  mov    %esi,%r15d
  mov    %ebx,-0x24(%rsp)
  mov    %esi,%ebx
  shr    $0x3,%ecx
  lea    (%r14,%r14,1),%rdx
  and    $0x7,%ebx
  lea    -0x1(%rcx),%r8d
  mov    %esi,%ecx
  mov    %rdx,-0x20(%rsp)
  mov    %ebx,-0x18(%rsp)
  sub    $0x1,%ebx
  add    $0x1,%r8
  add    %rdi,%rdx
  mov    %ebx,-0x14(%rsp)
  lea    (%rcx,%rcx,1),%rbx
  shl    $0x4,%r8
  and    $0xfffffff8,%r15d
  mov    %rbx,-0x10(%rsp)
  mov    %r14,%r11
  xor    %r10d,%r10d
  xor    %r9d,%r9d
  xor    %r12d,%r12d
  nopl   0x0(%rax,%rax,1)
L340:
  lea    (%r10,%r10,1),%rcx
  lea    (%r11,%r11,1),%rdi
  mov    %r9d,%r13d
  add    $0x1,%r12d
  lea    0x2(%rcx),%rbx
  add    %esi,%r9d
  sub    %rbx,%rdi
  cmp    $0xc,%rdi
  jbe    L49
  cmpl   $0x2,-0x24(%rsp)
  jbe    L49
  cmpl   $0x6,-0x24(%rsp)
  jbe    L150
  add    %rax,%rcx
  xor    %edi,%edi
  xchg   %ax,%ax
L374:
  movdqu (%rdx,%rdi,1),%xmm0
  movdqu (%rcx,%rdi,1),%xmm3
  paddw  %xmm3,%xmm0
  movups %xmm0,(%rdx,%rdi,1)
  add    $0x10,%rdi
  cmp    %r8,%rdi
  jne    L374
  cmp    %esi,%r15d
  je     L358
  cmpl   $0x2,-0x14(%rsp)
  mov    -0x18(%rsp),%ebp
  jbe    L215
  mov    %r15d,%edi
  mov    %r15d,%ecx
L299:
  lea    (%rdi,%r11,1),%rbx
  add    %r10,%rdi
  lea    (%rax,%rbx,2),%rbx
  movq   (%rax,%rdi,2),%xmm0
  mov    %ebp,%edi
  movq   (%rbx),%xmm1
  and    $0xfffffffc,%edi
  add    %edi,%ecx
  paddw  %xmm1,%xmm0
  movq   %xmm0,(%rbx)
  cmp    %ebp,%edi
  je     L358
L91:
  lea    (%rcx,%r9,1),%edi
  lea    0x0(%r13,%rcx,1),%ebx
  movslq %edi,%rdi
  movslq %ebx,%rbx
  movzwl (%rax,%rbx,2),%ebx
  add    %bx,(%rax,%rdi,2)
  lea    0x1(%rcx),%edi
  cmp    %edi,%esi
  jle    L358
  lea    (%rdi,%r9,1),%ebx
  add    %r13d,%edi
  add    $0x2,%ecx
  movslq %ebx,%rbx
  movslq %edi,%rdi
  movzwl (%rax,%rdi,2),%edi
  add    %di,(%rax,%rbx,2)
  cmp    %ecx,%esi
  jle    L358
  lea    (%rcx,%r9,1),%edi
  add    %r13d,%ecx
  movslq %edi,%rdi
  movslq %ecx,%rcx
  movzwl (%rax,%rcx,2),%ecx
  add    %cx,(%rax,%rdi,2)
L358:
  add    -0x20(%rsp),%rdx
  add    %r14,%r10
  add    %r14,%r11
  cmp    %r12d,-0x28(%rsp)
  jne    L340
  jmp    L115
  nopw   0x0(%rax,%rax,1)
L199:
  test   %ebx,%ebx
  jle    L115
  test   %edx,%edx
  jle    L115
  mov    %esi,%ecx
  lea    -0x1(%rsi),%ebx
  movslq %edx,%r14
  xor    %r9d,%r9d
  shr    $0x4,%ecx
  mov    %ebx,-0x24(%rsp)
  mov    %esi,%ebx
  lea    (%rdi,%r14,1),%rdx
  lea    -0x1(%rcx),%ebp
  mov    %esi,%ecx
  and    $0xfffffff0,%ebx
  mov    %r14,%r10
  mov    %rcx,-0x10(%rsp)
  mov    %esi,%ecx
  add    $0x1,%rbp
  xor    %r15d,%r15d
  and    $0xf,%ecx
  mov    %ebx,-0x20(%rsp)
  shl    $0x4,%rbp
  xor    %ebx,%ebx
  mov    %ecx,-0x18(%rsp)
  sub    $0x1,%ecx
  mov    %ecx,-0x14(%rsp)
  nopl   0x0(%rax)
L168:
  lea    -0x1(%r10),%rcx
  mov    %r9d,%r12d
  add    $0x1,%r15d
  add    %esi,%r9d
  sub    %rbx,%rcx
  cmp    $0xe,%rcx
  jbe    L371
  cmpl   $0x6,-0x24(%rsp)
  jbe    L371
  cmpl   $0xe,-0x24(%rsp)
  jbe    L15
  lea    (%rax,%rbx,1),%r8
  xor    %ecx,%ecx
  nopw   0x0(%rax,%rax,1)
L375:
  movdqu (%r8,%rcx,1),%xmm0
  movdqu (%rdx,%rcx,1),%xmm2
  paddb  %xmm2,%xmm0
  movups %xmm0,(%rdx,%rcx,1)
  add    $0x10,%rcx
  cmp    %rbp,%rcx
  jne    L375
  mov    -0x20(%rsp),%r11d
  mov    %r11d,%ecx
  cmp    %esi,%r11d
  je     L101
  cmpl   $0x6,-0x14(%rsp)
  mov    -0x18(%rsp),%r13d
  jbe    L60
L267:
  lea    (%r11,%r10,1),%rdi
  movq   (%r8,%r11,1),%xmm0
  add    %rax,%rdi
  movq   (%rdi),%xmm1
  paddb  %xmm1,%xmm0
  movq   %xmm0,(%rdi)
  mov    %r13d,%edi
  and    $0xfffffff8,%edi
  add    %edi,%ecx
  cmp    %edi,%r13d
  je     L101
L60:
  lea    (%rcx,%r9,1),%edi
  lea    (%r12,%rcx,1),%r8d
  movslq %edi,%rdi
  movslq %r8d,%r8
  movzbl (%rax,%r8,1),%r8d
  add    %r8b,(%rax,%rdi,1)
  lea    0x1(%rcx),%edi
  cmp    %esi,%edi
  jge    L101
  lea    (%rdi,%r9,1),%r8d
  add    %r12d,%edi
  movslq %r8d,%r8
  movslq %edi,%rdi
  movzbl (%rax,%rdi,1),%edi
  add    %dil,(%rax,%r8,1)
  lea    0x2(%rcx),%edi
  cmp    %edi,%esi
  jle    L101
  lea    (%rdi,%r9,1),%r8d
  add    %r12d,%edi
  movslq %r8d,%r8
  movslq %edi,%rdi
  movzbl (%rax,%rdi,1),%edi
  add    %dil,(%rax,%r8,1)
  lea    0x3(%rcx),%edi
  cmp    %edi,%esi
  jle    L101
  lea    (%rdi,%r9,1),%r8d
  add    %r12d,%edi
  movslq %r8d,%r8
  movslq %edi,%rdi
  movzbl (%rax,%rdi,1),%edi
  add    %dil,(%rax,%r8,1)
  lea    0x4(%rcx),%edi
  cmp    %edi,%esi
  jle    L101
  lea    (%rdi,%r9,1),%r8d
  add    %r12d,%edi
  movslq %r8d,%r8
  movslq %edi,%rdi
  movzbl (%rax,%rdi,1),%edi
  add    %dil,(%rax,%r8,1)
  lea    0x5(%rcx),%edi
  cmp    %edi,%esi
  jle    L101
  lea    (%rdi,%r9,1),%r8d
  add    %r12d,%edi
  add    $0x6,%ecx
  movslq %r8d,%r8
  movslq %edi,%rdi
  movzbl (%rax,%rdi,1),%edi
  add    %dil,(%rax,%r8,1)
  cmp    %ecx,%esi
  jle    L101
  lea    (%r9,%rcx,1),%edi
  add    %r12d,%ecx
  movslq %edi,%rdi
  movslq %ecx,%rcx
  movzbl (%rax,%rcx,1),%ecx
  add    %cl,(%rax,%rdi,1)
L101:
  add    %r14,%r10
  add    %r14,%rbx
  add    %r14,%rdx
  cmp    %r15d,-0x28(%rsp)
  jne    L168
  jmp    L115
  nopw   0x0(%rax,%rax,1)
L371:
  mov    -0x10(%rsp),%rdi
  mov    %rdx,%rcx
  lea    (%rdi,%rdx,1),%r8
  nopl   0x0(%rax)
L376:
  mov    %rcx,%rdi
  sub    %r10,%rdi
  movzbl (%rdi,%rbx,1),%edi
  add    %dil,(%rcx)
  add    $0x1,%rcx
  cmp    %r8,%rcx
  jne    L376
  jmp    L101
L49:
  mov    -0x10(%rsp),%rbx
  mov    %r10,%rdi
  mov    %rdx,%rcx
  sub    %r11,%rdi
  add    %rdx,%rbx
  nopl   0x0(%rax)
L323:
  movzwl (%rcx,%rdi,2),%ebp
  add    %bp,(%rcx)
  add    $0x2,%rcx
  cmp    %rbx,%rcx
  jne    L323
  jmp    L358
L15:
  mov    %esi,%r13d
  xor    %ecx,%ecx
  lea    (%rax,%rbx,1),%r8
  xor    %r11d,%r11d
  jmp    L267
L150:
  mov    %esi,%ebp
  xor    %edi,%edi
  xor    %ecx,%ecx
  jmp    L299
L215:
  mov    %r15d,%ecx
  jmp    L91
```

assistant: ```c
void dehdif(void *p, int n, int c, int b) {
  const int s = n * c;
  const int m = n - 1;
  const int i = 0;
  if (b == 8) {
    char *q = (char *)p;
    for (int j = 0; j < m; ++j)
      for (int k = 0; k < c; ++k)
        q[i * s + (j + 1) * c + k] += q[i * s + j * c + k];
  } else if (b == 16) {
    short *q = (short *)p;
    for (int j = 0; j < m; ++j)
      for (int k = 0; k < c; ++k)
        q[i * s + (j + 1) * c + k] += q[i * s + j * c + k];
  } else if (b == 32) {
  }
}
```