user: 请将以下的汇编代码转换成C语言代码:

```asm
<getbranchtime>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %rdi,-0x48(%rbp)
  mov    %rsi,-0x50(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x18(%rbp)
  xor    %eax,%eax
  mov    -0x48(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,%ebx
  lea    -0x30(%rbp),%rax
  mov    $0x18,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  cmp    $0x4,%ebx
  je     L287
  cmp    $0x5,%ebx
  je     L287
  cmp    $0xc,%ebx
  je     L287
  cmp    $0xd,%ebx
  je     L287
  mov    $0x0,%eax
  jmp    L121
L287:
  lea    -0x30(%rbp),%rax
  lea    0xc(%rax),%r8
  lea    -0x30(%rbp),%rax
  lea    0x8(%rax),%rdi
  lea    -0x30(%rbp),%rax
  lea    0x4(%rax),%rcx
  lea    -0x30(%rbp),%rdx
  mov    -0x48(%rbp),%rax
  sub    $0x8,%rsp
  lea    -0x30(%rbp),%rsi
  add    $0x10,%rsi
  push   %rsi
  mov    %r8,%r9
  mov    %rdi,%r8
  lea    D33(%rip),%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <sscanf@plt>
  add    $0x10,%rsp
  cmp    $0x5,%eax
  je     L267
  lea    -0x30(%rbp),%rax
  lea    0xc(%rax),%r8
  lea    -0x30(%rbp),%rax
  lea    0x8(%rax),%rdi
  lea    -0x30(%rbp),%rax
  lea    0x4(%rax),%rcx
  lea    -0x30(%rbp),%rdx
  mov    -0x48(%rbp),%rax
  sub    $0x8,%rsp
  lea    -0x30(%rbp),%rsi
  add    $0x10,%rsi
  push   %rsi
  mov    %r8,%r9
  mov    %rdi,%r8
  lea    D21(%rip),%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <sscanf@plt>
  add    $0x10,%rsp
  cmp    $0x5,%eax
  jne    L67
L267:
  mov    -0x30(%rbp),%eax
  sub    $0x76c,%eax
  mov    %eax,-0x30(%rbp)
  mov    -0x2c(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x2c(%rbp)
  mov    -0x30(%rbp),%eax
  cmp    $0x63,%eax
  jle    L48
  mov    -0x2c(%rbp),%eax
  test   %eax,%eax
  js     L48
  mov    -0x2c(%rbp),%eax
  cmp    $0xb,%eax
  jg     L48
  mov    -0x28(%rbp),%eax
  test   %eax,%eax
  jle    L48
  mov    -0x28(%rbp),%eax
  cmp    $0x1f,%eax
  jg     L48
  mov    -0x24(%rbp),%eax
  test   %eax,%eax
  js     L48
  mov    -0x24(%rbp),%eax
  cmp    $0x17,%eax
  jg     L48
  mov    -0x20(%rbp),%eax
  test   %eax,%eax
  js     L48
  mov    -0x20(%rbp),%eax
  cmp    $0x3b,%eax
  jle    L1
L48:
  mov    $0x0,%eax
  jmp    L121
L1:
  movl   $0xffffffff,-0x1c(%rbp)
  lea    -0x30(%rbp),%rax
  mov    %rax,%rdi
  call   <mktime@plt>
  mov    %eax,-0x34(%rbp)
  cmpl   $0xffffffff,-0x34(%rbp)
  jne    L85
  mov    $0x0,%eax
  jmp    L121
L85:
  mov    -0x50(%rbp),%rax
  mov    -0x34(%rbp),%edx
  mov    %edx,(%rax)
  mov    $0x1,%eax
  jmp    L121
L67:
  lea    -0x38(%rbp),%rcx
  lea    -0x3c(%rbp),%rdx
  mov    -0x48(%rbp),%rax
  lea    D35(%rip),%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <sscanf@plt>
  cmp    $0x2,%eax
  je     L256
  lea    -0x38(%rbp),%rcx
  lea    -0x3c(%rbp),%rdx
  mov    -0x48(%rbp),%rax
  lea    D29(%rip),%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <sscanf@plt>
  cmp    $0x2,%eax
  jne    L27
L256:
  mov    -0x3c(%rbp),%eax
  test   %eax,%eax
  js     L281
  mov    -0x3c(%rbp),%eax
  cmp    $0x17,%eax
  jg     L281
  mov    -0x38(%rbp),%eax
  test   %eax,%eax
  js     L281
  mov    -0x38(%rbp),%eax
  cmp    $0x3b,%eax
  jle    L235
L281:
  mov    $0x0,%eax
  jmp    L121
L235:
  mov    -0x50(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0x15180,%eax
  jg     L143
  mov    -0x3c(%rbp),%eax
  imul   $0xe10,%eax,%edx
  mov    -0x38(%rbp),%eax
  imul   $0x3c,%eax,%eax
  add    %eax,%edx
  mov    -0x50(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x50(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0x1517f,%eax
  jle    L3
  mov    -0x50(%rbp),%rax
  movl   $0x1517f,(%rax)
L3:
  mov    $0x1,%eax
  jmp    L121
L143:
  mov    -0x3c(%rbp),%eax
  imul   $0xe10,%eax,%edx
  mov    -0x38(%rbp),%eax
  imul   $0x3c,%eax,%eax
  add    %eax,%edx
  mov    -0x50(%rbp),%rax
  mov    (%rax),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <normalize_epoch@plt>
  mov    -0x50(%rbp),%rdx
  mov    %eax,(%rdx)
  mov    $0x1,%eax
  jmp    L121
L27:
  mov    $0x0,%eax
L121:
  mov    -0x18(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L52
  call   <__stack_chk_fail@plt>
L52:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: tag: D33
data_type: string
name: disassemble_data
arguments: tag: D21
data_type: string
name: disassemble_data
arguments: tag: D35
data_type: string
name: disassemble_data
arguments: tag: D29
data_type: string

tool: D33: %4d%2d%2d%2d:%2d

tool: D21: %4d%2d%2d%2d%2d

tool: D35: %2d:%2d

tool: D29: %2d%2d

assistant: ```c
int getbranchtime(char *itim, time_t *newtime) {
  register int ilen = strlen(itim);
  int hours, minutes;
  time_t epoch;
  struct tm tm;
  memset(&tm, 0, sizeof tm);
  if (ilen != 4 && ilen != 5 && ilen != 12 && ilen != 13)
    return 0;
  if (sscanf(itim, "%4d%2d%2d%2d:%2d", &tm.tm_year, &tm.tm_mon, &tm.tm_mday, &tm.tm_hour, &tm.tm_min) == 5 || sscanf(itim, "%4d%2d%2d%2d%2d", &tm.tm_year, &tm.tm_mon, &tm.tm_mday, &tm.tm_hour, &tm.tm_min) == 5) {
    tm.tm_year -= 1900;
    tm.tm_mon -= 1;
    if (tm.tm_year < 100 || tm.tm_mon < 0 || tm.tm_mon > 11 || tm.tm_mday < 1 || tm.tm_mday > 31 || tm.tm_hour < 0 || tm.tm_hour > 23 || tm.tm_min < 0 || tm.tm_min > 59) {
      return 0;
    }
    tm.tm_isdst = -1;
    if ((epoch = mktime(&tm)) == -1)
      return 0;
    *newtime = epoch;
    return 1;
  }
  if (sscanf(itim, "%2d:%2d", &hours, &minutes) == 2 || sscanf(itim, "%2d%2d", &hours, &minutes) == 2) {
    if (hours < 0 || hours > 23 || minutes < 0 || minutes > 59)
      return 0;
    if (*newtime <= 86400) {
      *newtime = (hours * 3600) + (minutes * 60);
      if (*newtime >= 86400)
        *newtime = 86400 - 1;
      return 1;
    } else {
      *newtime = normalize_epoch(*newtime, (hours * 3600) + (minutes * 60));
      return 1;
    }
  }
  return 0;
}
```