; LLVM IR from QiaoLiuHit/LSOTB-TIR :: vlfeat-0.9.19/vl (gmm)

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

%union.anon = type { i64 }

@vl_infinity_d = external hidden constant %union.anon, align 8

; 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

declare void @vl_free(ptr noundef) #1

; Function Attrs: nounwind
declare double @log(double noundef) #2

declare ptr @vl_malloc(i64 noundef) #1

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

; Function Attrs: nounwind
declare double @exp(double noundef) #2

; Function Attrs: nounwind uwtable
define dso_local double @vl_get_gmm_data_posteriors_d(ptr noundef %0, i64 noundef %1, i64 noundef %2, ptr noundef %3, ptr noundef %4, i64 noundef %5, ptr noundef %6, ptr noundef %7) #4 {
  %9 = alloca ptr, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i64, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  %20 = alloca double, align 8
  %21 = alloca double, align 8
  %22 = alloca ptr, align 8
  %23 = alloca ptr, align 8
  %24 = alloca ptr, align 8
  %25 = alloca ptr, align 8
  %26 = alloca double, align 8
  %27 = alloca double, align 8
  %28 = alloca double, align 8
  %29 = alloca double, align 8
  %30 = alloca double, align 8
  store ptr %0, ptr %9, align 8, !tbaa !5
  store i64 %1, ptr %10, align 8, !tbaa !9
  store i64 %2, ptr %11, align 8, !tbaa !9
  store ptr %3, ptr %12, align 8, !tbaa !5
  store ptr %4, ptr %13, align 8, !tbaa !5
  store i64 %5, ptr %14, align 8, !tbaa !9
  store ptr %6, ptr %15, align 8, !tbaa !5
  store ptr %7, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  store double 0.000000e+00, ptr %20, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  %31 = load i64, ptr %14, align 8, !tbaa !9
  %32 = uitofp i64 %31 to double
  %33 = fdiv double %32, 2.000000e+00
  %34 = call double @log(double noundef 0x401921FB54442D18) #5
  %35 = fmul double %33, %34
  store double %35, ptr %21, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #5
  %36 = call ptr @vl_get_vector_3_comparison_function_d(i32 noundef 5)
  store ptr %36, ptr %25, align 8, !tbaa !5
  %37 = load i64, ptr %10, align 8, !tbaa !9
  %38 = mul i64 8, %37
  %39 = call ptr @vl_malloc(i64 noundef %38)
  store ptr %39, ptr %22, align 8, !tbaa !5
  %40 = load i64, ptr %10, align 8, !tbaa !9
  %41 = mul i64 8, %40
  %42 = load i64, ptr %14, align 8, !tbaa !9
  %43 = mul i64 %41, %42
  %44 = call ptr @vl_malloc(i64 noundef %43)
  store ptr %44, ptr %24, align 8, !tbaa !5
  %45 = load i64, ptr %10, align 8, !tbaa !9
  %46 = mul i64 8, %45
  %47 = call ptr @vl_malloc(i64 noundef %46)
  store ptr %47, ptr %23, align 8, !tbaa !5
  store i64 0, ptr %18, align 8, !tbaa !9
  br label %48

48:                                               ; preds = %116, %8
  %49 = load i64, ptr %18, align 8, !tbaa !9
  %50 = load i64, ptr %10, align 8, !tbaa !9
  %51 = trunc i64 %50 to i32
  %52 = sext i32 %51 to i64
  %53 = icmp slt i64 %49, %52
  br i1 %53, label %54, label %119

54:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #5
  store double 0.000000e+00, ptr %26, align 8, !tbaa !11
  %55 = load ptr, ptr %12, align 8, !tbaa !5
  %56 = load i64, ptr %18, align 8, !tbaa !9
  %57 = getelementptr inbounds double, ptr %55, i64 %56
  %58 = load double, ptr %57, align 8, !tbaa !11
  %59 = fcmp olt double %58, 0x3EB0C6F7A0B5ED8D
  br i1 %59, label %60, label %66

