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

```asm
<invSchwarzschildPotential>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  movsd  %xmm0,-0x38(%rbp)
  movsd  %xmm1,-0x40(%rbp)
  movsd  D59(%rip),%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movsd  -0x40(%rbp),%xmm1
  movsd  D25(%rip),%xmm0
  mulsd  %xmm0,%xmm1
  movsd  -0x38(%rbp),%xmm0
  comisd %xmm1,%xmm0
  setae  %al
  movzbl %al,%eax
  mov    %eax,%edi
  mov    $0x0,%eax
  call   <assert@plt>
  movsd  -0x38(%rbp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  %xmm0,%xmm1
  movsd  D33(%rip),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  movsd  -0x40(%rbp),%xmm1
  movsd  D48(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x28(%rbp)
  movsd  -0x40(%rbp),%xmm1
  movsd  D48(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  jmp    L77
L35:
  movsd  -0x28(%rbp),%xmm0
  movsd  D29(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x28(%rbp)
L77:
  movsd  -0x40(%rbp),%xmm0
  mov    -0x28(%rbp),%rax
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  mov    $0x2,%eax
  call   <schwarzschildPotential@plt>
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  movsd  -0x10(%rbp),%xmm0
  comisd %xmm1,%xmm0
  jae    L35
  jmp    L32
L0:
  movsd  -0x20(%rbp),%xmm0
  addsd  %xmm0,%xmm0
  movsd  %xmm0,-0x20(%rbp)
L32:
  movsd  -0x40(%rbp),%xmm0
  mov    -0x20(%rbp),%rax
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  mov    $0x2,%eax
  call   <schwarzschildPotential@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  comisd -0x10(%rbp),%xmm0
  jae    L0
  jmp    L46
L38:
  movsd  -0x28(%rbp),%xmm0
  addsd  -0x20(%rbp),%xmm0
  movsd  D29(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movsd  -0x40(%rbp),%xmm0
  mov    -0x8(%rbp),%rax
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  mov    $0x2,%eax
  call   <schwarzschildPotential@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  comisd -0x10(%rbp),%xmm0
  jbe    L20
  movsd  -0x8(%rbp),%xmm0
  movsd  %xmm0,-0x28(%rbp)
  jmp    L46
L20:
  movsd  -0x8(%rbp),%xmm0
  movsd  %xmm0,-0x20(%rbp)
L46:
  movsd  -0x20(%rbp),%xmm0
  subsd  -0x28(%rbp),%xmm0
  comisd -0x18(%rbp),%xmm0
  jae    L38
  movsd  -0x28(%rbp),%xmm0
  addsd  -0x20(%rbp),%xmm0
  movsd  D29(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  leave
  ret
```

tool_calls: name: unpack_data
arguments: data_tag: D59
type: byte[8]
name: unpack_data
arguments: data_tag: D25
type: byte[8]
name: unpack_data
arguments: data_tag: D33
type: byte[8]
name: unpack_data
arguments: data_tag: D48
type: f64
name: unpack_data
arguments: data_tag: D29
type: f64

tool: {"D59": [0x8d,0xed,0xb5,0xa0,0xf7,0xc6,0xb0,0x3e]}

tool: {"D25": [0x80,0x39,0x42,0x2e,0xdc,0xc8,0x14,0x40]}

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

tool: D48: 3

tool: D29: 2

assistant: ```c
double invSchwarzschildPotential(const double b, const double M) {
  const double err = 1e-6;
  double lhs, a1, a2;
  assert(b >= sqrt(27) * M);
  lhs = 1 / ((b) * (b));
  a1 = 3.0 * M;
  a2 = 3.0 * M;
  while (schwarzschildPotential(a1, M) <= lhs)
    a1 = a1 / 2;
  while (schwarzschildPotential(a2, M) >= lhs)
    a2 = a2 * 2;
  while (a2 - a1 >= err) {
    double a;
    a = (a1 + a2) / 2.0;
    if (schwarzschildPotential(a, M) > lhs)
      a1 = a;
    else
      a2 = a;
  }
  return ((a1 + a2) / 2.0);
}
```