user: What would the C source look like for the assembly code provided here:

```asm
<parse_asn1_time>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x28(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0x81,%eax
  je     L29
  mov    -0x28(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0x80,%eax
  je     L29
  mov    $0x1,%eax
  jmp    L40
L29:
  mov    -0x30(%rbp),%rax
  mov    $0x18,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  mov    -0x28(%rbp),%rax
  mov    0x8(%rax),%rax
  mov    %rax,-0x18(%rbp)
  movl   $0x0,-0x1c(%rbp)
  mov    -0x28(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0x80,%eax
  je     L64
  cmp    $0x81,%eax
  jne    L25
  mov    -0x1c(%rbp),%edx
  mov    -0x18(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  lea    -0x20(%rbp),%rax
  mov    %rax,%rdx
  lea    D37(%rip),%rax
  mov    %rax,%rsi
  mov    %rcx,%rdi
  mov    $0x0,%eax
  call   <sscanf@plt>
  mov    -0x20(%rbp),%eax
  sub    $0x76c,%eax
  mov    %eax,-0x20(%rbp)
  mov    -0x20(%rbp),%edx
  mov    -0x30(%rbp),%rax
  mov    %edx,(%rax)
  addl   $0x4,-0x1c(%rbp)
  jmp    L96
L64:
  mov    -0x1c(%rbp),%edx
  mov    -0x18(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  lea    -0x20(%rbp),%rax
  mov    %rax,%rdx
  lea    D51(%rip),%rax
  mov    %rax,%rsi
  mov    %rcx,%rdi
  mov    $0x0,%eax
  call   <sscanf@plt>
  mov    -0x20(%rbp),%eax
  cmp    $0x31,%eax
  jg     L9
  mov    -0x20(%rbp),%eax
  add    $0x64,%eax
  mov    %eax,-0x20(%rbp)
L9:
  mov    -0x20(%rbp),%edx
  mov    -0x30(%rbp),%rax
  mov    %edx,(%rax)
  addl   $0x2,-0x1c(%rbp)
  jmp    L96
L25:
  mov    $0x1,%eax
  jmp    L40
L96:
  mov    -0x1c(%rbp),%edx
  mov    -0x18(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  lea    -0xd(%rbp),%rax
  mov    %rax,%rdx
  lea    D16(%rip),%rax
  mov    %rax,%rsi
  mov    %rcx,%rdi
  mov    $0x0,%eax
  call   <sscanf@plt>
  movb   $0x0,-0xb(%rbp)
  lea    -0xd(%rbp),%rax
  mov    $0xa,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <strtol@plt>
  sub    $0x1,%eax
  mov    %eax,-0x20(%rbp)
  mov    -0x20(%rbp),%edx
  mov    -0x30(%rbp),%rax
  mov    %edx,0x4(%rax)
  addl   $0x2,-0x1c(%rbp)
  mov    -0x1c(%rbp),%edx
  mov    -0x18(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  lea    -0xd(%rbp),%rax
  mov    %rax,%rdx
  lea    D16(%rip),%rax
  mov    %rax,%rsi
  mov    %rcx,%rdi
  mov    $0x0,%eax
  call   <sscanf@plt>
  movb   $0x0,-0xb(%rbp)
  lea    -0xd(%rbp),%rax
  mov    $0xa,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <strtol@plt>
  mov    %eax,-0x20(%rbp)
  mov    -0x20(%rbp),%edx
  mov    -0x30(%rbp),%rax
  mov    %edx,0x8(%rax)
  addl   $0x2,-0x1c(%rbp)
  mov    -0x1c(%rbp),%edx
  mov    -0x18(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  lea    -0xd(%rbp),%rax
  mov    %rax,%rdx
  lea    D16(%rip),%rax
  mov    %rax,%rsi
  mov    %rcx,%rdi
  mov    $0x0,%eax
  call   <sscanf@plt>
  movb   $0x0,-0xb(%rbp)
  lea    -0xd(%rbp),%rax
  mov    $0xa,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <strtol@plt>
  mov    %eax,-0x20(%rbp)
  mov    -0x20(%rbp),%edx
  mov    -0x30(%rbp),%rax
  mov    %edx,0xc(%rax)
  addl   $0x2,-0x1c(%rbp)
  mov    -0x1c(%rbp),%edx
  mov    -0x18(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  lea    -0xd(%rbp),%rax
  mov    %rax,%rdx
  lea    D16(%rip),%rax
  mov    %rax,%rsi
  mov    %rcx,%rdi
  mov    $0x0,%eax
  call   <sscanf@plt>
  movb   $0x0,-0xb(%rbp)
  lea    -0xd(%rbp),%rax
  mov    $0xa,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <strtol@plt>
  mov    %eax,-0x20(%rbp)
  mov    -0x20(%rbp),%edx
  mov    -0x30(%rbp),%rax
  mov    %edx,0x10(%rax)
  addl   $0x2,-0x1c(%rbp)
  mov    -0x1c(%rbp),%edx
  mov    -0x18(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  lea    -0xd(%rbp),%rax
  mov    %rax,%rdx
  lea    D16(%rip),%rax
  mov    %rax,%rsi
  mov    %rcx,%rdi
  mov    $0x0,%eax
  call   <sscanf@plt>
  movb   $0x0,-0xb(%rbp)
  lea    -0xd(%rbp),%rax
  mov    $0xa,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <strtol@plt>
  mov    %eax,-0x20(%rbp)
  mov    -0x20(%rbp),%edx
  mov    -0x30(%rbp),%rax
  mov    %edx,0x14(%rax)
  mov    $0x0,%eax
L40:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L10
  call   <__stack_chk_fail@plt>
L10:
  leave
  ret
```

tool_calls: name: parse_data
arguments: tag: D37
data_type: string
name: parse_data
arguments: tag: D51
data_type: string
name: parse_data
arguments: tag: D16
data_type: string

tool: D37: %04i

tool: D51: %02i

tool: D16: %02s

assistant: ```c
int parse_asn1_time(const ASN1_TIME *atp, struct tm *tsp) {
  const char *str;
  unsigned offset;
  int val;
  char buff[5];
  if ((atp->type != V_ASN1_GENERALIZEDTIME) && (atp->type != V_ASN1_UTCTIME))
    return (1);
  memset(tsp, 0, sizeof(struct tm));
  str = (const char *)atp->data;
  offset = 0;
  switch (atp->type) {
  case V_ASN1_GENERALIZEDTIME:
    sscanf(&str[offset], "%04i", &val);
    val -= 1900;
    tsp->tm_year = val;
    offset += 4;
    break;
  case V_ASN1_UTCTIME:
    sscanf(&str[offset], "%02i", &val);
    if (val < 50)
      val += 2000 - 1900;
    tsp->tm_year = val;
    offset += 2;
    break;
  default:
    return (1);
  };
  sscanf(&str[offset], "%02s", buff);
  buff[2] = '\0';
  val = strtol(buff, NULL, 10) - 1;
  tsp->tm_mon = val;
  offset += 2;
  sscanf(&str[offset], "%02s", buff);
  buff[2] = '\0';
  val = strtol(buff, NULL, 10);
  tsp->tm_mday = val;
  offset += 2;
  sscanf(&str[offset], "%02s", buff);
  buff[2] = '\0';
  val = strtol(buff, NULL, 10);
  tsp->tm_hour = val;
  offset += 2;
  sscanf(&str[offset], "%02s", buff);
  buff[2] = '\0';
  val = strtol(buff, NULL, 10);
  tsp->tm_min = val;
  offset += 2;
  sscanf(&str[offset], "%02s", buff);
  buff[2] = '\0';
  val = strtol(buff, NULL, 10);
  tsp->tm_sec = val;
  return (0);
}
```