; LLVM IR from DimitrisJim/leetcode_solutions :: C/Algorithms (1629)

; 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: nounwind uwtable
define dso_local signext i8 @slowestKey(ptr noundef %0, i32 noundef %1, ptr noundef %2) #0 {
  %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 ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i8, align 1
  %14 = alloca i32, align 4
  %15 = alloca i8, align 1
  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) #5
  %16 = load ptr, ptr %4, align 8, !tbaa !5
  %17 = getelementptr inbounds i32, ptr %16, i64 0
  %18 = load i32, ptr %17, align 4, !tbaa !9
  store i32 %18, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 5, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 0, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %19 = load i32, ptr %8, align 4, !tbaa !9
  %20 = sext i32 %19 to i64
  %21 = mul i64 %20, 4
  %22 = call noalias ptr @malloc(i64 noundef %21) #6
  store ptr %22, ptr %10, align 8, !tbaa !5
  %23 = load ptr, ptr %10, align 8, !tbaa !5
  %24 = load i32, ptr %9, align 4, !tbaa !9
  %25 = add nsw i32 %24, 1
  store i32 %25, ptr %9, align 4, !tbaa !9
  %26 = sext i32 %24 to i64
  %27 = getelementptr inbounds i32, ptr %23, i64 %26
  store i32 0, ptr %27, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store i32 1, ptr %11, align 4, !tbaa !9
  br label %28

28:                                               ; preds = %85, %3
  %29 = load i32, ptr %11, align 4, !tbaa !9
  %30 = load i32, ptr %5, align 4, !tbaa !9
  %31 = icmp slt i32 %29, %30
  br i1 %31, label %33, label %32

32:                                               ; preds = %28
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %88

33:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %34 = load ptr, ptr %4, align 8, !tbaa !5
  %35 = load i32, ptr %11, align 4, !tbaa !9
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds i32, ptr %34, i64 %36
  %38 = load i32, ptr %37, align 4, !tbaa !9
  %39 = load ptr, ptr %4, align 8, !tbaa !5
  %40 = load i32, ptr %11, align 4, !tbaa !9
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds i32, ptr %39, i64 %41
  %43 = getelementptr inbounds i32, ptr %42, i64 -1
  %44 = load i32, ptr %43, align 4, !tbaa !9
  %45 = sub nsw i32 %38, %44
  store i32 %45, ptr %12, align 4, !tbaa !9
  %46 = load i32, ptr %12, align 4, !tbaa !9
  %47 = load i32, ptr %7, align 4, !tbaa !9
  %48 = icmp sgt i32 %46, %47
  br i1 %48, label %49, label %57

49:                                               ; preds = %33
  store i32 0, ptr %9, align 4, !tbaa !9
  %50 = load i32, ptr %11, align 4, !tbaa !9
  %51 = load ptr, ptr %10, align 8, !tbaa !5
  %52 = load i32, ptr %9, align 4, !tbaa !9
  %53 = add nsw i32 %52, 1
  store i32 %53, ptr %9, align 4, !tbaa !9
  %54 = sext i32 %52 to i64
  %55 = getelementptr inbounds i32, ptr %51, i64 %54
  store i32 %50, ptr %55, align 4, !tbaa !9
  %56 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %56, ptr %7, align 4, !tbaa !9
  br label %84

57:                                               ; preds = %33
  %58 = load i32, ptr %12, align 4, !tbaa !9
  %59 = load i32, ptr %7, align 4, !tbaa !9
  %60 = icmp eq i32 %58, %59
  br i1 %60, label %61, label %83

61:                                               ; preds = %57
  %62 = load i32, ptr %9, align 4, !tbaa !9
  %63 = load i32, ptr %8, align 4, !tbaa !9
  %64 = sub nsw i32 %63, 1
  %65 = icmp eq i32 %62, %64
  br i1 %65, label %66, label %76

