#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 */
int EXIT_FAILURE;
int EXIT_SUCCESS;
scalar_t__ calloc(int, int);
int /*<<< orphan*/ free(double *);
int /*<<< orphan*/ my_matvec_mul(double *, double *, int, int, double *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int i, j, dim;
  double *mat_a, *vec_b, *vec_x;
  printf("Dim = ");
  scanf("%d", &dim);
  if (dim <= 0) {
    printf("Illegal dimension! (dim = %d)\n", dim);
    return EXIT_FAILURE;
  }
  mat_a = (double *)calloc(dim * dim, sizeof(double));
  vec_x = (double *)calloc(dim, sizeof(double));
  vec_b = (double *)calloc(dim, sizeof(double));
  for (i = 0; i < dim; i++) {
    for (j = 0; j < dim; j++) {
      mat_a[i * dim + j] = (double)(i + j + 1);
      if ((i + j + 1) % 2 != 0)
        mat_a[i * dim + j] *= -1.0;
    }
    vec_x[i] = 1.0 / (double)(i + 1);
  }
  my_matvec_mul(vec_b, mat_a, dim, dim, vec_x);
  for (i = 0; i < dim; i++) {
    printf("[");
    for (j = 0; j < dim; j++)
      printf("%10.3lf ", mat_a[i * dim + j]);
    printf("]  %10.3lf = %10.3lf\n", vec_x[i], vec_b[i]);
  }
  free(mat_a);
  free(vec_x);
  free(vec_b);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xea3(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1070 <scanf@plt>
cmpl   $0x0,-0x10(%rbp)
jg     11a9 <main+0x59>
mov    -0x10(%rbp),%esi
lea    0xe89(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    0x2e41(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1384 <main+0x234>
mov    -0x10(%rbp),%edi
imul   -0x10(%rbp),%edi
mov    $0x8,%esi
call   1050 <calloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%edi
mov    $0x8,%esi
call   1050 <calloc@plt>
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%edi
mov    $0x8,%esi
call   1050 <calloc@plt>
mov    %rax,-0x20(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    12aa <main+0x15a>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1279 <main+0x129>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
add    $0x1,%eax
cvtsi2sd %eax,%xmm0
mov    -0x18(%rbp),%rax
mov    -0x8(%rbp),%ecx
imul   -0x10(%rbp),%ecx
add    -0xc(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
add    $0x1,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     1266 <main+0x116>
mov    -0x18(%rbp),%rax
mov    -0x8(%rbp),%ecx
imul   -0x10(%rbp),%ecx
add    -0xc(%rbp),%ecx
movslq %ecx,%rcx
movsd  0xdac(%rip),%xmm0
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
jmp    126b <main+0x11b>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11fa <main+0xaa>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
cvtsi2sd %eax,%xmm1
movsd  0xd75(%rip),%xmm0
divsd  %xmm1,%xmm0
mov    -0x28(%rbp),%rax
movslq -0x8(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11e7 <main+0x97>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x10(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0x28(%rbp),%r8
call   1060 <my_matvec_mul@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    135d <main+0x20d>
lea    0xd5e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1327 <main+0x1d7>
mov    -0x18(%rbp),%rax
mov    -0x8(%rbp),%ecx
imul   -0x10(%rbp),%ecx
add    -0xc(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
lea    0xd29(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    12e9 <main+0x199>
mov    -0x28(%rbp),%rax
movslq -0x8(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x8(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
lea    0xcfc(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    12c8 <main+0x178>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
mov    -0x28(%rbp),%rdi
call   1030 <free@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
mov    0x2c59(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xed3(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xecc(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1080 <scanf@plt>
mov    0xc(%rsp),%esi
test   %esi,%esi
jle    143a <main+0x2da>
imul   %esi,%esi
mov    %esi,%edi
mov    $0x8,%esi
call   1060 <calloc@plt>
mov    %rax,%r12
mov    0xc(%rsp),%edi
mov    $0x8,%esi
call   1060 <calloc@plt>
mov    %rax,%r14
mov    0xc(%rsp),%edi
mov    $0x8,%esi
call   1060 <calloc@plt>
mov    %rax,0x10(%rsp)
mov    0xc(%rsp),%ecx
test   %ecx,%ecx
jle    1379 <main+0x219>
mov    %ecx,%r8d
and    $0xfffffffc,%r8d
mov    %r12,%rdx
add    $0x10,%rdx
lea    0x0(,%rcx,8),%r9
mov    %r9,%rdi
and    $0xffffffffffffffe0,%rdi
mov    $0x1,%ebx
xor    %r11d,%r11d
movdqa 0xe17(%rip),%xmm13
movsd  0xe2e(%rip),%xmm9
movdqa 0xde5(%rip),%xmm8
movdqa 0xdec(%rip),%xmm11
pxor   %xmm12,%xmm12
movdqa 0xdfe(%rip),%xmm10
mov    %r12,%rax
jmp    126d <main+0x10d>
nopw   0x0(%rax,%rax,1)
xorps  %xmm0,%xmm0
cvtsi2sd %r10d,%xmm0
movapd %xmm9,%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,(%r14,%r11,8)
add    %r9,%rdx
add    %r9,%rax
add    $0x1,%rbx
mov    %r10,%r11
cmp    %rcx,%r10
je     1379 <main+0x219>
lea    0x1(%r11),%r10
cmp    $0x4,%ecx
jae    1280 <main+0x120>
xor    %ebp,%ebp
jmp    1362 <main+0x202>
nopl   (%rax)
movq   %r10,%xmm1
pshufd $0x44,%xmm1,%xmm14
lea    0x3(%r11),%rbp
movq   %rbp,%xmm1
pshufd $0x44,%xmm1,%xmm7
xor    %ebp,%ebp
movdqa %xmm8,%xmm2
movdqa %xmm14,%xmm1
paddq  %xmm2,%xmm1
movdqa %xmm7,%xmm5
paddq  %xmm2,%xmm5
pshufd $0xe8,%xmm1,%xmm1
pshufd $0xe8,%xmm5,%xmm5
cvtdq2pd %xmm1,%xmm3
cvtdq2pd %xmm5,%xmm6
pand   %xmm11,%xmm1
pand   %xmm11,%xmm5
pcmpeqd %xmm12,%xmm1
pxor   %xmm0,%xmm0
pcmpgtd %xmm1,%xmm0
punpckldq %xmm0,%xmm1
pcmpeqd %xmm12,%xmm5
pxor   %xmm0,%xmm0
pcmpgtd %xmm5,%xmm0
punpckldq %xmm0,%xmm5
movdqa %xmm3,%xmm0
pxor   %xmm13,%xmm0
movdqa %xmm6,%xmm4
pxor   %xmm13,%xmm4
pand   %xmm1,%xmm3
pandn  %xmm0,%xmm1
por    %xmm3,%xmm1
pand   %xmm5,%xmm6
pandn  %xmm4,%xmm5
por    %xmm6,%xmm5
movdqu %xmm1,-0x10(%rdx,%rbp,1)
movdqu %xmm5,(%rdx,%rbp,1)
paddq  %xmm10,%xmm2
add    $0x20,%rbp
cmp    %rbp,%rdi
jne    12a0 <main+0x140>
mov    %r8,%rbp
cmp    %rcx,%r8
jne    1362 <main+0x202>
jmp    1240 <main+0xe0>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsd  %xmm1,(%rax,%rbp,8)
add    $0x1,%rbp
cmp    %rbp,%rcx
je     1240 <main+0xe0>
lea    (%rbx,%rbp,1),%esi
xorps  %xmm1,%xmm1
cvtsi2sd %esi,%xmm1
test   $0x1,%sil
je     1350 <main+0x1f0>
xorpd  %xmm13,%xmm1
jmp    1350 <main+0x1f0>
mov    0x10(%rsp),%rdi
mov    %r12,%rsi
mov    %ecx,%edx
mov    %r14,%r8
call   1070 <my_matvec_mul@plt>
cmpl   $0x0,0xc(%rsp)
jle    1417 <main+0x2b7>
xor    %ebp,%ebp
lea    0xcd2(%rip),%rbx
lea    0xcd4(%rip),%r13
jmp    13d8 <main+0x278>
nopl   0x0(%rax,%rax,1)
movsd  (%r14,%rbp,8),%xmm0
mov    0x10(%rsp),%rax
movsd  (%rax,%rbp,8),%xmm1
mov    %r13,%rdi
mov    $0x2,%al
call   1050 <printf@plt>
add    $0x1,%rbp
movslq 0xc(%rsp),%rax
cmp    %rax,%rbp
jge    1417 <main+0x2b7>
mov    $0x5b,%edi
call   1040 <putchar@plt>
mov    0xc(%rsp),%eax
test   %eax,%eax
jle    13b0 <main+0x250>
xor    %r15d,%r15d
nopl   (%rax)
imul   %ebp,%eax
cltq
add    %r15,%rax
movsd  (%r12,%rax,8),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
mov    0xc(%rsp),%eax
add    $0x1,%r15
cmp    %eax,%r15d
jl     13f0 <main+0x290>
jmp    13b0 <main+0x250>
mov    %r12,%rdi
call   1030 <free@plt>
mov    %r14,%rdi
call   1030 <free@plt>
mov    0x10(%rsp),%rdi
call   1030 <free@plt>
mov    0x2ba0(%rip),%rax
jmp    144f <main+0x2ef>
lea    0xc11(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x2b91(%rip),%rax
mov    (%rax),%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [7 x i8] c"Dim = \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [31 x i8] c"Illegal dimension! (dim = %d)\0A\00"
@EXIT_FAILURE = global i32 0
@.str.3 = [2 x i8] c"[\00"
@.str.4 = [9 x i8] c"%10.3lf \00"
@.str.5 = [22 x i8] c"] %10.3lf = %10.3lf\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca double*
%6 = alloca double*
%7 = alloca double*
store i32 0, i32* %1
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %4)
%10 = load i32, i32* %4
%11 = icmp sle i32 %10, 0
br i1 %11, label %12, label %16
12: ; preds = %0
%13 = load i32, i32* %4
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0), i32 %13)
%15 = load i32, i32* @EXIT_FAILURE
store i32 %15, i32* %1
br label %138
16: ; preds = %0
%17 = load i32, i32* %4
%18 = load i32, i32* %4
%19 = mul nsw i32 %17, %18
%20 = call i64 @calloc(i32 %19, i32 8)
%21 = inttoptr i64 %20 to double*
store double* %21, double** %5
%22 = load i32, i32* %4
%23 = call i64 @calloc(i32 %22, i32 8)
%24 = inttoptr i64 %23 to double*
store double* %24, double** %7
%25 = load i32, i32* %4
%26 = call i64 @calloc(i32 %25, i32 8)
%27 = inttoptr i64 %26 to double*
store double* %27, double** %6
store i32 0, i32* %2
br label %28
28: ; preds = %81, %16
%29 = load i32, i32* %2
%30 = load i32, i32* %4
%31 = icmp slt i32 %29, %30
br i1 %31, label %32, label %84
32: ; preds = %28
store i32 0, i32* %3
br label %33
33: ; preds = %69, %32
%34 = load i32, i32* %3
%35 = load i32, i32* %4
%36 = icmp slt i32 %34, %35
br i1 %36, label %37, label %72
37: ; preds = %33
%38 = load i32, i32* %2
%39 = load i32, i32* %3
%40 = add nsw i32 %38, %39
%41 = add nsw i32 %40, 1
%42 = sitofp i32 %41 to double
%43 = load double*, double** %5
%44 = load i32, i32* %2
%45 = load i32, i32* %4
%46 = mul nsw i32 %44, %45
%47 = load i32, i32* %3
%48 = add nsw i32 %46, %47
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds double, double* %43, i64 %49
store double %42, double* %50
%51 = load i32, i32* %2
%52 = load i32, i32* %3
%53 = add nsw i32 %51, %52
%54 = add nsw i32 %53, 1
%55 = srem i32 %54, 2
%56 = icmp ne i32 %55, 0
br i1 %56, label %57, label %68
57: ; preds = %37
%58 = load double*, double** %5
%59 = load i32, i32* %2
%60 = load i32, i32* %4
%61 = mul nsw i32 %59, %60
%62 = load i32, i32* %3
%63 = add nsw i32 %61, %62
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds double, double* %58, i64 %64
%66 = load double, double* %65
%67 = fmul double %66, -1.000000e+00
store double %67, double* %65
br label %68
68: ; preds = %57, %37
br label %69
69: ; preds = %68
%70 = load i32, i32* %3
%71 = add nsw i32 %70, 1
store i32 %71, i32* %3
br label %33
72: ; preds = %33
%73 = load i32, i32* %2
%74 = add nsw i32 %73, 1
%75 = sitofp i32 %74 to double
%76 = fdiv double 1.000000e+00, %75
%77 = load double*, double** %7
%78 = load i32, i32* %2
%79 = sext i32 %78 to i64
%80 = getelementptr inbounds double, double* %77, i64 %79
store double %76, double* %80
br label %81
81: ; preds = %72
%82 = load i32, i32* %2
%83 = add nsw i32 %82, 1
store i32 %83, i32* %2
br label %28
84: ; preds = %28
%85 = load double*, double** %6
%86 = load double*, double** %5
%87 = load i32, i32* %4
%88 = load i32, i32* %4
%89 = load double*, double** %7
%90 = call i32 @my_matvec_mul(double* %85, double* %86, i32 %87, i32 %88, double* %89)
store i32 0, i32* %2
br label %91
91: ; preds = %127, %84
%92 = load i32, i32* %2
%93 = load i32, i32* %4
%94 = icmp slt i32 %92, %93
br i1 %94, label %95, label %130
95: ; preds = %91
%96 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
store i32 0, i32* %3
br label %97
97: ; preds = %112, %95
%98 = load i32, i32* %3
%99 = load i32, i32* %4
%100 = icmp slt i32 %98, %99
br i1 %100, label %101, label %115
101: ; preds = %97
%102 = load double*, double** %5
%103 = load i32, i32* %2
%104 = load i32, i32* %4
%105 = mul nsw i32 %103, %104
%106 = load i32, i32* %3
%107 = add nsw i32 %105, %106
%108 = sext i32 %107 to i64
%109 = getelementptr inbounds double, double* %102, i64 %108
%110 = load double, double* %109
%111 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), double %110)
br label %112
112: ; preds = %101
%113 = load i32, i32* %3
%114 = add nsw i32 %113, 1
store i32 %114, i32* %3
br label %97
115: ; preds = %97
%116 = load double*, double** %7
%117 = load i32, i32* %2
%118 = sext i32 %117 to i64
%119 = getelementptr inbounds double, double* %116, i64 %118
%120 = load double, double* %119
%121 = load double*, double** %6
%122 = load i32, i32* %2
%123 = sext i32 %122 to i64
%124 = getelementptr inbounds double, double* %121, i64 %123
%125 = load double, double* %124
%126 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.5, i64 0, i64 0), double %120, double %125)
br label %127
127: ; preds = %115
%128 = load i32, i32* %2
%129 = add nsw i32 %128, 1
store i32 %129, i32* %2
br label %91
130: ; preds = %91
%131 = load double*, double** %5
%132 = call i32 @free(double* %131)
%133 = load double*, double** %7
%134 = call i32 @free(double* %133)
%135 = load double*, double** %6
%136 = call i32 @free(double* %135)
%137 = load i32, i32* @EXIT_SUCCESS
store i32 %137, i32* %1
br label %138
138: ; preds = %130, %12
%139 = load i32, i32* %1
ret i32 %139
}

LLVM IR (-O2):
@.str = [7 x i8] c"Dim = \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [31 x i8] c"Illegal dimension! (dim = %d)\0A\00"
@EXIT_FAILURE = global i32 0
@.str.4 = [9 x i8] c"%10.3lf \00"
@.str.5 = [22 x i8] c"] %10.3lf = %10.3lf\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = icmp slt i32 %5, 1
br i1 %6, label %7, label %9
7: ; preds = %0
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0), i32 %5)
br label %121
9: ; preds = %0
%10 = mul nsw i32 %5, %5
%11 = call i64 @calloc(i32 %10, i32 8)
%12 = inttoptr i64 %11 to double*
%13 = load i32, i32* %1
%14 = call i64 @calloc(i32 %13, i32 8)
%15 = inttoptr i64 %14 to double*
%16 = load i32, i32* %1
%17 = call i64 @calloc(i32 %16, i32 8)
%18 = inttoptr i64 %17 to double*
%19 = load i32, i32* %1
%20 = icmp sgt i32 %19, 0
br i1 %20, label %21, label %84
21: ; preds = %9
%22 = zext i32 %19 to i64
%23 = zext i32 %19 to i64
%24 = icmp ult i32 %19, 4
%25 = and i64 %23, 4294967292
%26 = icmp eq i64 %25, %23
br label %27
27: ; preds = %78, %21
%28 = phi i64 [ 0, %21 ], [ %29, %78 ]
%29 = add nuw nsw i64 %28, 1
%30 = mul nsw i64 %28, %22
br i1 %24, label %63, label %31
31: ; preds = %27
%32 = insertelement <2 x i64> poison, i64 %29, i64 0
%33 = shufflevector <2 x i64> %32, <2 x i64> poison, <2 x i32> zeroinitializer
%34 = add nuw i64 %28, 3
%35 = insertelement <2 x i64> poison, i64 %34, i64 0
%36 = shufflevector <2 x i64> %35, <2 x i64> poison, <2 x i32> zeroinitializer
br label %37
37: ; preds = %37, %31
%38 = phi i64 [ 0, %31 ], [ %59, %37 ]
%39 = phi <2 x i64> [ <i64 0, i64 1>, %31 ], [ %60, %37 ]
%40 = add nuw nsw <2 x i64> %33, %39
%41 = add <2 x i64> %36, %39
%42 = trunc <2 x i64> %40 to <2 x i32>
%43 = trunc <2 x i64> %41 to <2 x i32>
%44 = sitofp <2 x i32> %42 to <2 x double>
%45 = sitofp <2 x i32> %43 to <2 x double>
%46 = add nuw nsw i64 %38, %30
%47 = getelementptr inbounds double, double* %12, i64 %46
%48 = and <2 x i32> %42, <i32 1, i32 1>
%49 = and <2 x i32> %43, <i32 1, i32 1>
%50 = icmp eq <2 x i32> %48, zeroinitializer
%51 = icmp eq <2 x i32> %49, zeroinitializer
%52 = fneg <2 x double> %44
%53 = fneg <2 x double> %45
%54 = select <2 x i1> %50, <2 x double> %44, <2 x double> %52
%55 = select <2 x i1> %51, <2 x double> %45, <2 x double> %53
%56 = bitcast double* %47 to <2 x double>*
store <2 x double> %54, <2 x double>* %56
%57 = getelementptr inbounds double, double* %47, i64 2
%58 = bitcast double* %57 to <2 x double>*
store <2 x double> %55, <2 x double>* %58
%59 = add nuw i64 %38, 4
%60 = add <2 x i64> %39, <i64 4, i64 4>
%61 = icmp eq i64 %59, %25
br i1 %61, label %62, label %37
62: ; preds = %37
br i1 %26, label %78, label %63
63: ; preds = %27, %62
%64 = phi i64 [ 0, %27 ], [ %25, %62 ]
br label %65
65: ; preds = %63, %65
%66 = phi i64 [ %76, %65 ], [ %64, %63 ]
%67 = add nuw nsw i64 %29, %66
%68 = trunc i64 %67 to i32
%69 = sitofp i32 %68 to double
%70 = add nuw nsw i64 %66, %30
%71 = getelementptr inbounds double, double* %12, i64 %70
%72 = and i32 %68, 1
%73 = icmp eq i32 %72, 0
%74 = fneg double %69
%75 = select i1 %73, double %69, double %74
store double %75, double* %71
%76 = add nuw nsw i64 %66, 1
%77 = icmp eq i64 %76, %23
br i1 %77, label %78, label %65
78: ; preds = %65, %62
%79 = trunc i64 %29 to i32
%80 = sitofp i32 %79 to double
%81 = fdiv double 1.000000e+00, %80
%82 = getelementptr inbounds double, double* %15, i64 %28
store double %81, double* %82
%83 = icmp eq i64 %29, %23
br i1 %83, label %84, label %27
84: ; preds = %78, %9
%85 = call i32 @my_matvec_mul(double* %18, double* %12, i32 %19, i32 %19, double* %15)
%86 = load i32, i32* %1
%87 = icmp sgt i32 %86, 0
br i1 %87, label %88, label %117
88: ; preds = %84, %107
%89 = phi i64 [ %113, %107 ], [ 0, %84 ]
%90 = call i32 @putchar(i32 91)
%91 = load i32, i32* %1
%92 = icmp sgt i32 %91, 0
br i1 %92, label %93, label %107
93: ; preds = %88
%94 = trunc i64 %89 to i32
br label %95
95: ; preds = %93, %95
%96 = phi i32 [ %105, %95 ], [ %91, %93 ]
%97 = phi i32 [ %104, %95 ], [ 0, %93 ]
%98 = mul nsw i32 %96, %94
%99 = add nsw i32 %98, %97
%100 = sext i32 %99 to i64
%101 = getelementptr inbounds double, double* %12, i64 %100
%102 = load double, double* %101
%103 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), double %102)
%104 = add nuw nsw i32 %97, 1
%105 = load i32, i32* %1
%106 = icmp slt i32 %104, %105
br i1 %106, label %95, label %107
107: ; preds = %95, %88
%108 = getelementptr inbounds double, double* %15, i64 %89
%109 = load double, double* %108
%110 = getelementptr inbounds double, double* %18, i64 %89
%111 = load double, double* %110
%112 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.5, i64 0, i64 0), double %109, double %111)
%113 = add nuw nsw i64 %89, 1
%114 = load i32, i32* %1
%115 = sext i32 %114 to i64
%116 = icmp slt i64 %113, %115
br i1 %116, label %88, label %117
117: ; preds = %107, %84
%118 = call i32 @free(double* %12)
%119 = call i32 @free(double* %15)
%120 = call i32 @free(double* %18)
br label %121
121: ; preds = %117, %7
%122 = phi i32* [ @EXIT_FAILURE, %7 ], [ @EXIT_SUCCESS, %117 ]
%123 = load i32, i32* %122
ret i32 %123
}