#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 */
double fX1(double, double, double);
double fX2(double, double, double);
double fX3(double, double, double);
double pow(double, int);
int /*<<< orphan*/ printf(char *, ...);
double sqrt(double);
int /*<<< orphan*/ system(char *);
int main() {
  double A[3][3] = {{4, 1, 1}, {1, 3, 1}, {1, 1, 5}};
  double X0[3] = {0, 0, 0};
  double X[3];
  double B[3] = {9, 10, 18};
  double error = 10;
  double sol[3] = {1, 2, 3};
  double tol = pow(10, -6);
  int i = 0;
  printf("Metodo de jacobi\n");
  while (error > tol) {
    i++;
    X[0] = fX1(X0[0], X0[1], X0[2]);
    X[1] = fX2(X0[0], X0[1], X0[2]);
    X[2] = fX3(X0[0], X0[1], X0[2]);
    X0[0] = X[0];
    X0[1] = X[1];
    X0[2] = X[2];
    error = sqrt(pow(sol[0] - X[0], 2) + pow(sol[1] - X[1], 2) +
                 pow(sol[2] - X[2], 2));
  }
  printf("iteraciones: %d\n", i);
  printf("Metodo de Gauss-Seidel\n");
  X[0] = 0;
  X[1] = 0;
  X[2] = 0;
  error = 10;
  i = 0;
  while (error > tol) {
    i++;
    X[0] = fX1(X[0], X[1], X[2]);
    X[1] = fX2(X[0], X[1], X[2]);
    X[2] = fX3(X[0], X[1], X[2]);
    error = sqrt(pow(sol[0] - X[0], 2) + pow(sol[1] - X[1], 2) +
                 pow(sol[2] - X[2], 2));
  }
  printf("iteraciones: %d\n", i);
  printf("\napartado c)\n\n");
  i = 0;
  X0[0] = -527;
  X0[1] = 1000;
  X0[2] = -80000;
  error = 10;
  while (error > tol) {
    i++;
    X[0] = fX1(X0[0], X0[1], X0[2]);
    X[1] = fX2(X0[0], X0[1], X0[2]);
    X[2] = fX3(X0[0], X0[1], X0[2]);
    X0[0] = X[0];
    X0[1] = X[1];
    X0[2] = X[2];
    error = sqrt(pow(sol[0] - X[0], 2) + pow(sol[1] - X[1], 2) +
                 pow(sol[2] - X[2], 2));
  }
  printf("iteraciones: %d\n", i);
  printf("\napartado d)\n\n");
  i = 0;
  X[0] = -527;
  X[1] = 1000;
  X[2] = -80000;
  error = 10;
  while (error > tol) {
    i++;
    X[0] = fX1(X[0], X[1], X[2]);
    X[1] = fX2(X[0], X[1], X[2]);
    X[2] = fX3(X[0], X[1], X[2]);
    error = sqrt(pow(sol[0] - X[0], 2) + pow(sol[1] - X[1], 2) +
                 pow(sol[2] - X[2], 2));
  }
  printf("iteraciones: %d\n", i);
  system("PAUSE");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x50(%rbp),%rdi
lea    0xe73(%rip),%rsi
mov    $0x48,%edx
call   1080 <memcpy@plt>
lea    -0x70(%rbp),%rdi
xor    %esi,%esi
mov    $0x18,%edx
call   1070 <memset@plt>
mov    0xea2(%rip),%rax
mov    %rax,-0xb0(%rbp)
mov    0xe9c(%rip),%rax
mov    %rax,-0xa8(%rbp)
mov    0xe96(%rip),%rax
mov    %rax,-0xa0(%rbp)
movsd  0xe07(%rip),%xmm0
movsd  %xmm0,-0xb8(%rbp)
mov    0xe88(%rip),%rax
mov    %rax,-0xd0(%rbp)
mov    0xe82(%rip),%rax
mov    %rax,-0xc8(%rbp)
mov    0xe7c(%rip),%rax
mov    %rax,-0xc0(%rbp)
movsd  0xdcd(%rip),%xmm0
mov    $0xfffffffa,%edi
call   10a0 <pow@plt>
movsd  %xmm0,-0xd8(%rbp)
ff
movl   $0x0,-0xdc(%rbp)
lea    0xe52(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movsd  -0xb8(%rbp),%xmm0
ff
ucomisd -0xd8(%rbp),%xmm0
ff
jbe    1382 <main+0x1f2>
mov    -0xdc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xdc(%rbp)
movsd  -0x70(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm1
movsd  -0x60(%rbp),%xmm2
call   1040 <fX1@plt>
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x70(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm1
movsd  -0x60(%rbp),%xmm2
call   1090 <fX2@plt>
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x70(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm1
movsd  -0x60(%rbp),%xmm2
call   1030 <fX3@plt>
movsd  %xmm0,-0x80(%rbp)
movsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0x70(%rbp)
movsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0x68(%rbp)
movsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0xd0(%rbp),%xmm0
ff
subsd  -0x90(%rbp),%xmm0
ff
mov    $0x2,%edi
call   10a0 <pow@plt>
movsd  %xmm0,-0xf0(%rbp)
ff
movsd  -0xc8(%rbp),%xmm0
ff
subsd  -0x88(%rbp),%xmm0
ff
mov    $0x2,%edi
call   10a0 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0xf0(%rbp),%xmm0
ff
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  -0xc0(%rbp),%xmm0
ff
subsd  -0x80(%rbp),%xmm0
mov    $0x2,%edi
call   10a0 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0xe8(%rbp),%xmm0
ff
addsd  %xmm1,%xmm0
call   10b0 <sqrt@plt>
movsd  %xmm0,-0xb8(%rbp)
ff
jmp    125d <main+0xcd>
mov    -0xdc(%rbp),%esi
lea    0xd2b(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xd2e(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  0xc36(%rip),%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movl   $0x0,-0xdc(%rbp)
movsd  -0xb8(%rbp),%xmm0
ff
ucomisd -0xd8(%rbp),%xmm0
ff
jbe    14ef <main+0x35f>
mov    -0xdc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xdc(%rbp)
movsd  -0x90(%rbp),%xmm0
ff
movsd  -0x88(%rbp),%xmm1
ff
movsd  -0x80(%rbp),%xmm2
call   1040 <fX1@plt>
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
movsd  -0x88(%rbp),%xmm1
ff
movsd  -0x80(%rbp),%xmm2
call   1090 <fX2@plt>
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
movsd  -0x88(%rbp),%xmm1
ff
movsd  -0x80(%rbp),%xmm2
call   1030 <fX3@plt>
movsd  %xmm0,-0x80(%rbp)
movsd  -0xd0(%rbp),%xmm0
ff
subsd  -0x90(%rbp),%xmm0
ff
mov    $0x2,%edi
call   10a0 <pow@plt>
movsd  %xmm0,-0x100(%rbp)
ff
movsd  -0xc8(%rbp),%xmm0
ff
subsd  -0x88(%rbp),%xmm0
ff
mov    $0x2,%edi
call   10a0 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x100(%rbp),%xmm0
ff
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xf8(%rbp)
ff
movsd  -0xc0(%rbp),%xmm0
ff
subsd  -0x80(%rbp),%xmm0
mov    $0x2,%edi
call   10a0 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0xf8(%rbp),%xmm0
ff
addsd  %xmm1,%xmm0
call   10b0 <sqrt@plt>
movsd  %xmm0,-0xb8(%rbp)
ff
jmp    13dc <main+0x24c>
mov    -0xdc(%rbp),%esi
lea    0xbbe(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xbd9(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x0,-0xdc(%rbp)
movsd  0xaf5(%rip),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  0xae0(%rip),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  0xacb(%rip),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  0xab6(%rip),%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0xb8(%rbp),%xmm0
ff
ucomisd -0xd8(%rbp),%xmm0
ff
jbe    1677 <main+0x4e7>
mov    -0xdc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xdc(%rbp)
movsd  -0x70(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm1
movsd  -0x60(%rbp),%xmm2
call   1040 <fX1@plt>
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x70(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm1
movsd  -0x60(%rbp),%xmm2
call   1090 <fX2@plt>
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x70(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm1
movsd  -0x60(%rbp),%xmm2
call   1030 <fX3@plt>
movsd  %xmm0,-0x80(%rbp)
movsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0x70(%rbp)
movsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0x68(%rbp)
movsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0xd0(%rbp),%xmm0
ff
subsd  -0x90(%rbp),%xmm0
ff
mov    $0x2,%edi
call   10a0 <pow@plt>
movsd  %xmm0,-0x110(%rbp)
ff
movsd  -0xc8(%rbp),%xmm0
ff
subsd  -0x88(%rbp),%xmm0
ff
mov    $0x2,%edi
call   10a0 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x110(%rbp),%xmm0
ff
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x108(%rbp)
ff
movsd  -0xc0(%rbp),%xmm0
ff
subsd  -0x80(%rbp),%xmm0
mov    $0x2,%edi
call   10a0 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x108(%rbp),%xmm0
ff
addsd  %xmm1,%xmm0
call   10b0 <sqrt@plt>
movsd  %xmm0,-0xb8(%rbp)
ff
jmp    1552 <main+0x3c2>
mov    -0xdc(%rbp),%esi
lea    0xa36(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xa60(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x0,-0xdc(%rbp)
movsd  0x96d(%rip),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  0x955(%rip),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  0x93d(%rip),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  0x928(%rip),%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0xb8(%rbp),%xmm0
ff
ucomisd -0xd8(%rbp),%xmm0
ff
jbe    17f3 <main+0x663>
mov    -0xdc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xdc(%rbp)
movsd  -0x90(%rbp),%xmm0
ff
movsd  -0x88(%rbp),%xmm1
ff
movsd  -0x80(%rbp),%xmm2
call   1040 <fX1@plt>
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
movsd  -0x88(%rbp),%xmm1
ff
movsd  -0x80(%rbp),%xmm2
call   1090 <fX2@plt>
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
movsd  -0x88(%rbp),%xmm1
ff
movsd  -0x80(%rbp),%xmm2
call   1030 <fX3@plt>
movsd  %xmm0,-0x80(%rbp)
movsd  -0xd0(%rbp),%xmm0
ff
subsd  -0x90(%rbp),%xmm0
ff
mov    $0x2,%edi
call   10a0 <pow@plt>
movsd  %xmm0,-0x120(%rbp)
ff
movsd  -0xc8(%rbp),%xmm0
ff
subsd  -0x88(%rbp),%xmm0
ff
mov    $0x2,%edi
call   10a0 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x120(%rbp),%xmm0
ff
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x118(%rbp)
ff
movsd  -0xc0(%rbp),%xmm0
ff
subsd  -0x80(%rbp),%xmm0
mov    $0x2,%edi
call   10a0 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x118(%rbp),%xmm0
ff
addsd  %xmm1,%xmm0
call   10b0 <sqrt@plt>
movsd  %xmm0,-0xb8(%rbp)
ff
jmp    16e0 <main+0x550>
mov    -0xdc(%rbp),%esi
lea    0x8ba(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0x8f3(%rip),%rdi
call   1050 <system@plt>
mov    -0x4(%rbp),%eax
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
sub    $0x38,%rsp
movsd  0xe72(%rip),%xmm0
mov    $0xfffffffa,%edi
call   1090 <pow@plt>
movsd  %xmm0,0x28(%rsp)
lea    0xeb2(%rip),%rdi
call   1050 <puts@plt>
movsd  0xe4e(%rip),%xmm1
ucomisd 0x28(%rsp),%xmm1
jbe    12d8 <main+0x158>
xor    %ebx,%ebx
xorps  %xmm2,%xmm2
xorps  %xmm3,%xmm3
xorpd  %xmm0,%xmm0
movsd  %xmm0,0x10(%rsp)
jmp    1204 <main+0x84>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
call   10a0 <sqrt@plt>
movsd  0x28(%rsp),%xmm1
movsd  0x18(%rsp),%xmm2
movsd  0x30(%rsp),%xmm3
add    $0x1,%ebx
ucomisd %xmm1,%xmm0
jbe    1448 <main+0x2c8>
movsd  %xmm2,0x20(%rsp)
movaps %xmm2,%xmm0
movaps %xmm3,%xmm1
movsd  %xmm3,0x8(%rsp)
movsd  0x10(%rsp),%xmm2
call   1040 <fX1@plt>
movsd  %xmm0,0x18(%rsp)
movsd  0x20(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
movsd  0x10(%rsp),%xmm2
call   1080 <fX2@plt>
movsd  %xmm0,0x30(%rsp)
movsd  0x20(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
movsd  0x10(%rsp),%xmm2
call   1030 <fX3@plt>
movsd  %xmm0,0x10(%rsp)
movsd  0xd9f(%rip),%xmm0
subsd  0x18(%rsp),%xmm0
mov    $0x2,%edi
call   1090 <pow@plt>
movsd  %xmm0,0x8(%rsp)
movsd  0xd89(%rip),%xmm0
subsd  0x30(%rsp),%xmm0
mov    $0x2,%edi
call   1090 <pow@plt>
addsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0xd6d(%rip),%xmm0
subsd  0x10(%rsp),%xmm0
mov    $0x2,%edi
call   1090 <pow@plt>
addsd  0x8(%rsp),%xmm0
ucomisd 0xd6f(%rip),%xmm0
jb     11e0 <main+0x60>
sqrtsd %xmm0,%xmm0
jmp    11e5 <main+0x65>
lea    0xd61(%rip),%rdi
xor    %ebp,%ebp
xor    %esi,%esi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xd77(%rip),%rdi
call   1050 <puts@plt>
lea    0xd43(%rip),%rdi
xor    %ebx,%ebx
mov    %ebp,%esi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xd70(%rip),%rdi
call   1050 <puts@plt>
movsd  0xce4(%rip),%xmm0
ucomisd 0x28(%rsp),%xmm0
jbe    1580 <main+0x400>
movsd  0xcf0(%rip),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0xcea(%rip),%xmm3
movsd  0xcea(%rip),%xmm2
xor    %ebp,%ebp
jmp    1374 <main+0x1f4>
nopw   0x0(%rax,%rax,1)
call   10a0 <sqrt@plt>
movsd  0x28(%rsp),%xmm1
movsd  0x18(%rsp),%xmm2
movsd  0x30(%rsp),%xmm3
add    $0x1,%ebp
ucomisd %xmm1,%xmm0
jbe    15bd <main+0x43d>
movaps %xmm2,%xmm0
movsd  %xmm2,0x20(%rsp)
movaps %xmm3,%xmm1
movsd  %xmm3,0x8(%rsp)
movsd  0x10(%rsp),%xmm2
call   1040 <fX1@plt>
movsd  %xmm0,0x18(%rsp)
movsd  0x20(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
movsd  0x10(%rsp),%xmm2
call   1080 <fX2@plt>
movsd  %xmm0,0x30(%rsp)
movsd  0x20(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
movsd  0x10(%rsp),%xmm2
call   1030 <fX3@plt>
movsd  %xmm0,0x10(%rsp)
movsd  0xc2f(%rip),%xmm0
subsd  0x18(%rsp),%xmm0
mov    $0x2,%edi
call   1090 <pow@plt>
movsd  %xmm0,0x8(%rsp)
movsd  0xc19(%rip),%xmm0
subsd  0x30(%rsp),%xmm0
mov    $0x2,%edi
call   1090 <pow@plt>
addsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0xbfd(%rip),%xmm0
subsd  0x10(%rsp),%xmm0
mov    $0x2,%edi
call   1090 <pow@plt>
addsd  0x8(%rsp),%xmm0
ucomisd 0xbff(%rip),%xmm0
jb     1350 <main+0x1d0>
sqrtsd %xmm0,%xmm0
jmp    1355 <main+0x1d5>
lea    0xbf1(%rip),%rdi
xor    %ebp,%ebp
mov    %ebx,%esi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xc07(%rip),%rdi
call   1050 <puts@plt>
movsd  0xb92(%rip),%xmm0
ucomisd 0x28(%rsp),%xmm0
jbe    15a1 <main+0x421>
xor    %ebp,%ebp
xorpd  %xmm0,%xmm0
movsd  %xmm0,0x10(%rsp)
xorps  %xmm2,%xmm2
xorpd  %xmm0,%xmm0
movsd  %xmm0,0x8(%rsp)
jmp    14be <main+0x33e>
cs nopw 0x0(%rax,%rax,1)
nop
call   10a0 <sqrt@plt>
movsd  0x28(%rsp),%xmm1
movsd  0x20(%rsp),%xmm2
add    $0x1,%ebp
ucomisd %xmm1,%xmm0
jbe    12f6 <main+0x176>
movaps %xmm2,%xmm0
movsd  0x8(%rsp),%xmm1
movsd  0x10(%rsp),%xmm2
call   1040 <fX1@plt>
movsd  %xmm0,0x20(%rsp)
movsd  0x8(%rsp),%xmm1
movsd  0x10(%rsp),%xmm2
call   1080 <fX2@plt>
movaps %xmm0,%xmm1
movsd  %xmm0,0x8(%rsp)
movsd  0x20(%rsp),%xmm0
movsd  0x10(%rsp),%xmm2
call   1030 <fX3@plt>
movsd  %xmm0,0x10(%rsp)
movsd  0xaf7(%rip),%xmm0
subsd  0x20(%rsp),%xmm0
mov    $0x2,%edi
call   1090 <pow@plt>
movsd  %xmm0,0x18(%rsp)
movsd  0xae1(%rip),%xmm0
subsd  0x8(%rsp),%xmm0
mov    $0x2,%edi
call   1090 <pow@plt>
addsd  0x18(%rsp),%xmm0
movsd  %xmm0,0x18(%rsp)
movsd  0xac5(%rip),%xmm0
subsd  0x10(%rsp),%xmm0
mov    $0x2,%edi
call   1090 <pow@plt>
addsd  0x18(%rsp),%xmm0
ucomisd 0xac7(%rip),%xmm0
jb     14a0 <main+0x320>
sqrtsd %xmm0,%xmm0
jmp    14a5 <main+0x325>
lea    0xab9(%rip),%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xaf6(%rip),%rdi
call   1050 <puts@plt>
jmp    1700 <main+0x580>
lea    0xa98(%rip),%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xac7(%rip),%rdi
call   1050 <puts@plt>
lea    0xa7c(%rip),%rdi
xor    %ebx,%ebx
mov    %ebp,%esi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xab7(%rip),%rdi
call   1050 <puts@plt>
movsd  0xa1d(%rip),%xmm0
ucomisd 0x28(%rsp),%xmm0
jbe    1700 <main+0x580>
movsd  0xa31(%rip),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0xa2b(%rip),%xmm2
movsd  0xa13(%rip),%xmm0
movsd  %xmm0,0x10(%rsp)
xor    %ebx,%ebx
jmp    163e <main+0x4be>
nopw   0x0(%rax,%rax,1)
call   10a0 <sqrt@plt>
movsd  0x28(%rsp),%xmm1
movsd  0x20(%rsp),%xmm2
add    $0x1,%ebx
ucomisd %xmm1,%xmm0
jbe    1700 <main+0x580>
movaps %xmm2,%xmm0
movsd  0x8(%rsp),%xmm1
movsd  0x10(%rsp),%xmm2
call   1040 <fX1@plt>
movsd  %xmm0,0x20(%rsp)
movsd  0x8(%rsp),%xmm1
movsd  0x10(%rsp),%xmm2
call   1080 <fX2@plt>
movaps %xmm0,%xmm1
movsd  %xmm0,0x8(%rsp)
movsd  0x20(%rsp),%xmm0
movsd  0x10(%rsp),%xmm2
call   1030 <fX3@plt>
movsd  %xmm0,0x10(%rsp)
movsd  0x977(%rip),%xmm0
subsd  0x20(%rsp),%xmm0
mov    $0x2,%edi
call   1090 <pow@plt>
movsd  %xmm0,0x18(%rsp)
movsd  0x961(%rip),%xmm0
subsd  0x8(%rsp),%xmm0
mov    $0x2,%edi
call   1090 <pow@plt>
addsd  0x18(%rsp),%xmm0
movsd  %xmm0,0x18(%rsp)
movsd  0x945(%rip),%xmm0
subsd  0x10(%rsp),%xmm0
mov    $0x2,%edi
call   1090 <pow@plt>
addsd  0x18(%rsp),%xmm0
ucomisd 0x947(%rip),%xmm0
jb     1620 <main+0x4a0>
sqrtsd %xmm0,%xmm0
jmp    1625 <main+0x4a5>
lea    0x939(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0x93a(%rip),%rdi
call   1060 <system@plt>
xor    %eax,%eax
add    $0x38,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@__const.main.A = [3 x [3 x double]] [[3 x double] [double 4.000000e+00, double 1.000000e+00, double 1.000000e+00], [3 x double] [double 1.000000e+00, double 3.000000e+00, double 1.000000e+00], [3 x double] [double 1.000000e+00, double 1.000000e+00, double 5.000000e+00]]
@__const.main.B = [3 x double] [double 9.000000e+00, double 1.000000e+01, double 1.800000e+01]
@__const.main.sol = [3 x double] [double 1.000000e+00, double 2.000000e+00, double 3.000000e+00]
@.str = [18 x i8] c"Metodo de jacobi\0A\00"
@.str.1 = [17 x i8] c"iteraciones: %d\0A\00"
@.str.2 = [24 x i8] c"Metodo de Gauss-Seidel\0A\00"
@.str.3 = [15 x i8] c"\0Aapartado c)\0A\0A\00"
@.str.4 = [15 x i8] c"\0Aapartado d)\0A\0A\00"
@.str.5 = [6 x i8] c"PAUSE\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [3 x [3 x double]]
%3 = alloca [3 x double]
%4 = alloca [3 x double]
%5 = alloca [3 x double]
%6 = alloca double
%7 = alloca [3 x double]
%8 = alloca double
%9 = alloca i32
store i32 0, i32* %1
%10 = bitcast [3 x [3 x double]]* %2 to i8*
%11 = bitcast [3 x double]* %3 to i8*
%12 = bitcast [3 x double]* %5 to i8*
store double 1.000000e+01, double* %6
%13 = bitcast [3 x double]* %7 to i8*
%14 = call double @pow(double 1.000000e+01, i32 -6)
store double %14, double* %8
store i32 0, i32* %9
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
br label %16
16: ; preds = %20, %0
%17 = load double, double* %6
%18 = load double, double* %8
%19 = fcmp ogt double %17, %18
br i1 %19, label %20, label %77
20: ; preds = %16
%21 = load i32, i32* %9
%22 = add nsw i32 %21, 1
store i32 %22, i32* %9
%23 = getelementptr inbounds [3 x double], [3 x double]* %3, i64 0, i64 0
%24 = load double, double* %23
%25 = getelementptr inbounds [3 x double], [3 x double]* %3, i64 0, i64 1
%26 = load double, double* %25
%27 = getelementptr inbounds [3 x double], [3 x double]* %3, i64 0, i64 2
%28 = load double, double* %27
%29 = call double @fX1(double %24, double %26, double %28)
%30 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 0
store double %29, double* %30
%31 = getelementptr inbounds [3 x double], [3 x double]* %3, i64 0, i64 0
%32 = load double, double* %31
%33 = getelementptr inbounds [3 x double], [3 x double]* %3, i64 0, i64 1
%34 = load double, double* %33
%35 = getelementptr inbounds [3 x double], [3 x double]* %3, i64 0, i64 2
%36 = load double, double* %35
%37 = call double @fX2(double %32, double %34, double %36)
%38 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 1
store double %37, double* %38
%39 = getelementptr inbounds [3 x double], [3 x double]* %3, i64 0, i64 0
%40 = load double, double* %39
%41 = getelementptr inbounds [3 x double], [3 x double]* %3, i64 0, i64 1
%42 = load double, double* %41
%43 = getelementptr inbounds [3 x double], [3 x double]* %3, i64 0, i64 2
%44 = load double, double* %43
%45 = call double @fX3(double %40, double %42, double %44)
%46 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 2
store double %45, double* %46
%47 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 0
%48 = load double, double* %47
%49 = getelementptr inbounds [3 x double], [3 x double]* %3, i64 0, i64 0
store double %48, double* %49
%50 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 1
%51 = load double, double* %50
%52 = getelementptr inbounds [3 x double], [3 x double]* %3, i64 0, i64 1
store double %51, double* %52
%53 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 2
%54 = load double, double* %53
%55 = getelementptr inbounds [3 x double], [3 x double]* %3, i64 0, i64 2
store double %54, double* %55
%56 = getelementptr inbounds [3 x double], [3 x double]* %7, i64 0, i64 0
%57 = load double, double* %56
%58 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 0
%59 = load double, double* %58
%60 = fsub double %57, %59
%61 = call double @pow(double %60, i32 2)
%62 = getelementptr inbounds [3 x double], [3 x double]* %7, i64 0, i64 1
%63 = load double, double* %62
%64 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 1
%65 = load double, double* %64
%66 = fsub double %63, %65
%67 = call double @pow(double %66, i32 2)
%68 = fadd double %61, %67
%69 = getelementptr inbounds [3 x double], [3 x double]* %7, i64 0, i64 2
%70 = load double, double* %69
%71 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 2
%72 = load double, double* %71
%73 = fsub double %70, %72
%74 = call double @pow(double %73, i32 2)
%75 = fadd double %68, %74
%76 = call double @sqrt(double %75)
store double %76, double* %6
br label %16
77: ; preds = %16
%78 = load i32, i32* %9
%79 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %78)
%80 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0))
%81 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 0
store double 0.000000e+00, double* %81
%82 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 1
store double 0.000000e+00, double* %82
%83 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 2
store double 0.000000e+00, double* %83
store double 1.000000e+01, double* %6
store i32 0, i32* %9
br label %84
84: ; preds = %88, %77
%85 = load double, double* %6
%86 = load double, double* %8
%87 = fcmp ogt double %85, %86
br i1 %87, label %88, label %136
88: ; preds = %84
%89 = load i32, i32* %9
%90 = add nsw i32 %89, 1
store i32 %90, i32* %9
%91 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 0
%92 = load double, double* %91
%93 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 1
%94 = load double, double* %93
%95 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 2
%96 = load double, double* %95
%97 = call double @fX1(double %92, double %94, double %96)
%98 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 0
store double %97, double* %98
%99 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 0
%100 = load double, double* %99
%101 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 1
%102 = load double, double* %101
%103 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 2
%104 = load double, double* %103
%105 = call double @fX2(double %100, double %102, double %104)
%106 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 1
store double %105, double* %106
%107 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 0
%108 = load double, double* %107
%109 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 1
%110 = load double, double* %109
%111 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 2
%112 = load double, double* %111
%113 = call double @fX3(double %108, double %110, double %112)
%114 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 2
store double %113, double* %114
%115 = getelementptr inbounds [3 x double], [3 x double]* %7, i64 0, i64 0
%116 = load double, double* %115
%117 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 0
%118 = load double, double* %117
%119 = fsub double %116, %118
%120 = call double @pow(double %119, i32 2)
%121 = getelementptr inbounds [3 x double], [3 x double]* %7, i64 0, i64 1
%122 = load double, double* %121
%123 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 1
%124 = load double, double* %123
%125 = fsub double %122, %124
%126 = call double @pow(double %125, i32 2)
%127 = fadd double %120, %126
%128 = getelementptr inbounds [3 x double], [3 x double]* %7, i64 0, i64 2
%129 = load double, double* %128
%130 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 2
%131 = load double, double* %130
%132 = fsub double %129, %131
%133 = call double @pow(double %132, i32 2)
%134 = fadd double %127, %133
%135 = call double @sqrt(double %134)
store double %135, double* %6
br label %84
136: ; preds = %84
%137 = load i32, i32* %9
%138 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %137)
%139 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0))
store i32 0, i32* %9
%140 = getelementptr inbounds [3 x double], [3 x double]* %3, i64 0, i64 0
store double -5.270000e+02, double* %140
%141 = getelementptr inbounds [3 x double], [3 x double]* %3, i64 0, i64 1
store double 1.000000e+03, double* %141
%142 = getelementptr inbounds [3 x double], [3 x double]* %3, i64 0, i64 2
store double -8.000000e+04, double* %142
store double 1.000000e+01, double* %6
br label %143
143: ; preds = %147, %136
%144 = load double, double* %6
%145 = load double, double* %8
%146 = fcmp ogt double %144, %145
br i1 %146, label %147, label %204
147: ; preds = %143
%148 = load i32, i32* %9
%149 = add nsw i32 %148, 1
store i32 %149, i32* %9
%150 = getelementptr inbounds [3 x double], [3 x double]* %3, i64 0, i64 0
%151 = load double, double* %150
%152 = getelementptr inbounds [3 x double], [3 x double]* %3, i64 0, i64 1
%153 = load double, double* %152
%154 = getelementptr inbounds [3 x double], [3 x double]* %3, i64 0, i64 2
%155 = load double, double* %154
%156 = call double @fX1(double %151, double %153, double %155)
%157 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 0
store double %156, double* %157
%158 = getelementptr inbounds [3 x double], [3 x double]* %3, i64 0, i64 0
%159 = load double, double* %158
%160 = getelementptr inbounds [3 x double], [3 x double]* %3, i64 0, i64 1
%161 = load double, double* %160
%162 = getelementptr inbounds [3 x double], [3 x double]* %3, i64 0, i64 2
%163 = load double, double* %162
%164 = call double @fX2(double %159, double %161, double %163)
%165 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 1
store double %164, double* %165
%166 = getelementptr inbounds [3 x double], [3 x double]* %3, i64 0, i64 0
%167 = load double, double* %166
%168 = getelementptr inbounds [3 x double], [3 x double]* %3, i64 0, i64 1
%169 = load double, double* %168
%170 = getelementptr inbounds [3 x double], [3 x double]* %3, i64 0, i64 2
%171 = load double, double* %170
%172 = call double @fX3(double %167, double %169, double %171)
%173 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 2
store double %172, double* %173
%174 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 0
%175 = load double, double* %174
%176 = getelementptr inbounds [3 x double], [3 x double]* %3, i64 0, i64 0
store double %175, double* %176
%177 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 1
%178 = load double, double* %177
%179 = getelementptr inbounds [3 x double], [3 x double]* %3, i64 0, i64 1
store double %178, double* %179
%180 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 2
%181 = load double, double* %180
%182 = getelementptr inbounds [3 x double], [3 x double]* %3, i64 0, i64 2
store double %181, double* %182
%183 = getelementptr inbounds [3 x double], [3 x double]* %7, i64 0, i64 0
%184 = load double, double* %183
%185 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 0
%186 = load double, double* %185
%187 = fsub double %184, %186
%188 = call double @pow(double %187, i32 2)
%189 = getelementptr inbounds [3 x double], [3 x double]* %7, i64 0, i64 1
%190 = load double, double* %189
%191 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 1
%192 = load double, double* %191
%193 = fsub double %190, %192
%194 = call double @pow(double %193, i32 2)
%195 = fadd double %188, %194
%196 = getelementptr inbounds [3 x double], [3 x double]* %7, i64 0, i64 2
%197 = load double, double* %196
%198 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 2
%199 = load double, double* %198
%200 = fsub double %197, %199
%201 = call double @pow(double %200, i32 2)
%202 = fadd double %195, %201
%203 = call double @sqrt(double %202)
store double %203, double* %6
br label %143
204: ; preds = %143
%205 = load i32, i32* %9
%206 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %205)
%207 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0))
store i32 0, i32* %9
%208 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 0
store double -5.270000e+02, double* %208
%209 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 1
store double 1.000000e+03, double* %209
%210 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 2
store double -8.000000e+04, double* %210
store double 1.000000e+01, double* %6
br label %211
211: ; preds = %215, %204
%212 = load double, double* %6
%213 = load double, double* %8
%214 = fcmp ogt double %212, %213
br i1 %214, label %215, label %263
215: ; preds = %211
%216 = load i32, i32* %9
%217 = add nsw i32 %216, 1
store i32 %217, i32* %9
%218 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 0
%219 = load double, double* %218
%220 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 1
%221 = load double, double* %220
%222 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 2
%223 = load double, double* %222
%224 = call double @fX1(double %219, double %221, double %223)
%225 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 0
store double %224, double* %225
%226 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 0
%227 = load double, double* %226
%228 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 1
%229 = load double, double* %228
%230 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 2
%231 = load double, double* %230
%232 = call double @fX2(double %227, double %229, double %231)
%233 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 1
store double %232, double* %233
%234 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 0
%235 = load double, double* %234
%236 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 1
%237 = load double, double* %236
%238 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 2
%239 = load double, double* %238
%240 = call double @fX3(double %235, double %237, double %239)
%241 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 2
store double %240, double* %241
%242 = getelementptr inbounds [3 x double], [3 x double]* %7, i64 0, i64 0
%243 = load double, double* %242
%244 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 0
%245 = load double, double* %244
%246 = fsub double %243, %245
%247 = call double @pow(double %246, i32 2)
%248 = getelementptr inbounds [3 x double], [3 x double]* %7, i64 0, i64 1
%249 = load double, double* %248
%250 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 1
%251 = load double, double* %250
%252 = fsub double %249, %251
%253 = call double @pow(double %252, i32 2)
%254 = fadd double %247, %253
%255 = getelementptr inbounds [3 x double], [3 x double]* %7, i64 0, i64 2
%256 = load double, double* %255
%257 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 2
%258 = load double, double* %257
%259 = fsub double %256, %258
%260 = call double @pow(double %259, i32 2)
%261 = fadd double %254, %260
%262 = call double @sqrt(double %261)
store double %262, double* %6
br label %211
263: ; preds = %211
%264 = load i32, i32* %9
%265 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %264)
%266 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
%267 = load i32, i32* %1
ret i32 %267
}

LLVM IR (-O2):
@.str.1 = [17 x i8] c"iteraciones: %d\0A\00"
@.str.5 = [6 x i8] c"PAUSE\00"
@str = [17 x i8] c"Metodo de jacobi\00"
@str.6 = [23 x i8] c"Metodo de Gauss-Seidel\00"
@str.7 = [14 x i8] c"\0Aapartado c)\0A\00"
@str.8 = [14 x i8] c"\0Aapartado d)\0A\00"
define i32 @main() {
%1 = tail call double @pow(double 1.000000e+01, i32 -6)
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
%3 = fcmp olt double %1, 1.000000e+01
br i1 %3, label %4, label %45
4: ; preds = %0, %4
%5 = phi i32 [ %9, %4 ], [ 0, %0 ]
%6 = phi double [ %10, %4 ], [ 0.000000e+00, %0 ]
%7 = phi double [ %11, %4 ], [ 0.000000e+00, %0 ]
%8 = phi double [ %12, %4 ], [ 0.000000e+00, %0 ]
%9 = add nuw nsw i32 %5, 1
%10 = tail call double @fX1(double %6, double %7, double %8)
%11 = tail call double @fX2(double %6, double %7, double %8)
%12 = tail call double @fX3(double %6, double %7, double %8)
%13 = fsub double 1.000000e+00, %10
%14 = tail call double @pow(double %13, i32 2)
%15 = fsub double 2.000000e+00, %11
%16 = tail call double @pow(double %15, i32 2)
%17 = fadd double %14, %16
%18 = fsub double 3.000000e+00, %12
%19 = tail call double @pow(double %18, i32 2)
%20 = fadd double %17, %19
%21 = tail call double @sqrt(double %20)
%22 = fcmp ogt double %21, %1
br i1 %22, label %4, label %23
23: ; preds = %4
%24 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %9)
%25 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.6, i64 0, i64 0))
br i1 %3, label %26, label %71
26: ; preds = %23, %26
%27 = phi i32 [ %31, %26 ], [ 0, %23 ]
%28 = phi double [ %34, %26 ], [ 0.000000e+00, %23 ]
%29 = phi double [ %32, %26 ], [ 0.000000e+00, %23 ]
%30 = phi double [ %33, %26 ], [ 0.000000e+00, %23 ]
%31 = add nuw nsw i32 %27, 1
%32 = tail call double @fX1(double %29, double %30, double %28)
%33 = tail call double @fX2(double %32, double %30, double %28)
%34 = tail call double @fX3(double %32, double %33, double %28)
%35 = fsub double 1.000000e+00, %32
%36 = tail call double @pow(double %35, i32 2)
%37 = fsub double 2.000000e+00, %33
%38 = tail call double @pow(double %37, i32 2)
%39 = fadd double %36, %38
%40 = fsub double 3.000000e+00, %34
%41 = tail call double @pow(double %40, i32 2)
%42 = fadd double %39, %41
%43 = tail call double @sqrt(double %42)
%44 = fcmp ogt double %43, %1
br i1 %44, label %26, label %48
45: ; preds = %0
%46 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 0)
%47 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.6, i64 0, i64 0))
br label %48
48: ; preds = %26, %45
%49 = phi i32 [ 0, %45 ], [ %31, %26 ]
%50 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %49)
%51 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.7, i64 0, i64 0))
br i1 %3, label %52, label %97
52: ; preds = %48, %52
%53 = phi i32 [ %57, %52 ], [ 0, %48 ]
%54 = phi double [ %58, %52 ], [ -5.270000e+02, %48 ]
%55 = phi double [ %59, %52 ], [ 1.000000e+03, %48 ]
%56 = phi double [ %60, %52 ], [ -8.000000e+04, %48 ]
%57 = add nuw nsw i32 %53, 1
%58 = tail call double @fX1(double %54, double %55, double %56)
%59 = tail call double @fX2(double %54, double %55, double %56)
%60 = tail call double @fX3(double %54, double %55, double %56)
%61 = fsub double 1.000000e+00, %58
%62 = tail call double @pow(double %61, i32 2)
%63 = fsub double 2.000000e+00, %59
%64 = tail call double @pow(double %63, i32 2)
%65 = fadd double %62, %64
%66 = fsub double 3.000000e+00, %60
%67 = tail call double @pow(double %66, i32 2)
%68 = fadd double %65, %67
%69 = tail call double @sqrt(double %68)
%70 = fcmp ogt double %69, %1
br i1 %70, label %52, label %74
71: ; preds = %23
%72 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 0)
%73 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.7, i64 0, i64 0))
br label %74
74: ; preds = %52, %71
%75 = phi i32 [ 0, %71 ], [ %57, %52 ]
%76 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %75)
%77 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.8, i64 0, i64 0))
br i1 %3, label %78, label %100
78: ; preds = %74, %78
%79 = phi i32 [ %83, %78 ], [ 0, %74 ]
%80 = phi double [ %86, %78 ], [ -8.000000e+04, %74 ]
%81 = phi double [ %84, %78 ], [ -5.270000e+02, %74 ]
%82 = phi double [ %85, %78 ], [ 1.000000e+03, %74 ]
%83 = add nuw nsw i32 %79, 1
%84 = tail call double @fX1(double %81, double %82, double %80)
%85 = tail call double @fX2(double %84, double %82, double %80)
%86 = tail call double @fX3(double %84, double %85, double %80)
%87 = fsub double 1.000000e+00, %84
%88 = tail call double @pow(double %87, i32 2)
%89 = fsub double 2.000000e+00, %85
%90 = tail call double @pow(double %89, i32 2)
%91 = fadd double %88, %90
%92 = fsub double 3.000000e+00, %86
%93 = tail call double @pow(double %92, i32 2)
%94 = fadd double %91, %93
%95 = tail call double @sqrt(double %94)
%96 = fcmp ogt double %95, %1
br i1 %96, label %78, label %100
97: ; preds = %48
%98 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 0)
%99 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.8, i64 0, i64 0))
br label %100
100: ; preds = %78, %97, %74
%101 = phi i32 [ 0, %74 ], [ 0, %97 ], [ %83, %78 ]
%102 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %101)
%103 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
ret i32 0
}