; LLVM IR from attractivechaos/klib :: khmm (hmm_forward)

; 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.hmm_par_t = type { i32, i32, ptr, ptr, ptr, ptr }
%struct.hmm_data_t = type { i32, i32, ptr, ptr, ptr, ptr, ptr, ptr }

@.str.1 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [9 x i8], align 1
@__PRETTY_FUNCTION__.hmm_forward = external hidden unnamed_addr constant [50 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: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #1

; Function Attrs: nounwind allocsize(0,1)
declare noalias ptr @calloc(i64 noundef, i64 noundef) #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @calloc2(i32 noundef, i32 noundef, i32 noundef) #3

; 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 void @free(ptr noundef) #4

; Function Attrs: nounwind uwtable
define dso_local void @hmm_forward(ptr noundef %0, ptr noundef %1) #5 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca double, align 8
  %6 = alloca double, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  %18 = load ptr, ptr %3, align 8, !tbaa !5
  %19 = icmp ne ptr %18, null
  br i1 %19, label %20, label %24

20:                                               ; preds = %2
  %21 = load ptr, ptr %4, align 8, !tbaa !5
  %22 = icmp ne ptr %21, null
  br i1 %22, label %23, label %24

23:                                               ; preds = %20
  br label %25

24:                                               ; preds = %20, %2
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str.1, i32 noundef 150, ptr noundef @__PRETTY_FUNCTION__.hmm_forward) #8
  unreachable

25:                                               ; preds = %23
  %26 = load ptr, ptr %3, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.hmm_par_t, ptr %26, i32 0, i32 1
  %28 = load i32, ptr %27, align 4, !tbaa !9
  store i32 %28, ptr %11, align 4, !tbaa !12
  %29 = load ptr, ptr %3, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.hmm_par_t, ptr %29, i32 0, i32 0
  %31 = load i32, ptr %30, align 8, !tbaa !13
  store i32 %31, ptr %12, align 4, !tbaa !12
  %32 = load ptr, ptr %4, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.hmm_data_t, ptr %32, i32 0, i32 0
  %34 = load i32, ptr %33, align 8, !tbaa !14
  store i32 %34, ptr %13, align 4, !tbaa !12
  %35 = load ptr, ptr %4, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.hmm_data_t, ptr %35, i32 0, i32 5
  %37 = load ptr, ptr %36, align 8, !tbaa !16
  %38 = icmp ne ptr %37, null
  br i1 %38, label %39, label %43

39:                                               ; preds = %25
  %40 = load ptr, ptr %4, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.hmm_data_t, ptr %40, i32 0, i32 5
  %42 = load ptr, ptr %41, align 8, !tbaa !16
  call void @free(ptr noundef %42) #7
  br label %43

43:                                               ; preds = %39, %25
  %44 = load ptr, ptr %4, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.hmm_data_t, ptr %44, i32 0, i32 3
  %46 = load ptr, ptr %45, align 8, !tbaa !17
  %47 = icmp ne ptr %46, null
  br i1 %47, label %48, label %70

48:                                               ; preds = %43
  store i32 0, ptr %9, align 4, !tbaa !12
  br label %49

49:                                               ; preds = %63, %48
  %50 = load i32, ptr %9, align 4, !tbaa !12
  %51 = load ptr, ptr %4, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.hmm_data_t, ptr %51, i32 0, i32 0
  %53 = load i32, ptr %52, align 8, !tbaa !14
  %54 = icmp sle i32 %50, %53
  br i1 %54, label %55, label %66

55:                                               ; preds = %49
  %56 = load ptr, ptr %4, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.hmm_data_t, ptr %56, i32 0, i32 3
  %58 = load ptr, ptr %57, align 8, !tbaa !17
  %59 = load i32, ptr %9, align 4, !tbaa !12
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds ptr, ptr %58, i64 %60
  %62 = load ptr, ptr %61, align 8, !tbaa !5
  call void @free(ptr noundef %62) #7
  br label %63

63:                                               ; preds = %55
  %64 = load i32, ptr %9, align 4, !tbaa !12
  %65 = add nsw i32 %64, 1
  store i32 %65, ptr %9, align 4, !tbaa !12
  br label %49, !llvm.loop !18

66:                                               ; preds = %49
  %67 = load ptr, ptr %4, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.hmm_data_t, ptr %67, i32 0, i32 3
  %69 = load ptr, ptr %68, align 8, !tbaa !17
  call void @free(ptr noundef %69) #7
  br label %70

70:                                               ; preds = %66, %43
  %71 = load ptr, ptr %4, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.hmm_data_t, ptr %71, i32 0, i32 0
  %73 = load i32, ptr %72, align 8, !tbaa !14
  %74 = add nsw i32 %73, 1
  %75 = load ptr, ptr %3, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.hmm_par_t, ptr %75, i32 0, i32 1
  %77 = load i32, ptr %76, align 4, !tbaa !9
  %78 = call ptr @calloc2(i32 noundef %74, i32 noundef %77, i32 noundef 8)
  %79 = load ptr, ptr %4, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.hmm_data_t, ptr %79, i32 0, i32 3
  store ptr %78, ptr %80, align 8, !tbaa !17
  %81 = load ptr, ptr %4, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.hmm_data_t, ptr %81, i32 0, i32 0
  %83 = load i32, ptr %82, align 8, !tbaa !14
  %84 = add nsw i32 %83, 1
  %85 = sext i32 %84 to i64
  %86 = call noalias ptr @calloc(i64 noundef %85, i64 noundef 8) #9
  %87 = load ptr, ptr %4, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.hmm_data_t, ptr %87, i32 0, i32 5
  store ptr %86, ptr %88, align 8, !tbaa !16
  %89 = load ptr, ptr %4, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.hmm_data_t, ptr %89, i32 0, i32 1
  %91 = load i32, ptr %90, align 4, !tbaa !20
  %92 = and i32 %91, -3
  store i32 %92, ptr %90, align 4, !tbaa !20
  %93 = load i32, ptr %11, align 4, !tbaa !12
  %94 = load i32, ptr %11, align 4, !tbaa !12
  %95 = call ptr @calloc2(i32 noundef %93, i32 noundef %94, i32 noundef 8)
  store ptr %95, ptr %7, align 8, !tbaa !5
  store i32 0, ptr %9, align 4, !tbaa !12
  br label %96

96:                                               ; preds = %129, %70
  %97 = load i32, ptr %9, align 4, !tbaa !12
  %98 = load i32, ptr %11, align 4, !tbaa !12
  %99 = icmp ne i32 %97, %98
  br i1 %99, label %100, label %132

100:                                              ; preds = %96
  store i32 0, ptr %10, align 4, !tbaa !12
  br label %101

101:                                              ; preds = %125, %100
  %102 = load i32, ptr %10, align 4, !tbaa !12
  %103 = load i32, ptr %11, align 4, !tbaa !12
  %104 = icmp ne i32 %102, %103
  br i1 %104, label %105, label %128

