user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<vrna_file_SHAPE_read>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  add    $0xffffffffffffff80,%rsp
  mov    %rdi,-0x58(%rbp)
  mov    %esi,-0x5c(%rbp)
  movsd  %xmm0,-0x68(%rbp)
  mov    %rdx,-0x70(%rbp)
  mov    %rcx,-0x78(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x3c(%rbp)
  cmpq   $0x0,-0x58(%rbp)
  jne    L122
  mov    $0x0,%eax
  jmp    L103
L122:
  mov    -0x58(%rbp),%rax
  lea    D38(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fopen@plt>
  mov    %rax,-0x18(%rbp)
  cmpq   $0x0,-0x18(%rbp)
  jne    L265
  lea    D55(%rip),%rax
  mov    %rax,%rdi
  call   <vrna_message_warning@plt>
  mov    $0x0,%eax
  jmp    L103
L265:
  movl   $0x0,-0x40(%rbp)
  jmp    L67
L244:
  mov    -0x40(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  movb   $0x4e,(%rax)
  mov    -0x40(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  movsd  -0x68(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x40(%rbp)
L67:
  mov    -0x40(%rbp),%eax
  cmp    -0x5c(%rbp),%eax
  jl     L244
  mov    -0x5c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  jmp    L7
L251:
  movb   $0x4e,-0x45(%rbp)
  movsd  -0x68(%rbp),%xmm0
  movsd  %xmm0,-0x38(%rbp)
  movq   $0x0,-0x30(%rbp)
  movq   $0x0,-0x28(%rbp)
  lea    -0x44(%rbp),%rdx
  mov    -0x10(%rbp),%rax
  lea    D56(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <sscanf@plt>
  cmp    $0x1,%eax
  je     L10
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  jmp    L7
L10:
  mov    -0x44(%rbp),%eax
  test   %eax,%eax
  jle    L89
  mov    -0x44(%rbp),%eax
  cmp    %eax,-0x5c(%rbp)
  jge    L50
L89:
  lea    D86(%rip),%rax
  mov    %rax,%rdi
  call   <vrna_message_warning@plt>
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <fclose@plt>
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    $0x0,%eax
  jmp    L103
L50:
  mov    -0x10(%rbp),%rax
  add    $0x1,%rax
  mov    %rax,-0x20(%rbp)
  jmp    L181
L187:
  mov    -0x20(%rbp),%rax
  sub    $0x1,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isspace@plt>
  test   %rax,%rax
  je     L259
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isspace@plt>
  test   %rax,%rax
  jne    L259
  cmpq   $0x0,-0x30(%rbp)
  jne    L195
  mov    -0x20(%rbp),%rax
  mov    %rax,-0x30(%rbp)
  jmp    L259
L195:
  mov    -0x20(%rbp),%rax
  mov    %rax,-0x28(%rbp)
  jmp    L267
L259:
  addq   $0x1,-0x20(%rbp)
L181:
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L187
L267:
  cmpq   $0x0,-0x30(%rbp)
  je     L193
  cmpq   $0x0,-0x28(%rbp)
  je     L45
  lea    -0x45(%rbp),%rdx
  mov    -0x30(%rbp),%rax
  lea    D25(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <sscanf@plt>
  lea    -0x38(%rbp),%rdx
  mov    -0x28(%rbp),%rax
  lea    D22(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <sscanf@plt>
  jmp    L193
L45:
  lea    -0x38(%rbp),%rdx
  mov    -0x30(%rbp),%rax
  lea    D22(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <sscanf@plt>
  cmp    $0x1,%eax
  je     L193
  lea    -0x45(%rbp),%rdx
  mov    -0x30(%rbp),%rax
  lea    D25(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <sscanf@plt>
L193:
  movzbl -0x45(%rbp),%edx
  mov    -0x44(%rbp),%eax
  cltq
  lea    -0x1(%rax),%rcx
  mov    -0x70(%rbp),%rax
  add    %rcx,%rax
  mov    %dl,(%rax)
  mov    -0x44(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  movsd  -0x38(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x3c(%rbp)
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
L7:
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <get_line@plt>
  mov    %rax,-0x10(%rbp)
  cmpq   $0x0,-0x10(%rbp)
  jne    L251
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <fclose@plt>
  cmpl   $0x0,-0x3c(%rbp)
  jne    L43
  lea    D19(%rip),%rax
  mov    %rax,%rdi
  call   <vrna_message_warning@plt>
  mov    $0x0,%eax
  jmp    L103
L43:
  mov    $0x1,%eax
L103:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L252
  call   <__stack_chk_fail@plt>
L252:
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: data_label: D38
type_guessed: string
name: retrieve_data
arguments: data_label: D55
type_guessed: string
name: retrieve_data
arguments: data_label: D56
type_guessed: string
name: retrieve_data
arguments: data_label: D86
type_guessed: string
name: retrieve_data
arguments: data_label: D25
type_guessed: string
name: retrieve_data
arguments: data_label: D22
type_guessed: string
name: retrieve_data
arguments: data_label: D19
type_guessed: string

tool: D38: r

tool: D55: SHAPE data file could not be opened

tool: D56: %d

tool: D86: Provided SHAPE data outside of sequence scope

tool: D25: %c

tool: D22: %lf

tool: D19: SHAPE data file is empty

assistant: ```c
int vrna_file_SHAPE_read(const char *file_name, int length, double default_value, char *sequence, double *values) {
  FILE *fp;
  char *line;
  int i;
  int count = 0;
  if (!file_name)
    return 0;
  if (!(fp = fopen(file_name, "r"))) {
    vrna_message_warning("SHAPE data file could not be opened");
    return 0;
  }
  for (i = 0; i < length; ++i) {
    sequence[i] = 'N';
    values[i + 1] = default_value;
  }
  sequence[length] = '\0';
  while ((line = get_line(fp))) {
    int position;
    unsigned char nucleotide = 'N';
    double reactivity = default_value;
    char *second_entry = 0;
    char *third_entry = 0;
    char *c;
    if (sscanf(line, "%d", &position) != 1) {
      free(line);
      continue;
    }
    if (position <= 0 || position > length) {
      vrna_message_warning("Provided SHAPE data outside of sequence scope");
      fclose(fp);
      free(line);
      return 0;
    }
    for (c = line + 1; *c; ++c) {
      if (isspace(*(c - 1)) && !isspace(*c)) {
        if (!second_entry) {
          second_entry = c;
        } else {
          third_entry = c;
          break;
        }
      }
    }
    if (second_entry) {
      if (third_entry) {
        sscanf(second_entry, "%c", &nucleotide);
        sscanf(third_entry, "%lf", &reactivity);
      } else if (sscanf(second_entry, "%lf", &reactivity) != 1)
        sscanf(second_entry, "%c", &nucleotide);
    }
    sequence[position - 1] = nucleotide;
    values[position] = reactivity;
    ++count;
    free(line);
  }
  fclose(fp);
  if (!count) {
    vrna_message_warning("SHAPE data file is empty");
    return 0;
  }
  return 1;
}
```