; LLVM IR from AlgoGenesis/C :: Backtracking Algorithms/Dancing Links (DLX) (program)

; 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.Column = type { %struct.Node, i32, [20 x i8] }
%struct.Node = type { ptr, ptr, ptr, ptr, ptr }

@root = external hidden global %struct.Column, align 8
@stderr = external global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [41 x i8], align 1
@node_count = external hidden global i32, align 4
@.str.3 = external hidden unnamed_addr constant [35 x i8], align 1
@nodes = external hidden global [1000 x %struct.Node], align 16

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

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #1

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

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #3

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

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

; Function Attrs: nounwind uwtable
define dso_local void @add_row(ptr noundef %0, i32 noundef %1, ptr noundef %2) #4 {
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  store ptr %2, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %14 = load i32, ptr %5, align 4, !tbaa !9
  %15 = sext i32 %14 to i64
  %16 = mul i64 %15, 8
  %17 = call noalias ptr @malloc(i64 noundef %16) #6
  store ptr %17, ptr %7, align 8, !tbaa !5
  %18 = load ptr, ptr %7, align 8, !tbaa !5
  %19 = icmp ne ptr %18, null
  br i1 %19, label %23, label %20

20:                                               ; preds = %3
  %21 = load ptr, ptr @stderr, align 8, !tbaa !5
  %22 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %21, ptr noundef @.str.2) #5
  call void @exit(i32 noundef 1) #7
  unreachable

23:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 0, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %24 = load ptr, ptr getelementptr inbounds (%struct.Node, ptr @root, i32 0, i32 1), align 8, !tbaa !11
  store ptr %24, ptr %9, align 8, !tbaa !5
  br label %25

25:                                               ; preds = %96, %23
  %26 = load ptr, ptr %9, align 8, !tbaa !5
  %27 = icmp ne ptr %26, @root
  br i1 %27, label %28, label %102

28:                                               ; preds = %25
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  %30 = load i32, ptr %8, align 4, !tbaa !9
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds i32, ptr %29, i64 %31
  %33 = load i32, ptr %32, align 4, !tbaa !9
  %34 = icmp ne i32 %33, 0
  br i1 %34, label %35, label %91

35:                                               ; preds = %28
  %36 = load i32, ptr @node_count, align 4, !tbaa !9
  %37 = icmp sge i32 %36, 1000
  br i1 %37, label %38, label %42

38:                                               ; preds = %35
  %39 = load ptr, ptr @stderr, align 8, !tbaa !5
  %40 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %39, ptr noundef @.str.3) #5
  %41 = load ptr, ptr %7, align 8, !tbaa !5
  call void @free(ptr noundef %41) #5
  call void @exit(i32 noundef 1) #7
  unreachable

42:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %43 = load i32, ptr @node_count, align 4, !tbaa !9
  %44 = add nsw i32 %43, 1
  store i32 %44, ptr @node_count, align 4, !tbaa !9
  %45 = sext i32 %43 to i64
  %46 = getelementptr inbounds [1000 x %struct.Node], ptr @nodes, i64 0, i64 %45
  store ptr %46, ptr %10, align 8, !tbaa !5
  %47 = load ptr, ptr %9, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.Node, ptr %47, i32 0, i32 4
  %49 = load ptr, ptr %48, align 8, !tbaa !14
  %50 = load ptr, ptr %10, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.Node, ptr %50, i32 0, i32 4
  store ptr %49, ptr %51, align 8, !tbaa !14
  %52 = load ptr, ptr %9, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.Node, ptr %52, i32 0, i32 4
  %54 = load ptr, ptr %53, align 8, !tbaa !14
  %55 = getelementptr inbounds %struct.Column, ptr %54, i32 0, i32 0
  %56 = getelementptr inbounds %struct.Node, ptr %55, i32 0, i32 3
  %57 = load ptr, ptr %56, align 8, !tbaa !15
  %58 = load ptr, ptr %10, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.Node, ptr %58, i32 0, i32 3
  store ptr %57, ptr %59, align 8, !tbaa !16
  %60 = load ptr, ptr %9, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.Node, ptr %60, i32 0, i32 4
  %62 = load ptr, ptr %61, align 8, !tbaa !14
  %63 = getelementptr inbounds %struct.Column, ptr %62, i32 0, i32 0
  %64 = load ptr, ptr %10, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.Node, ptr %64, i32 0, i32 2
  store ptr %63, ptr %65, align 8, !tbaa !17
  %66 = load ptr, ptr %10, align 8, !tbaa !5
  %67 = load ptr, ptr %9, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.Node, ptr %67, i32 0, i32 4
  %69 = load ptr, ptr %68, align 8, !tbaa !14
  %70 = getelementptr inbounds %struct.Column, ptr %69, i32 0, i32 0
  %71 = getelementptr inbounds %struct.Node, ptr %70, i32 0, i32 3
  %72 = load ptr, ptr %71, align 8, !tbaa !15
  %73 = getelementptr inbounds %struct.Node, ptr %72, i32 0, i32 2
  store ptr %66, ptr %73, align 8, !tbaa !17
  %74 = load ptr, ptr %10, align 8, !tbaa !5
  %75 = load ptr, ptr %9, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.Node, ptr %75, i32 0, i32 4
  %77 = load ptr, ptr %76, align 8, !tbaa !14
  %78 = getelementptr inbounds %struct.Column, ptr %77, i32 0, i32 0
  %79 = getelementptr inbounds %struct.Node, ptr %78, i32 0, i32 3
  store ptr %74, ptr %79, align 8, !tbaa !15
  %80 = load ptr, ptr %9, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.Node, ptr %80, i32 0, i32 4
  %82 = load ptr, ptr %81, align 8, !tbaa !14
  %83 = getelementptr inbounds %struct.Column, ptr %82, i32 0, i32 1
  %84 = load i32, ptr %83, align 8, !tbaa !18
  %85 = add nsw i32 %84, 1
  store i32 %85, ptr %83, align 8, !tbaa !18
  %86 = load ptr, ptr %10, align 8, !tbaa !5
  %87 = load ptr, ptr %7, align 8, !tbaa !5
  %88 = load i32, ptr %8, align 4, !tbaa !9
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds ptr, ptr %87, i64 %89
  store ptr %86, ptr %90, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %96

91:                                               ; preds = %28
  %92 = load ptr, ptr %7, align 8, !tbaa !5
  %93 = load i32, ptr %8, align 4, !tbaa !9
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds ptr, ptr %92, i64 %94
  store ptr null, ptr %95, align 8, !tbaa !5
  br label %96

96:                                               ; preds = %91, %42
  %97 = load ptr, ptr %9, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.Node, ptr %97, i32 0, i32 1
  %99 = load ptr, ptr %98, align 8, !tbaa !19
  store ptr %99, ptr %9, align 8, !tbaa !5
  %100 = load i32, ptr %8, align 4, !tbaa !9
  %101 = add nsw i32 %100, 1
  store i32 %101, ptr %8, align 4, !tbaa !9
  br label %25, !llvm.loop !20

102:                                              ; preds = %25
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  store ptr null, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  store ptr null, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %103

103:                                              ; preds = %165, %102
  %104 = load i32, ptr %13, align 4, !tbaa !9
  %105 = load i32, ptr %5, align 4, !tbaa !9
  %106 = icmp slt i32 %104, %105
  br i1 %106, label %108, label %107

107:                                              ; preds = %103
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %168

108:                                              ; preds = %103
  %109 = load ptr, ptr %7, align 8, !tbaa !5
  %110 = load i32, ptr %13, align 4, !tbaa !9
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds ptr, ptr %109, i64 %111
  %113 = load ptr, ptr %112, align 8, !tbaa !5
  %114 = icmp ne ptr %113, null
  br i1 %114, label %115, label %164