105:                                              ; preds = %101
  %106 = load ptr, ptr %3, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.hmm_par_t, ptr %106, i32 0, i32 2
  %108 = load ptr, ptr %107, align 8, !tbaa !21
  %109 = load i32, ptr %10, align 4, !tbaa !12
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds ptr, ptr %108, i64 %110
  %112 = load ptr, ptr %111, align 8, !tbaa !5
  %113 = load i32, ptr %9, align 4, !tbaa !12
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds double, ptr %112, i64 %114
  %116 = load double, ptr %115, align 8, !tbaa !22
  %117 = load ptr, ptr %7, align 8, !tbaa !5
  %118 = load i32, ptr %9, align 4, !tbaa !12
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds ptr, ptr %117, i64 %119
  %121 = load ptr, ptr %120, align 8, !tbaa !5
  %122 = load i32, ptr %10, align 4, !tbaa !12
  %123 = sext i32 %122 to i64
  %124 = getelementptr inbounds double, ptr %121, i64 %123
  store double %116, ptr %124, align 8, !tbaa !22
  br label %125

125:                                              ; preds = %105
  %126 = load i32, ptr %10, align 4, !tbaa !12
  %127 = add nsw i32 %126, 1
  store i32 %127, ptr %10, align 4, !tbaa !12
  br label %101, !llvm.loop !24

128:                                              ; preds = %101
  br label %129

129:                                              ; preds = %128
  %130 = load i32, ptr %9, align 4, !tbaa !12
  %131 = add nsw i32 %130, 1
  store i32 %131, ptr %9, align 4, !tbaa !12
  br label %96, !llvm.loop !25

132:                                              ; preds = %96
  %133 = load ptr, ptr %4, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.hmm_data_t, ptr %133, i32 0, i32 5
  %135 = load ptr, ptr %134, align 8, !tbaa !16
  %136 = getelementptr inbounds double, ptr %135, i64 0
  store double 1.000000e+00, ptr %136, align 8, !tbaa !22
  store i32 0, ptr %9, align 4, !tbaa !12
  br label %137

137:                                              ; preds = %150, %132
  %138 = load i32, ptr %9, align 4, !tbaa !12
  %139 = load i32, ptr %11, align 4, !tbaa !12
  %140 = icmp ne i32 %138, %139
  br i1 %140, label %141, label %153

141:                                              ; preds = %137
  %142 = load ptr, ptr %4, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.hmm_data_t, ptr %142, i32 0, i32 3
  %144 = load ptr, ptr %143, align 8, !tbaa !17
  %145 = getelementptr inbounds ptr, ptr %144, i64 0
  %146 = load ptr, ptr %145, align 8, !tbaa !5
  %147 = load i32, ptr %9, align 4, !tbaa !12
  %148 = sext i32 %147 to i64
  %149 = getelementptr inbounds double, ptr %146, i64 %148
  store double 0.000000e+00, ptr %149, align 8, !tbaa !22
  br label %150

150:                                              ; preds = %141
  %151 = load i32, ptr %9, align 4, !tbaa !12
  %152 = add nsw i32 %151, 1
  store i32 %152, ptr %9, align 4, !tbaa !12
  br label %137, !llvm.loop !26

153:                                              ; preds = %137
  store i32 0, ptr %9, align 4, !tbaa !12
  store double 0.000000e+00, ptr %5, align 8, !tbaa !22
  br label %154

154:                                              ; preds = %193, %153
  %155 = load i32, ptr %9, align 4, !tbaa !12
  %156 = load i32, ptr %11, align 4, !tbaa !12
  %157 = icmp ne i32 %155, %156
  br i1 %157, label %158, label %196

158:                                              ; preds = %154
  %159 = load ptr, ptr %3, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct.hmm_par_t, ptr %159, i32 0, i32 5
  %161 = load ptr, ptr %160, align 8, !tbaa !27
  %162 = load i32, ptr %9, align 4, !tbaa !12
  %163 = sext i32 %162 to i64
  %164 = getelementptr inbounds double, ptr %161, i64 %163
  %165 = load double, ptr %164, align 8, !tbaa !22
  %166 = load ptr, ptr %3, align 8, !tbaa !5
  %167 = getelementptr inbounds %struct.hmm_par_t, ptr %166, i32 0, i32 3
  %168 = load ptr, ptr %167, align 8, !tbaa !28
  %169 = load ptr, ptr %4, align 8, !tbaa !5
  %170 = getelementptr inbounds %struct.hmm_data_t, ptr %169, i32 0, i32 2
  %171 = load ptr, ptr %170, align 8, !tbaa !29
  %172 = getelementptr inbounds i8, ptr %171, i64 1
  %173 = load i8, ptr %172, align 1, !tbaa !30
  %174 = sext i8 %173 to i32
  %175 = sext i32 %174 to i64
  %176 = getelementptr inbounds ptr, ptr %168, i64 %175
  %177 = load ptr, ptr %176, align 8, !tbaa !5
  %178 = load i32, ptr %9, align 4, !tbaa !12
  %179 = sext i32 %178 to i64
  %180 = getelementptr inbounds double, ptr %177, i64 %179
  %181 = load double, ptr %180, align 8, !tbaa !22
  %182 = fmul double %165, %181
  %183 = load ptr, ptr %4, align 8, !tbaa !5
  %184 = getelementptr inbounds %struct.hmm_data_t, ptr %183, i32 0, i32 3
  %185 = load ptr, ptr %184, align 8, !tbaa !17
  %186 = getelementptr inbounds ptr, ptr %185, i64 1
  %187 = load ptr, ptr %186, align 8, !tbaa !5
  %188 = load i32, ptr %9, align 4, !tbaa !12
  %189 = sext i32 %188 to i64
  %190 = getelementptr inbounds double, ptr %187, i64 %189
  store double %182, ptr %190, align 8, !tbaa !22
  %191 = load double, ptr %5, align 8, !tbaa !22
  %192 = fadd double %191, %182
  store double %192, ptr %5, align 8, !tbaa !22
  br label %193

193:                                              ; preds = %158
  %194 = load i32, ptr %9, align 4, !tbaa !12
  %195 = add nsw i32 %194, 1
  store i32 %195, ptr %9, align 4, !tbaa !12
  br label %154, !llvm.loop !31

196:                                              ; preds = %154
  store i32 0, ptr %9, align 4, !tbaa !12
  br label %197

197:                                              ; preds = %213, %196
  %198 = load i32, ptr %9, align 4, !tbaa !12
  %199 = load i32, ptr %11, align 4, !tbaa !12
  %200 = icmp ne i32 %198, %199
  br i1 %200, label %201, label %216

201:                                              ; preds = %197
  %202 = load double, ptr %5, align 8, !tbaa !22
  %203 = load ptr, ptr %4, align 8, !tbaa !5
  %204 = getelementptr inbounds %struct.hmm_data_t, ptr %203, i32 0, i32 3
  %205 = load ptr, ptr %204, align 8, !tbaa !17
  %206 = getelementptr inbounds ptr, ptr %205, i64 1
  %207 = load ptr, ptr %206, align 8, !tbaa !5
  %208 = load i32, ptr %9, align 4, !tbaa !12
  %209 = sext i32 %208 to i64
  %210 = getelementptr inbounds double, ptr %207, i64 %209
  %211 = load double, ptr %210, align 8, !tbaa !22
  %212 = fdiv double %211, %202
  store double %212, ptr %210, align 8, !tbaa !22
  br label %213

213:                                              ; preds = %201
  %214 = load i32, ptr %9, align 4, !tbaa !12
  %215 = add nsw i32 %214, 1
  store i32 %215, ptr %9, align 4, !tbaa !12
  br label %197, !llvm.loop !32

216:                                              ; preds = %197
  %217 = load double, ptr %5, align 8, !tbaa !22
  %218 = load ptr, ptr %4, align 8, !tbaa !5
  %219 = getelementptr inbounds %struct.hmm_data_t, ptr %218, i32 0, i32 5
  %220 = load ptr, ptr %219, align 8, !tbaa !16
  %221 = getelementptr inbounds double, ptr %220, i64 1
  store double %217, ptr %221, align 8, !tbaa !22
  store i32 2, ptr %8, align 4, !tbaa !12
  br label %222

222:                                              ; preds = %327, %216
  %223 = load i32, ptr %8, align 4, !tbaa !12
  %224 = load i32, ptr %13, align 4, !tbaa !12
  %225 = icmp sle i32 %223, %224
  br i1 %225, label %226, label %330

226:                                              ; preds = %222
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %227 = load ptr, ptr %4, align 8, !tbaa !5
  %228 = getelementptr inbounds %struct.hmm_data_t, ptr %227, i32 0, i32 3
  %229 = load ptr, ptr %228, align 8, !tbaa !17
  %230 = load i32, ptr %8, align 4, !tbaa !12
  %231 = sext i32 %230 to i64
  %232 = getelementptr inbounds ptr, ptr %229, i64 %231
  %233 = load ptr, ptr %232, align 8, !tbaa !5
  store ptr %233, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %234 = load ptr, ptr %4, align 8, !tbaa !5
  %235 = getelementptr inbounds %struct.hmm_data_t, ptr %234, i32 0, i32 3
  %236 = load ptr, ptr %235, align 8, !tbaa !17
  %237 = load i32, ptr %8, align 4, !tbaa !12
  %238 = sub nsw i32 %237, 1
  %239 = sext i32 %238 to i64
  %240 = getelementptr inbounds ptr, ptr %236, i64 %239
  %241 = load ptr, ptr %240, align 8, !tbaa !5
  store ptr %241, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %242 = load ptr, ptr %3, align 8, !tbaa !5
  %243 = getelementptr inbounds %struct.hmm_par_t, ptr %242, i32 0, i32 3
  %244 = load ptr, ptr %243, align 8, !tbaa !28
  %245 = load ptr, ptr %4, align 8, !tbaa !5
  %246 = getelementptr inbounds %struct.hmm_data_t, ptr %245, i32 0, i32 2
  %247 = load ptr, ptr %246, align 8, !tbaa !29
  %248 = load i32, ptr %8, align 4, !tbaa !12
  %249 = sext i32 %248 to i64
  %250 = getelementptr inbounds i8, ptr %247, i64 %249
  %251 = load i8, ptr %250, align 1, !tbaa !30
  %252 = sext i8 %251 to i32
  %253 = sext i32 %252 to i64
  %254 = getelementptr inbounds ptr, ptr %244, i64 %253
  %255 = load ptr, ptr %254, align 8, !tbaa !5
  store ptr %255, ptr %16, align 8, !tbaa !5
  store i32 0, ptr %9, align 4, !tbaa !12
  store double 0.000000e+00, ptr %5, align 8, !tbaa !22
  br label %256

256:                                              ; preds = %300, %226
  %257 = load i32, ptr %9, align 4, !tbaa !12
  %258 = load i32, ptr %11, align 4, !tbaa !12
  %259 = icmp ne i32 %257, %258
  br i1 %259, label %260, label %303

260:                                              ; preds = %256
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  %261 = load ptr, ptr %7, align 8, !tbaa !5
  %262 = load i32, ptr %9, align 4, !tbaa !12
  %263 = sext i32 %262 to i64
  %264 = getelementptr inbounds ptr, ptr %261, i64 %263
  %265 = load ptr, ptr %264, align 8, !tbaa !5
  store ptr %265, ptr %17, align 8, !tbaa !5
  store i32 0, ptr %10, align 4, !tbaa !12
  store double 0.000000e+00, ptr %6, align 8, !tbaa !22
  br label %266

266:                                              ; preds = %283, %260
  %267 = load i32, ptr %10, align 4, !tbaa !12
  %268 = load i32, ptr %11, align 4, !tbaa !12
  %269 = icmp ne i32 %267, %268
  br i1 %269, label %270, label %286

270:                                              ; preds = %266
  %271 = load ptr, ptr %15, align 8, !tbaa !5
  %272 = load i32, ptr %10, align 4, !tbaa !12
  %273 = sext i32 %272 to i64
  %274 = getelementptr inbounds double, ptr %271, i64 %273
  %275 = load double, ptr %274, align 8, !tbaa !22
  %276 = load ptr, ptr %17, align 8, !tbaa !5
  %277 = load i32, ptr %10, align 4, !tbaa !12
  %278 = sext i32 %277 to i64
  %279 = getelementptr inbounds double, ptr %276, i64 %278
  %280 = load double, ptr %279, align 8, !tbaa !22
  %281 = load double, ptr %6, align 8, !tbaa !22
  %282 = call double @llvm.fmuladd.f64(double %275, double %280, double %281)
  store double %282, ptr %6, align 8, !tbaa !22
  br label %283

283:                                              ; preds = %270
  %284 = load i32, ptr %10, align 4, !tbaa !12
  %285 = add nsw i32 %284, 1
  store i32 %285, ptr %10, align 4, !tbaa !12
  br label %266, !llvm.loop !33

286:                                              ; preds = %266
  %287 = load ptr, ptr %16, align 8, !tbaa !5
  %288 = load i32, ptr %9, align 4, !tbaa !12
  %289 = sext i32 %288 to i64
  %290 = getelementptr inbounds double, ptr %287, i64 %289
  %291 = load double, ptr %290, align 8, !tbaa !22
  %292 = load double, ptr %6, align 8, !tbaa !22
  %293 = fmul double %291, %292
  %294 = load ptr, ptr %14, align 8, !tbaa !5
  %295 = load i32, ptr %9, align 4, !tbaa !12
  %296 = sext i32 %295 to i64
  %297 = getelementptr inbounds double, ptr %294, i64 %296
  store double %293, ptr %297, align 8, !tbaa !22
  %298 = load double, ptr %5, align 8, !tbaa !22
  %299 = fadd double %298, %293
  store double %299, ptr %5, align 8, !tbaa !22
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  br label %300

300:                                              ; preds = %286
  %301 = load i32, ptr %9, align 4, !tbaa !12
  %302 = add nsw i32 %301, 1
  store i32 %302, ptr %9, align 4, !tbaa !12
  br label %256, !llvm.loop !34

303:                                              ; preds = %256
  store i32 0, ptr %9, align 4, !tbaa !12
  br label %304

304:                                              ; preds = %316, %303
  %305 = load i32, ptr %9, align 4, !tbaa !12
  %306 = load i32, ptr %11, align 4, !tbaa !12
  %307 = icmp ne i32 %305, %306
  br i1 %307, label %308, label %319

308:                                              ; preds = %304
  %309 = load double, ptr %5, align 8, !tbaa !22
  %310 = load ptr, ptr %14, align 8, !tbaa !5
  %311 = load i32, ptr %9, align 4, !tbaa !12
  %312 = sext i32 %311 to i64
  %313 = getelementptr inbounds double, ptr %310, i64 %312
  %314 = load double, ptr %313, align 8, !tbaa !22
  %315 = fdiv double %314, %309
  store double %315, ptr %313, align 8, !tbaa !22
  br label %316

316:                                              ; preds = %308
  %317 = load i32, ptr %9, align 4, !tbaa !12
  %318 = add nsw i32 %317, 1
  store i32 %318, ptr %9, align 4, !tbaa !12
  br label %304, !llvm.loop !35

