; LLVM IR from alexzheng42/sDMD :: analysis (Distance)

; 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.SectionStr = type { i64, double, double, double, double, [20 x i8], %struct.WallStr, %struct.DynamicWallStr, %struct.ObstructionStr, %struct.TunnelStr, %struct.FlowStr }
%struct.WallStr = type { [20 x i8], [20 x i8], %struct.AtomStr }
%struct.AtomStr = type { ptr, ptr }
%struct.DynamicWallStr = type { [16 x i8], i32, i32, double, double, double, double, [4 x double] }
%struct.ObstructionStr = type { i32, i32, ptr, ptr, ptr }
%struct.TunnelStr = type { i32, double, double, double, %struct.AtomStr }
%struct.FlowStr = type { i32, %struct.ConstVStr, %struct.ForceStr, %struct.ChargeStr }
%struct.ConstVStr = type { [4 x double] }
%struct.ForceStr = type { [4 x double], ptr, ptr }
%struct.ChargeStr = type { i32, i32, ptr, ptr, ptr, ptr }
%struct.PropertyStr = type { [8 x i8], [2 x [16 x i8]], [8 x i8], i32, i32, i32, double, double, [3 x double], %struct.AtomSeqStr, ptr, ptr }
%struct.AtomSeqStr = type { i32, i32, i32 }
%struct.DynamicStr = type { [4 x i32], [4 x double], [4 x double], %struct.HBStr, %struct.HBNeighborStr, %struct.InteractionEventStr }
%struct.HBStr = type { i32, i32, i8, i32 }
%struct.HBNeighborStr = type { [5 x i32], i32, i32 }
%struct.InteractionEventStr = type { i32, i64, i64, double, double, i32, i32 }
%struct.PepStr = type { i32, i32, i32, i32, double }

@atomnum = external global i32, align 4
@protein = external global ptr, align 8
@.str.12 = external hidden unnamed_addr constant [7 x i8], align 1
@atom = external global ptr, align 8
@.str.17 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [3 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: nounwind willreturn memory(read)
declare i32 @strcmp(ptr noundef, ptr noundef) #1

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

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

; Function Attrs: nounwind uwtable
define dso_local void @CalParticle2Wall(ptr noundef %0, ptr noundef %1, ptr noundef %2) #3 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca [4 x double], align 16
  %9 = alloca [4 x double], align 16
  %10 = alloca [4 x double], align 16
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %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 double, align 8
  %19 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 0, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 32, ptr %8) #6
  call void @llvm.memset.p0.i64(ptr align 16 %8, i8 0, i64 32, i1 false)
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #6
  call void @llvm.memset.p0.i64(ptr align 16 %9, i8 0, i64 32, i1 false)
  call void @llvm.lifetime.start.p0(i64 32, ptr %10) #6
  %20 = load ptr, ptr %4, align 8, !tbaa !5
  %21 = call i32 @strcmp(ptr noundef %20, ptr noundef @.str.12) #7
  %22 = icmp eq i32 %21, 0
  br i1 %22, label %23, label %256

23:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %24

24:                                               ; preds = %252, %23
  %25 = load i32, ptr %11, align 4, !tbaa !9
  %26 = load ptr, ptr %5, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.SectionStr, ptr %26, i32 0, i32 8
  %28 = getelementptr inbounds %struct.ObstructionStr, ptr %27, i32 0, i32 1
  %29 = load i32, ptr %28, align 4, !tbaa !11
  %30 = icmp slt i32 %25, %29
  br i1 %30, label %32, label %31

31:                                               ; preds = %24
  store i32 2, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %255

32:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %33 = load ptr, ptr %5, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.SectionStr, ptr %33, i32 0, i32 8
  %35 = getelementptr inbounds %struct.ObstructionStr, ptr %34, i32 0, i32 4
  %36 = load ptr, ptr %35, align 8, !tbaa !24
  %37 = load i32, ptr %11, align 4, !tbaa !9
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds %struct.AtomStr, ptr %36, i64 %38
  store ptr %39, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  store i32 1, ptr %14, align 4, !tbaa !9
  br label %40

40:                                               ; preds = %248, %32
  %41 = load i32, ptr %14, align 4, !tbaa !9
  %42 = icmp sle i32 %41, 3
  br i1 %42, label %44, label %43

43:                                               ; preds = %40
  store i32 5, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %251

