user: 下面的汇编指令对应的C源代码是什么:

```asm
<week_num>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  mov    (%rax),%eax
  lea    0x7(%rax),%esi
  mov    -0x18(%rbp),%rax
  mov    0x4(%rax),%eax
  add    $0x6,%eax
  movslq %eax,%rdx
  imul   $0xffffffff92492493,%rdx,%rdx
  shr    $0x20,%rdx
  add    %eax,%edx
  sar    $0x2,%edx
  mov    %eax,%edi
  sar    $0x1f,%edi
  mov    %edx,%ecx
  sub    %edi,%ecx
  mov    %ecx,%edx
  shl    $0x3,%edx
  sub    %ecx,%edx
  sub    %edx,%eax
  mov    %eax,%ecx
  mov    %esi,%eax
  sub    %ecx,%eax
  movslq %eax,%rdx
  imul   $0xffffffff92492493,%rdx,%rdx
  shr    $0x20,%rdx
  add    %eax,%edx
  sar    $0x2,%edx
  sar    $0x1f,%eax
  mov    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  mov    %eax,-0xc(%rbp)
  mov    -0x18(%rbp),%rax
  mov    0x4(%rax),%edx
  mov    -0x18(%rbp),%rax
  mov    (%rax),%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  lea    0x171(%rax),%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
  mov    %eax,%ecx
  shl    $0x3,%ecx
  sub    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  cmp    $0x2,%eax
  jg     L99
  addl   $0x1,-0xc(%rbp)
L99:
  cmpl   $0x0,-0xc(%rbp)
  jne    L53
  movl   $0x34,-0xc(%rbp)
  mov    -0x18(%rbp),%rax
  mov    0x4(%rax),%edx
  mov    -0x18(%rbp),%rax
  mov    (%rax),%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  add    $0x6,%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,-0x4(%rbp)
  mov    -0x4(%rbp),%ecx
  mov    %ecx,%edx
  shl    $0x3,%edx
  sub    %ecx,%edx
  sub    %edx,%eax
  mov    %eax,-0x4(%rbp)
  cmpl   $0x4,-0x4(%rbp)
  je     L48
  cmpl   $0x5,-0x4(%rbp)
  jne    L59
  mov    -0x18(%rbp),%rax
  mov    0x8(%rax),%eax
  movslq %eax,%rdx
  imul   $0x51eb851f,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0x7,%edx
  mov    %eax,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%edx
  imul   $0x190,%edx,%ecx
  sub    %ecx,%eax
  mov    %eax,%edx
  lea    -0x1(%rdx),%eax
  mov    %eax,%edi
  call   <is_leap@plt>
  test   %rax,%rax
  je     L59
L48:
  addl   $0x1,-0xc(%rbp)
  jmp    L59
L53:
  cmpl   $0x35,-0xc(%rbp)
  jne    L59
  mov    -0x18(%rbp),%rax
  mov    0x4(%rax),%edx
  mov    -0x18(%rbp),%rax
  mov    (%rax),%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  add    $0x173,%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,-0x8(%rbp)
  mov    -0x8(%rbp),%ecx
  mov    %ecx,%edx
  shl    $0x3,%edx
  sub    %ecx,%edx
  sub    %edx,%eax
  mov    %eax,-0x8(%rbp)
  cmpl   $0x4,-0x8(%rbp)
  je     L59
  cmpl   $0x3,-0x8(%rbp)
  jne    L6
  mov    -0x18(%rbp),%rax
  mov    0x8(%rax),%eax
  mov    %eax,%edi
  call   <is_leap@plt>
  test   %rax,%rax
  jne    L59
L6:
  movl   $0x1,-0xc(%rbp)
L59:
  mov    -0xc(%rbp),%eax
  leave
  ret
```

assistant: ```c
int week_num(const struct tm *tm) {
  int val = (tm->tm_yday + 7 - (tm->tm_wday + 6) % 7) / 7;
  if ((tm->tm_wday - tm->tm_yday - 2 + 371) % 7 <= 2)
    val++;
  if (!val) {
    val = 52;
    int dec31 = (tm->tm_wday - tm->tm_yday - 1 + 7) % 7;
    if (dec31 == 4 || (dec31 == 5 && is_leap(tm->tm_year % 400 - 1)))
      val++;
  } else if (val == 53) {
    int jan1 = (tm->tm_wday - tm->tm_yday + 371) % 7;
    if (jan1 != 4 && (jan1 != 3 || !is_leap(tm->tm_year)))
      val = 1;
  }
  return val;
}
```