user: 请将以下的汇编代码转换成C语言代码:

```asm
<is_prime_mr>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  and    $0x1,%edi
  jne    L346
  cmp    $0x2,%rbp
  jne    L415
L346:
  cmp    $0x1,%rbp
  je     L415
  movabs $0xaaaaaaaaaaaaaaab,%rax
  movabs $0x5555555555555555,%rdx
  imul   %rbp,%rax
  cmp    %rdx,%rax
  ja     L355
  cmp    $0x3,%rbp
  jne    L415
L355:
  mov    $0x1,%eax
  cmp    $0x3,%rbp
  jbe    L310
  mov    %rbp,%r12
  shr    %r12
  mov    %r12,%r13
  and    $0x1,%r13d
  jne    L388
  mov    $0x1,%r13d
L254:
  shr    %r12
  add    $0x1,%r13
  test   $0x1,%r12b
  je     L254
L388:
  cmp    $0x14f5d4,%rbp
  jbe    L319
  cmp    $0x8a8d7e,%rbp
  jbe    L169
  movabs $0x11baa74c4,%rax
  cmp    %rax,%rbp
  jbe    L244
  movabs $0x1053cb094c0,%rax
  cmp    %rax,%rbp
  jbe    L379
  movabs $0x1f51f3fee3a,%rax
  cmp    %rax,%rbp
  jbe    L197
  mov    $0x2,%ecx
  mov    %r12,%rdx
  mov    %r13,%rsi
  mov    %rbp,%rdi
  movabs $0x32907381cde,%rax
  cmp    %rax,%rbp
  jbe    L19
  call   <witness@plt>
  test   %rax,%rax
  jne    L381
  nopl   0x0(%rax,%rax,1)
L415:
  xor    %eax,%eax
L310:
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopl   0x0(%rax,%rax,1)
L319:
  mov    $0x2,%ecx
  mov    %r12,%rdx
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <witness@plt>
  mov    $0x3,%ecx
  test   %rax,%rax
  je     L415
  jmp    L348
  nop
L169:
  mov    $0x1f,%ecx
  mov    %r12,%rdx
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <witness@plt>
  mov    $0x49,%ecx
  test   %rax,%rax
  je     L415
L348:
  mov    %r12,%rdx
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <witness@plt>
  test   %rax,%rax
  setne  %al
  movzbl %al,%eax
  jmp    L310
L381:
  mov    $0x3,%ecx
  mov    %r12,%rdx
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <witness@plt>
  test   %rax,%rax
  je     L415
  mov    $0x5,%ecx
  mov    %r12,%rdx
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <witness@plt>
  test   %rax,%rax
  je     L415
  mov    $0x7,%ecx
  mov    %r12,%rdx
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <witness@plt>
  test   %rax,%rax
  je     L415
  mov    $0xb,%ecx
  mov    %r12,%rdx
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <witness@plt>
  test   %rax,%rax
  je     L415
  mov    $0xd,%ecx
  mov    %r12,%rdx
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <witness@plt>
  test   %rax,%rax
  je     L415
  mov    $0x11,%ecx
  jmp    L348
  nopl   0x0(%rax,%rax,1)
L244:
  mov    $0x2,%ecx
  mov    %r12,%rdx
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <witness@plt>
  test   %rax,%rax
  je     L415
  mov    $0x7,%ecx
  mov    %r12,%rdx
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <witness@plt>
  mov    $0x3d,%ecx
  test   %rax,%rax
  je     L415
  jmp    L348
  nopw   0x0(%rax,%rax,1)
L19:
  call   <witness@plt>
  test   %rax,%rax
  je     L415
  mov    $0x3,%ecx
  mov    %r12,%rdx
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <witness@plt>
  test   %rax,%rax
  je     L415
  mov    $0x5,%ecx
  mov    %r12,%rdx
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <witness@plt>
  test   %rax,%rax
  je     L415
  mov    $0x7,%ecx
  mov    %r12,%rdx
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <witness@plt>
  test   %rax,%rax
  je     L415
  mov    $0xb,%ecx
  mov    %r12,%rdx
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <witness@plt>
  mov    $0xd,%ecx
  test   %rax,%rax
  je     L415
  jmp    L348
L379:
  mov    $0x2,%ecx
  mov    %r12,%rdx
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <witness@plt>
  test   %rax,%rax
  je     L415
  mov    $0xd,%ecx
  mov    %r12,%rdx
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <witness@plt>
  test   %rax,%rax
  je     L415
  mov    $0x17,%ecx
  mov    %r12,%rdx
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <witness@plt>
  mov    $0x195f53,%ecx
  test   %rax,%rax
  je     L415
  jmp    L348
  xchg   %ax,%ax
L197:
  mov    $0x2,%ecx
  mov    %r12,%rdx
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <witness@plt>
  test   %rax,%rax
  je     L415
  mov    $0x3,%ecx
  mov    %r12,%rdx
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <witness@plt>
  test   %rax,%rax
  je     L415
  mov    $0x5,%ecx
  mov    %r12,%rdx
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <witness@plt>
  test   %rax,%rax
  je     L415
  mov    $0x7,%ecx
  mov    %r12,%rdx
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <witness@plt>
  mov    $0xb,%ecx
  test   %rax,%rax
  je     L415
  jmp    L348
```

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