; LLVM IR from stivalaa/EstimNetDirected :: src (graph)

; 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.graph_s = type { i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, i32, ptr, ptr, ptr, i32, i32, i32, ptr, ptr, i32, ptr, ptr, i32, ptr, ptr, i32, ptr, ptr, ptr, i32, i32, i32, i32, i32, ptr, i32, i32, ptr, ptr, i32, ptr, i32, ptr, ptr, i32, i32, ptr, i32, ptr }
%struct.nodepair_s = type { i32, i32 }

@.str.1 = external hidden unnamed_addr constant [71 x i8], align 1
@stderr = external global ptr, align 8
@.str.98 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.99 = external hidden unnamed_addr constant [78 x i8], align 1
@.str.100 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.101 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.102 = external hidden unnamed_addr constant [23 x i8], align 1
@__PRETTY_FUNCTION__.add_cergm_terms_to_digraph = external hidden unnamed_addr constant [56 x i8], align 1
@.str.103 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.104 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.105 = external hidden unnamed_addr constant [25 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: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 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

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

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

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

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #3

; Function Attrs: nounwind uwtable
declare hidden i32 @load_integer_attributes(ptr noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef) #4

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

; Function Attrs: nounwind uwtable
define dso_local i32 @add_cergm_terms_to_digraph(ptr noundef %0, ptr noundef %1) #4 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %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
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  %16 = load ptr, ptr %5, align 8, !tbaa !5
  %17 = load ptr, ptr %4, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.graph_s, ptr %17, i32 0, i32 0
  %19 = load i32, ptr %18, align 8, !tbaa !9
  %20 = call i32 @load_integer_attributes(ptr noundef %16, i32 noundef %19, i32 noundef 0, ptr noundef %8, ptr noundef %9)
  store i32 %20, ptr %6, align 4, !tbaa !12
  %21 = icmp slt i32 %20, 0
  br i1 %21, label %22, label %26

22:                                               ; preds = %2
  %23 = load ptr, ptr @stderr, align 8, !tbaa !5
  %24 = load ptr, ptr %5, align 8, !tbaa !5
  %25 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %23, ptr noundef @.str.98, ptr noundef %24) #6
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %15, align 4
  br label %328

26:                                               ; preds = %2
  %27 = load i32, ptr %6, align 4, !tbaa !12
  %28 = icmp ne i32 %27, 1
  br i1 %28, label %29, label %34

29:                                               ; preds = %26
  %30 = load ptr, ptr @stderr, align 8, !tbaa !5
  %31 = load ptr, ptr %5, align 8, !tbaa !5
  %32 = load i32, ptr %6, align 4, !tbaa !12
  %33 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %30, ptr noundef @.str.99, ptr noundef %31, i32 noundef %32) #6
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %15, align 4
  br label %328

34:                                               ; preds = %26
  %35 = load ptr, ptr %8, align 8, !tbaa !5
  %36 = getelementptr inbounds ptr, ptr %35, i64 0
  %37 = load ptr, ptr %36, align 8, !tbaa !5
  %38 = call i32 @strcasecmp(ptr noundef %37, ptr noundef @.str.100) #7
  %39 = icmp ne i32 %38, 0
  br i1 %39, label %40, label %47

40:                                               ; preds = %34
  %41 = load ptr, ptr @stderr, align 8, !tbaa !5
  %42 = load ptr, ptr %5, align 8, !tbaa !5
  %43 = load ptr, ptr %8, align 8, !tbaa !5
  %44 = getelementptr inbounds ptr, ptr %43, i64 0
  %45 = load ptr, ptr %44, align 8, !tbaa !5
  %46 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %41, ptr noundef @.str.101, ptr noundef %42, ptr noundef %45) #6
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %15, align 4
  br label %328

47:                                               ; preds = %34
  store i32 0, ptr %10, align 4, !tbaa !12
  br label %48

48:                                               ; preds = %90, %47
  %49 = load i32, ptr %10, align 4, !tbaa !12
  %50 = load ptr, ptr %4, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.graph_s, ptr %50, i32 0, i32 0
  %52 = load i32, ptr %51, align 8, !tbaa !9
  %53 = icmp ult i32 %49, %52
  br i1 %53, label %54, label %93

54:                                               ; preds = %48
  %55 = load ptr, ptr %9, align 8, !tbaa !5
  %56 = getelementptr inbounds ptr, ptr %55, i64 0
  %57 = load ptr, ptr %56, align 8, !tbaa !5
  %58 = load i32, ptr %10, align 4, !tbaa !12
  %59 = zext i32 %58 to i64
  %60 = getelementptr inbounds i32, ptr %57, i64 %59
  %61 = load i32, ptr %60, align 4, !tbaa !12
  %62 = load ptr, ptr %4, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.graph_s, ptr %62, i32 0, i32 42
  %64 = load ptr, ptr %63, align 8, !tbaa !13
  %65 = load i32, ptr %10, align 4, !tbaa !12
  %66 = zext i32 %65 to i64
  %67 = getelementptr inbounds i32, ptr %64, i64 %66
  store i32 %61, ptr %67, align 4, !tbaa !12
  %68 = load ptr, ptr %4, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.graph_s, ptr %68, i32 0, i32 42
  %70 = load ptr, ptr %69, align 8, !tbaa !13
  %71 = load i32, ptr %10, align 4, !tbaa !12
  %72 = zext i32 %71 to i64
  %73 = getelementptr inbounds i32, ptr %70, i64 %72
  %74 = load i32, ptr %73, align 4, !tbaa !12
  %75 = load ptr, ptr %4, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.graph_s, ptr %75, i32 0, i32 43
  %77 = load i32, ptr %76, align 8, !tbaa !14
  %78 = icmp ugt i32 %74, %77
  br i1 %78, label %79, label %89

