int main(void) {
  double **a;
  double *b, *x;
  double delta = 0.00;
  int MAX_ITE = 0, op = 0, n = 0;
  while (op != 3) {
    printf("\n***************************************\n");
    printf("*   %sLinear system equation solver%s   *\n", "\033[0;40;32m",
           "\033[0m");
    printf("***************************************\n");
    printf("*      Choose the solver method:      *\n");
    printf("***************************************\n");
    printf("* %s1%s- Jacobi                           *\n", "\033[0;40;32m",
           "\033[0m");
    printf("* %s2%s- Gauss-Seidel                     *\n", "\033[0;40;32m",
           "\033[0m");
    printf("* %s3%s- Exit                             *\n", "\033[0;40;32m",
           "\033[0m");
    printf("***************************************\n");
    printf("\n");
    scanf("%d", &op);
    switch (op) {
    case 1: {
      char *MATRIZ = calloc(30, sizeof(char));
      char *VECTOR = calloc(30, sizeof(char));
      char *SOLUCION = calloc(30, sizeof(char));
      double *tmp;
      printf("Enter admitted tolerance: \n");
      scanf("%lf", &delta);
      printf("Enter maximum number of iterations allowed: \n");
      scanf("%d", &MAX_ITE);
      printf("Enter the filename which contains the matrix: \n");
      scanf("%s", MATRIZ);
      printf("Enter the filename which contains the initial approximation to "
             "the solution: \n");
      scanf("%s", VECTOR);
      printf("Enter the filename which contains the solution vector: \n");
      scanf("%s", SOLUCION);
      printf("\n");
      n = get_matrix_size(MATRIZ);
      a = read_matrix(MATRIZ);
      b = read_vector(VECTOR, n);
      x = read_vector(SOLUCION, n);
      tmp = jacobi(a, x, b, delta, n, MAX_ITE);
      printf("The final approximation to the solution is: \n");
      show_exponential_vector(tmp, n);
      printf("\n");
      destroy_matrix(a, n);
      free(tmp);
      free(x);
      free(MATRIZ);
      free(VECTOR);
      free(SOLUCION);
    } break;
    case 2: {
      char *MATRIZ = calloc(30, sizeof(char));
      char *VECTOR = calloc(30, sizeof(char));
      char *SOLUCION = calloc(30, sizeof(char));
      double *tmp;
      printf("Enter admitted tolerance: \n");
      scanf("%lf", &delta);
      printf("Enter maximum number of iterations allowed: \n");
      scanf("%d", &MAX_ITE);
      printf("Enter the filename which contains the matrix: \n");
      scanf("%s", MATRIZ);
      printf("Enter the filename which contains the initial approximation to "
             "the solution: \n");
      scanf("%s", VECTOR);
      printf("Enter the filename which contains the solution vector: \n");
      scanf("%s", SOLUCION);
      printf("\n");
      n = get_matrix_size(MATRIZ);
      a = read_matrix(MATRIZ);
      b = read_vector(VECTOR, n);
      x = read_vector(SOLUCION, n);
      tmp = gaussseidel(a, x, b, delta, n, MAX_ITE);
      printf("The final approximation to the solution is: \n");
      show_exponential_vector(x, n);
      printf("\n");
      destroy_matrix(a, n);
      free(x);
      free(tmp);
      free(MATRIZ);
      free(VECTOR);
      free(SOLUCION);
    } break;
    case 3: {
      op = 3;
      printf("Successfully exited. \n");
    }
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movl   $0x0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
movl   $0x0,-0x30(%rbp)
movl   $0x0,-0x34(%rbp)
cmpl   $0x3,-0x30(%rbp)
je     16ab <main+0x4fb>
lea    0xe10(%rip),%rdi
xor    %eax,%eax
mov    %al,-0x7d(%rbp)
call   1070 <printf@plt>
mov    -0x7d(%rbp),%al
lea    0xe26(%rip),%rdi
lea    0xe4a(%rip),%rsi
mov    %rsi,-0x98(%rbp)
lea    0xe47(%rip),%rdx
mov    %rdx,-0x90(%rbp)
call   1070 <printf@plt>
mov    -0x7d(%rbp),%al
lea    0xdd2(%rip),%rdi
mov    %rdi,-0x88(%rbp)
call   1070 <printf@plt>
mov    -0x7d(%rbp),%al
lea    0xe20(%rip),%rdi
call   1070 <printf@plt>
mov    -0x88(%rbp),%rdi
mov    -0x7d(%rbp),%al
call   1070 <printf@plt>
mov    -0x98(%rbp),%rsi
mov    -0x90(%rbp),%rdx
mov    -0x7d(%rbp),%al
lea    0xe1d(%rip),%rdi
call   1070 <printf@plt>
mov    -0x98(%rbp),%rsi
mov    -0x90(%rbp),%rdx
mov    -0x7d(%rbp),%al
lea    0xe2d(%rip),%rdi
call   1070 <printf@plt>
mov    -0x98(%rbp),%rsi
mov    -0x90(%rbp),%rdx
mov    -0x7d(%rbp),%al
lea    0xe3d(%rip),%rdi
call   1070 <printf@plt>
mov    -0x88(%rbp),%rdi
mov    -0x7d(%rbp),%al
call   1070 <printf@plt>
mov    -0x7d(%rbp),%al
lea    0xf9b(%rip),%rdi
call   1070 <printf@plt>
mov    -0x7d(%rbp),%al
lea    0xe3d(%rip),%rdi
lea    -0x30(%rbp),%rsi
call   10d0 <scanf@plt>
mov    -0x30(%rbp),%eax
mov    %eax,-0x7c(%rbp)
sub    $0x1,%eax
je     1317 <main+0x167>
jmp    12f5 <main+0x145>
mov    -0x7c(%rbp),%eax
sub    $0x2,%eax
je     14d4 <main+0x324>
jmp    1306 <main+0x156>
mov    -0x7c(%rbp),%eax
sub    $0x3,%eax
je     1691 <main+0x4e1>
jmp    16a6 <main+0x4f6>
mov    $0x1e,%edi
mov    $0x1,%esi
call   1090 <calloc@plt>
mov    %rax,-0x40(%rbp)
mov    $0x1e,%edi
mov    $0x1,%esi
call   1090 <calloc@plt>
mov    %rax,-0x48(%rbp)
mov    $0x1e,%edi
mov    $0x1,%esi
call   1090 <calloc@plt>
mov    %rax,-0x50(%rbp)
lea    0xdc1(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    0xdcf(%rip),%rdi
lea    -0x28(%rbp),%rsi
mov    $0x0,%al
call   10d0 <scanf@plt>
lea    0xdc1(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    0xd90(%rip),%rdi
lea    -0x2c(%rbp),%rsi
mov    $0x0,%al
call   10d0 <scanf@plt>
lea    0xdcf(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    -0x40(%rbp),%rsi
lea    0xded(%rip),%rdi
mov    $0x0,%al
call   10d0 <scanf@plt>
lea    0xde2(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    -0x48(%rbp),%rsi
lea    0xdcd(%rip),%rdi
mov    $0x0,%al
call   10d0 <scanf@plt>
lea    0xe11(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    -0x50(%rbp),%rsi
lea    0xdad(%rip),%rdi
mov    $0x0,%al
call   10d0 <scanf@plt>
lea    0xe6d(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    -0x40(%rbp),%rdi
mov    $0x0,%al
call   10b0 <get_matrix_size@plt>
mov    %eax,-0x34(%rbp)
mov    -0x40(%rbp),%rdi
mov    $0x0,%al
call   10c0 <read_matrix@plt>
cltq
mov    %rax,-0x10(%rbp)
mov    -0x48(%rbp),%rdi
mov    -0x34(%rbp),%esi
mov    $0x0,%al
call   10a0 <read_vector@plt>
cltq
mov    %rax,-0x18(%rbp)
mov    -0x50(%rbp),%rdi
mov    -0x34(%rbp),%esi
mov    $0x0,%al
call   10a0 <read_vector@plt>
cltq
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x18(%rbp),%rdx
movsd  -0x28(%rbp),%xmm0
mov    -0x34(%rbp),%ecx
mov    -0x2c(%rbp),%r8d
mov    $0x1,%al
call   1040 <jacobi@plt>
cltq
mov    %rax,-0x58(%rbp)
lea    0xdb0(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    -0x58(%rbp),%rdi
mov    -0x34(%rbp),%esi
mov    $0x0,%al
call   1080 <show_exponential_vector@plt>
lea    0xdd7(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    -0x10(%rbp),%rdi
mov    -0x34(%rbp),%esi
mov    $0x0,%al
call   1050 <destroy_matrix@plt>
mov    -0x58(%rbp),%rdi
call   1030 <free@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
mov    -0x40(%rbp),%rdi
call   1030 <free@plt>
mov    -0x48(%rbp),%rdi
call   1030 <free@plt>
mov    -0x50(%rbp),%rdi
call   1030 <free@plt>
jmp    16a6 <main+0x4f6>
mov    $0x1e,%edi
mov    $0x1,%esi
call   1090 <calloc@plt>
mov    %rax,-0x60(%rbp)
mov    $0x1e,%edi
mov    $0x1,%esi
call   1090 <calloc@plt>
mov    %rax,-0x68(%rbp)
mov    $0x1e,%edi
mov    $0x1,%esi
call   1090 <calloc@plt>
mov    %rax,-0x70(%rbp)
lea    0xc04(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    0xc12(%rip),%rdi
lea    -0x28(%rbp),%rsi
mov    $0x0,%al
call   10d0 <scanf@plt>
lea    0xc04(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    0xbd3(%rip),%rdi
lea    -0x2c(%rbp),%rsi
mov    $0x0,%al
call   10d0 <scanf@plt>
lea    0xc12(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    -0x60(%rbp),%rsi
lea    0xc30(%rip),%rdi
mov    $0x0,%al
call   10d0 <scanf@plt>
lea    0xc25(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    -0x68(%rbp),%rsi
lea    0xc10(%rip),%rdi
mov    $0x0,%al
call   10d0 <scanf@plt>
lea    0xc54(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    -0x70(%rbp),%rsi
lea    0xbf0(%rip),%rdi
mov    $0x0,%al
call   10d0 <scanf@plt>
lea    0xcb0(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    -0x60(%rbp),%rdi
mov    $0x0,%al
call   10b0 <get_matrix_size@plt>
mov    %eax,-0x34(%rbp)
mov    -0x60(%rbp),%rdi
mov    $0x0,%al
call   10c0 <read_matrix@plt>
cltq
mov    %rax,-0x10(%rbp)
mov    -0x68(%rbp),%rdi
mov    -0x34(%rbp),%esi
mov    $0x0,%al
call   10a0 <read_vector@plt>
cltq
mov    %rax,-0x18(%rbp)
mov    -0x70(%rbp),%rdi
mov    -0x34(%rbp),%esi
mov    $0x0,%al
call   10a0 <read_vector@plt>
cltq
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x18(%rbp),%rdx
movsd  -0x28(%rbp),%xmm0
mov    -0x34(%rbp),%ecx
mov    -0x2c(%rbp),%r8d
mov    $0x1,%al
call   1060 <gaussseidel@plt>
cltq
mov    %rax,-0x78(%rbp)
lea    0xbf3(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    -0x20(%rbp),%rdi
mov    -0x34(%rbp),%esi
mov    $0x0,%al
call   1080 <show_exponential_vector@plt>
lea    0xc1a(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    -0x10(%rbp),%rdi
mov    -0x34(%rbp),%esi
mov    $0x0,%al
call   1050 <destroy_matrix@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
mov    -0x78(%rbp),%rdi
call   1030 <free@plt>
mov    -0x60(%rbp),%rdi
call   1030 <free@plt>
mov    -0x68(%rbp),%rdi
call   1030 <free@plt>
mov    -0x70(%rbp),%rdi
call   1030 <free@plt>
jmp    16a6 <main+0x4f6>
movl   $0x3,-0x30(%rbp)
lea    0xbb0(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
jmp    11df <main+0x2f>
xor    %eax,%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
movq   $0x0,0x10(%rsp)
movl   $0x0,0xc(%rsp)
movl   $0x0,0x8(%rsp)
lea    0xece(%rip),%r13
lea    0xdfb(%rip),%r14
lea    0xe1f(%rip),%rbp
lea    0xe23(%rip),%rbx
lea    0xeb3(%rip),%r15
lea    0xed4(%rip),%r12
jmp    13fb <main+0x22b>
cs nopw 0x0(%rax,%rax,1)
mov    $0x1e,%edi
mov    $0x1,%esi
call   10b0 <calloc@plt>
mov    %rax,%r15
mov    $0x1e,%edi
mov    $0x1,%esi
call   10b0 <calloc@plt>
mov    %rax,%rbp
mov    $0x1e,%edi
mov    $0x1,%esi
call   10b0 <calloc@plt>
mov    %rax,%r14
lea    0xec6(%rip),%rdi
call   1060 <puts@plt>
lea    0xe4c(%rip),%rdi
lea    0x10(%rsp),%rsi
xor    %eax,%eax
call   10f0 <scanf@plt>
lea    0xec2(%rip),%rdi
call   1060 <puts@plt>
lea    0xe2a(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   10f0 <scanf@plt>
lea    0xed0(%rip),%rdi
call   1060 <puts@plt>
lea    0xe12(%rip),%rbx
mov    %rbx,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   10f0 <scanf@plt>
lea    0xedf(%rip),%rdi
call   1060 <puts@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    %rbp,0x20(%rsp)
xor    %eax,%eax
call   10f0 <scanf@plt>
lea    0xf0f(%rip),%rdi
call   1060 <puts@plt>
mov    %rbx,%rdi
mov    %r14,%rbx
mov    %r14,0x18(%rsp)
mov    %r14,%rsi
xor    %eax,%eax
call   10f0 <scanf@plt>
mov    $0xa,%edi
call   1040 <putchar@plt>
mov    %r15,%rdi
xor    %eax,%eax
call   10d0 <get_matrix_size@plt>
mov    %eax,%r13d
mov    %r15,%rdi
xor    %eax,%eax
call   10e0 <read_matrix@plt>
movslq %eax,%r12
mov    %rbp,%rdi
mov    %r13d,%esi
xor    %eax,%eax
call   10c0 <read_vector@plt>
movslq %eax,%r14
mov    %rbx,%rdi
mov    %r13d,%esi
xor    %eax,%eax
call   10c0 <read_vector@plt>
movslq %eax,%rbp
movsd  0x10(%rsp),%xmm0
mov    0xc(%rsp),%r8d
mov    %r12,%rdi
mov    %rbp,%rsi
mov    %r14,%rdx
lea    0xc9e(%rip),%r14
mov    %r13d,%ecx
mov    $0x1,%al
call   1080 <gaussseidel@plt>
movslq %eax,%rbx
lea    0xeba(%rip),%rdi
call   1060 <puts@plt>
mov    %rbp,%rdi
mov    %r13d,%esi
xor    %eax,%eax
call   10a0 <show_exponential_vector@plt>
mov    $0xa,%edi
call   1040 <putchar@plt>
mov    %r12,%rdi
lea    0xd59(%rip),%r12
mov    %r13d,%esi
xor    %eax,%eax
call   1070 <destroy_matrix@plt>
mov    %rbp,%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
lea    0xd14(%rip),%r13
call   1030 <free@plt>
mov    %r15,%rdi
lea    0xd06(%rip),%r15
lea    0xc68(%rip),%rbx
lea    0xc56(%rip),%rbp
call   1030 <free@plt>
mov    0x20(%rsp),%rdi
call   1030 <free@plt>
mov    0x18(%rsp),%rdi
call   1030 <free@plt>
mov    0x8(%rsp),%eax
cmp    $0x3,%eax
je     1669 <main+0x499>
mov    %r13,%rdi
call   1060 <puts@plt>
mov    %r14,%rdi
mov    %rbp,%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1090 <printf@plt>
mov    %r15,%rdi
call   1060 <puts@plt>
mov    %r12,%rdi
call   1060 <puts@plt>
mov    %r15,%rdi
call   1060 <puts@plt>
lea    0xc09(%rip),%rdi
mov    %rbp,%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1090 <printf@plt>
lea    0xc22(%rip),%rdi
mov    %rbp,%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1090 <printf@plt>
lea    0xc3b(%rip),%rdi
mov    %rbp,%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1090 <printf@plt>
mov    %r15,%rdi
call   1060 <puts@plt>
mov    $0xa,%edi
call   1040 <putchar@plt>
lea    0xc42(%rip),%rdi
lea    0x8(%rsp),%rsi
xor    %eax,%eax
call   10f0 <scanf@plt>
mov    0x8(%rsp),%eax
cmp    $0x3,%eax
je     1650 <main+0x480>
cmp    $0x2,%eax
je     1230 <main+0x60>
cmp    $0x1,%eax
jne    13f2 <main+0x222>
mov    $0x1e,%edi
mov    $0x1,%esi
call   10b0 <calloc@plt>
mov    %rax,%r12
mov    $0x1e,%edi
mov    $0x1,%esi
call   10b0 <calloc@plt>
mov    %rax,%rbp
mov    $0x1e,%edi
mov    $0x1,%esi
call   10b0 <calloc@plt>
mov    %rax,%r14
lea    0xc4b(%rip),%rdi
call   1060 <puts@plt>
lea    0xbd1(%rip),%rdi
lea    0x10(%rsp),%rsi
xor    %eax,%eax
call   10f0 <scanf@plt>
lea    0xc47(%rip),%rdi
call   1060 <puts@plt>
lea    0xbaf(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   10f0 <scanf@plt>
lea    0xc55(%rip),%rdi
call   1060 <puts@plt>
lea    0xb97(%rip),%rbx
mov    %rbx,%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   10f0 <scanf@plt>
lea    0xc64(%rip),%rdi
call   1060 <puts@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    %rbp,0x20(%rsp)
xor    %eax,%eax
call   10f0 <scanf@plt>
lea    0xc94(%rip),%rdi
call   1060 <puts@plt>
mov    %rbx,%rdi
mov    %r14,0x18(%rsp)
mov    %r14,%rsi
xor    %eax,%eax
call   10f0 <scanf@plt>
mov    $0xa,%edi
call   1040 <putchar@plt>
mov    %r12,%rdi
xor    %eax,%eax
call   10d0 <get_matrix_size@plt>
mov    %eax,%ebx
mov    %r12,%rdi
xor    %eax,%eax
call   10e0 <read_matrix@plt>
movslq %eax,%r13
mov    %rbp,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   10c0 <read_vector@plt>
movslq %eax,%r15
mov    %r14,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   10c0 <read_vector@plt>
movslq %eax,%r14
movsd  0x10(%rsp),%xmm0
mov    0xc(%rsp),%r8d
mov    %r13,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
lea    0xa54(%rip),%rbp
mov    %ebx,%ecx
mov    $0x1,%al
call   1050 <jacobi@plt>
movslq %eax,%r15
lea    0xc46(%rip),%rdi
call   1060 <puts@plt>
mov    %r15,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   10a0 <show_exponential_vector@plt>
mov    $0xa,%edi
call   1040 <putchar@plt>
mov    %r13,%rdi
mov    %ebx,%esi
lea    0xabb(%rip),%r13
xor    %eax,%eax
call   1070 <destroy_matrix@plt>
mov    %r15,%rdi
lea    0xaab(%rip),%r15
lea    0xa0d(%rip),%rbx
call   1030 <free@plt>
mov    %r14,%rdi
lea    0x9c8(%rip),%r14
call   1030 <free@plt>
mov    %r12,%rdi
lea    0xaae(%rip),%r12
jmp    13d5 <main+0x205>
nopl   0x0(%rax)
movl   $0x3,0x8(%rsp)
lea    0xabe(%rip),%rdi
call   1060 <puts@plt>
jmp    13ee <main+0x21e>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [42 x i8] c"\0A***************************************\0A\00"
@.str.1 = [43 x i8] c"* %sLinear system equation solver%s *\0A\00"
@.str.2 = [11 x i8] c"\1B[0;40;32m\00"
@.str.3 = [5 x i8] c"\1B[0m\00"
@.str.4 = [41 x i8] c"***************************************\0A\00"
@.str.5 = [41 x i8] c"* Choose the solver method: *\0A\00"
@.str.6 = [45 x i8] c"* %s1%s- Jacobi *\0A\00"
@.str.7 = [45 x i8] c"* %s2%s- Gauss-Seidel *\0A\00"
@.str.8 = [45 x i8] c"* %s3%s- Exit *\0A\00"
@.str.9 = [2 x i8] c"\0A\00"
@.str.10 = [3 x i8] c"%d\00"
@.str.11 = [28 x i8] c"Enter admitted tolerance: \0A\00"
@.str.12 = [4 x i8] c"%lf\00"
@.str.13 = [46 x i8] c"Enter maximum number of iterations allowed: \0A\00"
@.str.14 = [48 x i8] c"Enter the filename which contains the matrix: \0A\00"
@.str.15 = [3 x i8] c"%s\00"
@.str.16 = [79 x i8] c"Enter the filename which contains the initial approximation to the solution: \0A\00"
@.str.17 = [57 x i8] c"Enter the filename which contains the solution vector: \0A\00"
@.str.18 = [46 x i8] c"The final approximation to the solution is: \0A\00"
@.str.19 = [23 x i8] c"Successfully exited. \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double**
%3 = alloca double*
%4 = alloca double*
%5 = alloca double
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca double*
%13 = alloca i8*
%14 = alloca i8*
%15 = alloca i8*
%16 = alloca double*
store i32 0, i32* %1
store double 0.000000e+00, double* %5
store i32 0, i32* %6
store i32 0, i32* %7
store i32 0, i32* %8
br label %17
17: ; preds = %151, %0
%18 = load i32, i32* %7
%19 = icmp ne i32 %18, 3
br i1 %19, label %20, label %152
20: ; preds = %17
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.4, i64 0, i64 0))
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.5, i64 0, i64 0))
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.4, i64 0, i64 0))
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.4, i64 0, i64 0))
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0))
%31 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), i32* %7)
%32 = load i32, i32* %7
switch i32 %32, label %151 [
i32 1, label %33
i32 2, label %91
i32 3, label %149
]
33: ; preds = %20
%34 = call i8* @calloc(i64 30, i64 1)
store i8* %34, i8** %9
%35 = call i8* @calloc(i64 30, i64 1)
store i8* %35, i8** %10
%36 = call i8* @calloc(i64 30, i64 1)
store i8* %36, i8** %11
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.11, i64 0, i64 0))
%38 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0), double* %5)
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.13, i64 0, i64 0))
%40 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), i32* %6)
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.14, i64 0, i64 0))
%42 = load i8*, i8** %9
%43 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.15, i64 0, i64 0), i8* %42)
%44 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str.16, i64 0, i64 0))
%45 = load i8*, i8** %10
%46 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.15, i64 0, i64 0), i8* %45)
%47 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.17, i64 0, i64 0))
%48 = load i8*, i8** %11
%49 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.15, i64 0, i64 0), i8* %48)
%50 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0))
%51 = load i8*, i8** %9
%52 = call i32 (i8*, ...) bitcast (i32 (...)* @get_matrix_size to i32 (i8*, ...)*)(i8* %51)
store i32 %52, i32* %8
%53 = load i8*, i8** %9
%54 = call i32 (i8*, ...) bitcast (i32 (...)* @read_matrix to i32 (i8*, ...)*)(i8* %53)
%55 = sext i32 %54 to i64
%56 = inttoptr i64 %55 to double**
store double** %56, double*** %2
%57 = load i8*, i8** %10
%58 = load i32, i32* %8
%59 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @read_vector to i32 (i8*, i32, ...)*)(i8* %57, i32 %58)
%60 = sext i32 %59 to i64
%61 = inttoptr i64 %60 to double*
store double* %61, double** %3
%62 = load i8*, i8** %11
%63 = load i32, i32* %8
%64 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @read_vector to i32 (i8*, i32, ...)*)(i8* %62, i32 %63)
%65 = sext i32 %64 to i64
%66 = inttoptr i64 %65 to double*
store double* %66, double** %4
%67 = load double**, double*** %2
%68 = load double*, double** %4
%69 = load double*, double** %3
%70 = load double, double* %5
%71 = load i32, i32* %8
%72 = load i32, i32* %6
%73 = call i32 (double**, double*, double*, double, i32, i32, ...) bitcast (i32 (...)* @jacobi to i32 (double**, double*, double*, double, i32, i32, ...)*)(double** %67, double* %68, double* %69, double %70, i32 %71, i32 %72)
%74 = sext i32 %73 to i64
%75 = inttoptr i64 %74 to double*
store double* %75, double** %12
%76 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.18, i64 0, i64 0))
%77 = load double*, double** %12
%78 = load i32, i32* %8
%79 = call i32 (double*, i32, ...) bitcast (i32 (...)* @show_exponential_vector to i32 (double*, i32, ...)*)(double* %77, i32 %78)
%80 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0))
%81 = load double**, double*** %2
%82 = load i32, i32* %8
%83 = call i32 (double**, i32, ...) bitcast (i32 (...)* @destroy_matrix to i32 (double**, i32, ...)*)(double** %81, i32 %82)
%84 = load double*, double** %12
%85 = bitcast double* %84 to i8*
%86 = load double*, double** %4
%87 = bitcast double* %86 to i8*
%88 = load i8*, i8** %9
%89 = load i8*, i8** %10
%90 = load i8*, i8** %11
br label %151
91: ; preds = %20
%92 = call i8* @calloc(i64 30, i64 1)
store i8* %92, i8** %13
%93 = call i8* @calloc(i64 30, i64 1)
store i8* %93, i8** %14
%94 = call i8* @calloc(i64 30, i64 1)
store i8* %94, i8** %15
%95 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.11, i64 0, i64 0))
%96 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0), double* %5)
%97 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.13, i64 0, i64 0))
%98 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), i32* %6)
%99 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.14, i64 0, i64 0))
%100 = load i8*, i8** %13
%101 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.15, i64 0, i64 0), i8* %100)
%102 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str.16, i64 0, i64 0))
%103 = load i8*, i8** %14
%104 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.15, i64 0, i64 0), i8* %103)
%105 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.17, i64 0, i64 0))
%106 = load i8*, i8** %15
%107 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.15, i64 0, i64 0), i8* %106)
%108 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0))
%109 = load i8*, i8** %13
%110 = call i32 (i8*, ...) bitcast (i32 (...)* @get_matrix_size to i32 (i8*, ...)*)(i8* %109)
store i32 %110, i32* %8
%111 = load i8*, i8** %13
%112 = call i32 (i8*, ...) bitcast (i32 (...)* @read_matrix to i32 (i8*, ...)*)(i8* %111)
%113 = sext i32 %112 to i64
%114 = inttoptr i64 %113 to double**
store double** %114, double*** %2
%115 = load i8*, i8** %14
%116 = load i32, i32* %8
%117 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @read_vector to i32 (i8*, i32, ...)*)(i8* %115, i32 %116)
%118 = sext i32 %117 to i64
%119 = inttoptr i64 %118 to double*
store double* %119, double** %3
%120 = load i8*, i8** %15
%121 = load i32, i32* %8
%122 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @read_vector to i32 (i8*, i32, ...)*)(i8* %120, i32 %121)
%123 = sext i32 %122 to i64
%124 = inttoptr i64 %123 to double*
store double* %124, double** %4
%125 = load double**, double*** %2
%126 = load double*, double** %4
%127 = load double*, double** %3
%128 = load double, double* %5
%129 = load i32, i32* %8
%130 = load i32, i32* %6
%131 = call i32 (double**, double*, double*, double, i32, i32, ...) bitcast (i32 (...)* @gaussseidel to i32 (double**, double*, double*, double, i32, i32, ...)*)(double** %125, double* %126, double* %127, double %128, i32 %129, i32 %130)
%132 = sext i32 %131 to i64
%133 = inttoptr i64 %132 to double*
store double* %133, double** %16
%134 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.18, i64 0, i64 0))
%135 = load double*, double** %4
%136 = load i32, i32* %8
%137 = call i32 (double*, i32, ...) bitcast (i32 (...)* @show_exponential_vector to i32 (double*, i32, ...)*)(double* %135, i32 %136)
%138 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0))
%139 = load double**, double*** %2
%140 = load i32, i32* %8
%141 = call i32 (double**, i32, ...) bitcast (i32 (...)* @destroy_matrix to i32 (double**, i32, ...)*)(double** %139, i32 %140)
%142 = load double*, double** %4
%143 = bitcast double* %142 to i8*
%144 = load double*, double** %16
%145 = bitcast double* %144 to i8*
%146 = load i8*, i8** %13
%147 = load i8*, i8** %14
%148 = load i8*, i8** %15
br label %151
149: ; preds = %20
store i32 3, i32* %7
%150 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.19, i64 0, i64 0))
br label %151
151: ; preds = %149, %20, %91, %33
br label %17
152: ; preds = %17
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [43 x i8] c"* %sLinear system equation solver%s *\0A\00"
@.str.2 = [11 x i8] c"\1B[0;40;32m\00"
@.str.3 = [5 x i8] c"\1B[0m\00"
@.str.6 = [45 x i8] c"* %s1%s- Jacobi *\0A\00"
@.str.7 = [45 x i8] c"* %s2%s- Gauss-Seidel *\0A\00"
@.str.8 = [45 x i8] c"* %s3%s- Exit *\0A\00"
@.str.10 = [3 x i8] c"%d\00"
@.str.12 = [4 x i8] c"%lf\00"
@.str.15 = [3 x i8] c"%s\00"
@str = [41 x i8] c"\0A***************************************\00"
@str.21 = [40 x i8] c"* Choose the solver method: *\00"
@str.23 = [40 x i8] c"***************************************\00"
@str.24 = [22 x i8] c"Successfully exited. \00"
@str.31 = [27 x i8] c"Enter admitted tolerance: \00"
@str.32 = [45 x i8] c"Enter maximum number of iterations allowed: \00"
@str.33 = [47 x i8] c"Enter the filename which contains the matrix: \00"
@str.34 = [78 x i8] c"Enter the filename which contains the initial approximation to the solution: \00"
@str.35 = [56 x i8] c"Enter the filename which contains the solution vector: \00"
@str.36 = [45 x i8] c"The final approximation to the solution is: \00"
define i32 @main() {
%1 = alloca double
%2 = alloca i32
%3 = alloca i32
%4 = bitcast double* %1 to i8*
store double 0.000000e+00, double* %1
%5 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%6 = bitcast i32* %3 to i8*
store i32 0, i32* %3
br label %7
7: ; preds = %0, %95
%8 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str, i64 0, i64 0))
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%10 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.23, i64 0, i64 0))
%11 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.21, i64 0, i64 0))
%12 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.23, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%16 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.23, i64 0, i64 0))
%17 = call i32 @putchar(i32 10)
%18 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), i32* %3)
%19 = load i32, i32* %3
switch i32 %19, label %95 [
i32 1, label %20
i32 2, label %56
i32 3, label %91
]
20: ; preds = %7
%21 = call dereferenceable_or_null(30) i8* @calloc(i64 30, i64 1)
%22 = call dereferenceable_or_null(30) i8* @calloc(i64 30, i64 1)
%23 = call dereferenceable_or_null(30) i8* @calloc(i64 30, i64 1)
%24 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.31, i64 0, i64 0))
%25 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0), double* %1)
%26 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str.32, i64 0, i64 0))
%27 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), i32* %2)
%28 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str.33, i64 0, i64 0))
%29 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.15, i64 0, i64 0), i8* %21)
%30 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([78 x i8], [78 x i8]* @str.34, i64 0, i64 0))
%31 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.15, i64 0, i64 0), i8* %22)
%32 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @str.35, i64 0, i64 0))
%33 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.15, i64 0, i64 0), i8* %23)
%34 = call i32 @putchar(i32 10)
%35 = call i32 (i8*, ...) bitcast (i32 (...)* @get_matrix_size to i32 (i8*, ...)*)(i8* %21)
%36 = call i32 (i8*, ...) bitcast (i32 (...)* @read_matrix to i32 (i8*, ...)*)(i8* %21)
%37 = sext i32 %36 to i64
%38 = inttoptr i64 %37 to double**
%39 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @read_vector to i32 (i8*, i32, ...)*)(i8* %22, i32 %35)
%40 = sext i32 %39 to i64
%41 = inttoptr i64 %40 to double*
%42 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @read_vector to i32 (i8*, i32, ...)*)(i8* %23, i32 %35)
%43 = sext i32 %42 to i64
%44 = inttoptr i64 %43 to double*
%45 = load double, double* %1
%46 = load i32, i32* %2
%47 = call i32 (double**, double*, double*, double, i32, i32, ...) bitcast (i32 (...)* @jacobi to i32 (double**, double*, double*, double, i32, i32, ...)*)(double** %38, double* %44, double* %41, double %45, i32 %35, i32 %46)
%48 = sext i32 %47 to i64
%49 = inttoptr i64 %48 to double*
%50 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str.36, i64 0, i64 0))
%51 = call i32 (double*, i32, ...) bitcast (i32 (...)* @show_exponential_vector to i32 (double*, i32, ...)*)(double* %49, i32 %35)
%52 = call i32 @putchar(i32 10)
%53 = call i32 (double**, i32, ...) bitcast (i32 (...)* @destroy_matrix to i32 (double**, i32, ...)*)(double** %38, i32 %35)
%54 = inttoptr i64 %48 to i8*
%55 = inttoptr i64 %43 to i8*
br label %93
56: ; preds = %7
%57 = call dereferenceable_or_null(30) i8* @calloc(i64 30, i64 1)
%58 = call dereferenceable_or_null(30) i8* @calloc(i64 30, i64 1)
%59 = call dereferenceable_or_null(30) i8* @calloc(i64 30, i64 1)
%60 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.31, i64 0, i64 0))
%61 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0), double* %1)
%62 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str.32, i64 0, i64 0))
%63 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), i32* %2)
%64 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str.33, i64 0, i64 0))
%65 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.15, i64 0, i64 0), i8* %57)
%66 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([78 x i8], [78 x i8]* @str.34, i64 0, i64 0))
%67 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.15, i64 0, i64 0), i8* %58)
%68 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @str.35, i64 0, i64 0))
%69 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.15, i64 0, i64 0), i8* %59)
%70 = call i32 @putchar(i32 10)
%71 = call i32 (i8*, ...) bitcast (i32 (...)* @get_matrix_size to i32 (i8*, ...)*)(i8* %57)
%72 = call i32 (i8*, ...) bitcast (i32 (...)* @read_matrix to i32 (i8*, ...)*)(i8* %57)
%73 = sext i32 %72 to i64
%74 = inttoptr i64 %73 to double**
%75 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @read_vector to i32 (i8*, i32, ...)*)(i8* %58, i32 %71)
%76 = sext i32 %75 to i64
%77 = inttoptr i64 %76 to double*
%78 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @read_vector to i32 (i8*, i32, ...)*)(i8* %59, i32 %71)
%79 = sext i32 %78 to i64
%80 = inttoptr i64 %79 to double*
%81 = load double, double* %1
%82 = load i32, i32* %2
%83 = call i32 (double**, double*, double*, double, i32, i32, ...) bitcast (i32 (...)* @gaussseidel to i32 (double**, double*, double*, double, i32, i32, ...)*)(double** %74, double* %80, double* %77, double %81, i32 %71, i32 %82)
%84 = sext i32 %83 to i64
%85 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str.36, i64 0, i64 0))
%86 = call i32 (double*, i32, ...) bitcast (i32 (...)* @show_exponential_vector to i32 (double*, i32, ...)*)(double* %80, i32 %71)
%87 = call i32 @putchar(i32 10)
%88 = call i32 (double**, i32, ...) bitcast (i32 (...)* @destroy_matrix to i32 (double**, i32, ...)*)(double** %74, i32 %71)
%89 = inttoptr i64 %79 to i8*
%90 = inttoptr i64 %84 to i8*
br label %93
91: ; preds = %7
store i32 3, i32* %3
%92 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.24, i64 0, i64 0))
br label %93
93: ; preds = %20, %56, %91
%94 = load i32, i32* %3
br label %95
95: ; preds = %93, %7
%96 = phi i32 [ %94, %93 ], [ %19, %7 ]
%97 = icmp eq i32 %96, 3
br i1 %97, label %98, label %7
98: ; preds = %95
ret i32 0
}