; LLVM IR from ksw2000/Data-Structure-in-C :: Linked-List (09-equivalence)

; 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.node = type { i32, ptr }

@.str = external hidden unnamed_addr constant [22 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca [24 x i16], align 16
  %3 = alloca [24 x ptr], align 16
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 48, ptr %2) #4
  call void @llvm.lifetime.start.p0(i64 192, ptr %3) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  %10 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef 24)
  %11 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %9)
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %12

12:                                               ; preds = %23, %0
  %13 = load i32, ptr %7, align 4, !tbaa !5
  %14 = load i32, ptr %9, align 4, !tbaa !5
  %15 = icmp slt i32 %13, %14
  br i1 %15, label %16, label %26

16:                                               ; preds = %12
  %17 = load i32, ptr %7, align 4, !tbaa !5
  %18 = sext i32 %17 to i64
  %19 = getelementptr inbounds [24 x i16], ptr %2, i64 0, i64 %18
  store i16 1, ptr %19, align 2, !tbaa !9
  %20 = load i32, ptr %7, align 4, !tbaa !5
  %21 = sext i32 %20 to i64
  %22 = getelementptr inbounds [24 x ptr], ptr %3, i64 0, i64 %21
  store ptr null, ptr %22, align 8, !tbaa !11
  br label %23

23:                                               ; preds = %16
  %24 = load i32, ptr %7, align 4, !tbaa !5
  %25 = add nsw i32 %24, 1
  store i32 %25, ptr %7, align 4, !tbaa !5
  br label %12, !llvm.loop !13

26:                                               ; preds = %12
  br label %27

27:                                               ; preds = %58, %26
  %28 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  %29 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.3, ptr noundef %7, ptr noundef %8)
  %30 = call noalias ptr @malloc(i64 noundef 16) #5
  store ptr %30, ptr %4, align 8, !tbaa !11
  %31 = load i32, ptr %8, align 4, !tbaa !5
  %32 = load ptr, ptr %4, align 8, !tbaa !11
  %33 = getelementptr inbounds %struct.node, ptr %32, i32 0, i32 0
  store i32 %31, ptr %33, align 8, !tbaa !15
  %34 = load i32, ptr %7, align 4, !tbaa !5
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds [24 x ptr], ptr %3, i64 0, i64 %35
  %37 = load ptr, ptr %36, align 8, !tbaa !11
  %38 = load ptr, ptr %4, align 8, !tbaa !11
  %39 = getelementptr inbounds %struct.node, ptr %38, i32 0, i32 1
  store ptr %37, ptr %39, align 8, !tbaa !17
  %40 = load ptr, ptr %4, align 8, !tbaa !11
  %41 = load i32, ptr %7, align 4, !tbaa !5
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds [24 x ptr], ptr %3, i64 0, i64 %42
  store ptr %40, ptr %43, align 8, !tbaa !11
  %44 = call noalias ptr @malloc(i64 noundef 16) #5
  store ptr %44, ptr %4, align 8, !tbaa !11
  %45 = load i32, ptr %7, align 4, !tbaa !5
  %46 = load ptr, ptr %4, align 8, !tbaa !11
  %47 = getelementptr inbounds %struct.node, ptr %46, i32 0, i32 0
  store i32 %45, ptr %47, align 8, !tbaa !15
  %48 = load i32, ptr %8, align 4, !tbaa !5
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds [24 x ptr], ptr %3, i64 0, i64 %49
  %51 = load ptr, ptr %50, align 8, !tbaa !11
  %52 = load ptr, ptr %4, align 8, !tbaa !11
  %53 = getelementptr inbounds %struct.node, ptr %52, i32 0, i32 1
  store ptr %51, ptr %53, align 8, !tbaa !17
  %54 = load ptr, ptr %4, align 8, !tbaa !11
  %55 = load i32, ptr %8, align 4, !tbaa !5
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [24 x ptr], ptr %3, i64 0, i64 %56
  store ptr %54, ptr %57, align 8, !tbaa !11
  br label %58

