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

```asm
<score_orf_random>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xb8,%rsp
  mov    %rdi,%rbx
  mov    %esi,%ebp
  mov    %rdx,0x10(%rsp)
  mov    %rcx,0x20(%rsp)
  mov    %r8d,0x2c(%rsp)
  movsd  %xmm0,0x18(%rsp)
  mov    %r9d,%r14d
  mov    %fs:0x28,%rax
  mov    %rax,0xa8(%rsp)
  xor    %eax,%eax
  movq   $0x0,0x80(%rsp)
  movq   $0x0,0x88(%rsp)
  movq   $0x0,0x90(%rsp)
  movq   $0x0,0x98(%rsp)
  movq   $0x0,0xa0(%rsp)
  movq   $0x0,0x40(%rsp)
  movq   $0x0,0x48(%rsp)
  movq   $0x0,0x50(%rsp)
  movq   $0x0,0x58(%rsp)
  mov    %esi,%edi
  call   <malloc@plt>
  mov    %rax,%r12
  test   %ebp,%ebp
  jle    L83
  movsd  0xa0(%rsp),%xmm0
  mov    %rbx,%rax
  lea    -0x1(%rbp),%edx
  lea    0x1(%rbx,%rdx,1),%rcx
  mov    $0x0,%esi
  movsd  D7(%rip),%xmm1
  mov    $0x1,%edi
  jmp    L7
L55:
  add    $0x1,%rax
  cmp    %rcx,%rax
  je     L39
L7:
  movzbl (%rax),%edx
  cmp    $0x3,%dl
  ja     L55
  movsbq %dl,%rdx
  movapd %xmm1,%xmm2
  addsd  0x80(%rsp,%rdx,8),%xmm2
  movsd  %xmm2,0x80(%rsp,%rdx,8)
  addsd  %xmm1,%xmm0
  mov    %edi,%esi
  jmp    L55
L39:
  test   %sil,%sil
  je     L83
  movsd  %xmm0,0xa0(%rsp)
L83:
  movsd  0xa0(%rsp),%xmm0
  movsd  0x80(%rsp),%xmm3
  divsd  %xmm0,%xmm3
  movsd  %xmm3,0x80(%rsp)
  movsd  0x88(%rsp),%xmm2
  divsd  %xmm0,%xmm2
  movsd  %xmm2,0x88(%rsp)
  movsd  0x90(%rsp),%xmm1
  divsd  %xmm0,%xmm1
  movsd  %xmm1,0x90(%rsp)
  movsd  D7(%rip),%xmm0
  subsd  %xmm3,%xmm0
  subsd  %xmm2,%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,0x98(%rsp)
  lea    0x40(%rsp),%rsi
  lea    0x80(%rsp),%rdi
  movsd  D25(%rip),%xmm0
  call   <find_probabilities@plt>
  movsd  0x40(%rsp),%xmm0
  movsd  %xmm0,0x60(%rsp)
  addsd  0x48(%rsp),%xmm0
  movsd  %xmm0,0x68(%rsp)
  addsd  0x50(%rsp),%xmm0
  movsd  %xmm0,0x70(%rsp)
  mov    D7(%rip),%rax
  mov    %rax,0x78(%rsp)
  test   %r14d,%r14d
  jle    L65
  pxor   %xmm7,%xmm7
  movsd  %xmm7,0x8(%rsp)
  mov    $0x0,%r13d
  mov    $0x0,%ebx
  lea    0x60(%rsp),%r15
L49:
  mov    %r15,%rdx
  mov    %ebp,%esi
  mov    %r12,%rdi
  call   <generate_sequence@plt>
  lea    0x38(%rsp),%rcx
  mov    $0x1,%r9d
  lea    0x3c(%rsp),%r8
  mov    0x10(%rsp),%rdx
  mov    %ebp,%esi
  mov    %r12,%rdi
  call   <score@plt>
  movapd %xmm0,%xmm4
  maxsd  0x8(%rsp),%xmm4
  movsd  %xmm4,0x8(%rsp)
  comisd 0x18(%rsp),%xmm0
  sbb    $0xffffffff,%r13d
  add    $0x1,%ebx
  cmp    %ebx,%r14d
  jne    L49
L35:
  mov    %r12,%rdi
  call   <free@plt>
  movslq 0x2c(%rsp),%rax
  mov    0x20(%rsp),%rbx
  movsd  0x8(%rsp),%xmm7
  movsd  %xmm7,(%rbx,%rax,8)
  mov    0xa8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L43
  mov    %r13d,%eax
  add    $0xb8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L65:
  pxor   %xmm7,%xmm7
  movsd  %xmm7,0x8(%rsp)
  mov    $0x0,%r13d
  jmp    L35
L43:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: label: D7
type_guessed: f64
name: retrieve_data
arguments: label: D25
type_guessed: f64

tool: D7: 1

tool: D25: 1e-07

assistant: ```c
int score_orf_random(char *orf, int n, double *sc, double *thr, int t, double maxscore, int rep) {
  int i, k, nuc[4] = {0}, sig_pos, from, to, rt = 0, rm = 0, n1 = 0;
  char *seq;
  double fr[5] = {0.0}, pr[4] = {0.0}, q[4], delta = 0.0000001, rs, s;
  double maxs, mins;
  seq = (char *)malloc(n * sizeof(char));
  for (i = 0; i < n; i++) {
    if (orf[i] >= 0 && orf[i] < 4) {
      ++n1;
      ++fr[orf[i]];
      ++fr[4];
    }
  }
  for (i = 0; i < 3; ++i)
    fr[i] /= fr[4];
  fr[3] = 1.0 - fr[0] - fr[1] - fr[2];
  find_probabilities(fr, pr, delta);
  q[0] = pr[0];
  q[1] = q[0] + pr[1];
  q[2] = q[1] + pr[2];
  q[3] = 1.0;
  maxs = 0.0;
  for (k = 0; k < rep; k++) {
    generate_sequence(seq, n, q);
    rs = score(seq, n, sc, &from, &to, 1);
    if (rs > maxs)
      maxs = rs;
    if (rs >= thr[t])
      ++rt;
    if (rs >= maxscore)
      ++rm;
  }
  free(seq);
  thr[t] = maxs;
  return (rm);
}
```