; LLVM IR from alexzheng42/sDMD :: src (Initialization)

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

@.str.2 = external hidden unnamed_addr constant [71 x i8], align 1
@datadir = external global [1024 x i8], align 16
@preBond = external global %struct.PreBondStr, align 8
@.str.78 = external hidden unnamed_addr constant [4 x i8], align 1
@wallExist = external global [20 x i8], align 16
@.str.88 = external hidden unnamed_addr constant [3 x i8], align 1
@obstObj = external global %struct.ObstructionStr, align 8
@.str.90 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.94 = external hidden unnamed_addr constant [2 x i8], align 1
@atom = external global ptr, align 8
@connectionMap = external global ptr, align 8
@HBnumformed = external global i32, align 4
@.str.110 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.129 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.146 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.173 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.254 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.255 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.256 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.257 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.258 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.259 = external hidden unnamed_addr constant [86 x i8], align 1
@.str.260 = external hidden unnamed_addr constant [5 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 allocsize(0,1)
declare noalias ptr @calloc(i64 noundef, i64 noundef) #1

; Function Attrs: nounwind willreturn memory(read)
declare i32 @strcmp(ptr noundef, ptr noundef) #2

declare i32 @printf(ptr noundef, ...) #3

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

; Function Attrs: inlinehint nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr noundef nonnull) #5

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #6

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

declare i32 @fclose(ptr noundef) #3

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

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

; Function Attrs: nounwind
declare i32 @__isoc99_sscanf(ptr noundef, ptr noundef, ...) #4

; Function Attrs: nounwind uwtable
define dso_local void @ReadPreBonds(ptr noundef %0) #7 {
  %2 = alloca ptr, align 8
  %3 = alloca [1024 x i8], align 16
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca [2 x [32 x i8]], align 16
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1024, ptr %3) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #8
  %17 = getelementptr inbounds [1024 x i8], ptr %3, i64 0, i64 0
  %18 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %17, ptr noundef @.str.254, ptr noundef @datadir) #8
  %19 = getelementptr inbounds [1024 x i8], ptr %3, i64 0, i64 0
  %20 = call noalias ptr @fopen(ptr noundef %19, ptr noundef @.str.94)
  store ptr %20, ptr %5, align 8, !tbaa !5
  %21 = load ptr, ptr %5, align 8, !tbaa !5
  %22 = icmp eq ptr %21, null
  br i1 %22, label %23, label %25

23:                                               ; preds = %1
  %24 = call i32 (ptr, ...) @printf(ptr noundef @.str.255)
  store i32 1, ptr %6, align 4
  br label %357

25:                                               ; preds = %1
  %26 = call noalias ptr @calloc(i64 noundef 1024, i64 noundef 1) #9
  store ptr %26, ptr %4, align 8, !tbaa !5
  br label %27

27:                                               ; preds = %38, %25
  %28 = load ptr, ptr %4, align 8, !tbaa !5
  %29 = load ptr, ptr %5, align 8, !tbaa !5
  %30 = call ptr @fgets(ptr noundef %28, i32 noundef 1024, ptr noundef %29)
  %31 = icmp ne ptr %30, null
  br i1 %31, label %32, label %42

32:                                               ; preds = %27
  %33 = load ptr, ptr %4, align 8, !tbaa !5
  %34 = getelementptr inbounds i8, ptr %33, i64 0
  %35 = load i8, ptr %34, align 1, !tbaa !9
  %36 = sext i8 %35 to i32
  %37 = icmp eq i32 %36, 35
  br i1 %37, label %38, label %39

38:                                               ; preds = %32
  br label %27, !llvm.loop !10

39:                                               ; preds = %32
  %40 = load ptr, ptr %4, align 8, !tbaa !5
  %41 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef %40, ptr noundef @.str.146, ptr noundef getelementptr inbounds (%struct.PreBondStr, ptr @preBond, i32 0, i32 1)) #8
  br label %42

42:                                               ; preds = %39, %27
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #8
  store i32 0, ptr %7, align 4, !tbaa !12
  br label %43

43:                                               ; preds = %350, %42
  %44 = load i32, ptr %7, align 4, !tbaa !12
  %45 = load i32, ptr getelementptr inbounds (%struct.PreBondStr, ptr @preBond, i32 0, i32 1), align 4, !tbaa !14
  %46 = icmp slt i32 %44, %45
  br i1 %46, label %48, label %47

47:                                               ; preds = %43
  store i32 4, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  br label %353

48:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #8
  store i32 0, ptr %8, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 64, ptr %9) #8
  %49 = load ptr, ptr %4, align 8, !tbaa !5
  %50 = load ptr, ptr %5, align 8, !tbaa !5
  %51 = call ptr @fgets(ptr noundef %49, i32 noundef 1024, ptr noundef %50)
  %52 = load ptr, ptr %4, align 8, !tbaa !5
  %53 = getelementptr inbounds [2 x [32 x i8]], ptr %9, i64 0, i64 0
  %54 = getelementptr inbounds [32 x i8], ptr %53, i64 0, i64 0
  %55 = getelementptr inbounds [2 x [32 x i8]], ptr %9, i64 0, i64 1
  %56 = getelementptr inbounds [32 x i8], ptr %55, i64 0, i64 0
  %57 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef %52, ptr noundef @.str.110, ptr noundef %54, ptr noundef %56, ptr noundef %8) #8
  %58 = getelementptr inbounds [2 x [32 x i8]], ptr %9, i64 0, i64 0
  %59 = getelementptr inbounds [32 x i8], ptr %58, i64 0, i64 0
  %60 = call i32 @strcmp(ptr noundef %59, ptr noundef @.str.256) #10
  %61 = icmp ne i32 %60, 0
  br i1 %61, label %62, label %309

62:                                               ; preds = %48
  %63 = load ptr, ptr %2, align 8, !tbaa !5
  %64 = call i32 @strcmp(ptr noundef %63, ptr noundef @.str.90) #10
  %65 = icmp ne i32 %64, 0
  br i1 %65, label %66, label %309

