int exp_iscmd(char *expression) {
  register int n;
  bwx_DEBUG(__FUNCTION__);
  if (strcasecmp(expression, "THEN") == 0) {
    return 31;
  }
  if (strcasecmp(expression, "TO") == 0) {
    return 31;
  }
  if (strcasecmp(expression, "STEP") == 0) {
    return 31;
  }
  if (strcasecmp(expression, "GO") == 0) {
    return 31;
  }
  if (strcasecmp(expression, "GOTO") == 0) {
    return 31;
  }
  if (strcasecmp(expression, "GOSUB") == 0) {
    return 31;
  }
  n = is_cmd(expression);
  if (n > 0) {
    return 31;
  }
  return 0;
}


x86 assembly (clang, -O0):
<exp_iscmd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
lea    0xebd(%rip),%rdi
mov    $0x0,%al
call   1050 <bwx_DEBUG@plt>
mov    -0x10(%rbp),%rdi
lea    0xeb5(%rip),%rsi
call   1040 <strcasecmp@plt>
cmp    $0x0,%eax
jne    116f <exp_iscmd+0x3f>
movl   $0x1f,-0x4(%rbp)
jmp    1253 <exp_iscmd+0x123>
mov    -0x10(%rbp),%rdi
lea    0xe9f(%rip),%rsi
call   1040 <strcasecmp@plt>
cmp    $0x0,%eax
jne    1194 <exp_iscmd+0x64>
movl   $0x1f,-0x4(%rbp)
jmp    1253 <exp_iscmd+0x123>
mov    -0x10(%rbp),%rdi
lea    0xe70(%rip),%rsi
call   1040 <strcasecmp@plt>
cmp    $0x0,%eax
jne    11b9 <exp_iscmd+0x89>
movl   $0x1f,-0x4(%rbp)
jmp    1253 <exp_iscmd+0x123>
mov    -0x10(%rbp),%rdi
lea    0xe50(%rip),%rsi
call   1040 <strcasecmp@plt>
cmp    $0x0,%eax
jne    11de <exp_iscmd+0xae>
movl   $0x1f,-0x4(%rbp)
jmp    1253 <exp_iscmd+0x123>
mov    -0x10(%rbp),%rdi
lea    0xe2e(%rip),%rsi
call   1040 <strcasecmp@plt>
cmp    $0x0,%eax
jne    1203 <exp_iscmd+0xd3>
movl   $0x1f,-0x4(%rbp)
jmp    1253 <exp_iscmd+0x123>
mov    -0x10(%rbp),%rdi
lea    0xe0e(%rip),%rsi
call   1040 <strcasecmp@plt>
cmp    $0x0,%eax
jne    1228 <exp_iscmd+0xf8>
movl   $0x1f,-0x4(%rbp)
jmp    1253 <exp_iscmd+0x123>
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1030 <is_cmd@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jle    124c <exp_iscmd+0x11c>
movl   $0x1f,-0x4(%rbp)
jmp    1253 <exp_iscmd+0x123>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exp_iscmd>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%rbx
lea    0xec2(%rip),%rdi
xor    %eax,%eax
call   1050 <bwx_DEBUG@plt>
lea    0xebe(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcasecmp@plt>
mov    $0x1f,%ebp
test   %eax,%eax
je     11d4 <exp_iscmd+0xa4>
lea    0xeb5(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcasecmp@plt>
test   %eax,%eax
je     11d4 <exp_iscmd+0xa4>
lea    0xe98(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcasecmp@plt>
test   %eax,%eax
je     11d4 <exp_iscmd+0xa4>
lea    0xe8a(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcasecmp@plt>
test   %eax,%eax
je     11d4 <exp_iscmd+0xa4>
lea    0xe7a(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcasecmp@plt>
test   %eax,%eax
je     11d4 <exp_iscmd+0xa4>
lea    0xe6c(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcasecmp@plt>
test   %eax,%eax
je     11d4 <exp_iscmd+0xa4>
xor    %r14d,%r14d
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <is_cmd@plt>
test   %eax,%eax
mov    $0x1f,%ebp
cmovle %r14d,%ebp
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@__FUNCTION__.exp_iscmd = [10 x i8] c"exp_iscmd\00"
@.str = [5 x i8] c"THEN\00"
@.str.1 = [3 x i8] c"TO\00"
@.str.2 = [5 x i8] c"STEP\00"
@.str.3 = [3 x i8] c"GO\00"
@.str.4 = [5 x i8] c"GOTO\00"
@.str.5 = [6 x i8] c"GOSUB\00"
define i32 @exp_iscmd(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
%5 = call i32 (i8*, ...) bitcast (i32 (...)* @bwx_DEBUG to i32 (i8*, ...)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @__FUNCTION__.exp_iscmd, i64 0, i64 0))
%6 = load i8*, i8** %3
%7 = call i32 @strcasecmp(i8* %6, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %1
store i32 31, i32* %2
br label %42
10: ; preds = %1
%11 = load i8*, i8** %3
%12 = call i32 @strcasecmp(i8* %11, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %15
14: ; preds = %10
store i32 31, i32* %2
br label %42
15: ; preds = %10
%16 = load i8*, i8** %3
%17 = call i32 @strcasecmp(i8* %16, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%18 = icmp eq i32 %17, 0
br i1 %18, label %19, label %20
19: ; preds = %15
store i32 31, i32* %2
br label %42
20: ; preds = %15
%21 = load i8*, i8** %3
%22 = call i32 @strcasecmp(i8* %21, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%23 = icmp eq i32 %22, 0
br i1 %23, label %24, label %25
24: ; preds = %20
store i32 31, i32* %2
br label %42
25: ; preds = %20
%26 = load i8*, i8** %3
%27 = call i32 @strcasecmp(i8* %26, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%28 = icmp eq i32 %27, 0
br i1 %28, label %29, label %30
29: ; preds = %25
store i32 31, i32* %2
br label %42
30: ; preds = %25
%31 = load i8*, i8** %3
%32 = call i32 @strcasecmp(i8* %31, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
%33 = icmp eq i32 %32, 0
br i1 %33, label %34, label %35
34: ; preds = %30
store i32 31, i32* %2
br label %42
35: ; preds = %30
%36 = load i8*, i8** %3
%37 = call i32 (i8*, ...) bitcast (i32 (...)* @is_cmd to i32 (i8*, ...)*)(i8* %36)
store i32 %37, i32* %4
%38 = load i32, i32* %4
%39 = icmp sgt i32 %38, 0
br i1 %39, label %40, label %41
40: ; preds = %35
store i32 31, i32* %2
br label %42
41: ; preds = %35
store i32 0, i32* %2
br label %42
42: ; preds = %41, %40, %34, %29, %24, %19, %14, %9
%43 = load i32, i32* %2
ret i32 %43
}

LLVM IR (-O2):
@__FUNCTION__.exp_iscmd = [10 x i8] c"exp_iscmd\00"
@.str = [5 x i8] c"THEN\00"
@.str.1 = [3 x i8] c"TO\00"
@.str.2 = [5 x i8] c"STEP\00"
@.str.3 = [3 x i8] c"GO\00"
@.str.4 = [5 x i8] c"GOTO\00"
@.str.5 = [6 x i8] c"GOSUB\00"
define i32 @exp_iscmd(i8* %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @bwx_DEBUG to i32 (i8*, ...)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @__FUNCTION__.exp_iscmd, i64 0, i64 0))
%3 = tail call i32 @strcasecmp(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i32 %3, 0
br i1 %4, label %24, label %5
5: ; preds = %1
%6 = tail call i32 @strcasecmp(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%7 = icmp eq i32 %6, 0
br i1 %7, label %24, label %8
8: ; preds = %5
%9 = tail call i32 @strcasecmp(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%10 = icmp eq i32 %9, 0
br i1 %10, label %24, label %11
11: ; preds = %8
%12 = tail call i32 @strcasecmp(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%13 = icmp eq i32 %12, 0
br i1 %13, label %24, label %14
14: ; preds = %11
%15 = tail call i32 @strcasecmp(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%16 = icmp eq i32 %15, 0
br i1 %16, label %24, label %17
17: ; preds = %14
%18 = tail call i32 @strcasecmp(i8* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
%19 = icmp eq i32 %18, 0
br i1 %19, label %24, label %20
20: ; preds = %17
%21 = tail call i32 (i8*, ...) bitcast (i32 (...)* @is_cmd to i32 (i8*, ...)*)(i8* %0)
%22 = icmp sgt i32 %21, 0
%23 = select i1 %22, i32 31, i32 0
br label %24
24: ; preds = %20, %17, %14, %11, %8, %5, %1
%25 = phi i32 [ 31, %1 ], [ 31, %5 ], [ 31, %8 ], [ 31, %11 ], [ 31, %14 ], [ 31, %17 ], [ %23, %20 ]
ret i32 %25
}