user: Please show me the C implementation that matches the assembly code listed below:

```asm
<hdate_days_from_3744>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %edi,-0x34(%rbp)
  mov    -0x34(%rbp),%eax
  sub    $0xea0,%eax
  mov    %eax,-0x20(%rbp)
  movl   $0x2093,-0x1c(%rbp)
  mov    -0x20(%rbp),%edx
  mov    %edx,%eax
  shl    $0x3,%eax
  sub    %edx,%eax
  add    $0x1,%eax
  movslq %eax,%rdx
  imul   $0x6bca1af3,%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),%edx
  mov    %edx,%eax
  shl    $0x3,%eax
  sub    %edx,%eax
  lea    0x1(%rax),%edx
  movslq %edx,%rax
  imul   $0x6bca1af3,%rax,%rax
  shr    $0x20,%rax
  sar    $0x3,%eax
  mov    %edx,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%eax
  mov    %eax,-0x14(%rbp)
  mov    -0x14(%rbp),%ecx
  mov    %ecx,%eax
  shl    $0x3,%eax
  add    %ecx,%eax
  add    %eax,%eax
  add    %ecx,%eax
  sub    %eax,%edx
  mov    %edx,-0x14(%rbp)
  mov    -0x20(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  shl    $0x2,%eax
  mov    %eax,%edx
  mov    -0x18(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x10(%rbp)
  mov    -0x10(%rbp),%eax
  imul   $0x9af9,%eax,%edx
  mov    -0x1c(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0xc(%rbp)
  mov    -0x10(%rbp),%eax
  imul   $0x1c,%eax,%ecx
  mov    -0xc(%rbp),%eax
  movslq %eax,%rdx
  imul   $0x50e89cc3,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0xd,%edx
  sar    $0x1f,%eax
  mov    %eax,%esi
  mov    %edx,%eax
  sub    %esi,%eax
  add    %ecx,%eax
  sub    $0x2,%eax
  mov    %eax,-0x28(%rbp)
  mov    -0xc(%rbp),%eax
  movslq %eax,%rdx
  imul   $0x2e3bc74b,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0xf,%edx
  mov    %eax,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%edx
  imul   $0x2c4c0,%edx,%edx
  sub    %edx,%eax
  mov    %eax,-0x8(%rbp)
  mov    -0xc(%rbp),%eax
  movslq %eax,%rdx
  imul   $0x50e89cc3,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0xd,%edx
  mov    %eax,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%edx
  imul   $0x6540,%edx,%edx
  sub    %edx,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  imul   $0x50e89cc3,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0xd,%edx
  sar    $0x1f,%eax
  mov    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  mov    %eax,-0x24(%rbp)
  cmpl   $0xb,-0x14(%rbp)
  jg     L1
  cmpl   $0x3,-0x24(%rbp)
  jne    L1
  cmpl   $0x4013,-0x4(%rbp)
  jg     L34
L1:
  cmpl   $0x6,-0x14(%rbp)
  jg     L58
  cmpl   $0x2,-0x24(%rbp)
  jne    L58
  cmpl   $0x5ae4,-0x4(%rbp)
  jle    L58
L34:
  addl   $0x1,-0x28(%rbp)
  addl   $0x1,-0x24(%rbp)
L58:
  cmpl   $0x1,-0x24(%rbp)
  je     L46
  cmpl   $0x4,-0x24(%rbp)
  je     L46
  cmpl   $0x6,-0x24(%rbp)
  jne    L38
L46:
  addl   $0x1,-0x28(%rbp)
L38:
  mov    -0x28(%rbp),%eax
  pop    %rbp
  ret
```

assistant: ```c
int hdate_days_from_3744(int hebrew_year) {
  int years_from_3744;
  int molad_3744;
  int leap_months;
  int leap_left;
  int months;
  int parts;
  int days;
  int parts_left_in_week;
  int parts_left_in_day;
  int week_day;
  years_from_3744 = hebrew_year - 3744;
  molad_3744 = ((1 + 6) * 1080 + 779);
  leap_months = (years_from_3744 * 7 + 1) / 19;
  leap_left = (years_from_3744 * 7 + 1) % 19;
  months = years_from_3744 * 12 + leap_months;
  parts = months * ((24 * 1080) + ((12) * 1080 + 793)) + molad_3744;
  days = months * 28 + parts / (24 * 1080) - 2;
  parts_left_in_week = parts % (7 * (24 * 1080));
  parts_left_in_day = parts % (24 * 1080);
  week_day = parts_left_in_week / (24 * 1080);
  if ((leap_left < 12 && week_day == 3 && parts_left_in_day >= ((9 + 6) * 1080 + 204)) || (leap_left < 7 && week_day == 2 && parts_left_in_day >= ((15 + 6) * 1080 + 589))) {
    days++, week_day++;
  }
  if (week_day == 1 || week_day == 4 || week_day == 6) {
    days++;
  }
  return days;
}
```