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

```asm
<vrna_file_SHAPE_read>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %esi,0x1c(%rsp)
  mov    %rdx,0x8(%rsp)
  mov    %rcx,0x10(%rsp)
  movsd  %xmm0,(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  movl   $0x0,0x18(%rsp)
  test   %rdi,%rdi
  je     L14
  mov    %esi,%ebx
  lea    D1(%rip),%rsi
  call   <fopen@plt>
  mov    %rax,%r13
  test   %rax,%rax
  je     L158
  movslq %ebx,%rdx
  xor    %eax,%eax
  test   %ebx,%ebx
  jle    L98
  movsd  (%rsp),%xmm0
  mov    0x8(%rsp),%rcx
  mov    0x10(%rsp),%rsi
  nopl   0x0(%rax,%rax,1)
L179:
  movb   $0x4e,(%rcx,%rax,1)
  movsd  %xmm0,0x8(%rsi,%rax,8)
  add    $0x1,%rax
  cmp    %rax,%rdx
  jne    L179
L98:
  mov    0x8(%rsp),%rax
  movl   $0x0,0x18(%rsp)
  lea    0x2c(%rsp),%r15
  lea    D27(%rip),%r14
  movb   $0x0,(%rax,%rdx,1)
  jmp    L58
  nopw   0x0(%rax,%rax,1)
L74:
  mov    %rbp,%rdi
  call   <free@plt>
L58:
  mov    %r13,%rdi
  call   <get_line@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  je     L41
  movsd  (%rsp),%xmm1
  xor    %eax,%eax
  mov    %r15,%rdx
  mov    %r14,%rsi
  mov    %rbp,%rdi
  movb   $0x4e,0x2b(%rsp)
  movsd  %xmm1,0x30(%rsp)
  call   <sscanf@plt>
  cmp    $0x1,%eax
  jne    L74
  movslq 0x2c(%rsp),%rax
  cmp    0x1c(%rsp),%eax
  jg     L39
  test   %eax,%eax
  jle    L39
  cmpb   $0x0,0x1(%rbp)
  lea    0x1(%rbp),%r12
  je     L32
  xor    %ebx,%ebx
  jmp    L210
  xchg   %ax,%ax
L7:
  add    $0x1,%r12
  cmpb   $0x0,(%r12)
  je     L230
L210:
  movsbl -0x1(%r12),%edi
  call   <isspace@plt>
  test   %rax,%rax
  je     L7
  movsbl (%r12),%edi
  call   <isspace@plt>
  test   %rax,%rax
  jne    L7
  test   %rbx,%rbx
  jne    L116
  mov    %r12,%rbx
  add    $0x1,%r12
  cmpb   $0x0,(%r12)
  jne    L210
  nopl   (%rax)
L230:
  test   %rbx,%rbx
  jne    L19
L227:
  movslq 0x2c(%rsp),%rax
L32:
  mov    0x8(%rsp),%rcx
  movzbl 0x2b(%rsp),%edx
  movsd  0x30(%rsp),%xmm0
  addl   $0x1,0x18(%rsp)
  mov    %dl,-0x1(%rcx,%rax,1)
  mov    0x10(%rsp),%rcx
  movsd  %xmm0,(%rcx,%rax,8)
  jmp    L74
L116:
  lea    0x2b(%rsp),%rdx
  lea    D12(%rip),%rsi
  mov    %rbx,%rdi
  xor    %eax,%eax
  call   <sscanf@plt>
  lea    0x30(%rsp),%rdx
  mov    %r12,%rdi
  xor    %eax,%eax
  lea    D6(%rip),%rsi
  call   <sscanf@plt>
  movslq 0x2c(%rsp),%rax
  jmp    L32
L39:
  lea    D8(%rip),%rdi
  call   <vrna_message_warning@plt>
  mov    %r13,%rdi
  call   <fclose@plt>
  mov    %rbp,%rdi
  call   <free@plt>
  movl   $0x0,0x18(%rsp)
L14:
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L256
  mov    0x18(%rsp),%eax
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L19:
  xor    %eax,%eax
  lea    0x30(%rsp),%rdx
  lea    D6(%rip),%rsi
  mov    %rbx,%rdi
  call   <sscanf@plt>
  cmp    $0x1,%eax
  je     L227
  lea    0x2b(%rsp),%rdx
  lea    D12(%rip),%rsi
  mov    %rbx,%rdi
  xor    %eax,%eax
  call   <sscanf@plt>
  jmp    L227
L41:
  mov    %r13,%rdi
  call   <fclose@plt>
  mov    0x18(%rsp),%eax
  test   %eax,%eax
  je     L234
  movl   $0x1,0x18(%rsp)
  jmp    L14
L234:
  lea    D74(%rip),%rdi
  call   <vrna_message_warning@plt>
  jmp    L14
L158:
  lea    D69(%rip),%rdi
  call   <vrna_message_warning@plt>
  jmp    L14
L256:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_tag: D1
type_infered: string
name: retrieve_data
arguments: data_tag: D27
type_infered: string
name: retrieve_data
arguments: data_tag: D12
type_infered: string
name: retrieve_data
arguments: data_tag: D6
type_infered: string
name: retrieve_data
arguments: data_tag: D8
type_infered: string
name: retrieve_data
arguments: data_tag: D74
type_infered: string
name: retrieve_data
arguments: data_tag: D69
type_infered: string

tool: D1: r

tool: D27: %d

tool: D12: %c

tool: D6: %lf

tool: D8: Provided SHAPE data outside of sequence scope

tool: D74: SHAPE data file is empty

tool: D69: SHAPE data file could not be opened

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;
}
```