44:                                               ; preds = %40
  %45 = load ptr, ptr %5, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.SectionStr, ptr %45, i32 0, i32 8
  %47 = getelementptr inbounds %struct.ObstructionStr, ptr %46, i32 0, i32 3
  %48 = load ptr, ptr %47, align 8, !tbaa !25
  %49 = load i32, ptr %11, align 4, !tbaa !9
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds ptr, ptr %48, i64 %50
  %52 = load ptr, ptr %51, align 8, !tbaa !5
  %53 = load i32, ptr %14, align 4, !tbaa !9
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds double, ptr %52, i64 %54
  %56 = load double, ptr %55, align 8, !tbaa !26
  %57 = fcmp olt double %56, 0.000000e+00
  br i1 %57, label %58, label %59

58:                                               ; preds = %44
  br label %248

59:                                               ; preds = %44
  %60 = load ptr, ptr %5, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.SectionStr, ptr %60, i32 0, i32 8
  %62 = getelementptr inbounds %struct.ObstructionStr, ptr %61, i32 0, i32 3
  %63 = load ptr, ptr %62, align 8, !tbaa !25
  %64 = load i32, ptr %11, align 4, !tbaa !9
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds ptr, ptr %63, i64 %65
  %67 = load ptr, ptr %66, align 8, !tbaa !5
  %68 = getelementptr inbounds double, ptr %67, i64 1
  %69 = load double, ptr %68, align 8, !tbaa !26
  %70 = getelementptr inbounds [4 x double], ptr %9, i64 0, i64 1
  store double %69, ptr %70, align 8, !tbaa !26
  %71 = load ptr, ptr %5, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.SectionStr, ptr %71, i32 0, i32 8
  %73 = getelementptr inbounds %struct.ObstructionStr, ptr %72, i32 0, i32 3
  %74 = load ptr, ptr %73, align 8, !tbaa !25
  %75 = load i32, ptr %11, align 4, !tbaa !9
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds ptr, ptr %74, i64 %76
  %78 = load ptr, ptr %77, align 8, !tbaa !5
  %79 = getelementptr inbounds double, ptr %78, i64 2
  %80 = load double, ptr %79, align 8, !tbaa !26
  %81 = getelementptr inbounds [4 x double], ptr %9, i64 0, i64 2
  store double %80, ptr %81, align 16, !tbaa !26
  %82 = load ptr, ptr %5, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.SectionStr, ptr %82, i32 0, i32 8
  %84 = getelementptr inbounds %struct.ObstructionStr, ptr %83, i32 0, i32 3
  %85 = load ptr, ptr %84, align 8, !tbaa !25
  %86 = load i32, ptr %11, align 4, !tbaa !9
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds ptr, ptr %85, i64 %87
  %89 = load ptr, ptr %88, align 8, !tbaa !5
  %90 = getelementptr inbounds double, ptr %89, i64 3
  %91 = load double, ptr %90, align 8, !tbaa !26
  %92 = getelementptr inbounds [4 x double], ptr %9, i64 0, i64 3
  store double %91, ptr %92, align 8, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  store i32 1, ptr %15, align 4, !tbaa !9
  br label %93

93:                                               ; preds = %106, %59
  %94 = load i32, ptr %15, align 4, !tbaa !9
  %95 = icmp sle i32 %94, 3
  br i1 %95, label %97, label %96

96:                                               ; preds = %93
  store i32 8, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %109

97:                                               ; preds = %93
  %98 = load i32, ptr %15, align 4, !tbaa !9
  %99 = load i32, ptr %14, align 4, !tbaa !9
  %100 = icmp ne i32 %98, %99
  br i1 %100, label %101, label %105

101:                                              ; preds = %97
  %102 = load i32, ptr %15, align 4, !tbaa !9
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [4 x double], ptr %9, i64 0, i64 %103
  store double 0.000000e+00, ptr %104, align 8, !tbaa !26
  br label %105

105:                                              ; preds = %101, %97
  br label %106

106:                                              ; preds = %105
  %107 = load i32, ptr %15, align 4, !tbaa !9
  %108 = add nsw i32 %107, 1
  store i32 %108, ptr %15, align 4, !tbaa !9
  br label %93, !llvm.loop !27

109:                                              ; preds = %96
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  store i32 1, ptr %16, align 4, !tbaa !9
  br label %110

110:                                              ; preds = %244, %109
  %111 = load i32, ptr %16, align 4, !tbaa !9
  %112 = load i32, ptr @atomnum, align 4, !tbaa !9
  %113 = icmp sle i32 %111, %112
  br i1 %113, label %115, label %114

114:                                              ; preds = %110
  store i32 11, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  br label %247

