user: Converte this assembly snippet into its equivalent C code:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x10,%rsp
  lea    D61(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x2,%edi
  call   <sleep@plt>
  lea    D116(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x7dc,%edi
  call   <Checkleapyear@plt>
  mov    %eax,%esi
  lea    D104(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D118(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x7db,%edi
  call   <Checkleapyear@plt>
  mov    %eax,%esi
  lea    D104(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D84(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x2,%edi
  call   <sleep@plt>
  mov    $0x7dc,%edi
  call   <Checkyear@plt>
  mov    %eax,%r14d
  mov    $0x841,%edi
  call   <Checkyear@plt>
  mov    %eax,%r13d
  mov    $0xd,%edi
  call   <Checkyear@plt>
  mov    %eax,%r12d
  mov    $0x59,%edi
  call   <Checkyear@plt>
  mov    %eax,%ebx
  mov    $0xffffff90,%edi
  call   <Checkyear@plt>
  mov    %r14d,%r9d
  mov    %r13d,%r8d
  mov    %r12d,%ecx
  mov    %ebx,%edx
  mov    %eax,%esi
  lea    D102(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D92(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x2,%edi
  call   <sleep@plt>
  mov    $0xd,%edi
  call   <Checkmonth@plt>
  mov    %eax,%r13d
  mov    $0xc,%edi
  call   <Checkmonth@plt>
  mov    %eax,%r12d
  mov    $0x1,%edi
  call   <Checkmonth@plt>
  mov    %eax,%ebx
  mov    $0x0,%edi
  call   <Checkmonth@plt>
  mov    %r13d,%r8d
  mov    %r12d,%ecx
  mov    %ebx,%edx
  mov    %eax,%esi
  lea    D123(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D92(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x2,%edi
  call   <sleep@plt>
  lea    D16(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  movl   $0x0,-0x24(%rbp)
  jmp    L6
L5:
  mov    -0x24(%rbp),%eax
  mov    $0x7dd,%esi
  mov    %eax,%edi
  call   <Dayinmonth@plt>
  mov    %eax,%edx
  mov    -0x24(%rbp),%eax
  mov    %eax,%esi
  lea    D127(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x7a120,%edi
  call   <usleep@plt>
  addl   $0x1,-0x24(%rbp)
L6:
  cmpl   $0xd,-0x24(%rbp)
  jle    L5
  mov    $0x7dc,%esi
  mov    $0x2,%edi
  call   <Dayinmonth@plt>
  mov    %eax,%esi
  lea    D121(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x2,%edi
  call   <sleep@plt>
  mov    $0x7dd,%edx
  mov    $0x2,%esi
  mov    $0x1d,%edi
  call   <Checkday@plt>
  mov    %eax,%ebx
  mov    $0x7dc,%edx
  mov    $0x2,%esi
  mov    $0x1d,%edi
  call   <Checkday@plt>
  mov    %ebx,%edx
  mov    %eax,%esi
  lea    D132(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x0,%eax
  add    $0x10,%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %rbp
  ret
```

tool_calls: name: unpack_data
arguments: tag: D61
type_guessed: string
name: unpack_data
arguments: tag: D116
type_guessed: string
name: unpack_data
arguments: tag: D104
type_guessed: string
name: unpack_data
arguments: tag: D118
type_guessed: string
name: unpack_data
arguments: tag: D84
type_guessed: string
name: unpack_data
arguments: tag: D102
type_guessed: string
name: unpack_data
arguments: tag: D92
type_guessed: string
name: unpack_data
arguments: tag: D123
type_guessed: string
name: unpack_data
arguments: tag: D16
type_guessed: string
name: unpack_data
arguments: tag: D127
type_guessed: string
name: unpack_data
arguments: tag: D121
type_guessed: string
name: unpack_data
arguments: tag: D132
type_guessed: string

tool: D61: This Program may test checkdate.c whether is worked.

tool: D116: 	Now Test 'Checkleapyear()'
	you can see 2012 is 1, 2011 is 0
	Test 2012: 

tool: D104: %d

tool: D118: 
	Test 2011: 

tool: D84: 
Test Complete!

tool: D102: 	Now Test 'Checkyear()'
	you can see -112 is -1, 89 is 191, 13 is 201, 2113 is 0, 2012 is 1
	Test -112: %d
	Test 89: %d
	Test 13: %d
	Test 2113: %d
	Test 2012: %d


tool: D92: Test Complete!

tool: D123: 	Now Test 'Checkmonth()'
	you can see 0 is 0, 1 is 1, 12 is 1, 13 is 0
	Test 0: %d
	Test 1: %d
	Test 12: %d
	Test 13: %d


tool: D16: 	Now Test 'Dayinmonth()'
	you can see year of 2013, each month has the days and 2012 leap year has 29 in Feb

tool: D127: This is %d month you can see %d


tool: D121: This is 2 month in 2012 you can see %d
	Test Complete!


tool: D132: 	Now Test 'Checkday()'
	you can see 2012-02-29 is legeled(1), 2013-02-29 is illegeled(0)
	Test 2012-02-29: %d
	Test 2013-02-29: %d
Test Complete!
Exitting...


assistant: ```c
int main(void) {
  int i;
  printf("This Program may test checkdate.c whether is worked.\n");
  sleep(2);
  printf("\tNow Test 'Checkleapyear()'\n"
         "\tyou can see 2012 is 1, 2011 is 0\n"
         "\tTest 2012: ");
  printf("%d", Checkleapyear(2012));
  printf("\n\tTest 2011: ");
  printf("%d", Checkleapyear(2011));
  printf("\nTest Complete!\n");
  sleep(2);
  printf("\tNow Test 'Checkyear()'\n"
         "\tyou can see -112 is -1, 89 is 191, 13 is 201, 2113 is 0, 2012 is 1\n"
         "\tTest -112: %d\n\tTest 89: %d\n\tTest 13: %d\n\tTest 2113: %d\n\tTest 2012: %d\n",
         Checkyear(-112), Checkyear(89), Checkyear(13), Checkyear(2113), Checkyear(2012));
  printf("Test Complete!\n");
  sleep(2);
  printf("\tNow Test 'Checkmonth()'\n"
         "\tyou can see 0 is 0, 1 is 1, 12 is 1, 13 is 0\n"
         "\tTest 0: %d\n\tTest 1: %d\n\tTest 12: %d\n\tTest 13: %d\n",
         Checkmonth(0), Checkmonth(1), Checkmonth(12), Checkmonth(13));
  printf("Test Complete!\n");
  sleep(2);
  printf("\tNow Test 'Dayinmonth()'\n"
         "\tyou can see year of 2013, each month has the days and 2012 leap year has 29 in Feb\n");
  for (i = 0; i < 14; i++) {
    printf("This is %d month you can see %d\n", i, Dayinmonth(i, 2013));
    usleep(500000);
  }
  printf("This is 2 month in 2012 you can see %d\n\tTest Complete!\n", Dayinmonth(2, 2012));
  sleep(2);
  printf("\tNow Test 'Checkday()'\n"
         "\tyou can see 2012-02-29 is legeled(1), 2013-02-29 is illegeled(0)\n"
         "\tTest 2012-02-29: %d\n\tTest 2013-02-29: %d\nTest Complete!\nExitting...\n",
         Checkday(29, 2, 2012), Checkday(29, 2, 2013));
  return 0;
}
```