user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<wrfile>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xf8,%rsp
  mov    %rdi,0x8(%rsp)
  mov    %rsi,%rbp
  mov    %rdx,0x18(%rsp)
  mov    %ecx,0x10(%rsp)
  mov    %r8,%r14
  mov    %r9d,0x4(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0xe8(%rsp)
  xor    %eax,%eax
  call   <filec_getdebug@plt>
  mov    %eax,0x14(%rsp)
  test   %eax,%eax
  jne    L693
L313:
  movl   $0x1,0x3c(%rsp)
  mov    0x10(%rsp),%eax
  test   %eax,%eax
  jle    L340
  lea    0x1(%rax),%r15d
  mov    $0x1,%ebx
  lea    0x90(%rsp),%r12
  jmp    L680
L693:
  mov    0x8(%rsp),%rsi
  lea    D380(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    %rbp,%rsi
  lea    D195(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    0x10(%rsp),%ebx
  mov    %ebx,%esi
  lea    D517(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    %ebx,%eax
  test   %ebx,%ebx
  jle    L365
  mov    %r14,%rbx
  lea    -0x1(%rax),%eax
  lea    0x4(%r14,%rax,4),%r13
  lea    D618(%rip),%r12
L563:
  mov    (%rbx),%esi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  add    $0x4,%rbx
  cmp    %r13,%rbx
  jne    L563
L365:
  mov    0x4(%rsp),%ebx
  mov    %ebx,%esi
  lea    D318(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  cmp    $0x1,%ebx
  je     L290
  mov    0x4(%rsp),%eax
  cmp    $0x8,%eax
  ja     L313
  mov    %eax,%eax
  lea    D570(%rip),%rdx
  movslq (%rdx,%rax,4),%rax
  add    %rdx,%rax
  notrack jmp *%rax
L290:
  lea    D587(%rip),%rdi
  call   <puts@plt>
  jmp    L313
  lea    D241(%rip),%rdi
  call   <puts@plt>
  jmp    L313
  lea    D364(%rip),%rdi
  call   <puts@plt>
  jmp    L313
  lea    D131(%rip),%rdi
  call   <puts@plt>
  jmp    L313
  lea    D416(%rip),%rdi
  call   <puts@plt>
  jmp    L313
  lea    D89(%rip),%rdi
  call   <puts@plt>
  jmp    L313
  lea    D400(%rip),%rdi
  call   <puts@plt>
  jmp    L313
  lea    D43(%rip),%rdi
  call   <puts@plt>
  jmp    L313
L394:
  mov    -0x4(%r14,%rbx,4),%edx
  lea    0x40(%rsp),%r13
  lea    D291(%rip),%rsi
  mov    %r13,%rdi
  call   <sprintf@plt>
  mov    %rbp,%rdx
  mov    %r13,%rsi
  mov    %r12,%rdi
  call   <puthd@plt>
L341:
  add    $0x1,%rbx
  cmp    %rbx,%r15
  je     L340
L680:
  mov    0x3c(%rsp),%eax
  imul   -0x4(%r14,%rbx,4),%eax
  mov    %eax,0x3c(%rsp)
  mov    %ebx,%edx
  lea    D426(%rip),%rsi
  mov    %r12,%rdi
  call   <sprintf@plt>
  lea    0x40(%rsp),%rsi
  mov    %rbp,%rdx
  mov    %r12,%rdi
  call   <gethd@plt>
  cmpb   $0x0,0x40(%rsp)
  je     L394
  lea    0x30(%rsp),%rdx
  lea    0x40(%rsp),%rdi
  lea    D98(%rip),%rsi
  call   <sscanf@plt>
  cmp    $0x1,%eax
  jne    L394
  mov    0x30(%rsp),%eax
  cmp    %eax,-0x4(%r14,%rbx,4)
  jne    L394
  jmp    L341
L340:
  lea    0x40(%rsp),%rbx
  mov    %rbp,%rdx
  mov    %rbx,%rsi
  lea    D37(%rip),%rdi
  call   <gethd@plt>
  lea    0x30(%rsp),%rdx
  lea    D98(%rip),%rsi
  mov    %rbx,%rdi
  call   <sscanf@plt>
  cmp    $0x1,%eax
  jne    L546
  mov    0x10(%rsp),%eax
  cmp    %eax,0x30(%rsp)
  je     L468
L546:
  lea    0x40(%rsp),%rbx
  mov    0x10(%rsp),%edx
  lea    D98(%rip),%rsi
  mov    %rbx,%rdi
  call   <sprintf@plt>
  mov    %rbp,%rdx
  mov    %rbx,%rsi
  lea    D37(%rip),%rdi
  call   <puthd@plt>
L468:
  lea    0x40(%rsp),%rsi
  mov    %rbp,%rdx
  lea    D158(%rip),%rdi
  call   <gethd@plt>
  cmpl   $0x1,0x4(%rsp)
  je     L275
  cmpl   $0x2,0x4(%rsp)
  je     L433
  cmpl   $0x3,0x4(%rsp)
  je     L636
L339:
  cmpl   $0x4,0x4(%rsp)
  je     L186
L133:
  cmpl   $0x5,0x4(%rsp)
  je     L519
L122:
  cmpl   $0x6,0x4(%rsp)
  je     L153
L268:
  cmpl   $0x7,0x4(%rsp)
  je     L181
L15:
  cmpl   $0x8,0x4(%rsp)
  je     L574
L736:
  cmpl   $0x9,0x4(%rsp)
  je     L439
L375:
  cmpl   $0xa,0x4(%rsp)
  je     L588
L179:
  lea    0x40(%rsp),%rsi
  mov    %rbp,%rdx
  lea    D595(%rip),%rdi
  call   <gethd@plt>
  mov    $0x0,%eax
  call   <getbo@plt>
  test   %eax,%eax
  jne    L715
  lea    0x40(%rsp),%rdi
  lea    D128(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L689
L715:
  mov    $0x0,%eax
  call   <getbo@plt>
  cmp    $0x1,%eax
  je     L305
L286:
  movl   $0x0,0x2c(%rsp)
  mov    0x4(%rsp),%eax
  cmp    $0x1,%eax
  je     L488
  sub    $0x3,%eax
  cmp    $0x7,%eax
  ja     L488
  mov    %eax,%eax
  lea    D331(%rip),%rdx
  movslq (%rdx,%rax,4),%rax
  add    %rdx,%rax
  notrack jmp *%rax
L275:
  lea    0x40(%rsp),%rdi
  lea    D339(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L339
  mov    %rbp,%rdx
  lea    D339(%rip),%rsi
  lea    D158(%rip),%rdi
  call   <puthd@plt>
  jmp    L179
L433:
  lea    0x40(%rsp),%rdi
  lea    D564(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L133
  mov    %rbp,%rdx
  lea    D564(%rip),%rsi
  lea    D158(%rip),%rdi
  call   <puthd@plt>
  jmp    L179
L636:
  lea    0x40(%rsp),%rdi
  lea    D110(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L122
  mov    %rbp,%rdx
  lea    D110(%rip),%rsi
  lea    D158(%rip),%rdi
  call   <puthd@plt>
  jmp    L179
L186:
  lea    0x40(%rsp),%rdi
  lea    D23(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L268
  mov    %rbp,%rdx
  lea    D23(%rip),%rsi
  lea    D158(%rip),%rdi
  call   <puthd@plt>
  jmp    L179
L519:
  lea    0x40(%rsp),%rdi
  lea    D143(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L15
  mov    %rbp,%rdx
  lea    D143(%rip),%rsi
  lea    D158(%rip),%rdi
  call   <puthd@plt>
  jmp    L179
L153:
  lea    0x40(%rsp),%rdi
  lea    D119(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L736
  mov    %rbp,%rdx
  lea    D119(%rip),%rsi
  lea    D158(%rip),%rdi
  call   <puthd@plt>
  jmp    L179
L181:
  lea    0x40(%rsp),%rdi
  lea    D9(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L375
  mov    %rbp,%rdx
  lea    D9(%rip),%rsi
  lea    D158(%rip),%rdi
  call   <puthd@plt>
  jmp    L179
L574:
  lea    0x40(%rsp),%rdi
  lea    D508(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L179
  mov    %rbp,%rdx
  lea    D508(%rip),%rsi
  lea    D158(%rip),%rdi
  call   <puthd@plt>
  jmp    L179
L439:
  lea    0x40(%rsp),%rdi
  lea    D255(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L179
  mov    %rbp,%rdx
  lea    D9(%rip),%rsi
  lea    D158(%rip),%rdi
  call   <puthd@plt>
  jmp    L179
L588:
  lea    0x40(%rsp),%rdi
  lea    D162(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L179
  mov    %rbp,%rdx
  lea    D508(%rip),%rsi
  lea    D158(%rip),%rdi
  call   <puthd@plt>
  jmp    L179
L689:
  mov    %rbp,%rdx
  lea    D128(%rip),%rsi
  lea    D595(%rip),%rdi
  call   <puthd@plt>
  jmp    L286
L305:
  lea    0x40(%rsp),%rdi
  lea    D516(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L286
  mov    %rbp,%rdx
  lea    D516(%rip),%rsi
  lea    D595(%rip),%rdi
  call   <puthd@plt>
  jmp    L286
  shll   0x3c(%rsp)
L488:
  mov    $0x200,%esi
  mov    %rbp,%rdi
  call   <padhd@plt>
  lea    0x34(%rsp),%rdi
  mov    %rbp,%rsi
  call   <gethdl@plt>
  mov    0x3c(%rsp),%eax
  add    0x34(%rsp),%eax
  mov    %eax,0x20(%rsp)
  cmpl   $0x0,0x14(%rsp)
  jne    L27
  movl   $0x1,0x24(%rsp)
L695:
  mov    0x8(%rsp),%rbx
  mov    %rbx,%rdi
  call   <strlen@plt>
  mov    %eax,0x38(%rsp)
  lea    0x20(%rsp),%rcx
  lea    0x38(%rsp),%rdx
  lea    0x24(%rsp),%rdi
  lea    0x2c(%rsp),%r8
  mov    %rbx,%rsi
  call   <dskbow_@plt>
  mov    0x2c(%rsp),%eax
  test   %eax,%eax
  je     L641
L473:
  mov    0xe8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L35
  add    $0xf8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  shll   0x3c(%rsp)
  jmp    L488
  shll   $0x2,0x3c(%rsp)
  jmp    L488
  shll   $0x2,0x3c(%rsp)
  jmp    L488
  shll   $0x2,0x3c(%rsp)
  jmp    L488
  shll   $0x3,0x3c(%rsp)
  jmp    L488
  shll   $0x3,0x3c(%rsp)
  jmp    L488
  shll   $0x4,0x3c(%rsp)
  jmp    L488
L27:
  mov    %rbp,%rsi
  lea    D139(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movl   $0x1,0x24(%rsp)
  mov    0x8(%rsp),%rsi
  lea    D556(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L695
L641:
  movl   $0x0,0x28(%rsp)
  lea    0x28(%rsp),%rsi
  lea    0x24(%rsp),%rbx
  mov    %rbx,%rdi
  call   <dskbww_@plt>
  lea    0x2c(%rsp),%rcx
  lea    0x34(%rsp),%rdx
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <dskbw_@plt>
  cmpl   $0x0,0x2c(%rsp)
  je     L682
L73:
  lea    0x2c(%rsp),%rsi
  lea    0x24(%rsp),%rdi
  call   <dskbcw_@plt>
  mov    0x2c(%rsp),%eax
  jmp    L473
L682:
  lea    0x2c(%rsp),%rcx
  lea    0x3c(%rsp),%rdx
  mov    %rbx,%rdi
  mov    0x18(%rsp),%rsi
  call   <dskbw_@plt>
  cmpl   $0x0,0x2c(%rsp)
  jne    L73
  movl   $0x1,0x28(%rsp)
  lea    0x28(%rsp),%rsi
  mov    %rbx,%rdi
  call   <dskbww_@plt>
  jmp    L73
L35:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_tag: D380
type_guessed: string
name: disassemble_data
arguments: data_tag: D195
type_guessed: string
name: disassemble_data
arguments: data_tag: D517
type_guessed: string
name: disassemble_data
arguments: data_tag: D618
type_guessed: string
name: disassemble_data
arguments: data_tag: D318
type_guessed: string
name: disassemble_data
arguments: data_tag: D587
type_guessed: string
name: disassemble_data
arguments: data_tag: D241
type_guessed: string
name: disassemble_data
arguments: data_tag: D364
type_guessed: string
name: disassemble_data
arguments: data_tag: D131
type_guessed: string
name: disassemble_data
arguments: data_tag: D416
type_guessed: string
name: disassemble_data
arguments: data_tag: D89
type_guessed: string
name: disassemble_data
arguments: data_tag: D400
type_guessed: string
name: disassemble_data
arguments: data_tag: D43
type_guessed: string
name: disassemble_data
arguments: data_tag: D291
type_guessed: string
name: disassemble_data
arguments: data_tag: D426
type_guessed: string
name: disassemble_data
arguments: data_tag: D98
type_guessed: string
name: disassemble_data
arguments: data_tag: D37
type_guessed: string
name: disassemble_data
arguments: data_tag: D158
type_guessed: string
name: disassemble_data
arguments: data_tag: D595
type_guessed: string
name: disassemble_data
arguments: data_tag: D128
type_guessed: string
name: disassemble_data
arguments: data_tag: D339
type_guessed: string
name: disassemble_data
arguments: data_tag: D564
type_guessed: string
name: disassemble_data
arguments: data_tag: D110
type_guessed: string
name: disassemble_data
arguments: data_tag: D23
type_guessed: string
name: disassemble_data
arguments: data_tag: D143
type_guessed: string
name: disassemble_data
arguments: data_tag: D119
type_guessed: string
name: disassemble_data
arguments: data_tag: D9
type_guessed: string
name: disassemble_data
arguments: data_tag: D508
type_guessed: string
name: disassemble_data
arguments: data_tag: D255
type_guessed: string
name: disassemble_data
arguments: data_tag: D162
type_guessed: string
name: disassemble_data
arguments: data_tag: D516
type_guessed: string
name: disassemble_data
arguments: data_tag: D139
type_guessed: string
name: disassemble_data
arguments: data_tag: D556
type_guessed: string

tool: D380: Filename      : %s


tool: D195: Header        : 
%s<END


tool: D517: Array dim     : %d


tool: D618:               : %d


tool: D318: Type          : %d

tool: D587:  (signed_byte)

tool: D241:  (unsigned_byte)

tool: D364:  (signed_short)

tool: D131:  (unsigned_short)

tool: D416:  (signed_long)

tool: D89:  (unsigned_long)

tool: D400:  (float)

tool: D43:  (double)

tool: D291: %4d

tool: D426: SIZE%d

tool: D98: %d

tool: D37: DIM

tool: D158: TYPE

tool: D595: BYTE_ORDER

tool: D128: little_endian

tool: D339: signed_byte

tool: D564: unsigned_byte

tool: D110: signed_short

tool: D23: unsigned_short

tool: D143: signed_long

tool: D119: unsigned_long

tool: D9: float

tool: D508: double

tool: D255: complex

tool: D162: double_complex

tool: D516: big_endian

tool: D139: Updated Header        : 
%s<END


tool: D556: Opening file : %s


assistant: ```c
int wrfile(char *filename, char *head, char *array, int naxis, int *axis, int type) {
  int size, lun;
  int lflag;
  int istat;
  char s[80], s1[80];
  int t;
  int headl, j, i;
  int as;
  int filec_debug = filec_getdebug();
  if (filec_debug) {
    printf("Filename      : %s\n", filename);
    printf("Header        : \n%s<END\n", head);
    printf("Array dim     : %d\n", naxis);
    for (i = 0; i < naxis; i++)
      printf("              : %d\n", axis[i]);
    printf("Type          : %d", type);
    if (type == 1)
      printf(" (signed_byte)\n");
    else if (type == 2)
      printf(" (unsigned_byte)\n");
    else if (type == 3)
      printf(" (signed_short)\n");
    else if (type == 4)
      printf(" (unsigned_short)\n");
    else if (type == 5)
      printf(" (signed_long)\n");
    else if (type == 6)
      printf(" (unsigned_long)\n");
    else if (type == 7)
      printf(" (float)\n");
    else if (type == 8)
      printf(" (double)\n");
  }
  as = 1;
  for (i = 0; i < naxis; i++) {
    as *= axis[i];
    sprintf(s1, "SIZE%d", i + 1);
    gethd(s1, s, head);
    if (*s == 0 || sscanf(s, "%d", &t) != 1 || t != axis[i]) {
      sprintf(s, "%4d", axis[i]);
      puthd(s1, s, head);
    }
  }
  gethd("DIM", s, head);
  if (sscanf(s, "%d", &t) != 1 || t != naxis) {
    sprintf(s, "%d", naxis);
    puthd("DIM", s, head);
  }
  gethd("TYPE", s, head);
  if (type == 1 && strcmp(s, "signed_byte"))
    puthd("TYPE", "signed_byte", head);
  else if (type == 2 && strcmp(s, "unsigned_byte"))
    puthd("TYPE", "unsigned_byte", head);
  else if (type == 3 && strcmp(s, "signed_short"))
    puthd("TYPE", "signed_short", head);
  else if (type == 4 && strcmp(s, "unsigned_short"))
    puthd("TYPE", "unsigned_short", head);
  else if (type == 5 && strcmp(s, "signed_long"))
    puthd("TYPE", "signed_long", head);
  else if (type == 6 && strcmp(s, "unsigned_long"))
    puthd("TYPE", "unsigned_long", head);
  else if (type == 7 && strcmp(s, "float"))
    puthd("TYPE", "float", head);
  else if (type == 8 && strcmp(s, "double"))
    puthd("TYPE", "double", head);
  else if (type == 9 && strcmp(s, "complex"))
    puthd("TYPE", "float", head);
  else if (type == 10 && strcmp(s, "double_complex"))
    puthd("TYPE", "double", head);
  gethd("BYTE_ORDER", s, head);
  if (getbo() == 0 && strcmp(s, "little_endian") != 0)
    puthd("BYTE_ORDER", "little_endian", head);
  else if (getbo() == 1 && strcmp(s, "big_endian") != 0)
    puthd("BYTE_ORDER", "big_endian", head);
  istat = 0;
  if (type == 1)
    as *= sizeof(char);
  else if (type == 2)
    as *= sizeof(unsigned char);
  else if (type == 3)
    as *= sizeof(short);
  else if (type == 4)
    as *= sizeof(unsigned short);
  else if (type == 5)
    as *= sizeof(int);
  else if (type == 6)
    as *= sizeof(unsigned int);
  else if (type == 7)
    as *= sizeof(float);
  else if (type == 8)
    as *= sizeof(double);
  else if (type == 9)
    as *= 2 * sizeof(float);
  else if (type == 10)
    as *= 2 * sizeof(double);
  padhd(head, 512);
  gethdl(&headl, head);
  size = headl + as;
  if (filec_debug)
    printf("Updated Header        : \n%s<END\n", head);
  lun = 1;
  if (filec_debug)
    printf("Opening file : %s\n", filename);
  j = strlen(filename);
  dskbow_(&lun, filename, &j, &size, &istat);
  if (istat != 0)
    return (istat);
  lflag = (1 == 0);
  dskbww_(&lun, &lflag);
  dskbw_(&lun, head, &headl, &istat);
  if (istat != 0)
    goto close;
  dskbw_(&lun, (char *)array, &as, &istat);
  if (istat != 0)
    goto close;
  lflag = (1 == 1);
  dskbww_(&lun, &lflag);
close:
  dskbcw_(&lun, &istat);
  return (istat);
}
```