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

```asm
<score_orf_random>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  mov    %rdi,%r12
  mov    %esi,%edi
  push   %rbp
  mov    %rdx,%rbp
  push   %rbx
  mov    %esi,%ebx
  sub    $0xb8,%rsp
  mov    %rcx,0x20(%rsp)
  mov    %r8d,0x2c(%rsp)
  mov    %r9d,0x28(%rsp)
  movsd  %xmm0,0x8(%rsp)
  pxor   %xmm0,%xmm0
  mov    %fs:0x28,%rax
  mov    %rax,0xa8(%rsp)
  xor    %eax,%eax
  movaps %xmm0,0x80(%rsp)
  movq   $0x0,0xa0(%rsp)
  movaps %xmm0,0x90(%rsp)
  movaps %xmm0,0x40(%rsp)
  movaps %xmm0,0x50(%rsp)
  call   <malloc@plt>
  mov    %rax,%r13
  test   %ebx,%ebx
  jle    L20
  movsd  0xa0(%rsp),%xmm3
  lea    -0x1(%rbx),%eax
  movsd  D27(%rip),%xmm1
  xor    %ecx,%ecx
  lea    0x1(%r12,%rax,1),%rdx
  movapd %xmm3,%xmm0
L58:
  movsbq (%r12),%rax
  cmp    $0x3,%al
  ja     L74
  movsd  0x80(%rsp,%rax,8),%xmm2
  addsd  %xmm1,%xmm0
  mov    $0x1,%ecx
  addsd  %xmm1,%xmm2
  movsd  %xmm2,0x80(%rsp,%rax,8)
L74:
  add    $0x1,%r12
  cmp    %rdx,%r12
  jne    L58
  test   %cl,%cl
  je     L32
  movsd  %xmm0,0xa0(%rsp)
L55:
  lea    0x40(%rsp),%rsi
  movsd  %xmm1,(%rsp)
  movsd  0x80(%rsp),%xmm4
  movsd  0x88(%rsp),%xmm3
  movsd  0x90(%rsp),%xmm2
  lea    0x80(%rsp),%rdi
  mov    $0x0,%r12d
  divsd  %xmm0,%xmm4
  divsd  %xmm0,%xmm3
  movsd  %xmm4,0x80(%rsp)
  divsd  %xmm0,%xmm2
  movapd %xmm1,%xmm0
  subsd  %xmm4,%xmm0
  movsd  %xmm3,0x88(%rsp)
  subsd  %xmm3,%xmm0
  movsd  %xmm2,0x90(%rsp)
  subsd  %xmm2,%xmm0
  movsd  %xmm0,0x98(%rsp)
  movsd  D28(%rip),%xmm0
  call   <find_probabilities@plt>
  movsd  0x40(%rsp),%xmm0
  mov    0x28(%rsp),%eax
  pxor   %xmm4,%xmm4
  movsd  (%rsp),%xmm1
  movsd  %xmm4,(%rsp)
  movsd  %xmm0,0x60(%rsp)
  addsd  0x48(%rsp),%xmm0
  test   %eax,%eax
  movsd  %xmm1,0x78(%rsp)
  movsd  %xmm0,0x68(%rsp)
  addsd  0x50(%rsp),%xmm0
  movsd  %xmm0,0x70(%rsp)
  jle    L73
  lea    0x3c(%rsp),%rax
  xor    %r14d,%r14d
  lea    0x60(%rsp),%r15
  mov    %rax,0x18(%rsp)
  lea    0x38(%rsp),%rax
  mov    %rax,0x10(%rsp)
  xchg   %ax,%ax
L75:
  mov    %r15,%rdx
  mov    %ebx,%esi
  mov    %r13,%rdi
  call   <generate_sequence@plt>
  mov    0x18(%rsp),%r8
  mov    %rbp,%rdx
  mov    %ebx,%esi
  mov    0x10(%rsp),%rcx
  mov    $0x1,%r9d
  mov    %r13,%rdi
  call   <score@plt>
  comisd 0x8(%rsp),%xmm0
  movapd %xmm0,%xmm5
  maxsd  (%rsp),%xmm5
  sbb    $0xffffffff,%r12d
  add    $0x1,%r14d
  movsd  %xmm5,(%rsp)
  cmp    %r14d,0x28(%rsp)
  jne    L75
L73:
  mov    %r13,%rdi
  call   <free@plt>
  movslq 0x2c(%rsp),%rax
  mov    0x20(%rsp),%rcx
  movsd  (%rsp),%xmm4
  movsd  %xmm4,(%rcx,%rax,8)
  mov    0xa8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L37
  add    $0xb8,%rsp
  mov    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L32:
  movapd %xmm3,%xmm0
  jmp    L55
  nopl   0x0(%rax)
L20:
  movsd  0xa0(%rsp),%xmm0
  movsd  D27(%rip),%xmm1
  jmp    L55
L37:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: tag: D27
type_guessed: f64
name: unpack_data
arguments: tag: D28
type_guessed: f64

tool: D27: 1

tool: D28: 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);
}
```