#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*/ check_info(int, int, char);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ get_info(int, char **, int *, int *, char *, int *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ read_info(int, int *, char *, int *);
int /*<<< orphan*/ write_info(int, int, char, int);
int main(int argc, char *argv[]) {
  int nprocs, nprocs_old, type;
  char class, class_old;
  int subtype = -1, old_subtype = -1;
  get_info(argc, argv, &type, &nprocs, &class, &subtype);
  if (class != 'U') {
    check_info(type, nprocs, class);
  }
  read_info(type, &nprocs_old, &class_old, &old_subtype);
  if (class != 'U') {
    if (class_old != 'X') {
    }
  } else {
    printf("setparams:\n  "
           "*******************************************************************"
           "**\n  * You must specify NPROCS and CLASS to build this benchmark  "
           "       *\n  * For example, to build a class A benchmark for 4 "
           "processors, type  *\n  *       make {benchmark-name} NPROCS=4 "
           "CLASS=A                      *\n  "
           "*******************************************************************"
           "**\n\n");
    if (class_old != 'X') {
    }
    exit(1);
  }
  if (nprocs != nprocs_old || class != class_old || subtype != old_subtype) {
    write_info(type, nprocs, class, subtype);
  } else {
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0xffffffff,-0x24(%rbp)
movl   $0xffffffff,-0x28(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    -0x1c(%rbp),%rdx
lea    -0x14(%rbp),%rcx
lea    -0x1d(%rbp),%r8
lea    -0x24(%rbp),%r9
call   1040 <get_info@plt>
movsbl -0x1d(%rbp),%eax
cmp    $0x55,%eax
je     11bc <main+0x5c>
mov    -0x1c(%rbp),%edi
mov    -0x14(%rbp),%esi
movsbl -0x1d(%rbp),%edx
call   1060 <check_info@plt>
mov    -0x1c(%rbp),%edi
lea    -0x18(%rbp),%rsi
lea    -0x1e(%rbp),%rdx
lea    -0x28(%rbp),%rcx
call   1070 <read_info@plt>
movsbl -0x1d(%rbp),%eax
cmp    $0x55,%eax
je     11f4 <main+0x94>
movsbl -0x1e(%rbp),%eax
cmp    $0x58,%eax
je     11ef <main+0x8f>
jmp    11ef <main+0x8f>
jmp    121c <main+0xbc>
lea    0xe05(%rip),%rdi
call   1050 <printf@plt>
movsbl -0x1e(%rbp),%eax
cmp    $0x58,%eax
je     1212 <main+0xb2>
jmp    1212 <main+0xb2>
mov    $0x1,%edi
call   1080 <exit@plt>
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jne    1244 <main+0xe4>
movsbl -0x1d(%rbp),%eax
movsbl -0x1e(%rbp),%ecx
cmp    %ecx,%eax
jne    1244 <main+0xe4>
mov    -0x24(%rbp),%eax
cmp    -0x28(%rbp),%eax
je     125d <main+0xfd>
mov    -0x1c(%rbp),%edi
mov    -0x14(%rbp),%esi
mov    -0x1d(%rbp),%al
mov    -0x24(%rbp),%ecx
movsbl %al,%edx
call   1030 <write_info@plt>
jmp    1262 <main+0x102>
jmp    1262 <main+0x102>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movl   $0xffffffff,0xc(%rsp)
ff
movl   $0xffffffff,0x8(%rsp)
ff
lea    0x4(%rsp),%rdx
lea    0x10(%rsp),%rcx
lea    0x2(%rsp),%r8
lea    0xc(%rsp),%r9
call   1040 <get_info@plt>
mov    0x2(%rsp),%al
cmp    $0x55,%al
je     11a5 <main+0x45>
mov    0x4(%rsp),%edi
mov    0x10(%rsp),%esi
movsbl %al,%edx
call   1060 <check_info@plt>
mov    0x4(%rsp),%edi
lea    0x14(%rsp),%rsi
lea    0x3(%rsp),%rdx
lea    0x8(%rsp),%rcx
call   1070 <read_info@plt>
mov    0x2(%rsp),%al
cmp    $0x55,%al
je     11f2 <main+0x92>
mov    0x10(%rsp),%esi
mov    0xc(%rsp),%ecx
cmp    0x14(%rsp),%esi
jne    11df <main+0x7f>
cmp    0x3(%rsp),%al
jne    11df <main+0x7f>
cmp    0x8(%rsp),%ecx
je     11eb <main+0x8b>
mov    0x4(%rsp),%edi
movsbl %al,%edx
call   1030 <write_info@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret
lea    0xe07(%rip),%rdi
call   1050 <puts@plt>
mov    $0x1,%edi
call   1080 <exit@plt>

LLVM IR (-O0):
@.str = [373 x i8] c"setparams:\0A *********************************************************************\0A * You must specify NPROCS and CLASS to build this benchmark *\0A * For example, to build a class A benchmark for 4 processors, type *\0A * make {benchmark-name} NPROCS=4 CLASS=A *\0A *********************************************************************\0A\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i8
%10 = alloca i8
%11 = alloca i32
%12 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 -1, i32* %11
store i32 -1, i32* %12
%13 = load i32, i32* %4
%14 = load i8**, i8*** %5
%15 = call i32 @get_info(i32 %13, i8** %14, i32* %8, i32* %6, i8* %9, i32* %11)
%16 = load i8, i8* %9
%17 = sext i8 %16 to i32
%18 = icmp ne i32 %17, 85
br i1 %18, label %19, label %24
19: ; preds = %2
%20 = load i32, i32* %8
%21 = load i32, i32* %6
%22 = load i8, i8* %9
%23 = call i32 @check_info(i32 %20, i32 %21, i8 signext %22)
br label %24
24: ; preds = %19, %2
%25 = load i32, i32* %8
%26 = call i32 @read_info(i32 %25, i32* %7, i8* %10, i32* %12)
%27 = load i8, i8* %9
%28 = sext i8 %27 to i32
%29 = icmp ne i32 %28, 85
br i1 %29, label %30, label %36
30: ; preds = %24
%31 = load i8, i8* %10
%32 = sext i8 %31 to i32
%33 = icmp ne i32 %32, 88
br i1 %33, label %34, label %35
34: ; preds = %30
br label %35
35: ; preds = %34, %30
br label %44
36: ; preds = %24
%37 = call i32 @printf(i8* getelementptr inbounds ([373 x i8], [373 x i8]* @.str, i64 0, i64 0))
%38 = load i8, i8* %10
%39 = sext i8 %38 to i32
%40 = icmp ne i32 %39, 88
br i1 %40, label %41, label %42
41: ; preds = %36
br label %42
42: ; preds = %41, %36
%43 = call i32 @exit(i32 1)
unreachable
44: ; preds = %35
%45 = load i32, i32* %6
%46 = load i32, i32* %7
%47 = icmp ne i32 %45, %46
br i1 %47, label %58, label %48
48: ; preds = %44
%49 = load i8, i8* %9
%50 = sext i8 %49 to i32
%51 = load i8, i8* %10
%52 = sext i8 %51 to i32
%53 = icmp ne i32 %50, %52
br i1 %53, label %58, label %54
54: ; preds = %48
%55 = load i32, i32* %11
%56 = load i32, i32* %12
%57 = icmp ne i32 %55, %56
br i1 %57, label %58, label %64
58: ; preds = %54, %48, %44
%59 = load i32, i32* %8
%60 = load i32, i32* %6
%61 = load i8, i8* %9
%62 = load i32, i32* %11
%63 = call i32 @write_info(i32 %59, i32 %60, i8 signext %61, i32 %62)
br label %65
64: ; preds = %54
br label %65
65: ; preds = %64, %58
ret i32 0
}

LLVM IR (-O2):
@str = [372 x i8] c"setparams:\0A *********************************************************************\0A * You must specify NPROCS and CLASS to build this benchmark *\0A * For example, to build a class A benchmark for 4 processors, type *\0A * make {benchmark-name} NPROCS=4 CLASS=A *\0A *********************************************************************\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8
%7 = alloca i8
%8 = alloca i32
%9 = alloca i32
%10 = bitcast i32* %3 to i8*
%11 = bitcast i32* %4 to i8*
%12 = bitcast i32* %5 to i8*
%13 = bitcast i32* %8 to i8*
store i32 -1, i32* %8
%14 = bitcast i32* %9 to i8*
store i32 -1, i32* %9
%15 = call i32 @get_info(i32 %0, i8** %1, i32* %5, i32* %3, i8* %6, i32* %8)
%16 = load i8, i8* %6
%17 = icmp eq i8 %16, 85
br i1 %17, label %22, label %18
18: ; preds = %2
%19 = load i32, i32* %5
%20 = load i32, i32* %3
%21 = call i32 @check_info(i32 %19, i32 %20, i8 signext %16)
br label %22
22: ; preds = %18, %2
%23 = load i32, i32* %5
%24 = call i32 @read_info(i32 %23, i32* %4, i8* %7, i32* %9)
%25 = load i8, i8* %6
%26 = icmp eq i8 %25, 85
br i1 %26, label %38, label %27
27: ; preds = %22
%28 = load i32, i32* %3
%29 = load i32, i32* %4
%30 = icmp eq i32 %28, %29
%31 = load i8, i8* %7
%32 = icmp eq i8 %25, %31
%33 = select i1 %30, i1 %32, i1 false
%34 = load i32, i32* %8
%35 = load i32, i32* %9
%36 = icmp eq i32 %34, %35
%37 = select i1 %33, i1 %36, i1 false
br i1 %37, label %44, label %41
38: ; preds = %22
%39 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([372 x i8], [372 x i8]* @str, i64 0, i64 0))
%40 = call i32 @exit(i32 1)
unreachable
41: ; preds = %27
%42 = load i32, i32* %5
%43 = call i32 @write_info(i32 %42, i32 %28, i8 signext %25, i32 %34)
br label %44
44: ; preds = %27, %41
ret i32 0
}