; LLVM IR from AlgoGenesis/C :: String Algorithms/Commentz-Walter Algorithm (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"

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

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

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #1

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

16:                                               ; preds = %35, %3
  %17 = load i32, ptr %8, align 4, !tbaa !9
  %18 = load i32, ptr %5, align 4, !tbaa !9
  %19 = icmp slt i32 %17, %18
  br i1 %19, label %21, label %20

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

21:                                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  %22 = load ptr, ptr %4, align 8, !tbaa !5
  %23 = load i32, ptr %8, align 4, !tbaa !9
  %24 = sext i32 %23 to i64
  %25 = getelementptr inbounds ptr, ptr %22, i64 %24
  %26 = load ptr, ptr %25, align 8, !tbaa !5
  %27 = call i64 @strlen(ptr noundef %26) #4
  %28 = trunc i64 %27 to i32
  store i32 %28, ptr %9, align 4, !tbaa !9
  %29 = load i32, ptr %9, align 4, !tbaa !9
  %30 = load i32, ptr %7, align 4, !tbaa !9
  %31 = icmp sgt i32 %29, %30
  br i1 %31, label %32, label %34

32:                                               ; preds = %21
  %33 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %33, ptr %7, align 4, !tbaa !9
  br label %34

34:                                               ; preds = %32, %21
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  br label %35

35:                                               ; preds = %34
  %36 = load i32, ptr %8, align 4, !tbaa !9
  %37 = add nsw i32 %36, 1
  store i32 %37, ptr %8, align 4, !tbaa !9
  br label %16, !llvm.loop !11

38:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %39

39:                                               ; preds = %49, %38
  %40 = load i32, ptr %10, align 4, !tbaa !9
  %41 = icmp slt i32 %40, 256
  br i1 %41, label %43, label %42

42:                                               ; preds = %39
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  br label %52

43:                                               ; preds = %39
  %44 = load i32, ptr %7, align 4, !tbaa !9
  %45 = load ptr, ptr %6, align 8, !tbaa !5
  %46 = load i32, ptr %10, align 4, !tbaa !9
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds i32, ptr %45, i64 %47
  store i32 %44, ptr %48, align 4, !tbaa !9
  br label %49

49:                                               ; preds = %43
  %50 = load i32, ptr %10, align 4, !tbaa !9
  %51 = add nsw i32 %50, 1
  store i32 %51, ptr %10, align 4, !tbaa !9
  br label %39, !llvm.loop !13

52:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #3
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %53

53:                                               ; preds = %114, %52
  %54 = load i32, ptr %11, align 4, !tbaa !9
  %55 = load i32, ptr %5, align 4, !tbaa !9
  %56 = icmp slt i32 %54, %55
  br i1 %56, label %58, label %57

57:                                               ; preds = %53
  store i32 8, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #3
  br label %117

58:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #3
  %59 = load ptr, ptr %4, align 8, !tbaa !5
  %60 = load i32, ptr %11, align 4, !tbaa !9
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds ptr, ptr %59, i64 %61
  %63 = load ptr, ptr %62, align 8, !tbaa !5
  %64 = call i64 @strlen(ptr noundef %63) #4
  %65 = trunc i64 %64 to i32
  store i32 %65, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #3
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %66

66:                                               ; preds = %110, %58
  %67 = load i32, ptr %14, align 4, !tbaa !9
  %68 = load i32, ptr %13, align 4, !tbaa !9
  %69 = sub nsw i32 %68, 1
  %70 = icmp slt i32 %67, %69
  br i1 %70, label %72, label %71

71:                                               ; preds = %66
  store i32 11, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #3
  br label %113

72:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #3
  %73 = load ptr, ptr %4, align 8, !tbaa !5
  %74 = load i32, ptr %11, align 4, !tbaa !9
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds ptr, ptr %73, i64 %75
  %77 = load ptr, ptr %76, align 8, !tbaa !5
  %78 = load i32, ptr %14, align 4, !tbaa !9
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds i8, ptr %77, i64 %79
  %81 = load i8, ptr %80, align 1, !tbaa !14
  %82 = zext i8 %81 to i32
  store i32 %82, ptr %15, align 4, !tbaa !9
  %83 = load i32, ptr %13, align 4, !tbaa !9
  %84 = sub nsw i32 %83, 1
  %85 = load i32, ptr %14, align 4, !tbaa !9
  %86 = sub nsw i32 %84, %85
  %87 = load ptr, ptr %6, align 8, !tbaa !5
  %88 = load i32, ptr %15, align 4, !tbaa !9
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds i32, ptr %87, i64 %89
  %91 = load i32, ptr %90, align 4, !tbaa !9
  %92 = icmp slt i32 %86, %91
  br i1 %92, label %93, label %98

93:                                               ; preds = %72
  %94 = load i32, ptr %13, align 4, !tbaa !9
  %95 = sub nsw i32 %94, 1
  %96 = load i32, ptr %14, align 4, !tbaa !9
  %97 = sub nsw i32 %95, %96
  br label %104

98:                                               ; preds = %72
  %99 = load ptr, ptr %6, align 8, !tbaa !5
  %100 = load i32, ptr %15, align 4, !tbaa !9
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds i32, ptr %99, i64 %101
  %103 = load i32, ptr %102, align 4, !tbaa !9
  br label %104

104:                                              ; preds = %98, %93
  %105 = phi i32 [ %97, %93 ], [ %103, %98 ]
  %106 = load ptr, ptr %6, align 8, !tbaa !5
  %107 = load i32, ptr %15, align 4, !tbaa !9
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds i32, ptr %106, i64 %108
  store i32 %105, ptr %109, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #3
  br label %110

110:                                              ; preds = %104
  %111 = load i32, ptr %14, align 4, !tbaa !9
  %112 = add nsw i32 %111, 1
  store i32 %112, ptr %14, align 4, !tbaa !9
  br label %66, !llvm.loop !15

113:                                              ; preds = %71
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #3
  br label %114

114:                                              ; preds = %113
  %115 = load i32, ptr %11, align 4, !tbaa !9
  %116 = add nsw i32 %115, 1
  store i32 %116, ptr %11, align 4, !tbaa !9
  br label %53, !llvm.loop !16

117:                                              ; preds = %57
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind willreturn memory(read) "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 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 }
attributes #4 = { nounwind willreturn memory(read) }

!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 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = !{!7, !7, i64 0}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}


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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #0

