user: What is the c source code of the assembly code below?

```asm
<rdmar>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  sub    $0xd0,%rsp
  mov    %rdi,-0x1098(%rbp)
  mov    %rsi,-0x10a0(%rbp)
  mov    %rdx,-0x10a8(%rbp)
  mov    %rcx,-0x10b0(%rbp)
  mov    %r8,-0x10b8(%rbp)
  mov    %r9,-0x10c0(%rbp)
  mov    0x10(%rbp),%rax
  mov    %rax,-0x10c8(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x1,-0x107c(%rbp)
  mov    $0x0,%eax
  call   <filec_getdebug@plt>
  mov    %eax,-0x1060(%rbp)
  mov    -0x10b0(%rbp),%rax
  movq   $0x0,(%rax)
  mov    -0x10a0(%rbp),%rax
  movq   $0x0,(%rax)
  movl   $0x0,-0x1068(%rbp)
  movl   $0x0,-0x1064(%rbp)
  mov    $0x0,%eax
  call   <getbo@plt>
  mov    %eax,-0x105c(%rbp)
  mov    -0x1098(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,-0x1084(%rbp)
  cmpl   $0x0,-0x1060(%rbp)
  je     L219
  mov    -0x1098(%rbp),%rax
  mov    %rax,%rsi
  lea    D59(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L219:
  lea    -0x1080(%rbp),%rcx
  lea    -0x1084(%rbp),%rdx
  mov    -0x1098(%rbp),%rsi
  lea    -0x107c(%rbp),%rax
  mov    %rax,%rdi
  call   <dskbor_@plt>
  mov    -0x1080(%rbp),%eax
  test   %eax,%eax
  je     L374
  mov    $0xffffffff,%eax
  jmp    L62
L374:
  movl   $0x1,-0x1078(%rbp)
  cmpl   $0x0,-0x1060(%rbp)
  je     L352
  lea    D113(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
L352:
  lea    -0x1078(%rbp),%rdx
  lea    -0x107c(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <dskbwr_@plt>
  movl   $0x200,-0x108c(%rbp)
  lea    -0x1080(%rbp),%rcx
  lea    -0x108c(%rbp),%rdx
  lea    -0x7e0(%rbp),%rsi
  lea    -0x107c(%rbp),%rax
  mov    %rax,%rdi
  call   <dskbr_@plt>
  cmpl   $0x0,-0x1060(%rbp)
  je     L286
  mov    -0x1080(%rbp),%eax
  mov    %eax,%esi
  lea    D44(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L286:
  mov    -0x1080(%rbp),%eax
  test   %eax,%eax
  jne    L278
  lea    -0x7e0(%rbp),%rcx
  lea    -0x1030(%rbp),%rax
  mov    $0x8,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  cmpl   $0x0,-0x1060(%rbp)
  je     L165
  cmpl   $0x0,-0x105c(%rbp)
  jne    L133
  lea    D204(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  jmp    L165
L133:
  lea    D164(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
L165:
  cmpl   $0x0,-0x105c(%rbp)
  jne    L187
  lea    -0x1030(%rbp),%rax
  mov    %rax,%rdx
  mov    $0x8,%esi
  mov    $0x1,%edi
  call   <swpbyt@plt>
L187:
  cmpl   $0x0,-0x1060(%rbp)
  je     L193
  mov    -0x102c(%rbp),%edx
  mov    -0x1030(%rbp),%eax
  mov    %eax,%esi
  lea    D11(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L193:
  mov    -0x1030(%rbp),%eax
  cmp    $0x7d0,%eax
  jne    L153
  mov    -0x102c(%rbp),%eax
  cmp    $0x7d0,%eax
  je     L222
L153:
  mov    -0x1030(%rbp),%eax
  cmp    $0x4b0,%eax
  jne    L322
  mov    -0x102c(%rbp),%eax
  cmp    $0x4b0,%eax
  jne    L322
L222:
  mov    -0x1030(%rbp),%eax
  mov    %eax,-0x1068(%rbp)
  mov    -0x102c(%rbp),%eax
  mov    %eax,-0x1064(%rbp)
  cmpl   $0x0,-0x1060(%rbp)
  je     L369
  mov    -0x1064(%rbp),%edx
  mov    -0x1068(%rbp),%eax
  mov    %eax,%esi
  lea    D190(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L369:
  mov    -0x1068(%rbp),%eax
  sub    $0x100,%eax
  add    %eax,%eax
  mov    %eax,-0x108c(%rbp)
  lea    -0x1080(%rbp),%rcx
  lea    -0x108c(%rbp),%rdx
  lea    -0x7e0(%rbp),%rsi
  lea    -0x107c(%rbp),%rax
  mov    %rax,%rdi
  call   <dskbr_@plt>
  lea    -0x7e0(%rbp),%rax
  mov    %rax,%rdi
  call   <mar_getnover@plt>
  mov    %eax,-0x1058(%rbp)
  cmpl   $0x0,-0x1060(%rbp)
  je     L129
  mov    -0x1058(%rbp),%eax
  mov    %eax,%esi
  lea    D16(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L129:
  mov    -0x10a8(%rbp),%rax
  movl   $0x1000,(%rax)
  mov    $0x1000,%edi
  call   <malloc@plt>
  mov    -0x10a0(%rbp),%rdx
  mov    %rax,(%rdx)
  mov    -0x10a0(%rbp),%rax
  mov    (%rax),%rax
  mov    $0x1000,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  mov    -0x10a0(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,%rdi
  call   <clrhd@plt>
  mov    -0x10a0(%rbp),%rax
  mov    (%rax),%rdx
  lea    -0x7e0(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <mar_putheader@plt>
  mov    -0x10b8(%rbp),%rax
  movl   $0x2,(%rax)
  mov    -0x10c0(%rbp),%rax
  mov    -0x1068(%rbp),%edx
  mov    %edx,(%rax)
  mov    -0x10c0(%rbp),%rax
  lea    0x4(%rax),%rdx
  mov    -0x1064(%rbp),%eax
  mov    %eax,(%rdx)
  mov    -0x10a0(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,%rdx
  lea    D192(%rip),%rax
  mov    %rax,%rsi
  lea    D27(%rip),%rax
  mov    %rax,%rdi
  call   <puthd@plt>
  mov    -0x1068(%rbp),%edx
  lea    -0x830(%rbp),%rax
  lea    D208(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <sprintf@plt>
  mov    -0x10a0(%rbp),%rax
  mov    (%rax),%rdx
  lea    -0x830(%rbp),%rax
  mov    %rax,%rsi
  lea    D52(%rip),%rax
  mov    %rax,%rdi
  call   <puthd@plt>
  mov    -0x1068(%rbp),%edx
  lea    -0x830(%rbp),%rax
  lea    D208(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <sprintf@plt>
  mov    -0x10a0(%rbp),%rax
  mov    (%rax),%rdx
  lea    -0x830(%rbp),%rax
  mov    %rax,%rsi
  lea    D37(%rip),%rax
  mov    %rax,%rdi
  call   <puthd@plt>
  cmpl   $0x0,-0x1060(%rbp)
  je     L183
  mov    -0x10a0(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,%rsi
  lea    D132(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L183:
  cmpl   $0x0,-0x1058(%rbp)
  jg     L364
  mov    -0x10c8(%rbp),%rax
  movl   $0x4,(%rax)
  mov    -0x10a0(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,%rdx
  lea    D58(%rip),%rax
  mov    %rax,%rsi
  lea    D43(%rip),%rax
  mov    %rax,%rdi
  call   <puthd@plt>
  mov    -0x1068(%rbp),%eax
  imul   -0x1064(%rbp),%eax
  cltq
  add    %eax,%eax
  mov    %eax,-0x108c(%rbp)
  mov    -0x108c(%rbp),%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x1038(%rbp)
  mov    -0x10b0(%rbp),%rax
  mov    -0x1038(%rbp),%rdx
  mov    %rdx,(%rax)
  lea    -0x1080(%rbp),%rcx
  lea    -0x108c(%rbp),%rdx
  mov    -0x1038(%rbp),%rsi
  lea    -0x107c(%rbp),%rax
  mov    %rax,%rdi
  call   <dskbr_@plt>
  cmpl   $0x0,-0x105c(%rbp)
  jne    L370
  mov    -0x108c(%rbp),%eax
  mov    -0x1038(%rbp),%rdx
  mov    %eax,%esi
  mov    $0x0,%edi
  call   <swpbyt@plt>
  jmp    L370
L364:
  mov    -0x10c8(%rbp),%rax
  movl   $0x5,(%rax)
  mov    -0x1068(%rbp),%eax
  imul   -0x1064(%rbp),%eax
  cltq
  shl    $0x2,%eax
  mov    %eax,-0x1054(%rbp)
  mov    -0x1054(%rbp),%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x1050(%rbp)
  mov    -0x10b0(%rbp),%rax
  mov    -0x1050(%rbp),%rdx
  mov    %rdx,(%rax)
  mov    -0x1068(%rbp),%eax
  imul   -0x1064(%rbp),%eax
  cltq
  add    %eax,%eax
  mov    %eax,-0x108c(%rbp)
  mov    -0x1050(%rbp),%rax
  mov    %rax,-0x1048(%rbp)
  lea    -0x1080(%rbp),%rcx
  lea    -0x108c(%rbp),%rdx
  mov    -0x1048(%rbp),%rsi
  lea    -0x107c(%rbp),%rax
  mov    %rax,%rdi
  call   <dskbr_@plt>
  cmpl   $0x0,-0x105c(%rbp)
  jne    L197
  mov    -0x108c(%rbp),%eax
  mov    -0x1048(%rbp),%rdx
  mov    %eax,%esi
  mov    $0x0,%edi
  call   <swpbyt@plt>
L197:
  mov    -0x1068(%rbp),%eax
  imul   -0x1064(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x1084(%rbp)
  mov    -0x1084(%rbp),%eax
  mov    %eax,-0x1088(%rbp)
  jmp    L67
L119:
  mov    -0x1088(%rbp),%eax
  cltq
  lea    (%rax,%rax,1),%rdx
  mov    -0x1048(%rbp),%rax
  add    %rdx,%rax
  movzwl (%rax),%eax
  mov    -0x1088(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x1050(%rbp),%rdx
  add    %rcx,%rdx
  movzwl %ax,%eax
  mov    %eax,(%rdx)
  mov    -0x1088(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x1088(%rbp)
L67:
  mov    -0x1088(%rbp),%eax
  test   %eax,%eax
  jns    L119
  mov    -0x1058(%rbp),%eax
  cltq
  shl    $0x3,%eax
  mov    %eax,-0x108c(%rbp)
  mov    -0x108c(%rbp),%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x1040(%rbp)
  lea    -0x1080(%rbp),%rcx
  lea    -0x108c(%rbp),%rdx
  mov    -0x1040(%rbp),%rsi
  lea    -0x107c(%rbp),%rax
  mov    %rax,%rdi
  call   <dskbr_@plt>
  cmpl   $0x0,-0x105c(%rbp)
  jne    L335
  mov    -0x108c(%rbp),%eax
  mov    -0x1040(%rbp),%rdx
  mov    %eax,%esi
  mov    $0x1,%edi
  call   <swpbyt@plt>
L335:
  movl   $0x0,-0x1088(%rbp)
  jmp    L106
L329:
  mov    -0x1088(%rbp),%esi
  lea    -0x106c(%rbp),%rdi
  lea    -0x1070(%rbp),%rcx
  lea    -0x1074(%rbp),%rdx
  mov    -0x1040(%rbp),%rax
  mov    %rdi,%r8
  mov    %rax,%rdi
  call   <mar_getover@plt>
  cmpl   $0x0,-0x1060(%rbp)
  je     L338
  mov    -0x106c(%rbp),%ecx
  mov    -0x1070(%rbp),%edx
  mov    -0x1074(%rbp),%eax
  mov    %eax,%esi
  lea    D70(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L338:
  mov    -0x1070(%rbp),%eax
  imul   -0x1068(%rbp),%eax
  mov    %eax,%edx
  mov    -0x1074(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x1050(%rbp),%rax
  add    %rax,%rdx
  mov    -0x106c(%rbp),%eax
  mov    %eax,(%rdx)
  mov    -0x1088(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x1088(%rbp)
L106:
  mov    -0x1088(%rbp),%eax
  cmp    %eax,-0x1058(%rbp)
  jg     L329
  mov    -0x1040(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
L370:
  cmpl   $0x0,-0x1060(%rbp)
  je     L210
  mov    -0x1080(%rbp),%eax
  mov    %eax,%esi
  lea    D44(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L210
L322:
  movl   $0xffffffff,-0x1080(%rbp)
  jmp    L210
L278:
  nop
L210:
  cmpl   $0x0,-0x1060(%rbp)
  je     L378
  mov    -0x1080(%rbp),%ecx
  mov    -0x1064(%rbp),%edx
  mov    -0x1068(%rbp),%eax
  mov    %eax,%esi
  lea    D80(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L378:
  mov    -0x1080(%rbp),%eax
  test   %eax,%eax
  je     L265
  lea    -0x1088(%rbp),%rdx
  lea    -0x107c(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <dskbcr_@plt>
  jmp    L311
L265:
  lea    -0x1080(%rbp),%rdx
  lea    -0x107c(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <dskbcr_@plt>
L311:
  cmpl   $0x0,-0x1060(%rbp)
  je     L355
  mov    -0x1080(%rbp),%eax
  mov    %eax,%esi
  lea    D148(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L355:
  mov    -0x1080(%rbp),%eax
  test   %eax,%eax
  je     L293
  mov    -0x10b0(%rbp),%rax
  mov    (%rax),%rax
  test   %rax,%rax
  je     L64
  mov    -0x10b0(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,%rdi
  call   <free@plt>
L64:
  mov    -0x10a0(%rbp),%rax
  mov    (%rax),%rax
  test   %rax,%rax
  je     L359
  mov    -0x10a0(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,%rdi
  call   <free@plt>
L359:
  mov    -0x1080(%rbp),%eax
  jmp    L62
L293:
  mov    $0x0,%eax
L62:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L184
  call   <__stack_chk_fail@plt>
L184:
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: tag: D59
type_guessed: string
name: extract_symbolic_data
arguments: tag: D113
type_guessed: string
name: extract_symbolic_data
arguments: tag: D44
type_guessed: string
name: extract_symbolic_data
arguments: tag: D204
type_guessed: string
name: extract_symbolic_data
arguments: tag: D164
type_guessed: string
name: extract_symbolic_data
arguments: tag: D11
type_guessed: string
name: extract_symbolic_data
arguments: tag: D190
type_guessed: string
name: extract_symbolic_data
arguments: tag: D16
type_guessed: string
name: extract_symbolic_data
arguments: tag: D192
type_guessed: string
name: extract_symbolic_data
arguments: tag: D27
type_guessed: string
name: extract_symbolic_data
arguments: tag: D208
type_guessed: string
name: extract_symbolic_data
arguments: tag: D52
type_guessed: string
name: extract_symbolic_data
arguments: tag: D37
type_guessed: string
name: extract_symbolic_data
arguments: tag: D132
type_guessed: string
name: extract_symbolic_data
arguments: tag: D58
type_guessed: string
name: extract_symbolic_data
arguments: tag: D43
type_guessed: string
name: extract_symbolic_data
arguments: tag: D70
type_guessed: string
name: extract_symbolic_data
arguments: tag: D80
type_guessed: string
name: extract_symbolic_data
arguments: tag: D148
type_guessed: string

tool: D59: Opening file: %s


tool: D113: Reading header

tool: D44: Read Completion status : %d


tool: D204: This computer is little endian

tool: D164: This computer is big endian

tool: D11: Checking if mar image %d %d 


tool: D190: Read MAR Image Plate (%d x %d)


tool: D16: Number of overflow pixels %d


tool: D192: 2

tool: D27: DIM

tool: D208: %d

tool: D52: SIZE1

tool: D37: SIZE2

tool: D132: Updated Header        : 
%s<END


tool: D58: unsigned_short

tool: D43: TYPE

tool: D70: Overflow (%d,%d) : %d


tool: D80: Done reading MAR image (size %d x %d) (istat %d)


tool: D148: RDMAR completion status %d


assistant: ```c
int rdmar(char *filename, char **head, int *lhead, char **array, int *naxis, int *axis, int *type) {
  int readl;
  int i, j;
  int istat, cbo;
  char s[80];
  int lun = 1;
  int lflag;
  int is1, is2;
  int martest[512];
  char marhead[2000];
  int nover;
  int filec_debug = filec_getdebug();
  *array = 0;
  *head = 0;
  is1 = 0;
  is2 = 0;
  cbo = getbo();
  j = strlen(filename);
  if (filec_debug)
    printf("Opening file: %s\n", filename);
  dskbor_(&lun, filename, &j, &istat);
  if (istat != 0)
    return -1;
  lflag = (1 == 1);
  if (filec_debug)
    printf("Reading header\n");
  dskbwr_(&lun, &lflag);
  readl = 512;
  dskbr_(&lun, marhead, &readl, &istat);
  if (filec_debug)
    printf("Read Completion status : %d\n", istat);
  if (istat != 0)
    goto close;
  memcpy(martest, marhead, 8);
  if (filec_debug) {
    if (cbo == 0)
      printf("This computer is little endian\n");
    else
      printf("This computer is big endian\n");
  }
  if (cbo == 0)
    swpbyt(1, 8, (char *)martest);
  if (filec_debug)
    printf("Checking if mar image %d %d \n", *martest, *(martest + 1));
  if ((*martest == 2000 && *(martest + 1) == 2000) || (*martest == 1200 && *(martest + 1) == 1200)) {
    is1 = *martest;
    is2 = *(martest + 1);
    if (filec_debug)
      printf("Read MAR Image Plate (%d x %d)\n", is1, is2);
    readl = is1 * 2 - 512;
    dskbr_(&lun, marhead, &readl, &istat);
    nover = mar_getnover(marhead);
    if (filec_debug)
      printf("Number of overflow pixels %d\n", nover);
    *lhead = 4096;
    *head = malloc(4096);
    memset(*head, 0, 4096);
    clrhd(*head);
    mar_putheader(marhead, *head);
    *naxis = 2;
    axis[0] = is1;
    axis[1] = is2;
    puthd("DIM", "2", *head);
    sprintf(s, "%d", is1);
    puthd("SIZE1", s, *head);
    sprintf(s, "%d", is1);
    puthd("SIZE2", s, *head);
    if (filec_debug)
      printf("Updated Header        : \n%s<END\n", *head);
    if (nover <= 0) {
      unsigned int *data;
      *type = 4;
      puthd("TYPE", "unsigned_short", *head);
      readl = is1 * is2 * sizeof(unsigned short);
      data = malloc(readl);
      *array = (char *)data;
      dskbr_(&lun, (char *)data, &readl, &istat);
      if (cbo == 0)
        swpbyt(0, readl, (char *)data);
    } else {
      unsigned short *a;
      unsigned int *b;
      int x, y, val;
      int datal;
      int *data;
      *type = 5;
      datal = is1 * is2 * sizeof(int);
      data = malloc(datal);
      *array = (char *)data;
      readl = is1 * is2 * sizeof(unsigned short);
      a = (unsigned short *)data;
      dskbr_(&lun, (char *)a, &readl, &istat);
      if (cbo == 0)
        swpbyt(0, readl, (char *)a);
      j = is1 * is2 - 1;
      for (i = j; i >= 0; i--)
        data[i] = (int)a[i];
      readl = nover * sizeof(unsigned int) * 2;
      b = (unsigned int *)malloc(readl);
      dskbr_(&lun, (char *)b, &readl, &istat);
      if (cbo == 0)
        swpbyt(1, readl, (char *)b);
      for (i = 0; i < nover; i++) {
        mar_getover(b, i, &x, &y, &val);
        if (filec_debug)
          printf("Overflow (%d,%d) : %d\n", x, y, val);
        data[y * is1 + x] = val;
      }
      free((char *)b);
    }
    if (filec_debug)
      printf("Read Completion status : %d\n", istat);
  } else
    istat = -1;
close:
  if (filec_debug)
    printf("Done reading MAR image (size %d x %d) (istat %d)\n", is1, is2, istat);
  if (istat != 0)
    dskbcr_(&lun, &i);
  else
    dskbcr_(&lun, &istat);
  if (filec_debug)
    printf("RDMAR completion status %d\n", istat);
  if (istat != 0) {
    if (*array != 0)
      free(*array);
    if (*head != 0)
      free(*head);
    return istat;
  } else
    return 0;
}
```