; LLVM IR from HRI-EU/Rcs :: src/RcsCore (Rcs_mathTests)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.DataFile = type { [256 x i8], ptr, i64 }
%struct.HTr = type { [3 x double], [3 x [3 x double]] }
%struct._MatNd = type { ptr, i32, i32, i32, i8 }

@RCS_GLOBAL_RLOG_CB = external global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [74 x i8], align 1
@RcsLogLevel = external global i32, align 4
@stderr = external global ptr, align 8
@.str.5 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.57 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.308 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.309 = external hidden unnamed_addr constant [12 x i8], align 1
@__func__.testDTW = external hidden unnamed_addr constant [8 x i8], align 1
@.str.310 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.311 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.312 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.313 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.314 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.315 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.316 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.317 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.318 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.319 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.320 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.321 = external hidden unnamed_addr constant [18 x i8], align 1

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #1

declare void @Mat3d_toEulerAngles(ptr noundef, ptr noundef) #2

declare ptr @MatNd_create(i32 noundef, i32 noundef) #2

declare void @MatNd_destroy(ptr noundef) #2

declare void @MatNd_set(ptr noundef, i32 noundef, i32 noundef, double noundef) #2

declare zeroext i1 @MatNd_toFile(ptr noundef, ptr noundef) #2

; Function Attrs: nounwind
declare ptr @strcpy(ptr noundef, ptr noundef) #1

declare i32 @system(ptr noundef) #2

declare void @print_trace() #2

; Function Attrs: noreturn nounwind
declare void @abort() #3

declare noalias ptr @fopen(ptr noundef, ptr noundef) #2

declare i32 @fclose(ptr noundef) #2

declare void @MatNd_setElementsTo(ptr noundef, double noundef) #2

; Function Attrs: nounwind
declare i32 @sprintf(ptr noundef, ptr noundef, ...) #1

; Function Attrs: mustprogress uwtable
define dso_local zeroext i1 @testDTW(i32 noundef %0, ptr noundef %1) #4 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca [16 x %struct.DataFile], align 16
  %6 = alloca [16 x ptr], align 16
  %7 = alloca %struct.HTr, align 8
  %8 = alloca double, align 8
  %9 = alloca [3 x double], align 16
  %10 = alloca [256 x i8], align 16
  %11 = alloca [256 x i8], align 16
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca [15 x ptr], align 16
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca [256 x i8], align 16
  %23 = alloca i32, align 4
  store i32 %0, ptr %3, align 4, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4352, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 128, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 96, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 256, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 256, ptr %11) #5
  %24 = getelementptr inbounds [256 x i8], ptr %11, i64 0, i64 0
  %25 = call ptr @strcpy(ptr noundef %24, ptr noundef @.str.308) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %26

26:                                               ; preds = %98, %2
  %27 = load i32, ptr %12, align 4, !tbaa !5
  %28 = icmp slt i32 %27, 16
  br i1 %28, label %30, label %29

29:                                               ; preds = %26
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %101

30:                                               ; preds = %26
  %31 = load i32, ptr %12, align 4, !tbaa !5
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds [16 x %struct.DataFile], ptr %5, i64 0, i64 %32
  %34 = getelementptr inbounds %struct.DataFile, ptr %33, i32 0, i32 0
  %35 = getelementptr inbounds [256 x i8], ptr %34, i64 0, i64 0
  %36 = getelementptr inbounds [256 x i8], ptr %11, i64 0, i64 0
  %37 = load i32, ptr %12, align 4, !tbaa !5
  %38 = add nsw i32 %37, 1
  %39 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %35, ptr noundef @.str.309, ptr noundef %36, i32 noundef %38) #5
  br label %40

40:                                               ; preds = %30
  %41 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !9
  %42 = icmp ne ptr %41, null
  br i1 %42, label %43, label %50

43:                                               ; preds = %40
  %44 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !9
  %45 = load i32, ptr %12, align 4, !tbaa !5
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds [16 x %struct.DataFile], ptr %5, i64 0, i64 %46
  %48 = getelementptr inbounds %struct.DataFile, ptr %47, i32 0, i32 0
  %49 = getelementptr inbounds [256 x i8], ptr %48, i64 0, i64 0
  call void (i32, ptr, ptr, i32, ptr, ...) %44(i32 noundef 3, ptr noundef @.str.3, ptr noundef @__func__.testDTW, i32 noundef 3126, ptr noundef @.str.310, ptr noundef %49)
  br label %50

50:                                               ; preds = %43, %40
  %51 = load i32, ptr @RcsLogLevel, align 4, !tbaa !5
  %52 = icmp sle i32 3, %51
  br i1 %52, label %53, label %65

53:                                               ; preds = %50
  %54 = load ptr, ptr @stderr, align 8, !tbaa !9
  %55 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %54, ptr noundef @.str.5, ptr noundef @.str.3, ptr noundef @__func__.testDTW, i32 noundef 3126) #5
  %56 = load ptr, ptr @stderr, align 8, !tbaa !9
  %57 = load i32, ptr %12, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [16 x %struct.DataFile], ptr %5, i64 0, i64 %58
  %60 = getelementptr inbounds %struct.DataFile, ptr %59, i32 0, i32 0
  %61 = getelementptr inbounds [256 x i8], ptr %60, i64 0, i64 0
  %62 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %56, ptr noundef @.str.310, ptr noundef %61) #5
  %63 = load ptr, ptr @stderr, align 8, !tbaa !9
  %64 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %63, ptr noundef @.str.6) #5
  br label %65

65:                                               ; preds = %53, %50
  br label %66

66:                                               ; preds = %65
  br label %67

67:                                               ; preds = %66
  %68 = load i32, ptr %12, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [16 x %struct.DataFile], ptr %5, i64 0, i64 %69
  %71 = getelementptr inbounds %struct.DataFile, ptr %70, i32 0, i32 0
  %72 = getelementptr inbounds [256 x i8], ptr %71, i64 0, i64 0
  %73 = call i64 @File_getLineCount(ptr noundef %72)
  %74 = load i32, ptr %12, align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [16 x %struct.DataFile], ptr %5, i64 0, i64 %75
  %77 = getelementptr inbounds %struct.DataFile, ptr %76, i32 0, i32 2
  store i64 %73, ptr %77, align 8, !tbaa !11
  %78 = load i32, ptr %12, align 4, !tbaa !5
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds [16 x %struct.DataFile], ptr %5, i64 0, i64 %79
  %81 = getelementptr inbounds %struct.DataFile, ptr %80, i32 0, i32 0
  %82 = getelementptr inbounds [256 x i8], ptr %81, i64 0, i64 0
  %83 = call noalias ptr @fopen(ptr noundef %82, ptr noundef @.str.311)
  %84 = load i32, ptr %12, align 4, !tbaa !5
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds [16 x %struct.DataFile], ptr %5, i64 0, i64 %85
  %87 = getelementptr inbounds %struct.DataFile, ptr %86, i32 0, i32 1
  store ptr %83, ptr %87, align 16, !tbaa !14
  %88 = load i32, ptr %12, align 4, !tbaa !5
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds [16 x %struct.DataFile], ptr %5, i64 0, i64 %89
  %91 = getelementptr inbounds %struct.DataFile, ptr %90, i32 0, i32 2
  %92 = load i64, ptr %91, align 8, !tbaa !11
  %93 = trunc i64 %92 to i32
  %94 = call ptr @MatNd_create(i32 noundef %93, i32 noundef 7)
  %95 = load i32, ptr %12, align 4, !tbaa !5
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [16 x ptr], ptr %6, i64 0, i64 %96
  store ptr %94, ptr %97, align 8, !tbaa !9
  br label %98

98:                                               ; preds = %67
  %99 = load i32, ptr %12, align 4, !tbaa !5
  %100 = add nsw i32 %99, 1
  store i32 %100, ptr %12, align 4, !tbaa !5
  br label %26, !llvm.loop !15

101:                                              ; preds = %29
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 0, ptr %13, align 4, !tbaa !5
  br label %102

102:                                              ; preds = %317, %101
  %103 = load i32, ptr %13, align 4, !tbaa !5
  %104 = icmp slt i32 %103, 16
  br i1 %104, label %106, label %105

105:                                              ; preds = %102
  store i32 7, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %320

106:                                              ; preds = %102
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  store i32 0, ptr %15, align 4, !tbaa !5
  br label %107

