#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*/ exit(int);
double log(double);
int /*<<< orphan*/ printf(char *);
double gamma_log(double x) {
  double y, oup, fact, y2, nsum, dsum;
  int i;
  double spi = 0.9189385332046727417803297;
  double pi = 3.1415926535897932384626434;
  double xmax = 171.624e+0;
  double xinf = 1.79e308;
  double eps = 2.22e-16;
  double xinf4 = 1.1567e+077;
  double pnt = 0.6796875e+0;
  double d1 = -5.772156649015328605195174e-1;
  double p1[8] = {4.945235359296727046734888e+0, 2.018112620856775083915565e+2,
                  2.290838373831346393026739e+3, 1.131967205903380828685045e+4,
                  2.855724635671635335736389e+4, 3.848496228443793359990269e+4,
                  2.637748787624195437963534e+4, 7.225813979700288197698961e+3};
  double q1[8] = {6.748212550303777196073036e+1, 1.113332393857199323513008e+3,
                  7.738757056935398733233834e+3, 2.763987074403340708898585e+4,
                  5.499310206226157329794414e+4, 6.161122180066002127833352e+4,
                  3.635127591501940507276287e+4, 8.785536302431013170870835e+3};
  double d2 = 4.227843350984671393993777e-1;
  double p2[8] = {4.974607845568932035012064e+0, 5.424138599891070494101986e+2,
                  1.550693864978364947665077e+4, 1.847932904445632425417223e+5,
                  1.088204769468828767498470e+6, 3.338152967987029735917223e+6,
                  5.106661678927352456275255e+6, 3.074109054850539556250927e+6};
  double q2[8] = {1.830328399370592604055942e+2, 7.765049321445005871323047e+3,
                  1.331903827966074194402448e+5, 1.136705821321969608938755e+6,
                  5.267964117437946917577538e+6, 1.346701454311101692290052e+7,
                  1.782736530353274213975932e+7, 9.533095591844353613395747e+6};
  double d4 = 1.791759469228055000094023e+0;
  double p4[8] = {
      1.474502166059939948905062e+04, 2.426813369486704502836312e+06,
      1.214755574045093227939592e+08, 2.663432449630976949898078e+09,
      2.940378956634553899906876e+10, 1.702665737765398868392998e+11,
      4.926125793377430887588120e+11, 5.606251856223951465078242e+11};
  double q4[8] = {
      2.690530175870899333379843e+03, 6.393885654300092398984238e+05,
      4.135599930241388052042842e+07, 1.120872109616147941376570e+09,
      1.488613728678813811542398e+10, 1.016803586272438228077304e+11,
      3.417476345507377132798597e+11, 4.463158187419713286462081e+11};
  double c[7] = {-1.910444077728e-03,
                 8.4171387781295e-04,
                 -5.952379913043012e-04,
                 7.93650793500350248e-04,
                 -2.777777777777681622553e-03,
                 8.333333333333333331554247e-02,
                 5.7083835261e-03};
  oup = x;
  if (x < 0) {
    printf("Input must be Positive and Real");
    exit(1);
  }
  if (x > xinf) {
    printf("Overflow");
    exit(1);
  }
  if (x <= eps) {
    oup = -log(x);
  }
  if (x > eps && x <= 0.5) {
    y = x;
    nsum = 0.0;
    dsum = 1.0;
    for (i = 0; i < 8; ++i) {
      nsum = nsum * y + p1[i];
      dsum = dsum * y + q1[i];
    }
    oup = -log(y) + (y * (d1 + y * (nsum / dsum)));
  }
  if (x > 0.5 && x <= pnt) {
    y = (x - 0.5) - 0.5;
    nsum = 0.0;
    dsum = 1.0;
    for (i = 0; i < 8; ++i) {
      nsum = nsum * y + p2[i];
      dsum = dsum * y + q2[i];
    }
    oup = -log(x) + (y * (d2 + y * (nsum / dsum)));
  }
  if (x > pnt && x <= 1.5) {
    y = (x - 0.5) - 0.5;
    ;
    nsum = 0.0;
    dsum = 1.0;
    for (i = 0; i < 8; ++i) {
      nsum = nsum * y + p1[i];
      dsum = dsum * y + q1[i];
    }
    oup = (y * (d1 + y * (nsum / dsum)));
  }
  if (x > 1.5 && x <= 4.0) {
    y = x - 2.;
    nsum = 0.0;
    dsum = 1.0;
    for (i = 0; i < 8; ++i) {
      nsum = nsum * y + p2[i];
      dsum = dsum * y + q2[i];
    }
    oup = (y * (d2 + y * (nsum / dsum)));
  }
  if (x > 4.0 && x <= 12.0) {
    y = x - 4.;
    nsum = 0.0;
    dsum = -1.0;
    for (i = 0; i < 8; ++i) {
      nsum = nsum * y + p4[i];
      dsum = dsum * y + q4[i];
    }
    oup = d4 + y * (nsum / dsum);
  }
  if (x > 12.0) {
    oup = 0.0;
    y = x;
    if (y <= xinf4) {
      oup = c[6];
      y2 = y * y;
      for (i = 0; i < 6; i++) {
        oup = oup / y2 + c[i];
      }
    }
    oup /= y;
    fact = log(y);
    oup += spi - 0.5 * fact + y * (fact - 1.0);
  }
  return oup;
}


x86 assembly (clang, -O0):
<gamma_log>:
push   %rbp
mov    %rsp,%rbp
sub    $0x260,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xef0(%rip),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  0xedb(%rip),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  0xec6(%rip),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  0xeb1(%rip),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  0xe9c(%rip),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  0xe87(%rip),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  0xe72(%rip),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  0xe5d(%rip),%xmm0
movsd  %xmm0,-0x80(%rbp)
lea    -0xc0(%rbp),%rdi
lea    0xeca(%rip),%rsi
mov    $0x40,%edx
call   1040 <memcpy@plt>
lea    -0x100(%rbp),%rdi
lea    0xef2(%rip),%rsi
mov    $0x40,%edx
call   1040 <memcpy@plt>
movsd  0xe18(%rip),%xmm0
movsd  %xmm0,-0x108(%rbp)
ff
lea    -0x150(%rbp),%rdi
lea    0xf0a(%rip),%rsi
mov    $0x40,%edx
call   1040 <memcpy@plt>
lea    -0x190(%rbp),%rdi
lea    0xf32(%rip),%rsi
mov    $0x40,%edx
call   1040 <memcpy@plt>
movsd  0xdd0(%rip),%xmm0
movsd  %xmm0,-0x198(%rbp)
ff
lea    -0x1e0(%rbp),%rdi
lea    0xf4a(%rip),%rsi
mov    $0x40,%edx
call   1040 <memcpy@plt>
lea    -0x220(%rbp),%rdi
lea    0xf72(%rip),%rsi
mov    $0x40,%edx
call   1040 <memcpy@plt>
lea    -0x260(%rbp),%rdi
lea    0xf9a(%rip),%rsi
mov    $0x38,%edx
call   1040 <memcpy@plt>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    12ae <gamma_log+0x16e>
lea    0xfa9(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1060 <exit@plt>
movsd  -0x8(%rbp),%xmm0
ucomisd -0x60(%rbp),%xmm0
jbe    12d4 <gamma_log+0x194>
lea    0xfa3(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1060 <exit@plt>
movsd  -0x8(%rbp),%xmm1
movsd  -0x68(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     130e <gamma_log+0x1ce>
movsd  -0x8(%rbp),%xmm0
call   1050 <log@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
ucomisd -0x68(%rbp),%xmm0
jbe    1406 <gamma_log+0x2c6>
movsd  0xd2a(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
jb     1406 <gamma_log+0x2c6>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xd0d(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
movl   $0x0,-0x3c(%rbp)
cmpl   $0x8,-0x3c(%rbp)
jge    13b7 <gamma_log+0x277>
movsd  -0x30(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
movslq -0x3c(%rbp),%rax
movsd  -0xc0(%rbp,%rax,8),%xmm1
ff ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
movslq -0x3c(%rbp),%rax
movsd  -0x100(%rbp,%rax,8),%xmm1
ff ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1357 <gamma_log+0x217>
movsd  -0x10(%rbp),%xmm0
call   1050 <log@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
movsd  -0x10(%rbp),%xmm0
movsd  -0x80(%rbp),%xmm3
movsd  -0x10(%rbp),%xmm2
movsd  -0x30(%rbp),%xmm4
divsd  -0x38(%rbp),%xmm4
mulsd  %xmm4,%xmm2
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xc3d(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1521 <gamma_log+0x3e1>
movsd  -0x8(%rbp),%xmm1
movsd  -0x78(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     1521 <gamma_log+0x3e1>
movsd  -0x8(%rbp),%xmm0
movsd  0xc12(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xc06(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xbf5(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
movl   $0x0,-0x3c(%rbp)
cmpl   $0x8,-0x3c(%rbp)
jge    14cf <gamma_log+0x38f>
movsd  -0x30(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
movslq -0x3c(%rbp),%rax
movsd  -0x150(%rbp,%rax,8),%xmm1
ff ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
movslq -0x3c(%rbp),%rax
movsd  -0x190(%rbp,%rax,8),%xmm1
ff ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    146f <gamma_log+0x32f>
movsd  -0x8(%rbp),%xmm0
call   1050 <log@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
movsd  -0x10(%rbp),%xmm0
movsd  -0x108(%rbp),%xmm3
ff
movsd  -0x10(%rbp),%xmm2
movsd  -0x30(%rbp),%xmm4
divsd  -0x38(%rbp),%xmm4
mulsd  %xmm4,%xmm2
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
ucomisd -0x78(%rbp),%xmm0
jbe    160c <gamma_log+0x4cc>
movsd  0xb27(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
jb     160c <gamma_log+0x4cc>
movsd  -0x8(%rbp),%xmm0
movsd  0xaff(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xaf3(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xae2(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
movl   $0x0,-0x3c(%rbp)
cmpl   $0x8,-0x3c(%rbp)
jge    15e2 <gamma_log+0x4a2>
movsd  -0x30(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
movslq -0x3c(%rbp),%rax
movsd  -0xc0(%rbp,%rax,8),%xmm1
ff ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
movslq -0x3c(%rbp),%rax
movsd  -0x100(%rbp,%rax,8),%xmm1
ff ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1582 <gamma_log+0x442>
movsd  -0x10(%rbp),%xmm0
movsd  -0x80(%rbp),%xmm2
movsd  -0x10(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm3
divsd  -0x38(%rbp),%xmm3
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xa47(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    16f5 <gamma_log+0x5b5>
movsd  0xa3d(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
jb     16f5 <gamma_log+0x5b5>
movsd  -0x8(%rbp),%xmm0
movsd  0xa2d(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0x9fc(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
movl   $0x0,-0x3c(%rbp)
cmpl   $0x8,-0x3c(%rbp)
jge    16c8 <gamma_log+0x588>
movsd  -0x30(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
movslq -0x3c(%rbp),%rax
movsd  -0x150(%rbp,%rax,8),%xmm1
ff ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
movslq -0x3c(%rbp),%rax
movsd  -0x190(%rbp,%rax,8),%xmm1
ff ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1668 <gamma_log+0x528>
movsd  -0x10(%rbp),%xmm0
movsd  -0x108(%rbp),%xmm2
ff
movsd  -0x10(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm3
divsd  -0x38(%rbp),%xmm3
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0x966(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    17d5 <gamma_log+0x695>
movsd  0x964(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
jb     17d5 <gamma_log+0x695>
movsd  -0x8(%rbp),%xmm0
movsd  0x93c(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0x93b(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
movl   $0x0,-0x3c(%rbp)
cmpl   $0x8,-0x3c(%rbp)
jge    17b1 <gamma_log+0x671>
movsd  -0x30(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
movslq -0x3c(%rbp),%rax
movsd  -0x1e0(%rbp,%rax,8),%xmm1
ff ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
movslq -0x3c(%rbp),%rax
movsd  -0x220(%rbp,%rax,8),%xmm1
ff ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1751 <gamma_log+0x611>
movsd  -0x198(%rbp),%xmm1
ff
movsd  -0x10(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm2
divsd  -0x38(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0x896(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    18d2 <gamma_log+0x792>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  -0x70(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     186e <gamma_log+0x72e>
movsd  -0x230(%rbp),%xmm0
ff
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movl   $0x0,-0x3c(%rbp)
cmpl   $0x6,-0x3c(%rbp)
jge    1869 <gamma_log+0x729>
movsd  -0x18(%rbp),%xmm0
divsd  -0x28(%rbp),%xmm0
movslq -0x3c(%rbp),%rax
addsd  -0x260(%rbp,%rax,8),%xmm0
ff ff
movsd  %xmm0,-0x18(%rbp)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1835 <gamma_log+0x6f5>
jmp    186e <gamma_log+0x72e>
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1050 <log@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
movsd  0x7e6(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm2
movsd  0x79c(%rip),%xmm3
subsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x260,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gamma_log>:
sub    $0x38,%rsp
movapd %xmm0,%xmm2
xorpd  %xmm0,%xmm0
ucomisd %xmm2,%xmm0
ja     165b <gamma_log+0x52b>
ucomisd 0xeb2(%rip),%xmm2
ja     1664 <gamma_log+0x534>
movsd  0xeac(%rip),%xmm0
ucomisd %xmm2,%xmm0
movapd %xmm2,%xmm3
movapd %xmm2,0x10(%rsp)
jb     1187 <gamma_log+0x57>
movapd %xmm2,%xmm0
call   1040 <log@plt>
movapd 0x10(%rsp),%xmm2
movapd %xmm0,%xmm3
xorpd  0xf59(%rip),%xmm3
ucomisd 0xe79(%rip),%xmm2
jbe    125c <gamma_log+0x12c>
movsd  0xe73(%rip),%xmm0
ucomisd %xmm2,%xmm0
jb     125c <gamma_log+0x12c>
xorpd  %xmm1,%xmm1
mulsd  %xmm2,%xmm1
addsd  0xe61(%rip),%xmm1
movsd  0xe61(%rip),%xmm0
addsd  %xmm2,%xmm0
unpcklpd %xmm0,%xmm1
movapd %xmm2,%xmm0
unpcklpd %xmm2,%xmm0
mulpd  %xmm0,%xmm1
addpd  0xf15(%rip),%xmm1
mulpd  %xmm0,%xmm1
addpd  0xf19(%rip),%xmm1
mulpd  %xmm0,%xmm1
addpd  0xf1d(%rip),%xmm1
mulpd  %xmm0,%xmm1
addpd  0xf21(%rip),%xmm1
mulpd  %xmm0,%xmm1
addpd  0xf25(%rip),%xmm1
mulpd  %xmm0,%xmm1
addpd  0xf29(%rip),%xmm1
mulpd  %xmm0,%xmm1
addpd  0xf2d(%rip),%xmm1
movapd %xmm1,(%rsp)
movapd %xmm2,%xmm0
call   1040 <log@plt>
movapd (%rsp),%xmm3
movapd 0x10(%rsp),%xmm2
movapd %xmm3,%xmm1
unpckhpd %xmm3,%xmm1
divsd  %xmm1,%xmm3
mulsd  %xmm2,%xmm3
addsd  0xdd4(%rip),%xmm3
mulsd  %xmm2,%xmm3
subsd  %xmm0,%xmm3
ucomisd 0xdac(%rip),%xmm2
jbe    1351 <gamma_log+0x221>
movsd  0xdbe(%rip),%xmm0
ucomisd %xmm2,%xmm0
jb     1351 <gamma_log+0x221>
movsd  0xdb4(%rip),%xmm0
movapd %xmm2,%xmm1
addsd  %xmm0,%xmm1
addsd  %xmm0,%xmm1
movapd %xmm1,0x20(%rsp)
xorpd  %xmm3,%xmm3
mulsd  %xmm1,%xmm3
addsd  0xd9a(%rip),%xmm3
movsd  0xd9a(%rip),%xmm0
addsd  %xmm1,%xmm0
unpcklpd %xmm0,%xmm3
movapd %xmm1,%xmm0
unpcklpd %xmm1,%xmm0
mulpd  %xmm0,%xmm3
addpd  0xe96(%rip),%xmm3
mulpd  %xmm0,%xmm3
addpd  0xe9a(%rip),%xmm3
mulpd  %xmm0,%xmm3
addpd  0xe9e(%rip),%xmm3
mulpd  %xmm0,%xmm3
addpd  0xea2(%rip),%xmm3
mulpd  %xmm0,%xmm3
addpd  0xea6(%rip),%xmm3
mulpd  %xmm0,%xmm3
addpd  0xeaa(%rip),%xmm3
mulpd  %xmm0,%xmm3
addpd  0xeae(%rip),%xmm3
movapd %xmm3,(%rsp)
movapd %xmm2,%xmm0
call   1040 <log@plt>
movapd (%rsp),%xmm3
movapd 0x10(%rsp),%xmm2
movapd %xmm3,%xmm1
unpckhpd %xmm3,%xmm1
divsd  %xmm1,%xmm3
movapd 0x20(%rsp),%xmm1
mulsd  %xmm1,%xmm3
addsd  0xd07(%rip),%xmm3
mulsd  %xmm1,%xmm3
subsd  %xmm0,%xmm3
ucomisd 0xcd7(%rip),%xmm2
jbe    141d <gamma_log+0x2ed>
movsd  0xcf1(%rip),%xmm0
ucomisd %xmm2,%xmm0
jb     141d <gamma_log+0x2ed>
movsd  0xcbf(%rip),%xmm1
movapd %xmm2,%xmm0
addsd  %xmm1,%xmm0
addsd  %xmm1,%xmm0
xorpd  %xmm3,%xmm3
mulsd  %xmm0,%xmm3
addsd  0xc83(%rip),%xmm3
movsd  0xc83(%rip),%xmm1
addsd  %xmm0,%xmm1
unpcklpd %xmm1,%xmm3
movapd %xmm0,%xmm1
unpcklpd %xmm0,%xmm1
mulpd  %xmm1,%xmm3
addpd  0xd37(%rip),%xmm3
mulpd  %xmm1,%xmm3
addpd  0xd3b(%rip),%xmm3
mulpd  %xmm1,%xmm3
addpd  0xd3f(%rip),%xmm3
mulpd  %xmm1,%xmm3
addpd  0xd43(%rip),%xmm3
mulpd  %xmm1,%xmm3
addpd  0xd47(%rip),%xmm3
mulpd  %xmm1,%xmm3
addpd  0xd4b(%rip),%xmm3
mulpd  %xmm1,%xmm3
addpd  0xd4f(%rip),%xmm3
movapd %xmm3,%xmm1
unpckhpd %xmm3,%xmm1
divsd  %xmm1,%xmm3
mulsd  %xmm0,%xmm3
addsd  0xc0f(%rip),%xmm3
mulsd  %xmm0,%xmm3
ucomisd 0xc33(%rip),%xmm2
jbe    14e1 <gamma_log+0x3b1>
movsd  0xc2d(%rip),%xmm0
ucomisd %xmm2,%xmm0
jb     14e1 <gamma_log+0x3b1>
movsd  0xc23(%rip),%xmm0
addsd  %xmm2,%xmm0
xorpd  %xmm3,%xmm3
mulsd  %xmm0,%xmm3
addsd  0xbe7(%rip),%xmm3
movsd  0xbe7(%rip),%xmm1
addsd  %xmm0,%xmm1
unpcklpd %xmm1,%xmm3
movapd %xmm0,%xmm1
unpcklpd %xmm0,%xmm1
mulpd  %xmm1,%xmm3
addpd  0xce3(%rip),%xmm3
mulpd  %xmm1,%xmm3
addpd  0xce7(%rip),%xmm3
mulpd  %xmm1,%xmm3
addpd  0xceb(%rip),%xmm3
mulpd  %xmm1,%xmm3
addpd  0xcef(%rip),%xmm3
mulpd  %xmm1,%xmm3
addpd  0xcf3(%rip),%xmm3
mulpd  %xmm1,%xmm3
addpd  0xcf7(%rip),%xmm3
mulpd  %xmm1,%xmm3
addpd  0xcfb(%rip),%xmm3
movapd %xmm3,%xmm1
unpckhpd %xmm3,%xmm1
divsd  %xmm1,%xmm3
mulsd  %xmm0,%xmm3
addsd  0xb73(%rip),%xmm3
mulsd  %xmm0,%xmm3
ucomisd 0xb77(%rip),%xmm2
jbe    1599 <gamma_log+0x469>
movsd  0xb79(%rip),%xmm0
ucomisd %xmm2,%xmm0
jb     1599 <gamma_log+0x469>
movsd  0xb6f(%rip),%xmm0
addsd  %xmm2,%xmm0
movapd %xmm0,%xmm1
xorpd  %xmm3,%xmm3
movhpd 0xb63(%rip),%xmm3
unpcklpd %xmm0,%xmm1
mulpd  %xmm1,%xmm3
addpd  0xca3(%rip),%xmm3
mulpd  %xmm1,%xmm3
addpd  0xca7(%rip),%xmm3
mulpd  %xmm1,%xmm3
addpd  0xcab(%rip),%xmm3
mulpd  %xmm1,%xmm3
addpd  0xcaf(%rip),%xmm3
mulpd  %xmm1,%xmm3
addpd  0xcb3(%rip),%xmm3
mulpd  %xmm1,%xmm3
addpd  0xcb7(%rip),%xmm3
mulpd  %xmm1,%xmm3
addpd  0xcbb(%rip),%xmm3
mulpd  %xmm1,%xmm3
addpd  0xcbf(%rip),%xmm3
movapd %xmm3,%xmm1
unpckhpd %xmm3,%xmm1
divsd  %xmm1,%xmm3
mulsd  %xmm0,%xmm3
addsd  0xaef(%rip),%xmm3
ucomisd 0xacf(%rip),%xmm2
jbe    1652 <gamma_log+0x522>
xorpd  %xmm1,%xmm1
movsd  0xadd(%rip),%xmm0
ucomisd %xmm2,%xmm0
jb     1611 <gamma_log+0x4e1>
movapd %xmm2,%xmm0
mulsd  %xmm2,%xmm0
movsd  0xacf(%rip),%xmm1
divsd  %xmm0,%xmm1
addsd  0xacb(%rip),%xmm1
divsd  %xmm0,%xmm1
addsd  0xac7(%rip),%xmm1
divsd  %xmm0,%xmm1
addsd  0xac3(%rip),%xmm1
divsd  %xmm0,%xmm1
addsd  0xabf(%rip),%xmm1
divsd  %xmm0,%xmm1
addsd  0xabb(%rip),%xmm1
divsd  %xmm0,%xmm1
addsd  0xab7(%rip),%xmm1
divsd  %xmm2,%xmm1
movsd  %xmm1,(%rsp)
movapd %xmm2,%xmm0
call   1040 <log@plt>
movapd %xmm0,%xmm3
movsd  0xa09(%rip),%xmm0
mulsd  %xmm3,%xmm0
addsd  0xa95(%rip),%xmm0
addsd  0xa3d(%rip),%xmm3
mulsd  0x10(%rsp),%xmm3
addsd  %xmm0,%xmm3
addsd  (%rsp),%xmm3
movapd %xmm3,%xmm0
add    $0x38,%rsp
ret
lea    0xbee(%rip),%rdi
jmp    166b <gamma_log+0x53b>
lea    0xc05(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@__const.gamma_log.p1 = [8 x double] [double 0x4013C7EBC72CCF1B, double 0x406939F5DBE7CF07, double 0x40A1E5AD3F55B6E9, double 0x40C61BD60607C998, double 0x40DBE34FC44EF5F9, double 0x40E2CA9ECB08BBCC, double 0x40D9C25F395D45EC, double 0x40BC39D060F94058]
@__const.gamma_log.q1 = [8 x double] [double 0x4050DEDB24ED0759, double 0x409165545F0E2840, double 0x40BE3AC1CE7BBABF, double 0x40DAFDF7BA452EAB, double 0x40EADA2344181374, double 0x40EE156718FDB2A1, double 0x40E1BFE8D44BBC1A, double 0x40C128C4A58EDCFC]
@__const.gamma_log.p2 = [8 x double] [double 0x4013E5FF995C9307, double 0x4080F34F95D372B4, double 0x40CE497825AD1596, double 0x41068ECA52D49963, double 0x41309ACCC4FBE8BF, double 0x414977D47BE6FFBE, double 0x41537AF96B738BB6, double 0x4147741E870557AD]
@__const.gamma_log.q2 = [8 x double] [double 0x4066E10D0656F583, double 0x40BE550CA054894B, double 0x410042330FF7AAEF, double 0x41315841D2422817, double 0x4154187F07841A73, double 0x4169AFB0D1612A5B, double 0x4171006254DB4526, double 0x41622ED4F2F06392]
@__const.gamma_log.p4 = [8 x double] [double 0x40CCCC82C5C64704, double 0x414283DEAF4B5720, double 0x419CF647959E37B1, double 0x41E3D818203430F7, double 0x421B6268E3F961D5, double 0x4243D256DDE8451B, double 0x425CAC7FDC026F8F, double 0x426050FBAE6ACCA5]
@__const.gamma_log.q4 = [8 x double] [double 0x40A5050F73363548, double 0x4123833921800ACC, double 0x4183B856FA6B57F8, double 0x41D0B3C9AB676EF8, double 0x420BBA436E364E1B, double 0x4237AC9F24E33E6B, double 0x4253E46FC45DAF37, double 0x4259FA9FBBBD7E2A]
@__const.gamma_log.c = [7 x double] [double 0xBF5F4CFBB56B5FF7, double 0x3F4B94CEC9F537D1, double 0xBF438137DA5DD682, double 0x3F4A01A019EC73CF, double 0xBF66C16C16C16B39, double 0x3FB5555555555555, double 0x3F7761AC88EC07D7]
@.str = [32 x i8] c"Input must be Positive and Real\00"
@.str.1 = [9 x i8] c"Overflow\00"
define double @gamma_log(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca i32
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca [8 x double]
%19 = alloca [8 x double]
%20 = alloca double
%21 = alloca [8 x double]
%22 = alloca [8 x double]
%23 = alloca double
%24 = alloca [8 x double]
%25 = alloca [8 x double]
%26 = alloca [7 x double]
store double %0, double* %2
store double 0x3FED67F1C864BEB5, double* %10
store double 0x400921FB54442D18, double* %11
store double 1.716240e+02, double* %12
store double 1.790000e+308, double* %13
store double 2.220000e-16, double* %14
store double 1.156700e+77, double* %15
store double 0x3FE5C00000000000, double* %16
store double 0xBFE2788CFC6FB619, double* %17
%27 = bitcast [8 x double]* %18 to i8*
%28 = bitcast [8 x double]* %19 to i8*
store double 0x3FDB0EE6072093CE, double* %20
%29 = bitcast [8 x double]* %21 to i8*
%30 = bitcast [8 x double]* %22 to i8*
store double 0x3FFCAB0BFA2A2002, double* %23
%31 = bitcast [8 x double]* %24 to i8*
%32 = bitcast [8 x double]* %25 to i8*
%33 = bitcast [7 x double]* %26 to i8*
%34 = load double, double* %2
store double %34, double* %4
%35 = load double, double* %2
%36 = fcmp olt double %35, 0.000000e+00
br i1 %36, label %37, label %40
37: ; preds = %1
%38 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%39 = call i32 @exit(i32 1)
unreachable
40: ; preds = %1
%41 = load double, double* %2
%42 = load double, double* %13
%43 = fcmp ogt double %41, %42
br i1 %43, label %44, label %47
44: ; preds = %40
%45 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%46 = call i32 @exit(i32 1)
unreachable
47: ; preds = %40
%48 = load double, double* %2
%49 = load double, double* %14
%50 = fcmp ole double %48, %49
br i1 %50, label %51, label %55
51: ; preds = %47
%52 = load double, double* %2
%53 = call double @log(double %52)
%54 = fneg double %53
store double %54, double* %4
br label %55
55: ; preds = %51, %47
%56 = load double, double* %2
%57 = load double, double* %14
%58 = fcmp ogt double %56, %57
br i1 %58, label %59, label %97
59: ; preds = %55
%60 = load double, double* %2
%61 = fcmp ole double %60, 5.000000e-01
br i1 %61, label %62, label %97
62: ; preds = %59
%63 = load double, double* %2
store double %63, double* %3
store double 0.000000e+00, double* %7
store double 1.000000e+00, double* %8
store i32 0, i32* %9
br label %64
64: ; preds = %82, %62
%65 = load i32, i32* %9
%66 = icmp slt i32 %65, 8
br i1 %66, label %67, label %85
67: ; preds = %64
%68 = load double, double* %7
%69 = load double, double* %3
%70 = load i32, i32* %9
%71 = sext i32 %70 to i64
%72 = getelementptr inbounds [8 x double], [8 x double]* %18, i64 0, i64 %71
%73 = load double, double* %72
%74 = call double @llvm.fmuladd.f64(double %68, double %69, double %73)
store double %74, double* %7
%75 = load double, double* %8
%76 = load double, double* %3
%77 = load i32, i32* %9
%78 = sext i32 %77 to i64
%79 = getelementptr inbounds [8 x double], [8 x double]* %19, i64 0, i64 %78
%80 = load double, double* %79
%81 = call double @llvm.fmuladd.f64(double %75, double %76, double %80)
store double %81, double* %8
br label %82
82: ; preds = %67
%83 = load i32, i32* %9
%84 = add nsw i32 %83, 1
store i32 %84, i32* %9
br label %64
85: ; preds = %64
%86 = load double, double* %3
%87 = call double @log(double %86)
%88 = fneg double %87
%89 = load double, double* %3
%90 = load double, double* %17
%91 = load double, double* %3
%92 = load double, double* %7
%93 = load double, double* %8
%94 = fdiv double %92, %93
%95 = call double @llvm.fmuladd.f64(double %91, double %94, double %90)
%96 = call double @llvm.fmuladd.f64(double %89, double %95, double %88)
store double %96, double* %4
br label %97
97: ; preds = %85, %59, %55
%98 = load double, double* %2
%99 = fcmp ogt double %98, 5.000000e-01
br i1 %99, label %100, label %141
100: ; preds = %97
%101 = load double, double* %2
%102 = load double, double* %16
%103 = fcmp ole double %101, %102
br i1 %103, label %104, label %141
104: ; preds = %100
%105 = load double, double* %2
%106 = fsub double %105, 5.000000e-01
%107 = fsub double %106, 5.000000e-01
store double %107, double* %3
store double 0.000000e+00, double* %7
store double 1.000000e+00, double* %8
store i32 0, i32* %9
br label %108
108: ; preds = %126, %104
%109 = load i32, i32* %9
%110 = icmp slt i32 %109, 8
br i1 %110, label %111, label %129
111: ; preds = %108
%112 = load double, double* %7
%113 = load double, double* %3
%114 = load i32, i32* %9
%115 = sext i32 %114 to i64
%116 = getelementptr inbounds [8 x double], [8 x double]* %21, i64 0, i64 %115
%117 = load double, double* %116
%118 = call double @llvm.fmuladd.f64(double %112, double %113, double %117)
store double %118, double* %7
%119 = load double, double* %8
%120 = load double, double* %3
%121 = load i32, i32* %9
%122 = sext i32 %121 to i64
%123 = getelementptr inbounds [8 x double], [8 x double]* %22, i64 0, i64 %122
%124 = load double, double* %123
%125 = call double @llvm.fmuladd.f64(double %119, double %120, double %124)
store double %125, double* %8
br label %126
126: ; preds = %111
%127 = load i32, i32* %9
%128 = add nsw i32 %127, 1
store i32 %128, i32* %9
br label %108
129: ; preds = %108
%130 = load double, double* %2
%131 = call double @log(double %130)
%132 = fneg double %131
%133 = load double, double* %3
%134 = load double, double* %20
%135 = load double, double* %3
%136 = load double, double* %7
%137 = load double, double* %8
%138 = fdiv double %136, %137
%139 = call double @llvm.fmuladd.f64(double %135, double %138, double %134)
%140 = call double @llvm.fmuladd.f64(double %133, double %139, double %132)
store double %140, double* %4
br label %141
141: ; preds = %129, %100, %97
%142 = load double, double* %2
%143 = load double, double* %16
%144 = fcmp ogt double %142, %143
br i1 %144, label %145, label %182
145: ; preds = %141
%146 = load double, double* %2
%147 = fcmp ole double %146, 1.500000e+00
br i1 %147, label %148, label %182
148: ; preds = %145
%149 = load double, double* %2
%150 = fsub double %149, 5.000000e-01
%151 = fsub double %150, 5.000000e-01
store double %151, double* %3
store double 0.000000e+00, double* %7
store double 1.000000e+00, double* %8
store i32 0, i32* %9
br label %152
152: ; preds = %170, %148
%153 = load i32, i32* %9
%154 = icmp slt i32 %153, 8
br i1 %154, label %155, label %173
155: ; preds = %152
%156 = load double, double* %7
%157 = load double, double* %3
%158 = load i32, i32* %9
%159 = sext i32 %158 to i64
%160 = getelementptr inbounds [8 x double], [8 x double]* %18, i64 0, i64 %159
%161 = load double, double* %160
%162 = call double @llvm.fmuladd.f64(double %156, double %157, double %161)
store double %162, double* %7
%163 = load double, double* %8
%164 = load double, double* %3
%165 = load i32, i32* %9
%166 = sext i32 %165 to i64
%167 = getelementptr inbounds [8 x double], [8 x double]* %19, i64 0, i64 %166
%168 = load double, double* %167
%169 = call double @llvm.fmuladd.f64(double %163, double %164, double %168)
store double %169, double* %8
br label %170
170: ; preds = %155
%171 = load i32, i32* %9
%172 = add nsw i32 %171, 1
store i32 %172, i32* %9
br label %152
173: ; preds = %152
%174 = load double, double* %3
%175 = load double, double* %17
%176 = load double, double* %3
%177 = load double, double* %7
%178 = load double, double* %8
%179 = fdiv double %177, %178
%180 = call double @llvm.fmuladd.f64(double %176, double %179, double %175)
%181 = fmul double %174, %180
store double %181, double* %4
br label %182
182: ; preds = %173, %145, %141
%183 = load double, double* %2
%184 = fcmp ogt double %183, 1.500000e+00
br i1 %184, label %185, label %221
185: ; preds = %182
%186 = load double, double* %2
%187 = fcmp ole double %186, 4.000000e+00
br i1 %187, label %188, label %221
188: ; preds = %185
%189 = load double, double* %2
%190 = fsub double %189, 2.000000e+00
store double %190, double* %3
store double 0.000000e+00, double* %7
store double 1.000000e+00, double* %8
store i32 0, i32* %9
br label %191
191: ; preds = %209, %188
%192 = load i32, i32* %9
%193 = icmp slt i32 %192, 8
br i1 %193, label %194, label %212
194: ; preds = %191
%195 = load double, double* %7
%196 = load double, double* %3
%197 = load i32, i32* %9
%198 = sext i32 %197 to i64
%199 = getelementptr inbounds [8 x double], [8 x double]* %21, i64 0, i64 %198
%200 = load double, double* %199
%201 = call double @llvm.fmuladd.f64(double %195, double %196, double %200)
store double %201, double* %7
%202 = load double, double* %8
%203 = load double, double* %3
%204 = load i32, i32* %9
%205 = sext i32 %204 to i64
%206 = getelementptr inbounds [8 x double], [8 x double]* %22, i64 0, i64 %205
%207 = load double, double* %206
%208 = call double @llvm.fmuladd.f64(double %202, double %203, double %207)
store double %208, double* %8
br label %209
209: ; preds = %194
%210 = load i32, i32* %9
%211 = add nsw i32 %210, 1
store i32 %211, i32* %9
br label %191
212: ; preds = %191
%213 = load double, double* %3
%214 = load double, double* %20
%215 = load double, double* %3
%216 = load double, double* %7
%217 = load double, double* %8
%218 = fdiv double %216, %217
%219 = call double @llvm.fmuladd.f64(double %215, double %218, double %214)
%220 = fmul double %213, %219
store double %220, double* %4
br label %221
221: ; preds = %212, %185, %182
%222 = load double, double* %2
%223 = fcmp ogt double %222, 4.000000e+00
br i1 %223, label %224, label %258
224: ; preds = %221
%225 = load double, double* %2
%226 = fcmp ole double %225, 1.200000e+01
br i1 %226, label %227, label %258
227: ; preds = %224
%228 = load double, double* %2
%229 = fsub double %228, 4.000000e+00
store double %229, double* %3
store double 0.000000e+00, double* %7
store double -1.000000e+00, double* %8
store i32 0, i32* %9
br label %230
230: ; preds = %248, %227
%231 = load i32, i32* %9
%232 = icmp slt i32 %231, 8
br i1 %232, label %233, label %251
233: ; preds = %230
%234 = load double, double* %7
%235 = load double, double* %3
%236 = load i32, i32* %9
%237 = sext i32 %236 to i64
%238 = getelementptr inbounds [8 x double], [8 x double]* %24, i64 0, i64 %237
%239 = load double, double* %238
%240 = call double @llvm.fmuladd.f64(double %234, double %235, double %239)
store double %240, double* %7
%241 = load double, double* %8
%242 = load double, double* %3
%243 = load i32, i32* %9
%244 = sext i32 %243 to i64
%245 = getelementptr inbounds [8 x double], [8 x double]* %25, i64 0, i64 %244
%246 = load double, double* %245
%247 = call double @llvm.fmuladd.f64(double %241, double %242, double %246)
store double %247, double* %8
br label %248
248: ; preds = %233
%249 = load i32, i32* %9
%250 = add nsw i32 %249, 1
store i32 %250, i32* %9
br label %230
251: ; preds = %230
%252 = load double, double* %23
%253 = load double, double* %3
%254 = load double, double* %7
%255 = load double, double* %8
%256 = fdiv double %254, %255
%257 = call double @llvm.fmuladd.f64(double %253, double %256, double %252)
store double %257, double* %4
br label %258
258: ; preds = %251, %224, %221
%259 = load double, double* %2
%260 = fcmp ogt double %259, 1.200000e+01
br i1 %260, label %261, label %303
261: ; preds = %258
store double 0.000000e+00, double* %4
%262 = load double, double* %2
store double %262, double* %3
%263 = load double, double* %3
%264 = load double, double* %15
%265 = fcmp ole double %263, %264
br i1 %265, label %266, label %288
266: ; preds = %261
%267 = getelementptr inbounds [7 x double], [7 x double]* %26, i64 0, i64 6
%268 = load double, double* %267
store double %268, double* %4
%269 = load double, double* %3
%270 = load double, double* %3
%271 = fmul double %269, %270
store double %271, double* %6
store i32 0, i32* %9
br label %272
272: ; preds = %284, %266
%273 = load i32, i32* %9
%274 = icmp slt i32 %273, 6
br i1 %274, label %275, label %287
275: ; preds = %272
%276 = load double, double* %4
%277 = load double, double* %6
%278 = fdiv double %276, %277
%279 = load i32, i32* %9
%280 = sext i32 %279 to i64
%281 = getelementptr inbounds [7 x double], [7 x double]* %26, i64 0, i64 %280
%282 = load double, double* %281
%283 = fadd double %278, %282
store double %283, double* %4
br label %284
284: ; preds = %275
%285 = load i32, i32* %9
%286 = add nsw i32 %285, 1
store i32 %286, i32* %9
br label %272
287: ; preds = %272
br label %288
288: ; preds = %287, %261
%289 = load double, double* %3
%290 = load double, double* %4
%291 = fdiv double %290, %289
store double %291, double* %4
%292 = load double, double* %3
%293 = call double @log(double %292)
store double %293, double* %5
%294 = load double, double* %10
%295 = load double, double* %5
%296 = call double @llvm.fmuladd.f64(double -5.000000e-01, double %295, double %294)
%297 = load double, double* %3
%298 = load double, double* %5
%299 = fsub double %298, 1.000000e+00
%300 = call double @llvm.fmuladd.f64(double %297, double %299, double %296)
%301 = load double, double* %4
%302 = fadd double %301, %300
store double %302, double* %4
br label %303
303: ; preds = %288, %258
%304 = load double, double* %4
ret double %304
}

LLVM IR (-O2):
@.str = [32 x i8] c"Input must be Positive and Real\00"
@.str.1 = [9 x i8] c"Overflow\00"
define double @gamma_log(double %0) {
%2 = fcmp olt double %0, 0.000000e+00
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @exit(i32 1)
unreachable
6: ; preds = %1
%7 = fcmp ogt double %0, 1.790000e+308
br i1 %7, label %8, label %11
8: ; preds = %6
%9 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%10 = tail call i32 @exit(i32 1)
unreachable
11: ; preds = %6
%12 = fcmp ugt double %0, 2.220000e-16
br i1 %12, label %16, label %13
13: ; preds = %11
%14 = tail call double @log(double %0)
%15 = fneg double %14
br label %16
16: ; preds = %13, %11
%17 = phi double [ %15, %13 ], [ %0, %11 ]
%18 = fcmp ogt double %0, 2.220000e-16
%19 = fcmp ole double %0, 5.000000e-01
%20 = and i1 %18, %19
br i1 %20, label %21, label %42
21: ; preds = %16
%22 = tail call double @llvm.fmuladd.f64(double %0, double 0.000000e+00, double 0x4013C7EBC72CCF1B)
%23 = fadd double %0, 0x4050DEDB24ED0759
%24 = insertelement <2 x double> poison, double %22, i64 0
%25 = insertelement <2 x double> %24, double %23, i64 1
%26 = insertelement <2 x double> poison, double %0, i64 0
%27 = shufflevector <2 x double> %26, <2 x double> poison, <2 x i32> zeroinitializer
%28 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %25, <2 x double> %27, <2 x double> <double 0x406939F5DBE7CF07, double 0x409165545F0E2840>)
%29 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %28, <2 x double> %27, <2 x double> <double 0x40A1E5AD3F55B6E9, double 0x40BE3AC1CE7BBABF>)
%30 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %29, <2 x double> %27, <2 x double> <double 0x40C61BD60607C998, double 0x40DAFDF7BA452EAB>)
%31 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %30, <2 x double> %27, <2 x double> <double 0x40DBE34FC44EF5F9, double 0x40EADA2344181374>)
%32 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %31, <2 x double> %27, <2 x double> <double 0x40E2CA9ECB08BBCC, double 0x40EE156718FDB2A1>)
%33 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %32, <2 x double> %27, <2 x double> <double 0x40D9C25F395D45EC, double 0x40E1BFE8D44BBC1A>)
%34 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %33, <2 x double> %27, <2 x double> <double 0x40BC39D060F94058, double 0x40C128C4A58EDCFC>)
%35 = tail call double @log(double %0)
%36 = fneg double %35
%37 = extractelement <2 x double> %34, i64 0
%38 = extractelement <2 x double> %34, i64 1
%39 = fdiv double %37, %38
%40 = tail call double @llvm.fmuladd.f64(double %0, double %39, double 0xBFE2788CFC6FB619)
%41 = tail call double @llvm.fmuladd.f64(double %0, double %40, double %36)
br label %42
42: ; preds = %21, %16
%43 = phi double [ %41, %21 ], [ %17, %16 ]
%44 = fcmp ule double %0, 5.000000e-01
%45 = fcmp ugt double %0, 0x3FE5C00000000000
%46 = or i1 %44, %45
br i1 %46, label %70, label %47
47: ; preds = %42
%48 = fadd double %0, -5.000000e-01
%49 = fadd double %48, -5.000000e-01
%50 = tail call double @llvm.fmuladd.f64(double %49, double 0.000000e+00, double 0x4013E5FF995C9307)
%51 = fadd double %49, 0x4066E10D0656F583
%52 = insertelement <2 x double> poison, double %50, i64 0
%53 = insertelement <2 x double> %52, double %51, i64 1
%54 = insertelement <2 x double> poison, double %49, i64 0
%55 = shufflevector <2 x double> %54, <2 x double> poison, <2 x i32> zeroinitializer
%56 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %53, <2 x double> %55, <2 x double> <double 0x4080F34F95D372B4, double 0x40BE550CA054894B>)
%57 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %56, <2 x double> %55, <2 x double> <double 0x40CE497825AD1596, double 0x410042330FF7AAEF>)
%58 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %57, <2 x double> %55, <2 x double> <double 0x41068ECA52D49963, double 0x41315841D2422817>)
%59 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %58, <2 x double> %55, <2 x double> <double 0x41309ACCC4FBE8BF, double 0x4154187F07841A73>)
%60 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %59, <2 x double> %55, <2 x double> <double 0x414977D47BE6FFBE, double 0x4169AFB0D1612A5B>)
%61 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %60, <2 x double> %55, <2 x double> <double 0x41537AF96B738BB6, double 0x4171006254DB4526>)
%62 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %61, <2 x double> %55, <2 x double> <double 0x4147741E870557AD, double 0x41622ED4F2F06392>)
%63 = tail call double @log(double %0)
%64 = fneg double %63
%65 = extractelement <2 x double> %62, i64 0
%66 = extractelement <2 x double> %62, i64 1
%67 = fdiv double %65, %66
%68 = tail call double @llvm.fmuladd.f64(double %49, double %67, double 0x3FDB0EE6072093CE)
%69 = tail call double @llvm.fmuladd.f64(double %49, double %68, double %64)
br label %70
70: ; preds = %47, %42
%71 = phi double [ %69, %47 ], [ %43, %42 ]
%72 = fcmp ogt double %0, 0x3FE5C00000000000
%73 = fcmp ole double %0, 1.500000e+00
%74 = and i1 %72, %73
br i1 %74, label %75, label %96
75: ; preds = %70
%76 = fadd double %0, -5.000000e-01
%77 = fadd double %76, -5.000000e-01
%78 = tail call double @llvm.fmuladd.f64(double %77, double 0.000000e+00, double 0x4013C7EBC72CCF1B)
%79 = fadd double %77, 0x4050DEDB24ED0759
%80 = insertelement <2 x double> poison, double %78, i64 0
%81 = insertelement <2 x double> %80, double %79, i64 1
%82 = insertelement <2 x double> poison, double %77, i64 0
%83 = shufflevector <2 x double> %82, <2 x double> poison, <2 x i32> zeroinitializer
%84 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %81, <2 x double> %83, <2 x double> <double 0x406939F5DBE7CF07, double 0x409165545F0E2840>)
%85 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %84, <2 x double> %83, <2 x double> <double 0x40A1E5AD3F55B6E9, double 0x40BE3AC1CE7BBABF>)
%86 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %85, <2 x double> %83, <2 x double> <double 0x40C61BD60607C998, double 0x40DAFDF7BA452EAB>)
%87 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %86, <2 x double> %83, <2 x double> <double 0x40DBE34FC44EF5F9, double 0x40EADA2344181374>)
%88 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %87, <2 x double> %83, <2 x double> <double 0x40E2CA9ECB08BBCC, double 0x40EE156718FDB2A1>)
%89 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %88, <2 x double> %83, <2 x double> <double 0x40D9C25F395D45EC, double 0x40E1BFE8D44BBC1A>)
%90 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %89, <2 x double> %83, <2 x double> <double 0x40BC39D060F94058, double 0x40C128C4A58EDCFC>)
%91 = extractelement <2 x double> %90, i64 0
%92 = extractelement <2 x double> %90, i64 1
%93 = fdiv double %91, %92
%94 = tail call double @llvm.fmuladd.f64(double %77, double %93, double 0xBFE2788CFC6FB619)
%95 = fmul double %77, %94
br label %96
96: ; preds = %75, %70
%97 = phi double [ %95, %75 ], [ %71, %70 ]
%98 = fcmp ogt double %0, 1.500000e+00
%99 = fcmp ole double %0, 4.000000e+00
%100 = and i1 %98, %99
br i1 %100, label %101, label %121
101: ; preds = %96
%102 = fadd double %0, -2.000000e+00
%103 = tail call double @llvm.fmuladd.f64(double %102, double 0.000000e+00, double 0x4013E5FF995C9307)
%104 = fadd double %102, 0x4066E10D0656F583
%105 = insertelement <2 x double> poison, double %103, i64 0
%106 = insertelement <2 x double> %105, double %104, i64 1
%107 = insertelement <2 x double> poison, double %102, i64 0
%108 = shufflevector <2 x double> %107, <2 x double> poison, <2 x i32> zeroinitializer
%109 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %106, <2 x double> %108, <2 x double> <double 0x4080F34F95D372B4, double 0x40BE550CA054894B>)
%110 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %109, <2 x double> %108, <2 x double> <double 0x40CE497825AD1596, double 0x410042330FF7AAEF>)
%111 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %110, <2 x double> %108, <2 x double> <double 0x41068ECA52D49963, double 0x41315841D2422817>)
%112 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %111, <2 x double> %108, <2 x double> <double 0x41309ACCC4FBE8BF, double 0x4154187F07841A73>)
%113 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %112, <2 x double> %108, <2 x double> <double 0x414977D47BE6FFBE, double 0x4169AFB0D1612A5B>)
%114 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %113, <2 x double> %108, <2 x double> <double 0x41537AF96B738BB6, double 0x4171006254DB4526>)
%115 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %114, <2 x double> %108, <2 x double> <double 0x4147741E870557AD, double 0x41622ED4F2F06392>)
%116 = extractelement <2 x double> %115, i64 0
%117 = extractelement <2 x double> %115, i64 1
%118 = fdiv double %116, %117
%119 = tail call double @llvm.fmuladd.f64(double %102, double %118, double 0x3FDB0EE6072093CE)
%120 = fmul double %102, %119
br label %121
121: ; preds = %101, %96
%122 = phi double [ %120, %101 ], [ %97, %96 ]
%123 = fcmp ogt double %0, 4.000000e+00
%124 = fcmp ole double %0, 1.200000e+01
%125 = and i1 %123, %124
br i1 %125, label %126, label %142
126: ; preds = %121
%127 = fadd double %0, -4.000000e+00
%128 = insertelement <2 x double> poison, double %127, i64 0
%129 = shufflevector <2 x double> %128, <2 x double> poison, <2 x i32> zeroinitializer
%130 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %129, <2 x double> <double 0.000000e+00, double -1.000000e+00>, <2 x double> <double 0x40CCCC82C5C64704, double 0x40A5050F73363548>)
%131 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %130, <2 x double> %129, <2 x double> <double 0x414283DEAF4B5720, double 0x4123833921800ACC>)
%132 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %131, <2 x double> %129, <2 x double> <double 0x419CF647959E37B1, double 0x4183B856FA6B57F8>)
%133 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %132, <2 x double> %129, <2 x double> <double 0x41E3D818203430F7, double 0x41D0B3C9AB676EF8>)
%134 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %133, <2 x double> %129, <2 x double> <double 0x421B6268E3F961D5, double 0x420BBA436E364E1B>)
%135 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %134, <2 x double> %129, <2 x double> <double 0x4243D256DDE8451B, double 0x4237AC9F24E33E6B>)
%136 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %135, <2 x double> %129, <2 x double> <double 0x425CAC7FDC026F8F, double 0x4253E46FC45DAF37>)
%137 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %136, <2 x double> %129, <2 x double> <double 0x426050FBAE6ACCA5, double 0x4259FA9FBBBD7E2A>)
%138 = extractelement <2 x double> %137, i64 0
%139 = extractelement <2 x double> %137, i64 1
%140 = fdiv double %138, %139
%141 = tail call double @llvm.fmuladd.f64(double %127, double %140, double 0x3FFCAB0BFA2A2002)
br label %142
142: ; preds = %126, %121
%143 = phi double [ %141, %126 ], [ %122, %121 ]
%144 = fcmp ogt double %0, 1.200000e+01
br i1 %144, label %145, label %169
145: ; preds = %142
%146 = fcmp ugt double %0, 1.156700e+77
br i1 %146, label %161, label %147
147: ; preds = %145
%148 = fmul double %0, %0
%149 = fdiv double 0x3F7761AC88EC07D7, %148
%150 = fadd double %149, 0xBF5F4CFBB56B5FF7
%151 = fdiv double %150, %148
%152 = fadd double %151, 0x3F4B94CEC9F537D1
%153 = fdiv double %152, %148
%154 = fadd double %153, 0xBF438137DA5DD682
%155 = fdiv double %154, %148
%156 = fadd double %155, 0x3F4A01A019EC73CF
%157 = fdiv double %156, %148
%158 = fadd double %157, 0xBF66C16C16C16B39
%159 = fdiv double %158, %148
%160 = fadd double %159, 0x3FB5555555555555
br label %161
161: ; preds = %147, %145
%162 = phi double [ 0.000000e+00, %145 ], [ %160, %147 ]
%163 = fdiv double %162, %0
%164 = tail call double @log(double %0)
%165 = tail call double @llvm.fmuladd.f64(double %164, double -5.000000e-01, double 0x3FED67F1C864BEB5)
%166 = fadd double %164, -1.000000e+00
%167 = tail call double @llvm.fmuladd.f64(double %0, double %166, double %165)
%168 = fadd double %163, %167
br label %169
169: ; preds = %161, %142
%170 = phi double [ %168, %161 ], [ %143, %142 ]
ret double %170
}