; LLVM IR from chrr/libECP :: src (type2)

; 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.IntegrationFailure = type { i32, ptr, ptr, ptr }
%struct.doubleArray = type { ptr, ptr }
%struct.TIntegrandParameters = type { ptr, ptr, ptr }
%struct.Integrand = type { ptr, ptr }
%struct._Type2 = type { i32, ptr, ptr, i32, i32, ptr, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i32, ptr, ptr, i32, ptr, ptr, i32, ptr, ptr, ptr, i32, i32, i32, i32, ptr, i32, ptr, double, double, double, i32 }
%struct.GCIntegrationTable = type { i32, i32, ptr, ptr, double, double, i32, i32 }

; 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 allocsize(0,1)
declare noalias ptr @calloc(i64 noundef, i64 noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local double @TIntegrand_FM06(double noundef, i32 noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
define dso_local void @calcT_fast_FM06(ptr dead_on_unwind noalias writable sret(%struct.IntegrationFailure) align 8 %0, ptr %1, ptr %2, ptr noundef %3, i32 noundef %4, ptr noundef byval(%struct.doubleArray) align 8 %5, i32 noundef %6, i32 noundef %7, ptr noundef byval(%struct.doubleArray) align 8 %8, ptr noundef %9, ptr noundef %10) #2 {
  %12 = alloca %struct.doubleArray, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca ptr, align 8
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca %struct.TIntegrandParameters, align 8
  %29 = alloca %struct.Integrand, align 8
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = alloca i32, align 4
  %33 = alloca i32, align 4
  %34 = getelementptr inbounds { ptr, ptr }, ptr %12, i32 0, i32 0
  store ptr %1, ptr %34, align 8
  %35 = getelementptr inbounds { ptr, ptr }, ptr %12, i32 0, i32 1
  store ptr %2, ptr %35, align 8
  store ptr %3, ptr %13, align 8, !tbaa !5
  store i32 %4, ptr %14, align 4, !tbaa !9
  store i32 %6, ptr %15, align 4, !tbaa !9
  store i32 %7, ptr %16, align 4, !tbaa !9
  store ptr %9, ptr %17, align 8, !tbaa !5
  store ptr %10, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #4
  %36 = load i32, ptr %15, align 4, !tbaa !9
  %37 = load i32, ptr %14, align 4, !tbaa !9
  %38 = add nsw i32 %36, %37
  store i32 %38, ptr %19, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #4
  %39 = load i32, ptr %16, align 4, !tbaa !9
  %40 = load i32, ptr %14, align 4, !tbaa !9
  %41 = add nsw i32 %39, %40
  store i32 %41, ptr %20, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #4
  %42 = load i32, ptr %15, align 4, !tbaa !9
  %43 = load i32, ptr %16, align 4, !tbaa !9
  %44 = add nsw i32 %42, %43
  store i32 %44, ptr %21, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #4
  %45 = getelementptr inbounds %struct.doubleArray, ptr %12, i32 0, i32 1
  %46 = load ptr, ptr %45, align 8, !tbaa !11
  store ptr %46, ptr %25, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #4
  %47 = getelementptr inbounds %struct.doubleArray, ptr %12, i32 0, i32 0
  %48 = load ptr, ptr %47, align 8, !tbaa !13
  %49 = getelementptr inbounds i64, ptr %48, i64 3
  %50 = load i64, ptr %49, align 8, !tbaa !14
  %51 = trunc i64 %50 to i32
  store i32 %51, ptr %26, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #4
  %52 = getelementptr inbounds %struct.doubleArray, ptr %12, i32 0, i32 0
  %53 = load ptr, ptr %52, align 8, !tbaa !13
  %54 = getelementptr inbounds i64, ptr %53, i64 2
  %55 = load i64, ptr %54, align 8, !tbaa !14
  %56 = getelementptr inbounds %struct.doubleArray, ptr %12, i32 0, i32 0
  %57 = load ptr, ptr %56, align 8, !tbaa !13
  %58 = getelementptr inbounds i64, ptr %57, i64 3
  %59 = load i64, ptr %58, align 8, !tbaa !14
  %60 = mul i64 %55, %59
  %61 = trunc i64 %60 to i32
  store i32 %61, ptr %27, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 24, ptr %28) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr %29) #4
  %62 = getelementptr inbounds %struct.Integrand, ptr %29, i32 0, i32 0
  store ptr @TIntegrand_FM06, ptr %62, align 8, !tbaa !13
  %63 = getelementptr inbounds %struct.Integrand, ptr %29, i32 0, i32 1
  store ptr %28, ptr %63, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #4
  %64 = getelementptr inbounds %struct.doubleArray, ptr %8, i32 0, i32 0
  %65 = load ptr, ptr %64, align 8, !tbaa !13
  %66 = getelementptr inbounds i64, ptr %65, i64 4
  %67 = load i64, ptr %66, align 8, !tbaa !14
  %68 = trunc i64 %67 to i32
  store i32 %68, ptr %30, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #4
  %69 = getelementptr inbounds %struct.doubleArray, ptr %5, i32 0, i32 0
  %70 = load ptr, ptr %69, align 8, !tbaa !13
  %71 = getelementptr inbounds i64, ptr %70, i64 3
  %72 = load i64, ptr %71, align 8, !tbaa !14
  %73 = trunc i64 %72 to i32
  store i32 %73, ptr %31, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #4
  %74 = getelementptr inbounds %struct.doubleArray, ptr %5, i32 0, i32 0
  %75 = load ptr, ptr %74, align 8, !tbaa !13
  %76 = getelementptr inbounds i64, ptr %75, i64 2
  %77 = load i64, ptr %76, align 8, !tbaa !14
  %78 = getelementptr inbounds %struct.doubleArray, ptr %5, i32 0, i32 0
  %79 = load ptr, ptr %78, align 8, !tbaa !13
  %80 = getelementptr inbounds i64, ptr %79, i64 3
  %81 = load i64, ptr %80, align 8, !tbaa !14
  %82 = mul i64 %77, %81
  %83 = trunc i64 %82 to i32
  store i32 %83, ptr %32, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #4
  %84 = load i32, ptr %19, align 4, !tbaa !9
  %85 = add nsw i32 %84, 1
  %86 = load i32, ptr %20, align 4, !tbaa !9
  %87 = add nsw i32 %86, 1
  %88 = mul nsw i32 %85, %87
  %89 = load i32, ptr %21, align 4, !tbaa !9
  %90 = add nsw i32 %89, 1
  %91 = mul nsw i32 %88, %90
  store i32 %91, ptr %33, align 4, !tbaa !9
  %92 = getelementptr inbounds %struct.IntegrationFailure, ptr %0, i32 0, i32 0
  store i32 0, ptr %92, align 8, !tbaa !16
  %93 = load i32, ptr %33, align 4, !tbaa !9
  %94 = sext i32 %93 to i64
  %95 = call noalias ptr @calloc(i64 noundef %94, i64 noundef 4) #5
  %96 = getelementptr inbounds %struct.IntegrationFailure, ptr %0, i32 0, i32 1
  store ptr %95, ptr %96, align 8, !tbaa !18
  %97 = load i32, ptr %33, align 4, !tbaa !9
  %98 = sext i32 %97 to i64
  %99 = call noalias ptr @calloc(i64 noundef %98, i64 noundef 4) #5
  %100 = getelementptr inbounds %struct.IntegrationFailure, ptr %0, i32 0, i32 2
  store ptr %99, ptr %100, align 8, !tbaa !19
  %101 = load i32, ptr %33, align 4, !tbaa !9
  %102 = sext i32 %101 to i64
  %103 = call noalias ptr @calloc(i64 noundef %102, i64 noundef 4) #5
  %104 = getelementptr inbounds %struct.IntegrationFailure, ptr %0, i32 0, i32 3
  store ptr %103, ptr %104, align 8, !tbaa !20
  store i32 0, ptr %22, align 4, !tbaa !9
  br label %105

