; LLVM IR from MostafaTwfiq/C-DataStructures-And-Algorithms :: Unit Test/Tests/DataStructuresTests/GraphsTest/DirectedGraphTest (testDirectedGraphRemoveNodeWtoFr)

; 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.ErrorTestStruct = type { i32 }
%struct.DirectedGraph = type { ptr, ptr, ptr }
%struct.HashMap = type { ptr, i32, i32, i32, ptr, ptr, ptr, ptr }
%struct.Entry = type { ptr, ptr, ptr, ptr }

@.str = external hidden unnamed_addr constant [163 x i8], align 1
@ERROR_TEST = external dso_local global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @generateCharPointerDGT(ptr noundef) #0

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @charArrHashFunDGT(ptr noundef) #0

declare ptr @directedGraphInitialization(ptr noundef, ptr noundef, ptr noundef) #2

declare void @CuAssertIntEquals_LineMsg(ptr noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef, i32 noundef) #2

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

declare void @destroyDirGraph(ptr noundef) #2

declare void @dirGraphAddNode(ptr noundef, ptr noundef) #2

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

; Function Attrs: nounwind uwtable
define dso_local void @testDirectedGraphRemoveNodeWtoFr(ptr noundef %0) #0 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca [4 x i32], align 16
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  %10 = call ptr @directedGraphInitialization(ptr noundef @free, ptr noundef @directedGraphTestStrcmp, ptr noundef @charArrHashFunDGT)
  store ptr %10, ptr %3, align 8, !tbaa !5
  %11 = call ptr @dirGraphRemoveNodeWtoFr(ptr noundef null, ptr noundef null)
  %12 = load ptr, ptr %2, align 8, !tbaa !5
  %13 = load ptr, ptr @ERROR_TEST, align 8, !tbaa !5
  %14 = getelementptr inbounds %struct.ErrorTestStruct, ptr %13, i32 0, i32 0
  %15 = load i32, ptr %14, align 4, !tbaa !9
  call void @CuAssertIntEquals_LineMsg(ptr noundef %12, ptr noundef @.str, i32 noundef 154, ptr noundef null, i32 noundef -83386157, i32 noundef %15)
  %16 = load ptr, ptr %3, align 8, !tbaa !5
  %17 = call ptr @dirGraphRemoveNodeWtoFr(ptr noundef %16, ptr noundef null)
  %18 = load ptr, ptr %2, align 8, !tbaa !5
  %19 = load ptr, ptr @ERROR_TEST, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.ErrorTestStruct, ptr %19, i32 0, i32 0
  %21 = load i32, ptr %20, align 4, !tbaa !9
  call void @CuAssertIntEquals_LineMsg(ptr noundef %18, ptr noundef @.str, i32 noundef 157, ptr noundef null, i32 noundef -83384987, i32 noundef %21)
  %22 = load ptr, ptr %3, align 8, !tbaa !5
  %23 = call ptr @generateCharPointerDGT(ptr noundef @.str.2)
  call void @dirGraphAddNode(ptr noundef %22, ptr noundef %23)
  %24 = load ptr, ptr %3, align 8, !tbaa !5
  %25 = call ptr @generateCharPointerDGT(ptr noundef @.str.3)
  call void @dirGraphAddNode(ptr noundef %24, ptr noundef %25)
  %26 = load ptr, ptr %3, align 8, !tbaa !5
  %27 = call ptr @generateCharPointerDGT(ptr noundef @.str.4)
  call void @dirGraphAddNode(ptr noundef %26, ptr noundef %27)
  %28 = load ptr, ptr %3, align 8, !tbaa !5
  %29 = call ptr @generateCharPointerDGT(ptr noundef @.str.5)
  call void @dirGraphAddNode(ptr noundef %28, ptr noundef %29)
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  %30 = load ptr, ptr %3, align 8, !tbaa !5
  %31 = call ptr @dirGraphRemoveNodeWtoFr(ptr noundef %30, ptr noundef @.str.5)
  store ptr %31, ptr %4, align 8, !tbaa !5
  %32 = load ptr, ptr %2, align 8, !tbaa !5
  %33 = load ptr, ptr %4, align 8, !tbaa !5
  call void @CuAssertStrEquals_LineMsg(ptr noundef %32, ptr noundef @.str, i32 noundef 165, ptr noundef null, ptr noundef @.str.5, ptr noundef %33)
  %34 = load ptr, ptr %4, align 8, !tbaa !5
  call void @free(ptr noundef %34) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  %35 = load ptr, ptr %3, align 8, !tbaa !5
  %36 = call ptr @dirGraphRemoveNodeWtoFr(ptr noundef %35, ptr noundef @.str.4)
  store ptr %36, ptr %5, align 8, !tbaa !5
  %37 = load ptr, ptr %2, align 8, !tbaa !5
  %38 = load ptr, ptr %5, align 8, !tbaa !5
  call void @CuAssertStrEquals_LineMsg(ptr noundef %37, ptr noundef @.str, i32 noundef 169, ptr noundef null, ptr noundef @.str.4, ptr noundef %38)
  %39 = load ptr, ptr %5, align 8, !tbaa !5
  call void @free(ptr noundef %39) #5
  %40 = load ptr, ptr %2, align 8, !tbaa !5
  %41 = load ptr, ptr %3, align 8, !tbaa !5
  %42 = call ptr @dirGraphRemoveNodeWtoFr(ptr noundef %41, ptr noundef @.str.6)
  call void @CuAssertPtrEquals_LineMsg(ptr noundef %40, ptr noundef @.str, i32 noundef 172, ptr noundef null, ptr noundef null, ptr noundef %42)
  call void @llvm.lifetime.start.p0(i64 16, ptr %6) #5
  call void @llvm.memset.p0.i64(ptr align 16 %6, i8 0, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 0, ptr %7, align 4, !tbaa !12
  br label %43

43:                                               ; preds = %83, %1
  %44 = load i32, ptr %7, align 4, !tbaa !12
  %45 = load ptr, ptr %3, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.DirectedGraph, ptr %45, i32 0, i32 0
  %47 = load ptr, ptr %46, align 8, !tbaa !13
  %48 = getelementptr inbounds %struct.HashMap, ptr %47, i32 0, i32 1
  %49 = load i32, ptr %48, align 8, !tbaa !15
  %50 = icmp slt i32 %44, %49
  br i1 %50, label %52, label %51

51:                                               ; preds = %43
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %86

52:                                               ; preds = %43
  %53 = load ptr, ptr %3, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.DirectedGraph, ptr %53, i32 0, i32 0
  %55 = load ptr, ptr %54, align 8, !tbaa !13
  %56 = getelementptr inbounds %struct.HashMap, ptr %55, i32 0, i32 0
  %57 = load ptr, ptr %56, align 8, !tbaa !17
  %58 = load i32, ptr %7, align 4, !tbaa !12
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds ptr, ptr %57, i64 %59
  %61 = load ptr, ptr %60, align 8, !tbaa !5
  %62 = icmp ne ptr %61, null
  br i1 %62, label %63, label %82

63:                                               ; preds = %52
  %64 = load ptr, ptr %3, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.DirectedGraph, ptr %64, i32 0, i32 0
  %66 = load ptr, ptr %65, align 8, !tbaa !13
  %67 = getelementptr inbounds %struct.HashMap, ptr %66, i32 0, i32 0
  %68 = load ptr, ptr %67, align 8, !tbaa !17
  %69 = load i32, ptr %7, align 4, !tbaa !12
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds ptr, ptr %68, i64 %70
  %72 = load ptr, ptr %71, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.Entry, ptr %72, i32 0, i32 0
  %74 = load ptr, ptr %73, align 8, !tbaa !18
  %75 = load i8, ptr %74, align 1, !tbaa !20
  %76 = sext i8 %75 to i32
  %77 = sub nsw i32 %76, 65
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds [4 x i32], ptr %6, i64 0, i64 %78
  %80 = load i32, ptr %79, align 4, !tbaa !12
  %81 = add nsw i32 %80, 1
  store i32 %81, ptr %79, align 4, !tbaa !12
  br label %82

82:                                               ; preds = %63, %52
  br label %83

83:                                               ; preds = %82
  %84 = load i32, ptr %7, align 4, !tbaa !12
  %85 = add nsw i32 %84, 1
  store i32 %85, ptr %7, align 4, !tbaa !12
  br label %43, !llvm.loop !21

86:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 0, ptr %8, align 4, !tbaa !12
  br label %87

87:                                               ; preds = %97, %86
  %88 = load i32, ptr %8, align 4, !tbaa !12
  %89 = icmp slt i32 %88, 2
  br i1 %89, label %91, label %90

90:                                               ; preds = %87
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  br label %100

91:                                               ; preds = %87
  %92 = load ptr, ptr %2, align 8, !tbaa !5
  %93 = load i32, ptr %8, align 4, !tbaa !12
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds [4 x i32], ptr %6, i64 0, i64 %94
  %96 = load i32, ptr %95, align 4, !tbaa !12
  call void @CuAssertIntEquals_LineMsg(ptr noundef %92, ptr noundef @.str, i32 noundef 184, ptr noundef null, i32 noundef 1, i32 noundef %96)
  br label %97

97:                                               ; preds = %91
  %98 = load i32, ptr %8, align 4, !tbaa !12
  %99 = add nsw i32 %98, 1
  store i32 %99, ptr %8, align 4, !tbaa !12
  br label %87, !llvm.loop !23

100:                                              ; preds = %90
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 2, ptr %9, align 4, !tbaa !12
  br label %101

101:                                              ; preds = %111, %100
  %102 = load i32, ptr %9, align 4, !tbaa !12
  %103 = icmp slt i32 %102, 4
  br i1 %103, label %105, label %104

104:                                              ; preds = %101
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %114

105:                                              ; preds = %101
  %106 = load ptr, ptr %2, align 8, !tbaa !5
  %107 = load i32, ptr %9, align 4, !tbaa !12
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [4 x i32], ptr %6, i64 0, i64 %108
  %110 = load i32, ptr %109, align 4, !tbaa !12
  call void @CuAssertIntEquals_LineMsg(ptr noundef %106, ptr noundef @.str, i32 noundef 187, ptr noundef null, i32 noundef 0, i32 noundef %110)
  br label %111

111:                                              ; preds = %105
  %112 = load i32, ptr %9, align 4, !tbaa !12
  %113 = add nsw i32 %112, 1
  store i32 %113, ptr %9, align 4, !tbaa !12
  br label %101, !llvm.loop !24

114:                                              ; preds = %104
  %115 = load ptr, ptr %3, align 8, !tbaa !5
  call void @destroyDirGraph(ptr noundef %115)
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  ret void
}