; Function Attrs: nofree nounwind memory(read, argmem: readwrite, inaccessiblemem: none) uwtable
define dso_local void @computeShift(ptr nocapture noundef readonly %0, i32 noundef %1, ptr nocapture noundef %2) local_unnamed_addr #1 {
  %4 = icmp sgt i32 %1, 0
  br i1 %4, label %.lr.ph.preheader, label %vector.ph

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

vector.ph:                                        ; preds = %.lr.ph, %3
  %.0.lcssa = phi i32 [ 0, %3 ], [ %spec.select, %.lr.ph ]
  %broadcast.splatinsert = insertelement <4 x i32> poison, i32 %.0.lcssa, i64 0
  %broadcast.splat = shufflevector <4 x i32> %broadcast.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer
  %5 = getelementptr inbounds i8, ptr %2, i64 16
  store <4 x i32> %broadcast.splat, ptr %2, align 4, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %5, align 4, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %2, i64 32
  %7 = getelementptr inbounds i8, ptr %2, i64 48
  store <4 x i32> %broadcast.splat, ptr %6, align 4, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %7, align 4, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %2, i64 64
  %9 = getelementptr inbounds i8, ptr %2, i64 80
  store <4 x i32> %broadcast.splat, ptr %8, align 4, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %9, align 4, !tbaa !5
  %10 = getelementptr inbounds i8, ptr %2, i64 96
  %11 = getelementptr inbounds i8, ptr %2, i64 112
  store <4 x i32> %broadcast.splat, ptr %10, align 4, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %11, align 4, !tbaa !5
  %12 = getelementptr inbounds i8, ptr %2, i64 128
  %13 = getelementptr inbounds i8, ptr %2, i64 144
  store <4 x i32> %broadcast.splat, ptr %12, align 4, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %13, align 4, !tbaa !5
  %14 = getelementptr inbounds i8, ptr %2, i64 160
  %15 = getelementptr inbounds i8, ptr %2, i64 176
  store <4 x i32> %broadcast.splat, ptr %14, align 4, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %15, align 4, !tbaa !5
  %16 = getelementptr inbounds i8, ptr %2, i64 192
  %17 = getelementptr inbounds i8, ptr %2, i64 208
  store <4 x i32> %broadcast.splat, ptr %16, align 4, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %17, align 4, !tbaa !5
  %18 = getelementptr inbounds i8, ptr %2, i64 224
  %19 = getelementptr inbounds i8, ptr %2, i64 240
  store <4 x i32> %broadcast.splat, ptr %18, align 4, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %19, align 4, !tbaa !5
  %20 = getelementptr inbounds i8, ptr %2, i64 256
  %21 = getelementptr inbounds i8, ptr %2, i64 272
  store <4 x i32> %broadcast.splat, ptr %20, align 4, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %21, align 4, !tbaa !5
  %22 = getelementptr inbounds i8, ptr %2, i64 288
  %23 = getelementptr inbounds i8, ptr %2, i64 304
  store <4 x i32> %broadcast.splat, ptr %22, align 4, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %23, align 4, !tbaa !5
  %24 = getelementptr inbounds i8, ptr %2, i64 320
  %25 = getelementptr inbounds i8, ptr %2, i64 336
  store <4 x i32> %broadcast.splat, ptr %24, align 4, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %25, align 4, !tbaa !5
  %26 = getelementptr inbounds i8, ptr %2, i64 352
  %27 = getelementptr inbounds i8, ptr %2, i64 368
  store <4 x i32> %broadcast.splat, ptr %26, align 4, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %27, align 4, !tbaa !5
  %28 = getelementptr inbounds i8, ptr %2, i64 384
  %29 = getelementptr inbounds i8, ptr %2, i64 400
  store <4 x i32> %broadcast.splat, ptr %28, align 4, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %29, align 4, !tbaa !5
  %30 = getelementptr inbounds i8, ptr %2, i64 416
  %31 = getelementptr inbounds i8, ptr %2, i64 432
  store <4 x i32> %broadcast.splat, ptr %30, align 4, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %31, align 4, !tbaa !5
  %32 = getelementptr inbounds i8, ptr %2, i64 448
  %33 = getelementptr inbounds i8, ptr %2, i64 464
  store <4 x i32> %broadcast.splat, ptr %32, align 4, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %33, align 4, !tbaa !5
  %34 = getelementptr inbounds i8, ptr %2, i64 480
  %35 = getelementptr inbounds i8, ptr %2, i64 496
  store <4 x i32> %broadcast.splat, ptr %34, align 4, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %35, align 4, !tbaa !5
  %36 = getelementptr inbounds i8, ptr %2, i64 512
  %37 = getelementptr inbounds i8, ptr %2, i64 528
  store <4 x i32> %broadcast.splat, ptr %36, align 4, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %37, align 4, !tbaa !5
  %38 = getelementptr inbounds i8, ptr %2, i64 544
  %39 = getelementptr inbounds i8, ptr %2, i64 560
  store <4 x i32> %broadcast.splat, ptr %38, align 4, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %39, align 4, !tbaa !5
  %40 = getelementptr inbounds i8, ptr %2, i64 576
  %41 = getelementptr inbounds i8, ptr %2, i64 592
  store <4 x i32> %broadcast.splat, ptr %40, align 4, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %41, align 4, !tbaa !5
  %42 = getelementptr inbounds i8, ptr %2, i64 608
  %43 = getelementptr inbounds i8, ptr %2, i64 624
  store <4 x i32> %broadcast.splat, ptr %42, align 4, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %43, align 4, !tbaa !5
  %44 = getelementptr inbounds i8, ptr %2, i64 640
  %45 = getelementptr inbounds i8, ptr %2, i64 656
  store <4 x i32> %broadcast.splat, ptr %44, align 4, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %45, align 4, !tbaa !5
  %46 = getelementptr inbounds i8, ptr %2, i64 672
  %47 = getelementptr inbounds i8, ptr %2, i64 688
  store <4 x i32> %broadcast.splat, ptr %46, align 4, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %47, align 4, !tbaa !5
  %48 = getelementptr inbounds i8, ptr %2, i64 704
  %49 = getelementptr inbounds i8, ptr %2, i64 720
  store <4 x i32> %broadcast.splat, ptr %48, align 4, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %49, align 4, !tbaa !5
  %50 = getelementptr inbounds i8, ptr %2, i64 736
  %51 = getelementptr inbounds i8, ptr %2, i64 752
  store <4 x i32> %broadcast.splat, ptr %50, align 4, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %51, align 4, !tbaa !5
  %52 = getelementptr inbounds i8, ptr %2, i64 768
  %53 = getelementptr inbounds i8, ptr %2, i64 784
  store <4 x i32> %broadcast.splat, ptr %52, align 4, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %53, align 4, !tbaa !5
  %54 = getelementptr inbounds i8, ptr %2, i64 800
  %55 = getelementptr inbounds i8, ptr %2, i64 816
  store <4 x i32> %broadcast.splat, ptr %54, align 4, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %55, align 4, !tbaa !5
  %56 = getelementptr inbounds i8, ptr %2, i64 832
  %57 = getelementptr inbounds i8, ptr %2, i64 848
  store <4 x i32> %broadcast.splat, ptr %56, align 4, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %57, align 4, !tbaa !5
  %58 = getelementptr inbounds i8, ptr %2, i64 864
  %59 = getelementptr inbounds i8, ptr %2, i64 880
  store <4 x i32> %broadcast.splat, ptr %58, align 4, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %59, align 4, !tbaa !5
  %60 = getelementptr inbounds i8, ptr %2, i64 896
  %61 = getelementptr inbounds i8, ptr %2, i64 912
  store <4 x i32> %broadcast.splat, ptr %60, align 4, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %61, align 4, !tbaa !5
  %62 = getelementptr inbounds i8, ptr %2, i64 928
  %63 = getelementptr inbounds i8, ptr %2, i64 944
  store <4 x i32> %broadcast.splat, ptr %62, align 4, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %63, align 4, !tbaa !5
  %64 = getelementptr inbounds i8, ptr %2, i64 960
  %65 = getelementptr inbounds i8, ptr %2, i64 976
  store <4 x i32> %broadcast.splat, ptr %64, align 4, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %65, align 4, !tbaa !5
  %66 = getelementptr inbounds i8, ptr %2, i64 992
  %67 = getelementptr inbounds i8, ptr %2, i64 1008
  store <4 x i32> %broadcast.splat, ptr %66, align 4, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %67, align 4, !tbaa !5
  br i1 %4, label %.lr.ph49.preheader, label %._crit_edge50

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  %.044 = phi i32 [ 0, %.lr.ph.preheader ], [ %spec.select, %.lr.ph ]
  %68 = getelementptr inbounds ptr, ptr %0, i64 %indvars.iv
  %69 = load ptr, ptr %68, align 8, !tbaa !9
  %70 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %69) #3
  %71 = trunc i64 %70 to i32
  %spec.select = tail call i32 @llvm.smax.i32(i32 %.044, i32 %71)
  %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 %vector.ph, label %.lr.ph, !llvm.loop !11

