user: Translate the below assembly code into C programming language:

```asm
<is_prime_mr>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  and    $0x1,%eax
  test   %rax,%rax
  jne    L261
  cmpq   $0x2,-0x18(%rbp)
  jne    L443
L261:
  cmpq   $0x1,-0x18(%rbp)
  jbe    L443
  mov    -0x18(%rbp),%rcx
  movabs $0xaaaaaaaaaaaaaaab,%rdx
  mov    %rcx,%rax
  mul    %rdx
  mov    %rdx,%rax
  shr    %rax
  mov    %rax,%rdx
  add    %rdx,%rdx
  add    %rax,%rdx
  mov    %rcx,%rax
  sub    %rdx,%rax
  test   %rax,%rax
  jne    L562
  cmpq   $0x3,-0x18(%rbp)
  je     L562
L443:
  mov    $0x0,%eax
  jmp    L326
L562:
  cmpq   $0x3,-0x18(%rbp)
  ja     L287
  mov    $0x1,%eax
  jmp    L326
L287:
  mov    -0x18(%rbp),%rax
  shr    %rax
  mov    %rax,-0x10(%rbp)
  movq   $0x1,-0x8(%rbp)
  jmp    L198
L505:
  mov    -0x10(%rbp),%rax
  shr    %rax
  mov    %rax,-0x10(%rbp)
  addq   $0x1,-0x8(%rbp)
L198:
  mov    -0x10(%rbp),%rax
  and    $0x1,%eax
  test   %rax,%rax
  je     L505
  cmpq   $0x14f5d4,-0x18(%rbp)
  ja     L370
  mov    -0x10(%rbp),%rdx
  mov    -0x8(%rbp),%rsi
  mov    -0x18(%rbp),%rax
  mov    $0x2,%ecx
  mov    %rax,%rdi
  call   <witness@plt>
  test   %rax,%rax
  je     L139
  mov    -0x10(%rbp),%rdx
  mov    -0x8(%rbp),%rsi
  mov    -0x18(%rbp),%rax
  mov    $0x3,%ecx
  mov    %rax,%rdi
  call   <witness@plt>
  test   %rax,%rax
  je     L139
  mov    $0x1,%eax
  jmp    L326
L139:
  mov    $0x0,%eax
  jmp    L326
L370:
  cmpq   $0x8a8d7e,-0x18(%rbp)
  ja     L255
  mov    -0x10(%rbp),%rdx
  mov    -0x8(%rbp),%rsi
  mov    -0x18(%rbp),%rax
  mov    $0x1f,%ecx
  mov    %rax,%rdi
  call   <witness@plt>
  test   %rax,%rax
  je     L151
  mov    -0x10(%rbp),%rdx
  mov    -0x8(%rbp),%rsi
  mov    -0x18(%rbp),%rax
  mov    $0x49,%ecx
  mov    %rax,%rdi
  call   <witness@plt>
  test   %rax,%rax
  je     L151
  mov    $0x1,%eax
  jmp    L326
L151:
  mov    $0x0,%eax
  jmp    L326
L255:
  movabs $0x11baa74c4,%rax
  cmp    %rax,-0x18(%rbp)
  ja     L305
  mov    -0x10(%rbp),%rdx
  mov    -0x8(%rbp),%rsi
  mov    -0x18(%rbp),%rax
  mov    $0x2,%ecx
  mov    %rax,%rdi
  call   <witness@plt>
  test   %rax,%rax
  je     L530
  mov    -0x10(%rbp),%rdx
  mov    -0x8(%rbp),%rsi
  mov    -0x18(%rbp),%rax
  mov    $0x7,%ecx
  mov    %rax,%rdi
  call   <witness@plt>
  test   %rax,%rax
  je     L530
  mov    -0x10(%rbp),%rdx
  mov    -0x8(%rbp),%rsi
  mov    -0x18(%rbp),%rax
  mov    $0x3d,%ecx
  mov    %rax,%rdi
  call   <witness@plt>
  test   %rax,%rax
  je     L530
  mov    $0x1,%eax
  jmp    L326
L530:
  mov    $0x0,%eax
  jmp    L326
L305:
  movabs $0x1053cb094c0,%rax
  cmp    %rax,-0x18(%rbp)
  ja     L98
  mov    -0x10(%rbp),%rdx
  mov    -0x8(%rbp),%rsi
  mov    -0x18(%rbp),%rax
  mov    $0x2,%ecx
  mov    %rax,%rdi
  call   <witness@plt>
  test   %rax,%rax
  je     L412
  mov    -0x10(%rbp),%rdx
  mov    -0x8(%rbp),%rsi
  mov    -0x18(%rbp),%rax
  mov    $0xd,%ecx
  mov    %rax,%rdi
  call   <witness@plt>
  test   %rax,%rax
  je     L412
  mov    -0x10(%rbp),%rdx
  mov    -0x8(%rbp),%rsi
  mov    -0x18(%rbp),%rax
  mov    $0x17,%ecx
  mov    %rax,%rdi
  call   <witness@plt>
  test   %rax,%rax
  je     L412
  mov    -0x10(%rbp),%rdx
  mov    -0x8(%rbp),%rsi
  mov    -0x18(%rbp),%rax
  mov    $0x195f53,%ecx
  mov    %rax,%rdi
  call   <witness@plt>
  test   %rax,%rax
  je     L412
  mov    $0x1,%eax
  jmp    L326
L412:
  mov    $0x0,%eax
  jmp    L326
L98:
  movabs $0x1f51f3fee3a,%rax
  cmp    %rax,-0x18(%rbp)
  ja     L561
  mov    -0x10(%rbp),%rdx
  mov    -0x8(%rbp),%rsi
  mov    -0x18(%rbp),%rax
  mov    $0x2,%ecx
  mov    %rax,%rdi
  call   <witness@plt>
  test   %rax,%rax
  je     L148
  mov    -0x10(%rbp),%rdx
  mov    -0x8(%rbp),%rsi
  mov    -0x18(%rbp),%rax
  mov    $0x3,%ecx
  mov    %rax,%rdi
  call   <witness@plt>
  test   %rax,%rax
  je     L148
  mov    -0x10(%rbp),%rdx
  mov    -0x8(%rbp),%rsi
  mov    -0x18(%rbp),%rax
  mov    $0x5,%ecx
  mov    %rax,%rdi
  call   <witness@plt>
  test   %rax,%rax
  je     L148
  mov    -0x10(%rbp),%rdx
  mov    -0x8(%rbp),%rsi
  mov    -0x18(%rbp),%rax
  mov    $0x7,%ecx
  mov    %rax,%rdi
  call   <witness@plt>
  test   %rax,%rax
  je     L148
  mov    -0x10(%rbp),%rdx
  mov    -0x8(%rbp),%rsi
  mov    -0x18(%rbp),%rax
  mov    $0xb,%ecx
  mov    %rax,%rdi
  call   <witness@plt>
  test   %rax,%rax
  je     L148
  mov    $0x1,%eax
  jmp    L326
L148:
  mov    $0x0,%eax
  jmp    L326
L561:
  movabs $0x32907381cde,%rax
  cmp    %rax,-0x18(%rbp)
  ja     L229
  mov    -0x10(%rbp),%rdx
  mov    -0x8(%rbp),%rsi
  mov    -0x18(%rbp),%rax
  mov    $0x2,%ecx
  mov    %rax,%rdi
  call   <witness@plt>
  test   %rax,%rax
  je     L280
  mov    -0x10(%rbp),%rdx
  mov    -0x8(%rbp),%rsi
  mov    -0x18(%rbp),%rax
  mov    $0x3,%ecx
  mov    %rax,%rdi
  call   <witness@plt>
  test   %rax,%rax
  je     L280
  mov    -0x10(%rbp),%rdx
  mov    -0x8(%rbp),%rsi
  mov    -0x18(%rbp),%rax
  mov    $0x5,%ecx
  mov    %rax,%rdi
  call   <witness@plt>
  test   %rax,%rax
  je     L280
  mov    -0x10(%rbp),%rdx
  mov    -0x8(%rbp),%rsi
  mov    -0x18(%rbp),%rax
  mov    $0x7,%ecx
  mov    %rax,%rdi
  call   <witness@plt>
  test   %rax,%rax
  je     L280
  mov    -0x10(%rbp),%rdx
  mov    -0x8(%rbp),%rsi
  mov    -0x18(%rbp),%rax
  mov    $0xb,%ecx
  mov    %rax,%rdi
  call   <witness@plt>
  test   %rax,%rax
  je     L280
  mov    -0x10(%rbp),%rdx
  mov    -0x8(%rbp),%rsi
  mov    -0x18(%rbp),%rax
  mov    $0xd,%ecx
  mov    %rax,%rdi
  call   <witness@plt>
  test   %rax,%rax
  je     L280
  mov    $0x1,%eax
  jmp    L326
L280:
  mov    $0x0,%eax
  jmp    L326
L229:
  mov    -0x10(%rbp),%rdx
  mov    -0x8(%rbp),%rsi
  mov    -0x18(%rbp),%rax
  mov    $0x2,%ecx
  mov    %rax,%rdi
  call   <witness@plt>
  test   %rax,%rax
  je     L492
  mov    -0x10(%rbp),%rdx
  mov    -0x8(%rbp),%rsi
  mov    -0x18(%rbp),%rax
  mov    $0x3,%ecx
  mov    %rax,%rdi
  call   <witness@plt>
  test   %rax,%rax
  je     L492
  mov    -0x10(%rbp),%rdx
  mov    -0x8(%rbp),%rsi
  mov    -0x18(%rbp),%rax
  mov    $0x5,%ecx
  mov    %rax,%rdi
  call   <witness@plt>
  test   %rax,%rax
  je     L492
  mov    -0x10(%rbp),%rdx
  mov    -0x8(%rbp),%rsi
  mov    -0x18(%rbp),%rax
  mov    $0x7,%ecx
  mov    %rax,%rdi
  call   <witness@plt>
  test   %rax,%rax
  je     L492
  mov    -0x10(%rbp),%rdx
  mov    -0x8(%rbp),%rsi
  mov    -0x18(%rbp),%rax
  mov    $0xb,%ecx
  mov    %rax,%rdi
  call   <witness@plt>
  test   %rax,%rax
  je     L492
  mov    -0x10(%rbp),%rdx
  mov    -0x8(%rbp),%rsi
  mov    -0x18(%rbp),%rax
  mov    $0xd,%ecx
  mov    %rax,%rdi
  call   <witness@plt>
  test   %rax,%rax
  je     L492
  mov    -0x10(%rbp),%rdx
  mov    -0x8(%rbp),%rsi
  mov    -0x18(%rbp),%rax
  mov    $0x11,%ecx
  mov    %rax,%rdi
  call   <witness@plt>
  test   %rax,%rax
  je     L492
  mov    $0x1,%eax
  jmp    L326
L492:
  mov    $0x0,%eax
L326:
  leave
  ret
```

