#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 */
unsigned char *cvector(int, int);
int /*<<< orphan*/ free_cvector(unsigned char *, int, int);
int /*<<< orphan*/ printf(char *, ...);
void mppi(int n) {
  void mp2dfr(unsigned char a[], unsigned char s[], int n, int *m);
  void mpadd(unsigned char w[], unsigned char u[], unsigned char v[], int n);
  void mpinv(unsigned char u[], unsigned char v[], int n, int m);
  void mplsh(unsigned char u[], int n);
  void mpmov(unsigned char u[], unsigned char v[], int n);
  void mpmul(unsigned char w[], unsigned char u[], unsigned char v[], int n,
             int m);
  void mpsdv(unsigned char w[], unsigned char u[], int n, int iv, int *ir);
  void mpsqrt(unsigned char w[], unsigned char u[], unsigned char v[], int n,
              int m);
  int ir, j, m;
  unsigned char mm, *x, *y, *sx, *sxi, *t, *s, *pi;
  x = cvector(1, n + 1);
  y = cvector(1, n << 1);
  sx = cvector(1, n);
  sxi = cvector(1, n);
  t = cvector(1, n << 1);
  s = cvector(1, 3 * n);
  pi = cvector(1, n + 1);
  t[1] = 2;
  for (j = 2; j <= n; j++)
    t[j] = 0;
  mpsqrt(x, x, t, n, n);
  mpadd(pi, t, x, n);
  mplsh(pi, n);
  mpsqrt(sx, sxi, x, n, n);
  mpmov(y, sx, n);
  for (;;) {
    mpadd(x, sx, sxi, n);
    mpsdv(x, &x[1], n, 2, &ir);
    mpsqrt(sx, sxi, x, n, n);
    mpmul(t, y, sx, n, n);
    mpadd(&t[1], &t[1], sxi, n);
    x[1]++;
    y[1]++;
    mpinv(s, y, n, n);
    mpmul(y, &t[2], s, n, n);
    mplsh(y, n);
    mpmul(t, x, s, n, n);
    mm = t[2] - 1;
    for (j = 3; j <= n; j++) {
      if (t[j] != mm)
        break;
    }
    m = t[n + 1] - mm;
    if (j <= n || m > 1 || m < -1) {
      mpmul(s, pi, &t[1], n, n);
      mpmov(pi, &s[1], n);
      continue;
    }
    printf("pi=\n");
    s[1] = pi[1] + 48;
    s[2] = '.';
    m = mm;
    mp2dfr(&pi[1], &s[2], n - 1, &m);
    s[m + 3] = 0;
    printf(" %64s\n", &s[1]);
    free_cvector(pi, 1, n + 1);
    free_cvector(s, 1, 3 * n);
    free_cvector(t, 1, n << 1);
    free_cvector(sxi, 1, n);
    free_cvector(sx, 1, n);
    free_cvector(y, 1, n << 1);
    free_cvector(x, 1, n + 1);
    return;
  }
}


x86 assembly (clang, -O0):
<mppi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
add    $0x1,%esi
mov    $0x1,%edi
call   1070 <cvector@plt>
mov    %rax,-0x20(%rbp)
mov    -0x4(%rbp),%esi
shl    $0x1,%esi
mov    $0x1,%edi
call   1070 <cvector@plt>
mov    %rax,-0x28(%rbp)
mov    -0x4(%rbp),%esi
mov    $0x1,%edi
call   1070 <cvector@plt>
mov    %rax,-0x30(%rbp)
mov    -0x4(%rbp),%esi
mov    $0x1,%edi
call   1070 <cvector@plt>
mov    %rax,-0x38(%rbp)
mov    -0x4(%rbp),%esi
shl    $0x1,%esi
mov    $0x1,%edi
call   1070 <cvector@plt>
mov    %rax,-0x40(%rbp)
imul   $0x3,-0x4(%rbp),%esi
mov    $0x1,%edi
call   1070 <cvector@plt>
mov    %rax,-0x48(%rbp)
mov    -0x4(%rbp),%esi
add    $0x1,%esi
mov    $0x1,%edi
call   1070 <cvector@plt>
mov    %rax,-0x50(%rbp)
mov    -0x40(%rbp),%rax
movb   $0x2,0x1(%rax)
movl   $0x2,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     1274 <mppi+0xc4>
mov    -0x40(%rbp),%rax
movslq -0xc(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    124e <mppi+0x9e>
mov    -0x20(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x40(%rbp),%rdx
mov    -0x4(%rbp),%ecx
mov    -0x4(%rbp),%r8d
call   1050 <mpsqrt@plt>
mov    -0x50(%rbp),%rdi
mov    -0x40(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x4(%rbp),%ecx
call   10a0 <mpadd@plt>
mov    -0x50(%rbp),%rdi
mov    -0x4(%rbp),%esi
call   10c0 <mplsh@plt>
mov    -0x30(%rbp),%rdi
mov    -0x38(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x4(%rbp),%ecx
mov    -0x4(%rbp),%r8d
call   1050 <mpsqrt@plt>
mov    -0x28(%rbp),%rdi
mov    -0x30(%rbp),%rsi
mov    -0x4(%rbp),%edx
call   10b0 <mpmov@plt>
mov    -0x20(%rbp),%rdi
mov    -0x30(%rbp),%rsi
mov    -0x38(%rbp),%rdx
mov    -0x4(%rbp),%ecx
call   10a0 <mpadd@plt>
mov    -0x20(%rbp),%rdi
mov    -0x20(%rbp),%rsi
add    $0x1,%rsi
mov    -0x4(%rbp),%edx
mov    $0x2,%ecx
lea    -0x8(%rbp),%r8
call   1040 <mpsdv@plt>
mov    -0x30(%rbp),%rdi
mov    -0x38(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x4(%rbp),%ecx
mov    -0x4(%rbp),%r8d
call   1050 <mpsqrt@plt>
mov    -0x40(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x30(%rbp),%rdx
mov    -0x4(%rbp),%ecx
mov    -0x4(%rbp),%r8d
call   1030 <mpmul@plt>
mov    -0x40(%rbp),%rdi
add    $0x1,%rdi
mov    -0x40(%rbp),%rsi
add    $0x1,%rsi
mov    -0x38(%rbp),%rdx
mov    -0x4(%rbp),%ecx
call   10a0 <mpadd@plt>
mov    -0x20(%rbp),%rax
mov    0x1(%rax),%cl
add    $0x1,%cl
mov    %cl,0x1(%rax)
mov    -0x28(%rbp),%rax
mov    0x1(%rax),%cl
add    $0x1,%cl
mov    %cl,0x1(%rax)
mov    -0x48(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x4(%rbp),%edx
mov    -0x4(%rbp),%ecx
call   1080 <mpinv@plt>
mov    -0x28(%rbp),%rdi
mov    -0x40(%rbp),%rsi
add    $0x2,%rsi
mov    -0x48(%rbp),%rdx
mov    -0x4(%rbp),%ecx
mov    -0x4(%rbp),%r8d
call   1030 <mpmul@plt>
mov    -0x28(%rbp),%rdi
mov    -0x4(%rbp),%esi
call   10c0 <mplsh@plt>
mov    -0x40(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x48(%rbp),%rdx
mov    -0x4(%rbp),%ecx
mov    -0x4(%rbp),%r8d
call   1030 <mpmul@plt>
mov    -0x40(%rbp),%rax
movzbl 0x2(%rax),%eax
sub    $0x1,%eax
mov    %al,-0x11(%rbp)
movl   $0x3,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     140f <mppi+0x25f>
mov    -0x40(%rbp),%rax
movslq -0xc(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
movzbl -0x11(%rbp),%ecx
cmp    %ecx,%eax
je     13fc <mppi+0x24c>
jmp    140f <mppi+0x25f>
jmp    1401 <mppi+0x251>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    13d3 <mppi+0x223>
mov    -0x40(%rbp),%rax
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movzbl (%rax,%rcx,1),%eax
movzbl -0x11(%rbp),%ecx
sub    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jle    1449 <mppi+0x299>
cmpl   $0x1,-0x10(%rbp)
jg     1449 <mppi+0x299>
cmpl   $0xffffffff,-0x10(%rbp)
jge    147e <mppi+0x2ce>
mov    -0x48(%rbp),%rdi
mov    -0x50(%rbp),%rsi
mov    -0x40(%rbp),%rdx
add    $0x1,%rdx
mov    -0x4(%rbp),%ecx
mov    -0x4(%rbp),%r8d
call   1030 <mpmul@plt>
mov    -0x50(%rbp),%rdi
mov    -0x48(%rbp),%rsi
add    $0x1,%rsi
mov    -0x4(%rbp),%edx
call   10b0 <mpmov@plt>
jmp    12d4 <mppi+0x124>
lea    0xb7b(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x50(%rbp),%rax
movzbl 0x1(%rax),%eax
add    $0x30,%eax
mov    %al,%cl
mov    -0x48(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0x48(%rbp),%rax
movb   $0x2e,0x2(%rax)
movzbl -0x11(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x50(%rbp),%rdi
add    $0x1,%rdi
mov    -0x48(%rbp),%rsi
add    $0x2,%rsi
mov    -0x4(%rbp),%edx
sub    $0x1,%edx
lea    -0x10(%rbp),%rcx
call   10d0 <mp2dfr@plt>
mov    -0x48(%rbp),%rax
mov    -0x10(%rbp),%ecx
add    $0x3,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x48(%rbp),%rsi
add    $0x1,%rsi
lea    0xb17(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x50(%rbp),%rdi
mov    -0x4(%rbp),%edx
add    $0x1,%edx
mov    $0x1,%esi
call   1090 <free_cvector@plt>
mov    -0x48(%rbp),%rdi
imul   $0x3,-0x4(%rbp),%edx
mov    $0x1,%esi
call   1090 <free_cvector@plt>
mov    -0x40(%rbp),%rdi
mov    -0x4(%rbp),%edx
shl    $0x1,%edx
mov    $0x1,%esi
call   1090 <free_cvector@plt>
mov    -0x38(%rbp),%rdi
mov    -0x4(%rbp),%edx
mov    $0x1,%esi
call   1090 <free_cvector@plt>
mov    -0x30(%rbp),%rdi
mov    -0x4(%rbp),%edx
mov    $0x1,%esi
call   1090 <free_cvector@plt>
mov    -0x28(%rbp),%rdi
mov    -0x4(%rbp),%edx
shl    $0x1,%edx
mov    $0x1,%esi
call   1090 <free_cvector@plt>
mov    -0x20(%rbp),%rdi
mov    -0x4(%rbp),%edx
add    $0x1,%edx
mov    $0x1,%esi
call   1090 <free_cvector@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mppi>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x98,%rsp
mov    %edi,%r13d
lea    0x1(%r13),%r15d
mov    $0x1,%edi
mov    %r15d,%esi
call   1090 <cvector@plt>
mov    %rax,0x58(%rsp)
mov    %rax,0x30(%rsp)
lea    0x0(%r13,%r13,1),%ebx
mov    $0x1,%edi
mov    %ebx,%esi
call   1090 <cvector@plt>
mov    %rax,0x20(%rsp)
mov    $0x1,%edi
mov    %r13d,%esi
call   1090 <cvector@plt>
mov    %rax,0x28(%rsp)
mov    $0x1,%edi
mov    %r13d,%esi
call   1090 <cvector@plt>
mov    %rax,0x18(%rsp)
mov    $0x1,%edi
mov    %ebx,0x40(%rsp)
mov    %ebx,%esi
call   1090 <cvector@plt>
mov    %rax,%r14
mov    %rax,%r12
lea    0x0(%r13,%r13,2),%esi
mov    $0x1,%edi
mov    %esi,0x3c(%rsp)
call   1090 <cvector@plt>
mov    %rax,0x50(%rsp)
mov    $0x1,%edi
mov    %r15d,%esi
call   1090 <cvector@plt>
mov    %rax,0x10(%rsp)
movb   $0x2,0x1(%r14)
cmp    $0x2,%r13d
jl     1293 <mppi+0xc3>
lea    0x2(%r14),%rdi
lea    -0x1(%r13),%edx
xor    %esi,%esi
call   1080 <memset@plt>
lea    0x1(%r14),%rax
mov    %rax,0x68(%rsp)
mov    0x30(%rsp),%rbx
mov    %rbx,%rdi
mov    %rbx,%rsi
mov    %r12,%rdx
mov    %r13d,%ecx
mov    %r13d,%r8d
call   1060 <mpsqrt@plt>
mov    0x10(%rsp),%rbp
mov    %rbp,%rdi
mov    %r12,0x60(%rsp)
mov    %r12,%rsi
mov    %rbx,%rdx
mov    %r13d,%ecx
call   10c0 <mpadd@plt>
mov    %rbp,%rdi
mov    %r13d,%esi
call   10e0 <mplsh@plt>
mov    0x28(%rsp),%r12
mov    %r12,%rdi
mov    0x18(%rsp),%rsi
mov    %rbx,%rdx
mov    %r13d,%ecx
mov    %r13d,%r8d
call   1060 <mpsqrt@plt>
mov    0x20(%rsp),%rdi
mov    %r12,%rsi
mov    %r13d,%edx
call   10d0 <mpmov@plt>
addq   $0x1,0x58(%rsp)
add    $0x2,%r14
mov    %r14,0x88(%rsp)
movslq %r15d,%rax
mov    %rax,0x80(%rsp)
mov    0x50(%rsp),%rax
add    $0x1,%rax
mov    %rax,0x48(%rsp)
movslq %r13d,%rax
mov    %rax,0x78(%rsp)
mov    %r15d,0x44(%rsp)
mov    %r15d,%eax
mov    $0x4,%ecx
sub    %rax,%rcx
mov    %rcx,0x70(%rsp)
mov    0x18(%rsp),%r15
mov    0x60(%rsp),%r14
jmp    1389 <mppi+0x1b9>
nopw   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    %rsi,%rdx
mov    0x10(%rsp),%rbp
mov    %rbp,%rsi
mov    %r13d,%ecx
mov    %r13d,%r8d
call   1030 <mpmul@plt>
mov    %rbp,%rdi
mov    0x48(%rsp),%rsi
mov    %r13d,%edx
call   10d0 <mpmov@plt>
mov    0x30(%rsp),%r12
mov    %r12,%rdi
mov    0x28(%rsp),%rbp
mov    %rbp,%rsi
mov    %r15,%rdx
mov    %r13d,%ecx
call   10c0 <mpadd@plt>
mov    %r12,%rdi
mov    0x58(%rsp),%rsi
mov    %r13d,%edx
mov    $0x2,%ecx
lea    0x94(%rsp),%r8
call   1050 <mpsdv@plt>
mov    %rbp,%rdi
mov    %r15,%rsi
mov    %r12,%rdx
mov    %r13d,%ecx
mov    %r13d,%r8d
call   1060 <mpsqrt@plt>
mov    %r14,%rdi
mov    0x20(%rsp),%rbx
mov    %rbx,%rsi
mov    %rbp,%rdx
mov    %r13d,%ecx
mov    %r13d,%r8d
call   1030 <mpmul@plt>
mov    0x68(%rsp),%rdi
mov    %rdi,%rsi
mov    %r15,%rdx
mov    %r13d,%ecx
call   10c0 <mpadd@plt>
addb   $0x1,0x1(%r12)
addb   $0x1,0x1(%rbx)
mov    0x50(%rsp),%rbp
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %r13d,%edx
mov    %r13d,%ecx
call   10a0 <mpinv@plt>
mov    %rbx,%rdi
mov    0x88(%rsp),%rsi
mov    %rbp,%rdx
mov    %r13d,%ecx
mov    %r13d,%r8d
call   1030 <mpmul@plt>
mov    %rbx,%rdi
mov    %r13d,%esi
call   10e0 <mplsh@plt>
mov    %r14,%rdi
mov    %r12,%rsi
mov    %rbp,%rdx
mov    %r13d,%ecx
mov    %r13d,%r8d
call   1030 <mpmul@plt>
mov    0x2(%r14),%al
add    $0xff,%al
mov    %r13,%rdx
cmp    $0x3,%r13d
mov    %rbp,%rbx
mov    0x68(%rsp),%rsi
jl     14c0 <mppi+0x2f0>
mov    $0x1,%cl
cmp    %al,0x3(%r14)
mov    %rdx,%r13
jne    14c5 <mppi+0x2f5>
mov    $0x3,%edx
mov    0x70(%rsp),%rdi
cs nopw 0x0(%rax,%rax,1)
nop
mov    %rdx,%rcx
add    %rdi,%rdx
cmp    $0x3,%rdx
je     14a7 <mppi+0x2d7>
lea    0x1(%rcx),%rdx
cmp    %al,0x1(%r14,%rcx,1)
je     1490 <mppi+0x2c0>
cmp    0x78(%rsp),%rcx
setl   %cl
jmp    14c5 <mppi+0x2f5>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %ecx,%ecx
mov    %rdx,%r13
mov    0x80(%rsp),%rdx
movzbl (%r14,%rdx,1),%edx
movzbl %al,%r12d
sub    %r12d,%edx
test   %cl,%cl
jne    1360 <mppi+0x190>
cmp    $0x1,%edx
jg     1360 <mppi+0x190>
cmp    $0xfffffffe,%edx
jle    1360 <mppi+0x190>
lea    0xb0d(%rip),%rdi
call   1040 <puts@plt>
mov    0x10(%rsp),%rbp
mov    %rbp,%rdi
add    $0x1,%rdi
mov    0x1(%rbp),%al
add    $0x30,%al
mov    %al,0x1(%rbx)
mov    %rbx,%rsi
add    $0x2,%rsi
movb   $0x2e,0x2(%rbx)
mov    %r12d,0xc(%rsp)
lea    -0x1(%r13),%edx
lea    0xc(%rsp),%rcx
call   10f0 <mp2dfr@plt>
movslq 0xc(%rsp),%rax
movb   $0x0,0x3(%rax,%rbx,1)
lea    0xabe(%rip),%rdi
mov    0x48(%rsp),%rsi
xor    %eax,%eax
call   1070 <printf@plt>
mov    %rbp,%rdi
mov    $0x1,%esi
mov    0x44(%rsp),%r15d
mov    %r15d,%edx
call   10b0 <free_cvector@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
mov    0x3c(%rsp),%edx
call   10b0 <free_cvector@plt>
mov    0x60(%rsp),%rdi
mov    $0x1,%esi
mov    0x40(%rsp),%ebx
mov    %ebx,%edx
call   10b0 <free_cvector@plt>
mov    0x18(%rsp),%rdi
mov    $0x1,%esi
mov    %r13d,%edx
call   10b0 <free_cvector@plt>
mov    0x28(%rsp),%rdi
mov    $0x1,%esi
mov    %r13d,%edx
call   10b0 <free_cvector@plt>
mov    0x20(%rsp),%rdi
mov    $0x1,%esi
mov    %ebx,%edx
call   10b0 <free_cvector@plt>
mov    0x30(%rsp),%rdi
mov    $0x1,%esi
mov    %r15d,%edx
call   10b0 <free_cvector@plt>
add    $0x98,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [5 x i8] c"pi=\0A\00"
@.str.1 = [7 x i8] c" %64s\0A\00"
define void @mppi(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i8*
store i32 %0, i32* %2
%14 = load i32, i32* %2
%15 = add nsw i32 %14, 1
%16 = call i8* @cvector(i32 1, i32 %15)
store i8* %16, i8** %7
%17 = load i32, i32* %2
%18 = shl i32 %17, 1
%19 = call i8* @cvector(i32 1, i32 %18)
store i8* %19, i8** %8
%20 = load i32, i32* %2
%21 = call i8* @cvector(i32 1, i32 %20)
store i8* %21, i8** %9
%22 = load i32, i32* %2
%23 = call i8* @cvector(i32 1, i32 %22)
store i8* %23, i8** %10
%24 = load i32, i32* %2
%25 = shl i32 %24, 1
%26 = call i8* @cvector(i32 1, i32 %25)
store i8* %26, i8** %11
%27 = load i32, i32* %2
%28 = mul nsw i32 3, %27
%29 = call i8* @cvector(i32 1, i32 %28)
store i8* %29, i8** %12
%30 = load i32, i32* %2
%31 = add nsw i32 %30, 1
%32 = call i8* @cvector(i32 1, i32 %31)
store i8* %32, i8** %13
%33 = load i8*, i8** %11
%34 = getelementptr inbounds i8, i8* %33, i64 1
store i8 2, i8* %34
store i32 2, i32* %4
br label %35
35: ; preds = %44, %1
%36 = load i32, i32* %4
%37 = load i32, i32* %2
%38 = icmp sle i32 %36, %37
br i1 %38, label %39, label %47
39: ; preds = %35
%40 = load i8*, i8** %11
%41 = load i32, i32* %4
%42 = sext i32 %41 to i64
%43 = getelementptr inbounds i8, i8* %40, i64 %42
store i8 0, i8* %43
br label %44
44: ; preds = %39
%45 = load i32, i32* %4
%46 = add nsw i32 %45, 1
store i32 %46, i32* %4
br label %35
47: ; preds = %35
%48 = load i8*, i8** %7
%49 = load i8*, i8** %7
%50 = load i8*, i8** %11
%51 = load i32, i32* %2
%52 = load i32, i32* %2
%53 = load i8*, i8** %13
%54 = load i8*, i8** %11
%55 = load i8*, i8** %7
%56 = load i32, i32* %2
%57 = load i8*, i8** %13
%58 = load i32, i32* %2
%59 = load i8*, i8** %9
%60 = load i8*, i8** %10
%61 = load i8*, i8** %7
%62 = load i32, i32* %2
%63 = load i32, i32* %2
%64 = load i8*, i8** %8
%65 = load i8*, i8** %9
%66 = load i32, i32* %2
br label %67
67: ; preds = %162, %47
%68 = load i8*, i8** %7
%69 = load i8*, i8** %9
%70 = load i8*, i8** %10
%71 = load i32, i32* %2
%72 = load i8*, i8** %7
%73 = load i8*, i8** %7
%74 = getelementptr inbounds i8, i8* %73, i64 1
%75 = load i32, i32* %2
%76 = load i8*, i8** %9
%77 = load i8*, i8** %10
%78 = load i8*, i8** %7
%79 = load i32, i32* %2
%80 = load i32, i32* %2
%81 = load i8*, i8** %11
%82 = load i8*, i8** %8
%83 = load i8*, i8** %9
%84 = load i32, i32* %2
%85 = load i32, i32* %2
%86 = load i8*, i8** %11
%87 = getelementptr inbounds i8, i8* %86, i64 1
%88 = load i8*, i8** %11
%89 = getelementptr inbounds i8, i8* %88, i64 1
%90 = load i8*, i8** %10
%91 = load i32, i32* %2
%92 = load i8*, i8** %7
%93 = getelementptr inbounds i8, i8* %92, i64 1
%94 = load i8, i8* %93
%95 = add i8 %94, 1
store i8 %95, i8* %93
%96 = load i8*, i8** %8
%97 = getelementptr inbounds i8, i8* %96, i64 1
%98 = load i8, i8* %97
%99 = add i8 %98, 1
store i8 %99, i8* %97
%100 = load i8*, i8** %12
%101 = load i8*, i8** %8
%102 = load i32, i32* %2
%103 = load i32, i32* %2
%104 = load i8*, i8** %8
%105 = load i8*, i8** %11
%106 = getelementptr inbounds i8, i8* %105, i64 2
%107 = load i8*, i8** %12
%108 = load i32, i32* %2
%109 = load i32, i32* %2
%110 = load i8*, i8** %8
%111 = load i32, i32* %2
%112 = load i8*, i8** %11
%113 = load i8*, i8** %7
%114 = load i8*, i8** %12
%115 = load i32, i32* %2
%116 = load i32, i32* %2
%117 = load i8*, i8** %11
%118 = getelementptr inbounds i8, i8* %117, i64 2
%119 = load i8, i8* %118
%120 = zext i8 %119 to i32
%121 = sub nsw i32 %120, 1
%122 = trunc i32 %121 to i8
store i8 %122, i8* %6
store i32 3, i32* %4
br label %123
123: ; preds = %139, %67
%124 = load i32, i32* %4
%125 = load i32, i32* %2
%126 = icmp sle i32 %124, %125
br i1 %126, label %127, label %142
127: ; preds = %123
%128 = load i8*, i8** %11
%129 = load i32, i32* %4
%130 = sext i32 %129 to i64
%131 = getelementptr inbounds i8, i8* %128, i64 %130
%132 = load i8, i8* %131
%133 = zext i8 %132 to i32
%134 = load i8, i8* %6
%135 = zext i8 %134 to i32
%136 = icmp ne i32 %133, %135
br i1 %136, label %137, label %138
137: ; preds = %127
br label %142
138: ; preds = %127
br label %139
139: ; preds = %138
%140 = load i32, i32* %4
%141 = add nsw i32 %140, 1
store i32 %141, i32* %4
br label %123
142: ; preds = %137, %123
%143 = load i8*, i8** %11
%144 = load i32, i32* %2
%145 = add nsw i32 %144, 1
%146 = sext i32 %145 to i64
%147 = getelementptr inbounds i8, i8* %143, i64 %146
%148 = load i8, i8* %147
%149 = zext i8 %148 to i32
%150 = load i8, i8* %6
%151 = zext i8 %150 to i32
%152 = sub nsw i32 %149, %151
store i32 %152, i32* %5
%153 = load i32, i32* %4
%154 = load i32, i32* %2
%155 = icmp sle i32 %153, %154
br i1 %155, label %162, label %156
156: ; preds = %142
%157 = load i32, i32* %5
%158 = icmp sgt i32 %157, 1
br i1 %158, label %162, label %159
159: ; preds = %156
%160 = load i32, i32* %5
%161 = icmp slt i32 %160, -1
br i1 %161, label %162, label %173
162: ; preds = %159, %156, %142
%163 = load i8*, i8** %12
%164 = load i8*, i8** %13
%165 = load i8*, i8** %11
%166 = getelementptr inbounds i8, i8* %165, i64 1
%167 = load i32, i32* %2
%168 = load i32, i32* %2
%169 = load i8*, i8** %13
%170 = load i8*, i8** %12
%171 = getelementptr inbounds i8, i8* %170, i64 1
%172 = load i32, i32* %2
br label %67
173: ; preds = %159
%174 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%175 = load i8*, i8** %13
%176 = getelementptr inbounds i8, i8* %175, i64 1
%177 = load i8, i8* %176
%178 = zext i8 %177 to i32
%179 = add nsw i32 %178, 48
%180 = trunc i32 %179 to i8
%181 = load i8*, i8** %12
%182 = getelementptr inbounds i8, i8* %181, i64 1
store i8 %180, i8* %182
%183 = load i8*, i8** %12
%184 = getelementptr inbounds i8, i8* %183, i64 2
store i8 46, i8* %184
%185 = load i8, i8* %6
%186 = zext i8 %185 to i32
store i32 %186, i32* %5
%187 = load i8*, i8** %13
%188 = getelementptr inbounds i8, i8* %187, i64 1
%189 = load i8*, i8** %12
%190 = getelementptr inbounds i8, i8* %189, i64 2
%191 = load i32, i32* %2
%192 = sub nsw i32 %191, 1
%193 = load i8*, i8** %12
%194 = load i32, i32* %5
%195 = add nsw i32 %194, 3
%196 = sext i32 %195 to i64
%197 = getelementptr inbounds i8, i8* %193, i64 %196
store i8 0, i8* %197
%198 = load i8*, i8** %12
%199 = getelementptr inbounds i8, i8* %198, i64 1
%200 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %199)
%201 = load i8*, i8** %13
%202 = load i32, i32* %2
%203 = add nsw i32 %202, 1
%204 = call i32 @free_cvector(i8* %201, i32 1, i32 %203)
%205 = load i8*, i8** %12
%206 = load i32, i32* %2
%207 = mul nsw i32 3, %206
%208 = call i32 @free_cvector(i8* %205, i32 1, i32 %207)
%209 = load i8*, i8** %11
%210 = load i32, i32* %2
%211 = shl i32 %210, 1
%212 = call i32 @free_cvector(i8* %209, i32 1, i32 %211)
%213 = load i8*, i8** %10
%214 = load i32, i32* %2
%215 = call i32 @free_cvector(i8* %213, i32 1, i32 %214)
%216 = load i8*, i8** %9
%217 = load i32, i32* %2
%218 = call i32 @free_cvector(i8* %216, i32 1, i32 %217)
%219 = load i8*, i8** %8
%220 = load i32, i32* %2
%221 = shl i32 %220, 1
%222 = call i32 @free_cvector(i8* %219, i32 1, i32 %221)
%223 = load i8*, i8** %7
%224 = load i32, i32* %2
%225 = add nsw i32 %224, 1
%226 = call i32 @free_cvector(i8* %223, i32 1, i32 %225)
ret void
}

LLVM IR (-O2):
@.str.1 = [7 x i8] c" %64s\0A\00"
@str = [4 x i8] c"pi=\00"
define void @mppi(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %2 to i8*
%5 = bitcast i32* %3 to i8*
%6 = add i32 %0, 1
%7 = tail call i8* @cvector(i32 1, i32 %6)
%8 = shl i32 %0, 1
%9 = tail call i8* @cvector(i32 1, i32 %8)
%10 = tail call i8* @cvector(i32 1, i32 %0)
%11 = tail call i8* @cvector(i32 1, i32 %0)
%12 = tail call i8* @cvector(i32 1, i32 %8)
%13 = mul nsw i32 %0, 3
%14 = tail call i8* @cvector(i32 1, i32 %13)
%15 = tail call i8* @cvector(i32 1, i32 %6)
%16 = getelementptr inbounds i8, i8* %12, i64 1
store i8 2, i8* %16
%17 = icmp slt i32 %0, 2
br i1 %17, label %22, label %18
18: ; preds = %1
%19 = getelementptr i8, i8* %12, i64 2
%20 = add nsw i32 %0, -1
%21 = zext i32 %20 to i64
br label %22
22: ; preds = %18, %1
tail call void @mpsqrt(i8* %7, i8* %7, i8* %12, i32 %0, i32 %0)
tail call void @mpadd(i8* %15, i8* %12, i8* %7, i32 %0)
tail call void @mplsh(i8* %15, i32 %0)
tail call void @mpsqrt(i8* %10, i8* %11, i8* %7, i32 %0, i32 %0)
tail call void @mpmov(i8* %9, i8* %10, i32 %0)
%23 = getelementptr inbounds i8, i8* %7, i64 1
%24 = getelementptr inbounds i8, i8* %9, i64 1
%25 = getelementptr inbounds i8, i8* %12, i64 2
%26 = icmp sgt i32 %0, 2
%27 = sext i32 %6 to i64
%28 = getelementptr inbounds i8, i8* %12, i64 %27
%29 = getelementptr inbounds i8, i8* %14, i64 1
%30 = sext i32 %0 to i64
%31 = zext i32 %6 to i64
%32 = getelementptr inbounds i8, i8* %12, i64 3
br label %33
33: ; preds = %63, %22
%34 = load i8, i8* %23
%35 = add i8 %34, 1
store i8 %35, i8* %23
%36 = load i8, i8* %24
%37 = add i8 %36, 1
store i8 %37, i8* %24
%38 = load i8, i8* %25
%39 = add i8 %38, -1
br i1 %26, label %40, label %53
40: ; preds = %33
%41 = load i8, i8* %32
%42 = icmp eq i8 %41, %39
br i1 %42, label %43, label %53
43: ; preds = %40, %47
%44 = phi i64 [ %45, %47 ], [ 3, %40 ]
%45 = add nuw nsw i64 %44, 1
%46 = icmp eq i64 %45, %31
br i1 %46, label %51, label %47
47: ; preds = %43
%48 = getelementptr inbounds i8, i8* %12, i64 %45
%49 = load i8, i8* %48
%50 = icmp eq i8 %49, %39
br i1 %50, label %43, label %51
51: ; preds = %43, %47
%52 = icmp slt i64 %44, %30
br label %53
53: ; preds = %51, %40, %33
%54 = phi i1 [ false, %33 ], [ true, %40 ], [ %52, %51 ]
%55 = load i8, i8* %28
%56 = zext i8 %55 to i32
%57 = zext i8 %39 to i32
%58 = sub nsw i32 %56, %57
%59 = icmp sgt i32 %58, 1
%60 = select i1 %54, i1 true, i1 %59
%61 = icmp slt i32 %58, -1
%62 = select i1 %60, i1 true, i1 %61
br i1 %62, label %63, label %64
63: ; preds = %53
br label %33
64: ; preds = %53
%65 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str, i64 0, i64 0))
%66 = getelementptr inbounds i8, i8* %15, i64 1
%67 = load i8, i8* %66
%68 = add i8 %67, 48
store i8 %68, i8* %29
%69 = getelementptr inbounds i8, i8* %14, i64 2
store i8 46, i8* %69
store i32 %57, i32* %3
%70 = add nsw i32 %0, -1
%71 = load i32, i32* %3
%72 = add nsw i32 %71, 3
%73 = sext i32 %72 to i64
%74 = getelementptr inbounds i8, i8* %14, i64 %73
store i8 0, i8* %74
%75 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %29)
%76 = call i32 @free_cvector(i8* %15, i32 1, i32 %6)
%77 = call i32 @free_cvector(i8* %14, i32 1, i32 %13)
%78 = call i32 @free_cvector(i8* %12, i32 1, i32 %8)
%79 = call i32 @free_cvector(i8* %11, i32 1, i32 %0)
%80 = call i32 @free_cvector(i8* %10, i32 1, i32 %0)
%81 = call i32 @free_cvector(i8* %9, i32 1, i32 %8)
%82 = call i32 @free_cvector(i8* %7, i32 1, i32 %6)
ret void
}