user: Converte this assembly snippet into its equivalent C code:

```asm
<f_set_ftime1>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x240,%rsp
  mov    %edi,-0x234(%rbp)
  mov    %rsi,-0x240(%rbp)
  mov    %rdx,-0x248(%rbp)
  mov    %ecx,-0x238(%rbp)
  mov    %r8,-0x250(%rbp)
  mov    %r9,-0x258(%rbp)
  mov    0x10(%rbp),%rax
  mov    %rax,-0x260(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x28(%rbp)
  xor    %eax,%eax
  cmpl   $0x0,-0x234(%rbp)
  jns    L197
  mov    $0x0,%eax
  jmp    L196
L197:
  mov    -0x240(%rbp),%rax
  mov    %rax,%rdi
  call   <code_table_4_4_location@plt>
  mov    %rax,-0x1e0(%rbp)
  cmpq   $0x0,-0x1e0(%rbp)
  jne    L228
  lea    D61(%rip),%rax
  mov    %rax,%rsi
  lea    D19(%rip),%rax
  mov    %rax,%rdi
  call   <fatal_error@plt>
L228:
  mov    -0x240(%rbp),%rax
  add    $0x20,%rax
  mov    (%rax),%rax
  add    $0x7,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0x8,%eax
  mov    %eax,%edx
  mov    -0x240(%rbp),%rax
  add    $0x20,%rax
  mov    (%rax),%rax
  add    $0x8,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  add    %edx,%eax
  mov    %eax,-0x1ec(%rbp)
  mov    -0x1e0(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,-0x1e8(%rbp)
  mov    -0x1e0(%rbp),%rax
  add    $0x1,%rax
  mov    %rax,%rdi
  call   <int4@plt>
  mov    %eax,-0x1e4(%rbp)
  mov    -0x240(%rbp),%rax
  mov    %rax,%rdi
  call   <stat_proc_verf_time_location@plt>
  mov    %rax,-0x1d8(%rbp)
  movl   $0x0,-0x22c(%rbp)
  movl   $0xffffffff,-0x1f0(%rbp)
  mov    -0x260(%rbp),%rax
  lea    D37(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L229
  movl   $0x0,-0x22c(%rbp)
  movl   $0x1,-0x1f0(%rbp)
  jmp    L129
L229:
  lea    -0x230(%rbp),%rdi
  lea    -0xf0(%rbp),%rsi
  lea    -0x1c0(%rbp),%rcx
  lea    -0x22c(%rbp),%rdx
  mov    -0x260(%rbp),%rax
  mov    %rdi,%r9
  mov    %rsi,%r8
  lea    D47(%rip),%rsi
  mov    %rax,%rdi
  call   <sscanf@plt>
  cmp    $0x3,%eax
  jne    L129
  mov    -0x260(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    -0x230(%rbp),%edx
  cmp    %edx,%eax
  jne    L129
  lea    -0xf0(%rbp),%rax
  lea    D50(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L128
  lea    -0xf0(%rbp),%rax
  lea    D9(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L129
L128:
  lea    -0x1c0(%rbp),%rax
  mov    %rax,%rdi
  call   <a2time_range@plt>
  mov    %eax,-0x1f0(%rbp)
L129:
  cmpl   $0xffffffff,-0x1f0(%rbp)
  jne    L0
  mov    -0x260(%rbp),%rax
  mov    %rax,%rsi
  lea    D64(%rip),%rax
  mov    %rax,%rdi
  call   <fatal_error@plt>
L0:
  mov    -0x1f0(%rbp),%eax
  mov    %eax,%edx
  mov    -0x1e0(%rbp),%rax
  mov    %dl,(%rax)
  cmpl   $0x2c,-0x1ec(%rbp)
  je     L76
  mov    -0x1e0(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    -0x22c(%rbp),%eax
  mov    %rdx,%rsi
  mov    %eax,%edi
  call   <int_char@plt>
  jmp    L35
L76:
  mov    -0x1e0(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    -0x22c(%rbp),%eax
  mov    %rdx,%rsi
  mov    %eax,%edi
  call   <int2_char@plt>
L35:
  mov    -0x240(%rbp),%rax
  mov    %rax,%rdi
  call   <code_table_1_2_location@plt>
  mov    %rax,-0x1d0(%rbp)
  mov    -0x240(%rbp),%rax
  mov    %rax,%rdi
  call   <code_table_1_4_location@plt>
  mov    %rax,-0x1c8(%rbp)
  mov    -0x22c(%rbp),%eax
  test   %eax,%eax
  jne    L206
  cmpq   $0x0,-0x1d0(%rbp)
  je     L103
  mov    -0x1d0(%rbp),%rax
  movb   $0x0,(%rax)
L103:
  cmpq   $0x0,-0x1c8(%rbp)
  je     L17
  mov    -0x1c8(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x1,%al
  jne    L17
  mov    -0x1c8(%rbp),%rax
  movb   $0x0,(%rax)
  jmp    L17
L206:
  cmpq   $0x0,-0x1d0(%rbp)
  je     L49
  mov    -0x1d0(%rbp),%rax
  movb   $0x1,(%rax)
L49:
  cmpq   $0x0,-0x1c8(%rbp)
  je     L17
  mov    -0x1c8(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L17
  mov    -0x1c8(%rbp),%rax
  movb   $0x1,(%rax)
L17:
  cmpq   $0x0,-0x1d8(%rbp)
  jne    L194
  mov    $0x0,%eax
  jmp    L196
L194:
  lea    -0x1f8(%rbp),%r9
  lea    -0x1fc(%rbp),%r8
  lea    -0x200(%rbp),%rcx
  lea    -0x204(%rbp),%rdx
  lea    -0x208(%rbp),%rsi
  mov    -0x240(%rbp),%rax
  sub    $0x8,%rsp
  lea    -0x1f4(%rbp),%rdi
  push   %rdi
  mov    %rax,%rdi
  call   <reftime@plt>
  add    $0x10,%rsp
  lea    -0x1f4(%rbp),%r9
  lea    -0x1f8(%rbp),%r8
  lea    -0x1fc(%rbp),%rcx
  lea    -0x200(%rbp),%rdx
  lea    -0x204(%rbp),%rsi
  lea    -0x208(%rbp),%rax
  mov    -0x1e8(%rbp),%edi
  push   %rdi
  mov    -0x1e4(%rbp),%edi
  push   %rdi
  mov    %rax,%rdi
  call   <add_time@plt>
  add    $0x10,%rsp
  lea    -0x210(%rbp),%r9
  lea    -0x214(%rbp),%r8
  lea    -0x218(%rbp),%rcx
  lea    -0x21c(%rbp),%rdx
  lea    -0x220(%rbp),%rsi
  mov    -0x1d8(%rbp),%rax
  sub    $0x8,%rsp
  lea    -0x20c(%rbp),%rdi
  push   %rdi
  mov    %rax,%rdi
  call   <get_time@plt>
  add    $0x10,%rsp
  mov    -0x1f4(%rbp),%ebx
  mov    -0x1f8(%rbp),%r11d
  mov    -0x1fc(%rbp),%r10d
  mov    -0x200(%rbp),%r9d
  mov    -0x204(%rbp),%r8d
  mov    -0x208(%rbp),%edi
  mov    -0x20c(%rbp),%r14d
  mov    -0x210(%rbp),%r13d
  mov    -0x214(%rbp),%ecx
  mov    -0x218(%rbp),%edx
  mov    -0x21c(%rbp),%esi
  mov    -0x220(%rbp),%eax
  lea    -0x224(%rbp),%r12
  push   %r12
  lea    -0x228(%rbp),%r12
  push   %r12
  push   %rbx
  push   %r11
  push   %r10
  push   %r9
  push   %r8
  push   %rdi
  mov    %r14d,%r9d
  mov    %r13d,%r8d
  mov    %eax,%edi
  call   <sub_time@plt>
  add    $0x40,%rsp
  lea    -0x1f8(%rbp),%r9
  lea    -0x1fc(%rbp),%r8
  lea    -0x200(%rbp),%rcx
  lea    -0x204(%rbp),%rdx
  lea    -0x208(%rbp),%rsi
  mov    -0x240(%rbp),%rax
  sub    $0x8,%rsp
  lea    -0x1f4(%rbp),%rdi
  push   %rdi
  mov    %rax,%rdi
  call   <reftime@plt>
  add    $0x10,%rsp
  mov    -0x22c(%rbp),%edi
  lea    -0x1f4(%rbp),%r9
  lea    -0x1f8(%rbp),%r10
  lea    -0x1fc(%rbp),%rcx
  lea    -0x200(%rbp),%rdx
  lea    -0x204(%rbp),%rsi
  lea    -0x208(%rbp),%rax
  mov    -0x1f0(%rbp),%r8d
  push   %r8
  push   %rdi
  mov    %r10,%r8
  mov    %rax,%rdi
  call   <add_time@plt>
  add    $0x10,%rsp
  mov    -0x224(%rbp),%r8d
  mov    -0x228(%rbp),%edi
  lea    -0x1f4(%rbp),%r9
  lea    -0x1f8(%rbp),%r10
  lea    -0x1fc(%rbp),%rcx
  lea    -0x200(%rbp),%rdx
  lea    -0x204(%rbp),%rsi
  lea    -0x208(%rbp),%rax
  push   %r8
  push   %rdi
  mov    %r10,%r8
  mov    %rax,%rdi
  call   <add_time@plt>
  add    $0x10,%rsp
  mov    -0x1f4(%rbp),%r8d
  mov    -0x1f8(%rbp),%edi
  mov    -0x1fc(%rbp),%ecx
  mov    -0x200(%rbp),%edx
  mov    -0x204(%rbp),%esi
  mov    -0x208(%rbp),%eax
  sub    $0x8,%rsp
  push   -0x1d8(%rbp)
  mov    %r8d,%r9d
  mov    %edi,%r8d
  mov    %eax,%edi
  call   <save_time@plt>
  add    $0x10,%rsp
  mov    $0x0,%eax
L196:
  mov    -0x28(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L131
  call   <__stack_chk_fail@plt>
L131:
  lea    -0x20(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %rbp
  ret
```

