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

```asm
<rndgamma>:
  endbr64
  push   %rbx
  sub    $0x30,%rsp
  movsd  D58(%rip),%xmm5
  movsd  %xmm0,0x28(%rsp)
  comisd %xmm0,%xmm5
  ja     L40
  movsd  0x28(%rsp),%xmm0
L50:
  movsd  D19(%rip),%xmm1
  pxor   %xmm5,%xmm5
  subsd  %xmm1,%xmm0
  ucomisd %xmm0,%xmm5
  movapd %xmm0,%xmm7
  movsd  %xmm0,0x20(%rsp)
  ja     L92
  sqrtsd %xmm7,%xmm7
  movapd %xmm7,%xmm0
L34:
  divsd  %xmm0,%xmm1
  movsd  %xmm1,0x8(%rsp)
  nopl   (%rax)
L99:
  xor    %eax,%eax
  call   <rndNormal@plt>
  pxor   %xmm4,%xmm4
  movapd %xmm0,%xmm1
  movsd  0x8(%rsp),%xmm0
  mulsd  %xmm1,%xmm0
  addsd  D58(%rip),%xmm0
  comisd %xmm0,%xmm4
  jae    L99
  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  D108(%rip),%xmm6
  movsd  D58(%rip),%xmm3
  mulsd  %xmm1,%xmm6
  movapd %xmm6,%xmm2
  mulsd  %xmm1,%xmm2
  mulsd  %xmm1,%xmm2
  mulsd  %xmm1,%xmm2
  subsd  %xmm2,%xmm3
  comisd %xmm0,%xmm3
  ja     L66
  call   <log@plt>
  movsd  0x18(%rsp),%xmm1
  movsd  D75(%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  D58(%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    L99
L66:
  movsd  D58(%rip),%xmm7
  comisd 0x28(%rsp),%xmm7
  movsd  0x20(%rsp),%xmm2
  mulsd  0x10(%rsp),%xmm2
  ja     L45
L93:
  pxor   %xmm7,%xmm7
  ucomisd %xmm7,%xmm2
  jp     L84
  movq   %xmm2,%rax
  cmove  D0(%rip),%rax
  movq   %rax,%xmm2
L84:
  add    $0x30,%rsp
  movapd %xmm2,%xmm0
  pop    %rbx
  ret
L40:
  movapd %xmm0,%xmm7
  movapd %xmm5,%xmm0
  addsd  %xmm7,%xmm0
  jmp    L50
L45:
  xor    %eax,%eax
  movsd  %xmm2,0x8(%rsp)
  call   <rndu@plt>
  movsd  D58(%rip),%xmm1
  divsd  0x28(%rsp),%xmm1
  cvttsd2si %xmm1,%edi
  call   <pow@plt>
  movsd  0x8(%rsp),%xmm2
  mulsd  %xmm0,%xmm2
  jmp    L93
L92:
  movsd  0x20(%rsp),%xmm0
  call   <sqrt@plt>
  mov    D19(%rip),%rax
  movq   %rax,%xmm1
  jmp    L34
```

tool_calls: name: unpack_data
arguments: label: D58
type_guessed: f64
name: unpack_data
arguments: label: D19
type_guessed: byte[8]
name: unpack_data
arguments: label: D108
type_guessed: f64
name: unpack_data
arguments: label: D75
type_guessed: f64
name: unpack_data
arguments: label: D0
type_guessed: byte[8]

tool: D58: 1

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

tool: D108: 0.0331

tool: D75: 0.5

tool: {"D0": [0x59,0xf3,0xf8,0xc2,0x1f,0x6e,0xa5,0x01]}

assistant: ```c
double rndgamma(double a) {
  double a0 = a, c, d, u, v, x, small = 1E-300;
  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)
    v = small;
  return v;
}
```