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

```asm
<scan_motif4>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %rdi,%rbp
  mov    %rsi,0x10(%rsp)
  mov    %edx,%r12d
  mov    %ecx,0x38(%rsp)
  movss  %xmm0,0xc(%rsp)
  mov    %r8,0x18(%rsp)
  mov    %r9,0x20(%rsp)
  mov    0x88(%rsp),%r15d
  sub    %edx,%ecx
  mov    %ecx,%r13d
  cmpl   $0x0,0x98(%rsp)
  jg     L142
L316:
  mov    %r12d,%eax
  neg    %eax
  mov    %eax,0x3c(%rsp)
  test   %r13d,%r13d
  jle    L343
  mov    %eax,%r8d
  mov    $0x1,%ebx
  movl   $0x0,0x8(%rsp)
  jmp    L259
L142:
  mov    %edx,%esi
  mov    $0x1,%edi
  call   <cvector@plt>
  mov    %rax,%r14
  lea    -0x1(%r12),%esi
  mov    $0x0,%edi
  call   <cvector@plt>
  mov    %rax,0x28(%rsp)
  jmp    L316
L61:
  pxor   %xmm0,%xmm0
  cvtss2sd (%rsp),%xmm0
  subsd  D42(%rip),%xmm0
  pxor   %xmm2,%xmm2
  cvtsd2ss %xmm0,%xmm2
  movss  %xmm2,(%rsp)
L31:
  add    $0x1,%rax
  cmp    %rdi,%rax
  je     L286
L234:
  movzbl -0x1(%rsi,%rax,1),%edx
  lea    -0x1(%rdx),%ecx
  cmp    $0x3,%cl
  ja     L61
  movsbq %dl,%rdx
  mov    0x0(%rbp,%rdx,8),%rdx
  movss  (%rsp),%xmm1
  addss  (%rdx,%rax,4),%xmm1
  movss  %xmm1,(%rsp)
  jmp    L31
L303:
  pxor   %xmm5,%xmm5
  movss  %xmm5,(%rsp)
L286:
  movss  (%rsp),%xmm4
  comiss 0xc(%rsp),%xmm4
  jb     L123
  addl   $0x1,0x8(%rsp)
  mov    0x8(%rsp),%eax
  cltq
  mov    0x18(%rsp),%rdi
  lea    (%rdi,%rax,4),%rdi
  mov    %rdi,0x30(%rsp)
  mov    0x38(%rsp),%edx
  sub    %r9d,%edx
  mov    %edx,(%rdi)
  mov    0x20(%rsp),%rsi
  movb   $0x1,(%rsi,%rax,1)
  mov    0x4(%rsp),%r8d
  cmpl   $0x0,0x98(%rsp)
  jg     L102
L123:
  add    $0x1,%rbx
  cmp    %ebx,%r13d
  jl     L198
L259:
  mov    %ebx,%r9d
  mov    %ebx,0x4(%rsp)
  mov    %ebx,%eax
  sub    %r8d,%eax
  cmp    %r15d,%eax
  jle    L123
  test   %r12d,%r12d
  jle    L303
  lea    0x1(%r12),%edi
  mov    $0x1,%eax
  pxor   %xmm6,%xmm6
  movss  %xmm6,(%rsp)
  mov    0x10(%rsp),%rsi
  add    %rbx,%rsi
  jmp    L234
L102:
  test   %r12d,%r12d
  jle    L84
  mov    %r12d,%esi
  mov    $0x0,%eax
  mov    0x10(%rsp),%rdi
  lea    (%rdi,%rbx,1),%rcx
L144:
  movzbl (%rcx,%rax,1),%edx
  mov    %dl,0x1(%r14,%rax,1)
  add    $0x1,%rax
  cmp    %rsi,%rax
  jne    L144
L84:
  lea    D2(%rip),%rsi
  mov    0x28(%rsp),%rdi
  call   <sprintf@plt>
  mov    $0x1,%ecx
  mov    0x28(%rsp),%rdx
  mov    %r12d,%esi
  mov    %r14,%rdi
  call   <num2seq@plt>
  mov    $0x1,%r9d
  mov    0x28(%rsp),%r8
  movss  (%rsp),%xmm0
  mov    0x30(%rsp),%rax
  mov    (%rax),%ecx
  mov    0x98(%rsp),%edx
  lea    D32(%rip),%rsi
  mov    0x90(%rsp),%rdi
  call   <fprintf@plt>
  mov    0x4(%rsp),%r8d
  jmp    L123
L262:
  pxor   %xmm0,%xmm0
  cvtss2sd (%rsp),%xmm0
  subsd  D42(%rip),%xmm0
  pxor   %xmm7,%xmm7
  cvtsd2ss %xmm0,%xmm7
  movss  %xmm7,(%rsp)
L258:
  add    $0x1,%rax
  cmp    %rdi,%rax
  je     L67
L349:
  movzbl -0x1(%rsi,%rax,1),%edx
  lea    -0x1(%rdx),%ecx
  cmp    $0x3,%cl
  ja     L262
  movsbq %dl,%rdx
  mov    0x0(%rbp,%rdx,8),%rdx
  movss  (%rsp),%xmm3
  addss  (%rdx,%rax,4),%xmm3
  movss  %xmm3,(%rsp)
  jmp    L258
L197:
  pxor   %xmm7,%xmm7
  movss  %xmm7,(%rsp)
L67:
  movss  (%rsp),%xmm7
  comiss 0xc(%rsp),%xmm7
  jb     L99
  addl   $0x1,0x8(%rsp)
  mov    0x8(%rsp),%eax
  cltq
  mov    0x18(%rsp),%rdi
  lea    (%rdi,%rax,4),%rdi
  mov    %rdi,0x10(%rsp)
  mov    0x4(%rsp),%r8d
  mov    %r8d,(%rdi)
  mov    0x20(%rsp),%rsi
  movb   $0x0,(%rsi,%rax,1)
  cmpl   $0x0,0x98(%rsp)
  jg     L153
L99:
  add    $0x1,%rbx
  cmp    %ebx,%r13d
  jl     L174
L291:
  mov    %ebx,0x4(%rsp)
  mov    %ebx,%eax
  sub    %r8d,%eax
  cmp    %r15d,%eax
  jle    L99
  test   %r12d,%r12d
  jle    L197
  lea    0x1(%r12),%edi
  mov    $0x1,%eax
  pxor   %xmm4,%xmm4
  movss  %xmm4,(%rsp)
  mov    0x30(%rsp),%rsi
  add    %rbx,%rsi
  jmp    L349
L153:
  test   %r12d,%r12d
  jle    L219
  mov    %r12d,%esi
  mov    $0x0,%eax
  mov    0x30(%rsp),%rdi
  lea    (%rdi,%rbx,1),%rcx
L62:
  movzbl (%rcx,%rax,1),%edx
  mov    %dl,0x1(%r14,%rax,1)
  add    $0x1,%rax
  cmp    %rsi,%rax
  jne    L62
L219:
  lea    D2(%rip),%rsi
  mov    0x28(%rsp),%rdi
  call   <sprintf@plt>
  mov    $0x1,%ecx
  mov    0x28(%rsp),%rdx
  mov    %r12d,%esi
  mov    %r14,%rdi
  call   <num2seq@plt>
  mov    $0x0,%r9d
  mov    0x28(%rsp),%r8
  movss  (%rsp),%xmm0
  mov    0x10(%rsp),%rax
  mov    (%rax),%ecx
  mov    0x98(%rsp),%edx
  lea    D32(%rip),%rsi
  mov    0x90(%rsp),%rdi
  call   <fprintf@plt>
  mov    0x4(%rsp),%r8d
  jmp    L99
L36:
  mov    %r12d,%edx
  mov    $0x1,%esi
  mov    %r14,%rdi
  call   <free_cvector@plt>
  lea    -0x1(%r12),%edx
  mov    $0x0,%esi
  mov    0x28(%rsp),%rdi
  call   <free_cvector@plt>
  jmp    L311
L205:
  mov    0x38(%rsp),%ebx
  mov    %ebx,%esi
  mov    $0x1,%edi
  call   <cvector@plt>
  mov    %rax,0x30(%rsp)
  mov    %ebx,%edx
  mov    %rax,%rsi
  mov    0x10(%rsp),%rdi
  call   <revcomp@plt>
  movl   $0x0,0x8(%rsp)
L174:
  mov    0x38(%rsp),%edx
  mov    $0x1,%esi
  mov    0x30(%rsp),%rdi
  call   <free_cvector@plt>
  jmp    L20
L343:
  cmpl   $0x1,0x80(%rsp)
  je     L205
  movl   $0x0,0x8(%rsp)
  jmp    L20
L338:
  mov    0x38(%rsp),%ebx
  mov    %ebx,%esi
  mov    $0x1,%edi
  call   <cvector@plt>
  mov    %rax,0x30(%rsp)
  mov    %ebx,%edx
  mov    %rax,%rsi
  mov    0x10(%rsp),%rdi
  call   <revcomp@plt>
  mov    $0x1,%ebx
  mov    0x3c(%rsp),%r8d
  jmp    L291
L198:
  cmpl   $0x1,0x80(%rsp)
  je     L338
L20:
  cmpl   $0x0,0x98(%rsp)
  jg     L36
L311:
  mov    0x8(%rsp),%eax
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: disassemble_data
arguments: data_tag: D42
data_type: f64
name: disassemble_data
arguments: data_tag: D2
data_type: f32
name: disassemble_data
arguments: data_tag: D32
data_type: string

tool: D42: 7.6

tool: D2: 0

tool: D32: %d	%d	%.4f	%s	%d


assistant: ```c
int scan_motif4(float **weight_matrix, char *sequence, int motif_length, int seq_length, float threshold, int *pos, char *strand, int rc, int min_dist, FILE *log_file, int seq_nr) {
  int i, j, k;
  int i_stop;
  char c;
  float p;
  int n;
  float current_score;
  char *revcomp_seq;
  int curr_strand;
  char *word;
  char *numword;
  int previous_position;
  i_stop = seq_length - motif_length;
  n = 0;
  if (seq_nr > 0) {
    numword = cvector(1, motif_length);
    word = cvector(0, motif_length - 1);
  }
  previous_position = -motif_length;
  curr_strand = 1;
  for (i = 1; i <= i_stop; i++) {
    if ((i - previous_position) > min_dist) {
      current_score = 0.0;
      for (j = 1; j <= motif_length; j++) {
        c = sequence[i + j - 1];
        if ((c > 0) & (c < 5)) {
          p = weight_matrix[c][j];
          current_score += p;
        } else {
          current_score += -7.6;
        }
      }
      if (current_score >= threshold) {
        previous_position = i;
        n++;
        pos[n] = seq_length - i;
        strand[n] = curr_strand;
        if (seq_nr > 0) {
          for (j = 1; j <= motif_length; j++)
            numword[j] = sequence[i + j - 1];
          sprintf(word, "");
          num2seq(numword, motif_length, word, 1);
          fprintf(log_file, "%d\t%d\t%.4f\t%s\t%d\n", seq_nr, pos[n], current_score, word, curr_strand);
        }
      }
    }
  }
  curr_strand = 0;
  previous_position = -motif_length;
  if (rc == 1) {
    revcomp_seq = cvector(1, seq_length);
    revcomp(sequence, revcomp_seq, seq_length);
    for (i = 1; i <= i_stop; i++) {
      if ((i - previous_position) > min_dist) {
        current_score = 0.0;
        for (j = 1; j <= motif_length; j++) {
          c = revcomp_seq[i + j - 1];
          if ((c > 0) & (c < 5)) {
            p = weight_matrix[c][j];
            current_score += p;
          } else {
            current_score += -7.6;
          }
        }
        if (current_score >= threshold) {
          previous_position = i;
          n++;
          pos[n] = i;
          strand[n] = 0;
          if (seq_nr > 0) {
            for (j = 1; j <= motif_length; j++)
              numword[j] = revcomp_seq[i + j - 1];
            sprintf(word, "");
            num2seq(numword, motif_length, word, 1);
            fprintf(log_file, "%d\t%d\t%.4f\t%s\t%d\n", seq_nr, pos[n], current_score, word, curr_strand);
          }
        }
      }
    }
    free_cvector(revcomp_seq, 1, seq_length);
  }
  if (seq_nr > 0) {
    free_cvector(numword, 1, motif_length);
    free_cvector(word, 0, motif_length - 1);
  }
  return n;
}
```