115:                                              ; preds = %110
  %116 = load ptr, ptr @atom, align 8, !tbaa !5
  %117 = load i32, ptr %16, align 4, !tbaa !9
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds %struct.AtomStr, ptr %116, i64 %118
  %120 = getelementptr inbounds %struct.AtomStr, ptr %119, i32 0, i32 0
  %121 = load ptr, ptr %120, align 8, !tbaa !29
  %122 = getelementptr inbounds %struct.PropertyStr, ptr %121, i32 0, i32 1
  %123 = getelementptr inbounds [2 x [16 x i8]], ptr %122, i64 0, i64 0
  %124 = getelementptr inbounds [16 x i8], ptr %123, i64 0, i64 0
  %125 = call i32 @strcmp(ptr noundef %124, ptr noundef @.str.17) #7
  %126 = icmp eq i32 %125, 0
  br i1 %126, label %127, label %243

127:                                              ; preds = %115
  %128 = load ptr, ptr @atom, align 8, !tbaa !5
  %129 = load i32, ptr %16, align 4, !tbaa !9
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds %struct.AtomStr, ptr %128, i64 %130
  %132 = getelementptr inbounds %struct.AtomStr, ptr %131, i32 0, i32 0
  %133 = load ptr, ptr %132, align 8, !tbaa !29
  %134 = getelementptr inbounds %struct.PropertyStr, ptr %133, i32 0, i32 0
  %135 = getelementptr inbounds [8 x i8], ptr %134, i64 0, i64 0
  %136 = call i32 @strcmp(ptr noundef %135, ptr noundef @.str.18) #7
  %137 = icmp eq i32 %136, 0
  br i1 %137, label %138, label %243

138:                                              ; preds = %127
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %139 = load ptr, ptr @atom, align 8, !tbaa !5
  %140 = load i32, ptr %16, align 4, !tbaa !9
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds %struct.AtomStr, ptr %139, i64 %141
  store ptr %142, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  store double 0.000000e+00, ptr %18, align 8, !tbaa !26
  %143 = load ptr, ptr %17, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.AtomStr, ptr %143, i32 0, i32 1
  %145 = load ptr, ptr %144, align 8, !tbaa !30
  %146 = getelementptr inbounds %struct.DynamicStr, ptr %145, i32 0, i32 1
  %147 = getelementptr inbounds [4 x double], ptr %146, i64 0, i64 1
  %148 = load double, ptr %147, align 8, !tbaa !26
  %149 = getelementptr inbounds [4 x double], ptr %8, i64 0, i64 1
  store double %148, ptr %149, align 8, !tbaa !26
  %150 = load ptr, ptr %17, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.AtomStr, ptr %150, i32 0, i32 1
  %152 = load ptr, ptr %151, align 8, !tbaa !30
  %153 = getelementptr inbounds %struct.DynamicStr, ptr %152, i32 0, i32 1
  %154 = getelementptr inbounds [4 x double], ptr %153, i64 0, i64 2
  %155 = load double, ptr %154, align 8, !tbaa !26
  %156 = getelementptr inbounds [4 x double], ptr %8, i64 0, i64 2
  store double %155, ptr %156, align 16, !tbaa !26
  %157 = load ptr, ptr %17, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.AtomStr, ptr %157, i32 0, i32 1
  %159 = load ptr, ptr %158, align 8, !tbaa !30
  %160 = getelementptr inbounds %struct.DynamicStr, ptr %159, i32 0, i32 1
  %161 = getelementptr inbounds [4 x double], ptr %160, i64 0, i64 3
  %162 = load double, ptr %161, align 8, !tbaa !26
  %163 = getelementptr inbounds [4 x double], ptr %8, i64 0, i64 3
  store double %162, ptr %163, align 8, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  store i32 1, ptr %19, align 4, !tbaa !9
  br label %164

164:                                              ; preds = %177, %138
  %165 = load i32, ptr %19, align 4, !tbaa !9
  %166 = icmp sle i32 %165, 3
  br i1 %166, label %168, label %167

167:                                              ; preds = %164
  store i32 14, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  br label %180

168:                                              ; preds = %164
  %169 = load i32, ptr %19, align 4, !tbaa !9
  %170 = load i32, ptr %14, align 4, !tbaa !9
  %171 = icmp ne i32 %169, %170
  br i1 %171, label %172, label %176

172:                                              ; preds = %168
  %173 = load i32, ptr %19, align 4, !tbaa !9
  %174 = sext i32 %173 to i64
  %175 = getelementptr inbounds [4 x double], ptr %8, i64 0, i64 %174
  store double 0.000000e+00, ptr %175, align 8, !tbaa !26
  br label %176

