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

/* Variables and functions */
float atof(char *);
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ fwrite(float *, int, int, int /*<<< orphan*/);
int getline(char **, size_t *, int /*<<< orphan*/ *);
int /*<<< orphan*/ *stdin;
int /*<<< orphan*/ stdout;
char *strtok_r(char *, char *, char **);
int main() {
  FILE *fp = stdin;
  char *line = NULL;
  size_t len = 0;
  ssize_t read;
  char *str1 = NULL, *str2, *token = NULL;
  char *saveptr = NULL;
  char space[1];
  space[0] = ' ';
  int j;
  float val = 0;
  while ((read = getline(&line, &len, fp)) != -1) {
    for (j = 1, str1 = line;; j++, str1 = NULL) {
      token = strtok_r(str1, space, &saveptr);
      if (token == NULL)
        break;
      val = atof(token);
      fwrite(&val, sizeof(float), 1, stdout);
    }
  }
  free(line);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2e82(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
movq   $0x0,-0x30(%rbp)
movq   $0x0,-0x40(%rbp)
movq   $0x0,-0x48(%rbp)
movb   $0x20,-0x49(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x54(%rbp)
mov    -0x10(%rbp),%rdx
lea    -0x18(%rbp),%rdi
lea    -0x20(%rbp),%rsi
call   1060 <getline@plt>
mov    %eax,-0x24(%rbp)
cmp    $0xffffffff,%eax
je     1237 <main+0xe7>
movl   $0x1,-0x50(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rdi
lea    -0x49(%rbp),%rsi
lea    -0x48(%rbp),%rdx
call   1050 <strtok_r@plt>
mov    %rax,-0x40(%rbp)
cmpq   $0x0,-0x40(%rbp)
jne    11f2 <main+0xa2>
jmp    1232 <main+0xe2>
mov    -0x40(%rbp),%rdi
call   1040 <atof@plt>
movss  %xmm0,-0x54(%rbp)
mov    0x2dd1(%rip),%rax
mov    (%rax),%ecx
lea    -0x54(%rbp),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1070 <fwrite@plt>
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
movq   $0x0,-0x30(%rbp)
jmp    11cd <main+0x7d>
jmp    11a1 <main+0x51>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    0x2e83(%rip),%rax
mov    (%rax),%r14
movq   $0x0,0x10(%rsp)
movq   $0x0,0x18(%rsp)
movq   $0x0,0x20(%rsp)
movb   $0x20,0xb(%rsp)
movl   $0x0,0xc(%rsp)
lea    0x10(%rsp),%rdi
lea    0x18(%rsp),%rsi
mov    %r14,%rdx
call   1060 <getline@plt>
cmp    $0xffffffff,%eax
je     1228 <main+0xd8>
lea    0xb(%rsp),%r15
lea    0x20(%rsp),%rbx
lea    0x18(%rsp),%r13
mov    0x2e17(%rip),%r12
lea    0xc(%rsp),%rbp
jmp    11e5 <main+0x95>
nopl   0x0(%rax,%rax,1)
lea    0x10(%rsp),%rdi
mov    %r13,%rsi
mov    %r14,%rdx
call   1060 <getline@plt>
cmp    $0xffffffff,%eax
je     1228 <main+0xd8>
mov    0x10(%rsp),%rdi
nopw   0x0(%rax,%rax,1)
mov    %r15,%rsi
mov    %rbx,%rdx
call   1050 <strtok_r@plt>
test   %rax,%rax
je     11d0 <main+0x80>
mov    %rax,%rdi
call   1040 <atof@plt>
movss  %xmm0,0xc(%rsp)
mov    (%r12),%ecx
mov    %rbp,%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1070 <fwrite@plt>
xor    %edi,%edi
jmp    11f0 <main+0xa0>
mov    0x10(%rsp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@stdin = global i32* null
@stdout = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca [1 x i8]
%11 = alloca i32
%12 = alloca float
store i32 0, i32* %1
%13 = load i32*, i32** @stdin
store i32* %13, i32** %2
store i8* null, i8** %3
store i64 0, i64* %4
store i8* null, i8** %6
store i8* null, i8** %8
store i8* null, i8** %9
%14 = getelementptr inbounds [1 x i8], [1 x i8]* %10, i64 0, i64 0
store i8 32, i8* %14
store float 0.000000e+00, float* %12
br label %15
15: ; preds = %36, %0
%16 = load i32*, i32** %2
%17 = call i32 @getline(i8** %3, i64* %4, i32* %16)
store i32 %17, i32* %5
%18 = icmp ne i32 %17, -1
br i1 %18, label %19, label %37
19: ; preds = %15
store i32 1, i32* %11
%20 = load i8*, i8** %3
store i8* %20, i8** %6
br label %21
21: ; preds = %33, %19
%22 = load i8*, i8** %6
%23 = getelementptr inbounds [1 x i8], [1 x i8]* %10, i64 0, i64 0
%24 = call i8* @strtok_r(i8* %22, i8* %23, i8** %9)
store i8* %24, i8** %8
%25 = load i8*, i8** %8
%26 = icmp eq i8* %25, null
br i1 %26, label %27, label %28
27: ; preds = %21
br label %36
28: ; preds = %21
%29 = load i8*, i8** %8
%30 = call float @atof(i8* %29)
store float %30, float* %12
%31 = load i32, i32* @stdout
%32 = call i32 @fwrite(float* %12, i32 4, i32 1, i32 %31)
br label %33
33: ; preds = %28
%34 = load i32, i32* %11
%35 = add nsw i32 %34, 1
store i32 %35, i32* %11
store i8* null, i8** %6
br label %21
36: ; preds = %27
br label %15
37: ; preds = %15
%38 = load i8*, i8** %3
%39 = call i32 @free(i8* %38)
ret i32 0
}

LLVM IR (-O2):
@stdin = global i32* null
@stdout = global i32 0
define i32 @main() {
%1 = alloca i8*
%2 = alloca i64
%3 = alloca i8*
%4 = alloca [1 x i8]
%5 = alloca float
%6 = load i32*, i32** @stdin
%7 = bitcast i8** %1 to i8*
store i8* null, i8** %1
%8 = bitcast i64* %2 to i8*
store i64 0, i64* %2
%9 = bitcast i8** %3 to i8*
store i8* null, i8** %3
%10 = getelementptr inbounds [1 x i8], [1 x i8]* %4, i64 0, i64 0
store i8 32, i8* %10
%11 = bitcast float* %5 to i8*
store float 0.000000e+00, float* %5
%12 = call i32 @getline(i8** %1, i64* %2, i32* %6)
%13 = icmp eq i32 %12, -1
br i1 %13, label %28, label %17
14: ; preds = %21, %17
%15 = call i32 @getline(i8** %1, i64* %2, i32* %6)
%16 = icmp eq i32 %15, -1
br i1 %16, label %28, label %17
17: ; preds = %0, %14
%18 = load i8*, i8** %1
%19 = call i8* @strtok_r(i8* %18, i8* %10, i8** %3)
%20 = icmp eq i8* %19, null
br i1 %20, label %14, label %21
21: ; preds = %17, %21
%22 = phi i8* [ %26, %21 ], [ %19, %17 ]
%23 = call float @atof(i8* %22)
store float %23, float* %5
%24 = load i32, i32* @stdout
%25 = call i32 @fwrite(float* %5, i32 4, i32 1, i32 %24)
%26 = call i8* @strtok_r(i8* null, i8* %10, i8** %3)
%27 = icmp eq i8* %26, null
br i1 %27, label %14, label %21
28: ; preds = %14, %0
%29 = load i8*, i8** %1
%30 = call i32 @free(i8* %29)
ret i32 0
}