79:                                               ; preds = %54
  %80 = load ptr, ptr %4, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.graph_s, ptr %80, i32 0, i32 42
  %82 = load ptr, ptr %81, align 8, !tbaa !13
  %83 = load i32, ptr %10, align 4, !tbaa !12
  %84 = zext i32 %83 to i64
  %85 = getelementptr inbounds i32, ptr %82, i64 %84
  %86 = load i32, ptr %85, align 4, !tbaa !12
  %87 = load ptr, ptr %4, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.graph_s, ptr %87, i32 0, i32 43
  store i32 %86, ptr %88, align 8, !tbaa !14
  br label %89

89:                                               ; preds = %79, %54
  br label %90

90:                                               ; preds = %89
  %91 = load i32, ptr %10, align 4, !tbaa !12
  %92 = add i32 %91, 1
  store i32 %92, ptr %10, align 4, !tbaa !12
  br label %48, !llvm.loop !15

93:                                               ; preds = %48
  %94 = load ptr, ptr %4, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.graph_s, ptr %94, i32 0, i32 43
  %96 = load i32, ptr %95, align 8, !tbaa !14
  %97 = add i32 %96, 1
  store i32 %97, ptr %14, align 4, !tbaa !12
  %98 = load i32, ptr %14, align 4, !tbaa !12
  %99 = zext i32 %98 to i64
  %100 = call ptr @safe_calloc(i64 noundef %99, i64 noundef 4)
  store ptr %100, ptr %13, align 8, !tbaa !5
  store i32 0, ptr %10, align 4, !tbaa !12
  br label %101

101:                                              ; preds = %132, %93
  %102 = load i32, ptr %10, align 4, !tbaa !12
  %103 = load ptr, ptr %4, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.graph_s, ptr %103, i32 0, i32 0
  %105 = load i32, ptr %104, align 8, !tbaa !9
  %106 = icmp ult i32 %102, %105
  br i1 %106, label %107, label %135

107:                                              ; preds = %101
  %108 = load ptr, ptr %4, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.graph_s, ptr %108, i32 0, i32 42
  %110 = load ptr, ptr %109, align 8, !tbaa !13
  %111 = load i32, ptr %10, align 4, !tbaa !12
  %112 = zext i32 %111 to i64
  %113 = getelementptr inbounds i32, ptr %110, i64 %112
  %114 = load i32, ptr %113, align 4, !tbaa !12
  %115 = load i32, ptr %14, align 4, !tbaa !12
  %116 = icmp ult i32 %114, %115
  br i1 %116, label %117, label %118

117:                                              ; preds = %107
  br label %119

118:                                              ; preds = %107
  call void @__assert_fail(ptr noundef @.str.102, ptr noundef @.str.1, i32 noundef 2735, ptr noundef @__PRETTY_FUNCTION__.add_cergm_terms_to_digraph) #8
  unreachable

119:                                              ; preds = %117
  %120 = load ptr, ptr %13, align 8, !tbaa !5
  %121 = load ptr, ptr %4, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.graph_s, ptr %121, i32 0, i32 42
  %123 = load ptr, ptr %122, align 8, !tbaa !13
  %124 = load i32, ptr %10, align 4, !tbaa !12
  %125 = zext i32 %124 to i64
  %126 = getelementptr inbounds i32, ptr %123, i64 %125
  %127 = load i32, ptr %126, align 4, !tbaa !12
  %128 = zext i32 %127 to i64
  %129 = getelementptr inbounds i32, ptr %120, i64 %128
  %130 = load i32, ptr %129, align 4, !tbaa !12
  %131 = add i32 %130, 1
  store i32 %131, ptr %129, align 4, !tbaa !12
  br label %132

132:                                              ; preds = %119
  %133 = load i32, ptr %10, align 4, !tbaa !12
  %134 = add i32 %133, 1
  store i32 %134, ptr %10, align 4, !tbaa !12
  br label %101, !llvm.loop !17

135:                                              ; preds = %101
  store i32 0, ptr %10, align 4, !tbaa !12
  br label %136

136:                                              ; preds = %155, %135
  %137 = load i32, ptr %10, align 4, !tbaa !12
  %138 = load i32, ptr %14, align 4, !tbaa !12
  %139 = icmp ult i32 %137, %138
  br i1 %139, label %140, label %158

140:                                              ; preds = %136
  %141 = load ptr, ptr %13, align 8, !tbaa !5
  %142 = load i32, ptr %10, align 4, !tbaa !12
  %143 = zext i32 %142 to i64
  %144 = getelementptr inbounds i32, ptr %141, i64 %143
  %145 = load i32, ptr %144, align 4, !tbaa !12
  %146 = icmp eq i32 %145, 0
  br i1 %146, label %147, label %154

147:                                              ; preds = %140
  %148 = load ptr, ptr @stderr, align 8, !tbaa !5
  %149 = load ptr, ptr %4, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.graph_s, ptr %149, i32 0, i32 43
  %151 = load i32, ptr %150, align 8, !tbaa !14
  %152 = load i32, ptr %10, align 4, !tbaa !12
  %153 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %148, ptr noundef @.str.103, i32 noundef %151, i32 noundef %152) #6
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %15, align 4
  br label %328

154:                                              ; preds = %140
  br label %155