58:                                               ; preds = %27
  %59 = load i32, ptr %7, align 4, !tbaa !5
  %60 = icmp sge i32 %59, 0
  br i1 %60, label %27, label %61, !llvm.loop !18

61:                                               ; preds = %58
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %62

62:                                               ; preds = %131, %61
  %63 = load i32, ptr %7, align 4, !tbaa !5
  %64 = load i32, ptr %9, align 4, !tbaa !5
  %65 = icmp slt i32 %63, %64
  br i1 %65, label %66, label %134

66:                                               ; preds = %62
  %67 = load i32, ptr %7, align 4, !tbaa !5
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [24 x i16], ptr %2, i64 0, i64 %68
  %70 = load i16, ptr %69, align 2, !tbaa !9
  %71 = icmp ne i16 %70, 0
  br i1 %71, label %72, label %130

72:                                               ; preds = %66
  %73 = load i32, ptr %7, align 4, !tbaa !5
  %74 = call i32 (ptr, ...) @printf(ptr noundef @.str.4, i32 noundef %73)
  %75 = load i32, ptr %7, align 4, !tbaa !5
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [24 x i16], ptr %2, i64 0, i64 %76
  store i16 0, ptr %77, align 2, !tbaa !9
  %78 = load i32, ptr %7, align 4, !tbaa !5
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds [24 x ptr], ptr %3, i64 0, i64 %79
  %81 = load ptr, ptr %80, align 8, !tbaa !11
  store ptr %81, ptr %4, align 8, !tbaa !11
  store ptr null, ptr %6, align 8, !tbaa !11
  br label %82

82:                                               ; preds = %128, %72
  br label %83

83:                                               ; preds = %113, %82
  %84 = load ptr, ptr %4, align 8, !tbaa !11
  %85 = icmp ne ptr %84, null
  br i1 %85, label %86, label %114

86:                                               ; preds = %83
  %87 = load ptr, ptr %4, align 8, !tbaa !11
  %88 = getelementptr inbounds %struct.node, ptr %87, i32 0, i32 0
  %89 = load i32, ptr %88, align 8, !tbaa !15
  store i32 %89, ptr %8, align 4, !tbaa !5
  %90 = load i32, ptr %8, align 4, !tbaa !5
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds [24 x i16], ptr %2, i64 0, i64 %91
  %93 = load i16, ptr %92, align 2, !tbaa !9
  %94 = icmp ne i16 %93, 0
  br i1 %94, label %95, label %109

95:                                               ; preds = %86
  %96 = load i32, ptr %8, align 4, !tbaa !5
  %97 = call i32 (ptr, ...) @printf(ptr noundef @.str.5, i32 noundef %96)
  %98 = load i32, ptr %8, align 4, !tbaa !5
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [24 x i16], ptr %2, i64 0, i64 %99
  store i16 0, ptr %100, align 2, !tbaa !9
  %101 = load ptr, ptr %4, align 8, !tbaa !11
  %102 = getelementptr inbounds %struct.node, ptr %101, i32 0, i32 1
  %103 = load ptr, ptr %102, align 8, !tbaa !17
  store ptr %103, ptr %5, align 8, !tbaa !11
  %104 = load ptr, ptr %6, align 8, !tbaa !11
  %105 = load ptr, ptr %4, align 8, !tbaa !11
  %106 = getelementptr inbounds %struct.node, ptr %105, i32 0, i32 1
  store ptr %104, ptr %106, align 8, !tbaa !17
  %107 = load ptr, ptr %4, align 8, !tbaa !11
  store ptr %107, ptr %6, align 8, !tbaa !11
  %108 = load ptr, ptr %5, align 8, !tbaa !11
  store ptr %108, ptr %4, align 8, !tbaa !11
  br label %113

109:                                              ; preds = %86
  %110 = load ptr, ptr %4, align 8, !tbaa !11
  %111 = getelementptr inbounds %struct.node, ptr %110, i32 0, i32 1
  %112 = load ptr, ptr %111, align 8, !tbaa !17
  store ptr %112, ptr %4, align 8, !tbaa !11
  br label %113

