user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<main>:
  endbr64
  push   %r15
  lea    D2(%rip),%rdi
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  lea    D204(%rip),%rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  call   <puts@plt>
  lea    D84(%rip),%rdi
  call   <puts@plt>
  lea    0x8(%rsp),%rsi
  mov    %rbp,%rdi
  call   <scanf@plt>
  mov    0x8(%rsp),%eax
  cmp    $0x1,%eax
  je     L263
  cmp    $0x2,%eax
  je     L223
  lea    D201(%rip),%rdi
  call   <puts@plt>
L26:
  lea    D36(%rip),%rdi
  call   <system@plt>
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L231
  add    $0x28,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L223:
  lea    D247(%rip),%rdi
  mov    $0x9,%ebx
  lea    0x14(%rsp),%r13
  call   <puts@plt>
  movl   $0x0,0x14(%rsp)
  lea    D59(%rip),%r15
  lea    D189(%rip),%r12
  nopl   0x0(%rax)
L94:
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <scanf@plt>
  mov    0x14(%rsp),%r14d
  cmp    $0xfffffc19,%r14d
  je     L26
  mov    %r14d,%edi
  call   <LeapCheck@plt>
  lea    -0x769(%r14),%edx
  mov    %eax,%r8d
  mov    %r14d,%eax
  sub    $0x76c,%eax
  cmovns %eax,%edx
  xor    %edi,%edi
  mov    %edx,%ecx
  movslq %eax,%rdx
  sar    $0x2,%ecx
  cmp    $0x1,%r8d
  mov    %eax,%r8d
  sete   %dil
  imul   $0x51eb851f,%rdx,%rdx
  sar    $0x1f,%r8d
  sar    $0x25,%rdx
  sub    %r8d,%edx
  lea    0x51eb858(,%rdx,4),%edx
  ror    $0x4,%edx
  cmp    $0xa3d70b,%edx
  sbb    %edi,%ecx
  add    %ecx,%eax
  movslq %eax,%rdx
  mov    %eax,%ecx
  imul   $0xffffffff92492493,%rdx,%rdx
  sar    $0x1f,%ecx
  shr    $0x20,%rdx
  add    %eax,%edx
  sar    $0x2,%edx
  sub    %ecx,%edx
  lea    0x0(,%rdx,8),%ecx
  sub    %edx,%ecx
  sub    %ecx,%eax
  cmp    $0x6,%eax
  ja     L253
  movslq (%r12,%rax,4),%rax
  mov    %r14d,%esi
  add    %r12,%rax
  notrack jmp *%rax
L263:
  lea    D9(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    0xc(%rsp),%rsi
  mov    %rbp,%rdi
  call   <scanf@plt>
  lea    D69(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    0x10(%rsp),%rsi
  mov    %rbp,%rdi
  call   <scanf@plt>
  mov    0x10(%rsp),%eax
  mov    0xc(%rsp),%r14d
  mov    %eax,%edx
  sub    %r14d,%edx
  cmp    $0x9,%edx
  jg     L124
  lea    D59(%rip),%r13
  lea    D43(%rip),%rbx
  lea    D119(%rip),%r12
  lea    D264(%rip),%rbp
  cmp    %r14d,%eax
  jl     L26
  xchg   %ax,%ax
L251:
  mov    %r14d,%edi
  call   <LeapCheck@plt>
  mov    %r14d,%ecx
  sub    $0x76c,%ecx
  mov    %eax,%r8d
  lea    -0x769(%r14),%eax
  cmovns %ecx,%eax
  movslq %ecx,%rdx
  xor    %esi,%esi
  mov    %ecx,%edi
  sar    $0x2,%eax
  cmp    $0x1,%r8d
  sete   %sil
  imul   $0x51eb851f,%rdx,%rdx
  sar    $0x1f,%edi
  sar    $0x25,%rdx
  sub    %edi,%edx
  lea    0x51eb858(,%rdx,4),%edx
  ror    $0x4,%edx
  cmp    $0xa3d70b,%edx
  sbb    %esi,%eax
  add    %ecx,%eax
  movslq %eax,%rdx
  mov    %eax,%ecx
  imul   $0xffffffff92492493,%rdx,%rdx
  sar    $0x1f,%ecx
  shr    $0x20,%rdx
  add    %eax,%edx
  sar    $0x2,%edx
  sub    %ecx,%edx
  lea    0x0(,%rdx,8),%ecx
  sub    %edx,%ecx
  sub    %ecx,%eax
  cmp    $0x6,%eax
  ja     L234
  movslq (%rbx,%rax,4),%rax
  mov    %r14d,%esi
  add    %rbx,%rax
  notrack jmp *%rax
  lea    D264(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  nopl   (%rax)
L53:
  sub    $0x1,%ebx
  jne    L94
  jmp    L26
  lea    D130(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L53
  lea    D34(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L53
  lea    D159(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L53
  lea    D138(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L53
  lea    D42(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L53
  lea    D119(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L53
  mov    %rbp,%rdi
  xor    %eax,%eax
  call   <printf@plt>
  nopl   0x0(%rax,%rax,1)
L86:
  add    $0x1,%r14d
  cmp    %r14d,0x10(%rsp)
  jge    L251
  jmp    L26
  lea    D130(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L86
  lea    D34(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L86
  lea    D159(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L86
  lea    D138(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L86
  lea    D42(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L86
  mov    %r12,%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L86
L124:
  lea    D140(%rip),%rdi
  call   <puts@plt>
  jmp    L26
L253:
  mov    %r15,%rdi
  call   <puts@plt>
  jmp    L53
L234:
  mov    %r13,%rdi
  call   <puts@plt>
  jmp    L86
L231:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: tag: D2
data_type: string
name: disassemble_data
arguments: tag: D204
data_type: string
name: disassemble_data
arguments: tag: D84
data_type: string
name: disassemble_data
arguments: tag: D201
data_type: string
name: disassemble_data
arguments: tag: D36
data_type: string
name: disassemble_data
arguments: tag: D247
data_type: string
name: disassemble_data
arguments: tag: D59
data_type: string
name: disassemble_data
arguments: tag: D9
data_type: string
name: disassemble_data
arguments: tag: D69
data_type: string
name: disassemble_data
arguments: tag: D119
data_type: string
name: disassemble_data
arguments: tag: D264
data_type: string
name: disassemble_data
arguments: tag: D130
data_type: string
name: disassemble_data
arguments: tag: D34
data_type: string
name: disassemble_data
arguments: tag: D159
data_type: string
name: disassemble_data
arguments: tag: D138
data_type: string
name: disassemble_data
arguments: tag: D42
data_type: string
name: disassemble_data
arguments: tag: D140
data_type: string

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

tool: D204: %d

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

tool: D201: 
Invalid operation

tool: D36: PAUSE

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

tool: D59: 
ERROR

tool: D9: 
Please enter the start year: 

tool: D69: 
Please enter the end year: 

tool: D119: 
%d Sunday


tool: D264: 
%d Saturday


tool: D130: 
%d Friday


tool: D34: 
%d Thursday


tool: D159: 
%d Wednesday


tool: D138: 
%d Tuesday


tool: D42: 
%d Monday


tool: D140: 
Year range is too great

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