declare ptr @dirGraphRemoveNodeWtoFr(ptr noundef, ptr noundef) #2

declare void @CuAssertStrEquals_LineMsg(ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) #2

declare void @CuAssertPtrEquals_LineMsg(ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) #2

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { 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 = !{!"ErrorTestStruct", !11, i64 0}
!11 = !{!"int", !7, i64 0}
!12 = !{!11, !11, i64 0}
!13 = !{!14, !6, i64 0}
!14 = !{!"DirectedGraph", !6, i64 0, !6, i64 8, !6, i64 16}
!15 = !{!16, !11, i64 8}
!16 = !{!"HashMap", !6, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48}
!17 = !{!16, !6, i64 0}
!18 = !{!19, !6, i64 0}
!19 = !{!"Entry", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!20 = !{!7, !7, i64 0}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = distinct !{!23, !22}
!24 = distinct !{!24, !22}


; 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 [163 x i8], align 1
@ERROR_TEST = external dso_local local_unnamed_addr global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1

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

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @charArrHashFunDGT(ptr noundef) #0

declare ptr @directedGraphInitialization(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare void @CuAssertIntEquals_LineMsg(ptr noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

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

declare void @destroyDirGraph(ptr noundef) local_unnamed_addr #2

declare void @dirGraphAddNode(ptr noundef, ptr noundef) local_unnamed_addr #2

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

; Function Attrs: nounwind uwtable
define dso_local void @testDirectedGraphRemoveNodeWtoFr(ptr noundef %0) local_unnamed_addr #0 {
  %2 = alloca [4 x i32], align 16
  %3 = tail call ptr @directedGraphInitialization(ptr noundef nonnull @free, ptr noundef nonnull @directedGraphTestStrcmp, ptr noundef nonnull @charArrHashFunDGT) #5
  %4 = tail call ptr @dirGraphRemoveNodeWtoFr(ptr noundef null, ptr noundef null) #5
  %5 = load ptr, ptr @ERROR_TEST, align 8, !tbaa !5
  %6 = load i32, ptr %5, align 4, !tbaa !9
  tail call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 154, ptr noundef null, i32 noundef -83386157, i32 noundef %6) #5
  %7 = tail call ptr @dirGraphRemoveNodeWtoFr(ptr noundef %3, ptr noundef null) #5
  %8 = load ptr, ptr @ERROR_TEST, align 8, !tbaa !5
  %9 = load i32, ptr %8, align 4, !tbaa !9
  tail call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 157, ptr noundef null, i32 noundef -83384987, i32 noundef %9) #5
  %10 = tail call ptr @generateCharPointerDGT(ptr noundef nonnull @.str.2)
  tail call void @dirGraphAddNode(ptr noundef %3, ptr noundef %10) #5
  %11 = tail call ptr @generateCharPointerDGT(ptr noundef nonnull @.str.3)
  tail call void @dirGraphAddNode(ptr noundef %3, ptr noundef %11) #5
  %12 = tail call ptr @generateCharPointerDGT(ptr noundef nonnull @.str.4)
  tail call void @dirGraphAddNode(ptr noundef %3, ptr noundef %12) #5
  %13 = tail call ptr @generateCharPointerDGT(ptr noundef nonnull @.str.5)
  tail call void @dirGraphAddNode(ptr noundef %3, ptr noundef %13) #5
  %14 = tail call ptr @dirGraphRemoveNodeWtoFr(ptr noundef %3, ptr noundef nonnull @.str.5) #5
  tail call void @CuAssertStrEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 165, ptr noundef null, ptr noundef nonnull @.str.5, ptr noundef %14) #5
  tail call void @free(ptr noundef %14) #5
  %15 = tail call ptr @dirGraphRemoveNodeWtoFr(ptr noundef %3, ptr noundef nonnull @.str.4) #5
  tail call void @CuAssertStrEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 169, ptr noundef null, ptr noundef nonnull @.str.4, ptr noundef %15) #5
  tail call void @free(ptr noundef %15) #5
  %16 = tail call ptr @dirGraphRemoveNodeWtoFr(ptr noundef %3, ptr noundef nonnull @.str.6) #5
  tail call void @CuAssertPtrEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 172, ptr noundef null, ptr noundef null, ptr noundef %16) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %2) #5
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %2, i8 0, i64 16, i1 false)
  %17 = load ptr, ptr %3, align 8, !tbaa !12
  %18 = getelementptr inbounds i8, ptr %17, i64 8
  %19 = load i32, ptr %18, align 8, !tbaa !14
  %20 = icmp sgt i32 %19, 0
  br i1 %20, label %.lr.ph, label %.preheader35