107:                                              ; preds = %304, %106
  %108 = load i32, ptr %15, align 4, !tbaa !5
  %109 = sext i32 %108 to i64
  %110 = load i32, ptr %13, align 4, !tbaa !5
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [16 x %struct.DataFile], ptr %5, i64 0, i64 %111
  %113 = getelementptr inbounds %struct.DataFile, ptr %112, i32 0, i32 2
  %114 = load i64, ptr %113, align 8, !tbaa !11
  %115 = icmp slt i64 %109, %114
  br i1 %115, label %117, label %116

116:                                              ; preds = %107
  store i32 10, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  br label %307

117:                                              ; preds = %107
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  %118 = load i32, ptr %13, align 4, !tbaa !5
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds [16 x %struct.DataFile], ptr %5, i64 0, i64 %119
  %121 = getelementptr inbounds %struct.DataFile, ptr %120, i32 0, i32 1
  %122 = load ptr, ptr %121, align 16, !tbaa !14
  %123 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef %122, ptr noundef @.str.312, ptr noundef %8)
  store i32 %123, ptr %16, align 4, !tbaa !5
  br label %124

124:                                              ; preds = %117
  %125 = load i32, ptr %16, align 4, !tbaa !5
  %126 = icmp eq i32 %125, 1
  br i1 %126, label %130, label %127

127:                                              ; preds = %124
  %128 = load ptr, ptr @stderr, align 8, !tbaa !9
  %129 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %128, ptr noundef @.str.57, ptr noundef @.str.3, ptr noundef @__func__.testDTW, i32 noundef 3141, ptr noundef @.str.313) #5
  call void @print_trace()
  call void @abort() #6
  unreachable

130:                                              ; preds = %124
  br label %131

131:                                              ; preds = %130
  br label %132

132:                                              ; preds = %131
  %133 = load i32, ptr %13, align 4, !tbaa !5
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds [16 x ptr], ptr %6, i64 0, i64 %134
  %136 = load ptr, ptr %135, align 8, !tbaa !9
  %137 = load i32, ptr %15, align 4, !tbaa !5
  %138 = load double, ptr %8, align 8, !tbaa !17
  call void @MatNd_set(ptr noundef %136, i32 noundef %137, i32 noundef 0, double noundef %138)
  %139 = load i32, ptr %13, align 4, !tbaa !5
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds [16 x %struct.DataFile], ptr %5, i64 0, i64 %140
  %142 = getelementptr inbounds %struct.DataFile, ptr %141, i32 0, i32 1
  %143 = load ptr, ptr %142, align 16, !tbaa !14
  %144 = getelementptr inbounds %struct.HTr, ptr %7, i32 0, i32 0
  %145 = getelementptr inbounds [3 x double], ptr %144, i64 0, i64 1
  %146 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef %143, ptr noundef @.str.312, ptr noundef %145)
  store i32 %146, ptr %16, align 4, !tbaa !5
  br label %147

147:                                              ; preds = %132
  %148 = load i32, ptr %16, align 4, !tbaa !5
  %149 = icmp eq i32 %148, 1
  br i1 %149, label %153, label %150

150:                                              ; preds = %147
  %151 = load ptr, ptr @stderr, align 8, !tbaa !9
  %152 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %151, ptr noundef @.str.57, ptr noundef @.str.3, ptr noundef @__func__.testDTW, i32 noundef 3146, ptr noundef @.str.313) #5
  call void @print_trace()
  call void @abort() #6
  unreachable

153:                                              ; preds = %147
  br label %154

154:                                              ; preds = %153
  br label %155

155:                                              ; preds = %154
  %156 = load i32, ptr %13, align 4, !tbaa !5
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds [16 x ptr], ptr %6, i64 0, i64 %157
  %159 = load ptr, ptr %158, align 8, !tbaa !9
  %160 = load i32, ptr %15, align 4, !tbaa !5
  %161 = getelementptr inbounds %struct.HTr, ptr %7, i32 0, i32 0
  %162 = getelementptr inbounds [3 x double], ptr %161, i64 0, i64 1
  %163 = load double, ptr %162, align 8, !tbaa !17
  call void @MatNd_set(ptr noundef %159, i32 noundef %160, i32 noundef 1, double noundef %163)
  %164 = load i32, ptr %13, align 4, !tbaa !5
  %165 = sext i32 %164 to i64
  %166 = getelementptr inbounds [16 x %struct.DataFile], ptr %5, i64 0, i64 %165
  %167 = getelementptr inbounds %struct.DataFile, ptr %166, i32 0, i32 1
  %168 = load ptr, ptr %167, align 16, !tbaa !14
  %169 = getelementptr inbounds %struct.HTr, ptr %7, i32 0, i32 0
  %170 = getelementptr inbounds [3 x double], ptr %169, i64 0, i64 2
  %171 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef %168, ptr noundef @.str.312, ptr noundef %170)
  store i32 %171, ptr %16, align 4, !tbaa !5
  br label %172

172:                                              ; preds = %155
  %173 = load i32, ptr %16, align 4, !tbaa !5
  %174 = icmp eq i32 %173, 1
  br i1 %174, label %178, label %175

175:                                              ; preds = %172
  %176 = load ptr, ptr @stderr, align 8, !tbaa !9
  %177 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %176, ptr noundef @.str.57, ptr noundef @.str.3, ptr noundef @__func__.testDTW, i32 noundef 3151, ptr noundef @.str.313) #5
  call void @print_trace()
  call void @abort() #6
  unreachable

178:                                              ; preds = %172
  br label %179

179:                                              ; preds = %178
  br label %180

180:                                              ; preds = %179
  %181 = load i32, ptr %13, align 4, !tbaa !5
  %182 = sext i32 %181 to i64
  %183 = getelementptr inbounds [16 x ptr], ptr %6, i64 0, i64 %182
  %184 = load ptr, ptr %183, align 8, !tbaa !9
  %185 = load i32, ptr %15, align 4, !tbaa !5
  %186 = getelementptr inbounds %struct.HTr, ptr %7, i32 0, i32 0
  %187 = getelementptr inbounds [3 x double], ptr %186, i64 0, i64 2
  %188 = load double, ptr %187, align 8, !tbaa !17
  call void @MatNd_set(ptr noundef %184, i32 noundef %185, i32 noundef 2, double noundef %188)
  %189 = load i32, ptr %13, align 4, !tbaa !5
  %190 = sext i32 %189 to i64
  %191 = getelementptr inbounds [16 x %struct.DataFile], ptr %5, i64 0, i64 %190
  %192 = getelementptr inbounds %struct.DataFile, ptr %191, i32 0, i32 1
  %193 = load ptr, ptr %192, align 16, !tbaa !14
  %194 = getelementptr inbounds %struct.HTr, ptr %7, i32 0, i32 0
  %195 = getelementptr inbounds [3 x double], ptr %194, i64 0, i64 0
  %196 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef %193, ptr noundef @.str.312, ptr noundef %195)
  store i32 %196, ptr %16, align 4, !tbaa !5
  br label %197

197:                                              ; preds = %180
  %198 = load i32, ptr %16, align 4, !tbaa !5
  %199 = icmp eq i32 %198, 1
  br i1 %199, label %203, label %200

200:                                              ; preds = %197
  %201 = load ptr, ptr @stderr, align 8, !tbaa !9
  %202 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %201, ptr noundef @.str.57, ptr noundef @.str.3, ptr noundef @__func__.testDTW, i32 noundef 3156, ptr noundef @.str.313) #5
  call void @print_trace()
  call void @abort() #6
  unreachable

203:                                              ; preds = %197
  br label %204

204:                                              ; preds = %203
  br label %205

