#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*/ closeRepFile();
int /*<<< orphan*/ openRepFile(char *);
int /*<<< orphan*/ printf(char *, ...);
int readRepItem(char **, char **, int, int /*<<< orphan*/);
int main(void) {
  char list[150][64];
  char value[150][64];
  int list_len;
  int i;
  openRepFile("/home/bychoi/guider/guider/guider.report");
  list_len = readRepItem(list, value, 150, 0);
  printf("list len : %d\n", list_len);
  for (i = 0; i < list_len; i++) {
    printf("%s : %s\n", list[i], value[i]);
  }
  closeRepFile();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x4b20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xea7(%rip),%rdi
call   1040 <openRepFile@plt>
lea    -0x2590(%rbp),%rdi
lea    -0x4b10(%rbp),%rsi
mov    $0x96,%edx
xor    %ecx,%ecx
call   1050 <readRepItem@plt>
mov    %eax,-0x4b14(%rbp)
mov    -0x4b14(%rbp),%esi
lea    0xe9e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x4b18(%rbp)
mov    -0x4b18(%rbp),%eax
cmp    -0x4b14(%rbp),%eax
jge    11fa <main+0xba>
movslq -0x4b18(%rbp),%rax
lea    -0x2590(%rbp),%rsi
shl    $0x6,%rax
add    %rax,%rsi
movslq -0x4b18(%rbp),%rax
lea    -0x4b10(%rbp),%rdx
shl    $0x6,%rax
add    %rax,%rdx
lea    0xe59(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4b18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4b18(%rbp)
jmp    119c <main+0x5c>
mov    $0x0,%al
call   1060 <closeRepFile@plt>
xor    %eax,%eax
add    $0x4b20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x4b08,%rsp
lea    0xeac(%rip),%rdi
call   1040 <openRepFile@plt>
lea    0x2580(%rsp),%r14
mov    %rsp,%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
mov    $0x96,%edx
xor    %ecx,%ecx
call   1050 <readRepItem@plt>
mov    %eax,%ebp
lea    0xeaa(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
test   %ebp,%ebp
jle    11be <main+0x7e>
mov    %ebp,%ebp
lea    0xea3(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r15,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <printf@plt>
add    $0x40,%r14
add    $0x40,%rbx
add    $0xffffffffffffffff,%rbp
jne    11a0 <main+0x60>
xor    %eax,%eax
call   1060 <closeRepFile@plt>
xor    %eax,%eax
add    $0x4b08,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [41 x i8] c"/home/bychoi/guider/guider/guider.report\00"
@.str.1 = [15 x i8] c"list len : %d\0A\00"
@.str.2 = [9 x i8] c"%s : %s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [150 x [64 x i8]]
%3 = alloca [150 x [64 x i8]]
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
%6 = call i32 @openRepFile(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
%7 = getelementptr inbounds [150 x [64 x i8]], [150 x [64 x i8]]* %2, i64 0, i64 0
%8 = bitcast [64 x i8]* %7 to i8**
%9 = getelementptr inbounds [150 x [64 x i8]], [150 x [64 x i8]]* %3, i64 0, i64 0
%10 = bitcast [64 x i8]* %9 to i8**
%11 = call i32 @readRepItem(i8** %8, i8** %10, i32 150, i32 0)
store i32 %11, i32* %4
%12 = load i32, i32* %4
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 %12)
store i32 0, i32* %5
br label %14
14: ; preds = %28, %0
%15 = load i32, i32* %5
%16 = load i32, i32* %4
%17 = icmp slt i32 %15, %16
br i1 %17, label %18, label %31
18: ; preds = %14
%19 = load i32, i32* %5
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds [150 x [64 x i8]], [150 x [64 x i8]]* %2, i64 0, i64 %20
%22 = getelementptr inbounds [64 x i8], [64 x i8]* %21, i64 0, i64 0
%23 = load i32, i32* %5
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds [150 x [64 x i8]], [150 x [64 x i8]]* %3, i64 0, i64 %24
%26 = getelementptr inbounds [64 x i8], [64 x i8]* %25, i64 0, i64 0
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* %22, i8* %26)
br label %28
28: ; preds = %18
%29 = load i32, i32* %5
%30 = add nsw i32 %29, 1
store i32 %30, i32* %5
br label %14
31: ; preds = %14
%32 = call i32 (...) @closeRepFile()
ret i32 0
}

LLVM IR (-O2):
@.str = [41 x i8] c"/home/bychoi/guider/guider/guider.report\00"
@.str.1 = [15 x i8] c"list len : %d\0A\00"
@.str.2 = [9 x i8] c"%s : %s\0A\00"
define i32 @main() {
%1 = alloca [150 x [64 x i8]]
%2 = alloca [150 x [64 x i8]]
%3 = getelementptr inbounds [150 x [64 x i8]], [150 x [64 x i8]]* %1, i64 0, i64 0, i64 0
%4 = getelementptr inbounds [150 x [64 x i8]], [150 x [64 x i8]]* %2, i64 0, i64 0, i64 0
%5 = tail call i32 @openRepFile(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
%6 = bitcast [150 x [64 x i8]]* %1 to i8**
%7 = bitcast [150 x [64 x i8]]* %2 to i8**
%8 = call i32 @readRepItem(i8** %6, i8** %7, i32 150, i32 0)
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 %8)
%10 = icmp sgt i32 %8, 0
br i1 %10, label %11, label %20
11: ; preds = %0
%12 = zext i32 %8 to i64
br label %13
13: ; preds = %11, %13
%14 = phi i64 [ 0, %11 ], [ %18, %13 ]
%15 = getelementptr inbounds [150 x [64 x i8]], [150 x [64 x i8]]* %1, i64 0, i64 %14, i64 0
%16 = getelementptr inbounds [150 x [64 x i8]], [150 x [64 x i8]]* %2, i64 0, i64 %14, i64 0
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* %15, i8* %16)
%18 = add nuw nsw i64 %14, 1
%19 = icmp eq i64 %18, %12
br i1 %19, label %20, label %13
20: ; preds = %13, %0
%21 = call i32 (...) @closeRepFile()
ret i32 0
}