113:                                              ; preds = %109, %95
  br label %83, !llvm.loop !19

114:                                              ; preds = %83
  %115 = load ptr, ptr %6, align 8, !tbaa !11
  %116 = icmp ne ptr %115, null
  br i1 %116, label %118, label %117

117:                                              ; preds = %114
  br label %129

118:                                              ; preds = %114
  %119 = load ptr, ptr %6, align 8, !tbaa !11
  %120 = getelementptr inbounds %struct.node, ptr %119, i32 0, i32 0
  %121 = load i32, ptr %120, align 8, !tbaa !15
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds [24 x ptr], ptr %3, i64 0, i64 %122
  %124 = load ptr, ptr %123, align 8, !tbaa !11
  store ptr %124, ptr %4, align 8, !tbaa !11
  %125 = load ptr, ptr %6, align 8, !tbaa !11
  %126 = getelementptr inbounds %struct.node, ptr %125, i32 0, i32 1
  %127 = load ptr, ptr %126, align 8, !tbaa !17
  store ptr %127, ptr %6, align 8, !tbaa !11
  br label %128

128:                                              ; preds = %118
  br label %82

129:                                              ; preds = %117
  br label %130

130:                                              ; preds = %129, %66
  br label %131

131:                                              ; preds = %130
  %132 = load i32, ptr %7, align 4, !tbaa !5
  %133 = add nsw i32 %132, 1
  store i32 %133, ptr %7, align 4, !tbaa !5
  br label %62, !llvm.loop !20

134:                                              ; preds = %62
  %135 = call i32 (ptr, ...) @printf(ptr noundef @.str.6)
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 192, ptr %3) #4
  call void @llvm.lifetime.end.p0(i64 48, ptr %2) #4
  ret i32 0
}

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

declare i32 @printf(ptr noundef, ...) #2

declare i32 @__isoc99_scanf(ptr noundef, ...) #2

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

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

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 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 #4 = { nounwind }
attributes #5 = { nounwind allocsize(0) }

!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 = !{!"short", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!16, !6, i64 0}
!16 = !{!"node", !6, i64 0, !12, i64 8}
!17 = !{!16, !12, i64 8}
!18 = distinct !{!18, !14}
!19 = distinct !{!19, !14}
!20 = distinct !{!20, !14}


; 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 [22 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: nofree nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca [24 x i16], align 16
  %2 = alloca [24 x ptr], align 16
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %1) #5
  call void @llvm.lifetime.start.p0(i64 192, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #5
  %6 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef 24)
  %7 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %5)
  %8 = load i32, ptr %5, align 4, !tbaa !5
  %9 = icmp sgt i32 %8, 0
  br i1 %9, label %.lr.ph.preheader, label %.preheader26

.lr.ph.preheader:                                 ; preds = %0
  %10 = zext nneg i32 %8 to i64
  %11 = shl nuw nsw i64 %10, 3
  call void @llvm.memset.p0.i64(ptr nonnull align 16 %2, i8 0, i64 %11, i1 false), !tbaa !9
  %min.iters.check = icmp ult i32 %8, 16
  br i1 %min.iters.check, label %.lr.ph.preheader38, label %vector.ph

.lr.ph.preheader38:                               ; preds = %middle.block, %.lr.ph.preheader
  %indvars.iv.ph = phi i64 [ 0, %.lr.ph.preheader ], [ %n.vec, %middle.block ]
  br label %.lr.ph

vector.ph:                                        ; preds = %.lr.ph.preheader
  %n.vec = and i64 %10, 2147483632
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %12 = getelementptr inbounds [24 x i16], ptr %1, i64 0, i64 %index
  %13 = getelementptr inbounds i8, ptr %12, i64 16
  store <8 x i16> <i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1>, ptr %12, align 16, !tbaa !11
  store <8 x i16> <i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1>, ptr %13, align 16, !tbaa !11
  %index.next = add nuw i64 %index, 16
  %14 = icmp eq i64 %index.next, %n.vec
  br i1 %14, label %middle.block, label %vector.body, !llvm.loop !13

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %10
  br i1 %cmp.n, label %.preheader26, label %.lr.ph.preheader38

