; LLVM IR from JayXon/Leanify :: lib/zopfli (tree)

; 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"

@.str = external hidden unnamed_addr constant [22 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [66 x i8], align 1
@__PRETTY_FUNCTION__.ZopfliLengthsToSymbols = external hidden unnamed_addr constant [88 x i8], align 1

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

25:                                               ; preds = %35, %4
  %26 = load i32, ptr %12, align 4, !tbaa !11
  %27 = zext i32 %26 to i64
  %28 = load i64, ptr %6, align 8, !tbaa !9
  %29 = icmp ult i64 %27, %28
  br i1 %29, label %30, label %38

30:                                               ; preds = %25
  %31 = load ptr, ptr %8, align 8, !tbaa !5
  %32 = load i32, ptr %12, align 4, !tbaa !11
  %33 = zext i32 %32 to i64
  %34 = getelementptr inbounds i32, ptr %31, i64 %33
  store i32 0, ptr %34, align 4, !tbaa !11
  br label %35

35:                                               ; preds = %30
  %36 = load i32, ptr %12, align 4, !tbaa !11
  %37 = add i32 %36, 1
  store i32 %37, ptr %12, align 4, !tbaa !11
  br label %25, !llvm.loop !13

38:                                               ; preds = %25
  store i32 0, ptr %11, align 4, !tbaa !11
  br label %39

39:                                               ; preds = %48, %38
  %40 = load i32, ptr %11, align 4, !tbaa !11
  %41 = load i32, ptr %7, align 4, !tbaa !11
  %42 = icmp ule i32 %40, %41
  br i1 %42, label %43, label %51

43:                                               ; preds = %39
  %44 = load ptr, ptr %9, align 8, !tbaa !5
  %45 = load i32, ptr %11, align 4, !tbaa !11
  %46 = zext i32 %45 to i64
  %47 = getelementptr inbounds i64, ptr %44, i64 %46
  store i64 0, ptr %47, align 8, !tbaa !9
  br label %48

48:                                               ; preds = %43
  %49 = load i32, ptr %11, align 4, !tbaa !11
  %50 = add i32 %49, 1
  store i32 %50, ptr %11, align 4, !tbaa !11
  br label %39, !llvm.loop !15

51:                                               ; preds = %39
  store i32 0, ptr %12, align 4, !tbaa !11
  br label %52

52:                                               ; preds = %78, %51
  %53 = load i32, ptr %12, align 4, !tbaa !11
  %54 = zext i32 %53 to i64
  %55 = load i64, ptr %6, align 8, !tbaa !9
  %56 = icmp ult i64 %54, %55
  br i1 %56, label %57, label %81

57:                                               ; preds = %52
  %58 = load ptr, ptr %5, align 8, !tbaa !5
  %59 = load i32, ptr %12, align 4, !tbaa !11
  %60 = zext i32 %59 to i64
  %61 = getelementptr inbounds i32, ptr %58, i64 %60
  %62 = load i32, ptr %61, align 4, !tbaa !11
  %63 = load i32, ptr %7, align 4, !tbaa !11
  %64 = icmp ule i32 %62, %63
  br i1 %64, label %65, label %66

65:                                               ; preds = %57
  br label %67

66:                                               ; preds = %57
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 47, ptr noundef @__PRETTY_FUNCTION__.ZopfliLengthsToSymbols) #7
  unreachable

67:                                               ; preds = %65
  %68 = load ptr, ptr %9, align 8, !tbaa !5
  %69 = load ptr, ptr %5, align 8, !tbaa !5
  %70 = load i32, ptr %12, align 4, !tbaa !11
  %71 = zext i32 %70 to i64
  %72 = getelementptr inbounds i32, ptr %69, i64 %71
  %73 = load i32, ptr %72, align 4, !tbaa !11
  %74 = zext i32 %73 to i64
  %75 = getelementptr inbounds i64, ptr %68, i64 %74
  %76 = load i64, ptr %75, align 8, !tbaa !9
  %77 = add i64 %76, 1
  store i64 %77, ptr %75, align 8, !tbaa !9
  br label %78

