user: What is the c source code of the assembly code below?

```asm
<Decode_xorriso_timestamp>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x70,%rsp
  mov    %rdi,-0x58(%rbp)
  mov    %rsi,-0x60(%rbp)
  mov    %edx,-0x64(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x38(%rbp)
  movl   $0x0,-0x34(%rbp)
  movl   $0x0,-0x30(%rbp)
  mov    -0x58(%rbp),%rax
  mov    $0x1c,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  mov    -0x58(%rbp),%rax
  movl   $0xffffffff,(%rax)
  mov    -0x60(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,-0x28(%rbp)
  cmpl   $0x11,-0x28(%rbp)
  jg     L353
  cmpl   $0x9,-0x28(%rbp)
  jg     L334
L353:
  mov    $0x0,%eax
  jmp    L84
L334:
  mov    -0x60(%rbp),%rdx
  lea    -0x20(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  movl   $0x0,-0x2c(%rbp)
  jmp    L100
L317:
  mov    -0x2c(%rbp),%eax
  cltq
  movzbl -0x20(%rbp,%rax,1),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L318
  mov    $0x0,%eax
  jmp    L84
L318:
  addl   $0x1,-0x2c(%rbp)
L100:
  mov    -0x2c(%rbp),%eax
  cltq
  movzbl -0x20(%rbp,%rax,1),%eax
  test   %al,%al
  je     L349
  cmpl   $0x3,-0x2c(%rbp)
  jle    L317
L349:
  movzbl -0x1c(%rbp),%eax
  cmp    $0x2e,%al
  je     L530
  mov    $0x0,%eax
  jmp    L84
L530:
  movb   $0x0,-0x1c(%rbp)
  lea    -0x44(%rbp),%rdx
  lea    -0x20(%rbp),%rax
  lea    D47(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <sscanf@plt>
  mov    -0x44(%rbp),%eax
  cmp    $0x76b,%eax
  jle    L213
  mov    -0x44(%rbp),%eax
  cmp    $0xbb8,%eax
  jle    L335
L213:
  mov    $0x0,%eax
  jmp    L84
L335:
  movzbl -0x1b(%rbp),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L337
  movzbl -0x1a(%rbp),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L337
  movzbl -0x19(%rbp),%eax
  cmp    $0x2e,%al
  je     L340
L337:
  mov    $0x0,%eax
  jmp    L84
L340:
  movb   $0x0,-0x19(%rbp)
  lea    -0x20(%rbp),%rax
  add    $0x5,%rax
  lea    -0x40(%rbp),%rdx
  lea    D47(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <sscanf@plt>
  mov    -0x40(%rbp),%eax
  test   %eax,%eax
  jle    L16
  mov    -0x40(%rbp),%eax
  cmp    $0xc,%eax
  jle    L315
L16:
  mov    $0x0,%eax
  jmp    L84
L315:
  movzbl -0x18(%rbp),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L194
  movzbl -0x17(%rbp),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L194
  movzbl -0x16(%rbp),%eax
  cmp    $0x2e,%al
  je     L385
  movzbl -0x16(%rbp),%eax
  test   %al,%al
  je     L385
L194:
  mov    $0x0,%eax
  jmp    L84
L385:
  movb   $0x0,-0x16(%rbp)
  lea    -0x20(%rbp),%rax
  add    $0x8,%rax
  lea    -0x3c(%rbp),%rdx
  lea    D47(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <sscanf@plt>
  mov    -0x3c(%rbp),%eax
  test   %eax,%eax
  jle    L210
  mov    -0x3c(%rbp),%eax
  cmp    $0x1f,%eax
  jle    L374
L210:
  mov    $0x0,%eax
  jmp    L84
L374:
  cmpl   $0xa,-0x28(%rbp)
  je     L235
  movzbl -0x15(%rbp),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L182
  movzbl -0x14(%rbp),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L182
  movzbl -0x13(%rbp),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L138
  movzbl -0x13(%rbp),%eax
  test   %al,%al
  je     L138
L182:
  mov    $0x0,%eax
  jmp    L84
L138:
  movzbl -0x13(%rbp),%eax
  movsbl %al,%eax
  mov    %eax,-0x24(%rbp)
  movb   $0x0,-0x13(%rbp)
  lea    -0x20(%rbp),%rax
  add    $0xb,%rax
  lea    -0x38(%rbp),%rdx
  lea    D47(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <sscanf@plt>
  mov    -0x24(%rbp),%eax
  mov    %al,-0x13(%rbp)
  mov    -0x38(%rbp),%eax
  test   %eax,%eax
  js     L332
  mov    -0x38(%rbp),%eax
  cmp    $0x17,%eax
  jle    L540
L332:
  mov    $0x0,%eax
  jmp    L84
L540:
  cmpl   $0xd,-0x28(%rbp)
  je     L237
  movzbl -0x13(%rbp),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L546
  movzbl -0x12(%rbp),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L546
  movzbl -0x11(%rbp),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L18
  movzbl -0x11(%rbp),%eax
  test   %al,%al
  je     L18
L546:
  mov    $0x0,%eax
  jmp    L84
L18:
  movzbl -0x11(%rbp),%eax
  movsbl %al,%eax
  mov    %eax,-0x24(%rbp)
  movb   $0x0,-0x11(%rbp)
  lea    -0x20(%rbp),%rax
  add    $0xd,%rax
  lea    -0x34(%rbp),%rdx
  lea    D47(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <sscanf@plt>
  mov    -0x24(%rbp),%eax
  mov    %al,-0x11(%rbp)
  mov    -0x34(%rbp),%eax
  test   %eax,%eax
  js     L457
  mov    -0x34(%rbp),%eax
  cmp    $0x3b,%eax
  jle    L388
L457:
  mov    $0x0,%eax
  jmp    L84
L388:
  cmpl   $0xf,-0x28(%rbp)
  je     L54
  movzbl -0x11(%rbp),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L306
  movzbl -0x10(%rbp),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L306
  movzbl -0xf(%rbp),%eax
  test   %al,%al
  je     L477
L306:
  mov    $0x0,%eax
  jmp    L84
L477:
  lea    -0x20(%rbp),%rax
  add    $0xf,%rax
  lea    -0x30(%rbp),%rdx
  lea    D47(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <sscanf@plt>
  mov    -0x30(%rbp),%eax
  test   %eax,%eax
  js     L400
  mov    -0x30(%rbp),%eax
  cmp    $0x3b,%eax
  jle    L131
L400:
  mov    $0x0,%eax
  jmp    L84
L235:
  nop
  jmp    L282
L237:
  nop
  jmp    L282
L54:
  nop
  jmp    L282
L131:
  nop
L282:
  mov    -0x44(%rbp),%eax
  lea    -0x76c(%rax),%edx
  mov    -0x58(%rbp),%rax
  mov    %edx,0x4(%rax)
  mov    -0x40(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    -0x58(%rbp),%rax
  mov    %edx,0x8(%rax)
  mov    -0x3c(%rbp),%edx
  mov    -0x58(%rbp),%rax
  mov    %edx,0xc(%rax)
  mov    -0x38(%rbp),%edx
  mov    -0x58(%rbp),%rax
  mov    %edx,0x10(%rax)
  mov    -0x34(%rbp),%edx
  mov    -0x58(%rbp),%rax
  mov    %edx,0x14(%rax)
  mov    -0x30(%rbp),%edx
  mov    -0x58(%rbp),%rax
  mov    %edx,0x18(%rax)
  mov    $0x1,%eax
L84:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L227
  call   <__stack_chk_fail@plt>
L227:
  leave
  ret
```

tool_calls: name: read_data
arguments: data_tag: D47
type: string

tool: D47: %d

assistant: ```c
int Decode_xorriso_timestamp(struct tm *erg, char *code, int flag) {
  char buf[20];
  int year, month, day, hour = 0, minute = 0, second = 0, i, l, mem;
  memset(erg, 0, sizeof(*erg));
  erg->tm_isdst = -1;
  l = strlen(code);
  if (l > 17 || l < 10)
    return (0);
  strcpy(buf, code);
  for (i = 0; buf[i] != 0 && i < 4; i++)
    if (!isdigit(buf[i]))
      return (0);
  if (buf[4] != '.')
    return (0);
  buf[4] = 0;
  sscanf(buf, "%d", &year);
  if (year < 1900 || year > 3000)
    return (0);
  if (!(isdigit(buf[5]) && isdigit(buf[6]) && buf[7] == '.'))
    return (0);
  buf[7] = 0;
  sscanf(buf + 5, "%d", &month);
  if (month < 1 || month > 12)
    return (0);
  if (!(isdigit(buf[8]) && isdigit(buf[9]) && (buf[10] == '.' || buf[10] == 0)))
    return (0);
  buf[10] = 0;
  sscanf(buf + 8, "%d", &day);
  if (day < 1 || day > 31)
    return (0);
  if (l == 10)
    goto done;
  if (!(isdigit(buf[11]) && isdigit(buf[12]) && (isdigit(buf[13]) || buf[13] == 0)))
    return (0);
  mem = buf[13];
  buf[13] = 0;
  sscanf(buf + 11, "%d", &hour);
  buf[13] = mem;
  if (hour < 0 || hour > 23)
    return (0);
  if (l == 13)
    goto done;
  if (!(isdigit(buf[13]) && isdigit(buf[14]) && (isdigit(buf[15]) || buf[15] == 0)))
    return (0);
  mem = buf[15];
  buf[15] = 0;
  sscanf(buf + 13, "%d", &minute);
  buf[15] = mem;
  if (minute < 0 || minute > 59)
    return (0);
  if (l == 15)
    goto done;
  if (!(isdigit(buf[15]) && isdigit(buf[16]) && buf[17] == 0))
    return (0);
  sscanf(buf + 15, "%d", &second);
  if (second < 0 || second > 59)
    return (0);
done:;
  erg->tm_year = year - 1900;
  erg->tm_mon = month - 1;
  erg->tm_mday = day;
  erg->tm_hour = hour;
  erg->tm_min = minute;
  erg->tm_sec = second;
  return (1);
}
```