115:                                              ; preds = %108
  %116 = load ptr, ptr %11, align 8, !tbaa !5
  %117 = icmp ne ptr %116, null
  br i1 %117, label %129, label %118

118:                                              ; preds = %115
  %119 = load ptr, ptr %7, align 8, !tbaa !5
  %120 = load i32, ptr %13, align 4, !tbaa !9
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds ptr, ptr %119, i64 %121
  %123 = load ptr, ptr %122, align 8, !tbaa !5
  store ptr %123, ptr %11, align 8, !tbaa !5
  %124 = load ptr, ptr %11, align 8, !tbaa !5
  %125 = load ptr, ptr %11, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.Node, ptr %125, i32 0, i32 1
  store ptr %124, ptr %126, align 8, !tbaa !19
  %127 = load ptr, ptr %11, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.Node, ptr %127, i32 0, i32 0
  store ptr %124, ptr %128, align 8, !tbaa !22
  br label %158

129:                                              ; preds = %115
  %130 = load ptr, ptr %7, align 8, !tbaa !5
  %131 = load i32, ptr %13, align 4, !tbaa !9
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds ptr, ptr %130, i64 %132
  %134 = load ptr, ptr %133, align 8, !tbaa !5
  %135 = load ptr, ptr %12, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.Node, ptr %135, i32 0, i32 1
  store ptr %134, ptr %136, align 8, !tbaa !19
  %137 = load ptr, ptr %12, align 8, !tbaa !5
  %138 = load ptr, ptr %7, align 8, !tbaa !5
  %139 = load i32, ptr %13, align 4, !tbaa !9
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds ptr, ptr %138, i64 %140
  %142 = load ptr, ptr %141, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.Node, ptr %142, i32 0, i32 0
  store ptr %137, ptr %143, align 8, !tbaa !22
  %144 = load ptr, ptr %11, align 8, !tbaa !5
  %145 = load ptr, ptr %7, align 8, !tbaa !5
  %146 = load i32, ptr %13, align 4, !tbaa !9
  %147 = sext i32 %146 to i64
  %148 = getelementptr inbounds ptr, ptr %145, i64 %147
  %149 = load ptr, ptr %148, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.Node, ptr %149, i32 0, i32 1
  store ptr %144, ptr %150, align 8, !tbaa !19
  %151 = load ptr, ptr %7, align 8, !tbaa !5
  %152 = load i32, ptr %13, align 4, !tbaa !9
  %153 = sext i32 %152 to i64
  %154 = getelementptr inbounds ptr, ptr %151, i64 %153
  %155 = load ptr, ptr %154, align 8, !tbaa !5
  %156 = load ptr, ptr %11, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct.Node, ptr %156, i32 0, i32 0
  store ptr %155, ptr %157, align 8, !tbaa !22
  br label %158

158:                                              ; preds = %129, %118
  %159 = load ptr, ptr %7, align 8, !tbaa !5
  %160 = load i32, ptr %13, align 4, !tbaa !9
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds ptr, ptr %159, i64 %161
  %163 = load ptr, ptr %162, align 8, !tbaa !5
  store ptr %163, ptr %12, align 8, !tbaa !5
  br label %164

164:                                              ; preds = %158, %108
  br label %165

165:                                              ; preds = %164
  %166 = load i32, ptr %13, align 4, !tbaa !9
  %167 = add nsw i32 %166, 1
  store i32 %167, ptr %13, align 4, !tbaa !9
  br label %103, !llvm.loop !23

168:                                              ; preds = %107
  %169 = load ptr, ptr %7, align 8, !tbaa !5
  call void @free(ptr noundef %169) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  ret void
}

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


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.Column = type { %struct.Node, i32, [20 x i8] }
%struct.Node = type { ptr, ptr, ptr, ptr, ptr }

