#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 fabs(double);
double reeds_shepp(double, double, double, double, double, double, int *,
                   double *, double *, double *);
double min_length_rs(double x1, double y1, double t1, double x2, double y2,
                     double t2, int *numero, double *t, double *u, double *v) {
  double length_rs;
  if ((fabs(x1 - x2) < 1.0e-12) && (fabs(y1 - y2) < 1.0e-12) &&
      (fabs(t1 - t2) < 1.0e-12))
    length_rs = 0.0;
  else
    length_rs = reeds_shepp(x1, y1, t1, x2, y2, t2, numero, t, u, v);
  return (length_rs);
}


x86 assembly (clang, -O0):
<min_length_rs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  %xmm5,-0x30(%rbp)
mov    %rdi,-0x38(%rbp)
mov    %rsi,-0x40(%rbp)
mov    %rdx,-0x48(%rbp)
mov    %rcx,-0x50(%rbp)
movsd  -0x8(%rbp),%xmm1
subsd  -0x20(%rbp),%xmm1
movaps 0xeb9(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  0xe9d(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    11c8 <min_length_rs+0xb8>
movsd  -0x10(%rbp),%xmm1
subsd  -0x28(%rbp),%xmm1
movaps 0xe92(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  0xe76(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    11c8 <min_length_rs+0xb8>
movsd  -0x18(%rbp),%xmm1
subsd  -0x30(%rbp),%xmm1
movaps 0xe6b(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  0xe4f(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    11c8 <min_length_rs+0xb8>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x58(%rbp)
jmp    1200 <min_length_rs+0xf0>
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm3
movsd  -0x28(%rbp),%xmm4
movsd  -0x30(%rbp),%xmm5
mov    -0x38(%rbp),%rdi
mov    -0x40(%rbp),%rsi
mov    -0x48(%rbp),%rdx
mov    -0x50(%rbp),%rcx
call   1030 <reeds_shepp@plt>
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<min_length_rs>:
movapd %xmm0,%xmm7
subsd  %xmm3,%xmm7
andpd  0xee0(%rip),%xmm7
movsd  0xee8(%rip),%xmm6
ucomisd %xmm7,%xmm6
jbe    115f <min_length_rs+0x4f>
movapd %xmm1,%xmm7
subsd  %xmm4,%xmm7
andpd  0xec2(%rip),%xmm7
ucomisd %xmm7,%xmm6
jbe    115f <min_length_rs+0x4f>
movapd %xmm2,%xmm7
subsd  %xmm5,%xmm7
andpd  0xeac(%rip),%xmm7
ucomisd %xmm7,%xmm6
jbe    115f <min_length_rs+0x4f>
xorpd  %xmm0,%xmm0
ret
jmp    1030 <reeds_shepp@plt>

LLVM IR (-O0):
define double @min_length_rs(double %0, double %1, double %2, double %3, double %4, double %5, i32* %6, double* %7, double* %8, double* %9) {
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca i32*
%18 = alloca double*
%19 = alloca double*
%20 = alloca double*
%21 = alloca double
store double %0, double* %11
store double %1, double* %12
store double %2, double* %13
store double %3, double* %14
store double %4, double* %15
store double %5, double* %16
store i32* %6, i32** %17
store double* %7, double** %18
store double* %8, double** %19
store double* %9, double** %20
%22 = load double, double* %11
%23 = load double, double* %14
%24 = fsub double %22, %23
%25 = call double @llvm.fabs.f64(double %24)
%26 = fcmp olt double %25, 0x3D719799812DEA11
br i1 %26, label %27, label %40
27: ; preds = %10
%28 = load double, double* %12
%29 = load double, double* %15
%30 = fsub double %28, %29
%31 = call double @llvm.fabs.f64(double %30)
%32 = fcmp olt double %31, 0x3D719799812DEA11
br i1 %32, label %33, label %40
33: ; preds = %27
%34 = load double, double* %13
%35 = load double, double* %16
%36 = fsub double %34, %35
%37 = call double @llvm.fabs.f64(double %36)
%38 = fcmp olt double %37, 0x3D719799812DEA11
br i1 %38, label %39, label %40
39: ; preds = %33
store double 0.000000e+00, double* %21
br label %52
40: ; preds = %33, %27, %10
%41 = load double, double* %11
%42 = load double, double* %12
%43 = load double, double* %13
%44 = load double, double* %14
%45 = load double, double* %15
%46 = load double, double* %16
%47 = load i32*, i32** %17
%48 = load double*, double** %18
%49 = load double*, double** %19
%50 = load double*, double** %20
%51 = call double @reeds_shepp(double %41, double %42, double %43, double %44, double %45, double %46, i32* %47, double* %48, double* %49, double* %50)
store double %51, double* %21
br label %52
52: ; preds = %40, %39
%53 = load double, double* %21
ret double %53
}

LLVM IR (-O2):
define double @min_length_rs(double %0, double %1, double %2, double %3, double %4, double %5, i32* %6, double* %7, double* %8, double* %9) {
%11 = fsub double %0, %3
%12 = tail call double @llvm.fabs.f64(double %11)
%13 = fcmp olt double %12, 0x3D719799812DEA11
br i1 %13, label %14, label %22
14: ; preds = %10
%15 = fsub double %1, %4
%16 = tail call double @llvm.fabs.f64(double %15)
%17 = fcmp olt double %16, 0x3D719799812DEA11
br i1 %17, label %18, label %22
18: ; preds = %14
%19 = fsub double %2, %5
%20 = tail call double @llvm.fabs.f64(double %19)
%21 = fcmp olt double %20, 0x3D719799812DEA11
br i1 %21, label %24, label %22
22: ; preds = %18, %14, %10
%23 = tail call double @reeds_shepp(double %0, double %1, double %2, double %3, double %4, double %5, i32* %6, double* %7, double* %8, double* %9)
br label %24
24: ; preds = %18, %22
%25 = phi double [ %23, %22 ], [ 0.000000e+00, %18 ]
ret double %25
}