.preheader26:                                     ; preds = %.lr.ph, %middle.block, %0
  %storemerge.lcssa = phi i32 [ 0, %0 ], [ %8, %middle.block ], [ %8, %.lr.ph ]
  store i32 %storemerge.lcssa, ptr %3, align 4, !tbaa !5
  br label %16

.lr.ph:                                           ; preds = %.lr.ph.preheader38, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ %indvars.iv.ph, %.lr.ph.preheader38 ]
  %15 = getelementptr inbounds [24 x i16], ptr %1, i64 0, i64 %indvars.iv
  store i16 1, ptr %15, align 2, !tbaa !11
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %10
  br i1 %exitcond.not, label %.preheader26, label %.lr.ph, !llvm.loop !17

16:                                               ; preds = %.preheader26, %16
  %17 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  %18 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.3, ptr noundef nonnull %3, ptr noundef nonnull %4)
  %19 = call noalias dereferenceable_or_null(16) ptr @malloc(i64 noundef 16) #6
  %20 = load i32, ptr %4, align 4, !tbaa !5
  store i32 %20, ptr %19, align 8, !tbaa !18
  %21 = load i32, ptr %3, align 4, !tbaa !5
  %22 = sext i32 %21 to i64
  %23 = getelementptr inbounds [24 x ptr], ptr %2, i64 0, i64 %22
  %24 = load ptr, ptr %23, align 8, !tbaa !9
  %25 = getelementptr inbounds i8, ptr %19, i64 8
  store ptr %24, ptr %25, align 8, !tbaa !20
  store ptr %19, ptr %23, align 8, !tbaa !9
  %26 = call noalias dereferenceable_or_null(16) ptr @malloc(i64 noundef 16) #6
  store i32 %21, ptr %26, align 8, !tbaa !18
  %27 = sext i32 %20 to i64
  %28 = getelementptr inbounds [24 x ptr], ptr %2, i64 0, i64 %27
  %29 = load ptr, ptr %28, align 8, !tbaa !9
  %30 = getelementptr inbounds i8, ptr %26, i64 8
  store ptr %29, ptr %30, align 8, !tbaa !20
  store ptr %26, ptr %28, align 8, !tbaa !9
  %31 = icmp sgt i32 %21, -1
  br i1 %31, label %16, label %.preheader, !llvm.loop !21

.preheader:                                       ; preds = %16
  store i32 0, ptr %3, align 4, !tbaa !5
  %32 = load i32, ptr %5, align 4, !tbaa !5
  %33 = icmp sgt i32 %32, 0
  br i1 %33, label %.lr.ph34, label %._crit_edge35

.lr.ph34:                                         ; preds = %.preheader, %.loopexit
  %34 = phi i32 [ %63, %.loopexit ], [ %32, %.preheader ]
  %storemerge2233 = phi i32 [ %65, %.loopexit ], [ 0, %.preheader ]
  %35 = sext i32 %storemerge2233 to i64
  %36 = getelementptr inbounds [24 x i16], ptr %1, i64 0, i64 %35
  %37 = load i16, ptr %36, align 2, !tbaa !11
  %.not = icmp eq i16 %37, 0
  br i1 %.not, label %.loopexit, label %38

38:                                               ; preds = %.lr.ph34
  %39 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef %storemerge2233)
  %40 = load i32, ptr %3, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [24 x i16], ptr %1, i64 0, i64 %41
  store i16 0, ptr %42, align 2, !tbaa !11
  br label %43

43:                                               ; preds = %59, %38
  %.pn.in = phi i32 [ %40, %38 ], [ %60, %59 ]
  %.0 = phi ptr [ null, %38 ], [ %62, %59 ]
  %.pn = sext i32 %.pn.in to i64
  %.017.in = getelementptr inbounds [24 x ptr], ptr %2, i64 0, i64 %.pn
  %.017 = load ptr, ptr %.017.in, align 8, !tbaa !9
  %.not2328 = icmp eq ptr %.017, null
  br i1 %.not2328, label %._crit_edge, label %.lr.ph31

