#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 */
double transcross2(double const *, double const *, double const *, int);
int is_strictly_convex(const double v0[2], const double v1[2],
                       const double v2[2], const double v3[2],
                       double threshold) {
  if (transcross2(v0, v1, v3, 1) <= threshold)
    return 0;
  if (transcross2(v1, v2, v0, 1) <= threshold)
    return 0;
  if (transcross2(v2, v3, v1, 1) <= threshold)
    return 0;
  if (transcross2(v3, v0, v2, 1) <= threshold)
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<is_strictly_convex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
movsd  %xmm0,-0x30(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x28(%rbp),%rdx
mov    $0x1,%ecx
call   1030 <transcross2@plt>
movaps %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     1161 <is_strictly_convex+0x51>
movl   $0x0,-0x4(%rbp)
jmp    1204 <is_strictly_convex+0xf4>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    $0x1,%ecx
call   1030 <transcross2@plt>
movaps %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     1195 <is_strictly_convex+0x85>
movl   $0x0,-0x4(%rbp)
jmp    1204 <is_strictly_convex+0xf4>
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    $0x1,%ecx
call   1030 <transcross2@plt>
movaps %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     11c9 <is_strictly_convex+0xb9>
movl   $0x0,-0x4(%rbp)
jmp    1204 <is_strictly_convex+0xf4>
mov    -0x28(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    $0x1,%ecx
call   1030 <transcross2@plt>
movaps %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     11fd <is_strictly_convex+0xed>
movl   $0x0,-0x4(%rbp)
jmp    1204 <is_strictly_convex+0xf4>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_strictly_convex>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x10,%rsp
movsd  %xmm0,0x8(%rsp)
mov    %rcx,%r15
mov    %rdx,%r14
mov    %rsi,%rbp
mov    %rdi,%rbx
mov    %rcx,%rdx
mov    $0x1,%ecx
call   1030 <transcross2@plt>
xor    %r12d,%r12d
movsd  0x8(%rsp),%xmm1
ucomisd %xmm0,%xmm1
jae    11ac <is_strictly_convex+0x9c>
mov    %rbp,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
mov    $0x1,%ecx
call   1030 <transcross2@plt>
movsd  0x8(%rsp),%xmm1
ucomisd %xmm0,%xmm1
jae    11ac <is_strictly_convex+0x9c>
mov    %r14,%rdi
mov    %r15,%rsi
mov    %rbp,%rdx
mov    $0x1,%ecx
call   1030 <transcross2@plt>
movsd  0x8(%rsp),%xmm1
ucomisd %xmm0,%xmm1
jae    11ac <is_strictly_convex+0x9c>
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
mov    $0x1,%ecx
call   1030 <transcross2@plt>
xor    %r12d,%r12d
movsd  0x8(%rsp),%xmm1
ucomisd %xmm0,%xmm1
setb   %r12b
mov    %r12d,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @is_strictly_convex(double* %0, double* %1, double* %2, double* %3, double %4) {
%6 = tail call double @transcross2(double* %0, double* %1, double* %3, i32 1)
%7 = fcmp ugt double %6, %4
br i1 %7, label %8, label %18
8: ; preds = %5
%9 = tail call double @transcross2(double* %1, double* %2, double* %0, i32 1)
%10 = fcmp ugt double %9, %4
br i1 %10, label %11, label %18
11: ; preds = %8
%12 = tail call double @transcross2(double* %2, double* %3, double* %1, i32 1)
%13 = fcmp ugt double %12, %4
br i1 %13, label %14, label %18
14: ; preds = %11
%15 = tail call double @transcross2(double* %3, double* %0, double* %2, i32 1)
%16 = fcmp ugt double %15, %4
%17 = zext i1 %16 to i32
br label %18
18: ; preds = %14, %11, %8, %5
%19 = phi i32 [ 0, %5 ], [ 0, %8 ], [ 0, %11 ], [ %17, %14 ]
ret i32 %19
}