#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 */
char EOF;
int /*<<< orphan*/ SEEK_END;
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
char fgetc(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, int /*<<< orphan*/,
                         int /*<<< orphan*/);
int ftell(int /*<<< orphan*/ *);
int main() {
  FILE *fp;
  int charLength;
  char ch;
  int i = 0;
  char strData[1024], intData[1024];
  fp = fopen("e://o2jsf/main/Employee.ns", "r");
  fseek(fp, 0, SEEK_END);
  charLength = ftell(fp) + 1;
  fclose(fp);
  char stream[charLength];
  fp = fopen("e://o2jsf/main/Employee.ns", "r");
  while ((ch = fgetc(fp)) != EOF) {
    stream[i] = ch;
    i++;
  }
  fclose(fp);
  int q = 0;
  while (stream[q] != ']') {
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x840,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x1c(%rbp)
lea    0xe90(%rip),%rdi
lea    0xea4(%rip),%rsi
call   1070 <fopen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    0x2e5d(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1060 <fseek@plt>
mov    -0x10(%rbp),%rdi
call   1050 <ftell@plt>
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x14(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x828(%rbp)
mov    %rax,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x840(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x830(%rbp)
lea    0xe1e(%rip),%rdi
lea    0xe32(%rip),%rsi
call   1070 <fopen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <fgetc@plt>
mov    %al,-0x15(%rbp)
movsbl %al,%eax
mov    0x2dd8(%rip),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
je     1232 <main+0xe2>
mov    -0x840(%rbp),%rax
mov    -0x15(%rbp),%dl
movslq -0x1c(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    11f2 <main+0xa2>
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
movl   $0x0,-0x834(%rbp)
mov    -0x840(%rbp),%rax
movslq -0x834(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x5d,%eax
je     1265 <main+0x115>
jmp    1245 <main+0xf5>
mov    -0x828(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r12
push   %rbx
lea    0xe9e(%rip),%r15
lea    0xeb2(%rip),%r14
mov    %r15,%rdi
mov    %r14,%rsi
call   1070 <fopen@plt>
mov    %rax,%r12
mov    0x2e6a(%rip),%rax
mov    (%rax),%edx
mov    %r12,%rdi
xor    %esi,%esi
call   1060 <fseek@plt>
mov    %r12,%rdi
call   1050 <ftell@plt>
mov    %eax,%ebx
add    $0x1,%ebx
mov    %r12,%rdi
call   1030 <fclose@plt>
add    $0xf,%rbx
and    $0xfffffffffffffff0,%rbx
mov    %rsp,%r12
sub    %rbx,%r12
mov    %r12,%rsp
mov    %r15,%rdi
mov    %r14,%rsi
call   1070 <fopen@plt>
mov    %rax,%r15
mov    %rax,%rdi
call   1040 <fgetc@plt>
mov    0x2e13(%rip),%r14
cmp    (%r14),%al
je     11f3 <main+0xa3>
mov    %r12,%rbx
cs nopw 0x0(%rax,%rax,1)
nop
mov    %al,(%rbx)
mov    %r15,%rdi
call   1040 <fgetc@plt>
add    $0x1,%rbx
cmp    (%r14),%al
jne    11e0 <main+0x90>
mov    %r15,%rdi
call   1030 <fclose@plt>
cmpb   $0x5d,(%r12)
jne    1220 <main+0xd0>
xor    %eax,%eax
lea    -0x20(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
jmp    1220 <main+0xd0>

LLVM IR (-O0):
@.str = [27 x i8] c"e://o2jsf/main/Employee.ns\00"
@.str.1 = [2 x i8] c"r\00"
@SEEK_END = global i32 0
@EOF = global i8 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i8
%5 = alloca i32
%6 = alloca [1024 x i8]
%7 = alloca [1024 x i8]
%8 = alloca i8*
%9 = alloca i64
%10 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %5
%11 = call i32* @fopen(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %11, i32** %2
%12 = load i32*, i32** %2
%13 = load i32, i32* @SEEK_END
%14 = call i32 @fseek(i32* %12, i32 0, i32 %13)
%15 = load i32*, i32** %2
%16 = call i32 @ftell(i32* %15)
%17 = add nsw i32 %16, 1
store i32 %17, i32* %3
%18 = load i32*, i32** %2
%19 = call i32 @fclose(i32* %18)
%20 = load i32, i32* %3
%21 = zext i32 %20 to i64
%22 = call i8* @llvm.stacksave()
store i8* %22, i8** %8
%23 = alloca i8, i64 %21
store i64 %21, i64* %9
%24 = call i32* @fopen(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %24, i32** %2
br label %25
25: ; preds = %32, %0
%26 = load i32*, i32** %2
%27 = call signext i8 @fgetc(i32* %26)
store i8 %27, i8* %4
%28 = sext i8 %27 to i32
%29 = load i8, i8* @EOF
%30 = sext i8 %29 to i32
%31 = icmp ne i32 %28, %30
br i1 %31, label %32, label %39
32: ; preds = %25
%33 = load i8, i8* %4
%34 = load i32, i32* %5
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds i8, i8* %23, i64 %35
store i8 %33, i8* %36
%37 = load i32, i32* %5
%38 = add nsw i32 %37, 1
store i32 %38, i32* %5
br label %25
39: ; preds = %25
%40 = load i32*, i32** %2
%41 = call i32 @fclose(i32* %40)
store i32 0, i32* %10
br label %42
42: ; preds = %49, %39
%43 = load i32, i32* %10
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds i8, i8* %23, i64 %44
%46 = load i8, i8* %45
%47 = sext i8 %46 to i32
%48 = icmp ne i32 %47, 93
br i1 %48, label %49, label %50
49: ; preds = %42
br label %42
50: ; preds = %42
%51 = load i8*, i8** %8
%52 = load i32, i32* %1
ret i32 %52
}

LLVM IR (-O2):
@.str = [27 x i8] c"e://o2jsf/main/Employee.ns\00"
@.str.1 = [2 x i8] c"r\00"
@SEEK_END = global i32 0
@EOF = global i8 0
define i32 @main() {
%1 = tail call i32* @fopen(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%2 = load i32, i32* @SEEK_END
%3 = tail call i32 @fseek(i32* %1, i32 0, i32 %2)
%4 = tail call i32 @ftell(i32* %1)
%5 = add nsw i32 %4, 1
%6 = tail call i32 @fclose(i32* %1)
%7 = zext i32 %5 to i64
%8 = alloca i8, i64 %7
%9 = tail call i32* @fopen(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%10 = tail call signext i8 @fgetc(i32* %9)
%11 = load i8, i8* @EOF
%12 = icmp eq i8 %10, %11
br i1 %12, label %21, label %13
13: ; preds = %0, %13
%14 = phi i64 [ %17, %13 ], [ 0, %0 ]
%15 = phi i8 [ %18, %13 ], [ %10, %0 ]
%16 = getelementptr inbounds i8, i8* %8, i64 %14
store i8 %15, i8* %16
%17 = add nuw i64 %14, 1
%18 = tail call signext i8 @fgetc(i32* %9)
%19 = load i8, i8* @EOF
%20 = icmp eq i8 %18, %19
br i1 %20, label %21, label %13
21: ; preds = %13, %0
%22 = tail call i32 @fclose(i32* %9)
%23 = load i8, i8* %8
%24 = icmp eq i8 %23, 93
br i1 %24, label %26, label %25
25: ; preds = %21, %25
br label %25
26: ; preds = %21
ret i32 0
}