66:                                               ; preds = %62
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #8
  %67 = getelementptr inbounds [2 x [32 x i8]], ptr %9, i64 0, i64 0
  %68 = getelementptr inbounds [32 x i8], ptr %67, i64 0, i64 0
  %69 = call i32 @atoi(ptr noundef %68) #10
  store i32 %69, ptr %10, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #8
  %70 = getelementptr inbounds [2 x [32 x i8]], ptr %9, i64 0, i64 1
  %71 = getelementptr inbounds [32 x i8], ptr %70, i64 0, i64 0
  %72 = call i32 @atoi(ptr noundef %71) #10
  store i32 %72, ptr %11, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #8
  %73 = load ptr, ptr @atom, align 8, !tbaa !5
  %74 = load i32, ptr %10, align 4, !tbaa !12
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds %struct.AtomStr, ptr %73, i64 %75
  store ptr %76, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #8
  %77 = load ptr, ptr @atom, align 8, !tbaa !5
  %78 = load i32, ptr %11, align 4, !tbaa !12
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds %struct.AtomStr, ptr %77, i64 %79
  store ptr %80, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #8
  %81 = load ptr, ptr @atom, align 8, !tbaa !5
  %82 = load ptr, ptr %12, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.AtomStr, ptr %82, i32 0, i32 1
  %84 = load ptr, ptr %83, align 8, !tbaa !17
  %85 = getelementptr inbounds %struct.DynamicStr, ptr %84, i32 0, i32 3
  %86 = getelementptr inbounds %struct.HBStr, ptr %85, i32 0, i32 1
  %87 = load i32, ptr %86, align 4, !tbaa !19
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds %struct.AtomStr, ptr %81, i64 %88
  store ptr %89, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #8
  %90 = load ptr, ptr @atom, align 8, !tbaa !5
  %91 = load ptr, ptr %13, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.AtomStr, ptr %91, i32 0, i32 1
  %93 = load ptr, ptr %92, align 8, !tbaa !17
  %94 = getelementptr inbounds %struct.DynamicStr, ptr %93, i32 0, i32 3
  %95 = getelementptr inbounds %struct.HBStr, ptr %94, i32 0, i32 1
  %96 = load i32, ptr %95, align 4, !tbaa !19
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds %struct.AtomStr, ptr %90, i64 %97
  store ptr %98, ptr %15, align 8, !tbaa !5
  %99 = load ptr, ptr %12, align 8, !tbaa !5
  %100 = load ptr, ptr %13, align 8, !tbaa !5
  %101 = call i32 @CheckPreBondAvailability(ptr noundef %99, ptr noundef %100, ptr noundef null, ptr noundef @.str.257)
  %102 = icmp ne i32 %101, 0
  br i1 %102, label %103, label %304

103:                                              ; preds = %66
  %104 = load ptr, ptr %15, align 8, !tbaa !5
  %105 = load ptr, ptr %12, align 8, !tbaa !5
  %106 = load ptr, ptr %13, align 8, !tbaa !5
  %107 = call i32 @CheckPreBondAvailability(ptr noundef %104, ptr noundef %105, ptr noundef %106, ptr noundef @.str.258)
  %108 = icmp ne i32 %107, 0
  br i1 %108, label %109, label %304

109:                                              ; preds = %103
  %110 = load ptr, ptr %14, align 8, !tbaa !5
  %111 = load ptr, ptr %13, align 8, !tbaa !5
  %112 = load ptr, ptr %12, align 8, !tbaa !5
  %113 = call i32 @CheckPreBondAvailability(ptr noundef %110, ptr noundef %111, ptr noundef %112, ptr noundef @.str.258)
  %114 = icmp ne i32 %113, 0
  br i1 %114, label %115, label %304