105:                                              ; preds = %204, %11
  %106 = load i32, ptr %22, align 4, !tbaa !9
  %107 = load i32, ptr %19, align 4, !tbaa !9
  %108 = icmp sle i32 %106, %107
  br i1 %108, label %109, label %207

109:                                              ; preds = %105
  %110 = load ptr, ptr %17, align 8, !tbaa !5
  %111 = load i32, ptr %22, align 4, !tbaa !9
  %112 = load i32, ptr %30, align 4, !tbaa !9
  %113 = mul nsw i32 %111, %112
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds double, ptr %110, i64 %114
  %116 = getelementptr inbounds %struct.TIntegrandParameters, ptr %28, i32 0, i32 0
  store ptr %115, ptr %116, align 8, !tbaa !21
  store i32 0, ptr %23, align 4, !tbaa !9
  br label %117

117:                                              ; preds = %200, %109
  %118 = load i32, ptr %23, align 4, !tbaa !9
  %119 = load i32, ptr %20, align 4, !tbaa !9
  %120 = icmp sle i32 %118, %119
  br i1 %120, label %121, label %203

121:                                              ; preds = %117
  %122 = load ptr, ptr %18, align 8, !tbaa !5
  %123 = load i32, ptr %23, align 4, !tbaa !9
  %124 = load i32, ptr %30, align 4, !tbaa !9
  %125 = mul nsw i32 %123, %124
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds double, ptr %122, i64 %126
  %128 = getelementptr inbounds %struct.TIntegrandParameters, ptr %28, i32 0, i32 1
  store ptr %127, ptr %128, align 8, !tbaa !23
  store i32 0, ptr %24, align 4, !tbaa !9
  br label %129

