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

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ fscanf(int /*<<< orphan*/ *, char *, float *);
int /*<<< orphan*/ printf(char *, float);
int /*<<< orphan*/ stderr;
int main() {
  FILE *fp;
  float tab[20];
  int i;
  fp = fopen("dane.txt", "r");
  if (fp == NULL) {
    fprintf(stderr, "Can't open file dane.txt");
    exit(EXIT_FAILURE);
  }
  for (i = 0; i < 20; i++) {
    fscanf(fp, "%f", &tab[i]);
  }
  for (i = 0; i < 20; i++)
    printf("%f\n", tab[i]);
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeac(%rip),%rdi
lea    0xe93(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    11a4 <main+0x54>
mov    0x2e58(%rip),%rax
mov    (%rax),%edi
lea    0xe71(%rip),%rsi
call   1050 <fprintf@plt>
mov    0x2e3b(%rip),%rax
mov    (%rax),%edi
call   1070 <exit@plt>
movl   $0x0,-0x64(%rbp)
cmpl   $0x14,-0x64(%rbp)
jge    11e2 <main+0x92>
mov    -0x10(%rbp),%rdi
movslq -0x64(%rbp),%rax
lea    -0x60(%rbp),%rdx
shl    $0x2,%rax
add    %rax,%rdx
lea    0xe4c(%rip),%rsi
call   1040 <fscanf@plt>
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    11ab <main+0x5b>
movl   $0x0,-0x64(%rbp)
cmpl   $0x14,-0x64(%rbp)
jge    1217 <main+0xc7>
movslq -0x64(%rbp),%rax
movss  -0x60(%rbp,%rax,4),%xmm0
lea    0xe1a(%rip),%rdi
call   1030 <printf@plt>
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    11e9 <main+0x99>
mov    0x2db2(%rip),%rax
mov    (%rax),%edi
call   1070 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x58,%rsp
lea    0xeb4(%rip),%rdi
lea    0xe9b(%rip),%rsi
call   1060 <fopen@plt>
test   %rax,%rax
jne    1192 <main+0x42>
mov    0x2e6a(%rip),%rax
mov    (%rax),%edi
lea    0xe83(%rip),%rsi
call   1050 <fprintf@plt>
mov    0x2e4d(%rip),%rax
mov    (%rax),%edi
call   1070 <exit@plt>
mov    %rax,%rbx
lea    0xe7f(%rip),%r14
mov    %rsp,%rdx
mov    %rax,%rdi
mov    %r14,%rsi
call   1040 <fscanf@plt>
lea    0x4(%rsp),%rdx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <fscanf@plt>
lea    0x8(%rsp),%rdx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <fscanf@plt>
lea    0xc(%rsp),%rdx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <fscanf@plt>
lea    0x10(%rsp),%rdx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <fscanf@plt>
lea    0x14(%rsp),%rdx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <fscanf@plt>
lea    0x18(%rsp),%rdx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <fscanf@plt>
lea    0x1c(%rsp),%rdx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <fscanf@plt>
lea    0x20(%rsp),%rdx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <fscanf@plt>
lea    0x24(%rsp),%rdx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <fscanf@plt>
lea    0x28(%rsp),%rdx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <fscanf@plt>
lea    0x2c(%rsp),%rdx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <fscanf@plt>
lea    0x30(%rsp),%rdx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <fscanf@plt>
lea    0x34(%rsp),%rdx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <fscanf@plt>
lea    0x38(%rsp),%rdx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <fscanf@plt>
lea    0x3c(%rsp),%rdx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <fscanf@plt>
lea    0x40(%rsp),%rdx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <fscanf@plt>
lea    0x44(%rsp),%rdx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <fscanf@plt>
lea    0x48(%rsp),%rdx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <fscanf@plt>
lea    0x4c(%rsp),%rdx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <fscanf@plt>
movss  (%rsp),%xmm0
lea    0xd38(%rip),%rbx
mov    %rbx,%rdi
call   1030 <printf@plt>
movss  0x4(%rsp),%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
movss  0x8(%rsp),%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
movss  0xc(%rsp),%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
movss  0x10(%rsp),%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
movss  0x14(%rsp),%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
movss  0x18(%rsp),%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
movss  0x1c(%rsp),%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
movss  0x20(%rsp),%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
movss  0x24(%rsp),%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
movss  0x28(%rsp),%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
movss  0x2c(%rsp),%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
movss  0x30(%rsp),%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
movss  0x34(%rsp),%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
movss  0x38(%rsp),%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
movss  0x3c(%rsp),%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
movss  0x40(%rsp),%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
movss  0x44(%rsp),%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
movss  0x48(%rsp),%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
movss  0x4c(%rsp),%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    0x2bd1(%rip),%rax
mov    (%rax),%edi
call   1070 <exit@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"dane.txt\00"
@.str.1 = [2 x i8] c"r\00"
@stderr = global i32 0
@.str.2 = [25 x i8] c"Can't open file dane.txt\00"
@EXIT_FAILURE = global i32 0
@.str.3 = [3 x i8] c"%f\00"
@.str.4 = [4 x i8] c"%f\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca [20 x float]
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32* @fopen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %5, i32** %2
%6 = load i32*, i32** %2
%7 = icmp eq i32* %6, null
br i1 %7, label %8, label %13
8: ; preds = %0
%9 = load i32, i32* @stderr
%10 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0))
%11 = load i32, i32* @EXIT_FAILURE
%12 = call i32 @exit(i32 %11)
unreachable
13: ; preds = %0
store i32 0, i32* %4
br label %14
14: ; preds = %23, %13
%15 = load i32, i32* %4
%16 = icmp slt i32 %15, 20
br i1 %16, label %17, label %26
17: ; preds = %14
%18 = load i32*, i32** %2
%19 = load i32, i32* %4
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds [20 x float], [20 x float]* %3, i64 0, i64 %20
%22 = call i32 @fscanf(i32* %18, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), float* %21)
br label %23
23: ; preds = %17
%24 = load i32, i32* %4
%25 = add nsw i32 %24, 1
store i32 %25, i32* %4
br label %14
26: ; preds = %14
store i32 0, i32* %4
br label %27
27: ; preds = %36, %26
%28 = load i32, i32* %4
%29 = icmp slt i32 %28, 20
br i1 %29, label %30, label %39
30: ; preds = %27
%31 = load i32, i32* %4
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds [20 x float], [20 x float]* %3, i64 0, i64 %32
%34 = load float, float* %33
%35 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), float %34)
br label %36
36: ; preds = %30
%37 = load i32, i32* %4
%38 = add nsw i32 %37, 1
store i32 %38, i32* %4
br label %27
39: ; preds = %27
%40 = load i32, i32* @EXIT_SUCCESS
%41 = call i32 @exit(i32 %40)
unreachable
}