60:                                               ; preds = %54
  %61 = load double, ptr @vl_infinity_d, align 8, !tbaa !13
  %62 = fneg double %61
  %63 = load ptr, ptr %23, align 8, !tbaa !5
  %64 = load i64, ptr %18, align 8, !tbaa !9
  %65 = getelementptr inbounds double, ptr %63, i64 %64
  store double %62, ptr %65, align 8, !tbaa !11
  br label %75

66:                                               ; preds = %54
  %67 = load ptr, ptr %12, align 8, !tbaa !5
  %68 = load i64, ptr %18, align 8, !tbaa !9
  %69 = getelementptr inbounds double, ptr %67, i64 %68
  %70 = load double, ptr %69, align 8, !tbaa !11
  %71 = call double @log(double noundef %70) #5
  %72 = load ptr, ptr %23, align 8, !tbaa !5
  %73 = load i64, ptr %18, align 8, !tbaa !9
  %74 = getelementptr inbounds double, ptr %72, i64 %73
  store double %71, ptr %74, align 8, !tbaa !11
  br label %75

75:                                               ; preds = %66, %60
  store i64 0, ptr %19, align 8, !tbaa !9
  br label %76

76:                                               ; preds = %108, %75
  %77 = load i64, ptr %19, align 8, !tbaa !9
  %78 = load i64, ptr %14, align 8, !tbaa !9
  %79 = icmp ult i64 %77, %78
  br i1 %79, label %80, label %111

80:                                               ; preds = %76
  %81 = load ptr, ptr %15, align 8, !tbaa !5
  %82 = load i64, ptr %18, align 8, !tbaa !9
  %83 = load i64, ptr %14, align 8, !tbaa !9
  %84 = mul i64 %82, %83
  %85 = load i64, ptr %19, align 8, !tbaa !9
  %86 = add i64 %84, %85
  %87 = getelementptr inbounds double, ptr %81, i64 %86
  %88 = load double, ptr %87, align 8, !tbaa !11
  %89 = call double @log(double noundef %88) #5
  %90 = load double, ptr %26, align 8, !tbaa !11
  %91 = fadd double %90, %89
  store double %91, ptr %26, align 8, !tbaa !11
  %92 = load ptr, ptr %15, align 8, !tbaa !5
  %93 = load i64, ptr %18, align 8, !tbaa !9
  %94 = load i64, ptr %14, align 8, !tbaa !9
  %95 = mul i64 %93, %94
  %96 = load i64, ptr %19, align 8, !tbaa !9
  %97 = add i64 %95, %96
  %98 = getelementptr inbounds double, ptr %92, i64 %97
  %99 = load double, ptr %98, align 8, !tbaa !11
  %100 = fdiv double 1.000000e+00, %99
  %101 = load ptr, ptr %24, align 8, !tbaa !5
  %102 = load i64, ptr %18, align 8, !tbaa !9
  %103 = load i64, ptr %14, align 8, !tbaa !9
  %104 = mul i64 %102, %103
  %105 = load i64, ptr %19, align 8, !tbaa !9
  %106 = add i64 %104, %105
  %107 = getelementptr inbounds double, ptr %101, i64 %106
  store double %100, ptr %107, align 8, !tbaa !11
  br label %108

108:                                              ; preds = %80
  %109 = load i64, ptr %19, align 8, !tbaa !9
  %110 = add i64 %109, 1
  store i64 %110, ptr %19, align 8, !tbaa !9
  br label %76, !llvm.loop !14

111:                                              ; preds = %76
  %112 = load double, ptr %26, align 8, !tbaa !11
  %113 = load ptr, ptr %22, align 8, !tbaa !5
  %114 = load i64, ptr %18, align 8, !tbaa !9
  %115 = getelementptr inbounds double, ptr %113, i64 %114
  store double %112, ptr %115, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #5
  br label %116

116:                                              ; preds = %111
  %117 = load i64, ptr %18, align 8, !tbaa !9
  %118 = add nsw i64 %117, 1
  store i64 %118, ptr %18, align 8, !tbaa !9
  br label %48, !llvm.loop !16

