#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 /*<<< orphan*/ Znd(double *, double *, double *, int);
int /*<<< orphan*/ Zu(double *, double *, int);
int /*<<< orphan*/ ZuN(double *, double *, double *, double *, int);
int /*<<< orphan*/ mattr(double *, double *, int, int);
int /*<<< orphan*/ memcpy(double *, double *, int);
int /*<<< orphan*/ mmul(double *, double *, double *, int);
int /*<<< orphan*/ norm2pt(double, double, double, double, double *, double *);
int nullspace(double *, double *, int, int *);
int /*<<< orphan*/ trnm(double *, int);
int A2toRH(double *N1, double *D1, double *N2, double *D2, double *u,
           int *samidx, double *h) {
  int do_norm = 0, i;
  double Z[15 * 15], ZT[15 * 15];
  double U[15 * 15];
  double T1[3 * 3], iT1[3 * 3], T2[3 * 3], iT2[3 * 3];
  double N1N[3 * 3], N2N[3 * 3], D1N[3 * 3], D2N[3 * 3], temp[3 * 3];
  int nullsize, nullspace_buff[2 * 15];
  for (i = 0; i < 2 * 7 * 15; ++i) {
    Z[i] = 0.0;
  }
  if (do_norm) {
    norm2pt(u[10 * samidx[0] + 0], u[10 * samidx[0] + 1], u[10 * samidx[1] + 0],
            u[10 * samidx[1] + 1], T1, iT1);
    norm2pt(u[10 * samidx[0] + 5], u[10 * samidx[0] + 6], u[10 * samidx[1] + 5],
            u[10 * samidx[1] + 6], T2, iT2);
    ZuN(Z, u + 10 * samidx[0], T1, T2, 2);
    ZuN(Z + 7, u + 10 * samidx[1], T1, T2, 2);
    mmul(N1N, iT2, N1, 3);
    mmul(N2N, iT2, N2, 3);
    mmul(D1N, D1, T1, 3);
    mmul(D2N, D2, T1, 3);
    Znd(Z + 2 * 7 * 9, D1N, N1N, 2);
    Znd(Z + 2 * 7 * 9 + 2 * 7 * 3 + 7, D2N, N2N, 2);
  } else {
    Zu(Z, u + 10 * samidx[0], 2);
    Zu(Z + 7, u + 10 * samidx[1], 2);
    Znd(Z + 2 * 7 * 9, D1, N1, 2);
    Znd(Z + 2 * 7 * 9 + 2 * 7 * 3 + 7, D2, N2, 2);
  }
  mattr(ZT, Z, 15, 2 * 7);
  for (i = 14 * 15; i < 15 * 15; ++i) {
    ZT[i] = 0;
  }
  nullsize = nullspace(ZT, U, 15, nullspace_buff);
  memcpy(h, U, 3 * 3 * sizeof(double));
  trnm(h, 3);
  if (do_norm) {
    mmul(temp, T2, h, 3);
    mmul(h, temp, iT1, 3);
  }
  return nullsize != 1;
}


