#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(char const);
int _is_command_terminator(const char *zLine) {
  extern int sqliteStrNICmp(const char *, const char *, int);
  while (isspace(*zLine)) {
    zLine++;
  };
  if (zLine[0] == '/' && _all_whitespace(&zLine[1]))
    return 1;
  if (sqliteStrNICmp(zLine, "go", 2) == 0 && _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
movsbl (%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    11de <_is_command_terminator+0xae>
mov    -0x10(%rbp),%rdi
lea    0xe5f(%rip),%rsi
mov    $0x2,%edx
call   1040 <sqliteStrNICmp@plt>
cmp    $0x0,%eax
jne    11d7 <_is_command_terminator+0xa7>
mov    -0x10(%rbp),%rdi
add    $0x2,%rdi
call   1050 <_all_whitespace@plt>
cmp    $0x0,%rax
je     11d7 <_is_command_terminator+0xa7>
movl   $0x1,-0x4(%rbp)
jmp    11de <_is_command_terminator+0xae>
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
movsbl (%rbx),%edi
call   1030 <isspace@plt>
add    $0x1,%rbx
test   %rax,%rax
jne    1140 <_is_command_terminator+0x10>
cmpb   $0x2f,-0x1(%rbx)
jne    116e <_is_command_terminator+0x3e>
mov    %rbx,%rdi
call   1050 <_all_whitespace@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     116e <_is_command_terminator+0x3e>
pop    %rbx
ret
lea    -0x1(%rbx),%rdi
lea    0xe87(%rip),%rsi
mov    $0x2,%edx
call   1040 <sqliteStrNICmp@plt>
test   %eax,%eax
jne    11a0 <_is_command_terminator+0x70>
add    $0x1,%rbx
mov    %rbx,%rdi
call   1050 <_all_whitespace@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
jne    116c <_is_command_terminator+0x3c>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"go\00"
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 signext %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 %35
24: ; preds = %18, %12
%25 = load i8*, i8** %3
%26 = call i32 @sqliteStrNICmp(i8* %25, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 2)
%27 = icmp eq i32 %26, 0
br i1 %27, label %28, label %34
28: ; preds = %24
%29 = load i8*, i8** %3
%30 = getelementptr inbounds i8, i8* %29, i64 2
%31 = call i64 @_all_whitespace(i8* %30)
%32 = icmp ne i64 %31, 0
br i1 %32, label %33, label %34
33: ; preds = %28
store i32 1, i32* %2
br label %35
34: ; preds = %28, %24
store i32 0, i32* %2
br label %35
35: ; preds = %34, %33, %23
%36 = load i32, i32* %2
ret i32 %36
}

LLVM IR (-O2):
@.str = [3 x i8] c"go\00"
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 signext %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 %14
11: ; preds = %8
%12 = tail call i64 @_all_whitespace(i8* %7)
%13 = icmp eq i64 %12, 0
br i1 %13, label %14, label %22
14: ; preds = %11, %8
%15 = tail call i32 @sqliteStrNICmp(i8* %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 2)
%16 = icmp eq i32 %15, 0
br i1 %16, label %17, label %21
17: ; preds = %14
%18 = getelementptr inbounds i8, i8* %3, i64 2
%19 = tail call i64 @_all_whitespace(i8* %18)
%20 = icmp eq i64 %19, 0
br i1 %20, label %21, label %22
21: ; preds = %17, %14
br label %22
22: ; preds = %17, %11, %21
%23 = phi i32 [ 0, %21 ], [ 1, %11 ], [ 1, %17 ]
ret i32 %23
}