205:                                              ; preds = %204
  %206 = load i32, ptr %13, align 4, !tbaa !5
  %207 = sext i32 %206 to i64
  %208 = getelementptr inbounds [16 x ptr], ptr %6, i64 0, i64 %207
  %209 = load ptr, ptr %208, align 8, !tbaa !9
  %210 = load i32, ptr %15, align 4, !tbaa !5
  %211 = getelementptr inbounds %struct.HTr, ptr %7, i32 0, i32 0
  %212 = getelementptr inbounds [3 x double], ptr %211, i64 0, i64 0
  %213 = load double, ptr %212, align 8, !tbaa !17
  call void @MatNd_set(ptr noundef %209, i32 noundef %210, i32 noundef 3, double noundef %213)
  %214 = load i32, ptr %13, align 4, !tbaa !5
  %215 = sext i32 %214 to i64
  %216 = getelementptr inbounds [16 x %struct.DataFile], ptr %5, i64 0, i64 %215
  %217 = getelementptr inbounds %struct.DataFile, ptr %216, i32 0, i32 1
  %218 = load ptr, ptr %217, align 16, !tbaa !14
  %219 = getelementptr inbounds %struct.HTr, ptr %7, i32 0, i32 1
  %220 = getelementptr inbounds [3 x [3 x double]], ptr %219, i64 0, i64 0
  %221 = getelementptr inbounds [3 x double], ptr %220, i64 0, i64 0
  %222 = getelementptr inbounds %struct.HTr, ptr %7, i32 0, i32 1
  %223 = getelementptr inbounds [3 x [3 x double]], ptr %222, i64 0, i64 0
  %224 = getelementptr inbounds [3 x double], ptr %223, i64 0, i64 1
  %225 = getelementptr inbounds %struct.HTr, ptr %7, i32 0, i32 1
  %226 = getelementptr inbounds [3 x [3 x double]], ptr %225, i64 0, i64 0
  %227 = getelementptr inbounds [3 x double], ptr %226, i64 0, i64 2
  %228 = getelementptr inbounds %struct.HTr, ptr %7, i32 0, i32 1
  %229 = getelementptr inbounds [3 x [3 x double]], ptr %228, i64 0, i64 1
  %230 = getelementptr inbounds [3 x double], ptr %229, i64 0, i64 0
  %231 = getelementptr inbounds %struct.HTr, ptr %7, i32 0, i32 1
  %232 = getelementptr inbounds [3 x [3 x double]], ptr %231, i64 0, i64 1
  %233 = getelementptr inbounds [3 x double], ptr %232, i64 0, i64 1
  %234 = getelementptr inbounds %struct.HTr, ptr %7, i32 0, i32 1
  %235 = getelementptr inbounds [3 x [3 x double]], ptr %234, i64 0, i64 1
  %236 = getelementptr inbounds [3 x double], ptr %235, i64 0, i64 2
  %237 = getelementptr inbounds %struct.HTr, ptr %7, i32 0, i32 1
  %238 = getelementptr inbounds [3 x [3 x double]], ptr %237, i64 0, i64 2
  %239 = getelementptr inbounds [3 x double], ptr %238, i64 0, i64 0
  %240 = getelementptr inbounds %struct.HTr, ptr %7, i32 0, i32 1
  %241 = getelementptr inbounds [3 x [3 x double]], ptr %240, i64 0, i64 2
  %242 = getelementptr inbounds [3 x double], ptr %241, i64 0, i64 1
  %243 = getelementptr inbounds %struct.HTr, ptr %7, i32 0, i32 1
  %244 = getelementptr inbounds [3 x [3 x double]], ptr %243, i64 0, i64 2
  %245 = getelementptr inbounds [3 x double], ptr %244, i64 0, i64 2
  %246 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef %218, ptr noundef @.str.314, ptr noundef %221, ptr noundef %224, ptr noundef %227, ptr noundef %230, ptr noundef %233, ptr noundef %236, ptr noundef %239, ptr noundef %242, ptr noundef %245)
  store i32 %246, ptr %16, align 4, !tbaa !5
  br label %247

247:                                              ; preds = %205
  %248 = load i32, ptr %16, align 4, !tbaa !5
  %249 = icmp eq i32 %248, 9
  br i1 %249, label %253, label %250

250:                                              ; preds = %247
  %251 = load ptr, ptr @stderr, align 8, !tbaa !9
  %252 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %251, ptr noundef @.str.57, ptr noundef @.str.3, ptr noundef @__func__.testDTW, i32 noundef 3164, ptr noundef @.str.315) #5
  call void @print_trace()
  call void @abort() #6
  unreachable

253:                                              ; preds = %247
  br label %254

254:                                              ; preds = %253
  br label %255

255:                                              ; preds = %254
  %256 = getelementptr inbounds [3 x double], ptr %9, i64 0, i64 0
  %257 = getelementptr inbounds %struct.HTr, ptr %7, i32 0, i32 1
  %258 = getelementptr inbounds [3 x [3 x double]], ptr %257, i64 0, i64 0
  call void @Mat3d_toEulerAngles(ptr noundef %256, ptr noundef %258)
  %259 = load i32, ptr %13, align 4, !tbaa !5
  %260 = sext i32 %259 to i64
  %261 = getelementptr inbounds [16 x ptr], ptr %6, i64 0, i64 %260
  %262 = load ptr, ptr %261, align 8, !tbaa !9
  %263 = load i32, ptr %15, align 4, !tbaa !5
  %264 = getelementptr inbounds [3 x double], ptr %9, i64 0, i64 0
  %265 = load double, ptr %264, align 16, !tbaa !17
  call void @MatNd_set(ptr noundef %262, i32 noundef %263, i32 noundef 4, double noundef %265)
  %266 = load i32, ptr %13, align 4, !tbaa !5
  %267 = sext i32 %266 to i64
  %268 = getelementptr inbounds [16 x ptr], ptr %6, i64 0, i64 %267
  %269 = load ptr, ptr %268, align 8, !tbaa !9
  %270 = load i32, ptr %15, align 4, !tbaa !5
  %271 = getelementptr inbounds [3 x double], ptr %9, i64 0, i64 1
  %272 = load double, ptr %271, align 8, !tbaa !17
  call void @MatNd_set(ptr noundef %269, i32 noundef %270, i32 noundef 5, double noundef %272)
  %273 = load i32, ptr %13, align 4, !tbaa !5
  %274 = sext i32 %273 to i64
  %275 = getelementptr inbounds [16 x ptr], ptr %6, i64 0, i64 %274
  %276 = load ptr, ptr %275, align 8, !tbaa !9
  %277 = load i32, ptr %15, align 4, !tbaa !5
  %278 = getelementptr inbounds [3 x double], ptr %9, i64 0, i64 2
  %279 = load double, ptr %278, align 16, !tbaa !17
  call void @MatNd_set(ptr noundef %276, i32 noundef %277, i32 noundef 6, double noundef %279)
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  store i32 0, ptr %17, align 4, !tbaa !5
  br label %280

280:                                              ; preds = %300, %255
  %281 = load i32, ptr %17, align 4, !tbaa !5
  %282 = icmp slt i32 %281, 12
  br i1 %282, label %284, label %283

283:                                              ; preds = %280
  store i32 23, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  br label %303

284:                                              ; preds = %280
  %285 = load i32, ptr %13, align 4, !tbaa !5
  %286 = sext i32 %285 to i64
  %287 = getelementptr inbounds [16 x %struct.DataFile], ptr %5, i64 0, i64 %286
  %288 = getelementptr inbounds %struct.DataFile, ptr %287, i32 0, i32 1
  %289 = load ptr, ptr %288, align 16, !tbaa !14
  %290 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef %289, ptr noundef @.str.312, ptr noundef %8)
  store i32 %290, ptr %16, align 4, !tbaa !5
  br label %291

291:                                              ; preds = %284
  %292 = load i32, ptr %16, align 4, !tbaa !5
  %293 = icmp eq i32 %292, 1
  br i1 %293, label %297, label %294

294:                                              ; preds = %291
  %295 = load ptr, ptr @stderr, align 8, !tbaa !9
  %296 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %295, ptr noundef @.str.57, ptr noundef @.str.3, ptr noundef @__func__.testDTW, i32 noundef 3174, ptr noundef @.str.313) #5
  call void @print_trace()
  call void @abort() #6
  unreachable

297:                                              ; preds = %291
  br label %298

298:                                              ; preds = %297
  br label %299

299:                                              ; preds = %298
  br label %300

300:                                              ; preds = %299
  %301 = load i32, ptr %17, align 4, !tbaa !5
  %302 = add nsw i32 %301, 1
  store i32 %302, ptr %17, align 4, !tbaa !5
  br label %280, !llvm.loop !19

303:                                              ; preds = %283
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  br label %304

304:                                              ; preds = %303
  %305 = load i32, ptr %15, align 4, !tbaa !5
  %306 = add nsw i32 %305, 1
  store i32 %306, ptr %15, align 4, !tbaa !5
  br label %107, !llvm.loop !20

307:                                              ; preds = %116
  %308 = getelementptr inbounds [256 x i8], ptr %10, i64 0, i64 0
  %309 = load i32, ptr %13, align 4, !tbaa !5
  %310 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %308, ptr noundef @.str.316, i32 noundef %309) #5
  %311 = load i32, ptr %13, align 4, !tbaa !5
  %312 = sext i32 %311 to i64
  %313 = getelementptr inbounds [16 x ptr], ptr %6, i64 0, i64 %312
  %314 = load ptr, ptr %313, align 8, !tbaa !9
  %315 = getelementptr inbounds [256 x i8], ptr %10, i64 0, i64 0
  %316 = call zeroext i1 @MatNd_toFile(ptr noundef %314, ptr noundef %315)
  br label %317