.lr.ph49.preheader:                               ; preds = %vector.ph
  %wide.trip.count64 = zext nneg i32 %1 to i64
  br label %.lr.ph49

._crit_edge50:                                    ; preds = %._crit_edge, %vector.ph
  ret void

.lr.ph49:                                         ; preds = %.lr.ph49.preheader, %._crit_edge
  %indvars.iv61 = phi i64 [ 0, %.lr.ph49.preheader ], [ %indvars.iv.next62, %._crit_edge ]
  %72 = getelementptr inbounds ptr, ptr %0, i64 %indvars.iv61
  %73 = load ptr, ptr %72, align 8, !tbaa !9
  %74 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %73) #3
  %75 = trunc i64 %74 to i32
  %76 = icmp sgt i32 %75, 1
  br i1 %76, label %.lr.ph47.preheader, label %._crit_edge

.lr.ph47.preheader:                               ; preds = %.lr.ph49
  %77 = add nsw i32 %75, -1
  %wide.trip.count59 = zext nneg i32 %77 to i64
  %xtraiter = and i64 %wide.trip.count59, 1
  %78 = icmp eq i32 %77, 1
  br i1 %78, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph47.preheader.new

.lr.ph47.preheader.new:                           ; preds = %.lr.ph47.preheader
  %unroll_iter = and i64 %wide.trip.count59, 2147483646
  br label %.lr.ph47