78:                                               ; preds = %67
  %79 = load i32, ptr %12, align 4, !tbaa !11
  %80 = add i32 %79, 1
  store i32 %80, ptr %12, align 4, !tbaa !11
  br label %52, !llvm.loop !16

81:                                               ; preds = %52
  store i32 0, ptr %13, align 4, !tbaa !11
  %82 = load ptr, ptr %9, align 8, !tbaa !5
  %83 = getelementptr inbounds i64, ptr %82, i64 0
  store i64 0, ptr %83, align 8, !tbaa !9
  store i32 1, ptr %11, align 4, !tbaa !11
  br label %84

84:                                               ; preds = %106, %81
  %85 = load i32, ptr %11, align 4, !tbaa !11
  %86 = load i32, ptr %7, align 4, !tbaa !11
  %87 = icmp ule i32 %85, %86
  br i1 %87, label %88, label %109

88:                                               ; preds = %84
  %89 = load i32, ptr %13, align 4, !tbaa !11
  %90 = zext i32 %89 to i64
  %91 = load ptr, ptr %9, align 8, !tbaa !5
  %92 = load i32, ptr %11, align 4, !tbaa !11
  %93 = sub i32 %92, 1
  %94 = zext i32 %93 to i64
  %95 = getelementptr inbounds i64, ptr %91, i64 %94
  %96 = load i64, ptr %95, align 8, !tbaa !9
  %97 = add i64 %90, %96
  %98 = shl i64 %97, 1
  %99 = trunc i64 %98 to i32
  store i32 %99, ptr %13, align 4, !tbaa !11
  %100 = load i32, ptr %13, align 4, !tbaa !11
  %101 = zext i32 %100 to i64
  %102 = load ptr, ptr %10, align 8, !tbaa !5
  %103 = load i32, ptr %11, align 4, !tbaa !11
  %104 = zext i32 %103 to i64
  %105 = getelementptr inbounds i64, ptr %102, i64 %104
  store i64 %101, ptr %105, align 8, !tbaa !9
  br label %106

106:                                              ; preds = %88
  %107 = load i32, ptr %11, align 4, !tbaa !11
  %108 = add i32 %107, 1
  store i32 %108, ptr %11, align 4, !tbaa !11
  br label %84, !llvm.loop !17

109:                                              ; preds = %84
  store i32 0, ptr %12, align 4, !tbaa !11
  br label %110

110:                                              ; preds = %141, %109
  %111 = load i32, ptr %12, align 4, !tbaa !11
  %112 = zext i32 %111 to i64
  %113 = load i64, ptr %6, align 8, !tbaa !9
  %114 = icmp ult i64 %112, %113
  br i1 %114, label %115, label %144

115:                                              ; preds = %110
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  %116 = load ptr, ptr %5, align 8, !tbaa !5
  %117 = load i32, ptr %12, align 4, !tbaa !11
  %118 = zext i32 %117 to i64
  %119 = getelementptr inbounds i32, ptr %116, i64 %118
  %120 = load i32, ptr %119, align 4, !tbaa !11
  store i32 %120, ptr %14, align 4, !tbaa !11
  %121 = load i32, ptr %14, align 4, !tbaa !11
  %122 = icmp ne i32 %121, 0
  br i1 %122, label %123, label %140

123:                                              ; preds = %115
  %124 = load ptr, ptr %10, align 8, !tbaa !5
  %125 = load i32, ptr %14, align 4, !tbaa !11
  %126 = zext i32 %125 to i64
  %127 = getelementptr inbounds i64, ptr %124, i64 %126
  %128 = load i64, ptr %127, align 8, !tbaa !9
  %129 = trunc i64 %128 to i32
  %130 = load ptr, ptr %8, align 8, !tbaa !5
  %131 = load i32, ptr %12, align 4, !tbaa !11
  %132 = zext i32 %131 to i64
  %133 = getelementptr inbounds i32, ptr %130, i64 %132
  store i32 %129, ptr %133, align 4, !tbaa !11
  %134 = load ptr, ptr %10, align 8, !tbaa !5
  %135 = load i32, ptr %14, align 4, !tbaa !11
  %136 = zext i32 %135 to i64
  %137 = getelementptr inbounds i64, ptr %134, i64 %136
  %138 = load i64, ptr %137, align 8, !tbaa !9
  %139 = add i64 %138, 1
  store i64 %139, ptr %137, align 8, !tbaa !9
  br label %140

