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

```asm
<rndgamma>:
  endbr64
  push   %rbx
  movapd %xmm0,%xmm7
  sub    $0x30,%rsp
  movsd  D38(%rip),%xmm5
  movsd  %xmm0,0x28(%rsp)
  comisd %xmm0,%xmm5
  jbe    L94
  movapd %xmm5,%xmm0
  addsd  %xmm7,%xmm0
L94:
  movsd  D88(%rip),%xmm1
  pxor   %xmm5,%xmm5
  subsd  %xmm1,%xmm0
  ucomisd %xmm0,%xmm5
  movapd %xmm0,%xmm7
  movsd  %xmm0,0x20(%rsp)
  ja     L24
  sqrtsd %xmm7,%xmm7
  movapd %xmm7,%xmm0
L3:
  divsd  %xmm0,%xmm1
  movsd  %xmm1,0x8(%rsp)
  nop
L37:
  xor    %eax,%eax
  call   <rndNormal@plt>
  pxor   %xmm4,%xmm4
  movapd %xmm0,%xmm1
  movsd  0x8(%rsp),%xmm0
  mulsd  %xmm1,%xmm0
  addsd  D38(%rip),%xmm0
  comisd %xmm0,%xmm4
  jae    L37
  movapd %xmm0,%xmm2
  xor    %eax,%eax
  movsd  %xmm1,0x18(%rsp)
  mulsd  %xmm0,%xmm2
  mulsd  %xmm0,%xmm2
  movsd  %xmm2,0x10(%rsp)
  call   <rndu@plt>
  movsd  0x18(%rsp),%xmm1
  movsd  D75(%rip),%xmm6
  movsd  D38(%rip),%xmm3
  mulsd  %xmm1,%xmm6
  movapd %xmm6,%xmm2
  mulsd  %xmm1,%xmm2
  mulsd  %xmm1,%xmm2
  mulsd  %xmm1,%xmm2
  subsd  %xmm2,%xmm3
  comisd %xmm0,%xmm3
  ja     L96
  call   <log@plt>
  movsd  0x18(%rsp),%xmm1
  movsd  D43(%rip),%xmm0
  mov    %eax,%ebx
  mulsd  %xmm1,%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,0x18(%rsp)
  movsd  0x10(%rsp),%xmm0
  call   <log@plt>
  pxor   %xmm2,%xmm2
  pxor   %xmm1,%xmm1
  movsd  D38(%rip),%xmm6
  cvtsi2sd %eax,%xmm2
  subsd  0x10(%rsp),%xmm6
  cvtsi2sd %ebx,%xmm1
  movapd %xmm6,%xmm0
  addsd  %xmm2,%xmm0
  mulsd  0x20(%rsp),%xmm0
  addsd  0x18(%rsp),%xmm0
  comisd %xmm1,%xmm0
  jbe    L37
L96:
  movsd  D38(%rip),%xmm7
  comisd 0x28(%rsp),%xmm7
  movsd  0x20(%rsp),%xmm2
  mulsd  0x10(%rsp),%xmm2
  ja     L6
L87:
  pxor   %xmm7,%xmm7
  ucomisd %xmm7,%xmm2
  jp     L29
  je     L72
L29:
  add    $0x30,%rsp
  movapd %xmm2,%xmm0
  pop    %rbx
  ret
L72:
  lea    D45(%rip),%rdi
  movsd  %xmm2,0x8(%rsp)
  call   <printf@plt>
  movsd  0x8(%rsp),%xmm2
  add    $0x30,%rsp
  pop    %rbx
  movapd %xmm2,%xmm0
  ret
L6:
  xor    %eax,%eax
  movsd  %xmm2,0x8(%rsp)
  call   <rndu@plt>
  movsd  D38(%rip),%xmm1
  divsd  0x28(%rsp),%xmm1
  cvttsd2si %xmm1,%edi
  call   <pow@plt>
  movsd  0x8(%rsp),%xmm2
  mulsd  %xmm0,%xmm2
  jmp    L87
L24:
  movsd  0x20(%rsp),%xmm0
  call   <sqrt@plt>
  mov    D88(%rip),%rax
  movq   %rax,%xmm1
  jmp    L3
```

tool_calls: name: retrieve_data
arguments: tag: D38
type_infered: f64
name: retrieve_data
arguments: tag: D88
type_infered: byte[8]
name: retrieve_data
arguments: tag: D75
type_infered: f64
name: retrieve_data
arguments: tag: D43
type_infered: f64
name: retrieve_data
arguments: tag: D45
type_infered: string

tool: D38: 1

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

tool: D75: 0.0331

tool: D43: 0.5

tool: D45: 
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;
}
```