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

```asm
<arc_find_angles>:
  endbr64
  push   %r15
  mov    %rsi,%r15
  push   %r14
  mov    $0xaaaaaaab,%r14d
  push   %r13
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  xor    %ebx,%ebx
  sub    $0x38,%rsp
L38:
  lea    0x1(%rbx),%ecx
  movsd  (%r15,%rbx,8),%xmm4
  movsd  0x0(%rbp,%rbx,8),%xmm0
  mov    %rcx,%rax
  imul   %r14,%rcx
  movsd  %xmm4,0x10(%rsp)
  shr    $0x21,%rcx
  lea    (%rcx,%rcx,2),%ecx
  sub    %ecx,%eax
  lea    0x2(%rbx),%ecx
  cltq
  movsd  (%r15,%rax,8),%xmm6
  lea    0x0(,%rax,8),%r12
  mov    %rcx,%rax
  imul   %r14,%rcx
  add    %rbp,%r12
  movsd  %xmm6,0x18(%rsp)
  shr    $0x21,%rcx
  lea    (%rcx,%rcx,2),%ecx
  sub    %ecx,%eax
  cltq
  movsd  (%r15,%rax,8),%xmm5
  lea    0x0(,%rax,8),%r13
  lea    0x0(%rbp,%rbx,8),%rax
  mov    %rax,0x28(%rsp)
  add    %rbp,%r13
  movsd  %xmm5,0x20(%rsp)
  call   <to_radians@plt>
  movsd  %xmm0,0x8(%rsp)
  movsd  (%r12),%xmm0
  call   <to_radians@plt>
  movsd  %xmm0,(%rsp)
  movsd  0x0(%r13),%xmm0
  call   <to_radians@plt>
  movsd  0x8(%rsp),%xmm3
  pxor   %xmm1,%xmm1
  movapd %xmm0,%xmm2
  comisd %xmm1,%xmm3
  jbe    L71
L101:
  movsd  (%rsp),%xmm7
  comisd %xmm1,%xmm7
  jbe    L107
L4:
  comisd %xmm1,%xmm2
  jbe    L121
L67:
  add    $0x1,%rbx
  cmp    $0x3,%rbx
  jne    L38
  xor    %eax,%eax
L27:
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  cs nopw 0x0(%rax,%rax,1)
L71:
  movsd  0x10(%rsp),%xmm4
  comisd %xmm1,%xmm4
  jbe    L101
  comisd %xmm1,%xmm0
  jbe    L101
  movsd  0x20(%rsp),%xmm5
  comisd %xmm1,%xmm5
  ja     L70
  movsd  (%rsp),%xmm5
  comisd %xmm1,%xmm5
  ja     L67
  movsd  0x18(%rsp),%xmm6
  comisd %xmm1,%xmm6
  jbe    L4
L144:
  movsd  0x20(%rsp),%xmm5
  comisd %xmm1,%xmm5
  jbe    L67
  movapd %xmm2,%xmm0
  movsd  %xmm3,0x10(%rsp)
  movsd  %xmm2,0x8(%rsp)
  call   <sin@plt>
  movapd %xmm0,%xmm1
  movsd  0x18(%rsp),%xmm0
  divsd  0x20(%rsp),%xmm0
  mulsd  %xmm1,%xmm0
  call   <asin@plt>
  movsd  0x8(%rsp),%xmm2
  movsd  0x10(%rsp),%xmm3
  movsd  %xmm0,(%rsp)
L179:
  movapd %xmm3,%xmm0
  movsd  %xmm2,0x8(%rsp)
  call   <to_degrees@plt>
  mov    0x28(%rsp),%rax
  movsd  %xmm0,(%rax)
  movsd  (%rsp),%xmm0
  call   <to_degrees@plt>
  movsd  0x8(%rsp),%xmm2
  movsd  %xmm0,(%r12)
  movapd %xmm2,%xmm0
  call   <to_degrees@plt>
  mov    $0x1,%eax
  movsd  %xmm0,0x0(%r13)
  jmp    L27
  nopl   0x0(%rax,%rax,1)
L107:
  movsd  0x18(%rsp),%xmm6
  comisd %xmm1,%xmm6
  jbe    L4
  comisd %xmm1,%xmm2
  ja     L144
L121:
  movsd  0x10(%rsp),%xmm7
  comisd %xmm1,%xmm7
  jbe    L67
  movsd  0x18(%rsp),%xmm2
  comisd %xmm1,%xmm2
  jbe    L67
  movsd  0x20(%rsp),%xmm7
  comisd %xmm1,%xmm7
  jbe    L67
  movsd  0x10(%rsp),%xmm2
  movsd  0x18(%rsp),%xmm7
  movsd  %xmm3,0x8(%rsp)
  movapd %xmm2,%xmm0
  movapd %xmm7,%xmm1
  mulsd  %xmm2,%xmm0
  mulsd  %xmm7,%xmm1
  addsd  %xmm1,%xmm0
  movsd  0x20(%rsp),%xmm1
  mulsd  %xmm1,%xmm1
  subsd  %xmm1,%xmm0
  movapd %xmm2,%xmm1
  addsd  %xmm2,%xmm1
  mulsd  %xmm7,%xmm1
  divsd  %xmm1,%xmm0
  call   <acos@plt>
  movsd  0x8(%rsp),%xmm3
  movapd %xmm0,%xmm2
  jmp    L179
L70:
  movsd  %xmm0,0x8(%rsp)
  call   <sin@plt>
  movapd %xmm0,%xmm1
  movsd  0x10(%rsp),%xmm0
  divsd  0x20(%rsp),%xmm0
  mulsd  %xmm1,%xmm0
  call   <asin@plt>
  movsd  0x8(%rsp),%xmm2
  movapd %xmm0,%xmm3
  jmp    L179
```

assistant: ```c
int arc_find_angles(double *angles, const double *sides) {
  double A, B, C;
  register int i;
  A = B = C = 0;
  for (i = 0; i < 3; i++) {
    const double a = sides[(i + 0)];
    const double b = sides[(i + 1) % 3];
    const double c = sides[(i + 2) % 3];
    A = to_radians(angles[(i + 0)]);
    B = to_radians(angles[(i + 1) % 3]);
    C = to_radians(angles[(i + 2) % 3]);
    if (!((A) > 0) && ((a) > 0) && ((C) > 0) && ((c) > 0)) {
      A = asin(a / c * sin(C));
      goto new_info;
    }
    if (!((B) > 0) && ((b) > 0) && ((C) > 0) && ((c) > 0)) {
      B = asin(b / c * sin(C));
      goto new_info;
    }
    if (!((C) > 0) && ((a) > 0) && ((b) > 0) && ((c) > 0)) {
      C = acos((a * a + b * b - c * c) / (2 * a * b));
      goto new_info;
    }
  }
  return 0;
new_info:
  angles[(i + 0) % 3] = to_degrees(A);
  angles[(i + 1) % 3] = to_degrees(B);
  angles[(i + 2) % 3] = to_degrees(C);
  return 1;
}
```