user: Converte this assembly snippet into its equivalent C code:

```asm
<is_prime>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  cmpq   $0x62,-0x18(%rbp)
  jg     L19
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <slow_prime@plt>
  jmp    L296
L19:
  mov    -0x18(%rbp),%rax
  and    $0x1,%eax
  test   %rax,%rax
  je     L275
  mov    -0x18(%rbp),%rcx
  movabs $0x5555555555555556,%rdx
  mov    %rcx,%rax
  imul   %rdx
  mov    %rcx,%rsi
  sar    $0x3f,%rsi
  mov    %rdx,%rax
  sub    %rsi,%rax
  mov    %rax,%rdx
  add    %rdx,%rdx
  add    %rax,%rdx
  mov    %rcx,%rax
  sub    %rdx,%rax
  test   %rax,%rax
  je     L275
  mov    -0x18(%rbp),%rcx
  movabs $0x6666666666666667,%rdx
  mov    %rcx,%rax
  imul   %rdx
  mov    %rdx,%rax
  sar    %rax
  mov    %rcx,%rdx
  sar    $0x3f,%rdx
  sub    %rdx,%rax
  mov    %rax,%rdx
  shl    $0x2,%rdx
  add    %rax,%rdx
  mov    %rcx,%rax
  sub    %rdx,%rax
  test   %rax,%rax
  je     L275
  mov    -0x18(%rbp),%rcx
  movabs $0x4924924924924925,%rdx
  mov    %rcx,%rax
  imul   %rdx
  mov    %rdx,%rax
  sar    %rax
  mov    %rcx,%rdx
  sar    $0x3f,%rdx
  sub    %rdx,%rax
  mov    %rax,%rdx
  shl    $0x3,%rdx
  sub    %rax,%rdx
  mov    %rcx,%rax
  sub    %rdx,%rax
  test   %rax,%rax
  je     L275
  mov    -0x18(%rbp),%rcx
  movabs $0x2e8ba2e8ba2e8ba3,%rdx
  mov    %rcx,%rax
  imul   %rdx
  mov    %rdx,%rax
  sar    %rax
  mov    %rcx,%rsi
  sar    $0x3f,%rsi
  sub    %rsi,%rax
  mov    %rax,%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  sub    %rax,%rcx
  mov    %rcx,%rdx
  test   %rdx,%rdx
  je     L275
  mov    -0x18(%rbp),%rcx
  movabs $0x4ec4ec4ec4ec4ec5,%rdx
  mov    %rcx,%rax
  imul   %rdx
  mov    %rdx,%rax
  sar    $0x2,%rax
  mov    %rcx,%rsi
  sar    $0x3f,%rsi
  sub    %rsi,%rax
  mov    %rax,%rdx
  mov    %rdx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  sub    %rax,%rcx
  mov    %rcx,%rdx
  test   %rdx,%rdx
  je     L275
  mov    -0x18(%rbp),%rcx
  movabs $0x7878787878787879,%rdx
  mov    %rcx,%rax
  imul   %rdx
  mov    %rdx,%rax
  sar    $0x3,%rax
  mov    %rcx,%rdx
  sar    $0x3f,%rdx
  sub    %rdx,%rax
  mov    %rax,%rdx
  shl    $0x4,%rdx
  add    %rax,%rdx
  mov    %rcx,%rax
  sub    %rdx,%rax
  test   %rax,%rax
  je     L275
  mov    -0x18(%rbp),%rcx
  movabs $0xd79435e50d79436,%rdx
  mov    %rcx,%rax
  imul   %rdx
  mov    %rcx,%rax
  sar    $0x3f,%rax
  sub    %rax,%rdx
  mov    %rdx,%rax
  shl    $0x3,%rax
  add    %rdx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  sub    %rax,%rcx
  mov    %rcx,%rdx
  test   %rdx,%rdx
  je     L275
  mov    -0x18(%rbp),%rcx
  movabs $0xb21642c8590b2165,%rdx
  mov    %rcx,%rax
  imul   %rdx
  lea    (%rdx,%rcx,1),%rax
  sar    $0x4,%rax
  mov    %rcx,%rsi
  sar    $0x3f,%rsi
  sub    %rsi,%rax
  mov    %rax,%rdx
  mov    %rdx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  shl    $0x3,%rax
  sub    %rdx,%rax
  sub    %rax,%rcx
  mov    %rcx,%rdx
  test   %rdx,%rdx
  je     L275
  mov    -0x18(%rbp),%rcx
  movabs $0x469ee58469ee5847,%rdx
  mov    %rcx,%rax
  imul   %rdx
  mov    %rdx,%rax
  sar    $0x3,%rax
  mov    %rcx,%rsi
  sar    $0x3f,%rsi
  sub    %rsi,%rax
  mov    %rax,%rdx
  mov    %rdx,%rax
  shl    $0x3,%rax
  sub    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  sub    %rax,%rcx
  mov    %rcx,%rdx
  test   %rdx,%rdx
  je     L275
  mov    -0x18(%rbp),%rcx
  movabs $0x8421084210842109,%rdx
  mov    %rcx,%rax
  imul   %rdx
  lea    (%rdx,%rcx,1),%rax
  sar    $0x4,%rax
  mov    %rcx,%rdx
  sar    $0x3f,%rdx
  sub    %rdx,%rax
  mov    %rax,%rdx
  shl    $0x5,%rdx
  sub    %rax,%rdx
  mov    %rcx,%rax
  sub    %rdx,%rax
  test   %rax,%rax
  je     L275
  mov    -0x18(%rbp),%rcx
  movabs $0x3759f22983759f23,%rdx
  mov    %rcx,%rax
  imul   %rdx
  mov    %rdx,%rax
  sar    $0x3,%rax
  mov    %rcx,%rsi
  sar    $0x3f,%rsi
  sub    %rsi,%rax
  mov    %rax,%rdx
  mov    %rdx,%rax
  shl    $0x3,%rax
  add    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  sub    %rax,%rcx
  mov    %rcx,%rdx
  test   %rdx,%rdx
  je     L275
  mov    -0x18(%rbp),%rcx
  movabs $0x63e7063e7063e707,%rdx
  mov    %rcx,%rax
  imul   %rdx
  mov    %rdx,%rax
  sar    $0x4,%rax
  mov    %rcx,%rsi
  sar    $0x3f,%rsi
  sub    %rsi,%rax
  mov    %rax,%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x3,%rax
  add    %rdx,%rax
  sub    %rax,%rcx
  mov    %rcx,%rdx
  test   %rdx,%rdx
  je     L275
  mov    -0x18(%rbp),%rcx
  movabs $0x5f417d05f417d06,%rdx
  mov    %rcx,%rax
  imul   %rdx
  mov    %rcx,%rax
  sar    $0x3f,%rax
  sub    %rax,%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  sub    %rax,%rcx
  mov    %rcx,%rdx
  test   %rdx,%rdx
  je     L275
  mov    -0x18(%rbp),%rcx
  movabs $0x572620ae4c415c99,%rdx
  mov    %rcx,%rax
  imul   %rdx
  mov    %rdx,%rax
  sar    $0x4,%rax
  mov    %rcx,%rsi
  sar    $0x3f,%rsi
  sub    %rsi,%rax
  mov    %rax,%rdx
  mov    %rdx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  sub    %rdx,%rax
  sub    %rax,%rcx
  mov    %rcx,%rdx
  test   %rdx,%rdx
  je     L275
  mov    -0x18(%rbp),%rcx
  movabs $0x4d4873ecade304d5,%rdx
  mov    %rcx,%rax
  imul   %rdx
  mov    %rdx,%rax
  sar    $0x4,%rax
  mov    %rcx,%rsi
  sar    $0x3f,%rsi
  sub    %rsi,%rax
  mov    %rax,%rdx
  mov    %rdx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  sub    %rax,%rcx
  mov    %rcx,%rdx
  test   %rdx,%rdx
  je     L275
  mov    -0x18(%rbp),%rcx
  movabs $0x8ad8f2fba9386823,%rdx
  mov    %rcx,%rax
  imul   %rdx
  lea    (%rdx,%rcx,1),%rax
  sar    $0x5,%rax
  mov    %rcx,%rdx
  sar    $0x3f,%rdx
  sub    %rdx,%rax
  imul   $0x3b,%rax,%rdx
  mov    %rcx,%rax
  sub    %rdx,%rax
  test   %rax,%rax
  je     L275
  mov    -0x18(%rbp),%rcx
  movabs $0x864b8a7de6d1d609,%rdx
  mov    %rcx,%rax
  imul   %rdx
  lea    (%rdx,%rcx,1),%rax
  sar    $0x5,%rax
  mov    %rcx,%rsi
  sar    $0x3f,%rsi
  sub    %rsi,%rax
  mov    %rax,%rdx
  mov    %rdx,%rax
  shl    $0x4,%rax
  sub    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  sub    %rax,%rcx
  mov    %rcx,%rdx
  test   %rdx,%rdx
  je     L275
  mov    -0x18(%rbp),%rcx
  movabs $0x7a44c6afc2dd9ca9,%rdx
  mov    %rcx,%rax
  imul   %rdx
  mov    %rdx,%rax
  sar    $0x5,%rax
  mov    %rcx,%rsi
  sar    $0x3f,%rsi
  sub    %rsi,%rax
  mov    %rax,%rdx
  mov    %rdx,%rax
  shl    $0x5,%rax
  add    %rdx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  sub    %rax,%rcx
  mov    %rcx,%rdx
  test   %rdx,%rdx
  je     L275
  mov    -0x18(%rbp),%rcx
  movabs $0x73615a240e6c2b45,%rdx
  mov    %rcx,%rax
  imul   %rdx
  mov    %rdx,%rax
  sar    $0x5,%rax
  mov    %rcx,%rsi
  sar    $0x3f,%rsi
  sub    %rsi,%rax
  mov    %rax,%rdx
  mov    %rdx,%rax
  shl    $0x3,%rax
  add    %rdx,%rax
  shl    $0x3,%rax
  sub    %rdx,%rax
  sub    %rax,%rcx
  mov    %rcx,%rdx
  test   %rdx,%rdx
  je     L275
  mov    -0x18(%rbp),%rcx
  movabs $0x70381c0e070381c1,%rdx
  mov    %rcx,%rax
  imul   %rdx
  mov    %rdx,%rax
  sar    $0x5,%rax
  mov    %rcx,%rsi
  sar    $0x3f,%rsi
  sub    %rsi,%rax
  mov    %rax,%rdx
  mov    %rdx,%rax
  shl    $0x3,%rax
  add    %rdx,%rax
  shl    $0x3,%rax
  add    %rdx,%rax
  sub    %rax,%rcx
  mov    %rcx,%rdx
  test   %rdx,%rdx
  je     L275
  mov    -0x18(%rbp),%rcx
  movabs $0x67b23a5440cf6475,%rdx
  mov    %rcx,%rax
  imul   %rdx
  mov    %rdx,%rax
  sar    $0x5,%rax
  mov    %rcx,%rsi
  sar    $0x3f,%rsi
  sub    %rsi,%rax
  mov    %rax,%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  sub    %rdx,%rax
  sub    %rax,%rcx
  mov    %rcx,%rdx
  test   %rdx,%rdx
  je     L275
  mov    -0x18(%rbp),%rcx
  movabs $0x3159721ed7e75347,%rdx
  mov    %rcx,%rax
  imul   %rdx
  mov    %rdx,%rax
  sar    $0x4,%rax
  mov    %rcx,%rsi
  sar    $0x3f,%rsi
  sub    %rsi,%rax
  mov    %rax,%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x3,%rax
  add    %rdx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  sub    %rax,%rcx
  mov    %rcx,%rdx
  test   %rdx,%rdx
  je     L275
  mov    -0x18(%rbp),%rcx
  movabs $0xb81702e05c0b8171,%rdx
  mov    %rcx,%rax
  imul   %rdx
  lea    (%rdx,%rcx,1),%rax
  sar    $0x6,%rax
  mov    %rcx,%rsi
  sar    $0x3f,%rsi
  sub    %rsi,%rax
  mov    %rax,%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  shl    $0x3,%rax
  add    %rdx,%rax
  sub    %rax,%rcx
  mov    %rcx,%rdx
  test   %rdx,%rdx
  je     L275
  mov    -0x18(%rbp),%rcx
  movabs $0xa8e83f5717c0a8e9,%rdx
  mov    %rcx,%rax
  imul   %rdx
  lea    (%rdx,%rcx,1),%rax
  sar    $0x6,%rax
  mov    %rcx,%rsi
  sar    $0x3f,%rsi
  sub    %rsi,%rax
  mov    %rax,%rdx
  mov    %rdx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  shl    $0x5,%rax
  add    %rdx,%rax
  sub    %rax,%rcx
  mov    %rcx,%rdx
  test   %rdx,%rdx
  jne    L41
L275:
  mov    $0x0,%eax
  jmp    L296
L41:
  movq   $0x3,-0x8(%rbp)
  jmp    L303
L212:
  mov    -0x18(%rbp),%rax
  cqto
  idivq  -0x8(%rbp)
  mov    %rdx,%rax
  test   %rax,%rax
  jne    L10
  mov    $0x0,%eax
  jmp    L296
L10:
  addq   $0x2,-0x8(%rbp)
L303:
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <sqrt@plt>
  cmp    %rax,-0x8(%rbp)
  jle    L212
  mov    $0x1,%eax
L296:
  leave
  ret
```

assistant: ```c
long is_prime(long n) {
  long i;
  if (n < 99) {
    return slow_prime(n);
  }
  if (n % 2 == 0 || n % 3 == 0 || n % 5 == 0 || n % 7 == 0 || n % 11 == 0 || n % 13 == 0 || n % 17 == 0 || n % 19 == 0 || n % 23 == 0 || n % 29 == 0 || n % 31 == 0 || n % 37 == 0 || n % 41 == 0 || n % 43 == 0 || n % 47 == 0 || n % 53 == 0 || n % 59 == 0 || n % 61 == 0 || n % 67 == 0 || n % 71 == 0 || n % 73 == 0 || n % 79 == 0 || n % 83 == 0 || n % 89 == 0 || n % 97 == 0) {
    return 0;
  }
  for (i = 3; i <= sqrt(n); i += 2) {
    if (n % i == 0) {
      return 0;
    }
  }
  return 1;
}
```