66:                                               ; preds = %61
  %67 = load i32, ptr %8, align 4, !tbaa !9
  %68 = sitofp i32 %67 to double
  %69 = fmul double %68, 1.500000e+00
  %70 = fptosi double %69 to i32
  store i32 %70, ptr %8, align 4, !tbaa !9
  %71 = load ptr, ptr %10, align 8, !tbaa !5
  %72 = load i32, ptr %8, align 4, !tbaa !9
  %73 = sext i32 %72 to i64
  %74 = mul i64 %73, 4
  %75 = call ptr @realloc(ptr noundef %71, i64 noundef %74) #7
  store ptr %75, ptr %10, align 8, !tbaa !5
  br label %76

76:                                               ; preds = %66, %61
  %77 = load i32, ptr %11, align 4, !tbaa !9
  %78 = load ptr, ptr %10, align 8, !tbaa !5
  %79 = load i32, ptr %9, align 4, !tbaa !9
  %80 = add nsw i32 %79, 1
  store i32 %80, ptr %9, align 4, !tbaa !9
  %81 = sext i32 %79 to i64
  %82 = getelementptr inbounds i32, ptr %78, i64 %81
  store i32 %77, ptr %82, align 4, !tbaa !9
  br label %83

83:                                               ; preds = %76, %57
  br label %84

84:                                               ; preds = %83, %49
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %85

85:                                               ; preds = %84
  %86 = load i32, ptr %11, align 4, !tbaa !9
  %87 = add nsw i32 %86, 1
  store i32 %87, ptr %11, align 4, !tbaa !9
  br label %28, !llvm.loop !11

88:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 1, ptr %13) #5
  %89 = load ptr, ptr %6, align 8, !tbaa !5
  %90 = load ptr, ptr %10, align 8, !tbaa !5
  %91 = getelementptr inbounds i32, ptr %90, i64 0
  %92 = load i32, ptr %91, align 4, !tbaa !9
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds i8, ptr %89, i64 %93
  %95 = load i8, ptr %94, align 1, !tbaa !13
  store i8 %95, ptr %13, align 1, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %96

96:                                               ; preds = %119, %88
  %97 = load i32, ptr %14, align 4, !tbaa !9
  %98 = load i32, ptr %9, align 4, !tbaa !9
  %99 = icmp slt i32 %97, %98
  br i1 %99, label %101, label %100

100:                                              ; preds = %96
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  br label %122

101:                                              ; preds = %96
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #5
  %102 = load ptr, ptr %6, align 8, !tbaa !5
  %103 = load ptr, ptr %10, align 8, !tbaa !5
  %104 = load i32, ptr %14, align 4, !tbaa !9
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds i32, ptr %103, i64 %105
  %107 = load i32, ptr %106, align 4, !tbaa !9
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds i8, ptr %102, i64 %108
  %110 = load i8, ptr %109, align 1, !tbaa !13
  store i8 %110, ptr %15, align 1, !tbaa !13
  %111 = load i8, ptr %15, align 1, !tbaa !13
  %112 = sext i8 %111 to i32
  %113 = load i8, ptr %13, align 1, !tbaa !13
  %114 = sext i8 %113 to i32
  %115 = icmp sgt i32 %112, %114
  br i1 %115, label %116, label %118

116:                                              ; preds = %101
  %117 = load i8, ptr %15, align 1, !tbaa !13
  store i8 %117, ptr %13, align 1, !tbaa !13
  br label %118

118:                                              ; preds = %116, %101
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #5
  br label %119

119:                                              ; preds = %118
  %120 = load i32, ptr %14, align 4, !tbaa !9
  %121 = add nsw i32 %120, 1
  store i32 %121, ptr %14, align 4, !tbaa !9
  br label %96, !llvm.loop !14

122:                                              ; preds = %100
  %123 = load ptr, ptr %10, align 8, !tbaa !5
  call void @free(ptr noundef %123) #5
  %124 = load i8, ptr %13, align 1, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  ret i8 %124
}

