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

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
scalar_t__ feof(int /*<<< orphan*/);
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fwrite(float *, int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *);
int sscanf(char *, char *, float *, float *, float *, float *, float *, float *,
           float *);
int /*<<< orphan*/ stdin;
int main() {
  char line[1000];
  float v[7];
  FILE *fpout;
  fgets(line, 999, stdin);
  fgets(line, 999, stdin);
  fgets(line, 999, stdin);
  fgets(line, 999, stdin);
  fgets(line, 999, stdin);
  fpout = fopen("out.bin", "w");
  while (!feof(stdin)) {
    fgets(line, 999, stdin);
    if (feof(stdin))
      break;
    if (sscanf(line, "%f %f %f %f %f %f %f", &v[0], &v[1], &v[2], &v[3], &v[4],
               &v[5], &v[6]) == 7) {
      fwrite(v, sizeof(v), 1, fpout);
    } else {
      printf(line);
    }
  }
  fclose(fpout);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x430,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x3f0(%rbp),%rdi
mov    0x2e58(%rip),%rax
mov    (%rax),%edx
mov    $0x3e7,%esi
call   1050 <fgets@plt>
lea    -0x3f0(%rbp),%rdi
mov    0x2e3e(%rip),%rax
mov    (%rax),%edx
mov    $0x3e7,%esi
call   1050 <fgets@plt>
lea    -0x3f0(%rbp),%rdi
mov    0x2e24(%rip),%rax
mov    (%rax),%edx
mov    $0x3e7,%esi
call   1050 <fgets@plt>
lea    -0x3f0(%rbp),%rdi
mov    0x2e0a(%rip),%rax
mov    (%rax),%edx
mov    $0x3e7,%esi
call   1050 <fgets@plt>
lea    -0x3f0(%rbp),%rdi
mov    0x2df0(%rip),%rax
mov    (%rax),%edx
mov    $0x3e7,%esi
call   1050 <fgets@plt>
lea    0xdf5(%rip),%rdi
lea    0xdf6(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,-0x418(%rbp)
mov    0x2dc3(%rip),%rax
mov    (%rax),%edi
call   1060 <feof@plt>
cmp    $0x0,%rax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1242 <main+0xd2>
jmp    131f <main+0x1af>
lea    -0x3f0(%rbp),%rdi
mov    0x2d98(%rip),%rax
mov    (%rax),%edx
mov    $0x3e7,%esi
call   1050 <fgets@plt>
mov    0x2d85(%rip),%rax
mov    (%rax),%edi
call   1060 <feof@plt>
cmp    $0x0,%rax
je     1279 <main+0x109>
jmp    131f <main+0x1af>
lea    -0x3f0(%rbp),%rdi
lea    -0x410(%rbp),%rdx
lea    -0x410(%rbp),%rcx
add    $0x4,%rcx
lea    -0x410(%rbp),%r8
add    $0x8,%r8
lea    -0x410(%rbp),%r9
add    $0xc,%r9
lea    -0x410(%rbp),%r11
add    $0x10,%r11
lea    -0x410(%rbp),%r10
add    $0x14,%r10
lea    -0x410(%rbp),%rax
add    $0x18,%rax
lea    0xd3a(%rip),%rsi
mov    %r11,(%rsp)
mov    %r10,0x8(%rsp)
mov    %rax,0x10(%rsp)
call   1070 <sscanf@plt>
cmp    $0x7,%eax
jne    130e <main+0x19e>
lea    -0x410(%rbp),%rdi
mov    -0x418(%rbp),%rcx
mov    $0x1c,%esi
mov    $0x1,%edx
call   1090 <fwrite@plt>
jmp    131a <main+0x1aa>
lea    -0x3f0(%rbp),%rdi
call   1040 <printf@plt>
jmp    121e <main+0xae>
mov    -0x418(%rbp),%rdi
call   1030 <fclose@plt>
xor    %eax,%eax
add    $0x430,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x408,%rsp
mov    0x2e60(%rip),%r15
mov    (%r15),%edx
lea    0x20(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x3e7,%esi
call   1050 <fgets@plt>
mov    (%r15),%edx
mov    %rbx,%rdi
mov    $0x3e7,%esi
call   1050 <fgets@plt>
mov    (%r15),%edx
mov    %rbx,%rdi
mov    $0x3e7,%esi
call   1050 <fgets@plt>
mov    (%r15),%edx
mov    %rbx,%rdi
mov    $0x3e7,%esi
call   1050 <fgets@plt>
mov    (%r15),%edx
mov    %rbx,%rdi
mov    $0x3e7,%esi
call   1050 <fgets@plt>
lea    0xe1c(%rip),%rdi
lea    0xe1d(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,%r13
mov    (%r15),%edi
call   1060 <feof@plt>
test   %rax,%rax
je     121c <main+0xac>
mov    %r13,%rdi
call   1030 <fclose@plt>
xor    %eax,%eax
add    $0x408,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0x18(%rsp),%r12
lea    0x20(%rsp),%rbx
lea    0xddd(%rip),%rbp
mov    %rsp,%r14
jmp    1255 <main+0xe5>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rbx,%rdi
call   1040 <printf@plt>
mov    (%r15),%edi
call   1060 <feof@plt>
test   %rax,%rax
jne    1200 <main+0x90>
mov    (%r15),%edx
mov    %rbx,%rdi
mov    $0x3e7,%esi
call   1050 <fgets@plt>
mov    (%r15),%edi
call   1060 <feof@plt>
test   %rax,%rax
jne    1200 <main+0x90>
sub    $0x8,%rsp
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    %r14,%rdx
lea    0xc(%rsp),%rcx
lea    0x10(%rsp),%r8
lea    0x14(%rsp),%r9
push   %r12
lea    0x24(%rsp),%rax
push   %rax
lea    0x28(%rsp),%rax
push   %rax
call   1070 <sscanf@plt>
add    $0x20,%rsp
cmp    $0x7,%eax
jne    1240 <main+0xd0>
mov    %r14,%rdi
mov    $0x1c,%esi
mov    $0x1,%edx
mov    %r13,%rcx
call   1090 <fwrite@plt>
jmp    1248 <main+0xd8>

LLVM IR (-O0):
@stdin = global i32 0
@.str = [8 x i8] c"out.bin\00"
@.str.1 = [2 x i8] c"w\00"
@.str.2 = [21 x i8] c"%f %f %f %f %f %f %f\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [1000 x i8]
%3 = alloca [7 x float]
%4 = alloca i32*
store i32 0, i32* %1
%5 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 0
%6 = load i32, i32* @stdin
%7 = call i32 @fgets(i8* %5, i32 999, i32 %6)
%8 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 0
%9 = load i32, i32* @stdin
%10 = call i32 @fgets(i8* %8, i32 999, i32 %9)
%11 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 0
%12 = load i32, i32* @stdin
%13 = call i32 @fgets(i8* %11, i32 999, i32 %12)
%14 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 0
%15 = load i32, i32* @stdin
%16 = call i32 @fgets(i8* %14, i32 999, i32 %15)
%17 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 0
%18 = load i32, i32* @stdin
%19 = call i32 @fgets(i8* %17, i32 999, i32 %18)
%20 = call i32* @fopen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %20, i32** %4
br label %21
21: ; preds = %52, %0
%22 = load i32, i32* @stdin
%23 = call i64 @feof(i32 %22)
%24 = icmp ne i64 %23, 0
%25 = xor i1 %24, true
br i1 %25, label %26, label %53
26: ; preds = %21
%27 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 0
%28 = load i32, i32* @stdin
%29 = call i32 @fgets(i8* %27, i32 999, i32 %28)
%30 = load i32, i32* @stdin
%31 = call i64 @feof(i32 %30)
%32 = icmp ne i64 %31, 0
br i1 %32, label %33, label %34
33: ; preds = %26
br label %53
34: ; preds = %26
%35 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 0
%36 = getelementptr inbounds [7 x float], [7 x float]* %3, i64 0, i64 0
%37 = getelementptr inbounds [7 x float], [7 x float]* %3, i64 0, i64 1
%38 = getelementptr inbounds [7 x float], [7 x float]* %3, i64 0, i64 2
%39 = getelementptr inbounds [7 x float], [7 x float]* %3, i64 0, i64 3
%40 = getelementptr inbounds [7 x float], [7 x float]* %3, i64 0, i64 4
%41 = getelementptr inbounds [7 x float], [7 x float]* %3, i64 0, i64 5
%42 = getelementptr inbounds [7 x float], [7 x float]* %3, i64 0, i64 6
%43 = call i32 @sscanf(i8* %35, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), float* %36, float* %37, float* %38, float* %39, float* %40, float* %41, float* %42)
%44 = icmp eq i32 %43, 7
br i1 %44, label %45, label %49
45: ; preds = %34
%46 = getelementptr inbounds [7 x float], [7 x float]* %3, i64 0, i64 0
%47 = load i32*, i32** %4
%48 = call i32 @fwrite(float* %46, i32 28, i32 1, i32* %47)
br label %52
49: ; preds = %34
%50 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 0
%51 = call i32 @printf(i8* %50)
br label %52
52: ; preds = %49, %45
br label %21
53: ; preds = %33, %21
%54 = load i32*, i32** %4
%55 = call i32 @fclose(i32* %54)
ret i32 0
}

LLVM IR (-O2):
@stdin = global i32 0
@.str = [8 x i8] c"out.bin\00"
@.str.1 = [2 x i8] c"w\00"
@.str.2 = [21 x i8] c"%f %f %f %f %f %f %f\00"
define i32 @main() {
%1 = alloca [1000 x i8]
%2 = alloca [7 x float]
%3 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%4 = bitcast [7 x float]* %2 to i8*
%5 = load i32, i32* @stdin
%6 = call i32 @fgets(i8* %3, i32 999, i32 %5)
%7 = load i32, i32* @stdin
%8 = call i32 @fgets(i8* %3, i32 999, i32 %7)
%9 = load i32, i32* @stdin
%10 = call i32 @fgets(i8* %3, i32 999, i32 %9)
%11 = load i32, i32* @stdin
%12 = call i32 @fgets(i8* %3, i32 999, i32 %11)
%13 = load i32, i32* @stdin
%14 = call i32 @fgets(i8* %3, i32 999, i32 %13)
%15 = call i32* @fopen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%16 = load i32, i32* @stdin
%17 = call i64 @feof(i32 %16)
%18 = icmp eq i64 %17, 0
br i1 %18, label %19, label %44
19: ; preds = %0
%20 = getelementptr inbounds [7 x float], [7 x float]* %2, i64 0, i64 0
%21 = getelementptr inbounds [7 x float], [7 x float]* %2, i64 0, i64 1
%22 = getelementptr inbounds [7 x float], [7 x float]* %2, i64 0, i64 2
%23 = getelementptr inbounds [7 x float], [7 x float]* %2, i64 0, i64 3
%24 = getelementptr inbounds [7 x float], [7 x float]* %2, i64 0, i64 4
%25 = getelementptr inbounds [7 x float], [7 x float]* %2, i64 0, i64 5
%26 = getelementptr inbounds [7 x float], [7 x float]* %2, i64 0, i64 6
br label %27
27: ; preds = %19, %40
%28 = load i32, i32* @stdin
%29 = call i32 @fgets(i8* %3, i32 999, i32 %28)
%30 = load i32, i32* @stdin
%31 = call i64 @feof(i32 %30)
%32 = icmp eq i64 %31, 0
br i1 %32, label %33, label %44
33: ; preds = %27
%34 = call i32 @sscanf(i8* %3, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), float* %20, float* %21, float* %22, float* %23, float* %24, float* %25, float* %26)
%35 = icmp eq i32 %34, 7
br i1 %35, label %36, label %38
36: ; preds = %33
%37 = call i32 @fwrite(float* %20, i32 28, i32 1, i32* %15)
br label %40
38: ; preds = %33
%39 = call i32 @printf(i8* %3)
br label %40
40: ; preds = %38, %36
%41 = load i32, i32* @stdin
%42 = call i64 @feof(i32 %41)
%43 = icmp eq i64 %42, 0
br i1 %43, label %27, label %44
44: ; preds = %40, %27, %0
%45 = call i32 @fclose(i32* %15)
ret i32 0
}