; LLVM IR from jingweizhanghuai/Morn :: src/util (morn_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.GraphNode = type { ptr, ptr, ptr, i32, i32, i32, ptr }
%struct.HandleList = type { %struct.MList, i32, i32, i32, i32 }
%struct.MList = type { i32, ptr }
%struct.MHandle = type { i32, i32, ptr, ptr }
%struct.HandleGraphCreate = type { ptr, i32, i32, ptr, i32, ptr, ptr }

@.str.2 = external hidden unnamed_addr constant [77 x i8], align 1
@__FUNCTION__.mGraphLink = external hidden unnamed_addr constant [11 x i8], align 1
@.str.4 = 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

declare void @m_Free(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 void @m_Exception(i32 noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ...) #1

declare ptr @m_Malloc(i32 noundef) #1

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

; Function Attrs: nounwind uwtable
define dso_local void @mGraphLink(ptr noundef %0, ptr noundef %1, float noundef %2) #3 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca float, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store float %2, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %15 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %15, ptr %7, align 8, !tbaa !5
  br label %16

16:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  %17 = load ptr, ptr %7, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.GraphNode, ptr %17, i32 0, i32 6
  %19 = load ptr, ptr %18, align 8, !tbaa !11
  %20 = load ptr, ptr %5, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct.GraphNode, ptr %20, i32 0, i32 6
  %22 = load ptr, ptr %21, align 8, !tbaa !11
  %23 = icmp ne ptr %19, %22
  %24 = zext i1 %23 to i32
  store i32 %24, ptr %8, align 4, !tbaa !14
  %25 = load i32, ptr %8, align 4, !tbaa !14
  %26 = icmp ne i32 %25, 0
  br i1 %26, label %27, label %29

27:                                               ; preds = %16
  %28 = load i32, ptr %8, align 4, !tbaa !14
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %28, i32 noundef -1, ptr noundef @.str.2, i32 noundef 102, ptr noundef @__FUNCTION__.mGraphLink, ptr noundef @.str.4)
  br label %29

29:                                               ; preds = %27, %16
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  br label %30

30:                                               ; preds = %29
  br label %31

31:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %32 = load ptr, ptr %7, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.GraphNode, ptr %32, i32 0, i32 6
  %34 = load ptr, ptr %33, align 8, !tbaa !11
  %35 = getelementptr inbounds %struct.HandleList, ptr %34, i64 -1
  %36 = getelementptr inbounds %struct.HandleList, ptr %35, i32 0, i32 0
  %37 = getelementptr inbounds %struct.MList, ptr %36, i32 0, i32 1
  %38 = load ptr, ptr %37, align 8, !tbaa !15
  %39 = getelementptr inbounds ptr, ptr %38, i64 1
  %40 = load ptr, ptr %39, align 8, !tbaa !5
  store ptr %40, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %41 = load ptr, ptr %9, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.MHandle, ptr %41, i32 0, i32 3
  %43 = load ptr, ptr %42, align 8, !tbaa !18
  store ptr %43, ptr %10, align 8, !tbaa !5
  %44 = load ptr, ptr %10, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.HandleGraphCreate, ptr %44, i32 0, i32 4
  %46 = load i32, ptr %45, align 8, !tbaa !20
  %47 = add nsw i32 %46, 1
  store i32 %47, ptr %45, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  store i32 0, ptr %11, align 4, !tbaa !14
  br label %48

48:                                               ; preds = %74, %31
  %49 = load i32, ptr %11, align 4, !tbaa !14
  %50 = load ptr, ptr %7, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.GraphNode, ptr %50, i32 0, i32 3
  %52 = load i32, ptr %51, align 8, !tbaa !22
  %53 = icmp slt i32 %49, %52
  br i1 %53, label %55, label %54

54:                                               ; preds = %48
  store i32 4, ptr %12, align 4
  br label %77

55:                                               ; preds = %48
  %56 = load ptr, ptr %7, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.GraphNode, ptr %56, i32 0, i32 1
  %58 = load ptr, ptr %57, align 8, !tbaa !23
  %59 = load i32, ptr %11, align 4, !tbaa !14
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds ptr, ptr %58, i64 %60
  %62 = load ptr, ptr %61, align 8, !tbaa !5
  %63 = load ptr, ptr %5, align 8, !tbaa !5
  %64 = icmp eq ptr %62, %63
  br i1 %64, label %65, label %73

65:                                               ; preds = %55
  %66 = load float, ptr %6, align 4, !tbaa !9
  %67 = load ptr, ptr %7, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.GraphNode, ptr %67, i32 0, i32 2
  %69 = load ptr, ptr %68, align 8, !tbaa !24
  %70 = load i32, ptr %11, align 4, !tbaa !14
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds float, ptr %69, i64 %71
  store float %66, ptr %72, align 4, !tbaa !9
  store i32 1, ptr %12, align 4
  br label %77

73:                                               ; preds = %55
  br label %74

74:                                               ; preds = %73
  %75 = load i32, ptr %11, align 4, !tbaa !14
  %76 = add nsw i32 %75, 1
  store i32 %76, ptr %11, align 4, !tbaa !14
  br label %48, !llvm.loop !25

77:                                               ; preds = %65, %54
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  %78 = load i32, ptr %12, align 4
  switch i32 %78, label %176 [
    i32 4, label %79
  ]

79:                                               ; preds = %77
  %80 = load ptr, ptr %7, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.GraphNode, ptr %80, i32 0, i32 4
  %82 = load i32, ptr %81, align 4, !tbaa !27
  %83 = load ptr, ptr %7, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.GraphNode, ptr %83, i32 0, i32 3
  %85 = load i32, ptr %84, align 8, !tbaa !22
  %86 = icmp eq i32 %82, %85
  br i1 %86, label %87, label %153

87:                                               ; preds = %79
  %88 = load ptr, ptr %7, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.GraphNode, ptr %88, i32 0, i32 4
  %90 = load i32, ptr %89, align 4, !tbaa !27
  %91 = load ptr, ptr %7, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.GraphNode, ptr %91, i32 0, i32 4
  %93 = load i32, ptr %92, align 4, !tbaa !27
  %94 = sdiv i32 %93, 2
  %95 = icmp sgt i32 %94, 2
  br i1 %95, label %96, label %101

96:                                               ; preds = %87
  %97 = load ptr, ptr %7, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.GraphNode, ptr %97, i32 0, i32 4
  %99 = load i32, ptr %98, align 4, !tbaa !27
  %100 = sdiv i32 %99, 2
  br label %102

101:                                              ; preds = %87
  br label %102

102:                                              ; preds = %101, %96
  %103 = phi i32 [ %100, %96 ], [ 2, %101 ]
  %104 = add nsw i32 %90, %103
  %105 = load ptr, ptr %7, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.GraphNode, ptr %105, i32 0, i32 4
  store i32 %104, ptr %106, align 4, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  %107 = load ptr, ptr %7, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.GraphNode, ptr %107, i32 0, i32 4
  %109 = load i32, ptr %108, align 4, !tbaa !27
  %110 = sext i32 %109 to i64
  %111 = mul i64 %110, 12
  %112 = trunc i64 %111 to i32
  %113 = call ptr @m_Malloc(i32 noundef %112)
  store ptr %113, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %114 = load ptr, ptr %13, align 8, !tbaa !5
  %115 = load ptr, ptr %7, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.GraphNode, ptr %115, i32 0, i32 4
  %117 = load i32, ptr %116, align 4, !tbaa !27
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds ptr, ptr %114, i64 %118
  store ptr %119, ptr %14, align 8, !tbaa !5
  %120 = load ptr, ptr %7, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.GraphNode, ptr %120, i32 0, i32 3
  %122 = load i32, ptr %121, align 8, !tbaa !22
  %123 = icmp sgt i32 %122, 0
  br i1 %123, label %124, label %146

124:                                              ; preds = %102
  %125 = load ptr, ptr %13, align 8, !tbaa !5
  %126 = load ptr, ptr %7, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.GraphNode, ptr %126, i32 0, i32 1
  %128 = load ptr, ptr %127, align 8, !tbaa !23
  %129 = load ptr, ptr %7, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.GraphNode, ptr %129, i32 0, i32 3
  %131 = load i32, ptr %130, align 8, !tbaa !22
  %132 = sext i32 %131 to i64
  %133 = mul i64 %132, 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %125, ptr align 8 %128, i64 %133, i1 false)
  %134 = load ptr, ptr %14, align 8, !tbaa !5
  %135 = load ptr, ptr %7, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.GraphNode, ptr %135, i32 0, i32 2
  %137 = load ptr, ptr %136, align 8, !tbaa !24
  %138 = load ptr, ptr %7, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.GraphNode, ptr %138, i32 0, i32 3
  %140 = load i32, ptr %139, align 8, !tbaa !22
  %141 = sext i32 %140 to i64
  %142 = mul i64 %141, 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %134, ptr align 4 %137, i64 %142, i1 false)
  %143 = load ptr, ptr %7, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.GraphNode, ptr %143, i32 0, i32 1
  %145 = load ptr, ptr %144, align 8, !tbaa !23
  call void @m_Free(ptr noundef %145)
  br label %146

