#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 */
char *InterpretArg(char *, char *);
int /*<<< orphan*/ log_Printf(int, char *);
int /*<<< orphan*/ strncasecmp(char *, char *, int);
int DecodeCtrlCommand(char *line, char *arg) {
  const char *end;
  if (!strncasecmp(line, "include", 7) &&
      ((line[7]) == ' ' || (line[7]) == '\t')) {
    end = InterpretArg(line + 8, arg);
    if (*end && *end != '#')
      log_Printf((23), "usage: !include filename\n");
    else
      return (1);
  }
  return (0);
}


x86 assembly (clang, -O0):
<DecodeCtrlCommand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xeb5(%rip),%rsi
mov    $0x7,%edx
call   1050 <strncasecmp@plt>
cmp    $0x0,%eax
jne    11dc <DecodeCtrlCommand+0xac>
mov    -0x10(%rbp),%rax
movsbl 0x7(%rax),%eax
cmp    $0x20,%eax
je     1180 <DecodeCtrlCommand+0x50>
mov    -0x10(%rbp),%rax
movsbl 0x7(%rax),%eax
cmp    $0x9,%eax
jne    11dc <DecodeCtrlCommand+0xac>
mov    -0x10(%rbp),%rdi
add    $0x8,%rdi
mov    -0x18(%rbp),%rsi
call   1040 <InterpretArg@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     11cb <DecodeCtrlCommand+0x9b>
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x23,%eax
je     11cb <DecodeCtrlCommand+0x9b>
mov    $0x17,%edi
lea    0xe47(%rip),%rsi
call   1030 <log_Printf@plt>
jmp    11d7 <DecodeCtrlCommand+0xa7>
movl   $0x1,-0x4(%rbp)
jmp    11e3 <DecodeCtrlCommand+0xb3>
jmp    11dc <DecodeCtrlCommand+0xac>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DecodeCtrlCommand>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xebf(%rip),%rsi
mov    $0x7,%edx
call   1050 <strncasecmp@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
je     115b <DecodeCtrlCommand+0x2b>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    0x7(%rbx),%cl
cmp    $0x20,%cl
je     1168 <DecodeCtrlCommand+0x38>
cmp    $0x9,%cl
jne    1153 <DecodeCtrlCommand+0x23>
add    $0x8,%rbx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <InterpretArg@plt>
mov    (%rax),%cl
mov    $0x1,%eax
test   %cl,%cl
je     1153 <DecodeCtrlCommand+0x23>
cmp    $0x23,%cl
je     1153 <DecodeCtrlCommand+0x23>
lea    0xe7a(%rip),%rsi
mov    $0x17,%edi
call   1030 <log_Printf@plt>
xor    %eax,%eax
jmp    1153 <DecodeCtrlCommand+0x23>

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

LLVM IR (-O2):
@.str = [8 x i8] c"include\00"
@.str.1 = [26 x i8] c"usage: !include filename\0A\00"
define i32 @DecodeCtrlCommand(i8* %0, i8* %1) {
%3 = tail call i32 @strncasecmp(i8* %0, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 7)
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %14
5: ; preds = %2
%6 = getelementptr inbounds i8, i8* %0, i64 7
%7 = load i8, i8* %6
switch i8 %7, label %14 [
i8 32, label %8
i8 9, label %8
]
8: ; preds = %5, %5
%9 = getelementptr inbounds i8, i8* %0, i64 8
%10 = tail call i8* @InterpretArg(i8* %9, i8* %1)
%11 = load i8, i8* %10
switch i8 %11, label %12 [
i8 0, label %14
i8 35, label %14
]
12: ; preds = %8
%13 = tail call i32 @log_Printf(i32 23, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
br label %14
14: ; preds = %2, %12, %5, %8, %8
%15 = phi i32 [ 1, %8 ], [ 1, %8 ], [ 0, %5 ], [ 0, %12 ], [ 0, %2 ]
ret i32 %15
}