319:                                              ; preds = %304
  %320 = load double, ptr %5, align 8, !tbaa !22
  %321 = load ptr, ptr %4, align 8, !tbaa !5
  %322 = getelementptr inbounds %struct.hmm_data_t, ptr %321, i32 0, i32 5
  %323 = load ptr, ptr %322, align 8, !tbaa !16
  %324 = load i32, ptr %8, align 4, !tbaa !12
  %325 = sext i32 %324 to i64
  %326 = getelementptr inbounds double, ptr %323, i64 %325
  store double %320, ptr %326, align 8, !tbaa !22
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  br label %327

327:                                              ; preds = %319
  %328 = load i32, ptr %8, align 4, !tbaa !12
  %329 = add nsw i32 %328, 1
  store i32 %329, ptr %8, align 4, !tbaa !12
  br label %222, !llvm.loop !36

330:                                              ; preds = %222
  store i32 0, ptr %9, align 4, !tbaa !12
  br label %331

331:                                              ; preds = %343, %330
  %332 = load i32, ptr %9, align 4, !tbaa !12
  %333 = load ptr, ptr %3, align 8, !tbaa !5
  %334 = getelementptr inbounds %struct.hmm_par_t, ptr %333, i32 0, i32 1
  %335 = load i32, ptr %334, align 4, !tbaa !9
  %336 = icmp ne i32 %332, %335
  br i1 %336, label %337, label %346

337:                                              ; preds = %331
  %338 = load ptr, ptr %7, align 8, !tbaa !5
  %339 = load i32, ptr %9, align 4, !tbaa !12
  %340 = sext i32 %339 to i64
  %341 = getelementptr inbounds ptr, ptr %338, i64 %340
  %342 = load ptr, ptr %341, align 8, !tbaa !5
  call void @free(ptr noundef %342) #7
  br label %343

343:                                              ; preds = %337
  %344 = load i32, ptr %9, align 4, !tbaa !12
  %345 = add nsw i32 %344, 1
  store i32 %345, ptr %9, align 4, !tbaa !12
  br label %331, !llvm.loop !37

346:                                              ; preds = %331
  %347 = load ptr, ptr %7, align 8, !tbaa !5
  call void @free(ptr noundef %347) #7
  %348 = load ptr, ptr %4, align 8, !tbaa !5
  %349 = getelementptr inbounds %struct.hmm_data_t, ptr %348, i32 0, i32 1
  %350 = load i32, ptr %349, align 4, !tbaa !20
  %351 = or i32 %350, 2
  store i32 %351, ptr %349, align 4, !tbaa !20
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  ret void
}

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #6

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { nounwind allocsize(0,1) "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 = { inlinehint nounwind 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 #4 = { 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 #5 = { nounwind 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 #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { nounwind }
attributes #8 = { noreturn nounwind }
attributes #9 = { nounwind allocsize(0,1) }

!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/C++ TBAA"}
!9 = !{!10, !11, i64 4}
!10 = !{!"", !11, i64 0, !11, i64 4, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32}
!11 = !{!"int", !7, i64 0}
!12 = !{!11, !11, i64 0}
!13 = !{!10, !11, i64 0}
!14 = !{!15, !11, i64 0}
!15 = !{!"", !11, i64 0, !11, i64 4, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48}
!16 = !{!15, !6, i64 32}
!17 = !{!15, !6, i64 16}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = !{!15, !11, i64 4}
!21 = !{!10, !6, i64 8}
!22 = !{!23, !23, i64 0}
!23 = !{!"double", !7, i64 0}
!24 = distinct !{!24, !19}
!25 = distinct !{!25, !19}
!26 = distinct !{!26, !19}
!27 = !{!10, !6, i64 32}
!28 = !{!10, !6, i64 16}
!29 = !{!15, !6, i64 8}
!30 = !{!7, !7, i64 0}
!31 = distinct !{!31, !19}
!32 = distinct !{!32, !19}
!33 = distinct !{!33, !19}
!34 = distinct !{!34, !19}
!35 = distinct !{!35, !19}
!36 = distinct !{!36, !19}
!37 = distinct !{!37, !19}


; 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"

@.str.1 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [9 x i8], align 1
@__PRETTY_FUNCTION__.hmm_forward = external hidden unnamed_addr constant [50 x i8], align 1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @calloc(i64 noundef, i64 noundef) local_unnamed_addr #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @calloc2(i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
define dso_local void @hmm_forward(ptr noundef readonly %0, ptr noundef %1) local_unnamed_addr #4 {
  %3 = icmp ne ptr %0, null
  %4 = icmp ne ptr %1, null
  %or.cond = and i1 %3, %4
  br i1 %or.cond, label %6, label %5

5:                                                ; preds = %2
  tail call void @__assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1, i32 noundef 150, ptr noundef nonnull @__PRETTY_FUNCTION__.hmm_forward) #7
  unreachable

6:                                                ; preds = %2
  %7 = getelementptr inbounds i8, ptr %0, i64 4
  %8 = load i32, ptr %7, align 4, !tbaa !5
  %9 = load i32, ptr %1, align 8, !tbaa !11
  %10 = getelementptr inbounds i8, ptr %1, i64 32
  %11 = load ptr, ptr %10, align 8, !tbaa !13
  %.not = icmp eq ptr %11, null
  br i1 %.not, label %13, label %12

12:                                               ; preds = %6
  tail call void @free(ptr noundef nonnull %11) #8
  %.pre212.pre = load i32, ptr %1, align 8, !tbaa !11
  br label %13

13:                                               ; preds = %12, %6
  %.pre212 = phi i32 [ %.pre212.pre, %12 ], [ %9, %6 ]
  %14 = getelementptr inbounds i8, ptr %1, i64 16
  %15 = load ptr, ptr %14, align 8, !tbaa !14
  %.not115 = icmp eq ptr %15, null
  br i1 %.not115, label %22, label %.preheader131

.preheader131:                                    ; preds = %13
  %.not116132 = icmp slt i32 %.pre212, 0
  br i1 %.not116132, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader131, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %.preheader131 ]
  %16 = load ptr, ptr %14, align 8, !tbaa !14
  %17 = getelementptr inbounds ptr, ptr %16, i64 %indvars.iv
  %18 = load ptr, ptr %17, align 8, !tbaa !15
  tail call void @free(ptr noundef %18) #8
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %19 = load i32, ptr %1, align 8, !tbaa !11
  %20 = sext i32 %19 to i64
  %.not116.not = icmp slt i64 %indvars.iv, %20
  br i1 %.not116.not, label %.lr.ph, label %._crit_edge.loopexit, !llvm.loop !16

._crit_edge.loopexit:                             ; preds = %.lr.ph
  %.pre = load ptr, ptr %14, align 8, !tbaa !14
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader131
  %21 = phi ptr [ %.pre, %._crit_edge.loopexit ], [ %15, %.preheader131 ]
  tail call void @free(ptr noundef %21) #8
  %.pre211 = load i32, ptr %1, align 8, !tbaa !11
  br label %22

