user: Demonstrate the C code that generates the assembly output below:

```asm
<DateFmt>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  test   %rsi,%rsi
  jle    L37
  mov    %rsi,%rbp
  mov    %rdx,%r14
  lea    0xc(%rsp),%rcx
  mov    %r12,%rbx
  lea    0x8(%rsp),%rdx
  lea    0x4(%rsp),%rsi
  mov    %rbp,%rdi
  call   <Date_ymd@plt>
  movzbl (%r14),%eax
  test   %al,%al
  je     L270
  lea    D24(%rip),%r15
  lea    D7(%rip),%r13
  jmp    L153
  cs nopw 0x0(%rax,%rax,1)
L260:
  mov    %al,(%rbx)
  add    $0x1,%rbx
  movzbl 0x1(%r14),%eax
  mov    %rdx,%r14
L117:
  test   %al,%al
  je     L270
L153:
  lea    0x1(%r14),%rdx
  cmp    $0x25,%al
  jne    L260
  movzbl 0x1(%r14),%edx
  test   %dl,%dl
  je     L270
  lea    -0x44(%rdx),%eax
  cmp    $0x35,%al
  ja     L43
  movzbl %al,%eax
  movslq (%r15,%rax,4),%rax
  add    %r15,%rax
  notrack jmp *%rax
  nopw   0x0(%rax,%rax,1)
L270:
  movb   $0x0,(%rbx)
L77:
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L275
  add    $0x38,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L37:
  movb   $0x0,(%rdi)
  jmp    L77
  nopl   (%rax)
L43:
  mov    %dl,(%rbx)
  add    $0x2,%r14
  movzbl (%r14),%eax
  add    $0x1,%rbx
  jmp    L117
  nopl   0x0(%rax,%rax,1)
  mov    0xc(%rsp),%edi
  call   <Num_sufx@plt>
L231:
  mov    %eax,%esi
  mov    %rbx,%rdi
  call   <strcpy@plt>
L188:
  mov    %rbx,%rdi
  call   <strlen@plt>
  cltq
  add    %rax,%rbx
L14:
  movzbl 0x2(%r14),%eax
  add    $0x2,%r14
  jmp    L117
  xchg   %ax,%ax
  lea    0x10(%rsp),%rdi
  call   <Time2@plt>
  jmp    L231
  nopl   0x0(%rax)
  xor    %esi,%esi
  mov    %rbp,%rdi
  call   <Dyofwk@plt>
  jmp    L231
  mov    0xc(%rsp),%edx
  lea    D0(%rip),%rsi
  mov    %rbx,%rdi
  call   <sprintf@plt>
  jmp    L188
  mov    0x8(%rsp),%edi
  xor    %esi,%esi
  add    $0x2,%r14
  call   <Mmofyr@plt>
  mov    %rbx,%rdi
  add    $0x3,%rbx
  mov    %eax,%esi
  call   <strcpy@plt>
  movzbl (%r14),%eax
  jmp    L117
  mov    0x8(%rsp),%edx
  lea    D0(%rip),%rsi
  mov    %rbx,%rdi
  call   <sprintf@plt>
  jmp    L188
  movslq 0x4(%rsp),%rax
  mov    %rbx,%rdi
  mov    %rax,%rdx
  imul   $0x51eb851f,%rax,%rax
  mov    %edx,%esi
  sar    $0x1f,%esi
  sar    $0x25,%rax
  sub    %esi,%eax
  mov    %r13,%rsi
  imul   $0x64,%eax,%eax
  sub    %eax,%edx
  call   <sprintf@plt>
  movzbl (%rbx),%eax
  test   %al,%al
  je     L14
L48:
  cmp    $0x20,%al
  je     L28
L47:
  movzbl 0x1(%rbx),%eax
  add    $0x1,%rbx
  test   %al,%al
  je     L14
  cmp    $0x20,%al
  jne    L47
L28:
  movb   $0x30,(%rbx)
  movzbl 0x1(%rbx),%eax
  add    $0x1,%rbx
  test   %al,%al
  jne    L48
  jmp    L14
  mov    0xc(%rsp),%edx
  mov    %r13,%rsi
  mov    %rbx,%rdi
  call   <sprintf@plt>
  movzbl (%rbx),%eax
  test   %al,%al
  je     L14
L271:
  cmp    $0x20,%al
  je     L215
L228:
  movzbl 0x1(%rbx),%eax
  add    $0x1,%rbx
  test   %al,%al
  je     L14
  cmp    $0x20,%al
  jne    L228
L215:
  movb   $0x30,(%rbx)
  movzbl 0x1(%rbx),%eax
  add    $0x1,%rbx
  test   %al,%al
  jne    L271
  jmp    L14
  mov    0x8(%rsp),%edx
  mov    %r13,%rsi
  mov    %rbx,%rdi
  call   <sprintf@plt>
  jmp    L188
  mov    0x8(%rsp),%edi
  xor    %esi,%esi
  call   <Mmofyr@plt>
  jmp    L231
  mov    0x4(%rsp),%edx
  lea    D29(%rip),%rsi
  mov    %rbx,%rdi
  call   <sprintf@plt>
  jmp    L188
L275:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: label: D7
type_infered: string
name: parse_data
arguments: label: D0
type_infered: string
name: parse_data
arguments: label: D29
type_infered: string

tool: D7: %02d

tool: D0: %d

tool: D29: %4d

assistant: ```c
char *DateFmt(char *buf, long dt, char *msk) {
  int y, m, d;
  char tmp[20], *bp = buf;
  if (dt <= 0L) {
    *buf = '\0';
    return (buf);
  }
  Date_ymd(dt, &y, &m, &d);
  while (*msk)
    if (*msk != '%')
      *bp++ = *msk++;
    else
      switch (*++msk) {
      case '\0':
        break;
      case '%':
      default:
        *bp++ = *msk++;
        break;
      case 'W':
      case 'w':
        strcpy(bp, Dyofwk(dt, NULL));
        bp += strlen(bp);
        msk++;
        break;
      case 'M':
        strcpy(bp, Mmofyr(m, NULL));
        bp += strlen(bp);
        msk++;
        break;
      case 'm':
        strcpy(bp, Mmofyr(m, NULL));
        bp += 3;
        msk++;
        break;
      case 'd':
        sprintf(bp, "%d", d);
        bp += strlen(bp);
        msk++;
        break;
      case 'D':
        sprintf(bp, "%02d", d);
        for (; *bp; ++bp)
          if (*bp == ' ')
            *bp = '0';
        msk++;
        break;
      case 'y':
        sprintf(bp, "%02d", y % 100);
        for (; *bp; ++bp)
          if (*bp == ' ')
            *bp = '0';
        msk++;
        break;
      case 'Y':
        sprintf(bp, "%4d", y);
        bp += strlen(bp);
        msk++;
        break;
      case 'S':
      case 's':
        strcpy(bp, Num_sufx(d));
        bp += strlen(bp);
        msk++;
        break;
      case 'n':
        sprintf(bp, "%d", m);
        bp += strlen(bp);
        msk++;
        break;
      case 'N':
        sprintf(bp, "%02d", m);
        bp += strlen(bp);
        msk++;
        break;
      case 'T':
      case 't':
        strcpy(bp, Time2(tmp));
        bp += strlen(bp);
        msk++;
        break;
      }
  *bp = '\0';
  return (buf);
}
```