assistant: ```c
bool is_prime_mr(size_t n) {
  if (((!(n & 1)) && n != 2) || (n < 2) || (n % 3 == 0 && n != 3))
    return false;
  if (n <= 3)
    return true;
  size_t d = n / 2;
  size_t s = 1;
  while (!(d & 1)) {
    d /= 2;
    ++s;
  }
  if (n < 1373653)
    return witness(n, s, d, 2) && witness(n, s, d, 3);
  if (n < 9080191)
    return witness(n, s, d, 31) && witness(n, s, d, 73);
  if (n < 4759123141)
    return witness(n, s, d, 2) && witness(n, s, d, 7) && witness(n, s, d, 61);
  if (n < 1122004669633)
    return witness(n, s, d, 2) && witness(n, s, d, 13) && witness(n, s, d, 23) && witness(n, s, d, 1662803);
  if (n < 2152302898747)
    return witness(n, s, d, 2) && witness(n, s, d, 3) && witness(n, s, d, 5) && witness(n, s, d, 7) && witness(n, s, d, 11);
  if (n < 3474749660383)
    return witness(n, s, d, 2) && witness(n, s, d, 3) && witness(n, s, d, 5) && witness(n, s, d, 7) && witness(n, s, d, 11) && witness(n, s, d, 13);
  return witness(n, s, d, 2) && witness(n, s, d, 3) && witness(n, s, d, 5) && witness(n, s, d, 7) && witness(n, s, d, 11) && witness(n, s, d, 13) && witness(n, s, d, 17);
}
```