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

```asm
<is_prime_mr>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  test   $0x1,%dil
  jne    L39
  mov    $0x0,%eax
  cmp    $0x2,%rdi
  jne    L242
L39:
  mov    $0x0,%eax
  cmp    $0x1,%rbx
  jbe    L242
  movabs $0xaaaaaaaaaaaaaaab,%rdx
  mov    %rbx,%rax
  mul    %rdx
  mov    %rdx,%rax
  shr    %rax
  and    $0xfffffffffffffffe,%rdx
  add    %rax,%rdx
  cmp    %rdx,%rbx
  jne    L177
  mov    $0x0,%eax
  cmp    $0x3,%rbx
  jne    L242
L177:
  mov    $0x1,%eax
  cmp    $0x3,%rbx
  jbe    L242
  mov    %rbx,%rbp
  shr    %rbp
  mov    %rbp,%r12
  and    $0x1,%r12d
  jne    L236
  mov    $0x1,%r12d
L289:
  mov    %rbp,%rax
  shr    %rax
  mov    %rax,%rbp
  add    $0x1,%r12
  test   $0x1,%al
  je     L289
L236:
  cmp    $0x14f5d4,%rbx
  jbe    L98
  cmp    $0x8a8d7e,%rbx
  jbe    L317
  movabs $0x11baa74c4,%rax
  cmp    %rax,%rbx
  jbe    L395
  movabs $0x1053cb094c0,%rax
  cmp    %rax,%rbx
  jbe    L105
  movabs $0x1f51f3fee3a,%rax
  cmp    %rax,%rbx
  jbe    L191
  movabs $0x32907381cde,%rax
  cmp    %rax,%rbx
  jbe    L370
  mov    $0x2,%ecx
  mov    %rbp,%rdx
  mov    %r12,%rsi
  mov    %rbx,%rdi
  call   <witness@plt>
  mov    %rax,%rdx
  mov    $0x0,%eax
  test   %rdx,%rdx
  jne    L167
L242:
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L98:
  mov    $0x2,%ecx
  mov    %rbp,%rdx
  mov    %r12,%rsi
  mov    %rbx,%rdi
  call   <witness@plt>
  mov    %rax,%rdx
  mov    $0x0,%eax
  test   %rdx,%rdx
  je     L242
  mov    $0x3,%ecx
  mov    %rbp,%rdx
  mov    %r12,%rsi
  mov    %rbx,%rdi
  call   <witness@plt>
  test   %rax,%rax
  setne  %al
  movzbl %al,%eax
  jmp    L242
L317:
  mov    $0x1f,%ecx
  mov    %rbp,%rdx
  mov    %r12,%rsi
  mov    %rbx,%rdi
  call   <witness@plt>
  mov    %rax,%rdx
  mov    $0x0,%eax
  test   %rdx,%rdx
  je     L242
  mov    $0x49,%ecx
  mov    %rbp,%rdx
  mov    %r12,%rsi
  mov    %rbx,%rdi
  call   <witness@plt>
  test   %rax,%rax
  setne  %al
  movzbl %al,%eax
  jmp    L242
L395:
  mov    $0x2,%ecx
  mov    %rbp,%rdx
  mov    %r12,%rsi
  mov    %rbx,%rdi
  call   <witness@plt>
  mov    %rax,%rdx
  mov    $0x0,%eax
  test   %rdx,%rdx
  je     L242
  mov    $0x7,%ecx
  mov    %rbp,%rdx
  mov    %r12,%rsi
  mov    %rbx,%rdi
  call   <witness@plt>
  mov    %rax,%rdx
  mov    $0x0,%eax
  test   %rdx,%rdx
  je     L242
  mov    $0x3d,%ecx
  mov    %rbp,%rdx
  mov    %r12,%rsi
  mov    %rbx,%rdi
  call   <witness@plt>
  test   %rax,%rax
  setne  %al
  movzbl %al,%eax
  jmp    L242
L105:
  mov    $0x2,%ecx
  mov    %rbp,%rdx
  mov    %r12,%rsi
  mov    %rbx,%rdi
  call   <witness@plt>
  mov    %rax,%rdx
  mov    $0x0,%eax
  test   %rdx,%rdx
  je     L242
  mov    $0xd,%ecx
  mov    %rbp,%rdx
  mov    %r12,%rsi
  mov    %rbx,%rdi
  call   <witness@plt>
  mov    %rax,%rdx
  mov    $0x0,%eax
  test   %rdx,%rdx
  je     L242
  mov    $0x17,%ecx
  mov    %rbp,%rdx
  mov    %r12,%rsi
  mov    %rbx,%rdi
  call   <witness@plt>
  mov    %rax,%rdx
  mov    $0x0,%eax
  test   %rdx,%rdx
  je     L242
  mov    $0x195f53,%ecx
  mov    %rbp,%rdx
  mov    %r12,%rsi
  mov    %rbx,%rdi
  call   <witness@plt>
  test   %rax,%rax
  setne  %al
  movzbl %al,%eax
  jmp    L242
L191:
  mov    $0x2,%ecx
  mov    %rbp,%rdx
  mov    %r12,%rsi
  mov    %rbx,%rdi
  call   <witness@plt>
  mov    %rax,%rdx
  mov    $0x0,%eax
  test   %rdx,%rdx
  je     L242
  mov    $0x3,%ecx
  mov    %rbp,%rdx
  mov    %r12,%rsi
  mov    %rbx,%rdi
  call   <witness@plt>
  mov    %rax,%rdx
  mov    $0x0,%eax
  test   %rdx,%rdx
  je     L242
  mov    $0x5,%ecx
  mov    %rbp,%rdx
  mov    %r12,%rsi
  mov    %rbx,%rdi
  call   <witness@plt>
  mov    %rax,%rdx
  mov    $0x0,%eax
  test   %rdx,%rdx
  je     L242
  mov    $0x7,%ecx
  mov    %rbp,%rdx
  mov    %r12,%rsi
  mov    %rbx,%rdi
  call   <witness@plt>
  mov    %rax,%rdx
  mov    $0x0,%eax
  test   %rdx,%rdx
  je     L242
  mov    $0xb,%ecx
  mov    %rbp,%rdx
  mov    %r12,%rsi
  mov    %rbx,%rdi
  call   <witness@plt>
  test   %rax,%rax
  setne  %al
  movzbl %al,%eax
  jmp    L242
L370:
  mov    $0x2,%ecx
  mov    %rbp,%rdx
  mov    %r12,%rsi
  mov    %rbx,%rdi
  call   <witness@plt>
  mov    %rax,%rdx
  mov    $0x0,%eax
  test   %rdx,%rdx
  je     L242
  mov    $0x3,%ecx
  mov    %rbp,%rdx
  mov    %r12,%rsi
  mov    %rbx,%rdi
  call   <witness@plt>
  mov    %rax,%rdx
  mov    $0x0,%eax
  test   %rdx,%rdx
  je     L242
  mov    $0x5,%ecx
  mov    %rbp,%rdx
  mov    %r12,%rsi
  mov    %rbx,%rdi
  call   <witness@plt>
  mov    %rax,%rdx
  mov    $0x0,%eax
  test   %rdx,%rdx
  je     L242
  mov    $0x7,%ecx
  mov    %rbp,%rdx
  mov    %r12,%rsi
  mov    %rbx,%rdi
  call   <witness@plt>
  mov    %rax,%rdx
  mov    $0x0,%eax
  test   %rdx,%rdx
  je     L242
  mov    $0xb,%ecx
  mov    %rbp,%rdx
  mov    %r12,%rsi
  mov    %rbx,%rdi
  call   <witness@plt>
  mov    %rax,%rdx
  mov    $0x0,%eax
  test   %rdx,%rdx
  je     L242
  mov    $0xd,%ecx
  mov    %rbp,%rdx
  mov    %r12,%rsi
  mov    %rbx,%rdi
  call   <witness@plt>
  test   %rax,%rax
  setne  %al
  movzbl %al,%eax
  jmp    L242
L167:
  mov    $0x3,%ecx
  mov    %rbp,%rdx
  mov    %r12,%rsi
  mov    %rbx,%rdi
  call   <witness@plt>
  mov    %rax,%rdx
  mov    $0x0,%eax
  test   %rdx,%rdx
  je     L242
  mov    $0x5,%ecx
  mov    %rbp,%rdx
  mov    %r12,%rsi
  mov    %rbx,%rdi
  call   <witness@plt>
  mov    %rax,%rdx
  mov    $0x0,%eax
  test   %rdx,%rdx
  je     L242
  mov    $0x7,%ecx
  mov    %rbp,%rdx
  mov    %r12,%rsi
  mov    %rbx,%rdi
  call   <witness@plt>
  mov    %rax,%rdx
  mov    $0x0,%eax
  test   %rdx,%rdx
  je     L242
  mov    $0xb,%ecx
  mov    %rbp,%rdx
  mov    %r12,%rsi
  mov    %rbx,%rdi
  call   <witness@plt>
  mov    %rax,%rdx
  mov    $0x0,%eax
  test   %rdx,%rdx
  je     L242
  mov    $0xd,%ecx
  mov    %rbp,%rdx
  mov    %r12,%rsi
  mov    %rbx,%rdi
  call   <witness@plt>
  mov    %rax,%rdx
  mov    $0x0,%eax
  test   %rdx,%rdx
  je     L242
  mov    $0x11,%ecx
  mov    %rbp,%rdx
  mov    %r12,%rsi
  mov    %rbx,%rdi
  call   <witness@plt>
  test   %rax,%rax
  setne  %al
  movzbl %al,%eax
  jmp    L242
```

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