119:                                              ; preds = %48
  store i64 0, ptr %17, align 8, !tbaa !9
  br label %120

120:                                              ; preds = %245, %119
  %121 = load i64, ptr %17, align 8, !tbaa !9
  %122 = load i64, ptr %11, align 8, !tbaa !9
  %123 = trunc i64 %122 to i32
  %124 = sext i32 %123 to i64
  %125 = icmp slt i64 %121, %124
  br i1 %125, label %126, label %248

126:                                              ; preds = %120
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #5
  store double 0.000000e+00, ptr %27, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #5
  %127 = load double, ptr @vl_infinity_d, align 8, !tbaa !13
  %128 = fneg double %127
  store double %128, ptr %28, align 8, !tbaa !11
  store i64 0, ptr %18, align 8, !tbaa !9
  br label %129

129:                                              ; preds = %180, %126
  %130 = load i64, ptr %18, align 8, !tbaa !9
  %131 = load i64, ptr %10, align 8, !tbaa !9
  %132 = trunc i64 %131 to i32
  %133 = sext i32 %132 to i64
  %134 = icmp slt i64 %130, %133
  br i1 %134, label %135, label %183

135:                                              ; preds = %129
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #5
  %136 = load ptr, ptr %23, align 8, !tbaa !5
  %137 = load i64, ptr %18, align 8, !tbaa !9
  %138 = getelementptr inbounds double, ptr %136, i64 %137
  %139 = load double, ptr %138, align 8, !tbaa !11
  %140 = load double, ptr %21, align 8, !tbaa !11
  %141 = fsub double %139, %140
  %142 = load ptr, ptr %22, align 8, !tbaa !5
  %143 = load i64, ptr %18, align 8, !tbaa !9
  %144 = getelementptr inbounds double, ptr %142, i64 %143
  %145 = load double, ptr %144, align 8, !tbaa !11
  %146 = call double @llvm.fmuladd.f64(double -5.000000e-01, double %145, double %141)
  %147 = load ptr, ptr %25, align 8, !tbaa !5
  %148 = load i64, ptr %14, align 8, !tbaa !9
  %149 = load ptr, ptr %16, align 8, !tbaa !5
  %150 = load i64, ptr %17, align 8, !tbaa !9
  %151 = load i64, ptr %14, align 8, !tbaa !9
  %152 = mul i64 %150, %151
  %153 = getelementptr inbounds double, ptr %149, i64 %152
  %154 = load ptr, ptr %13, align 8, !tbaa !5
  %155 = load i64, ptr %18, align 8, !tbaa !9
  %156 = load i64, ptr %14, align 8, !tbaa !9
  %157 = mul i64 %155, %156
  %158 = getelementptr inbounds double, ptr %154, i64 %157
  %159 = load ptr, ptr %24, align 8, !tbaa !5
  %160 = load i64, ptr %18, align 8, !tbaa !9
  %161 = load i64, ptr %14, align 8, !tbaa !9
  %162 = mul i64 %160, %161
  %163 = getelementptr inbounds double, ptr %159, i64 %162
  %164 = call double %147(i64 noundef %148, ptr noundef %153, ptr noundef %158, ptr noundef %163)
  %165 = call double @llvm.fmuladd.f64(double -5.000000e-01, double %164, double %146)
  store double %165, ptr %29, align 8, !tbaa !11
  %166 = load double, ptr %29, align 8, !tbaa !11
  %167 = load ptr, ptr %9, align 8, !tbaa !5
  %168 = load i64, ptr %18, align 8, !tbaa !9
  %169 = load i64, ptr %17, align 8, !tbaa !9
  %170 = load i64, ptr %10, align 8, !tbaa !9
  %171 = mul i64 %169, %170
  %172 = add i64 %168, %171
  %173 = getelementptr inbounds double, ptr %167, i64 %172
  store double %166, ptr %173, align 8, !tbaa !11
  %174 = load double, ptr %29, align 8, !tbaa !11
  %175 = load double, ptr %28, align 8, !tbaa !11
  %176 = fcmp ogt double %174, %175
  br i1 %176, label %177, label %179

177:                                              ; preds = %135
  %178 = load double, ptr %29, align 8, !tbaa !11
  store double %178, ptr %28, align 8, !tbaa !11
  br label %179

179:                                              ; preds = %177, %135
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #5
  br label %180

180:                                              ; preds = %179
  %181 = load i64, ptr %18, align 8, !tbaa !9
  %182 = add nsw i64 %181, 1
  store i64 %182, ptr %18, align 8, !tbaa !9
  br label %129, !llvm.loop !17

183:                                              ; preds = %129
  store i64 0, ptr %18, align 8, !tbaa !9
  br label %184

184:                                              ; preds = %214, %183
  %185 = load i64, ptr %18, align 8, !tbaa !9
  %186 = load i64, ptr %10, align 8, !tbaa !9
  %187 = trunc i64 %186 to i32
  %188 = sext i32 %187 to i64
  %189 = icmp slt i64 %185, %188
  br i1 %189, label %190, label %217

190:                                              ; preds = %184
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #5
  %191 = load ptr, ptr %9, align 8, !tbaa !5
  %192 = load i64, ptr %18, align 8, !tbaa !9
  %193 = load i64, ptr %17, align 8, !tbaa !9
  %194 = load i64, ptr %10, align 8, !tbaa !9
  %195 = mul i64 %193, %194
  %196 = add i64 %192, %195
  %197 = getelementptr inbounds double, ptr %191, i64 %196
  %198 = load double, ptr %197, align 8, !tbaa !11
  store double %198, ptr %30, align 8, !tbaa !11
  %199 = load double, ptr %30, align 8, !tbaa !11
  %200 = load double, ptr %28, align 8, !tbaa !11
  %201 = fsub double %199, %200
  %202 = call double @exp(double noundef %201) #5
  store double %202, ptr %30, align 8, !tbaa !11
  %203 = load double, ptr %30, align 8, !tbaa !11
  %204 = load ptr, ptr %9, align 8, !tbaa !5
  %205 = load i64, ptr %18, align 8, !tbaa !9
  %206 = load i64, ptr %17, align 8, !tbaa !9
  %207 = load i64, ptr %10, align 8, !tbaa !9
  %208 = mul i64 %206, %207
  %209 = add i64 %205, %208
  %210 = getelementptr inbounds double, ptr %204, i64 %209
  store double %203, ptr %210, align 8, !tbaa !11
  %211 = load double, ptr %30, align 8, !tbaa !11
  %212 = load double, ptr %27, align 8, !tbaa !11
  %213 = fadd double %212, %211
  store double %213, ptr %27, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #5
  br label %214

214:                                              ; preds = %190
  %215 = load i64, ptr %18, align 8, !tbaa !9
  %216 = add nsw i64 %215, 1
  store i64 %216, ptr %18, align 8, !tbaa !9
  br label %184, !llvm.loop !18

217:                                              ; preds = %184
  %218 = load double, ptr %27, align 8, !tbaa !11
  %219 = call double @log(double noundef %218) #5
  %220 = load double, ptr %28, align 8, !tbaa !11
  %221 = fadd double %219, %220
  %222 = load double, ptr %20, align 8, !tbaa !11
  %223 = fadd double %222, %221
  store double %223, ptr %20, align 8, !tbaa !11
  store i64 0, ptr %18, align 8, !tbaa !9
  br label %224

224:                                              ; preds = %241, %217
  %225 = load i64, ptr %18, align 8, !tbaa !9
  %226 = load i64, ptr %10, align 8, !tbaa !9
  %227 = trunc i64 %226 to i32
  %228 = sext i32 %227 to i64
  %229 = icmp slt i64 %225, %228
  br i1 %229, label %230, label %244