317:                                              ; preds = %307
  %318 = load i32, ptr %13, align 4, !tbaa !5
  %319 = add nsw i32 %318, 1
  store i32 %319, ptr %13, align 4, !tbaa !5
  br label %102, !llvm.loop !21

320:                                              ; preds = %105
  call void @llvm.lifetime.start.p0(i64 120, ptr %18) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  %321 = call ptr @MatNd_create(i32 noundef 7, i32 noundef 1)
  store ptr %321, ptr %19, align 8, !tbaa !9
  %322 = load ptr, ptr %19, align 8, !tbaa !9
  call void @MatNd_setElementsTo(ptr noundef %322, double noundef 1.000000e+00)
  %323 = load ptr, ptr %19, align 8, !tbaa !9
  call void @MatNd_set(ptr noundef %323, i32 noundef 0, i32 noundef 0, double noundef 0.000000e+00)
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  store i32 1, ptr %20, align 4, !tbaa !5
  br label %324

324:                                              ; preds = %386, %320
  %325 = load i32, ptr %20, align 4, !tbaa !5
  %326 = icmp slt i32 %325, 16
  br i1 %326, label %328, label %327

327:                                              ; preds = %324
  store i32 28, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  br label %389

328:                                              ; preds = %324
  br label %329

329:                                              ; preds = %328
  %330 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !9
  %331 = icmp ne ptr %330, null
  br i1 %331, label %332, label %335

332:                                              ; preds = %329
  %333 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !9
  %334 = load i32, ptr %20, align 4, !tbaa !5
  call void (i32, ptr, ptr, i32, ptr, ...) %333(i32 noundef 3, ptr noundef @.str.3, ptr noundef @__func__.testDTW, i32 noundef 3190, ptr noundef @.str.317, i32 noundef %334)
  br label %335

335:                                              ; preds = %332, %329
  %336 = load i32, ptr @RcsLogLevel, align 4, !tbaa !5
  %337 = icmp sle i32 3, %336
  br i1 %337, label %338, label %346

338:                                              ; preds = %335
  %339 = load ptr, ptr @stderr, align 8, !tbaa !9
  %340 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %339, ptr noundef @.str.5, ptr noundef @.str.3, ptr noundef @__func__.testDTW, i32 noundef 3190) #5
  %341 = load ptr, ptr @stderr, align 8, !tbaa !9
  %342 = load i32, ptr %20, align 4, !tbaa !5
  %343 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %341, ptr noundef @.str.317, i32 noundef %342) #5
  %344 = load ptr, ptr @stderr, align 8, !tbaa !9
  %345 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %344, ptr noundef @.str.6) #5
  br label %346

346:                                              ; preds = %338, %335
  br label %347

347:                                              ; preds = %346
  br label %348

348:                                              ; preds = %347
  %349 = getelementptr inbounds [16 x ptr], ptr %6, i64 0, i64 0
  %350 = load ptr, ptr %349, align 16, !tbaa !9
  %351 = getelementptr inbounds %struct._MatNd, ptr %350, i32 0, i32 1
  %352 = load i32, ptr %351, align 8, !tbaa !22
  %353 = getelementptr inbounds [16 x ptr], ptr %6, i64 0, i64 0
  %354 = load ptr, ptr %353, align 16, !tbaa !9
  %355 = getelementptr inbounds %struct._MatNd, ptr %354, i32 0, i32 2
  %356 = load i32, ptr %355, align 4, !tbaa !25
  %357 = call ptr @MatNd_create(i32 noundef %352, i32 noundef %356)
  %358 = load i32, ptr %20, align 4, !tbaa !5
  %359 = sub nsw i32 %358, 1
  %360 = sext i32 %359 to i64
  %361 = getelementptr inbounds [15 x ptr], ptr %18, i64 0, i64 %360
  store ptr %357, ptr %361, align 8, !tbaa !9
  %362 = load i32, ptr %20, align 4, !tbaa !5
  %363 = sub nsw i32 %362, 1
  %364 = sext i32 %363 to i64
  %365 = getelementptr inbounds [15 x ptr], ptr %18, i64 0, i64 %364
  %366 = load ptr, ptr %365, align 8, !tbaa !9
  %367 = getelementptr inbounds [16 x ptr], ptr %6, i64 0, i64 0
  %368 = load ptr, ptr %367, align 16, !tbaa !9
  %369 = load i32, ptr %20, align 4, !tbaa !5
  %370 = sext i32 %369 to i64
  %371 = getelementptr inbounds [16 x ptr], ptr %6, i64 0, i64 %370
  %372 = load ptr, ptr %371, align 8, !tbaa !9
  %373 = load ptr, ptr %19, align 8, !tbaa !9
  %374 = call double @MatNd_DTW(ptr noundef %366, ptr noundef %368, ptr noundef %372, ptr noundef %373)
  %375 = getelementptr inbounds [256 x i8], ptr %10, i64 0, i64 0
  %376 = load i32, ptr %20, align 4, !tbaa !5
  %377 = sub nsw i32 %376, 1
  %378 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %375, ptr noundef @.str.318, i32 noundef %377) #5
  %379 = load i32, ptr %20, align 4, !tbaa !5
  %380 = sub nsw i32 %379, 1
  %381 = sext i32 %380 to i64
  %382 = getelementptr inbounds [15 x ptr], ptr %18, i64 0, i64 %381
  %383 = load ptr, ptr %382, align 8, !tbaa !9
  %384 = getelementptr inbounds [256 x i8], ptr %10, i64 0, i64 0
  %385 = call zeroext i1 @MatNd_toFile(ptr noundef %383, ptr noundef %384)
  br label %386

386:                                              ; preds = %348
  %387 = load i32, ptr %20, align 4, !tbaa !5
  %388 = add nsw i32 %387, 1
  store i32 %388, ptr %20, align 4, !tbaa !5
  br label %324, !llvm.loop !26

389:                                              ; preds = %327
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #5
  store i32 0, ptr %21, align 4, !tbaa !5
  br label %390

390:                                              ; preds = %441, %389
  %391 = load i32, ptr %21, align 4, !tbaa !5
  %392 = icmp slt i32 %391, 16
  br i1 %392, label %394, label %393

393:                                              ; preds = %390
  store i32 33, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  br label %444

394:                                              ; preds = %390
  br label %395

395:                                              ; preds = %394
  %396 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !9
  %397 = icmp ne ptr %396, null
  br i1 %397, label %398, label %405

398:                                              ; preds = %395
  %399 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !9
  %400 = load i32, ptr %21, align 4, !tbaa !5
  %401 = sext i32 %400 to i64
  %402 = getelementptr inbounds [16 x %struct.DataFile], ptr %5, i64 0, i64 %401
  %403 = getelementptr inbounds %struct.DataFile, ptr %402, i32 0, i32 0
  %404 = getelementptr inbounds [256 x i8], ptr %403, i64 0, i64 0
  call void (i32, ptr, ptr, i32, ptr, ...) %399(i32 noundef 3, ptr noundef @.str.3, ptr noundef @__func__.testDTW, i32 noundef 3200, ptr noundef @.str.319, ptr noundef %404)
  br label %405

405:                                              ; preds = %398, %395
  %406 = load i32, ptr @RcsLogLevel, align 4, !tbaa !5
  %407 = icmp sle i32 3, %406
  br i1 %407, label %408, label %420

408:                                              ; preds = %405
  %409 = load ptr, ptr @stderr, align 8, !tbaa !9
  %410 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %409, ptr noundef @.str.5, ptr noundef @.str.3, ptr noundef @__func__.testDTW, i32 noundef 3200) #5
  %411 = load ptr, ptr @stderr, align 8, !tbaa !9
  %412 = load i32, ptr %21, align 4, !tbaa !5
  %413 = sext i32 %412 to i64
  %414 = getelementptr inbounds [16 x %struct.DataFile], ptr %5, i64 0, i64 %413
  %415 = getelementptr inbounds %struct.DataFile, ptr %414, i32 0, i32 0
  %416 = getelementptr inbounds [256 x i8], ptr %415, i64 0, i64 0
  %417 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %411, ptr noundef @.str.319, ptr noundef %416) #5
  %418 = load ptr, ptr @stderr, align 8, !tbaa !9
  %419 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %418, ptr noundef @.str.6) #5
  br label %420

420:                                              ; preds = %408, %405
  br label %421

421:                                              ; preds = %420
  br label %422

