#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 */
int /*<<< orphan*/ quicksortTargets(double *, double *, double *, int *,
                                    int /*<<< orphan*/, int);
void sortTargets(double *x, double *y, double *z, int *ind, int numpars,
                 int dflag) {
  if (dflag == 0)
    quicksortTargets(x, y, z, ind, 0, numpars - 1);
  else if (dflag == 1)
    quicksortTargets(y, z, x, ind, 0, numpars - 1);
  else
    quicksortTargets(z, x, y, ind, 0, numpars - 1);
  return;
}


x86 assembly (clang, -O0):
<sortTargets>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    %r9d,-0x28(%rbp)
cmpl   $0x0,-0x28(%rbp)
jne    115f <sortTargets+0x4f>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x24(%rbp),%r9d
sub    $0x1,%r9d
xor    %r8d,%r8d
call   1030 <quicksortTargets@plt>
jmp    11b3 <sortTargets+0xa3>
cmpl   $0x1,-0x28(%rbp)
jne    118e <sortTargets+0x7e>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x8(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x24(%rbp),%r9d
sub    $0x1,%r9d
xor    %r8d,%r8d
call   1030 <quicksortTargets@plt>
jmp    11ae <sortTargets+0x9e>
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x24(%rbp),%r9d
sub    $0x1,%r9d
xor    %r8d,%r8d
call   1030 <quicksortTargets@plt>
jmp    11b3 <sortTargets+0xa3>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sortTargets>:
mov    %r8d,%eax
mov    %rsi,%r8
mov    %rdi,%r10
add    $0xffffffff,%eax
cmp    $0x1,%r9d
je     112f <sortTargets+0x1f>
test   %r9d,%r9d
jne    113a <sortTargets+0x2a>
mov    %r10,%rdi
mov    %r8,%rsi
jmp    1143 <sortTargets+0x33>
mov    %r8,%rdi
mov    %rdx,%rsi
mov    %r10,%rdx
jmp    1143 <sortTargets+0x33>
mov    %rdx,%rdi
mov    %r10,%rsi
mov    %r8,%rdx
xor    %r8d,%r8d
mov    %eax,%r9d
jmp    1030 <quicksortTargets@plt>

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

LLVM IR (-O2):
define void @sortTargets(double* %0, double* %1, double* %2, i32* %3, i32 %4, i32 %5) {
switch i32 %5, label %13 [
i32 0, label %7
i32 1, label %10
]
7: ; preds = %6
%8 = add nsw i32 %4, -1
%9 = tail call i32 @quicksortTargets(double* %0, double* %1, double* %2, i32* %3, i32 0, i32 %8)
br label %16
10: ; preds = %6
%11 = add nsw i32 %4, -1
%12 = tail call i32 @quicksortTargets(double* %1, double* %2, double* %0, i32* %3, i32 0, i32 %11)
br label %16
13: ; preds = %6
%14 = add nsw i32 %4, -1
%15 = tail call i32 @quicksortTargets(double* %2, double* %0, double* %1, i32* %3, i32 0, i32 %14)
br label %16
16: ; preds = %10, %13, %7
ret void
}