155:                                              ; preds = %154
  %156 = load i32, ptr %10, align 4, !tbaa !12
  %157 = add i32 %156, 1
  store i32 %157, ptr %10, align 4, !tbaa !12
  br label %136, !llvm.loop !18

158:                                              ; preds = %136
  %159 = load ptr, ptr %13, align 8, !tbaa !5
  %160 = load ptr, ptr %4, align 8, !tbaa !5
  %161 = getelementptr inbounds %struct.graph_s, ptr %160, i32 0, i32 43
  %162 = load i32, ptr %161, align 8, !tbaa !14
  %163 = zext i32 %162 to i64
  %164 = getelementptr inbounds i32, ptr %159, i64 %163
  %165 = load i32, ptr %164, align 4, !tbaa !12
  %166 = load ptr, ptr %4, align 8, !tbaa !5
  %167 = getelementptr inbounds %struct.graph_s, ptr %166, i32 0, i32 44
  store i32 %165, ptr %167, align 4, !tbaa !19
  %168 = load ptr, ptr %4, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct.graph_s, ptr %168, i32 0, i32 44
  %170 = load i32, ptr %169, align 4, !tbaa !19
  %171 = zext i32 %170 to i64
  %172 = call ptr @safe_calloc(i64 noundef %171, i64 noundef 4)
  %173 = load ptr, ptr %4, align 8, !tbaa !5
  %174 = getelementptr inbounds %struct.graph_s, ptr %173, i32 0, i32 45
  store ptr %172, ptr %174, align 8, !tbaa !20
  store i32 0, ptr %11, align 4, !tbaa !12
  store i32 0, ptr %10, align 4, !tbaa !12
  br label %175

175:                                              ; preds = %225, %158
  %176 = load i32, ptr %11, align 4, !tbaa !12
  %177 = load ptr, ptr %4, align 8, !tbaa !5
  %178 = getelementptr inbounds %struct.graph_s, ptr %177, i32 0, i32 0
  %179 = load i32, ptr %178, align 8, !tbaa !9
  %180 = icmp ult i32 %176, %179
  br i1 %180, label %181, label %228

181:                                              ; preds = %175
  %182 = load ptr, ptr %4, align 8, !tbaa !5
  %183 = getelementptr inbounds %struct.graph_s, ptr %182, i32 0, i32 42
  %184 = load ptr, ptr %183, align 8, !tbaa !13
  %185 = load i32, ptr %11, align 4, !tbaa !12
  %186 = zext i32 %185 to i64
  %187 = getelementptr inbounds i32, ptr %184, i64 %186
  %188 = load i32, ptr %187, align 4, !tbaa !12
  %189 = load ptr, ptr %4, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.graph_s, ptr %189, i32 0, i32 43
  %191 = load i32, ptr %190, align 8, !tbaa !14
  %192 = icmp ule i32 %188, %191
  br i1 %192, label %193, label %194

193:                                              ; preds = %181
  br label %195

194:                                              ; preds = %181
  call void @__assert_fail(ptr noundef @.str.104, ptr noundef @.str.1, i32 noundef 2764, ptr noundef @__PRETTY_FUNCTION__.add_cergm_terms_to_digraph) #8
  unreachable

195:                                              ; preds = %193
  %196 = load ptr, ptr %4, align 8, !tbaa !5
  %197 = getelementptr inbounds %struct.graph_s, ptr %196, i32 0, i32 42
  %198 = load ptr, ptr %197, align 8, !tbaa !13
  %199 = load i32, ptr %11, align 4, !tbaa !12
  %200 = zext i32 %199 to i64
  %201 = getelementptr inbounds i32, ptr %198, i64 %200
  %202 = load i32, ptr %201, align 4, !tbaa !12
  %203 = load ptr, ptr %4, align 8, !tbaa !5
  %204 = getelementptr inbounds %struct.graph_s, ptr %203, i32 0, i32 43
  %205 = load i32, ptr %204, align 8, !tbaa !14
  %206 = icmp eq i32 %202, %205
  br i1 %206, label %207, label %224

207:                                              ; preds = %195
  %208 = load i32, ptr %10, align 4, !tbaa !12
  %209 = load ptr, ptr %4, align 8, !tbaa !5
  %210 = getelementptr inbounds %struct.graph_s, ptr %209, i32 0, i32 44
  %211 = load i32, ptr %210, align 4, !tbaa !19
  %212 = icmp ult i32 %208, %211
  br i1 %212, label %213, label %214

213:                                              ; preds = %207
  br label %215

214:                                              ; preds = %207
  call void @__assert_fail(ptr noundef @.str.105, ptr noundef @.str.1, i32 noundef 2766, ptr noundef @__PRETTY_FUNCTION__.add_cergm_terms_to_digraph) #8
  unreachable

215:                                              ; preds = %213
  %216 = load i32, ptr %11, align 4, !tbaa !12
  %217 = load ptr, ptr %4, align 8, !tbaa !5
  %218 = getelementptr inbounds %struct.graph_s, ptr %217, i32 0, i32 45
  %219 = load ptr, ptr %218, align 8, !tbaa !20
  %220 = load i32, ptr %10, align 4, !tbaa !12
  %221 = add i32 %220, 1
  store i32 %221, ptr %10, align 4, !tbaa !12
  %222 = zext i32 %220 to i64
  %223 = getelementptr inbounds i32, ptr %219, i64 %222
  store i32 %216, ptr %223, align 4, !tbaa !12
  br label %224

224:                                              ; preds = %215, %195
  br label %225

