user: 请从给定的汇编指令推导出C源代码：

```asm
<gen_set_timekeeping_defs>:
  endbr64
  push   %r15
  lea    D21(%rip),%r15
  push   %r14
  xor    %r14d,%r14d
  push   %r13
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  lea    0x3(%rsp),%rbx
  jmp    L39
  nopl   0x0(%rax)
L24:
  cmp    $0xc,%r14d
  lea    D138(%rip),%r12
  lea    D126(%rip),%rax
  movb   $0x0,0x3(%rsp)
  cmovl  %rax,%r12
  lea    D60(%rip),%r13
L25:
  mov    %rbx,%r8
  mov    %r12,%rcx
  mov    %r13,%rdx
  lea    D12(%rip),%rsi
  mov    %rbp,%rdi
  add    $0x1,%r14d
  call   <fprintf@plt>
  mov    %rbx,%r8
  mov    %r12,%rcx
  mov    %r13,%rdx
  lea    D46(%rip),%rsi
  mov    %rbp,%rdi
  call   <fprintf@plt>
  mov    %rbx,%r8
  mov    %r12,%rcx
  mov    %r13,%rdx
  lea    D114(%rip),%rsi
  mov    %rbp,%rdi
  call   <fprintf@plt>
  mov    %rbx,%r8
  mov    %r12,%rcx
  mov    %r13,%rdx
  lea    D232(%rip),%rsi
  mov    %rbp,%rdi
  call   <fprintf@plt>
  mov    %rbx,%r8
  mov    %r12,%rcx
  mov    %r13,%rdx
  lea    D185(%rip),%rsi
  mov    %rbp,%rdi
  call   <fprintf@plt>
  mov    %rbx,%r8
  mov    %r12,%rcx
  mov    %r13,%rdx
  lea    D73(%rip),%rsi
  mov    %rbp,%rdi
  call   <fprintf@plt>
  mov    %rbx,%r8
  mov    %r12,%rcx
  mov    %r13,%rdx
  lea    D49(%rip),%rsi
  mov    %rbp,%rdi
  call   <fprintf@plt>
  mov    %rbx,%r8
  mov    %r12,%rcx
  mov    %r13,%rdx
  lea    D35(%rip),%rsi
  mov    %rbp,%rdi
  call   <fprintf@plt>
  mov    %rbx,%r8
  mov    %r12,%rcx
  mov    %r13,%rdx
  lea    D71(%rip),%rsi
  mov    %rbp,%rdi
  call   <fprintf@plt>
  mov    %rbx,%r8
  mov    %r12,%rcx
  mov    %r13,%rdx
  lea    D70(%rip),%rsi
  mov    %rbp,%rdi
  call   <fprintf@plt>
  mov    %rbx,%r8
  mov    %r12,%rcx
  mov    %r13,%rdx
  lea    D137(%rip),%rsi
  mov    %rbp,%rdi
  call   <fprintf@plt>
  mov    %rbx,%r8
  mov    %r12,%rcx
  mov    %r13,%rdx
  lea    D47(%rip),%rsi
  mov    %rbp,%rdi
  call   <fprintf@plt>
  mov    %rbx,%r8
  mov    %r12,%rcx
  mov    %r13,%rdx
  lea    D223(%rip),%rsi
  mov    %rbp,%rdi
  call   <fprintf@plt>
  mov    %rbx,%r8
  mov    %r12,%rcx
  mov    %r13,%rdx
  mov    %r15,%rsi
  mov    %rbp,%rdi
  call   <fprintf@plt>
  mov    %rbx,%r8
  mov    %r12,%rcx
  mov    %r13,%rdx
  lea    D144(%rip),%rsi
  mov    %rbp,%rdi
  call   <fprintf@plt>
  mov    %rbx,%r8
  mov    %r12,%rcx
  mov    %r13,%rdx
  lea    D236(%rip),%rsi
  mov    %rbp,%rdi
  call   <fprintf@plt>
  mov    %rbx,%r8
  mov    %r12,%rcx
  mov    %r13,%rdx
  lea    D141(%rip),%rsi
  mov    %rbp,%rdi
  call   <fprintf@plt>
  cmp    $0x18,%r14d
  je     L15
L39:
  mov    $0xaaaaaaab,%eax
  mov    %r14d,%edx
  imul   %rax,%rdx
  shr    $0x23,%rdx
  lea    (%rdx,%rdx,2),%eax
  mov    %r14d,%edx
  shl    $0x2,%eax
  sub    %eax,%edx
  je     L24
  lea    D62(%rip),%rsi
  mov    %rbx,%rdi
  lea    D20(%rip),%r12
  call   <sprintf@plt>
  cmp    $0xc,%r14d
  lea    D126(%rip),%rax
  lea    D51(%rip),%r13
  cmovl  %rax,%r12
  jmp    L25
  nopw   0x0(%rax,%rax,1)
L15:
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L18
  add    $0x18,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L18:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_label: D21
type_guessed: string
name: retrieve_data
arguments: data_label: D138
type_guessed: string
name: retrieve_data
arguments: data_label: D126
type_guessed: string
name: retrieve_data
arguments: data_label: D60
type_guessed: string
name: retrieve_data
arguments: data_label: D12
type_guessed: string
name: retrieve_data
arguments: data_label: D46
type_guessed: string
name: retrieve_data
arguments: data_label: D114
type_guessed: string
name: retrieve_data
arguments: data_label: D232
type_guessed: string
name: retrieve_data
arguments: data_label: D185
type_guessed: string
name: retrieve_data
arguments: data_label: D73
type_guessed: string
name: retrieve_data
arguments: data_label: D49
type_guessed: string
name: retrieve_data
arguments: data_label: D35
type_guessed: string
name: retrieve_data
arguments: data_label: D71
type_guessed: string
name: retrieve_data
arguments: data_label: D70
type_guessed: string
name: retrieve_data
arguments: data_label: D137
type_guessed: string
name: retrieve_data
arguments: data_label: D47
type_guessed: string
name: retrieve_data
arguments: data_label: D223
type_guessed: string
name: retrieve_data
arguments: data_label: D144
type_guessed: string
name: retrieve_data
arguments: data_label: D236
type_guessed: string
name: retrieve_data
arguments: data_label: D141
type_guessed: string
name: retrieve_data
arguments: data_label: D62
type_guessed: string
name: retrieve_data
arguments: data_label: D20
type_guessed: string
name: retrieve_data
arguments: data_label: D51
type_guessed: string

tool: D21:             %s%s%s_end_d,      &


tool: D138: history

tool: D126: input

tool: 

tool: D12:  INTEGER :: %s%s%s_interval  , &


tool: D46:             %s%s%s_interval_d, &


tool: D114:             %s%s%s_interval_h, &


tool: D232:             %s%s%s_interval_m, &


tool: D185:             %s%s%s_interval_s   


tool: D73:  INTEGER :: %s%s%s_begin  ,    &


tool: D49:             %s%s%s_begin_y,    &


tool: D35:             %s%s%s_begin_d,    &


tool: D71:             %s%s%s_begin_h,    &


tool: D70:             %s%s%s_begin_m,    &


tool: D137:             %s%s%s_begin_s      


tool: D47:  INTEGER :: %s%s%s_end  ,      &


tool: D223:             %s%s%s_end_y,      &


tool: D144:             %s%s%s_end_h,      &


tool: D236:             %s%s%s_end_m,      &


tool: D141:             %s%s%s_end_s        


tool: D62: %d

tool: D20: hist

tool: D51: aux

assistant: ```c
int gen_set_timekeeping_defs(FILE *fp) {
  char *aux, *streamtype, streamno[5];
  int i;
  for (i = 0; i < 2 * 12; i++) {
    if (i % 12 == 0) {
      aux = "";
      streamno[0] = '\0';
    } else {
      aux = "aux";
      sprintf(streamno, "%d", i % 12);
    }
    if (i < 12) {
      streamtype = "input";
    } else {
      streamtype = (i % 12 == 0) ? "history" : "hist";
    }
    fprintf(fp, " INTEGER :: %s%s%s_interval  , &\n", aux, streamtype, streamno);
    fprintf(fp, "            %s%s%s_interval_d, &\n", aux, streamtype, streamno);
    fprintf(fp, "            %s%s%s_interval_h, &\n", aux, streamtype, streamno);
    fprintf(fp, "            %s%s%s_interval_m, &\n", aux, streamtype, streamno);
    fprintf(fp, "            %s%s%s_interval_s   \n", aux, streamtype, streamno);
    fprintf(fp, " INTEGER :: %s%s%s_begin  ,    &\n", aux, streamtype, streamno);
    fprintf(fp, "            %s%s%s_begin_y,    &\n", aux, streamtype, streamno);
    fprintf(fp, "            %s%s%s_begin_d,    &\n", aux, streamtype, streamno);
    fprintf(fp, "            %s%s%s_begin_h,    &\n", aux, streamtype, streamno);
    fprintf(fp, "            %s%s%s_begin_m,    &\n", aux, streamtype, streamno);
    fprintf(fp, "            %s%s%s_begin_s      \n", aux, streamtype, streamno);
    fprintf(fp, " INTEGER :: %s%s%s_end  ,      &\n", aux, streamtype, streamno);
    fprintf(fp, "            %s%s%s_end_y,      &\n", aux, streamtype, streamno);
    fprintf(fp, "            %s%s%s_end_d,      &\n", aux, streamtype, streamno);
    fprintf(fp, "            %s%s%s_end_h,      &\n", aux, streamtype, streamno);
    fprintf(fp, "            %s%s%s_end_m,      &\n", aux, streamtype, streamno);
    fprintf(fp, "            %s%s%s_end_s        \n", aux, streamtype, streamno);
  }
  return 0;
}
```