#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__ getFloat(float *);
int /*<<< orphan*/ printf(char *, float);
void main() {
  int i;
  float data;
  for (i = 0; i < 10; ++i)
    if (getFloat(&data))
      printf("data = %g\n", data);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
jge    1170 <main+0x50>
lea    -0x8(%rbp),%rdi
call   1030 <getFloat@plt>
cmp    $0x0,%rax
je     115d <main+0x3d>
movss  -0x8(%rbp),%xmm0
lea    0xea8(%rip),%rdi
call   1040 <printf@plt>
jmp    1162 <main+0x42>
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   %rax
lea    0x4(%rsp),%rdi
call   1030 <getFloat@plt>
test   %rax,%rax
je     1142 <main+0x22>
movss  0x4(%rsp),%xmm0
lea    0xec3(%rip),%rdi
call   1040 <printf@plt>
lea    0x4(%rsp),%rdi
call   1030 <getFloat@plt>
test   %rax,%rax
je     1163 <main+0x43>
movss  0x4(%rsp),%xmm0
lea    0xea2(%rip),%rdi
call   1040 <printf@plt>
lea    0x4(%rsp),%rdi
call   1030 <getFloat@plt>
test   %rax,%rax
je     1184 <main+0x64>
movss  0x4(%rsp),%xmm0
lea    0xe81(%rip),%rdi
call   1040 <printf@plt>
lea    0x4(%rsp),%rdi
call   1030 <getFloat@plt>
test   %rax,%rax
je     11a5 <main+0x85>
movss  0x4(%rsp),%xmm0
lea    0xe60(%rip),%rdi
call   1040 <printf@plt>
lea    0x4(%rsp),%rdi
call   1030 <getFloat@plt>
test   %rax,%rax
je     11c6 <main+0xa6>
movss  0x4(%rsp),%xmm0
lea    0xe3f(%rip),%rdi
call   1040 <printf@plt>
lea    0x4(%rsp),%rdi
call   1030 <getFloat@plt>
test   %rax,%rax
je     11e7 <main+0xc7>
movss  0x4(%rsp),%xmm0
lea    0xe1e(%rip),%rdi
call   1040 <printf@plt>
lea    0x4(%rsp),%rdi
call   1030 <getFloat@plt>
test   %rax,%rax
je     1208 <main+0xe8>
movss  0x4(%rsp),%xmm0
lea    0xdfd(%rip),%rdi
call   1040 <printf@plt>
lea    0x4(%rsp),%rdi
call   1030 <getFloat@plt>
test   %rax,%rax
je     1229 <main+0x109>
movss  0x4(%rsp),%xmm0
lea    0xddc(%rip),%rdi
call   1040 <printf@plt>
lea    0x4(%rsp),%rdi
call   1030 <getFloat@plt>
test   %rax,%rax
je     124a <main+0x12a>
movss  0x4(%rsp),%xmm0
lea    0xdbb(%rip),%rdi
call   1040 <printf@plt>
lea    0x4(%rsp),%rdi
call   1030 <getFloat@plt>
test   %rax,%rax
je     126b <main+0x14b>
movss  0x4(%rsp),%xmm0
lea    0xd9a(%rip),%rdi
call   1040 <printf@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [11 x i8] c"data = %g\0A\00"
define void @main() {
%1 = alloca i32
%2 = alloca float
store i32 0, i32* %1
br label %3
3: ; preds = %13, %0
%4 = load i32, i32* %1
%5 = icmp slt i32 %4, 10
br i1 %5, label %6, label %16
6: ; preds = %3
%7 = call i64 @getFloat(float* %2)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %6
%10 = load float, float* %2
%11 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), float %10)
br label %12
12: ; preds = %9, %6
br label %13
13: ; preds = %12
%14 = load i32, i32* %1
%15 = add nsw i32 %14, 1
store i32 %15, i32* %1
br label %3
16: ; preds = %3
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"data = %g\0A\00"
define void @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = call i64 @getFloat(float* %1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %8, label %5
5: ; preds = %0
%6 = load float, float* %1
%7 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), float %6)
br label %8
8: ; preds = %0, %5
%9 = call i64 @getFloat(float* %1)
%10 = icmp eq i64 %9, 0
br i1 %10, label %14, label %11
11: ; preds = %8
%12 = load float, float* %1
%13 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), float %12)
br label %14
14: ; preds = %11, %8
%15 = call i64 @getFloat(float* %1)
%16 = icmp eq i64 %15, 0
br i1 %16, label %20, label %17
17: ; preds = %14
%18 = load float, float* %1
%19 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), float %18)
br label %20
20: ; preds = %17, %14
%21 = call i64 @getFloat(float* %1)
%22 = icmp eq i64 %21, 0
br i1 %22, label %26, label %23
23: ; preds = %20
%24 = load float, float* %1
%25 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), float %24)
br label %26
26: ; preds = %23, %20
%27 = call i64 @getFloat(float* %1)
%28 = icmp eq i64 %27, 0
br i1 %28, label %32, label %29
29: ; preds = %26
%30 = load float, float* %1
%31 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), float %30)
br label %32
32: ; preds = %29, %26
%33 = call i64 @getFloat(float* %1)
%34 = icmp eq i64 %33, 0
br i1 %34, label %38, label %35
35: ; preds = %32
%36 = load float, float* %1
%37 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), float %36)
br label %38
38: ; preds = %35, %32
%39 = call i64 @getFloat(float* %1)
%40 = icmp eq i64 %39, 0
br i1 %40, label %44, label %41
41: ; preds = %38
%42 = load float, float* %1
%43 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), float %42)
br label %44
44: ; preds = %41, %38
%45 = call i64 @getFloat(float* %1)
%46 = icmp eq i64 %45, 0
br i1 %46, label %50, label %47
47: ; preds = %44
%48 = load float, float* %1
%49 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), float %48)
br label %50
50: ; preds = %47, %44
%51 = call i64 @getFloat(float* %1)
%52 = icmp eq i64 %51, 0
br i1 %52, label %56, label %53
53: ; preds = %50
%54 = load float, float* %1
%55 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), float %54)
br label %56
56: ; preds = %53, %50
%57 = call i64 @getFloat(float* %1)
%58 = icmp eq i64 %57, 0
br i1 %58, label %62, label %59
59: ; preds = %56
%60 = load float, float* %1
%61 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), float %60)
br label %62
62: ; preds = %59, %56
ret void
}