176:                                              ; preds = %172, %168
  br label %177

177:                                              ; preds = %176
  %178 = load i32, ptr %19, align 4, !tbaa !9
  %179 = add nsw i32 %178, 1
  store i32 %179, ptr %19, align 4, !tbaa !9
  br label %164, !llvm.loop !31

180:                                              ; preds = %167
  %181 = getelementptr inbounds [4 x double], ptr %8, i64 0, i64 1
  %182 = load double, ptr %181, align 8, !tbaa !26
  %183 = getelementptr inbounds [4 x double], ptr %9, i64 0, i64 1
  %184 = load double, ptr %183, align 8, !tbaa !26
  %185 = fsub double %182, %184
  %186 = getelementptr inbounds [4 x double], ptr %10, i64 0, i64 1
  store double %185, ptr %186, align 8, !tbaa !26
  %187 = getelementptr inbounds [4 x double], ptr %8, i64 0, i64 2
  %188 = load double, ptr %187, align 16, !tbaa !26
  %189 = getelementptr inbounds [4 x double], ptr %9, i64 0, i64 2
  %190 = load double, ptr %189, align 16, !tbaa !26
  %191 = fsub double %188, %190
  %192 = getelementptr inbounds [4 x double], ptr %10, i64 0, i64 2
  store double %191, ptr %192, align 16, !tbaa !26
  %193 = getelementptr inbounds [4 x double], ptr %8, i64 0, i64 3
  %194 = load double, ptr %193, align 8, !tbaa !26
  %195 = getelementptr inbounds [4 x double], ptr %9, i64 0, i64 3
  %196 = load double, ptr %195, align 8, !tbaa !26
  %197 = fsub double %194, %196
  %198 = getelementptr inbounds [4 x double], ptr %10, i64 0, i64 3
  store double %197, ptr %198, align 8, !tbaa !26
  %199 = getelementptr inbounds [4 x double], ptr %10, i64 0, i64 1
  %200 = load double, ptr %199, align 8, !tbaa !26
  %201 = getelementptr inbounds [4 x double], ptr %10, i64 0, i64 1
  %202 = load double, ptr %201, align 8, !tbaa !26
  %203 = getelementptr inbounds [4 x double], ptr %10, i64 0, i64 2
  %204 = load double, ptr %203, align 16, !tbaa !26
  %205 = getelementptr inbounds [4 x double], ptr %10, i64 0, i64 2
  %206 = load double, ptr %205, align 16, !tbaa !26
  %207 = fmul double %204, %206
  %208 = call double @llvm.fmuladd.f64(double %200, double %202, double %207)
  %209 = getelementptr inbounds [4 x double], ptr %10, i64 0, i64 3
  %210 = load double, ptr %209, align 8, !tbaa !26
  %211 = getelementptr inbounds [4 x double], ptr %10, i64 0, i64 3
  %212 = load double, ptr %211, align 8, !tbaa !26
  %213 = call double @llvm.fmuladd.f64(double %210, double %212, double %208)
  store double %213, ptr %18, align 8, !tbaa !26
  %214 = load ptr, ptr @protein, align 8, !tbaa !5
  %215 = load ptr, ptr %17, align 8, !tbaa !5
  %216 = getelementptr inbounds %struct.AtomStr, ptr %215, i32 0, i32 0
  %217 = load ptr, ptr %216, align 8, !tbaa !29
  %218 = getelementptr inbounds %struct.PropertyStr, ptr %217, i32 0, i32 9
  %219 = getelementptr inbounds %struct.AtomSeqStr, ptr %218, i32 0, i32 1
  %220 = load i32, ptr %219, align 4, !tbaa !32
  %221 = sub nsw i32 %220, 1
  %222 = sext i32 %221 to i64
  %223 = getelementptr inbounds %struct.PepStr, ptr %214, i64 %222
  %224 = getelementptr inbounds %struct.PepStr, ptr %223, i32 0, i32 3
  %225 = load i32, ptr %224, align 4, !tbaa !35
  %226 = load ptr, ptr %17, align 8, !tbaa !5
  %227 = getelementptr inbounds %struct.AtomStr, ptr %226, i32 0, i32 0
  %228 = load ptr, ptr %227, align 8, !tbaa !29
  %229 = getelementptr inbounds %struct.PropertyStr, ptr %228, i32 0, i32 9
  %230 = getelementptr inbounds %struct.AtomSeqStr, ptr %229, i32 0, i32 2
  %231 = load i32, ptr %230, align 8, !tbaa !37
  %232 = add nsw i32 %225, %231
  store i32 %232, ptr %7, align 4, !tbaa !9
  %233 = load double, ptr %18, align 8, !tbaa !26
  %234 = call double @sqrt(double noundef %233) #6
  %235 = load ptr, ptr %6, align 8, !tbaa !5
  %236 = load i32, ptr %7, align 4, !tbaa !9
  %237 = sext i32 %236 to i64
  %238 = getelementptr inbounds ptr, ptr %235, i64 %237
  %239 = load ptr, ptr %238, align 8, !tbaa !5
  %240 = load i32, ptr %11, align 4, !tbaa !9
  %241 = sext i32 %240 to i64
  %242 = getelementptr inbounds double, ptr %239, i64 %241
  store double %234, ptr %242, align 8, !tbaa !26
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  br label %243

