#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*/ __VERIFIER_error();
int __VERIFIER_nondet_int();
int is_prime(int);
int mult(int, int);
int main() {
  int n = __VERIFIER_nondet_int();
  if (n < 1 || n > 46340) {
    return 0;
  }
  int result = is_prime(n);
  int f1 = __VERIFIER_nondet_int();
  if (f1 < 1 || f1 > 46340) {
    return 0;
  }
  int f2 = __VERIFIER_nondet_int();
  if (f1 < 1 || f1 > 46340) {
    return 0;
  }
  if (result == 1 && mult(f1, f2) == n && f1 > 1 && f2 > 1) {
  ERROR:
    __VERIFIER_error();
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jl     1170 <main+0x30>
cmpl   $0xb504,-0x8(%rbp)
jle    117c <main+0x3c>
movl   $0x0,-0x4(%rbp)
jmp    122b <main+0xeb>
mov    -0x8(%rbp),%edi
call   1030 <is_prime@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1050 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0x1,-0x10(%rbp)
jl     11a8 <main+0x68>
cmpl   $0xb504,-0x10(%rbp)
jle    11b4 <main+0x74>
movl   $0x0,-0x4(%rbp)
jmp    122b <main+0xeb>
mov    $0x0,%al
call   1050 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x1,-0x10(%rbp)
jl     11d5 <main+0x95>
cmpl   $0xb504,-0x10(%rbp)
jle    11e1 <main+0xa1>
movl   $0x0,-0x4(%rbp)
jmp    122b <main+0xeb>
cmpl   $0x1,-0xc(%rbp)
jne    1224 <main+0xe4>
mov    -0x10(%rbp),%edi
mov    -0x14(%rbp),%esi
call   1040 <mult@plt>
cmp    -0x8(%rbp),%eax
jne    1224 <main+0xe4>
cmpl   $0x1,-0x10(%rbp)
jle    1224 <main+0xe4>
cmpl   $0x1,-0x14(%rbp)
jle    1224 <main+0xe4>
jmp    1218 <main+0xd8>
mov    $0x0,%al
call   1060 <__VERIFIER_error@plt>
jmp    122b <main+0xeb>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1050 <__VERIFIER_nondet_int@plt>
mov    %eax,%ebx
lea    -0xb505(%rbx),%eax
cmp    $0xffff4afc,%eax
jb     11ae <main+0x6e>
mov    %ebx,%edi
call   1030 <is_prime@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1050 <__VERIFIER_nondet_int@plt>
mov    %eax,%r14d
lea    -0xb505(%r14),%eax
cmp    $0xffff4afc,%eax
jb     11ae <main+0x6e>
xor    %eax,%eax
call   1050 <__VERIFIER_nondet_int@plt>
cmp    $0x1,%ebp
jne    11ae <main+0x6e>
mov    %eax,%r15d
mov    %r14d,%edi
mov    %eax,%esi
call   1040 <mult@plt>
cmp    %ebx,%eax
jne    11ae <main+0x6e>
cmp    $0x2,%r14d
jb     11ae <main+0x6e>
cmp    $0x2,%r15d
jl     11ae <main+0x6e>
xor    %eax,%eax
call   1060 <__VERIFIER_error@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
%6 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = icmp slt i32 %7, 1
br i1 %8, label %12, label %9
9: ; preds = %0
%10 = load i32, i32* %2
%11 = icmp sgt i32 %10, 46340
br i1 %11, label %12, label %13
12: ; preds = %9, %0
store i32 0, i32* %1
br label %50
13: ; preds = %9
%14 = load i32, i32* %2
%15 = call i32 @is_prime(i32 %14)
store i32 %15, i32* %3
%16 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %16, i32* %4
%17 = load i32, i32* %4
%18 = icmp slt i32 %17, 1
br i1 %18, label %22, label %19
19: ; preds = %13
%20 = load i32, i32* %4
%21 = icmp sgt i32 %20, 46340
br i1 %21, label %22, label %23
22: ; preds = %19, %13
store i32 0, i32* %1
br label %50
23: ; preds = %19
%24 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %24, i32* %5
%25 = load i32, i32* %4
%26 = icmp slt i32 %25, 1
br i1 %26, label %30, label %27
27: ; preds = %23
%28 = load i32, i32* %4
%29 = icmp sgt i32 %28, 46340
br i1 %29, label %30, label %31
30: ; preds = %27, %23
store i32 0, i32* %1
br label %50
31: ; preds = %27
%32 = load i32, i32* %3
%33 = icmp eq i32 %32, 1
br i1 %33, label %34, label %49
34: ; preds = %31
%35 = load i32, i32* %4
%36 = load i32, i32* %5
%37 = call i32 @mult(i32 %35, i32 %36)
%38 = load i32, i32* %2
%39 = icmp eq i32 %37, %38
br i1 %39, label %40, label %49
40: ; preds = %34
%41 = load i32, i32* %4
%42 = icmp sgt i32 %41, 1
br i1 %42, label %43, label %49
43: ; preds = %40
%44 = load i32, i32* %5
%45 = icmp sgt i32 %44, 1
br i1 %45, label %46, label %49
46: ; preds = %43
br label %47
47: ; preds = %46
%48 = call i32 (...) @__VERIFIER_error()
br label %50
49: ; preds = %43, %40, %34, %31
store i32 0, i32* %1
br label %50
50: ; preds = %12, %22, %30, %49, %47
%51 = load i32, i32* %1
ret i32 %51
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = add i32 %1, -46341
%3 = icmp ult i32 %2, -46340
br i1 %3, label %21, label %4
4: ; preds = %0
%5 = tail call i32 @is_prime(i32 %1)
%6 = tail call i32 (...) @__VERIFIER_nondet_int()
%7 = add i32 %6, -46341
%8 = icmp ult i32 %7, -46340
br i1 %8, label %21, label %9
9: ; preds = %4
%10 = tail call i32 (...) @__VERIFIER_nondet_int()
%11 = icmp eq i32 %5, 1
br i1 %11, label %12, label %21
12: ; preds = %9
%13 = tail call i32 @mult(i32 %6, i32 %10)
%14 = icmp eq i32 %13, %1
%15 = icmp ugt i32 %6, 1
%16 = select i1 %14, i1 %15, i1 false
%17 = icmp sgt i32 %10, 1
%18 = select i1 %16, i1 %17, i1 false
br i1 %18, label %19, label %21
19: ; preds = %12
%20 = tail call i32 (...) @__VERIFIER_error()
br label %21
21: ; preds = %4, %9, %12, %19, %0
ret i32 0
}