422:                                              ; preds = %421
  %423 = load i32, ptr %21, align 4, !tbaa !5
  %424 = sext i32 %423 to i64
  %425 = getelementptr inbounds [16 x %struct.DataFile], ptr %5, i64 0, i64 %424
  %426 = getelementptr inbounds %struct.DataFile, ptr %425, i32 0, i32 1
  %427 = load ptr, ptr %426, align 16, !tbaa !14
  %428 = call i32 @fclose(ptr noundef %427)
  %429 = load i32, ptr %21, align 4, !tbaa !5
  %430 = sext i32 %429 to i64
  %431 = getelementptr inbounds [16 x ptr], ptr %6, i64 0, i64 %430
  %432 = load ptr, ptr %431, align 8, !tbaa !9
  call void @MatNd_destroy(ptr noundef %432)
  %433 = load i32, ptr %21, align 4, !tbaa !5
  %434 = icmp ne i32 %433, 15
  br i1 %434, label %435, label %440

435:                                              ; preds = %422
  %436 = load i32, ptr %21, align 4, !tbaa !5
  %437 = sext i32 %436 to i64
  %438 = getelementptr inbounds [15 x ptr], ptr %18, i64 0, i64 %437
  %439 = load ptr, ptr %438, align 8, !tbaa !9
  call void @MatNd_destroy(ptr noundef %439)
  br label %440

440:                                              ; preds = %435, %422
  br label %441

441:                                              ; preds = %440
  %442 = load i32, ptr %21, align 4, !tbaa !5
  %443 = add nsw i32 %442, 1
  store i32 %443, ptr %21, align 4, !tbaa !5
  br label %390, !llvm.loop !27

444:                                              ; preds = %393
  %445 = load ptr, ptr %19, align 8, !tbaa !9
  call void @MatNd_destroy(ptr noundef %445)
  call void @llvm.lifetime.start.p0(i64 256, ptr %22) #5
  %446 = getelementptr inbounds [256 x i8], ptr %22, i64 0, i64 0
  %447 = getelementptr inbounds [256 x i8], ptr %11, i64 0, i64 0
  %448 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %446, ptr noundef @.str.320, ptr noundef %447) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #5
  %449 = getelementptr inbounds [256 x i8], ptr %22, i64 0, i64 0
  %450 = call i32 @system(ptr noundef %449)
  store i32 %450, ptr %23, align 4, !tbaa !5
  %451 = load i32, ptr %23, align 4, !tbaa !5
  %452 = icmp eq i32 %451, -1
  br i1 %452, label %453, label %474

453:                                              ; preds = %444
  br label %454

454:                                              ; preds = %453
  %455 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !9
  %456 = icmp ne ptr %455, null
  br i1 %456, label %457, label %460

457:                                              ; preds = %454
  %458 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !9
  %459 = getelementptr inbounds [256 x i8], ptr %22, i64 0, i64 0
  call void (i32, ptr, ptr, i32, ptr, ...) %458(i32 noundef 1, ptr noundef @.str.3, ptr noundef @__func__.testDTW, i32 noundef 3221, ptr noundef @.str.321, ptr noundef %459)
  br label %460

460:                                              ; preds = %457, %454
  %461 = load i32, ptr @RcsLogLevel, align 4, !tbaa !5
  %462 = icmp sle i32 1, %461
  br i1 %462, label %463, label %471

463:                                              ; preds = %460
  %464 = load ptr, ptr @stderr, align 8, !tbaa !9
  %465 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %464, ptr noundef @.str.5, ptr noundef @.str.3, ptr noundef @__func__.testDTW, i32 noundef 3221) #5
  %466 = load ptr, ptr @stderr, align 8, !tbaa !9
  %467 = getelementptr inbounds [256 x i8], ptr %22, i64 0, i64 0
  %468 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %466, ptr noundef @.str.321, ptr noundef %467) #5
  %469 = load ptr, ptr @stderr, align 8, !tbaa !9
  %470 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %469, ptr noundef @.str.6) #5
  br label %471

471:                                              ; preds = %463, %460
  br label %472

472:                                              ; preds = %471
  br label %473

473:                                              ; preds = %472
  br label %495

474:                                              ; preds = %444
  br label %475

475:                                              ; preds = %474
  %476 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !9
  %477 = icmp ne ptr %476, null
  br i1 %477, label %478, label %481

478:                                              ; preds = %475
  %479 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !9
  %480 = getelementptr inbounds [256 x i8], ptr %22, i64 0, i64 0
  call void (i32, ptr, ptr, i32, ptr, ...) %479(i32 noundef 3, ptr noundef @.str.3, ptr noundef @__func__.testDTW, i32 noundef 3225, ptr noundef %480)
  br label %481

481:                                              ; preds = %478, %475
  %482 = load i32, ptr @RcsLogLevel, align 4, !tbaa !5
  %483 = icmp sle i32 3, %482
  br i1 %483, label %484, label %492

484:                                              ; preds = %481
  %485 = load ptr, ptr @stderr, align 8, !tbaa !9
  %486 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %485, ptr noundef @.str.5, ptr noundef @.str.3, ptr noundef @__func__.testDTW, i32 noundef 3225) #5
  %487 = load ptr, ptr @stderr, align 8, !tbaa !9
  %488 = getelementptr inbounds [256 x i8], ptr %22, i64 0, i64 0
  %489 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %487, ptr noundef %488) #5
  %490 = load ptr, ptr @stderr, align 8, !tbaa !9
  %491 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %490, ptr noundef @.str.6) #5
  br label %492

492:                                              ; preds = %484, %481
  br label %493

493:                                              ; preds = %492
  br label %494

494:                                              ; preds = %493
  br label %495

495:                                              ; preds = %494, %473
  store i32 1, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 256, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 120, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 256, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 256, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 96, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 128, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4352, ptr %5) #5
  ret i1 true
}

declare i64 @File_getLineCount(ptr noundef) #2

declare i32 @__isoc99_fscanf(ptr noundef, ptr noundef, ...) #2

declare double @MatNd_DTW(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }
attributes #6 = { noreturn nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !13, i64 264}
!12 = !{!"_ZTSZ7testDTWE8DataFile", !7, i64 0, !10, i64 256, !13, i64 264}
!13 = !{!"long", !7, i64 0}
!14 = !{!12, !10, i64 256}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!18, !18, i64 0}
!18 = !{!"double", !7, i64 0}
!19 = distinct !{!19, !16}
!20 = distinct !{!20, !16}
!21 = distinct !{!21, !16}
!22 = !{!23, !6, i64 8}
!23 = !{!"_ZTS6_MatNd", !10, i64 0, !6, i64 8, !6, i64 12, !6, i64 16, !24, i64 20}
!24 = !{!"bool", !7, i64 0}
!25 = !{!23, !6, i64 12}
!26 = distinct !{!26, !16}
!27 = distinct !{!27, !16}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.DataFile = type { [256 x i8], ptr, i64 }
%struct.HTr = type { [3 x double], [3 x [3 x double]] }

@RCS_GLOBAL_RLOG_CB = external local_unnamed_addr global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [74 x i8], align 1
@RcsLogLevel = external local_unnamed_addr global i32, align 4
@stderr = external local_unnamed_addr global ptr, align 8
@.str.5 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.57 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.308 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.309 = external hidden unnamed_addr constant [12 x i8], align 1
@__func__.testDTW = external hidden unnamed_addr constant [8 x i8], align 1
@.str.310 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.311 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.312 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.313 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.314 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.315 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.316 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.317 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.318 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.319 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.320 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.321 = external hidden unnamed_addr constant [18 x i8], align 1

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #1

declare void @Mat3d_toEulerAngles(ptr noundef, ptr noundef) local_unnamed_addr #2

declare ptr @MatNd_create(i32 noundef, i32 noundef) local_unnamed_addr #2

declare void @MatNd_destroy(ptr noundef) local_unnamed_addr #2

declare void @MatNd_set(ptr noundef, i32 noundef, i32 noundef, double noundef) local_unnamed_addr #2

declare zeroext i1 @MatNd_toFile(ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: readwrite)
declare ptr @strcpy(ptr noalias noundef returned writeonly, ptr noalias nocapture noundef readonly) local_unnamed_addr #3

; Function Attrs: nofree
declare noundef i32 @system(ptr nocapture noundef readonly) local_unnamed_addr #4

declare void @print_trace() local_unnamed_addr #2

; Function Attrs: noreturn nounwind
declare void @abort() local_unnamed_addr #5

; Function Attrs: nofree nounwind
declare noalias noundef ptr @fopen(ptr nocapture noundef readonly, ptr nocapture noundef readonly) local_unnamed_addr #1