225:                                              ; preds = %224
  %226 = load i32, ptr %11, align 4, !tbaa !12
  %227 = add i32 %226, 1
  store i32 %227, ptr %11, align 4, !tbaa !12
  br label %175, !llvm.loop !21

228:                                              ; preds = %175
  store i32 0, ptr %10, align 4, !tbaa !12
  br label %229

229:                                              ; preds = %302, %228
  %230 = load i32, ptr %10, align 4, !tbaa !12
  %231 = load ptr, ptr %4, align 8, !tbaa !5
  %232 = getelementptr inbounds %struct.graph_s, ptr %231, i32 0, i32 3
  %233 = load i32, ptr %232, align 4, !tbaa !22
  %234 = icmp ult i32 %230, %233
  br i1 %234, label %235, label %305

235:                                              ; preds = %229
  %236 = load ptr, ptr %4, align 8, !tbaa !5
  %237 = getelementptr inbounds %struct.graph_s, ptr %236, i32 0, i32 8
  %238 = load ptr, ptr %237, align 8, !tbaa !23
  %239 = load i32, ptr %10, align 4, !tbaa !12
  %240 = zext i32 %239 to i64
  %241 = getelementptr inbounds %struct.nodepair_s, ptr %238, i64 %240
  %242 = getelementptr inbounds %struct.nodepair_s, ptr %241, i32 0, i32 0
  %243 = load i32, ptr %242, align 4, !tbaa !24
  store i32 %243, ptr %11, align 4, !tbaa !12
  %244 = load ptr, ptr %4, align 8, !tbaa !5
  %245 = getelementptr inbounds %struct.graph_s, ptr %244, i32 0, i32 8
  %246 = load ptr, ptr %245, align 8, !tbaa !23
  %247 = load i32, ptr %10, align 4, !tbaa !12
  %248 = zext i32 %247 to i64
  %249 = getelementptr inbounds %struct.nodepair_s, ptr %246, i64 %248
  %250 = getelementptr inbounds %struct.nodepair_s, ptr %249, i32 0, i32 1
  %251 = load i32, ptr %250, align 4, !tbaa !26
  store i32 %251, ptr %12, align 4, !tbaa !12
  %252 = load ptr, ptr %4, align 8, !tbaa !5
  %253 = getelementptr inbounds %struct.graph_s, ptr %252, i32 0, i32 42
  %254 = load ptr, ptr %253, align 8, !tbaa !13
  %255 = load i32, ptr %11, align 4, !tbaa !12
  %256 = zext i32 %255 to i64
  %257 = getelementptr inbounds i32, ptr %254, i64 %256
  %258 = load i32, ptr %257, align 4, !tbaa !12
  %259 = load ptr, ptr %4, align 8, !tbaa !5
  %260 = getelementptr inbounds %struct.graph_s, ptr %259, i32 0, i32 43
  %261 = load i32, ptr %260, align 8, !tbaa !14
  %262 = icmp eq i32 %258, %261
  br i1 %262, label %263, label %301

263:                                              ; preds = %235
  %264 = load ptr, ptr %4, align 8, !tbaa !5
  %265 = getelementptr inbounds %struct.graph_s, ptr %264, i32 0, i32 46
  %266 = load i32, ptr %265, align 8, !tbaa !27
  %267 = add i32 %266, 1
  store i32 %267, ptr %265, align 8, !tbaa !27
  %268 = load ptr, ptr %4, align 8, !tbaa !5
  %269 = getelementptr inbounds %struct.graph_s, ptr %268, i32 0, i32 47
  %270 = load ptr, ptr %269, align 8, !tbaa !28
  %271 = load ptr, ptr %4, align 8, !tbaa !5
  %272 = getelementptr inbounds %struct.graph_s, ptr %271, i32 0, i32 46
  %273 = load i32, ptr %272, align 8, !tbaa !27
  %274 = zext i32 %273 to i64
  %275 = mul i64 %274, 8
  %276 = call ptr @safe_realloc(ptr noundef %270, i64 noundef %275)
  %277 = load ptr, ptr %4, align 8, !tbaa !5
  %278 = getelementptr inbounds %struct.graph_s, ptr %277, i32 0, i32 47
  store ptr %276, ptr %278, align 8, !tbaa !28
  %279 = load i32, ptr %11, align 4, !tbaa !12
  %280 = load ptr, ptr %4, align 8, !tbaa !5
  %281 = getelementptr inbounds %struct.graph_s, ptr %280, i32 0, i32 47
  %282 = load ptr, ptr %281, align 8, !tbaa !28
  %283 = load ptr, ptr %4, align 8, !tbaa !5
  %284 = getelementptr inbounds %struct.graph_s, ptr %283, i32 0, i32 46
  %285 = load i32, ptr %284, align 8, !tbaa !27
  %286 = sub i32 %285, 1
  %287 = zext i32 %286 to i64
  %288 = getelementptr inbounds %struct.nodepair_s, ptr %282, i64 %287
  %289 = getelementptr inbounds %struct.nodepair_s, ptr %288, i32 0, i32 0
  store i32 %279, ptr %289, align 4, !tbaa !24
  %290 = load i32, ptr %12, align 4, !tbaa !12
  %291 = load ptr, ptr %4, align 8, !tbaa !5
  %292 = getelementptr inbounds %struct.graph_s, ptr %291, i32 0, i32 47
  %293 = load ptr, ptr %292, align 8, !tbaa !28
  %294 = load ptr, ptr %4, align 8, !tbaa !5
  %295 = getelementptr inbounds %struct.graph_s, ptr %294, i32 0, i32 46
  %296 = load i32, ptr %295, align 8, !tbaa !27
  %297 = sub i32 %296, 1
  %298 = zext i32 %297 to i64
  %299 = getelementptr inbounds %struct.nodepair_s, ptr %293, i64 %298
  %300 = getelementptr inbounds %struct.nodepair_s, ptr %299, i32 0, i32 1
  store i32 %290, ptr %300, align 4, !tbaa !26
  br label %301