230:                                              ; preds = %224
  %231 = load double, ptr %27, align 8, !tbaa !11
  %232 = load ptr, ptr %9, align 8, !tbaa !5
  %233 = load i64, ptr %18, align 8, !tbaa !9
  %234 = load i64, ptr %17, align 8, !tbaa !9
  %235 = load i64, ptr %10, align 8, !tbaa !9
  %236 = mul i64 %234, %235
  %237 = add i64 %233, %236
  %238 = getelementptr inbounds double, ptr %232, i64 %237
  %239 = load double, ptr %238, align 8, !tbaa !11
  %240 = fdiv double %239, %231
  store double %240, ptr %238, align 8, !tbaa !11
  br label %241

241:                                              ; preds = %230
  %242 = load i64, ptr %18, align 8, !tbaa !9
  %243 = add nsw i64 %242, 1
  store i64 %243, ptr %18, align 8, !tbaa !9
  br label %224, !llvm.loop !19

244:                                              ; preds = %224
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #5
  br label %245

245:                                              ; preds = %244
  %246 = load i64, ptr %17, align 8, !tbaa !9
  %247 = add nsw i64 %246, 1
  store i64 %247, ptr %17, align 8, !tbaa !9
  br label %120, !llvm.loop !20

248:                                              ; preds = %120
  %249 = load ptr, ptr %22, align 8, !tbaa !5
  call void @vl_free(ptr noundef %249)
  %250 = load ptr, ptr %23, align 8, !tbaa !5
  call void @vl_free(ptr noundef %250)
  %251 = load ptr, ptr %24, align 8, !tbaa !5
  call void @vl_free(ptr noundef %251)
  %252 = load double, ptr %20, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  ret double %252
}

declare ptr @vl_get_vector_3_comparison_function_d(i32 noundef) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #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 #2 = { 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 #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = { 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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!7, !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = distinct !{!17, !15}
!18 = distinct !{!18, !15}
!19 = distinct !{!19, !15}
!20 = distinct !{!20, !15}


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

%union.anon = type { i64 }

@vl_infinity_d = external hidden local_unnamed_addr constant %union.anon, align 8