; Function Attrs: nofree nounwind
declare noundef i32 @fclose(ptr nocapture noundef) local_unnamed_addr #1

declare void @MatNd_setElementsTo(ptr noundef, double noundef) local_unnamed_addr #2

; Function Attrs: nofree nounwind
declare noundef i32 @sprintf(ptr noalias nocapture noundef writeonly, ptr nocapture noundef readonly, ...) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @testDTW(i32 noundef %0, ptr nocapture noundef readnone %1) local_unnamed_addr #6 {
  %3 = alloca [16 x %struct.DataFile], align 16
  %4 = alloca [16 x ptr], align 16
  %5 = alloca %struct.HTr, align 8
  %6 = alloca double, align 8
  %7 = alloca [3 x double], align 16
  %8 = alloca [256 x i8], align 16
  %9 = alloca [256 x i8], align 16
  %10 = alloca [15 x ptr], align 16
  %11 = alloca [256 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 4352, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 96, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #7
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %8) #7
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %9) #7
  %12 = call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %9, ptr noundef nonnull dereferenceable(1) @.str.308) #7
  br label %26

.preheader84:                                     ; preds = %42
  %13 = getelementptr inbounds i8, ptr %5, i64 8
  %14 = getelementptr inbounds i8, ptr %5, i64 16
  %15 = getelementptr inbounds i8, ptr %5, i64 24
  %16 = getelementptr inbounds i8, ptr %5, i64 32
  %17 = getelementptr inbounds i8, ptr %5, i64 40
  %18 = getelementptr inbounds i8, ptr %5, i64 48
  %19 = getelementptr inbounds i8, ptr %5, i64 56
  %20 = getelementptr inbounds i8, ptr %5, i64 64
  %21 = getelementptr inbounds i8, ptr %5, i64 72
  %22 = getelementptr inbounds i8, ptr %5, i64 80
  %23 = getelementptr inbounds i8, ptr %5, i64 88
  %24 = getelementptr inbounds i8, ptr %7, i64 8
  %25 = getelementptr inbounds i8, ptr %7, i64 16
  br label %.preheader83

26:                                               ; preds = %2, %42
  %indvars.iv = phi i64 [ 0, %2 ], [ %indvars.iv.next, %42 ]
  %27 = getelementptr inbounds [16 x %struct.DataFile], ptr %3, i64 0, i64 %indvars.iv
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %28 = trunc nuw nsw i64 %indvars.iv.next to i32
  %29 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %27, ptr noundef nonnull dereferenceable(1) @.str.309, ptr noundef nonnull %9, i32 noundef %28) #7
  %30 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %.not82 = icmp eq ptr %30, null
  br i1 %.not82, label %32, label %31

31:                                               ; preds = %26
  call void (i32, ptr, ptr, i32, ptr, ...) %30(i32 noundef 3, ptr noundef nonnull @.str.3, ptr noundef nonnull @__func__.testDTW, i32 noundef 3126, ptr noundef nonnull @.str.310, ptr noundef nonnull %27)
  br label %32

32:                                               ; preds = %31, %26
  %33 = load i32, ptr @RcsLogLevel, align 4, !tbaa !9
  %34 = icmp sgt i32 %33, 2
  br i1 %34, label %35, label %42

35:                                               ; preds = %32
  %36 = load ptr, ptr @stderr, align 8, !tbaa !5
  %37 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %36, ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.3, ptr noundef nonnull @__func__.testDTW, i32 noundef 3126) #8
  %38 = load ptr, ptr @stderr, align 8, !tbaa !5
  %39 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %38, ptr noundef nonnull @.str.310, ptr noundef nonnull %27) #8
  %40 = load ptr, ptr @stderr, align 8, !tbaa !5
  %41 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %40, ptr noundef nonnull @.str.6) #8
  br label %42

42:                                               ; preds = %35, %32
  %43 = call i64 @File_getLineCount(ptr noundef nonnull %27)
  %44 = getelementptr inbounds i8, ptr %27, i64 264
  store i64 %43, ptr %44, align 8, !tbaa !11
  %45 = call noalias ptr @fopen(ptr noundef nonnull %27, ptr noundef nonnull @.str.311)
  %46 = getelementptr inbounds i8, ptr %27, i64 256
  store ptr %45, ptr %46, align 16, !tbaa !14
  %47 = load i64, ptr %44, align 8, !tbaa !11
  %48 = trunc i64 %47 to i32
  %49 = call ptr @MatNd_create(i32 noundef %48, i32 noundef 7)
  %50 = getelementptr inbounds [16 x ptr], ptr %4, i64 0, i64 %indvars.iv
  store ptr %49, ptr %50, align 8, !tbaa !5
  %exitcond.not = icmp eq i64 %indvars.iv.next, 16
  br i1 %exitcond.not, label %.preheader84, label %26, !llvm.loop !15

.preheader83:                                     ; preds = %.preheader84, %._crit_edge
  %indvars.iv102 = phi i64 [ 0, %.preheader84 ], [ %indvars.iv.next103, %._crit_edge ]
  %51 = getelementptr inbounds [16 x %struct.DataFile], ptr %3, i64 0, i64 %indvars.iv102
  %52 = getelementptr inbounds i8, ptr %51, i64 264
  %53 = load i64, ptr %52, align 8, !tbaa !11
  %54 = icmp sgt i64 %53, 0
  br i1 %54, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.preheader83
  %55 = getelementptr inbounds i8, ptr %51, i64 256
  %56 = getelementptr inbounds [16 x ptr], ptr %4, i64 0, i64 %indvars.iv102
  br label %67

57:                                               ; preds = %._crit_edge
  call void @llvm.lifetime.start.p0(i64 120, ptr nonnull %10) #7
  %58 = call ptr @MatNd_create(i32 noundef 7, i32 noundef 1)
  call void @MatNd_setElementsTo(ptr noundef %58, double noundef 1.000000e+00)
  call void @MatNd_set(ptr noundef %58, i32 noundef 0, i32 noundef 0, double noundef 0.000000e+00)
  %59 = load ptr, ptr %4, align 16
  %60 = getelementptr inbounds i8, ptr %59, i64 8
  %61 = getelementptr inbounds i8, ptr %59, i64 12
  br label %165

._crit_edge:                                      ; preds = %159, %.preheader83
  %62 = trunc nuw nsw i64 %indvars.iv102 to i32
  %63 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %8, ptr noundef nonnull dereferenceable(1) @.str.316, i32 noundef %62) #7
  %64 = getelementptr inbounds [16 x ptr], ptr %4, i64 0, i64 %indvars.iv102
  %65 = load ptr, ptr %64, align 8, !tbaa !5
  %66 = call zeroext i1 @MatNd_toFile(ptr noundef %65, ptr noundef nonnull %8)
  %indvars.iv.next103 = add nuw nsw i64 %indvars.iv102, 1
  %exitcond105.not = icmp eq i64 %indvars.iv.next103, 16
  br i1 %exitcond105.not, label %57, label %.preheader83, !llvm.loop !17

67:                                               ; preds = %.lr.ph, %159
  %indvars.iv99 = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next100, %159 ]
  %68 = load ptr, ptr %55, align 16, !tbaa !14
  %69 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef %68, ptr noundef nonnull @.str.312, ptr noundef nonnull %6)
  %70 = icmp eq i32 %69, 1
  br i1 %70, label %74, label %71

71:                                               ; preds = %67
  %72 = load ptr, ptr @stderr, align 8, !tbaa !5
  %73 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %72, ptr noundef nonnull @.str.57, ptr noundef nonnull @.str.3, ptr noundef nonnull @__func__.testDTW, i32 noundef 3141, ptr noundef nonnull @.str.313) #8
  call void @print_trace()
  call void @abort() #9
  unreachable

74:                                               ; preds = %67
  %75 = load ptr, ptr %56, align 8, !tbaa !5
  %76 = load double, ptr %6, align 8, !tbaa !18
  %77 = trunc nuw nsw i64 %indvars.iv99 to i32
  call void @MatNd_set(ptr noundef %75, i32 noundef %77, i32 noundef 0, double noundef %76)
  %78 = load ptr, ptr %55, align 16, !tbaa !14
  %79 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef %78, ptr noundef nonnull @.str.312, ptr noundef nonnull %13)
  %80 = icmp eq i32 %79, 1
  br i1 %80, label %84, label %81

81:                                               ; preds = %74
  %82 = load ptr, ptr @stderr, align 8, !tbaa !5
  %83 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %82, ptr noundef nonnull @.str.57, ptr noundef nonnull @.str.3, ptr noundef nonnull @__func__.testDTW, i32 noundef 3146, ptr noundef nonnull @.str.313) #8
  call void @print_trace()
  call void @abort() #9
  unreachable

