user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<lgamma>:
  endbr64
  pxor   %xmm6,%xmm6
  sub    $0x28,%rsp
  movapd %xmm0,%xmm3
  comisd %xmm0,%xmm6
  jae    L35
  movsd  D76(%rip),%xmm1
  movapd %xmm0,%xmm2
L51:
  movapd %xmm2,%xmm0
  movsd  D72(%rip),%xmm5
  movsd  D52(%rip),%xmm4
  movsd  %xmm3,0x18(%rsp)
  addsd  %xmm1,%xmm0
  movsd  %xmm2,0x8(%rsp)
  divsd  %xmm2,%xmm4
  divsd  %xmm0,%xmm5
  addsd  %xmm1,%xmm0
  addsd  D135(%rip),%xmm4
  addsd  %xmm4,%xmm5
  movsd  D81(%rip),%xmm4
  divsd  %xmm0,%xmm4
  addsd  %xmm1,%xmm0
  addsd  %xmm5,%xmm4
  movsd  D117(%rip),%xmm5
  divsd  %xmm0,%xmm5
  addsd  %xmm1,%xmm0
  addsd  %xmm4,%xmm5
  movsd  D149(%rip),%xmm4
  divsd  %xmm0,%xmm4
  addsd  %xmm1,%xmm0
  addsd  %xmm5,%xmm4
  movsd  D25(%rip),%xmm5
  divsd  %xmm0,%xmm5
  addsd  %xmm1,%xmm0
  addsd  %xmm4,%xmm5
  movsd  D178(%rip),%xmm4
  divsd  %xmm0,%xmm4
  addsd  %xmm1,%xmm0
  movsd  D62(%rip),%xmm1
  divsd  %xmm0,%xmm1
  addsd  %xmm5,%xmm4
  addsd  %xmm4,%xmm1
  movapd %xmm1,%xmm0
  call   <log@plt>
  movsd  0x8(%rsp),%xmm2
  movsd  %xmm0,0x10(%rsp)
  movsd  D24(%rip),%xmm0
  addsd  %xmm2,%xmm0
  call   <log@plt>
  movsd  0x10(%rsp),%xmm1
  movsd  0x8(%rsp),%xmm2
  pxor   %xmm7,%xmm7
  addsd  D147(%rip),%xmm1
  movsd  0x18(%rsp),%xmm3
  comisd %xmm3,%xmm7
  subsd  %xmm2,%xmm1
  subsd  D83(%rip),%xmm2
  subsd  D24(%rip),%xmm1
  mulsd  %xmm0,%xmm2
  addsd  %xmm2,%xmm1
  jae    L58
  movapd %xmm1,%xmm0
  add    $0x28,%rsp
  ret
  nopl   (%rax)
L35:
  movsd  D76(%rip),%xmm1
  movapd %xmm1,%xmm2
  subsd  %xmm0,%xmm2
  jmp    L51
  nopl   (%rax)
L58:
  mulsd  D2(%rip),%xmm3
  movsd  %xmm1,0x8(%rsp)
  movapd %xmm3,%xmm0
  call   <sin@plt>
  movsd  D131(%rip),%xmm3
  movsd  0x8(%rsp),%xmm1
  movapd %xmm0,%xmm2
  andpd  D184(%rip),%xmm2
  comisd %xmm2,%xmm3
  ja     L31
  pxor   %xmm6,%xmm6
  comisd %xmm0,%xmm6
  ja     L11
L52:
  movsd  D44(%rip),%xmm2
  subsd  %xmm1,%xmm2
  movsd  %xmm2,0x8(%rsp)
  call   <log@plt>
  movsd  0x8(%rsp),%xmm2
  add    $0x28,%rsp
  subsd  %xmm0,%xmm2
  movapd %xmm2,%xmm1
  movapd %xmm1,%xmm0
  ret
  nop
L31:
  pxor   %xmm0,%xmm0
  jmp    L52
L11:
  xorpd  D22(%rip),%xmm0
  jmp    L52
```

tool_calls: name: unpack_data
arguments: tag: D76
data_type: f64
name: unpack_data
arguments: tag: D72
data_type: byte[8]
name: unpack_data
arguments: tag: D52
data_type: f64
name: unpack_data
arguments: tag: D135
data_type: byte[8]
name: unpack_data
arguments: tag: D81
data_type: f64
name: unpack_data
arguments: tag: D117
data_type: byte[8]
name: unpack_data
arguments: tag: D149
data_type: f64
name: unpack_data
arguments: tag: D25
data_type: byte[8]
name: unpack_data
arguments: tag: D178
data_type: byte[8]
name: unpack_data
arguments: tag: D62
data_type: byte[8]
name: unpack_data
arguments: tag: D24
data_type: f64
name: unpack_data
arguments: tag: D147
data_type: f64
name: unpack_data
arguments: tag: D83
data_type: f64
name: unpack_data
arguments: tag: D2
data_type: f64
name: unpack_data
arguments: tag: D131
data_type: byte[8]
name: unpack_data
arguments: tag: D184
data_type: qword[2]
name: unpack_data
arguments: tag: D44
data_type: f64
name: unpack_data
arguments: tag: D22
data_type: f32[4]

tool: D76: 1

tool: {"D72": [0x1b,0x17,0xd4,0x8e,0x8e,0xac,0x93,0xc0]}

tool: D52: 676.5203681218851

tool: {"D135": [0x50,0xf9,0xff,0xff,0xff,0xff,0xef,0x3f]}

tool: D81: 771.3234287776531

tool: {"D117": [0x5d,0x2f,0xa3,0x51,0xae,0x13,0x66,0xc0]}

tool: D149: 12.507343278686905

tool: {"D25": [0x55,0x28,0x2b,0x99,0xb2,0xbc,0xc1,0xbf]}

tool: {"D178": [0x4f,0x32,0x4e,0x4e,0x51,0xf0,0xe4,0x3e]}

tool: {"D62": [0xef,0xae,0x3f,0x8f,0x50,0x35,0x84,0x3e]}

tool: D24: 6.5

tool: D147: 0.9189385332046727

tool: D83: 0.5

tool: D2: 3.141592653589793

tool: {"D131": [0x3a,0x8c,0x30,0xe2,0x8e,0x79,0x45,0x3e]}

tool: {"D184": [0x7fffffffffffffff,0x0000000000000000]}

tool: D44: 1.1447298858494002

tool: {"D22": [0.0,-0.0,0.0,0.0]}

assistant: ```c
double lgamma(double z) {
  static double a[] = {
      .99999999999980993227684700473478296744476168282198, 676.52036812188509856700919044401903816411251975244084, -1259.13921672240287047156078755282840836424300664868028, 771.32342877765307884865282588943070775227268469602500, -176.61502916214059906584551353999392943274507608117860, 12.50734327868690481445893685327104972970563021816420, -.13857109526572011689554706984971501358032683492780, .00000998436957801957085956266828104544089848531228, .00000015056327351493115583383579667028994545044040,
  };
  double sum, ZPos, LG, tmp;
  int i;
  if (z <= 0.0)
    ZPos = 1.0 - z;
  else
    ZPos = z;
  sum = a[0];
  for (i = 1, tmp = ZPos; i < 9; i++) {
    sum += a[i] / tmp;
    tmp++;
  }
  LG = log(sum) + 0.9189385332046727 - ZPos - 6.5 + (ZPos - 0.5) * log(ZPos + 6.5);
  if (z <= 0.0) {
    tmp = sin(z * 3.14159265358979323846);
    if (fabs(tmp) < 1.0E-08)
      tmp = 0.0;
    else if (tmp < 0.0)
      tmp = -tmp;
    LG = 1.14472988584940016 - LG - log(tmp);
  }
  return LG;
}
```