129:                                              ; preds = %196, %121
  %130 = load i32, ptr %24, align 4, !tbaa !9
  %131 = load i32, ptr %21, align 4, !tbaa !9
  %132 = icmp sle i32 %130, %131
  br i1 %132, label %133, label %199

133:                                              ; preds = %129
  %134 = getelementptr inbounds %struct.doubleArray, ptr %5, i32 0, i32 1
  %135 = load ptr, ptr %134, align 8, !tbaa !11
  %136 = load i32, ptr %14, align 4, !tbaa !9
  %137 = load i32, ptr %32, align 4, !tbaa !9
  %138 = mul nsw i32 %136, %137
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds double, ptr %135, i64 %139
  %141 = load i32, ptr %24, align 4, !tbaa !9
  %142 = load i32, ptr %31, align 4, !tbaa !9
  %143 = mul nsw i32 %141, %142
  %144 = sext i32 %143 to i64
  %145 = getelementptr inbounds double, ptr %140, i64 %144
  %146 = getelementptr inbounds %struct.TIntegrandParameters, ptr %28, i32 0, i32 2
  store ptr %145, ptr %146, align 8, !tbaa !24
  %147 = load ptr, ptr %13, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct._Type2, ptr %147, i32 0, i32 28
  %149 = load ptr, ptr %148, align 8, !tbaa !25
  %150 = call i32 @integrateGC_PS93(ptr noundef %29, ptr noundef %149)
  %151 = icmp ne i32 0, %150
  br i1 %151, label %152, label %177