301:                                              ; preds = %263, %235
  br label %302

302:                                              ; preds = %301
  %303 = load i32, ptr %10, align 4, !tbaa !12
  %304 = add i32 %303, 1
  store i32 %304, ptr %10, align 4, !tbaa !12
  br label %229, !llvm.loop !29

305:                                              ; preds = %229
  store i32 0, ptr %7, align 4, !tbaa !12
  br label %306

306:                                              ; preds = %321, %305
  %307 = load i32, ptr %7, align 4, !tbaa !12
  %308 = load i32, ptr %6, align 4, !tbaa !12
  %309 = icmp slt i32 %307, %308
  br i1 %309, label %310, label %324

310:                                              ; preds = %306
  %311 = load ptr, ptr %8, align 8, !tbaa !5
  %312 = load i32, ptr %7, align 4, !tbaa !12
  %313 = sext i32 %312 to i64
  %314 = getelementptr inbounds ptr, ptr %311, i64 %313
  %315 = load ptr, ptr %314, align 8, !tbaa !5
  call void @free(ptr noundef %315) #6
  %316 = load ptr, ptr %9, align 8, !tbaa !5
  %317 = load i32, ptr %7, align 4, !tbaa !12
  %318 = sext i32 %317 to i64
  %319 = getelementptr inbounds ptr, ptr %316, i64 %318
  %320 = load ptr, ptr %319, align 8, !tbaa !5
  call void @free(ptr noundef %320) #6
  br label %321

321:                                              ; preds = %310
  %322 = load i32, ptr %7, align 4, !tbaa !12
  %323 = add nsw i32 %322, 1
  store i32 %323, ptr %7, align 4, !tbaa !12
  br label %306, !llvm.loop !30

324:                                              ; preds = %306
  %325 = load ptr, ptr %8, align 8, !tbaa !5
  call void @free(ptr noundef %325) #6
  %326 = load ptr, ptr %9, align 8, !tbaa !5
  call void @free(ptr noundef %326) #6
  %327 = load ptr, ptr %13, align 8, !tbaa !5
  call void @free(ptr noundef %327) #6
  store i32 0, ptr %3, align 4
  store i32 1, ptr %15, align 4
  br label %328

328:                                              ; preds = %324, %147, %40, %29, %22
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  %329 = load i32, ptr %3, align 4
  ret i32 %329
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 "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 uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind 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 #6 = { nounwind }
attributes #7 = { nounwind willreturn memory(read) }
attributes #8 = { 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 = !{!10, !11, i64 0}
!10 = !{!"graph_s", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !11, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !11, i64 88, !11, i64 92, !11, i64 96, !6, i64 104, !6, i64 112, !11, i64 120, !6, i64 128, !6, i64 136, !11, i64 144, !6, i64 152, !6, i64 160, !11, i64 168, !6, i64 176, !6, i64 184, !6, i64 192, !11, i64 200, !11, i64 204, !11, i64 208, !11, i64 212, !11, i64 216, !6, i64 224, !11, i64 232, !11, i64 236, !6, i64 240, !6, i64 248, !11, i64 256, !6, i64 264, !11, i64 272, !6, i64 280, !6, i64 288, !11, i64 296, !11, i64 300, !6, i64 304, !11, i64 312, !6, i64 320}
!11 = !{!"int", !7, i64 0}
!12 = !{!11, !11, i64 0}
!13 = !{!10, !6, i64 288}
!14 = !{!10, !11, i64 296}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}
!18 = distinct !{!18, !16}
!19 = !{!10, !11, i64 300}
!20 = !{!10, !6, i64 304}
!21 = distinct !{!21, !16}
!22 = !{!10, !11, i64 12}
!23 = !{!10, !6, i64 48}
!24 = !{!25, !11, i64 0}
!25 = !{!"nodepair_s", !11, i64 0, !11, i64 4}
!26 = !{!25, !11, i64 4}
!27 = !{!10, !11, i64 312}
!28 = !{!10, !6, i64 320}
!29 = distinct !{!29, !16}
!30 = distinct !{!30, !16}


; 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.nodepair_s = type { i32, i32 }

@.str.1 = external hidden unnamed_addr constant [71 x i8], align 1
@stderr = external local_unnamed_addr global ptr, align 8
@.str.98 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.99 = external hidden unnamed_addr constant [78 x i8], align 1
@.str.100 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.101 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.102 = external hidden unnamed_addr constant [23 x i8], align 1
@__PRETTY_FUNCTION__.add_cergm_terms_to_digraph = external hidden unnamed_addr constant [56 x i8], align 1
@.str.103 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.104 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.105 = external hidden unnamed_addr constant [25 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: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

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

declare ptr @safe_realloc(ptr noundef, i64 noundef) local_unnamed_addr #2

declare ptr @safe_calloc(i64 noundef, i64 noundef) local_unnamed_addr #2

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

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

; Function Attrs: nounwind uwtable
declare hidden i32 @load_integer_attributes(ptr noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #5

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

; Function Attrs: nounwind uwtable
define dso_local range(i32 -1, 1) i32 @add_cergm_terms_to_digraph(ptr nocapture noundef %0, ptr noundef %1) local_unnamed_addr #5 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  %5 = load i32, ptr %0, align 8, !tbaa !5
  %6 = call i32 @load_integer_attributes(ptr noundef %1, i32 noundef %5, i32 noundef 0, ptr noundef nonnull %3, ptr noundef nonnull %4)
  %7 = icmp slt i32 %6, 0
  br i1 %7, label %8, label %11

8:                                                ; preds = %2
  %9 = load ptr, ptr @stderr, align 8, !tbaa !11
  %10 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %9, ptr noundef nonnull @.str.98, ptr noundef %1) #8
  br label %143

11:                                               ; preds = %2
  %.not = icmp eq i32 %6, 1
  br i1 %.not, label %15, label %12

12:                                               ; preds = %11
  %13 = load ptr, ptr @stderr, align 8, !tbaa !11
  %14 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %13, ptr noundef nonnull @.str.99, ptr noundef %1, i32 noundef %6) #8
  br label %143

