#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 */

/* Variables and functions */
int /*<<< orphan*/ error1(char *);
scalar_t__ sscanf(char *, char *, float *);
void dainyuu_input_data(float data[], int dim, char linebuf[]) {
  int n, n1;
  int np = 0;
  char char1[256];
  float wtempcon;
  for (n = 0; n < dim; n++) {
    while ((linebuf[np] == ' ') || (linebuf[np] == '\t')) {
      np++;
      if (np >= 50 * 30)
        error1("Too long line in tch file (Not enough dimension?)");
    }
    n1 = 0;
    while ((linebuf[np] != ' ') && (linebuf[np] != '\t') &&
           (linebuf[np] != '\n')) {
      char1[n1] = linebuf[np];
      np++;
      n1++;
      if (n1 >= 256)
        error1("Too long number in tch file");
    }
    char1[n1] = '\0';
    if (sscanf(char1, "%f", &wtempcon) <= 0)
      error1("Irregal data in tch file");
    else
      data[n] = wtempcon;
  }
}


x86 assembly (clang, -O0):
<dainyuu_input_data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x140,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x24(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    12df <dainyuu_input_data+0x1bf>
jmp    1155 <dainyuu_input_data+0x35>
mov    -0x18(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsbl (%rax,%rcx,1),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x135(%rbp)
je     118a <dainyuu_input_data+0x6a>
mov    -0x18(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x9,%eax
sete   %al
mov    %al,-0x135(%rbp)
mov    -0x135(%rbp),%al
test   $0x1,%al
jne    119d <dainyuu_input_data+0x7d>
jmp    11c4 <dainyuu_input_data+0xa4>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
cmpl   $0x5dc,-0x24(%rbp)
jl     11bf <dainyuu_input_data+0x9f>
lea    0xe46(%rip),%rdi
call   1040 <error1@plt>
jmp    1155 <dainyuu_input_data+0x35>
movl   $0x0,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsbl (%rax,%rcx,1),%ecx
xor    %eax,%eax
cmp    $0x20,%ecx
mov    %al,-0x136(%rbp)
je     121d <dainyuu_input_data+0xfd>
mov    -0x18(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsbl (%rax,%rcx,1),%ecx
xor    %eax,%eax
cmp    $0x9,%ecx
mov    %al,-0x136(%rbp)
je     121d <dainyuu_input_data+0xfd>
mov    -0x18(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0xa,%eax
setne  %al
mov    %al,-0x136(%rbp)
mov    -0x136(%rbp),%al
test   $0x1,%al
jne    1230 <dainyuu_input_data+0x110>
jmp    1276 <dainyuu_input_data+0x156>
mov    -0x18(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,1),%cl
movslq -0x20(%rbp),%rax
mov    %cl,-0x130(%rbp,%rax,1)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
cmpl   $0x100,-0x20(%rbp)
jl     1271 <dainyuu_input_data+0x151>
lea    0xdc6(%rip),%rdi
call   1040 <error1@plt>
jmp    11cb <dainyuu_input_data+0xab>
movslq -0x20(%rbp),%rax
movb   $0x0,-0x130(%rbp,%rax,1)
lea    -0x130(%rbp),%rdi
lea    0xdbe(%rip),%rsi
lea    -0x134(%rbp),%rdx
call   1030 <sscanf@plt>
cmp    $0x0,%rax
jg     12b7 <dainyuu_input_data+0x197>
lea    0xda4(%rip),%rdi
call   1040 <error1@plt>
jmp    12cc <dainyuu_input_data+0x1ac>
movss  -0x134(%rbp),%xmm0
ff
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
jmp    12d1 <dainyuu_input_data+0x1b1>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1144 <dainyuu_input_data+0x24>
add    $0x140,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dainyuu_input_data>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x128,%rsp
mov    %rdi,0x10(%rsp)
test   %esi,%esi
jle    1266 <dainyuu_input_data+0x146>
mov    %rdx,%rbx
mov    %esi,%eax
mov    %rax,0x18(%rsp)
xor    %eax,%eax
lea    0xeaf(%rip),%r15
movabs $0x100000000,%r14
xor    %r13d,%r13d
jmp    11ad <dainyuu_input_data+0x8d>
mov    %ebp,%eax
movb   $0x0,0x20(%rsp,%rax,1)
lea    0x20(%rsp),%rdi
lea    0xedb(%rip),%rsi
lea    0x4(%rsp),%rdx
call   1030 <sscanf@plt>
test   %rax,%rax
jle    1250 <dainyuu_input_data+0x130>
movss  0x4(%rsp),%xmm0
mov    0x10(%rsp),%rax
mov    0x8(%rsp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    %rcx,%rax
add    $0x1,%rax
cmp    0x18(%rsp),%rax
je     1266 <dainyuu_input_data+0x146>
mov    %rax,0x8(%rsp)
mov    %r13,%r12
shl    $0x20,%r12
movslq %r13d,%rbp
jmp    11c7 <dainyuu_input_data+0xa7>
xchg   %ax,%ax
add    %r14,%r12
add    $0x1,%rbp
movzbl (%rbx,%rbp,1),%eax
cmp    $0x9,%al
je     11d3 <dainyuu_input_data+0xb3>
cmp    $0x20,%al
jne    11f0 <dainyuu_input_data+0xd0>
cmp    $0x5db,%rbp
jl     11c0 <dainyuu_input_data+0xa0>
mov    %r15,%rdi
call   1040 <error1@plt>
jmp    11c0 <dainyuu_input_data+0xa0>
cs nopw 0x0(%rax,%rax,1)
sar    $0x20,%r12
mov    %r12,%r13
xor    %ebp,%ebp
lea    0xe32(%rip),%r12
jmp    1218 <dainyuu_input_data+0xf8>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%r13
add    $0x1,%rbp
movzbl (%rbx,%r13,1),%eax
cmp    $0x20,%rax
ja     1237 <dainyuu_input_data+0x117>
movabs $0x100000600,%rcx
bt     %rax,%rcx
jb     1160 <dainyuu_input_data+0x40>
mov    %al,0x20(%rsp,%rbp,1)
cmp    $0xff,%rbp
jb     1210 <dainyuu_input_data+0xf0>
mov    %r12,%rdi
call   1040 <error1@plt>
jmp    1210 <dainyuu_input_data+0xf0>
xchg   %ax,%ax
lea    0xdfa(%rip),%rdi
call   1040 <error1@plt>
mov    0x8(%rsp),%rax
jmp    119e <dainyuu_input_data+0x7e>
add    $0x128,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [50 x i8] c"Too long line in tch file (Not enough dimension?)\00"
@.str.1 = [28 x i8] c"Too long number in tch file\00"
@.str.2 = [3 x i8] c"%f\00"
@.str.3 = [25 x i8] c"Irregal data in tch file\00"
define void @dainyuu_input_data(float* %0, i32 %1, i8* %2) {
%4 = alloca float*
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca [256 x i8]
%11 = alloca float
store float* %0, float** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
store i32 0, i32* %9
store i32 0, i32* %7
br label %12
12: ; preds = %104, %3
%13 = load i32, i32* %7
%14 = load i32, i32* %5
%15 = icmp slt i32 %13, %14
br i1 %15, label %16, label %107
16: ; preds = %12
br label %17
17: ; preds = %42, %16
%18 = load i8*, i8** %6
%19 = load i32, i32* %9
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i8, i8* %18, i64 %20
%22 = load i8, i8* %21
%23 = sext i8 %22 to i32
%24 = icmp eq i32 %23, 32
br i1 %24, label %33, label %25
25: ; preds = %17
%26 = load i8*, i8** %6
%27 = load i32, i32* %9
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds i8, i8* %26, i64 %28
%30 = load i8, i8* %29
%31 = sext i8 %30 to i32
%32 = icmp eq i32 %31, 9
br label %33
33: ; preds = %25, %17
%34 = phi i1 [ true, %17 ], [ %32, %25 ]
br i1 %34, label %35, label %43
35: ; preds = %33
%36 = load i32, i32* %9
%37 = add nsw i32 %36, 1
store i32 %37, i32* %9
%38 = load i32, i32* %9
%39 = icmp sge i32 %38, 1500
br i1 %39, label %40, label %42
40: ; preds = %35
%41 = call i32 @error1(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
br label %42
42: ; preds = %40, %35
br label %17
43: ; preds = %33
store i32 0, i32* %8
br label %44
44: ; preds = %87, %43
%45 = load i8*, i8** %6
%46 = load i32, i32* %9
%47 = sext i32 %46 to i64
%48 = getelementptr inbounds i8, i8* %45, i64 %47
%49 = load i8, i8* %48
%50 = sext i8 %49 to i32
%51 = icmp ne i32 %50, 32
br i1 %51, label %52, label %68
52: ; preds = %44
%53 = load i8*, i8** %6
%54 = load i32, i32* %9
%55 = sext i32 %54 to i64
%56 = getelementptr inbounds i8, i8* %53, i64 %55
%57 = load i8, i8* %56
%58 = sext i8 %57 to i32
%59 = icmp ne i32 %58, 9
br i1 %59, label %60, label %68
60: ; preds = %52
%61 = load i8*, i8** %6
%62 = load i32, i32* %9
%63 = sext i32 %62 to i64
%64 = getelementptr inbounds i8, i8* %61, i64 %63
%65 = load i8, i8* %64
%66 = sext i8 %65 to i32
%67 = icmp ne i32 %66, 10
br label %68
68: ; preds = %60, %52, %44
%69 = phi i1 [ false, %52 ], [ false, %44 ], [ %67, %60 ]
br i1 %69, label %70, label %88
70: ; preds = %68
%71 = load i8*, i8** %6
%72 = load i32, i32* %9
%73 = sext i32 %72 to i64
%74 = getelementptr inbounds i8, i8* %71, i64 %73
%75 = load i8, i8* %74
%76 = load i32, i32* %8
%77 = sext i32 %76 to i64
%78 = getelementptr inbounds [256 x i8], [256 x i8]* %10, i64 0, i64 %77
store i8 %75, i8* %78
%79 = load i32, i32* %9
%80 = add nsw i32 %79, 1
store i32 %80, i32* %9
%81 = load i32, i32* %8
%82 = add nsw i32 %81, 1
store i32 %82, i32* %8
%83 = load i32, i32* %8
%84 = icmp sge i32 %83, 256
br i1 %84, label %85, label %87
85: ; preds = %70
%86 = call i32 @error1(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
br label %87
87: ; preds = %85, %70
br label %44
88: ; preds = %68
%89 = load i32, i32* %8
%90 = sext i32 %89 to i64
%91 = getelementptr inbounds [256 x i8], [256 x i8]* %10, i64 0, i64 %90
store i8 0, i8* %91
%92 = getelementptr inbounds [256 x i8], [256 x i8]* %10, i64 0, i64 0
%93 = call i64 @sscanf(i8* %92, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %11)
%94 = icmp sle i64 %93, 0
br i1 %94, label %95, label %97
95: ; preds = %88
%96 = call i32 @error1(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0))
br label %103
97: ; preds = %88
%98 = load float, float* %11
%99 = load float*, float** %4
%100 = load i32, i32* %7
%101 = sext i32 %100 to i64
%102 = getelementptr inbounds float, float* %99, i64 %101
store float %98, float* %102
br label %103
103: ; preds = %97, %95
br label %104
104: ; preds = %103
%105 = load i32, i32* %7
%106 = add nsw i32 %105, 1
store i32 %106, i32* %7
br label %12
107: ; preds = %12
ret void
}

LLVM IR (-O2):
@.str = [50 x i8] c"Too long line in tch file (Not enough dimension?)\00"
@.str.1 = [28 x i8] c"Too long number in tch file\00"
@.str.2 = [3 x i8] c"%f\00"
@.str.3 = [25 x i8] c"Irregal data in tch file\00"
define void @dainyuu_input_data(float* nocapture writeonly %0, i32 %1, i8* nocapture %2) {
%4 = alloca [256 x i8]
%5 = alloca float
%6 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 0
%7 = bitcast float* %5 to i8*
%8 = icmp sgt i32 %1, 0
br i1 %8, label %9, label %55
9: ; preds = %3
%10 = zext i32 %1 to i64
br label %11
11: ; preds = %9, %52
%12 = phi i64 [ 0, %9 ], [ %53, %52 ]
%13 = phi i64 [ 0, %9 ], [ %30, %52 ]
%14 = shl i64 %13, 32
%15 = ashr exact i64 %14, 32
br label %16
16: ; preds = %28, %11
%17 = phi i64 [ %15, %11 ], [ %24, %28 ]
%18 = getelementptr inbounds i8, i8* %2, i64 %17
%19 = load i8, i8* %18
switch i8 %19, label %20 [
i8 32, label %23
i8 9, label %23
]
20: ; preds = %16
%21 = shl i64 %17, 32
%22 = ashr exact i64 %21, 32
br label %29
23: ; preds = %16, %16
%24 = add i64 %17, 1
%25 = icmp sgt i64 %17, 1498
br i1 %25, label %26, label %28
26: ; preds = %23
%27 = call i32 @error1(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
br label %28
28: ; preds = %26, %23
br label %16
29: ; preds = %41, %20
%30 = phi i64 [ %22, %20 ], [ %36, %41 ]
%31 = phi i64 [ 0, %20 ], [ %37, %41 ]
%32 = getelementptr inbounds i8, i8* %2, i64 %30
%33 = load i8, i8* %32
switch i8 %33, label %34 [
i8 32, label %42
i8 9, label %42
i8 10, label %42
]
34: ; preds = %29
%35 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 %31
store i8 %33, i8* %35
%36 = add i64 %30, 1
%37 = add nuw i64 %31, 1
%38 = icmp ugt i64 %31, 254
br i1 %38, label %39, label %41
39: ; preds = %34
%40 = call i32 @error1(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
br label %41
41: ; preds = %39, %34
br label %29
42: ; preds = %29, %29, %29
%43 = and i64 %31, 4294967295
%44 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 %43
store i8 0, i8* %44
%45 = call i64 @sscanf(i8* %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %5)
%46 = icmp slt i64 %45, 1
br i1 %46, label %47, label %49
47: ; preds = %42
%48 = call i32 @error1(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0))
br label %52
49: ; preds = %42
%50 = load float, float* %5
%51 = getelementptr inbounds float, float* %0, i64 %12
store float %50, float* %51
br label %52
52: ; preds = %47, %49
%53 = add nuw nsw i64 %12, 1
%54 = icmp eq i64 %53, %10
br i1 %54, label %55, label %11
55: ; preds = %52, %3
ret void
}