#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*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ numberStore(int, int **, int /*<<< orphan*/ *);
int /*<<< orphan*/ printNum(int **);
int main(void) {
  int number[20][20];
  FILE *fp;
  fp = fopen("data.pe", "r");
  int count;
  for (count = 0; count < 20; count++)
    numberStore(count, number, fp);
  printNum(number);
  fclose(fp);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x660,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xea7(%rip),%rdi
lea    0xea8(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,-0x658(%rbp)
movl   $0x0,-0x65c(%rbp)
cmpl   $0x14,-0x65c(%rbp)
jge    11b0 <main+0x70>
mov    -0x65c(%rbp),%edi
lea    -0x650(%rbp),%rsi
mov    -0x658(%rbp),%rdx
call   1050 <numberStore@plt>
mov    -0x65c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x65c(%rbp)
jmp    1176 <main+0x36>
lea    -0x650(%rbp),%rdi
call   1040 <printNum@plt>
mov    -0x658(%rbp),%rdi
call   1030 <fclose@plt>
xor    %eax,%eax
add    $0x660,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x648,%rsp
lea    0xeaf(%rip),%rdi
lea    0xeb0(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,%rbx
mov    %rsp,%r14
xor    %edi,%edi
mov    %r14,%rsi
mov    %rax,%rdx
call   1050 <numberStore@plt>
mov    $0x1,%edi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1050 <numberStore@plt>
mov    $0x2,%edi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1050 <numberStore@plt>
mov    $0x3,%edi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1050 <numberStore@plt>
mov    $0x4,%edi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1050 <numberStore@plt>
mov    $0x5,%edi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1050 <numberStore@plt>
mov    $0x6,%edi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1050 <numberStore@plt>
mov    $0x7,%edi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1050 <numberStore@plt>
mov    $0x8,%edi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1050 <numberStore@plt>
mov    $0x9,%edi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1050 <numberStore@plt>
mov    $0xa,%edi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1050 <numberStore@plt>
mov    $0xb,%edi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1050 <numberStore@plt>
mov    $0xc,%edi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1050 <numberStore@plt>
mov    $0xd,%edi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1050 <numberStore@plt>
mov    $0xe,%edi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1050 <numberStore@plt>
mov    $0xf,%edi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1050 <numberStore@plt>
mov    $0x10,%edi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1050 <numberStore@plt>
mov    $0x11,%edi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1050 <numberStore@plt>
mov    $0x12,%edi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1050 <numberStore@plt>
mov    $0x13,%edi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1050 <numberStore@plt>
mov    %r14,%rdi
call   1040 <printNum@plt>
mov    %rbx,%rdi
call   1030 <fclose@plt>
xor    %eax,%eax
add    $0x648,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [8 x i8] c"data.pe\00"
@.str.1 = [2 x i8] c"r\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [20 x [20 x i32]]
%3 = alloca i32*
%4 = alloca i32
store i32 0, i32* %1
%5 = 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* %5, i32** %3
store i32 0, i32* %4
br label %6
6: ; preds = %15, %0
%7 = load i32, i32* %4
%8 = icmp slt i32 %7, 20
br i1 %8, label %9, label %18
9: ; preds = %6
%10 = load i32, i32* %4
%11 = getelementptr inbounds [20 x [20 x i32]], [20 x [20 x i32]]* %2, i64 0, i64 0
%12 = bitcast [20 x i32]* %11 to i32**
%13 = load i32*, i32** %3
%14 = call i32 @numberStore(i32 %10, i32** %12, i32* %13)
br label %15
15: ; preds = %9
%16 = load i32, i32* %4
%17 = add nsw i32 %16, 1
store i32 %17, i32* %4
br label %6
18: ; preds = %6
%19 = getelementptr inbounds [20 x [20 x i32]], [20 x [20 x i32]]* %2, i64 0, i64 0
%20 = bitcast [20 x i32]* %19 to i32**
%21 = call i32 @printNum(i32** %20)
%22 = load i32*, i32** %3
%23 = call i32 @fclose(i32* %22)
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"data.pe\00"
@.str.1 = [2 x i8] c"r\00"
define i32 @main() {
%1 = alloca [20 x [20 x i32]]
%2 = bitcast [20 x [20 x i32]]* %1 to i8*
%3 = tail 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))
%4 = bitcast [20 x [20 x i32]]* %1 to i32**
%5 = call i32 @numberStore(i32 0, i32** %4, i32* %3)
%6 = call i32 @numberStore(i32 1, i32** %4, i32* %3)
%7 = call i32 @numberStore(i32 2, i32** %4, i32* %3)
%8 = call i32 @numberStore(i32 3, i32** %4, i32* %3)
%9 = call i32 @numberStore(i32 4, i32** %4, i32* %3)
%10 = call i32 @numberStore(i32 5, i32** %4, i32* %3)
%11 = call i32 @numberStore(i32 6, i32** %4, i32* %3)
%12 = call i32 @numberStore(i32 7, i32** %4, i32* %3)
%13 = call i32 @numberStore(i32 8, i32** %4, i32* %3)
%14 = call i32 @numberStore(i32 9, i32** %4, i32* %3)
%15 = call i32 @numberStore(i32 10, i32** %4, i32* %3)
%16 = call i32 @numberStore(i32 11, i32** %4, i32* %3)
%17 = call i32 @numberStore(i32 12, i32** %4, i32* %3)
%18 = call i32 @numberStore(i32 13, i32** %4, i32* %3)
%19 = call i32 @numberStore(i32 14, i32** %4, i32* %3)
%20 = call i32 @numberStore(i32 15, i32** %4, i32* %3)
%21 = call i32 @numberStore(i32 16, i32** %4, i32* %3)
%22 = call i32 @numberStore(i32 17, i32** %4, i32* %3)
%23 = call i32 @numberStore(i32 18, i32** %4, i32* %3)
%24 = call i32 @numberStore(i32 19, i32** %4, i32* %3)
%25 = call i32 @printNum(i32** %4)
%26 = call i32 @fclose(i32* %3)
ret i32 0
}