@root = external hidden global %struct.Column, align 8
@stderr = external local_unnamed_addr global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [41 x i8], align 1
@node_count = external hidden local_unnamed_addr global i32, align 4
@.str.3 = external hidden unnamed_addr constant [35 x i8], align 1
@nodes = external hidden global [1000 x %struct.Node], align 16

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #0

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

; Function Attrs: noreturn nounwind
declare void @exit(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) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
define dso_local void @add_row(ptr nocapture noundef readonly %0, i32 noundef %1, ptr nocapture noundef readnone %2) local_unnamed_addr #4 {
  %4 = sext i32 %1 to i64
  %5 = shl nsw i64 %4, 3
  %6 = tail call noalias ptr @malloc(i64 noundef %5) #5
  %.not = icmp eq ptr %6, null
  br i1 %.not, label %7, label %.preheader61

.preheader61:                                     ; preds = %3
  %.05362 = load ptr, ptr getelementptr inbounds (i8, ptr @root, i64 8), align 8, !tbaa !5
  %.not5763 = icmp eq ptr %.05362, @root
  br i1 %.not5763, label %.preheader, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %.preheader61
  %node_count.promoted = load i32, ptr @node_count, align 4, !tbaa !10
  br label %.lr.ph

7:                                                ; preds = %3
  %8 = load ptr, ptr @stderr, align 8, !tbaa !12
  %9 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %8, ptr noundef nonnull @.str.2) #6
  tail call void @exit(i32 noundef 1) #7
  unreachable

.preheader:                                       ; preds = %34, %.preheader61
  %10 = icmp sgt i32 %1, 0
  br i1 %10, label %.lr.ph69.preheader, label %._crit_edge

.lr.ph69.preheader:                               ; preds = %.preheader
  %wide.trip.count = zext nneg i32 %1 to i64
  br label %.lr.ph69

.lr.ph:                                           ; preds = %.lr.ph.preheader, %34
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %34 ]
  %.05365 = phi ptr [ %.05362, %.lr.ph.preheader ], [ %.053, %34 ]
  %11 = phi i32 [ %node_count.promoted, %.lr.ph.preheader ], [ %35, %34 ]
  %12 = getelementptr inbounds i32, ptr %0, i64 %indvars.iv
  %13 = load i32, ptr %12, align 4, !tbaa !10
  %.not60 = icmp eq i32 %13, 0
  br i1 %.not60, label %34, label %14

14:                                               ; preds = %.lr.ph
  %15 = icmp sgt i32 %11, 999
  br i1 %15, label %16, label %19

16:                                               ; preds = %14
  %17 = load ptr, ptr @stderr, align 8, !tbaa !12
  %18 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %17, ptr noundef nonnull @.str.3) #6
  tail call void @free(ptr noundef nonnull %6) #8
  tail call void @exit(i32 noundef 1) #7
  unreachable

19:                                               ; preds = %14
  %20 = add nsw i32 %11, 1
  store i32 %20, ptr @node_count, align 4, !tbaa !10
  %21 = sext i32 %11 to i64
  %22 = getelementptr inbounds [1000 x %struct.Node], ptr @nodes, i64 0, i64 %21
  %23 = getelementptr inbounds i8, ptr %.05365, i64 32
  %24 = load ptr, ptr %23, align 8, !tbaa !13
  %25 = getelementptr inbounds i8, ptr %22, i64 32
  store ptr %24, ptr %25, align 8, !tbaa !13
  %26 = getelementptr inbounds i8, ptr %24, i64 24
  %27 = load ptr, ptr %26, align 8, !tbaa !14
  %28 = getelementptr inbounds i8, ptr %22, i64 24
  store ptr %27, ptr %28, align 8, !tbaa !16
  %29 = getelementptr inbounds i8, ptr %22, i64 16
  store ptr %24, ptr %29, align 8, !tbaa !17
  %30 = getelementptr inbounds i8, ptr %27, i64 16
  store ptr %22, ptr %30, align 8, !tbaa !17
  store ptr %22, ptr %26, align 8, !tbaa !14
  %31 = getelementptr inbounds i8, ptr %24, i64 40
  %32 = load i32, ptr %31, align 8, !tbaa !18
  %33 = add nsw i32 %32, 1
  store i32 %33, ptr %31, align 8, !tbaa !18
  br label %34

