#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 */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int x;
  int y;
  int width;
  int height;
};
typedef TYPE_1__ XRectangle;

/* Variables and functions */
int outside_rectangle(int x, int y, XRectangle *r) {
  return (x < r->x || y < r->y || x >= r->x + r->width ||
          y >= r->y + r->height);
}


x86 assembly (clang, -O0):
<outside_rectangle>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%ecx
mov    -0x10(%rbp),%rdx
mov    $0x1,%al
cmp    (%rdx),%ecx
mov    %al,-0x11(%rbp)
jl     116d <outside_rectangle+0x6d>
mov    -0x8(%rbp),%ecx
mov    -0x10(%rbp),%rdx
mov    $0x1,%al
cmp    0x4(%rdx),%ecx
mov    %al,-0x11(%rbp)
jl     116d <outside_rectangle+0x6d>
mov    -0x4(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    (%rax),%edx
mov    -0x10(%rbp),%rax
add    0x8(%rax),%edx
mov    $0x1,%al
cmp    %edx,%ecx
mov    %al,-0x11(%rbp)
jge    116d <outside_rectangle+0x6d>
mov    -0x8(%rbp),%eax
mov    -0x10(%rbp),%rcx
mov    0x4(%rcx),%ecx
mov    -0x10(%rbp),%rdx
add    0xc(%rdx),%ecx
cmp    %ecx,%eax
setge  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<outside_rectangle>:
mov    (%rdx),%ecx
mov    $0x1,%eax
cmp    %edi,%ecx
jg     1127 <outside_rectangle+0x27>
mov    0x4(%rdx),%r8d
cmp    %esi,%r8d
jg     1127 <outside_rectangle+0x27>
add    0x8(%rdx),%ecx
cmp    %edi,%ecx
jle    1127 <outside_rectangle+0x27>
add    0xc(%rdx),%r8d
xor    %eax,%eax
cmp    %esi,%r8d
setle  %al
ret

LLVM IR (-O0):
%struct.TYPE_3__ = type { i32, i32, i32, i32 }
define i32 @outside_rectangle(i32 %0, i32 %1, %struct.TYPE_3__* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca %struct.TYPE_3__*
store i32 %0, i32* %4
store i32 %1, i32* %5
store %struct.TYPE_3__* %2, %struct.TYPE_3__** %6
%7 = load i32, i32* %4
%8 = load %struct.TYPE_3__*, %struct.TYPE_3__** %6
%9 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %8, i32 0, i32 0
%10 = load i32, i32* %9
%11 = icmp slt i32 %7, %10
br i1 %11, label %38, label %12
12: ; preds = %3
%13 = load i32, i32* %5
%14 = load %struct.TYPE_3__*, %struct.TYPE_3__** %6
%15 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %14, i32 0, i32 1
%16 = load i32, i32* %15
%17 = icmp slt i32 %13, %16
br i1 %17, label %38, label %18
18: ; preds = %12
%19 = load i32, i32* %4
%20 = load %struct.TYPE_3__*, %struct.TYPE_3__** %6
%21 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %20, i32 0, i32 0
%22 = load i32, i32* %21
%23 = load %struct.TYPE_3__*, %struct.TYPE_3__** %6
%24 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %23, i32 0, i32 2
%25 = load i32, i32* %24
%26 = add nsw i32 %22, %25
%27 = icmp sge i32 %19, %26
br i1 %27, label %38, label %28
28: ; preds = %18
%29 = load i32, i32* %5
%30 = load %struct.TYPE_3__*, %struct.TYPE_3__** %6
%31 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %30, i32 0, i32 1
%32 = load i32, i32* %31
%33 = load %struct.TYPE_3__*, %struct.TYPE_3__** %6
%34 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %33, i32 0, i32 3
%35 = load i32, i32* %34
%36 = add nsw i32 %32, %35
%37 = icmp sge i32 %29, %36
br label %38
38: ; preds = %28, %18, %12, %3
%39 = phi i1 [ true, %18 ], [ true, %12 ], [ true, %3 ], [ %37, %28 ]
%40 = zext i1 %39 to i32
ret i32 %40
}

LLVM IR (-O2):
%struct.TYPE_3__ = type { i32, i32, i32, i32 }
define i32 @outside_rectangle(i32 %0, i32 %1, %struct.TYPE_3__* nocapture %2) {
%4 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %2, i64 0, i32 0
%5 = load i32, i32* %4
%6 = icmp sgt i32 %5, %0
br i1 %6, label %22, label %7
7: ; preds = %3
%8 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %2, i64 0, i32 1
%9 = load i32, i32* %8
%10 = icmp sgt i32 %9, %1
br i1 %10, label %22, label %11
11: ; preds = %7
%12 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %2, i64 0, i32 2
%13 = load i32, i32* %12
%14 = add nsw i32 %13, %5
%15 = icmp sgt i32 %14, %0
br i1 %15, label %16, label %22
16: ; preds = %11
%17 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %2, i64 0, i32 3
%18 = load i32, i32* %17
%19 = add nsw i32 %18, %9
%20 = icmp sle i32 %19, %1
%21 = zext i1 %20 to i32
br label %22
22: ; preds = %16, %11, %7, %3
%23 = phi i32 [ 1, %11 ], [ 1, %7 ], [ 1, %3 ], [ %21, %16 ]
ret i32 %23
}