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

```asm
<leigen>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x30,%rsp
  movsd  0x8(%rdi),%xmm12
  movsd  0x10(%rdi),%xmm8
  movsd  0x18(%rdi),%xmm2
  movsd  0x30(%rdi),%xmm9
  movapd %xmm12,%xmm0
  movapd %xmm8,%xmm4
  movsd  0x28(%rdi),%xmm1
  movsd  0x38(%rdi),%xmm10
  mulsd  %xmm2,%xmm0
  movsd  (%rdi),%xmm7
  movsd  0x20(%rdi),%xmm5
  mulsd  %xmm9,%xmm4
  movapd %xmm1,%xmm11
  movsd  0x40(%rdi),%xmm13
  movsd  D108(%rip),%xmm14
  mulsd  %xmm10,%xmm11
  movapd %xmm7,%xmm3
  movapd %xmm5,%xmm6
  addsd  %xmm5,%xmm3
  mulsd  %xmm13,%xmm6
  mulsd  %xmm9,%xmm1
  addsd  %xmm4,%xmm0
  movapd %xmm7,%xmm4
  addsd  %xmm13,%xmm3
  mulsd  %xmm5,%xmm4
  mulsd  %xmm9,%xmm5
  addsd  %xmm11,%xmm0
  subsd  %xmm4,%xmm0
  movapd %xmm7,%xmm4
  mulsd  %xmm13,%xmm4
  mulsd  %xmm2,%xmm13
  mulsd  %xmm10,%xmm2
  subsd  %xmm6,%xmm0
  subsd  %xmm11,%xmm6
  mulsd  %xmm7,%xmm6
  subsd  %xmm4,%xmm0
  movapd %xmm3,%xmm4
  subsd  %xmm13,%xmm1
  mulsd  %xmm3,%xmm4
  pxor   %xmm7,%xmm7
  subsd  %xmm5,%xmm2
  movsd  D45(%rip),%xmm5
  mulsd  %xmm0,%xmm14
  mulsd  %xmm12,%xmm1
  mulsd  %xmm8,%xmm2
  mulsd  %xmm3,%xmm5
  addsd  %xmm14,%xmm4
  addsd  %xmm6,%xmm1
  mulsd  %xmm5,%xmm0
  comisd %xmm4,%xmm7
  movq   D133(%rip),%xmm5
  addsd  %xmm2,%xmm1
  mulsd  D74(%rip),%xmm1
  movapd %xmm3,%xmm2
  addsd  %xmm3,%xmm2
  mulsd  %xmm3,%xmm2
  mulsd  %xmm3,%xmm2
  addsd  %xmm2,%xmm0
  addsd  %xmm0,%xmm1
  movapd %xmm1,%xmm2
  xorpd  %xmm5,%xmm2
  ja     L94
  ucomisd %xmm7,%xmm4
  jp     L6
  jne    L6
  movq   $0x0,0x10(%rsi)
  pxor   %xmm0,%xmm0
  movups %xmm0,(%rsi)
L132:
  add    $0x30,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  nopw   0x0(%rax,%rax,1)
L6:
  movsd  D78(%rip),%xmm1
  movapd %xmm4,%xmm0
  movsd  %xmm3,0x18(%rsp)
  movsd  %xmm2,0x10(%rsp)
  movsd  %xmm4,0x8(%rsp)
  call   <pow@plt>
  movsd  0x10(%rsp),%xmm2
  movsd  D42(%rip),%xmm1
  movsd  0x8(%rsp),%xmm4
  mulsd  %xmm2,%xmm1
  mulsd  %xmm0,%xmm1
  movapd %xmm4,%xmm0
  movsd  %xmm1,0x10(%rsp)
  call   <sqrt@plt>
  pxor   %xmm6,%xmm6
  movsd  0x10(%rsp),%xmm1
  movsd  D184(%rip),%xmm2
  add    %eax,%eax
  movsd  0x18(%rsp),%xmm3
  movslq %eax,%rdx
  sar    $0x1f,%eax
  imul   $0x55555556,%rdx,%rdx
  shr    $0x20,%rdx
  sub    %eax,%edx
  comisd D182(%rip),%xmm1
  cvtsi2sd %edx,%xmm6
  movsd  %xmm6,0x8(%rsp)
  jb     L65
  comisd %xmm1,%xmm2
  jae    L60
L65:
  movapd %xmm1,%xmm0
  movsd  %xmm3,0x20(%rsp)
  movsd  %xmm2,0x18(%rsp)
  movsd  %xmm1,0x10(%rsp)
  call   <fabs@plt>
  movsd  0x10(%rsp),%xmm1
  movsd  0x18(%rsp),%xmm2
  mov    %eax,%ebp
  mulsd  %xmm1,%xmm1
  subsd  %xmm2,%xmm1
  movapd %xmm1,%xmm0
  call   <sqrt@plt>
  lea    0x0(%rbp,%rax,1),%edi
  call   <log@plt>
  pxor   %xmm1,%xmm1
  movslq %eax,%rdx
  sar    $0x1f,%eax
  imul   $0x55555556,%rdx,%rdx
  shr    $0x20,%rdx
  sub    %eax,%edx
  cvtsi2sd %edx,%xmm1
  movapd %xmm1,%xmm0
  movsd  %xmm1,0x18(%rsp)
  call   <exp@plt>
  movsd  0x18(%rsp),%xmm1
  movq   D133(%rip),%xmm5
  movsd  %xmm0,0x10(%rsp)
  xorpd  %xmm5,%xmm1
  movapd %xmm1,%xmm0
  call   <exp@plt>
  movsd  D42(%rip),%xmm7
  mulsd  0x8(%rsp),%xmm7
  movapd %xmm0,%xmm1
  addsd  0x10(%rsp),%xmm1
  movsd  0x20(%rsp),%xmm3
  divsd  D108(%rip),%xmm3
  movapd %xmm7,%xmm0
  mulsd  %xmm1,%xmm0
  addsd  %xmm0,%xmm3
L75:
  pxor   %xmm7,%xmm7
  movq   $0x0,0x10(%rbx)
  pxor   %xmm1,%xmm1
  comisd %xmm3,%xmm7
  movq   $0x0,0x8(%rbx)
  movsd  %xmm3,(%rbx)
  jbe    L134
  movapd %xmm1,%xmm2
L48:
  movapd %xmm2,%xmm0
  unpcklpd %xmm3,%xmm0
  movups %xmm0,(%rbx)
L77:
  comisd %xmm3,%xmm1
  movapd %xmm1,%xmm0
  unpcklpd %xmm3,%xmm0
  jbe    L98
  movsd  (%rbx),%xmm3
  movups %xmm0,0x8(%rbx)
L134:
  comisd %xmm3,%xmm1
  jbe    L132
  movsd  %xmm3,0x8(%rbx)
  movsd  %xmm1,(%rbx)
  add    $0x30,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L94:
  movapd %xmm4,%xmm0
  movsd  %xmm3,0x18(%rsp)
  movsd  %xmm2,0x8(%rsp)
  call   <fabs@plt>
  pxor   %xmm4,%xmm4
  movsd  D78(%rip),%xmm1
  cvtsi2sd %eax,%xmm4
  movapd %xmm4,%xmm0
  movsd  %xmm4,0x10(%rsp)
  call   <pow@plt>
  movsd  0x8(%rsp),%xmm2
  movsd  D42(%rip),%xmm1
  movsd  0x10(%rsp),%xmm4
  mulsd  %xmm2,%xmm1
  mulsd  %xmm0,%xmm1
  movapd %xmm4,%xmm0
  movsd  %xmm1,0x8(%rsp)
  call   <sqrt@plt>
  movsd  0x8(%rsp),%xmm1
  mov    %eax,%ebp
  movapd %xmm1,%xmm0
  call   <fabs@plt>
  movsd  0x8(%rsp),%xmm1
  mov    %eax,%r12d
  movapd %xmm1,%xmm0
  mulsd  %xmm1,%xmm0
  addsd  D184(%rip),%xmm0
  call   <sqrt@plt>
  lea    (%r12,%rax,1),%edi
  call   <log@plt>
  movsd  0x8(%rsp),%xmm1
  pxor   %xmm7,%xmm7
  mov    %eax,%r8d
  xor    %eax,%eax
  comisd %xmm7,%xmm1
  seta   %al
  xor    %edx,%edx
  comisd %xmm1,%xmm7
  pxor   %xmm1,%xmm1
  seta   %dl
  add    %ebp,%ebp
  sub    %edx,%eax
  imul   %r8d,%eax
  movslq %eax,%rdx
  sar    $0x1f,%eax
  imul   $0x55555556,%rdx,%rdx
  shr    $0x20,%rdx
  sub    %eax,%edx
  cvtsi2sd %edx,%xmm1
  movapd %xmm1,%xmm0
  movsd  %xmm1,0x10(%rsp)
  call   <exp@plt>
  movsd  0x10(%rsp),%xmm1
  movq   D133(%rip),%xmm5
  movsd  %xmm0,0x8(%rsp)
  xorpd  %xmm5,%xmm1
  movapd %xmm1,%xmm0
  call   <exp@plt>
  movslq %ebp,%rax
  sar    $0x1f,%ebp
  pxor   %xmm1,%xmm1
  imul   $0x55555556,%rax,%rax
  movsd  0x8(%rsp),%xmm2
  movsd  0x18(%rsp),%xmm3
  divsd  D108(%rip),%xmm3
  subsd  %xmm0,%xmm2
  shr    $0x20,%rax
  sub    %ebp,%eax
  cvtsi2sd %eax,%xmm1
  mulsd  D42(%rip),%xmm1
  mulsd  %xmm2,%xmm1
  subsd  %xmm1,%xmm3
  jmp    L75
  nopl   0x0(%rax)
L60:
  movapd %xmm1,%xmm0
  movsd  %xmm3,0x10(%rsp)
  call   <asin@plt>
  pxor   %xmm1,%xmm1
  movslq %eax,%rdx
  sar    $0x1f,%eax
  imul   $0x55555556,%rdx,%rdx
  shr    $0x20,%rdx
  sub    %eax,%edx
  cvtsi2sd %edx,%xmm1
  movapd %xmm1,%xmm0
  subsd  D114(%rip),%xmm0
  movsd  %xmm1,0x18(%rsp)
  call   <sin@plt>
  mulsd  0x8(%rsp),%xmm0
  pxor   %xmm5,%xmm5
  movsd  0x10(%rsp),%xmm3
  movsd  0x18(%rsp),%xmm1
  movapd %xmm3,%xmm7
  divsd  D108(%rip),%xmm7
  movsd  %xmm7,0x10(%rsp)
  movsd  %xmm1,0x20(%rsp)
  movapd %xmm0,%xmm3
  movapd %xmm1,%xmm0
  addsd  %xmm7,%xmm3
  maxsd  %xmm3,%xmm5
  movsd  %xmm5,(%rbx)
  movsd  %xmm5,0x28(%rsp)
  call   <sin@plt>
  movsd  0x8(%rsp),%xmm2
  movsd  0x20(%rsp),%xmm1
  pxor   %xmm5,%xmm5
  mulsd  %xmm0,%xmm2
  movsd  D114(%rip),%xmm0
  addsd  0x10(%rsp),%xmm2
  addsd  %xmm1,%xmm0
  maxsd  %xmm2,%xmm5
  movsd  %xmm5,0x8(%rbx)
  movsd  %xmm5,0x18(%rsp)
  call   <sin@plt>
  movsd  0x8(%rsp),%xmm1
  pxor   %xmm6,%xmm6
  movsd  0x18(%rsp),%xmm2
  movsd  0x28(%rsp),%xmm3
  mulsd  %xmm0,%xmm1
  addsd  0x10(%rsp),%xmm1
  comisd %xmm1,%xmm6
  ja     L44
  movsd  %xmm1,0x10(%rbx)
L73:
  comisd %xmm3,%xmm2
  ja     L48
  movq   %xmm3,%rax
  movapd %xmm2,%xmm3
  movq   %rax,%xmm2
  jmp    L77
  nopl   0x0(%rax,%rax,1)
L44:
  movq   $0x0,0x10(%rbx)
  pxor   %xmm1,%xmm1
  jmp    L73
  xchg   %ax,%ax
L98:
  movapd %xmm3,%xmm1
  movapd %xmm2,%xmm3
  jmp    L134
```

tool_calls: name: read_data
arguments: data_label: D108
data_type: byte[8]
name: read_data
arguments: data_label: D45
data_type: byte[8]
name: read_data
arguments: data_label: D133
data_type: byte[8]
name: read_data
arguments: data_label: D74
data_type: byte[8]
name: read_data
arguments: data_label: D78
data_type: byte[8]
name: read_data
arguments: data_label: D42
data_type: f64
name: read_data
arguments: data_label: D184
data_type: byte[8]
name: read_data
arguments: data_label: D182
data_type: byte[16]
name: read_data
arguments: data_label: D114
data_type: byte[8]

tool: {"D108": [0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x40]}

tool: {"D45": [0x00,0x00,0x00,0x00,0x00,0x00,0x22,0x40]}

tool: {"D133": [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80]}

tool: {"D74": [0x00,0x00,0x00,0x00,0x00,0x00,0x3b,0x40]}

tool: {"D78": [0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xbf]}

tool: D42: 0.5

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

tool: {"D182": [0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xbf,0x65,0x73,0x2d,0x38,0x52,0xc1,0x00,0x40]}

tool: {"D114": [0x65,0x73,0x2d,0x38,0x52,0xc1,0x00,0x40]}

assistant: ```c
void leigen(double *m, double *l) {
  double b, c, d, n, o, s, sc, t;
  long neg = 0;
  b = m[0] + m[4] + m[8];
  c = m[1] * m[3] + m[2] * m[6] + m[5] * m[7] - m[0] * m[4] - m[4] * m[8] - m[0] * m[8];
  d = m[0] * (m[4] * m[8] - m[5] * m[7]) + m[1] * (m[5] * m[6] - m[3] * m[8]) + m[2] * (m[3] * m[7] - m[4] * m[6]);
  n = b * b + 3 * c;
  o = -(2 * b * b * b + 9 * b * c + 27 * d);
  if (n < 0) {
    n = fabs(n);
    sc = 0.5 * o * pow(n, -1.5);
    t = 2 * sqrt(n) / 3;
    s = log(fabs(sc) + sqrt(sc * sc + 1)) * ((sc > 0) - (sc < 0)) / 3;
    l[0] = b / 3 - t * 0.5 * (exp(s) - exp(-s));
    l[1] = l[2] = 0;
  } else if (!n) {
    l[0] = l[1] = l[2] = 0;
    return;
  } else {
    sc = 0.5 * o * pow(n, -1.5);
    t = 2 * sqrt(n) / 3;
    if (sc >= -1 && sc <= 1) {
      s = asin(sc) / 3;
      l[0] = t * sin(s - 2 * 3.14159265358979323846264338327950 / 3) + b / 3;
      if (l[0] < 0)
        l[0] = 0;
      l[1] = t * sin(s) + b / 3;
      if (l[1] < 0)
        l[1] = 0;
      l[2] = t * sin(s + 2 * 3.14159265358979323846264338327950 / 3) + b / 3;
      if (l[2] < 0)
        l[2] = 0;
    } else {
      s = log(fabs(sc) + sqrt(sc * sc - 1)) / 3;
      l[0] = t * 0.5 * (exp(s) + exp(-s)) + b / 3;
      l[1] = l[2] = 0;
    }
  }
  if (l[0] < l[1]) {
    d = l[1];
    l[1] = l[0];
    l[0] = d;
  }
  if (l[1] < l[2]) {
    d = l[1];
    l[1] = l[2];
    l[2] = d;
  }
  if (l[0] < l[1]) {
    d = l[1];
    l[1] = l[0];
    l[0] = d;
  }
}
```