LLVM IR (-O2):
@.str = [9 x i8] c"dane.txt\00"
@.str.1 = [2 x i8] c"r\00"
@stderr = global i32 0
@.str.2 = [25 x i8] c"Can't open file dane.txt\00"
@EXIT_FAILURE = global i32 0
@.str.3 = [3 x i8] c"%f\00"
@.str.4 = [4 x i8] c"%f\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca [20 x float]
%2 = bitcast [20 x float]* %1 to i8*
%3 = tail call i32* @fopen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%4 = icmp eq i32* %3, null
br i1 %4, label %88, label %5
5: ; preds = %0
%6 = getelementptr inbounds [20 x float], [20 x float]* %1, i64 0, i64 0
%7 = call i32 @fscanf(i32* %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), float* %6)
%8 = getelementptr inbounds [20 x float], [20 x float]* %1, i64 0, i64 1
%9 = call i32 @fscanf(i32* %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), float* %8)
%10 = getelementptr inbounds [20 x float], [20 x float]* %1, i64 0, i64 2
%11 = call i32 @fscanf(i32* %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), float* %10)
%12 = getelementptr inbounds [20 x float], [20 x float]* %1, i64 0, i64 3
%13 = call i32 @fscanf(i32* %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), float* %12)
%14 = getelementptr inbounds [20 x float], [20 x float]* %1, i64 0, i64 4
%15 = call i32 @fscanf(i32* %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), float* %14)
%16 = getelementptr inbounds [20 x float], [20 x float]* %1, i64 0, i64 5
%17 = call i32 @fscanf(i32* %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), float* %16)
%18 = getelementptr inbounds [20 x float], [20 x float]* %1, i64 0, i64 6
%19 = call i32 @fscanf(i32* %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), float* %18)
%20 = getelementptr inbounds [20 x float], [20 x float]* %1, i64 0, i64 7
%21 = call i32 @fscanf(i32* %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), float* %20)
%22 = getelementptr inbounds [20 x float], [20 x float]* %1, i64 0, i64 8
%23 = call i32 @fscanf(i32* %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), float* %22)
%24 = getelementptr inbounds [20 x float], [20 x float]* %1, i64 0, i64 9
%25 = call i32 @fscanf(i32* %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), float* %24)
%26 = getelementptr inbounds [20 x float], [20 x float]* %1, i64 0, i64 10
%27 = call i32 @fscanf(i32* %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), float* %26)
%28 = getelementptr inbounds [20 x float], [20 x float]* %1, i64 0, i64 11
%29 = call i32 @fscanf(i32* %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), float* %28)
%30 = getelementptr inbounds [20 x float], [20 x float]* %1, i64 0, i64 12
%31 = call i32 @fscanf(i32* %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), float* %30)
%32 = getelementptr inbounds [20 x float], [20 x float]* %1, i64 0, i64 13
%33 = call i32 @fscanf(i32* %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), float* %32)
%34 = getelementptr inbounds [20 x float], [20 x float]* %1, i64 0, i64 14
%35 = call i32 @fscanf(i32* %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), float* %34)
%36 = getelementptr inbounds [20 x float], [20 x float]* %1, i64 0, i64 15
%37 = call i32 @fscanf(i32* %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), float* %36)
%38 = getelementptr inbounds [20 x float], [20 x float]* %1, i64 0, i64 16
%39 = call i32 @fscanf(i32* %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), float* %38)
%40 = getelementptr inbounds [20 x float], [20 x float]* %1, i64 0, i64 17
%41 = call i32 @fscanf(i32* %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), float* %40)
%42 = getelementptr inbounds [20 x float], [20 x float]* %1, i64 0, i64 18
%43 = call i32 @fscanf(i32* %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), float* %42)
%44 = getelementptr inbounds [20 x float], [20 x float]* %1, i64 0, i64 19
%45 = call i32 @fscanf(i32* %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), float* %44)
%46 = load float, float* %6
%47 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), float %46)
%48 = load float, float* %8
%49 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), float %48)
%50 = load float, float* %10
%51 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), float %50)
%52 = load float, float* %12
%53 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), float %52)
%54 = load float, float* %14
%55 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), float %54)
%56 = load float, float* %16
%57 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), float %56)
%58 = load float, float* %18
%59 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), float %58)
%60 = load float, float* %20
%61 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), float %60)
%62 = load float, float* %22
%63 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), float %62)
%64 = load float, float* %24
%65 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), float %64)
%66 = load float, float* %26
%67 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), float %66)
%68 = load float, float* %28
%69 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), float %68)
%70 = load float, float* %30
%71 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), float %70)
%72 = load float, float* %32
%73 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), float %72)
%74 = load float, float* %34
%75 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), float %74)
%76 = load float, float* %36
%77 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), float %76)
%78 = load float, float* %38
%79 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), float %78)
%80 = load float, float* %40
%81 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), float %80)
%82 = load float, float* %42
%83 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), float %82)
%84 = load float, float* %44
%85 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), float %84)
%86 = load i32, i32* @EXIT_SUCCESS
%87 = call i32 @exit(i32 %86)
unreachable
88: ; preds = %0
%89 = load i32, i32* @stderr
%90 = tail call i32 @fprintf(i32 %89, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0))
%91 = load i32, i32* @EXIT_FAILURE
%92 = tail call i32 @exit(i32 %91)
unreachable
}