#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*/ printf(char *, char *);
char **readline_of_strings(int /*<<< orphan*/ *, int, int, long *, short *,
                           short *);
int /*<<< orphan*/ t_error(char *);
char **ReadHeader(FILE *f, char *filename, long *num_cols) {
  short endoffile, success;
  char **Header;
  do {
    Header = readline_of_strings(f, 33, 44, num_cols, &endoffile, &success);
  } while (endoffile == 0 && success != 1);
  if (endoffile == 1) {
    printf("Error!! File %s contains only the header\n", filename);
    t_error("Impossible To Continue");
  }
  return Header;
}


x86 assembly (clang, -O0):
<ReadHeader>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rcx
mov    $0x21,%esi
mov    $0x2c,%edx
lea    -0x1a(%rbp),%r8
lea    -0x1c(%rbp),%r9
call   1040 <readline_of_strings@plt>
mov    %rax,-0x28(%rbp)
movswl -0x1a(%rbp),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x29(%rbp)
jne    1186 <ReadHeader+0x56>
movswl -0x1c(%rbp),%eax
cmp    $0x1,%eax
setne  %al
mov    %al,-0x29(%rbp)
mov    -0x29(%rbp),%al
test   $0x1,%al
jne    1144 <ReadHeader+0x14>
movswl -0x1a(%rbp),%eax
cmp    $0x1,%eax
jne    11ba <ReadHeader+0x8a>
mov    -0x10(%rbp),%rsi
lea    0xe57(%rip),%rdi
call   1030 <printf@plt>
lea    0xe75(%rip),%rdi
call   1050 <t_error@plt>
mov    -0x28(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ReadHeader>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rdx,%r15
mov    %rsi,%r14
mov    %rdi,%r12
lea    0x6(%rsp),%r13
lea    0x4(%rsp),%rbp
xchg   %ax,%ax
mov    %r12,%rdi
mov    $0x21,%esi
mov    $0x2c,%edx
mov    %r15,%rcx
mov    %r13,%r8
mov    %rbp,%r9
call   1040 <readline_of_strings@plt>
mov    %rax,%rbx
movzwl 0x6(%rsp),%eax
test   %ax,%ax
jne    1180 <ReadHeader+0x50>
cmpw   $0x1,0x4(%rsp)
jne    1150 <ReadHeader+0x20>
cmp    $0x1,%ax
jne    11a1 <ReadHeader+0x71>
lea    0xe73(%rip),%rdi
mov    %r14,%rsi
call   1030 <printf@plt>
lea    0xe8e(%rip),%rdi
call   1050 <t_error@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [42 x i8] c"Error!! File %s contains only the header\0A\00"
@.str.1 = [23 x i8] c"Impossible To Continue\00"
define i8** @ReadHeader(i32* %0, i8* %1, i64* %2) {
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca i64*
%7 = alloca i16
%8 = alloca i16
%9 = alloca i8**
store i32* %0, i32** %4
store i8* %1, i8** %5
store i64* %2, i64** %6
br label %10
10: ; preds = %22, %3
%11 = load i32*, i32** %4
%12 = load i64*, i64** %6
%13 = call i8** @readline_of_strings(i32* %11, i32 33, i32 44, i64* %12, i16* %7, i16* %8)
store i8** %13, i8*** %9
br label %14
14: ; preds = %10
%15 = load i16, i16* %7
%16 = sext i16 %15 to i32
%17 = icmp eq i32 %16, 0
br i1 %17, label %18, label %22
18: ; preds = %14
%19 = load i16, i16* %8
%20 = sext i16 %19 to i32
%21 = icmp ne i32 %20, 1
br label %22
22: ; preds = %18, %14
%23 = phi i1 [ false, %14 ], [ %21, %18 ]
br i1 %23, label %10, label %24
24: ; preds = %22
%25 = load i16, i16* %7
%26 = sext i16 %25 to i32
%27 = icmp eq i32 %26, 1
br i1 %27, label %28, label %32
28: ; preds = %24
%29 = load i8*, i8** %5
%30 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i8* %29)
%31 = call i32 @t_error(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0))
br label %32
32: ; preds = %28, %24
%33 = load i8**, i8*** %9
ret i8** %33
}

LLVM IR (-O2):
@.str = [42 x i8] c"Error!! File %s contains only the header\0A\00"
@.str.1 = [23 x i8] c"Impossible To Continue\00"
define i8** @ReadHeader(i32* %0, i8* %1, i64* %2) {
%4 = alloca i16
%5 = alloca i16
%6 = bitcast i16* %4 to i8*
%7 = bitcast i16* %5 to i8*
br label %8
8: ; preds = %8, %3
%9 = call i8** @readline_of_strings(i32* %0, i32 33, i32 44, i64* %2, i16* %4, i16* %5)
%10 = load i16, i16* %4
%11 = icmp eq i16 %10, 0
%12 = load i16, i16* %5
%13 = icmp ne i16 %12, 1
%14 = select i1 %11, i1 %13, i1 false
br i1 %14, label %8, label %15
15: ; preds = %8
%16 = icmp eq i16 %10, 1
br i1 %16, label %17, label %20
17: ; preds = %15
%18 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i8* %1)
%19 = call i32 @t_error(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0))
br label %20
20: ; preds = %17, %15
ret i8** %9
}