user: What is the c source code of the assembly code below?

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x1,-0x4c(%rbp)
L96:
  lea    -0x50(%rbp),%rax
  mov    %rax,%rsi
  lea    D48(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  mov    -0x50(%rbp),%eax
  test   %eax,%eax
  je     L84
  lea    -0x38(%rbp),%rcx
  lea    -0x40(%rbp),%rdx
  lea    -0x48(%rbp),%rax
  mov    %rax,%rsi
  lea    D10(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  mov    -0x50(%rbp),%eax
  cmp    $0x1,%eax
  jne    L17
  movsd  -0x48(%rbp),%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movsd  -0x40(%rbp),%xmm0
  movsd  %xmm0,-0x30(%rbp)
  movsd  -0x38(%rbp),%xmm0
  movsd  %xmm0,-0x10(%rbp)
  movsd  -0x30(%rbp),%xmm0
  subsd  -0x18(%rbp),%xmm0
  divsd  -0x10(%rbp),%xmm0
  movsd  %xmm0,-0x28(%rbp)
  movsd  -0x18(%rbp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x10(%rbp),%xmm1
  movsd  -0x28(%rbp),%xmm2
  movsd  D44(%rip),%xmm0
  mulsd  %xmm2,%xmm0
  mulsd  -0x10(%rbp),%xmm0
  mulsd  -0x10(%rbp),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movsd  -0x28(%rbp),%xmm0
  mov    -0x20(%rbp),%rdx
  mov    -0x4c(%rbp),%eax
  movapd %xmm0,%xmm1
  movq   %rdx,%xmm0
  mov    %eax,%esi
  lea    D35(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L33
L17:
  mov    -0x50(%rbp),%eax
  cmp    $0x2,%eax
  jne    L74
  movsd  -0x48(%rbp),%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movsd  -0x40(%rbp),%xmm0
  movsd  %xmm0,-0x30(%rbp)
  movsd  -0x38(%rbp),%xmm0
  movsd  %xmm0,-0x28(%rbp)
  movsd  -0x30(%rbp),%xmm0
  subsd  -0x18(%rbp),%xmm0
  divsd  -0x28(%rbp),%xmm0
  movsd  %xmm0,-0x10(%rbp)
  movsd  -0x18(%rbp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x10(%rbp),%xmm1
  movsd  -0x28(%rbp),%xmm2
  movsd  D44(%rip),%xmm0
  mulsd  %xmm2,%xmm0
  mulsd  -0x10(%rbp),%xmm0
  mulsd  -0x10(%rbp),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movsd  -0x10(%rbp),%xmm0
  mov    -0x20(%rbp),%rdx
  mov    -0x4c(%rbp),%eax
  movapd %xmm0,%xmm1
  movq   %rdx,%xmm0
  mov    %eax,%esi
  lea    D35(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L33
L74:
  mov    -0x50(%rbp),%eax
  cmp    $0x3,%eax
  jne    L63
  movsd  -0x48(%rbp),%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movsd  -0x40(%rbp),%xmm0
  movsd  %xmm0,-0x28(%rbp)
  movsd  -0x38(%rbp),%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movsd  -0x18(%rbp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  %xmm0,%xmm1
  movsd  -0x28(%rbp),%xmm0
  addsd  %xmm0,%xmm0
  mulsd  -0x20(%rbp),%xmm0
  addsd  %xmm0,%xmm1
  movq   %xmm1,%rax
  movq   %rax,%xmm0
  call   <sqrt@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x30(%rbp)
  movsd  -0x30(%rbp),%xmm0
  subsd  -0x18(%rbp),%xmm0
  divsd  -0x28(%rbp),%xmm0
  movsd  %xmm0,-0x10(%rbp)
  movsd  -0x10(%rbp),%xmm0
  mov    -0x30(%rbp),%rdx
  mov    -0x4c(%rbp),%eax
  movapd %xmm0,%xmm1
  movq   %rdx,%xmm0
  mov    %eax,%esi
  lea    D35(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L33
L63:
  mov    -0x50(%rbp),%eax
  cmp    $0x4,%eax
  jne    L33
  movsd  -0x48(%rbp),%xmm0
  movsd  %xmm0,-0x30(%rbp)
  movsd  -0x40(%rbp),%xmm0
  movsd  %xmm0,-0x28(%rbp)
  movsd  -0x38(%rbp),%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movsd  -0x30(%rbp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  %xmm0,%xmm1
  movsd  -0x28(%rbp),%xmm0
  addsd  %xmm0,%xmm0
  mulsd  -0x20(%rbp),%xmm0
  subsd  %xmm0,%xmm1
  movq   %xmm1,%rax
  movq   %rax,%xmm0
  call   <sqrt@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x18(%rbp)
  movsd  -0x30(%rbp),%xmm0
  subsd  -0x18(%rbp),%xmm0
  divsd  -0x28(%rbp),%xmm0
  movsd  %xmm0,-0x10(%rbp)
  movsd  -0x10(%rbp),%xmm0
  mov    -0x18(%rbp),%rdx
  mov    -0x4c(%rbp),%eax
  movapd %xmm0,%xmm1
  movq   %rdx,%xmm0
  mov    %eax,%esi
  lea    D35(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
L33:
  addl   $0x1,-0x4c(%rbp)
  jmp    L96
L84:
  nop
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L9
  call   <__stack_chk_fail@plt>
L9:
  leave
  ret
```

tool_calls: name: read_data
arguments: label: D48
data_type: string
name: read_data
arguments: label: D10
data_type: string
name: read_data
arguments: label: D44
data_type: byte[8]
name: read_data
arguments: label: D35
data_type: string

tool: D48: %d

tool: D10: %lf %lf %lf

tool: {"D44": [0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x3f]}

tool: D35: Case %d: %.3lf %.3lf


assistant: ```c
int main() {
  double b, c, d, u, v, a, t, s;
  int i, j, n;
  i = 1;
  while (1) {
    scanf("%d", &n);
    if (n == 0) {
      break;
    } else
      scanf("%lf %lf %lf", &b, &c, &d);
    if (n == 1) {
      u = b;
      v = c;
      t = d;
      a = (v - u) / t;
      s = u * t + .5 * a * t * t;
      printf("Case %d: %.3lf %.3lf\n", i, s, a);
    } else if (n == 2) {
      u = b;
      v = c;
      a = d;
      t = (v - u) / a;
      s = u * t + .5 * a * t * t;
      printf("Case %d: %.3lf %.3lf\n", i, s, t);
    } else if (n == 3) {
      u = b;
      a = c;
      s = d;
      v = sqrt(u * u + 2 * a * s);
      t = (v - u) / a;
      printf("Case %d: %.3lf %.3lf\n", i, v, t);
    } else if (n == 4) {
      v = b;
      a = c;
      s = d;
      u = sqrt(v * v - 2 * a * s);
      t = (v - u) / a;
      printf("Case %d: %.3lf %.3lf\n", i, u, t);
    }
    i++;
  }
  return 0;
}
```