.lr.ph:                                           ; preds = %1
  %21 = load ptr, ptr %17, align 8, !tbaa !16
  %wide.trip.count = zext nneg i32 %19 to i64
  %xtraiter = and i64 %wide.trip.count, 1
  %22 = icmp eq i32 %19, 1
  br i1 %22, label %.preheader35.loopexit.unr-lcssa, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.lr.ph
  %unroll_iter = and i64 %wide.trip.count, 2147483646
  br label %37

.preheader35.loopexit.unr-lcssa:                  ; preds = %59, %.lr.ph
  %indvars.iv.unr = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next.1, %59 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader35.loopexit, label %.epil.preheader

.epil.preheader:                                  ; preds = %.preheader35.loopexit.unr-lcssa
  %23 = getelementptr inbounds ptr, ptr %21, i64 %indvars.iv.unr
  %24 = load ptr, ptr %23, align 8, !tbaa !5
  %.not.epil = icmp eq ptr %24, null
  br i1 %.not.epil, label %.preheader35.loopexit, label %25

25:                                               ; preds = %.epil.preheader
  %26 = load ptr, ptr %24, align 8, !tbaa !17
  %27 = load i8, ptr %26, align 1, !tbaa !19
  %28 = sext i8 %27 to i64
  %29 = add nsw i64 %28, -65
  %30 = getelementptr inbounds [4 x i32], ptr %2, i64 0, i64 %29
  %31 = load i32, ptr %30, align 4, !tbaa !20
  %32 = add nsw i32 %31, 1
  store i32 %32, ptr %30, align 4, !tbaa !20
  br label %.preheader35.loopexit

