user: Converte this assembly snippet into its equivalent C code:

```asm
<findRoots>:
  endbr64
  push   %r15
  mov    %edi,%eax
  pxor   %xmm2,%xmm2
  push   %r14
  mov    %rcx,%r14
  push   %r13
  mov    %r9,%r13
  push   %r12
  mov    %edx,%r12d
  mov    %esi,%edx
  imul   %r12d,%eax
  push   %rbp
  mov    %edi,%ebp
  lea    D3(%rip),%rdi
  imul   %esi,%edx
  push   %rbx
  mov    %esi,%ebx
  shl    $0x2,%eax
  sub    %eax,%edx
  sub    $0x18,%rsp
  cvtsi2sd %edx,%xmm2
  mov    %edx,%r15d
  mov    %r8,0x8(%rsp)
  movapd %xmm2,%xmm0
  movsd  %xmm2,(%rsp)
  call   <printf@plt>
  test   %r15d,%r15d
  js     L4
  movsd  D5(%rip),%xmm0
  mov    $0x1,%eax
L45:
  mov    %eax,0x0(%r13)
  lea    D57(%rip),%rdi
  call   <printf@plt>
  test   %ebp,%ebp
  je     L31
  test   %ebx,%ebx
  je     L47
  mov    0x0(%r13),%eax
  cmp    $0x1,%eax
  je     L66
  cmp    $0x2,%eax
  jne    L41
  add    %ebp,%ebp
  pxor   %xmm0,%xmm0
  pxor   %xmm1,%xmm1
  neg    %ebx
  cvtsi2sd %ebp,%xmm1
  cvtsi2sd %ebx,%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,(%r14)
  movsd  (%rsp),%xmm0
  xorpd  D39(%rip),%xmm0
  call   <sqrt@plt>
  pxor   %xmm0,%xmm0
  mov    0x8(%rsp),%rbx
  lea    D52(%rip),%rdi
  cltd
  idiv   %ebp
  cvtsi2sd %eax,%xmm0
  movsd  %xmm0,(%rbx)
  movsd  (%r14),%xmm0
  call   <printf@plt>
  movsd  (%rbx),%xmm0
  add    $0x18,%rsp
  lea    D59(%rip),%rdi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1060 <printf@plt>
  xchg   %ax,%ax
L47:
  test   %ebp,%ebp
  je     L31
L41:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L31:
  neg    %r12d
  pxor   %xmm0,%xmm0
  pxor   %xmm1,%xmm1
  cvtsi2sd %r12d,%xmm0
  cvtsi2sd %ebx,%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,(%r14)
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L4:
  movsd  D8(%rip),%xmm0
  mov    $0x2,%eax
  jmp    L45
  nopw   0x0(%rax,%rax,1)
L66:
  movsd  (%rsp),%xmm0
  add    %ebp,%ebp
  call   <sqrt@plt>
  pxor   %xmm0,%xmm0
  sub    %ebx,%eax
  cltd
  idiv   %ebp
  cvtsi2sd %eax,%xmm0
  movsd  %xmm0,(%r14)
  movsd  (%rsp),%xmm0
  call   <sqrt@plt>
  pxor   %xmm0,%xmm0
  mov    %eax,%r8d
  mov    %ebx,%eax
  neg    %eax
  sub    %r8d,%eax
  cltd
  idiv   %ebp
  cvtsi2sd %eax,%xmm0
  mov    0x8(%rsp),%rax
  movsd  %xmm0,(%rax)
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: parse_data
arguments: tag: D3
type_guessed: string
name: parse_data
arguments: tag: D5
type_guessed: byte[8]
name: parse_data
arguments: tag: D57
type_guessed: string
name: parse_data
arguments: tag: D39
type_guessed: byte[16]
name: parse_data
arguments: tag: D52
type_guessed: string
name: parse_data
arguments: tag: D59
type_guessed: string
name: parse_data
arguments: tag: D8
type_guessed: byte[8]

tool: D3: 
det: %f

tool: {"D5": [0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x3f]}

tool: D57: 
roc: %d

tool: {"D39": [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00]}

tool: D52: 
root1: %f

tool: D59: 
root2: %f

tool: {"D8": [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40]}

assistant: ```c
void findRoots(int a, int b, int c, double *r1, double *r2, int *roc) {
  double det = (b * b) - (4 * a * c);
  printf("\ndet: %f", det);
  if (det > 0 || det == 0)
    *roc = 1;
  else
    *roc = 2;
  printf("\nroc: %d", *roc);
  if (a != 0 && b != 0) {
    switch (*roc) {
    case 1:
      *r1 = (-b + sqrt(det)) / (2 * a);
      *r2 = (-b - sqrt(det)) / (2 * a);
      break;
    case 2:
      *r1 = (double)-b / (2 * a);
      *r2 = sqrt(-det) / (2 * a);
      printf("\nroot1: %f", *r1);
      printf("\nroot2: %f", *r2);
      break;
    }
  } else if (a == 0)
    *r1 = (double)-c / b;
  return;
}
```