22:                                               ; preds = %._crit_edge, %13
  %23 = phi i32 [ %.pre211, %._crit_edge ], [ %.pre212, %13 ]
  %24 = add nsw i32 %23, 1
  %25 = load i32, ptr %7, align 4, !tbaa !5
  %26 = tail call ptr @calloc2(i32 noundef %24, i32 noundef %25, i32 noundef 8)
  store ptr %26, ptr %14, align 8, !tbaa !14
  %27 = load i32, ptr %1, align 8, !tbaa !11
  %28 = add nsw i32 %27, 1
  %29 = sext i32 %28 to i64
  %30 = tail call noalias ptr @calloc(i64 noundef %29, i64 noundef 8) #9
  store ptr %30, ptr %10, align 8, !tbaa !13
  %31 = getelementptr inbounds i8, ptr %1, i64 4
  %32 = load i32, ptr %31, align 4, !tbaa !18
  %33 = and i32 %32, -3
  store i32 %33, ptr %31, align 4, !tbaa !18
  %34 = tail call ptr @calloc2(i32 noundef %8, i32 noundef %8, i32 noundef 8)
  %.not117138 = icmp eq i32 %8, 0
  br i1 %.not117138, label %._crit_edge140.thread, label %.preheader130.lr.ph

._crit_edge140.thread:                            ; preds = %22
  %35 = load ptr, ptr %10, align 8, !tbaa !13
  store double 1.000000e+00, ptr %35, align 8, !tbaa !19
  br label %._crit_edge152

.preheader130.lr.ph:                              ; preds = %22
  %36 = getelementptr inbounds i8, ptr %0, i64 8
  %37 = load ptr, ptr %36, align 8, !tbaa !21
  %38 = zext i32 %8 to i64
  %xtraiter = and i64 %38, 3
  %39 = icmp ult i32 %8, 4
  %unroll_iter = and i64 %38, 4294967292
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %.preheader130

.preheader130:                                    ; preds = %.preheader130.lr.ph, %._crit_edge137
  %indvars.iv184 = phi i64 [ 0, %.preheader130.lr.ph ], [ %indvars.iv.next185, %._crit_edge137 ]
  %40 = getelementptr inbounds ptr, ptr %34, i64 %indvars.iv184
  %41 = load ptr, ptr %40, align 8, !tbaa !15
  br i1 %39, label %._crit_edge137.unr-lcssa, label %.preheader130.new

.preheader130.new:                                ; preds = %.preheader130, %.preheader130.new
  %indvars.iv181 = phi i64 [ %indvars.iv.next182.3, %.preheader130.new ], [ 0, %.preheader130 ]
  %niter = phi i64 [ %niter.next.3, %.preheader130.new ], [ 0, %.preheader130 ]
  %42 = getelementptr inbounds ptr, ptr %37, i64 %indvars.iv181
  %43 = load ptr, ptr %42, align 8, !tbaa !15
  %44 = getelementptr inbounds double, ptr %43, i64 %indvars.iv184
  %45 = load double, ptr %44, align 8, !tbaa !19
  %46 = getelementptr inbounds double, ptr %41, i64 %indvars.iv181
  store double %45, ptr %46, align 8, !tbaa !19
  %indvars.iv.next182 = or disjoint i64 %indvars.iv181, 1
  %47 = getelementptr inbounds ptr, ptr %37, i64 %indvars.iv.next182
  %48 = load ptr, ptr %47, align 8, !tbaa !15
  %49 = getelementptr inbounds double, ptr %48, i64 %indvars.iv184
  %50 = load double, ptr %49, align 8, !tbaa !19
  %51 = getelementptr inbounds double, ptr %41, i64 %indvars.iv.next182
  store double %50, ptr %51, align 8, !tbaa !19
  %indvars.iv.next182.1 = or disjoint i64 %indvars.iv181, 2
  %52 = getelementptr inbounds ptr, ptr %37, i64 %indvars.iv.next182.1
  %53 = load ptr, ptr %52, align 8, !tbaa !15
  %54 = getelementptr inbounds double, ptr %53, i64 %indvars.iv184
  %55 = load double, ptr %54, align 8, !tbaa !19
  %56 = getelementptr inbounds double, ptr %41, i64 %indvars.iv.next182.1
  store double %55, ptr %56, align 8, !tbaa !19
  %indvars.iv.next182.2 = or disjoint i64 %indvars.iv181, 3
  %57 = getelementptr inbounds ptr, ptr %37, i64 %indvars.iv.next182.2
  %58 = load ptr, ptr %57, align 8, !tbaa !15
  %59 = getelementptr inbounds double, ptr %58, i64 %indvars.iv184
  %60 = load double, ptr %59, align 8, !tbaa !19
  %61 = getelementptr inbounds double, ptr %41, i64 %indvars.iv.next182.2
  store double %60, ptr %61, align 8, !tbaa !19
  %indvars.iv.next182.3 = add nuw nsw i64 %indvars.iv181, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %._crit_edge137.unr-lcssa, label %.preheader130.new, !llvm.loop !22

._crit_edge137.unr-lcssa:                         ; preds = %.preheader130.new, %.preheader130
  %indvars.iv181.unr = phi i64 [ 0, %.preheader130 ], [ %indvars.iv.next182.3, %.preheader130.new ]
  br i1 %lcmp.mod.not, label %._crit_edge137, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge137.unr-lcssa, %.epil.preheader
  %indvars.iv181.epil = phi i64 [ %indvars.iv.next182.epil, %.epil.preheader ], [ %indvars.iv181.unr, %._crit_edge137.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %._crit_edge137.unr-lcssa ]
  %62 = getelementptr inbounds ptr, ptr %37, i64 %indvars.iv181.epil
  %63 = load ptr, ptr %62, align 8, !tbaa !15
  %64 = getelementptr inbounds double, ptr %63, i64 %indvars.iv184
  %65 = load double, ptr %64, align 8, !tbaa !19
  %66 = getelementptr inbounds double, ptr %41, i64 %indvars.iv181.epil
  store double %65, ptr %66, align 8, !tbaa !19
  %indvars.iv.next182.epil = add nuw nsw i64 %indvars.iv181.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge137, label %.epil.preheader, !llvm.loop !23

._crit_edge137:                                   ; preds = %.epil.preheader, %._crit_edge137.unr-lcssa
  %indvars.iv.next185 = add nuw nsw i64 %indvars.iv184, 1
  %.not117 = icmp eq i64 %indvars.iv.next185, %38
  br i1 %.not117, label %._crit_edge140, label %.preheader130, !llvm.loop !25

._crit_edge140:                                   ; preds = %._crit_edge137
  %67 = load ptr, ptr %10, align 8, !tbaa !13
  store double 1.000000e+00, ptr %67, align 8, !tbaa !19
  br i1 %.not117138, label %._crit_edge152, label %.lr.ph148

.lr.ph148:                                        ; preds = %._crit_edge140
  %68 = load ptr, ptr %14, align 8, !tbaa !14
  %69 = load ptr, ptr %68, align 8, !tbaa !15
  %70 = zext i32 %8 to i64
  %71 = shl nuw nsw i64 %70, 3
  tail call void @llvm.memset.p0.i64(ptr align 8 %69, i8 0, i64 %71, i1 false), !tbaa !19
  %72 = getelementptr inbounds i8, ptr %0, i64 32
  %73 = load ptr, ptr %72, align 8, !tbaa !26
  %74 = getelementptr inbounds i8, ptr %0, i64 16
  %75 = load ptr, ptr %74, align 8, !tbaa !27
  %76 = getelementptr inbounds i8, ptr %1, i64 8
  %77 = load ptr, ptr %76, align 8, !tbaa !28
  %78 = getelementptr inbounds i8, ptr %77, i64 1
  %79 = load ptr, ptr %14, align 8, !tbaa !14
  %80 = getelementptr inbounds i8, ptr %79, i64 8
  %81 = load ptr, ptr %80, align 8, !tbaa !15
  %82 = zext i32 %8 to i64
  %xtraiter240 = and i64 %82, 1
  %83 = icmp eq i32 %8, 1
  br i1 %83, label %.preheader128.unr-lcssa, label %.lr.ph148.new