243:                                              ; preds = %180, %127, %115
  br label %244

244:                                              ; preds = %243
  %245 = load i32, ptr %16, align 4, !tbaa !9
  %246 = add nsw i32 %245, 1
  store i32 %246, ptr %16, align 4, !tbaa !9
  br label %110, !llvm.loop !38

247:                                              ; preds = %114
  br label %248

248:                                              ; preds = %247, %58
  %249 = load i32, ptr %14, align 4, !tbaa !9
  %250 = add nsw i32 %249, 1
  store i32 %250, ptr %14, align 4, !tbaa !9
  br label %40, !llvm.loop !39

251:                                              ; preds = %43
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  br label %252

252:                                              ; preds = %251
  %253 = load i32, ptr %11, align 4, !tbaa !9
  %254 = add nsw i32 %253, 1
  store i32 %254, ptr %11, align 4, !tbaa !9
  br label %24, !llvm.loop !40

255:                                              ; preds = %31
  br label %256

256:                                              ; preds = %255, %3
  store i32 1, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  ret void
}

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

; Function Attrs: nounwind
declare double @sqrt(double noundef) #5

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind willreturn memory(read) "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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }
attributes #7 = { nounwind willreturn memory(read) }

!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, !10, i64 212}
!12 = !{!"SectionStr", !13, i64 0, !14, i64 8, !14, i64 16, !14, i64 24, !14, i64 32, !7, i64 40, !15, i64 64, !17, i64 120, !18, i64 208, !19, i64 240, !20, i64 288}
!13 = !{!"long", !7, i64 0}
!14 = !{!"double", !7, i64 0}
!15 = !{!"WallStr", !7, i64 0, !7, i64 20, !16, i64 40}
!16 = !{!"AtomStr", !6, i64 0, !6, i64 8}
!17 = !{!"DynamicWallStr", !7, i64 0, !10, i64 16, !10, i64 20, !14, i64 24, !14, i64 32, !14, i64 40, !14, i64 48, !7, i64 56}
!18 = !{!"ObstructionStr", !10, i64 0, !10, i64 4, !6, i64 8, !6, i64 16, !6, i64 24}
!19 = !{!"TunnelStr", !10, i64 0, !14, i64 8, !14, i64 16, !14, i64 24, !16, i64 32}
!20 = !{!"FlowStr", !10, i64 0, !21, i64 8, !22, i64 40, !23, i64 88}
!21 = !{!"ConstVStr", !7, i64 0}
!22 = !{!"ForceStr", !7, i64 0, !6, i64 32, !6, i64 40}
!23 = !{!"ChargeStr", !10, i64 0, !10, i64 4, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32}
!24 = !{!12, !6, i64 232}
!25 = !{!12, !6, i64 224}
!26 = !{!14, !14, i64 0}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}
!29 = !{!16, !6, i64 0}
!30 = !{!16, !6, i64 8}
!31 = distinct !{!31, !28}
!32 = !{!33, !10, i64 108}
!33 = !{!"PropertyStr", !7, i64 0, !7, i64 8, !7, i64 40, !10, i64 48, !10, i64 52, !10, i64 56, !14, i64 64, !14, i64 72, !7, i64 80, !34, i64 104, !6, i64 120, !6, i64 128}
!34 = !{!"AtomSeqStr", !10, i64 0, !10, i64 4, !10, i64 8}
!35 = !{!36, !10, i64 12}
!36 = !{!"PepStr", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !14, i64 16}
!37 = !{!33, !10, i64 112}
!38 = distinct !{!38, !28}
!39 = distinct !{!39, !28}
!40 = distinct !{!40, !28}


; 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.AtomStr = type { ptr, ptr }
%struct.PepStr = type { i32, i32, i32, i32, double }

