#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ feof(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fscanf(int /*<<< orphan*/ *, char *, long double *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ *stdin;
int main(int argc, char *argv[]) {
  FILE *f;
  long double min = 1e100, x = 2e100;
  if (!(f = argc <= 1 ? stdin : fopen(argv[1], "r"))) {
    printf("Unable to open stream for reading.\n");
    return 1;
  }
  while (!feof(f)) {
    if (x < min)
      min = x;
    fscanf(f, "%Lf", &x);
  }
  printf("%.10Lg\n", min);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
fldl   0xea4(%rip)
fstpt  -0x30(%rbp)
fldl   0xea3(%rip)
fstpt  -0x40(%rbp)
cmpl   $0x1,-0x8(%rbp)
jg     1185 <main+0x45>
mov    0x2e6f(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x48(%rbp)
jmp    119d <main+0x5d>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe7c(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rax
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jne    11c9 <main+0x89>
lea    0xe5c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    123d <main+0xfd>
jmp    11ce <main+0x8e>
mov    -0x18(%rbp),%rdi
call   1050 <feof@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    11ec <main+0xac>
jmp    1220 <main+0xe0>
fldt   -0x40(%rbp)
fldt   -0x30(%rbp)
fucomip %st(1),%st
fstp   %st(0)
jbe    1207 <main+0xc7>
jmp    1201 <main+0xc1>
fldt   -0x40(%rbp)
fstpt  -0x30(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xe24(%rip),%rsi
lea    -0x40(%rbp),%rdx
call   1040 <fscanf@plt>
jmp    11ce <main+0x8e>
fldt   -0x30(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
lea    0xe0b(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x30,%rsp
fldl   0xea1(%rip)
fstpt  0x20(%rsp)
cmp    $0x1,%edi
jg     11f3 <main+0xa3>
mov    0x2e75(%rip),%rax
mov    (%rax),%rbx
test   %rbx,%rbx
je     120f <main+0xbf>
mov    %rbx,%rdi
call   1060 <feof@plt>
fldl   0xe7b(%rip)
test   %eax,%eax
jne    11de <main+0x8e>
fstp   %st(0)
fldl   0xe6f(%rip)
lea    0xe72(%rip),%r14
lea    0x20(%rsp),%r15
cs nopw 0x0(%rax,%rax,1)
nop
fldt   0x20(%rsp)
fxch   %st(1)
fucomi %st(1),%st
fcmovnbe %st(1),%st
fstp   %st(1)
fstpt  0x14(%rsp)
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1050 <fscanf@plt>
mov    %rbx,%rdi
call   1060 <feof@plt>
fldt   0x14(%rsp)
test   %eax,%eax
je     11b0 <main+0x60>
fstpt  (%rsp)
lea    0xe2e(%rip),%rdi
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <printf@plt>
jmp    1220 <main+0xd0>
mov    0x8(%rsi),%rdi
lea    0xe12(%rip),%rsi
call   1070 <fopen@plt>
mov    %rax,%rbx
test   %rbx,%rbx
jne    117f <main+0x2f>
lea    0xe08(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%ebx
mov    %ebx,%eax
add    $0x30,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@stdin = global i32* null
@.str = [2 x i8] c"r\00"
@.str.1 = [36 x i8] c"Unable to open stream for reading.\0A\00"
@.str.2 = [4 x i8] c"%Lf\00"
@.str.3 = [8 x i8] c"%.10Lg\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32*
%7 = alloca x86_fp80
%8 = alloca x86_fp80
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store x86_fp80 0xK414B924D692CA61BE800, x86_fp80* %7
store x86_fp80 0xK414C924D692CA61BE800, x86_fp80* %8
%9 = load i32, i32* %4
%10 = icmp sle i32 %9, 1
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = load i32*, i32** @stdin
br label %18
13: ; preds = %2
%14 = load i8**, i8*** %5
%15 = getelementptr inbounds i8*, i8** %14, i64 1
%16 = load i8*, i8** %15
%17 = call i32* @fopen(i8* %16, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %18
18: ; preds = %13, %11
%19 = phi i32* [ %12, %11 ], [ %17, %13 ]
store i32* %19, i32** %6
%20 = icmp ne i32* %19, null
br i1 %20, label %23, label %21
21: ; preds = %18
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0))
store i32 1, i32* %3
br label %41
23: ; preds = %18
br label %24
24: ; preds = %35, %23
%25 = load i32*, i32** %6
%26 = call i32 @feof(i32* %25)
%27 = icmp ne i32 %26, 0
%28 = xor i1 %27, true
br i1 %28, label %29, label %38
29: ; preds = %24
%30 = load x86_fp80, x86_fp80* %8
%31 = load x86_fp80, x86_fp80* %7
%32 = fcmp olt x86_fp80 %30, %31
br i1 %32, label %33, label %35
33: ; preds = %29
%34 = load x86_fp80, x86_fp80* %8
store x86_fp80 %34, x86_fp80* %7
br label %35
35: ; preds = %33, %29
%36 = load i32*, i32** %6
%37 = call i32 @fscanf(i32* %36, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), x86_fp80* %8)
br label %24
38: ; preds = %24
%39 = load x86_fp80, x86_fp80* %7
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), x86_fp80 %39)
store i32 0, i32* %3
br label %41
41: ; preds = %38, %21
%42 = load i32, i32* %3
ret i32 %42
}

LLVM IR (-O2):
@stdin = global i32* null
@.str = [2 x i8] c"r\00"
@.str.2 = [4 x i8] c"%Lf\00"
@.str.3 = [8 x i8] c"%.10Lg\0A\00"
@str = [35 x i8] c"Unable to open stream for reading.\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca x86_fp80
%4 = bitcast x86_fp80* %3 to i8*
store x86_fp80 0xK414C924D692CA61BE800, x86_fp80* %3
%5 = icmp slt i32 %0, 2
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = load i32*, i32** @stdin
br label %12
8: ; preds = %2
%9 = getelementptr inbounds i8*, i8** %1, i64 1
%10 = load i8*, i8** %9
%11 = tail call i32* @fopen(i8* %10, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %12
12: ; preds = %8, %6
%13 = phi i32* [ %7, %6 ], [ %11, %8 ]
%14 = icmp eq i32* %13, null
br i1 %14, label %18, label %15
15: ; preds = %12
%16 = call i32 @feof(i32* %13)
%17 = icmp eq i32 %16, 0
br i1 %17, label %20, label %28
18: ; preds = %12
%19 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str, i64 0, i64 0))
br label %31
20: ; preds = %15, %20
%21 = phi x86_fp80 [ %24, %20 ], [ 0xK414B924D692CA61BE800, %15 ]
%22 = load x86_fp80, x86_fp80* %3
%23 = fcmp olt x86_fp80 %22, %21
%24 = select i1 %23, x86_fp80 %22, x86_fp80 %21
%25 = call i32 @fscanf(i32* %13, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), x86_fp80* %3)
%26 = call i32 @feof(i32* %13)
%27 = icmp eq i32 %26, 0
br i1 %27, label %20, label %28
28: ; preds = %20, %15
%29 = phi x86_fp80 [ 0xK414B924D692CA61BE800, %15 ], [ %24, %20 ]
%30 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), x86_fp80 %29)
br label %31
31: ; preds = %28, %18
%32 = phi i32 [ 0, %28 ], [ 1, %18 ]
ret i32 %32
}