#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 glsadff1t(double, double *, int const, double, double *);
double glsadf1t(double x, double *c, const int m, const int n, double *d) {
  int i;
  double gamma;
  gamma = -1 / (double)n;
  for (i = 0; i < n; i++)
    x = glsadff1t(x, c, m, gamma, &d[(m + 1) * i]);
  return (x);
}


x86 assembly (clang, -O0):
<glsadf1t>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
cvtsi2sdl -0x18(%rbp),%xmm1
movsd  0xec8(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    1194 <glsadf1t+0x84>
movsd  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
movsd  -0x30(%rbp),%xmm1
mov    -0x20(%rbp),%rdx
mov    -0x14(%rbp),%eax
add    $0x1,%eax
imul   -0x24(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rdx
call   1030 <glsadff1t@plt>
movsd  %xmm0,-0x8(%rbp)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1148 <glsadf1t+0x38>
movsd  -0x8(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<glsadf1t>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x10,%rsp
test   %edx,%edx
jle    116d <glsadf1t+0x5d>
mov    %rcx,%rbx
mov    %esi,%r15d
mov    %rdi,%r14
cvtsi2sd %edx,%xmm1
movsd  0xecb(%rip),%xmm2
divsd  %xmm1,%xmm2
movsd  %xmm2,0x8(%rsp)
movslq %esi,%rax
mov    %edx,%ebp
lea    0x8(,%rax,8),%r12
nopl   0x0(%rax)
mov    %r14,%rdi
mov    %r15d,%esi
movsd  0x8(%rsp),%xmm1
mov    %rbx,%rdx
call   1030 <glsadff1t@plt>
add    %r12,%rbx
add    $0xffffffffffffffff,%rbp
jne    1150 <glsadf1t+0x40>
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define double @glsadf1t(double %0, double* %1, i32 %2, i32 %3, double* %4) {
%6 = alloca double
%7 = alloca double*
%8 = alloca i32
%9 = alloca i32
%10 = alloca double*
%11 = alloca i32
%12 = alloca double
store double %0, double* %6
store double* %1, double** %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store double* %4, double** %10
%13 = load i32, i32* %9
%14 = sitofp i32 %13 to double
%15 = fdiv double -1.000000e+00, %14
store double %15, double* %12
store i32 0, i32* %11
br label %16
16: ; preds = %33, %5
%17 = load i32, i32* %11
%18 = load i32, i32* %9
%19 = icmp slt i32 %17, %18
br i1 %19, label %20, label %36
20: ; preds = %16
%21 = load double, double* %6
%22 = load double*, double** %7
%23 = load i32, i32* %8
%24 = load double, double* %12
%25 = load double*, double** %10
%26 = load i32, i32* %8
%27 = add nsw i32 %26, 1
%28 = load i32, i32* %11
%29 = mul nsw i32 %27, %28
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds double, double* %25, i64 %30
%32 = call double @glsadff1t(double %21, double* %22, i32 %23, double %24, double* %31)
store double %32, double* %6
br label %33
33: ; preds = %20
%34 = load i32, i32* %11
%35 = add nsw i32 %34, 1
store i32 %35, i32* %11
br label %16
36: ; preds = %16
%37 = load double, double* %6
ret double %37
}

LLVM IR (-O2):
define double @glsadf1t(double %0, double* %1, i32 %2, i32 %3, double* %4) {
%6 = sitofp i32 %3 to double
%7 = fdiv double -1.000000e+00, %6
%8 = icmp sgt i32 %3, 0
br i1 %8, label %9, label %21
9: ; preds = %5
%10 = add nsw i32 %2, 1
%11 = sext i32 %10 to i64
%12 = zext i32 %3 to i64
br label %13
13: ; preds = %9, %13
%14 = phi i64 [ 0, %9 ], [ %19, %13 ]
%15 = phi double [ %0, %9 ], [ %18, %13 ]
%16 = mul nsw i64 %14, %11
%17 = getelementptr inbounds double, double* %4, i64 %16
%18 = tail call double @glsadff1t(double %15, double* %1, i32 %2, double %7, double* %17)
%19 = add nuw nsw i64 %14, 1
%20 = icmp eq i64 %19, %12
br i1 %20, label %21, label %13
21: ; preds = %13, %5
%22 = phi double [ %0, %5 ], [ %18, %13 ]
ret double %22
}