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

```asm
<match_digit>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rdi,%rbp
  mov    %rsi,%r14
  mov    %rdx,%r15
  mov    %rcx,%rbx
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  lea    0x8(%rsp),%rsi
  mov    $0xa,%edx
  call   <strtoul@plt>
  mov    %rax,%r13
  cmp    $0x5f5e0ff,%rax
  ja     L129
L26:
  mov    0x8(%rsp),%rdx
  movzbl (%rdx),%eax
  cmp    $0x2f,%al
  jg     L167
  cmp    $0x2c,%al
  jg     L90
L6:
  mov    $0x1,%ebx
L91:
  mov    %ebx,%r12d
  movsbl 0x0(%rbp,%rbx,1),%edi
  call   <isdigit@plt>
  add    $0x1,%rbx
  test   %rax,%rax
  jne    L91
  cmp    $0x4,%r12d
  je     L63
L124:
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L25
  mov    %r12d,%eax
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L129:
  mov    %r14,%rdi
  call   <nodate@plt>
  test   %rax,%rax
  je     L26
  mov    %r13,0x10(%rsp)
  lea    0x10(%rsp),%rdi
  mov    %r14,%rsi
  call   <gmtime_r@plt>
  test   %rax,%rax
  je     L26
  movl   $0x1,(%rbx)
  mov    0x8(%rsp),%r12d
  sub    %ebp,%r12d
  jmp    L124
L167:
  cmp    $0x3a,%al
  jne    L6
L90:
  movsbl 0x1(%rdx),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L6
  mov    0x8(%rsp),%rcx
  movsbl (%rcx),%esi
  mov    %r14,%r8
  mov    %rbp,%rdx
  mov    %r13,%rdi
  call   <match_multi_number@plt>
  mov    %eax,%r12d
  test   %eax,%eax
  je     L6
  jmp    L124
L63:
  cmp    $0x578,%r13
  ja     L135
  cmpl   $0xffffffff,(%r15)
  jne    L124
  mov    %r13,%rdx
  shr    $0x2,%rdx
  movabs $0x28f5c28f5c28f5c3,%rcx
  mov    %rdx,%rax
  mul    %rcx
  shr    $0x2,%rdx
  imul   $0x3c,%edx,%eax
  lea    (%rdx,%rdx,4),%rdx
  lea    (%rdx,%rdx,4),%rdx
  shl    $0x2,%rdx
  sub    %rdx,%r13
  add    %r13d,%eax
  mov    %eax,(%r15)
  jmp    L124
L135:
  lea    -0x76d(%r13),%rax
  cmp    $0xc6,%rax
  ja     L124
  sub    $0x76c,%r13
  mov    %r13,(%r14)
  jmp    L124
L25:
  call   <__stack_chk_fail@plt>
```

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;
}
```