15:                                               ; preds = %11
  %16 = load ptr, ptr %3, align 8, !tbaa !11
  %17 = load ptr, ptr %16, align 8, !tbaa !11
  %18 = call i32 @strcasecmp(ptr noundef %17, ptr noundef nonnull @.str.100) #9
  %.not90 = icmp eq i32 %18, 0
  br i1 %.not90, label %.preheader93, label %25

.preheader93:                                     ; preds = %15
  %19 = load i32, ptr %0, align 8, !tbaa !5
  %.not108 = icmp eq i32 %19, 0
  br i1 %.not108, label %.preheader93.._crit_edge_crit_edge, label %.lr.ph

.preheader93.._crit_edge_crit_edge:               ; preds = %.preheader93
  %.phi.trans.insert = getelementptr inbounds i8, ptr %0, i64 296
  %.pre = load i32, ptr %.phi.trans.insert, align 8, !tbaa !12
  br label %._crit_edge

.lr.ph:                                           ; preds = %.preheader93
  %20 = load ptr, ptr %4, align 8, !tbaa !11
  %21 = load ptr, ptr %20, align 8, !tbaa !11
  %22 = getelementptr inbounds i8, ptr %0, i64 288
  %23 = load ptr, ptr %22, align 8, !tbaa !13
  %24 = getelementptr inbounds i8, ptr %0, i64 296
  br label %28

25:                                               ; preds = %15
  %26 = load ptr, ptr @stderr, align 8, !tbaa !11
  %27 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %26, ptr noundef nonnull @.str.101, ptr noundef %1, ptr noundef %17) #8
  br label %143

28:                                               ; preds = %.lr.ph, %35
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %35 ]
  %29 = getelementptr inbounds i32, ptr %21, i64 %indvars.iv
  %30 = load i32, ptr %29, align 4, !tbaa !14
  %31 = getelementptr inbounds i32, ptr %23, i64 %indvars.iv
  store i32 %30, ptr %31, align 4, !tbaa !14
  %32 = load i32, ptr %24, align 8, !tbaa !12
  %33 = icmp ugt i32 %30, %32
  br i1 %33, label %34, label %35

34:                                               ; preds = %28
  store i32 %30, ptr %24, align 8, !tbaa !12
  br label %35

35:                                               ; preds = %28, %34
  %36 = phi i32 [ %32, %28 ], [ %30, %34 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %37 = load i32, ptr %0, align 8, !tbaa !5
  %38 = zext i32 %37 to i64
  %39 = icmp ult i64 %indvars.iv.next, %38
  br i1 %39, label %28, label %._crit_edge, !llvm.loop !15

._crit_edge:                                      ; preds = %35, %.preheader93.._crit_edge_crit_edge
  %40 = phi i32 [ %.pre, %.preheader93.._crit_edge_crit_edge ], [ %36, %35 ]
  %41 = getelementptr inbounds i8, ptr %0, i64 296
  %42 = add i32 %40, 1
  %43 = zext i32 %42 to i64
  %44 = call ptr @safe_calloc(i64 noundef %43, i64 noundef 4) #7
  %45 = load i32, ptr %0, align 8, !tbaa !5
  %.not109 = icmp eq i32 %45, 0
  br i1 %.not109, label %.preheader92, label %.lr.ph98

.lr.ph98:                                         ; preds = %._crit_edge
  %46 = getelementptr inbounds i8, ptr %0, i64 288
  %47 = load ptr, ptr %46, align 8, !tbaa !13
  br label %48

.preheader92:                                     ; preds = %._crit_edge
  %.not110 = icmp eq i32 %42, 0
  br i1 %.not110, label %._crit_edge101, label %.lr.ph100.preheader

48:                                               ; preds = %.lr.ph98, %53
  %indvars.iv115 = phi i64 [ 0, %.lr.ph98 ], [ %indvars.iv.next116, %53 ]
  %49 = getelementptr inbounds i32, ptr %47, i64 %indvars.iv115
  %50 = load i32, ptr %49, align 4, !tbaa !14
  %51 = icmp ult i32 %50, %42
  br i1 %51, label %53, label %52

52:                                               ; preds = %48
  call void @__assert_fail(ptr noundef nonnull @.str.102, ptr noundef nonnull @.str.1, i32 noundef 2735, ptr noundef nonnull @__PRETTY_FUNCTION__.add_cergm_terms_to_digraph) #10
  unreachable

53:                                               ; preds = %48
  %54 = zext i32 %50 to i64
  %55 = getelementptr inbounds i32, ptr %44, i64 %54
  %56 = load i32, ptr %55, align 4, !tbaa !14
  %57 = add i32 %56, 1
  store i32 %57, ptr %55, align 4, !tbaa !14
  %indvars.iv.next116 = add nuw nsw i64 %indvars.iv115, 1
  %58 = load i32, ptr %0, align 8, !tbaa !5
  %59 = zext i32 %58 to i64
  %60 = icmp ult i64 %indvars.iv.next116, %59
  br i1 %60, label %48, label %.lr.ph100.preheader, !llvm.loop !17

.lr.ph100.preheader:                              ; preds = %53, %.preheader92
  br label %.lr.ph100

.lr.ph100:                                        ; preds = %.lr.ph100.preheader, %69
  %indvars.iv118 = phi i64 [ %indvars.iv.next119, %69 ], [ 0, %.lr.ph100.preheader ]
  %61 = getelementptr inbounds i32, ptr %44, i64 %indvars.iv118
  %62 = load i32, ptr %61, align 4, !tbaa !14
  %63 = icmp eq i32 %62, 0
  br i1 %63, label %64, label %69

64:                                               ; preds = %.lr.ph100
  %65 = trunc nuw i64 %indvars.iv118 to i32
  %66 = load ptr, ptr @stderr, align 8, !tbaa !11
  %67 = load i32, ptr %41, align 8, !tbaa !12
  %68 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %66, ptr noundef nonnull @.str.103, i32 noundef %67, i32 noundef %65) #8
  br label %143

