#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 */
int /*<<< orphan*/ eat_ws(char **);
char *strstr(char *, char *);
int IsEnumLine(char *estr) {
  if (NULL == estr)
    return (0);
  if (0 == estr[0])
    return (0);
  eat_ws(&estr);
  if (estr != strstr(estr, "setenum"))
    return (0);
  estr += 7;
  if ((*estr != ' ') && (*estr != '\t')) {
    return (0);
  }
  return (1);
}


x86 assembly (clang, -O0):
<IsEnumLine>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
xor    %eax,%eax
cmp    -0x10(%rbp),%rax
jne    1144 <IsEnumLine+0x24>
movl   $0x0,-0x4(%rbp)
jmp    11dd <IsEnumLine+0xbd>
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jne    1161 <IsEnumLine+0x41>
movl   $0x0,-0x4(%rbp)
jmp    11dd <IsEnumLine+0xbd>
lea    -0x10(%rbp),%rdi
call   1030 <eat_ws@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xe83(%rip),%rsi
call   1040 <strstr@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
cmp    %rcx,%rax
je     119e <IsEnumLine+0x7e>
movl   $0x0,-0x4(%rbp)
jmp    11dd <IsEnumLine+0xbd>
mov    -0x10(%rbp),%rax
add    $0x7,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
je     11d6 <IsEnumLine+0xb6>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
je     11d6 <IsEnumLine+0xb6>
movl   $0x0,-0x4(%rbp)
jmp    11dd <IsEnumLine+0xbd>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<IsEnumLine>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,(%rsp)
xor    %ebp,%ebp
test   %rdi,%rdi
je     116d <IsEnumLine+0x4d>
cmpb   $0x0,(%rdi)
je     116d <IsEnumLine+0x4d>
mov    %rsp,%rdi
call   1030 <eat_ws@plt>
mov    (%rsp),%rbx
lea    0xeba(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strstr@plt>
cmp    %rax,%rbx
jne    116d <IsEnumLine+0x4d>
lea    0x7(%rbx),%rax
mov    %rax,(%rsp)
mov    0x7(%rbx),%al
cmp    $0x20,%al
sete   %cl
cmp    $0x9,%al
sete   %al
or     %cl,%al
movzbl %al,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [8 x i8] c"setenum\00"
define i32 @IsEnumLine(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = icmp eq i8* null, %4
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 0, i32* %2
br label %35
7: ; preds = %1
%8 = load i8*, i8** %3
%9 = getelementptr inbounds i8, i8* %8, i64 0
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp eq i32 0, %11
br i1 %12, label %13, label %14
13: ; preds = %7
store i32 0, i32* %2
br label %35
14: ; preds = %7
%15 = call i32 @eat_ws(i8** %3)
%16 = load i8*, i8** %3
%17 = load i8*, i8** %3
%18 = call i8* @strstr(i8* %17, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%19 = icmp ne i8* %16, %18
br i1 %19, label %20, label %21
20: ; preds = %14
store i32 0, i32* %2
br label %35
21: ; preds = %14
%22 = load i8*, i8** %3
%23 = getelementptr inbounds i8, i8* %22, i64 7
store i8* %23, i8** %3
%24 = load i8*, i8** %3
%25 = load i8, i8* %24
%26 = sext i8 %25 to i32
%27 = icmp ne i32 %26, 32
br i1 %27, label %28, label %34
28: ; preds = %21
%29 = load i8*, i8** %3
%30 = load i8, i8* %29
%31 = sext i8 %30 to i32
%32 = icmp ne i32 %31, 9
br i1 %32, label %33, label %34
33: ; preds = %28
store i32 0, i32* %2
br label %35
34: ; preds = %28, %21
store i32 1, i32* %2
br label %35
35: ; preds = %34, %33, %20, %13, %6
%36 = load i32, i32* %2
ret i32 %36
}

LLVM IR (-O2):
@.str = [8 x i8] c"setenum\00"
define i32 @IsEnumLine(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = icmp eq i8* %0, null
br i1 %3, label %19, label %4
4: ; preds = %1
%5 = load i8, i8* %0
%6 = icmp eq i8 %5, 0
br i1 %6, label %19, label %7
7: ; preds = %4
%8 = call i32 @eat_ws(i8** %2)
%9 = load i8*, i8** %2
%10 = call i8* @strstr(i8* dereferenceable(1) %9, i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%11 = icmp eq i8* %9, %10
br i1 %11, label %12, label %19
12: ; preds = %7
%13 = getelementptr inbounds i8, i8* %9, i64 7
store i8* %13, i8** %2
%14 = load i8, i8* %13
%15 = icmp eq i8 %14, 32
%16 = icmp eq i8 %14, 9
%17 = or i1 %15, %16
%18 = zext i1 %17 to i32
br label %19
19: ; preds = %12, %7, %4, %1
%20 = phi i32 [ 0, %1 ], [ 0, %4 ], [ 0, %7 ], [ %18, %12 ]
ret i32 %20
}