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

```asm
<sumGAMMAPROT>:
  endbr64
  mov    %edi,%r10d
  mov    %rsi,%rax
  mov    0x8(%rsp),%rdi
  mov    %rdx,%rsi
  mov    0x18(%rsp),%r11d
  mov    0x10(%rsp),%edx
  cmp    $0x1,%r10d
  je     L116
  cmp    $0x2,%r10d
  je     L106
  test   %r10d,%r10d
  je     L9
  xor    %edi,%edi
  xor    %eax,%eax
  jmp    1050 <assert@plt>
  nopl   (%rax)
L116:
  cmp    %r11d,%edx
  jge    L98
  lea    (%rdx,%rdx,4),%r10d
  movslq %edx,%rsi
  lea    (%r11,%r11,4),%r11d
  shl    $0x4,%r10d
  add    %rsi,%r9
  shl    $0x4,%r11d
  movslq %r10d,%rdx
  shl    $0x3,%rdx
  lea    (%rcx,%rdx,1),%rsi
  lea    0x280(%rax,%rdx,1),%rdi
  nopw   0x0(%rax,%rax,1)
L18:
  movsbl (%r9),%eax
  mov    %rsi,%rdx
  lea    (%rax,%rax,4),%eax
  shl    $0x2,%eax
  cltq
  lea    (%r8,%rax,8),%rcx
  lea    -0x280(%rdi),%rax
L94:
  movsd  (%rcx),%xmm0
  mulsd  (%rdx),%xmm0
  add    $0xa0,%rax
  add    $0xa0,%rdx
  movsd  %xmm0,-0xa0(%rax)
  movsd  0x8(%rcx),%xmm0
  mulsd  -0x98(%rdx),%xmm0
  movsd  %xmm0,-0x98(%rax)
  movsd  0x10(%rcx),%xmm0
  mulsd  -0x90(%rdx),%xmm0
  movsd  %xmm0,-0x90(%rax)
  movsd  0x18(%rcx),%xmm0
  mulsd  -0x88(%rdx),%xmm0
  movsd  %xmm0,-0x88(%rax)
  movsd  0x20(%rcx),%xmm0
  mulsd  -0x80(%rdx),%xmm0
  movsd  %xmm0,-0x80(%rax)
  movsd  0x28(%rcx),%xmm0
  mulsd  -0x78(%rdx),%xmm0
  movsd  %xmm0,-0x78(%rax)
  movsd  0x30(%rcx),%xmm0
  mulsd  -0x70(%rdx),%xmm0
  movsd  %xmm0,-0x70(%rax)
  movsd  0x38(%rcx),%xmm0
  mulsd  -0x68(%rdx),%xmm0
  movsd  %xmm0,-0x68(%rax)
  movsd  0x40(%rcx),%xmm0
  mulsd  -0x60(%rdx),%xmm0
  movsd  %xmm0,-0x60(%rax)
  movsd  0x48(%rcx),%xmm0
  mulsd  -0x58(%rdx),%xmm0
  movsd  %xmm0,-0x58(%rax)
  movsd  0x50(%rcx),%xmm0
  mulsd  -0x50(%rdx),%xmm0
  movsd  %xmm0,-0x50(%rax)
  movsd  0x58(%rcx),%xmm0
  mulsd  -0x48(%rdx),%xmm0
  movsd  %xmm0,-0x48(%rax)
  movsd  0x60(%rcx),%xmm0
  mulsd  -0x40(%rdx),%xmm0
  movsd  %xmm0,-0x40(%rax)
  movsd  0x68(%rcx),%xmm0
  mulsd  -0x38(%rdx),%xmm0
  movsd  %xmm0,-0x38(%rax)
  movsd  0x70(%rcx),%xmm0
  mulsd  -0x30(%rdx),%xmm0
  movsd  %xmm0,-0x30(%rax)
  movsd  0x78(%rcx),%xmm0
  mulsd  -0x28(%rdx),%xmm0
  movsd  %xmm0,-0x28(%rax)
  movsd  0x80(%rcx),%xmm0
  mulsd  -0x20(%rdx),%xmm0
  movsd  %xmm0,-0x20(%rax)
  movsd  0x88(%rcx),%xmm0
  mulsd  -0x18(%rdx),%xmm0
  movsd  %xmm0,-0x18(%rax)
  movsd  0x90(%rcx),%xmm0
  mulsd  -0x10(%rdx),%xmm0
  movsd  %xmm0,-0x10(%rax)
  movsd  0x98(%rcx),%xmm0
  mulsd  -0x8(%rdx),%xmm0
  movsd  %xmm0,-0x8(%rax)
  cmp    %rdi,%rax
  jne    L94
  add    $0x50,%r10d
  add    $0x1,%r9
  add    $0x280,%rsi
  add    $0x280,%rdi
  cmp    %r10d,%r11d
  jne    L18
  ret
  nopl   0x0(%rax,%rax,1)
L9:
  cmp    %r11d,%edx
  jge    L38
  movslq %edx,%rsi
  lea    (%rdx,%rdx,4),%edx
  shl    $0x4,%edx
  movslq %edx,%rdx
  lea    0x280(%rax,%rdx,8),%r10
  nopl   (%rax)
L7:
  movsbl (%r9,%rsi,1),%eax
  lea    (%rax,%rax,4),%eax
  shl    $0x2,%eax
  cltq
  lea    (%r8,%rax,8),%rcx
  movsbl (%rdi,%rsi,1),%eax
  lea    (%rax,%rax,4),%eax
  shl    $0x2,%eax
  cltq
  lea    (%r8,%rax,8),%rdx
  lea    -0x280(%r10),%rax
L2:
  movsd  (%rcx),%xmm0
  mulsd  (%rdx),%xmm0
  add    $0xa0,%rax
  movsd  %xmm0,-0xa0(%rax)
  movsd  0x8(%rcx),%xmm0
  mulsd  0x8(%rdx),%xmm0
  movsd  %xmm0,-0x98(%rax)
  movsd  0x10(%rcx),%xmm0
  mulsd  0x10(%rdx),%xmm0
  movsd  %xmm0,-0x90(%rax)
  movsd  0x18(%rcx),%xmm0
  mulsd  0x18(%rdx),%xmm0
  movsd  %xmm0,-0x88(%rax)
  movsd  0x20(%rcx),%xmm0
  mulsd  0x20(%rdx),%xmm0
  movsd  %xmm0,-0x80(%rax)
  movsd  0x28(%rcx),%xmm0
  mulsd  0x28(%rdx),%xmm0
  movsd  %xmm0,-0x78(%rax)
  movsd  0x30(%rcx),%xmm0
  mulsd  0x30(%rdx),%xmm0
  movsd  %xmm0,-0x70(%rax)
  movsd  0x38(%rcx),%xmm0
  mulsd  0x38(%rdx),%xmm0
  movsd  %xmm0,-0x68(%rax)
  movsd  0x40(%rcx),%xmm0
  mulsd  0x40(%rdx),%xmm0
  movsd  %xmm0,-0x60(%rax)
  movsd  0x48(%rcx),%xmm0
  mulsd  0x48(%rdx),%xmm0
  movsd  %xmm0,-0x58(%rax)
  movsd  0x50(%rcx),%xmm0
  mulsd  0x50(%rdx),%xmm0
  movsd  %xmm0,-0x50(%rax)
  movsd  0x58(%rcx),%xmm0
  mulsd  0x58(%rdx),%xmm0
  movsd  %xmm0,-0x48(%rax)
  movsd  0x60(%rcx),%xmm0
  mulsd  0x60(%rdx),%xmm0
  movsd  %xmm0,-0x40(%rax)
  movsd  0x68(%rcx),%xmm0
  mulsd  0x68(%rdx),%xmm0
  movsd  %xmm0,-0x38(%rax)
  movsd  0x70(%rcx),%xmm0
  mulsd  0x70(%rdx),%xmm0
  movsd  %xmm0,-0x30(%rax)
  movsd  0x78(%rcx),%xmm0
  mulsd  0x78(%rdx),%xmm0
  movsd  %xmm0,-0x28(%rax)
  movsd  0x80(%rcx),%xmm0
  mulsd  0x80(%rdx),%xmm0
  movsd  %xmm0,-0x20(%rax)
  movsd  0x88(%rcx),%xmm0
  mulsd  0x88(%rdx),%xmm0
  movsd  %xmm0,-0x18(%rax)
  movsd  0x90(%rcx),%xmm0
  mulsd  0x90(%rdx),%xmm0
  movsd  %xmm0,-0x10(%rax)
  movsd  0x98(%rcx),%xmm0
  mulsd  0x98(%rdx),%xmm0
  movsd  %xmm0,-0x8(%rax)
  cmp    %r10,%rax
  jne    L2
  add    $0x1,%rsi
  add    $0x280,%r10
  cmp    %esi,%r11d
  jg     L7
  ret
L38:
  ret
  nopl   0x0(%rax,%rax,1)
L106:
  cmp    %r11d,%edx
  jge    L71
  lea    (%rdx,%rdx,4),%r9d
  lea    (%r11,%r11,4),%r10d
  shl    $0x4,%r9d
  shl    $0x4,%r10d
  movslq %r9d,%rdx
  shl    $0x3,%rdx
  lea    (%rsi,%rdx,1),%r8
  lea    0x280(%rax,%rdx,1),%rdi
  lea    (%rcx,%rdx,1),%rsi
  nopl   0x0(%rax,%rax,1)
L39:
  lea    -0x280(%rdi),%rax
  mov    %rsi,%rcx
  mov    %r8,%rdx
L30:
  movsd  (%rdx),%xmm0
  mulsd  (%rcx),%xmm0
  add    $0xa0,%rax
  add    $0xa0,%rdx
  add    $0xa0,%rcx
  movsd  %xmm0,-0xa0(%rax)
  movsd  -0x98(%rdx),%xmm0
  mulsd  -0x98(%rcx),%xmm0
  movsd  %xmm0,-0x98(%rax)
  movsd  -0x90(%rdx),%xmm0
  mulsd  -0x90(%rcx),%xmm0
  movsd  %xmm0,-0x90(%rax)
  movsd  -0x88(%rdx),%xmm0
  mulsd  -0x88(%rcx),%xmm0
  movsd  %xmm0,-0x88(%rax)
  movsd  -0x80(%rdx),%xmm0
  mulsd  -0x80(%rcx),%xmm0
  movsd  %xmm0,-0x80(%rax)
  movsd  -0x78(%rdx),%xmm0
  mulsd  -0x78(%rcx),%xmm0
  movsd  %xmm0,-0x78(%rax)
  movsd  -0x70(%rdx),%xmm0
  mulsd  -0x70(%rcx),%xmm0
  movsd  %xmm0,-0x70(%rax)
  movsd  -0x68(%rdx),%xmm0
  mulsd  -0x68(%rcx),%xmm0
  movsd  %xmm0,-0x68(%rax)
  movsd  -0x60(%rdx),%xmm0
  mulsd  -0x60(%rcx),%xmm0
  movsd  %xmm0,-0x60(%rax)
  movsd  -0x58(%rdx),%xmm0
  mulsd  -0x58(%rcx),%xmm0
  movsd  %xmm0,-0x58(%rax)
  movsd  -0x50(%rdx),%xmm0
  mulsd  -0x50(%rcx),%xmm0
  movsd  %xmm0,-0x50(%rax)
  movsd  -0x48(%rdx),%xmm0
  mulsd  -0x48(%rcx),%xmm0
  movsd  %xmm0,-0x48(%rax)
  movsd  -0x40(%rdx),%xmm0
  mulsd  -0x40(%rcx),%xmm0
  movsd  %xmm0,-0x40(%rax)
  movsd  -0x38(%rdx),%xmm0
  mulsd  -0x38(%rcx),%xmm0
  movsd  %xmm0,-0x38(%rax)
  movsd  -0x30(%rdx),%xmm0
  mulsd  -0x30(%rcx),%xmm0
  movsd  %xmm0,-0x30(%rax)
  movsd  -0x28(%rdx),%xmm0
  mulsd  -0x28(%rcx),%xmm0
  movsd  %xmm0,-0x28(%rax)
  movsd  -0x20(%rdx),%xmm0
  mulsd  -0x20(%rcx),%xmm0
  movsd  %xmm0,-0x20(%rax)
  movsd  -0x18(%rdx),%xmm0
  mulsd  -0x18(%rcx),%xmm0
  movsd  %xmm0,-0x18(%rax)
  movsd  -0x10(%rdx),%xmm0
  mulsd  -0x10(%rcx),%xmm0
  movsd  %xmm0,-0x10(%rax)
  movsd  -0x8(%rdx),%xmm0
  mulsd  -0x8(%rcx),%xmm0
  movsd  %xmm0,-0x8(%rax)
  cmp    %rdi,%rax
  jne    L30
  add    $0x50,%r9d
  add    $0x280,%r8
  add    $0x280,%rsi
  add    $0x280,%rdi
  cmp    %r10d,%r9d
  jne    L39
  ret
L98:
  ret
L71:
  ret
```

assistant: ```c
void sumGAMMAPROT(int tipCase, double *sumtable, double *x1, double *x2, double *tipVector, char *tipX1, char *tipX2, int lower, int n) {
  int i, l;
  double *left, *right, *sum;
  switch (tipCase) {
  case 0:
    for (i = lower; i < n; i++) {
      left = &(tipVector[20 * tipX1[i]]);
      right = &(tipVector[20 * tipX2[i]]);
      sum = &(sumtable[i * 80]);
      for (l = 0; l < 4; l++) {
        *sum++ = left[0] * right[0];
        *sum++ = left[1] * right[1];
        *sum++ = left[2] * right[2];
        *sum++ = left[3] * right[3];
        *sum++ = left[4] * right[4];
        *sum++ = left[5] * right[5];
        *sum++ = left[6] * right[6];
        *sum++ = left[7] * right[7];
        *sum++ = left[8] * right[8];
        *sum++ = left[9] * right[9];
        *sum++ = left[10] * right[10];
        *sum++ = left[11] * right[11];
        *sum++ = left[12] * right[12];
        *sum++ = left[13] * right[13];
        *sum++ = left[14] * right[14];
        *sum++ = left[15] * right[15];
        *sum++ = left[16] * right[16];
        *sum++ = left[17] * right[17];
        *sum++ = left[18] * right[18];
        *sum++ = left[19] * right[19];
      }
    }
    break;
  case 1:
    for (i = lower; i < n; i++) {
      left = &(tipVector[20 * tipX1[i]]);
      sum = &(sumtable[i * 80]);
      for (l = 0; l < 4; l++) {
        right = &(x2[80 * i + l * 20]);
        *sum++ = left[0] * right[0];
        *sum++ = left[1] * right[1];
        *sum++ = left[2] * right[2];
        *sum++ = left[3] * right[3];
        *sum++ = left[4] * right[4];
        *sum++ = left[5] * right[5];
        *sum++ = left[6] * right[6];
        *sum++ = left[7] * right[7];
        *sum++ = left[8] * right[8];
        *sum++ = left[9] * right[9];
        *sum++ = left[10] * right[10];
        *sum++ = left[11] * right[11];
        *sum++ = left[12] * right[12];
        *sum++ = left[13] * right[13];
        *sum++ = left[14] * right[14];
        *sum++ = left[15] * right[15];
        *sum++ = left[16] * right[16];
        *sum++ = left[17] * right[17];
        *sum++ = left[18] * right[18];
        *sum++ = left[19] * right[19];
      }
    }
    break;
  case 2:
    for (i = lower; i < n; i++) {
      sum = &sumtable[i * 80];
      for (l = 0; l < 4; l++) {
        left = &(x1[80 * i + l * 20]);
        right = &(x2[80 * i + l * 20]);
        *sum++ = left[0] * right[0];
        *sum++ = left[1] * right[1];
        *sum++ = left[2] * right[2];
        *sum++ = left[3] * right[3];
        *sum++ = left[4] * right[4];
        *sum++ = left[5] * right[5];
        *sum++ = left[6] * right[6];
        *sum++ = left[7] * right[7];
        *sum++ = left[8] * right[8];
        *sum++ = left[9] * right[9];
        *sum++ = left[10] * right[10];
        *sum++ = left[11] * right[11];
        *sum++ = left[12] * right[12];
        *sum++ = left[13] * right[13];
        *sum++ = left[14] * right[14];
        *sum++ = left[15] * right[15];
        *sum++ = left[16] * right[16];
        *sum++ = left[17] * right[17];
        *sum++ = left[18] * right[18];
        *sum++ = left[19] * right[19];
      }
    }
    break;
  default:
    assert(0);
  }
}
```