69:                                               ; preds = %.lr.ph100
  %indvars.iv.next119 = add nuw nsw i64 %indvars.iv118, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next119, %43
  br i1 %exitcond.not, label %._crit_edge101, label %.lr.ph100, !llvm.loop !18

._crit_edge101:                                   ; preds = %69, %.preheader92
  %70 = load i32, ptr %41, align 8, !tbaa !12
  %71 = zext i32 %70 to i64
  %72 = getelementptr inbounds i32, ptr %44, i64 %71
  %73 = load i32, ptr %72, align 4, !tbaa !14
  %74 = getelementptr inbounds i8, ptr %0, i64 300
  store i32 %73, ptr %74, align 4, !tbaa !19
  %75 = zext i32 %73 to i64
  %76 = call ptr @safe_calloc(i64 noundef %75, i64 noundef 4) #7
  %77 = getelementptr inbounds i8, ptr %0, i64 304
  store ptr %76, ptr %77, align 8, !tbaa !20
  %78 = load i32, ptr %0, align 8, !tbaa !5
  %.not111 = icmp eq i32 %78, 0
  br i1 %.not111, label %.preheader, label %.lr.ph105

.lr.ph105:                                        ; preds = %._crit_edge101
  %79 = getelementptr inbounds i8, ptr %0, i64 288
  %80 = load ptr, ptr %79, align 8, !tbaa !13
  br label %87

.preheader:                                       ; preds = %104, %._crit_edge101
  %81 = getelementptr inbounds i8, ptr %0, i64 12
  %82 = load i32, ptr %81, align 4, !tbaa !21
  %.not112 = icmp eq i32 %82, 0
  br i1 %.not112, label %.critedge, label %.lr.ph107

.lr.ph107:                                        ; preds = %.preheader
  %83 = getelementptr inbounds i8, ptr %0, i64 48
  %84 = getelementptr inbounds i8, ptr %0, i64 288
  %85 = getelementptr inbounds i8, ptr %0, i64 312
  %86 = getelementptr inbounds i8, ptr %0, i64 320
  br label %108

87:                                               ; preds = %.lr.ph105, %104
  %88 = phi i32 [ %78, %.lr.ph105 ], [ %105, %104 ]
  %indvars.iv121 = phi i64 [ 0, %.lr.ph105 ], [ %indvars.iv.next122, %104 ]
  %.3103 = phi i32 [ 0, %.lr.ph105 ], [ %.4, %104 ]
  %89 = getelementptr inbounds i32, ptr %80, i64 %indvars.iv121
  %90 = load i32, ptr %89, align 4, !tbaa !14
  %91 = load i32, ptr %41, align 8, !tbaa !12
  %.not91 = icmp ugt i32 %90, %91
  br i1 %.not91, label %92, label %93

92:                                               ; preds = %87
  call void @__assert_fail(ptr noundef nonnull @.str.104, ptr noundef nonnull @.str.1, i32 noundef 2764, ptr noundef nonnull @__PRETTY_FUNCTION__.add_cergm_terms_to_digraph) #10
  unreachable

93:                                               ; preds = %87
  %94 = icmp eq i32 %90, %91
  br i1 %94, label %95, label %104

95:                                               ; preds = %93
  %96 = load i32, ptr %74, align 4, !tbaa !19
  %97 = icmp ult i32 %.3103, %96
  br i1 %97, label %99, label %98

98:                                               ; preds = %95
  call void @__assert_fail(ptr noundef nonnull @.str.105, ptr noundef nonnull @.str.1, i32 noundef 2766, ptr noundef nonnull @__PRETTY_FUNCTION__.add_cergm_terms_to_digraph) #10
  unreachable

99:                                               ; preds = %95
  %100 = add nuw i32 %.3103, 1
  %101 = zext i32 %.3103 to i64
  %102 = getelementptr inbounds i32, ptr %76, i64 %101
  %103 = trunc nuw i64 %indvars.iv121 to i32
  store i32 %103, ptr %102, align 4, !tbaa !14
  %.pre127 = load i32, ptr %0, align 8, !tbaa !5
  br label %104