146:                                              ; preds = %124, %102
  %147 = load ptr, ptr %13, align 8, !tbaa !5
  %148 = load ptr, ptr %7, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.GraphNode, ptr %148, i32 0, i32 1
  store ptr %147, ptr %149, align 8, !tbaa !23
  %150 = load ptr, ptr %14, align 8, !tbaa !5
  %151 = load ptr, ptr %7, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.GraphNode, ptr %151, i32 0, i32 2
  store ptr %150, ptr %152, align 8, !tbaa !24
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  br label %153

153:                                              ; preds = %146, %79
  %154 = load ptr, ptr %5, align 8, !tbaa !5
  %155 = load ptr, ptr %7, align 8, !tbaa !5
  %156 = getelementptr inbounds %struct.GraphNode, ptr %155, i32 0, i32 1
  %157 = load ptr, ptr %156, align 8, !tbaa !23
  %158 = load ptr, ptr %7, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct.GraphNode, ptr %158, i32 0, i32 3
  %160 = load i32, ptr %159, align 8, !tbaa !22
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds ptr, ptr %157, i64 %161
  store ptr %154, ptr %162, align 8, !tbaa !5
  %163 = load float, ptr %6, align 4, !tbaa !9
  %164 = load ptr, ptr %7, align 8, !tbaa !5
  %165 = getelementptr inbounds %struct.GraphNode, ptr %164, i32 0, i32 2
  %166 = load ptr, ptr %165, align 8, !tbaa !24
  %167 = load ptr, ptr %7, align 8, !tbaa !5
  %168 = getelementptr inbounds %struct.GraphNode, ptr %167, i32 0, i32 3
  %169 = load i32, ptr %168, align 8, !tbaa !22
  %170 = sext i32 %169 to i64
  %171 = getelementptr inbounds float, ptr %166, i64 %170
  store float %163, ptr %171, align 4, !tbaa !9
  %172 = load ptr, ptr %7, align 8, !tbaa !5
  %173 = getelementptr inbounds %struct.GraphNode, ptr %172, i32 0, i32 3
  %174 = load i32, ptr %173, align 8, !tbaa !22
  %175 = add nsw i32 %174, 1
  store i32 %175, ptr %173, align 8, !tbaa !22
  store i32 0, ptr %12, align 4
  br label %176

