#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, m, k;
  long double d;
  n = bufferedReadInt(bis);
  m = n;
  printf("%d\n", n);
  while (m--) {
    k = bufferedReadInt(bis);
    printf("%d\n", k);
  }
  m = n;
  while (m--) {
    d = bufferedReadLongDouble(bis);
    printf("%.6LF\n", d);
  }
  m = n;
  while (m--) {
    k = bufferedReadInt(bis);
    d = bufferedReadLongDouble(bis);
    printf("%d\n", k);
    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,-0x18(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x34(%rbp)
fildl  -0x34(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
lea    0xe7c(%rip),%rdi
call   1040 <printf@plt>
mov    -0x18(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x18(%rbp)
cmp    $0x0,%eax
je     11c8 <main+0x88>
mov    -0x10(%rbp),%rdi
call   1050 <bufferedReadInt@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x3c(%rbp)
fildl  -0x3c(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
lea    0xe42(%rip),%rdi
call   1040 <printf@plt>
jmp    1189 <main+0x49>
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x18(%rbp)
cmp    $0x0,%eax
je     1207 <main+0xc7>
mov    -0x10(%rbp),%rdi
call   1060 <bufferedReadLongDouble@plt>
fstpt  -0x30(%rbp)
fldt   -0x30(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
lea    0xe07(%rip),%rdi
call   1040 <printf@plt>
jmp    11ce <main+0x8e>
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x18(%rbp)
cmp    $0x0,%eax
je     126c <main+0x12c>
mov    -0x10(%rbp),%rdi
call   1050 <bufferedReadInt@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rdi
call   1060 <bufferedReadLongDouble@plt>
fstpt  -0x30(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x38(%rbp)
fildl  -0x38(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
lea    0xdb2(%rip),%rdi
call   1040 <printf@plt>
fldt   -0x30(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
lea    0xda2(%rip),%rdi
call   1040 <printf@plt>
jmp    120d <main+0xcd>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x30,%rsp
mov    $0x9999,%edi
call   1030 <bufferedInputStream@plt>
mov    %rax,%r12
mov    %rax,%rdi
call   1050 <bufferedReadInt@plt>
mov    %eax,%ebp
mov    %eax,0x20(%rsp)
fildl  0x20(%rsp)
fstpt  (%rsp)
lea    0xe8b(%rip),%rdi
call   1040 <printf@plt>
test   %ebp,%ebp
je     122d <main+0xed>
lea    0xe77(%rip),%r14
mov    %ebp,%ebx
nopl   0x0(%rax,%rax,1)
mov    %r12,%rdi
call   1050 <bufferedReadInt@plt>
mov    %eax,0x1c(%rsp)
fildl  0x1c(%rsp)
fstpt  (%rsp)
mov    %r14,%rdi
call   1040 <printf@plt>
add    $0xffffffff,%ebx
jne    1190 <main+0x50>
lea    0xe4d(%rip),%r14
mov    %ebp,%ebx
nopl   0x0(%rax)
mov    %r12,%rdi
call   1060 <bufferedReadLongDouble@plt>
fstpt  (%rsp)
mov    %r14,%rdi
call   1040 <printf@plt>
add    $0xffffffff,%ebx
jne    11c0 <main+0x80>
lea    0xe21(%rip),%r14
lea    0xe1e(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
mov    %r12,%rdi
call   1050 <bufferedReadInt@plt>
mov    %eax,%ebx
mov    %r12,%rdi
call   1060 <bufferedReadLongDouble@plt>
fstpt  0x24(%rsp)
mov    %ebx,0x18(%rsp)
fildl  0x18(%rsp)
fstpt  (%rsp)
mov    %r14,%rdi
call   1040 <printf@plt>
fldt   0x24(%rsp)
fstpt  (%rsp)
mov    %r15,%rdi
call   1040 <printf@plt>
add    $0xffffffff,%ebp
jne    11f0 <main+0xb0>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
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 i32
%5 = alloca i32
%6 = alloca x86_fp80
store i32 0, i32* %1
%7 = call %struct.BufferedInputStream* @bufferedInputStream(i64 39321)
store %struct.BufferedInputStream* %7, %struct.BufferedInputStream** %2
%8 = load %struct.BufferedInputStream*, %struct.BufferedInputStream** %2
%9 = call i32 @bufferedReadInt(%struct.BufferedInputStream* %8)
store i32 %9, i32* %3
%10 = load i32, i32* %3
store i32 %10, i32* %4
%11 = load i32, i32* %3
%12 = sitofp i32 %11 to x86_fp80
%13 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), x86_fp80 %12)
br label %14
14: ; preds = %18, %0
%15 = load i32, i32* %4
%16 = add nsw i32 %15, -1
store i32 %16, i32* %4
%17 = icmp ne i32 %15, 0
br i1 %17, label %18, label %24
18: ; preds = %14
%19 = load %struct.BufferedInputStream*, %struct.BufferedInputStream** %2
%20 = call i32 @bufferedReadInt(%struct.BufferedInputStream* %19)
store i32 %20, i32* %5
%21 = load i32, i32* %5
%22 = sitofp i32 %21 to x86_fp80
%23 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), x86_fp80 %22)
br label %14
24: ; preds = %14
%25 = load i32, i32* %3
store i32 %25, i32* %4
br label %26
26: ; preds = %30, %24
%27 = load i32, i32* %4
%28 = add nsw i32 %27, -1
store i32 %28, i32* %4
%29 = icmp ne i32 %27, 0
br i1 %29, label %30, label %35
30: ; preds = %26
%31 = load %struct.BufferedInputStream*, %struct.BufferedInputStream** %2
%32 = call x86_fp80 @bufferedReadLongDouble(%struct.BufferedInputStream* %31)
store x86_fp80 %32, x86_fp80* %6
%33 = load x86_fp80, x86_fp80* %6
%34 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), x86_fp80 %33)
br label %26
35: ; preds = %26
%36 = load i32, i32* %3
store i32 %36, i32* %4
br label %37
37: ; preds = %41, %35
%38 = load i32, i32* %4
%39 = add nsw i32 %38, -1
store i32 %39, i32* %4
%40 = icmp ne i32 %38, 0
br i1 %40, label %41, label %51
41: ; preds = %37
%42 = load %struct.BufferedInputStream*, %struct.BufferedInputStream** %2
%43 = call i32 @bufferedReadInt(%struct.BufferedInputStream* %42)
store i32 %43, i32* %5
%44 = load %struct.BufferedInputStream*, %struct.BufferedInputStream** %2
%45 = call x86_fp80 @bufferedReadLongDouble(%struct.BufferedInputStream* %44)
store x86_fp80 %45, x86_fp80* %6
%46 = load i32, i32* %5
%47 = sitofp i32 %46 to x86_fp80
%48 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), x86_fp80 %47)
%49 = load x86_fp80, x86_fp80* %6
%50 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), x86_fp80 %49)
br label %37
51: ; preds = %37
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 %28, label %6
6: ; preds = %0, %6
%7 = phi i32 [ %8, %6 ], [ %2, %0 ]
%8 = add nsw i32 %7, -1
%9 = tail call i32 @bufferedReadInt(%struct.BufferedInputStream* %1)
%10 = sitofp i32 %9 to x86_fp80
%11 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), x86_fp80 %10)
%12 = icmp eq i32 %8, 0
br i1 %12, label %13, label %6
13: ; preds = %6, %13
%14 = phi i32 [ %15, %13 ], [ %2, %6 ]
%15 = add nsw i32 %14, -1
%16 = tail call x86_fp80 @bufferedReadLongDouble(%struct.BufferedInputStream* %1)
%17 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), x86_fp80 %16)
%18 = icmp eq i32 %15, 0
br i1 %18, label %19, label %13
19: ; preds = %13, %19
%20 = phi i32 [ %21, %19 ], [ %2, %13 ]
%21 = add nsw i32 %20, -1
%22 = tail call i32 @bufferedReadInt(%struct.BufferedInputStream* %1)
%23 = tail call x86_fp80 @bufferedReadLongDouble(%struct.BufferedInputStream* %1)
%24 = sitofp i32 %22 to x86_fp80
%25 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), x86_fp80 %24)
%26 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), x86_fp80 %23)
%27 = icmp eq i32 %21, 0
br i1 %27, label %28, label %19
28: ; preds = %19, %0
ret i32 0
}