#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*/ ferror(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fscanf(int /*<<< orphan*/ *, char *, int *, int *, int *,
                          int *, int *, int *);
void inp_open(char *fname, int line, int *lc) {
  int l = 0;
  FILE *fp = fopen(fname, "r");
  if (fp == NULL)
    ferror(fp);
  for (l = 1; l <= line; l++) {
    fscanf(fp, "t%d\ti%d\ti%d\ti%d\ti%d\ti%d\n", &lc[0], &lc[1], &lc[2], &lc[3],
           &lc[4], &lc[5]);
  }
  fclose(fp);
}


x86 assembly (clang, -O0):
<inp_open>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe9b(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    1182 <inp_open+0x42>
mov    -0x28(%rbp),%rdi
call   1030 <ferror@plt>
movl   $0x1,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     11e8 <inp_open+0xa8>
mov    -0x28(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    -0x18(%rbp),%rcx
add    $0x4,%rcx
mov    -0x18(%rbp),%r8
add    $0x8,%r8
mov    -0x18(%rbp),%r9
add    $0xc,%r9
mov    -0x18(%rbp),%r10
add    $0x10,%r10
mov    -0x18(%rbp),%rax
add    $0x14,%rax
lea    0xe36(%rip),%rsi
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1050 <fscanf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1189 <inp_open+0x49>
mov    -0x28(%rbp),%rdi
call   1040 <fclose@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inp_open>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rdx,0x8(%rsp)
mov    %esi,%ebp
lea    0xea4(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,%r12
test   %rax,%rax
jne    1170 <inp_open+0x30>
xor    %edi,%edi
call   1030 <ferror@plt>
test   %ebp,%ebp
mov    0x8(%rsp),%rax
jle    11cc <inp_open+0x8c>
lea    0x4(%rax),%rcx
mov    %rcx,0x10(%rsp)
lea    0x8(%rax),%r13
lea    0xc(%rax),%rbx
lea    0x10(%rax),%r14
lea    0x14(%rax),%r15
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r12,%rdi
lea    0xe58(%rip),%rsi
mov    0x8(%rsp),%rdx
mov    0x10(%rsp),%rcx
mov    %r13,%r8
mov    %rbx,%r9
push   %r15
push   %r14
call   1050 <fscanf@plt>
add    $0x10,%rsp
add    $0xffffffff,%ebp
jne    11a0 <inp_open+0x60>
mov    %r12,%rdi
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <fclose@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"r\00"
@.str.1 = [25 x i8] c"t%d\09i%d\09i%d\09i%d\09i%d\09i%d\0A\00"
define void @inp_open(i8* %0, i32 %1, i32* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i32*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32* %2, i32** %6
store i32 0, i32* %7
%9 = load i8*, i8** %4
%10 = call i32* @fopen(i8* %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %10, i32** %8
%11 = load i32*, i32** %8
%12 = icmp eq i32* %11, null
br i1 %12, label %13, label %16
13: ; preds = %3
%14 = load i32*, i32** %8
%15 = call i32 @ferror(i32* %14)
br label %16
16: ; preds = %13, %3
store i32 1, i32* %7
br label %17
17: ; preds = %36, %16
%18 = load i32, i32* %7
%19 = load i32, i32* %5
%20 = icmp sle i32 %18, %19
br i1 %20, label %21, label %39
21: ; preds = %17
%22 = load i32*, i32** %8
%23 = load i32*, i32** %6
%24 = getelementptr inbounds i32, i32* %23, i64 0
%25 = load i32*, i32** %6
%26 = getelementptr inbounds i32, i32* %25, i64 1
%27 = load i32*, i32** %6
%28 = getelementptr inbounds i32, i32* %27, i64 2
%29 = load i32*, i32** %6
%30 = getelementptr inbounds i32, i32* %29, i64 3
%31 = load i32*, i32** %6
%32 = getelementptr inbounds i32, i32* %31, i64 4
%33 = load i32*, i32** %6
%34 = getelementptr inbounds i32, i32* %33, i64 5
%35 = call i32 @fscanf(i32* %22, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i32* %24, i32* %26, i32* %28, i32* %30, i32* %32, i32* %34)
br label %36
36: ; preds = %21
%37 = load i32, i32* %7
%38 = add nsw i32 %37, 1
store i32 %38, i32* %7
br label %17
39: ; preds = %17
%40 = load i32*, i32** %8
%41 = call i32 @fclose(i32* %40)
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
@.str.1 = [25 x i8] c"t%d\09i%d\09i%d\09i%d\09i%d\09i%d\0A\00"
define void @inp_open(i8* nocapture %0, i32 %1, i32* %2) {
%4 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i32* %4, null
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @ferror(i32* null)
br label %8
8: ; preds = %6, %3
%9 = icmp slt i32 %1, 1
br i1 %9, label %21, label %10
10: ; preds = %8
%11 = getelementptr inbounds i32, i32* %2, i64 1
%12 = getelementptr inbounds i32, i32* %2, i64 2
%13 = getelementptr inbounds i32, i32* %2, i64 3
%14 = getelementptr inbounds i32, i32* %2, i64 4
%15 = getelementptr inbounds i32, i32* %2, i64 5
br label %16
16: ; preds = %10, %16
%17 = phi i32 [ 1, %10 ], [ %19, %16 ]
%18 = tail call i32 @fscanf(i32* %4, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i32* %2, i32* %11, i32* %12, i32* %13, i32* %14, i32* %15)
%19 = add nuw i32 %17, 1
%20 = icmp eq i32 %17, %1
br i1 %20, label %21, label %16
21: ; preds = %16, %8
%22 = tail call i32 @fclose(i32* %4)
ret void
}