@atomnum = external local_unnamed_addr global i32, align 4
@protein = external local_unnamed_addr global ptr, align 8
@.str.12 = external hidden unnamed_addr constant [7 x i8], align 1
@atom = external local_unnamed_addr global ptr, align 8
@.str.17 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #0

; Function Attrs: nofree nounwind memory(readwrite, inaccessiblemem: none) uwtable
define dso_local void @CalParticle2Wall(ptr nocapture noundef readonly %0, ptr nocapture noundef readonly %1, ptr nocapture noundef readonly %2) local_unnamed_addr #1 {
  %4 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %0, ptr noundef nonnull dereferenceable(1) @.str.12) #4
  %5 = icmp eq i32 %4, 0
  br i1 %5, label %.preheader49, label %.loopexit50

.preheader49:                                     ; preds = %3
  %6 = getelementptr inbounds i8, ptr %1, i64 212
  %7 = load i32, ptr %6, align 4, !tbaa !5
  %8 = icmp sgt i32 %7, 0
  br i1 %8, label %.lr.ph, label %.loopexit50

.lr.ph:                                           ; preds = %.preheader49
  %9 = getelementptr inbounds i8, ptr %1, i64 224
  %10 = load ptr, ptr %9, align 8, !tbaa !22
  %wide.trip.count84 = zext nneg i32 %7 to i64
  br label %11

11:                                               ; preds = %.lr.ph, %.split57.us
  %indvars.iv81 = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next82, %.split57.us ]
  %12 = getelementptr inbounds ptr, ptr %10, i64 %indvars.iv81
  %13 = load ptr, ptr %12, align 8, !tbaa !23
  %14 = getelementptr inbounds i8, ptr %13, i64 16
  %15 = getelementptr inbounds i8, ptr %13, i64 24
  %16 = load i32, ptr @atomnum, align 4
  %.fr = freeze i32 %16
  %.not53 = icmp slt i32 %.fr, 1
  %17 = load ptr, ptr @atom, align 8
  br i1 %.not53, label %.split57.us, label %.split.preheader

.split.preheader:                                 ; preds = %11
  %18 = getelementptr inbounds i8, ptr %13, i64 8
  %19 = add nuw i32 %.fr, 1
  %20 = load double, ptr %18, align 8, !tbaa !24
  %21 = fcmp olt double %20, 0.000000e+00
  br i1 %21, label %..loopexit_crit_edge, label %.preheader

.split57.us:                                      ; preds = %112, %11, %..loopexit_crit_edge.1
  %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 %.loopexit50, label %11, !llvm.loop !25

.preheader:                                       ; preds = %.split.preheader
  %22 = load ptr, ptr @protein, align 8
  %invariant.gep = getelementptr i8, ptr %22, i64 -12
  %wide.trip.count = zext i32 %19 to i64
  br label %23

23:                                               ; preds = %.preheader, %50
  %indvars.iv = phi i64 [ 1, %.preheader ], [ %indvars.iv.next, %50 ]
  %24 = getelementptr inbounds %struct.AtomStr, ptr %17, i64 %indvars.iv
  %25 = load ptr, ptr %24, align 8, !tbaa !27
  %26 = getelementptr inbounds i8, ptr %25, i64 8
  %27 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %26, ptr noundef nonnull dereferenceable(1) @.str.17) #4
  %28 = icmp eq i32 %27, 0
  br i1 %28, label %29, label %50

29:                                               ; preds = %23
  %30 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %25, ptr noundef nonnull dereferenceable(1) @.str.18) #4
  %31 = icmp eq i32 %30, 0
  br i1 %31, label %32, label %50

32:                                               ; preds = %29
  %33 = getelementptr inbounds i8, ptr %24, i64 8
  %34 = load ptr, ptr %33, align 8, !tbaa !28
  %35 = getelementptr inbounds i8, ptr %34, i64 24
  %36 = load double, ptr %35, align 8, !tbaa !24
  %37 = fsub double %36, %20
  %38 = tail call double @llvm.fmuladd.f64(double %37, double %37, double 0.000000e+00)
  %39 = getelementptr inbounds i8, ptr %25, i64 108
  %40 = load i32, ptr %39, align 4, !tbaa !29
  %41 = sext i32 %40 to i64
  %gep = getelementptr %struct.PepStr, ptr %invariant.gep, i64 %41
  %42 = load i32, ptr %gep, align 4, !tbaa !32
  %43 = getelementptr inbounds i8, ptr %25, i64 112
  %44 = load i32, ptr %43, align 8, !tbaa !34
  %45 = add nsw i32 %44, %42
  %sqrt = tail call double @llvm.sqrt.f64(double %38)
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds ptr, ptr %2, i64 %46
  %48 = load ptr, ptr %47, align 8, !tbaa !23
  %49 = getelementptr inbounds double, ptr %48, i64 %indvars.iv81
  store double %sqrt, ptr %49, align 8, !tbaa !24
  br label %50

