#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 */
scalar_t__ commentLine(char const);
int /*<<< orphan*/ isspace(char const);
unsigned int strlen(char const *);
bool unusedLine(const char *line) {
  if (commentLine(line[0])) {
    return true;
  }
  for (unsigned int i = 0; i < strlen(line); i++) {
    if (!isspace(line[i])) {
      return false;
    }
  }
  return true;
}


x86 assembly (clang, -O0):
<unusedLine>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <commentLine@plt>
cmp    $0x0,%rax
je     115e <unusedLine+0x2e>
movl   $0x1,-0x4(%rbp)
jmp    11c0 <unusedLine+0x90>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%eax
cmp    %ecx,%eax
jae    11b9 <unusedLine+0x89>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
movsbl (%rax,%rcx,1),%edi
call   1050 <isspace@plt>
cmp    $0x0,%eax
jne    11a6 <unusedLine+0x76>
movl   $0x0,-0x4(%rbp)
jmp    11c0 <unusedLine+0x90>
jmp    11ab <unusedLine+0x7b>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1165 <unusedLine+0x35>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unusedLine>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%rbx
movsbl (%rdi),%edi
call   1030 <commentLine@plt>
mov    $0x1,%r14d
test   %rax,%rax
je     1152 <unusedLine+0x22>
mov    %r14d,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret
mov    %rbx,%rdi
call   1040 <strlen@plt>
test   %eax,%eax
je     114a <unusedLine+0x1a>
xor    %ebp,%ebp
movsbl (%rbx,%rbp,1),%edi
call   1050 <isspace@plt>
test   %eax,%eax
je     1182 <unusedLine+0x52>
add    $0x1,%rbp
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    %eax,%eax
cmp    %rax,%rbp
jb     1160 <unusedLine+0x30>
jmp    114a <unusedLine+0x1a>
xor    %r14d,%r14d
jmp    114a <unusedLine+0x1a>

LLVM IR (-O0):
define i32 @unusedLine(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = getelementptr inbounds i8, i8* %5, i64 0
%7 = load i8, i8* %6
%8 = call i64 @commentLine(i8 signext %7)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %1
store i32 1, i32* %2
br label %31
11: ; preds = %1
store i32 0, i32* %4
br label %12
12: ; preds = %27, %11
%13 = load i32, i32* %4
%14 = load i8*, i8** %3
%15 = call i32 @strlen(i8* %14)
%16 = icmp ult i32 %13, %15
br i1 %16, label %17, label %30
17: ; preds = %12
%18 = load i8*, i8** %3
%19 = load i32, i32* %4
%20 = zext i32 %19 to i64
%21 = getelementptr inbounds i8, i8* %18, i64 %20
%22 = load i8, i8* %21
%23 = call i32 @isspace(i8 signext %22)
%24 = icmp ne i32 %23, 0
br i1 %24, label %26, label %25
25: ; preds = %17
store i32 0, i32* %2
br label %31
26: ; preds = %17
br label %27
27: ; preds = %26
%28 = load i32, i32* %4
%29 = add i32 %28, 1
store i32 %29, i32* %4
br label %12
30: ; preds = %12
store i32 1, i32* %2
br label %31
31: ; preds = %30, %25, %10
%32 = load i32, i32* %2
ret i32 %32
}

LLVM IR (-O2):
define i32 @unusedLine(i8* %0) {
%2 = load i8, i8* %0
%3 = tail call i64 @commentLine(i8 signext %2)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %19
5: ; preds = %1
%6 = tail call i32 @strlen(i8* %0)
%7 = icmp eq i32 %6, 0
br i1 %7, label %19, label %12
8: ; preds = %12
%9 = tail call i32 @strlen(i8* %0)
%10 = zext i32 %9 to i64
%11 = icmp ult i64 %18, %10
br i1 %11, label %12, label %19
12: ; preds = %5, %8
%13 = phi i64 [ %18, %8 ], [ 0, %5 ]
%14 = getelementptr inbounds i8, i8* %0, i64 %13
%15 = load i8, i8* %14
%16 = tail call i32 @isspace(i8 signext %15)
%17 = icmp eq i32 %16, 0
%18 = add nuw nsw i64 %13, 1
br i1 %17, label %19, label %8
19: ; preds = %12, %8, %5, %1
%20 = phi i32 [ 1, %1 ], [ 1, %5 ], [ 0, %12 ], [ 1, %8 ]
ret i32 %20
}