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

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  lea    D113(%rip),%rdi
  call   <puts@plt>
  lea    D19(%rip),%rdi
  call   <puts@plt>
  lea    0x8(%rsp),%rsi
  lea    D166(%rip),%rdi
  call   <scanf@plt>
  mov    0x8(%rsp),%eax
  cmp    $0x1,%eax
  je     L242
  cmp    $0x2,%eax
  je     L73
  lea    D198(%rip),%rdi
  call   <puts@plt>
L134:
  lea    D164(%rip),%rdi
  call   <system@plt>
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L171
  mov    $0x0,%eax
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L242:
  lea    D80(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    0xc(%rsp),%rsi
  lea    D166(%rip),%rbx
  mov    %rbx,%rdi
  call   <scanf@plt>
  lea    D150(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    0x10(%rsp),%rsi
  mov    %rbx,%rdi
  call   <scanf@plt>
  mov    0x10(%rsp),%eax
  mov    0xc(%rsp),%ebx
  mov    %eax,%edx
  sub    %ebx,%edx
  cmp    $0x9,%edx
  jg     L206
  lea    D3(%rip),%r14
  lea    D53(%rip),%rbp
  lea    D121(%rip),%r13
  lea    D141(%rip),%r12
  cmp    %ebx,%eax
  jge    L160
  jmp    L134
L206:
  lea    D41(%rip),%rdi
  call   <puts@plt>
  jmp    L134
  mov    %ebx,%esi
  lea    D99(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L41:
  add    $0x1,%ebx
  cmp    %ebx,0x10(%rsp)
  jl     L134
L160:
  mov    %ebx,%edi
  call   <LeapCheck@plt>
  lea    -0x769(%rbx),%ecx
  mov    %ebx,%edx
  sub    $0x76c,%edx
  cmovns %edx,%ecx
  sar    $0x2,%ecx
  cmp    $0x1,%eax
  sete   %sil
  movzbl %sil,%esi
  movslq %edx,%rax
  imul   $0x51eb851f,%rax,%rax
  sar    $0x25,%rax
  mov    %edx,%edi
  sar    $0x1f,%edi
  sub    %edi,%eax
  imul   $0x64,%eax,%eax
  add    $0xc8,%eax
  movslq %eax,%rdi
  imul   $0x51eb851f,%rdi,%rdi
  sar    $0x27,%rdi
  mov    %eax,%r8d
  sar    $0x1f,%r8d
  sub    %r8d,%edi
  imul   $0x190,%edi,%edi
  sub    %edi,%eax
  cmp    $0x1,%eax
  sbb    %esi,%ecx
  lea    (%rdx,%rcx,1),%eax
  movslq %eax,%rdx
  imul   $0xffffffff92492493,%rdx,%rdx
  shr    $0x20,%rdx
  add    %eax,%edx
  sar    $0x2,%edx
  mov    %eax,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%edx
  lea    0x0(,%rdx,8),%ecx
  sub    %edx,%ecx
  sub    %ecx,%eax
  cmp    $0x6,%eax
  ja     L159
  mov    %eax,%eax
  movslq 0x0(%rbp,%rax,4),%rax
  add    %rbp,%rax
  notrack jmp *%rax
  mov    %ebx,%esi
  lea    D59(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L41
  mov    %ebx,%esi
  lea    D97(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L41
  mov    %ebx,%esi
  lea    D241(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L41
  mov    %ebx,%esi
  lea    D112(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L41
  mov    %ebx,%esi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L41
  mov    %ebx,%esi
  mov    %r13,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L41
L159:
  mov    %r14,%rdi
  call   <puts@plt>
  jmp    L41
L73:
  lea    D185(%rip),%rdi
  call   <puts@plt>
  movl   $0x0,0x14(%rsp)
  mov    $0x9,%ebp
  lea    D166(%rip),%r13
  lea    D3(%rip),%r15
  lea    D8(%rip),%r12
  lea    D121(%rip),%r14
  jmp    L162
  mov    %ebx,%esi
  lea    D99(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L229:
  sub    $0x1,%ebp
  je     L134
L162:
  lea    0x14(%rsp),%rsi
  mov    %r13,%rdi
  call   <scanf@plt>
  mov    0x14(%rsp),%ebx
  cmp    $0xfffffc19,%ebx
  je     L134
  mov    %ebx,%edi
  call   <LeapCheck@plt>
  lea    -0x769(%rbx),%edx
  mov    %ebx,%esi
  sub    $0x76c,%esi
  cmovns %esi,%edx
  sar    $0x2,%edx
  cmp    $0x1,%eax
  sete   %dil
  movzbl %dil,%edi
  movslq %esi,%rax
  imul   $0x51eb851f,%rax,%rax
  sar    $0x25,%rax
  mov    %esi,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%eax
  imul   $0x64,%eax,%eax
  add    $0xc8,%eax
  movslq %eax,%rcx
  imul   $0x51eb851f,%rcx,%rcx
  sar    $0x27,%rcx
  mov    %eax,%r8d
  sar    $0x1f,%r8d
  sub    %r8d,%ecx
  imul   $0x190,%ecx,%ecx
  sub    %ecx,%eax
  cmp    $0x1,%eax
  sbb    %edi,%edx
  add    %esi,%edx
  movslq %edx,%rax
  imul   $0xffffffff92492493,%rax,%rax
  shr    $0x20,%rax
  add    %edx,%eax
  sar    $0x2,%eax
  mov    %edx,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%eax
  lea    0x0(,%rax,8),%ecx
  sub    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  cmp    $0x6,%eax
  ja     L108
  mov    %eax,%eax
  movslq (%r12,%rax,4),%rax
  add    %r12,%rax
  notrack jmp *%rax
  mov    %ebx,%esi
  lea    D59(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L229
  mov    %ebx,%esi
  lea    D97(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L229
  mov    %ebx,%esi
  lea    D241(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L229
  mov    %ebx,%esi
  lea    D112(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L229
  mov    %ebx,%esi
  lea    D141(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L229
  mov    %ebx,%esi
  mov    %r14,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L229
L108:
  mov    %r15,%rdi
  call   <puts@plt>
  jmp    L229
L171:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: tag: D113
type_infered: string
name: extract_symbolic_data
arguments: tag: D19
type_infered: string
name: extract_symbolic_data
arguments: tag: D166
type_infered: string
name: extract_symbolic_data
arguments: tag: D198
type_infered: string
name: extract_symbolic_data
arguments: tag: D164
type_infered: string
name: extract_symbolic_data
arguments: tag: D80
type_infered: string
name: extract_symbolic_data
arguments: tag: D150
type_infered: string
name: extract_symbolic_data
arguments: tag: D3
type_infered: string
name: extract_symbolic_data
arguments: tag: D121
type_infered: string
name: extract_symbolic_data
arguments: tag: D141
type_infered: string
name: extract_symbolic_data
arguments: tag: D41
type_infered: string
name: extract_symbolic_data
arguments: tag: D99
type_infered: string
name: extract_symbolic_data
arguments: tag: D59
type_infered: string
name: extract_symbolic_data
arguments: tag: D97
type_infered: string
name: extract_symbolic_data
arguments: tag: D241
type_infered: string
name: extract_symbolic_data
arguments: tag: D112
type_infered: string
name: extract_symbolic_data
arguments: tag: D185
type_infered: string

tool: D113: In this Leap year calculator 10 years is the maximum that are checked for

tool: D19: Would you like to enter   1) A range   or    2) Set of years?

tool: D166: %d

tool: D198: 
Invalid operation

tool: D164: PAUSE

tool: D80: 
Please enter the start year: 

tool: D150: 
Please enter the end year: 

tool: D3: 
ERROR

tool: D121: 
%d Sunday


tool: D141: 
%d Saturday


tool: D41: 
Year range is too great

tool: D99: 
%d Monday


tool: D59: 
%d Tuesday


tool: D97: 
%d Wednesday


tool: D241: 
%d Thursday


tool: D112: 
%d Friday


tool: D185: 
Enter -999 to end entry. 10 Entries Max

assistant: ```c
int main() {
  const int YEAR = 1900;
  int nYears[10][3], nOperation, nStartYear, nEndYear, nYearDays, nYearEntry, i, j, n;
  printf("In this Leap year calculator 10 years is the maximum that are checked for\n");
  printf("Would you like to enter   1) A range   or    2) Set of years?\n");
  scanf("%d", &nOperation);
  if (nOperation == 1) {
    printf("\nPlease enter the start year: ");
    scanf("%d", &nStartYear);
    printf("\nPlease enter the end year: ");
    scanf("%d", &nEndYear);
    if ((nEndYear - nStartYear) > 9)
      printf("\nYear range is too great\n");
    else {
      n = 0;
      for (j = 0, i = nStartYear; j < 10, i < nEndYear + 1; j++, i++) {
        nYears[j][0] = i;
        nYears[j][1] = LeapCheck(nYears[j][0]);
        n = (int)(nYears[j][0] - YEAR) / 4;
        if ((nYears[j][1] == 1))
          n--;
        if (((((nYears[j][0] - YEAR) - ((nYears[j][0] - YEAR) % 100)) + 200) % 400) == 0)
          n--;
        nYears[j][2] = (int)((nYears[j][0] - YEAR) + n) % 7;
        switch (nYears[j][2]) {
        case 0:
          printf("\n%d Monday\n", nYears[j][0]);
          break;
        case 1:
          printf("\n%d Tuesday\n", nYears[j][0]);
          break;
        case 2:
          printf("\n%d Wednesday\n", nYears[j][0]);
          break;
        case 3:
          printf("\n%d Thursday\n", nYears[j][0]);
          break;
        case 4:
          printf("\n%d Friday\n", nYears[j][0]);
          break;
        case 5:
          printf("\n%d Saturday\n", nYears[j][0]);
          break;
        case 6:
          printf("\n%d Sunday\n", nYears[j][0]);
          break;
        default:
          printf("\nERROR\n");
        }
      }
    }
  } else if (nOperation == 2) {
    printf("\nEnter -999 to end entry. 10 Entries Max\n");
    i = 0;
    nYearEntry = 0;
    for (i = 0; i < 9; i++) {
      scanf("%d", &nYearEntry);
      if (nYearEntry == -999)
        break;
      else {
        nYears[i][0] = nYearEntry;
        nYears[i][1] = LeapCheck(nYears[i][0]);
        n = (int)(nYears[i][0] - YEAR) / 4;
        if (nYears[i][1] == 1)
          n--;
        if (((((nYears[i][0] - YEAR) - ((nYears[i][0] - YEAR) % 100)) + 200) % 400) == 0)
          n--;
        nYears[i][2] = (int)((nYears[i][0] - YEAR) + n) % 7;
        switch (nYears[i][2]) {
        case 0:
          printf("\n%d Monday\n", nYears[i][0]);
          break;
        case 1:
          printf("\n%d Tuesday\n", nYears[i][0]);
          break;
        case 2:
          printf("\n%d Wednesday\n", nYears[i][0]);
          break;
        case 3:
          printf("\n%d Thursday\n", nYears[i][0]);
          break;
        case 4:
          printf("\n%d Friday\n", nYears[i][0]);
          break;
        case 5:
          printf("\n%d Saturday\n", nYears[i][0]);
          break;
        case 6:
          printf("\n%d Sunday\n", nYears[i][0]);
          break;
        default:
          printf("\nERROR\n");
        }
      }
    }
  } else {
    printf("\nInvalid operation\n");
  }
  system("PAUSE");
  return 0;
}
```