int pointinrect(double const *point, double (*coords)[2]) {
  double max[2];
  double min[2];
  int tmp;
  {
    if ((*(coords + 0))[0] > (*(coords + 1))[0]) {
      max[0] = (*(coords + 0))[0];
      min[0] = (*(coords + 1))[0];
    } else {
      max[0] = (*(coords + 1))[0];
      min[0] = (*(coords + 0))[0];
    }
    if ((*(coords + 0))[1] > (*(coords + 1))[1]) {
      max[1] = (*(coords + 0))[1];
      min[1] = (*(coords + 1))[1];
    } else {
      max[1] = (*(coords + 1))[1];
      min[1] = (*(coords + 0))[1];
    }
    if ((*(point + 0)) >= (double const)min[0]) {
      if ((*(point + 0)) <= (double const)max[0]) {
        if ((*(point + 1)) >= (double const)min[1]) {
          if ((*(point + 1)) <= (double const)max[1]) {
            tmp = 1;
          } else {
            goto _L___0;
          }
        } else {
        _L___0:
          goto _L___1;
        }
      } else {
        goto _L___1;
      }
    } else {
    _L___1:
      tmp = 0;
    }
    return (tmp);
  }
}


x86 assembly (clang, -O0):
<pointinrect>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
ucomisd 0x10(%rax),%xmm0
jbe    1143 <pointinrect+0x43>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x30(%rbp)
jmp    115e <pointinrect+0x5e>
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
ucomisd 0x18(%rax),%xmm0
jbe    1197 <pointinrect+0x97>
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x18(%rax),%xmm0
movsd  %xmm0,-0x28(%rbp)
jmp    11b3 <pointinrect+0xb3>
mov    -0x10(%rbp),%rax
movsd  0x18(%rax),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
ucomisd -0x30(%rbp),%xmm0
jb     1238 <pointinrect+0x138>
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm1
movsd  -0x20(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     122e <pointinrect+0x12e>
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
ucomisd -0x28(%rbp),%xmm0
jb     121f <pointinrect+0x11f>
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm1
movsd  -0x18(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     1215 <pointinrect+0x115>
movl   $0x1,-0x34(%rbp)
jmp    121a <pointinrect+0x11a>
jmp    1224 <pointinrect+0x124>
jmp    1229 <pointinrect+0x129>
jmp    1224 <pointinrect+0x124>
jmp    123d <pointinrect+0x13d>
jmp    1233 <pointinrect+0x133>
jmp    123d <pointinrect+0x13d>
jmp    1244 <pointinrect+0x144>
jmp    123d <pointinrect+0x13d>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pointinrect>:
movsd  0x10(%rsi),%xmm1
movsd  (%rsi),%xmm0
movapd %xmm1,%xmm3
minsd  %xmm0,%xmm3
movsd  (%rdi),%xmm2
ucomisd %xmm3,%xmm2
jb     1152 <pointinrect+0x52>
maxsd  %xmm1,%xmm0
ucomisd %xmm2,%xmm0
jb     1152 <pointinrect+0x52>
movsd  0x8(%rsi),%xmm0
movsd  0x18(%rsi),%xmm1
movapd %xmm1,%xmm3
minsd  %xmm0,%xmm3
movsd  0x8(%rdi),%xmm2
ucomisd %xmm3,%xmm2
jb     1152 <pointinrect+0x52>
maxsd  %xmm1,%xmm0
mov    $0x1,%eax
ucomisd %xmm2,%xmm0
jb     1152 <pointinrect+0x52>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @pointinrect(double* %0, [2 x double]* %1) {
%3 = alloca double*
%4 = alloca [2 x double]*
%5 = alloca [2 x double]
%6 = alloca [2 x double]
%7 = alloca i32
store double* %0, double** %3
store [2 x double]* %1, [2 x double]** %4
%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 = load [2 x double]*, [2 x double]** %4
%13 = getelementptr inbounds [2 x double], [2 x double]* %12, i64 1
%14 = getelementptr inbounds [2 x double], [2 x double]* %13, i64 0, i64 0
%15 = load double, double* %14
%16 = fcmp ogt double %11, %15
br i1 %16, label %17, label %28
17: ; preds = %2
%18 = load [2 x double]*, [2 x double]** %4
%19 = getelementptr inbounds [2 x double], [2 x double]* %18, i64 0
%20 = getelementptr inbounds [2 x double], [2 x double]* %19, i64 0, i64 0
%21 = load double, double* %20
%22 = getelementptr inbounds [2 x double], [2 x double]* %5, i64 0, i64 0
store double %21, double* %22
%23 = load [2 x double]*, [2 x double]** %4
%24 = getelementptr inbounds [2 x double], [2 x double]* %23, i64 1
%25 = getelementptr inbounds [2 x double], [2 x double]* %24, i64 0, i64 0
%26 = load double, double* %25
%27 = getelementptr inbounds [2 x double], [2 x double]* %6, i64 0, i64 0
store double %26, double* %27
br label %39
28: ; preds = %2
%29 = load [2 x double]*, [2 x double]** %4
%30 = getelementptr inbounds [2 x double], [2 x double]* %29, i64 1
%31 = getelementptr inbounds [2 x double], [2 x double]* %30, i64 0, i64 0
%32 = load double, double* %31
%33 = getelementptr inbounds [2 x double], [2 x double]* %5, i64 0, i64 0
store double %32, double* %33
%34 = load [2 x double]*, [2 x double]** %4
%35 = getelementptr inbounds [2 x double], [2 x double]* %34, i64 0
%36 = getelementptr inbounds [2 x double], [2 x double]* %35, i64 0, i64 0
%37 = load double, double* %36
%38 = getelementptr inbounds [2 x double], [2 x double]* %6, i64 0, i64 0
store double %37, double* %38
br label %39
39: ; preds = %28, %17
%40 = load [2 x double]*, [2 x double]** %4
%41 = getelementptr inbounds [2 x double], [2 x double]* %40, i64 0
%42 = getelementptr inbounds [2 x double], [2 x double]* %41, i64 0, i64 1
%43 = load double, double* %42
%44 = load [2 x double]*, [2 x double]** %4
%45 = getelementptr inbounds [2 x double], [2 x double]* %44, i64 1
%46 = getelementptr inbounds [2 x double], [2 x double]* %45, i64 0, i64 1
%47 = load double, double* %46
%48 = fcmp ogt double %43, %47
br i1 %48, label %49, label %60
49: ; preds = %39
%50 = load [2 x double]*, [2 x double]** %4
%51 = getelementptr inbounds [2 x double], [2 x double]* %50, i64 0
%52 = getelementptr inbounds [2 x double], [2 x double]* %51, i64 0, i64 1
%53 = load double, double* %52
%54 = getelementptr inbounds [2 x double], [2 x double]* %5, i64 0, i64 1
store double %53, double* %54
%55 = load [2 x double]*, [2 x double]** %4
%56 = getelementptr inbounds [2 x double], [2 x double]* %55, i64 1
%57 = getelementptr inbounds [2 x double], [2 x double]* %56, i64 0, i64 1
%58 = load double, double* %57
%59 = getelementptr inbounds [2 x double], [2 x double]* %6, i64 0, i64 1
store double %58, double* %59
br label %71
60: ; preds = %39
%61 = load [2 x double]*, [2 x double]** %4
%62 = getelementptr inbounds [2 x double], [2 x double]* %61, i64 1
%63 = getelementptr inbounds [2 x double], [2 x double]* %62, i64 0, i64 1
%64 = load double, double* %63
%65 = getelementptr inbounds [2 x double], [2 x double]* %5, i64 0, i64 1
store double %64, double* %65
%66 = load [2 x double]*, [2 x double]** %4
%67 = getelementptr inbounds [2 x double], [2 x double]* %66, i64 0
%68 = getelementptr inbounds [2 x double], [2 x double]* %67, i64 0, i64 1
%69 = load double, double* %68
%70 = getelementptr inbounds [2 x double], [2 x double]* %6, i64 0, i64 1
store double %69, double* %70
br label %71
71: ; preds = %60, %49
%72 = load double*, double** %3
%73 = getelementptr inbounds double, double* %72, i64 0
%74 = load double, double* %73
%75 = getelementptr inbounds [2 x double], [2 x double]* %6, i64 0, i64 0
%76 = load double, double* %75
%77 = fcmp oge double %74, %76
br i1 %77, label %78, label %107
78: ; preds = %71
%79 = load double*, double** %3
%80 = getelementptr inbounds double, double* %79, i64 0
%81 = load double, double* %80
%82 = getelementptr inbounds [2 x double], [2 x double]* %5, i64 0, i64 0
%83 = load double, double* %82
%84 = fcmp ole double %81, %83
br i1 %84, label %85, label %105
85: ; preds = %78
%86 = load double*, double** %3
%87 = getelementptr inbounds double, double* %86, i64 1
%88 = load double, double* %87
%89 = getelementptr inbounds [2 x double], [2 x double]* %6, i64 0, i64 1
%90 = load double, double* %89
%91 = fcmp oge double %88, %90
br i1 %91, label %92, label %102
92: ; preds = %85
%93 = load double*, double** %3
%94 = getelementptr inbounds double, double* %93, i64 1
%95 = load double, double* %94
%96 = getelementptr inbounds [2 x double], [2 x double]* %5, i64 0, i64 1
%97 = load double, double* %96
%98 = fcmp ole double %95, %97
br i1 %98, label %99, label %100
99: ; preds = %92
store i32 1, i32* %7
br label %101
100: ; preds = %92
br label %103
101: ; preds = %99
br label %104
102: ; preds = %85
br label %103
103: ; preds = %102, %100
br label %108
104: ; preds = %101
br label %106
105: ; preds = %78
br label %108
106: ; preds = %104
br label %109
107: ; preds = %71
br label %108
108: ; preds = %107, %105, %103
store i32 0, i32* %7
br label %109
109: ; preds = %108, %106
%110 = load i32, i32* %7
ret i32 %110
}

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