140:                                              ; preds = %123, %115
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  br label %141

141:                                              ; preds = %140
  %142 = load i32, ptr %12, align 4, !tbaa !11
  %143 = add i32 %142, 1
  store i32 %143, ptr %12, align 4, !tbaa !11
  br label %110, !llvm.loop !18

144:                                              ; preds = %110
  %145 = load ptr, ptr %9, align 8, !tbaa !5
  call void @free(ptr noundef %145) #5
  %146 = load ptr, ptr %10, align 8, !tbaa !5
  call void @free(ptr noundef %146) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  ret void
}

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

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #3

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

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

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 = { 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 #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 "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 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}
!17 = distinct !{!17, !14}
!18 = distinct !{!18, !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 [66 x i8], align 1
@__PRETTY_FUNCTION__.ZopfliLengthsToSymbols = external hidden unnamed_addr constant [88 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @ZopfliLengthsToSymbols(ptr nocapture noundef readonly %0, i64 noundef %1, i32 noundef %2, ptr nocapture noundef writeonly %3) local_unnamed_addr #0 {
  %5 = add i32 %2, 1
  %6 = zext i32 %5 to i64
  %7 = shl nuw nsw i64 %6, 3
  %8 = tail call noalias ptr @malloc(i64 noundef %7) #6
  %9 = tail call noalias ptr @malloc(i64 noundef %7) #6
  %.not71 = icmp eq i64 %1, 0
  br i1 %.not71, label %.preheader58.thread, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %4
  %min.iters.check = icmp ult i64 %1, 20
  br i1 %min.iters.check, label %.lr.ph.preheader79, label %vector.scevcheck

.lr.ph.preheader79:                               ; preds = %middle.block, %vector.scevcheck, %.lr.ph.preheader
  %.ph = phi i64 [ 0, %vector.scevcheck ], [ 0, %.lr.ph.preheader ], [ %n.vec, %middle.block ]
  %.04559.ph = phi i32 [ 0, %vector.scevcheck ], [ 0, %.lr.ph.preheader ], [ %ind.end, %middle.block ]
  br label %.lr.ph

vector.scevcheck:                                 ; preds = %.lr.ph.preheader
  %10 = add i64 %1, -1
  %11 = and i64 %10, 4294967295
  %12 = icmp eq i64 %11, 4294967295
  %13 = icmp ugt i64 %10, 4294967295
  %14 = or i1 %12, %13
  br i1 %14, label %.lr.ph.preheader79, label %vector.ph

vector.ph:                                        ; preds = %vector.scevcheck
  %n.vec = and i64 %1, 8589934584
  %ind.end = trunc i64 %n.vec to i32
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %15 = getelementptr inbounds i32, ptr %3, i64 %index
  %16 = getelementptr inbounds i8, ptr %15, i64 16
  store <4 x i32> zeroinitializer, ptr %15, align 4, !tbaa !5
  store <4 x i32> zeroinitializer, ptr %16, align 4, !tbaa !5
  %index.next = add nuw i64 %index, 8
  %17 = icmp eq i64 %index.next, %n.vec
  br i1 %17, label %middle.block, label %vector.body, !llvm.loop !9

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %1
  br i1 %cmp.n, label %.lr.ph62.preheader, label %.lr.ph.preheader79

.preheader58.thread:                              ; preds = %4
  %umax77 = tail call i64 @llvm.umax.i64(i64 %6, i64 1)
  %18 = shl nuw nsw i64 %umax77, 3
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %8, i8 0, i64 %18, i1 false), !tbaa !13
  br label %._crit_edge

.lr.ph:                                           ; preds = %.lr.ph.preheader79, %.lr.ph
  %19 = phi i64 [ %22, %.lr.ph ], [ %.ph, %.lr.ph.preheader79 ]
  %.04559 = phi i32 [ %21, %.lr.ph ], [ %.04559.ph, %.lr.ph.preheader79 ]
  %20 = getelementptr inbounds i32, ptr %3, i64 %19
  store i32 0, ptr %20, align 4, !tbaa !5
  %21 = add i32 %.04559, 1
  %22 = zext i32 %21 to i64
  %23 = icmp ult i64 %22, %1
  br i1 %23, label %.lr.ph, label %.lr.ph62.preheader, !llvm.loop !15

.lr.ph62.preheader:                               ; preds = %.lr.ph, %middle.block
  %umax = tail call i64 @llvm.umax.i64(i64 %6, i64 1)
  %24 = shl nuw nsw i64 %umax, 3
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %8, i8 0, i64 %24, i1 false), !tbaa !13
  br label %.lr.ph62

.lr.ph62:                                         ; preds = %.lr.ph62.preheader, %29
  %25 = phi i64 [ %35, %29 ], [ 0, %.lr.ph62.preheader ]
  %.14661 = phi i32 [ %34, %29 ], [ 0, %.lr.ph62.preheader ]
  %26 = getelementptr inbounds i32, ptr %0, i64 %25
  %27 = load i32, ptr %26, align 4, !tbaa !5
  %.not56 = icmp ugt i32 %27, %2
  br i1 %.not56, label %28, label %29

28:                                               ; preds = %.lr.ph62
  tail call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 47, ptr noundef nonnull @__PRETTY_FUNCTION__.ZopfliLengthsToSymbols) #7
  unreachable

