#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__ _all_whitespace(char const *);
scalar_t__ isspace(unsigned char);
char tolower(char const);
int _is_command_terminator(const char *zLine) {
  while (isspace(*(unsigned char *)zLine)) {
    zLine++;
  };
  if (zLine[0] == '/' && _all_whitespace(&zLine[1]))
    return 1;
  if (tolower(zLine[0]) == 'g' && tolower(zLine[1]) == 'o' &&
      _all_whitespace(&zLine[2])) {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<_is_command_terminator>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movzbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
je     1163 <_is_command_terminator+0x33>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    113c <_is_command_terminator+0xc>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2f,%eax
jne    1196 <_is_command_terminator+0x66>
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
call   1050 <_all_whitespace@plt>
cmp    $0x0,%rax
je     1196 <_is_command_terminator+0x66>
movl   $0x1,-0x4(%rbp)
jmp    11f1 <_is_command_terminator+0xc1>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1040 <tolower@plt>
movsbl %al,%eax
cmp    $0x67,%eax
jne    11ea <_is_command_terminator+0xba>
mov    -0x10(%rbp),%rax
movsbl 0x1(%rax),%edi
call   1040 <tolower@plt>
movsbl %al,%eax
cmp    $0x6f,%eax
jne    11ea <_is_command_terminator+0xba>
mov    -0x10(%rbp),%rdi
add    $0x2,%rdi
call   1050 <_all_whitespace@plt>
cmp    $0x0,%rax
je     11ea <_is_command_terminator+0xba>
movl   $0x1,-0x4(%rbp)
jmp    11f1 <_is_command_terminator+0xc1>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_is_command_terminator>:
push   %rbx
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movzbl (%rbx),%edi
call   1030 <isspace@plt>
add    $0x1,%rbx
test   %rax,%rax
jne    1140 <_is_command_terminator+0x10>
mov    -0x1(%rbx),%al
cmp    $0x2f,%al
jne    1172 <_is_command_terminator+0x42>
mov    %rbx,%rdi
call   1050 <_all_whitespace@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     116f <_is_command_terminator+0x3f>
pop    %rbx
ret
mov    -0x1(%rbx),%al
movsbl %al,%edi
call   1040 <tolower@plt>
cmp    $0x67,%al
jne    11a3 <_is_command_terminator+0x73>
movsbl (%rbx),%edi
call   1040 <tolower@plt>
cmp    $0x6f,%al
jne    11a3 <_is_command_terminator+0x73>
add    $0x1,%rbx
mov    %rbx,%rdi
call   1050 <_all_whitespace@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
jne    116d <_is_command_terminator+0x3d>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @_is_command_terminator(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
br label %4
4: ; preds = %9, %1
%5 = load i8*, i8** %3
%6 = load i8, i8* %5
%7 = call i64 @isspace(i8 zeroext %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %4
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i32 1
store i8* %11, i8** %3
br label %4
12: ; preds = %4
%13 = load i8*, i8** %3
%14 = getelementptr inbounds i8, i8* %13, i64 0
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = icmp eq i32 %16, 47
br i1 %17, label %18, label %24
18: ; preds = %12
%19 = load i8*, i8** %3
%20 = getelementptr inbounds i8, i8* %19, i64 1
%21 = call i64 @_all_whitespace(i8* %20)
%22 = icmp ne i64 %21, 0
br i1 %22, label %23, label %24
23: ; preds = %18
store i32 1, i32* %2
br label %45
24: ; preds = %18, %12
%25 = load i8*, i8** %3
%26 = getelementptr inbounds i8, i8* %25, i64 0
%27 = load i8, i8* %26
%28 = call signext i8 @tolower(i8 signext %27)
%29 = sext i8 %28 to i32
%30 = icmp eq i32 %29, 103
br i1 %30, label %31, label %44
31: ; preds = %24
%32 = load i8*, i8** %3
%33 = getelementptr inbounds i8, i8* %32, i64 1
%34 = load i8, i8* %33
%35 = call signext i8 @tolower(i8 signext %34)
%36 = sext i8 %35 to i32
%37 = icmp eq i32 %36, 111
br i1 %37, label %38, label %44
38: ; preds = %31
%39 = load i8*, i8** %3
%40 = getelementptr inbounds i8, i8* %39, i64 2
%41 = call i64 @_all_whitespace(i8* %40)
%42 = icmp ne i64 %41, 0
br i1 %42, label %43, label %44
43: ; preds = %38
store i32 1, i32* %2
br label %45
44: ; preds = %38, %31, %24
store i32 0, i32* %2
br label %45
45: ; preds = %44, %43, %23
%46 = load i32, i32* %2
ret i32 %46
}

LLVM IR (-O2):
define i32 @_is_command_terminator(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %7, %2 ]
%4 = load i8, i8* %3
%5 = tail call i64 @isspace(i8 zeroext %4)
%6 = icmp eq i64 %5, 0
%7 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = load i8, i8* %3
%10 = icmp eq i8 %9, 47
br i1 %10, label %11, label %16
11: ; preds = %8
%12 = tail call i64 @_all_whitespace(i8* %7)
%13 = icmp eq i64 %12, 0
br i1 %13, label %14, label %29
14: ; preds = %11
%15 = load i8, i8* %3
br label %16
16: ; preds = %14, %8
%17 = phi i8 [ %15, %14 ], [ %9, %8 ]
%18 = tail call signext i8 @tolower(i8 signext %17)
%19 = icmp eq i8 %18, 103
br i1 %19, label %20, label %28
20: ; preds = %16
%21 = load i8, i8* %7
%22 = tail call signext i8 @tolower(i8 signext %21)
%23 = icmp eq i8 %22, 111
br i1 %23, label %24, label %28
24: ; preds = %20
%25 = getelementptr inbounds i8, i8* %3, i64 2
%26 = tail call i64 @_all_whitespace(i8* %25)
%27 = icmp eq i64 %26, 0
br i1 %27, label %28, label %29
28: ; preds = %24, %20, %16
br label %29
29: ; preds = %24, %11, %28
%30 = phi i32 [ 0, %28 ], [ 1, %11 ], [ 1, %24 ]
ret i32 %30
}