#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*/ printf(char *, int, int, int);
int ck_i(int xa, int yb, int atrn) {
  if (((xa > atrn) || (yb > atrn)) || (xa < 0) || (yb < 0)) {
    printf("Input attributes indexes %d %d not between [0,%d].\n", xa, yb,
           atrn);
    return 0;
  } else {
    return 1;
  }
}


x86 assembly (clang, -O0):
<ck_i>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jg     114d <ck_i+0x3d>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jg     114d <ck_i+0x3d>
cmpl   $0x0,-0x8(%rbp)
jl     114d <ck_i+0x3d>
cmpl   $0x0,-0xc(%rbp)
jge    116e <ck_i+0x5e>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
lea    0xea3(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1175 <ck_i+0x65>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ck_i>:
mov    %edx,%ecx
mov    %esi,%edx
mov    %edi,%esi
cmp    %ecx,%edi
jle    112f <ck_i+0x1f>
push   %rax
lea    0xede(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
jmp    113e <ck_i+0x2e>
mov    %edx,%eax
or     %esi,%eax
js     111a <ck_i+0xa>
mov    $0x1,%eax
cmp    %ecx,%edx
jg     111a <ck_i+0xa>
ret

LLVM IR (-O0):
@.str = [52 x i8] c"Input attributes indexes %d %d not between [0,%d].\0A\00"
define i32 @ck_i(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 = load i32, i32* %7
%10 = icmp sgt i32 %8, %9
br i1 %10, label %21, label %11
11: ; preds = %3
%12 = load i32, i32* %6
%13 = load i32, i32* %7
%14 = icmp sgt i32 %12, %13
br i1 %14, label %21, label %15
15: ; preds = %11
%16 = load i32, i32* %5
%17 = icmp slt i32 %16, 0
br i1 %17, label %21, label %18
18: ; preds = %15
%19 = load i32, i32* %6
%20 = icmp slt i32 %19, 0
br i1 %20, label %21, label %26
21: ; preds = %18, %15, %11, %3
%22 = load i32, i32* %5
%23 = load i32, i32* %6
%24 = load i32, i32* %7
%25 = call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), i32 %22, i32 %23, i32 %24)
store i32 0, i32* %4
br label %27
26: ; preds = %18
store i32 1, i32* %4
br label %27
27: ; preds = %26, %21
%28 = load i32, i32* %4
ret i32 %28
}

LLVM IR (-O2):
@.str = [52 x i8] c"Input attributes indexes %d %d not between [0,%d].\0A\00"
define i32 @ck_i(i32 %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %0, %2
br i1 %4, label %10, label %5
5: ; preds = %3
%6 = icmp sgt i32 %1, %2
%7 = or i32 %1, %0
%8 = icmp slt i32 %7, 0
%9 = or i1 %8, %6
br i1 %9, label %10, label %12
10: ; preds = %5, %3
%11 = tail call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1, i32 %2)
br label %12
12: ; preds = %5, %10
%13 = phi i32 [ 0, %10 ], [ 1, %5 ]
ret i32 %13
}