#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 */
float cota_vector(float *, float *, int);
int /*<<< orphan*/ multiplicar(float **, float *, int, float *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ sumar_vectores(float *, float *, int, float *);
int main() {
  int N = 3;
  float A[3][3] = {{2, 0.3, 0.2}, {0.1, 3, 0.4}, {0.1, 0.2, 5}};
  float b[3] = {12, 12, 10};
  float E[3][3] = {{0}};
  float C[3] = {0, 0, 0};
  float X1[3] = {0};
  float X2[3] = {0};
  float tolerancia = 0.001;
  char i;
  char j;
  printf("Matriz inicial (\"E\"):\n");
  for (i = 0; i < N; i++) {
    C[i] = b[i] / A[i][i];
    X1[i] = 1;
    for (j = 0; j < N; j++) {
      if (i == j) {
        E[i][j] = 0;
      } else {
        E[i][j] = (A[i][j] * -1) / A[i][i];
      }
      printf("%lf ", E[i][j]);
    }
    printf("\n");
  }
  printf("-------------------\n");
  printf("\nMi flautagorquio de ptolomeo (\"C\") es el siguiente:\n");
  for (i = 0; i < N; i++) {
    printf("C[%d]: %lf\n", i, C[i]);
  }
  printf("-------------------\n");
  float cota = cota_vector(X1, X2, N);
  while (cota > tolerancia) {
    multiplicar(E, X1, N, X2);
    sumar_vectores(X2, C, N, X2);
    cota = cota_vector(X1, X2, N);
    for (i = 0; i < N; i++) {
      X1[i] = X2[i];
    }
  }
  printf("\nMi vector final es el siguiente:\n");
  for (i = 0; i < N; i++) {
    printf("X[%d]: %lf\n", i, X2[i]);
  }
  multiplicar(A, X2, N, X1);
  printf("\nMultiplicado por la matriz inicial, me dá esto:\n");
  for (i = 0; i < N; i++) {
    printf("X[%d]: %lf\n", i, X1[i]);
  }
  printf("\nMe tendría que dar algo cercano a esto:\n");
  for (i = 0; i < N; i++) {
    printf("b[%d]: %lf\n", i, b[i]);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x3,-0x8(%rbp)
lea    -0x30(%rbp),%rdi
lea    0xe8c(%rip),%rsi
mov    $0x24,%edx
call   1060 <memcpy@plt>
mov    0xe9f(%rip),%rax
mov    %rax,-0x3c(%rbp)
mov    0xe9d(%rip),%eax
mov    %eax,-0x34(%rbp)
lea    -0x60(%rbp),%rdi
xor    %esi,%esi
mov    $0x24,%edx
call   1050 <memset@plt>
lea    -0x6c(%rbp),%rdi
xor    %esi,%esi
mov    $0xc,%edx
call   1050 <memset@plt>
lea    -0x78(%rbp),%rdi
xor    %esi,%esi
mov    $0xc,%edx
call   1050 <memset@plt>
lea    -0x84(%rbp),%rdi
xor    %esi,%esi
mov    $0xc,%edx
call   1050 <memset@plt>
movss  0xe13(%rip),%xmm0
movss  %xmm0,-0x88(%rbp)
ff
lea    0xe44(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movb   $0x0,-0x89(%rbp)
movsbl -0x89(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    138f <main+0x22f>
movsbq -0x89(%rbp),%rax
ff
movss  -0x3c(%rbp,%rax,4),%xmm0
movsbq -0x89(%rbp),%rcx
ff
lea    -0x30(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
movsbq -0x89(%rbp),%rcx
ff
divss  (%rax,%rcx,4),%xmm0
movsbq -0x89(%rbp),%rax
ff
movss  %xmm0,-0x6c(%rbp,%rax,4)
movsbq -0x89(%rbp),%rax
ff
movss  0xd9e(%rip),%xmm0
movss  %xmm0,-0x78(%rbp,%rax,4)
movb   $0x0,-0x8a(%rbp)
movsbl -0x8a(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    136e <main+0x20e>
movsbl -0x89(%rbp),%eax
movsbl -0x8a(%rbp),%ecx
cmp    %ecx,%eax
jne    12c1 <main+0x161>
movsbq -0x89(%rbp),%rcx
ff
lea    -0x60(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
movsbq -0x8a(%rbp),%rcx
ff
xorps  %xmm0,%xmm0
movss  %xmm0,(%rax,%rcx,4)
jmp    1329 <main+0x1c9>
movsbq -0x89(%rbp),%rcx
ff
lea    -0x30(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
movsbq -0x8a(%rbp),%rcx
ff
movss  0xd24(%rip),%xmm0
mulss  (%rax,%rcx,4),%xmm0
movsbq -0x89(%rbp),%rcx
ff
lea    -0x30(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
movsbq -0x89(%rbp),%rcx
ff
divss  (%rax,%rcx,4),%xmm0
movsbq -0x89(%rbp),%rcx
ff
lea    -0x60(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
movsbq -0x8a(%rbp),%rcx
ff
movss  %xmm0,(%rax,%rcx,4)
movsbq -0x89(%rbp),%rcx
ff
lea    -0x60(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
movsbq -0x8a(%rbp),%rcx
ff
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xd03(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0x8a(%rbp),%al
add    $0x1,%al
mov    %al,-0x8a(%rbp)
jmp    1273 <main+0x113>
lea    0xcfa(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x89(%rbp),%al
add    $0x1,%al
mov    %al,-0x89(%rbp)
jmp    120a <main+0xaa>
lea    0xcc6(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xccd(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movb   $0x0,-0x89(%rbp)
movsbl -0x89(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    13fc <main+0x29c>
movsbl -0x89(%rbp),%esi
movsbq -0x89(%rbp),%rax
ff
movss  -0x6c(%rbp,%rax,4),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xcc5(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0x89(%rbp),%al
add    $0x1,%al
mov    %al,-0x89(%rbp)
jmp    13b2 <main+0x252>
lea    0xc59(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x78(%rbp),%rdi
lea    -0x84(%rbp),%rsi
mov    -0x8(%rbp),%edx
call   1030 <cota_vector@plt>
movss  %xmm0,-0x90(%rbp)
ff
movss  -0x90(%rbp),%xmm0
ff
ucomiss -0x88(%rbp),%xmm0
jbe    14d4 <main+0x374>
lea    -0x60(%rbp),%rdi
lea    -0x78(%rbp),%rsi
mov    -0x8(%rbp),%edx
lea    -0x84(%rbp),%rcx
call   1080 <multiplicar@plt>
lea    -0x84(%rbp),%rdi
lea    -0x6c(%rbp),%rsi
mov    -0x8(%rbp),%edx
lea    -0x84(%rbp),%rcx
call   1070 <sumar_vectores@plt>
lea    -0x78(%rbp),%rdi
lea    -0x84(%rbp),%rsi
mov    -0x8(%rbp),%edx
call   1030 <cota_vector@plt>
movss  %xmm0,-0x90(%rbp)
ff
movb   $0x0,-0x89(%rbp)
movsbl -0x89(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    14cf <main+0x36f>
movsbq -0x89(%rbp),%rax
ff
movss  -0x84(%rbp,%rax,4),%xmm0
ff ff
movsbq -0x89(%rbp),%rax
ff
movss  %xmm0,-0x78(%rbp,%rax,4)
mov    -0x89(%rbp),%al
add    $0x1,%al
mov    %al,-0x89(%rbp)
jmp    148d <main+0x32d>
jmp    1425 <main+0x2c5>
lea    0xbd8(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movb   $0x0,-0x89(%rbp)
movsbl -0x89(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1536 <main+0x3d6>
movsbl -0x89(%rbp),%esi
movsbq -0x89(%rbp),%rax
ff
movss  -0x84(%rbp,%rax,4),%xmm0
ff ff
cvtss2sd %xmm0,%xmm0
lea    0xbba(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0x89(%rbp),%al
add    $0x1,%al
mov    %al,-0x89(%rbp)
jmp    14e9 <main+0x389>
lea    -0x30(%rbp),%rdi
lea    -0x84(%rbp),%rsi
mov    -0x8(%rbp),%edx
lea    -0x78(%rbp),%rcx
call   1080 <multiplicar@plt>
lea    0xb8e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movb   $0x0,-0x89(%rbp)
movsbl -0x89(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    15ac <main+0x44c>
movsbl -0x89(%rbp),%esi
movsbq -0x89(%rbp),%rax
ff
movss  -0x78(%rbp,%rax,4),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xb44(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0x89(%rbp),%al
add    $0x1,%al
mov    %al,-0x89(%rbp)
jmp    1562 <main+0x402>
lea    0xb62(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movb   $0x0,-0x89(%rbp)
movsbl -0x89(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    160b <main+0x4ab>
movsbl -0x89(%rbp),%esi
movsbq -0x89(%rbp),%rax
ff
movss  -0x3c(%rbp,%rax,4),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xb4f(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0x89(%rbp),%al
add    $0x1,%al
mov    %al,-0x89(%rbp)
jmp    15c1 <main+0x461>
xor    %eax,%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x98,%rsp
mov    0xedc(%rip),%eax
mov    %eax,0x60(%rsp)
movaps 0xec1(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xea5(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
xorps  %xmm0,%xmm0
movaps %xmm0,0x80(%rsp)
movaps %xmm0,0x70(%rsp)
movl   $0x0,0x90(%rsp)
movl   $0x0,0x38(%rsp)
movq   $0x0,0x30(%rsp)
movl   $0x0,0x18(%rsp)
movq   $0x0,0x10(%rsp)
movl   $0x0,0x28(%rsp)
movq   $0x0,0x20(%rsp)
lea    0xea4(%rip),%rdi
call   1040 <puts@plt>
movss  0x40(%rsp),%xmm1
movss  %xmm1,0xc(%rsp)
movss  0xe02(%rip),%xmm0
divss  %xmm1,%xmm0
movss  %xmm0,0x30(%rsp)
movl   $0x3f800000,0x10(%rsp)
3f
movl   $0x0,0x70(%rsp)
lea    0xe41(%rip),%r14
xorps  %xmm0,%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1060 <printf@plt>
movss  0x44(%rsp),%xmm0
xorps  0xdd7(%rip),%xmm0
divss  0xc(%rsp),%xmm0
movss  %xmm0,0x74(%rsp)
cvtss2sd %xmm0,%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1060 <printf@plt>
movss  0x48(%rsp),%xmm0
xorps  0xdb0(%rip),%xmm0
divss  0xc(%rsp),%xmm0
movss  %xmm0,0x78(%rsp)
cvtss2sd %xmm0,%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1060 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %ebx,%ebx
lea    0xdc7(%rip),%r15
xor    %r12d,%r12d
jmp    12d4 <main+0x174>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movss  %xmm0,0x84(%rsp,%r12,1)
cvtss2sd %xmm0,%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1060 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0xc,%r12
add    $0x4,%rbx
cmp    $0x8,%rbx
je     1381 <main+0x221>
movss  0x4(%rbx,%r15,1),%xmm0
movss  0x50(%rsp,%rbx,4),%xmm2
movss  %xmm2,0xc(%rsp)
divss  %xmm2,%xmm0
movss  %xmm0,0x34(%rsp,%rbx,1)
movl   $0x3f800000,0x14(%rsp,%rbx,1)
3f
movss  0x4c(%rsp,%r12,1),%xmm0
movaps 0xd09(%rip),%xmm1
xorps  %xmm1,%xmm0
divss  %xmm2,%xmm0
movss  %xmm0,0x7c(%rsp,%r12,1)
cvtss2sd %xmm0,%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1060 <printf@plt>
movss  0xc(%rsp),%xmm1
xorps  %xmm0,%xmm0
test   %rbx,%rbx
je     1343 <main+0x1e3>
movss  0x50(%rsp,%r12,1),%xmm0
xorps  0xcd1(%rip),%xmm0
divss  %xmm1,%xmm0
movss  %xmm0,0x80(%rsp,%r12,1)
cvtss2sd %xmm0,%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1060 <printf@plt>
cmp    $0x4,%rbx
xorps  %xmm0,%xmm0
je     12a0 <main+0x140>
movss  0x54(%rsp,%r12,1),%xmm0
xorps  0xc9a(%rip),%xmm0
divss  0xc(%rsp),%xmm0
jmp    12a0 <main+0x140>
lea    0xd4c(%rip),%r14
mov    %r14,%rdi
call   1040 <puts@plt>
lea    0xd08(%rip),%rdi
call   1040 <puts@plt>
movss  0x30(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xcb8(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x1,%al
call   1060 <printf@plt>
movss  0x34(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x1,%al
call   1060 <printf@plt>
movss  0x38(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %rbx,%rdi
mov    $0x2,%esi
mov    $0x1,%al
call   1060 <printf@plt>
mov    %r14,%rdi
call   1040 <puts@plt>
lea    0x10(%rsp),%rdi
lea    0x20(%rsp),%rsi
mov    $0x3,%edx
call   1050 <cota_vector@plt>
ucomiss 0xbf6(%rip),%xmm0
jbe    1481 <main+0x321>
lea    0x70(%rsp),%r14
lea    0x10(%rsp),%r15
lea    0x20(%rsp),%rbx
lea    0x30(%rsp),%r12
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r14,%rdi
mov    %r15,%rsi
mov    $0x3,%edx
mov    %rbx,%rcx
call   1080 <multiplicar@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
mov    $0x3,%edx
mov    %rbx,%rcx
call   1070 <sumar_vectores@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
mov    $0x3,%edx
call   1050 <cota_vector@plt>
mov    0x20(%rsp),%rax
mov    %rax,0x10(%rsp)
mov    0x28(%rsp),%eax
mov    %eax,0x18(%rsp)
ucomiss 0xb85(%rip),%xmm0
ja     1430 <main+0x2d0>
lea    0xc60(%rip),%rdi
call   1040 <puts@plt>
movss  0x20(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xbd3(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x1,%al
call   1060 <printf@plt>
movss  0x24(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x1,%al
call   1060 <printf@plt>
movss  0x28(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %rbx,%rdi
mov    $0x2,%esi
mov    $0x1,%al
call   1060 <printf@plt>
lea    0x40(%rsp),%rdi
lea    0x20(%rsp),%rsi
lea    0x10(%rsp),%rcx
mov    $0x3,%edx
call   1080 <multiplicar@plt>
lea    0xc0e(%rip),%rdi
call   1040 <puts@plt>
movss  0x10(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x1,%al
call   1060 <printf@plt>
movss  0x14(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x1,%al
call   1060 <printf@plt>
movss  0x18(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %rbx,%rdi
mov    $0x2,%esi
mov    $0x1,%al
call   1060 <printf@plt>
lea    0xbec(%rip),%rdi
call   1040 <puts@plt>
lea    0xb21(%rip),%rbx
movsd  0xabc(%rip),%xmm0
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x1,%al
call   1060 <printf@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
movsd  0xaa0(%rip),%xmm0
mov    $0x1,%al
call   1060 <printf@plt>
movsd  0xa99(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x2,%esi
mov    $0x1,%al
call   1060 <printf@plt>
xor    %eax,%eax
add    $0x98,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__const.main.A = [3 x [3 x float]] [[3 x float] [float 2.000000e+00, float 0x3FD3333340000000, float 0x3FC99999A0000000], [3 x float] [float 0x3FB99999A0000000, float 3.000000e+00, float 0x3FD99999A0000000], [3 x float] [float 0x3FB99999A0000000, float 0x3FC99999A0000000, float 5.000000e+00]]
@__const.main.b = [3 x float] [float 1.200000e+01, float 1.200000e+01, float 1.000000e+01]
@.str = [23 x i8] c"Matriz inicial (\22E\22):\0A\00"
@.str.1 = [5 x i8] c"%lf \00"
@.str.2 = [2 x i8] c"\0A\00"
@.str.3 = [21 x i8] c"-------------------\0A\00"
@.str.4 = [54 x i8] c"\0AMi flautagorquio de ptolomeo (\22C\22) es el siguiente:\0A\00"
@.str.5 = [12 x i8] c"C[%d]: %lf\0A\00"
@.str.6 = [35 x i8] c"\0AMi vector final es el siguiente:\0A\00"
@.str.7 = [12 x i8] c"X[%d]: %lf\0A\00"
@.str.8 = [51 x i8] c"\0AMultiplicado por la matriz inicial, me d\C3\A1 esto:\0A\00"
@.str.9 = [43 x i8] c"\0AMe tendr\C3\ADa que dar algo cercano a esto:\0A\00"
@.str.10 = [12 x i8] c"b[%d]: %lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [3 x [3 x float]]
%4 = alloca [3 x float]
%5 = alloca [3 x [3 x float]]
%6 = alloca [3 x float]
%7 = alloca [3 x float]
%8 = alloca [3 x float]
%9 = alloca float
%10 = alloca i8
%11 = alloca i8
%12 = alloca float
store i32 0, i32* %1
store i32 3, i32* %2
%13 = bitcast [3 x [3 x float]]* %3 to i8*
%14 = bitcast [3 x float]* %4 to i8*
%15 = bitcast [3 x [3 x float]]* %5 to i8*
%16 = bitcast [3 x float]* %6 to i8*
%17 = bitcast [3 x float]* %7 to i8*
%18 = bitcast [3 x float]* %8 to i8*
store float 0x3F50624DE0000000, float* %9
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
store i8 0, i8* %10
br label %20
20: ; preds = %100, %0
%21 = load i8, i8* %10
%22 = sext i8 %21 to i32
%23 = load i32, i32* %2
%24 = icmp slt i32 %22, %23
br i1 %24, label %25, label %103
25: ; preds = %20
%26 = load i8, i8* %10
%27 = sext i8 %26 to i64
%28 = getelementptr inbounds [3 x float], [3 x float]* %4, i64 0, i64 %27
%29 = load float, float* %28
%30 = load i8, i8* %10
%31 = sext i8 %30 to i64
%32 = getelementptr inbounds [3 x [3 x float]], [3 x [3 x float]]* %3, i64 0, i64 %31
%33 = load i8, i8* %10
%34 = sext i8 %33 to i64
%35 = getelementptr inbounds [3 x float], [3 x float]* %32, i64 0, i64 %34
%36 = load float, float* %35
%37 = fdiv float %29, %36
%38 = load i8, i8* %10
%39 = sext i8 %38 to i64
%40 = getelementptr inbounds [3 x float], [3 x float]* %6, i64 0, i64 %39
store float %37, float* %40
%41 = load i8, i8* %10
%42 = sext i8 %41 to i64
%43 = getelementptr inbounds [3 x float], [3 x float]* %7, i64 0, i64 %42
store float 1.000000e+00, float* %43
store i8 0, i8* %11
br label %44
44: ; preds = %95, %25
%45 = load i8, i8* %11
%46 = sext i8 %45 to i32
%47 = load i32, i32* %2
%48 = icmp slt i32 %46, %47
br i1 %48, label %49, label %98
49: ; preds = %44
%50 = load i8, i8* %10
%51 = sext i8 %50 to i32
%52 = load i8, i8* %11
%53 = sext i8 %52 to i32
%54 = icmp eq i32 %51, %53
br i1 %54, label %55, label %62
55: ; preds = %49
%56 = load i8, i8* %10
%57 = sext i8 %56 to i64
%58 = getelementptr inbounds [3 x [3 x float]], [3 x [3 x float]]* %5, i64 0, i64 %57
%59 = load i8, i8* %11
%60 = sext i8 %59 to i64
%61 = getelementptr inbounds [3 x float], [3 x float]* %58, i64 0, i64 %60
store float 0.000000e+00, float* %61
br label %85
62: ; preds = %49
%63 = load i8, i8* %10
%64 = sext i8 %63 to i64
%65 = getelementptr inbounds [3 x [3 x float]], [3 x [3 x float]]* %3, i64 0, i64 %64
%66 = load i8, i8* %11
%67 = sext i8 %66 to i64
%68 = getelementptr inbounds [3 x float], [3 x float]* %65, i64 0, i64 %67
%69 = load float, float* %68
%70 = fmul float %69, -1.000000e+00
%71 = load i8, i8* %10
%72 = sext i8 %71 to i64
%73 = getelementptr inbounds [3 x [3 x float]], [3 x [3 x float]]* %3, i64 0, i64 %72
%74 = load i8, i8* %10
%75 = sext i8 %74 to i64
%76 = getelementptr inbounds [3 x float], [3 x float]* %73, i64 0, i64 %75
%77 = load float, float* %76
%78 = fdiv float %70, %77
%79 = load i8, i8* %10
%80 = sext i8 %79 to i64
%81 = getelementptr inbounds [3 x [3 x float]], [3 x [3 x float]]* %5, i64 0, i64 %80
%82 = load i8, i8* %11
%83 = sext i8 %82 to i64
%84 = getelementptr inbounds [3 x float], [3 x float]* %81, i64 0, i64 %83
store float %78, float* %84
br label %85
85: ; preds = %62, %55
%86 = load i8, i8* %10
%87 = sext i8 %86 to i64
%88 = getelementptr inbounds [3 x [3 x float]], [3 x [3 x float]]* %5, i64 0, i64 %87
%89 = load i8, i8* %11
%90 = sext i8 %89 to i64
%91 = getelementptr inbounds [3 x float], [3 x float]* %88, i64 0, i64 %90
%92 = load float, float* %91
%93 = fpext float %92 to double
%94 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double %93)
br label %95
95: ; preds = %85
%96 = load i8, i8* %11
%97 = add i8 %96, 1
store i8 %97, i8* %11
br label %44
98: ; preds = %44
%99 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %100
100: ; preds = %98
%101 = load i8, i8* %10
%102 = add i8 %101, 1
store i8 %102, i8* %10
br label %20
103: ; preds = %20
%104 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0))
%105 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.4, i64 0, i64 0))
store i8 0, i8* %10
br label %106
106: ; preds = %120, %103
%107 = load i8, i8* %10
%108 = sext i8 %107 to i32
%109 = load i32, i32* %2
%110 = icmp slt i32 %108, %109
br i1 %110, label %111, label %123
111: ; preds = %106
%112 = load i8, i8* %10
%113 = sext i8 %112 to i32
%114 = load i8, i8* %10
%115 = sext i8 %114 to i64
%116 = getelementptr inbounds [3 x float], [3 x float]* %6, i64 0, i64 %115
%117 = load float, float* %116
%118 = fpext float %117 to double
%119 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0), i32 %113, double %118)
br label %120
120: ; preds = %111
%121 = load i8, i8* %10
%122 = add i8 %121, 1
store i8 %122, i8* %10
br label %106
123: ; preds = %106
%124 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0))
%125 = getelementptr inbounds [3 x float], [3 x float]* %7, i64 0, i64 0
%126 = getelementptr inbounds [3 x float], [3 x float]* %8, i64 0, i64 0
%127 = load i32, i32* %2
%128 = call float @cota_vector(float* %125, float* %126, i32 %127)
store float %128, float* %12
br label %129
129: ; preds = %165, %123
%130 = load float, float* %12
%131 = load float, float* %9
%132 = fcmp ogt float %130, %131
br i1 %132, label %133, label %166
133: ; preds = %129
%134 = getelementptr inbounds [3 x [3 x float]], [3 x [3 x float]]* %5, i64 0, i64 0
%135 = bitcast [3 x float]* %134 to float**
%136 = getelementptr inbounds [3 x float], [3 x float]* %7, i64 0, i64 0
%137 = load i32, i32* %2
%138 = getelementptr inbounds [3 x float], [3 x float]* %8, i64 0, i64 0
%139 = call i32 @multiplicar(float** %135, float* %136, i32 %137, float* %138)
%140 = getelementptr inbounds [3 x float], [3 x float]* %8, i64 0, i64 0
%141 = getelementptr inbounds [3 x float], [3 x float]* %6, i64 0, i64 0
%142 = load i32, i32* %2
%143 = getelementptr inbounds [3 x float], [3 x float]* %8, i64 0, i64 0
%144 = call i32 @sumar_vectores(float* %140, float* %141, i32 %142, float* %143)
%145 = getelementptr inbounds [3 x float], [3 x float]* %7, i64 0, i64 0
%146 = getelementptr inbounds [3 x float], [3 x float]* %8, i64 0, i64 0
%147 = load i32, i32* %2
%148 = call float @cota_vector(float* %145, float* %146, i32 %147)
store float %148, float* %12
store i8 0, i8* %10
br label %149
149: ; preds = %162, %133
%150 = load i8, i8* %10
%151 = sext i8 %150 to i32
%152 = load i32, i32* %2
%153 = icmp slt i32 %151, %152
br i1 %153, label %154, label %165
154: ; preds = %149
%155 = load i8, i8* %10
%156 = sext i8 %155 to i64
%157 = getelementptr inbounds [3 x float], [3 x float]* %8, i64 0, i64 %156
%158 = load float, float* %157
%159 = load i8, i8* %10
%160 = sext i8 %159 to i64
%161 = getelementptr inbounds [3 x float], [3 x float]* %7, i64 0, i64 %160
store float %158, float* %161
br label %162
162: ; preds = %154
%163 = load i8, i8* %10
%164 = add i8 %163, 1
store i8 %164, i8* %10
br label %149
165: ; preds = %149
br label %129
166: ; preds = %129
%167 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.6, i64 0, i64 0))
store i8 0, i8* %10
br label %168
168: ; preds = %182, %166
%169 = load i8, i8* %10
%170 = sext i8 %169 to i32
%171 = load i32, i32* %2
%172 = icmp slt i32 %170, %171
br i1 %172, label %173, label %185
173: ; preds = %168
%174 = load i8, i8* %10
%175 = sext i8 %174 to i32
%176 = load i8, i8* %10
%177 = sext i8 %176 to i64
%178 = getelementptr inbounds [3 x float], [3 x float]* %8, i64 0, i64 %177
%179 = load float, float* %178
%180 = fpext float %179 to double
%181 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0), i32 %175, double %180)
br label %182
182: ; preds = %173
%183 = load i8, i8* %10
%184 = add i8 %183, 1
store i8 %184, i8* %10
br label %168
185: ; preds = %168
%186 = getelementptr inbounds [3 x [3 x float]], [3 x [3 x float]]* %3, i64 0, i64 0
%187 = bitcast [3 x float]* %186 to float**
%188 = getelementptr inbounds [3 x float], [3 x float]* %8, i64 0, i64 0
%189 = load i32, i32* %2
%190 = getelementptr inbounds [3 x float], [3 x float]* %7, i64 0, i64 0
%191 = call i32 @multiplicar(float** %187, float* %188, i32 %189, float* %190)
%192 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.8, i64 0, i64 0))
store i8 0, i8* %10
br label %193
193: ; preds = %207, %185
%194 = load i8, i8* %10
%195 = sext i8 %194 to i32
%196 = load i32, i32* %2
%197 = icmp slt i32 %195, %196
br i1 %197, label %198, label %210
198: ; preds = %193
%199 = load i8, i8* %10
%200 = sext i8 %199 to i32
%201 = load i8, i8* %10
%202 = sext i8 %201 to i64
%203 = getelementptr inbounds [3 x float], [3 x float]* %7, i64 0, i64 %202
%204 = load float, float* %203
%205 = fpext float %204 to double
%206 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0), i32 %200, double %205)
br label %207
207: ; preds = %198
%208 = load i8, i8* %10
%209 = add i8 %208, 1
store i8 %209, i8* %10
br label %193
210: ; preds = %193
%211 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.9, i64 0, i64 0))
store i8 0, i8* %10
br label %212
212: ; preds = %226, %210
%213 = load i8, i8* %10
%214 = sext i8 %213 to i32
%215 = load i32, i32* %2
%216 = icmp slt i32 %214, %215
br i1 %216, label %217, label %229
217: ; preds = %212
%218 = load i8, i8* %10
%219 = sext i8 %218 to i32
%220 = load i8, i8* %10
%221 = sext i8 %220 to i64
%222 = getelementptr inbounds [3 x float], [3 x float]* %4, i64 0, i64 %221
%223 = load float, float* %222
%224 = fpext float %223 to double
%225 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.10, i64 0, i64 0), i32 %219, double %224)
br label %226
226: ; preds = %217
%227 = load i8, i8* %10
%228 = add i8 %227, 1
store i8 %228, i8* %10
br label %212
229: ; preds = %212
ret i32 0
}

LLVM IR (-O2):
@__const.main.A = [3 x [3 x float]] [[3 x float] [float 2.000000e+00, float 0x3FD3333340000000, float 0x3FC99999A0000000], [3 x float] [float 0x3FB99999A0000000, float 3.000000e+00, float 0x3FD99999A0000000], [3 x float] [float 0x3FB99999A0000000, float 0x3FC99999A0000000, float 5.000000e+00]]
@__const.main.b = [3 x float] [float 1.200000e+01, float 1.200000e+01, float 1.000000e+01]
@.str.1 = [5 x i8] c"%lf \00"
@.str.5 = [12 x i8] c"C[%d]: %lf\0A\00"
@.str.7 = [12 x i8] c"X[%d]: %lf\0A\00"
@.str.10 = [12 x i8] c"b[%d]: %lf\0A\00"
@str = [22 x i8] c"Matriz inicial (\22E\22):\00"
@str.12 = [53 x i8] c"\0AMi flautagorquio de ptolomeo (\22C\22) es el siguiente:\00"
@str.13 = [20 x i8] c"-------------------\00"
@str.14 = [34 x i8] c"\0AMi vector final es el siguiente:\00"
@str.15 = [50 x i8] c"\0AMultiplicado por la matriz inicial, me d\C3\A1 esto:\00"
@str.16 = [42 x i8] c"\0AMe tendr\C3\ADa que dar algo cercano a esto:\00"
define i32 @main() {
%1 = alloca [3 x [3 x float]]
%2 = alloca [3 x [3 x float]]
%3 = alloca [3 x float]
%4 = alloca [3 x float]
%5 = bitcast [3 x float]* %4 to i8*
%6 = alloca [3 x float]
%7 = bitcast [3 x float]* %6 to i8*
%8 = bitcast [3 x [3 x float]]* %1 to i8*
%9 = bitcast [3 x [3 x float]]* %2 to i8*
%10 = bitcast [3 x float]* %3 to i8*
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
%12 = getelementptr inbounds [3 x [3 x float]], [3 x [3 x float]]* %1, i64 0, i64 0, i64 0
%13 = load float, float* %12
%14 = fdiv float 1.200000e+01, %13
%15 = getelementptr inbounds [3 x float], [3 x float]* %3, i64 0, i64 0
store float %14, float* %15
%16 = getelementptr inbounds [3 x float], [3 x float]* %4, i64 0, i64 0
store float 1.000000e+00, float* %16
%17 = getelementptr inbounds [3 x [3 x float]], [3 x [3 x float]]* %2, i64 0, i64 0, i64 0
store float 0.000000e+00, float* %17
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double 0.000000e+00)
%19 = getelementptr inbounds [3 x [3 x float]], [3 x [3 x float]]* %1, i64 0, i64 0, i64 1
%20 = load float, float* %19
%21 = fneg float %20
%22 = fdiv float %21, %13
%23 = getelementptr inbounds [3 x [3 x float]], [3 x [3 x float]]* %2, i64 0, i64 0, i64 1
store float %22, float* %23
%24 = fpext float %22 to double
%25 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double %24)
%26 = getelementptr inbounds [3 x [3 x float]], [3 x [3 x float]]* %1, i64 0, i64 0, i64 2
%27 = load float, float* %26
%28 = fneg float %27
%29 = fdiv float %28, %13
%30 = getelementptr inbounds [3 x [3 x float]], [3 x [3 x float]]* %2, i64 0, i64 0, i64 2
store float %29, float* %30
%31 = fpext float %29 to double
%32 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double %31)
%33 = tail call i32 @putchar(i32 10)
br label %34
34: ; preds = %0, %67
%35 = phi i64 [ 1, %0 ], [ %73, %67 ]
%36 = getelementptr inbounds [3 x float], [3 x float]* @__const.main.b, i64 0, i64 %35
%37 = load float, float* %36
%38 = getelementptr inbounds [3 x [3 x float]], [3 x [3 x float]]* %1, i64 0, i64 %35, i64 %35
%39 = load float, float* %38
%40 = fdiv float %37, %39
%41 = getelementptr inbounds [3 x float], [3 x float]* %3, i64 0, i64 %35
store float %40, float* %41
%42 = getelementptr inbounds [3 x float], [3 x float]* %4, i64 0, i64 %35
store float 1.000000e+00, float* %42
%43 = getelementptr inbounds [3 x [3 x float]], [3 x [3 x float]]* %1, i64 0, i64 %35, i64 0
%44 = load float, float* %43
%45 = fneg float %44
%46 = fdiv float %45, %39
%47 = getelementptr inbounds [3 x [3 x float]], [3 x [3 x float]]* %2, i64 0, i64 %35, i64 0
store float %46, float* %47
%48 = fpext float %46 to double
%49 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double %48)
%50 = icmp eq i64 %35, 1
br i1 %50, label %56, label %51
51: ; preds = %34
%52 = getelementptr inbounds [3 x [3 x float]], [3 x [3 x float]]* %1, i64 0, i64 %35, i64 1
%53 = load float, float* %52
%54 = fneg float %53
%55 = fdiv float %54, %39
br label %56
56: ; preds = %34, %51
%57 = phi float [ %55, %51 ], [ 0.000000e+00, %34 ]
%58 = getelementptr inbounds [3 x [3 x float]], [3 x [3 x float]]* %2, i64 0, i64 %35, i64 1
store float %57, float* %58
%59 = fpext float %57 to double
%60 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double %59)
%61 = icmp eq i64 %35, 2
br i1 %61, label %67, label %62
62: ; preds = %56
%63 = getelementptr inbounds [3 x [3 x float]], [3 x [3 x float]]* %1, i64 0, i64 %35, i64 2
%64 = load float, float* %63
%65 = fneg float %64
%66 = fdiv float %65, %39
br label %67
67: ; preds = %56, %62
%68 = phi float [ %66, %62 ], [ 0.000000e+00, %56 ]
%69 = getelementptr inbounds [3 x [3 x float]], [3 x [3 x float]]* %2, i64 0, i64 %35, i64 2
store float %68, float* %69
%70 = fpext float %68 to double
%71 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double %70)
%72 = tail call i32 @putchar(i32 10)
%73 = add nuw nsw i64 %35, 1
%74 = icmp eq i64 %73, 3
br i1 %74, label %75, label %34
75: ; preds = %67
%76 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.13, i64 0, i64 0))
%77 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str.12, i64 0, i64 0))
%78 = getelementptr inbounds [3 x float], [3 x float]* %3, i64 0, i64 0
%79 = load float, float* %78
%80 = fpext float %79 to double
%81 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0), i32 0, double %80)
%82 = getelementptr inbounds [3 x float], [3 x float]* %3, i64 0, i64 1
%83 = load float, float* %82
%84 = fpext float %83 to double
%85 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0), i32 1, double %84)
%86 = getelementptr inbounds [3 x float], [3 x float]* %3, i64 0, i64 2
%87 = load float, float* %86
%88 = fpext float %87 to double
%89 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0), i32 2, double %88)
%90 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.13, i64 0, i64 0))
%91 = getelementptr inbounds [3 x float], [3 x float]* %4, i64 0, i64 0
%92 = getelementptr inbounds [3 x float], [3 x float]* %6, i64 0, i64 0
%93 = call float @cota_vector(float* %91, float* %92, i32 3)
%94 = fcmp ogt float %93, 0x3F50624DE0000000
br i1 %94, label %95, label %102
95: ; preds = %75
%96 = bitcast [3 x [3 x float]]* %2 to float**
br label %97
97: ; preds = %95, %97
%98 = call i32 @multiplicar(float** %96, float* %91, i32 3, float* %92)
%99 = call i32 @sumar_vectores(float* %92, float* %78, i32 3, float* %92)
%100 = call float @cota_vector(float* %91, float* %92, i32 3)
%101 = fcmp ogt float %100, 0x3F50624DE0000000
br i1 %101, label %97, label %102
102: ; preds = %97, %75
%103 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str.14, i64 0, i64 0))
%104 = load float, float* %92
%105 = fpext float %104 to double
%106 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0), i32 0, double %105)
%107 = getelementptr inbounds [3 x float], [3 x float]* %6, i64 0, i64 1
%108 = load float, float* %107
%109 = fpext float %108 to double
%110 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0), i32 1, double %109)
%111 = getelementptr inbounds [3 x float], [3 x float]* %6, i64 0, i64 2
%112 = load float, float* %111
%113 = fpext float %112 to double
%114 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0), i32 2, double %113)
%115 = bitcast [3 x [3 x float]]* %1 to float**
%116 = call i32 @multiplicar(float** %115, float* %92, i32 3, float* %91)
%117 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str.15, i64 0, i64 0))
%118 = load float, float* %91
%119 = fpext float %118 to double
%120 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0), i32 0, double %119)
%121 = getelementptr inbounds [3 x float], [3 x float]* %4, i64 0, i64 1
%122 = load float, float* %121
%123 = fpext float %122 to double
%124 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0), i32 1, double %123)
%125 = getelementptr inbounds [3 x float], [3 x float]* %4, i64 0, i64 2
%126 = load float, float* %125
%127 = fpext float %126 to double
%128 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0), i32 2, double %127)
%129 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str.16, i64 0, i64 0))
%130 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.10, i64 0, i64 0), i32 0, double 1.200000e+01)
%131 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.10, i64 0, i64 0), i32 1, double 1.200000e+01)
%132 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.10, i64 0, i64 0), i32 2, double 1.000000e+01)
ret i32 0
}