104:                                              ; preds = %93, %99
  %105 = phi i32 [ %.pre127, %99 ], [ %88, %93 ]
  %.4 = phi i32 [ %100, %99 ], [ %.3103, %93 ]
  %indvars.iv.next122 = add nuw nsw i64 %indvars.iv121, 1
  %106 = zext i32 %105 to i64
  %107 = icmp ult i64 %indvars.iv.next122, %106
  br i1 %107, label %87, label %.preheader, !llvm.loop !22

108:                                              ; preds = %.lr.ph107, %133
  %109 = phi i32 [ %82, %.lr.ph107 ], [ %134, %133 ]
  %indvars.iv124 = phi i64 [ 0, %.lr.ph107 ], [ %indvars.iv.next125, %133 ]
  %110 = load ptr, ptr %83, align 8, !tbaa !23
  %111 = getelementptr inbounds %struct.nodepair_s, ptr %110, i64 %indvars.iv124
  %112 = load i32, ptr %111, align 4, !tbaa !24
  %113 = load ptr, ptr %84, align 8, !tbaa !13
  %114 = zext i32 %112 to i64
  %115 = getelementptr inbounds i32, ptr %113, i64 %114
  %116 = load i32, ptr %115, align 4, !tbaa !14
  %117 = load i32, ptr %41, align 8, !tbaa !12
  %118 = icmp eq i32 %116, %117
  br i1 %118, label %119, label %133

119:                                              ; preds = %108
  %120 = getelementptr inbounds i8, ptr %111, i64 4
  %121 = load i32, ptr %120, align 4, !tbaa !26
  %122 = load i32, ptr %85, align 8, !tbaa !27
  %123 = add i32 %122, 1
  store i32 %123, ptr %85, align 8, !tbaa !27
  %124 = load ptr, ptr %86, align 8, !tbaa !28
  %125 = zext i32 %123 to i64
  %126 = shl nuw nsw i64 %125, 3
  %127 = call ptr @safe_realloc(ptr noundef %124, i64 noundef %126) #7
  store ptr %127, ptr %86, align 8, !tbaa !28
  %128 = load i32, ptr %85, align 8, !tbaa !27
  %129 = add i32 %128, -1
  %130 = zext i32 %129 to i64
  %131 = getelementptr inbounds %struct.nodepair_s, ptr %127, i64 %130
  store i32 %112, ptr %131, align 4, !tbaa !24
  %132 = getelementptr inbounds %struct.nodepair_s, ptr %127, i64 %130, i32 1
  store i32 %121, ptr %132, align 4, !tbaa !26
  %.pre128 = load i32, ptr %81, align 4, !tbaa !21
  br label %133

133:                                              ; preds = %108, %119
  %134 = phi i32 [ %109, %108 ], [ %.pre128, %119 ]
  %indvars.iv.next125 = add nuw nsw i64 %indvars.iv124, 1
  %135 = zext i32 %134 to i64
  %136 = icmp ult i64 %indvars.iv.next125, %135
  br i1 %136, label %108, label %.critedge, !llvm.loop !29

.critedge:                                        ; preds = %133, %.preheader
  %137 = load ptr, ptr %3, align 8, !tbaa !11
  %138 = load ptr, ptr %137, align 8, !tbaa !11
  call void @free(ptr noundef %138) #7
  %139 = load ptr, ptr %4, align 8, !tbaa !11
  %140 = load ptr, ptr %139, align 8, !tbaa !11
  call void @free(ptr noundef %140) #7
  %141 = load ptr, ptr %3, align 8, !tbaa !11
  call void @free(ptr noundef %141) #7
  %142 = load ptr, ptr %4, align 8, !tbaa !11
  call void @free(ptr noundef %142) #7
  call void @free(ptr noundef %44) #7
  br label %143

143:                                              ; preds = %.critedge, %64, %25, %12, %8
  %.0 = phi i32 [ -1, %8 ], [ -1, %12 ], [ -1, %25 ], [ -1, %64 ], [ 0, %.critedge ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  ret i32 %.0
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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 #4 = { 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 #5 = { 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 #6 = { mustprogress nofree 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 #7 = { nounwind }
attributes #8 = { cold nounwind }
attributes #9 = { nounwind willreturn memory(read) }
attributes #10 = { 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, !7, i64 0}
!6 = !{!"graph_s", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !7, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !7, i64 88, !7, i64 92, !7, i64 96, !10, i64 104, !10, i64 112, !7, i64 120, !10, i64 128, !10, i64 136, !7, i64 144, !10, i64 152, !10, i64 160, !7, i64 168, !10, i64 176, !10, i64 184, !10, i64 192, !7, i64 200, !7, i64 204, !7, i64 208, !7, i64 212, !7, i64 216, !10, i64 224, !7, i64 232, !7, i64 236, !10, i64 240, !10, i64 248, !7, i64 256, !10, i64 264, !7, i64 272, !10, i64 280, !10, i64 288, !7, i64 296, !7, i64 300, !10, i64 304, !7, i64 312, !10, i64 320}
!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 = !{!6, !7, i64 296}
!13 = !{!6, !10, i64 288}
!14 = !{!7, !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}
!18 = distinct !{!18, !16}
!19 = !{!6, !7, i64 300}
!20 = !{!6, !10, i64 304}
!21 = !{!6, !7, i64 12}
!22 = distinct !{!22, !16}
!23 = !{!6, !10, i64 48}
!24 = !{!25, !7, i64 0}
!25 = !{!"nodepair_s", !7, i64 0, !7, i64 4}
!26 = !{!25, !7, i64 4}
!27 = !{!6, !7, i64 312}
!28 = !{!6, !10, i64 320}
!29 = distinct !{!29, !16}


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