x86 assembly (clang, -O0):
<A2toRH>:
push   %rbp
mov    %rsp,%rbp
sub    $0x18b0,%rsp
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
movl   $0x0,-0x34(%rbp)
movl   $0x0,-0x38(%rbp)
cmpl   $0xd2,-0x38(%rbp)
jge    11f0 <A2toRH+0x60>
movslq -0x38(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x740(%rbp,%rax,8)
ff ff
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    11c5 <A2toRH+0x35>
cmpl   $0x0,-0x34(%rbp)
je     140d <A2toRH+0x27d>
mov    -0x28(%rbp),%rax
mov    -0x30(%rbp),%rcx
imul   $0xa,(%rcx),%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x28(%rbp),%rax
mov    -0x30(%rbp),%rcx
imul   $0xa,(%rcx),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x28(%rbp),%rax
mov    -0x30(%rbp),%rcx
imul   $0xa,0x4(%rcx),%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x28(%rbp),%rax
mov    -0x30(%rbp),%rcx
imul   $0xa,0x4(%rcx),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm3
lea    -0x15b0(%rbp),%rdi
lea    -0x1600(%rbp),%rsi
call   10b0 <norm2pt@plt>
mov    -0x28(%rbp),%rax
mov    -0x30(%rbp),%rcx
imul   $0xa,(%rcx),%ecx
add    $0x5,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x28(%rbp),%rax
mov    -0x30(%rbp),%rcx
imul   $0xa,(%rcx),%ecx
add    $0x6,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x28(%rbp),%rax
mov    -0x30(%rbp),%rcx
imul   $0xa,0x4(%rcx),%ecx
add    $0x5,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x28(%rbp),%rax
mov    -0x30(%rbp),%rcx
imul   $0xa,0x4(%rcx),%ecx
add    $0x6,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm3
lea    -0x1650(%rbp),%rdi
lea    -0x16a0(%rbp),%rsi
call   10b0 <norm2pt@plt>
lea    -0x740(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x30(%rbp),%rax
imul   $0xa,(%rax),%eax
cltq
shl    $0x3,%rax
add    %rax,%rsi
lea    -0x15b0(%rbp),%rdx
lea    -0x1650(%rbp),%rcx
mov    $0x2,%r8d
call   1050 <ZuN@plt>
lea    -0x740(%rbp),%rdi
add    $0x38,%rdi
mov    -0x28(%rbp),%rsi
mov    -0x30(%rbp),%rax
imul   $0xa,0x4(%rax),%eax
cltq
shl    $0x3,%rax
add    %rax,%rsi
lea    -0x15b0(%rbp),%rdx
lea    -0x1650(%rbp),%rcx
mov    $0x2,%r8d
call   1050 <ZuN@plt>
lea    -0x16f0(%rbp),%rdi
lea    -0x16a0(%rbp),%rsi
mov    -0x8(%rbp),%rdx
mov    $0x3,%ecx
call   1080 <mmul@plt>
lea    -0x1740(%rbp),%rdi
lea    -0x16a0(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    $0x3,%ecx
call   1080 <mmul@plt>
lea    -0x1790(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x15b0(%rbp),%rdx
mov    $0x3,%ecx
call   1080 <mmul@plt>
lea    -0x17e0(%rbp),%rdi
mov    -0x20(%rbp),%rsi
lea    -0x15b0(%rbp),%rdx
mov    $0x3,%ecx
call   1080 <mmul@plt>
lea    -0x740(%rbp),%rdi
add    $0x3f0,%rdi
lea    -0x1790(%rbp),%rsi
lea    -0x16f0(%rbp),%rdx
mov    $0x2,%ecx
call   1060 <Znd@plt>
lea    -0x740(%rbp),%rdi
add    $0x3f0,%rdi
add    $0x150,%rdi
add    $0x38,%rdi
lea    -0x17e0(%rbp),%rsi
lea    -0x1740(%rbp),%rdx
mov    $0x2,%ecx
call   1060 <Znd@plt>
jmp    14a7 <A2toRH+0x317>
lea    -0x740(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x30(%rbp),%rax
imul   $0xa,(%rax),%eax
cltq
shl    $0x3,%rax
add    %rax,%rsi
mov    $0x2,%edx
call   1030 <Zu@plt>
lea    -0x740(%rbp),%rdi
add    $0x38,%rdi
mov    -0x28(%rbp),%rsi
mov    -0x30(%rbp),%rax
imul   $0xa,0x4(%rax),%eax
cltq
shl    $0x3,%rax
add    %rax,%rsi
mov    $0x2,%edx
call   1030 <Zu@plt>
lea    -0x740(%rbp),%rdi
add    $0x3f0,%rdi
mov    -0x10(%rbp),%rsi
mov    -0x8(%rbp),%rdx
mov    $0x2,%ecx
call   1060 <Znd@plt>
lea    -0x740(%rbp),%rdi
add    $0x3f0,%rdi
add    $0x150,%rdi
add    $0x38,%rdi
mov    -0x20(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    $0x2,%ecx
call   1060 <Znd@plt>
lea    -0xe50(%rbp),%rdi
lea    -0x740(%rbp),%rsi
mov    $0xf,%edx
mov    $0xe,%ecx
call   1090 <mattr@plt>
movl   $0xd2,-0x38(%rbp)
cmpl   $0xe1,-0x38(%rbp)
jge    14f6 <A2toRH+0x366>
movslq -0x38(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xe50(%rbp,%rax,8)
ff ff
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    14cb <A2toRH+0x33b>
lea    -0xe50(%rbp),%rdi
lea    -0x1560(%rbp),%rsi
lea    -0x18b0(%rbp),%rcx
mov    $0xf,%edx
call   10a0 <nullspace@plt>
mov    %eax,-0x1834(%rbp)
mov    0x10(%rbp),%rdi
lea    -0x1560(%rbp),%rsi
mov    $0x48,%edx
call   1070 <memcpy@plt>
mov    0x10(%rbp),%rdi
mov    $0x3,%esi
call   1040 <trnm@plt>
cmpl   $0x0,-0x34(%rbp)
je     1580 <A2toRH+0x3f0>
lea    -0x1830(%rbp),%rdi
lea    -0x1650(%rbp),%rsi
mov    0x10(%rbp),%rdx
mov    $0x3,%ecx
call   1080 <mmul@plt>
mov    0x10(%rbp),%rdi
lea    -0x1830(%rbp),%rsi
lea    -0x1600(%rbp),%rdx
mov    $0x3,%ecx
call   1080 <mmul@plt>
cmpl   $0x1,-0x1834(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x18b0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<A2toRH>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x15b8,%rsp
mov    %r9,%r15
mov    %r8,%r14
mov    %rcx,0x8(%rsp)
mov    %rdx,%r13
mov    %rsi,%rbp
mov    %rdi,%rbx
lea    0x7a0(%rsp),%r12
mov    $0x690,%edx
mov    %r12,%rdi
xor    %esi,%esi
call   1050 <memset@plt>
movslq (%r15),%rax
lea    (%rax,%rax,4),%rsi
shl    $0x4,%rsi
add    %r14,%rsi
mov    %r12,%rdi
mov    $0x2,%edx
call   1030 <Zu@plt>
lea    0x7d8(%rsp),%rdi
movslq 0x4(%r15),%rax
lea    (%rax,%rax,4),%rsi
shl    $0x4,%rsi
add    %r14,%rsi
mov    $0x2,%edx
call   1030 <Zu@plt>
lea    0xb90(%rsp),%rdi
mov    %rbp,%rsi
mov    %rbx,%rdx
mov    $0x2,%ecx
call   1060 <Znd@plt>
lea    0xd18(%rsp),%rdi
mov    0x8(%rsp),%rsi
mov    %r13,%rdx
mov    $0x2,%ecx
call   1060 <Znd@plt>
lea    0x90(%rsp),%rbx
mov    %rbx,%rdi
mov    %r12,%rsi
mov    $0xf,%edx
mov    $0xe,%ecx
call   1080 <mattr@plt>
xorps  %xmm0,%xmm0
movaps %xmm0,0x720(%rsp)
movaps %xmm0,0x730(%rsp)
movaps %xmm0,0x740(%rsp)
movaps %xmm0,0x750(%rsp)
movaps %xmm0,0x760(%rsp)
movaps %xmm0,0x770(%rsp)
movaps %xmm0,0x780(%rsp)
movq   $0x0,0x790(%rsp)
lea    0xeb0(%rsp),%r14
lea    0x10(%rsp),%rcx
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0xf,%edx
call   1090 <nullspace@plt>
mov    %eax,%ebx
mov    0x15f0(%rsp),%rbp
mov    %rbp,%rdi
mov    %r14,%rsi
mov    $0x48,%edx
call   1070 <memcpy@plt>
mov    %rbp,%rdi
mov    $0x3,%esi
call   1040 <trnm@plt>
xor    %eax,%eax
cmp    $0x1,%ebx
setne  %al
add    $0x15b8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @A2toRH(double* %0, double* %1, double* %2, double* %3, double* %4, i32* %5, double* %6) {
%8 = alloca double*
%9 = alloca double*
%10 = alloca double*
%11 = alloca double*
%12 = alloca double*
%13 = alloca i32*
%14 = alloca double*
%15 = alloca i32
%16 = alloca i32
%17 = alloca [225 x double]
%18 = alloca [225 x double]
%19 = alloca [225 x double]
%20 = alloca [9 x double]
%21 = alloca [9 x double]
%22 = alloca [9 x double]
%23 = alloca [9 x double]
%24 = alloca [9 x double]
%25 = alloca [9 x double]
%26 = alloca [9 x double]
%27 = alloca [9 x double]
%28 = alloca [9 x double]
%29 = alloca i32
%30 = alloca [30 x i32]
store double* %0, double** %8
store double* %1, double** %9
store double* %2, double** %10
store double* %3, double** %11
store double* %4, double** %12
store i32* %5, i32** %13
store double* %6, double** %14
store i32 0, i32* %15
store i32 0, i32* %16
br label %31
31: ; preds = %38, %7
%32 = load i32, i32* %16
%33 = icmp slt i32 %32, 210
br i1 %33, label %34, label %41
34: ; preds = %31
%35 = load i32, i32* %16
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds [225 x double], [225 x double]* %17, i64 0, i64 %36
store double 0.000000e+00, double* %37
br label %38
38: ; preds = %34
%39 = load i32, i32* %16
%40 = add nsw i32 %39, 1
store i32 %40, i32* %16
br label %31
41: ; preds = %31
%42 = load i32, i32* %15
%43 = icmp ne i32 %42, 0
br i1 %43, label %44, label %174
44: ; preds = %41
%45 = load double*, double** %12
%46 = load i32*, i32** %13
%47 = getelementptr inbounds i32, i32* %46, i64 0
%48 = load i32, i32* %47
%49 = mul nsw i32 10, %48
%50 = add nsw i32 %49, 0
%51 = sext i32 %50 to i64
%52 = getelementptr inbounds double, double* %45, i64 %51
%53 = load double, double* %52
%54 = load double*, double** %12
%55 = load i32*, i32** %13
%56 = getelementptr inbounds i32, i32* %55, i64 0
%57 = load i32, i32* %56
%58 = mul nsw i32 10, %57
%59 = add nsw i32 %58, 1
%60 = sext i32 %59 to i64
%61 = getelementptr inbounds double, double* %54, i64 %60
%62 = load double, double* %61
%63 = load double*, double** %12
%64 = load i32*, i32** %13
%65 = getelementptr inbounds i32, i32* %64, i64 1
%66 = load i32, i32* %65
%67 = mul nsw i32 10, %66
%68 = add nsw i32 %67, 0
%69 = sext i32 %68 to i64
%70 = getelementptr inbounds double, double* %63, i64 %69
%71 = load double, double* %70
%72 = load double*, double** %12
%73 = load i32*, i32** %13
%74 = getelementptr inbounds i32, i32* %73, i64 1
%75 = load i32, i32* %74
%76 = mul nsw i32 10, %75
%77 = add nsw i32 %76, 1
%78 = sext i32 %77 to i64
%79 = getelementptr inbounds double, double* %72, i64 %78
%80 = load double, double* %79
%81 = getelementptr inbounds [9 x double], [9 x double]* %20, i64 0, i64 0
%82 = getelementptr inbounds [9 x double], [9 x double]* %21, i64 0, i64 0
%83 = call i32 @norm2pt(double %53, double %62, double %71, double %80, double* %81, double* %82)
%84 = load double*, double** %12
%85 = load i32*, i32** %13
%86 = getelementptr inbounds i32, i32* %85, i64 0
%87 = load i32, i32* %86
%88 = mul nsw i32 10, %87
%89 = add nsw i32 %88, 5
%90 = sext i32 %89 to i64
%91 = getelementptr inbounds double, double* %84, i64 %90
%92 = load double, double* %91
%93 = load double*, double** %12
%94 = load i32*, i32** %13
%95 = getelementptr inbounds i32, i32* %94, i64 0
%96 = load i32, i32* %95
%97 = mul nsw i32 10, %96
%98 = add nsw i32 %97, 6
%99 = sext i32 %98 to i64
%100 = getelementptr inbounds double, double* %93, i64 %99
%101 = load double, double* %100
%102 = load double*, double** %12
%103 = load i32*, i32** %13
%104 = getelementptr inbounds i32, i32* %103, i64 1
%105 = load i32, i32* %104
%106 = mul nsw i32 10, %105
%107 = add nsw i32 %106, 5
%108 = sext i32 %107 to i64
%109 = getelementptr inbounds double, double* %102, i64 %108
%110 = load double, double* %109
%111 = load double*, double** %12
%112 = load i32*, i32** %13
%113 = getelementptr inbounds i32, i32* %112, i64 1
%114 = load i32, i32* %113
%115 = mul nsw i32 10, %114
%116 = add nsw i32 %115, 6
%117 = sext i32 %116 to i64
%118 = getelementptr inbounds double, double* %111, i64 %117
%119 = load double, double* %118
%120 = getelementptr inbounds [9 x double], [9 x double]* %22, i64 0, i64 0
%121 = getelementptr inbounds [9 x double], [9 x double]* %23, i64 0, i64 0
%122 = call i32 @norm2pt(double %92, double %101, double %110, double %119, double* %120, double* %121)
%123 = getelementptr inbounds [225 x double], [225 x double]* %17, i64 0, i64 0
%124 = load double*, double** %12
%125 = load i32*, i32** %13
%126 = getelementptr inbounds i32, i32* %125, i64 0
%127 = load i32, i32* %126
%128 = mul nsw i32 10, %127
%129 = sext i32 %128 to i64
%130 = getelementptr inbounds double, double* %124, i64 %129
%131 = getelementptr inbounds [9 x double], [9 x double]* %20, i64 0, i64 0
%132 = getelementptr inbounds [9 x double], [9 x double]* %22, i64 0, i64 0
%133 = call i32 @ZuN(double* %123, double* %130, double* %131, double* %132, i32 2)
%134 = getelementptr inbounds [225 x double], [225 x double]* %17, i64 0, i64 0
%135 = getelementptr inbounds double, double* %134, i64 7
%136 = load double*, double** %12
%137 = load i32*, i32** %13
%138 = getelementptr inbounds i32, i32* %137, i64 1
%139 = load i32, i32* %138
%140 = mul nsw i32 10, %139
%141 = sext i32 %140 to i64
%142 = getelementptr inbounds double, double* %136, i64 %141
%143 = getelementptr inbounds [9 x double], [9 x double]* %20, i64 0, i64 0
%144 = getelementptr inbounds [9 x double], [9 x double]* %22, i64 0, i64 0
%145 = call i32 @ZuN(double* %135, double* %142, double* %143, double* %144, i32 2)
%146 = getelementptr inbounds [9 x double], [9 x double]* %24, i64 0, i64 0
%147 = getelementptr inbounds [9 x double], [9 x double]* %23, i64 0, i64 0
%148 = load double*, double** %8
%149 = call i32 @mmul(double* %146, double* %147, double* %148, i32 3)
%150 = getelementptr inbounds [9 x double], [9 x double]* %25, i64 0, i64 0
%151 = getelementptr inbounds [9 x double], [9 x double]* %23, i64 0, i64 0
%152 = load double*, double** %10
%153 = call i32 @mmul(double* %150, double* %151, double* %152, i32 3)
%154 = getelementptr inbounds [9 x double], [9 x double]* %26, i64 0, i64 0
%155 = load double*, double** %9
%156 = getelementptr inbounds [9 x double], [9 x double]* %20, i64 0, i64 0
%157 = call i32 @mmul(double* %154, double* %155, double* %156, i32 3)
%158 = getelementptr inbounds [9 x double], [9 x double]* %27, i64 0, i64 0
%159 = load double*, double** %11
%160 = getelementptr inbounds [9 x double], [9 x double]* %20, i64 0, i64 0
%161 = call i32 @mmul(double* %158, double* %159, double* %160, i32 3)
%162 = getelementptr inbounds [225 x double], [225 x double]* %17, i64 0, i64 0
%163 = getelementptr inbounds double, double* %162, i64 126
%164 = getelementptr inbounds [9 x double], [9 x double]* %26, i64 0, i64 0
%165 = getelementptr inbounds [9 x double], [9 x double]* %24, i64 0, i64 0
%166 = call i32 @Znd(double* %163, double* %164, double* %165, i32 2)
%167 = getelementptr inbounds [225 x double], [225 x double]* %17, i64 0, i64 0
%168 = getelementptr inbounds double, double* %167, i64 126
%169 = getelementptr inbounds double, double* %168, i64 42
%170 = getelementptr inbounds double, double* %169, i64 7
%171 = getelementptr inbounds [9 x double], [9 x double]* %27, i64 0, i64 0
%172 = getelementptr inbounds [9 x double], [9 x double]* %25, i64 0, i64 0
%173 = call i32 @Znd(double* %170, double* %171, double* %172, i32 2)
br label %206
174: ; preds = %41
%175 = getelementptr inbounds [225 x double], [225 x double]* %17, i64 0, i64 0
%176 = load double*, double** %12
%177 = load i32*, i32** %13
%178 = getelementptr inbounds i32, i32* %177, i64 0
%179 = load i32, i32* %178
%180 = mul nsw i32 10, %179
%181 = sext i32 %180 to i64
%182 = getelementptr inbounds double, double* %176, i64 %181
%183 = call i32 @Zu(double* %175, double* %182, i32 2)
%184 = getelementptr inbounds [225 x double], [225 x double]* %17, i64 0, i64 0
%185 = getelementptr inbounds double, double* %184, i64 7
%186 = load double*, double** %12
%187 = load i32*, i32** %13
%188 = getelementptr inbounds i32, i32* %187, i64 1
%189 = load i32, i32* %188
%190 = mul nsw i32 10, %189
%191 = sext i32 %190 to i64
%192 = getelementptr inbounds double, double* %186, i64 %191
%193 = call i32 @Zu(double* %185, double* %192, i32 2)
%194 = getelementptr inbounds [225 x double], [225 x double]* %17, i64 0, i64 0
%195 = getelementptr inbounds double, double* %194, i64 126
%196 = load double*, double** %9
%197 = load double*, double** %8
%198 = call i32 @Znd(double* %195, double* %196, double* %197, i32 2)
%199 = getelementptr inbounds [225 x double], [225 x double]* %17, i64 0, i64 0
%200 = getelementptr inbounds double, double* %199, i64 126
%201 = getelementptr inbounds double, double* %200, i64 42
%202 = getelementptr inbounds double, double* %201, i64 7
%203 = load double*, double** %11
%204 = load double*, double** %10
%205 = call i32 @Znd(double* %202, double* %203, double* %204, i32 2)
br label %206
206: ; preds = %174, %44
%207 = getelementptr inbounds [225 x double], [225 x double]* %18, i64 0, i64 0
%208 = getelementptr inbounds [225 x double], [225 x double]* %17, i64 0, i64 0
%209 = call i32 @mattr(double* %207, double* %208, i32 15, i32 14)
store i32 210, i32* %16
br label %210
210: ; preds = %217, %206
%211 = load i32, i32* %16
%212 = icmp slt i32 %211, 225
br i1 %212, label %213, label %220
213: ; preds = %210
%214 = load i32, i32* %16
%215 = sext i32 %214 to i64
%216 = getelementptr inbounds [225 x double], [225 x double]* %18, i64 0, i64 %215
store double 0.000000e+00, double* %216
br label %217
217: ; preds = %213
%218 = load i32, i32* %16
%219 = add nsw i32 %218, 1
store i32 %219, i32* %16
br label %210
220: ; preds = %210
%221 = getelementptr inbounds [225 x double], [225 x double]* %18, i64 0, i64 0
%222 = getelementptr inbounds [225 x double], [225 x double]* %19, i64 0, i64 0
%223 = getelementptr inbounds [30 x i32], [30 x i32]* %30, i64 0, i64 0
%224 = call i32 @nullspace(double* %221, double* %222, i32 15, i32* %223)
store i32 %224, i32* %29
%225 = load double*, double** %14
%226 = getelementptr inbounds [225 x double], [225 x double]* %19, i64 0, i64 0
%227 = call i32 @memcpy(double* %225, double* %226, i32 72)
%228 = load double*, double** %14
%229 = call i32 @trnm(double* %228, i32 3)
%230 = load i32, i32* %15
%231 = icmp ne i32 %230, 0
br i1 %231, label %232, label %241
232: ; preds = %220
%233 = getelementptr inbounds [9 x double], [9 x double]* %28, i64 0, i64 0
%234 = getelementptr inbounds [9 x double], [9 x double]* %22, i64 0, i64 0
%235 = load double*, double** %14
%236 = call i32 @mmul(double* %233, double* %234, double* %235, i32 3)
%237 = load double*, double** %14
%238 = getelementptr inbounds [9 x double], [9 x double]* %28, i64 0, i64 0
%239 = getelementptr inbounds [9 x double], [9 x double]* %21, i64 0, i64 0
%240 = call i32 @mmul(double* %237, double* %238, double* %239, i32 3)
br label %241
241: ; preds = %232, %220
%242 = load i32, i32* %29
%243 = icmp ne i32 %242, 1
%244 = zext i1 %243 to i32
ret i32 %244
}

LLVM IR (-O2):
define i32 @A2toRH(double* %0, double* %1, double* %2, double* %3, double* %4, i32* nocapture %5, double* %6) {
%8 = alloca [225 x double]
%9 = bitcast [225 x double]* %8 to i8*
%10 = alloca [225 x double]
%11 = alloca [225 x double]
%12 = alloca [30 x i32]
%13 = bitcast [225 x double]* %10 to i8*
%14 = bitcast [225 x double]* %11 to i8*
%15 = bitcast [30 x i32]* %12 to i8*
%16 = getelementptr inbounds [225 x double], [225 x double]* %8, i64 0, i64 0
%17 = load i32, i32* %5
%18 = mul nsw i32 %17, 10
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds double, double* %4, i64 %19
%21 = call i32 @Zu(double* %16, double* %20, i32 2)
%22 = getelementptr inbounds [225 x double], [225 x double]* %8, i64 0, i64 7
%23 = getelementptr inbounds i32, i32* %5, i64 1
%24 = load i32, i32* %23
%25 = mul nsw i32 %24, 10
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds double, double* %4, i64 %26
%28 = call i32 @Zu(double* %22, double* %27, i32 2)
%29 = getelementptr inbounds [225 x double], [225 x double]* %8, i64 0, i64 126
%30 = call i32 @Znd(double* %29, double* %1, double* %0, i32 2)
%31 = getelementptr inbounds [225 x double], [225 x double]* %8, i64 0, i64 175
%32 = call i32 @Znd(double* %31, double* %3, double* %2, i32 2)
%33 = getelementptr inbounds [225 x double], [225 x double]* %10, i64 0, i64 0
%34 = call i32 @mattr(double* %33, double* %16, i32 15, i32 14)
%35 = getelementptr inbounds [225 x double], [225 x double]* %10, i64 0, i64 210
%36 = bitcast double* %35 to i8*
%37 = getelementptr inbounds [225 x double], [225 x double]* %11, i64 0, i64 0
%38 = getelementptr inbounds [30 x i32], [30 x i32]* %12, i64 0, i64 0
%39 = call i32 @nullspace(double* %33, double* %37, i32 15, i32* %38)
%40 = call i32 @memcpy(double* %6, double* %37, i32 72)
%41 = call i32 @trnm(double* %6, i32 3)
%42 = icmp ne i32 %39, 1
%43 = zext i1 %42 to i32
ret i32 %43
}