.preheader35.loopexit:                            ; preds = %.epil.preheader, %25, %.preheader35.loopexit.unr-lcssa
  %.pre = load i32, ptr %2, align 16, !tbaa !20
  %.phi.trans.insert = getelementptr inbounds i8, ptr %2, i64 4
  %.pre47 = load i32, ptr %.phi.trans.insert, align 4, !tbaa !20
  %.phi.trans.insert48 = getelementptr inbounds i8, ptr %2, i64 8
  %.pre49 = load i32, ptr %.phi.trans.insert48, align 8, !tbaa !20
  %.phi.trans.insert50 = getelementptr inbounds i8, ptr %2, i64 12
  %.pre51 = load i32, ptr %.phi.trans.insert50, align 4, !tbaa !20
  br label %.preheader35

.preheader35:                                     ; preds = %.preheader35.loopexit, %1
  %33 = phi i32 [ %.pre51, %.preheader35.loopexit ], [ 0, %1 ]
  %34 = phi i32 [ %.pre49, %.preheader35.loopexit ], [ 0, %1 ]
  %35 = phi i32 [ %.pre47, %.preheader35.loopexit ], [ 0, %1 ]
  %36 = phi i32 [ %.pre, %.preheader35.loopexit ], [ 0, %1 ]
  tail call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 184, ptr noundef null, i32 noundef 1, i32 noundef %36) #5
  tail call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 184, ptr noundef null, i32 noundef 1, i32 noundef %35) #5
  tail call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 187, ptr noundef null, i32 noundef 0, i32 noundef %34) #5
  tail call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 187, ptr noundef null, i32 noundef 0, i32 noundef %33) #5
  tail call void @destroyDirGraph(ptr noundef nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %2) #5
  ret void

