#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 *);
double rand();
int main() {
  float f = .2, g = 2., h = 1.0 + rand(), i = 1.0e+3;
  int j, a;
  for (j = 0, a = 10; j < 0; j++, a++)
    ;
  do {
    printf("howdy");
  } while (--i, 0);
  if (1)
    printf("1");
  else
    printf("2");
  return '\x00';
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movss  0xed1(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xec0(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
mov    $0x0,%al
call   1040 <rand@plt>
movaps %xmm0,%xmm1
movsd  0xeb5(%rip),%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  0xe90(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0xa,-0x1c(%rbp)
cmpl   $0x0,-0x18(%rbp)
jge    11a9 <main+0x89>
jmp    1192 <main+0x72>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1183 <main+0x63>
jmp    11ae <main+0x8e>
lea    0xe63(%rip),%rdi
call   1030 <printf@plt>
movss  0xe4a(%rip),%xmm0
addss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
lea    0xe4b(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <rand@plt>
lea    0xec1(%rip),%rdi
call   1040 <printf@plt>
mov    $0x31,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"howdy\00"
@.str.1 = [2 x i8] c"1\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %1
store float 0x3FC99999A0000000, float* %2
store float 2.000000e+00, float* %3
%8 = call double (...) @rand()
%9 = fadd double 1.000000e+00, %8
%10 = fptrunc double %9 to float
store float %10, float* %4
store float 1.000000e+03, float* %5
store i32 0, i32* %6
store i32 10, i32* %7
br label %11
11: ; preds = %15, %0
%12 = load i32, i32* %6
%13 = icmp slt i32 %12, 0
br i1 %13, label %14, label %20
14: ; preds = %11
br label %15
15: ; preds = %14
%16 = load i32, i32* %6
%17 = add nsw i32 %16, 1
store i32 %17, i32* %6
%18 = load i32, i32* %7
%19 = add nsw i32 %18, 1
store i32 %19, i32* %7
br label %11
20: ; preds = %11
br label %21
21: ; preds = %20
%22 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %23
23: ; preds = %21
%24 = load float, float* %5
%25 = fadd float %24, -1.000000e+00
store float %25, float* %5
br label %26
26: ; preds = %23
%27 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"howdy\00"
define i32 @main() {
%1 = tail call double (...) @rand()
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @putchar(i32 49)
ret i32 0
}