#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 isNum(char *);
int /*<<< orphan*/ sysPrintString(char *, int /*<<< orphan*/, int, int);
int calculateVerifications(int words, char *input2, char *input3) {
  if (isNum(input2) == 2 || isNum(input3) == 2) {
    sysPrintString("Wrong parameters for calculate: Numbers must be integer\n",
                   0, 255, 255);
    return 0;
  }
  if (words != 4 || !isNum(input2) || !isNum(input3)) {
    sysPrintString("Wrong parameters for calculate\n", 0, 255, 255);
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<calculateVerifications>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <isNum@plt>
cmp    $0x2,%eax
je     1157 <calculateVerifications+0x37>
mov    -0x18(%rbp),%rdi
call   1040 <isNum@plt>
cmp    $0x2,%eax
jne    1178 <calculateVerifications+0x58>
lea    0xea2(%rip),%rdi
xor    %esi,%esi
mov    $0xff,%ecx
mov    %ecx,%edx
call   1030 <sysPrintString@plt>
movl   $0x0,-0x4(%rbp)
jmp    11ce <calculateVerifications+0xae>
cmpl   $0x4,-0x8(%rbp)
jne    11a6 <calculateVerifications+0x86>
mov    -0x10(%rbp),%rdi
call   1040 <isNum@plt>
cmp    $0x0,%eax
je     11a6 <calculateVerifications+0x86>
mov    -0x18(%rbp),%rdi
call   1040 <isNum@plt>
cmp    $0x0,%eax
jne    11c7 <calculateVerifications+0xa7>
lea    0xe8c(%rip),%rdi
xor    %esi,%esi
mov    $0xff,%ecx
mov    %ecx,%edx
call   1030 <sysPrintString@plt>
movl   $0x0,-0x4(%rbp)
jmp    11ce <calculateVerifications+0xae>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calculateVerifications>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %edi,%ebp
mov    %rsi,%rdi
call   1040 <isNum@plt>
lea    0xec2(%rip),%r15
cmp    $0x2,%eax
je     1179 <calculateVerifications+0x59>
mov    %r14,%rdi
call   1040 <isNum@plt>
cmp    $0x2,%eax
je     1179 <calculateVerifications+0x59>
lea    0xee2(%rip),%r15
cmp    $0x4,%ebp
jne    1179 <calculateVerifications+0x59>
mov    %rbx,%rdi
call   1040 <isNum@plt>
test   %eax,%eax
je     1179 <calculateVerifications+0x59>
mov    %r14,%rdi
call   1040 <isNum@plt>
mov    $0x1,%ebx
test   %eax,%eax
jne    118f <calculateVerifications+0x6f>
xor    %ebx,%ebx
mov    %r15,%rdi
xor    %esi,%esi
mov    $0xff,%edx
mov    $0xff,%ecx
call   1030 <sysPrintString@plt>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [57 x i8] c"Wrong parameters for calculate: Numbers must be integer\0A\00"
@.str.1 = [32 x i8] c"Wrong parameters for calculate\0A\00"
define i32 @calculateVerifications(i32 %0, i8* %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i8*
store i32 %0, i32* %5
store i8* %1, i8** %6
store i8* %2, i8** %7
%8 = load i8*, i8** %6
%9 = call i32 @isNum(i8* %8)
%10 = icmp eq i32 %9, 2
br i1 %10, label %15, label %11
11: ; preds = %3
%12 = load i8*, i8** %7
%13 = call i32 @isNum(i8* %12)
%14 = icmp eq i32 %13, 2
br i1 %14, label %15, label %17
15: ; preds = %11, %3
%16 = call i32 @sysPrintString(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0), i32 0, i32 255, i32 255)
store i32 0, i32* %4
br label %31
17: ; preds = %11
%18 = load i32, i32* %5
%19 = icmp ne i32 %18, 4
br i1 %19, label %28, label %20
20: ; preds = %17
%21 = load i8*, i8** %6
%22 = call i32 @isNum(i8* %21)
%23 = icmp ne i32 %22, 0
br i1 %23, label %24, label %28
24: ; preds = %20
%25 = load i8*, i8** %7
%26 = call i32 @isNum(i8* %25)
%27 = icmp ne i32 %26, 0
br i1 %27, label %30, label %28
28: ; preds = %24, %20, %17
%29 = call i32 @sysPrintString(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), i32 0, i32 255, i32 255)
store i32 0, i32* %4
br label %31
30: ; preds = %24
store i32 1, i32* %4
br label %31
31: ; preds = %30, %28, %15
%32 = load i32, i32* %4
ret i32 %32
}

LLVM IR (-O2):
@.str = [57 x i8] c"Wrong parameters for calculate: Numbers must be integer\0A\00"
@.str.1 = [32 x i8] c"Wrong parameters for calculate\0A\00"
define i32 @calculateVerifications(i32 %0, i8* %1, i8* %2) {
%4 = tail call i32 @isNum(i8* %1)
%5 = icmp eq i32 %4, 2
br i1 %5, label %17, label %6
6: ; preds = %3
%7 = tail call i32 @isNum(i8* %2)
%8 = icmp eq i32 %7, 2
br i1 %8, label %17, label %9
9: ; preds = %6
%10 = icmp eq i32 %0, 4
br i1 %10, label %11, label %17
11: ; preds = %9
%12 = tail call i32 @isNum(i8* %1)
%13 = icmp eq i32 %12, 0
br i1 %13, label %17, label %14
14: ; preds = %11
%15 = tail call i32 @isNum(i8* %2)
%16 = icmp eq i32 %15, 0
br i1 %16, label %17, label %20
17: ; preds = %9, %11, %14, %3, %6
%18 = phi i8* [ getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0), %6 ], [ getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0), %3 ], [ getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), %14 ], [ getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), %11 ], [ getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), %9 ]
%19 = tail call i32 @sysPrintString(i8* %18, i32 0, i32 255, i32 255)
br label %20
20: ; preds = %17, %14
%21 = phi i32 [ 1, %14 ], [ 0, %17 ]
ret i32 %21
}