int pointinrect(point, coords)
double point[2], coords[100][2];
{
  return ((point[0] >= coords[0][0] && point[0] <= coords[1][0]) &&
          (point[1] >= coords[0][1] && point[1] <= coords[1][1]));
}


x86 assembly (clang, -O0):
<pointinrect>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rcx
xor    %eax,%eax
ucomisd (%rcx),%xmm0
mov    %al,-0x11(%rbp)
jb     1186 <pointinrect+0x86>
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm0
xor    %eax,%eax
ucomisd %xmm1,%xmm0
mov    %al,-0x11(%rbp)
jb     1186 <pointinrect+0x86>
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rcx
xor    %eax,%eax
ucomisd 0x8(%rcx),%xmm0
mov    %al,-0x12(%rbp)
jb     1180 <pointinrect+0x80>
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    -0x10(%rbp),%rax
movsd  0x18(%rax),%xmm0
ucomisd %xmm1,%xmm0
setae  %al
mov    %al,-0x12(%rbp)
mov    -0x12(%rbp),%al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pointinrect>:
movsd  (%rdi),%xmm0
xor    %eax,%eax
ucomisd (%rsi),%xmm0
jb     1131 <pointinrect+0x31>
movsd  0x10(%rsi),%xmm1
ucomisd %xmm0,%xmm1
jb     1131 <pointinrect+0x31>
movsd  0x8(%rdi),%xmm0
ucomisd 0x8(%rsi),%xmm0
jb     1131 <pointinrect+0x31>
movsd  0x18(%rsi),%xmm1
xor    %eax,%eax
ucomisd %xmm0,%xmm1
setae  %al
ret

LLVM IR (-O0):
define i32 @pointinrect(double* %0, [2 x double]* %1) {
%3 = alloca double*
%4 = alloca [2 x double]*
store double* %0, double** %3
store [2 x double]* %1, [2 x double]** %4
%5 = load double*, double** %3
%6 = getelementptr inbounds double, double* %5, i64 0
%7 = load double, double* %6
%8 = load [2 x double]*, [2 x double]** %4
%9 = getelementptr inbounds [2 x double], [2 x double]* %8, i64 0
%10 = getelementptr inbounds [2 x double], [2 x double]* %9, i64 0, i64 0
%11 = load double, double* %10
%12 = fcmp oge double %7, %11
br i1 %12, label %13, label %42
13: ; preds = %2
%14 = load double*, double** %3
%15 = getelementptr inbounds double, double* %14, i64 0
%16 = load double, double* %15
%17 = load [2 x double]*, [2 x double]** %4
%18 = getelementptr inbounds [2 x double], [2 x double]* %17, i64 1
%19 = getelementptr inbounds [2 x double], [2 x double]* %18, i64 0, i64 0
%20 = load double, double* %19
%21 = fcmp ole double %16, %20
br i1 %21, label %22, label %42
22: ; preds = %13
%23 = load double*, double** %3
%24 = getelementptr inbounds double, double* %23, i64 1
%25 = load double, double* %24
%26 = load [2 x double]*, [2 x double]** %4
%27 = getelementptr inbounds [2 x double], [2 x double]* %26, i64 0
%28 = getelementptr inbounds [2 x double], [2 x double]* %27, i64 0, i64 1
%29 = load double, double* %28
%30 = fcmp oge double %25, %29
br i1 %30, label %31, label %40
31: ; preds = %22
%32 = load double*, double** %3
%33 = getelementptr inbounds double, double* %32, i64 1
%34 = load double, double* %33
%35 = load [2 x double]*, [2 x double]** %4
%36 = getelementptr inbounds [2 x double], [2 x double]* %35, i64 1
%37 = getelementptr inbounds [2 x double], [2 x double]* %36, i64 0, i64 1
%38 = load double, double* %37
%39 = fcmp ole double %34, %38
br label %40
40: ; preds = %31, %22
%41 = phi i1 [ false, %22 ], [ %39, %31 ]
br label %42
42: ; preds = %40, %13, %2
%43 = phi i1 [ false, %13 ], [ false, %2 ], [ %41, %40 ]
%44 = zext i1 %43 to i32
ret i32 %44
}

LLVM IR (-O2):
define i32 @pointinrect(double* nocapture %0, [2 x double]* nocapture %1) {
%3 = load double, double* %0
%4 = getelementptr inbounds [2 x double], [2 x double]* %1, i64 0, i64 0
%5 = load double, double* %4
%6 = fcmp ult double %3, %5
br i1 %6, label %22, label %7
7: ; preds = %2
%8 = getelementptr inbounds [2 x double], [2 x double]* %1, i64 1, i64 0
%9 = load double, double* %8
%10 = fcmp ugt double %3, %9
br i1 %10, label %22, label %11
11: ; preds = %7
%12 = getelementptr inbounds double, double* %0, i64 1
%13 = load double, double* %12
%14 = getelementptr inbounds [2 x double], [2 x double]* %1, i64 0, i64 1
%15 = load double, double* %14
%16 = fcmp ult double %13, %15
br i1 %16, label %22, label %17
17: ; preds = %11
%18 = getelementptr inbounds [2 x double], [2 x double]* %1, i64 1, i64 1
%19 = load double, double* %18
%20 = fcmp ole double %13, %19
%21 = zext i1 %20 to i32
br label %22
22: ; preds = %11, %17, %7, %2
%23 = phi i32 [ 0, %7 ], [ 0, %2 ], [ 0, %11 ], [ %21, %17 ]
ret i32 %23
}