176:                                              ; preds = %153, %77
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  %177 = load i32, ptr %12, align 4
  switch i32 %177, label %179 [
    i32 0, label %178
    i32 1, label %178
  ]

178:                                              ; preds = %176, %176
  ret void

179:                                              ; preds = %176
  unreachable
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #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, !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 = !{!"float", !7, i64 0}
!11 = !{!12, !6, i64 40}
!12 = !{!"GraphNode", !6, i64 0, !6, i64 8, !6, i64 16, !13, i64 24, !13, i64 28, !13, i64 32, !6, i64 40}
!13 = !{!"int", !7, i64 0}
!14 = !{!13, !13, i64 0}
!15 = !{!16, !6, i64 8}
!16 = !{!"HandleList", !17, i64 0, !13, i64 16, !13, i64 20, !13, i64 24, !13, i64 28}
!17 = !{!"MList", !13, i64 0, !6, i64 8}
!18 = !{!19, !6, i64 16}
!19 = !{!"MHandle", !13, i64 0, !13, i64 4, !6, i64 8, !6, i64 16}
!20 = !{!21, !13, i64 24}
!21 = !{!"HandleGraphCreate", !6, i64 0, !13, i64 8, !13, i64 12, !6, i64 16, !13, i64 24, !6, i64 32, !6, i64 40}
!22 = !{!12, !13, i64 24}
!23 = !{!12, !6, i64 8}
!24 = !{!12, !6, i64 16}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{!12, !13, i64 28}