; 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: nounwind allocsize(1)
declare ptr @realloc(ptr noundef, i64 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 = { nounwind allocsize(1) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 = { nounwind allocsize(1) }

!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 = !{!7, !7, i64 0}
!14 = distinct !{!14, !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: nounwind uwtable
define dso_local signext i8 @slowestKey(ptr nocapture noundef readonly %0, i32 noundef %1, ptr nocapture noundef readonly %2) local_unnamed_addr #0 {
  %4 = load i32, ptr %0, align 4, !tbaa !5
  %5 = tail call noalias dereferenceable_or_null(20) ptr @malloc(i64 noundef 20) #5
  store i32 0, ptr %5, align 4, !tbaa !5
  %6 = icmp sgt i32 %1, 1
  br i1 %6, label %.lr.ph.preheader, label %.lr.ph61.preheader.sink.split

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

.lr.ph.outer:                                     ; preds = %.thread, %.lr.ph.preheader
  %indvars.iv.ph = phi i64 [ %indvars.iv.next78, %.thread ], [ 1, %.lr.ph.preheader ]
  %.056.ph = phi i32 [ %18, %.thread ], [ %4, %.lr.ph.preheader ]
  %.04255.ph = phi i32 [ %.04255, %.thread ], [ 5, %.lr.ph.preheader ]
  %.04553.ph = phi ptr [ %.04553, %.thread ], [ %5, %.lr.ph.preheader ]
  br label %.lr.ph

._crit_edge:                                      ; preds = %37
  %.pre = load i32, ptr %.247, align 4, !tbaa !5
  %7 = sext i32 %.pre to i64
  %8 = getelementptr inbounds i8, ptr %2, i64 %7
  %9 = load i8, ptr %8, align 1, !tbaa !9
  %10 = icmp sgt i32 %.149, 0
  br i1 %10, label %.lr.ph61.preheader, label %._crit_edge62

.lr.ph61.preheader.sink.split:                    ; preds = %3, %._crit_edge.thread82
  %.sink = phi ptr [ %40, %._crit_edge.thread82 ], [ %2, %3 ]
  %.045.lcssa73.ph = phi ptr [ %.04553, %._crit_edge.thread82 ], [ %5, %3 ]
  %11 = load i8, ptr %.sink, align 1, !tbaa !9
  br label %.lr.ph61.preheader

.lr.ph61.preheader:                               ; preds = %.lr.ph61.preheader.sink.split, %._crit_edge
  %12 = phi i8 [ %9, %._crit_edge ], [ %11, %.lr.ph61.preheader.sink.split ]
  %.045.lcssa73 = phi ptr [ %.247, %._crit_edge ], [ %.045.lcssa73.ph, %.lr.ph61.preheader.sink.split ]
  %.048.lcssa71 = phi i32 [ %.149, %._crit_edge ], [ 1, %.lr.ph61.preheader.sink.split ]
  %wide.trip.count67 = zext nneg i32 %.048.lcssa71 to i64
  %xtraiter = and i64 %wide.trip.count67, 3
  %13 = icmp ult i32 %.048.lcssa71, 4
  br i1 %13, label %._crit_edge62.loopexit.unr-lcssa, label %.lr.ph61.preheader.new

.lr.ph61.preheader.new:                           ; preds = %.lr.ph61.preheader
  %unroll_iter = and i64 %wide.trip.count67, 2147483644
  br label %.lr.ph61

.lr.ph:                                           ; preds = %.lr.ph.outer, %37
  %indvars.iv = phi i64 [ %indvars.iv.next, %37 ], [ %indvars.iv.ph, %.lr.ph.outer ]
  %.04255 = phi i32 [ %.2, %37 ], [ %.04255.ph, %.lr.ph.outer ]
  %.04553 = phi ptr [ %.247, %37 ], [ %.04553.ph, %.lr.ph.outer ]
  %.04852 = phi i32 [ %.149, %37 ], [ 1, %.lr.ph.outer ]
  %14 = getelementptr inbounds i32, ptr %0, i64 %indvars.iv
  %15 = load i32, ptr %14, align 4, !tbaa !5
  %16 = getelementptr inbounds i8, ptr %14, i64 -4
  %17 = load i32, ptr %16, align 4, !tbaa !5
  %18 = sub nsw i32 %15, %17
  %19 = icmp sgt i32 %18, %.056.ph
  br i1 %19, label %.thread, label %20

20:                                               ; preds = %.lr.ph
  %21 = icmp eq i32 %18, %.056.ph
  br i1 %21, label %22, label %37

22:                                               ; preds = %20
  %23 = add nsw i32 %.04255, -1
  %24 = icmp eq i32 %.04852, %23
  br i1 %24, label %25, label %32

25:                                               ; preds = %22
  %26 = sitofp i32 %.04255 to double
  %27 = fmul double %26, 1.500000e+00
  %28 = fptosi double %27 to i32
  %29 = sext i32 %28 to i64
  %30 = shl nsw i64 %29, 2
  %31 = tail call ptr @realloc(ptr noundef %.04553, i64 noundef %30) #6
  br label %32

32:                                               ; preds = %25, %22
  %.146 = phi ptr [ %31, %25 ], [ %.04553, %22 ]
  %.143 = phi i32 [ %28, %25 ], [ %.04255, %22 ]
  %33 = add nsw i32 %.04852, 1
  %34 = sext i32 %.04852 to i64
  %35 = getelementptr inbounds i32, ptr %.146, i64 %34
  %36 = trunc nuw nsw i64 %indvars.iv to i32
  store i32 %36, ptr %35, align 4, !tbaa !5
  br label %37

37:                                               ; preds = %20, %32
  %.149 = phi i32 [ %33, %32 ], [ %.04852, %20 ]
  %.247 = phi ptr [ %.146, %32 ], [ %.04553, %20 ]
  %.2 = phi i32 [ %.143, %32 ], [ %.04255, %20 ]
  %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 %._crit_edge, label %.lr.ph, !llvm.loop !10

.thread:                                          ; preds = %.lr.ph
  %38 = trunc nuw nsw i64 %indvars.iv to i32
  store i32 %38, ptr %.04553, align 4, !tbaa !5
  %indvars.iv.next78 = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not79 = icmp eq i64 %indvars.iv.next78, %wide.trip.count
  br i1 %exitcond.not79, label %._crit_edge.thread82, label %.lr.ph.outer, !llvm.loop !10

._crit_edge.thread82:                             ; preds = %.thread
  %.pre85 = load i32, ptr %.04553, align 4, !tbaa !5
  %39 = sext i32 %.pre85 to i64
  %40 = getelementptr inbounds i8, ptr %2, i64 %39
  br label %.lr.ph61.preheader.sink.split

._crit_edge62.loopexit.unr-lcssa:                 ; preds = %.lr.ph61, %.lr.ph61.preheader
  %spec.select.lcssa.ph = phi i8 [ poison, %.lr.ph61.preheader ], [ %spec.select.3, %.lr.ph61 ]
  %indvars.iv65.unr = phi i64 [ 0, %.lr.ph61.preheader ], [ %indvars.iv.next66.3, %.lr.ph61 ]
  %.04058.unr = phi i8 [ %12, %.lr.ph61.preheader ], [ %spec.select.3, %.lr.ph61 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge62, label %.lr.ph61.epil

.lr.ph61.epil:                                    ; preds = %._crit_edge62.loopexit.unr-lcssa, %.lr.ph61.epil
  %indvars.iv65.epil = phi i64 [ %indvars.iv.next66.epil, %.lr.ph61.epil ], [ %indvars.iv65.unr, %._crit_edge62.loopexit.unr-lcssa ]
  %.04058.epil = phi i8 [ %spec.select.epil, %.lr.ph61.epil ], [ %.04058.unr, %._crit_edge62.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph61.epil ], [ 0, %._crit_edge62.loopexit.unr-lcssa ]
  %41 = getelementptr inbounds i32, ptr %.045.lcssa73, i64 %indvars.iv65.epil
  %42 = load i32, ptr %41, align 4, !tbaa !5
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds i8, ptr %2, i64 %43
  %45 = load i8, ptr %44, align 1, !tbaa !9
  %spec.select.epil = tail call i8 @llvm.smax.i8(i8 %45, i8 %.04058.epil)
  %indvars.iv.next66.epil = add nuw nsw i64 %indvars.iv65.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge62, label %.lr.ph61.epil, !llvm.loop !12

._crit_edge62:                                    ; preds = %._crit_edge62.loopexit.unr-lcssa, %.lr.ph61.epil, %._crit_edge
  %.045.lcssa72 = phi ptr [ %.247, %._crit_edge ], [ %.045.lcssa73, %.lr.ph61.epil ], [ %.045.lcssa73, %._crit_edge62.loopexit.unr-lcssa ]
  %.040.lcssa = phi i8 [ %9, %._crit_edge ], [ %spec.select.lcssa.ph, %._crit_edge62.loopexit.unr-lcssa ], [ %spec.select.epil, %.lr.ph61.epil ]
  tail call void @free(ptr noundef nonnull %.045.lcssa72) #7
  ret i8 %.040.lcssa

.lr.ph61:                                         ; preds = %.lr.ph61, %.lr.ph61.preheader.new
  %indvars.iv65 = phi i64 [ 0, %.lr.ph61.preheader.new ], [ %indvars.iv.next66.3, %.lr.ph61 ]
  %.04058 = phi i8 [ %12, %.lr.ph61.preheader.new ], [ %spec.select.3, %.lr.ph61 ]
  %niter = phi i64 [ 0, %.lr.ph61.preheader.new ], [ %niter.next.3, %.lr.ph61 ]
  %46 = getelementptr inbounds i32, ptr %.045.lcssa73, i64 %indvars.iv65
  %47 = load i32, ptr %46, align 4, !tbaa !5
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds i8, ptr %2, i64 %48
  %50 = load i8, ptr %49, align 1, !tbaa !9
  %spec.select = tail call i8 @llvm.smax.i8(i8 %50, i8 %.04058)
  %indvars.iv.next66 = or disjoint i64 %indvars.iv65, 1
  %51 = getelementptr inbounds i32, ptr %.045.lcssa73, i64 %indvars.iv.next66
  %52 = load i32, ptr %51, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds i8, ptr %2, i64 %53
  %55 = load i8, ptr %54, align 1, !tbaa !9
  %spec.select.1 = tail call i8 @llvm.smax.i8(i8 %55, i8 %spec.select)
  %indvars.iv.next66.1 = or disjoint i64 %indvars.iv65, 2
  %56 = getelementptr inbounds i32, ptr %.045.lcssa73, i64 %indvars.iv.next66.1
  %57 = load i32, ptr %56, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds i8, ptr %2, i64 %58
  %60 = load i8, ptr %59, align 1, !tbaa !9
  %spec.select.2 = tail call i8 @llvm.smax.i8(i8 %60, i8 %spec.select.1)
  %indvars.iv.next66.2 = or disjoint i64 %indvars.iv65, 3
  %61 = getelementptr inbounds i32, ptr %.045.lcssa73, i64 %indvars.iv.next66.2
  %62 = load i32, ptr %61, align 4, !tbaa !5
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds i8, ptr %2, i64 %63
  %65 = load i8, ptr %64, align 1, !tbaa !9
  %spec.select.3 = tail call i8 @llvm.smax.i8(i8 %65, i8 %spec.select.2)
  %indvars.iv.next66.3 = add nuw nsw i64 %indvars.iv65, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %._crit_edge62.loopexit.unr-lcssa, label %.lr.ph61, !llvm.loop !14
}

; 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: mustprogress nounwind willreturn allockind("realloc") allocsize(1) memory(argmem: readwrite, inaccessiblemem: readwrite)
declare noalias noundef ptr @realloc(ptr allocptr nocapture noundef, i64 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 i8 @llvm.smax.i8(i8, i8) #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 = { mustprogress nounwind willreturn allockind("realloc") allocsize(1) 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 #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 = { nounwind allocsize(0) }
attributes #6 = { nounwind allocsize(1) }
attributes #7 = { 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 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.unroll.disable"}
!14 = distinct !{!14, !11}


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