#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 pow(int, int);
int /*<<< orphan*/ thin(double *, double *, double *, int, int, double **,
                        double **, double **, int *, double);
void thin_old(double *x, double *y, double *w, int n, int k, double **xt,
              double **yt, double **wt, int *nt_ptr, double x_cond) {
  double r;
  double delta;
  r = x[n - 1] - x[0];
  delta = r * pow(n * x_cond, -1. / (k + 1));
  thin(x, y, w, n, k, xt, yt, wt, nt_ptr, delta);
}


x86 assembly (clang, -O0):
<thin_old>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
movsd  %xmm0,-0x30(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x1c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
subsd  (%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
cvtsi2sdl -0x1c(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
cvttsd2si %xmm0,%edi
mov    -0x20(%rbp),%eax
add    $0x1,%eax
cvtsi2sd %eax,%xmm1
movsd  0xe67(%rip),%xmm0
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%esi
call   1040 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x48(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x20(%rbp),%r8d
mov    -0x28(%rbp),%r9
mov    0x10(%rbp),%r11
mov    0x18(%rbp),%r10
mov    0x20(%rbp),%rax
movsd  -0x40(%rbp),%xmm0
mov    %r11,(%rsp)
mov    %r10,0x8(%rsp)
mov    %rax,0x10(%rsp)
call   1030 <thin@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<thin_old>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rdi,%rbx
movslq %ecx,%r14
movsd  -0x8(%rdi,%r14,8),%xmm1
subsd  (%rdi),%xmm1
movsd  %xmm1,(%rsp)
xorps  %xmm1,%xmm1
cvtsi2sd %r14d,%xmm1
mulsd  %xmm0,%xmm1
cvttsd2si %xmm1,%edi
mov    %r9,%r15
mov    %r8d,%r12d
mov    %rdx,%r13
mov    %rsi,%rbp
lea    0x1(%r12),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  0xe8f(%rip),%xmm1
divsd  %xmm0,%xmm1
cvttsd2si %xmm1,%esi
call   1040 <pow@plt>
mulsd  (%rsp),%xmm0
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    %r13,%rdx
mov    %r14d,%ecx
mov    %r12d,%r8d
mov    %r15,%r9
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <thin@plt>

LLVM IR (-O0):
define void @thin_old(double* %0, double* %1, double* %2, i32 %3, i32 %4, double** %5, double** %6, double** %7, i32* %8, double %9) {
%11 = alloca double*
%12 = alloca double*
%13 = alloca double*
%14 = alloca i32
%15 = alloca i32
%16 = alloca double**
%17 = alloca double**
%18 = alloca double**
%19 = alloca i32*
%20 = alloca double
%21 = alloca double
%22 = alloca double
store double* %0, double** %11
store double* %1, double** %12
store double* %2, double** %13
store i32 %3, i32* %14
store i32 %4, i32* %15
store double** %5, double*** %16
store double** %6, double*** %17
store double** %7, double*** %18
store i32* %8, i32** %19
store double %9, double* %20
%23 = load double*, double** %11
%24 = load i32, i32* %14
%25 = sub nsw i32 %24, 1
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds double, double* %23, i64 %26
%28 = load double, double* %27
%29 = load double*, double** %11
%30 = getelementptr inbounds double, double* %29, i64 0
%31 = load double, double* %30
%32 = fsub double %28, %31
store double %32, double* %21
%33 = load double, double* %21
%34 = load i32, i32* %14
%35 = sitofp i32 %34 to double
%36 = load double, double* %20
%37 = fmul double %35, %36
%38 = fptosi double %37 to i32
%39 = load i32, i32* %15
%40 = add nsw i32 %39, 1
%41 = sitofp i32 %40 to double
%42 = fdiv double -1.000000e+00, %41
%43 = fptosi double %42 to i32
%44 = call double @pow(i32 %38, i32 %43)
%45 = fmul double %33, %44
store double %45, double* %22
%46 = load double*, double** %11
%47 = load double*, double** %12
%48 = load double*, double** %13
%49 = load i32, i32* %14
%50 = load i32, i32* %15
%51 = load double**, double*** %16
%52 = load double**, double*** %17
%53 = load double**, double*** %18
%54 = load i32*, i32** %19
%55 = load double, double* %22
%56 = call i32 @thin(double* %46, double* %47, double* %48, i32 %49, i32 %50, double** %51, double** %52, double** %53, i32* %54, double %55)
ret void
}

LLVM IR (-O2):
define void @thin_old(double* %0, double* %1, double* %2, i32 %3, i32 %4, double** %5, double** %6, double** %7, i32* %8, double %9) {
%11 = add nsw i32 %3, -1
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds double, double* %0, i64 %12
%14 = load double, double* %13
%15 = load double, double* %0
%16 = fsub double %14, %15
%17 = sitofp i32 %3 to double
%18 = fmul double %17, %9
%19 = fptosi double %18 to i32
%20 = add nsw i32 %4, 1
%21 = sitofp i32 %20 to double
%22 = fdiv double -1.000000e+00, %21
%23 = fptosi double %22 to i32
%24 = tail call double @pow(i32 %19, i32 %23)
%25 = fmul double %16, %24
%26 = tail call i32 @thin(double* %0, double* %1, double* %2, i32 %3, i32 %4, double** %5, double** %6, double** %7, i32* %8, double %25)
ret void
}