; 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 }

@.str = external hidden unnamed_addr constant [15 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [71 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [17 x i8], align 1
@__PRETTY_FUNCTION__.insertArc = external hidden unnamed_addr constant [42 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [29 x i8], align 1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #0

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

; Function Attrs: nounwind uwtable
define dso_local void @insertArc(ptr noundef %0, i32 noundef %1, i32 noundef %2) #1 {
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  store i32 %2, ptr %6, align 4, !tbaa !9
  %7 = load ptr, ptr %4, align 8, !tbaa !5
  %8 = getelementptr inbounds %struct.graph_s, ptr %7, i32 0, i32 1
  %9 = load i32, ptr %8, align 4, !tbaa !11
  %10 = icmp ne i32 %9, 0
  br i1 %10, label %11, label %12

11:                                               ; preds = %3
  br label %13

12:                                               ; preds = %3
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 1242, ptr noundef @__PRETTY_FUNCTION__.insertArc) #3
  unreachable

13:                                               ; preds = %11
  %14 = load i32, ptr %5, align 4, !tbaa !9
  %15 = load ptr, ptr %4, align 8, !tbaa !5
  %16 = getelementptr inbounds %struct.graph_s, ptr %15, i32 0, i32 0
  %17 = load i32, ptr %16, align 8, !tbaa !13
  %18 = icmp ult i32 %14, %17
  br i1 %18, label %19, label %20

19:                                               ; preds = %13
  br label %21

20:                                               ; preds = %13
  call void @__assert_fail(ptr noundef @.str.5, ptr noundef @.str.1, i32 noundef 1243, ptr noundef @__PRETTY_FUNCTION__.insertArc) #3
  unreachable

21:                                               ; preds = %19
  %22 = load i32, ptr %6, align 4, !tbaa !9
  %23 = load ptr, ptr %4, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.graph_s, ptr %23, i32 0, i32 0
  %25 = load i32, ptr %24, align 8, !tbaa !13
  %26 = icmp ult i32 %22, %25
  br i1 %26, label %27, label %28

27:                                               ; preds = %21
  br label %29

28:                                               ; preds = %21
  call void @__assert_fail(ptr noundef @.str.6, ptr noundef @.str.1, i32 noundef 1244, ptr noundef @__PRETTY_FUNCTION__.insertArc) #3
  unreachable

29:                                               ; preds = %27
  %30 = load ptr, ptr %4, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.graph_s, ptr %30, i32 0, i32 3
  %32 = load i32, ptr %31, align 4, !tbaa !14
  %33 = add i32 %32, 1
  store i32 %33, ptr %31, align 4, !tbaa !14
  %34 = load ptr, ptr %4, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.graph_s, ptr %34, i32 0, i32 5
  %36 = load ptr, ptr %35, align 8, !tbaa !15
  %37 = load i32, ptr %5, align 4, !tbaa !9
  %38 = zext i32 %37 to i64
  %39 = getelementptr inbounds ptr, ptr %36, i64 %38
  %40 = load ptr, ptr %39, align 8, !tbaa !5
  %41 = load ptr, ptr %4, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.graph_s, ptr %41, i32 0, i32 4
  %43 = load ptr, ptr %42, align 8, !tbaa !16
  %44 = load i32, ptr %5, align 4, !tbaa !9
  %45 = zext i32 %44 to i64
  %46 = getelementptr inbounds i32, ptr %43, i64 %45
  %47 = load i32, ptr %46, align 4, !tbaa !9
  %48 = add i32 %47, 1
  %49 = zext i32 %48 to i64
  %50 = mul i64 %49, 4
  %51 = call ptr @safe_realloc(ptr noundef %40, i64 noundef %50)
  %52 = load ptr, ptr %4, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.graph_s, ptr %52, i32 0, i32 5
  %54 = load ptr, ptr %53, align 8, !tbaa !15
  %55 = load i32, ptr %5, align 4, !tbaa !9
  %56 = zext i32 %55 to i64
  %57 = getelementptr inbounds ptr, ptr %54, i64 %56
  store ptr %51, ptr %57, align 8, !tbaa !5
  %58 = load i32, ptr %6, align 4, !tbaa !9
  %59 = load ptr, ptr %4, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.graph_s, ptr %59, i32 0, i32 5
  %61 = load ptr, ptr %60, align 8, !tbaa !15
  %62 = load i32, ptr %5, align 4, !tbaa !9
  %63 = zext i32 %62 to i64
  %64 = getelementptr inbounds ptr, ptr %61, i64 %63
  %65 = load ptr, ptr %64, align 8, !tbaa !5
  %66 = load ptr, ptr %4, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.graph_s, ptr %66, i32 0, i32 4
  %68 = load ptr, ptr %67, align 8, !tbaa !16
  %69 = load i32, ptr %5, align 4, !tbaa !9
  %70 = zext i32 %69 to i64
  %71 = getelementptr inbounds i32, ptr %68, i64 %70
  %72 = load i32, ptr %71, align 4, !tbaa !9
  %73 = add i32 %72, 1
  store i32 %73, ptr %71, align 4, !tbaa !9
  %74 = zext i32 %72 to i64
  %75 = getelementptr inbounds i32, ptr %65, i64 %74
  store i32 %58, ptr %75, align 4, !tbaa !9
  %76 = load ptr, ptr %4, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.graph_s, ptr %76, i32 0, i32 7
  %78 = load ptr, ptr %77, align 8, !tbaa !17
  %79 = load i32, ptr %6, align 4, !tbaa !9
  %80 = zext i32 %79 to i64
  %81 = getelementptr inbounds ptr, ptr %78, i64 %80
  %82 = load ptr, ptr %81, align 8, !tbaa !5
  %83 = load ptr, ptr %4, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.graph_s, ptr %83, i32 0, i32 6
  %85 = load ptr, ptr %84, align 8, !tbaa !18
  %86 = load i32, ptr %6, align 4, !tbaa !9
  %87 = zext i32 %86 to i64
  %88 = getelementptr inbounds i32, ptr %85, i64 %87
  %89 = load i32, ptr %88, align 4, !tbaa !9
  %90 = add i32 %89, 1
  %91 = zext i32 %90 to i64
  %92 = mul i64 %91, 4
  %93 = call ptr @safe_realloc(ptr noundef %82, i64 noundef %92)
  %94 = load ptr, ptr %4, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.graph_s, ptr %94, i32 0, i32 7
  %96 = load ptr, ptr %95, align 8, !tbaa !17
  %97 = load i32, ptr %6, align 4, !tbaa !9
  %98 = zext i32 %97 to i64
  %99 = getelementptr inbounds ptr, ptr %96, i64 %98
  store ptr %93, ptr %99, align 8, !tbaa !5
  %100 = load i32, ptr %5, align 4, !tbaa !9
  %101 = load ptr, ptr %4, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.graph_s, ptr %101, i32 0, i32 7
  %103 = load ptr, ptr %102, align 8, !tbaa !17
  %104 = load i32, ptr %6, align 4, !tbaa !9
  %105 = zext i32 %104 to i64
  %106 = getelementptr inbounds ptr, ptr %103, i64 %105
  %107 = load ptr, ptr %106, align 8, !tbaa !5
  %108 = load ptr, ptr %4, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.graph_s, ptr %108, i32 0, i32 6
  %110 = load ptr, ptr %109, align 8, !tbaa !18
  %111 = load i32, ptr %6, align 4, !tbaa !9
  %112 = zext i32 %111 to i64
  %113 = getelementptr inbounds i32, ptr %110, i64 %112
  %114 = load i32, ptr %113, align 4, !tbaa !9
  %115 = add i32 %114, 1
  store i32 %115, ptr %113, align 4, !tbaa !9
  %116 = zext i32 %114 to i64
  %117 = getelementptr inbounds i32, ptr %107, i64 %116
  store i32 %100, ptr %117, align 4, !tbaa !9
  %118 = load ptr, ptr %4, align 8, !tbaa !5
  %119 = load i32, ptr %5, align 4, !tbaa !9
  %120 = load i32, ptr %6, align 4, !tbaa !9
  %121 = call i32 @isArc(ptr noundef %118, i32 noundef %119, i32 noundef %120)
  %122 = icmp ne i32 %121, 0
  br i1 %122, label %123, label %124

123:                                              ; preds = %29
  br label %125

124:                                              ; preds = %29
  call void @__assert_fail(ptr noundef @.str.7, ptr noundef @.str.1, i32 noundef 1256, ptr noundef @__PRETTY_FUNCTION__.insertArc) #3
  unreachable

125:                                              ; preds = %123
  %126 = load ptr, ptr %4, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.graph_s, ptr %126, i32 0, i32 33
  %128 = load ptr, ptr %127, align 8, !tbaa !19
  %129 = load i32, ptr %5, align 4, !tbaa !9
  %130 = zext i32 %129 to i64
  %131 = getelementptr inbounds i32, ptr %128, i64 %130
  %132 = load i32, ptr %131, align 4, !tbaa !9
  %133 = load ptr, ptr %4, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.graph_s, ptr %133, i32 0, i32 33
  %135 = load ptr, ptr %134, align 8, !tbaa !19
  %136 = load i32, ptr %6, align 4, !tbaa !9
  %137 = zext i32 %136 to i64
  %138 = getelementptr inbounds i32, ptr %135, i64 %137
  %139 = load i32, ptr %138, align 4, !tbaa !9
  %140 = icmp ugt i32 %132, %139
  br i1 %140, label %141, label %169

141:                                              ; preds = %125
  %142 = load ptr, ptr %4, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.graph_s, ptr %142, i32 0, i32 33
  %144 = load ptr, ptr %143, align 8, !tbaa !19
  %145 = load i32, ptr %5, align 4, !tbaa !9
  %146 = zext i32 %145 to i64
  %147 = getelementptr inbounds i32, ptr %144, i64 %146
  %148 = load i32, ptr %147, align 4, !tbaa !9
  %149 = load ptr, ptr %4, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.graph_s, ptr %149, i32 0, i32 33
  %151 = load ptr, ptr %150, align 8, !tbaa !19
  %152 = load i32, ptr %6, align 4, !tbaa !9
  %153 = zext i32 %152 to i64
  %154 = getelementptr inbounds i32, ptr %151, i64 %153
  %155 = load i32, ptr %154, align 4, !tbaa !9
  %156 = add i32 %155, 1
  %157 = icmp eq i32 %148, %156
  br i1 %157, label %158, label %159

158:                                              ; preds = %141
  br label %160

159:                                              ; preds = %141
  call void @__assert_fail(ptr noundef @.str.8, ptr noundef @.str.1, i32 noundef 1260, ptr noundef @__PRETTY_FUNCTION__.insertArc) #3
  unreachable

160:                                              ; preds = %158
  %161 = load ptr, ptr %4, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.graph_s, ptr %161, i32 0, i32 37
  %163 = load ptr, ptr %162, align 8, !tbaa !20
  %164 = load i32, ptr %5, align 4, !tbaa !9
  %165 = zext i32 %164 to i64
  %166 = getelementptr inbounds i32, ptr %163, i64 %165
  %167 = load i32, ptr %166, align 4, !tbaa !9
  %168 = add i32 %167, 1
  store i32 %168, ptr %166, align 4, !tbaa !9
  br label %214

169:                                              ; preds = %125
  %170 = load ptr, ptr %4, align 8, !tbaa !5
  %171 = getelementptr inbounds %struct.graph_s, ptr %170, i32 0, i32 33
  %172 = load ptr, ptr %171, align 8, !tbaa !19
  %173 = load i32, ptr %6, align 4, !tbaa !9
  %174 = zext i32 %173 to i64
  %175 = getelementptr inbounds i32, ptr %172, i64 %174
  %176 = load i32, ptr %175, align 4, !tbaa !9
  %177 = load ptr, ptr %4, align 8, !tbaa !5
  %178 = getelementptr inbounds %struct.graph_s, ptr %177, i32 0, i32 33
  %179 = load ptr, ptr %178, align 8, !tbaa !19
  %180 = load i32, ptr %5, align 4, !tbaa !9
  %181 = zext i32 %180 to i64
  %182 = getelementptr inbounds i32, ptr %179, i64 %181
  %183 = load i32, ptr %182, align 4, !tbaa !9
  %184 = icmp ugt i32 %176, %183
  br i1 %184, label %185, label %213

185:                                              ; preds = %169
  %186 = load ptr, ptr %4, align 8, !tbaa !5
  %187 = getelementptr inbounds %struct.graph_s, ptr %186, i32 0, i32 33
  %188 = load ptr, ptr %187, align 8, !tbaa !19
  %189 = load i32, ptr %6, align 4, !tbaa !9
  %190 = zext i32 %189 to i64
  %191 = getelementptr inbounds i32, ptr %188, i64 %190
  %192 = load i32, ptr %191, align 4, !tbaa !9
  %193 = load ptr, ptr %4, align 8, !tbaa !5
  %194 = getelementptr inbounds %struct.graph_s, ptr %193, i32 0, i32 33
  %195 = load ptr, ptr %194, align 8, !tbaa !19
  %196 = load i32, ptr %5, align 4, !tbaa !9
  %197 = zext i32 %196 to i64
  %198 = getelementptr inbounds i32, ptr %195, i64 %197
  %199 = load i32, ptr %198, align 4, !tbaa !9
  %200 = add i32 %199, 1
  %201 = icmp eq i32 %192, %200
  br i1 %201, label %202, label %203

202:                                              ; preds = %185
  br label %204

203:                                              ; preds = %185
  call void @__assert_fail(ptr noundef @.str.9, ptr noundef @.str.1, i32 noundef 1263, ptr noundef @__PRETTY_FUNCTION__.insertArc) #3
  unreachable

204:                                              ; preds = %202
  %205 = load ptr, ptr %4, align 8, !tbaa !5
  %206 = getelementptr inbounds %struct.graph_s, ptr %205, i32 0, i32 37
  %207 = load ptr, ptr %206, align 8, !tbaa !20
  %208 = load i32, ptr %6, align 4, !tbaa !9
  %209 = zext i32 %208 to i64
  %210 = getelementptr inbounds i32, ptr %207, i64 %209
  %211 = load i32, ptr %210, align 4, !tbaa !9
  %212 = add i32 %211, 1
  store i32 %212, ptr %210, align 4, !tbaa !9
  br label %213

213:                                              ; preds = %204, %169
  br label %214

214:                                              ; preds = %213, %160
  ret void
}

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

attributes #0 = { 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 #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 = { 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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 4}
!12 = !{!"graph_s", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !10, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !10, i64 88, !10, i64 92, !10, i64 96, !6, i64 104, !6, i64 112, !10, i64 120, !6, i64 128, !6, i64 136, !10, i64 144, !6, i64 152, !6, i64 160, !10, i64 168, !6, i64 176, !6, i64 184, !6, i64 192, !10, i64 200, !10, i64 204, !10, i64 208, !10, i64 212, !10, i64 216, !6, i64 224, !10, i64 232, !10, i64 236, !6, i64 240, !6, i64 248, !10, i64 256, !6, i64 264, !10, i64 272, !6, i64 280, !6, i64 288, !10, i64 296, !10, i64 300, !6, i64 304, !10, i64 312, !6, i64 320}
!13 = !{!12, !10, i64 0}
!14 = !{!12, !10, i64 12}
!15 = !{!12, !6, i64 24}
!16 = !{!12, !6, i64 16}
!17 = !{!12, !6, i64 40}
!18 = !{!12, !6, i64 32}
!19 = !{!12, !6, i64 224}
!20 = !{!12, !6, i64 248}


; 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"

@.str = external hidden unnamed_addr constant [15 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [71 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [17 x i8], align 1
@__PRETTY_FUNCTION__.insertArc = external hidden unnamed_addr constant [42 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [29 x i8], align 1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

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

; Function Attrs: nounwind uwtable
define dso_local void @insertArc(ptr noundef %0, i32 noundef %1, i32 noundef %2) local_unnamed_addr #1 {
  %4 = getelementptr inbounds i8, ptr %0, i64 4
  %5 = load i32, ptr %4, align 4, !tbaa !5
  %.not = icmp eq i32 %5, 0
  br i1 %.not, label %6, label %7

6:                                                ; preds = %3
  tail call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 1242, ptr noundef nonnull @__PRETTY_FUNCTION__.insertArc) #3
  unreachable

7:                                                ; preds = %3
  %8 = load i32, ptr %0, align 8, !tbaa !11
  %9 = icmp ugt i32 %8, %1
  br i1 %9, label %11, label %10

10:                                               ; preds = %7
  tail call void @__assert_fail(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.1, i32 noundef 1243, ptr noundef nonnull @__PRETTY_FUNCTION__.insertArc) #3
  unreachable

11:                                               ; preds = %7
  %12 = icmp ugt i32 %8, %2
  br i1 %12, label %14, label %13

13:                                               ; preds = %11
  tail call void @__assert_fail(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.1, i32 noundef 1244, ptr noundef nonnull @__PRETTY_FUNCTION__.insertArc) #3
  unreachable

14:                                               ; preds = %11
  %15 = getelementptr inbounds i8, ptr %0, i64 12
  %16 = load i32, ptr %15, align 4, !tbaa !12
  %17 = add i32 %16, 1
  store i32 %17, ptr %15, align 4, !tbaa !12
  %18 = getelementptr inbounds i8, ptr %0, i64 24
  %19 = load ptr, ptr %18, align 8, !tbaa !13
  %20 = zext i32 %1 to i64
  %21 = getelementptr inbounds ptr, ptr %19, i64 %20
  %22 = load ptr, ptr %21, align 8, !tbaa !14
  %23 = getelementptr inbounds i8, ptr %0, i64 16
  %24 = load ptr, ptr %23, align 8, !tbaa !15
  %25 = getelementptr inbounds i32, ptr %24, i64 %20
  %26 = load i32, ptr %25, align 4, !tbaa !16
  %27 = add i32 %26, 1
  %28 = zext i32 %27 to i64
  %29 = shl nuw nsw i64 %28, 2
  %30 = tail call ptr @safe_realloc(ptr noundef %22, i64 noundef %29) #4
  %31 = load ptr, ptr %18, align 8, !tbaa !13
  %32 = getelementptr inbounds ptr, ptr %31, i64 %20
  store ptr %30, ptr %32, align 8, !tbaa !14
  %33 = load ptr, ptr %18, align 8, !tbaa !13
  %34 = getelementptr inbounds ptr, ptr %33, i64 %20
  %35 = load ptr, ptr %34, align 8, !tbaa !14
  %36 = load ptr, ptr %23, align 8, !tbaa !15
  %37 = getelementptr inbounds i32, ptr %36, i64 %20
  %38 = load i32, ptr %37, align 4, !tbaa !16
  %39 = add i32 %38, 1
  store i32 %39, ptr %37, align 4, !tbaa !16
  %40 = zext i32 %38 to i64
  %41 = getelementptr inbounds i32, ptr %35, i64 %40
  store i32 %2, ptr %41, align 4, !tbaa !16
  %42 = getelementptr inbounds i8, ptr %0, i64 40
  %43 = load ptr, ptr %42, align 8, !tbaa !17
  %44 = zext i32 %2 to i64
  %45 = getelementptr inbounds ptr, ptr %43, i64 %44
  %46 = load ptr, ptr %45, align 8, !tbaa !14
  %47 = getelementptr inbounds i8, ptr %0, i64 32
  %48 = load ptr, ptr %47, align 8, !tbaa !18
  %49 = getelementptr inbounds i32, ptr %48, i64 %44
  %50 = load i32, ptr %49, align 4, !tbaa !16
  %51 = add i32 %50, 1
  %52 = zext i32 %51 to i64
  %53 = shl nuw nsw i64 %52, 2
  %54 = tail call ptr @safe_realloc(ptr noundef %46, i64 noundef %53) #4
  %55 = load ptr, ptr %42, align 8, !tbaa !17
  %56 = getelementptr inbounds ptr, ptr %55, i64 %44
  store ptr %54, ptr %56, align 8, !tbaa !14
  %57 = load ptr, ptr %42, align 8, !tbaa !17
  %58 = getelementptr inbounds ptr, ptr %57, i64 %44
  %59 = load ptr, ptr %58, align 8, !tbaa !14
  %60 = load ptr, ptr %47, align 8, !tbaa !18
  %61 = getelementptr inbounds i32, ptr %60, i64 %44
  %62 = load i32, ptr %61, align 4, !tbaa !16
  %63 = add i32 %62, 1
  store i32 %63, ptr %61, align 4, !tbaa !16
  %64 = zext i32 %62 to i64
  %65 = getelementptr inbounds i32, ptr %59, i64 %64
  store i32 %1, ptr %65, align 4, !tbaa !16
  %66 = tail call i32 @isArc(ptr noundef nonnull %0, i32 noundef %1, i32 noundef %2)
  %.not55 = icmp eq i32 %66, 0
  br i1 %.not55, label %67, label %68

67:                                               ; preds = %14
  tail call void @__assert_fail(ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.1, i32 noundef 1256, ptr noundef nonnull @__PRETTY_FUNCTION__.insertArc) #3
  unreachable

68:                                               ; preds = %14
  %69 = getelementptr inbounds i8, ptr %0, i64 224
  %70 = load ptr, ptr %69, align 8, !tbaa !19
  %71 = getelementptr inbounds i32, ptr %70, i64 %20
  %72 = load i32, ptr %71, align 4, !tbaa !16
  %73 = getelementptr inbounds i32, ptr %70, i64 %44
  %74 = load i32, ptr %73, align 4, !tbaa !16
  %75 = icmp ugt i32 %72, %74
  br i1 %75, label %76, label %80

76:                                               ; preds = %68
  %77 = add nuw i32 %74, 1
  %78 = icmp eq i32 %72, %77
  br i1 %78, label %.sink.split, label %79

79:                                               ; preds = %76
  tail call void @__assert_fail(ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.1, i32 noundef 1260, ptr noundef nonnull @__PRETTY_FUNCTION__.insertArc) #3
  unreachable

80:                                               ; preds = %68
  %81 = icmp ugt i32 %74, %72
  br i1 %81, label %82, label %91

82:                                               ; preds = %80
  %83 = add nuw i32 %72, 1
  %84 = icmp eq i32 %74, %83
  br i1 %84, label %.sink.split, label %85

85:                                               ; preds = %82
  tail call void @__assert_fail(ptr noundef nonnull @.str.9, ptr noundef nonnull @.str.1, i32 noundef 1263, ptr noundef nonnull @__PRETTY_FUNCTION__.insertArc) #3
  unreachable

.sink.split:                                      ; preds = %82, %76
  %.sink59 = phi i64 [ %20, %76 ], [ %44, %82 ]
  %86 = getelementptr inbounds i8, ptr %0, i64 248
  %87 = load ptr, ptr %86, align 8, !tbaa !20
  %88 = getelementptr inbounds i32, ptr %87, i64 %.sink59
  %89 = load i32, ptr %88, align 4, !tbaa !16
  %90 = add i32 %89, 1
  store i32 %90, ptr %88, align 4, !tbaa !16
  br label %91

91:                                               ; preds = %.sink.split, %80
  ret void
}

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

attributes #0 = { 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 #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 = { noreturn nounwind }
attributes #4 = { 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 4}
!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 = !{!6, !7, i64 0}
!12 = !{!6, !7, i64 12}
!13 = !{!6, !10, i64 24}
!14 = !{!10, !10, i64 0}
!15 = !{!6, !10, i64 16}
!16 = !{!7, !7, i64 0}
!17 = !{!6, !10, i64 40}
!18 = !{!6, !10, i64 32}
!19 = !{!6, !10, i64 224}
!20 = !{!6, !10, i64 248}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass