user: 请从给定的汇编指令推导出C源代码:

```asm
<_dtram_estimate_transition_matrix>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x78,%rsp
  mov    %rsi,0x8(%rsp)
  mov    %rdx,0x10(%rsp)
  mov    %rcx,0x30(%rsp)
  mov    %r8d,0x2c(%rsp)
  mov    %r9,0x40(%rsp)
  test   %r8d,%r8d
  jle    L81
  movslq %r8d,%rax
  lea    0x1(%r8),%edx
  mov    %rcx,0x18(%rsp)
  mov    %rdi,%r15
  lea    0x0(,%rax,8),%rsi
  shl    $0x2,%rax
  mov    %edx,0x5c(%rsp)
  xor    %r14d,%r14d
  mov    %rsi,0x50(%rsp)
  mov    0xb0(%rsp),%rsi
  mov    %rax,0x60(%rsp)
  mov    %r8d,%eax
  mov    %rax,0x20(%rsp)
  shl    $0x3,%rax
  mov    %rsi,0x48(%rsp)
  mov    %rax,0x68(%rsp)
  movl   $0x0,0x58(%rsp)
  cs nopw 0x0(%rax,%rax,1)
L150:
  xor    %r12d,%r12d
  mov    %r15,%rax
  mov    0x48(%rsp),%r13
  xor    %ebp,%ebp
  mov    %r12,%r15
  mov    %r14,%rbx
  mov    %rax,%r12
  jmp    L132
  nopl   0x0(%rax,%rax,1)
L33:
  mov    0x30(%rsp),%rax
  movslq %r14d,%r9
  add    (%rax,%r9,4),%r8d
  mov    %r8d,0x28(%rsp)
  je     L82
  mov    0x10(%rsp),%rax
  mov    0x8(%rsp),%rcx
  movsd  (%r12,%rbx,8),%xmm1
  movsd  (%r12,%r15,8),%xmm0
  subsd  (%rax,%r15,8),%xmm1
  subsd  (%rax,%rbx,8),%xmm0
  subsd  (%rcx,%r15,8),%xmm1
  subsd  (%rcx,%rbx,8),%xmm0
  call   <_logsumexp_pair@plt>
  mov    0x28(%rsp),%r8d
  movsd  %xmm0,0x38(%rsp)
  pxor   %xmm0,%xmm0
  cvtsi2sd %r8d,%xmm0
  call   <log@plt>
  mov    0x10(%rsp),%rax
  mov    0x8(%rsp),%rcx
  movslq %ebp,%r8
  add    $0x1,%ebp
  subsd  (%rax,%r15,8),%xmm0
  subsd  (%rcx,%r15,8),%xmm0
  subsd  0x38(%rsp),%xmm0
  mov    0x40(%rsp),%rax
  movsd  %xmm0,(%rax,%r8,8)
  call   <exp@plt>
  movsd  %xmm0,0x0(%r13)
L82:
  add    $0x1,%r15
  add    $0x8,%r13
  add    0x2c(%rsp),%r14d
  cmp    0x20(%rsp),%r15
  je     L156
L132:
  mov    0x18(%rsp),%rax
  movq   $0x0,0x0(%r13)
  mov    (%rax,%r15,4),%r8d
  cmp    %ebx,%r15d
  jne    L33
  mov    D9(%rip),%rax
  movq   %rax,%xmm0
  test   %r8d,%r8d
  jne    L158
L92:
  mov    0x40(%rsp),%rax
  movslq %ebp,%r8
  add    $0x1,%ebp
  lea    (%rax,%r8,8),%r8
  movsd  %xmm0,(%r8)
  subsd  (%r12,%rbx,8),%xmm0
  movsd  %xmm0,(%r8)
  call   <exp@plt>
  movsd  %xmm0,0x0(%r13)
  jmp    L82
  nopl   0x0(%rax,%rax,1)
L156:
  mov    0x40(%rsp),%rdi
  mov    %ebp,%esi
  mov    %rbx,%r14
  mov    %r12,%r15
  call   <_logsumexp_sort_kahan_inplace@plt>
  call   <exp@plt>
  pxor   %xmm3,%xmm3
  ucomisd %xmm3,%xmm0
  movapd %xmm0,%xmm1
  jp     L26
  je     L109
L26:
  ucomisd D19(%rip),%xmm1
  jp     L91
  jne    L91
L125:
  mov    0x50(%rsp),%rsi
  mov    0x5c(%rsp),%edi
  add    $0x1,%r14
  mov    0x60(%rsp),%rdx
  add    %rsi,0x48(%rsp)
  add    %edi,0x58(%rsp)
  add    %rdx,0x18(%rsp)
  cmp    0x20(%rsp),%r14
  jne    L150
L81:
  add    $0x78,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L158:
  pxor   %xmm0,%xmm0
  cvtsi2sd %r8d,%xmm0
  addsd  D6(%rip),%xmm0
  call   <log@plt>
  jmp    L92
  nopl   0x0(%rax,%rax,1)
L109:
  mov    0x68(%rsp),%rdx
  mov    0x48(%rsp),%rdi
  xor    %esi,%esi
  call   <memset@plt>
  movslq 0x58(%rsp),%rax
  mov    0xb0(%rsp),%rdx
  mov    D19(%rip),%rdi
  mov    %rdi,(%rdx,%rax,8)
  jmp    L125
  cs nopw 0x0(%rax,%rax,1)
L91:
  mov    0x68(%rsp),%rdx
  mov    0x48(%rsp),%rax
  add    %rax,%rdx
  nopl   (%rax)
L139:
  movsd  (%rax),%xmm0
  add    $0x8,%rax
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rax)
  cmp    %rdx,%rax
  jne    L139
  jmp    L125
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D9
type_infered: byte[8]
name: extract_symbolic_data
arguments: data_label: D19
type_infered: f64
name: extract_symbolic_data
arguments: data_label: D6
type_infered: byte[8]

tool: {"D9": [0x5b,0xaa,0xa2,0x2a,0x9e,0x06,0x37,0xc0]}

tool: D19: 1

tool: {"D6": [0xbb,0xbd,0xd7,0xd9,0xdf,0x7c,0xdb,0x3d]}

assistant: ```c
extern void _dtram_estimate_transition_matrix(double *log_lagrangian_mult, double *bias_energies, double *conf_energies, int *count_matrix, int n_conf_states, double *scratch_M, double *transition_matrix) {
  int i, j, o;
  int ij, ji;
  int C;
  double divisor, sum;
  for (i = 0; i < n_conf_states; ++i) {
    o = 0;
    for (j = 0; j < n_conf_states; ++j) {
      ij = i * n_conf_states + j;
      transition_matrix[ij] = 0.0;
      if (i == j) {
        scratch_M[o] = (0 == count_matrix[ij]) ? -23.025850929940457 : log(1.0E-10 + (double)count_matrix[ij]);
        scratch_M[o] -= log_lagrangian_mult[i];
        transition_matrix[ij] = exp(scratch_M[o++]);
        continue;
      }
      ji = j * n_conf_states + i;
      C = count_matrix[ij] + count_matrix[ji];
      if (0 == C)
        continue;
      divisor = _logsumexp_pair(log_lagrangian_mult[j] - conf_energies[i] - bias_energies[i], log_lagrangian_mult[i] - conf_energies[j] - bias_energies[j]);
      scratch_M[o] = log((double)C) - conf_energies[j] - bias_energies[j] - divisor;
      transition_matrix[ij] = exp(scratch_M[o++]);
    }
    sum = exp(_logsumexp_sort_kahan_inplace(scratch_M, o));
    if (0.0 == sum) {
      for (j = 0; j < n_conf_states; ++j)
        transition_matrix[i * n_conf_states + j] = 0.0;
      transition_matrix[i * n_conf_states + i] = 1.0;
    } else if (1.0 != sum) {
      for (j = 0; j < n_conf_states; ++j)
        transition_matrix[i * n_conf_states + j] /= sum;
    }
  }
}
```