void newton_nle_fd() {
  int N, it;
  double *x, *y, *xi, *f, *J;
  double stop, h;
  int *p;
  N = 2;
  it = 0;
  x = (double *)malloc(sizeof(double) * N);
  y = (double *)malloc(sizeof(double) * N);
  xi = (double *)malloc(sizeof(double) * N);
  f = (double *)malloc(sizeof(double) * N);
  J = (double *)malloc(sizeof(double) * N * N);
  p = (int *)malloc(sizeof(int) * N);
  x[0] = 2;
  x[1] = 3;
  f[0] = func1(x, N);
  f[1] = func2(x, N);
  stop = array_max_abs(f, N);
  while (stop >= 1e-06 && it < 100) {
    f[0] = func1(x, N);
    f[1] = func2(x, N);
    stop = array_max_abs(f, N);
    h = 1e-15 * x[0];
    y[0] = x[0] + h;
    y[1] = x[1];
    J[0] = (func1(y, N) - func1(x, N)) / h;
    J[2] = (func2(y, N) - func2(x, N)) / h;
    h = 1e-15 * x[1];
    y[0] = x[0];
    y[1] = x[1] + h;
    J[1] = (func1(y, N) - func1(x, N)) / h;
    J[3] = (func2(y, N) - func2(x, N)) / h;
    ludecomp(J, N, p);
    linsolve(J, N, f, p, xi);
    msub(x, xi, x, N, N);
    it++;
    printf("Method 2 : Values obtained %lf , %lf after %d Iterations \n", x[0],
           x[1], it);
  }
  printf("Method 2 : Values obtained %lf , %lf after %d Iterations \n", x[0],
         x[1], it);
  free(x);
  free(y);
  free(xi);
  free(f);
  free(J);
  free(p);
}


