#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 */
scalar_t__ fun(int, int, int);
int /*<<< orphan*/ printf(char *, int, int, int);
void main() {
  int a, b, c;
  for (a = 100; a < 333; a++) {
    b = 2 * a;
    c = 3 * a;
    if (fun(a, b, c))
      printf("%4d %4d %4d\n", a, b, c);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x64,-0x4(%rbp)
cmpl   $0x14d,-0x4(%rbp)
jge    118c <main+0x6c>
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x8(%rbp)
imul   $0x3,-0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1030 <fun@plt>
cmp    $0x0,%rax
je     1179 <main+0x59>
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
lea    0xe8c(%rip),%rdi
call   1040 <printf@plt>
jmp    117e <main+0x5e>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    112f <main+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    $0x64,%r14d
mov    $0xc8,%ebp
mov    $0x12c,%ebx
lea    0xec2(%rip),%r15
jmp    1152 <main+0x32>
add    $0x1,%r14d
add    $0x2,%ebp
add    $0x3,%ebx
cmp    $0x29a,%ebp
je     1174 <main+0x54>
mov    %r14d,%edi
mov    %ebp,%esi
mov    %ebx,%edx
call   1030 <fun@plt>
test   %rax,%rax
je     1140 <main+0x20>
mov    %r15,%rdi
mov    %r14d,%esi
mov    %ebp,%edx
mov    %ebx,%ecx
call   1040 <printf@plt>
jmp    1140 <main+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [13 x i8] c"%4d %4d %4d\0A\00"
define void @main() {
br label %1
1: ; preds = %0, %9
%2 = phi i32 [ 100, %0 ], [ %10, %9 ]
%3 = shl nuw nsw i32 %2, 1
%4 = mul nuw nsw i32 %2, 3
%5 = tail call i64 @fun(i32 %2, i32 %3, i32 %4)
%6 = icmp eq i64 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %1
%8 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %3, i32 %4)
br label %9
9: ; preds = %1, %7
%10 = add nuw nsw i32 %2, 1
%11 = icmp eq i32 %10, 333
br i1 %11, label %12, label %1
12: ; preds = %9
ret void
}