#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*/ feof(int /*<<< orphan*/ *);
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ rewind(int /*<<< orphan*/ *);
int strlen(char *);
int verLastLine(FILE *sc) {
  char line[200];
  while (!feof(sc))
    fgets(line, (200 - 2), sc);
  rewind(sc);
  if (strlen(line) <= 1)
    return 0;
  else
    return 1;
}


x86 assembly (clang, -O0):
<verLastLine>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1060 <feof@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    116d <verLastLine+0x2d>
jmp    1187 <verLastLine+0x47>
lea    -0xe0(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    $0xc6,%esi
call   1050 <fgets@plt>
jmp    114f <verLastLine+0xf>
mov    -0x10(%rbp),%rdi
call   1040 <rewind@plt>
lea    -0xe0(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x1,%eax
jg     11b1 <verLastLine+0x71>
movl   $0x0,-0x4(%rbp)
jmp    11b8 <verLastLine+0x78>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<verLastLine>:
push   %r14
push   %rbx
sub    $0xc8,%rsp
mov    %rdi,%rbx
call   1060 <feof@plt>
test   %eax,%eax
jne    117c <verLastLine+0x3c>
mov    %rsp,%r14
nopl   0x0(%rax)
mov    %r14,%rdi
mov    $0xc6,%esi
mov    %rbx,%rdx
call   1050 <fgets@plt>
mov    %rbx,%rdi
call   1060 <feof@plt>
test   %eax,%eax
je     1160 <verLastLine+0x20>
mov    %rbx,%rdi
call   1040 <rewind@plt>
mov    %rsp,%rdi
call   1030 <strlen@plt>
xor    %ecx,%ecx
cmp    $0x2,%eax
setge  %cl
mov    %ecx,%eax
add    $0xc8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @verLastLine(i32* %0) {
%2 = alloca i32
%3 = alloca i32*
%4 = alloca [200 x i8]
store i32* %0, i32** %3
br label %5
5: ; preds = %10, %1
%6 = load i32*, i32** %3
%7 = call i32 @feof(i32* %6)
%8 = icmp ne i32 %7, 0
%9 = xor i1 %8, true
br i1 %9, label %10, label %14
10: ; preds = %5
%11 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 0
%12 = load i32*, i32** %3
%13 = call i32 @fgets(i8* %11, i32 198, i32* %12)
br label %5
14: ; preds = %5
%15 = load i32*, i32** %3
%16 = call i32 @rewind(i32* %15)
%17 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 0
%18 = call i32 @strlen(i8* %17)
%19 = icmp sle i32 %18, 1
br i1 %19, label %20, label %21
20: ; preds = %14
store i32 0, i32* %2
br label %22
21: ; preds = %14
store i32 1, i32* %2
br label %22
22: ; preds = %21, %20
%23 = load i32, i32* %2
ret i32 %23
}

LLVM IR (-O2):
define i32 @verLastLine(i32* nocapture %0) {
%2 = alloca [200 x i8]
%3 = getelementptr inbounds [200 x i8], [200 x i8]* %2, i64 0, i64 0
%4 = call i32 @feof(i32* %0)
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1, %6
%7 = call i32 @fgets(i8* %3, i32 198, i32* %0)
%8 = call i32 @feof(i32* %0)
%9 = icmp eq i32 %8, 0
br i1 %9, label %6, label %10
10: ; preds = %6, %1
%11 = call i32 @rewind(i32* %0)
%12 = call i32 @strlen(i8* %3)
%13 = icmp sgt i32 %12, 1
%14 = zext i1 %13 to i32
ret i32 %14
}