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

```asm
<Day>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %edi,%r15d
  mov    %esi,%r12d
  mov    %edx,%r14d
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  movl   $0x1f,(%rsp)
  movl   $0x1c,0x4(%rsp)
  movl   $0x1f,0x8(%rsp)
  movl   $0x1e,0xc(%rsp)
  movl   $0x1f,0x10(%rsp)
  movl   $0x1e,0x14(%rsp)
  movl   $0x1f,0x18(%rsp)
  movl   $0x1f,0x1c(%rsp)
  movl   $0x1e,0x20(%rsp)
  movl   $0x1f,0x24(%rsp)
  movl   $0x1e,0x28(%rsp)
  movl   $0x1f,0x2c(%rsp)
  call   <Leap@plt>
  mov    %eax,%r13d
  lea    -0x1(%r15),%eax
  cmp    $0x270e,%eax
  ja     L15
  lea    -0x1(%r12),%eax
  cmp    $0xb,%eax
  ja     L256
  cmp    $0x2,%r12d
  je     L219
  lea    -0x1(%r12),%eax
  cltq
  cmp    %r14d,(%rsp,%rax,4)
  jl     L37
L53:
  test   %r14d,%r14d
  jle    L207
  cmp    $0x1,%r15d
  jle    L259
  mov    $0x1,%ebx
  mov    $0x1,%ebp
  jmp    L257
L219:
  lea    0x1c(%r13),%eax
  cmp    %r14d,%eax
  jge    L53
  mov    $0xfffffffd,%eax
  jmp    L105
L195:
  lea    0x16d(%rbx),%eax
  movslq %eax,%rbx
  imul   $0xffffffff92492493,%rbx,%rbx
  shr    $0x20,%rbx
  add    %eax,%ebx
  sar    $0x2,%ebx
  cltd
  sub    %edx,%ebx
  lea    0x0(,%rbx,8),%edx
  sub    %ebx,%edx
  sub    %edx,%eax
  mov    %eax,%ebx
L214:
  add    $0x1,%ebp
  cmp    %ebp,%r15d
  je     L222
L257:
  mov    %ebp,%edi
  call   <Leap@plt>
  test   %eax,%eax
  je     L195
  lea    0x16e(%rbx),%eax
  movslq %eax,%rbx
  imul   $0xffffffff92492493,%rbx,%rbx
  shr    $0x20,%rbx
  add    %eax,%ebx
  sar    $0x2,%ebx
  cltd
  sub    %edx,%ebx
  lea    0x0(,%rbx,8),%edx
  sub    %ebx,%edx
  sub    %edx,%eax
  mov    %eax,%ebx
  jmp    L214
L259:
  mov    $0x1,%ebx
L222:
  cmp    $0x1,%r12d
  jle    L134
  mov    $0x1,%ecx
  mov    $0x1,%eax
  jmp    L126
L114:
  test   %r13d,%r13d
  je     L154
  lea    0x1d(%rbx),%edx
  movslq %edx,%rbx
  imul   $0xffffffff92492493,%rbx,%rbx
  shr    $0x20,%rbx
  add    %edx,%ebx
  sar    $0x2,%ebx
  mov    %edx,%esi
  sar    $0x1f,%esi
  sub    %esi,%ebx
  lea    0x0(,%rbx,8),%esi
  sub    %ebx,%esi
  sub    %esi,%edx
  mov    %edx,%ebx
  jmp    L20
L154:
  lea    0x1c(%rbx),%edx
  movslq %edx,%rbx
  imul   $0xffffffff92492493,%rbx,%rbx
  shr    $0x20,%rbx
  add    %edx,%ebx
  sar    $0x2,%ebx
  mov    %edx,%esi
  sar    $0x1f,%esi
  sub    %esi,%ebx
  lea    0x0(,%rbx,8),%esi
  sub    %ebx,%esi
  sub    %esi,%edx
  mov    %edx,%ebx
  jmp    L20
L93:
  lea    0x1e(%rbx),%edx
  movslq %edx,%rbx
  imul   $0xffffffff92492493,%rbx,%rbx
  shr    $0x20,%rbx
  add    %edx,%ebx
  sar    $0x2,%ebx
  mov    %edx,%esi
  sar    $0x1f,%esi
  sub    %esi,%ebx
  lea    0x0(,%rbx,8),%esi
  sub    %ebx,%esi
  sub    %esi,%edx
  mov    %edx,%ebx
L20:
  add    $0x1,%ecx
  cmp    %ecx,%r12d
  je     L134
L126:
  cmp    $0xb,%ecx
  ja     L128
  mov    %rax,%rdx
  shl    %cl,%rdx
  test   $0xa50,%edx
  jne    L93
  cmp    $0x2,%ecx
  je     L114
L128:
  lea    0x1f(%rbx),%edx
  movslq %edx,%rbx
  imul   $0xffffffff92492493,%rbx,%rbx
  shr    $0x20,%rbx
  add    %edx,%ebx
  sar    $0x2,%ebx
  mov    %edx,%esi
  sar    $0x1f,%esi
  sub    %esi,%ebx
  lea    0x0(,%rbx,8),%esi
  sub    %ebx,%esi
  sub    %esi,%edx
  mov    %edx,%ebx
  jmp    L20
L134:
  lea    -0x1(%rbx,%r14,1),%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
L105:
  mov    0x38(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L232
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L15:
  mov    $0xffffffff,%eax
  jmp    L105
L256:
  mov    $0xfffffffe,%eax
  jmp    L105
L37:
  mov    $0xfffffffd,%eax
  jmp    L105
L207:
  mov    $0xfffffffd,%eax
  jmp    L105
L232:
  call   <__stack_chk_fail@plt>
```

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