29:                                               ; preds = %.lr.ph62
  %30 = zext i32 %27 to i64
  %31 = getelementptr inbounds i64, ptr %8, i64 %30
  %32 = load i64, ptr %31, align 8, !tbaa !13
  %33 = add i64 %32, 1
  store i64 %33, ptr %31, align 8, !tbaa !13
  %34 = add i32 %.14661, 1
  %35 = zext i32 %34 to i64
  %36 = icmp ult i64 %35, %1
  br i1 %36, label %.lr.ph62, label %._crit_edge, !llvm.loop !16

._crit_edge:                                      ; preds = %29, %.preheader58.thread
  store i64 0, ptr %8, align 8, !tbaa !13
  %.not5463 = icmp eq i32 %2, 0
  br i1 %.not5463, label %.preheader, label %.lr.ph67.preheader

.lr.ph67.preheader:                               ; preds = %._crit_edge
  %umax76 = tail call i32 @llvm.umax.i32(i32 %5, i32 2)
  %wide.trip.count = zext i32 %umax76 to i64
  %invariant.gep = getelementptr i8, ptr %8, i64 -8
  %37 = add nsw i64 %wide.trip.count, -1
  %xtraiter = and i64 %37, 1
  %38 = icmp ult i32 %5, 3
  br i1 %38, label %.preheader.loopexit.unr-lcssa, label %.lr.ph67.preheader.new

.lr.ph67.preheader.new:                           ; preds = %.lr.ph67.preheader
  %unroll_iter = and i64 %37, -2
  %invariant.gep80 = getelementptr inbounds i8, ptr %9, i64 8
  br label %.lr.ph67

.preheader.loopexit.unr-lcssa.loopexit:           ; preds = %.lr.ph67
  %39 = and i64 %54, 4294967294
  br label %.preheader.loopexit.unr-lcssa

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