50:                                               ; preds = %23, %29, %32
  %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 %..loopexit_crit_edge, label %23, !llvm.loop !35

..loopexit_crit_edge:                             ; preds = %50, %.split.preheader
  %51 = load double, ptr %14, align 8, !tbaa !24
  %52 = fcmp olt double %51, 0.000000e+00
  br i1 %52, label %..loopexit_crit_edge.1, label %.preheader.1

.preheader.1:                                     ; preds = %..loopexit_crit_edge
  %53 = load ptr, ptr @protein, align 8
  %invariant.gep.1 = getelementptr i8, ptr %53, i64 -12
  %wide.trip.count.1 = zext i32 %19 to i64
  br label %54

54:                                               ; preds = %81, %.preheader.1
  %indvars.iv.1 = phi i64 [ 1, %.preheader.1 ], [ %indvars.iv.next.1, %81 ]
  %55 = getelementptr inbounds %struct.AtomStr, ptr %17, i64 %indvars.iv.1
  %56 = load ptr, ptr %55, align 8, !tbaa !27
  %57 = getelementptr inbounds i8, ptr %56, i64 8
  %58 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %57, ptr noundef nonnull dereferenceable(1) @.str.17) #4
  %59 = icmp eq i32 %58, 0
  br i1 %59, label %60, label %81

60:                                               ; preds = %54
  %61 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %56, ptr noundef nonnull dereferenceable(1) @.str.18) #4
  %62 = icmp eq i32 %61, 0
  br i1 %62, label %63, label %81

63:                                               ; preds = %60
  %64 = getelementptr inbounds i8, ptr %55, i64 8
  %65 = load ptr, ptr %64, align 8, !tbaa !28
  %66 = getelementptr inbounds i8, ptr %65, i64 32
  %67 = load double, ptr %66, align 8, !tbaa !24
  %68 = fsub double %67, %51
  %69 = fmul double %68, %68
  %70 = getelementptr inbounds i8, ptr %56, i64 108
  %71 = load i32, ptr %70, align 4, !tbaa !29
  %72 = sext i32 %71 to i64
  %gep.1 = getelementptr %struct.PepStr, ptr %invariant.gep.1, i64 %72
  %73 = load i32, ptr %gep.1, align 4, !tbaa !32
  %74 = getelementptr inbounds i8, ptr %56, i64 112
  %75 = load i32, ptr %74, align 8, !tbaa !34
  %76 = add nsw i32 %75, %73
  %sqrt.1 = tail call double @llvm.sqrt.f64(double %69)
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds ptr, ptr %2, i64 %77
  %79 = load ptr, ptr %78, align 8, !tbaa !23
  %80 = getelementptr inbounds double, ptr %79, i64 %indvars.iv81
  store double %sqrt.1, ptr %80, align 8, !tbaa !24
  br label %81

81:                                               ; preds = %63, %60, %54
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv.1, 1
  %exitcond.1.not = icmp eq i64 %indvars.iv.next.1, %wide.trip.count.1
  br i1 %exitcond.1.not, label %..loopexit_crit_edge.1, label %54, !llvm.loop !35

..loopexit_crit_edge.1:                           ; preds = %81, %..loopexit_crit_edge
  %82 = load double, ptr %15, align 8, !tbaa !24
  %83 = fcmp olt double %82, 0.000000e+00
  br i1 %83, label %.split57.us, label %.preheader.2

.preheader.2:                                     ; preds = %..loopexit_crit_edge.1
  %84 = load ptr, ptr @protein, align 8
  %invariant.gep.2 = getelementptr i8, ptr %84, i64 -12
  %wide.trip.count.2 = zext i32 %19 to i64
  br label %85

85:                                               ; preds = %112, %.preheader.2
  %indvars.iv.2 = phi i64 [ 1, %.preheader.2 ], [ %indvars.iv.next.2, %112 ]
  %86 = getelementptr inbounds %struct.AtomStr, ptr %17, i64 %indvars.iv.2
  %87 = load ptr, ptr %86, align 8, !tbaa !27
  %88 = getelementptr inbounds i8, ptr %87, i64 8
  %89 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %88, ptr noundef nonnull dereferenceable(1) @.str.17) #4
  %90 = icmp eq i32 %89, 0
  br i1 %90, label %91, label %112