; 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.2 = external hidden unnamed_addr constant [77 x i8], align 1
@__FUNCTION__.mGraphLink = external hidden unnamed_addr constant [11 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [25 x i8], align 1

declare void @m_Free(ptr noundef) local_unnamed_addr #0

declare void @m_Exception(i32 noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ...) local_unnamed_addr #0

declare ptr @m_Malloc(i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

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

8:                                                ; preds = %3
  tail call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str.2, i32 noundef 102, ptr noundef nonnull @__FUNCTION__.mGraphLink, ptr noundef nonnull @.str.4) #3
  %.pre = load ptr, ptr %4, align 8, !tbaa !5
  br label %9

9:                                                ; preds = %8, %3
  %10 = phi ptr [ %.pre, %8 ], [ %5, %3 ]
  %11 = getelementptr inbounds i8, ptr %10, i64 -24
  %12 = load ptr, ptr %11, align 8, !tbaa !11
  %13 = getelementptr inbounds i8, ptr %12, i64 8
  %14 = load ptr, ptr %13, align 8, !tbaa !14
  %15 = getelementptr inbounds i8, ptr %14, i64 16
  %16 = load ptr, ptr %15, align 8, !tbaa !15
  %17 = getelementptr inbounds i8, ptr %16, i64 24
  %18 = load i32, ptr %17, align 8, !tbaa !17
  %19 = add nsw i32 %18, 1
  store i32 %19, ptr %17, align 8, !tbaa !17
  %20 = getelementptr inbounds i8, ptr %0, i64 24
  %21 = load i32, ptr %20, align 8, !tbaa !19
  %.not54 = icmp sgt i32 %21, 0
  br i1 %.not54, label %.lr.ph, label %.critedge

.lr.ph:                                           ; preds = %9
  %22 = getelementptr inbounds i8, ptr %0, i64 8
  %23 = load ptr, ptr %22, align 8, !tbaa !20
  %wide.trip.count = zext nneg i32 %21 to i64
  br label %25

24:                                               ; preds = %25
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.critedge, label %25, !llvm.loop !21

25:                                               ; preds = %.lr.ph, %24
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %24 ]
  %26 = getelementptr inbounds ptr, ptr %23, i64 %indvars.iv
  %27 = load ptr, ptr %26, align 8, !tbaa !14
  %28 = icmp eq ptr %27, %1
  br i1 %28, label %29, label %24

29:                                               ; preds = %25
  %30 = getelementptr inbounds i8, ptr %0, i64 16
  %31 = load ptr, ptr %30, align 8, !tbaa !23
  %32 = getelementptr inbounds float, ptr %31, i64 %indvars.iv
  store float %2, ptr %32, align 4, !tbaa !24
  br label %71

.critedge:                                        ; preds = %24, %9
  %33 = getelementptr inbounds i8, ptr %0, i64 28
  %34 = load i32, ptr %33, align 4, !tbaa !26
  %35 = icmp eq i32 %34, %21
  br i1 %35, label %36, label %.critedge._crit_edge

.critedge._crit_edge:                             ; preds = %.critedge
  %.phi.trans.insert = getelementptr inbounds i8, ptr %0, i64 8
  %.pre58 = load ptr, ptr %.phi.trans.insert, align 8, !tbaa !20
  br label %62

