#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*/ print_global_vars();
char **read_datafile(char *);
int /*<<< orphan*/ read_line(char *);
char *remove_comments(char *);
int /*<<< orphan*/ store_data(int /*<<< orphan*/);
int init(const char *str) {
  char **buffer;
  int i, j;
  j = 0;
  buffer = read_datafile((char *)str);
  for (i = 0; i < 200; i++) {
    buffer[i] = remove_comments(buffer[i]);
    store_data(read_line(buffer[i]));
  }
  print_global_vars();
  return 1;
}


x86 assembly (clang, -O0):
<init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1070 <read_datafile@plt>
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0xc8,-0x14(%rbp)
jge    11ca <init+0x7a>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <remove_comments@plt>
mov    %rax,%rdx
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1060 <read_line@plt>
mov    %eax,%edi
call   1050 <store_data@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1177 <init+0x27>
mov    $0x0,%al
call   1040 <print_global_vars@plt>
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<init>:
push   %r14
push   %rbx
push   %rax
call   1070 <read_datafile@plt>
mov    %rax,%r14
xor    %ebx,%ebx
xchg   %ax,%ax
mov    (%r14,%rbx,8),%rdi
call   1030 <remove_comments@plt>
mov    %rax,(%r14,%rbx,8)
mov    %rax,%rdi
call   1060 <read_line@plt>
mov    %eax,%edi
call   1050 <store_data@plt>
add    $0x1,%rbx
cmp    $0xc8,%rbx
jne    1160 <init+0x10>
xor    %eax,%eax
call   1040 <print_global_vars@plt>
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @init(i8* %0) {
%2 = alloca i8*
%3 = alloca i8**
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %5
%6 = load i8*, i8** %2
%7 = call i8** @read_datafile(i8* %6)
store i8** %7, i8*** %3
store i32 0, i32* %4
br label %8
8: ; preds = %29, %1
%9 = load i32, i32* %4
%10 = icmp slt i32 %9, 200
br i1 %10, label %11, label %32
11: ; preds = %8
%12 = load i8**, i8*** %3
%13 = load i32, i32* %4
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8*, i8** %12, i64 %14
%16 = load i8*, i8** %15
%17 = call i8* @remove_comments(i8* %16)
%18 = load i8**, i8*** %3
%19 = load i32, i32* %4
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i8*, i8** %18, i64 %20
store i8* %17, i8** %21
%22 = load i8**, i8*** %3
%23 = load i32, i32* %4
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds i8*, i8** %22, i64 %24
%26 = load i8*, i8** %25
%27 = call i32 @read_line(i8* %26)
%28 = call i32 @store_data(i32 %27)
br label %29
29: ; preds = %11
%30 = load i32, i32* %4
%31 = add nsw i32 %30, 1
store i32 %31, i32* %4
br label %8
32: ; preds = %8
%33 = call i32 (...) @print_global_vars()
ret i32 1
}

LLVM IR (-O2):
define i32 @init(i8* %0) {
%2 = tail call i8** @read_datafile(i8* %0)
br label %3
3: ; preds = %1, %3
%4 = phi i64 [ 0, %1 ], [ %10, %3 ]
%5 = getelementptr inbounds i8*, i8** %2, i64 %4
%6 = load i8*, i8** %5
%7 = tail call i8* @remove_comments(i8* %6)
store i8* %7, i8** %5
%8 = tail call i32 @read_line(i8* %7)
%9 = tail call i32 @store_data(i32 %8)
%10 = add nuw nsw i64 %4, 1
%11 = icmp eq i64 %10, 200
br i1 %11, label %12, label %3
12: ; preds = %3
%13 = tail call i32 (...) @print_global_vars()
ret i32 1
}