tool_calls: name: read_data
arguments: tag: D61
type: string
name: read_data
arguments: tag: D19
type: string
name: read_data
arguments: tag: D37
type: string
name: read_data
arguments: tag: D47
type: string
name: read_data
arguments: tag: D50
type: string
name: read_data
arguments: tag: D9
type: string
name: read_data
arguments: tag: D64
type: string

tool: 

tool: D19: set_ftime: Code Table 4.4 not present or defined

tool: D37: anl

tool: D47: %d %s %s%n

tool: D50: forecast

tool: D9: fcst

tool: D64: set_ftime: unknown option %s

assistant: ```c
int f_set_ftime1(int mode, unsigned char **sec, float *data, unsigned int ndata, char *inv_out, void **local, const char *arg1) {
  int len, pdt;
  char string[200];
  char string2[200];
  unsigned char *code_4_4, *verf_time, *code_1_2, *code_1_4;
  int old_ftime, old_ftime_units;
  int new_ftime, new_ftime_units, dt, units;
  int year, month, day, hour, minute, second;
  int year0, month0, day0, hour0, minute0, second0;
  if (mode < 0)
    return 0;
  code_4_4 = code_table_4_4_location(sec);
  if (code_4_4 == NULL)
    fatal_error("set_ftime: Code Table 4.4 not present or defined", "");
  pdt = (((int)((sec[4][7] << 8) + (sec[4][8]))));
  old_ftime_units = (int)*code_4_4;
  old_ftime = int4(code_4_4 + 1);
  verf_time = stat_proc_verf_time_location(sec);
  new_ftime = 0;
  new_ftime_units = -1;
  if (strcmp(arg1, "anl") == 0) {
    new_ftime = 0;
    new_ftime_units = 1;
  } else {
    if (sscanf(arg1, "%d %s %s%n", &new_ftime, string, string2, &len) == 3 && len == strlen(arg1)) {
      if (strcmp(string2, "forecast") == 0 || strcmp(string2, "fcst") == 0) {
        new_ftime_units = a2time_range(string);
      }
    }
  }
  if (new_ftime_units == -1)
    fatal_error("set_ftime: unknown option %s", arg1);
  *code_4_4 = (unsigned char)new_ftime_units;
  if (pdt != 44) {
    int_char(new_ftime, code_4_4 + 1);
  } else {
    int2_char(new_ftime, code_4_4 + 1);
  }
  code_1_2 = code_table_1_2_location(sec);
  code_1_4 = code_table_1_4_location(sec);
  if (new_ftime == 0) {
    if (code_1_2 != NULL)
      *code_1_2 = 0;
    if (code_1_4 != NULL && (int)*code_1_4 == 1)
      *code_1_4 = 0;
  } else {
    if (code_1_2 != NULL)
      *code_1_2 = 1;
    if (code_1_4 != NULL && (int)*code_1_4 == 0)
      *code_1_4 = 1;
  }
  if (verf_time == NULL)
    return 0;
  reftime(sec, &year0, &month0, &day0, &hour0, &minute0, &second0);
  add_time(&year0, &month0, &day0, &hour0, &minute0, &second0, old_ftime, old_ftime_units);
  get_time(verf_time, &year, &month, &day, &hour, &minute, &second);
  sub_time(year, month, day, hour, minute, second, year0, month0, day0, hour0, minute0, second0, &dt, &units);
  reftime(sec, &year0, &month0, &day0, &hour0, &minute0, &second0);
  add_time(&year0, &month0, &day0, &hour0, &minute0, &second0, new_ftime, new_ftime_units);
  add_time(&year0, &month0, &day0, &hour0, &minute0, &second0, dt, units);
  save_time(year0, month0, day0, hour0, minute0, second0, verf_time);
  return 0;
}
```