int is_in_image(il, ie, height, width)
int il, ie;
long height, width;
{
  int result = 1;
  if (il < 0) {
    printf("\nil=%d tool small", il);
    result = 0;
  }
  if (ie < 0) {
    printf("\nie=%d tool small", ie);
    result = 0;
  }
  if ((il + 20) > height) {
    printf("\nll=%d tool big", il + 20);
    result = 0;
  }
  if ((ie + 15) > width) {
    printf("\nle=%d tool big", ie + 15);
    result = 0;
  }
  return (result);
}


x86 assembly (clang, -O0):
<is_in_image>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
movl   $0x1,-0x1c(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    114f <is_in_image+0x3f>
mov    -0x4(%rbp),%esi
lea    0xebf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x1c(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    1171 <is_in_image+0x61>
mov    -0x8(%rbp),%esi
lea    0xeaf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x1c(%rbp)
mov    -0x4(%rbp),%eax
add    $0x14,%eax
cltq
cmp    -0x10(%rbp),%rax
jle    119e <is_in_image+0x8e>
mov    -0x4(%rbp),%esi
add    $0x14,%esi
lea    0xe94(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x1c(%rbp)
mov    -0x8(%rbp),%eax
add    $0xf,%eax
cltq
cmp    -0x18(%rbp),%rax
jle    11cb <is_in_image+0xbb>
mov    -0x8(%rbp),%esi
add    $0xf,%esi
lea    0xe77(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_in_image>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %rcx,%r14
mov    %rdx,%r12
mov    %esi,%ebx
mov    %edi,%ebp
mov    $0x1,%r15d
test   %edi,%edi
js     1178 <is_in_image+0x68>
test   %ebx,%ebx
js     118f <is_in_image+0x7f>
add    $0x14,%ebp
movslq %ebp,%rax
cmp    %r12,%rax
jle    114e <is_in_image+0x3e>
lea    0xee2(%rip),%rdi
xor    %r15d,%r15d
mov    %ebp,%esi
xor    %eax,%eax
call   1030 <printf@plt>
add    $0xf,%ebx
movslq %ebx,%rax
cmp    %r14,%rax
jle    116c <is_in_image+0x5c>
lea    0xed4(%rip),%rdi
xor    %r15d,%r15d
mov    %ebx,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %r15d,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xe81(%rip),%rdi
xor    %r15d,%r15d
mov    %ebp,%esi
xor    %eax,%eax
call   1030 <printf@plt>
test   %ebx,%ebx
jns    1130 <is_in_image+0x20>
lea    0xe7c(%rip),%rdi
xor    %r15d,%r15d
mov    %ebx,%esi
xor    %eax,%eax
call   1030 <printf@plt>
jmp    1130 <is_in_image+0x20>

LLVM IR (-O0):
@.str = [18 x i8] c"\0Ail=%d tool small\00"
@.str.1 = [18 x i8] c"\0Aie=%d tool small\00"
@.str.2 = [16 x i8] c"\0All=%d tool big\00"
@.str.3 = [16 x i8] c"\0Ale=%d tool big\00"
define i32 @is_in_image(i32 %0, i32 %1, i64 %2, i64 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i64
%8 = alloca i64
%9 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i64 %2, i64* %7
store i64 %3, i64* %8
store i32 1, i32* %9
%10 = load i32, i32* %5
%11 = icmp slt i32 %10, 0
br i1 %11, label %12, label %15
12: ; preds = %4
%13 = load i32, i32* %5
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %13)
store i32 0, i32* %9
br label %15
15: ; preds = %12, %4
%16 = load i32, i32* %6
%17 = icmp slt i32 %16, 0
br i1 %17, label %18, label %21
18: ; preds = %15
%19 = load i32, i32* %6
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32 %19)
store i32 0, i32* %9
br label %21
21: ; preds = %18, %15
%22 = load i32, i32* %5
%23 = add nsw i32 %22, 20
%24 = sext i32 %23 to i64
%25 = load i64, i64* %7
%26 = icmp sgt i64 %24, %25
br i1 %26, label %27, label %31
27: ; preds = %21
%28 = load i32, i32* %5
%29 = add nsw i32 %28, 20
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32 %29)
store i32 0, i32* %9
br label %31
31: ; preds = %27, %21
%32 = load i32, i32* %6
%33 = add nsw i32 %32, 15
%34 = sext i32 %33 to i64
%35 = load i64, i64* %8
%36 = icmp sgt i64 %34, %35
br i1 %36, label %37, label %41
37: ; preds = %31
%38 = load i32, i32* %6
%39 = add nsw i32 %38, 15
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i32 %39)
store i32 0, i32* %9
br label %41
41: ; preds = %37, %31
%42 = load i32, i32* %9
ret i32 %42
}

LLVM IR (-O2):
@.str = [18 x i8] c"\0Ail=%d tool small\00"
@.str.1 = [18 x i8] c"\0Aie=%d tool small\00"
@.str.2 = [16 x i8] c"\0All=%d tool big\00"
@.str.3 = [16 x i8] c"\0Ale=%d tool big\00"
define i32 @is_in_image(i32 %0, i32 %1, i64 %2, i64 %3) {
%5 = icmp slt i32 %0, 0
br i1 %5, label %6, label %8
6: ; preds = %4
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %0)
br label %8
8: ; preds = %6, %4
%9 = phi i32 [ 0, %6 ], [ 1, %4 ]
%10 = icmp slt i32 %1, 0
br i1 %10, label %11, label %13
11: ; preds = %8
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32 %1)
br label %13
13: ; preds = %11, %8
%14 = phi i32 [ 0, %11 ], [ %9, %8 ]
%15 = add nsw i32 %0, 20
%16 = sext i32 %15 to i64
%17 = icmp sgt i64 %16, %2
br i1 %17, label %18, label %20
18: ; preds = %13
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32 %15)
br label %20
20: ; preds = %18, %13
%21 = phi i32 [ 0, %18 ], [ %14, %13 ]
%22 = add nsw i32 %1, 15
%23 = sext i32 %22 to i64
%24 = icmp sgt i64 %23, %3
br i1 %24, label %25, label %27
25: ; preds = %20
%26 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i32 %22)
br label %27
27: ; preds = %25, %20
%28 = phi i32 [ 0, %25 ], [ %21, %20 ]
ret i32 %28
}