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

```asm
<gen_med_open_esmf_calls>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rdi,%rbx
  mov    $0x1,%ebp
  lea    D78(%rip),%r15
  lea    D34(%rip),%r14
  lea    D59(%rip),%r13
  lea    D144(%rip),%r12
L4:
  mov    %ebp,%edx
  mov    %r15,%rsi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  mov    %rbx,%rcx
  mov    $0x2e,%edx
  mov    $0x1,%esi
  mov    %r14,%rdi
  call   <fwrite@plt>
  lea    -0x1(%rbp),%edx
  mov    %r13,%rsi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  mov    %ebp,%edx
  mov    %r12,%rsi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  mov    %ebp,%ecx
  mov    %ebp,%edx
  lea    D152(%rip),%rsi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  mov    %ebp,%edx
  lea    D117(%rip),%rsi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  mov    %rbx,%rcx
  mov    $0x1a,%edx
  mov    $0x1,%esi
  lea    D95(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbx,%rcx
  mov    $0x6,%edx
  mov    $0x1,%esi
  lea    D28(%rip),%rdi
  call   <fwrite@plt>
  add    $0x1,%ebp
  cmp    $0xc,%ebp
  jne    L4
  mov    $0x1,%ebp
  lea    D6(%rip),%r15
  lea    D34(%rip),%r14
  lea    D13(%rip),%r13
  lea    D133(%rip),%r12
L3:
  mov    %ebp,%edx
  mov    %r15,%rsi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  mov    %rbx,%rcx
  mov    $0x2e,%edx
  mov    $0x1,%esi
  mov    %r14,%rdi
  call   <fwrite@plt>
  lea    -0x1(%rbp),%edx
  mov    %r13,%rsi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  mov    %ebp,%edx
  mov    %r12,%rsi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  mov    %ebp,%ecx
  mov    %ebp,%edx
  lea    D148(%rip),%rsi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  mov    %ebp,%edx
  lea    D93(%rip),%rsi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  mov    %rbx,%rcx
  mov    $0x1a,%edx
  mov    $0x1,%esi
  lea    D95(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbx,%rcx
  mov    $0x6,%edx
  mov    $0x1,%esi
  lea    D28(%rip),%rdi
  call   <fwrite@plt>
  add    $0x1,%ebp
  cmp    $0xc,%ebp
  jne    L3
  mov    $0x0,%eax
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: read_data
arguments: data_tag: D78
type_infered: string
name: read_data
arguments: data_tag: D34
type_infered: string
name: read_data
arguments: data_tag: D59
type_infered: string
name: read_data
arguments: data_tag: D144
type_infered: string
name: read_data
arguments: data_tag: D152
type_infered: string
name: read_data
arguments: data_tag: D117
type_infered: string
name: read_data
arguments: data_tag: D95
type_infered: string
name: read_data
arguments: data_tag: D28
type_infered: string
name: read_data
arguments: data_tag: D6
type_infered: string
name: read_data
arguments: data_tag: D13
type_infered: string
name: read_data
arguments: data_tag: D133
type_infered: string
name: read_data
arguments: data_tag: D148
type_infered: string
name: read_data
arguments: data_tag: D93
type_infered: string

tool: D78: CALL nl_get_io_form_auxinput%d( 1, io_form )


tool: D34: IF ( use_package( io_form ) == IO_ESMF ) THEN


tool: D59:   stream = first_auxinput + %d


tool: D144:   CALL open_aux_u( grid, config_flags, stream, AUXINPUT%d_ALARM,       &


tool: D152:                    config_flags%%auxinput%d_inname, grid%%auxinput%d_oid, &


tool: D117:                    input_auxinput%d, ierr )


tool: D95:   IF ( ierr /= 0 ) RETURN


tool: D28: ENDIF


tool: D6: CALL nl_get_io_form_auxhist%d( 1, io_form )


tool: D13:   stream = first_auxhist + %d


tool: D133:   CALL open_hist_w( grid, config_flags, stream, AUXHIST%d_ALARM,       &


tool: D148:                     config_flags%%auxhist%d_outname, grid%%auxhist%d_oid, &


tool: D93:                     output_auxhist%d, fname, n2, ierr )


assistant: ```c
gen_med_open_esmf_calls(FILE *fp) {
  int i;
  for (i = 1; i < 12; i++) {
    fprintf(fp, "CALL nl_get_io_form_auxinput%d( 1, io_form )\n", i);
    fprintf(fp, "IF ( use_package( io_form ) == IO_ESMF ) THEN\n");
    fprintf(fp, "  stream = first_auxinput + %d\n", i - 1);
    fprintf(fp, "  CALL open_aux_u( grid, config_flags, stream, AUXINPUT%d_ALARM,       &\n", i);
    fprintf(fp, "                   config_flags%%auxinput%d_inname, grid%%auxinput%d_oid, &\n", i, i);
    fprintf(fp, "                   input_auxinput%d, ierr )\n", i);
    fprintf(fp, "  IF ( ierr /= 0 ) RETURN\n");
    fprintf(fp, "ENDIF\n");
  }
  for (i = 1; i < 12; i++) {
    fprintf(fp, "CALL nl_get_io_form_auxhist%d( 1, io_form )\n", i);
    fprintf(fp, "IF ( use_package( io_form ) == IO_ESMF ) THEN\n");
    fprintf(fp, "  stream = first_auxhist + %d\n", i - 1);
    fprintf(fp, "  CALL open_hist_w( grid, config_flags, stream, AUXHIST%d_ALARM,       &\n", i);
    fprintf(fp, "                    config_flags%%auxhist%d_outname, grid%%auxhist%d_oid, &\n", i, i);
    fprintf(fp, "                    output_auxhist%d, fname, n2, ierr )\n", i);
    fprintf(fp, "  IF ( ierr /= 0 ) RETURN\n");
    fprintf(fp, "ENDIF\n");
  }
  return 0;
}
```