user: 请从给定的汇编指令推导出C源代码:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  jmp    L58
L39:
  mov    -0x20(%rbp),%eax
  mov    %eax,%edi
  call   <check_prime@plt>
  mov    %eax,-0x14(%rbp)
  mov    -0x20(%rbp),%eax
  cmp    $0x1,%eax
  jne    L51
  mov    -0x20(%rbp),%eax
  mov    %eax,%esi
  lea    D26(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L58
L51:
  cmpl   $0x1,-0x14(%rbp)
  jne    L45
  mov    -0x20(%rbp),%eax
  mov    %eax,-0x1c(%rbp)
  movl   $0x0,-0x18(%rbp)
  jmp    L62
L102:
  mov    -0x1c(%rbp),%edx
  movslq %edx,%rax
  imul   $0x66666667,%rax,%rax
  shr    $0x20,%rax
  sar    $0x2,%eax
  mov    %edx,%esi
  sar    $0x1f,%esi
  sub    %esi,%eax
  mov    %eax,%ecx
  mov    %ecx,%eax
  shl    $0x2,%eax
  add    %ecx,%eax
  add    %eax,%eax
  sub    %eax,%edx
  mov    %edx,-0xc(%rbp)
  mov    -0x18(%rbp),%edx
  mov    %edx,%eax
  shl    $0x2,%eax
  add    %edx,%eax
  add    %eax,%eax
  mov    %eax,%edx
  mov    -0xc(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x18(%rbp)
  mov    -0x1c(%rbp),%eax
  movslq %eax,%rdx
  imul   $0x66666667,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0x2,%edx
  sar    $0x1f,%eax
  mov    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  mov    %eax,-0x1c(%rbp)
L62:
  cmpl   $0x0,-0x1c(%rbp)
  jne    L102
  mov    -0x18(%rbp),%eax
  mov    %eax,%edi
  call   <check_prime@plt>
  mov    %eax,-0x10(%rbp)
  cmpl   $0x1,-0x10(%rbp)
  jne    L35
  mov    -0x20(%rbp),%eax
  cmp    %eax,-0x18(%rbp)
  je     L35
  mov    -0x20(%rbp),%eax
  mov    %eax,%esi
  lea    D28(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L58
L35:
  mov    -0x20(%rbp),%eax
  mov    %eax,%esi
  lea    D26(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L58
L45:
  mov    -0x20(%rbp),%eax
  mov    %eax,%esi
  lea    D4(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
L58:
  lea    -0x20(%rbp),%rax
  mov    %rax,%rsi
  lea    D16(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  cmp    $0x1,%eax
  je     L39
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L3
  call   <__stack_chk_fail@plt>
L3:
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D26
datatype: string
name: extract_symbolic_data
arguments: data_label: D28
datatype: string
name: extract_symbolic_data
arguments: data_label: D4
datatype: string
name: extract_symbolic_data
arguments: data_label: D16
datatype: string

tool: D26: %d is prime.


tool: D28: %d is emirp.


tool: D4: %d is not prime.


tool: D16: %d

assistant: ```c
int main() {
  int i, n, result;
  int p, num1, num2, num;
  while (scanf("%d", &n) == 1) {
    result = check_prime(n);
    if (n == 1) {
      printf("%d is prime.\n", n);
    } else if (result == 1) {
      num1 = n;
      num2 = 0;
      while (num1 != 0) {
        p = num1 % 10;
        num2 = p + num2 * 10;
        num1 = num1 / 10;
      }
      num = check_prime(num2);
      if (num == 1 && num2 != n) {
        printf("%d is emirp.\n", n);
      } else {
        printf("%d is prime.\n", n);
      }
    } else {
      printf("%d is not prime.\n", n);
    }
  }
  return 0;
}
```