#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 */
long double Gamma_Function_Max_Arg();
long double expl(long double);
long double logl(long double);
long double powl(long double, long double);
long double xFactorial(int);
long double xGamma_Function(long double);
long double xLn_Gamma_Function(long double);
long double xSmall_x(long double x, long double nu) {
  long double terms[20];
  long double x_term = -x;
  long double x_power = 1.0L;
  long double sum;
  int i;
  for (i = 0; i < 20; i++) {
    terms[i] = (x_power / xFactorial(i)) / (i + nu);
    x_power *= x_term;
  }
  sum = terms[20 - 1];
  for (i = 20 - 2; i >= 0; i--)
    sum += terms[i];
  if (nu <= Gamma_Function_Max_Arg())
    return powl(x, nu) * sum / xGamma_Function(nu);
  else
    return expl(nu * logl(x) + logl(sum) - xLn_Gamma_Function(nu));
}


x86 assembly (clang, -O0):
<xSmall_x>:
push   %rbp
mov    %rsp,%rbp
sub    $0x210,%rsp
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x20(%rbp)
fstpt  -0x30(%rbp)
fldt   -0x20(%rbp)
fchs
fstpt  -0x180(%rbp)
fld1
fstpt  -0x190(%rbp)
movl   $0x0,-0x1a4(%rbp)
cmpl   $0x14,-0x1a4(%rbp)
jge    121f <xSmall_x+0xaf>
fldt   -0x190(%rbp)
fstpt  -0x1b4(%rbp)
mov    -0x1a4(%rbp),%edi
call   1090 <xFactorial@plt>
fldt   -0x1b4(%rbp)
fdivp  %st,%st(1)
movslq -0x1a4(%rbp),%rax
mov    %eax,%ecx
mov    %ecx,-0x1a8(%rbp)
fildl  -0x1a8(%rbp)
fldt   -0x30(%rbp)
faddp  %st,%st(1)
fdivrp %st,%st(1)
shl    $0x4,%rax
fstpt  -0x170(%rbp,%rax,1)
fldt   -0x180(%rbp)
fldt   -0x190(%rbp)
fmulp  %st,%st(1)
fstpt  -0x190(%rbp)
mov    -0x1a4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1a4(%rbp)
jmp    11a4 <xSmall_x+0x34>
fldt   -0x40(%rbp)
fstpt  -0x1a0(%rbp)
movl   $0x12,-0x1a4(%rbp)
cmpl   $0x0,-0x1a4(%rbp)
jl     1273 <xSmall_x+0x103>
movslq -0x1a4(%rbp),%rax
shl    $0x4,%rax
fldt   -0x170(%rbp,%rax,1)
fldt   -0x1a0(%rbp)
faddp  %st,%st(1)
fstpt  -0x1a0(%rbp)
mov    -0x1a4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x1a4(%rbp)
jmp    1232 <xSmall_x+0xc2>
fldt   -0x30(%rbp)
fstpt  -0x1c0(%rbp)
xor    %eax,%eax
call   1050 <Gamma_Function_Max_Arg@plt>
fldt   -0x1c0(%rbp)
fld    %st(1)
fstp   %st(0)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
jb     12dc <xSmall_x+0x16c>
jmp    129e <xSmall_x+0x12e>
fldt   -0x20(%rbp)
fldt   -0x30(%rbp)
mov    %rsp,%rax
fstpt  0x10(%rax)
fstpt  (%rax)
call   1030 <powl@plt>
fldt   -0x1a0(%rbp)
fmulp  %st,%st(1)
fstpt  -0x1cc(%rbp)
fldt   -0x30(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1070 <xGamma_Function@plt>
fldt   -0x1cc(%rbp)
fdivp  %st,%st(1)
fstpt  -0x10(%rbp)
jmp    1340 <xSmall_x+0x1d0>
fldt   -0x30(%rbp)
fstpt  -0x1e4(%rbp)
fldt   -0x20(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1040 <logl@plt>
fstpt  -0x1f0(%rbp)
fldt   -0x1a0(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1040 <logl@plt>
fldt   -0x1f0(%rbp)
fldt   -0x1e4(%rbp)
fmulp  %st,%st(1)
faddp  %st,%st(1)
fstpt  -0x1d8(%rbp)
fldt   -0x30(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1080 <xLn_Gamma_Function@plt>
fldt   -0x1d8(%rbp)
fsubp  %st,%st(1)
mov    %rsp,%rax
fstpt  (%rax)
call   1060 <expl@plt>
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
add    $0x210,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xSmall_x>:
push   %r14
push   %rbx
sub    $0x1a8,%rsp
fldt   0x1d0(%rsp)
fstpt  0x38(%rsp)
fldt   0x1c0(%rsp)
fld    %st(0)
fstpt  0x54(%rsp)
fchs
fstpt  0x48(%rsp)
fld1
lea    0x60(%rsp),%r14
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
fstpt  0x2c(%rsp)
mov    %ebx,%edi
call   1090 <xFactorial@plt>
fldt   0x2c(%rsp)
fdiv   %st,%st(1)
mov    %ebx,0x44(%rsp)
fldt   0x38(%rsp)
fiaddl 0x44(%rsp)
fdivrp %st,%st(2)
fxch   %st(1)
fstpt  (%r14)
fldt   0x48(%rsp)
fmulp  %st,%st(1)
add    $0x1,%rbx
add    $0x10,%r14
cmp    $0x14,%rbx
jne    11b0 <xSmall_x+0x40>
fstp   %st(0)
fldt   0x190(%rsp)
fldt   0x180(%rsp)
faddp  %st,%st(1)
fldt   0x170(%rsp)
faddp  %st,%st(1)
fldt   0x160(%rsp)
faddp  %st,%st(1)
fldt   0x150(%rsp)
faddp  %st,%st(1)
fldt   0x140(%rsp)
faddp  %st,%st(1)
fldt   0x130(%rsp)
faddp  %st,%st(1)
fldt   0x120(%rsp)
faddp  %st,%st(1)
fldt   0x110(%rsp)
faddp  %st,%st(1)
fldt   0x100(%rsp)
faddp  %st,%st(1)
fldt   0xf0(%rsp)
faddp  %st,%st(1)
fldt   0xe0(%rsp)
faddp  %st,%st(1)
fldt   0xd0(%rsp)
faddp  %st,%st(1)
fldt   0xc0(%rsp)
faddp  %st,%st(1)
fldt   0xb0(%rsp)
faddp  %st,%st(1)
fldt   0xa0(%rsp)
faddp  %st,%st(1)
fldt   0x90(%rsp)
faddp  %st,%st(1)
fldt   0x80(%rsp)
faddp  %st,%st(1)
fldt   0x70(%rsp)
faddp  %st,%st(1)
fldt   0x60(%rsp)
faddp  %st,%st(1)
fstpt  0x2c(%rsp)
xor    %eax,%eax
call   1050 <Gamma_Function_Max_Arg@plt>
fldt   0x38(%rsp)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
jae    12f3 <xSmall_x+0x183>
fldt   0x54(%rsp)
fstpt  (%rsp)
call   1040 <logl@plt>
fstpt  0x48(%rsp)
fldt   0x2c(%rsp)
fstpt  (%rsp)
call   1040 <logl@plt>
fldt   0x38(%rsp)
fldt   0x48(%rsp)
fmul   %st(1),%st
faddp  %st,%st(2)
fxch   %st(1)
fstpt  0x2c(%rsp)
fstpt  (%rsp)
call   1080 <xLn_Gamma_Function@plt>
fldt   0x2c(%rsp)
fsubp  %st,%st(1)
fstpt  (%rsp)
call   1060 <expl@plt>
jmp    1323 <xSmall_x+0x1b3>
fldt   0x38(%rsp)
fstpt  0x10(%rsp)
fldt   0x54(%rsp)
fstpt  (%rsp)
call   1030 <powl@plt>
fldt   0x2c(%rsp)
fmulp  %st,%st(1)
fstpt  0x2c(%rsp)
fldt   0x38(%rsp)
fstpt  (%rsp)
call   1070 <xGamma_Function@plt>
fldt   0x2c(%rsp)
fdivp  %st,%st(1)
add    $0x1a8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define x86_fp80 @xSmall_x(x86_fp80 %0, x86_fp80 %1) {
%3 = alloca x86_fp80
%4 = alloca x86_fp80
%5 = alloca x86_fp80
%6 = alloca [20 x x86_fp80]
%7 = alloca x86_fp80
%8 = alloca x86_fp80
%9 = alloca x86_fp80
%10 = alloca i32
store x86_fp80 %0, x86_fp80* %4
store x86_fp80 %1, x86_fp80* %5
%11 = load x86_fp80, x86_fp80* %4
%12 = fneg x86_fp80 %11
store x86_fp80 %12, x86_fp80* %7
store x86_fp80 0xK3FFF8000000000000000, x86_fp80* %8
store i32 0, i32* %10
br label %13
13: ; preds = %32, %2
%14 = load i32, i32* %10
%15 = icmp slt i32 %14, 20
br i1 %15, label %16, label %35
16: ; preds = %13
%17 = load x86_fp80, x86_fp80* %8
%18 = load i32, i32* %10
%19 = call x86_fp80 @xFactorial(i32 %18)
%20 = fdiv x86_fp80 %17, %19
%21 = load i32, i32* %10
%22 = sitofp i32 %21 to x86_fp80
%23 = load x86_fp80, x86_fp80* %5
%24 = fadd x86_fp80 %22, %23
%25 = fdiv x86_fp80 %20, %24
%26 = load i32, i32* %10
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds [20 x x86_fp80], [20 x x86_fp80]* %6, i64 0, i64 %27
store x86_fp80 %25, x86_fp80* %28
%29 = load x86_fp80, x86_fp80* %7
%30 = load x86_fp80, x86_fp80* %8
%31 = fmul x86_fp80 %30, %29
store x86_fp80 %31, x86_fp80* %8
br label %32
32: ; preds = %16
%33 = load i32, i32* %10
%34 = add nsw i32 %33, 1
store i32 %34, i32* %10
br label %13
35: ; preds = %13
%36 = getelementptr inbounds [20 x x86_fp80], [20 x x86_fp80]* %6, i64 0, i64 19
%37 = load x86_fp80, x86_fp80* %36
store x86_fp80 %37, x86_fp80* %9
store i32 18, i32* %10
br label %38
38: ; preds = %48, %35
%39 = load i32, i32* %10
%40 = icmp sge i32 %39, 0
br i1 %40, label %41, label %51
41: ; preds = %38
%42 = load i32, i32* %10
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds [20 x x86_fp80], [20 x x86_fp80]* %6, i64 0, i64 %43
%45 = load x86_fp80, x86_fp80* %44
%46 = load x86_fp80, x86_fp80* %9
%47 = fadd x86_fp80 %46, %45
store x86_fp80 %47, x86_fp80* %9
br label %48
48: ; preds = %41
%49 = load i32, i32* %10
%50 = add nsw i32 %49, -1
store i32 %50, i32* %10
br label %38
51: ; preds = %38
%52 = load x86_fp80, x86_fp80* %5
%53 = call x86_fp80 (...) @Gamma_Function_Max_Arg()
%54 = fcmp ole x86_fp80 %52, %53
br i1 %54, label %55, label %64
55: ; preds = %51
%56 = load x86_fp80, x86_fp80* %4
%57 = load x86_fp80, x86_fp80* %5
%58 = call x86_fp80 @powl(x86_fp80 %56, x86_fp80 %57)
%59 = load x86_fp80, x86_fp80* %9
%60 = fmul x86_fp80 %58, %59
%61 = load x86_fp80, x86_fp80* %5
%62 = call x86_fp80 @xGamma_Function(x86_fp80 %61)
%63 = fdiv x86_fp80 %60, %62
store x86_fp80 %63, x86_fp80* %3
br label %75
64: ; preds = %51
%65 = load x86_fp80, x86_fp80* %5
%66 = load x86_fp80, x86_fp80* %4
%67 = call x86_fp80 @logl(x86_fp80 %66)
%68 = load x86_fp80, x86_fp80* %9
%69 = call x86_fp80 @logl(x86_fp80 %68)
%70 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %65, x86_fp80 %67, x86_fp80 %69)
%71 = load x86_fp80, x86_fp80* %5
%72 = call x86_fp80 @xLn_Gamma_Function(x86_fp80 %71)
%73 = fsub x86_fp80 %70, %72
%74 = call x86_fp80 @expl(x86_fp80 %73)
store x86_fp80 %74, x86_fp80* %3
br label %75
75: ; preds = %64, %55
%76 = load x86_fp80, x86_fp80* %3
ret x86_fp80 %76
}

LLVM IR (-O2):
define x86_fp80 @xSmall_x(x86_fp80 %0, x86_fp80 %1) {
%3 = alloca [20 x x86_fp80]
%4 = bitcast [20 x x86_fp80]* %3 to i8*
%5 = fneg x86_fp80 %0
br label %6
6: ; preds = %2, %6
%7 = phi i64 [ 0, %2 ], [ %17, %6 ]
%8 = phi x86_fp80 [ 0xK3FFF8000000000000000, %2 ], [ %16, %6 ]
%9 = trunc i64 %7 to i32
%10 = tail call x86_fp80 @xFactorial(i32 %9)
%11 = fdiv x86_fp80 %8, %10
%12 = sitofp i32 %9 to x86_fp80
%13 = fadd x86_fp80 %12, %1
%14 = fdiv x86_fp80 %11, %13
%15 = getelementptr inbounds [20 x x86_fp80], [20 x x86_fp80]* %3, i64 0, i64 %7
store x86_fp80 %14, x86_fp80* %15
%16 = fmul x86_fp80 %8, %5
%17 = add nuw nsw i64 %7, 1
%18 = icmp eq i64 %17, 20
br i1 %18, label %19, label %6
19: ; preds = %6
%20 = getelementptr inbounds [20 x x86_fp80], [20 x x86_fp80]* %3, i64 0, i64 19
%21 = load x86_fp80, x86_fp80* %20
%22 = getelementptr inbounds [20 x x86_fp80], [20 x x86_fp80]* %3, i64 0, i64 18
%23 = load x86_fp80, x86_fp80* %22
%24 = fadd x86_fp80 %21, %23
%25 = getelementptr inbounds [20 x x86_fp80], [20 x x86_fp80]* %3, i64 0, i64 17
%26 = load x86_fp80, x86_fp80* %25
%27 = fadd x86_fp80 %24, %26
%28 = getelementptr inbounds [20 x x86_fp80], [20 x x86_fp80]* %3, i64 0, i64 16
%29 = load x86_fp80, x86_fp80* %28
%30 = fadd x86_fp80 %27, %29
%31 = getelementptr inbounds [20 x x86_fp80], [20 x x86_fp80]* %3, i64 0, i64 15
%32 = load x86_fp80, x86_fp80* %31
%33 = fadd x86_fp80 %30, %32
%34 = getelementptr inbounds [20 x x86_fp80], [20 x x86_fp80]* %3, i64 0, i64 14
%35 = load x86_fp80, x86_fp80* %34
%36 = fadd x86_fp80 %33, %35
%37 = getelementptr inbounds [20 x x86_fp80], [20 x x86_fp80]* %3, i64 0, i64 13
%38 = load x86_fp80, x86_fp80* %37
%39 = fadd x86_fp80 %36, %38
%40 = getelementptr inbounds [20 x x86_fp80], [20 x x86_fp80]* %3, i64 0, i64 12
%41 = load x86_fp80, x86_fp80* %40
%42 = fadd x86_fp80 %39, %41
%43 = getelementptr inbounds [20 x x86_fp80], [20 x x86_fp80]* %3, i64 0, i64 11
%44 = load x86_fp80, x86_fp80* %43
%45 = fadd x86_fp80 %42, %44
%46 = getelementptr inbounds [20 x x86_fp80], [20 x x86_fp80]* %3, i64 0, i64 10
%47 = load x86_fp80, x86_fp80* %46
%48 = fadd x86_fp80 %45, %47
%49 = getelementptr inbounds [20 x x86_fp80], [20 x x86_fp80]* %3, i64 0, i64 9
%50 = load x86_fp80, x86_fp80* %49
%51 = fadd x86_fp80 %48, %50
%52 = getelementptr inbounds [20 x x86_fp80], [20 x x86_fp80]* %3, i64 0, i64 8
%53 = load x86_fp80, x86_fp80* %52
%54 = fadd x86_fp80 %51, %53
%55 = getelementptr inbounds [20 x x86_fp80], [20 x x86_fp80]* %3, i64 0, i64 7
%56 = load x86_fp80, x86_fp80* %55
%57 = fadd x86_fp80 %54, %56
%58 = getelementptr inbounds [20 x x86_fp80], [20 x x86_fp80]* %3, i64 0, i64 6
%59 = load x86_fp80, x86_fp80* %58
%60 = fadd x86_fp80 %57, %59
%61 = getelementptr inbounds [20 x x86_fp80], [20 x x86_fp80]* %3, i64 0, i64 5
%62 = load x86_fp80, x86_fp80* %61
%63 = fadd x86_fp80 %60, %62
%64 = getelementptr inbounds [20 x x86_fp80], [20 x x86_fp80]* %3, i64 0, i64 4
%65 = load x86_fp80, x86_fp80* %64
%66 = fadd x86_fp80 %63, %65
%67 = getelementptr inbounds [20 x x86_fp80], [20 x x86_fp80]* %3, i64 0, i64 3
%68 = load x86_fp80, x86_fp80* %67
%69 = fadd x86_fp80 %66, %68
%70 = getelementptr inbounds [20 x x86_fp80], [20 x x86_fp80]* %3, i64 0, i64 2
%71 = load x86_fp80, x86_fp80* %70
%72 = fadd x86_fp80 %69, %71
%73 = getelementptr inbounds [20 x x86_fp80], [20 x x86_fp80]* %3, i64 0, i64 1
%74 = load x86_fp80, x86_fp80* %73
%75 = fadd x86_fp80 %72, %74
%76 = getelementptr inbounds [20 x x86_fp80], [20 x x86_fp80]* %3, i64 0, i64 0
%77 = load x86_fp80, x86_fp80* %76
%78 = fadd x86_fp80 %75, %77
%79 = tail call x86_fp80 (...) @Gamma_Function_Max_Arg()
%80 = fcmp ult x86_fp80 %79, %1
br i1 %80, label %86, label %81
81: ; preds = %19
%82 = tail call x86_fp80 @powl(x86_fp80 %0, x86_fp80 %1)
%83 = fmul x86_fp80 %78, %82
%84 = tail call x86_fp80 @xGamma_Function(x86_fp80 %1)
%85 = fdiv x86_fp80 %83, %84
br label %93
86: ; preds = %19
%87 = tail call x86_fp80 @logl(x86_fp80 %0)
%88 = tail call x86_fp80 @logl(x86_fp80 %78)
%89 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %1, x86_fp80 %87, x86_fp80 %88)
%90 = tail call x86_fp80 @xLn_Gamma_Function(x86_fp80 %1)
%91 = fsub x86_fp80 %89, %90
%92 = tail call x86_fp80 @expl(x86_fp80 %91)
br label %93
93: ; preds = %86, %81
%94 = phi x86_fp80 [ %85, %81 ], [ %92, %86 ]
ret x86_fp80 %94
}