152:                                              ; preds = %133
  %153 = load i32, ptr %22, align 4, !tbaa !9
  %154 = getelementptr inbounds %struct.IntegrationFailure, ptr %0, i32 0, i32 1
  %155 = load ptr, ptr %154, align 8, !tbaa !18
  %156 = getelementptr inbounds %struct.IntegrationFailure, ptr %0, i32 0, i32 0
  %157 = load i32, ptr %156, align 8, !tbaa !16
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds i32, ptr %155, i64 %158
  store i32 %153, ptr %159, align 4, !tbaa !9
  %160 = load i32, ptr %23, align 4, !tbaa !9
  %161 = getelementptr inbounds %struct.IntegrationFailure, ptr %0, i32 0, i32 2
  %162 = load ptr, ptr %161, align 8, !tbaa !19
  %163 = getelementptr inbounds %struct.IntegrationFailure, ptr %0, i32 0, i32 0
  %164 = load i32, ptr %163, align 8, !tbaa !16
  %165 = sext i32 %164 to i64
  %166 = getelementptr inbounds i32, ptr %162, i64 %165
  store i32 %160, ptr %166, align 4, !tbaa !9
  %167 = load i32, ptr %24, align 4, !tbaa !9
  %168 = getelementptr inbounds %struct.IntegrationFailure, ptr %0, i32 0, i32 3
  %169 = load ptr, ptr %168, align 8, !tbaa !20
  %170 = getelementptr inbounds %struct.IntegrationFailure, ptr %0, i32 0, i32 0
  %171 = load i32, ptr %170, align 8, !tbaa !16
  %172 = sext i32 %171 to i64
  %173 = getelementptr inbounds i32, ptr %169, i64 %172
  store i32 %167, ptr %173, align 4, !tbaa !9
  %174 = getelementptr inbounds %struct.IntegrationFailure, ptr %0, i32 0, i32 0
  %175 = load i32, ptr %174, align 8, !tbaa !16
  %176 = add nsw i32 %175, 1
  store i32 %176, ptr %174, align 8, !tbaa !16
  br label %195

177:                                              ; preds = %133
  %178 = load ptr, ptr %13, align 8, !tbaa !5
  %179 = getelementptr inbounds %struct._Type2, ptr %178, i32 0, i32 28
  %180 = load ptr, ptr %179, align 8, !tbaa !25
  %181 = getelementptr inbounds %struct.GCIntegrationTable, ptr %180, i32 0, i32 5
  %182 = load double, ptr %181, align 8, !tbaa !28
  %183 = load ptr, ptr %25, align 8, !tbaa !5
  %184 = load i32, ptr %22, align 4, !tbaa !9
  %185 = load i32, ptr %27, align 4, !tbaa !9
  %186 = mul nsw i32 %184, %185
  %187 = load i32, ptr %23, align 4, !tbaa !9
  %188 = load i32, ptr %26, align 4, !tbaa !9
  %189 = mul nsw i32 %187, %188
  %190 = add nsw i32 %186, %189
  %191 = load i32, ptr %24, align 4, !tbaa !9
  %192 = add nsw i32 %190, %191
  %193 = sext i32 %192 to i64
  %194 = getelementptr inbounds double, ptr %183, i64 %193
  store double %182, ptr %194, align 8, !tbaa !30
  br label %195

195:                                              ; preds = %177, %152
  br label %196

196:                                              ; preds = %195
  %197 = load i32, ptr %24, align 4, !tbaa !9
  %198 = add nsw i32 %197, 1
  store i32 %198, ptr %24, align 4, !tbaa !9
  br label %129, !llvm.loop !31

199:                                              ; preds = %129
  br label %200

200:                                              ; preds = %199
  %201 = load i32, ptr %23, align 4, !tbaa !9
  %202 = add nsw i32 %201, 1
  store i32 %202, ptr %23, align 4, !tbaa !9
  br label %117, !llvm.loop !33

203:                                              ; preds = %117
  br label %204

204:                                              ; preds = %203
  %205 = load i32, ptr %22, align 4, !tbaa !9
  %206 = add nsw i32 %205, 1
  store i32 %206, ptr %22, align 4, !tbaa !9
  br label %105, !llvm.loop !34

207:                                              ; preds = %105
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %29) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %28) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #4
  ret void
}

