#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 */
char *malloc(int);
int /*<<< orphan*/ printf(char *, ...);
int scanf(char *, int *, int *);
int main() {
  int a, b, d;
  int i, j;
  char *c = malloc(100000);
  int r;
  r = scanf("%d %d", &a, &b);
  d = a + b;
  for (j = 0; j < 1; j++)
    for (i = 0; i < 100000000; i++) {
      b += a;
      a++;
    }
  if ((c != NULL) || (b < 100))
    b++;
  if (b == 100)
    printf("hello");
  else
    printf("%d\n", d);
  a += r;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x186a0,%edi
call   1040 <malloc@plt>
mov    %rax,-0x20(%rbp)
lea    0xeac(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1050 <scanf@plt>
mov    %eax,-0x24(%rbp)
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
movl   $0x0,-0x18(%rbp)
cmpl   $0x1,-0x18(%rbp)
jge    11c5 <main+0x95>
movl   $0x0,-0x14(%rbp)
cmpl   $0x5f5e100,-0x14(%rbp)
jge    11b2 <main+0x82>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1185 <main+0x55>
jmp    11b7 <main+0x87>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1174 <main+0x44>
cmpq   $0x0,-0x20(%rbp)
jne    11da <main+0xaa>
cmpl   $0x64,-0xc(%rbp)
jge    11e3 <main+0xb3>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x64,-0xc(%rbp)
jne    1200 <main+0xd0>
lea    0xe12(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1211 <main+0xe1>
mov    -0x10(%rbp),%esi
lea    0xe02(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x24(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
mov    (%rsp),%esi
imul   $0x5f5e100,%eax,%ecx
lea    0x5f5e100(%rax),%edx
mov    %edx,0x4(%rsp)
add    %esi,%ecx
add    $0x34e58f81,%ecx
mov    %ecx,(%rsp)
cmp    $0x64,%ecx
jne    116c <main+0x4c>
lea    0xea3(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
jmp    117c <main+0x5c>
add    %eax,%esi
lea    0xe97(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [6 x i8] c"hello\00"
@.str.2 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
store i32 0, i32* %1
%9 = call i8* @malloc(i32 100000)
store i8* %9, i8** %7
%10 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3)
store i32 %10, i32* %8
%11 = load i32, i32* %2
%12 = load i32, i32* %3
%13 = add nsw i32 %11, %12
store i32 %13, i32* %4
store i32 0, i32* %6
br label %14
14: ; preds = %31, %0
%15 = load i32, i32* %6
%16 = icmp slt i32 %15, 1
br i1 %16, label %17, label %34
17: ; preds = %14
store i32 0, i32* %5
br label %18
18: ; preds = %27, %17
%19 = load i32, i32* %5
%20 = icmp slt i32 %19, 100000000
br i1 %20, label %21, label %30
21: ; preds = %18
%22 = load i32, i32* %2
%23 = load i32, i32* %3
%24 = add nsw i32 %23, %22
store i32 %24, i32* %3
%25 = load i32, i32* %2
%26 = add nsw i32 %25, 1
store i32 %26, i32* %2
br label %27
27: ; preds = %21
%28 = load i32, i32* %5
%29 = add nsw i32 %28, 1
store i32 %29, i32* %5
br label %18
30: ; preds = %18
br label %31
31: ; preds = %30
%32 = load i32, i32* %6
%33 = add nsw i32 %32, 1
store i32 %33, i32* %6
br label %14
34: ; preds = %14
%35 = load i8*, i8** %7
%36 = icmp ne i8* %35, null
br i1 %36, label %40, label %37
37: ; preds = %34
%38 = load i32, i32* %3
%39 = icmp slt i32 %38, 100
br i1 %39, label %40, label %43
40: ; preds = %37, %34
%41 = load i32, i32* %3
%42 = add nsw i32 %41, 1
store i32 %42, i32* %3
br label %43
43: ; preds = %40, %37
%44 = load i32, i32* %3
%45 = icmp eq i32 %44, 100
br i1 %45, label %46, label %48
46: ; preds = %43
%47 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
br label %51
48: ; preds = %43
%49 = load i32, i32* %4
%50 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %49)
br label %51
51: ; preds = %48, %46
%52 = load i32, i32* %8
%53 = load i32, i32* %2
%54 = add nsw i32 %53, %52
store i32 %54, i32* %2
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [6 x i8] c"hello\00"
@.str.2 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = mul i32 %6, 100000000
%9 = add i32 %7, %8
%10 = add i32 %6, 100000000
store i32 %10, i32* %1
%11 = add i32 %9, 887459713
store i32 %11, i32* %2
%12 = icmp eq i32 %11, 100
br i1 %12, label %13, label %15
13: ; preds = %0
%14 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
br label %18
15: ; preds = %0
%16 = add nsw i32 %7, %6
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %16)
br label %18
18: ; preds = %15, %13
ret i32 0
}