user: 请将以下的汇编代码转换成C语言代码：

```asm
<reb_tools_M_to_E>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  movsd  %xmm0,-0x28(%rbp)
  movsd  %xmm1,-0x30(%rbp)
  movsd  D63(%rip),%xmm0
  comisd -0x28(%rbp),%xmm0
  jbe    L2
  movsd  D100(%rip),%xmm0
  comisd -0x28(%rbp),%xmm0
  jbe    L90
  movsd  -0x30(%rbp),%xmm0
  jmp    L21
L90:
  movsd  D111(%rip),%xmm0
L21:
  movsd  %xmm0,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  movq   %xmm0,%rax
  movq   %rax,%xmm1
  mulsd  -0x28(%rbp),%xmm1
  movsd  -0x18(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  subsd  -0x30(%rbp),%xmm0
  movsd  %xmm0,-0x10(%rbp)
  movl   $0x0,-0x20(%rbp)
  jmp    L80
L71:
  mov    -0x18(%rbp),%rax
  movq   %rax,%xmm0
  call   <cos@plt>
  movq   %xmm0,%rax
  movq   %rax,%xmm1
  mulsd  -0x28(%rbp),%xmm1
  movsd  D63(%rip),%xmm0
  movapd %xmm0,%xmm2
  subsd  %xmm1,%xmm2
  movsd  -0x10(%rbp),%xmm0
  movapd %xmm0,%xmm1
  divsd  %xmm2,%xmm1
  movsd  -0x18(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  movq   %xmm0,%rax
  movq   %rax,%xmm1
  mulsd  -0x28(%rbp),%xmm1
  movsd  -0x18(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  subsd  -0x30(%rbp),%xmm0
  movsd  %xmm0,-0x10(%rbp)
  movsd  -0x10(%rbp),%xmm0
  movq   D116(%rip),%xmm1
  andpd  %xmm0,%xmm1
  movsd  D103(%rip),%xmm0
  comisd %xmm1,%xmm0
  ja     L58
  addl   $0x1,-0x20(%rbp)
L80:
  cmpl   $0x63,-0x20(%rbp)
  jle    L71
  jmp    L78
L58:
  nop
L78:
  mov    -0x18(%rbp),%rax
  movq   %rax,%xmm0
  call   <mod2pi@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x18(%rbp)
  movsd  -0x18(%rbp),%xmm0
  jmp    L46
L2:
  movsd  -0x30(%rbp),%xmm0
  movq   D116(%rip),%xmm1
  andpd  %xmm0,%xmm1
  movsd  -0x30(%rbp),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x38(%rbp)
  movsd  -0x30(%rbp),%xmm0
  movq   D116(%rip),%xmm1
  andpd  %xmm1,%xmm0
  addsd  %xmm0,%xmm0
  movapd %xmm0,%xmm1
  divsd  -0x28(%rbp),%xmm1
  movsd  D82(%rip),%xmm0
  addsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,%edi
  call   <log@plt>
  mulsd  -0x38(%rbp),%xmm0
  movsd  %xmm0,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  movq   %rax,%xmm0
  call   <sinh@plt>
  movq   %xmm0,%rax
  movq   %rax,%xmm1
  mulsd  -0x28(%rbp),%xmm1
  movsd  -0x18(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  movsd  -0x30(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movl   $0x0,-0x1c(%rbp)
  jmp    L72
L65:
  mov    -0x18(%rbp),%rax
  movq   %rax,%xmm0
  call   <cosh@plt>
  movq   %xmm0,%rax
  movq   %rax,%xmm1
  mulsd  -0x28(%rbp),%xmm1
  movsd  D63(%rip),%xmm0
  movapd %xmm0,%xmm2
  subsd  %xmm1,%xmm2
  movsd  -0x8(%rbp),%xmm0
  movapd %xmm0,%xmm1
  divsd  %xmm2,%xmm1
  movsd  -0x18(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  movq   %rax,%xmm0
  call   <sinh@plt>
  movq   %xmm0,%rax
  movq   %rax,%xmm1
  mulsd  -0x28(%rbp),%xmm1
  movsd  -0x18(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  movsd  -0x30(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movsd  -0x8(%rbp),%xmm0
  movq   D116(%rip),%xmm1
  andpd  %xmm0,%xmm1
  movsd  D103(%rip),%xmm0
  comisd %xmm1,%xmm0
  ja     L101
  addl   $0x1,-0x1c(%rbp)
L72:
  cmpl   $0x63,-0x1c(%rbp)
  jle    L65
  jmp    L86
L101:
  nop
L86:
  movsd  -0x18(%rbp),%xmm0
L46:
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  leave
  ret
```

tool_calls: name: unpack_data
arguments: data_tag: D63
type: f64
name: unpack_data
arguments: data_tag: D100
type: f64
name: unpack_data
arguments: data_tag: D111
type: f64
name: unpack_data
arguments: data_tag: D116
type: qword
name: unpack_data
arguments: data_tag: D103
type: byte[8]
name: unpack_data
arguments: data_tag: D82
type: f64

tool: D63: 1

tool: D100: 0.8

tool: D111: 3.141592653589793

tool: D116: 9223372036854775807

tool: {"D103": [0xbc,0x89,0xd8,0x97,0xb2,0xd2,0x9c,0x3c]}

tool: D82: 1.8

assistant: ```c
double reb_tools_M_to_E(double e, double M) {
  double E;
  if (e < 1.) {
    E = e < 0.8 ? M : 3.14159265358979323846;
    double F = E - e * sin(E) - M;
    for (int i = 0; i < 100; i++) {
      E = E - F / (1. - e * cos(E));
      F = E - e * sin(E) - M;
      if (fabs(F) < 1.e-16) {
        break;
      }
    }
    E = mod2pi(E);
    return E;
  } else {
    E = M / fabs(M) * log(2. * fabs(M) / e + 1.8);
    double F = E - e * sinh(E) + M;
    for (int i = 0; i < 100; i++) {
      E = E - F / (1.0 - e * cosh(E));
      F = E - e * sinh(E) + M;
      if (fabs(F) < 1.e-16) {
        break;
      }
    }
    return E;
  }
}
```