declare i32 @integrateGC_PS93(ptr noundef, ptr noundef) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 = { "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 }
attributes #5 = { 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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 8}
!12 = !{!"", !6, i64 0, !6, i64 8}
!13 = !{!12, !6, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"long", !7, i64 0}
!16 = !{!17, !10, i64 0}
!17 = !{!"", !10, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!18 = !{!17, !6, i64 8}
!19 = !{!17, !6, i64 16}
!20 = !{!17, !6, i64 24}
!21 = !{!22, !6, i64 0}
!22 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16}
!23 = !{!22, !6, i64 8}
!24 = !{!22, !6, i64 16}
!25 = !{!26, !6, i64 184}
!26 = !{!"_Type2", !10, i64 0, !6, i64 8, !6, i64 16, !10, i64 24, !10, i64 28, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !10, i64 72, !10, i64 76, !10, i64 80, !10, i64 84, !10, i64 88, !6, i64 96, !6, i64 104, !10, i64 112, !6, i64 120, !6, i64 128, !10, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !10, i64 168, !10, i64 172, !10, i64 176, !10, i64 180, !6, i64 184, !10, i64 192, !6, i64 200, !27, i64 208, !27, i64 216, !27, i64 224, !10, i64 232}
!27 = !{!"double", !7, i64 0}
!28 = !{!29, !27, i64 32}
!29 = !{!"", !10, i64 0, !10, i64 4, !6, i64 8, !6, i64 16, !27, i64 24, !27, i64 32, !10, i64 40, !10, i64 44}
!30 = !{!27, !27, i64 0}
!31 = distinct !{!31, !32}
!32 = !{!"llvm.loop.mustprogress"}
!33 = distinct !{!33, !32}
!34 = distinct !{!34, !32}


; 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.IntegrationFailure = type { i32, ptr, ptr, ptr }
%struct.doubleArray = type { ptr, ptr }
%struct.TIntegrandParameters = type { ptr, ptr, ptr }
%struct.Integrand = type { ptr, ptr }

; 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: 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: nounwind uwtable
declare dso_local double @TIntegrand_FM06(double noundef, i32 noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
define dso_local void @calcT_fast_FM06(ptr dead_on_unwind noalias nocapture writable writeonly sret(%struct.IntegrationFailure) align 8 %0, ptr nocapture readonly %1, ptr nocapture writeonly %2, ptr nocapture noundef readonly %3, i32 noundef %4, ptr nocapture noundef readonly byval(%struct.doubleArray) align 8 %5, i32 noundef %6, i32 noundef %7, ptr nocapture noundef readonly byval(%struct.doubleArray) align 8 %8, ptr noundef %9, ptr noundef %10) local_unnamed_addr #2 {
  %12 = alloca %struct.TIntegrandParameters, align 8
  %13 = alloca %struct.Integrand, align 8
  %14 = add i32 %6, %4
  %15 = add i32 %7, %4
  %16 = add i32 %7, %6
  %17 = getelementptr inbounds i8, ptr %1, i64 24
  %18 = load i64, ptr %17, align 8, !tbaa !5
  %19 = getelementptr inbounds i8, ptr %1, i64 16
  %20 = load i64, ptr %19, align 8, !tbaa !5
  %21 = mul i64 %20, %18
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %12) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #4
  store ptr @TIntegrand_FM06, ptr %13, align 8, !tbaa !9
  %22 = getelementptr inbounds i8, ptr %13, i64 8
  store ptr %12, ptr %22, align 8, !tbaa !12
  %23 = load ptr, ptr %8, align 8, !tbaa !9
  %24 = getelementptr inbounds i8, ptr %23, i64 32
  %25 = load i64, ptr %24, align 8, !tbaa !5
  %26 = load ptr, ptr %5, align 8, !tbaa !9
  %27 = getelementptr inbounds i8, ptr %26, i64 24
  %28 = load i64, ptr %27, align 8, !tbaa !5
  %29 = getelementptr inbounds i8, ptr %26, i64 16
  %30 = load i64, ptr %29, align 8, !tbaa !5
  %31 = add i32 %14, 1
  %32 = add i32 %15, 1
  %33 = mul nsw i32 %32, %31
  %34 = add i32 %16, 1
  %35 = mul nsw i32 %33, %34
  %36 = sext i32 %35 to i64
  %37 = call noalias ptr @calloc(i64 noundef %36, i64 noundef 4) #5
  %38 = getelementptr inbounds i8, ptr %0, i64 8
  store ptr %37, ptr %38, align 8, !tbaa !13
  %39 = call noalias ptr @calloc(i64 noundef %36, i64 noundef 4) #5
  %40 = getelementptr inbounds i8, ptr %0, i64 16
  store ptr %39, ptr %40, align 8, !tbaa !16
  %41 = call noalias ptr @calloc(i64 noundef %36, i64 noundef 4) #5
  %42 = getelementptr inbounds i8, ptr %0, i64 24
  store ptr %41, ptr %42, align 8, !tbaa !17
  %.not61 = icmp slt i32 %14, 0
  br i1 %.not61, label %._crit_edge67, label %.lr.ph66

.lr.ph66:                                         ; preds = %11
  %43 = mul i64 %30, %28
  %44 = trunc i64 %43 to i32
  %45 = getelementptr inbounds i8, ptr %12, i64 8
  %46 = getelementptr inbounds i8, ptr %5, i64 8
  %47 = load ptr, ptr %46, align 8
  %48 = mul nsw i32 %44, %4
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds double, ptr %47, i64 %49
  %51 = getelementptr inbounds i8, ptr %12, i64 16
  %52 = getelementptr inbounds i8, ptr %3, i64 184
  %53 = or i32 %15, %16
  %or.cond.not = icmp sgt i32 %53, -1
  br i1 %or.cond.not, label %.lr.ph56.preheader, label %._crit_edge67

.lr.ph56.preheader:                               ; preds = %.lr.ph66
  %sext = shl i64 %28, 32
  %54 = ashr exact i64 %sext, 32
  %sext92 = shl i64 %25, 32
  %55 = ashr exact i64 %sext92, 32
  %sext93 = shl i64 %18, 32
  %56 = ashr exact i64 %sext93, 32
  %sext94 = shl i64 %21, 32
  %57 = ashr exact i64 %sext94, 32
  %wide.trip.count89 = zext i32 %31 to i64
  %wide.trip.count84 = zext i32 %32 to i64
  %wide.trip.count = zext i32 %34 to i64
  br label %.lr.ph56

.lr.ph56:                                         ; preds = %.lr.ph56.preheader, %._crit_edge57.split
  %indvars.iv86 = phi i64 [ 0, %.lr.ph56.preheader ], [ %indvars.iv.next87, %._crit_edge57.split ]
  %.lcssa51.lcssa6062 = phi i32 [ 0, %.lr.ph56.preheader ], [ %85, %._crit_edge57.split ]
  %58 = mul nsw i64 %indvars.iv86, %55
  %59 = getelementptr inbounds double, ptr %9, i64 %58
  store ptr %59, ptr %12, align 8, !tbaa !18
  %60 = mul nsw i64 %indvars.iv86, %57
  %61 = trunc nuw nsw i64 %indvars.iv86 to i32
  %invariant.gep = getelementptr double, ptr %2, i64 %60
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph56, %._crit_edge
  %indvars.iv81 = phi i64 [ 0, %.lr.ph56 ], [ %indvars.iv.next82, %._crit_edge ]
  %.lcssa5153 = phi i32 [ %.lcssa51.lcssa6062, %.lr.ph56 ], [ %85, %._crit_edge ]
  %62 = mul nsw i64 %indvars.iv81, %55
  %63 = getelementptr inbounds double, ptr %10, i64 %62
  store ptr %63, ptr %45, align 8, !tbaa !20
  %64 = mul nsw i64 %indvars.iv81, %56
  %65 = trunc nuw nsw i64 %indvars.iv81 to i32
  %gep = getelementptr double, ptr %invariant.gep, i64 %64
  br label %66

66:                                               ; preds = %.lr.ph, %84
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %84 ]
  %67 = phi i32 [ %.lcssa5153, %.lr.ph ], [ %85, %84 ]
  %68 = mul nsw i64 %indvars.iv, %54
  %69 = getelementptr inbounds double, ptr %50, i64 %68
  store ptr %69, ptr %51, align 8, !tbaa !21
  %70 = load ptr, ptr %52, align 8, !tbaa !22
  %71 = call i32 @integrateGC_PS93(ptr noundef nonnull %13, ptr noundef %70) #4
  %.not47 = icmp eq i32 %71, 0
  br i1 %.not47, label %79, label %72

