user: Translate the below assembly code into C programming language:

```asm
<solve_degree_4>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x60,%rsp
  mov    %rsi,%rbp
  mov    %fs:0x28,%rax
  mov    %rax,0x58(%rsp)
  xor    %eax,%eax
  movsd  0x20(%rdi),%xmm4
  movsd  0x18(%rdi),%xmm0
  divsd  %xmm4,%xmm0
  movsd  0x10(%rdi),%xmm3
  divsd  %xmm4,%xmm3
  movsd  0x8(%rdi),%xmm2
  divsd  %xmm4,%xmm2
  movapd %xmm0,%xmm1
  mulsd  %xmm0,%xmm1
  movapd %xmm1,%xmm5
  mulsd  D136(%rip),%xmm5
  addsd  %xmm3,%xmm5
  movq   %xmm5,%r12
  movapd %xmm1,%xmm6
  mulsd  D135(%rip),%xmm6
  mulsd  %xmm0,%xmm6
  movapd %xmm0,%xmm5
  mulsd  D90(%rip),%xmm5
  mulsd  %xmm3,%xmm5
  subsd  %xmm5,%xmm6
  addsd  %xmm2,%xmm6
  movq   %xmm6,%rbx
  movapd %xmm0,%xmm5
  mulsd  D94(%rip),%xmm5
  movsd  %xmm5,(%rsp)
  movapd %xmm1,%xmm0
  mulsd  D123(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  mulsd  D74(%rip),%xmm1
  mulsd  %xmm3,%xmm1
  addsd  %xmm1,%xmm0
  mulsd  %xmm5,%xmm2
  subsd  %xmm2,%xmm0
  movsd  (%rdi),%xmm1
  divsd  %xmm4,%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,0x18(%rsp)
  lea    0x18(%rsp),%rdi
  call   <zero@plt>
  test   %rax,%rax
  je     L167
  mov    %rbx,0x30(%rsp)
  mov    %r12,0x38(%rsp)
  movq   $0x0,0x40(%rsp)
  mov    D52(%rip),%rax
  mov    %rax,0x48(%rsp)
  lea    0x30(%rsp),%rdi
  mov    %rbp,%rsi
  call   <solve_degree_3@plt>
  mov    %eax,%edx
  lea    0x1(%rax),%eax
  movslq %edx,%rdx
  movq   $0x0,0x0(%rbp,%rdx,8)
L76:
  test   %eax,%eax
  jle    L16
  mov    %rbp,%rdx
  lea    -0x1(%rax),%ecx
  lea    0x8(%rbp,%rcx,8),%rcx
L14:
  movsd  (%rdx),%xmm0
  subsd  (%rsp),%xmm0
  movsd  %xmm0,(%rdx)
  add    $0x8,%rdx
  cmp    %rcx,%rdx
  jne    L14
L16:
  mov    0x58(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L51
  add    $0x60,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L167:
  movsd  0x18(%rsp),%xmm1
  movapd %xmm1,%xmm0
  mulsd  D90(%rip),%xmm0
  movq   %r12,%xmm3
  mulsd  %xmm3,%xmm0
  movq   %rbx,%xmm2
  mulsd  D135(%rip),%xmm2
  movq   %rbx,%xmm3
  mulsd  %xmm3,%xmm2
  subsd  %xmm2,%xmm0
  movsd  %xmm0,0x30(%rsp)
  xorpd  D72(%rip),%xmm1
  movsd  %xmm1,0x38(%rsp)
  movq   %r12,%xmm0
  mulsd  D140(%rip),%xmm0
  movsd  %xmm0,0x40(%rsp)
  mov    D52(%rip),%rax
  mov    %rax,0x48(%rsp)
  lea    0x30(%rsp),%rdi
  mov    %rbp,%rsi
  call   <solve_degree_3@plt>
  movsd  0x0(%rbp),%xmm4
  movsd  %xmm4,0x8(%rsp)
  movapd %xmm4,%xmm0
  mulsd  %xmm4,%xmm0
  subsd  0x18(%rsp),%xmm0
  movsd  %xmm0,0x20(%rsp)
  movapd %xmm4,%xmm0
  addsd  %xmm4,%xmm0
  movq   %r12,%xmm3
  subsd  %xmm3,%xmm0
  movsd  %xmm0,0x28(%rsp)
  lea    0x20(%rsp),%rdi
  call   <zero@plt>
  movsd  0x20(%rsp),%xmm0
  pxor   %xmm1,%xmm1
  comisd %xmm0,%xmm1
  ja     L7
  comisd %xmm1,%xmm0
  ja     L92
L111:
  lea    0x28(%rsp),%rdi
  call   <zero@plt>
  movsd  0x28(%rsp),%xmm0
  pxor   %xmm1,%xmm1
  comisd %xmm0,%xmm1
  ja     L7
  comisd %xmm1,%xmm0
  ja     L110
L6:
  movsd  0x8(%rsp),%xmm0
  subsd  0x20(%rsp),%xmm0
  movsd  %xmm0,0x30(%rsp)
  pxor   %xmm0,%xmm0
  movq   %rbx,%xmm3
  comisd %xmm3,%xmm0
  ja     L105
  movsd  0x28(%rsp),%xmm0
  movsd  %xmm0,0x38(%rsp)
  mov    D52(%rip),%rax
  mov    %rax,0x40(%rsp)
  lea    0x30(%rsp),%rdi
  mov    %rbp,%rsi
  call   <solve_degree_2@plt>
  mov    %eax,%r12d
  movsd  0x8(%rsp),%xmm0
  addsd  0x20(%rsp),%xmm0
  movsd  %xmm0,0x30(%rsp)
  pxor   %xmm0,%xmm0
  movq   %rbx,%xmm3
  comisd %xmm3,%xmm0
  ja     L3
  movsd  0x28(%rsp),%xmm0
  xorpd  D72(%rip),%xmm0
L26:
  movsd  %xmm0,0x38(%rsp)
  mov    D52(%rip),%rax
  mov    %rax,0x40(%rsp)
  movslq %r12d,%rax
  lea    0x0(%rbp,%rax,8),%rsi
  lea    0x30(%rsp),%rdi
  call   <solve_degree_2@plt>
  add    %r12d,%eax
  jmp    L76
L92:
  ucomisd %xmm0,%xmm1
  ja     L44
  sqrtsd %xmm0,%xmm0
L103:
  movsd  %xmm0,0x20(%rsp)
  jmp    L111
L44:
  call   <sqrt@plt>
  jmp    L103
L110:
  ucomisd %xmm0,%xmm1
  ja     L40
  sqrtsd %xmm0,%xmm0
L155:
  movsd  %xmm0,0x28(%rsp)
  jmp    L6
L40:
  call   <sqrt@plt>
  jmp    L155
L105:
  movsd  0x28(%rsp),%xmm0
  xorpd  D72(%rip),%xmm0
  movsd  %xmm0,0x38(%rsp)
  mov    D52(%rip),%rax
  mov    %rax,0x40(%rsp)
  lea    0x30(%rsp),%rdi
  mov    %rbp,%rsi
  call   <solve_degree_2@plt>
  mov    %eax,%r12d
  movsd  0x8(%rsp),%xmm0
  addsd  0x20(%rsp),%xmm0
  movsd  %xmm0,0x30(%rsp)
L3:
  movsd  0x28(%rsp),%xmm0
  jmp    L26
L7:
  mov    $0x0,%eax
  jmp    L16
L51:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_tag: D136
type_infered: f32[2]
name: unpack_data
arguments: data_tag: D135
type_infered: f32[2]
name: unpack_data
arguments: data_tag: D90
type_infered: f32[2]
name: unpack_data
arguments: data_tag: D94
type_infered: f32[2]
name: unpack_data
arguments: data_tag: D123
type_infered: f32[2]
name: unpack_data
arguments: data_tag: D74
type_infered: f32[2]
name: unpack_data
arguments: data_tag: D52
type_infered: f64
name: unpack_data
arguments: data_tag: D72
type_infered: f32[4]
name: unpack_data
arguments: data_tag: D140
type_infered: f32[2]

tool: {"D136": [0.0,-1.6875]}

tool: {"D135": [0.0,1.5]}

tool: {"D90": [0.0,1.75]}

tool: {"D94": [0.0,1.625]}

tool: {"D123": [0.0,-1.0625]}

tool: {"D74": [0.0,1.375]}

tool: D52: 1

tool: {"D72": [0.0,-0.0,0.0,0.0]}

tool: {"D140": [0.0,-1.75]}

assistant: ```c
int solve_degree_4(const double *c, double *x) {
  double coeffs[4];
  int num;
  double A = c[3] / c[4];
  double B = c[2] / c[4];
  double C = c[1] / c[4];
  double D = c[0] / c[4];
  double sq_A = A * A;
  double p = -3.0 / 8.0 * sq_A + B;
  double q = 1.0 / 8.0 * sq_A * A - 1.0 / 2.0 * A * B + C;
  double r = -3.0 / 256.0 * sq_A * sq_A + 1.0 / 16.0 * sq_A * B - 1.0 / 4.0 * A * C + D;
  if (zero(&r)) {
    coeffs[0] = q;
    coeffs[1] = p;
    coeffs[2] = 0.0;
    coeffs[3] = 1.0;
    num = solve_degree_3(coeffs, x);
    x[num++] = 0;
  } else {
    coeffs[0] = 1.0 / 2.0 * r * p - 1.0 / 8.0 * q * q;
    coeffs[1] = -r;
    coeffs[2] = -1.0 / 2.0 * p;
    coeffs[3] = 1.0;
    solve_degree_3(coeffs, x);
    double z = x[0];
    double u = z * z - r;
    double v = 2.0 * z - p;
    zero(&u);
    if (u < 0)
      return 0;
    else if (u > 0)
      u = sqrt(u);
    zero(&v);
    if (v < 0)
      return 0;
    else if (v > 0)
      v = sqrt(v);
    coeffs[0] = z - u;
    coeffs[1] = q < 0.0 ? -v : v;
    coeffs[2] = 1.0;
    num = solve_degree_2(coeffs, x);
    coeffs[0] = z + u;
    coeffs[1] = q < 0.0 ? v : -v;
    coeffs[2] = 1.0;
    num += solve_degree_2(coeffs, x + num);
  }
  double sub = 1.0 / 4.0 * A;
  for (int i = 0; i < num; i++)
    x[i] -= sub;
  return num;
}
```