91:                                               ; preds = %85
  %92 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %87, ptr noundef nonnull dereferenceable(1) @.str.18) #4
  %93 = icmp eq i32 %92, 0
  br i1 %93, label %94, label %112

94:                                               ; preds = %91
  %95 = getelementptr inbounds i8, ptr %86, i64 8
  %96 = load ptr, ptr %95, align 8, !tbaa !28
  %97 = getelementptr inbounds i8, ptr %96, i64 40
  %98 = load double, ptr %97, align 8, !tbaa !24
  %99 = fsub double %98, %82
  %100 = tail call double @llvm.fmuladd.f64(double %99, double %99, double 0.000000e+00)
  %101 = getelementptr inbounds i8, ptr %87, i64 108
  %102 = load i32, ptr %101, align 4, !tbaa !29
  %103 = sext i32 %102 to i64
  %gep.2 = getelementptr %struct.PepStr, ptr %invariant.gep.2, i64 %103
  %104 = load i32, ptr %gep.2, align 4, !tbaa !32
  %105 = getelementptr inbounds i8, ptr %87, i64 112
  %106 = load i32, ptr %105, align 8, !tbaa !34
  %107 = add nsw i32 %106, %104
  %sqrt.2 = tail call double @llvm.sqrt.f64(double %100)
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds ptr, ptr %2, i64 %108
  %110 = load ptr, ptr %109, align 8, !tbaa !23
  %111 = getelementptr inbounds double, ptr %110, i64 %indvars.iv81
  store double %sqrt.2, ptr %111, align 8, !tbaa !24
  br label %112

112:                                              ; preds = %94, %91, %85
  %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv.2, 1
  %exitcond.2.not = icmp eq i64 %indvars.iv.next.2, %wide.trip.count.2
  br i1 %exitcond.2.not, label %.split57.us, label %85, !llvm.loop !35

.loopexit50:                                      ; preds = %.split57.us, %.preheader49, %3
  ret void
}

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

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

attributes #0 = { mustprogress nofree nounwind willreturn memory(argmem: read) "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 = { nofree nounwind memory(readwrite, inaccessiblemem: none) 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 #2 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { nounwind willreturn memory(read) }

!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, !15, i64 212}
!6 = !{!"SectionStr", !7, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !8, i64 40, !11, i64 64, !14, i64 120, !16, i64 208, !17, i64 240, !18, i64 288}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"double", !8, i64 0}
!11 = !{!"WallStr", !8, i64 0, !8, i64 20, !12, i64 40}
!12 = !{!"AtomStr", !13, i64 0, !13, i64 8}
!13 = !{!"any pointer", !8, i64 0}
!14 = !{!"DynamicWallStr", !8, i64 0, !15, i64 16, !15, i64 20, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !8, i64 56}
!15 = !{!"int", !8, i64 0}
!16 = !{!"ObstructionStr", !15, i64 0, !15, i64 4, !13, i64 8, !13, i64 16, !13, i64 24}
!17 = !{!"TunnelStr", !15, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !12, i64 32}
!18 = !{!"FlowStr", !15, i64 0, !19, i64 8, !20, i64 40, !21, i64 88}
!19 = !{!"ConstVStr", !8, i64 0}
!20 = !{!"ForceStr", !8, i64 0, !13, i64 32, !13, i64 40}
!21 = !{!"ChargeStr", !15, i64 0, !15, i64 4, !13, i64 8, !13, i64 16, !13, i64 24, !13, i64 32}
!22 = !{!6, !13, i64 224}
!23 = !{!13, !13, i64 0}
!24 = !{!10, !10, i64 0}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{!12, !13, i64 0}
!28 = !{!12, !13, i64 8}
!29 = !{!30, !15, i64 108}
!30 = !{!"PropertyStr", !8, i64 0, !8, i64 8, !8, i64 40, !15, i64 48, !15, i64 52, !15, i64 56, !10, i64 64, !10, i64 72, !8, i64 80, !31, i64 104, !13, i64 120, !13, i64 128}
!31 = !{!"AtomSeqStr", !15, i64 0, !15, i64 4, !15, i64 8}
!32 = !{!33, !15, i64 12}
!33 = !{!"PepStr", !15, i64 0, !15, i64 4, !15, i64 8, !15, i64 12, !10, i64 16}
!34 = !{!30, !15, i64 112}
!35 = distinct !{!35, !26}


; Effective O3 passes: ADCEPass,AggressiveInstCombinePass,BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass