#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int i, num;
  scanf("%d", &num);
  i = 2;
  while (i < num) {
    if (num % i == 0)
      break;
    else {
      i++;
      continue;
    }
  }
  if (num == i)
    printf("%d is zhishu", num);
  else
    printf("%d isn't zhishu", num);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
movl   $0x2,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1175 <main+0x55>
mov    -0xc(%rbp),%eax
cltd
idivl  -0x8(%rbp)
cmp    $0x0,%edx
jne    1167 <main+0x47>
jmp    1175 <main+0x55>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1146 <main+0x26>
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    1195 <main+0x75>
mov    -0xc(%rbp),%esi
lea    0xe78(%rip),%rdi
call   1030 <printf@plt>
jmp    11a4 <main+0x84>
mov    -0xc(%rbp),%esi
lea    0xe71(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%esi
mov    $0x2,%ecx
cmp    $0x3,%esi
jl     1162 <main+0x42>
mov    $0x2,%ecx
lea    0xeb7(%rip),%rdi
nopl   0x0(%rax)
mov    %esi,%eax
cltd
idiv   %ecx
test   %edx,%edx
je     1162 <main+0x42>
add    $0x1,%ecx
cmp    %ecx,%esi
jne    1150 <main+0x30>
jmp    1176 <main+0x56>
cmp    %ecx,%esi
lea    0xe98(%rip),%rax
lea    0xe9e(%rip),%rdi
cmove  %rax,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [13 x i8] c"%d is zhishu\00"
@.str.2 = [16 x i8] c"%d isn't zhishu\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
store i32 2, i32* %2
br label %5
5: ; preds = %15, %0
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = icmp slt i32 %6, %7
br i1 %8, label %9, label %18
9: ; preds = %5
%10 = load i32, i32* %3
%11 = load i32, i32* %2
%12 = srem i32 %10, %11
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %15
14: ; preds = %9
br label %18
15: ; preds = %9
%16 = load i32, i32* %2
%17 = add nsw i32 %16, 1
store i32 %17, i32* %2
br label %5
18: ; preds = %14, %5
%19 = load i32, i32* %3
%20 = load i32, i32* %2
%21 = icmp eq i32 %19, %20
br i1 %21, label %22, label %25
22: ; preds = %18
%23 = load i32, i32* %3
%24 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 %23)
br label %28
25: ; preds = %18
%26 = load i32, i32* %3
%27 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32 %26)
br label %28
28: ; preds = %25, %22
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [13 x i8] c"%d is zhishu\00"
@.str.2 = [16 x i8] c"%d isn't zhishu\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = icmp sgt i32 %4, 2
br i1 %5, label %6, label %13
6: ; preds = %0, %10
%7 = phi i32 [ %11, %10 ], [ 2, %0 ]
%8 = srem i32 %4, %7
%9 = icmp eq i32 %8, 0
br i1 %9, label %13, label %10
10: ; preds = %6
%11 = add nuw nsw i32 %7, 1
%12 = icmp eq i32 %11, %4
br i1 %12, label %17, label %6
13: ; preds = %6, %0
%14 = phi i32 [ 2, %0 ], [ %7, %6 ]
%15 = icmp eq i32 %4, %14
%16 = select i1 %15, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0)
br label %17
17: ; preds = %10, %13
%18 = phi i8* [ %16, %13 ], [ getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), %10 ]
%19 = call i32 @printf(i8* %18, i32 %4)
ret i32 0
}