.lr.ph67.epil:                                    ; preds = %.preheader.loopexit.unr-lcssa
  %gep.epil = getelementptr i64, ptr %invariant.gep, i64 %indvars.iv.unr
  %40 = load i64, ptr %gep.epil, align 8, !tbaa !13
  %41 = add i64 %40, %.04464.unr
  %42 = shl i64 %41, 1
  %43 = and i64 %42, 4294967294
  %44 = getelementptr inbounds i64, ptr %9, i64 %indvars.iv.unr
  store i64 %43, ptr %44, align 8, !tbaa !13
  br label %.preheader

.preheader:                                       ; preds = %.lr.ph67.epil, %.preheader.loopexit.unr-lcssa, %._crit_edge
  br i1 %.not71, label %._crit_edge70, label %.lr.ph69

.lr.ph67:                                         ; preds = %.lr.ph67, %.lr.ph67.preheader.new
  %indvars.iv = phi i64 [ 1, %.lr.ph67.preheader.new ], [ %indvars.iv.next.1, %.lr.ph67 ]
  %.04464 = phi i64 [ 0, %.lr.ph67.preheader.new ], [ %54, %.lr.ph67 ]
  %niter = phi i64 [ 0, %.lr.ph67.preheader.new ], [ %niter.next.1, %.lr.ph67 ]
  %45 = and i64 %.04464, 4294967294
  %gep = getelementptr i64, ptr %invariant.gep, i64 %indvars.iv
  %46 = load i64, ptr %gep, align 8, !tbaa !13
  %47 = add i64 %46, %45
  %48 = shl i64 %47, 1
  %49 = and i64 %48, 4294967294
  %50 = getelementptr inbounds i64, ptr %9, i64 %indvars.iv
  store i64 %49, ptr %50, align 8, !tbaa !13
  %51 = and i64 %48, 4294967294
  %gep.1 = getelementptr i64, ptr %8, i64 %indvars.iv
  %52 = load i64, ptr %gep.1, align 8, !tbaa !13
  %53 = add i64 %52, %51
  %54 = shl i64 %53, 1
  %55 = and i64 %54, 4294967294
  %gep81 = getelementptr inbounds i64, ptr %invariant.gep80, i64 %indvars.iv
  store i64 %55, ptr %gep81, align 8, !tbaa !13
  %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 %.preheader.loopexit.unr-lcssa.loopexit, label %.lr.ph67, !llvm.loop !17

.lr.ph69:                                         ; preds = %.preheader, %66
  %56 = phi i64 [ %68, %66 ], [ 0, %.preheader ]
  %.268 = phi i32 [ %67, %66 ], [ 0, %.preheader ]
  %57 = getelementptr inbounds i32, ptr %0, i64 %56
  %58 = load i32, ptr %57, align 4, !tbaa !5
  %.not55 = icmp eq i32 %58, 0
  br i1 %.not55, label %66, label %59

59:                                               ; preds = %.lr.ph69
  %60 = zext i32 %58 to i64
  %61 = getelementptr inbounds i64, ptr %9, i64 %60
  %62 = load i64, ptr %61, align 8, !tbaa !13
  %63 = trunc i64 %62 to i32
  %64 = getelementptr inbounds i32, ptr %3, i64 %56
  store i32 %63, ptr %64, align 4, !tbaa !5
  %65 = add i64 %62, 1
  store i64 %65, ptr %61, align 8, !tbaa !13
  br label %66

66:                                               ; preds = %59, %.lr.ph69
  %67 = add i32 %.268, 1
  %68 = zext i32 %67 to i64
  %69 = icmp ult i64 %68, %1
  br i1 %69, label %.lr.ph69, label %._crit_edge70, !llvm.loop !18

._crit_edge70:                                    ; preds = %66, %.preheader
  tail call void @free(ptr noundef %8) #8
  tail call void @free(ptr noundef %9) #8
  ret void
}

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr 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: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.umax.i64(i64, i64) #4

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.umax.i32(i32, i32) #4

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 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 #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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { nounwind allocsize(0) }
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, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10, !11, !12}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!"llvm.loop.isvectorized", i32 1}
!12 = !{!"llvm.loop.unroll.runtime.disable"}
!13 = !{!14, !14, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = distinct !{!15, !10, !11}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}


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