#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*/ strcmp(char *, char *);
unsigned int BoardInfoCheck(unsigned char *boardId, unsigned char *boardVer) {
  if (!(strcmp(("A335_S"), (char *)boardId))) {
    if (!(strcmp(("1.2B"), (char *)boardVer))) {
      return (0x1);
    } else if (!(strcmp(("1.3A"), (char *)boardVer))) {
      return (0x2);
    } else {
      return (0xFE);
    }
  } else {
    return (0xFF);
  }
}


x86 assembly (clang, -O0):
<BoardInfoCheck>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xed5(%rip),%rdi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    118f <BoardInfoCheck+0x7f>
mov    -0x18(%rbp),%rsi
lea    0xec3(%rip),%rdi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    115e <BoardInfoCheck+0x4e>
movl   $0x1,-0x4(%rbp)
jmp    1196 <BoardInfoCheck+0x86>
mov    -0x18(%rbp),%rsi
lea    0xea3(%rip),%rdi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1183 <BoardInfoCheck+0x73>
movl   $0x2,-0x4(%rbp)
jmp    1196 <BoardInfoCheck+0x86>
movl   $0xfe,-0x4(%rbp)
jmp    1196 <BoardInfoCheck+0x86>
movl   $0xff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BoardInfoCheck>:
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%rsi
lea    0xee2(%rip),%rdi
call   1030 <strcmp@plt>
mov    %eax,%ecx
mov    $0xff,%eax
test   %ecx,%ecx
je     1130 <BoardInfoCheck+0x20>
pop    %rbx
ret
lea    0xed0(%rip),%rdi
mov    %rbx,%rsi
call   1030 <strcmp@plt>
test   %eax,%eax
je     1163 <BoardInfoCheck+0x53>
lea    0xec2(%rip),%rdi
mov    %rbx,%rsi
call   1030 <strcmp@plt>
test   %eax,%eax
mov    $0x2,%ecx
mov    $0xfe,%eax
cmove  %ecx,%eax
pop    %rbx
ret
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"A335_S\00"
@.str.1 = [5 x i8] c"1.2B\00"
@.str.2 = [5 x i8] c"1.3A\00"
define i32 @BoardInfoCheck(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
%6 = load i8*, i8** %4
%7 = call i32 @strcmp(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = icmp ne i32 %7, 0
br i1 %8, label %20, label %9
9: ; preds = %2
%10 = load i8*, i8** %5
%11 = call i32 @strcmp(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %10)
%12 = icmp ne i32 %11, 0
br i1 %12, label %14, label %13
13: ; preds = %9
store i32 1, i32* %3
br label %21
14: ; preds = %9
%15 = load i8*, i8** %5
%16 = call i32 @strcmp(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* %15)
%17 = icmp ne i32 %16, 0
br i1 %17, label %19, label %18
18: ; preds = %14
store i32 2, i32* %3
br label %21
19: ; preds = %14
store i32 254, i32* %3
br label %21
20: ; preds = %2
store i32 255, i32* %3
br label %21
21: ; preds = %20, %19, %18, %13
%22 = load i32, i32* %3
ret i32 %22
}

LLVM IR (-O2):
@.str = [7 x i8] c"A335_S\00"
@.str.1 = [5 x i8] c"1.2B\00"
@.str.2 = [5 x i8] c"1.3A\00"
define i32 @BoardInfoCheck(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* dereferenceable(1) %0)
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %12
5: ; preds = %2
%6 = tail call i32 @strcmp(i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* dereferenceable(1) %1)
%7 = icmp eq i32 %6, 0
br i1 %7, label %12, label %8
8: ; preds = %5
%9 = tail call i32 @strcmp(i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* dereferenceable(1) %1)
%10 = icmp eq i32 %9, 0
%11 = select i1 %10, i32 2, i32 254
br label %12
12: ; preds = %2, %8, %5
%13 = phi i32 [ 1, %5 ], [ %11, %8 ], [ 255, %2 ]
ret i32 %13
}