72:                                               ; preds = %66
  %73 = sext i32 %67 to i64
  %74 = getelementptr inbounds i32, ptr %37, i64 %73
  store i32 %61, ptr %74, align 4, !tbaa !25
  %75 = getelementptr inbounds i32, ptr %39, i64 %73
  store i32 %65, ptr %75, align 4, !tbaa !25
  %76 = getelementptr inbounds i32, ptr %41, i64 %73
  %77 = trunc nuw nsw i64 %indvars.iv to i32
  store i32 %77, ptr %76, align 4, !tbaa !25
  %78 = add nsw i32 %67, 1
  br label %84

79:                                               ; preds = %66
  %80 = load ptr, ptr %52, align 8, !tbaa !22
  %81 = getelementptr inbounds i8, ptr %80, i64 32
  %82 = load double, ptr %81, align 8, !tbaa !26
  %83 = getelementptr double, ptr %gep, i64 %indvars.iv
  store double %82, ptr %83, align 8, !tbaa !28
  br label %84

84:                                               ; preds = %72, %79
  %85 = phi i32 [ %78, %72 ], [ %67, %79 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %66, !llvm.loop !29

._crit_edge:                                      ; preds = %84
  %indvars.iv.next82 = add nuw nsw i64 %indvars.iv81, 1
  %exitcond85.not = icmp eq i64 %indvars.iv.next82, %wide.trip.count84
  br i1 %exitcond85.not, label %._crit_edge57.split, label %.lr.ph, !llvm.loop !31

._crit_edge57.split:                              ; preds = %._crit_edge
  %indvars.iv.next87 = add nuw nsw i64 %indvars.iv86, 1
  %exitcond90.not = icmp eq i64 %indvars.iv.next87, %wide.trip.count89
  br i1 %exitcond90.not, label %._crit_edge67, label %.lr.ph56, !llvm.loop !32

._crit_edge67:                                    ; preds = %._crit_edge57.split, %.lr.ph66, %11
  %.lcssa51.lcssa60.lcssa = phi i32 [ 0, %11 ], [ 0, %.lr.ph66 ], [ %85, %._crit_edge57.split ]
  store i32 %.lcssa51.lcssa60.lcssa, ptr %0, align 8, !tbaa !33
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #4
  ret void
}