36:                                               ; preds = %.critedge
  %37 = icmp sgt i32 %21, 5
  %38 = sdiv i32 %21, 2
  %39 = select i1 %37, i32 %38, i32 2
  %40 = add nsw i32 %39, %21
  store i32 %40, ptr %33, align 4, !tbaa !26
  %41 = mul i32 %40, 12
  %42 = tail call ptr @m_Malloc(i32 noundef %41) #3
  %43 = load i32, ptr %33, align 4, !tbaa !26
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds ptr, ptr %42, i64 %44
  %46 = load i32, ptr %20, align 8, !tbaa !19
  %47 = icmp sgt i32 %46, 0
  br i1 %47, label %48, label %59

48:                                               ; preds = %36
  %49 = getelementptr inbounds i8, ptr %0, i64 8
  %50 = load ptr, ptr %49, align 8, !tbaa !20
  %51 = zext nneg i32 %46 to i64
  %52 = shl nuw nsw i64 %51, 3
  tail call void @llvm.memcpy.p0.p0.i64(ptr align 8 %42, ptr align 8 %50, i64 %52, i1 false)
  %53 = getelementptr inbounds i8, ptr %0, i64 16
  %54 = load ptr, ptr %53, align 8, !tbaa !23
  %55 = load i32, ptr %20, align 8, !tbaa !19
  %56 = sext i32 %55 to i64
  %57 = shl nsw i64 %56, 2
  tail call void @llvm.memcpy.p0.p0.i64(ptr align 4 %45, ptr align 4 %54, i64 %57, i1 false)
  %58 = load ptr, ptr %49, align 8, !tbaa !20
  tail call void @m_Free(ptr noundef %58) #3
  %.pre59.pre = load i32, ptr %20, align 8, !tbaa !19
  br label %59

59:                                               ; preds = %48, %36
  %.pre59 = phi i32 [ %.pre59.pre, %48 ], [ %46, %36 ]
  %60 = getelementptr inbounds i8, ptr %0, i64 8
  store ptr %42, ptr %60, align 8, !tbaa !20
  %61 = getelementptr inbounds i8, ptr %0, i64 16
  store ptr %45, ptr %61, align 8, !tbaa !23
  br label %62

62:                                               ; preds = %.critedge._crit_edge, %59
  %63 = phi i32 [ %21, %.critedge._crit_edge ], [ %.pre59, %59 ]
  %64 = phi ptr [ %.pre58, %.critedge._crit_edge ], [ %42, %59 ]
  %65 = sext i32 %63 to i64
  %66 = getelementptr inbounds ptr, ptr %64, i64 %65
  store ptr %1, ptr %66, align 8, !tbaa !14
  %67 = getelementptr inbounds i8, ptr %0, i64 16
  %68 = load ptr, ptr %67, align 8, !tbaa !23
  %69 = getelementptr inbounds float, ptr %68, i64 %65
  store float %2, ptr %69, align 4, !tbaa !24
  %70 = add nsw i32 %63, 1
  store i32 %70, ptr %20, align 8, !tbaa !19
  br label %71

71:                                               ; preds = %29, %62
  ret void
}

attributes #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 nounwind willreturn memory(argmem: readwrite) }
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 = { 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 40}
!6 = !{!"GraphNode", !7, i64 0, !7, i64 8, !7, i64 16, !10, i64 24, !10, i64 28, !10, i64 32, !7, i64 40}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!12, !7, i64 8}
!12 = !{!"HandleList", !13, i64 0, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28}
!13 = !{!"MList", !10, i64 0, !7, i64 8}
!14 = !{!7, !7, i64 0}
!15 = !{!16, !7, i64 16}
!16 = !{!"MHandle", !10, i64 0, !10, i64 4, !7, i64 8, !7, i64 16}
!17 = !{!18, !10, i64 24}
!18 = !{!"HandleGraphCreate", !7, i64 0, !10, i64 8, !10, i64 12, !7, i64 16, !10, i64 24, !7, i64 32, !7, i64 40}
!19 = !{!6, !10, i64 24}
!20 = !{!6, !7, i64 8}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = !{!6, !7, i64 16}
!24 = !{!25, !25, i64 0}
!25 = !{!"float", !8, i64 0}
!26 = !{!6, !10, i64 28}


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