.lr.ph148.new:                                    ; preds = %.lr.ph148
  %unroll_iter244 = and i64 %82, 4294967294
  br label %102

.preheader128.unr-lcssa:                          ; preds = %102, %.lr.ph148
  %.lcssa238.ph = phi double [ poison, %.lr.ph148 ], [ %124, %102 ]
  %indvars.iv190.unr = phi i64 [ 0, %.lr.ph148 ], [ %indvars.iv.next191.1, %102 ]
  %.0147.unr = phi double [ 0.000000e+00, %.lr.ph148 ], [ %124, %102 ]
  %lcmp.mod242.not = icmp eq i64 %xtraiter240, 0
  br i1 %lcmp.mod242.not, label %.preheader128, label %.preheader128.epilog-lcssa

.preheader128.epilog-lcssa:                       ; preds = %.preheader128.unr-lcssa
  %84 = getelementptr inbounds double, ptr %73, i64 %indvars.iv190.unr
  %85 = load double, ptr %84, align 8, !tbaa !19
  %86 = load i8, ptr %78, align 1, !tbaa !29
  %87 = sext i8 %86 to i64
  %88 = getelementptr inbounds ptr, ptr %75, i64 %87
  %89 = load ptr, ptr %88, align 8, !tbaa !15
  %90 = getelementptr inbounds double, ptr %89, i64 %indvars.iv190.unr
  %91 = load double, ptr %90, align 8, !tbaa !19
  %92 = fmul double %85, %91
  %93 = getelementptr inbounds double, ptr %81, i64 %indvars.iv190.unr
  store double %92, ptr %93, align 8, !tbaa !19
  %94 = fadd double %.0147.unr, %92
  br label %.preheader128

.preheader128:                                    ; preds = %.preheader128.unr-lcssa, %.preheader128.epilog-lcssa
  %.lcssa238 = phi double [ %.lcssa238.ph, %.preheader128.unr-lcssa ], [ %94, %.preheader128.epilog-lcssa ]
  br i1 %.not117138, label %._crit_edge152, label %.lr.ph151

.lr.ph151:                                        ; preds = %.preheader128
  %95 = load ptr, ptr %14, align 8, !tbaa !14
  %96 = getelementptr inbounds i8, ptr %95, i64 8
  %97 = load ptr, ptr %96, align 8, !tbaa !15
  %98 = zext i32 %8 to i64
  %min.iters.check = icmp eq i32 %8, 1
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.ph

scalar.ph.preheader:                              ; preds = %middle.block, %.lr.ph151
  %indvars.iv193.ph = phi i64 [ 0, %.lr.ph151 ], [ %n.vec, %middle.block ]
  br label %scalar.ph

vector.ph:                                        ; preds = %.lr.ph151
  %n.vec = and i64 %38, 4294967294
  %broadcast.splatinsert = insertelement <2 x double> poison, double %.lcssa238, i64 0
  %broadcast.splat = shufflevector <2 x double> %broadcast.splatinsert, <2 x double> poison, <2 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %99 = getelementptr inbounds double, ptr %97, i64 %index
  %wide.load = load <2 x double>, ptr %99, align 8, !tbaa !19
  %100 = fdiv <2 x double> %wide.load, %broadcast.splat
  store <2 x double> %100, ptr %99, align 8, !tbaa !19
  %index.next = add nuw i64 %index, 2
  %101 = icmp eq i64 %index.next, %n.vec
  br i1 %101, label %middle.block, label %vector.body, !llvm.loop !30

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %38
  br i1 %cmp.n, label %._crit_edge152, label %scalar.ph.preheader

102:                                              ; preds = %102, %.lr.ph148.new
  %indvars.iv190 = phi i64 [ 0, %.lr.ph148.new ], [ %indvars.iv.next191.1, %102 ]
  %.0147 = phi double [ 0.000000e+00, %.lr.ph148.new ], [ %124, %102 ]
  %niter245 = phi i64 [ 0, %.lr.ph148.new ], [ %niter245.next.1, %102 ]
  %103 = getelementptr inbounds double, ptr %73, i64 %indvars.iv190
  %104 = load double, ptr %103, align 8, !tbaa !19
  %105 = load i8, ptr %78, align 1, !tbaa !29
  %106 = sext i8 %105 to i64
  %107 = getelementptr inbounds ptr, ptr %75, i64 %106
  %108 = load ptr, ptr %107, align 8, !tbaa !15
  %109 = getelementptr inbounds double, ptr %108, i64 %indvars.iv190
  %110 = load double, ptr %109, align 8, !tbaa !19
  %111 = fmul double %104, %110
  %112 = getelementptr inbounds double, ptr %81, i64 %indvars.iv190
  store double %111, ptr %112, align 8, !tbaa !19
  %113 = fadd double %.0147, %111
  %indvars.iv.next191 = or disjoint i64 %indvars.iv190, 1
  %114 = getelementptr inbounds double, ptr %73, i64 %indvars.iv.next191
  %115 = load double, ptr %114, align 8, !tbaa !19
  %116 = load i8, ptr %78, align 1, !tbaa !29
  %117 = sext i8 %116 to i64
  %118 = getelementptr inbounds ptr, ptr %75, i64 %117
  %119 = load ptr, ptr %118, align 8, !tbaa !15
  %120 = getelementptr inbounds double, ptr %119, i64 %indvars.iv.next191
  %121 = load double, ptr %120, align 8, !tbaa !19
  %122 = fmul double %115, %121
  %123 = getelementptr inbounds double, ptr %81, i64 %indvars.iv.next191
  store double %122, ptr %123, align 8, !tbaa !19
  %124 = fadd double %113, %122
  %indvars.iv.next191.1 = add nuw nsw i64 %indvars.iv190, 2
  %niter245.next.1 = add i64 %niter245, 2
  %niter245.ncmp.1 = icmp eq i64 %niter245.next.1, %unroll_iter244
  br i1 %niter245.ncmp.1, label %.preheader128.unr-lcssa, label %102, !llvm.loop !33

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv193 = phi i64 [ %indvars.iv.next194, %scalar.ph ], [ %indvars.iv193.ph, %scalar.ph.preheader ]
  %125 = getelementptr inbounds double, ptr %97, i64 %indvars.iv193
  %126 = load double, ptr %125, align 8, !tbaa !19
  %127 = fdiv double %126, %.lcssa238
  store double %127, ptr %125, align 8, !tbaa !19
  %indvars.iv.next194 = add nuw nsw i64 %indvars.iv193, 1
  %.not120 = icmp eq i64 %indvars.iv.next194, %98
  br i1 %.not120, label %._crit_edge152, label %scalar.ph, !llvm.loop !34

