#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*/ contains_even_digits(int);
scalar_t__ is_circular_prime(int);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  int count = 1;
  for (int i = 3; i < 1000000; i += 2) {
    if (!contains_even_digits(i) && is_circular_prime(i)) {
      count++;
    }
  }
  printf("%i", count);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
movl   $0x3,-0x18(%rbp)
cmpl   $0xf4240,-0x18(%rbp)
jge    11a0 <main+0x70>
mov    -0x18(%rbp),%edi
call   1050 <contains_even_digits@plt>
cmp    $0x0,%eax
jne    118d <main+0x5d>
mov    -0x18(%rbp),%edi
call   1040 <is_circular_prime@plt>
cmp    $0x0,%rax
je     118d <main+0x5d>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1192 <main+0x62>
mov    -0x18(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x18(%rbp)
jmp    1154 <main+0x24>
mov    -0x14(%rbp),%esi
lea    0xe56(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    $0x1,%ebp
mov    $0x1,%ebx
jmp    1148 <main+0x18>
nop
cmp    $0xf423e,%ebp
jae    1166 <main+0x36>
add    $0x2,%ebp
mov    %ebp,%edi
call   1050 <contains_even_digits@plt>
test   %eax,%eax
jne    1140 <main+0x10>
mov    %ebp,%edi
call   1040 <is_circular_prime@plt>
cmp    $0x1,%rax
sbb    $0xffffffff,%ebx
jmp    1140 <main+0x10>
lea    0xe93(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%i\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
br label %5
3: ; preds = %15
%4 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %16)
ret i32 0
5: ; preds = %2, %15
%6 = phi i32 [ 3, %2 ], [ %17, %15 ]
%7 = phi i32 [ 1, %2 ], [ %16, %15 ]
%8 = tail call i32 @contains_even_digits(i32 %6)
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %15
10: ; preds = %5
%11 = tail call i64 @is_circular_prime(i32 %6)
%12 = icmp ne i64 %11, 0
%13 = zext i1 %12 to i32
%14 = add nsw i32 %7, %13
br label %15
15: ; preds = %10, %5
%16 = phi i32 [ %7, %5 ], [ %14, %10 ]
%17 = add nuw nsw i32 %6, 2
%18 = icmp ult i32 %6, 999998
br i1 %18, label %5, label %3
}