84:                                               ; preds = %74
  %85 = load double, ptr %13, align 8, !tbaa !18
  call void @MatNd_set(ptr noundef %75, i32 noundef %77, i32 noundef 1, double noundef %85)
  %86 = load ptr, ptr %55, align 16, !tbaa !14
  %87 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef %86, ptr noundef nonnull @.str.312, ptr noundef nonnull %14)
  %88 = icmp eq i32 %87, 1
  br i1 %88, label %92, label %89

89:                                               ; preds = %84
  %90 = load ptr, ptr @stderr, align 8, !tbaa !5
  %91 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %90, ptr noundef nonnull @.str.57, ptr noundef nonnull @.str.3, ptr noundef nonnull @__func__.testDTW, i32 noundef 3151, ptr noundef nonnull @.str.313) #8
  call void @print_trace()
  call void @abort() #9
  unreachable

92:                                               ; preds = %84
  %93 = load double, ptr %14, align 8, !tbaa !18
  call void @MatNd_set(ptr noundef %75, i32 noundef %77, i32 noundef 2, double noundef %93)
  %94 = load ptr, ptr %55, align 16, !tbaa !14
  %95 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef %94, ptr noundef nonnull @.str.312, ptr noundef nonnull %5)
  %96 = icmp eq i32 %95, 1
  br i1 %96, label %100, label %97

97:                                               ; preds = %92
  %98 = load ptr, ptr @stderr, align 8, !tbaa !5
  %99 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %98, ptr noundef nonnull @.str.57, ptr noundef nonnull @.str.3, ptr noundef nonnull @__func__.testDTW, i32 noundef 3156, ptr noundef nonnull @.str.313) #8
  call void @print_trace()
  call void @abort() #9
  unreachable

100:                                              ; preds = %92
  %101 = load double, ptr %5, align 8, !tbaa !18
  call void @MatNd_set(ptr noundef %75, i32 noundef %77, i32 noundef 3, double noundef %101)
  %102 = load ptr, ptr %55, align 16, !tbaa !14
  %103 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef %102, ptr noundef nonnull @.str.314, ptr noundef nonnull %15, ptr noundef nonnull %16, ptr noundef nonnull %17, ptr noundef nonnull %18, ptr noundef nonnull %19, ptr noundef nonnull %20, ptr noundef nonnull %21, ptr noundef nonnull %22, ptr noundef nonnull %23)
  %104 = icmp eq i32 %103, 9
  br i1 %104, label %108, label %105

105:                                              ; preds = %100
  %106 = load ptr, ptr @stderr, align 8, !tbaa !5
  %107 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %106, ptr noundef nonnull @.str.57, ptr noundef nonnull @.str.3, ptr noundef nonnull @__func__.testDTW, i32 noundef 3164, ptr noundef nonnull @.str.315) #8
  call void @print_trace()
  call void @abort() #9
  unreachable

108:                                              ; preds = %100
  call void @Mat3d_toEulerAngles(ptr noundef nonnull %7, ptr noundef nonnull %15)
  %109 = load double, ptr %7, align 16, !tbaa !18
  call void @MatNd_set(ptr noundef %75, i32 noundef %77, i32 noundef 4, double noundef %109)
  %110 = load double, ptr %24, align 8, !tbaa !18
  call void @MatNd_set(ptr noundef %75, i32 noundef %77, i32 noundef 5, double noundef %110)
  %111 = load double, ptr %25, align 16, !tbaa !18
  call void @MatNd_set(ptr noundef %75, i32 noundef %77, i32 noundef 6, double noundef %111)
  %112 = load ptr, ptr %55, align 16, !tbaa !14
  %113 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef %112, ptr noundef nonnull @.str.312, ptr noundef nonnull %6)
  %114 = icmp eq i32 %113, 1
  br i1 %114, label %115, label %162

115:                                              ; preds = %108
  %116 = load ptr, ptr %55, align 16, !tbaa !14
  %117 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef %116, ptr noundef nonnull @.str.312, ptr noundef nonnull %6)
  %118 = icmp eq i32 %117, 1
  br i1 %118, label %119, label %162

119:                                              ; preds = %115
  %120 = load ptr, ptr %55, align 16, !tbaa !14
  %121 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef %120, ptr noundef nonnull @.str.312, ptr noundef nonnull %6)
  %122 = icmp eq i32 %121, 1
  br i1 %122, label %123, label %162

123:                                              ; preds = %119
  %124 = load ptr, ptr %55, align 16, !tbaa !14
  %125 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef %124, ptr noundef nonnull @.str.312, ptr noundef nonnull %6)
  %126 = icmp eq i32 %125, 1
  br i1 %126, label %127, label %162

127:                                              ; preds = %123
  %128 = load ptr, ptr %55, align 16, !tbaa !14
  %129 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef %128, ptr noundef nonnull @.str.312, ptr noundef nonnull %6)
  %130 = icmp eq i32 %129, 1
  br i1 %130, label %131, label %162

131:                                              ; preds = %127
  %132 = load ptr, ptr %55, align 16, !tbaa !14
  %133 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef %132, ptr noundef nonnull @.str.312, ptr noundef nonnull %6)
  %134 = icmp eq i32 %133, 1
  br i1 %134, label %135, label %162

135:                                              ; preds = %131
  %136 = load ptr, ptr %55, align 16, !tbaa !14
  %137 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef %136, ptr noundef nonnull @.str.312, ptr noundef nonnull %6)
  %138 = icmp eq i32 %137, 1
  br i1 %138, label %139, label %162

139:                                              ; preds = %135
  %140 = load ptr, ptr %55, align 16, !tbaa !14
  %141 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef %140, ptr noundef nonnull @.str.312, ptr noundef nonnull %6)
  %142 = icmp eq i32 %141, 1
  br i1 %142, label %143, label %162

143:                                              ; preds = %139
  %144 = load ptr, ptr %55, align 16, !tbaa !14
  %145 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef %144, ptr noundef nonnull @.str.312, ptr noundef nonnull %6)
  %146 = icmp eq i32 %145, 1
  br i1 %146, label %147, label %162

147:                                              ; preds = %143
  %148 = load ptr, ptr %55, align 16, !tbaa !14
  %149 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef %148, ptr noundef nonnull @.str.312, ptr noundef nonnull %6)
  %150 = icmp eq i32 %149, 1
  br i1 %150, label %151, label %162

151:                                              ; preds = %147
  %152 = load ptr, ptr %55, align 16, !tbaa !14
  %153 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef %152, ptr noundef nonnull @.str.312, ptr noundef nonnull %6)
  %154 = icmp eq i32 %153, 1
  br i1 %154, label %155, label %162

155:                                              ; preds = %151
  %156 = load ptr, ptr %55, align 16, !tbaa !14
  %157 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef %156, ptr noundef nonnull @.str.312, ptr noundef nonnull %6)
  %158 = icmp eq i32 %157, 1
  br i1 %158, label %159, label %162

159:                                              ; preds = %155
  %indvars.iv.next100 = add nuw nsw i64 %indvars.iv99, 1
  %160 = load i64, ptr %52, align 8, !tbaa !11
  %161 = icmp sgt i64 %160, %indvars.iv.next100
  br i1 %161, label %67, label %._crit_edge, !llvm.loop !20

162:                                              ; preds = %155, %151, %147, %143, %139, %135, %131, %127, %123, %119, %115, %108
  %163 = load ptr, ptr @stderr, align 8, !tbaa !5
  %164 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %163, ptr noundef nonnull @.str.57, ptr noundef nonnull @.str.3, ptr noundef nonnull @__func__.testDTW, i32 noundef 3174, ptr noundef nonnull @.str.313) #8
  call void @print_trace()
  call void @abort() #9
  unreachable

165:                                              ; preds = %57, %180
  %indvars.iv106 = phi i64 [ 1, %57 ], [ %indvars.iv.next107, %180 ]
  %166 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %.not81 = icmp eq ptr %166, null
  br i1 %.not81, label %169, label %167

167:                                              ; preds = %165
  %168 = trunc nuw nsw i64 %indvars.iv106 to i32
  call void (i32, ptr, ptr, i32, ptr, ...) %166(i32 noundef 3, ptr noundef nonnull @.str.3, ptr noundef nonnull @__func__.testDTW, i32 noundef 3190, ptr noundef nonnull @.str.317, i32 noundef %168)
  br label %169

169:                                              ; preds = %167, %165
  %170 = load i32, ptr @RcsLogLevel, align 4, !tbaa !9
  %171 = icmp sgt i32 %170, 2
  br i1 %171, label %172, label %180

172:                                              ; preds = %169
  %173 = load ptr, ptr @stderr, align 8, !tbaa !5
  %174 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %173, ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.3, ptr noundef nonnull @__func__.testDTW, i32 noundef 3190) #8
  %175 = load ptr, ptr @stderr, align 8, !tbaa !5
  %176 = trunc nuw nsw i64 %indvars.iv106 to i32
  %177 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %175, ptr noundef nonnull @.str.317, i32 noundef %176) #8
  %178 = load ptr, ptr @stderr, align 8, !tbaa !5
  %179 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %178, ptr noundef nonnull @.str.6) #8
  br label %180

180:                                              ; preds = %172, %169
  %181 = load i32, ptr %60, align 8, !tbaa !21
  %182 = load i32, ptr %61, align 4, !tbaa !24
  %183 = call ptr @MatNd_create(i32 noundef %181, i32 noundef %182)
  %184 = add nsw i64 %indvars.iv106, -1
  %185 = getelementptr inbounds [15 x ptr], ptr %10, i64 0, i64 %184
  store ptr %183, ptr %185, align 8, !tbaa !5
  %186 = getelementptr inbounds [16 x ptr], ptr %4, i64 0, i64 %indvars.iv106
  %187 = load ptr, ptr %186, align 8, !tbaa !5
  %188 = call double @MatNd_DTW(ptr noundef %183, ptr noundef %59, ptr noundef %187, ptr noundef %58)
  %189 = trunc nuw nsw i64 %184 to i32
  %190 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %8, ptr noundef nonnull dereferenceable(1) @.str.318, i32 noundef %189) #7
  %191 = call zeroext i1 @MatNd_toFile(ptr noundef %183, ptr noundef nonnull %8)
  %indvars.iv.next107 = add nuw nsw i64 %indvars.iv106, 1
  %exitcond109.not = icmp eq i64 %indvars.iv.next107, 16
  br i1 %exitcond109.not, label %.preheader, label %165, !llvm.loop !25

192:                                              ; preds = %211
  call void @MatNd_destroy(ptr noundef %58)
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %11) #7
  %193 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %11, ptr noundef nonnull dereferenceable(1) @.str.320, ptr noundef nonnull %9) #7
  %194 = call i32 @system(ptr noundef nonnull %11)
  %195 = icmp eq i32 %194, -1
  %196 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %.not78 = icmp eq ptr %196, null
  br i1 %195, label %220, label %230

.preheader:                                       ; preds = %180, %217
  %indvars.iv110 = phi i64 [ %indvars.iv.next111, %217 ], [ 0, %180 ]
  %197 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %.not79 = icmp eq ptr %197, null
  br i1 %.not79, label %200, label %198

198:                                              ; preds = %.preheader
  %199 = getelementptr inbounds [16 x %struct.DataFile], ptr %3, i64 0, i64 %indvars.iv110
  call void (i32, ptr, ptr, i32, ptr, ...) %197(i32 noundef 3, ptr noundef nonnull @.str.3, ptr noundef nonnull @__func__.testDTW, i32 noundef 3200, ptr noundef nonnull @.str.319, ptr noundef nonnull %199)
  br label %200

200:                                              ; preds = %198, %.preheader
  %201 = load i32, ptr @RcsLogLevel, align 4, !tbaa !9
  %202 = icmp sgt i32 %201, 2
  br i1 %202, label %203, label %211

203:                                              ; preds = %200
  %204 = load ptr, ptr @stderr, align 8, !tbaa !5
  %205 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %204, ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.3, ptr noundef nonnull @__func__.testDTW, i32 noundef 3200) #8
  %206 = load ptr, ptr @stderr, align 8, !tbaa !5
  %207 = getelementptr inbounds [16 x %struct.DataFile], ptr %3, i64 0, i64 %indvars.iv110
  %208 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %206, ptr noundef nonnull @.str.319, ptr noundef nonnull %207) #8
  %209 = load ptr, ptr @stderr, align 8, !tbaa !5
  %210 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %209, ptr noundef nonnull @.str.6) #8
  br label %211

211:                                              ; preds = %203, %200
  %212 = getelementptr inbounds [16 x %struct.DataFile], ptr %3, i64 0, i64 %indvars.iv110, i32 1
  %213 = load ptr, ptr %212, align 16, !tbaa !14
  %214 = call i32 @fclose(ptr noundef %213)
  %215 = getelementptr inbounds [16 x ptr], ptr %4, i64 0, i64 %indvars.iv110
  %216 = load ptr, ptr %215, align 8, !tbaa !5
  call void @MatNd_destroy(ptr noundef %216)
  %.not80 = icmp eq i64 %indvars.iv110, 15
  br i1 %.not80, label %192, label %217

217:                                              ; preds = %211
  %218 = getelementptr inbounds [15 x ptr], ptr %10, i64 0, i64 %indvars.iv110
  %219 = load ptr, ptr %218, align 8, !tbaa !5
  call void @MatNd_destroy(ptr noundef %219)
  %indvars.iv.next111 = add nuw nsw i64 %indvars.iv110, 1
  br label %.preheader

220:                                              ; preds = %192
  br i1 %.not78, label %222, label %221

221:                                              ; preds = %220
  call void (i32, ptr, ptr, i32, ptr, ...) %196(i32 noundef 1, ptr noundef nonnull @.str.3, ptr noundef nonnull @__func__.testDTW, i32 noundef 3221, ptr noundef nonnull @.str.321, ptr noundef nonnull %11)
  br label %222

222:                                              ; preds = %221, %220
  %223 = load i32, ptr @RcsLogLevel, align 4, !tbaa !9
  %224 = icmp sgt i32 %223, 0
  br i1 %224, label %225, label %242

225:                                              ; preds = %222
  %226 = load ptr, ptr @stderr, align 8, !tbaa !5
  %227 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %226, ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.3, ptr noundef nonnull @__func__.testDTW, i32 noundef 3221) #8
  %228 = load ptr, ptr @stderr, align 8, !tbaa !5
  %229 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %228, ptr noundef nonnull @.str.321, ptr noundef nonnull %11) #8
  br label %.sink.split

230:                                              ; preds = %192
  br i1 %.not78, label %232, label %231

231:                                              ; preds = %230
  call void (i32, ptr, ptr, i32, ptr, ...) %196(i32 noundef 3, ptr noundef nonnull @.str.3, ptr noundef nonnull @__func__.testDTW, i32 noundef 3225, ptr noundef nonnull %11)
  br label %232

232:                                              ; preds = %231, %230
  %233 = load i32, ptr @RcsLogLevel, align 4, !tbaa !9
  %234 = icmp sgt i32 %233, 2
  br i1 %234, label %235, label %242

235:                                              ; preds = %232
  %236 = load ptr, ptr @stderr, align 8, !tbaa !5
  %237 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %236, ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.3, ptr noundef nonnull @__func__.testDTW, i32 noundef 3225) #8
  %238 = load ptr, ptr @stderr, align 8, !tbaa !5
  %239 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %238, ptr noundef nonnull %11) #8
  br label %.sink.split

.sink.split:                                      ; preds = %225, %235
  %240 = load ptr, ptr @stderr, align 8, !tbaa !5
  %241 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %240, ptr noundef nonnull @.str.6) #8
  br label %242

242:                                              ; preds = %.sink.split, %232, %222
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 4352, ptr nonnull %3) #7
  ret i1 true
}

declare i64 @File_getLineCount(ptr noundef) local_unnamed_addr #2

declare i32 @__isoc99_fscanf(ptr noundef, ptr noundef, ...) local_unnamed_addr #2

declare double @MatNd_DTW(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nofree nounwind willreturn memory(argmem: readwrite) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nofree "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }
attributes #8 = { cold nounwind }
attributes #9 = { noreturn nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !13, i64 264}
!12 = !{!"_ZTSZ7testDTWE8DataFile", !7, i64 0, !6, i64 256, !13, i64 264}
!13 = !{!"long", !7, i64 0}
!14 = !{!12, !6, i64 256}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}
!18 = !{!19, !19, i64 0}
!19 = !{!"double", !7, i64 0}
!20 = distinct !{!20, !16}
!21 = !{!22, !10, i64 8}
!22 = !{!"_ZTS6_MatNd", !6, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !23, i64 20}
!23 = !{!"bool", !7, i64 0}
!24 = !{!22, !10, i64 12}
!25 = distinct !{!25, !16}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass