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

```asm
<isprime>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  mov    $0x2,%esi
  mov    %rax,%rdi
  call   <spsp@plt>
  test   %eax,%eax
  jne    L141
  mov    $0x0,%eax
  jmp    L183
L141:
  cmpq   $0x7fe,-0x8(%rbp)
  ja     L170
  mov    $0x1,%eax
  jmp    L183
L170:
  mov    -0x8(%rbp),%rax
  mov    $0x3,%esi
  mov    %rax,%rdi
  call   <spsp@plt>
  test   %eax,%eax
  jne    L139
  mov    $0x0,%eax
  jmp    L183
L139:
  cmpq   $0x14f5d4,-0x8(%rbp)
  ja     L5
  mov    $0x1,%eax
  jmp    L183
L5:
  mov    -0x8(%rbp),%rax
  mov    $0x5,%esi
  mov    %rax,%rdi
  call   <spsp@plt>
  test   %eax,%eax
  jne    L200
  mov    $0x0,%eax
  jmp    L183
L200:
  cmpq   $0x18271b0,-0x8(%rbp)
  ja     L29
  mov    $0x1,%eax
  jmp    L183
L29:
  mov    -0x8(%rbp),%rax
  mov    $0x7,%esi
  mov    %rax,%rdi
  call   <spsp@plt>
  test   %eax,%eax
  jne    L256
  mov    $0x0,%eax
  jmp    L183
L256:
  mov    $0xbfa17dc6,%eax
  cmp    %rax,-0x8(%rbp)
  ja     L347
  mov    $0x1,%eax
  jmp    L183
L347:
  mov    -0x8(%rbp),%rax
  mov    $0xb,%esi
  mov    %rax,%rdi
  call   <spsp@plt>
  test   %eax,%eax
  jne    L120
  mov    $0x0,%eax
  jmp    L183
L120:
  movabs $0x1f51f3fee3a,%rax
  cmp    %rax,-0x8(%rbp)
  ja     L268
  mov    $0x1,%eax
  jmp    L183
L268:
  mov    -0x8(%rbp),%rax
  mov    $0xd,%esi
  mov    %rax,%rdi
  call   <spsp@plt>
  test   %eax,%eax
  jne    L176
  mov    $0x0,%eax
  jmp    L183
L176:
  movabs $0x32907381cde,%rax
  cmp    %rax,-0x8(%rbp)
  ja     L192
  mov    $0x1,%eax
  jmp    L183
L192:
  mov    -0x8(%rbp),%rax
  mov    $0x11,%esi
  mov    %rax,%rdi
  call   <spsp@plt>
  test   %eax,%eax
  jne    L296
  mov    $0x0,%eax
  jmp    L183
L296:
  movabs $0x136a352b2c8c0,%rax
  cmp    %rax,-0x8(%rbp)
  ja     L262
  mov    $0x1,%eax
  jmp    L183
L262:
  mov    -0x8(%rbp),%rax
  mov    $0x13,%esi
  mov    %rax,%rdi
  call   <spsp@plt>
  test   %eax,%eax
  jne    L203
  mov    $0x0,%eax
  jmp    L183
L203:
  movabs $0x136a352b2c8c0,%rax
  cmp    %rax,-0x8(%rbp)
  ja     L7
  mov    $0x1,%eax
  jmp    L183
L7:
  mov    -0x8(%rbp),%rax
  mov    $0x17,%esi
  mov    %rax,%rdi
  call   <spsp@plt>
  test   %eax,%eax
  jne    L239
  mov    $0x0,%eax
  jmp    L183
L239:
  movabs $0x351591274f9af9fa,%rax
  cmp    %rax,-0x8(%rbp)
  ja     L290
  mov    $0x1,%eax
  jmp    L183
L290:
  movabs $0x351591274f9af9fa,%rax
  cmp    %rax,-0x8(%rbp)
  setbe  %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  mov    $0x0,%eax
L183:
  leave
  ret
```

assistant: ```c
int isprime(uint64_t _n) {
  uint64_t n = _n;
  if (!spsp(n, 2))
    return (0);
  if (n < 2047ULL)
    return (1);
  if (!spsp(n, 3))
    return (0);
  if (n < 1373653ULL)
    return (1);
  if (!spsp(n, 5))
    return (0);
  if (n < 25326001ULL)
    return (1);
  if (!spsp(n, 7))
    return (0);
  if (n < 3215031751ULL)
    return (1);
  if (!spsp(n, 11))
    return (0);
  if (n < 2152302898747ULL)
    return (1);
  if (!spsp(n, 13))
    return (0);
  if (n < 3474749660383ULL)
    return (1);
  if (!spsp(n, 17))
    return (0);
  if (n < 341550071728321ULL)
    return (1);
  if (!spsp(n, 19))
    return (0);
  if (n < 341550071728321ULL)
    return (1);
  if (!spsp(n, 23))
    return (0);
  if (n < 3825123056546413051)
    return (1);
  assert(n <= 3825123056546413050ULL);
  return (0);
}
```