#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 */
struct BufferedInputStream {
  int dummy;
};

/* Variables and functions */
struct BufferedInputStream *bufferedInputStream(unsigned long long);
int bufferedReadInt(struct BufferedInputStream *);
long double bufferedReadLongDouble(struct BufferedInputStream *);
int /*<<< orphan*/ printf(char *, long double);
int main() {
  struct BufferedInputStream *bis = bufferedInputStream(786432ull / 20);
  int n;
  long double d;
  n = bufferedReadInt(bis);
  printf("%d\n", n);
  while (n--) {
    d = bufferedReadLongDouble(bis);
    printf("%.6LF\n", d);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x9999,%edi
call   1030 <bufferedInputStream@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <bufferedReadInt@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x34(%rbp)
fildl  -0x34(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
lea    0xe82(%rip),%rdi
call   1040 <printf@plt>
mov    -0x14(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x14(%rbp)
cmp    $0x0,%eax
je     11bc <main+0x7c>
mov    -0x10(%rbp),%rdi
call   1060 <bufferedReadLongDouble@plt>
fstpt  -0x30(%rbp)
fldt   -0x30(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
lea    0xe52(%rip),%rdi
call   1040 <printf@plt>
jmp    1183 <main+0x43>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0x20,%rsp
mov    $0x9999,%edi
call   1030 <bufferedInputStream@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1050 <bufferedReadInt@plt>
mov    %eax,%ebp
mov    %eax,0x1c(%rsp)
fildl  0x1c(%rsp)
fstpt  (%rsp)
lea    0xe8f(%rip),%rdi
call   1040 <printf@plt>
test   %ebp,%ebp
je     11a8 <main+0x68>
lea    0xe83(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1060 <bufferedReadLongDouble@plt>
fstpt  (%rsp)
mov    %r14,%rdi
call   1040 <printf@plt>
add    $0xffffffff,%ebp
jne    1190 <main+0x50>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
%struct.BufferedInputStream = type { i32 }
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [7 x i8] c"%.6LF\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.BufferedInputStream*
%3 = alloca i32
%4 = alloca x86_fp80
store i32 0, i32* %1
%5 = call %struct.BufferedInputStream* @bufferedInputStream(i64 39321)
store %struct.BufferedInputStream* %5, %struct.BufferedInputStream** %2
%6 = load %struct.BufferedInputStream*, %struct.BufferedInputStream** %2
%7 = call i32 @bufferedReadInt(%struct.BufferedInputStream* %6)
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = sitofp i32 %8 to x86_fp80
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), x86_fp80 %9)
br label %11
11: ; preds = %15, %0
%12 = load i32, i32* %3
%13 = add nsw i32 %12, -1
store i32 %13, i32* %3
%14 = icmp ne i32 %12, 0
br i1 %14, label %15, label %20
15: ; preds = %11
%16 = load %struct.BufferedInputStream*, %struct.BufferedInputStream** %2
%17 = call x86_fp80 @bufferedReadLongDouble(%struct.BufferedInputStream* %16)
store x86_fp80 %17, x86_fp80* %4
%18 = load x86_fp80, x86_fp80* %4
%19 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), x86_fp80 %18)
br label %11
20: ; preds = %11
ret i32 0
}

LLVM IR (-O2):
%struct.BufferedInputStream = type { i32 }
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [7 x i8] c"%.6LF\0A\00"
define i32 @main() {
%1 = tail call %struct.BufferedInputStream* @bufferedInputStream(i64 39321)
%2 = tail call i32 @bufferedReadInt(%struct.BufferedInputStream* %1)
%3 = sitofp i32 %2 to x86_fp80
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), x86_fp80 %3)
%5 = icmp eq i32 %2, 0
br i1 %5, label %12, label %6
6: ; preds = %0, %6
%7 = phi i32 [ %8, %6 ], [ %2, %0 ]
%8 = add nsw i32 %7, -1
%9 = tail call x86_fp80 @bufferedReadLongDouble(%struct.BufferedInputStream* %1)
%10 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), x86_fp80 %9)
%11 = icmp eq i32 %8, 0
br i1 %11, label %12, label %6
12: ; preds = %6, %0
ret i32 0
}