115:                                              ; preds = %109
  %116 = load i32, ptr %11, align 4, !tbaa !12
  %117 = load ptr, ptr %12, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.AtomStr, ptr %117, i32 0, i32 1
  %119 = load ptr, ptr %118, align 8, !tbaa !17
  %120 = getelementptr inbounds %struct.DynamicStr, ptr %119, i32 0, i32 3
  %121 = getelementptr inbounds %struct.HBStr, ptr %120, i32 0, i32 0
  store i32 %116, ptr %121, align 8, !tbaa !25
  %122 = load i32, ptr %10, align 4, !tbaa !12
  %123 = load ptr, ptr %13, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.AtomStr, ptr %123, i32 0, i32 1
  %125 = load ptr, ptr %124, align 8, !tbaa !17
  %126 = getelementptr inbounds %struct.DynamicStr, ptr %125, i32 0, i32 3
  %127 = getelementptr inbounds %struct.HBStr, ptr %126, i32 0, i32 0
  store i32 %122, ptr %127, align 8, !tbaa !25
  %128 = load ptr, ptr %12, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.AtomStr, ptr %128, i32 0, i32 0
  %130 = load ptr, ptr %129, align 8, !tbaa !26
  %131 = getelementptr inbounds %struct.PropertyStr, ptr %130, i32 0, i32 4
  %132 = load i32, ptr %131, align 4, !tbaa !27
  %133 = call i32 @AtomTypeChange(i32 noundef %132, i32 noundef 1)
  %134 = load ptr, ptr %12, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.AtomStr, ptr %134, i32 0, i32 0
  %136 = load ptr, ptr %135, align 8, !tbaa !26
  %137 = getelementptr inbounds %struct.PropertyStr, ptr %136, i32 0, i32 4
  store i32 %133, ptr %137, align 4, !tbaa !27
  %138 = load ptr, ptr %13, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.AtomStr, ptr %138, i32 0, i32 0
  %140 = load ptr, ptr %139, align 8, !tbaa !26
  %141 = getelementptr inbounds %struct.PropertyStr, ptr %140, i32 0, i32 4
  %142 = load i32, ptr %141, align 4, !tbaa !27
  %143 = call i32 @AtomTypeChange(i32 noundef %142, i32 noundef 1)
  %144 = load ptr, ptr %13, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.AtomStr, ptr %144, i32 0, i32 0
  %146 = load ptr, ptr %145, align 8, !tbaa !26
  %147 = getelementptr inbounds %struct.PropertyStr, ptr %146, i32 0, i32 4
  store i32 %143, ptr %147, align 4, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  %148 = load ptr, ptr %12, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.AtomStr, ptr %148, i32 0, i32 1
  %150 = load ptr, ptr %149, align 8, !tbaa !17
  %151 = getelementptr inbounds %struct.DynamicStr, ptr %150, i32 0, i32 4
  %152 = getelementptr inbounds %struct.HBNeighborStr, ptr %151, i32 0, i32 2
  %153 = load i32, ptr %152, align 8, !tbaa !30
  %154 = add nsw i32 %153, 1
  store i32 %154, ptr %152, align 8, !tbaa !30
  store i32 %154, ptr %16, align 4, !tbaa !12
  %155 = load ptr, ptr %13, align 8, !tbaa !5
  %156 = getelementptr inbounds %struct.AtomStr, ptr %155, i32 0, i32 1
  %157 = load ptr, ptr %156, align 8, !tbaa !17
  %158 = getelementptr inbounds %struct.DynamicStr, ptr %157, i32 0, i32 3
  %159 = getelementptr inbounds %struct.HBStr, ptr %158, i32 0, i32 1
  %160 = load i32, ptr %159, align 4, !tbaa !19
  %161 = load ptr, ptr %12, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.AtomStr, ptr %161, i32 0, i32 1
  %163 = load ptr, ptr %162, align 8, !tbaa !17
  %164 = getelementptr inbounds %struct.DynamicStr, ptr %163, i32 0, i32 4
  %165 = getelementptr inbounds %struct.HBNeighborStr, ptr %164, i32 0, i32 0
  %166 = load i32, ptr %16, align 4, !tbaa !12
  %167 = sext i32 %166 to i64
  %168 = getelementptr inbounds [5 x i32], ptr %165, i64 0, i64 %167
  store i32 %160, ptr %168, align 4, !tbaa !12
  %169 = load ptr, ptr %13, align 8, !tbaa !5
  %170 = getelementptr inbounds %struct.AtomStr, ptr %169, i32 0, i32 1
  %171 = load ptr, ptr %170, align 8, !tbaa !17
  %172 = getelementptr inbounds %struct.DynamicStr, ptr %171, i32 0, i32 4
  %173 = getelementptr inbounds %struct.HBNeighborStr, ptr %172, i32 0, i32 2
  %174 = load i32, ptr %173, align 8, !tbaa !30
  %175 = add nsw i32 %174, 1
  store i32 %175, ptr %173, align 8, !tbaa !30
  store i32 %175, ptr %16, align 4, !tbaa !12
  %176 = load ptr, ptr %12, align 8, !tbaa !5
  %177 = getelementptr inbounds %struct.AtomStr, ptr %176, i32 0, i32 1
  %178 = load ptr, ptr %177, align 8, !tbaa !17
  %179 = getelementptr inbounds %struct.DynamicStr, ptr %178, i32 0, i32 3
  %180 = getelementptr inbounds %struct.HBStr, ptr %179, i32 0, i32 1
  %181 = load i32, ptr %180, align 4, !tbaa !19
  %182 = load ptr, ptr %13, align 8, !tbaa !5
  %183 = getelementptr inbounds %struct.AtomStr, ptr %182, i32 0, i32 1
  %184 = load ptr, ptr %183, align 8, !tbaa !17
  %185 = getelementptr inbounds %struct.DynamicStr, ptr %184, i32 0, i32 4
  %186 = getelementptr inbounds %struct.HBNeighborStr, ptr %185, i32 0, i32 0
  %187 = load i32, ptr %16, align 4, !tbaa !12
  %188 = sext i32 %187 to i64
  %189 = getelementptr inbounds [5 x i32], ptr %186, i64 0, i64 %188
  store i32 %181, ptr %189, align 4, !tbaa !12
  %190 = load ptr, ptr %14, align 8, !tbaa !5
  %191 = getelementptr inbounds %struct.AtomStr, ptr %190, i32 0, i32 1
  %192 = load ptr, ptr %191, align 8, !tbaa !17
  %193 = getelementptr inbounds %struct.DynamicStr, ptr %192, i32 0, i32 4
  %194 = getelementptr inbounds %struct.HBNeighborStr, ptr %193, i32 0, i32 2
  %195 = load i32, ptr %194, align 8, !tbaa !30
  %196 = add nsw i32 %195, 1
  store i32 %196, ptr %194, align 8, !tbaa !30
  store i32 %196, ptr %16, align 4, !tbaa !12
  %197 = load i32, ptr %11, align 4, !tbaa !12
  %198 = load ptr, ptr %14, align 8, !tbaa !5
  %199 = getelementptr inbounds %struct.AtomStr, ptr %198, i32 0, i32 1
  %200 = load ptr, ptr %199, align 8, !tbaa !17
  %201 = getelementptr inbounds %struct.DynamicStr, ptr %200, i32 0, i32 4
  %202 = getelementptr inbounds %struct.HBNeighborStr, ptr %201, i32 0, i32 0
  %203 = load i32, ptr %16, align 4, !tbaa !12
  %204 = sext i32 %203 to i64
  %205 = getelementptr inbounds [5 x i32], ptr %202, i64 0, i64 %204
  store i32 %197, ptr %205, align 4, !tbaa !12
  %206 = load ptr, ptr %15, align 8, !tbaa !5
  %207 = getelementptr inbounds %struct.AtomStr, ptr %206, i32 0, i32 1
  %208 = load ptr, ptr %207, align 8, !tbaa !17
  %209 = getelementptr inbounds %struct.DynamicStr, ptr %208, i32 0, i32 4
  %210 = getelementptr inbounds %struct.HBNeighborStr, ptr %209, i32 0, i32 2
  %211 = load i32, ptr %210, align 8, !tbaa !30
  %212 = add nsw i32 %211, 1
  store i32 %212, ptr %210, align 8, !tbaa !30
  store i32 %212, ptr %16, align 4, !tbaa !12
  %213 = load i32, ptr %10, align 4, !tbaa !12
  %214 = load ptr, ptr %15, align 8, !tbaa !5
  %215 = getelementptr inbounds %struct.AtomStr, ptr %214, i32 0, i32 1
  %216 = load ptr, ptr %215, align 8, !tbaa !17
  %217 = getelementptr inbounds %struct.DynamicStr, ptr %216, i32 0, i32 4
  %218 = getelementptr inbounds %struct.HBNeighborStr, ptr %217, i32 0, i32 0
  %219 = load i32, ptr %16, align 4, !tbaa !12
  %220 = sext i32 %219 to i64
  %221 = getelementptr inbounds [5 x i32], ptr %218, i64 0, i64 %220
  store i32 %213, ptr %221, align 4, !tbaa !12
  %222 = load ptr, ptr @connectionMap, align 8, !tbaa !5
  %223 = load i32, ptr %10, align 4, !tbaa !12
  %224 = sext i32 %223 to i64
  %225 = getelementptr inbounds ptr, ptr %222, i64 %224
  %226 = load ptr, ptr %225, align 8, !tbaa !5
  %227 = load i32, ptr %11, align 4, !tbaa !12
  %228 = sext i32 %227 to i64
  %229 = getelementptr inbounds i32, ptr %226, i64 %228
  %230 = load i32, ptr %229, align 4, !tbaa !12
  %231 = xor i32 %230, 4
  store i32 %231, ptr %229, align 4, !tbaa !12
  %232 = load ptr, ptr @connectionMap, align 8, !tbaa !5
  %233 = load i32, ptr %11, align 4, !tbaa !12
  %234 = sext i32 %233 to i64
  %235 = getelementptr inbounds ptr, ptr %232, i64 %234
  %236 = load ptr, ptr %235, align 8, !tbaa !5
  %237 = load i32, ptr %10, align 4, !tbaa !12
  %238 = sext i32 %237 to i64
  %239 = getelementptr inbounds i32, ptr %236, i64 %238
  %240 = load i32, ptr %239, align 4, !tbaa !12
  %241 = xor i32 %240, 4
  store i32 %241, ptr %239, align 4, !tbaa !12
  %242 = load ptr, ptr @connectionMap, align 8, !tbaa !5
  %243 = load i32, ptr %10, align 4, !tbaa !12
  %244 = sext i32 %243 to i64
  %245 = getelementptr inbounds ptr, ptr %242, i64 %244
  %246 = load ptr, ptr %245, align 8, !tbaa !5
  %247 = load ptr, ptr %13, align 8, !tbaa !5
  %248 = getelementptr inbounds %struct.AtomStr, ptr %247, i32 0, i32 1
  %249 = load ptr, ptr %248, align 8, !tbaa !17
  %250 = getelementptr inbounds %struct.DynamicStr, ptr %249, i32 0, i32 3
  %251 = getelementptr inbounds %struct.HBStr, ptr %250, i32 0, i32 1
  %252 = load i32, ptr %251, align 4, !tbaa !19
  %253 = sext i32 %252 to i64
  %254 = getelementptr inbounds i32, ptr %246, i64 %253
  %255 = load i32, ptr %254, align 4, !tbaa !12
  %256 = xor i32 %255, 8
  store i32 %256, ptr %254, align 4, !tbaa !12
  %257 = load ptr, ptr @connectionMap, align 8, !tbaa !5
  %258 = load ptr, ptr %13, align 8, !tbaa !5
  %259 = getelementptr inbounds %struct.AtomStr, ptr %258, i32 0, i32 1
  %260 = load ptr, ptr %259, align 8, !tbaa !17
  %261 = getelementptr inbounds %struct.DynamicStr, ptr %260, i32 0, i32 3
  %262 = getelementptr inbounds %struct.HBStr, ptr %261, i32 0, i32 1
  %263 = load i32, ptr %262, align 4, !tbaa !19
  %264 = sext i32 %263 to i64
  %265 = getelementptr inbounds ptr, ptr %257, i64 %264
  %266 = load ptr, ptr %265, align 8, !tbaa !5
  %267 = load i32, ptr %10, align 4, !tbaa !12
  %268 = sext i32 %267 to i64
  %269 = getelementptr inbounds i32, ptr %266, i64 %268
  %270 = load i32, ptr %269, align 4, !tbaa !12
  %271 = xor i32 %270, 8
  store i32 %271, ptr %269, align 4, !tbaa !12
  %272 = load ptr, ptr @connectionMap, align 8, !tbaa !5
  %273 = load i32, ptr %11, align 4, !tbaa !12
  %274 = sext i32 %273 to i64
  %275 = getelementptr inbounds ptr, ptr %272, i64 %274
  %276 = load ptr, ptr %275, align 8, !tbaa !5
  %277 = load ptr, ptr %12, align 8, !tbaa !5
  %278 = getelementptr inbounds %struct.AtomStr, ptr %277, i32 0, i32 1
  %279 = load ptr, ptr %278, align 8, !tbaa !17
  %280 = getelementptr inbounds %struct.DynamicStr, ptr %279, i32 0, i32 3
  %281 = getelementptr inbounds %struct.HBStr, ptr %280, i32 0, i32 1
  %282 = load i32, ptr %281, align 4, !tbaa !19
  %283 = sext i32 %282 to i64
  %284 = getelementptr inbounds i32, ptr %276, i64 %283
  %285 = load i32, ptr %284, align 4, !tbaa !12
  %286 = xor i32 %285, 8
  store i32 %286, ptr %284, align 4, !tbaa !12
  %287 = load ptr, ptr @connectionMap, align 8, !tbaa !5
  %288 = load ptr, ptr %12, align 8, !tbaa !5
  %289 = getelementptr inbounds %struct.AtomStr, ptr %288, i32 0, i32 1
  %290 = load ptr, ptr %289, align 8, !tbaa !17
  %291 = getelementptr inbounds %struct.DynamicStr, ptr %290, i32 0, i32 3
  %292 = getelementptr inbounds %struct.HBStr, ptr %291, i32 0, i32 1
  %293 = load i32, ptr %292, align 4, !tbaa !19
  %294 = sext i32 %293 to i64
  %295 = getelementptr inbounds ptr, ptr %287, i64 %294
  %296 = load ptr, ptr %295, align 8, !tbaa !5
  %297 = load i32, ptr %11, align 4, !tbaa !12
  %298 = sext i32 %297 to i64
  %299 = getelementptr inbounds i32, ptr %296, i64 %298
  %300 = load i32, ptr %299, align 4, !tbaa !12
  %301 = xor i32 %300, 8
  store i32 %301, ptr %299, align 4, !tbaa !12
  %302 = load i32, ptr @HBnumformed, align 4, !tbaa !12
  %303 = add nsw i32 %302, 1
  store i32 %303, ptr @HBnumformed, align 4, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  br label %305

304:                                              ; preds = %109, %103, %66
  store i32 6, ptr %6, align 4
  br label %306

305:                                              ; preds = %115
  store i32 0, ptr %6, align 4
  br label %306

306:                                              ; preds = %305, %304
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  %307 = load i32, ptr %6, align 4
  switch i32 %307, label %347 [
    i32 0, label %308
  ]

308:                                              ; preds = %306
  br label %346

309:                                              ; preds = %62, %48
  %310 = call i32 @strcmp(ptr noundef @wallExist, ptr noundef @.str.88) #10
  %311 = icmp eq i32 %310, 0
  br i1 %311, label %312, label %320

312:                                              ; preds = %309
  %313 = load i32, ptr @obstObj, align 8, !tbaa !31
  %314 = icmp ne i32 %313, 0
  br i1 %314, label %320, label %315

315:                                              ; preds = %312
  %316 = getelementptr inbounds [2 x [32 x i8]], ptr %9, i64 0, i64 1
  %317 = getelementptr inbounds [32 x i8], ptr %316, i64 0, i64 0
  %318 = call i32 (ptr, ...) @printf(ptr noundef @.str.259, ptr noundef %317)
  %319 = call i32 (ptr, ...) @printf(ptr noundef @.str.129, ptr noundef @.str.2, i32 noundef 2235)
  call void @exit(i32 noundef 1) #11
  unreachable

320:                                              ; preds = %312, %309
  %321 = load ptr, ptr %4, align 8, !tbaa !5
  %322 = load i32, ptr %8, align 4, !tbaa !12
  %323 = sext i32 %322 to i64
  %324 = getelementptr inbounds i8, ptr %321, i64 %323
  %325 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef %324, ptr noundef @.str.173, ptr noundef getelementptr inbounds (%struct.PreBondStr, ptr @preBond, i32 0, i32 2)) #8
  %326 = load double, ptr getelementptr inbounds (%struct.PreBondStr, ptr @preBond, i32 0, i32 2), align 8, !tbaa !33
  %327 = load double, ptr getelementptr inbounds (%struct.PreBondStr, ptr @preBond, i32 0, i32 2), align 8, !tbaa !33
  %328 = fmul double %327, %326
  store double %328, ptr getelementptr inbounds (%struct.PreBondStr, ptr @preBond, i32 0, i32 2), align 8, !tbaa !33
  %329 = load ptr, ptr %2, align 8, !tbaa !5
  %330 = call i32 @strcmp(ptr noundef %329, ptr noundef @.str.78) #10
  %331 = icmp eq i32 %330, 0
  br i1 %331, label %332, label %345

332:                                              ; preds = %320
  %333 = load ptr, ptr @atom, align 8, !tbaa !5
  %334 = getelementptr inbounds [2 x [32 x i8]], ptr %9, i64 0, i64 1
  %335 = getelementptr inbounds [32 x i8], ptr %334, i64 0, i64 0
  %336 = call i32 @atoi(ptr noundef %335) #10
  %337 = sext i32 %336 to i64
  %338 = getelementptr inbounds %struct.AtomStr, ptr %333, i64 %337
  %339 = getelementptr inbounds %struct.AtomStr, ptr %338, i32 0, i32 0
  %340 = load ptr, ptr %339, align 8, !tbaa !26
  %341 = getelementptr inbounds %struct.PropertyStr, ptr %340, i32 0, i32 1
  %342 = getelementptr inbounds [2 x [16 x i8]], ptr %341, i64 0, i64 1
  %343 = getelementptr inbounds [16 x i8], ptr %342, i64 0, i64 0
  %344 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %343, ptr noundef @.str.260) #8
  br label %345

345:                                              ; preds = %332, %320
  br label %346

346:                                              ; preds = %345, %308
  store i32 0, ptr %6, align 4
  br label %347

347:                                              ; preds = %346, %306
  call void @llvm.lifetime.end.p0(i64 64, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  %348 = load i32, ptr %6, align 4
  switch i32 %348, label %358 [
    i32 0, label %349
    i32 6, label %350
  ]

349:                                              ; preds = %347
  br label %350

350:                                              ; preds = %349, %347
  %351 = load i32, ptr %7, align 4, !tbaa !12
  %352 = add nsw i32 %351, 1
  store i32 %352, ptr %7, align 4, !tbaa !12
  br label %43, !llvm.loop !34

353:                                              ; preds = %47
  %354 = load ptr, ptr %4, align 8, !tbaa !5
  call void @free(ptr noundef %354) #8
  %355 = load ptr, ptr %5, align 8, !tbaa !5
  %356 = call i32 @fclose(ptr noundef %355)
  store i32 1, ptr %6, align 4
  br label %357

357:                                              ; preds = %353, %23
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 1024, ptr %3) #8
  ret void

358:                                              ; preds = %347
  unreachable
}

; Function Attrs: nounwind
declare void @free(ptr noundef) #4

