#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__ feof(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ fread(float *, int, int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, float);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdin;
int main(int argc, char *argv[]) {
  if (argc > 1) {
    fprintf(stderr, "< entrada > salida\n");
    return 1;
  }
  fprintf(stderr, "%s: running\n", argv[0]);
  for (;;) {
    float x;
    fread(&x, sizeof(float), 1, stdin);
    if (feof(stdin))
      break;
    printf("%f\n", x);
  }
  fprintf(stderr, "%s: done\n", argv[0]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    1183 <main+0x43>
mov    0x2e71(%rip),%rax
mov    (%rax),%edi
lea    0xe90(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1215 <main+0xd5>
mov    0x2e4e(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xe7a(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    0x2e40(%rip),%rax
mov    (%rax),%ecx
lea    -0x14(%rbp),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1030 <fread@plt>
mov    0x2e24(%rip),%rax
mov    (%rax),%edi
call   1060 <feof@plt>
cmp    $0x0,%rax
je     11da <main+0x9a>
jmp    11f0 <main+0xb0>
movss  -0x14(%rbp),%xmm0
lea    0xe3b(%rip),%rdi
call   1040 <printf@plt>
jmp    11a1 <main+0x61>
mov    0x2de1(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xe1e(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %edi,%eax
mov    0x2e84(%rip),%r12
mov    (%r12),%edi
cmp    $0x2,%eax
jl     1176 <main+0x36>
lea    0xe9c(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    $0x1,%r14d
jmp    1215 <main+0xd5>
mov    %rsi,%r15
mov    (%rsi),%rdx
lea    0xe91(%rip),%rsi
xor    %r14d,%r14d
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    0x2e54(%rip),%rbp
mov    0x0(%rbp),%ecx
lea    0x4(%rsp),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1030 <fread@plt>
mov    0x0(%rbp),%edi
call   1060 <feof@plt>
test   %rax,%rax
jne    1200 <main+0xc0>
lea    0xe62(%rip),%r13
lea    0x4(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movss  0x4(%rsp),%xmm0
mov    %r13,%rdi
call   1040 <printf@plt>
mov    0x0(%rbp),%ecx
mov    %rbx,%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1030 <fread@plt>
mov    0x0(%rbp),%edi
call   1060 <feof@plt>
test   %rax,%rax
je     11d0 <main+0x90>
mov    (%r12),%edi
mov    (%r15),%rdx
lea    0xe17(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    %r14d,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [20 x i8] c"< entrada > salida\0A\00"
@.str.1 = [13 x i8] c"%s: running\0A\00"
@stdin = global i32 0
@.str.2 = [4 x i8] c"%f\0A\00"
@.str.3 = [10 x i8] c"%s: done\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca float
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = icmp sgt i32 %7, 1
br i1 %8, label %9, label %12
9: ; preds = %2
%10 = load i32, i32* @stderr
%11 = call i32 (i32, i8*, ...) @fprintf(i32 %10, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %3
br label %34
12: ; preds = %2
%13 = load i32, i32* @stderr
%14 = load i8**, i8*** %5
%15 = getelementptr inbounds i8*, i8** %14, i64 0
%16 = load i8*, i8** %15
%17 = call i32 (i32, i8*, ...) @fprintf(i32 %13, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* %16)
br label %18
18: ; preds = %25, %12
%19 = load i32, i32* @stdin
%20 = call i32 @fread(float* %6, i32 4, i32 1, i32 %19)
%21 = load i32, i32* @stdin
%22 = call i64 @feof(i32 %21)
%23 = icmp ne i64 %22, 0
br i1 %23, label %24, label %25
24: ; preds = %18
br label %28
25: ; preds = %18
%26 = load float, float* %6
%27 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), float %26)
br label %18
28: ; preds = %24
%29 = load i32, i32* @stderr
%30 = load i8**, i8*** %5
%31 = getelementptr inbounds i8*, i8** %30, i64 0
%32 = load i8*, i8** %31
%33 = call i32 (i32, i8*, ...) @fprintf(i32 %29, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i8* %32)
store i32 0, i32* %3
br label %34
34: ; preds = %28, %9
%35 = load i32, i32* %3
ret i32 %35
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [20 x i8] c"< entrada > salida\0A\00"
@.str.1 = [13 x i8] c"%s: running\0A\00"
@stdin = global i32 0
@.str.2 = [4 x i8] c"%f\0A\00"
@.str.3 = [10 x i8] c"%s: done\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca float
%4 = icmp sgt i32 %0, 1
%5 = load i32, i32* @stderr
br i1 %4, label %6, label %8
6: ; preds = %2
%7 = tail call i32 (i32, i8*, ...) @fprintf(i32 %5, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
br label %29
8: ; preds = %2
%9 = load i8*, i8** %1
%10 = tail call i32 (i32, i8*, ...) @fprintf(i32 %5, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* %9)
%11 = bitcast float* %3 to i8*
%12 = load i32, i32* @stdin
%13 = call i32 @fread(float* %3, i32 4, i32 1, i32 %12)
%14 = load i32, i32* @stdin
%15 = call i64 @feof(i32 %14)
%16 = icmp eq i64 %15, 0
br i1 %16, label %17, label %25
17: ; preds = %8, %17
%18 = load float, float* %3
%19 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), float %18)
%20 = load i32, i32* @stdin
%21 = call i32 @fread(float* %3, i32 4, i32 1, i32 %20)
%22 = load i32, i32* @stdin
%23 = call i64 @feof(i32 %22)
%24 = icmp eq i64 %23, 0
br i1 %24, label %17, label %25
25: ; preds = %17, %8
%26 = load i32, i32* @stderr
%27 = load i8*, i8** %1
%28 = call i32 (i32, i8*, ...) @fprintf(i32 %26, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i8* %27)
br label %29
29: ; preds = %25, %6
%30 = phi i32 [ 1, %6 ], [ 0, %25 ]
ret i32 %30
}