#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 MaxAbsDiff(int, int, double *, int, double *, int);
int /*<<< orphan*/ MyGer(int, int, double *, int, double *, int, double *, int);
int /*<<< orphan*/ RandomMatrix(int, int, double *, int);
int /*<<< orphan*/ dger_(int *, int *, double *, double *, int *, double *,
                         int *, double *, int *);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ free(double *);
scalar_t__ malloc(int);
int /*<<< orphan*/ memcpy(double *, double *, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *, int *, int *);
int main(int argc, char *argv[]) {
  int m, n, ldA, size, first, last, inc, i_one = 1, AllCorrect;
  double d_one = 1.0, diff, maxdiff;
  double *A, *x, *y, *Aold, *Aref;
  printf("%% enter first, last, inc:");
  scanf("%d%d%d", &first, &last, &inc);
  last = (last / inc) * inc;
  first = (first / inc) * inc;
  first = (first == 0 ? inc : first);
  printf("%% %d %d %d \n", first, last, inc);
  AllCorrect = 1;
  for (size = last; size >= first; size -= inc) {
    m = n = size;
    ldA = size;
    A = (double *)malloc(ldA * n * sizeof(double));
    Aold = (double *)malloc(ldA * n * sizeof(double));
    Aref = (double *)malloc(ldA * n * sizeof(double));
    x = (double *)malloc(n * sizeof(double));
    y = (double *)malloc(m * sizeof(double));
    RandomMatrix(m, n, Aref, ldA);
    RandomMatrix(n, 1, x, n);
    RandomMatrix(m, 1, y, m);
    memcpy(Aref, Aold, ldA * n * sizeof(double));
    dger_(&m, &n, &d_one, x, &i_one, y, &i_one, Aref, &ldA);
    memcpy(A, Aold, ldA * n * sizeof(double));
    MyGer(m, n, x, 1, y, 1, A, ldA);
    diff = MaxAbsDiff(m, n, A, ldA, Aref, ldA);
    maxdiff = (diff > maxdiff ? diff : maxdiff);
    if (maxdiff > 1.0e-8)
      AllCorrect = 0;
    free(A);
    free(Aold);
    free(Aref);
    free(x);
    free(y);
  }
  if (AllCorrect)
    printf("It appears all is well\n");
  else
    printf("At least one test is suspicious\n");
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x30(%rbp)
movsd  0xe38(%rip),%xmm0
movsd  %xmm0,-0x40(%rbp)
lea    0xe3c(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe49(%rip),%rdi
lea    -0x24(%rbp),%rsi
lea    -0x28(%rbp),%rdx
lea    -0x2c(%rbp),%rcx
call   10a0 <scanf@plt>
mov    -0x28(%rbp),%eax
cltd
idivl  -0x2c(%rbp)
imul   -0x2c(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x24(%rbp),%eax
cltd
idivl  -0x2c(%rbp)
imul   -0x2c(%rbp),%eax
mov    %eax,-0x24(%rbp)
cmpl   $0x0,-0x24(%rbp)
jne    1224 <main+0x84>
mov    -0x2c(%rbp),%eax
mov    %eax,-0x7c(%rbp)
jmp    122a <main+0x8a>
mov    -0x24(%rbp),%eax
mov    %eax,-0x7c(%rbp)
mov    -0x7c(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%esi
mov    -0x28(%rbp),%edx
mov    -0x2c(%rbp),%ecx
lea    0xdf2(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x1,-0x34(%rbp)
mov    -0x28(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x24(%rbp),%eax
jl     1466 <main+0x2c6>
mov    -0x20(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    %eax,-0x14(%rbp)
mov    -0x20(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
imul   -0x18(%rbp),%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1090 <malloc@plt>
mov    %rax,-0x58(%rbp)
mov    -0x1c(%rbp),%eax
imul   -0x18(%rbp),%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1090 <malloc@plt>
mov    %rax,-0x70(%rbp)
mov    -0x1c(%rbp),%eax
imul   -0x18(%rbp),%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1090 <malloc@plt>
mov    %rax,-0x78(%rbp)
movslq -0x18(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1090 <malloc@plt>
mov    %rax,-0x60(%rbp)
movslq -0x14(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1090 <malloc@plt>
mov    %rax,-0x68(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
mov    -0x78(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
call   1070 <RandomMatrix@plt>
mov    -0x18(%rbp),%edi
mov    -0x60(%rbp),%rdx
mov    -0x18(%rbp),%ecx
mov    $0x1,%esi
call   1070 <RandomMatrix@plt>
mov    -0x14(%rbp),%edi
mov    -0x68(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    $0x1,%esi
call   1070 <RandomMatrix@plt>
mov    -0x78(%rbp),%rdi
mov    -0x70(%rbp),%rsi
mov    -0x1c(%rbp),%eax
imul   -0x18(%rbp),%eax
cltq
shl    $0x3,%rax
mov    %eax,%edx
call   1080 <memcpy@plt>
mov    -0x60(%rbp),%rcx
mov    -0x68(%rbp),%r9
mov    -0x78(%rbp),%r10
lea    -0x14(%rbp),%rdi
lea    -0x18(%rbp),%rsi
lea    -0x40(%rbp),%rdx
lea    -0x30(%rbp),%r11
lea    -0x1c(%rbp),%rax
mov    %r11,%r8
mov    %r11,(%rsp)
mov    %r10,0x8(%rsp)
mov    %rax,0x10(%rsp)
call   1040 <dger_@plt>
mov    -0x58(%rbp),%rdi
mov    -0x70(%rbp),%rsi
mov    -0x1c(%rbp),%eax
imul   -0x18(%rbp),%eax
cltq
shl    $0x3,%rax
mov    %eax,%edx
call   1080 <memcpy@plt>
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
mov    -0x60(%rbp),%rdx
mov    -0x68(%rbp),%r8
mov    -0x58(%rbp),%r10
mov    -0x1c(%rbp),%eax
mov    $0x1,%r9d
mov    %r9d,%ecx
mov    %r10,(%rsp)
mov    %eax,0x8(%rsp)
call   10c0 <MyGer@plt>
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
mov    -0x58(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x78(%rbp),%r8
mov    -0x1c(%rbp),%r9d
call   1060 <MaxAbsDiff@plt>
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm0
ucomisd -0x50(%rbp),%xmm0
jbe    13f1 <main+0x251>
movsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
jmp    13fe <main+0x25e>
movsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  0xbf0(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1429 <main+0x289>
movl   $0x0,-0x34(%rbp)
mov    -0x58(%rbp),%rdi
call   1030 <free@plt>
mov    -0x70(%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    -0x2c(%rbp),%ecx
mov    -0x20(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x20(%rbp)
jmp    1254 <main+0xb4>
cmpl   $0x0,-0x34(%rbp)
je     1483 <main+0x2e3>
lea    0xbc9(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    1491 <main+0x2f1>
lea    0xbce(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
xor    %edi,%edi
call   10b0 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
movl   $0x1,0x24(%rsp)
movabs $0x3ff0000000000000,%rax
mov    %rax,0x30(%rsp)
lea    0xe2c(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xe39(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x1c(%rsp),%rdx
lea    0x20(%rsp),%rcx
call   10b0 <scanf@plt>
mov    0x1c(%rsp),%ebp
mov    0x20(%rsp),%ecx
mov    %ebp,%eax
cltd
idiv   %ecx
sub    %edx,%ebp
mov    %ebp,0x1c(%rsp)
mov    0x14(%rsp),%esi
mov    %esi,%eax
cltd
idiv   %ecx
sub    %edx,%esi
cmove  %ecx,%esi
mov    %esi,0x14(%rsp)
lea    0xe00(%rip),%rdi
mov    %ebp,%edx
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x1c(%rsp),%r13d
cmp    0x14(%rsp),%r13d
jge    124b <main+0x9b>
lea    0xe12(%rip),%rdi
jmp    1415 <main+0x265>
movl   $0x1,0x18(%rsp)
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r13d,0x8(%rsp)
mov    %r13d,0x10(%rsp)
mov    %r13d,0xc(%rsp)
mov    %r13d,%edi
imul   %r13d,%edi
shl    $0x3,%edi
call   10a0 <malloc@plt>
mov    %rax,%rbx
mov    0xc(%rsp),%edi
imul   0x8(%rsp),%edi
shl    $0x3,%edi
call   10a0 <malloc@plt>
mov    %rax,%rbp
mov    0xc(%rsp),%edi
imul   0x8(%rsp),%edi
shl    $0x3,%edi
call   10a0 <malloc@plt>
mov    %rax,%r14
mov    0x8(%rsp),%edi
shl    $0x3,%edi
call   10a0 <malloc@plt>
mov    %rax,%r15
mov    0x10(%rsp),%edi
shl    $0x3,%edi
call   10a0 <malloc@plt>
mov    %rax,%r12
mov    0x10(%rsp),%edi
mov    0x8(%rsp),%esi
mov    0xc(%rsp),%ecx
mov    %r14,%rdx
call   1080 <RandomMatrix@plt>
mov    0x8(%rsp),%ecx
mov    %ecx,%edi
mov    $0x1,%esi
mov    %r15,%rdx
call   1080 <RandomMatrix@plt>
mov    0x10(%rsp),%ecx
mov    %ecx,%edi
mov    $0x1,%esi
mov    %r12,%rdx
call   1080 <RandomMatrix@plt>
mov    0xc(%rsp),%edx
imul   0x8(%rsp),%edx
shl    $0x3,%edx
mov    %r14,%rdi
mov    %rbp,%rsi
call   1090 <memcpy@plt>
sub    $0x8,%rsp
lea    0x18(%rsp),%rdi
lea    0x10(%rsp),%rsi
lea    0x38(%rsp),%rdx
mov    %r15,%rcx
lea    0x2c(%rsp),%r8
mov    %r12,%r9
lea    0x14(%rsp),%rax
push   %rax
push   %r14
push   %r8
call   1050 <dger_@plt>
add    $0x20,%rsp
mov    0xc(%rsp),%edx
imul   0x8(%rsp),%edx
shl    $0x3,%edx
mov    %rbx,%rdi
mov    %rbp,%rsi
call   1090 <memcpy@plt>
mov    0x10(%rsp),%edi
mov    0x8(%rsp),%esi
mov    0xc(%rsp),%eax
mov    %r15,%rdx
mov    $0x1,%ecx
mov    %r12,%r8
mov    $0x1,%r9d
push   %rax
push   %rbx
call   10d0 <MyGer@plt>
add    $0x10,%rsp
mov    0x10(%rsp),%edi
mov    0x8(%rsp),%esi
mov    0xc(%rsp),%ecx
mov    %rbx,%rdx
mov    %r14,%r8
mov    %ecx,%r9d
call   1070 <MaxAbsDiff@plt>
maxsd  0x28(%rsp),%xmm0
movsd  %xmm0,0x28(%rsp)
ucomisd 0xc4a(%rip),%xmm0
mov    $0x0,%eax
mov    0x18(%rsp),%ecx
cmova  %eax,%ecx
mov    %ecx,0x18(%rsp)
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %rbp,%rdi
call   1030 <free@plt>
mov    %r14,%rdi
call   1030 <free@plt>
mov    %r15,%rdi
call   1030 <free@plt>
mov    %r12,%rdi
call   1030 <free@plt>
sub    0x20(%rsp),%r13d
cmp    0x14(%rsp),%r13d
jge    1260 <main+0xb0>
cmpl   $0x0,0x18(%rsp)
lea    0xc2e(%rip),%rax
lea    0xc47(%rip),%rdi
cmove  %rax,%rdi
call   1040 <puts@plt>
xor    %edi,%edi
call   10c0 <exit@plt>

LLVM IR (-O0):
@.str = [27 x i8] c"%% enter first, last, inc:\00"
@.str.1 = [7 x i8] c"%d%d%d\00"
@.str.2 = [14 x i8] c"%% %d %d %d \0A\00"
@.str.3 = [24 x i8] c"It appears all is well\0A\00"
@.str.4 = [33 x i8] c"At least one test is suspicious\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca double*
%19 = alloca double*
%20 = alloca double*
%21 = alloca double*
%22 = alloca double*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 1, i32* %13
store double 1.000000e+00, double* %15
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%24 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32* %10, i32* %11, i32* %12)
%25 = load i32, i32* %11
%26 = load i32, i32* %12
%27 = sdiv i32 %25, %26
%28 = load i32, i32* %12
%29 = mul nsw i32 %27, %28
store i32 %29, i32* %11
%30 = load i32, i32* %10
%31 = load i32, i32* %12
%32 = sdiv i32 %30, %31
%33 = load i32, i32* %12
%34 = mul nsw i32 %32, %33
store i32 %34, i32* %10
%35 = load i32, i32* %10
%36 = icmp eq i32 %35, 0
br i1 %36, label %37, label %39
37: ; preds = %2
%38 = load i32, i32* %12
br label %41
39: ; preds = %2
%40 = load i32, i32* %10
br label %41
41: ; preds = %39, %37
%42 = phi i32 [ %38, %37 ], [ %40, %39 ]
store i32 %42, i32* %10
%43 = load i32, i32* %10
%44 = load i32, i32* %11
%45 = load i32, i32* %12
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32 %43, i32 %44, i32 %45)
store i32 1, i32* %14
%47 = load i32, i32* %11
store i32 %47, i32* %9
br label %48
48: ; preds = %163, %41
%49 = load i32, i32* %9
%50 = load i32, i32* %10
%51 = icmp sge i32 %49, %50
br i1 %51, label %52, label %167
52: ; preds = %48
%53 = load i32, i32* %9
store i32 %53, i32* %7
store i32 %53, i32* %6
%54 = load i32, i32* %9
store i32 %54, i32* %8
%55 = load i32, i32* %8
%56 = load i32, i32* %7
%57 = mul nsw i32 %55, %56
%58 = sext i32 %57 to i64
%59 = mul i64 %58, 8
%60 = trunc i64 %59 to i32
%61 = call i64 @malloc(i32 %60)
%62 = inttoptr i64 %61 to double*
store double* %62, double** %18
%63 = load i32, i32* %8
%64 = load i32, i32* %7
%65 = mul nsw i32 %63, %64
%66 = sext i32 %65 to i64
%67 = mul i64 %66, 8
%68 = trunc i64 %67 to i32
%69 = call i64 @malloc(i32 %68)
%70 = inttoptr i64 %69 to double*
store double* %70, double** %21
%71 = load i32, i32* %8
%72 = load i32, i32* %7
%73 = mul nsw i32 %71, %72
%74 = sext i32 %73 to i64
%75 = mul i64 %74, 8
%76 = trunc i64 %75 to i32
%77 = call i64 @malloc(i32 %76)
%78 = inttoptr i64 %77 to double*
store double* %78, double** %22
%79 = load i32, i32* %7
%80 = sext i32 %79 to i64
%81 = mul i64 %80, 8
%82 = trunc i64 %81 to i32
%83 = call i64 @malloc(i32 %82)
%84 = inttoptr i64 %83 to double*
store double* %84, double** %19
%85 = load i32, i32* %6
%86 = sext i32 %85 to i64
%87 = mul i64 %86, 8
%88 = trunc i64 %87 to i32
%89 = call i64 @malloc(i32 %88)
%90 = inttoptr i64 %89 to double*
store double* %90, double** %20
%91 = load i32, i32* %6
%92 = load i32, i32* %7
%93 = load double*, double** %22
%94 = load i32, i32* %8
%95 = call i32 @RandomMatrix(i32 %91, i32 %92, double* %93, i32 %94)
%96 = load i32, i32* %7
%97 = load double*, double** %19
%98 = load i32, i32* %7
%99 = call i32 @RandomMatrix(i32 %96, i32 1, double* %97, i32 %98)
%100 = load i32, i32* %6
%101 = load double*, double** %20
%102 = load i32, i32* %6
%103 = call i32 @RandomMatrix(i32 %100, i32 1, double* %101, i32 %102)
%104 = load double*, double** %22
%105 = load double*, double** %21
%106 = load i32, i32* %8
%107 = load i32, i32* %7
%108 = mul nsw i32 %106, %107
%109 = sext i32 %108 to i64
%110 = mul i64 %109, 8
%111 = trunc i64 %110 to i32
%112 = call i32 @memcpy(double* %104, double* %105, i32 %111)
%113 = load double*, double** %19
%114 = load double*, double** %20
%115 = load double*, double** %22
%116 = call i32 @dger_(i32* %6, i32* %7, double* %15, double* %113, i32* %13, double* %114, i32* %13, double* %115, i32* %8)
%117 = load double*, double** %18
%118 = load double*, double** %21
%119 = load i32, i32* %8
%120 = load i32, i32* %7
%121 = mul nsw i32 %119, %120
%122 = sext i32 %121 to i64
%123 = mul i64 %122, 8
%124 = trunc i64 %123 to i32
%125 = call i32 @memcpy(double* %117, double* %118, i32 %124)
%126 = load i32, i32* %6
%127 = load i32, i32* %7
%128 = load double*, double** %19
%129 = load double*, double** %20
%130 = load double*, double** %18
%131 = load i32, i32* %8
%132 = call i32 @MyGer(i32 %126, i32 %127, double* %128, i32 1, double* %129, i32 1, double* %130, i32 %131)
%133 = load i32, i32* %6
%134 = load i32, i32* %7
%135 = load double*, double** %18
%136 = load i32, i32* %8
%137 = load double*, double** %22
%138 = load i32, i32* %8
%139 = call double @MaxAbsDiff(i32 %133, i32 %134, double* %135, i32 %136, double* %137, i32 %138)
store double %139, double* %16
%140 = load double, double* %16
%141 = load double, double* %17
%142 = fcmp ogt double %140, %141
br i1 %142, label %143, label %145
143: ; preds = %52
%144 = load double, double* %16
br label %147
145: ; preds = %52
%146 = load double, double* %17
br label %147
147: ; preds = %145, %143
%148 = phi double [ %144, %143 ], [ %146, %145 ]
store double %148, double* %17
%149 = load double, double* %17
%150 = fcmp ogt double %149, 1.000000e-08
br i1 %150, label %151, label %152
151: ; preds = %147
store i32 0, i32* %14
br label %152
152: ; preds = %151, %147
%153 = load double*, double** %18
%154 = call i32 @free(double* %153)
%155 = load double*, double** %21
%156 = call i32 @free(double* %155)
%157 = load double*, double** %22
%158 = call i32 @free(double* %157)
%159 = load double*, double** %19
%160 = call i32 @free(double* %159)
%161 = load double*, double** %20
%162 = call i32 @free(double* %161)
br label %163
163: ; preds = %152
%164 = load i32, i32* %12
%165 = load i32, i32* %9
%166 = sub nsw i32 %165, %164
store i32 %166, i32* %9
br label %48
167: ; preds = %48
%168 = load i32, i32* %14
%169 = icmp ne i32 %168, 0
br i1 %169, label %170, label %172
170: ; preds = %167
%171 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0))
br label %174
172: ; preds = %167
%173 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.4, i64 0, i64 0))
br label %174
174: ; preds = %172, %170
%175 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [27 x i8] c"%% enter first, last, inc:\00"
@.str.1 = [7 x i8] c"%d%d%d\00"
@.str.2 = [14 x i8] c"%% %d %d %d \0A\00"
@str = [32 x i8] c"At least one test is suspicious\00"
@str.5 = [23 x i8] c"It appears all is well\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca double
%11 = bitcast i32* %3 to i8*
%12 = bitcast i32* %4 to i8*
%13 = bitcast i32* %5 to i8*
%14 = bitcast i32* %6 to i8*
%15 = bitcast i32* %7 to i8*
%16 = bitcast i32* %8 to i8*
%17 = bitcast i32* %9 to i8*
store i32 1, i32* %9
%18 = bitcast double* %10 to i8*
store double 1.000000e+00, double* %10
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%20 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32* %6, i32* %7, i32* %8)
%21 = load i32, i32* %7
%22 = load i32, i32* %8
%23 = srem i32 %21, %22
%24 = sub i32 %21, %23
store i32 %24, i32* %7
%25 = load i32, i32* %6
%26 = srem i32 %25, %22
%27 = sub i32 %25, %26
%28 = icmp eq i32 %27, 0
%29 = select i1 %28, i32 %22, i32 %27
store i32 %29, i32* %6
%30 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32 %29, i32 %24, i32 %22)
%31 = load i32, i32* %7
%32 = load i32, i32* %6
%33 = icmp slt i32 %31, %32
br i1 %33, label %105, label %34
34: ; preds = %2, %34
%35 = phi i32 [ %99, %34 ], [ %31, %2 ]
%36 = phi i32 [ %92, %34 ], [ 1, %2 ]
%37 = phi double [ %90, %34 ], [ undef, %2 ]
store i32 %35, i32* %4
store i32 %35, i32* %3
store i32 %35, i32* %5
%38 = shl i32 %35, 3
%39 = mul i32 %38, %35
%40 = call i64 @malloc(i32 %39)
%41 = inttoptr i64 %40 to double*
%42 = load i32, i32* %5
%43 = load i32, i32* %4
%44 = shl i32 %42, 3
%45 = mul i32 %44, %43
%46 = call i64 @malloc(i32 %45)
%47 = inttoptr i64 %46 to double*
%48 = load i32, i32* %5
%49 = load i32, i32* %4
%50 = shl i32 %48, 3
%51 = mul i32 %50, %49
%52 = call i64 @malloc(i32 %51)
%53 = inttoptr i64 %52 to double*
%54 = load i32, i32* %4
%55 = shl i32 %54, 3
%56 = call i64 @malloc(i32 %55)
%57 = inttoptr i64 %56 to double*
%58 = load i32, i32* %3
%59 = shl i32 %58, 3
%60 = call i64 @malloc(i32 %59)
%61 = inttoptr i64 %60 to double*
%62 = load i32, i32* %3
%63 = load i32, i32* %4
%64 = load i32, i32* %5
%65 = call i32 @RandomMatrix(i32 %62, i32 %63, double* %53, i32 %64)
%66 = load i32, i32* %4
%67 = call i32 @RandomMatrix(i32 %66, i32 1, double* %57, i32 %66)
%68 = load i32, i32* %3
%69 = call i32 @RandomMatrix(i32 %68, i32 1, double* %61, i32 %68)
%70 = load i32, i32* %5
%71 = load i32, i32* %4
%72 = shl i32 %70, 3
%73 = mul i32 %72, %71
%74 = call i32 @memcpy(double* %53, double* %47, i32 %73)
%75 = call i32 @dger_(i32* %3, i32* %4, double* %10, double* %57, i32* %9, double* %61, i32* %9, double* %53, i32* %5)
%76 = load i32, i32* %5
%77 = load i32, i32* %4
%78 = shl i32 %76, 3
%79 = mul i32 %78, %77
%80 = call i32 @memcpy(double* %41, double* %47, i32 %79)
%81 = load i32, i32* %3
%82 = load i32, i32* %4
%83 = load i32, i32* %5
%84 = call i32 @MyGer(i32 %81, i32 %82, double* %57, i32 1, double* %61, i32 1, double* %41, i32 %83)
%85 = load i32, i32* %3
%86 = load i32, i32* %4
%87 = load i32, i32* %5
%88 = call double @MaxAbsDiff(i32 %85, i32 %86, double* %41, i32 %87, double* %53, i32 %87)
%89 = fcmp ogt double %88, %37
%90 = select i1 %89, double %88, double %37
%91 = fcmp ogt double %90, 1.000000e-08
%92 = select i1 %91, i32 0, i32 %36
%93 = call i32 @free(double* %41)
%94 = call i32 @free(double* %47)
%95 = call i32 @free(double* %53)
%96 = call i32 @free(double* %57)
%97 = call i32 @free(double* %61)
%98 = load i32, i32* %8
%99 = sub nsw i32 %35, %98
%100 = load i32, i32* %6
%101 = icmp slt i32 %99, %100
br i1 %101, label %102, label %34
102: ; preds = %34
%103 = icmp eq i32 %92, 0
%104 = select i1 %103, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @str, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @str.5, i64 0, i64 0)
br label %105
105: ; preds = %102, %2
%106 = phi i8* [ getelementptr inbounds ([23 x i8], [23 x i8]* @str.5, i64 0, i64 0), %2 ], [ %104, %102 ]
%107 = call i32 @puts(i8* dereferenceable(1) %106)
%108 = call i32 @exit(i32 0)
unreachable
}