; Function Attrs: nounwind uwtable
declare dso_local i32 @CheckPreBondAvailability(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #7

declare i32 @AtomTypeChange(i32 noundef, i32 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 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 #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 "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 = { inlinehint nounwind willreturn memory(read) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { 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 #8 = { nounwind }
attributes #9 = { nounwind allocsize(0,1) }
attributes #10 = { nounwind willreturn memory(read) }
attributes #11 = { noreturn nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = !{!13, !13, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = !{!15, !13, i64 4}
!15 = !{!"PreBondStr", !13, i64 0, !13, i64 4, !16, i64 8}
!16 = !{!"double", !7, i64 0}
!17 = !{!18, !6, i64 8}
!18 = !{!"AtomStr", !6, i64 0, !6, i64 8}
!19 = !{!20, !13, i64 84}
!20 = !{!"DynamicStr", !7, i64 0, !7, i64 16, !7, i64 48, !21, i64 80, !22, i64 96, !23, i64 128}
!21 = !{!"HBStr", !13, i64 0, !13, i64 4, !7, i64 8, !13, i64 12}
!22 = !{!"HBNeighborStr", !7, i64 0, !13, i64 20, !13, i64 24}
!23 = !{!"InteractionEventStr", !13, i64 0, !24, i64 8, !24, i64 16, !16, i64 24, !16, i64 32, !13, i64 40, !13, i64 44}
!24 = !{!"long", !7, i64 0}
!25 = !{!20, !13, i64 80}
!26 = !{!18, !6, i64 0}
!27 = !{!28, !13, i64 52}
!28 = !{!"PropertyStr", !7, i64 0, !7, i64 8, !7, i64 40, !13, i64 48, !13, i64 52, !13, i64 56, !16, i64 64, !16, i64 72, !7, i64 80, !29, i64 104, !6, i64 120, !6, i64 128}
!29 = !{!"AtomSeqStr", !13, i64 0, !13, i64 4, !13, i64 8}
!30 = !{!20, !13, i64 120}
!31 = !{!32, !13, i64 0}
!32 = !{!"ObstructionStr", !13, i64 0, !13, i64 4, !6, i64 8, !6, i64 16, !6, i64 24}
!33 = !{!15, !16, i64 8}
!34 = distinct !{!34, !11}


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

@.str.2 = external hidden unnamed_addr constant [71 x i8], align 1
@datadir = external global [1024 x i8], align 16
@preBond = external global %struct.PreBondStr, align 8
@.str.78 = external hidden unnamed_addr constant [4 x i8], align 1
@wallExist = external global [20 x i8], align 16
@.str.88 = external hidden unnamed_addr constant [3 x i8], align 1
@obstObj = external local_unnamed_addr global %struct.ObstructionStr, align 8
@.str.90 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.94 = external hidden unnamed_addr constant [2 x i8], align 1
@atom = external local_unnamed_addr global ptr, align 8
@connectionMap = external local_unnamed_addr global ptr, align 8
@HBnumformed = external local_unnamed_addr global i32, align 4
@.str.110 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.129 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.146 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.173 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.254 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.255 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.256 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.257 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.258 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.259 = external hidden unnamed_addr constant [86 x i8], align 1
@.str.260 = external hidden unnamed_addr constant [5 x i8], align 1

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

; Function Attrs: mustprogress 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: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #2

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

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

; Function Attrs: inlinehint mustprogress nofree nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr nocapture noundef nonnull) local_unnamed_addr #4

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #5

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

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

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

; Function Attrs: nofree nounwind
declare noundef ptr @fgets(ptr noundef, i32 noundef, ptr nocapture noundef) local_unnamed_addr #3

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

; Function Attrs: nounwind uwtable
define dso_local void @ReadPreBonds(ptr nocapture noundef readonly %0) local_unnamed_addr #6 {
  %2 = alloca [1024 x i8], align 16
  %3 = alloca i32, align 4
  %4 = alloca [2 x [32 x i8]], align 16
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %2) #9
  %5 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %2, ptr noundef nonnull dereferenceable(1) @.str.254, ptr noundef nonnull @datadir) #9
  %6 = call noalias ptr @fopen(ptr noundef nonnull %2, ptr noundef nonnull @.str.94)
  %7 = icmp eq ptr %6, null
  br i1 %7, label %8, label %10

8:                                                ; preds = %1
  %9 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.255)
  br label %170

10:                                               ; preds = %1
  %11 = tail call noalias dereferenceable_or_null(1024) ptr @calloc(i64 noundef 1024, i64 noundef 1) #10
  br label %12

12:                                               ; preds = %14, %10
  %13 = tail call ptr @fgets(ptr noundef %11, i32 noundef 1024, ptr noundef nonnull %6)
  %.not = icmp eq ptr %13, null
  br i1 %.not, label %.loopexit, label %14

14:                                               ; preds = %12
  %15 = load i8, ptr %11, align 1, !tbaa !5
  %16 = icmp eq i8 %15, 35
  br i1 %16, label %12, label %17, !llvm.loop !8

17:                                               ; preds = %14
  %18 = tail call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef nonnull %11, ptr noundef nonnull @.str.146, ptr noundef nonnull getelementptr inbounds (i8, ptr @preBond, i64 4)) #9
  br label %.loopexit

.loopexit:                                        ; preds = %12, %17
  %19 = load i32, ptr getelementptr inbounds (i8, ptr @preBond, i64 4), align 4, !tbaa !10
  %20 = icmp sgt i32 %19, 0
  br i1 %20, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.loopexit
  %21 = getelementptr inbounds i8, ptr %4, i64 32
  br label %23

._crit_edge:                                      ; preds = %166, %.loopexit
  call void @free(ptr noundef %11) #9
  %22 = call i32 @fclose(ptr noundef nonnull %6)
  br label %170

23:                                               ; preds = %.lr.ph, %166
  %.06471 = phi i32 [ 0, %.lr.ph ], [ %167, %166 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #9
  store i32 0, ptr %3, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %4) #9
  %24 = call ptr @fgets(ptr noundef %11, i32 noundef 1024, ptr noundef nonnull %6)
  %25 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef %11, ptr noundef nonnull @.str.110, ptr noundef nonnull %4, ptr noundef nonnull %21, ptr noundef nonnull %3) #9
  %26 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %4, ptr noundef nonnull dereferenceable(1) @.str.256) #11
  %.not66 = icmp eq i32 %26, 0
  br i1 %.not66, label %141, label %27

27:                                               ; preds = %23
  %28 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %0, ptr noundef nonnull dereferenceable(1) @.str.90) #11
  %.not67 = icmp eq i32 %28, 0
  br i1 %.not67, label %141, label %29

29:                                               ; preds = %27
  %30 = call i32 @atoi(ptr nocapture noundef %4) #11
  %31 = call i32 @atoi(ptr nocapture noundef %21) #11
  %32 = load ptr, ptr @atom, align 8, !tbaa !15
  %33 = sext i32 %30 to i64
  %34 = getelementptr inbounds %struct.AtomStr, ptr %32, i64 %33
  %35 = sext i32 %31 to i64
  %36 = getelementptr inbounds %struct.AtomStr, ptr %32, i64 %35
  %37 = getelementptr inbounds i8, ptr %34, i64 8
  %38 = load ptr, ptr %37, align 8, !tbaa !17
  %39 = getelementptr inbounds i8, ptr %38, i64 84
  %40 = load i32, ptr %39, align 4, !tbaa !19
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds %struct.AtomStr, ptr %32, i64 %41
  %43 = getelementptr inbounds i8, ptr %36, i64 8
  %44 = load ptr, ptr %43, align 8, !tbaa !17
  %45 = getelementptr inbounds i8, ptr %44, i64 84
  %46 = load i32, ptr %45, align 4, !tbaa !19
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds %struct.AtomStr, ptr %32, i64 %47
  %49 = call i32 @CheckPreBondAvailability(ptr noundef %34, ptr noundef %36, ptr noundef null, ptr noundef nonnull @.str.257)
  %.not68 = icmp eq i32 %49, 0
  br i1 %.not68, label %166, label %50

50:                                               ; preds = %29
  %51 = call i32 @CheckPreBondAvailability(ptr noundef nonnull %48, ptr noundef nonnull %34, ptr noundef nonnull %36, ptr noundef nonnull @.str.258)
  %.not69 = icmp eq i32 %51, 0
  br i1 %.not69, label %166, label %52

52:                                               ; preds = %50
  %53 = call i32 @CheckPreBondAvailability(ptr noundef nonnull %42, ptr noundef nonnull %36, ptr noundef nonnull %34, ptr noundef nonnull @.str.258)
  %.not70 = icmp eq i32 %53, 0
  br i1 %.not70, label %166, label %.critedge

.critedge:                                        ; preds = %52
  %54 = load ptr, ptr %37, align 8, !tbaa !17
  %55 = getelementptr inbounds i8, ptr %54, i64 80
  store i32 %31, ptr %55, align 8, !tbaa !25
  %56 = load ptr, ptr %43, align 8, !tbaa !17
  %57 = getelementptr inbounds i8, ptr %56, i64 80
  store i32 %30, ptr %57, align 8, !tbaa !25
  %58 = load ptr, ptr %34, align 8, !tbaa !26
  %59 = getelementptr inbounds i8, ptr %58, i64 52
  %60 = load i32, ptr %59, align 4, !tbaa !27
  %61 = call i32 @AtomTypeChange(i32 noundef %60, i32 noundef 1) #9
  %62 = load ptr, ptr %34, align 8, !tbaa !26
  %63 = getelementptr inbounds i8, ptr %62, i64 52
  store i32 %61, ptr %63, align 4, !tbaa !27
  %64 = load ptr, ptr %36, align 8, !tbaa !26
  %65 = getelementptr inbounds i8, ptr %64, i64 52
  %66 = load i32, ptr %65, align 4, !tbaa !27
  %67 = call i32 @AtomTypeChange(i32 noundef %66, i32 noundef 1) #9
  %68 = load ptr, ptr %36, align 8, !tbaa !26
  %69 = getelementptr inbounds i8, ptr %68, i64 52
  store i32 %67, ptr %69, align 4, !tbaa !27
  %70 = load ptr, ptr %37, align 8, !tbaa !17
  %71 = getelementptr inbounds i8, ptr %70, i64 120
  %72 = load i32, ptr %71, align 8, !tbaa !30
  %73 = add nsw i32 %72, 1
  store i32 %73, ptr %71, align 8, !tbaa !30
  %74 = load ptr, ptr %43, align 8, !tbaa !17
  %75 = getelementptr inbounds i8, ptr %74, i64 84
  %76 = load i32, ptr %75, align 4, !tbaa !19
  %77 = getelementptr inbounds i8, ptr %70, i64 96
  %78 = sext i32 %73 to i64
  %79 = getelementptr inbounds [5 x i32], ptr %77, i64 0, i64 %78
  store i32 %76, ptr %79, align 4, !tbaa !14
  %80 = getelementptr inbounds i8, ptr %74, i64 120
  %81 = load i32, ptr %80, align 8, !tbaa !30
  %82 = add nsw i32 %81, 1
  store i32 %82, ptr %80, align 8, !tbaa !30
  %83 = getelementptr inbounds i8, ptr %70, i64 84
  %84 = load i32, ptr %83, align 4, !tbaa !19
  %85 = getelementptr inbounds i8, ptr %74, i64 96
  %86 = sext i32 %82 to i64
  %87 = getelementptr inbounds [5 x i32], ptr %85, i64 0, i64 %86
  store i32 %84, ptr %87, align 4, !tbaa !14
  %88 = getelementptr inbounds i8, ptr %42, i64 8
  %89 = load ptr, ptr %88, align 8, !tbaa !17
  %90 = getelementptr inbounds i8, ptr %89, i64 120
  %91 = load i32, ptr %90, align 8, !tbaa !30
  %92 = add nsw i32 %91, 1
  store i32 %92, ptr %90, align 8, !tbaa !30
  %93 = getelementptr inbounds i8, ptr %89, i64 96
  %94 = sext i32 %92 to i64
  %95 = getelementptr inbounds [5 x i32], ptr %93, i64 0, i64 %94
  store i32 %31, ptr %95, align 4, !tbaa !14
  %96 = getelementptr inbounds i8, ptr %48, i64 8
  %97 = load ptr, ptr %96, align 8, !tbaa !17
  %98 = getelementptr inbounds i8, ptr %97, i64 120
  %99 = load i32, ptr %98, align 8, !tbaa !30
  %100 = add nsw i32 %99, 1
  store i32 %100, ptr %98, align 8, !tbaa !30
  %101 = getelementptr inbounds i8, ptr %97, i64 96
  %102 = sext i32 %100 to i64
  %103 = getelementptr inbounds [5 x i32], ptr %101, i64 0, i64 %102
  store i32 %30, ptr %103, align 4, !tbaa !14
  %104 = load ptr, ptr @connectionMap, align 8, !tbaa !15
  %105 = getelementptr inbounds ptr, ptr %104, i64 %33
  %106 = load ptr, ptr %105, align 8, !tbaa !15
  %107 = getelementptr inbounds i32, ptr %106, i64 %35
  %108 = load i32, ptr %107, align 4, !tbaa !14
  %109 = xor i32 %108, 4
  store i32 %109, ptr %107, align 4, !tbaa !14
  %110 = getelementptr inbounds ptr, ptr %104, i64 %35
  %111 = load ptr, ptr %110, align 8, !tbaa !15
  %112 = getelementptr inbounds i32, ptr %111, i64 %33
  %113 = load i32, ptr %112, align 4, !tbaa !14
  %114 = xor i32 %113, 4
  store i32 %114, ptr %112, align 4, !tbaa !14
  %115 = load i32, ptr %75, align 4, !tbaa !19
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds i32, ptr %106, i64 %116
  %118 = load i32, ptr %117, align 4, !tbaa !14
  %119 = xor i32 %118, 8
  store i32 %119, ptr %117, align 4, !tbaa !14
  %120 = load i32, ptr %75, align 4, !tbaa !19
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds ptr, ptr %104, i64 %121
  %123 = load ptr, ptr %122, align 8, !tbaa !15
  %124 = getelementptr inbounds i32, ptr %123, i64 %33
  %125 = load i32, ptr %124, align 4, !tbaa !14
  %126 = xor i32 %125, 8
  store i32 %126, ptr %124, align 4, !tbaa !14
  %127 = load i32, ptr %83, align 4, !tbaa !19
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds i32, ptr %111, i64 %128
  %130 = load i32, ptr %129, align 4, !tbaa !14
  %131 = xor i32 %130, 8
  store i32 %131, ptr %129, align 4, !tbaa !14
  %132 = load i32, ptr %83, align 4, !tbaa !19
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds ptr, ptr %104, i64 %133
  %135 = load ptr, ptr %134, align 8, !tbaa !15
  %136 = getelementptr inbounds i32, ptr %135, i64 %35
  %137 = load i32, ptr %136, align 4, !tbaa !14
  %138 = xor i32 %137, 8
  store i32 %138, ptr %136, align 4, !tbaa !14
  %139 = load i32, ptr @HBnumformed, align 4, !tbaa !14
  %140 = add nsw i32 %139, 1
  store i32 %140, ptr @HBnumformed, align 4, !tbaa !14
  br label %166

