user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<match_digit>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    %rdx,-0x48(%rbp)
  mov    %rcx,-0x50(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    -0x20(%rbp),%rcx
  mov    -0x38(%rbp),%rax
  mov    $0xa,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strtoul@plt>
  mov    %rax,-0x10(%rbp)
  cmpq   $0x5f5e0ff,-0x10(%rbp)
  jbe    L29
  mov    -0x40(%rbp),%rax
  mov    %rax,%rdi
  call   <nodate@plt>
  test   %rax,%rax
  je     L29
  mov    -0x10(%rbp),%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x40(%rbp),%rdx
  lea    -0x18(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <gmtime_r@plt>
  test   %rax,%rax
  je     L29
  mov    -0x50(%rbp),%rax
  movl   $0x1,(%rax)
  mov    -0x20(%rbp),%rax
  sub    -0x38(%rbp),%rax
  jmp    L205
L29:
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  cmp    $0x2f,%eax
  jg     L138
  cmp    $0x2d,%eax
  jge    L79
  jmp    L61
L138:
  cmp    $0x3a,%eax
  jne    L61
L79:
  mov    -0x20(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L61
  mov    -0x20(%rbp),%rcx
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%esi
  mov    -0x40(%rbp),%rdi
  mov    -0x38(%rbp),%rdx
  mov    -0x10(%rbp),%rax
  mov    %rdi,%r8
  mov    %rax,%rdi
  call   <match_multi_number@plt>
  mov    %eax,-0x2c(%rbp)
  cmpl   $0x0,-0x2c(%rbp)
  je     L61
  mov    -0x2c(%rbp),%eax
  jmp    L205
L61:
  movl   $0x0,-0x30(%rbp)
L63:
  addl   $0x1,-0x30(%rbp)
  mov    -0x30(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L63
  cmpl   $0x4,-0x30(%rbp)
  jne    L83
  cmpq   $0x578,-0x10(%rbp)
  ja     L195
  mov    -0x48(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0xffffffff,%eax
  jne    L195
  mov    -0x10(%rbp),%rcx
  mov    %rcx,%rax
  shr    $0x2,%rax
  movabs $0x28f5c28f5c28f5c3,%rdx
  mul    %rdx
  shr    $0x2,%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  lea    0x0(,%rax,4),%rdx
  add    %rdx,%rax
  shl    $0x2,%rax
  sub    %rax,%rcx
  mov    %rcx,%rdx
  mov    %edx,-0x28(%rbp)
  mov    -0x10(%rbp),%rax
  shr    $0x2,%rax
  movabs $0x28f5c28f5c28f5c3,%rdx
  mul    %rdx
  mov    %rdx,%rax
  shr    $0x2,%rax
  mov    %eax,-0x24(%rbp)
  mov    -0x24(%rbp),%eax
  imul   $0x3c,%eax,%edx
  mov    -0x28(%rbp),%eax
  add    %edx,%eax
  mov    %eax,%edx
  mov    -0x48(%rbp),%rax
  mov    %edx,(%rax)
  jmp    L136
L195:
  cmpq   $0x76c,-0x10(%rbp)
  jbe    L136
  cmpq   $0x833,-0x10(%rbp)
  ja     L136
  mov    -0x10(%rbp),%rax
  lea    -0x76c(%rax),%rdx
  mov    -0x40(%rbp),%rax
  mov    %rdx,(%rax)
L136:
  mov    -0x30(%rbp),%eax
  jmp    L205
L83:
  cmpl   $0x2,-0x30(%rbp)
  jle    L88
  mov    -0x30(%rbp),%eax
  jmp    L205
L88:
  mov    -0x30(%rbp),%eax
L205:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L184
  call   <__stack_chk_fail@plt>
L184:
  leave
  ret
```

assistant: ```c
int match_digit(const char *date, struct tm *tm, int *offset, int *tm_gmt) {
  int n;
  char *end;
  unsigned long num;
  num = strtoul(date, &end, 10);
  if (num >= 100000000 && nodate(tm)) {
    time_t time = num;
    if (gmtime_r(&time, tm)) {
      *tm_gmt = 1;
      return end - date;
    }
  }
  switch (*end) {
  case ':':
  case '.':
  case '/':
  case '-':
    if (isdigit(end[1])) {
      int match = match_multi_number(num, *end, date, end, tm);
      if (match)
        return match;
    }
  }
  n = 0;
  do {
    n++;
  } while (isdigit(date[n]));
  if (n == 4) {
    if (num <= 1400 && *offset == -1) {
      unsigned int minutes = num % 100;
      unsigned int hours = num / 100;
      *offset = hours * 60 + minutes;
    } else if (num > 1900 && num < 2100)
      tm->tm_year = num - 1900;
    return n;
  }
  if (n > 2)
    return n;
  if (num > 0 && num < 32 && tm->tm_mday < 0) {
    tm->tm_mday = num;
    return n;
  }
  if (n == 2 && tm->tm_year < 0) {
    if (num < 10 && tm->tm_mday >= 0) {
      tm->tm_year = num + 100;
      return n;
    }
    if (num >= 70) {
      tm->tm_year = num;
      return n;
    }
  }
  if (num > 0 && num < 13 && tm->tm_mon < 0)
    tm->tm_mon = num - 1;
  return n;
}
```