declare void @vl_free(ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @log(double noundef) local_unnamed_addr #1

declare ptr @vl_malloc(i64 noundef) local_unnamed_addr #0

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @exp(double noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local double @vl_get_gmm_data_posteriors_d(ptr nocapture noundef %0, i64 noundef %1, i64 noundef %2, ptr nocapture noundef readonly %3, ptr noundef %4, i64 noundef %5, ptr nocapture noundef readonly %6, ptr noundef %7) local_unnamed_addr #3 {
  %9 = uitofp i64 %5 to double
  %10 = fmul double %9, 5.000000e-01
  %11 = fmul double %10, 0x3FFD67F1C864BEB4
  %12 = tail call ptr @vl_get_vector_3_comparison_function_d(i32 noundef 5) #4
  %13 = shl i64 %1, 3
  %14 = tail call ptr @vl_malloc(i64 noundef %13) #4
  %15 = mul i64 %13, %5
  %16 = tail call ptr @vl_malloc(i64 noundef %15) #4
  %17 = tail call ptr @vl_malloc(i64 noundef %13) #4
  %sext = shl i64 %1, 32
  %18 = ashr exact i64 %sext, 32
  %19 = icmp sgt i64 %18, 0
  br i1 %19, label %.lr.ph112, label %.preheader107.thread

.lr.ph112:                                        ; preds = %8
  %20 = load double, ptr @vl_infinity_d, align 8
  %21 = fneg double %20
  %.not = icmp eq i64 %5, 0
  br i1 %.not, label %.lr.ph112.split, label %.lr.ph112.split.us

.lr.ph112.split.us:                               ; preds = %.lr.ph112, %._crit_edge.us
  %.095110.us = phi i64 [ %40, %._crit_edge.us ], [ 0, %.lr.ph112 ]
  %22 = getelementptr inbounds double, ptr %3, i64 %.095110.us
  %23 = load double, ptr %22, align 8, !tbaa !5
  %24 = fcmp olt double %23, 0x3EB0C6F7A0B5ED8D
  br i1 %24, label %.lr.ph.us, label %25

25:                                               ; preds = %.lr.ph112.split.us
  %26 = tail call double @log(double noundef %23) #4
  br label %.lr.ph.us

.lr.ph.us:                                        ; preds = %.lr.ph112.split.us, %25
  %.sink = phi double [ %26, %25 ], [ %21, %.lr.ph112.split.us ]
  %27 = getelementptr inbounds double, ptr %17, i64 %.095110.us
  store double %.sink, ptr %27, align 8
  %28 = mul i64 %.095110.us, %5
  br label %29

29:                                               ; preds = %.lr.ph.us, %29
  %.099109.us = phi double [ 0.000000e+00, %.lr.ph.us ], [ %34, %29 ]
  %.0100108.us = phi i64 [ 0, %.lr.ph.us ], [ %38, %29 ]
  %30 = add i64 %.0100108.us, %28
  %31 = getelementptr inbounds double, ptr %6, i64 %30
  %32 = load double, ptr %31, align 8, !tbaa !5
  %33 = tail call double @log(double noundef %32) #4
  %34 = fadd double %.099109.us, %33
  %35 = load double, ptr %31, align 8, !tbaa !5
  %36 = fdiv double 1.000000e+00, %35
  %37 = getelementptr inbounds double, ptr %16, i64 %30
  store double %36, ptr %37, align 8, !tbaa !5
  %38 = add nuw i64 %.0100108.us, 1
  %exitcond.not = icmp eq i64 %38, %5
  br i1 %exitcond.not, label %._crit_edge.us, label %29, !llvm.loop !9

._crit_edge.us:                                   ; preds = %29
  %39 = getelementptr inbounds double, ptr %14, i64 %.095110.us
  store double %34, ptr %39, align 8, !tbaa !5
  %40 = add nuw nsw i64 %.095110.us, 1
  %exitcond170.not = icmp eq i64 %40, %18
  br i1 %exitcond170.not, label %.preheader107, label %.lr.ph112.split.us, !llvm.loop !11

.preheader107:                                    ; preds = %._crit_edge.us, %87
  %sext106 = shl i64 %2, 32
  %41 = ashr exact i64 %sext106, 32
  %42 = icmp sgt i64 %41, 0
  br i1 %42, label %.lr.ph130, label %._crit_edge131

.preheader107.thread:                             ; preds = %8
  %sext106178 = shl i64 %2, 32
  %43 = ashr exact i64 %sext106178, 32
  %44 = icmp sgt i64 %43, 0
  br i1 %44, label %.lr.ph130.thread, label %._crit_edge131

.lr.ph130.thread:                                 ; preds = %.preheader107.thread
  %45 = load double, ptr @vl_infinity_d, align 8, !tbaa !12
  br label %.preheader.preheader

.lr.ph130:                                        ; preds = %.preheader107
  %46 = load double, ptr @vl_infinity_d, align 8, !tbaa !12
  %47 = fneg double %46
  br i1 %19, label %.lr.ph.us133.preheader, label %.preheader.preheader

.lr.ph.us133.preheader:                           ; preds = %.lr.ph130
  %min.iters.check = icmp eq i64 %sext, 4294967296
  %n.mod.vf = and i64 %1, 1
  %n.vec = sub nsw i64 %18, %n.mod.vf
  %cmp.n = icmp eq i64 %n.mod.vf, 0
  br label %.lr.ph.us133

.preheader.preheader:                             ; preds = %.lr.ph130.thread, %.lr.ph130
  %48 = phi double [ %45, %.lr.ph130.thread ], [ %46, %.lr.ph130 ]
  %49 = phi i64 [ %43, %.lr.ph130.thread ], [ %41, %.lr.ph130 ]
  br label %.preheader

.lr.ph.us133:                                     ; preds = %.lr.ph.us133.preheader, %._crit_edge125.us
  %.0129.us = phi i64 [ %53, %._crit_edge125.us ], [ 0, %.lr.ph.us133.preheader ]
  %.0101128.us = phi double [ %78, %._crit_edge125.us ], [ 0.000000e+00, %.lr.ph.us133.preheader ]
  %50 = mul i64 %.0129.us, %5
  %51 = getelementptr inbounds double, ptr %7, i64 %50
  %52 = mul i64 %.0129.us, %1
  %invariant.gep.us = getelementptr double, ptr %0, i64 %52
  br label %62

._crit_edge125.us:                                ; preds = %scalar.ph, %middle.block
  %53 = add nuw nsw i64 %.0129.us, 1
  %exitcond176.not = icmp eq i64 %53, %41
  br i1 %exitcond176.not, label %._crit_edge131, label %.lr.ph.us133, !llvm.loop !13

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %.3122.us = phi i64 [ %56, %scalar.ph ], [ %.3122.us.ph, %scalar.ph.preheader ]
  %gep127.us = getelementptr double, ptr %invariant.gep.us, i64 %.3122.us
  %54 = load double, ptr %gep127.us, align 8, !tbaa !5
  %55 = fdiv double %54, %60
  store double %55, ptr %gep127.us, align 8, !tbaa !5
  %56 = add nuw nsw i64 %.3122.us, 1
  %exitcond175.not = icmp eq i64 %56, %18
  br i1 %exitcond175.not, label %._crit_edge125.us, label %scalar.ph, !llvm.loop !14

.lr.ph118.us:                                     ; preds = %62, %.lr.ph118.us
  %.2117.us = phi i64 [ %61, %.lr.ph118.us ], [ 0, %62 ]
  %.098116.us = phi double [ %60, %.lr.ph118.us ], [ 0.000000e+00, %62 ]
  %gep121.us = getelementptr double, ptr %invariant.gep.us, i64 %.2117.us
  %57 = load double, ptr %gep121.us, align 8, !tbaa !5
  %58 = fsub double %57, %.197.us
  %59 = tail call double @exp(double noundef %58) #4
  store double %59, ptr %gep121.us, align 8, !tbaa !5
  %60 = fadd double %.098116.us, %59
  %61 = add nuw nsw i64 %.2117.us, 1
  %exitcond174.not = icmp eq i64 %61, %18
  br i1 %exitcond174.not, label %.lr.ph124.us, label %.lr.ph118.us, !llvm.loop !17

62:                                               ; preds = %.lr.ph.us133, %62
  %.1115.us = phi i64 [ 0, %.lr.ph.us133 ], [ %75, %62 ]
  %.096114.us = phi double [ %47, %.lr.ph.us133 ], [ %.197.us, %62 ]
  %63 = getelementptr inbounds double, ptr %17, i64 %.1115.us
  %64 = load double, ptr %63, align 8, !tbaa !5
  %65 = fsub double %64, %11
  %66 = getelementptr inbounds double, ptr %14, i64 %.1115.us
  %67 = load double, ptr %66, align 8, !tbaa !5
  %68 = tail call double @llvm.fmuladd.f64(double %67, double -5.000000e-01, double %65)
  %69 = mul i64 %.1115.us, %5
  %70 = getelementptr inbounds double, ptr %4, i64 %69
  %71 = getelementptr inbounds double, ptr %16, i64 %69
  %72 = tail call double %12(i64 noundef %5, ptr noundef %51, ptr noundef %70, ptr noundef %71) #4
  %73 = tail call double @llvm.fmuladd.f64(double %72, double -5.000000e-01, double %68)
  %gep.us = getelementptr double, ptr %invariant.gep.us, i64 %.1115.us
  store double %73, ptr %gep.us, align 8, !tbaa !5
  %74 = fcmp ogt double %73, %.096114.us
  %.197.us = select i1 %74, double %73, double %.096114.us
  %75 = add nuw nsw i64 %.1115.us, 1
  %exitcond173.not = icmp eq i64 %75, %18
  br i1 %exitcond173.not, label %.lr.ph118.us, label %62, !llvm.loop !18

.lr.ph124.us:                                     ; preds = %.lr.ph118.us
  %76 = tail call double @log(double noundef %60) #4
  %77 = fadd double %.197.us, %76
  %78 = fadd double %.0101128.us, %77
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.ph

scalar.ph.preheader:                              ; preds = %middle.block, %.lr.ph124.us
  %.3122.us.ph = phi i64 [ 0, %.lr.ph124.us ], [ %n.vec, %middle.block ]
  br label %scalar.ph

vector.ph:                                        ; preds = %.lr.ph124.us
  %broadcast.splatinsert = insertelement <2 x double> poison, double %60, 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 ]
  %79 = getelementptr double, ptr %invariant.gep.us, i64 %index
  %wide.load = load <2 x double>, ptr %79, align 8, !tbaa !5
  %80 = fdiv <2 x double> %wide.load, %broadcast.splat
  store <2 x double> %80, ptr %79, align 8, !tbaa !5
  %index.next = add nuw i64 %index, 2
  %81 = icmp eq i64 %index.next, %n.vec
  br i1 %81, label %middle.block, label %vector.body, !llvm.loop !19

middle.block:                                     ; preds = %vector.body
  br i1 %cmp.n, label %._crit_edge125.us, label %scalar.ph.preheader

.lr.ph112.split:                                  ; preds = %.lr.ph112, %87
  %.095110 = phi i64 [ %90, %87 ], [ 0, %.lr.ph112 ]
  %82 = getelementptr inbounds double, ptr %3, i64 %.095110
  %83 = load double, ptr %82, align 8, !tbaa !5
  %84 = fcmp olt double %83, 0x3EB0C6F7A0B5ED8D
  br i1 %84, label %87, label %85

85:                                               ; preds = %.lr.ph112.split
  %86 = tail call double @log(double noundef %83) #4
  br label %87

87:                                               ; preds = %.lr.ph112.split, %85
  %.sink177 = phi double [ %86, %85 ], [ %21, %.lr.ph112.split ]
  %88 = getelementptr inbounds double, ptr %17, i64 %.095110
  store double %.sink177, ptr %88, align 8
  %89 = getelementptr inbounds double, ptr %14, i64 %.095110
  store double 0.000000e+00, ptr %89, align 8, !tbaa !5
  %90 = add nuw nsw i64 %.095110, 1
  %exitcond171.not = icmp eq i64 %90, %18
  br i1 %exitcond171.not, label %.preheader107, label %.lr.ph112.split, !llvm.loop !11

.preheader:                                       ; preds = %.preheader.preheader, %.preheader
  %.0129 = phi i64 [ %94, %.preheader ], [ 0, %.preheader.preheader ]
  %.0101128 = phi double [ %93, %.preheader ], [ 0.000000e+00, %.preheader.preheader ]
  %91 = tail call double @log(double noundef 0.000000e+00) #4
  %92 = fsub double %91, %48
  %93 = fadd double %.0101128, %92
  %94 = add nuw nsw i64 %.0129, 1
  %exitcond172.not = icmp eq i64 %94, %49
  br i1 %exitcond172.not, label %._crit_edge131, label %.preheader, !llvm.loop !13

._crit_edge131:                                   ; preds = %.preheader, %._crit_edge125.us, %.preheader107.thread, %.preheader107
  %.0101.lcssa = phi double [ 0.000000e+00, %.preheader107 ], [ 0.000000e+00, %.preheader107.thread ], [ %78, %._crit_edge125.us ], [ %93, %.preheader ]
  tail call void @vl_free(ptr noundef %14) #4
  tail call void @vl_free(ptr noundef %17) #4
  tail call void @vl_free(ptr noundef %16) #4
  ret double %.0101.lcssa
}

declare ptr @vl_get_vector_3_comparison_function_d(i32 noundef) local_unnamed_addr #0

attributes #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 #1 = { mustprogress nofree nounwind willreturn memory(write) "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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { 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 }

!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 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = !{!7, !7, i64 0}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10, !15, !16}
!15 = !{!"llvm.loop.unroll.runtime.disable"}
!16 = !{!"llvm.loop.isvectorized", i32 1}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10, !16, !15}


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