int main() {
  double **matriz;
  double x = 0.91;
  double a = -1;
  double b = 1;
  double sol;
  int npartes;
  int FIL;
  int COL;
  int j;
  double i;
  npartes = 10;
  FIL = npartes + 1;
  COL = npartes + 2;
  matriz = (double **)malloc(FIL * sizeof(double *));
  for (j = 0; j < COL; j++)
    matriz[j] = (double *)malloc(COL * sizeof(double));
  iniMatriz2(matriz, a, b, npartes, FIL, COL);
  printf("\n\n");
  for (i = a; i < b + 0.01; i += 0.01)
    printf("%lf %lf \n", i, (1 / (25 * pow(i, 2) + 1)));
  printf("\n\n");
  f1(matriz, FIL, COL);
  for (i = a; i < b + 0.01; i += 0.01) {
    sol = Px(matriz, i, FIL, COL);
    printf("%lf %lf \n", i, sol);
  }
  for (j = 0; j < FIL; j++)
    free(matriz[j]);
  free(matriz);
  getchar();
  getchar();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xe79(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xe64(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xe4f(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
movl   $0xa,-0x34(%rbp)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
mov    -0x34(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x3c(%rbp)
movslq -0x38(%rbp),%rdi
shl    $0x3,%rdi
call   1090 <malloc@plt>
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x40(%rbp)
mov    -0x40(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jge    121d <main+0x9d>
movslq -0x3c(%rbp),%rdi
shl    $0x3,%rdi
call   1090 <malloc@plt>
mov    %rax,%rdx
mov    -0x10(%rbp),%rax
movslq -0x40(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    11e7 <main+0x67>
mov    -0x10(%rbp),%rdi
movsd  -0x20(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
mov    -0x34(%rbp),%esi
mov    -0x38(%rbp),%edx
mov    -0x3c(%rbp),%ecx
mov    $0x2,%al
call   1070 <iniMatriz2@plt>
lea    0xdee(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm1
movsd  0xdb8(%rip),%xmm0
addsd  -0x28(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    12dc <main+0x15c>
movsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  0xda2(%rip),%xmm1
call   10a0 <pow@plt>
movaps %xmm0,%xmm2
movsd  -0x50(%rbp),%xmm0
movsd  0xd85(%rip),%xmm1
mulsd  %xmm1,%xmm2
movsd  0xd59(%rip),%xmm1
addsd  %xmm1,%xmm2
movsd  0xd4d(%rip),%xmm1
divsd  %xmm2,%xmm1
lea    0xd75(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movsd  0xd4b(%rip),%xmm0
addsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
jmp    1253 <main+0xd3>
lea    0xd4d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
mov    -0x38(%rbp),%esi
mov    -0x3c(%rbp),%edx
mov    $0x0,%al
call   1080 <f1@plt>
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm1
movsd  0xd06(%rip),%xmm0
addsd  -0x28(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    136f <main+0x1ef>
mov    -0x10(%rbp),%rdi
movsd  -0x48(%rbp),%xmm0
mov    -0x38(%rbp),%esi
mov    -0x3c(%rbp),%edx
mov    $0x1,%al
call   1050 <Px@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
lea    0xce2(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movsd  0xcb8(%rip),%xmm0
addsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
jmp    1305 <main+0x185>
movl   $0x0,-0x40(%rbp)
mov    -0x40(%rbp),%eax
cmp    -0x38(%rbp),%eax
jge    13a1 <main+0x221>
mov    -0x10(%rbp),%rax
movslq -0x40(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    1376 <main+0x1f6>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
mov    $0x0,%al
call   1060 <getchar@plt>
mov    $0x0,%al
call   1060 <getchar@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0x58,%edi
call   10a0 <malloc@plt>
mov    %rax,%r14
mov    $0x60,%edi
call   10a0 <malloc@plt>
mov    %rax,(%r14)
mov    $0x60,%edi
call   10a0 <malloc@plt>
mov    %rax,0x8(%r14)
mov    $0x60,%edi
call   10a0 <malloc@plt>
mov    %rax,0x10(%r14)
mov    $0x60,%edi
call   10a0 <malloc@plt>
mov    %rax,0x18(%r14)
mov    $0x60,%edi
call   10a0 <malloc@plt>
mov    %rax,0x20(%r14)
mov    $0x60,%edi
call   10a0 <malloc@plt>
mov    %rax,0x28(%r14)
mov    $0x60,%edi
call   10a0 <malloc@plt>
mov    %rax,0x30(%r14)
mov    $0x60,%edi
call   10a0 <malloc@plt>
mov    %rax,0x38(%r14)
mov    $0x60,%edi
call   10a0 <malloc@plt>
mov    %rax,0x40(%r14)
mov    $0x60,%edi
call   10a0 <malloc@plt>
mov    %rax,0x48(%r14)
mov    $0x60,%edi
call   10a0 <malloc@plt>
mov    %rax,0x50(%r14)
mov    $0x60,%edi
call   10a0 <malloc@plt>
mov    %rax,0x58(%r14)
movsd  0xdc0(%rip),%xmm0
movsd  0xdc0(%rip),%xmm1
mov    %r14,%rdi
movsd  %xmm0,(%rsp)
mov    $0xa,%esi
mov    $0xb,%edx
mov    $0xc,%ecx
mov    $0x2,%al
call   1080 <iniMatriz2@plt>
lea    0xdc3(%rip),%rdi
call   1040 <puts@plt>
lea    0xdaf(%rip),%rbx
nopl   0x0(%rax)
movsd  (%rsp),%xmm1
movapd %xmm1,%xmm2
movapd %xmm1,%xmm0
movsd  %xmm1,(%rsp)
mulsd  %xmm1,%xmm2
mulsd  0xd72(%rip),%xmm2
movsd  0xd62(%rip),%xmm1
addsd  %xmm1,%xmm2
divsd  %xmm2,%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1050 <printf@plt>
movsd  (%rsp),%xmm1
addsd  0xd53(%rip),%xmm1
movsd  0xd53(%rip),%xmm0
movsd  %xmm1,(%rsp)
ucomisd %xmm1,%xmm0
ja     1280 <main+0x100>
lea    0xd51(%rip),%rdi
call   1040 <puts@plt>
mov    %r14,%rdi
mov    $0xb,%esi
mov    $0xc,%edx
xor    %eax,%eax
call   1090 <f1@plt>
movsd  0xd00(%rip),%xmm0
lea    0xd21(%rip),%rbx
nopw   0x0(%rax,%rax,1)
movsd  %xmm0,(%rsp)
mov    %r14,%rdi
movsd  (%rsp),%xmm0
mov    $0xb,%esi
mov    $0xc,%edx
mov    $0x1,%al
call   1060 <Px@plt>
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
mov    %rbx,%rdi
movsd  (%rsp),%xmm0
mov    $0x2,%al
call   1050 <printf@plt>
movsd  (%rsp),%xmm0
addsd  0xcc7(%rip),%xmm0
movsd  %xmm0,(%rsp)
movsd  0xcc2(%rip),%xmm0
ucomisd (%rsp),%xmm0
movsd  (%rsp),%xmm0
ja     1310 <main+0x190>
mov    (%r14),%rdi
call   1030 <free@plt>
mov    0x8(%r14),%rdi
call   1030 <free@plt>
mov    0x10(%r14),%rdi
call   1030 <free@plt>
mov    0x18(%r14),%rdi
call   1030 <free@plt>
mov    0x20(%r14),%rdi
call   1030 <free@plt>
mov    0x28(%r14),%rdi
call   1030 <free@plt>
mov    0x30(%r14),%rdi
call   1030 <free@plt>
mov    0x38(%r14),%rdi
call   1030 <free@plt>
mov    0x40(%r14),%rdi
call   1030 <free@plt>
mov    0x48(%r14),%rdi
call   1030 <free@plt>
mov    0x50(%r14),%rdi
call   1030 <free@plt>
mov    %r14,%rdi
call   1030 <free@plt>
xor    %eax,%eax
call   1070 <getchar@plt>
xor    %eax,%eax
call   1070 <getchar@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"\0A\0A\00"
@.str.1 = [10 x i8] c"%lf %lf \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double**
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca double
store i32 0, i32* %1
store double 9.100000e-01, double* %3
store double -1.000000e+00, double* %4
store double 1.000000e+00, double* %5
store i32 10, i32* %7
%12 = load i32, i32* %7
%13 = add nsw i32 %12, 1
store i32 %13, i32* %8
%14 = load i32, i32* %7
%15 = add nsw i32 %14, 2
store i32 %15, i32* %9
%16 = load i32, i32* %8
%17 = sext i32 %16 to i64
%18 = mul i64 %17, 8
%19 = call i8* @malloc(i64 %18)
%20 = bitcast i8* %19 to double**
store double** %20, double*** %2
store i32 0, i32* %10
br label %21
21: ; preds = %35, %0
%22 = load i32, i32* %10
%23 = load i32, i32* %9
%24 = icmp slt i32 %22, %23
br i1 %24, label %25, label %38
25: ; preds = %21
%26 = load i32, i32* %9
%27 = sext i32 %26 to i64
%28 = mul i64 %27, 8
%29 = call i8* @malloc(i64 %28)
%30 = bitcast i8* %29 to double*
%31 = load double**, double*** %2
%32 = load i32, i32* %10
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds double*, double** %31, i64 %33
store double* %30, double** %34
br label %35
35: ; preds = %25
%36 = load i32, i32* %10
%37 = add nsw i32 %36, 1
store i32 %37, i32* %10
br label %21
38: ; preds = %21
%39 = load double**, double*** %2
%40 = load double, double* %4
%41 = load double, double* %5
%42 = load i32, i32* %7
%43 = load i32, i32* %8
%44 = load i32, i32* %9
%45 = call i32 (double**, double, double, i32, i32, i32, ...) bitcast (i32 (...)* @iniMatriz2 to i32 (double**, double, double, i32, i32, i32, ...)*)(double** %39, double %40, double %41, i32 %42, i32 %43, i32 %44)
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%47 = load double, double* %4
store double %47, double* %11
br label %48
48: ; preds = %60, %38
%49 = load double, double* %11
%50 = load double, double* %5
%51 = fadd double %50, 1.000000e-02
%52 = fcmp olt double %49, %51
br i1 %52, label %53, label %63
53: ; preds = %48
%54 = load double, double* %11
%55 = load double, double* %11
%56 = call double @pow(double %55, double 2.000000e+00)
%57 = call double @llvm.fmuladd.f64(double 2.500000e+01, double %56, double 1.000000e+00)
%58 = fdiv double 1.000000e+00, %57
%59 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), double %54, double %58)
br label %60
60: ; preds = %53
%61 = load double, double* %11
%62 = fadd double %61, 1.000000e-02
store double %62, double* %11
br label %48
63: ; preds = %48
%64 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%65 = load double**, double*** %2
%66 = load i32, i32* %8
%67 = load i32, i32* %9
%68 = call i32 (double**, i32, i32, ...) bitcast (i32 (...)* @f1 to i32 (double**, i32, i32, ...)*)(double** %65, i32 %66, i32 %67)
%69 = load double, double* %4
store double %69, double* %11
br label %70
70: ; preds = %85, %63
%71 = load double, double* %11
%72 = load double, double* %5
%73 = fadd double %72, 1.000000e-02
%74 = fcmp olt double %71, %73
br i1 %74, label %75, label %88
75: ; preds = %70
%76 = load double**, double*** %2
%77 = load double, double* %11
%78 = load i32, i32* %8
%79 = load i32, i32* %9
%80 = call i32 (double**, double, i32, i32, ...) bitcast (i32 (...)* @Px to i32 (double**, double, i32, i32, ...)*)(double** %76, double %77, i32 %78, i32 %79)
%81 = sitofp i32 %80 to double
store double %81, double* %6
%82 = load double, double* %11
%83 = load double, double* %6
%84 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), double %82, double %83)
br label %85
85: ; preds = %75
%86 = load double, double* %11
%87 = fadd double %86, 1.000000e-02
store double %87, double* %11
br label %70
88: ; preds = %70
store i32 0, i32* %10
br label %89
89: ; preds = %100, %88
%90 = load i32, i32* %10
%91 = load i32, i32* %8
%92 = icmp slt i32 %90, %91
br i1 %92, label %93, label %103
93: ; preds = %89
%94 = load double**, double*** %2
%95 = load i32, i32* %10
%96 = sext i32 %95 to i64
%97 = getelementptr inbounds double*, double** %94, i64 %96
%98 = load double*, double** %97
%99 = bitcast double* %98 to i8*
br label %100
100: ; preds = %93
%101 = load i32, i32* %10
%102 = add nsw i32 %101, 1
store i32 %102, i32* %10
br label %89
103: ; preds = %89
%104 = load double**, double*** %2
%105 = bitcast double** %104 to i8*
%106 = call i32 (...) @getchar()
%107 = call i32 (...) @getchar()
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [10 x i8] c"%lf %lf \0A\00"
@str.2 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = tail call dereferenceable_or_null(88) i8* @malloc(i64 88)
%2 = bitcast i8* %1 to double**
%3 = tail call dereferenceable_or_null(96) i8* @malloc(i64 96)
%4 = bitcast i8* %1 to i8**
store i8* %3, i8** %4
%5 = tail call dereferenceable_or_null(96) i8* @malloc(i64 96)
%6 = getelementptr inbounds double*, double** %2, i64 1
%7 = bitcast double** %6 to i8**
store i8* %5, i8** %7
%8 = tail call dereferenceable_or_null(96) i8* @malloc(i64 96)
%9 = getelementptr inbounds double*, double** %2, i64 2
%10 = bitcast double** %9 to i8**
store i8* %8, i8** %10
%11 = tail call dereferenceable_or_null(96) i8* @malloc(i64 96)
%12 = getelementptr inbounds double*, double** %2, i64 3
%13 = bitcast double** %12 to i8**
store i8* %11, i8** %13
%14 = tail call dereferenceable_or_null(96) i8* @malloc(i64 96)
%15 = getelementptr inbounds double*, double** %2, i64 4
%16 = bitcast double** %15 to i8**
store i8* %14, i8** %16
%17 = tail call dereferenceable_or_null(96) i8* @malloc(i64 96)
%18 = getelementptr inbounds double*, double** %2, i64 5
%19 = bitcast double** %18 to i8**
store i8* %17, i8** %19
%20 = tail call dereferenceable_or_null(96) i8* @malloc(i64 96)
%21 = getelementptr inbounds double*, double** %2, i64 6
%22 = bitcast double** %21 to i8**
store i8* %20, i8** %22
%23 = tail call dereferenceable_or_null(96) i8* @malloc(i64 96)
%24 = getelementptr inbounds double*, double** %2, i64 7
%25 = bitcast double** %24 to i8**
store i8* %23, i8** %25
%26 = tail call dereferenceable_or_null(96) i8* @malloc(i64 96)
%27 = getelementptr inbounds double*, double** %2, i64 8
%28 = bitcast double** %27 to i8**
store i8* %26, i8** %28
%29 = tail call dereferenceable_or_null(96) i8* @malloc(i64 96)
%30 = getelementptr inbounds double*, double** %2, i64 9
%31 = bitcast double** %30 to i8**
store i8* %29, i8** %31
%32 = tail call dereferenceable_or_null(96) i8* @malloc(i64 96)
%33 = getelementptr inbounds double*, double** %2, i64 10
%34 = bitcast double** %33 to i8**
store i8* %32, i8** %34
%35 = tail call dereferenceable_or_null(96) i8* @malloc(i64 96)
%36 = getelementptr inbounds double*, double** %2, i64 11
%37 = bitcast double** %36 to i8**
store i8* %35, i8** %37
%38 = tail call i32 (double**, double, double, i32, i32, i32, ...) bitcast (i32 (...)* @iniMatriz2 to i32 (double**, double, double, i32, i32, i32, ...)*)(double** %2, double -1.000000e+00, double 1.000000e+00, i32 10, i32 11, i32 12)
%39 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.2, i64 0, i64 0))
br label %40
40: ; preds = %0, %40
%41 = phi double [ -1.000000e+00, %0 ], [ %46, %40 ]
%42 = fmul double %41, %41
%43 = tail call double @llvm.fmuladd.f64(double %42, double 2.500000e+01, double 1.000000e+00)
%44 = fdiv double 1.000000e+00, %43
%45 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), double %41, double %44)
%46 = fadd double %41, 1.000000e-02
%47 = fcmp olt double %46, 1.010000e+00
br i1 %47, label %40, label %48
48: ; preds = %40
%49 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.2, i64 0, i64 0))
%50 = tail call i32 (double**, i32, i32, ...) bitcast (i32 (...)* @f1 to i32 (double**, i32, i32, ...)*)(double** %2, i32 11, i32 12)
br label %51
51: ; preds = %48, %51
%52 = phi double [ -1.000000e+00, %48 ], [ %56, %51 ]
%53 = tail call i32 (double**, double, i32, i32, ...) bitcast (i32 (...)* @Px to i32 (double**, double, i32, i32, ...)*)(double** %2, double %52, i32 11, i32 12)
%54 = sitofp i32 %53 to double
%55 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), double %52, double %54)
%56 = fadd double %52, 1.000000e-02
%57 = fcmp olt double %56, 1.010000e+00
br i1 %57, label %51, label %58
58: ; preds = %51
%59 = load i8*, i8** %4
tail call void @free(i8* %59)
%60 = load i8*, i8** %7
tail call void @free(i8* %60)
%61 = load i8*, i8** %10
tail call void @free(i8* %61)
%62 = load i8*, i8** %13
tail call void @free(i8* %62)
%63 = load i8*, i8** %16
tail call void @free(i8* %63)
%64 = load i8*, i8** %19
tail call void @free(i8* %64)
%65 = load i8*, i8** %22
tail call void @free(i8* %65)
%66 = load i8*, i8** %25
tail call void @free(i8* %66)
%67 = load i8*, i8** %28
tail call void @free(i8* %67)
%68 = load i8*, i8** %31
tail call void @free(i8* %68)
%69 = load i8*, i8** %34
tail call void @free(i8* %69)
tail call void @free(i8* %1)
%70 = tail call i32 (...) @getchar()
%71 = tail call i32 (...) @getchar()
ret i32 0
}