._crit_edge.loopexit.unr-lcssa:                   ; preds = %.lr.ph47, %.lr.ph47.preheader
  %indvars.iv56.unr = phi i64 [ 0, %.lr.ph47.preheader ], [ %indvars.iv.next57.1, %.lr.ph47 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %.lr.ph47.epil

.lr.ph47.epil:                                    ; preds = %._crit_edge.loopexit.unr-lcssa
  %79 = getelementptr inbounds i8, ptr %73, i64 %indvars.iv56.unr
  %80 = load i8, ptr %79, align 1, !tbaa !13
  %81 = zext i8 %80 to i64
  %82 = getelementptr inbounds i32, ptr %2, i64 %81
  %83 = load i32, ptr %82, align 4, !tbaa !5
  %84 = trunc i64 %indvars.iv56.unr to i32
  %85 = sub i32 %77, %84
  %..epil = tail call i32 @llvm.smin.i32(i32 %85, i32 %83)
  store i32 %..epil, ptr %82, align 4, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph47.epil, %._crit_edge.loopexit.unr-lcssa, %.lr.ph49
  %indvars.iv.next62 = add nuw nsw i64 %indvars.iv61, 1
  %exitcond65.not = icmp eq i64 %indvars.iv.next62, %wide.trip.count64
  br i1 %exitcond65.not, label %._crit_edge50, label %.lr.ph49, !llvm.loop !14

.lr.ph47:                                         ; preds = %.lr.ph47, %.lr.ph47.preheader.new
  %indvars.iv56 = phi i64 [ 0, %.lr.ph47.preheader.new ], [ %indvars.iv.next57.1, %.lr.ph47 ]
  %niter = phi i64 [ 0, %.lr.ph47.preheader.new ], [ %niter.next.1, %.lr.ph47 ]
  %86 = getelementptr inbounds i8, ptr %73, i64 %indvars.iv56
  %87 = load i8, ptr %86, align 1, !tbaa !13
  %88 = zext i8 %87 to i64
  %89 = getelementptr inbounds i32, ptr %2, i64 %88
  %90 = load i32, ptr %89, align 4, !tbaa !5
  %91 = trunc i64 %indvars.iv56 to i32
  %92 = sub i32 %77, %91
  %. = tail call i32 @llvm.smin.i32(i32 %92, i32 %90)
  store i32 %., ptr %89, align 4, !tbaa !5
  %indvars.iv.next57 = or disjoint i64 %indvars.iv56, 1
  %93 = getelementptr inbounds i8, ptr %73, i64 %indvars.iv.next57
  %94 = load i8, ptr %93, align 1, !tbaa !13
  %95 = zext i8 %94 to i64
  %96 = getelementptr inbounds i32, ptr %2, i64 %95
  %97 = load i32, ptr %96, align 4, !tbaa !5
  %98 = trunc i64 %indvars.iv.next57 to i32
  %99 = sub i32 %77, %98
  %..1 = tail call i32 @llvm.smin.i32(i32 %99, i32 %97)
  store i32 %..1, ptr %96, align 4, !tbaa !5
  %indvars.iv.next57.1 = add nuw nsw i64 %indvars.iv56, 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 %._crit_edge.loopexit.unr-lcssa, label %.lr.ph47, !llvm.loop !15
}

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

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

attributes #0 = { mustprogress nofree nounwind willreturn memory(argmem: read) "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 memory(read, argmem: readwrite, inaccessiblemem: none) 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 #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { nounwind willreturn memory(read) }

!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 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!7, !7, i64 0}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}


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