#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 IsSetOpt(char *line) {
  eat_ws(&line);
  if (line == strstr(line, "setopt"))
    line += 6;
  else
    return (0);
  if ((*line == ' ') || (*line == '\t'))
    return (1);
  return (0);
}


x86 assembly (clang, -O0):
<IsSetOpt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
lea    -0x10(%rbp),%rdi
call   1030 <eat_ws@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xeb8(%rip),%rsi
call   1040 <strstr@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
cmp    %rcx,%rax
jne    116e <IsSetOpt+0x4e>
mov    -0x10(%rbp),%rax
add    $0x6,%rax
mov    %rax,-0x10(%rbp)
jmp    117a <IsSetOpt+0x5a>
movl   $0x0,-0x4(%rbp)
jmp    11ad <IsSetOpt+0x8d>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
je     119a <IsSetOpt+0x7a>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
jne    11a6 <IsSetOpt+0x86>
movl   $0x1,-0x4(%rbp)
jmp    11ad <IsSetOpt+0x8d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<IsSetOpt>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,0x8(%rsp)
lea    0x8(%rsp),%rdi
call   1030 <eat_ws@plt>
mov    0x8(%rsp),%rbx
lea    0xec0(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strstr@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rbx
jne    116d <IsSetOpt+0x4d>
lea    0x6(%rbx),%rax
mov    %rax,0x8(%rsp)
mov    0x6(%rbx),%al
cmp    $0x20,%al
sete   %cl
cmp    $0x9,%al
sete   %al
or     %cl,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

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