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

; 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.HBPotentialStr = type { double, double, double, double, double, double }
%struct.ConstraintStr = type { i32, double, ptr, double, ptr }
%struct.FileStr = type { i32, [256 x i8], ptr }
%struct.AtomStr = type { 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.StepPotenStr = type { double, double, double, 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 }

@atomnum = external global i32, align 4
@atom = external global ptr, align 8
@protein = external global ptr, align 8
@aminoacid = external global ptr, align 8
@numofprotein = external global i32, align 4
@totalAminoAcids = external global i32, align 4
@HBPotential = external global %struct.HBPotentialStr, align 8
@potentialPairCollision = external global [33 x [33 x %struct.ConstraintStr]], align 16
@potentialPairHB = external global [12 x [33 x [33 x %struct.ConstraintStr]]], align 16

; 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 uwtable
declare dso_local void @BackupFile(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @GenerateFile(ptr noundef) #1

; Function Attrs: nounwind uwtable
define dso_local void @SaveSysInfo(ptr noundef %0) #1 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %15 = load ptr, ptr %2, align 8, !tbaa !5
  %16 = getelementptr inbounds %struct.FileStr, ptr %15, i32 0, i32 2
  %17 = load ptr, ptr %16, align 8, !tbaa !9
  %18 = icmp eq ptr %17, null
  br i1 %18, label %19, label %22

19:                                               ; preds = %1
  %20 = load ptr, ptr %2, align 8, !tbaa !5
  call void @BackupFile(ptr noundef %20)
  %21 = load ptr, ptr %2, align 8, !tbaa !5
  call void @GenerateFile(ptr noundef %21)
  br label %22

22:                                               ; preds = %19, %1
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #3
  %23 = load ptr, ptr %2, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.FileStr, ptr %23, i32 0, i32 2
  %25 = load ptr, ptr %24, align 8, !tbaa !9
  store ptr %25, ptr %3, align 8, !tbaa !5
  %26 = load ptr, ptr %3, align 8, !tbaa !5
  %27 = call i64 @fwrite(ptr noundef @atomnum, i64 noundef 4, i64 noundef 1, ptr noundef %26)
  %28 = load ptr, ptr %3, align 8, !tbaa !5
  %29 = call i64 @fwrite(ptr noundef @numofprotein, i64 noundef 4, i64 noundef 1, ptr noundef %28)
  %30 = load ptr, ptr %3, align 8, !tbaa !5
  %31 = call i64 @fwrite(ptr noundef @totalAminoAcids, i64 noundef 4, i64 noundef 1, ptr noundef %30)
  %32 = load ptr, ptr @aminoacid, align 8, !tbaa !5
  %33 = load i32, ptr @totalAminoAcids, align 4, !tbaa !12
  %34 = add nsw i32 %33, 1
  %35 = sext i32 %34 to i64
  %36 = load ptr, ptr %3, align 8, !tbaa !5
  %37 = call i64 @fwrite(ptr noundef %32, i64 noundef 32, i64 noundef %35, ptr noundef %36)
  %38 = load ptr, ptr @protein, align 8, !tbaa !5
  %39 = load i32, ptr @numofprotein, align 4, !tbaa !12
  %40 = add nsw i32 %39, 1
  %41 = sext i32 %40 to i64
  %42 = load ptr, ptr %3, align 8, !tbaa !5
  %43 = call i64 @fwrite(ptr noundef %38, i64 noundef 24, i64 noundef %41, ptr noundef %42)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #3
  store i32 0, ptr %4, align 4, !tbaa !12
  br label %44

44:                                               ; preds = %100, %22
  %45 = load i32, ptr %4, align 4, !tbaa !12
  %46 = load i32, ptr @atomnum, align 4, !tbaa !12
  %47 = icmp sle i32 %45, %46
  br i1 %47, label %49, label %48

48:                                               ; preds = %44
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #3
  br label %103

49:                                               ; preds = %44
  %50 = load ptr, ptr @atom, align 8, !tbaa !5
  %51 = load i32, ptr %4, align 4, !tbaa !12
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds %struct.AtomStr, ptr %50, i64 %52
  %54 = getelementptr inbounds %struct.AtomStr, ptr %53, i32 0, i32 0
  %55 = load ptr, ptr %54, align 8, !tbaa !13
  %56 = load ptr, ptr %3, align 8, !tbaa !5
  %57 = call i64 @fwrite(ptr noundef %55, i64 noundef 136, i64 noundef 1, ptr noundef %56)
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #3
  %58 = load ptr, ptr @atom, align 8, !tbaa !5
  %59 = load i32, ptr %4, align 4, !tbaa !12
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds %struct.AtomStr, ptr %58, i64 %60
  %62 = getelementptr inbounds %struct.AtomStr, ptr %61, i32 0, i32 0
  %63 = load ptr, ptr %62, align 8, !tbaa !13
  %64 = getelementptr inbounds %struct.PropertyStr, ptr %63, i32 0, i32 11
  %65 = load ptr, ptr %64, align 8, !tbaa !15
  store ptr %65, ptr %5, align 8, !tbaa !5
  br label %66

66:                                               ; preds = %86, %49
  %67 = load ptr, ptr %5, align 8, !tbaa !5
  %68 = icmp ne ptr %67, null
  br i1 %68, label %69, label %90

69:                                               ; preds = %66
  %70 = load ptr, ptr %5, align 8, !tbaa !5
  %71 = load ptr, ptr %3, align 8, !tbaa !5
  %72 = call i64 @fwrite(ptr noundef %70, i64 noundef 40, i64 noundef 1, ptr noundef %71)
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  %73 = load ptr, ptr %5, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.ConstraintStr, ptr %73, i32 0, i32 2
  %75 = load ptr, ptr %74, align 8, !tbaa !19
  store ptr %75, ptr %6, align 8, !tbaa !5
  br label %76

76:                                               ; preds = %79, %69
  %77 = load ptr, ptr %6, align 8, !tbaa !5
  %78 = icmp ne ptr %77, null
  br i1 %78, label %79, label %86

79:                                               ; preds = %76
  %80 = load ptr, ptr %6, align 8, !tbaa !5
  %81 = load ptr, ptr %3, align 8, !tbaa !5
  %82 = call i64 @fwrite(ptr noundef %80, i64 noundef 32, i64 noundef 1, ptr noundef %81)
  %83 = load ptr, ptr %6, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.StepPotenStr, ptr %83, i32 0, i32 3
  %85 = load ptr, ptr %84, align 8, !tbaa !21
  store ptr %85, ptr %6, align 8, !tbaa !5
  br label %76, !llvm.loop !23

86:                                               ; preds = %76
  %87 = load ptr, ptr %5, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.ConstraintStr, ptr %87, i32 0, i32 4
  %89 = load ptr, ptr %88, align 8, !tbaa !25
  store ptr %89, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  br label %66, !llvm.loop !26

90:                                               ; preds = %66
  %91 = load ptr, ptr @atom, align 8, !tbaa !5
  %92 = load i32, ptr %4, align 4, !tbaa !12
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds %struct.AtomStr, ptr %91, i64 %93
  %95 = getelementptr inbounds %struct.AtomStr, ptr %94, i32 0, i32 1
  %96 = load ptr, ptr %95, align 8, !tbaa !27
  %97 = getelementptr inbounds %struct.DynamicStr, ptr %96, i32 0, i32 3
  %98 = load ptr, ptr %3, align 8, !tbaa !5
  %99 = call i64 @fwrite(ptr noundef %97, i64 noundef 16, i64 noundef 1, ptr noundef %98)
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #3
  br label %100

100:                                              ; preds = %90
  %101 = load i32, ptr %4, align 4, !tbaa !12
  %102 = add nsw i32 %101, 1
  store i32 %102, ptr %4, align 4, !tbaa !12
  br label %44, !llvm.loop !28

103:                                              ; preds = %48
  %104 = load ptr, ptr %3, align 8, !tbaa !5
  %105 = call i64 @fwrite(ptr noundef @HBPotential, i64 noundef 48, i64 noundef 1, ptr noundef %104)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  store i32 0, ptr %7, align 4, !tbaa !12
  br label %106

106:                                              ; preds = %147, %103
  %107 = load i32, ptr %7, align 4, !tbaa !12
  %108 = icmp slt i32 %107, 32
  br i1 %108, label %110, label %109

109:                                              ; preds = %106
  store i32 9, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  br label %150

110:                                              ; preds = %106
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  store i32 0, ptr %9, align 4, !tbaa !12
  br label %111

111:                                              ; preds = %143, %110
  %112 = load i32, ptr %9, align 4, !tbaa !12
  %113 = icmp slt i32 %112, 32
  br i1 %113, label %115, label %114

114:                                              ; preds = %111
  store i32 12, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  br label %146

115:                                              ; preds = %111
  %116 = load i32, ptr %7, align 4, !tbaa !12
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [33 x [33 x %struct.ConstraintStr]], ptr @potentialPairCollision, i64 0, i64 %117
  %119 = load i32, ptr %9, align 4, !tbaa !12
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds [33 x %struct.ConstraintStr], ptr %118, i64 0, i64 %120
  %122 = load ptr, ptr %3, align 8, !tbaa !5
  %123 = call i64 @fwrite(ptr noundef %121, i64 noundef 40, i64 noundef 1, ptr noundef %122)
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  %124 = load i32, ptr %7, align 4, !tbaa !12
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds [33 x [33 x %struct.ConstraintStr]], ptr @potentialPairCollision, i64 0, i64 %125
  %127 = load i32, ptr %9, align 4, !tbaa !12
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds [33 x %struct.ConstraintStr], ptr %126, i64 0, i64 %128
  %130 = getelementptr inbounds %struct.ConstraintStr, ptr %129, i32 0, i32 2
  %131 = load ptr, ptr %130, align 8, !tbaa !19
  store ptr %131, ptr %10, align 8, !tbaa !5
  br label %132

132:                                              ; preds = %135, %115
  %133 = load ptr, ptr %10, align 8, !tbaa !5
  %134 = icmp ne ptr %133, null
  br i1 %134, label %135, label %142

135:                                              ; preds = %132
  %136 = load ptr, ptr %10, align 8, !tbaa !5
  %137 = load ptr, ptr %3, align 8, !tbaa !5
  %138 = call i64 @fwrite(ptr noundef %136, i64 noundef 32, i64 noundef 1, ptr noundef %137)
  %139 = load ptr, ptr %10, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.StepPotenStr, ptr %139, i32 0, i32 3
  %141 = load ptr, ptr %140, align 8, !tbaa !21
  store ptr %141, ptr %10, align 8, !tbaa !5
  br label %132, !llvm.loop !29

142:                                              ; preds = %132
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  br label %143

143:                                              ; preds = %142
  %144 = load i32, ptr %9, align 4, !tbaa !12
  %145 = add nsw i32 %144, 1
  store i32 %145, ptr %9, align 4, !tbaa !12
  br label %111, !llvm.loop !30

146:                                              ; preds = %114
  br label %147

147:                                              ; preds = %146
  %148 = load i32, ptr %7, align 4, !tbaa !12
  %149 = add nsw i32 %148, 1
  store i32 %149, ptr %7, align 4, !tbaa !12
  br label %106, !llvm.loop !31

150:                                              ; preds = %109
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #3
  store i32 0, ptr %11, align 4, !tbaa !12
  br label %151

151:                                              ; preds = %207, %150
  %152 = load i32, ptr %11, align 4, !tbaa !12
  %153 = icmp slt i32 %152, 11
  br i1 %153, label %155, label %154

154:                                              ; preds = %151
  store i32 17, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #3
  br label %210

155:                                              ; preds = %151
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #3
  store i32 0, ptr %12, align 4, !tbaa !12
  br label %156

156:                                              ; preds = %203, %155
  %157 = load i32, ptr %12, align 4, !tbaa !12
  %158 = icmp slt i32 %157, 32
  br i1 %158, label %160, label %159

159:                                              ; preds = %156
  store i32 20, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #3
  br label %206

160:                                              ; preds = %156
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #3
  store i32 0, ptr %13, align 4, !tbaa !12
  br label %161

161:                                              ; preds = %199, %160
  %162 = load i32, ptr %13, align 4, !tbaa !12
  %163 = icmp slt i32 %162, 32
  br i1 %163, label %165, label %164

164:                                              ; preds = %161
  store i32 23, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #3
  br label %202

165:                                              ; preds = %161
  %166 = load i32, ptr %11, align 4, !tbaa !12
  %167 = sext i32 %166 to i64
  %168 = getelementptr inbounds [12 x [33 x [33 x %struct.ConstraintStr]]], ptr @potentialPairHB, i64 0, i64 %167
  %169 = load i32, ptr %12, align 4, !tbaa !12
  %170 = sext i32 %169 to i64
  %171 = getelementptr inbounds [33 x [33 x %struct.ConstraintStr]], ptr %168, i64 0, i64 %170
  %172 = load i32, ptr %13, align 4, !tbaa !12
  %173 = sext i32 %172 to i64
  %174 = getelementptr inbounds [33 x %struct.ConstraintStr], ptr %171, i64 0, i64 %173
  %175 = load ptr, ptr %3, align 8, !tbaa !5
  %176 = call i64 @fwrite(ptr noundef %174, i64 noundef 40, i64 noundef 1, ptr noundef %175)
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  %177 = load i32, ptr %11, align 4, !tbaa !12
  %178 = sext i32 %177 to i64
  %179 = getelementptr inbounds [12 x [33 x [33 x %struct.ConstraintStr]]], ptr @potentialPairHB, i64 0, i64 %178
  %180 = load i32, ptr %12, align 4, !tbaa !12
  %181 = sext i32 %180 to i64
  %182 = getelementptr inbounds [33 x [33 x %struct.ConstraintStr]], ptr %179, i64 0, i64 %181
  %183 = load i32, ptr %13, align 4, !tbaa !12
  %184 = sext i32 %183 to i64
  %185 = getelementptr inbounds [33 x %struct.ConstraintStr], ptr %182, i64 0, i64 %184
  %186 = getelementptr inbounds %struct.ConstraintStr, ptr %185, i32 0, i32 2
  %187 = load ptr, ptr %186, align 8, !tbaa !19
  store ptr %187, ptr %14, align 8, !tbaa !5
  br label %188

188:                                              ; preds = %191, %165
  %189 = load ptr, ptr %14, align 8, !tbaa !5
  %190 = icmp ne ptr %189, null
  br i1 %190, label %191, label %198

191:                                              ; preds = %188
  %192 = load ptr, ptr %14, align 8, !tbaa !5
  %193 = load ptr, ptr %3, align 8, !tbaa !5
  %194 = call i64 @fwrite(ptr noundef %192, i64 noundef 32, i64 noundef 1, ptr noundef %193)
  %195 = load ptr, ptr %14, align 8, !tbaa !5
  %196 = getelementptr inbounds %struct.StepPotenStr, ptr %195, i32 0, i32 3
  %197 = load ptr, ptr %196, align 8, !tbaa !21
  store ptr %197, ptr %14, align 8, !tbaa !5
  br label %188, !llvm.loop !32

198:                                              ; preds = %188
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  br label %199

199:                                              ; preds = %198
  %200 = load i32, ptr %13, align 4, !tbaa !12
  %201 = add nsw i32 %200, 1
  store i32 %201, ptr %13, align 4, !tbaa !12
  br label %161, !llvm.loop !33

202:                                              ; preds = %164
  br label %203

203:                                              ; preds = %202
  %204 = load i32, ptr %12, align 4, !tbaa !12
  %205 = add nsw i32 %204, 1
  store i32 %205, ptr %12, align 4, !tbaa !12
  br label %156, !llvm.loop !34

206:                                              ; preds = %159
  br label %207

207:                                              ; preds = %206
  %208 = load i32, ptr %11, align 4, !tbaa !12
  %209 = add nsw i32 %208, 1
  store i32 %209, ptr %11, align 4, !tbaa !12
  br label %151, !llvm.loop !35

210:                                              ; preds = %154
  %211 = load ptr, ptr %3, align 8, !tbaa !5
  %212 = call i32 @fclose(ptr noundef %211)
  store i32 1, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #3
  ret void
}

declare i64 @fwrite(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #2

declare i32 @fclose(ptr noundef) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { "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 = { nounwind }

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

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


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

@atomnum = external global i32, align 4
@atom = external local_unnamed_addr global ptr, align 8
@protein = external local_unnamed_addr global ptr, align 8
@aminoacid = external local_unnamed_addr global ptr, align 8
@numofprotein = external global i32, align 4
@totalAminoAcids = external global i32, align 4
@HBPotential = external global %struct.HBPotentialStr, align 8
@potentialPairCollision = external global [33 x [33 x %struct.ConstraintStr]], align 16
@potentialPairHB = external global [12 x [33 x [33 x %struct.ConstraintStr]]], align 16

; Function Attrs: nounwind uwtable
declare dso_local void @BackupFile(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local void @GenerateFile(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local void @SaveSysInfo(ptr noundef %0) local_unnamed_addr #0 {
  %2 = getelementptr inbounds i8, ptr %0, i64 264
  %3 = load ptr, ptr %2, align 8, !tbaa !5
  %4 = icmp eq ptr %3, null
  br i1 %4, label %5, label %6

5:                                                ; preds = %1
  tail call void @BackupFile(ptr noundef nonnull %0)
  tail call void @GenerateFile(ptr noundef nonnull %0)
  %.pre = load ptr, ptr %2, align 8, !tbaa !5
  br label %6

6:                                                ; preds = %5, %1
  %7 = phi ptr [ %.pre, %5 ], [ %3, %1 ]
  %8 = tail call i64 @fwrite(ptr noundef nonnull @atomnum, i64 noundef 4, i64 noundef 1, ptr noundef %7)
  %9 = tail call i64 @fwrite(ptr noundef nonnull @numofprotein, i64 noundef 4, i64 noundef 1, ptr noundef %7)
  %10 = tail call i64 @fwrite(ptr noundef nonnull @totalAminoAcids, i64 noundef 4, i64 noundef 1, ptr noundef %7)
  %11 = load ptr, ptr @aminoacid, align 8, !tbaa !11
  %12 = load i32, ptr @totalAminoAcids, align 4, !tbaa !12
  %13 = add nsw i32 %12, 1
  %14 = sext i32 %13 to i64
  %15 = tail call i64 @fwrite(ptr noundef %11, i64 noundef 32, i64 noundef %14, ptr noundef %7)
  %16 = load ptr, ptr @protein, align 8, !tbaa !11
  %17 = load i32, ptr @numofprotein, align 4, !tbaa !12
  %18 = add nsw i32 %17, 1
  %19 = sext i32 %18 to i64
  %20 = tail call i64 @fwrite(ptr noundef %16, i64 noundef 24, i64 noundef %19, ptr noundef %7)
  %21 = load i32, ptr @atomnum, align 4, !tbaa !12
  %.not81 = icmp slt i32 %21, 0
  br i1 %.not81, label %._crit_edge85, label %.lr.ph84

._crit_edge85:                                    ; preds = %._crit_edge80, %6
  %22 = tail call i64 @fwrite(ptr noundef nonnull @HBPotential, i64 noundef 48, i64 noundef 1, ptr noundef %7)
  br label %.preheader71

.lr.ph84:                                         ; preds = %6, %._crit_edge80
  %indvars.iv = phi i64 [ %indvars.iv.next, %._crit_edge80 ], [ 0, %6 ]
  %23 = load ptr, ptr @atom, align 8, !tbaa !11
  %24 = getelementptr inbounds %struct.AtomStr, ptr %23, i64 %indvars.iv
  %25 = load ptr, ptr %24, align 8, !tbaa !13
  %26 = tail call i64 @fwrite(ptr noundef %25, i64 noundef 136, i64 noundef 1, ptr noundef %7)
  %27 = load ptr, ptr @atom, align 8, !tbaa !11
  %28 = getelementptr inbounds %struct.AtomStr, ptr %27, i64 %indvars.iv
  %29 = load ptr, ptr %28, align 8, !tbaa !13
  %30 = getelementptr inbounds i8, ptr %29, i64 128
  %.06375 = load ptr, ptr %30, align 8, !tbaa !11
  %.not6776 = icmp eq ptr %.06375, null
  br i1 %.not6776, label %._crit_edge80, label %.lr.ph79

.lr.ph79:                                         ; preds = %.lr.ph84, %._crit_edge
  %.06377 = phi ptr [ %.063, %._crit_edge ], [ %.06375, %.lr.ph84 ]
  %31 = tail call i64 @fwrite(ptr noundef nonnull %.06377, i64 noundef 40, i64 noundef 1, ptr noundef %7)
  %32 = getelementptr inbounds i8, ptr %.06377, i64 16
  %.06272 = load ptr, ptr %32, align 8, !tbaa !11
  %.not6873 = icmp eq ptr %.06272, null
  br i1 %.not6873, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph79, %.lr.ph
  %.06274 = phi ptr [ %.062, %.lr.ph ], [ %.06272, %.lr.ph79 ]
  %33 = tail call i64 @fwrite(ptr noundef nonnull %.06274, i64 noundef 32, i64 noundef 1, ptr noundef %7)
  %34 = getelementptr inbounds i8, ptr %.06274, i64 24
  %.062 = load ptr, ptr %34, align 8, !tbaa !11
  %.not68 = icmp eq ptr %.062, null
  br i1 %.not68, label %._crit_edge, label %.lr.ph, !llvm.loop !15

._crit_edge:                                      ; preds = %.lr.ph, %.lr.ph79
  %35 = getelementptr inbounds i8, ptr %.06377, i64 32
  %.063 = load ptr, ptr %35, align 8, !tbaa !11
  %.not67 = icmp eq ptr %.063, null
  br i1 %.not67, label %._crit_edge80.loopexit, label %.lr.ph79, !llvm.loop !17

._crit_edge80.loopexit:                           ; preds = %._crit_edge
  %.pre123 = load ptr, ptr @atom, align 8, !tbaa !11
  br label %._crit_edge80

._crit_edge80:                                    ; preds = %._crit_edge80.loopexit, %.lr.ph84
  %36 = phi ptr [ %.pre123, %._crit_edge80.loopexit ], [ %27, %.lr.ph84 ]
  %37 = getelementptr inbounds %struct.AtomStr, ptr %36, i64 %indvars.iv, i32 1
  %38 = load ptr, ptr %37, align 8, !tbaa !18
  %39 = getelementptr inbounds i8, ptr %38, i64 80
  %40 = tail call i64 @fwrite(ptr noundef nonnull %39, i64 noundef 16, i64 noundef 1, ptr noundef %7)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %41 = load i32, ptr @atomnum, align 4, !tbaa !12
  %42 = sext i32 %41 to i64
  %.not.not = icmp slt i64 %indvars.iv, %42
  br i1 %.not.not, label %.lr.ph84, label %._crit_edge85, !llvm.loop !19

.preheader71:                                     ; preds = %._crit_edge85, %43
  %indvars.iv107 = phi i64 [ 0, %._crit_edge85 ], [ %indvars.iv.next108, %43 ]
  br label %44

43:                                               ; preds = %._crit_edge91
  %indvars.iv.next108 = add nuw nsw i64 %indvars.iv107, 1
  %exitcond110.not = icmp eq i64 %indvars.iv.next108, 32
  br i1 %exitcond110.not, label %.preheader69, label %.preheader71, !llvm.loop !20

44:                                               ; preds = %.preheader71, %._crit_edge91
  %indvars.iv104 = phi i64 [ 0, %.preheader71 ], [ %indvars.iv.next105, %._crit_edge91 ]
  %45 = getelementptr inbounds [33 x [33 x %struct.ConstraintStr]], ptr @potentialPairCollision, i64 0, i64 %indvars.iv107, i64 %indvars.iv104
  %46 = tail call i64 @fwrite(ptr noundef nonnull %45, i64 noundef 40, i64 noundef 1, ptr noundef %7)
  %47 = getelementptr inbounds i8, ptr %45, i64 16
  %.05986 = load ptr, ptr %47, align 8, !tbaa !11
  %.not6687 = icmp eq ptr %.05986, null
  br i1 %.not6687, label %._crit_edge91, label %.lr.ph90

.lr.ph90:                                         ; preds = %44, %.lr.ph90
  %.05988 = phi ptr [ %.059, %.lr.ph90 ], [ %.05986, %44 ]
  %48 = tail call i64 @fwrite(ptr noundef nonnull %.05988, i64 noundef 32, i64 noundef 1, ptr noundef %7)
  %49 = getelementptr inbounds i8, ptr %.05988, i64 24
  %.059 = load ptr, ptr %49, align 8, !tbaa !11
  %.not66 = icmp eq ptr %.059, null
  br i1 %.not66, label %._crit_edge91, label %.lr.ph90, !llvm.loop !21

._crit_edge91:                                    ; preds = %.lr.ph90, %44
  %indvars.iv.next105 = add nuw nsw i64 %indvars.iv104, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next105, 32
  br i1 %exitcond.not, label %43, label %44, !llvm.loop !22

.preheader69:                                     ; preds = %43, %52
  %indvars.iv119 = phi i64 [ %indvars.iv.next120, %52 ], [ 0, %43 ]
  br label %.preheader

50:                                               ; preds = %52
  %51 = tail call i32 @fclose(ptr noundef %7)
  ret void

.preheader:                                       ; preds = %.preheader69, %53
  %indvars.iv115 = phi i64 [ 0, %.preheader69 ], [ %indvars.iv.next116, %53 ]
  br label %54

52:                                               ; preds = %53
  %indvars.iv.next120 = add nuw nsw i64 %indvars.iv119, 1
  %exitcond122.not = icmp eq i64 %indvars.iv.next120, 11
  br i1 %exitcond122.not, label %50, label %.preheader69, !llvm.loop !23

53:                                               ; preds = %._crit_edge99
  %indvars.iv.next116 = add nuw nsw i64 %indvars.iv115, 1
  %exitcond118.not = icmp eq i64 %indvars.iv.next116, 32
  br i1 %exitcond118.not, label %52, label %.preheader, !llvm.loop !24

54:                                               ; preds = %.preheader, %._crit_edge99
  %indvars.iv111 = phi i64 [ 0, %.preheader ], [ %indvars.iv.next112, %._crit_edge99 ]
  %55 = getelementptr inbounds [12 x [33 x [33 x %struct.ConstraintStr]]], ptr @potentialPairHB, i64 0, i64 %indvars.iv119, i64 %indvars.iv115, i64 %indvars.iv111
  %56 = tail call i64 @fwrite(ptr noundef nonnull %55, i64 noundef 40, i64 noundef 1, ptr noundef %7)
  %57 = getelementptr inbounds i8, ptr %55, i64 16
  %.094 = load ptr, ptr %57, align 8, !tbaa !11
  %.not6595 = icmp eq ptr %.094, null
  br i1 %.not6595, label %._crit_edge99, label %.lr.ph98

.lr.ph98:                                         ; preds = %54, %.lr.ph98
  %.096 = phi ptr [ %.0, %.lr.ph98 ], [ %.094, %54 ]
  %58 = tail call i64 @fwrite(ptr noundef nonnull %.096, i64 noundef 32, i64 noundef 1, ptr noundef %7)
  %59 = getelementptr inbounds i8, ptr %.096, i64 24
  %.0 = load ptr, ptr %59, align 8, !tbaa !11
  %.not65 = icmp eq ptr %.0, null
  br i1 %.not65, label %._crit_edge99, label %.lr.ph98, !llvm.loop !25

._crit_edge99:                                    ; preds = %.lr.ph98, %54
  %indvars.iv.next112 = add nuw nsw i64 %indvars.iv111, 1
  %exitcond114.not = icmp eq i64 %indvars.iv.next112, 32
  br i1 %exitcond114.not, label %53, label %54, !llvm.loop !26
}

; Function Attrs: nofree nounwind
declare noundef i64 @fwrite(ptr nocapture noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #1

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

attributes #0 = { 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 #1 = { 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" }

!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, !10, i64 264}
!6 = !{!"FileStr", !7, i64 0, !8, i64 4, !10, i64 264}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!10, !10, i64 0}
!12 = !{!7, !7, i64 0}
!13 = !{!14, !10, i64 0}
!14 = !{!"AtomStr", !10, i64 0, !10, i64 8}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}
!18 = !{!14, !10, i64 8}
!19 = distinct !{!19, !16}
!20 = distinct !{!20, !16}
!21 = distinct !{!21, !16}
!22 = distinct !{!22, !16}
!23 = distinct !{!23, !16}
!24 = distinct !{!24, !16}
!25 = distinct !{!25, !16}
!26 = distinct !{!26, !16}


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