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

```asm
<Day>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x60,%rsp
  mov    %edi,-0x54(%rbp)
  mov    %esi,-0x58(%rbp)
  mov    %edx,-0x5c(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x1f,-0x40(%rbp)
  movl   $0x1c,-0x3c(%rbp)
  movl   $0x1f,-0x38(%rbp)
  movl   $0x1e,-0x34(%rbp)
  movl   $0x1f,-0x30(%rbp)
  movl   $0x1e,-0x2c(%rbp)
  movl   $0x1f,-0x28(%rbp)
  movl   $0x1f,-0x24(%rbp)
  movl   $0x1e,-0x20(%rbp)
  movl   $0x1f,-0x1c(%rbp)
  movl   $0x1e,-0x18(%rbp)
  movl   $0x1f,-0x14(%rbp)
  mov    -0x54(%rbp),%eax
  mov    %eax,%edi
  call   <Leap@plt>
  mov    %eax,-0x44(%rbp)
  cmpl   $0x0,-0x54(%rbp)
  jle    L74
  cmpl   $0x270f,-0x54(%rbp)
  jle    L13
L74:
  mov    $0xffffffff,%eax
  jmp    L107
L13:
  cmpl   $0xc,-0x58(%rbp)
  jg     L179
  cmpl   $0x0,-0x58(%rbp)
  jg     L193
L179:
  mov    $0xfffffffe,%eax
  jmp    L107
L193:
  cmpl   $0x2,-0x58(%rbp)
  jne    L255
  mov    -0x58(%rbp),%eax
  sub    $0x1,%eax
  cltq
  mov    -0x40(%rbp,%rax,4),%edx
  mov    -0x44(%rbp),%eax
  add    %edx,%eax
  cmp    %eax,-0x5c(%rbp)
  jle    L255
  mov    $0xfffffffd,%eax
  jmp    L107
L255:
  mov    -0x58(%rbp),%eax
  sub    $0x1,%eax
  cltq
  mov    -0x40(%rbp,%rax,4),%eax
  cmp    %eax,-0x5c(%rbp)
  jle    L75
  cmpl   $0x2,-0x58(%rbp)
  jne    L191
L75:
  cmpl   $0x0,-0x5c(%rbp)
  jg     L169
L191:
  mov    $0xfffffffd,%eax
  jmp    L107
L169:
  movl   $0x0,-0x4c(%rbp)
  movl   $0x1,-0x48(%rbp)
  movl   $0x1,-0x4c(%rbp)
  jmp    L232
L55:
  mov    -0x4c(%rbp),%eax
  mov    %eax,%edi
  call   <Leap@plt>
  test   %eax,%eax
  je     L80
  mov    -0x48(%rbp),%eax
  add    $0x16e,%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
  mov    %edx,-0x48(%rbp)
  mov    -0x48(%rbp),%ecx
  mov    %ecx,%edx
  shl    $0x3,%edx
  sub    %ecx,%edx
  sub    %edx,%eax
  mov    %eax,-0x48(%rbp)
  jmp    L195
L80:
  mov    -0x48(%rbp),%eax
  add    $0x16d,%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
  mov    %edx,-0x48(%rbp)
  mov    -0x48(%rbp),%ecx
  mov    %ecx,%edx
  shl    $0x3,%edx
  sub    %ecx,%edx
  sub    %edx,%eax
  mov    %eax,-0x48(%rbp)
L195:
  addl   $0x1,-0x4c(%rbp)
L232:
  mov    -0x4c(%rbp),%eax
  cmp    -0x54(%rbp),%eax
  jl     L55
  movl   $0x1,-0x4c(%rbp)
  jmp    L226
L124:
  mov    -0x4c(%rbp),%eax
  cmp    $0xb,%eax
  seta   %dl
  test   %dl,%dl
  jne    L82
  mov    $0x1,%edx
  mov    %eax,%ecx
  shl    %cl,%rdx
  mov    %rdx,%rax
  mov    %rax,%rdx
  and    $0xa50,%edx
  test   %rdx,%rdx
  setne  %dl
  test   %dl,%dl
  jne    L34
  and    $0x4,%eax
  test   %rax,%rax
  setne  %al
  test   %al,%al
  je     L82
  cmpl   $0x0,-0x44(%rbp)
  je     L12
  mov    -0x48(%rbp),%eax
  add    $0x1d,%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
  mov    %edx,-0x48(%rbp)
  mov    -0x48(%rbp),%ecx
  mov    %ecx,%edx
  shl    $0x3,%edx
  sub    %ecx,%edx
  sub    %edx,%eax
  mov    %eax,-0x48(%rbp)
  jmp    L216
L12:
  mov    -0x48(%rbp),%eax
  add    $0x1c,%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
  mov    %edx,-0x48(%rbp)
  mov    -0x48(%rbp),%ecx
  mov    %ecx,%edx
  shl    $0x3,%edx
  sub    %ecx,%edx
  sub    %edx,%eax
  mov    %eax,-0x48(%rbp)
  jmp    L216
L34:
  mov    -0x48(%rbp),%eax
  add    $0x1e,%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
  mov    %edx,-0x48(%rbp)
  mov    -0x48(%rbp),%ecx
  mov    %ecx,%edx
  shl    $0x3,%edx
  sub    %ecx,%edx
  sub    %edx,%eax
  mov    %eax,-0x48(%rbp)
  jmp    L216
L82:
  mov    -0x48(%rbp),%eax
  add    $0x1f,%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
  mov    %edx,-0x48(%rbp)
  mov    -0x48(%rbp),%ecx
  mov    %ecx,%edx
  shl    $0x3,%edx
  sub    %ecx,%edx
  sub    %edx,%eax
  mov    %eax,-0x48(%rbp)
L216:
  addl   $0x1,-0x4c(%rbp)
L226:
  mov    -0x4c(%rbp),%eax
  cmp    -0x58(%rbp),%eax
  jl     L124
  mov    -0x48(%rbp),%edx
  mov    -0x5c(%rbp),%eax
  add    %edx,%eax
  sub    $0x1,%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
  mov    %edx,-0x48(%rbp)
  mov    -0x48(%rbp),%ecx
  mov    %ecx,%edx
  shl    $0x3,%edx
  sub    %ecx,%edx
  sub    %edx,%eax
  mov    %eax,-0x48(%rbp)
  mov    -0x48(%rbp),%eax
L107:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L242
  call   <__stack_chk_fail@plt>
L242:
  leave
  ret
```

assistant: ```c
int Day(int y, int m, int d) {
  int day_tab[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
  int k = Leap(y);
  if (y <= 0 || y > 9999)
    return -1;
  else if (m > 12 || m <= 0)
    return -2;
  else if (m == 2 && d > day_tab[m - 1] + k)
    return -3;
  else if ((d > day_tab[m - 1] && m != 2) || d <= 0)
    return -3;
  int i = 0, n = 1;
  for (i = 1; i < y; i++) {
    if (Leap(i))
      n = (n + 366) % 7;
    else
      n = (n + 365) % 7;
  }
  for (i = 1; i < m; i++) {
    switch (i) {
    case 2:
      if (k) {
        n = (n + 29) % 7;
      } else {
        n = (n + 28) % 7;
      }
      break;
    case 4:
    case 6:
    case 9:
    case 11:
      n = (n + 30) % 7;
      break;
    default:
      n = (n + 31) % 7;
    }
  }
  n = (n + d - 1) % 7;
  return n;
}
```