34:                                               ; preds = %.lr.ph, %19
  %.sink = phi ptr [ %22, %19 ], [ null, %.lr.ph ]
  %35 = phi i32 [ %20, %19 ], [ %11, %.lr.ph ]
  %36 = getelementptr inbounds ptr, ptr %6, i64 %indvars.iv
  store ptr %.sink, ptr %36, align 8, !tbaa !12
  %37 = getelementptr inbounds i8, ptr %.05365, i64 8
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %.053 = load ptr, ptr %37, align 8, !tbaa !5
  %.not57 = icmp eq ptr %.053, @root
  br i1 %.not57, label %.preheader, label %.lr.ph, !llvm.loop !19

._crit_edge:                                      ; preds = %47, %.preheader
  tail call void @free(ptr noundef nonnull %6) #8
  ret void

.lr.ph69:                                         ; preds = %.lr.ph69.preheader, %47
  %indvars.iv71 = phi i64 [ 0, %.lr.ph69.preheader ], [ %indvars.iv.next72, %47 ]
  %.04967 = phi ptr [ null, %.lr.ph69.preheader ], [ %.1, %47 ]
  %.05066 = phi ptr [ null, %.lr.ph69.preheader ], [ %.2, %47 ]
  %38 = getelementptr inbounds ptr, ptr %6, i64 %indvars.iv71
  %39 = load ptr, ptr %38, align 8, !tbaa !12
  %.not58 = icmp eq ptr %39, null
  br i1 %.not58, label %47, label %40

40:                                               ; preds = %.lr.ph69
  %.not59 = icmp eq ptr %.05066, null
  br i1 %.not59, label %41, label %43

41:                                               ; preds = %40
  %42 = getelementptr inbounds i8, ptr %39, i64 8
  store ptr %39, ptr %42, align 8, !tbaa !5
  store ptr %39, ptr %39, align 8, !tbaa !21
  br label %47

43:                                               ; preds = %40
  %44 = getelementptr inbounds i8, ptr %.04967, i64 8
  store ptr %39, ptr %44, align 8, !tbaa !5
  %45 = load ptr, ptr %38, align 8, !tbaa !12
  store ptr %.04967, ptr %45, align 8, !tbaa !21
  %46 = getelementptr inbounds i8, ptr %45, i64 8
  store ptr %.05066, ptr %46, align 8, !tbaa !5
  store ptr %45, ptr %.05066, align 8, !tbaa !21
  br label %47

47:                                               ; preds = %41, %43, %.lr.ph69
  %.2 = phi ptr [ %.05066, %.lr.ph69 ], [ %.05066, %43 ], [ %39, %41 ]
  %.1 = phi ptr [ %.04967, %.lr.ph69 ], [ %45, %43 ], [ %39, %41 ]
  %indvars.iv.next72 = add nuw nsw i64 %indvars.iv71, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next72, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph69, !llvm.loop !22
}

attributes #0 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(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 #1 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 #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 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind allocsize(0) }
attributes #6 = { cold nounwind }
attributes #7 = { noreturn nounwind }
attributes #8 = { 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 8}
!6 = !{!"Node", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!11, !11, i64 0}
!11 = !{!"int", !8, i64 0}
!12 = !{!7, !7, i64 0}
!13 = !{!6, !7, i64 32}
!14 = !{!15, !7, i64 24}
!15 = !{!"Column", !6, i64 0, !11, i64 40, !8, i64 44}
!16 = !{!6, !7, i64 24}
!17 = !{!6, !7, i64 16}
!18 = !{!15, !11, i64 40}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!6, !7, i64 0}
!22 = distinct !{!22, !20}


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