._crit_edge152:                                   ; preds = %scalar.ph, %middle.block, %._crit_edge140.thread, %._crit_edge140, %.preheader128
  %.0.lcssa215 = phi double [ %.lcssa238, %.preheader128 ], [ 0.000000e+00, %._crit_edge140 ], [ 0.000000e+00, %._crit_edge140.thread ], [ %.lcssa238, %middle.block ], [ %.lcssa238, %scalar.ph ]
  %128 = phi ptr [ %67, %.preheader128 ], [ %67, %._crit_edge140 ], [ %35, %._crit_edge140.thread ], [ %67, %middle.block ], [ %67, %scalar.ph ]
  %129 = getelementptr inbounds i8, ptr %128, i64 8
  store double %.0.lcssa215, ptr %129, align 8, !tbaa !19
  %.not121170 = icmp slt i32 %9, 2
  br i1 %.not121170, label %.preheader, label %.lr.ph173

.lr.ph173:                                        ; preds = %._crit_edge152
  %130 = load ptr, ptr %14, align 8, !tbaa !14
  %131 = getelementptr inbounds i8, ptr %0, i64 16
  %132 = load ptr, ptr %131, align 8, !tbaa !27
  %133 = getelementptr inbounds i8, ptr %1, i64 8
  %134 = load ptr, ptr %133, align 8, !tbaa !28
  %135 = zext i32 %8 to i64
  %136 = add nuw i32 %9, 1
  %wide.trip.count = zext i32 %136 to i64
  %xtraiter247 = and i64 %135, 3
  %137 = icmp ult i32 %8, 4
  %unroll_iter251 = and i64 %135, 4294967292
  %lcmp.mod249.not = icmp eq i64 %xtraiter247, 0
  %min.iters.check224 = icmp eq i32 %8, 1
  %n.vec227 = and i64 %135, 4294967294
  %cmp.n235 = icmp eq i64 %n.vec227, %135
  br label %139

.preheader:                                       ; preds = %._crit_edge169, %._crit_edge152
  %138 = load i32, ptr %7, align 4, !tbaa !5
  %.not122174 = icmp eq i32 %138, 0
  br i1 %.not122174, label %._crit_edge177, label %.lr.ph176

139:                                              ; preds = %.lr.ph173, %._crit_edge169
  %indvars.iv205 = phi i64 [ 2, %.lr.ph173 ], [ %indvars.iv.next206, %._crit_edge169 ]
  %140 = getelementptr inbounds ptr, ptr %130, i64 %indvars.iv205
  %141 = load ptr, ptr %140, align 8, !tbaa !15
  %142 = getelementptr i8, ptr %140, i64 -8
  %143 = load ptr, ptr %142, align 8, !tbaa !15
  %144 = getelementptr inbounds i8, ptr %134, i64 %indvars.iv205
  %145 = load i8, ptr %144, align 1, !tbaa !29
  %146 = sext i8 %145 to i64
  %147 = getelementptr inbounds ptr, ptr %132, i64 %146
  %148 = load ptr, ptr %147, align 8, !tbaa !15
  br i1 %.not117138, label %._crit_edge169, label %.lr.ph157

.preheader127:                                    ; preds = %._crit_edge158
  br i1 %.not117138, label %._crit_edge169, label %.lr.ph168.preheader

.lr.ph168.preheader:                              ; preds = %.preheader127
  br i1 %min.iters.check224, label %.lr.ph168.preheader236, label %vector.ph225

.lr.ph168.preheader236:                           ; preds = %middle.block222, %.lr.ph168.preheader
  %indvars.iv202.ph = phi i64 [ 0, %.lr.ph168.preheader ], [ %n.vec227, %middle.block222 ]
  br label %.lr.ph168

vector.ph225:                                     ; preds = %.lr.ph168.preheader
  %broadcast.splatinsert232 = insertelement <2 x double> poison, double %183, i64 0
  %broadcast.splat233 = shufflevector <2 x double> %broadcast.splatinsert232, <2 x double> poison, <2 x i32> zeroinitializer
  br label %vector.body229

vector.body229:                                   ; preds = %vector.body229, %vector.ph225
  %index230 = phi i64 [ 0, %vector.ph225 ], [ %index.next234, %vector.body229 ]
  %149 = getelementptr inbounds double, ptr %141, i64 %index230
  %wide.load231 = load <2 x double>, ptr %149, align 8, !tbaa !19
  %150 = fdiv <2 x double> %wide.load231, %broadcast.splat233
  store <2 x double> %150, ptr %149, align 8, !tbaa !19
  %index.next234 = add nuw i64 %index230, 2
  %151 = icmp eq i64 %index.next234, %n.vec227
  br i1 %151, label %middle.block222, label %vector.body229, !llvm.loop !35

middle.block222:                                  ; preds = %vector.body229
  br i1 %cmp.n235, label %._crit_edge169, label %.lr.ph168.preheader236

.lr.ph157:                                        ; preds = %139, %._crit_edge158
  %indvars.iv199 = phi i64 [ %indvars.iv.next200, %._crit_edge158 ], [ 0, %139 ]
  %.1162 = phi double [ %183, %._crit_edge158 ], [ 0.000000e+00, %139 ]
  %152 = getelementptr inbounds ptr, ptr %34, i64 %indvars.iv199
  %153 = load ptr, ptr %152, align 8, !tbaa !15
  br i1 %137, label %._crit_edge158.unr-lcssa, label %.lr.ph157.new

.lr.ph157.new:                                    ; preds = %.lr.ph157, %.lr.ph157.new
  %indvars.iv196 = phi i64 [ %indvars.iv.next197.3, %.lr.ph157.new ], [ 0, %.lr.ph157 ]
  %.0104155 = phi double [ %173, %.lr.ph157.new ], [ 0.000000e+00, %.lr.ph157 ]
  %niter252 = phi i64 [ %niter252.next.3, %.lr.ph157.new ], [ 0, %.lr.ph157 ]
  %154 = getelementptr inbounds double, ptr %143, i64 %indvars.iv196
  %155 = load double, ptr %154, align 8, !tbaa !19
  %156 = getelementptr inbounds double, ptr %153, i64 %indvars.iv196
  %157 = load double, ptr %156, align 8, !tbaa !19
  %158 = tail call double @llvm.fmuladd.f64(double %155, double %157, double %.0104155)
  %indvars.iv.next197 = or disjoint i64 %indvars.iv196, 1
  %159 = getelementptr inbounds double, ptr %143, i64 %indvars.iv.next197
  %160 = load double, ptr %159, align 8, !tbaa !19
  %161 = getelementptr inbounds double, ptr %153, i64 %indvars.iv.next197
  %162 = load double, ptr %161, align 8, !tbaa !19
  %163 = tail call double @llvm.fmuladd.f64(double %160, double %162, double %158)
  %indvars.iv.next197.1 = or disjoint i64 %indvars.iv196, 2
  %164 = getelementptr inbounds double, ptr %143, i64 %indvars.iv.next197.1
  %165 = load double, ptr %164, align 8, !tbaa !19
  %166 = getelementptr inbounds double, ptr %153, i64 %indvars.iv.next197.1
  %167 = load double, ptr %166, align 8, !tbaa !19
  %168 = tail call double @llvm.fmuladd.f64(double %165, double %167, double %163)
  %indvars.iv.next197.2 = or disjoint i64 %indvars.iv196, 3
  %169 = getelementptr inbounds double, ptr %143, i64 %indvars.iv.next197.2
  %170 = load double, ptr %169, align 8, !tbaa !19
  %171 = getelementptr inbounds double, ptr %153, i64 %indvars.iv.next197.2
  %172 = load double, ptr %171, align 8, !tbaa !19
  %173 = tail call double @llvm.fmuladd.f64(double %170, double %172, double %168)
  %indvars.iv.next197.3 = add nuw nsw i64 %indvars.iv196, 4
  %niter252.next.3 = add i64 %niter252, 4
  %niter252.ncmp.3 = icmp eq i64 %niter252.next.3, %unroll_iter251
  br i1 %niter252.ncmp.3, label %._crit_edge158.unr-lcssa, label %.lr.ph157.new, !llvm.loop !36

._crit_edge158.unr-lcssa:                         ; preds = %.lr.ph157.new, %.lr.ph157
  %.lcssa.ph = phi double [ poison, %.lr.ph157 ], [ %173, %.lr.ph157.new ]
  %indvars.iv196.unr = phi i64 [ 0, %.lr.ph157 ], [ %indvars.iv.next197.3, %.lr.ph157.new ]
  %.0104155.unr = phi double [ 0.000000e+00, %.lr.ph157 ], [ %173, %.lr.ph157.new ]
  br i1 %lcmp.mod249.not, label %._crit_edge158, label %.epil.preheader246

.epil.preheader246:                               ; preds = %._crit_edge158.unr-lcssa, %.epil.preheader246
  %indvars.iv196.epil = phi i64 [ %indvars.iv.next197.epil, %.epil.preheader246 ], [ %indvars.iv196.unr, %._crit_edge158.unr-lcssa ]
  %.0104155.epil = phi double [ %178, %.epil.preheader246 ], [ %.0104155.unr, %._crit_edge158.unr-lcssa ]
  %epil.iter248 = phi i64 [ %epil.iter248.next, %.epil.preheader246 ], [ 0, %._crit_edge158.unr-lcssa ]
  %174 = getelementptr inbounds double, ptr %143, i64 %indvars.iv196.epil
  %175 = load double, ptr %174, align 8, !tbaa !19
  %176 = getelementptr inbounds double, ptr %153, i64 %indvars.iv196.epil
  %177 = load double, ptr %176, align 8, !tbaa !19
  %178 = tail call double @llvm.fmuladd.f64(double %175, double %177, double %.0104155.epil)
  %indvars.iv.next197.epil = add nuw nsw i64 %indvars.iv196.epil, 1
  %epil.iter248.next = add i64 %epil.iter248, 1
  %epil.iter248.cmp.not = icmp eq i64 %epil.iter248.next, %xtraiter247
  br i1 %epil.iter248.cmp.not, label %._crit_edge158, label %.epil.preheader246, !llvm.loop !37

._crit_edge158:                                   ; preds = %.epil.preheader246, %._crit_edge158.unr-lcssa
  %.lcssa = phi double [ %.lcssa.ph, %._crit_edge158.unr-lcssa ], [ %178, %.epil.preheader246 ]
  %179 = getelementptr inbounds double, ptr %148, i64 %indvars.iv199
  %180 = load double, ptr %179, align 8, !tbaa !19
  %181 = fmul double %.lcssa, %180
  %182 = getelementptr inbounds double, ptr %141, i64 %indvars.iv199
  store double %181, ptr %182, align 8, !tbaa !19
  %183 = fadd double %.1162, %181
  %indvars.iv.next200 = add nuw nsw i64 %indvars.iv199, 1
  %.not123 = icmp eq i64 %indvars.iv.next200, %135
  br i1 %.not123, label %.preheader127, label %.lr.ph157, !llvm.loop !38

.lr.ph168:                                        ; preds = %.lr.ph168.preheader236, %.lr.ph168
  %indvars.iv202 = phi i64 [ %indvars.iv.next203, %.lr.ph168 ], [ %indvars.iv202.ph, %.lr.ph168.preheader236 ]
  %184 = getelementptr inbounds double, ptr %141, i64 %indvars.iv202
  %185 = load double, ptr %184, align 8, !tbaa !19
  %186 = fdiv double %185, %183
  store double %186, ptr %184, align 8, !tbaa !19
  %indvars.iv.next203 = add nuw nsw i64 %indvars.iv202, 1
  %.not124 = icmp eq i64 %indvars.iv.next203, %135
  br i1 %.not124, label %._crit_edge169, label %.lr.ph168, !llvm.loop !39

._crit_edge169:                                   ; preds = %.lr.ph168, %middle.block222, %139, %.preheader127
  %.1.lcssa217 = phi double [ %183, %.preheader127 ], [ 0.000000e+00, %139 ], [ %183, %middle.block222 ], [ %183, %.lr.ph168 ]
  %187 = getelementptr inbounds double, ptr %128, i64 %indvars.iv205
  store double %.1.lcssa217, ptr %187, align 8, !tbaa !19
  %indvars.iv.next206 = add nuw nsw i64 %indvars.iv205, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next206, %wide.trip.count
  br i1 %exitcond.not, label %.preheader, label %139, !llvm.loop !40

.lr.ph176:                                        ; preds = %.preheader, %.lr.ph176
  %indvars.iv208 = phi i64 [ %indvars.iv.next209, %.lr.ph176 ], [ 0, %.preheader ]
  %188 = getelementptr inbounds ptr, ptr %34, i64 %indvars.iv208
  %189 = load ptr, ptr %188, align 8, !tbaa !15
  tail call void @free(ptr noundef %189) #8
  %indvars.iv.next209 = add nuw nsw i64 %indvars.iv208, 1
  %190 = load i32, ptr %7, align 4, !tbaa !5
  %191 = zext i32 %190 to i64
  %.not122 = icmp eq i64 %indvars.iv.next209, %191
  br i1 %.not122, label %._crit_edge177, label %.lr.ph176, !llvm.loop !41

._crit_edge177:                                   ; preds = %.lr.ph176, %.preheader
  tail call void @free(ptr noundef %34) #8
  %192 = load i32, ptr %31, align 4, !tbaa !18
  %193 = or i32 %192, 2
  store i32 %193, ptr %31, align 4, !tbaa !18
  ret void
}

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #5

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6

attributes #0 = { 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 #1 = { mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 = { inlinehint nounwind 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 #3 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 = { nounwind 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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { noreturn nounwind }
attributes #8 = { nounwind }
attributes #9 = { nounwind allocsize(0,1) }

!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, !7, i64 4}
!6 = !{!"", !7, i64 0, !7, i64 4, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!12, !7, i64 0}
!12 = !{!"", !7, i64 0, !7, i64 4, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48}
!13 = !{!12, !10, i64 32}
!14 = !{!12, !10, i64 16}
!15 = !{!10, !10, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = !{!12, !7, i64 4}
!19 = !{!20, !20, i64 0}
!20 = !{!"double", !8, i64 0}
!21 = !{!6, !10, i64 8}
!22 = distinct !{!22, !17}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.unroll.disable"}
!25 = distinct !{!25, !17}
!26 = !{!6, !10, i64 32}
!27 = !{!6, !10, i64 16}
!28 = !{!12, !10, i64 8}
!29 = !{!8, !8, i64 0}
!30 = distinct !{!30, !17, !31, !32}
!31 = !{!"llvm.loop.isvectorized", i32 1}
!32 = !{!"llvm.loop.unroll.runtime.disable"}
!33 = distinct !{!33, !17}
!34 = distinct !{!34, !17, !32, !31}
!35 = distinct !{!35, !17, !31, !32}
!36 = distinct !{!36, !17}
!37 = distinct !{!37, !24}
!38 = distinct !{!38, !17}
!39 = distinct !{!39, !17, !32, !31}
!40 = distinct !{!40, !17}
!41 = distinct !{!41, !17}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopIdiomRecognizePass,LoopInstSimplifyPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass