#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);
scalar_t__ tolower(unsigned char);
int _is_command_terminator(const char *zLine) {
  while (isspace((unsigned char)zLine[0])) {
    zLine++;
  };
  if (zLine[0] == '/' && _all_whitespace(&zLine[1])) {
    return 1;
  }
  if ((char)tolower((unsigned char)zLine[0]) == 'g' &&
      (char)tolower((unsigned char)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
movzbl (%rax),%edi
call   1040 <tolower@plt>
movsbl %al,%eax
cmp    $0x67,%eax
jne    11ea <_is_command_terminator+0xba>
mov    -0x10(%rbp),%rax
movzbl 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
movzbl %al,%edi
call   1040 <tolower@plt>
cmp    $0x67,%al
jne    11a3 <_is_command_terminator+0x73>
movzbl (%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 = %10, %1
%5 = load i8*, i8** %3
%6 = getelementptr inbounds i8, i8* %5, i64 0
%7 = load i8, i8* %6
%8 = call i64 @isspace(i8 zeroext %7)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %4
%11 = load i8*, i8** %3
%12 = getelementptr inbounds i8, i8* %11, i32 1
store i8* %12, i8** %3
br label %4
13: ; preds = %4
%14 = load i8*, i8** %3
%15 = getelementptr inbounds i8, i8* %14, i64 0
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
%18 = icmp eq i32 %17, 47
br i1 %18, label %19, label %25
19: ; preds = %13
%20 = load i8*, i8** %3
%21 = getelementptr inbounds i8, i8* %20, i64 1
%22 = call i64 @_all_whitespace(i8* %21)
%23 = icmp ne i64 %22, 0
br i1 %23, label %24, label %25
24: ; preds = %19
store i32 1, i32* %2
br label %48
25: ; preds = %19, %13
%26 = load i8*, i8** %3
%27 = getelementptr inbounds i8, i8* %26, i64 0
%28 = load i8, i8* %27
%29 = call i64 @tolower(i8 zeroext %28)
%30 = trunc i64 %29 to i8
%31 = sext i8 %30 to i32
%32 = icmp eq i32 %31, 103
br i1 %32, label %33, label %47
33: ; preds = %25
%34 = load i8*, i8** %3
%35 = getelementptr inbounds i8, i8* %34, i64 1
%36 = load i8, i8* %35
%37 = call i64 @tolower(i8 zeroext %36)
%38 = trunc i64 %37 to i8
%39 = sext i8 %38 to i32
%40 = icmp eq i32 %39, 111
br i1 %40, label %41, label %47
41: ; preds = %33
%42 = load i8*, i8** %3
%43 = getelementptr inbounds i8, i8* %42, i64 2
%44 = call i64 @_all_whitespace(i8* %43)
%45 = icmp ne i64 %44, 0
br i1 %45, label %46, label %47
46: ; preds = %41
store i32 1, i32* %2
br label %48
47: ; preds = %41, %33, %25
store i32 0, i32* %2
br label %48
48: ; preds = %47, %46, %24
%49 = load i32, i32* %2
ret i32 %49
}

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 %31
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 i64 @tolower(i8 zeroext %17)
%19 = and i64 %18, 255
%20 = icmp eq i64 %19, 103
br i1 %20, label %21, label %30
21: ; preds = %16
%22 = load i8, i8* %7
%23 = tail call i64 @tolower(i8 zeroext %22)
%24 = and i64 %23, 255
%25 = icmp eq i64 %24, 111
br i1 %25, label %26, label %30
26: ; preds = %21
%27 = getelementptr inbounds i8, i8* %3, i64 2
%28 = tail call i64 @_all_whitespace(i8* %27)
%29 = icmp eq i64 %28, 0
br i1 %29, label %30, label %31
30: ; preds = %26, %21, %16
br label %31
31: ; preds = %26, %11, %30
%32 = phi i32 [ 0, %30 ], [ 1, %11 ], [ 1, %26 ]
ret i32 %32
}