#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 */
struct blastFile {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ bfError(struct blastFile *, char *);
int /*<<< orphan*/ differentWord(char *, char *);
int getStrand(struct blastFile *bf, char *strand) {
  if ((!differentWord("Plus", strand)))
    return 1;
  else if ((!differentWord("Minus", strand)))
    return -1;
  else {
    bfError(bf, "Expecting Plus or Minus after Strand");
    return 0;
  }
}


x86 assembly (clang, -O0):
<getStrand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xec5(%rip),%rdi
call   1030 <differentWord@plt>
cmp    $0x0,%eax
jne    1155 <getStrand+0x35>
movl   $0x1,-0x4(%rbp)
jmp    1191 <getStrand+0x71>
mov    -0x18(%rbp),%rsi
lea    0xea5(%rip),%rdi
call   1030 <differentWord@plt>
cmp    $0x0,%eax
jne    117a <getStrand+0x5a>
movl   $0xffffffff,-0x4(%rbp)
jmp    1191 <getStrand+0x71>
mov    -0x10(%rbp),%rdi
lea    0xe86(%rip),%rsi
call   1040 <bfError@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getStrand>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
lea    0xecf(%rip),%rdi
call   1030 <differentWord@plt>
test   %eax,%eax
je     1160 <getStrand+0x40>
lea    0xec4(%rip),%rdi
mov    %rbx,%rsi
call   1030 <differentWord@plt>
test   %eax,%eax
je     1167 <getStrand+0x47>
lea    0xeb7(%rip),%rsi
mov    %r14,%rdi
call   1040 <bfError@plt>
xor    %eax,%eax
jmp    116c <getStrand+0x4c>
mov    $0x1,%eax
jmp    116c <getStrand+0x4c>
mov    $0xffffffff,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.blastFile = type { i32 }
@.str = [5 x i8] c"Plus\00"
@.str.1 = [6 x i8] c"Minus\00"
@.str.2 = [37 x i8] c"Expecting Plus or Minus after Strand\00"
define i32 @getStrand(%struct.blastFile* %0, i8* %1) {
%3 = alloca i32
%4 = alloca %struct.blastFile*
%5 = alloca i8*
store %struct.blastFile* %0, %struct.blastFile** %4
store i8* %1, i8** %5
%6 = load i8*, i8** %5
%7 = call i32 @differentWord(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = icmp ne i32 %7, 0
br i1 %8, label %10, label %9
9: ; preds = %2
store i32 1, i32* %3
br label %18
10: ; preds = %2
%11 = load i8*, i8** %5
%12 = call i32 @differentWord(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %11)
%13 = icmp ne i32 %12, 0
br i1 %13, label %15, label %14
14: ; preds = %10
store i32 -1, i32* %3
br label %18
15: ; preds = %10
%16 = load %struct.blastFile*, %struct.blastFile** %4
%17 = call i32 @bfError(%struct.blastFile* %16, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %3
br label %18
18: ; preds = %15, %14, %9
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
%struct.blastFile = type { i32 }
@.str = [5 x i8] c"Plus\00"
@.str.1 = [6 x i8] c"Minus\00"
@.str.2 = [37 x i8] c"Expecting Plus or Minus after Strand\00"
define i32 @getStrand(%struct.blastFile* %0, i8* %1) {
%3 = tail call i32 @differentWord(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %1)
%4 = icmp eq i32 %3, 0
br i1 %4, label %10, label %5
5: ; preds = %2
%6 = tail call i32 @differentWord(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %1)
%7 = icmp eq i32 %6, 0
br i1 %7, label %10, label %8
8: ; preds = %5
%9 = tail call i32 @bfError(%struct.blastFile* %0, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.2, i64 0, i64 0))
br label %10
10: ; preds = %5, %2, %8
%11 = phi i32 [ 0, %8 ], [ 1, %2 ], [ -1, %5 ]
ret i32 %11
}