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

```asm
<rndgamma>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x58,%rsp
  movsd  %xmm0,-0x48(%rbp)
  movsd  -0x48(%rbp),%xmm0
  movsd  %xmm0,-0x38(%rbp)
  movsd  D88(%rip),%xmm0
  comisd -0x48(%rbp),%xmm0
  jbe    L34
  movsd  -0x48(%rbp),%xmm1
  movsd  D88(%rip),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x48(%rbp)
L34:
  movsd  -0x48(%rbp),%xmm0
  movsd  D96(%rip),%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x30(%rbp)
  mov    -0x30(%rbp),%rax
  movq   %rax,%xmm0
  call   <sqrt@plt>
  movapd %xmm0,%xmm1
  movsd  D96(%rip),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x28(%rbp)
L6:
  mov    $0x0,%eax
  call   <rndNormal@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x20(%rbp)
  movsd  -0x28(%rbp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x20(%rbp),%xmm1
  movsd  D88(%rip),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x40(%rbp)
  pxor   %xmm0,%xmm0
  comisd -0x40(%rbp),%xmm0
  jae    L6
  movsd  -0x40(%rbp),%xmm0
  mulsd  %xmm0,%xmm0
  movsd  -0x40(%rbp),%xmm1
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x40(%rbp)
  mov    $0x0,%eax
  call   <rndu@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x18(%rbp)
  movsd  -0x20(%rbp),%xmm1
  movsd  D117(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  mulsd  -0x20(%rbp),%xmm0
  mulsd  -0x20(%rbp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x20(%rbp),%xmm1
  movsd  D88(%rip),%xmm0
  subsd  %xmm1,%xmm0
  comisd -0x18(%rbp),%xmm0
  ja     L42
  mov    -0x18(%rbp),%rax
  movq   %rax,%xmm0
  call   <log@plt>
  pxor   %xmm4,%xmm4
  cvtsi2sd %eax,%xmm4
  movsd  %xmm4,-0x50(%rbp)
  movsd  -0x20(%rbp),%xmm1
  movsd  D72(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  mulsd  -0x20(%rbp),%xmm0
  movsd  %xmm0,-0x58(%rbp)
  movsd  D88(%rip),%xmm0
  movapd %xmm0,%xmm3
  subsd  -0x40(%rbp),%xmm3
  movsd  %xmm3,-0x60(%rbp)
  mov    -0x40(%rbp),%rax
  movq   %rax,%xmm0
  call   <log@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  addsd  -0x60(%rbp),%xmm0
  mulsd  -0x30(%rbp),%xmm0
  addsd  -0x58(%rbp),%xmm0
  comisd -0x50(%rbp),%xmm0
  ja     L61
  jmp    L6
L42:
  nop
  jmp    L54
L61:
  nop
L54:
  movsd  -0x40(%rbp),%xmm0
  mulsd  -0x30(%rbp),%xmm0
  movsd  %xmm0,-0x40(%rbp)
  movsd  D88(%rip),%xmm0
  comisd -0x38(%rbp),%xmm0
  jbe    L41
  movsd  D88(%rip),%xmm0
  divsd  -0x38(%rbp),%xmm0
  cvttsd2si %xmm0,%ebx
  mov    $0x0,%eax
  call   <rndu@plt>
  movq   %xmm0,%rax
  mov    %ebx,%edi
  movq   %rax,%xmm0
  call   <pow@plt>
  movsd  -0x40(%rbp),%xmm1
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x40(%rbp)
L41:
  pxor   %xmm0,%xmm0
  ucomisd -0x40(%rbp),%xmm0
  jp     L37
  pxor   %xmm0,%xmm0
  ucomisd -0x40(%rbp),%xmm0
  jne    L37
  lea    D10(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
L37:
  movsd  -0x40(%rbp),%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

tool_calls: name: unpack_data
arguments: label: D88
type_guessed: f64
name: unpack_data
arguments: label: D96
type_guessed: byte[8]
name: unpack_data
arguments: label: D117
type_guessed: f64
name: unpack_data
arguments: label: D72
type_guessed: f64
name: unpack_data
arguments: label: D10
type_guessed: string

tool: D88: 1

tool: {"D96": [0x55,0x55,0x55,0x55,0x55,0x55,0xd5,0x3f]}

tool: D117: 0.0331

tool: D72: 0.5

tool: D10: 
rndgamma returning 0.


assistant: ```c
double rndgamma(double a) {
  double a0 = a, c, d, u, v, x;
  if (a < 1)
    a++;
  d = a - 1.0 / 3.0;
  c = (1.0 / 3.0) / sqrt(d);
  for (;;) {
    do {
      x = rndNormal();
      v = 1.0 + c * x;
    } while (v <= 0);
    v *= v * v;
    u = rndu();
    if (u < 1 - 0.0331 * x * x * x * x)
      break;
    if (log(u) < 0.5 * x * x + d * (1 - v + log(v)))
      break;
  }
  v *= d;
  if (a0 < 1)
    v *= pow(rndu(), 1 / a0);
  if (v == 0)
    printf("\nrndgamma returning 0.\n");
  return v;
}
```