37:                                               ; preds = %59, %.lr.ph.new
  %indvars.iv = phi i64 [ 0, %.lr.ph.new ], [ %indvars.iv.next.1, %59 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.1, %59 ]
  %38 = getelementptr inbounds ptr, ptr %21, i64 %indvars.iv
  %39 = load ptr, ptr %38, align 8, !tbaa !5
  %.not = icmp eq ptr %39, null
  br i1 %.not, label %48, label %40

40:                                               ; preds = %37
  %41 = load ptr, ptr %39, align 8, !tbaa !17
  %42 = load i8, ptr %41, align 1, !tbaa !19
  %43 = sext i8 %42 to i64
  %44 = add nsw i64 %43, -65
  %45 = getelementptr inbounds [4 x i32], ptr %2, i64 0, i64 %44
  %46 = load i32, ptr %45, align 4, !tbaa !20
  %47 = add nsw i32 %46, 1
  store i32 %47, ptr %45, align 4, !tbaa !20
  br label %48

48:                                               ; preds = %37, %40
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %49 = getelementptr inbounds ptr, ptr %21, i64 %indvars.iv.next
  %50 = load ptr, ptr %49, align 8, !tbaa !5
  %.not.1 = icmp eq ptr %50, null
  br i1 %.not.1, label %59, label %51

51:                                               ; preds = %48
  %52 = load ptr, ptr %50, align 8, !tbaa !17
  %53 = load i8, ptr %52, align 1, !tbaa !19
  %54 = sext i8 %53 to i64
  %55 = add nsw i64 %54, -65
  %56 = getelementptr inbounds [4 x i32], ptr %2, i64 0, i64 %55
  %57 = load i32, ptr %56, align 4, !tbaa !20
  %58 = add nsw i32 %57, 1
  store i32 %58, ptr %56, align 4, !tbaa !20
  br label %59

59:                                               ; preds = %51, %48
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %.preheader35.loopexit.unr-lcssa, label %37, !llvm.loop !21
}

declare ptr @dirGraphRemoveNodeWtoFr(ptr noundef, ptr noundef) local_unnamed_addr #2

declare void @CuAssertStrEquals_LineMsg(ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare void @CuAssertPtrEquals_LineMsg(ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { 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 = !{!"ErrorTestStruct", !11, i64 0}
!11 = !{!"int", !7, i64 0}
!12 = !{!13, !6, i64 0}
!13 = !{!"DirectedGraph", !6, i64 0, !6, i64 8, !6, i64 16}
!14 = !{!15, !11, i64 8}
!15 = !{!"HashMap", !6, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48}
!16 = !{!15, !6, i64 0}
!17 = !{!18, !6, i64 0}
!18 = !{!"Entry", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!19 = !{!7, !7, i64 0}
!20 = !{!11, !11, i64 0}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass