#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 fun1(int);
int fun2(int);
int fun3(int);
scalar_t__ isfun(int);
int /*<<< orphan*/ printf(char *, int);
void main() {
  int n;
  for (n = 101; n < 1000; n++)
    if (isfun(n) && isfun(fun1(n)) && isfun(fun2(n)) && isfun(fun3(n)))
      printf("%d\n", n);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x65,-0x4(%rbp)
cmpl   $0x3e8,-0x4(%rbp)
jge    11eb <main+0x9b>
mov    -0x4(%rbp),%edi
call   1050 <isfun@plt>
cmp    $0x0,%rax
je     11d8 <main+0x88>
mov    -0x4(%rbp),%edi
call   1060 <fun1@plt>
mov    %eax,%edi
call   1050 <isfun@plt>
cmp    $0x0,%rax
je     11d8 <main+0x88>
mov    -0x4(%rbp),%edi
call   1030 <fun2@plt>
mov    %eax,%edi
call   1050 <isfun@plt>
cmp    $0x0,%rax
je     11d8 <main+0x88>
mov    -0x4(%rbp),%edi
call   1070 <fun3@plt>
mov    %eax,%edi
call   1050 <isfun@plt>
cmp    $0x0,%rax
je     11d8 <main+0x88>
mov    -0x4(%rbp),%esi
lea    0xe2d(%rip),%rdi
call   1040 <printf@plt>
jmp    11dd <main+0x8d>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    115f <main+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0x65,%ebx
lea    0xea0(%rip),%r14
jmp    117b <main+0x2b>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%ebx
cmp    $0x3e8,%ebx
je     11cc <main+0x7c>
mov    %ebx,%edi
call   1050 <isfun@plt>
test   %rax,%rax
je     1170 <main+0x20>
mov    %ebx,%edi
call   1060 <fun1@plt>
mov    %eax,%edi
call   1050 <isfun@plt>
test   %rax,%rax
je     1170 <main+0x20>
mov    %ebx,%edi
call   1030 <fun2@plt>
mov    %eax,%edi
call   1050 <isfun@plt>
test   %rax,%rax
je     1170 <main+0x20>
mov    %ebx,%edi
call   1070 <fun3@plt>
mov    %eax,%edi
call   1050 <isfun@plt>
test   %rax,%rax
je     1170 <main+0x20>
mov    %r14,%rdi
mov    %ebx,%esi
call   1040 <printf@plt>
jmp    1170 <main+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @main() {
br label %1
1: ; preds = %0, %19
%2 = phi i32 [ 101, %0 ], [ %20, %19 ]
%3 = tail call i64 @isfun(i32 %2)
%4 = icmp eq i64 %3, 0
br i1 %4, label %19, label %5
5: ; preds = %1
%6 = tail call i32 @fun1(i32 %2)
%7 = tail call i64 @isfun(i32 %6)
%8 = icmp eq i64 %7, 0
br i1 %8, label %19, label %9
9: ; preds = %5
%10 = tail call i32 @fun2(i32 %2)
%11 = tail call i64 @isfun(i32 %10)
%12 = icmp eq i64 %11, 0
br i1 %12, label %19, label %13
13: ; preds = %9
%14 = tail call i32 @fun3(i32 %2)
%15 = tail call i64 @isfun(i32 %14)
%16 = icmp eq i64 %15, 0
br i1 %16, label %19, label %17
17: ; preds = %13
%18 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %2)
br label %19
19: ; preds = %1, %5, %9, %13, %17
%20 = add nuw nsw i32 %2, 1
%21 = icmp eq i32 %20, 1000
br i1 %21, label %22, label %1
22: ; preds = %19
ret void
}