x86 assembly (clang, -O0):
<newton_nle_fd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x2,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movslq -0x4(%rbp),%rdi
shl    $0x3,%rdi
call   1090 <malloc@plt>
mov    %rax,-0x10(%rbp)
movslq -0x4(%rbp),%rdi
shl    $0x3,%rdi
call   1090 <malloc@plt>
mov    %rax,-0x18(%rbp)
movslq -0x4(%rbp),%rdi
shl    $0x3,%rdi
call   1090 <malloc@plt>
mov    %rax,-0x20(%rbp)
movslq -0x4(%rbp),%rdi
shl    $0x3,%rdi
call   1090 <malloc@plt>
mov    %rax,-0x28(%rbp)
movslq -0x4(%rbp),%rdi
shl    $0x3,%rdi
movslq -0x4(%rbp),%rax
imul   %rax,%rdi
call   1090 <malloc@plt>
mov    %rax,-0x30(%rbp)
movslq -0x4(%rbp),%rdi
shl    $0x2,%rdi
call   1090 <malloc@plt>
mov    %rax,-0x48(%rbp)
mov    -0x10(%rbp),%rax
movsd  0xde8(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movsd  0xdd0(%rip),%xmm0
movsd  %xmm0,0x8(%rax)
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%esi
mov    $0x0,%al
call   1040 <func1@plt>
cvtsi2sd %eax,%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%esi
mov    $0x0,%al
call   1080 <func2@plt>
cvtsi2sd %eax,%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x28(%rbp),%rdi
mov    -0x4(%rbp),%esi
mov    $0x0,%al
call   10b0 <array_max_abs@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
xor    %eax,%eax
movsd  0xd80(%rip),%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x49(%rbp)
jb     12a7 <newton_nle_fd+0x117>
cmpl   $0x64,-0x8(%rbp)
setl   %al
mov    %al,-0x49(%rbp)
mov    -0x49(%rbp),%al
test   $0x1,%al
jne    12b7 <newton_nle_fd+0x127>
jmp    14d1 <newton_nle_fd+0x341>
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%esi
mov    $0x0,%al
call   1040 <func1@plt>
cvtsi2sd %eax,%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%esi
mov    $0x0,%al
call   1080 <func2@plt>
cvtsi2sd %eax,%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x28(%rbp),%rdi
mov    -0x4(%rbp),%esi
mov    $0x0,%al
call   10b0 <array_max_abs@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x10(%rbp),%rax
movsd  0xd09(%rip),%xmm0
mulsd  (%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
addsd  -0x40(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x18(%rbp),%rdi
mov    -0x4(%rbp),%esi
mov    $0x0,%al
call   1040 <func1@plt>
mov    %eax,-0x5c(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%esi
mov    $0x0,%al
call   1040 <func1@plt>
mov    %eax,%ecx
mov    -0x5c(%rbp),%eax
sub    %ecx,%eax
cvtsi2sd %eax,%xmm0
divsd  -0x40(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x18(%rbp),%rdi
mov    -0x4(%rbp),%esi
mov    $0x0,%al
call   1080 <func2@plt>
mov    %eax,-0x58(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%esi
mov    $0x0,%al
call   1080 <func2@plt>
mov    %eax,%ecx
mov    -0x58(%rbp),%eax
sub    %ecx,%eax
cvtsi2sd %eax,%xmm0
divsd  -0x40(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x10(%rax)
mov    -0x10(%rbp),%rax
movsd  0xc5e(%rip),%xmm0
mulsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
addsd  -0x40(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x18(%rbp),%rdi
mov    -0x4(%rbp),%esi
mov    $0x0,%al
call   1040 <func1@plt>
mov    %eax,-0x54(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%esi
mov    $0x0,%al
call   1040 <func1@plt>
mov    %eax,%ecx
mov    -0x54(%rbp),%eax
sub    %ecx,%eax
cvtsi2sd %eax,%xmm0
divsd  -0x40(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x18(%rbp),%rdi
mov    -0x4(%rbp),%esi
mov    $0x0,%al
call   1080 <func2@plt>
mov    %eax,-0x50(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%esi
mov    $0x0,%al
call   1080 <func2@plt>
mov    %eax,%ecx
mov    -0x50(%rbp),%eax
sub    %ecx,%eax
cvtsi2sd %eax,%xmm0
divsd  -0x40(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x18(%rax)
mov    -0x30(%rbp),%rdi
mov    -0x4(%rbp),%esi
mov    -0x48(%rbp),%rdx
mov    $0x0,%al
call   10a0 <ludecomp@plt>
mov    -0x30(%rbp),%rdi
mov    -0x4(%rbp),%esi
mov    -0x28(%rbp),%rdx
mov    -0x48(%rbp),%rcx
mov    -0x20(%rbp),%r8
mov    $0x0,%al
call   1070 <linsolve@plt>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x4(%rbp),%ecx
mov    -0x4(%rbp),%r8d
mov    $0x0,%al
call   1050 <msub@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    -0x8(%rbp),%esi
lea    0xb5b(%rip),%rdi
mov    $0x2,%al
call   1060 <printf@plt>
jmp    1281 <newton_nle_fd+0xf1>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    -0x8(%rbp),%esi
lea    0xb34(%rip),%rdi
mov    $0x2,%al
call   1060 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
mov    -0x28(%rbp),%rdi
call   1030 <free@plt>
mov    -0x30(%rbp),%rdi
call   1030 <free@plt>
mov    -0x48(%rbp),%rdi
call   1030 <free@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<newton_nle_fd>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    $0x10,%edi
call   1090 <malloc@plt>
mov    %rax,%rbx
mov    $0x10,%edi
call   1090 <malloc@plt>
mov    %rax,%r14
mov    $0x10,%edi
call   1090 <malloc@plt>
mov    %rax,0x20(%rsp)
mov    $0x10,%edi
call   1090 <malloc@plt>
mov    %rax,%r12
mov    $0x20,%edi
call   1090 <malloc@plt>
mov    %rax,%r13
mov    $0x8,%edi
call   1090 <malloc@plt>
mov    %rax,0x18(%rsp)
movaps 0xe09(%rip),%xmm0
movups %xmm0,(%rbx)
xor    %ebp,%ebp
mov    %rbx,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1040 <func1@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,(%r12)
mov    %rbx,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1080 <func2@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x8(%r12)
mov    %r12,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   10b0 <array_max_abs@plt>
test   %eax,%eax
jle    1448 <newton_nle_fd+0x2b8>
xor    %r15d,%r15d
nop
mov    %rbx,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1040 <func1@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,(%r12)
mov    %rbx,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1080 <func2@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x8(%r12)
mov    %r12,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   10b0 <array_max_abs@plt>
mov    %eax,0x14(%rsp)
movsd  (%rbx),%xmm0
movapd %xmm0,%xmm2
movsd  0xd64(%rip),%xmm1
mulsd  %xmm1,%xmm2
movsd  %xmm2,0x8(%rsp)
addsd  %xmm2,%xmm0
movsd  %xmm0,(%r14)
movsd  0x8(%rbx),%xmm0
movsd  %xmm0,0x8(%r14)
mov    %r14,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1040 <func1@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1040 <func1@plt>
sub    %eax,%ebp
xorps  %xmm0,%xmm0
cvtsi2sd %ebp,%xmm0
divsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x0(%r13)
mov    %r14,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1080 <func2@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1080 <func2@plt>
sub    %eax,%ebp
xorps  %xmm0,%xmm0
cvtsi2sd %ebp,%xmm0
divsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x10(%r13)
movsd  (%rbx),%xmm0
movsd  0x8(%rbx),%xmm1
movapd %xmm1,%xmm2
mulsd  0xcc7(%rip),%xmm2
movsd  %xmm2,0x8(%rsp)
movsd  %xmm0,(%r14)
addsd  %xmm2,%xmm1
movsd  %xmm1,0x8(%r14)
mov    %r14,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1040 <func1@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1040 <func1@plt>
sub    %eax,%ebp
xorps  %xmm0,%xmm0
cvtsi2sd %ebp,%xmm0
divsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x8(%r13)
mov    %r14,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1080 <func2@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1080 <func2@plt>
sub    %eax,%ebp
xorps  %xmm0,%xmm0
cvtsi2sd %ebp,%xmm0
divsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x18(%r13)
mov    %r13,%rdi
mov    $0x2,%esi
mov    0x18(%rsp),%rbp
mov    %rbp,%rdx
xor    %eax,%eax
call   10a0 <ludecomp@plt>
mov    %r13,%rdi
mov    $0x2,%esi
mov    %r12,%rdx
mov    %rbp,%rcx
mov    0x20(%rsp),%rbp
mov    %rbp,%r8
xor    %eax,%eax
call   1070 <linsolve@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    %rbx,%rdx
mov    $0x2,%ecx
mov    $0x2,%r8d
xor    %eax,%eax
call   1050 <msub@plt>
lea    0x1(%r15),%ebp
movsd  (%rbx),%xmm0
movsd  0x8(%rbx),%xmm1
lea    0xbed(%rip),%rdi
mov    %ebp,%esi
mov    $0x2,%al
call   1060 <printf@plt>
cmpl   $0x0,0x14(%rsp)
jle    1448 <newton_nle_fd+0x2b8>
cmp    $0x63,%r15d
mov    %ebp,%r15d
jb     1250 <newton_nle_fd+0xc0>
movsd  (%rbx),%xmm0
movsd  0x8(%rbx),%xmm1
lea    0xbc0(%rip),%rdi
mov    %ebp,%esi
mov    $0x2,%al
call   1060 <printf@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r14,%rdi
call   1030 <free@plt>
mov    0x20(%rsp),%rdi
call   1030 <free@plt>
mov    %r12,%rdi
call   1030 <free@plt>
mov    %r13,%rdi
call   1030 <free@plt>
mov    0x18(%rsp),%rdi
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <free@plt>

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

LLVM IR (-O2):
@.str = [59 x i8] c"Method 2 : Values obtained %lf , %lf after %d Iterations \0A\00"
define void @newton_nle_fd() {
%1 = tail call dereferenceable_or_null(16) i8* @malloc(i64 16)
%2 = bitcast i8* %1 to double*
%3 = tail call dereferenceable_or_null(16) i8* @malloc(i64 16)
%4 = bitcast i8* %3 to double*
%5 = tail call dereferenceable_or_null(16) i8* @malloc(i64 16)
%6 = bitcast i8* %5 to double*
%7 = tail call dereferenceable_or_null(16) i8* @malloc(i64 16)
%8 = bitcast i8* %7 to double*
%9 = tail call dereferenceable_or_null(32) i8* @malloc(i64 32)
%10 = bitcast i8* %9 to double*
%11 = tail call dereferenceable_or_null(8) i8* @malloc(i64 8)
%12 = bitcast i8* %11 to i32*
%13 = getelementptr inbounds double, double* %2, i64 1
%14 = bitcast i8* %1 to <2 x double>*
store <2 x double> <double 2.000000e+00, double 3.000000e+00>, <2 x double>* %14
%15 = tail call i32 (double*, i32, ...) bitcast (i32 (...)* @func1 to i32 (double*, i32, ...)*)(double* %2, i32 2)
%16 = sitofp i32 %15 to double
store double %16, double* %8
%17 = tail call i32 (double*, i32, ...) bitcast (i32 (...)* @func2 to i32 (double*, i32, ...)*)(double* %2, i32 2)
%18 = sitofp i32 %17 to double
%19 = getelementptr inbounds double, double* %8, i64 1
store double %18, double* %19
%20 = tail call i32 (double*, i32, ...) bitcast (i32 (...)* @array_max_abs to i32 (double*, i32, ...)*)(double* %8, i32 2)
%21 = icmp sgt i32 %20, 0
br i1 %21, label %22, label %72
22: ; preds = %0
%23 = getelementptr inbounds double, double* %4, i64 1
%24 = getelementptr inbounds double, double* %10, i64 2
%25 = getelementptr inbounds double, double* %10, i64 1
%26 = getelementptr inbounds double, double* %10, i64 3
br label %27
27: ; preds = %22, %27
%28 = phi i32 [ 0, %22 ], [ %65, %27 ]
%29 = tail call i32 (double*, i32, ...) bitcast (i32 (...)* @func1 to i32 (double*, i32, ...)*)(double* %2, i32 2)
%30 = sitofp i32 %29 to double
store double %30, double* %8
%31 = tail call i32 (double*, i32, ...) bitcast (i32 (...)* @func2 to i32 (double*, i32, ...)*)(double* %2, i32 2)
%32 = sitofp i32 %31 to double
store double %32, double* %19
%33 = tail call i32 (double*, i32, ...) bitcast (i32 (...)* @array_max_abs to i32 (double*, i32, ...)*)(double* %8, i32 2)
%34 = load double, double* %2
%35 = fmul double %34, 1.000000e-15
%36 = fadd double %34, %35
store double %36, double* %4
%37 = load double, double* %13
store double %37, double* %23
%38 = tail call i32 (double*, i32, ...) bitcast (i32 (...)* @func1 to i32 (double*, i32, ...)*)(double* %4, i32 2)
%39 = tail call i32 (double*, i32, ...) bitcast (i32 (...)* @func1 to i32 (double*, i32, ...)*)(double* %2, i32 2)
%40 = sub nsw i32 %38, %39
%41 = sitofp i32 %40 to double
%42 = fdiv double %41, %35
store double %42, double* %10
%43 = tail call i32 (double*, i32, ...) bitcast (i32 (...)* @func2 to i32 (double*, i32, ...)*)(double* %4, i32 2)
%44 = tail call i32 (double*, i32, ...) bitcast (i32 (...)* @func2 to i32 (double*, i32, ...)*)(double* %2, i32 2)
%45 = sub nsw i32 %43, %44
%46 = sitofp i32 %45 to double
%47 = fdiv double %46, %35
store double %47, double* %24
%48 = load double, double* %13
%49 = fmul double %48, 1.000000e-15
%50 = load double, double* %2
store double %50, double* %4
%51 = fadd double %48, %49
store double %51, double* %23
%52 = tail call i32 (double*, i32, ...) bitcast (i32 (...)* @func1 to i32 (double*, i32, ...)*)(double* %4, i32 2)
%53 = tail call i32 (double*, i32, ...) bitcast (i32 (...)* @func1 to i32 (double*, i32, ...)*)(double* %2, i32 2)
%54 = sub nsw i32 %52, %53
%55 = sitofp i32 %54 to double
%56 = fdiv double %55, %49
store double %56, double* %25
%57 = tail call i32 (double*, i32, ...) bitcast (i32 (...)* @func2 to i32 (double*, i32, ...)*)(double* %4, i32 2)
%58 = tail call i32 (double*, i32, ...) bitcast (i32 (...)* @func2 to i32 (double*, i32, ...)*)(double* %2, i32 2)
%59 = sub nsw i32 %57, %58
%60 = sitofp i32 %59 to double
%61 = fdiv double %60, %49
store double %61, double* %26
%62 = tail call i32 (double*, i32, i32*, ...) bitcast (i32 (...)* @ludecomp to i32 (double*, i32, i32*, ...)*)(double* %10, i32 2, i32* %12)
%63 = tail call i32 (double*, i32, double*, i32*, double*, ...) bitcast (i32 (...)* @linsolve to i32 (double*, i32, double*, i32*, double*, ...)*)(double* %10, i32 2, double* %8, i32* %12, double* %6)
%64 = tail call i32 (double*, double*, double*, i32, i32, ...) bitcast (i32 (...)* @msub to i32 (double*, double*, double*, i32, i32, ...)*)(double* %2, double* %6, double* %2, i32 2, i32 2)
%65 = add nuw nsw i32 %28, 1
%66 = load double, double* %2
%67 = load double, double* %13
%68 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0), double %66, double %67, i32 %65)
%69 = icmp sgt i32 %33, 0
%70 = icmp ult i32 %28, 99
%71 = and i1 %69, %70
br i1 %71, label %27, label %72
72: ; preds = %27, %0
%73 = phi i32 [ 0, %0 ], [ %65, %27 ]
%74 = load double, double* %2
%75 = load double, double* %13
%76 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0), double %74, double %75, i32 %73)
tail call void @free(i8* %1)
tail call void @free(i8* %3)
tail call void @free(i8* %5)
tail call void @free(i8* %7)
tail call void @free(i8* %9)
tail call void @free(i8* %11)
ret void
}