#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*/ fprintf(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ stderr;
int satisfiesConstraint(int transformationNo, int x, int y) {
  if (transformationNo == 1) {
    return x > 0;
  } else if (transformationNo == 2) {
    return y > 0;
  } else if (transformationNo == 3) {
    return x > y;
  }
  fprintf(stderr,
          "find-transformations: Illegal argument exception in function "
          "satisfiesConsraint: Transformation number is out of bounds: %d",
          transformationNo);
  return -1;
}


x86 assembly (clang, -O0):
<satisfiesConstraint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    113f <satisfiesConstraint+0x2f>
cmpl   $0x0,-0xc(%rbp)
setg   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
jmp    11a6 <satisfiesConstraint+0x96>
cmpl   $0x2,-0x8(%rbp)
jne    115d <satisfiesConstraint+0x4d>
cmpl   $0x0,-0x10(%rbp)
setg   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
jmp    11a6 <satisfiesConstraint+0x96>
cmpl   $0x3,-0x8(%rbp)
jne    117d <satisfiesConstraint+0x6d>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
setg   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
jmp    11a6 <satisfiesConstraint+0x96>
jmp    1182 <satisfiesConstraint+0x72>
jmp    1187 <satisfiesConstraint+0x77>
mov    0x2e52(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%edx
lea    0xe66(%rip),%rsi
call   1030 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<satisfiesConstraint>:
cmp    $0x3,%edi
je     1129 <satisfiesConstraint+0x19>
mov    %edi,%eax
cmp    $0x2,%edi
je     1131 <satisfiesConstraint+0x21>
cmp    $0x1,%eax
jne    1139 <satisfiesConstraint+0x29>
xor    %eax,%eax
test   %esi,%esi
setg   %al
ret
xor    %eax,%eax
cmp    %edx,%esi
setg   %al
ret
xor    %eax,%eax
test   %edx,%edx
setg   %al
ret
push   %rax
mov    0x2e9f(%rip),%rcx
mov    (%rcx),%edi
lea    0xeb6(%rip),%rsi
mov    %eax,%edx
call   1030 <fprintf@plt>
mov    $0xffffffff,%eax
add    $0x8,%rsp
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [124 x i8] c"find-transformations: Illegal argument exception in function satisfiesConsraint: Transformation number is out of bounds: %d\00"
define i32 @satisfiesConstraint(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
%8 = load i32, i32* %5
%9 = icmp eq i32 %8, 1
br i1 %9, label %10, label %14
10: ; preds = %3
%11 = load i32, i32* %6
%12 = icmp sgt i32 %11, 0
%13 = zext i1 %12 to i32
store i32 %13, i32* %4
br label %35
14: ; preds = %3
%15 = load i32, i32* %5
%16 = icmp eq i32 %15, 2
br i1 %16, label %17, label %21
17: ; preds = %14
%18 = load i32, i32* %7
%19 = icmp sgt i32 %18, 0
%20 = zext i1 %19 to i32
store i32 %20, i32* %4
br label %35
21: ; preds = %14
%22 = load i32, i32* %5
%23 = icmp eq i32 %22, 3
br i1 %23, label %24, label %29
24: ; preds = %21
%25 = load i32, i32* %6
%26 = load i32, i32* %7
%27 = icmp sgt i32 %25, %26
%28 = zext i1 %27 to i32
store i32 %28, i32* %4
br label %35
29: ; preds = %21
br label %30
30: ; preds = %29
br label %31
31: ; preds = %30
%32 = load i32, i32* @stderr
%33 = load i32, i32* %5
%34 = call i32 @fprintf(i32 %32, i8* getelementptr inbounds ([124 x i8], [124 x i8]* @.str, i64 0, i64 0), i32 %33)
store i32 -1, i32* %4
br label %35
35: ; preds = %31, %24, %17, %10
%36 = load i32, i32* %4
ret i32 %36
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [124 x i8] c"find-transformations: Illegal argument exception in function satisfiesConsraint: Transformation number is out of bounds: %d\00"
define i32 @satisfiesConstraint(i32 %0, i32 %1, i32 %2) {
switch i32 %0, label %13 [
i32 1, label %4
i32 2, label %7
i32 3, label %10
]
4: ; preds = %3
%5 = icmp sgt i32 %1, 0
%6 = zext i1 %5 to i32
br label %16
7: ; preds = %3
%8 = icmp sgt i32 %2, 0
%9 = zext i1 %8 to i32
br label %16
10: ; preds = %3
%11 = icmp sgt i32 %1, %2
%12 = zext i1 %11 to i32
br label %16
13: ; preds = %3
%14 = load i32, i32* @stderr
%15 = tail call i32 @fprintf(i32 %14, i8* getelementptr inbounds ([124 x i8], [124 x i8]* @.str, i64 0, i64 0), i32 %0)
br label %16
16: ; preds = %13, %10, %7, %4
%17 = phi i32 [ %6, %4 ], [ %9, %7 ], [ %12, %10 ], [ -1, %13 ]
ret i32 %17
}