declare i32 @integrateGC_PS93(ptr noundef, ptr noundef) local_unnamed_addr #3

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = { "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 }
attributes #5 = { 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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"", !11, i64 0, !11, i64 8}
!11 = !{!"any pointer", !7, i64 0}
!12 = !{!10, !11, i64 8}
!13 = !{!14, !11, i64 8}
!14 = !{!"", !15, i64 0, !11, i64 8, !11, i64 16, !11, i64 24}
!15 = !{!"int", !7, i64 0}
!16 = !{!14, !11, i64 16}
!17 = !{!14, !11, i64 24}
!18 = !{!19, !11, i64 0}
!19 = !{!"", !11, i64 0, !11, i64 8, !11, i64 16}
!20 = !{!19, !11, i64 8}
!21 = !{!19, !11, i64 16}
!22 = !{!23, !11, i64 184}
!23 = !{!"_Type2", !15, i64 0, !11, i64 8, !11, i64 16, !15, i64 24, !15, i64 28, !11, i64 32, !11, i64 40, !11, i64 48, !11, i64 56, !11, i64 64, !15, i64 72, !15, i64 76, !15, i64 80, !15, i64 84, !15, i64 88, !11, i64 96, !11, i64 104, !15, i64 112, !11, i64 120, !11, i64 128, !15, i64 136, !11, i64 144, !11, i64 152, !11, i64 160, !15, i64 168, !15, i64 172, !15, i64 176, !15, i64 180, !11, i64 184, !15, i64 192, !11, i64 200, !24, i64 208, !24, i64 216, !24, i64 224, !15, i64 232}
!24 = !{!"double", !7, i64 0}
!25 = !{!15, !15, i64 0}
!26 = !{!27, !24, i64 32}
!27 = !{!"", !15, i64 0, !15, i64 4, !11, i64 8, !11, i64 16, !24, i64 24, !24, i64 32, !15, i64 40, !15, i64 44}
!28 = !{!24, !24, i64 0}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.mustprogress"}
!31 = distinct !{!31, !30}
!32 = distinct !{!32, !30}
!33 = !{!14, !15, i64 0}


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