#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 partitionTargets(double *, double *, double *, int *, int, int);
void quicksortTargets(double *x, double *y, double *z, int *ind, int l, int r) {
  int i;
  if (l < r) {
    i = partitionTargets(x, y, z, ind, l, r);
    quicksortTargets(x, y, z, ind, l, i - 1);
    quicksortTargets(x, y, z, ind, i + 1, r);
  }
  return;
}


x86 assembly (clang, -O0):
<quicksortTargets>:
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)
mov    -0x24(%rbp),%eax
cmp    -0x28(%rbp),%eax
jge    11ae <quicksortTargets+0x8e>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x24(%rbp),%r8d
mov    -0x28(%rbp),%r9d
call   1040 <partitionTargets@plt>
mov    %eax,-0x2c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x24(%rbp),%r8d
mov    -0x2c(%rbp),%r9d
sub    $0x1,%r9d
call   1030 <quicksortTargets@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x2c(%rbp),%r8d
add    $0x1,%r8d
mov    -0x28(%rbp),%r9d
call   1030 <quicksortTargets@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quicksortTargets>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
cmp    %r9d,%r8d
jge    1195 <quicksortTargets+0x75>
mov    %r8d,%ebx
mov    %rcx,%r12
mov    %rdx,%r13
mov    %rsi,%rbp
mov    %rdi,%r15
mov    %r9d,0x4(%rsp)
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r15,%rdi
mov    %rbp,%rsi
mov    %r13,%rdx
mov    %r12,%rcx
mov    %ebx,%r8d
mov    0x4(%rsp),%r9d
call   1040 <partitionTargets@plt>
mov    %eax,%r14d
lea    -0x1(%r14),%r9d
mov    %r15,%rdi
mov    %rbp,%rsi
mov    %r13,%rdx
mov    %r12,%rcx
mov    %ebx,%r8d
call   1030 <quicksortTargets@plt>
mov    0x4(%rsp),%r9d
add    $0x1,%r14d
mov    %r14d,%ebx
cmp    %r9d,%r14d
jl     1150 <quicksortTargets+0x30>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @quicksortTargets(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
%13 = 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
%14 = load i32, i32* %11
%15 = load i32, i32* %12
%16 = icmp slt i32 %14, %15
br i1 %16, label %17, label %39
17: ; preds = %6
%18 = load double*, double** %7
%19 = load double*, double** %8
%20 = load double*, double** %9
%21 = load i32*, i32** %10
%22 = load i32, i32* %11
%23 = load i32, i32* %12
%24 = call i32 @partitionTargets(double* %18, double* %19, double* %20, i32* %21, i32 %22, i32 %23)
store i32 %24, i32* %13
%25 = load double*, double** %7
%26 = load double*, double** %8
%27 = load double*, double** %9
%28 = load i32*, i32** %10
%29 = load i32, i32* %11
%30 = load i32, i32* %13
%31 = sub nsw i32 %30, 1
%32 = load double*, double** %7
%33 = load double*, double** %8
%34 = load double*, double** %9
%35 = load i32*, i32** %10
%36 = load i32, i32* %13
%37 = add nsw i32 %36, 1
%38 = load i32, i32* %12
br label %39
39: ; preds = %17, %6
ret void
}

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