#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 *, long long);
int main(void) {
  long long counter = 0;
  int i = 0;
  for (counter = 0; counter < 1000000000; counter++) {
    for (i = 1; i <= 10; i++) {
      if (counter == 100000000 * i) {
        printf("Multible of 100 million is : %d\n", counter);
      }
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movq   $0x0,-0x10(%rbp)
cmpq   $0x3b9aca00,-0x10(%rbp)
3b
jge    11a5 <main+0x95>
movl   $0x1,-0x14(%rbp)
cmpl   $0xa,-0x14(%rbp)
jg     118f <main+0x7f>
mov    -0x10(%rbp),%rax
imul   $0x5f5e100,-0x14(%rbp),%ecx
movslq %ecx,%rcx
cmp    %rcx,%rax
jne    117c <main+0x6c>
mov    -0x10(%rbp),%rsi
lea    0xe89(%rip),%rdi
call   1030 <printf@plt>
jmp    1181 <main+0x71>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    114b <main+0x3b>
jmp    1194 <main+0x84>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1136 <main+0x26>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %ebx,%ebx
lea    0xee3(%rip),%r14
jmp    113c <main+0x2c>
nop
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    $0x3b9aca00,%rbx
je     11cf <main+0xbf>
cmp    $0x1dcd64ff,%rbx
jle    1170 <main+0x60>
cmp    $0x29b926ff,%rbx
jle    1190 <main+0x80>
cmp    $0x29b92700,%rbx
je     1120 <main+0x10>
cmp    $0x35a4e900,%rbx
je     1120 <main+0x10>
cmp    $0x2faf0800,%rbx
je     1120 <main+0x10>
jmp    112b <main+0x1b>
nopl   0x0(%rax,%rax,1)
cmp    $0x11e1a2ff,%rbx
jg     11b0 <main+0xa0>
cmp    $0x5f5e100,%rbx
je     1120 <main+0x10>
cmp    $0xbebc200,%rbx
je     1120 <main+0x10>
jmp    112b <main+0x1b>
nopl   (%rax)
cmp    $0x1dcd6500,%rbx
je     1120 <main+0x10>
cmp    $0x23c34600,%rbx
je     1120 <main+0x10>
jmp    112b <main+0x1b>
nopl   0x0(%rax,%rax,1)
cmp    $0x11e1a300,%rbx
je     1120 <main+0x10>
cmp    $0x17d78400,%rbx
je     1120 <main+0x10>
jmp    112b <main+0x1b>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [33 x i8] c"Multible of 100 million is : %d\0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %5
%2 = phi i64 [ 0, %0 ], [ %6, %5 ]
switch i64 %2, label %5 [
i64 100000000, label %3
i64 200000000, label %3
i64 300000000, label %3
i64 400000000, label %3
i64 500000000, label %3
i64 600000000, label %3
i64 700000000, label %3
i64 800000000, label %3
i64 900000000, label %3
]
3: ; preds = %1, %1, %1, %1, %1, %1, %1, %1, %1
%4 = tail call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i64 %2)
br label %5
5: ; preds = %3, %1
%6 = add nuw nsw i64 %2, 1
%7 = icmp eq i64 %6, 1000000000
br i1 %7, label %8, label %1
8: ; preds = %5
ret i32 0
}