.lr.ph31:                                         ; preds = %43, %58
  %.130 = phi ptr [ %.2, %58 ], [ %.0, %43 ]
  %.11829 = phi ptr [ %.219, %58 ], [ %.017, %43 ]
  %44 = load i32, ptr %.11829, align 8, !tbaa !18
  store i32 %44, ptr %4, align 4, !tbaa !5
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [24 x i16], ptr %1, i64 0, i64 %45
  %47 = load i16, ptr %46, align 2, !tbaa !11
  %.not25 = icmp eq i16 %47, 0
  br i1 %.not25, label %55, label %48

48:                                               ; preds = %.lr.ph31
  %49 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %44)
  %50 = load i32, ptr %4, align 4, !tbaa !5
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds [24 x i16], ptr %1, i64 0, i64 %51
  store i16 0, ptr %52, align 2, !tbaa !11
  %53 = getelementptr inbounds i8, ptr %.11829, i64 8
  %54 = load ptr, ptr %53, align 8, !tbaa !20
  store ptr %.130, ptr %53, align 8, !tbaa !20
  br label %58

55:                                               ; preds = %.lr.ph31
  %56 = getelementptr inbounds i8, ptr %.11829, i64 8
  %57 = load ptr, ptr %56, align 8, !tbaa !20
  br label %58

58:                                               ; preds = %55, %48
  %.219 = phi ptr [ %54, %48 ], [ %57, %55 ]
  %.2 = phi ptr [ %.11829, %48 ], [ %.130, %55 ]
  %.not23 = icmp eq ptr %.219, null
  br i1 %.not23, label %._crit_edge, label %.lr.ph31, !llvm.loop !22

._crit_edge:                                      ; preds = %58, %43
  %.1.lcssa = phi ptr [ %.0, %43 ], [ %.2, %58 ]
  %.not24 = icmp eq ptr %.1.lcssa, null
  br i1 %.not24, label %.loopexit.loopexit, label %59

59:                                               ; preds = %._crit_edge
  %60 = load i32, ptr %.1.lcssa, align 8, !tbaa !18
  %61 = getelementptr inbounds i8, ptr %.1.lcssa, i64 8
  %62 = load ptr, ptr %61, align 8, !tbaa !20
  br label %43

.loopexit.loopexit:                               ; preds = %._crit_edge
  %.pre = load i32, ptr %3, align 4, !tbaa !5
  %.pre37 = load i32, ptr %5, align 4, !tbaa !5
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.loopexit, %.lr.ph34
  %63 = phi i32 [ %.pre37, %.loopexit.loopexit ], [ %34, %.lr.ph34 ]
  %64 = phi i32 [ %.pre, %.loopexit.loopexit ], [ %storemerge2233, %.lr.ph34 ]
  %65 = add nsw i32 %64, 1
  store i32 %65, ptr %3, align 4, !tbaa !5
  %66 = icmp slt i32 %65, %63
  br i1 %66, label %.lr.ph34, label %._crit_edge35, !llvm.loop !23

._crit_edge35:                                    ; preds = %.loopexit, %.preheader
  %67 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 192, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %1) #5
  ret i32 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: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

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

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

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

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

attributes #0 = { nofree 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 = { 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 #3 = { 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 #4 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { nounwind }
attributes #6 = { nounwind allocsize(0) }

!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, !12, i64 0}
!12 = !{!"short", !7, i64 0}
!13 = distinct !{!13, !14, !15, !16}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!"llvm.loop.isvectorized", i32 1}
!16 = !{!"llvm.loop.unroll.runtime.disable"}
!17 = distinct !{!17, !14, !16, !15}
!18 = !{!19, !6, i64 0}
!19 = !{!"node", !6, i64 0, !10, i64 8}
!20 = !{!19, !10, i64 8}
!21 = distinct !{!21, !14}
!22 = distinct !{!22, !14}
!23 = distinct !{!23, !14}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopIdiomRecognizePass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass