user: Demonstrate the C code that generates the assembly output below:

```asm
<sumCATMULT>:
  endbr64
  push   %r12
  mov    %rdx,%r10
  mov    %rcx,%rdx
  push   %rbp
  mov    %edi,%ebp
  push   %rbx
  mov    %rsi,%rbx
  mov    0x20(%rsp),%r11
  mov    0x28(%rsp),%rdi
  movslq 0x30(%rsp),%rax
  mov    0x38(%rsp),%esi
  cmp    $0x1,%ebp
  je     L82
  cmp    $0x2,%ebp
  je     L25
  test   %ebp,%ebp
  je     L72
  pop    %rbx
  xor    %edi,%edi
  pop    %rbp
  pop    %r12
  jmp    1050 <assert@plt>
  nopw   0x0(%rax,%rax,1)
L82:
  cmp    %esi,%eax
  jge    L55
  movslq %eax,%r10
  mov    %r10,%rax
  shl    $0x5,%rax
  add    %rax,%rdx
  lea    (%rbx,%rax,1),%rcx
  nopl   (%rax)
L53:
  mov    (%rdi,%r10,4),%eax
  movsbl (%r9,%r10,1),%r11d
  add    $0x1,%r10
  add    $0x20,%rdx
  add    $0x20,%rcx
  shl    $0x4,%eax
  add    %r11d,%eax
  shl    $0x2,%eax
  cltq
  lea    (%r8,%rax,8),%rax
  movsd  (%rax),%xmm0
  mulsd  -0x20(%rdx),%xmm0
  movsd  %xmm0,-0x20(%rcx)
  movsd  0x8(%rax),%xmm0
  mulsd  -0x18(%rdx),%xmm0
  movsd  %xmm0,-0x18(%rcx)
  movsd  0x10(%rax),%xmm0
  mulsd  -0x10(%rdx),%xmm0
  movsd  %xmm0,-0x10(%rcx)
  movsd  0x18(%rax),%xmm0
  mulsd  -0x8(%rdx),%xmm0
  movsd  %xmm0,-0x8(%rcx)
  cmp    %r10d,%esi
  jg     L53
L55:
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  nopl   0x0(%rax)
L72:
  cmp    %esi,%eax
  jge    L55
  mov    %rax,%rdx
  shl    $0x5,%rdx
  lea    (%rbx,%rdx,1),%rcx
  nopw   0x0(%rax,%rax,1)
L23:
  mov    (%rdi,%rax,4),%ebx
  movsbl (%r9,%rax,1),%edx
  add    $0x20,%rcx
  shl    $0x4,%ebx
  add    %ebx,%edx
  shl    $0x2,%edx
  movslq %edx,%rdx
  lea    (%r8,%rdx,8),%r10
  movsbl (%r11,%rax,1),%edx
  add    $0x1,%rax
  movsd  (%r10),%xmm0
  add    %ebx,%edx
  shl    $0x2,%edx
  movslq %edx,%rdx
  lea    (%r8,%rdx,8),%rdx
  mulsd  (%rdx),%xmm0
  movsd  %xmm0,-0x20(%rcx)
  movsd  0x8(%r10),%xmm0
  mulsd  0x8(%rdx),%xmm0
  movsd  %xmm0,-0x18(%rcx)
  movsd  0x10(%r10),%xmm0
  mulsd  0x10(%rdx),%xmm0
  movsd  %xmm0,-0x10(%rcx)
  movsd  0x18(%r10),%xmm0
  mulsd  0x18(%rdx),%xmm0
  movsd  %xmm0,-0x8(%rcx)
  cmp    %eax,%esi
  jg     L23
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  nopw   0x0(%rax,%rax,1)
L25:
  cmp    %esi,%eax
  jge    L55
  movslq %eax,%r9
  lea    0x1(%r9),%r11
  shl    $0x5,%r11
  lea    -0x20(%r11),%rdi
  lea    (%rbx,%r11,1),%rbp
  lea    (%rbx,%rdi,1),%r8
  lea    (%r10,%rdi,1),%rcx
  add    %rdx,%rdi
  add    %r11,%rdx
  cmp    %rdx,%r8
  setae  %dl
  cmp    %rbp,%rdi
  setae  %r12b
  sub    $0x1,%esi
  sub    %eax,%esi
  or     %r12b,%dl
  je     L60
  add    %r11,%r10
  cmp    %r10,%r8
  setae  %dl
  cmp    %rbp,%rcx
  setae  %r10b
  or     %r10b,%dl
  je     L60
  add    $0x1,%rsi
  xor    %eax,%eax
  shl    $0x5,%rsi
  nop
L107:
  movupd 0x10(%rdi,%rax,1),%xmm0
  movupd 0x10(%rcx,%rax,1),%xmm2
  movupd (%rdi,%rax,1),%xmm1
  movupd (%rcx,%rax,1),%xmm3
  mulpd  %xmm2,%xmm0
  mulpd  %xmm3,%xmm1
  movups %xmm0,0x10(%r8,%rax,1)
  movups %xmm1,(%r8,%rax,1)
  add    $0x20,%rax
  cmp    %rsi,%rax
  jne    L107
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  nopw   0x0(%rax,%rax,1)
L60:
  lea    (%rsi,%r9,1),%rax
  shl    $0x5,%rax
  lea    0x20(%rbx,%rax,1),%rax
  nopl   (%rax)
L30:
  movsd  (%rdi),%xmm0
  mulsd  (%rcx),%xmm0
  add    $0x20,%r8
  add    $0x20,%rcx
  add    $0x20,%rdi
  movsd  %xmm0,-0x20(%r8)
  movsd  -0x18(%rdi),%xmm0
  mulsd  -0x18(%rcx),%xmm0
  movsd  %xmm0,-0x18(%r8)
  movsd  -0x10(%rdi),%xmm0
  mulsd  -0x10(%rcx),%xmm0
  movsd  %xmm0,-0x10(%r8)
  movsd  -0x8(%rdi),%xmm0
  mulsd  -0x8(%rcx),%xmm0
  movsd  %xmm0,-0x8(%r8)
  cmp    %rax,%r8
  jne    L30
  jmp    L55
```

assistant: ```c
void sumCATMULT(int tipCase, double *sum, double *x1_start, double *x2_start, double *tipVector, char *tipX1, char *tipX2, int *modelptr, int loopStart, int n) {
  double *x1, *x2;
  int i, model;
  switch (tipCase) {
  case 0:
    for (i = loopStart; i < n; i++) {
      model = modelptr[i];
      x1 = &(tipVector[model * 64 + tipX1[i] * 4]);
      x2 = &(tipVector[model * 64 + tipX2[i] * 4]);
      sum[i * 4] = x1[0] * x2[0];
      sum[i * 4 + 1] = x1[1] * x2[1];
      sum[i * 4 + 2] = x1[2] * x2[2];
      sum[i * 4 + 3] = x1[3] * x2[3];
    }
    break;
  case 1:
    for (i = loopStart; i < n; i++) {
      model = modelptr[i];
      x1 = &(tipVector[model * 64 + 4 * tipX1[i]]);
      x2 = &x2_start[4 * i];
      sum[i * 4] = x1[0] * x2[0];
      sum[i * 4 + 1] = x1[1] * x2[1];
      sum[i * 4 + 2] = x1[2] * x2[2];
      sum[i * 4 + 3] = x1[3] * x2[3];
    }
    break;
  case 2:
    for (i = loopStart; i < n; i++) {
      x1 = &x1_start[4 * i];
      x2 = &x2_start[4 * i];
      sum[i * 4] = x1[0] * x2[0];
      sum[i * 4 + 1] = x1[1] * x2[1];
      sum[i * 4 + 2] = x1[2] * x2[2];
      sum[i * 4 + 3] = x1[3] * x2[3];
    }
    break;
  default:
    assert(0);
  }
}
```