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

```asm
<readxy_ex>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x108,%rsp
  mov    %rdi,0x10(%rsp)
  mov    %rsi,%r15
  mov    %rdx,0x8(%rsp)
  mov    %rcx,%r12
  mov    %r8,0x18(%rsp)
  mov    %r9d,%ebp
  mov    %fs:0x28,%rax
  mov    %rax,0xf8(%rsp)
  xor    %eax,%eax
  movq   $0x0,(%rsi)
  movq   $0x0,(%rdx)
  movl   $0x0,(%rcx)
  lea    D8(%rip),%rsi
  call   <fopen@plt>
  test   %rax,%rax
  je     L242
  mov    %rax,%r13
  lea    0x30(%rsp),%rbx
  jmp    L101
L242:
  mov    $0xfffffffe,%ebx
  mov    0x18(%rsp),%rdi
  test   %rdi,%rdi
  je     L200
  mov    0x10(%rsp),%rdx
  lea    D34(%rip),%rsi
  call   <fprintf@plt>
  jmp    L200
L46:
  mov    %r13,%rdx
  mov    $0xc7,%esi
  mov    %rbx,%rdi
  call   <get_line_cf@plt>
L94:
  test   %rax,%rax
  je     L203
  mov    %rbx,%rdi
  call   <clean_line@plt>
  lea    0x20(%rsp),%rsi
  mov    $0x2,%edx
  mov    %rbx,%rdi
  call   <string_read_doubles@plt>
  cmp    $0x2,%eax
  je     L67
L101:
  test   %ebp,%ebp
  jne    L46
  mov    %r13,%rdx
  mov    $0xc7,%esi
  mov    %rbx,%rdi
  call   <fgets@plt>
  jmp    L94
L67:
  addl   $0x1,(%r12)
  jmp    L101
L203:
  mov    %r13,%rdi
  call   <fclose@plt>
  mov    (%r12),%ebx
  test   %ebx,%ebx
  jne    L175
  mov    0x18(%rsp),%rdi
  test   %rdi,%rdi
  je     L200
  mov    0x10(%rsp),%rdx
  lea    D19(%rip),%rsi
  call   <fprintf@plt>
  jmp    L200
L175:
  movslq %ebx,%rsi
  shl    $0x4,%rsi
  lea    D71(%rip),%rdx
  mov    %r15,%rdi
  call   <willus_mem_alloc@plt>
  test   %eax,%eax
  je     L208
  movslq (%r12),%rdx
  mov    (%r15),%rax
  lea    (%rax,%rdx,8),%rax
  mov    0x8(%rsp),%rcx
  mov    %rax,(%rcx)
  lea    D8(%rip),%rsi
  mov    0x10(%rsp),%rdi
  call   <fopen@plt>
  mov    %rax,%r13
  test   %rax,%rax
  je     L111
  mov    $0x0,%r14d
  lea    0x30(%rsp),%rbx
  jmp    L16
L208:
  mov    $0xffffffff,%ebx
  mov    0x18(%rsp),%rdi
  test   %rdi,%rdi
  je     L200
  mov    0x10(%rsp),%rdx
  lea    D82(%rip),%rsi
  call   <fprintf@plt>
  jmp    L200
L111:
  mov    %r15,%rdi
  call   <freexy@plt>
  mov    $0xfffffffd,%ebx
  mov    0x18(%rsp),%rdi
  test   %rdi,%rdi
  je     L200
  mov    0x10(%rsp),%rdx
  lea    D81(%rip),%rsi
  call   <fprintf@plt>
  jmp    L200
L82:
  mov    %r13,%rdx
  mov    $0xc7,%esi
  mov    %rbx,%rdi
  call   <fgets@plt>
L290:
  test   %rax,%rax
  je     L141
  mov    %rbx,%rdi
  call   <clean_line@plt>
  lea    0x20(%rsp),%rsi
  mov    $0x2,%edx
  mov    %rbx,%rdi
  call   <string_read_doubles@plt>
  cmp    $0x2,%eax
  je     L159
L16:
  test   %ebp,%ebp
  je     L82
  mov    %r13,%rdx
  mov    $0xc7,%esi
  mov    %rbx,%rdi
  call   <get_line_cf@plt>
  jmp    L290
L159:
  cmp    %r14d,(%r12)
  jle    L51
  movslq %r14d,%rax
  mov    (%r15),%rdx
  movsd  0x20(%rsp),%xmm0
  movsd  %xmm0,(%rdx,%rax,8)
  mov    0x8(%rsp),%rcx
  mov    (%rcx),%rdx
  movsd  0x28(%rsp),%xmm0
  movsd  %xmm0,(%rdx,%rax,8)
  add    $0x1,%r14d
  jmp    L16
L51:
  mov    %r13,%rdi
  call   <fclose@plt>
  mov    %r15,%rdi
  call   <freexy@plt>
  mov    0x18(%rsp),%rdi
  test   %rdi,%rdi
  je     L10
  mov    0x10(%rsp),%rdx
  lea    D81(%rip),%rsi
  call   <fprintf@plt>
L10:
  mov    $0xfffffffd,%ebx
  jmp    L200
L141:
  mov    %r13,%rdi
  call   <fclose@plt>
  cmp    %r14d,(%r12)
  jne    L124
  mov    $0x0,%ebx
L200:
  mov    0xf8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L88
  mov    %ebx,%eax
  add    $0x108,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L124:
  mov    %r15,%rdi
  call   <freexy@plt>
  mov    $0xfffffffd,%ebx
  mov    0x18(%rsp),%rdi
  test   %rdi,%rdi
  je     L200
  mov    0x10(%rsp),%rdx
  lea    D81(%rip),%rsi
  call   <fprintf@plt>
  jmp    L200
L88:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D8
type: string
name: extract_symbolic_data
arguments: data_tag: D34
type: string
name: extract_symbolic_data
arguments: data_tag: D19
type: string
name: extract_symbolic_data
arguments: data_tag: D71
type: string
name: extract_symbolic_data
arguments: data_tag: D82
type: string
name: extract_symbolic_data
arguments: data_tag: D81
type: string

tool: D8: r

tool: D34: Cannot open file %s for reading array pairs.


tool: D19: There are no array pairs in file %s.


tool: D71: readxy

tool: D82: There is not enough memory to read in file %s.


tool: D81: Internal error re-reading file %s.


assistant: ```c
int readxy_ex(char *filename, double **x, double **y, int *n, FILE *output, int ignore_after_semicolon) {
  FILE *f;
  static char *notenough = "There is not enough memory to read in file %s.\n";
  static char *internal = "Internal error re-reading file %s.\n";
  char buf[200];
  long memsize;
  int i;
  size_t memsizest;
  static char *funcname = "readxy";
  (*x) = NULL;
  (*y) = NULL;
  (*n) = 0;
  f = fopen(filename, "r");
  if (f == NULL) {
    if (output != NULL)
      fprintf(output, "Cannot open file %s for reading array pairs.\n", filename);
    return (-2);
  }
  while (1) {
    double v[2];
    void *ptr;
    if (ignore_after_semicolon)
      ptr = get_line_cf(buf, 199, f);
    else
      ptr = fgets(buf, 199, f);
    if (ptr == NULL)
      break;
    clean_line(buf);
    if (string_read_doubles(buf, v, 2) == 2)
      (*n)++;
  }
  fclose(f);
  if ((*n) == 0) {
    if (output != NULL)
      fprintf(output, "There are no array pairs in file %s.\n", filename);
    return (0);
  }
  memsize = (long)sizeof(double) * (*n) * 2L;
  memsizest = (size_t)memsize;
  if (memsize != memsizest) {
    if (output != NULL)
      fprintf(output, notenough, filename);
    return (-1);
  }
  if (!willus_mem_alloc(x, memsizest, funcname)) {
    if (output != NULL)
      fprintf(output, notenough, filename);
    return (-1);
  }
  (*y) = &(*x)[(*n)];
  i = 0;
  f = fopen(filename, "r");
  if (f == NULL) {
    freexy(x);
    if (output != NULL)
      fprintf(output, internal, filename);
    return (-3);
  }
  while (1) {
    double v[2];
    void *ptr;
    if (ignore_after_semicolon)
      ptr = get_line_cf(buf, 199, f);
    else
      ptr = fgets(buf, 199, f);
    if (ptr == NULL)
      break;
    clean_line(buf);
    if (string_read_doubles(buf, v, 2) == 2) {
      if (i >= (*n)) {
        fclose(f);
        freexy(x);
        if (output != NULL)
          fprintf(output, internal, filename);
        return (-3);
      }
      (*x)[i] = v[0];
      (*y)[i] = v[1];
      i++;
    }
  }
  fclose(f);
  if (i != (*n)) {
    freexy(x);
    if (output != NULL)
      fprintf(output, internal, filename);
    return (-3);
  }
  return (0);
}
```