141:                                              ; preds = %27, %23
  %142 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) @wallExist, ptr noundef nonnull dereferenceable(1) @.str.88) #11
  %143 = icmp ne i32 %142, 0
  %144 = load i32, ptr @obstObj, align 8
  %145 = icmp ne i32 %144, 0
  %or.cond = select i1 %143, i1 true, i1 %145
  br i1 %or.cond, label %149, label %146

146:                                              ; preds = %141
  %147 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.259, ptr noundef nonnull %21)
  %148 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.129, ptr noundef nonnull @.str.2, i32 noundef 2235)
  call void @exit(i32 noundef 1) #12
  unreachable

149:                                              ; preds = %141
  %150 = load i32, ptr %3, align 4, !tbaa !14
  %151 = sext i32 %150 to i64
  %152 = getelementptr inbounds i8, ptr %11, i64 %151
  %153 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef %152, ptr noundef nonnull @.str.173, ptr noundef nonnull getelementptr inbounds (i8, ptr @preBond, i64 8)) #9
  %154 = load double, ptr getelementptr inbounds (i8, ptr @preBond, i64 8), align 8, !tbaa !31
  %155 = fmul double %154, %154
  store double %155, ptr getelementptr inbounds (i8, ptr @preBond, i64 8), align 8, !tbaa !31
  %156 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %0, ptr noundef nonnull dereferenceable(1) @.str.78) #11
  %157 = icmp eq i32 %156, 0
  br i1 %157, label %158, label %166

158:                                              ; preds = %149
  %159 = load ptr, ptr @atom, align 8, !tbaa !15
  %160 = call i32 @atoi(ptr nocapture noundef %21) #11
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds %struct.AtomStr, ptr %159, i64 %161
  %163 = load ptr, ptr %162, align 8, !tbaa !26
  %164 = getelementptr inbounds i8, ptr %163, i64 24
  %165 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %164, ptr noundef nonnull dereferenceable(1) @.str.260) #9
  br label %166

166:                                              ; preds = %158, %149, %.critedge, %52, %50, %29
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %4) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #9
  %167 = add nuw nsw i32 %.06471, 1
  %168 = load i32, ptr getelementptr inbounds (i8, ptr @preBond, i64 4), align 4, !tbaa !10
  %169 = icmp slt i32 %167, %168
  br i1 %169, label %23, label %._crit_edge, !llvm.loop !32

170:                                              ; preds = %._crit_edge, %8
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %2) #9
  ret void
}

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @CheckPreBondAvailability(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #6

declare i32 @AtomTypeChange(i32 noundef, i32 noundef) local_unnamed_addr #8

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 = { 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 #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress nofree nounwind willreturn memory(read) 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 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 #7 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { "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 #9 = { nounwind }
attributes #10 = { nounwind allocsize(0,1) }
attributes #11 = { nounwind willreturn memory(read) }
attributes #12 = { noreturn nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = distinct !{!8, !9}
!9 = !{!"llvm.loop.mustprogress"}
!10 = !{!11, !12, i64 4}
!11 = !{!"PreBondStr", !12, i64 0, !12, i64 4, !13, i64 8}
!12 = !{!"int", !6, i64 0}
!13 = !{!"double", !6, i64 0}
!14 = !{!12, !12, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"any pointer", !6, i64 0}
!17 = !{!18, !16, i64 8}
!18 = !{!"AtomStr", !16, i64 0, !16, i64 8}
!19 = !{!20, !12, i64 84}
!20 = !{!"DynamicStr", !6, i64 0, !6, i64 16, !6, i64 48, !21, i64 80, !22, i64 96, !23, i64 128}
!21 = !{!"HBStr", !12, i64 0, !12, i64 4, !6, i64 8, !12, i64 12}
!22 = !{!"HBNeighborStr", !6, i64 0, !12, i64 20, !12, i64 24}
!23 = !{!"InteractionEventStr", !12, i64 0, !24, i64 8, !24, i64 16, !13, i64 24, !13, i64 32, !12, i64 40, !12, i64 44}
!24 = !{!"long", !6, i64 0}
!25 = !{!20, !12, i64 80}
!26 = !{!18, !16, i64 0}
!27 = !{!28, !12, i64 52}
!28 = !{!"PropertyStr", !6, i64 0, !6, i64 8, !6, i64 40, !12, i64 48, !12, i64 52, !12, i64 56, !13, i64 64, !13, i64 72, !6, i64 80, !29, i64 104, !16, i64 120, !16, i64 128}
!29 = !{!"AtomSeqStr", !12, i64 0, !12, i64 4, !12, i64 8}
!30 = !{!20, !12, i64 120}
!31 = !{!11, !13, i64 8}
!32 = distinct !{!32, !9}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass