#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*/ free(double *);
scalar_t__ malloc(int);
int /*<<< orphan*/ mdisplay(double *, int, int);
int /*<<< orphan*/ printf(char *, double);
void fsub(double *A, int N, int M, double *bb, double *xx) {
  int i, j, t, k, u;
  double sum;
  double *x, *b;
  x = (double *)malloc(sizeof(double) * N);
  b = (double *)malloc(sizeof(double) * N);
  for (k = 0; k < M; ++k) {
    u = k * N;
    for (i = 0; i < N; ++i) {
      b[i] = bb[u + i];
      x[i] = 0.;
    }
    mdisplay(b, N, 1);
    for (i = 0; i < N; ++i) {
      t = i * N;
      sum = 0;
      for (j = 0; j < i; ++j) {
        sum += A[t + j] * x[j];
        printf("sum %lf \n", sum);
      }
      x[i] = (b[i] - sum) / A[t + i];
    }
    for (i = 0; i < N; ++i) {
      xx[u + i] = x[i];
    }
  }
  free(x);
  free(b);
}


x86 assembly (clang, -O0):
<fsub>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
movslq -0xc(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1060 <malloc@plt>
mov    %rax,-0x48(%rbp)
movslq -0xc(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1060 <malloc@plt>
mov    %rax,-0x50(%rbp)
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1318 <fsub+0x1d8>
mov    -0x30(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    %eax,-0x34(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    11ed <fsub+0xad>
mov    -0x18(%rbp),%rax
mov    -0x34(%rbp),%ecx
add    -0x24(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x50(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x48(%rbp),%rax
movslq -0x24(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    11a4 <fsub+0x64>
mov    -0x50(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    $0x1,%edx
call   1050 <mdisplay@plt>
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    12c5 <fsub+0x185>
mov    -0x24(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    %eax,-0x2c(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x40(%rbp)
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    1286 <fsub+0x146>
mov    -0x8(%rbp),%rax
mov    -0x2c(%rbp),%ecx
add    -0x28(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x48(%rbp),%rax
movslq -0x28(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x40(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm0
lea    0xd8d(%rip),%rdi
call   1040 <printf@plt>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    122a <fsub+0xea>
mov    -0x50(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  -0x40(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x2c(%rbp),%ecx
add    -0x24(%rbp),%ecx
movslq %ecx,%rcx
divsd  (%rax,%rcx,8),%xmm0
mov    -0x48(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1205 <fsub+0xc5>
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1305 <fsub+0x1c5>
mov    -0x48(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
mov    -0x34(%rbp),%ecx
add    -0x24(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    12cc <fsub+0x18c>
jmp    130a <fsub+0x1ca>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1187 <fsub+0x47>
mov    -0x48(%rbp),%rdi
call   1030 <free@plt>
mov    -0x50(%rbp),%rdi
call   1030 <free@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fsub>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xf8,%rsp
mov    %r8,0x40(%rsp)
mov    %rcx,0x8(%rsp)
mov    %edx,%r14d
mov    %esi,%r12d
mov    %rdi,0x70(%rsp)
lea    0x0(,%r12,8),%r15d
mov    %r15d,%edi
call   1060 <malloc@plt>
mov    %rax,%rbx
mov    %r15d,%edi
call   1060 <malloc@plt>
mov    %rax,%rbp
test   %r14d,%r14d
jle    1785 <fsub+0x645>
movslq %r12d,%rcx
mov    %r14d,%eax
mov    %rax,0xe0(%rsp)
mov    %r12d,%r13d
lea    (%rbx,%r13,8),%rax
lea    0x0(,%r13,8),%rdx
add    %rbp,%rdx
mov    %r13d,%esi
and    $0xfffffffc,%esi
mov    %rsi,0x30(%rsp)
add    $0xfffffffffffffffc,%rsi
mov    %rsi,0x28(%rsp)
shr    $0x2,%rsi
add    $0x1,%rsi
mov    %rax,0x38(%rsp)
cmp    %rax,%rbp
setb   %al
mov    %rdx,0xb8(%rsp)
cmp    %rdx,%rbx
setb   %dl
and    %al,%dl
mov    %dl,0x7(%rsp)
movabs $0x7ffffffffffffffc,%rax
ff ff 7f
or     $0x2,%rax
and    %rsi,%rax
mov    %rax,0xa0(%rsp)
mov    %r13,%rax
neg    %rax
mov    %rax,0xd8(%rsp)
mov    %esi,%edx
and    $0x3,%edx
mov    %rsi,%rax
mov    %rsi,0xa8(%rsp)
and    $0xfffffffffffffffc,%rsi
mov    %rsi,0x88(%rsp)
mov    %r13d,%eax
and    $0x3,%eax
mov    %rax,0xb0(%rsp)
mov    %rdx,0x98(%rsp)
shl    $0x5,%rdx
mov    %rdx,0xf0(%rsp)
mov    0x8(%rsp),%rax
lea    0x30(%rax),%rdx
mov    %rcx,0x78(%rsp)
lea    0x0(,%rcx,8),%rcx
mov    %rcx,0x80(%rsp)
lea    0x8(%rax),%rsi
mov    0x40(%rsp),%rax
lea    0x70(%rax),%rcx
mov    %rcx,0x48(%rsp)
lea    0x10(%rax),%rdi
lea    0x10(%rbx),%rcx
mov    %rcx,0x90(%rsp)
xor    %ecx,%ecx
mov    %rcx,0x10(%rsp)
lea    0xd65(%rip),%r14
mov    %rax,0x50(%rsp)
mov    %r12,0xc0(%rsp)
mov    %rbp,0x68(%rsp)
mov    %r13,0x60(%rsp)
jmp    131c <fsub+0x1dc>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rbp,%rdi
mov    %r12d,%esi
mov    $0x1,%edx
call   1050 <mdisplay@plt>
mov    0x18(%rsp),%rdi
mov    0x10(%rsp),%rcx
add    $0x1,%rcx
mov    0x58(%rsp),%rdx
mov    0x80(%rsp),%rax
add    %rax,%rdx
mov    0xe8(%rsp),%rsi
add    %rax,%rsi
add    %rax,0x48(%rsp)
add    %rax,%rdi
add    %rax,0x50(%rsp)
mov    %rcx,%rax
mov    %rcx,0x10(%rsp)
cmp    0xe0(%rsp),%rcx
je     1785 <fsub+0x645>
mov    %rdi,0x18(%rsp)
test   %r12d,%r12d
mov    %rdx,0x58(%rsp)
mov    %rsi,0xe8(%rsp)
jle    12c0 <fsub+0x180>
mov    0x10(%rsp),%r15
imul   0x78(%rsp),%r15
lea    (%r15,%r13,1),%rdi
cmp    $0x4,%r12d
mov    %rdi,0x20(%rsp)
jae    13d0 <fsub+0x290>
xor    %eax,%eax
mov    %rax,%rcx
test   $0x1,%r13b
je     137f <fsub+0x23f>
lea    (%rax,%r15,1),%rcx
mov    0x8(%rsp),%rdx
movsd  (%rdx,%rcx,8),%xmm0
movsd  %xmm0,0x0(%rbp,%rax,8)
movq   $0x0,(%rbx,%rax,8)
mov    %rax,%rcx
or     $0x1,%rcx
not    %rax
cmp    0xd8(%rsp),%rax
je     14e0 <fsub+0x3a0>
movsd  -0x8(%rsi,%rcx,8),%xmm0
movsd  %xmm0,0x0(%rbp,%rcx,8)
movq   $0x0,(%rbx,%rcx,8)
movsd  (%rsi,%rcx,8),%xmm0
movsd  %xmm0,0x8(%rbp,%rcx,8)
movq   $0x0,0x8(%rbx,%rcx,8)
add    $0x2,%rcx
cmp    %rcx,%r13
jne    1390 <fsub+0x250>
jmp    14e0 <fsub+0x3a0>
cs nopw 0x0(%rax,%rax,1)
mov    %rsi,%r8
mov    0x8(%rsp),%rcx
lea    (%rcx,%r15,8),%rax
lea    (%rcx,%rdi,8),%rcx
cmp    %rcx,%rbp
setb   %sil
cmp    0xb8(%rsp),%rax
setb   %dl
and    %sil,%dl
or     0x7(%rsp),%dl
cmp    %rcx,%rbx
setb   %cl
cmp    0x38(%rsp),%rax
setb   %sil
test   %dl,%dl
jne    168c <fsub+0x54c>
mov    $0x0,%eax
and    %sil,%cl
mov    %r8,%rsi
jne    1353 <fsub+0x213>
cmpq   $0x0,0x28(%rsp)
je     1696 <fsub+0x556>
mov    0xa0(%rsp),%rcx
xor    %eax,%eax
xorps  %xmm2,%xmm2
mov    0x58(%rsp),%rdx
nop
movups -0x30(%rdx,%rax,8),%xmm0
movups -0x20(%rdx,%rax,8),%xmm1
movups %xmm0,0x0(%rbp,%rax,8)
movups %xmm1,0x10(%rbp,%rax,8)
movups %xmm2,(%rbx,%rax,8)
movups %xmm2,0x10(%rbx,%rax,8)
movupd -0x10(%rdx,%rax,8),%xmm0
movupd (%rdx,%rax,8),%xmm1
movupd %xmm0,0x20(%rbp,%rax,8)
movupd %xmm1,0x30(%rbp,%rax,8)
movups %xmm2,0x20(%rbx,%rax,8)
movups %xmm2,0x30(%rbx,%rax,8)
add    $0x8,%rax
add    $0xfffffffffffffffe,%rcx
jne    1440 <fsub+0x300>
testb  $0x1,0xa8(%rsp)
01
je     14c1 <fsub+0x381>
lea    (%rax,%r15,1),%rcx
mov    0x8(%rsp),%rdx
movupd (%rdx,%rcx,8),%xmm0
movupd 0x10(%rdx,%rcx,8),%xmm1
movupd %xmm0,0x0(%rbp,%rax,8)
movupd %xmm1,0x10(%rbp,%rax,8)
xorpd  %xmm0,%xmm0
movupd %xmm0,(%rbx,%rax,8)
movupd %xmm0,0x10(%rbx,%rax,8)
mov    0x30(%rsp),%rcx
mov    %rcx,%rax
cmp    %r13,%rcx
jne    1353 <fsub+0x213>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rbp,%rdi
mov    %r12d,%esi
mov    $0x1,%edx
call   1050 <mdisplay@plt>
test   %r12d,%r12d
mov    0x18(%rsp),%rdi
jle    12d5 <fsub+0x195>
mov    0x40(%rsp),%rax
lea    (%rax,%r15,8),%rcx
mov    %rcx,0xd0(%rsp)
mov    0x20(%rsp),%rcx
lea    (%rax,%rcx,8),%rax
mov    %rax,0xc8(%rsp)
mov    0x70(%rsp),%r13
xor    %r15d,%r15d
jmp    1573 <fsub+0x433>
nopw   0x0(%rax,%rax,1)
mov    0x68(%rsp),%rax
movsd  (%rax,%r15,8),%xmm1
subsd  %xmm0,%xmm1
add    %r15,%r12
mov    0x70(%rsp),%rax
divsd  (%rax,%r12,8),%xmm1
movsd  %xmm1,(%rbx,%r15,8)
add    $0x1,%r15
add    0x80(%rsp),%r13
cmp    0x60(%rsp),%r15
mov    0xf0(%rsp),%rsi
mov    0x18(%rsp),%rdi
je     15d0 <fsub+0x490>
mov    %r15,%r12
imul   0x78(%rsp),%r12
xorpd  %xmm0,%xmm0
test   %r15,%r15
je     1530 <fsub+0x3f0>
xor    %ebp,%ebp
nopw   0x0(%rax,%rax,1)
movsd  0x0(%r13,%rbp,8),%xmm1
mulsd  (%rbx,%rbp,8),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,0x20(%rsp)
mov    %r14,%rdi
call   1040 <printf@plt>
movsd  0x20(%rsp),%xmm0
add    $0x1,%rbp
cmp    %rbp,%r15
jne    1590 <fsub+0x450>
jmp    1530 <fsub+0x3f0>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    0xc0(%rsp),%r12
test   %r12d,%r12d
mov    0x68(%rsp),%rbp
mov    0x60(%rsp),%r13
jle    12d5 <fsub+0x195>
cmp    $0x4,%r12d
jb     1612 <fsub+0x4d2>
mov    0xd0(%rsp),%rax
cmp    0x38(%rsp),%rax
jae    16ab <fsub+0x56b>
cmp    0xc8(%rsp),%rbx
jae    16ab <fsub+0x56b>
xor    %eax,%eax
mov    %rax,%rcx
not    %rcx
add    %r13,%rcx
mov    0xb0(%rsp),%rdx
test   %rdx,%rdx
je     1644 <fsub+0x504>
mov    0x50(%rsp),%rsi
nop
movsd  (%rbx,%rax,8),%xmm0
movsd  %xmm0,(%rsi,%rax,8)
add    $0x1,%rax
add    $0xffffffffffffffff,%rdx
jne    1630 <fsub+0x4f0>
cmp    $0x3,%rcx
jb     12d5 <fsub+0x195>
xchg   %ax,%ax
movsd  (%rbx,%rax,8),%xmm0
movsd  %xmm0,-0x10(%rdi,%rax,8)
movsd  0x8(%rbx,%rax,8),%xmm0
movsd  %xmm0,-0x8(%rdi,%rax,8)
movsd  0x10(%rbx,%rax,8),%xmm0
movsd  %xmm0,(%rdi,%rax,8)
movsd  0x18(%rbx,%rax,8),%xmm0
movsd  %xmm0,0x8(%rdi,%rax,8)
add    $0x4,%rax
cmp    %rax,%r13
jne    1650 <fsub+0x510>
jmp    12d5 <fsub+0x195>
xor    %eax,%eax
mov    %r8,%rsi
jmp    1353 <fsub+0x213>
xor    %eax,%eax
testb  $0x1,0xa8(%rsp)
01
jne    1492 <fsub+0x352>
jmp    14c1 <fsub+0x381>
cmpq   $0xc,0x28(%rsp)
mov    0x48(%rsp),%rdx
jae    16bc <fsub+0x57c>
xor    %eax,%eax
jmp    172c <fsub+0x5ec>
mov    0x88(%rsp),%rcx
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
movups (%rbx,%rax,8),%xmm0
movups 0x10(%rbx,%rax,8),%xmm1
movups %xmm0,-0x70(%rdx,%rax,8)
movups %xmm1,-0x60(%rdx,%rax,8)
movups 0x20(%rbx,%rax,8),%xmm0
movups 0x30(%rbx,%rax,8),%xmm1
movups %xmm0,-0x50(%rdx,%rax,8)
movups %xmm1,-0x40(%rdx,%rax,8)
movups 0x40(%rbx,%rax,8),%xmm0
movups 0x50(%rbx,%rax,8),%xmm1
movups %xmm0,-0x30(%rdx,%rax,8)
movups %xmm1,-0x20(%rdx,%rax,8)
movupd 0x60(%rbx,%rax,8),%xmm0
movupd 0x70(%rbx,%rax,8),%xmm1
movupd %xmm0,-0x10(%rdx,%rax,8)
movupd %xmm1,(%rdx,%rax,8)
add    $0x10,%rax
add    $0xfffffffffffffffc,%rcx
jne    16d0 <fsub+0x590>
cmpq   $0x0,0x98(%rsp)
je     176f <fsub+0x62f>
lea    (%rdi,%rax,8),%rcx
mov    0x90(%rsp),%rdx
lea    (%rdx,%rax,8),%rax
xor    %edx,%edx
nopl   0x0(%rax)
movupd -0x10(%rax,%rdx,1),%xmm0
movupd (%rax,%rdx,1),%xmm1
movupd %xmm0,-0x10(%rcx,%rdx,1)
movupd %xmm1,(%rcx,%rdx,1)
add    $0x20,%rdx
cmp    %rdx,%rsi
jne    1750 <fsub+0x610>
mov    0x30(%rsp),%rcx
mov    %rcx,%rax
cmp    %r13,%rcx
je     12d5 <fsub+0x195>
jmp    1614 <fsub+0x4d4>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %rbp,%rdi
add    $0xf8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <free@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"sum %lf \0A\00"
define void @fsub(double* %0, i32 %1, i32 %2, double* %3, double* %4) {
%6 = alloca double*
%7 = alloca i32
%8 = alloca i32
%9 = alloca double*
%10 = alloca double*
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca double
%17 = alloca double*
%18 = alloca double*
store double* %0, double** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store double* %3, double** %9
store double* %4, double** %10
%19 = load i32, i32* %7
%20 = sext i32 %19 to i64
%21 = mul i64 8, %20
%22 = trunc i64 %21 to i32
%23 = call i64 @malloc(i32 %22)
%24 = inttoptr i64 %23 to double*
store double* %24, double** %17
%25 = load i32, i32* %7
%26 = sext i32 %25 to i64
%27 = mul i64 8, %26
%28 = trunc i64 %27 to i32
%29 = call i64 @malloc(i32 %28)
%30 = inttoptr i64 %29 to double*
store double* %30, double** %18
store i32 0, i32* %14
br label %31
31: ; preds = %142, %5
%32 = load i32, i32* %14
%33 = load i32, i32* %8
%34 = icmp slt i32 %32, %33
br i1 %34, label %35, label %145
35: ; preds = %31
%36 = load i32, i32* %14
%37 = load i32, i32* %7
%38 = mul nsw i32 %36, %37
store i32 %38, i32* %15
store i32 0, i32* %11
br label %39
39: ; preds = %59, %35
%40 = load i32, i32* %11
%41 = load i32, i32* %7
%42 = icmp slt i32 %40, %41
br i1 %42, label %43, label %62
43: ; preds = %39
%44 = load double*, double** %9
%45 = load i32, i32* %15
%46 = load i32, i32* %11
%47 = add nsw i32 %45, %46
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds double, double* %44, i64 %48
%50 = load double, double* %49
%51 = load double*, double** %18
%52 = load i32, i32* %11
%53 = sext i32 %52 to i64
%54 = getelementptr inbounds double, double* %51, i64 %53
store double %50, double* %54
%55 = load double*, double** %17
%56 = load i32, i32* %11
%57 = sext i32 %56 to i64
%58 = getelementptr inbounds double, double* %55, i64 %57
store double 0.000000e+00, double* %58
br label %59
59: ; preds = %43
%60 = load i32, i32* %11
%61 = add nsw i32 %60, 1
store i32 %61, i32* %11
br label %39
62: ; preds = %39
%63 = load double*, double** %18
%64 = load i32, i32* %7
%65 = call i32 @mdisplay(double* %63, i32 %64, i32 1)
store i32 0, i32* %11
br label %66
66: ; preds = %118, %62
%67 = load i32, i32* %11
%68 = load i32, i32* %7
%69 = icmp slt i32 %67, %68
br i1 %69, label %70, label %121
70: ; preds = %66
%71 = load i32, i32* %11
%72 = load i32, i32* %7
%73 = mul nsw i32 %71, %72
store i32 %73, i32* %13
store double 0.000000e+00, double* %16
store i32 0, i32* %12
br label %74
74: ; preds = %95, %70
%75 = load i32, i32* %12
%76 = load i32, i32* %11
%77 = icmp slt i32 %75, %76
br i1 %77, label %78, label %98
78: ; preds = %74
%79 = load double*, double** %6
%80 = load i32, i32* %13
%81 = load i32, i32* %12
%82 = add nsw i32 %80, %81
%83 = sext i32 %82 to i64
%84 = getelementptr inbounds double, double* %79, i64 %83
%85 = load double, double* %84
%86 = load double*, double** %17
%87 = load i32, i32* %12
%88 = sext i32 %87 to i64
%89 = getelementptr inbounds double, double* %86, i64 %88
%90 = load double, double* %89
%91 = load double, double* %16
%92 = call double @llvm.fmuladd.f64(double %85, double %90, double %91)
store double %92, double* %16
%93 = load double, double* %16
%94 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), double %93)
br label %95
95: ; preds = %78
%96 = load i32, i32* %12
%97 = add nsw i32 %96, 1
store i32 %97, i32* %12
br label %74
98: ; preds = %74
%99 = load double*, double** %18
%100 = load i32, i32* %11
%101 = sext i32 %100 to i64
%102 = getelementptr inbounds double, double* %99, i64 %101
%103 = load double, double* %102
%104 = load double, double* %16
%105 = fsub double %103, %104
%106 = load double*, double** %6
%107 = load i32, i32* %13
%108 = load i32, i32* %11
%109 = add nsw i32 %107, %108
%110 = sext i32 %109 to i64
%111 = getelementptr inbounds double, double* %106, i64 %110
%112 = load double, double* %111
%113 = fdiv double %105, %112
%114 = load double*, double** %17
%115 = load i32, i32* %11
%116 = sext i32 %115 to i64
%117 = getelementptr inbounds double, double* %114, i64 %116
store double %113, double* %117
br label %118
118: ; preds = %98
%119 = load i32, i32* %11
%120 = add nsw i32 %119, 1
store i32 %120, i32* %11
br label %66
121: ; preds = %66
store i32 0, i32* %11
br label %122
122: ; preds = %138, %121
%123 = load i32, i32* %11
%124 = load i32, i32* %7
%125 = icmp slt i32 %123, %124
br i1 %125, label %126, label %141
126: ; preds = %122
%127 = load double*, double** %17
%128 = load i32, i32* %11
%129 = sext i32 %128 to i64
%130 = getelementptr inbounds double, double* %127, i64 %129
%131 = load double, double* %130
%132 = load double*, double** %10
%133 = load i32, i32* %15
%134 = load i32, i32* %11
%135 = add nsw i32 %133, %134
%136 = sext i32 %135 to i64
%137 = getelementptr inbounds double, double* %132, i64 %136
store double %131, double* %137
br label %138
138: ; preds = %126
%139 = load i32, i32* %11
%140 = add nsw i32 %139, 1
store i32 %140, i32* %11
br label %122
141: ; preds = %122
br label %142
142: ; preds = %141
%143 = load i32, i32* %14
%144 = add nsw i32 %143, 1
store i32 %144, i32* %14
br label %31
145: ; preds = %31
%146 = load double*, double** %17
%147 = call i32 @free(double* %146)
%148 = load double*, double** %18
%149 = call i32 @free(double* %148)
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"sum %lf \0A\00"
define void @fsub(double* nocapture %0, i32 %1, i32 %2, double* nocapture %3, double* nocapture writeonly %4) {
%6 = shl i32 %1, 3
%7 = tail call i64 @malloc(i32 %6)
%8 = inttoptr i64 %7 to double*
%9 = inttoptr i64 %7 to i8*
%10 = tail call i64 @malloc(i32 %6)
%11 = inttoptr i64 %10 to double*
%12 = inttoptr i64 %10 to i8*
%13 = icmp sgt i32 %2, 0
br i1 %13, label %14, label %315
14: ; preds = %5
%15 = icmp sgt i32 %1, 0
%16 = sext i32 %1 to i64
%17 = zext i32 %2 to i64
%18 = zext i32 %1 to i64
%19 = zext i32 %1 to i64
%20 = zext i32 %1 to i64
%21 = getelementptr double, double* %8, i64 %18
%22 = getelementptr double, double* %11, i64 %18
%23 = bitcast double* %22 to i8*
%24 = getelementptr double, double* %8, i64 %18
%25 = bitcast double* %24 to i8*
%26 = and i64 %18, 4294967292
%27 = add nsw i64 %26, -4
%28 = lshr exact i64 %27, 2
%29 = add nuw nsw i64 %28, 1
%30 = icmp ult i32 %1, 4
%31 = icmp ult i8* %12, %25
%32 = icmp ult i8* %9, %23
%33 = and i1 %31, %32
%34 = and i64 %18, 4294967292
%35 = and i64 %29, 1
%36 = icmp eq i64 %27, 0
%37 = and i64 %29, 9223372036854775806
%38 = icmp eq i64 %35, 0
%39 = icmp eq i64 %34, %18
%40 = and i64 %18, 1
%41 = icmp eq i64 %40, 0
%42 = sub nsw i64 0, %18
%43 = icmp ult i32 %1, 4
%44 = and i64 %18, 4294967292
%45 = and i64 %29, 3
%46 = icmp ult i64 %27, 12
%47 = and i64 %29, 9223372036854775804
%48 = icmp eq i64 %45, 0
%49 = icmp eq i64 %44, %18
%50 = and i64 %18, 3
%51 = icmp eq i64 %50, 0
br label %52
52: ; preds = %14, %312
%53 = phi i64 [ 0, %14 ], [ %313, %312 ]
%54 = mul i64 %53, %16
%55 = getelementptr double, double* %3, i64 %54
%56 = add i64 %54, %18
%57 = getelementptr double, double* %3, i64 %56
%58 = bitcast double* %57 to i8*
%59 = mul i64 %53, %16
%60 = getelementptr double, double* %4, i64 %59
%61 = add i64 %59, %18
%62 = getelementptr double, double* %4, i64 %61
%63 = bitcast double* %62 to i8*
%64 = mul nsw i64 %53, %16
br i1 %15, label %65, label %145
65: ; preds = %52
br i1 %30, label %132, label %66
66: ; preds = %65
%67 = icmp ult i8* %12, %58
%68 = icmp ult double* %55, %22
%69 = and i1 %67, %68
%70 = or i1 %33, %69
%71 = icmp ult i8* %9, %58
%72 = icmp ult double* %55, %24
%73 = and i1 %71, %72
%74 = or i1 %70, %73
br i1 %74, label %132, label %75
75: ; preds = %66
br i1 %36, label %113, label %76
76: ; preds = %75, %76
%77 = phi i64 [ %110, %76 ], [ 0, %75 ]
%78 = phi i64 [ %111, %76 ], [ 0, %75 ]
%79 = add nsw i64 %77, %64
%80 = getelementptr inbounds double, double* %3, i64 %79
%81 = bitcast double* %80 to <2 x double>*
%82 = load <2 x double>, <2 x double>* %81
%83 = getelementptr inbounds double, double* %80, i64 2
%84 = bitcast double* %83 to <2 x double>*
%85 = load <2 x double>, <2 x double>* %84
%86 = getelementptr inbounds double, double* %11, i64 %77
%87 = bitcast double* %86 to <2 x double>*
store <2 x double> %82, <2 x double>* %87
%88 = getelementptr inbounds double, double* %86, i64 2
%89 = bitcast double* %88 to <2 x double>*
store <2 x double> %85, <2 x double>* %89
%90 = getelementptr inbounds double, double* %8, i64 %77
%91 = bitcast double* %90 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %91
%92 = getelementptr inbounds double, double* %90, i64 2
%93 = bitcast double* %92 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %93
%94 = or i64 %77, 4
%95 = add nsw i64 %94, %64
%96 = getelementptr inbounds double, double* %3, i64 %95
%97 = bitcast double* %96 to <2 x double>*
%98 = load <2 x double>, <2 x double>* %97
%99 = getelementptr inbounds double, double* %96, i64 2
%100 = bitcast double* %99 to <2 x double>*
%101 = load <2 x double>, <2 x double>* %100
%102 = getelementptr inbounds double, double* %11, i64 %94
%103 = bitcast double* %102 to <2 x double>*
store <2 x double> %98, <2 x double>* %103
%104 = getelementptr inbounds double, double* %102, i64 2
%105 = bitcast double* %104 to <2 x double>*
store <2 x double> %101, <2 x double>* %105
%106 = getelementptr inbounds double, double* %8, i64 %94
%107 = bitcast double* %106 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %107
%108 = getelementptr inbounds double, double* %106, i64 2
%109 = bitcast double* %108 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %109
%110 = add nuw i64 %77, 8
%111 = add i64 %78, 2
%112 = icmp eq i64 %111, %37
br i1 %112, label %113, label %76
113: ; preds = %76, %75
%114 = phi i64 [ 0, %75 ], [ %110, %76 ]
br i1 %38, label %131, label %115
115: ; preds = %113
%116 = add nsw i64 %114, %64
%117 = getelementptr inbounds double, double* %3, i64 %116
%118 = bitcast double* %117 to <2 x double>*
%119 = load <2 x double>, <2 x double>* %118
%120 = getelementptr inbounds double, double* %117, i64 2
%121 = bitcast double* %120 to <2 x double>*
%122 = load <2 x double>, <2 x double>* %121
%123 = getelementptr inbounds double, double* %11, i64 %114
%124 = bitcast double* %123 to <2 x double>*
store <2 x double> %119, <2 x double>* %124
%125 = getelementptr inbounds double, double* %123, i64 2
%126 = bitcast double* %125 to <2 x double>*
store <2 x double> %122, <2 x double>* %126
%127 = getelementptr inbounds double, double* %8, i64 %114
%128 = bitcast double* %127 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %128
%129 = getelementptr inbounds double, double* %127, i64 2
%130 = bitcast double* %129 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %130
br label %131
131: ; preds = %113, %115
br i1 %39, label %162, label %132
132: ; preds = %66, %65, %131
%133 = phi i64 [ 0, %66 ], [ 0, %65 ], [ %34, %131 ]
%134 = xor i64 %133, -1
br i1 %41, label %142, label %135
135: ; preds = %132
%136 = add nsw i64 %133, %64
%137 = getelementptr inbounds double, double* %3, i64 %136
%138 = load double, double* %137
%139 = getelementptr inbounds double, double* %11, i64 %133
store double %138, double* %139
%140 = getelementptr inbounds double, double* %8, i64 %133
store double 0.000000e+00, double* %140
%141 = or i64 %133, 1
br label %142
142: ; preds = %135, %132
%143 = phi i64 [ %133, %132 ], [ %141, %135 ]
%144 = icmp eq i64 %134, %42
br i1 %144, label %162, label %147
145: ; preds = %52
%146 = tail call i32 @mdisplay(double* %11, i32 %1, i32 1)
br label %312
147: ; preds = %142, %147
%148 = phi i64 [ %160, %147 ], [ %143, %142 ]
%149 = add nsw i64 %148, %64
%150 = getelementptr inbounds double, double* %3, i64 %149
%151 = load double, double* %150
%152 = getelementptr inbounds double, double* %11, i64 %148
store double %151, double* %152
%153 = getelementptr inbounds double, double* %8, i64 %148
store double 0.000000e+00, double* %153
%154 = add nuw nsw i64 %148, 1
%155 = add nsw i64 %154, %64
%156 = getelementptr inbounds double, double* %3, i64 %155
%157 = load double, double* %156
%158 = getelementptr inbounds double, double* %11, i64 %154
store double %157, double* %158
%159 = getelementptr inbounds double, double* %8, i64 %154
store double 0.000000e+00, double* %159
%160 = add nuw nsw i64 %148, 2
%161 = icmp eq i64 %160, %18
br i1 %161, label %162, label %147
162: ; preds = %142, %147, %131
%163 = tail call i32 @mdisplay(double* %11, i32 %1, i32 1)
br i1 %15, label %261, label %312
164: ; preds = %277
br i1 %15, label %165, label %312
165: ; preds = %164
br i1 %43, label %244, label %166
166: ; preds = %165
%167 = icmp ult double* %60, %21
%168 = icmp ult i8* %9, %63
%169 = and i1 %167, %168
br i1 %169, label %244, label %170
170: ; preds = %166
br i1 %46, label %224, label %171
171: ; preds = %170, %171
%172 = phi i64 [ %221, %171 ], [ 0, %170 ]
%173 = phi i64 [ %222, %171 ], [ 0, %170 ]
%174 = getelementptr inbounds double, double* %8, i64 %172
%175 = bitcast double* %174 to <2 x double>*
%176 = load <2 x double>, <2 x double>* %175
%177 = getelementptr inbounds double, double* %174, i64 2
%178 = bitcast double* %177 to <2 x double>*
%179 = load <2 x double>, <2 x double>* %178
%180 = add nsw i64 %172, %64
%181 = getelementptr inbounds double, double* %4, i64 %180
%182 = bitcast double* %181 to <2 x double>*
store <2 x double> %176, <2 x double>* %182
%183 = getelementptr inbounds double, double* %181, i64 2
%184 = bitcast double* %183 to <2 x double>*
store <2 x double> %179, <2 x double>* %184
%185 = or i64 %172, 4
%186 = getelementptr inbounds double, double* %8, i64 %185
%187 = bitcast double* %186 to <2 x double>*
%188 = load <2 x double>, <2 x double>* %187
%189 = getelementptr inbounds double, double* %186, i64 2
%190 = bitcast double* %189 to <2 x double>*
%191 = load <2 x double>, <2 x double>* %190
%192 = add nsw i64 %185, %64
%193 = getelementptr inbounds double, double* %4, i64 %192
%194 = bitcast double* %193 to <2 x double>*
store <2 x double> %188, <2 x double>* %194
%195 = getelementptr inbounds double, double* %193, i64 2
%196 = bitcast double* %195 to <2 x double>*
store <2 x double> %191, <2 x double>* %196
%197 = or i64 %172, 8
%198 = getelementptr inbounds double, double* %8, i64 %197
%199 = bitcast double* %198 to <2 x double>*
%200 = load <2 x double>, <2 x double>* %199
%201 = getelementptr inbounds double, double* %198, i64 2
%202 = bitcast double* %201 to <2 x double>*
%203 = load <2 x double>, <2 x double>* %202
%204 = add nsw i64 %197, %64
%205 = getelementptr inbounds double, double* %4, i64 %204
%206 = bitcast double* %205 to <2 x double>*
store <2 x double> %200, <2 x double>* %206
%207 = getelementptr inbounds double, double* %205, i64 2
%208 = bitcast double* %207 to <2 x double>*
store <2 x double> %203, <2 x double>* %208
%209 = or i64 %172, 12
%210 = getelementptr inbounds double, double* %8, i64 %209
%211 = bitcast double* %210 to <2 x double>*
%212 = load <2 x double>, <2 x double>* %211
%213 = getelementptr inbounds double, double* %210, i64 2
%214 = bitcast double* %213 to <2 x double>*
%215 = load <2 x double>, <2 x double>* %214
%216 = add nsw i64 %209, %64
%217 = getelementptr inbounds double, double* %4, i64 %216
%218 = bitcast double* %217 to <2 x double>*
store <2 x double> %212, <2 x double>* %218
%219 = getelementptr inbounds double, double* %217, i64 2
%220 = bitcast double* %219 to <2 x double>*
store <2 x double> %215, <2 x double>* %220
%221 = add nuw i64 %172, 16
%222 = add nuw i64 %173, 4
%223 = icmp eq i64 %222, %47
br i1 %223, label %224, label %171
224: ; preds = %171, %170
%225 = phi i64 [ 0, %170 ], [ %221, %171 ]
br i1 %48, label %243, label %226
226: ; preds = %224, %226
%227 = phi i64 [ %240, %226 ], [ %225, %224 ]
%228 = phi i64 [ %241, %226 ], [ 0, %224 ]
%229 = getelementptr inbounds double, double* %8, i64 %227
%230 = bitcast double* %229 to <2 x double>*
%231 = load <2 x double>, <2 x double>* %230
%232 = getelementptr inbounds double, double* %229, i64 2
%233 = bitcast double* %232 to <2 x double>*
%234 = load <2 x double>, <2 x double>* %233
%235 = add nsw i64 %227, %64
%236 = getelementptr inbounds double, double* %4, i64 %235
%237 = bitcast double* %236 to <2 x double>*
store <2 x double> %231, <2 x double>* %237
%238 = getelementptr inbounds double, double* %236, i64 2
%239 = bitcast double* %238 to <2 x double>*
store <2 x double> %234, <2 x double>* %239
%240 = add nuw i64 %227, 4
%241 = add i64 %228, 1
%242 = icmp eq i64 %241, %45
br i1 %242, label %243, label %226
243: ; preds = %226, %224
br i1 %49, label %312, label %244
244: ; preds = %166, %165, %243
%245 = phi i64 [ 0, %166 ], [ 0, %165 ], [ %44, %243 ]
%246 = xor i64 %245, -1
%247 = add nsw i64 %246, %18
br i1 %51, label %258, label %248
248: ; preds = %244, %248
%249 = phi i64 [ %255, %248 ], [ %245, %244 ]
%250 = phi i64 [ %256, %248 ], [ 0, %244 ]
%251 = getelementptr inbounds double, double* %8, i64 %249
%252 = load double, double* %251
%253 = add nsw i64 %249, %64
%254 = getelementptr inbounds double, double* %4, i64 %253
store double %252, double* %254
%255 = add nuw nsw i64 %249, 1
%256 = add i64 %250, 1
%257 = icmp eq i64 %256, %50
br i1 %257, label %258, label %248
258: ; preds = %248, %244
%259 = phi i64 [ %245, %244 ], [ %255, %248 ]
%260 = icmp ult i64 %247, 3
br i1 %260, label %312, label %289
261: ; preds = %162, %277
%262 = phi i64 [ %287, %277 ], [ 0, %162 ]
%263 = mul nsw i64 %262, %16
%264 = icmp eq i64 %262, 0
br i1 %264, label %277, label %265
265: ; preds = %261, %265
%266 = phi i64 [ %275, %265 ], [ 0, %261 ]
%267 = phi double [ %273, %265 ], [ 0.000000e+00, %261 ]
%268 = add nsw i64 %266, %263
%269 = getelementptr inbounds double, double* %0, i64 %268
%270 = load double, double* %269
%271 = getelementptr inbounds double, double* %8, i64 %266
%272 = load double, double* %271
%273 = tail call double @llvm.fmuladd.f64(double %270, double %272, double %267)
%274 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), double %273)
%275 = add nuw nsw i64 %266, 1
%276 = icmp eq i64 %275, %262
br i1 %276, label %277, label %265
277: ; preds = %265, %261
%278 = phi double [ 0.000000e+00, %261 ], [ %273, %265 ]
%279 = getelementptr inbounds double, double* %11, i64 %262
%280 = load double, double* %279
%281 = fsub double %280, %278
%282 = add nsw i64 %263, %262
%283 = getelementptr inbounds double, double* %0, i64 %282
%284 = load double, double* %283
%285 = fdiv double %281, %284
%286 = getelementptr inbounds double, double* %8, i64 %262
store double %285, double* %286
%287 = add nuw nsw i64 %262, 1
%288 = icmp eq i64 %287, %19
br i1 %288, label %164, label %261
289: ; preds = %258, %289
%290 = phi i64 [ %310, %289 ], [ %259, %258 ]
%291 = getelementptr inbounds double, double* %8, i64 %290
%292 = load double, double* %291
%293 = add nsw i64 %290, %64
%294 = getelementptr inbounds double, double* %4, i64 %293
store double %292, double* %294
%295 = add nuw nsw i64 %290, 1
%296 = getelementptr inbounds double, double* %8, i64 %295
%297 = load double, double* %296
%298 = add nsw i64 %295, %64
%299 = getelementptr inbounds double, double* %4, i64 %298
store double %297, double* %299
%300 = add nuw nsw i64 %290, 2
%301 = getelementptr inbounds double, double* %8, i64 %300
%302 = load double, double* %301
%303 = add nsw i64 %300, %64
%304 = getelementptr inbounds double, double* %4, i64 %303
store double %302, double* %304
%305 = add nuw nsw i64 %290, 3
%306 = getelementptr inbounds double, double* %8, i64 %305
%307 = load double, double* %306
%308 = add nsw i64 %305, %64
%309 = getelementptr inbounds double, double* %4, i64 %308
store double %307, double* %309
%310 = add nuw nsw i64 %290, 4
%311 = icmp eq i64 %310, %20
br i1 %311, label %312, label %289
312: ; preds = %258, %289, %243, %162, %145, %164
%313 = add nuw nsw i64 %53, 1
%314 = icmp eq i64 %313, %17
br i1 %314, label %315, label %52
315: ; preds = %312, %5
%316 = tail call i32 @free(double* %8)
%317 = tail call i32 @free(double* %11)
ret void
}