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

```asm
<year_to_easter>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %edi,-0x24(%rbp)
  addl   $0x76c,-0x24(%rbp)
  mov    -0x24(%rbp),%eax
  movslq %eax,%rdx
  imul   $0x51eb851f,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0x5,%edx
  sar    $0x1f,%eax
  mov    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  mov    %eax,-0x20(%rbp)
  mov    -0x24(%rbp),%edx
  movslq %edx,%rax
  imul   $0x6bca1af3,%rax,%rax
  shr    $0x20,%rax
  sar    $0x3,%eax
  mov    %edx,%esi
  sar    $0x1f,%esi
  sub    %esi,%eax
  mov    %eax,%ecx
  mov    %ecx,%eax
  shl    $0x3,%eax
  add    %ecx,%eax
  add    %eax,%eax
  add    %ecx,%eax
  sub    %eax,%edx
  mov    %edx,-0x1c(%rbp)
  mov    -0x20(%rbp),%eax
  sub    $0x11,%eax
  movslq %eax,%rdx
  imul   $0x51eb851f,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0x3,%edx
  sar    $0x1f,%eax
  mov    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  mov    %eax,-0x18(%rbp)
  mov    -0x20(%rbp),%eax
  lea    0x3(%rax),%edx
  test   %eax,%eax
  cmovs  %edx,%eax
  sar    $0x2,%eax
  neg    %eax
  mov    %eax,%edx
  mov    -0x20(%rbp),%eax
  lea    (%rdx,%rax,1),%ecx
  mov    -0x20(%rbp),%eax
  sub    -0x18(%rbp),%eax
  movslq %eax,%rdx
  imul   $0x55555556,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0x1f,%eax
  sub    %edx,%eax
  add    %eax,%ecx
  mov    -0x1c(%rbp),%edx
  mov    %edx,%eax
  shl    $0x3,%eax
  add    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  add    %ecx,%eax
  add    $0xf,%eax
  movslq %eax,%rdx
  imul   $0xffffffff88888889,%rdx,%rdx
  shr    $0x20,%rdx
  add    %eax,%edx
  sar    $0x4,%edx
  mov    %eax,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%edx
  mov    %edx,-0x14(%rbp)
  mov    -0x14(%rbp),%edx
  imul   $0x1e,%edx,%edx
  sub    %edx,%eax
  mov    %eax,-0x14(%rbp)
  mov    -0x14(%rbp),%eax
  movslq %eax,%rdx
  imul   $0xffffffff92492493,%rdx,%rdx
  shr    $0x20,%rdx
  add    %eax,%edx
  sar    $0x4,%edx
  sar    $0x1f,%eax
  mov    %edx,%esi
  sub    %eax,%esi
  mov    -0x14(%rbp),%eax
  movslq %eax,%rdx
  imul   $0xffffffff92492493,%rdx,%rdx
  shr    $0x20,%rdx
  add    %eax,%edx
  sar    $0x4,%edx
  sar    $0x1f,%eax
  mov    %edx,%ecx
  sub    %eax,%ecx
  mov    -0x14(%rbp),%eax
  lea    0x1(%rax),%edi
  mov    $0x1d,%eax
  cltd
  idiv   %edi
  imul   %eax,%ecx
  mov    %ecx,%edx
  mov    $0x15,%eax
  sub    -0x1c(%rbp),%eax
  movslq %eax,%rcx
  imul   $0x2e8ba2e9,%rcx,%rcx
  shr    $0x20,%rcx
  sar    %ecx
  sar    $0x1f,%eax
  mov    %eax,%edi
  mov    %ecx,%eax
  sub    %edi,%eax
  imul   %eax,%edx
  mov    $0x1,%eax
  sub    %edx,%eax
  imul   %esi,%eax
  sub    %eax,-0x14(%rbp)
  mov    -0x24(%rbp),%eax
  lea    0x3(%rax),%edx
  test   %eax,%eax
  cmovs  %edx,%eax
  sar    $0x2,%eax
  mov    %eax,%edx
  mov    -0x24(%rbp),%eax
  add    %eax,%edx
  mov    -0x14(%rbp),%eax
  add    %edx,%eax
  add    $0x2,%eax
  sub    -0x20(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x20(%rbp),%eax
  lea    0x3(%rax),%edx
  test   %eax,%eax
  cmovs  %edx,%eax
  sar    $0x2,%eax
  add    %ecx,%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,-0x10(%rbp)
  mov    -0x10(%rbp),%ecx
  mov    %ecx,%edx
  shl    $0x3,%edx
  sub    %ecx,%edx
  sub    %edx,%eax
  mov    %eax,-0x10(%rbp)
  mov    -0x14(%rbp),%eax
  sub    -0x10(%rbp),%eax
  mov    %eax,-0xc(%rbp)
  mov    -0xc(%rbp),%eax
  add    $0x28,%eax
  movslq %eax,%rdx
  imul   $0x2e8ba2e9,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0x3,%edx
  sar    $0x1f,%eax
  mov    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  add    $0x3,%eax
  mov    %eax,-0x8(%rbp)
  mov    -0xc(%rbp),%eax
  lea    0x1c(%rax),%ecx
  mov    -0x8(%rbp),%eax
  lea    0x3(%rax),%edx
  test   %eax,%eax
  cmovs  %edx,%eax
  sar    $0x2,%eax
  neg    %eax
  mov    %eax,%edx
  mov    %edx,%eax
  shl    $0x5,%eax
  sub    %edx,%eax
  add    %ecx,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x24(%rbp),%eax
  lea    -0x76c(%rax),%ecx
  mov    -0x4(%rbp),%edx
  mov    -0x8(%rbp),%eax
  mov    %eax,%esi
  mov    %ecx,%edi
  call   <ymd_to_serial@plt>
  leave
  ret
```

assistant: ```c
unsigned long year_to_easter(int y) {
  int c, g, k, l, i, j, m, d;
  y = y + 1900;
  c = y / 100;
  g = y % 19;
  k = (c - 17) / 25;
  i = (c - c / 4 - (c - k) / 3 + 19 * g + 15) % 30;
  i = i - (i / 28) * (1 - (i / 28) * (29 / (i + 1)) * ((21 - g) / 11));
  j = (y + y / 4 + i + 2 - c + c / 4) % 7;
  l = i - j;
  m = 3 + (l + 40) / 44;
  d = l + 28 - 31 * (m / 4);
  return ymd_to_serial(y - 1900, m, d);
}
```