; 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.1 = external hidden unnamed_addr constant [71 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [14 x i8], align 1
@__PRETTY_FUNCTION__.allocate_graph = external hidden unnamed_addr constant [52 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [30 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

; Function Attrs: nounwind uwtable
define dso_local ptr @allocate_graph(i32 noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3) #2 {
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  store i32 %0, ptr %5, align 4, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !5
  store i32 %2, ptr %7, align 4, !tbaa !5
  store i32 %3, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %10 = call ptr @safe_calloc(i64 noundef 1, i64 noundef 328)
  store ptr %10, ptr %9, align 8, !tbaa !9
  %11 = load i32, ptr %6, align 4, !tbaa !5
  %12 = load ptr, ptr %9, align 8, !tbaa !9
  %13 = getelementptr inbounds %struct.graph_s, ptr %12, i32 0, i32 1
  store i32 %11, ptr %13, align 4, !tbaa !11
  %14 = load i32, ptr %7, align 4, !tbaa !5
  %15 = load ptr, ptr %9, align 8, !tbaa !9
  %16 = getelementptr inbounds %struct.graph_s, ptr %15, i32 0, i32 2
  store i32 %14, ptr %16, align 8, !tbaa !13
  %17 = load i32, ptr %5, align 4, !tbaa !5
  %18 = load ptr, ptr %9, align 8, !tbaa !9
  %19 = getelementptr inbounds %struct.graph_s, ptr %18, i32 0, i32 0
  store i32 %17, ptr %19, align 8, !tbaa !14
  %20 = load i32, ptr %6, align 4, !tbaa !5
  %21 = icmp ne i32 %20, 0
  br i1 %21, label %22, label %52

22:                                               ; preds = %4
  %23 = load i32, ptr %7, align 4, !tbaa !5
  %24 = icmp ne i32 %23, 0
  br i1 %24, label %26, label %25

25:                                               ; preds = %22
  br label %27

26:                                               ; preds = %22
  call void @__assert_fail(ptr noundef @.str.32, ptr noundef @.str.1, i32 noundef 1746, ptr noundef @__PRETTY_FUNCTION__.allocate_graph) #5
  unreachable

27:                                               ; preds = %25
  %28 = load ptr, ptr %9, align 8, !tbaa !9
  %29 = getelementptr inbounds %struct.graph_s, ptr %28, i32 0, i32 3
  store i32 0, ptr %29, align 4, !tbaa !15
  %30 = load i32, ptr %5, align 4, !tbaa !5
  %31 = zext i32 %30 to i64
  %32 = call ptr @safe_calloc(i64 noundef %31, i64 noundef 4)
  %33 = load ptr, ptr %9, align 8, !tbaa !9
  %34 = getelementptr inbounds %struct.graph_s, ptr %33, i32 0, i32 4
  store ptr %32, ptr %34, align 8, !tbaa !16
  %35 = load i32, ptr %5, align 4, !tbaa !5
  %36 = zext i32 %35 to i64
  %37 = call ptr @safe_calloc(i64 noundef %36, i64 noundef 8)
  %38 = load ptr, ptr %9, align 8, !tbaa !9
  %39 = getelementptr inbounds %struct.graph_s, ptr %38, i32 0, i32 5
  store ptr %37, ptr %39, align 8, !tbaa !17
  %40 = load i32, ptr %5, align 4, !tbaa !5
  %41 = zext i32 %40 to i64
  %42 = call ptr @safe_calloc(i64 noundef %41, i64 noundef 4)
  %43 = load ptr, ptr %9, align 8, !tbaa !9
  %44 = getelementptr inbounds %struct.graph_s, ptr %43, i32 0, i32 6
  store ptr %42, ptr %44, align 8, !tbaa !18
  %45 = load i32, ptr %5, align 4, !tbaa !5
  %46 = zext i32 %45 to i64
  %47 = call ptr @safe_calloc(i64 noundef %46, i64 noundef 8)
  %48 = load ptr, ptr %9, align 8, !tbaa !9
  %49 = getelementptr inbounds %struct.graph_s, ptr %48, i32 0, i32 7
  store ptr %47, ptr %49, align 8, !tbaa !19
  %50 = load ptr, ptr %9, align 8, !tbaa !9
  %51 = getelementptr inbounds %struct.graph_s, ptr %50, i32 0, i32 8
  store ptr null, ptr %51, align 8, !tbaa !20
  br label %92

52:                                               ; preds = %4
  %53 = load ptr, ptr %9, align 8, !tbaa !9
  %54 = getelementptr inbounds %struct.graph_s, ptr %53, i32 0, i32 9
  store i32 0, ptr %54, align 8, !tbaa !21
  %55 = load i32, ptr %5, align 4, !tbaa !5
  %56 = zext i32 %55 to i64
  %57 = call ptr @safe_calloc(i64 noundef %56, i64 noundef 4)
  %58 = load ptr, ptr %9, align 8, !tbaa !9
  %59 = getelementptr inbounds %struct.graph_s, ptr %58, i32 0, i32 10
  store ptr %57, ptr %59, align 8, !tbaa !22
  %60 = load i32, ptr %5, align 4, !tbaa !5
  %61 = zext i32 %60 to i64
  %62 = call ptr @safe_calloc(i64 noundef %61, i64 noundef 8)
  %63 = load ptr, ptr %9, align 8, !tbaa !9
  %64 = getelementptr inbounds %struct.graph_s, ptr %63, i32 0, i32 11
  store ptr %62, ptr %64, align 8, !tbaa !23
  %65 = load ptr, ptr %9, align 8, !tbaa !9
  %66 = getelementptr inbounds %struct.graph_s, ptr %65, i32 0, i32 12
  store ptr null, ptr %66, align 8, !tbaa !24
  %67 = load i32, ptr %7, align 4, !tbaa !5
  %68 = icmp ne i32 %67, 0
  br i1 %68, label %69, label %90

69:                                               ; preds = %52
  %70 = load i32, ptr %8, align 4, !tbaa !5
  %71 = load ptr, ptr %9, align 8, !tbaa !9
  %72 = getelementptr inbounds %struct.graph_s, ptr %71, i32 0, i32 0
  %73 = load i32, ptr %72, align 8, !tbaa !14
  %74 = icmp ult i32 %70, %73
  br i1 %74, label %75, label %76

75:                                               ; preds = %69
  br label %77

76:                                               ; preds = %69
  call void @__assert_fail(ptr noundef @.str.33, ptr noundef @.str.1, i32 noundef 1797, ptr noundef @__PRETTY_FUNCTION__.allocate_graph) #5
  unreachable

77:                                               ; preds = %75
  %78 = load i32, ptr %8, align 4, !tbaa !5
  %79 = load ptr, ptr %9, align 8, !tbaa !9
  %80 = getelementptr inbounds %struct.graph_s, ptr %79, i32 0, i32 13
  store i32 %78, ptr %80, align 8, !tbaa !25
  %81 = load ptr, ptr %9, align 8, !tbaa !9
  %82 = getelementptr inbounds %struct.graph_s, ptr %81, i32 0, i32 0
  %83 = load i32, ptr %82, align 8, !tbaa !14
  %84 = load ptr, ptr %9, align 8, !tbaa !9
  %85 = getelementptr inbounds %struct.graph_s, ptr %84, i32 0, i32 13
  %86 = load i32, ptr %85, align 8, !tbaa !25
  %87 = sub i32 %83, %86
  %88 = load ptr, ptr %9, align 8, !tbaa !9
  %89 = getelementptr inbounds %struct.graph_s, ptr %88, i32 0, i32 14
  store i32 %87, ptr %89, align 4, !tbaa !26
  br label %91

90:                                               ; preds = %52
  br label %91

91:                                               ; preds = %90, %77
  br label %92

92:                                               ; preds = %91, %27
  %93 = load ptr, ptr %9, align 8, !tbaa !9
  %94 = getelementptr inbounds %struct.graph_s, ptr %93, i32 0, i32 15
  store i32 0, ptr %94, align 8, !tbaa !27
  %95 = load ptr, ptr %9, align 8, !tbaa !9
  %96 = getelementptr inbounds %struct.graph_s, ptr %95, i32 0, i32 16
  store ptr null, ptr %96, align 8, !tbaa !28
  %97 = load ptr, ptr %9, align 8, !tbaa !9
  %98 = getelementptr inbounds %struct.graph_s, ptr %97, i32 0, i32 17
  store ptr null, ptr %98, align 8, !tbaa !29
  %99 = load ptr, ptr %9, align 8, !tbaa !9
  %100 = getelementptr inbounds %struct.graph_s, ptr %99, i32 0, i32 18
  store i32 0, ptr %100, align 8, !tbaa !30
  %101 = load ptr, ptr %9, align 8, !tbaa !9
  %102 = getelementptr inbounds %struct.graph_s, ptr %101, i32 0, i32 19
  store ptr null, ptr %102, align 8, !tbaa !31
  %103 = load ptr, ptr %9, align 8, !tbaa !9
  %104 = getelementptr inbounds %struct.graph_s, ptr %103, i32 0, i32 20
  store ptr null, ptr %104, align 8, !tbaa !32
  %105 = load ptr, ptr %9, align 8, !tbaa !9
  %106 = getelementptr inbounds %struct.graph_s, ptr %105, i32 0, i32 21
  store i32 0, ptr %106, align 8, !tbaa !33
  %107 = load ptr, ptr %9, align 8, !tbaa !9
  %108 = getelementptr inbounds %struct.graph_s, ptr %107, i32 0, i32 22
  store ptr null, ptr %108, align 8, !tbaa !34
  %109 = load ptr, ptr %9, align 8, !tbaa !9
  %110 = getelementptr inbounds %struct.graph_s, ptr %109, i32 0, i32 23
  store ptr null, ptr %110, align 8, !tbaa !35
  %111 = load ptr, ptr %9, align 8, !tbaa !9
  %112 = getelementptr inbounds %struct.graph_s, ptr %111, i32 0, i32 24
  store i32 0, ptr %112, align 8, !tbaa !36
  %113 = load ptr, ptr %9, align 8, !tbaa !9
  %114 = getelementptr inbounds %struct.graph_s, ptr %113, i32 0, i32 25
  store ptr null, ptr %114, align 8, !tbaa !37
  %115 = load ptr, ptr %9, align 8, !tbaa !9
  %116 = getelementptr inbounds %struct.graph_s, ptr %115, i32 0, i32 26
  store ptr null, ptr %116, align 8, !tbaa !38
  %117 = load ptr, ptr %9, align 8, !tbaa !9
  %118 = getelementptr inbounds %struct.graph_s, ptr %117, i32 0, i32 27
  store ptr null, ptr %118, align 8, !tbaa !39
  %119 = load i32, ptr %5, align 4, !tbaa !5
  %120 = zext i32 %119 to i64
  %121 = call ptr @safe_calloc(i64 noundef %120, i64 noundef 4)
  %122 = load ptr, ptr %9, align 8, !tbaa !9
  %123 = getelementptr inbounds %struct.graph_s, ptr %122, i32 0, i32 33
  store ptr %121, ptr %123, align 8, !tbaa !40
  %124 = load ptr, ptr %9, align 8, !tbaa !9
  %125 = getelementptr inbounds %struct.graph_s, ptr %124, i32 0, i32 34
  store i32 0, ptr %125, align 8, !tbaa !41
  %126 = load ptr, ptr %9, align 8, !tbaa !9
  %127 = getelementptr inbounds %struct.graph_s, ptr %126, i32 0, i32 35
  store i32 0, ptr %127, align 4, !tbaa !42
  %128 = load ptr, ptr %9, align 8, !tbaa !9
  %129 = getelementptr inbounds %struct.graph_s, ptr %128, i32 0, i32 36
  store ptr null, ptr %129, align 8, !tbaa !43
  %130 = load i32, ptr %5, align 4, !tbaa !5
  %131 = zext i32 %130 to i64
  %132 = call ptr @safe_calloc(i64 noundef %131, i64 noundef 4)
  %133 = load ptr, ptr %9, align 8, !tbaa !9
  %134 = getelementptr inbounds %struct.graph_s, ptr %133, i32 0, i32 37
  store ptr %132, ptr %134, align 8, !tbaa !44
  %135 = load ptr, ptr %9, align 8, !tbaa !9
  %136 = getelementptr inbounds %struct.graph_s, ptr %135, i32 0, i32 38
  store i32 0, ptr %136, align 8, !tbaa !45
  %137 = load ptr, ptr %9, align 8, !tbaa !9
  %138 = getelementptr inbounds %struct.graph_s, ptr %137, i32 0, i32 39
  store ptr null, ptr %138, align 8, !tbaa !46
  %139 = load i32, ptr %5, align 4, !tbaa !5
  %140 = zext i32 %139 to i64
  %141 = call ptr @safe_calloc(i64 noundef %140, i64 noundef 4)
  %142 = load ptr, ptr %9, align 8, !tbaa !9
  %143 = getelementptr inbounds %struct.graph_s, ptr %142, i32 0, i32 42
  store ptr %141, ptr %143, align 8, !tbaa !47
  %144 = load ptr, ptr %9, align 8, !tbaa !9
  %145 = getelementptr inbounds %struct.graph_s, ptr %144, i32 0, i32 43
  store i32 0, ptr %145, align 8, !tbaa !48
  %146 = load ptr, ptr %9, align 8, !tbaa !9
  %147 = getelementptr inbounds %struct.graph_s, ptr %146, i32 0, i32 44
  store i32 0, ptr %147, align 4, !tbaa !49
  %148 = load ptr, ptr %9, align 8, !tbaa !9
  %149 = getelementptr inbounds %struct.graph_s, ptr %148, i32 0, i32 45
  store ptr null, ptr %149, align 8, !tbaa !50
  %150 = load ptr, ptr %9, align 8, !tbaa !9
  %151 = getelementptr inbounds %struct.graph_s, ptr %150, i32 0, i32 46
  store i32 0, ptr %151, align 8, !tbaa !51
  %152 = load ptr, ptr %9, align 8, !tbaa !9
  %153 = getelementptr inbounds %struct.graph_s, ptr %152, i32 0, i32 47
  store ptr null, ptr %153, align 8, !tbaa !52
  %154 = load ptr, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  ret ptr %154
}

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

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 = { 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 #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }
attributes #5 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !6, i64 4}
!12 = !{!"graph_s", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !6, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !6, i64 88, !6, i64 92, !6, i64 96, !10, i64 104, !10, i64 112, !6, i64 120, !10, i64 128, !10, i64 136, !6, i64 144, !10, i64 152, !10, i64 160, !6, i64 168, !10, i64 176, !10, i64 184, !10, i64 192, !6, i64 200, !6, i64 204, !6, i64 208, !6, i64 212, !6, i64 216, !10, i64 224, !6, i64 232, !6, i64 236, !10, i64 240, !10, i64 248, !6, i64 256, !10, i64 264, !6, i64 272, !10, i64 280, !10, i64 288, !6, i64 296, !6, i64 300, !10, i64 304, !6, i64 312, !10, i64 320}
!13 = !{!12, !6, i64 8}
!14 = !{!12, !6, i64 0}
!15 = !{!12, !6, i64 12}
!16 = !{!12, !10, i64 16}
!17 = !{!12, !10, i64 24}
!18 = !{!12, !10, i64 32}
!19 = !{!12, !10, i64 40}
!20 = !{!12, !10, i64 48}
!21 = !{!12, !6, i64 56}
!22 = !{!12, !10, i64 64}
!23 = !{!12, !10, i64 72}
!24 = !{!12, !10, i64 80}
!25 = !{!12, !6, i64 88}
!26 = !{!12, !6, i64 92}
!27 = !{!12, !6, i64 96}
!28 = !{!12, !10, i64 104}
!29 = !{!12, !10, i64 112}
!30 = !{!12, !6, i64 120}
!31 = !{!12, !10, i64 128}
!32 = !{!12, !10, i64 136}
!33 = !{!12, !6, i64 144}
!34 = !{!12, !10, i64 152}
!35 = !{!12, !10, i64 160}
!36 = !{!12, !6, i64 168}
!37 = !{!12, !10, i64 176}
!38 = !{!12, !10, i64 184}
!39 = !{!12, !10, i64 192}
!40 = !{!12, !10, i64 224}
!41 = !{!12, !6, i64 232}
!42 = !{!12, !6, i64 236}
!43 = !{!12, !10, i64 240}
!44 = !{!12, !10, i64 248}
!45 = !{!12, !6, i64 256}
!46 = !{!12, !10, i64 264}
!47 = !{!12, !10, i64 288}
!48 = !{!12, !6, i64 296}
!49 = !{!12, !6, i64 300}
!50 = !{!12, !10, i64 304}
!51 = !{!12, !6, i64 312}
!52 = !{!12, !10, i64 320}


; 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.1 = external hidden unnamed_addr constant [71 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [14 x i8], align 1
@__PRETTY_FUNCTION__.allocate_graph = external hidden unnamed_addr constant [52 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [30 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
define dso_local noundef ptr @allocate_graph(i32 noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3) local_unnamed_addr #1 {
  %5 = tail call ptr @safe_calloc(i64 noundef 1, i64 noundef 328) #4
  %6 = getelementptr inbounds i8, ptr %5, i64 4
  store i32 %1, ptr %6, align 4, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %5, i64 8
  store i32 %2, ptr %7, align 8, !tbaa !11
  store i32 %0, ptr %5, align 8, !tbaa !12
  %.not = icmp eq i32 %1, 0
  br i1 %.not, label %22, label %8

8:                                                ; preds = %4
  %.not62 = icmp eq i32 %2, 0
  br i1 %.not62, label %10, label %9

9:                                                ; preds = %8
  tail call void @__assert_fail(ptr noundef nonnull @.str.32, ptr noundef nonnull @.str.1, i32 noundef 1746, ptr noundef nonnull @__PRETTY_FUNCTION__.allocate_graph) #5
  unreachable

10:                                               ; preds = %8
  %11 = getelementptr inbounds i8, ptr %5, i64 12
  store i32 0, ptr %11, align 4, !tbaa !13
  %12 = zext i32 %0 to i64
  %13 = tail call ptr @safe_calloc(i64 noundef %12, i64 noundef 4) #4
  %14 = getelementptr inbounds i8, ptr %5, i64 16
  store ptr %13, ptr %14, align 8, !tbaa !14
  %15 = tail call ptr @safe_calloc(i64 noundef %12, i64 noundef 8) #4
  %16 = getelementptr inbounds i8, ptr %5, i64 24
  store ptr %15, ptr %16, align 8, !tbaa !15
  %17 = tail call ptr @safe_calloc(i64 noundef %12, i64 noundef 4) #4
  %18 = getelementptr inbounds i8, ptr %5, i64 32
  store ptr %17, ptr %18, align 8, !tbaa !16
  %19 = tail call ptr @safe_calloc(i64 noundef %12, i64 noundef 8) #4
  %20 = getelementptr inbounds i8, ptr %5, i64 40
  store ptr %19, ptr %20, align 8, !tbaa !17
  %21 = getelementptr inbounds i8, ptr %5, i64 48
  store ptr null, ptr %21, align 8, !tbaa !18
  br label %38

22:                                               ; preds = %4
  %23 = getelementptr inbounds i8, ptr %5, i64 56
  store i32 0, ptr %23, align 8, !tbaa !19
  %24 = zext i32 %0 to i64
  %25 = tail call ptr @safe_calloc(i64 noundef %24, i64 noundef 4) #4
  %26 = getelementptr inbounds i8, ptr %5, i64 64
  store ptr %25, ptr %26, align 8, !tbaa !20
  %27 = tail call ptr @safe_calloc(i64 noundef %24, i64 noundef 8) #4
  %28 = getelementptr inbounds i8, ptr %5, i64 72
  store ptr %27, ptr %28, align 8, !tbaa !21
  %29 = getelementptr inbounds i8, ptr %5, i64 80
  store ptr null, ptr %29, align 8, !tbaa !22
  %.not61 = icmp eq i32 %2, 0
  br i1 %.not61, label %38, label %30

30:                                               ; preds = %22
  %31 = load i32, ptr %5, align 8, !tbaa !12
  %32 = icmp ugt i32 %31, %3
  br i1 %32, label %34, label %33

33:                                               ; preds = %30
  tail call void @__assert_fail(ptr noundef nonnull @.str.33, ptr noundef nonnull @.str.1, i32 noundef 1797, ptr noundef nonnull @__PRETTY_FUNCTION__.allocate_graph) #5
  unreachable

34:                                               ; preds = %30
  %35 = getelementptr inbounds i8, ptr %5, i64 88
  store i32 %3, ptr %35, align 8, !tbaa !23
  %36 = sub i32 %31, %3
  %37 = getelementptr inbounds i8, ptr %5, i64 92
  store i32 %36, ptr %37, align 4, !tbaa !24
  br label %38

38:                                               ; preds = %34, %22, %10
  %.pre-phi = phi i64 [ %24, %34 ], [ %24, %22 ], [ %12, %10 ]
  %39 = getelementptr inbounds i8, ptr %5, i64 96
  store i32 0, ptr %39, align 8, !tbaa !25
  %40 = getelementptr inbounds i8, ptr %5, i64 104
  %41 = getelementptr inbounds i8, ptr %5, i64 128
  %42 = getelementptr inbounds i8, ptr %5, i64 152
  %43 = getelementptr inbounds i8, ptr %5, i64 176
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(20) %40, i8 0, i64 20, i1 false)
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(20) %41, i8 0, i64 20, i1 false)
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(20) %42, i8 0, i64 20, i1 false)
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %43, i8 0, i64 24, i1 false)
  %44 = tail call ptr @safe_calloc(i64 noundef %.pre-phi, i64 noundef 4) #4
  %45 = getelementptr inbounds i8, ptr %5, i64 224
  store ptr %44, ptr %45, align 8, !tbaa !26
  %46 = getelementptr inbounds i8, ptr %5, i64 232
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %46, i8 0, i64 16, i1 false)
  %47 = tail call ptr @safe_calloc(i64 noundef %.pre-phi, i64 noundef 4) #4
  %48 = getelementptr inbounds i8, ptr %5, i64 248
  store ptr %47, ptr %48, align 8, !tbaa !27
  %49 = getelementptr inbounds i8, ptr %5, i64 256
  store i32 0, ptr %49, align 8, !tbaa !28
  %50 = getelementptr inbounds i8, ptr %5, i64 264
  store ptr null, ptr %50, align 8, !tbaa !29
  %51 = tail call ptr @safe_calloc(i64 noundef %.pre-phi, i64 noundef 4) #4
  %52 = getelementptr inbounds i8, ptr %5, i64 288
  store ptr %51, ptr %52, align 8, !tbaa !30
  %53 = getelementptr inbounds i8, ptr %5, i64 296
  %54 = getelementptr inbounds i8, ptr %5, i64 320
  store ptr null, ptr %54, align 8, !tbaa !31
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(20) %53, i8 0, i64 20, i1 false)
  ret ptr %5
}

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

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

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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { nounwind }
attributes #5 = { 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 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 8}
!12 = !{!6, !7, i64 0}
!13 = !{!6, !7, i64 12}
!14 = !{!6, !10, i64 16}
!15 = !{!6, !10, i64 24}
!16 = !{!6, !10, i64 32}
!17 = !{!6, !10, i64 40}
!18 = !{!6, !10, i64 48}
!19 = !{!6, !7, i64 56}
!20 = !{!6, !10, i64 64}
!21 = !{!6, !10, i64 72}
!22 = !{!6, !10, i64 80}
!23 = !{!6, !7, i64 88}
!24 = !{!6, !7, i64 92}
!25 = !{!6, !7, i64 96}
!26 = !{!6, !10, i64 224}
!27 = !{!6, !10, i64 248}
!28 = !{!6, !7, i64 256}
!29 = !{!6, !10, i64 264}
!30 = !{!6, !10, i64 288}
!31 = !{!6, !10, i64 320}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,MemCpyOptPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass