; LLVM IR from HarshCasper/NeoAlgo :: C-Plus-Plus/ds/prims_algo.ll (Z9operationPiiiPA4_i)

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

%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z9operationPiiiPA4_i(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef %3) #0 {
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !9
  store i32 %2, ptr %7, align 4, !tbaa !9
  store ptr %3, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  store i32 100, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %13

13:                                               ; preds = %75, %4
  %14 = load i32, ptr %10, align 4, !tbaa !9
  %15 = icmp slt i32 %14, 4
  br i1 %15, label %17, label %16

16:                                               ; preds = %13
  store i32 2, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  br label %78

17:                                               ; preds = %13
  %18 = load ptr, ptr %5, align 8, !tbaa !5
  %19 = load i32, ptr %10, align 4, !tbaa !9
  %20 = sext i32 %19 to i64
  %21 = getelementptr inbounds i32, ptr %18, i64 %20
  %22 = load i32, ptr %21, align 4, !tbaa !9
  %23 = icmp ne i32 %22, 0
  br i1 %23, label %24, label %74

24:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %25

25:                                               ; preds = %70, %24
  %26 = load i32, ptr %12, align 4, !tbaa !9
  %27 = icmp slt i32 %26, 4
  br i1 %27, label %29, label %28

28:                                               ; preds = %25
  store i32 5, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  br label %73

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

36:                                               ; preds = %29
  %37 = load ptr, ptr %8, align 8, !tbaa !5
  %38 = load i32, ptr %10, align 4, !tbaa !9
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [4 x i32], ptr %37, i64 %39
  %41 = load i32, ptr %12, align 4, !tbaa !9
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds [4 x i32], ptr %40, i64 0, i64 %42
  %44 = load i32, ptr %43, align 4, !tbaa !9
  %45 = icmp ne i32 %44, 0
  br i1 %45, label %46, label %69

46:                                               ; preds = %36
  %47 = load i32, ptr %9, align 4, !tbaa !9
  %48 = load ptr, ptr %8, align 8, !tbaa !5
  %49 = load i32, ptr %10, align 4, !tbaa !9
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [4 x i32], ptr %48, i64 %50
  %52 = load i32, ptr %12, align 4, !tbaa !9
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [4 x i32], ptr %51, i64 0, i64 %53
  %55 = load i32, ptr %54, align 4, !tbaa !9
  %56 = icmp sgt i32 %47, %55
  br i1 %56, label %57, label %68

57:                                               ; preds = %46
  %58 = load ptr, ptr %8, align 8, !tbaa !5
  %59 = load i32, ptr %10, align 4, !tbaa !9
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [4 x i32], ptr %58, i64 %60
  %62 = load i32, ptr %12, align 4, !tbaa !9
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [4 x i32], ptr %61, i64 0, i64 %63
  %65 = load i32, ptr %64, align 4, !tbaa !9
  store i32 %65, ptr %9, align 4, !tbaa !9
  %66 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %66, ptr %6, align 4, !tbaa !9
  %67 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %67, ptr %7, align 4, !tbaa !9
  br label %68

68:                                               ; preds = %57, %46
  br label %69

69:                                               ; preds = %68, %36, %29
  br label %70

70:                                               ; preds = %69
  %71 = load i32, ptr %12, align 4, !tbaa !9
  %72 = add nsw i32 %71, 1
  store i32 %72, ptr %12, align 4, !tbaa !9
  br label %25, !llvm.loop !11

73:                                               ; preds = %28
  br label %74

74:                                               ; preds = %73, %17
  br label %75

75:                                               ; preds = %74
  %76 = load i32, ptr %10, align 4, !tbaa !9
  %77 = add nsw i32 %76, 1
  store i32 %77, ptr %10, align 4, !tbaa !9
  br label %13, !llvm.loop !13

78:                                               ; preds = %16
  %79 = load ptr, ptr %8, align 8, !tbaa !5
  %80 = load i32, ptr %6, align 4, !tbaa !9
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [4 x i32], ptr %79, i64 %81
  %83 = load i32, ptr %7, align 4, !tbaa !9
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds [4 x i32], ptr %82, i64 0, i64 %84
  %86 = load i32, ptr %85, align 4, !tbaa !9
  %87 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %86)
  %88 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %87, ptr noundef @.str)
  %89 = load i32, ptr %6, align 4, !tbaa !9
  %90 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %88, i32 noundef %89)
  %91 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %90, ptr noundef @.str.1)
  %92 = load i32, ptr %7, align 4, !tbaa !9
  %93 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %91, i32 noundef %92)
  %94 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %93, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %95 = load ptr, ptr %5, align 8, !tbaa !5
  %96 = load i32, ptr %7, align 4, !tbaa !9
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds i32, ptr %95, i64 %97
  store i32 1, ptr %98, align 4, !tbaa !9
  unreachable
}

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #2

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #3

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #2

attributes #0 = { mustprogress 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 = { inlinehint mustprogress 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 = { "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 }

!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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !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"

%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress noreturn uwtable
define dso_local noundef i32 @_Z9operationPiiiPA4_i(ptr nocapture noundef readonly %0, i32 noundef %1, i32 noundef %2, ptr nocapture noundef readonly %3) local_unnamed_addr #0 {
  %5 = load i32, ptr %0, align 4, !tbaa !5
  %.not = icmp eq i32 %5, 0
  %.phi.trans.insert = getelementptr inbounds i8, ptr %0, i64 4
  %.pre = load i32, ptr %.phi.trans.insert, align 4, !tbaa !5
  %.not.175 = icmp eq i32 %.pre, 0
  br i1 %.not, label %.loopexit.thread, label %.preheader.1

.preheader.1:                                     ; preds = %4
  br i1 %.not.175, label %6, label %.preheader.2

6:                                                ; preds = %.preheader.1
  %7 = getelementptr inbounds i8, ptr %3, i64 4
  %8 = load i32, ptr %7, align 4, !tbaa !5
  %.not36.1 = icmp ne i32 %8, 0
  %9 = icmp slt i32 %8, 100
  %or.cond.1 = and i1 %.not36.1, %9
  br i1 %or.cond.1, label %10, label %.preheader.2

10:                                               ; preds = %6
  br label %.preheader.2

.preheader.2:                                     ; preds = %10, %6, %.preheader.1
  %.232.1 = phi i32 [ %2, %.preheader.1 ], [ 1, %10 ], [ %2, %6 ]
  %.228.1 = phi i32 [ %1, %.preheader.1 ], [ 0, %10 ], [ %1, %6 ]
  %.2.1 = phi i32 [ 100, %.preheader.1 ], [ %8, %10 ], [ 100, %6 ]
  %11 = getelementptr inbounds i8, ptr %0, i64 8
  %12 = load i32, ptr %11, align 4, !tbaa !5
  %.not35.2 = icmp eq i32 %12, 0
  br i1 %.not35.2, label %13, label %.preheader.3

13:                                               ; preds = %.preheader.2
  %14 = getelementptr inbounds i8, ptr %3, i64 8
  %15 = load i32, ptr %14, align 4, !tbaa !5
  %.not36.2 = icmp ne i32 %15, 0
  %16 = icmp sgt i32 %.2.1, %15
  %or.cond.2 = and i1 %.not36.2, %16
  br i1 %or.cond.2, label %17, label %.preheader.3

17:                                               ; preds = %13
  br label %.preheader.3

.preheader.3:                                     ; preds = %17, %13, %.preheader.2
  %.232.2 = phi i32 [ %.232.1, %.preheader.2 ], [ 2, %17 ], [ %.232.1, %13 ]
  %.228.2 = phi i32 [ %.228.1, %.preheader.2 ], [ 0, %17 ], [ %.228.1, %13 ]
  %.2.2 = phi i32 [ %.2.1, %.preheader.2 ], [ %15, %17 ], [ %.2.1, %13 ]
  %18 = getelementptr inbounds i8, ptr %0, i64 12
  %19 = load i32, ptr %18, align 4, !tbaa !5
  %.not35.3 = icmp eq i32 %19, 0
  br i1 %.not35.3, label %20, label %.loopexit

20:                                               ; preds = %.preheader.3
  %21 = getelementptr inbounds i8, ptr %3, i64 12
  %22 = load i32, ptr %21, align 4, !tbaa !5
  %.not36.3 = icmp ne i32 %22, 0
  %23 = icmp sgt i32 %.2.2, %22
  %or.cond.3 = and i1 %.not36.3, %23
  br i1 %or.cond.3, label %24, label %.loopexit

24:                                               ; preds = %20
  br label %.loopexit

.loopexit:                                        ; preds = %.preheader.3, %20, %24
  %.333 = phi i32 [ %.232.2, %.preheader.3 ], [ 3, %24 ], [ %.232.2, %20 ]
  %.329 = phi i32 [ %.228.2, %.preheader.3 ], [ 0, %24 ], [ %.228.2, %20 ]
  %.3 = phi i32 [ %.2.2, %.preheader.3 ], [ %22, %24 ], [ %.2.2, %20 ]
  %.not.1 = icmp eq i32 %.pre, 0
  br i1 %.not.1, label %.loopexit..loopexit.1_crit_edge, label %.preheader.preheader.1

.loopexit.thread:                                 ; preds = %4
  br i1 %.not.175, label %.loopexit..loopexit.1_crit_edge, label %.preheader.preheader.1.thread

.loopexit..loopexit.1_crit_edge:                  ; preds = %.loopexit.thread, %.loopexit
  %.381 = phi i32 [ 100, %.loopexit.thread ], [ %.3, %.loopexit ]
  %.32979 = phi i32 [ %1, %.loopexit.thread ], [ %.329, %.loopexit ]
  %.33377 = phi i32 [ %2, %.loopexit.thread ], [ %.333, %.loopexit ]
  %.phi.trans.insert68 = getelementptr inbounds i8, ptr %0, i64 8
  %.pre69 = load i32, ptr %.phi.trans.insert68, align 4, !tbaa !5
  br label %.loopexit.1

.preheader.preheader.1:                           ; preds = %.loopexit
  br i1 %.not, label %.preheader.preheader.1.thread, label %.preheader.2.1

.preheader.preheader.1.thread:                    ; preds = %.loopexit.thread, %.preheader.preheader.1
  %.3337693 = phi i32 [ %.333, %.preheader.preheader.1 ], [ %2, %.loopexit.thread ]
  %.3297892 = phi i32 [ %.329, %.preheader.preheader.1 ], [ %1, %.loopexit.thread ]
  %.38091 = phi i32 [ %.3, %.preheader.preheader.1 ], [ 100, %.loopexit.thread ]
  %25 = getelementptr inbounds i8, ptr %3, i64 16
  %26 = load i32, ptr %25, align 4, !tbaa !5
  %.not36.149 = icmp ne i32 %26, 0
  %27 = icmp sgt i32 %.38091, %26
  %or.cond.150 = and i1 %.not36.149, %27
  br i1 %or.cond.150, label %28, label %.preheader.2.1

28:                                               ; preds = %.preheader.preheader.1.thread
  br label %.preheader.2.1

.preheader.2.1:                                   ; preds = %.preheader.preheader.1, %.preheader.preheader.1.thread, %28
  %.232.151 = phi i32 [ %.333, %.preheader.preheader.1 ], [ 0, %28 ], [ %.3337693, %.preheader.preheader.1.thread ]
  %.228.152 = phi i32 [ %.329, %.preheader.preheader.1 ], [ 1, %28 ], [ %.3297892, %.preheader.preheader.1.thread ]
  %.2.153 = phi i32 [ %.3, %.preheader.preheader.1 ], [ %26, %28 ], [ %.38091, %.preheader.preheader.1.thread ]
  %29 = getelementptr inbounds i8, ptr %0, i64 8
  %30 = load i32, ptr %29, align 4, !tbaa !5
  %.not35.2.1 = icmp eq i32 %30, 0
  br i1 %.not35.2.1, label %31, label %.preheader.3.1

31:                                               ; preds = %.preheader.2.1
  %32 = getelementptr inbounds i8, ptr %3, i64 24
  %33 = load i32, ptr %32, align 4, !tbaa !5
  %.not36.2.1 = icmp ne i32 %33, 0
  %34 = icmp sgt i32 %.2.153, %33
  %or.cond.2.1 = and i1 %.not36.2.1, %34
  br i1 %or.cond.2.1, label %35, label %.preheader.3.1

35:                                               ; preds = %31
  br label %.preheader.3.1

.preheader.3.1:                                   ; preds = %35, %31, %.preheader.2.1
  %.232.2.1 = phi i32 [ %.232.151, %.preheader.2.1 ], [ 2, %35 ], [ %.232.151, %31 ]
  %.228.2.1 = phi i32 [ %.228.152, %.preheader.2.1 ], [ 1, %35 ], [ %.228.152, %31 ]
  %.2.2.1 = phi i32 [ %.2.153, %.preheader.2.1 ], [ %33, %35 ], [ %.2.153, %31 ]
  %36 = getelementptr inbounds i8, ptr %0, i64 12
  %37 = load i32, ptr %36, align 4, !tbaa !5
  %.not35.3.1 = icmp eq i32 %37, 0
  br i1 %.not35.3.1, label %38, label %.loopexit.1

38:                                               ; preds = %.preheader.3.1
  %39 = getelementptr inbounds i8, ptr %3, i64 28
  %40 = load i32, ptr %39, align 4, !tbaa !5
  %.not36.3.1 = icmp ne i32 %40, 0
  %41 = icmp sgt i32 %.2.2.1, %40
  %or.cond.3.1 = and i1 %.not36.3.1, %41
  br i1 %or.cond.3.1, label %42, label %.loopexit.1

42:                                               ; preds = %38
  br label %.loopexit.1

.loopexit.1:                                      ; preds = %.preheader.3.1, %38, %42, %.loopexit..loopexit.1_crit_edge
  %.not.182 = phi i1 [ true, %.loopexit..loopexit.1_crit_edge ], [ false, %42 ], [ false, %38 ], [ false, %.preheader.3.1 ]
  %43 = phi i32 [ %.pre69, %.loopexit..loopexit.1_crit_edge ], [ %30, %42 ], [ %30, %38 ], [ %30, %.preheader.3.1 ]
  %.333.1 = phi i32 [ %.33377, %.loopexit..loopexit.1_crit_edge ], [ 3, %42 ], [ %.232.2.1, %38 ], [ %.232.2.1, %.preheader.3.1 ]
  %.329.1 = phi i32 [ %.32979, %.loopexit..loopexit.1_crit_edge ], [ 1, %42 ], [ %.228.2.1, %38 ], [ %.228.2.1, %.preheader.3.1 ]
  %.3.1 = phi i32 [ %.381, %.loopexit..loopexit.1_crit_edge ], [ %40, %42 ], [ %.2.2.1, %38 ], [ %.2.2.1, %.preheader.3.1 ]
  %.not.2 = icmp eq i32 %43, 0
  br i1 %.not.2, label %.loopexit.2, label %.preheader.preheader.2

.preheader.preheader.2:                           ; preds = %.loopexit.1
  br i1 %.not, label %44, label %.preheader.1.2

44:                                               ; preds = %.preheader.preheader.2
  %45 = getelementptr inbounds i8, ptr %3, i64 32
  %46 = load i32, ptr %45, align 4, !tbaa !5
  %.not36.256 = icmp ne i32 %46, 0
  %47 = icmp sgt i32 %.3.1, %46
  %or.cond.257 = and i1 %.not36.256, %47
  br i1 %or.cond.257, label %48, label %.preheader.1.2

48:                                               ; preds = %44
  br label %.preheader.1.2

.preheader.1.2:                                   ; preds = %48, %44, %.preheader.preheader.2
  %.232.258 = phi i32 [ %.333.1, %.preheader.preheader.2 ], [ 0, %48 ], [ %.333.1, %44 ]
  %.228.259 = phi i32 [ %.329.1, %.preheader.preheader.2 ], [ 2, %48 ], [ %.329.1, %44 ]
  %.2.260 = phi i32 [ %.3.1, %.preheader.preheader.2 ], [ %46, %48 ], [ %.3.1, %44 ]
  br i1 %.not.182, label %49, label %.preheader.3.2

49:                                               ; preds = %.preheader.1.2
  %50 = getelementptr inbounds i8, ptr %3, i64 36
  %51 = load i32, ptr %50, align 4, !tbaa !5
  %.not36.1.2 = icmp ne i32 %51, 0
  %52 = icmp sgt i32 %.2.260, %51
  %or.cond.1.2 = select i1 %.not36.1.2, i1 %52, i1 false
  br i1 %or.cond.1.2, label %53, label %.preheader.3.2

53:                                               ; preds = %49
  br label %.preheader.3.2

.preheader.3.2:                                   ; preds = %.preheader.1.2, %49, %53
  %.232.1.2 = phi i32 [ %.232.258, %.preheader.1.2 ], [ 1, %53 ], [ %.232.258, %49 ]
  %.228.1.2 = phi i32 [ %.228.259, %.preheader.1.2 ], [ 2, %53 ], [ %.228.259, %49 ]
  %.2.1.2 = phi i32 [ %.2.260, %.preheader.1.2 ], [ %51, %53 ], [ %.2.260, %49 ]
  %54 = getelementptr inbounds i8, ptr %0, i64 12
  %55 = load i32, ptr %54, align 4, !tbaa !5
  %.not35.3.2 = icmp eq i32 %55, 0
  br i1 %.not35.3.2, label %.loopexit.3.sink.split, label %.preheader.preheader.3

.loopexit.2:                                      ; preds = %.loopexit.1
  %.phi.trans.insert70 = getelementptr inbounds i8, ptr %0, i64 12
  %.pre71 = load i32, ptr %.phi.trans.insert70, align 4, !tbaa !5
  %.not.3 = icmp eq i32 %.pre71, 0
  br i1 %.not.3, label %.loopexit.3, label %.preheader.preheader.3

.preheader.preheader.3:                           ; preds = %.preheader.3.2, %.loopexit.2
  %.3.2105 = phi i32 [ %.3.1, %.loopexit.2 ], [ %.2.1.2, %.preheader.3.2 ]
  %.329.2104 = phi i32 [ %.329.1, %.loopexit.2 ], [ %.228.1.2, %.preheader.3.2 ]
  %.333.2103 = phi i32 [ %.333.1, %.loopexit.2 ], [ %.232.1.2, %.preheader.3.2 ]
  br i1 %.not, label %56, label %.preheader.1.3

56:                                               ; preds = %.preheader.preheader.3
  %57 = getelementptr inbounds i8, ptr %3, i64 48
  %58 = load i32, ptr %57, align 4, !tbaa !5
  %.not36.363 = icmp ne i32 %58, 0
  %59 = icmp sgt i32 %.3.2105, %58
  %or.cond.364 = select i1 %.not36.363, i1 %59, i1 false
  br i1 %or.cond.364, label %60, label %.preheader.1.3

60:                                               ; preds = %56
  br label %.preheader.1.3

.preheader.1.3:                                   ; preds = %60, %56, %.preheader.preheader.3
  %.232.365 = phi i32 [ %.333.2103, %.preheader.preheader.3 ], [ 0, %60 ], [ %.333.2103, %56 ]
  %.228.366 = phi i32 [ %.329.2104, %.preheader.preheader.3 ], [ 3, %60 ], [ %.329.2104, %56 ]
  %.2.367 = phi i32 [ %.3.2105, %.preheader.preheader.3 ], [ %58, %60 ], [ %.3.2105, %56 ]
  br i1 %.not.182, label %61, label %.preheader.2.3

61:                                               ; preds = %.preheader.1.3
  %62 = getelementptr inbounds i8, ptr %3, i64 52
  %63 = load i32, ptr %62, align 4, !tbaa !5
  %.not36.1.3 = icmp ne i32 %63, 0
  %64 = icmp sgt i32 %.2.367, %63
  %or.cond.1.3 = select i1 %.not36.1.3, i1 %64, i1 false
  br i1 %or.cond.1.3, label %65, label %.preheader.2.3

65:                                               ; preds = %61
  br label %.preheader.2.3

.preheader.2.3:                                   ; preds = %65, %61, %.preheader.1.3
  %.232.1.3 = phi i32 [ %.232.365, %.preheader.1.3 ], [ 1, %65 ], [ %.232.365, %61 ]
  %.228.1.3 = phi i32 [ %.228.366, %.preheader.1.3 ], [ 3, %65 ], [ %.228.366, %61 ]
  %.2.1.3 = phi i32 [ %.2.367, %.preheader.1.3 ], [ %63, %65 ], [ %.2.367, %61 ]
  br i1 %.not.2, label %.loopexit.3.sink.split, label %.loopexit.3

.loopexit.3.sink.split:                           ; preds = %.preheader.2.3, %.preheader.3.2
  %.sink115 = phi i64 [ 44, %.preheader.3.2 ], [ 56, %.preheader.2.3 ]
  %.2.1.3.sink = phi i32 [ %.2.1.2, %.preheader.3.2 ], [ %.2.1.3, %.preheader.2.3 ]
  %.232.1.3.sink = phi i32 [ %.232.1.2, %.preheader.3.2 ], [ %.232.1.3, %.preheader.2.3 ]
  %.sink110 = phi i32 [ 3, %.preheader.3.2 ], [ 2, %.preheader.2.3 ]
  %.228.1.3.sink = phi i32 [ %.228.1.2, %.preheader.3.2 ], [ %.228.1.3, %.preheader.2.3 ]
  %.sink = phi i32 [ 2, %.preheader.3.2 ], [ 3, %.preheader.2.3 ]
  %66 = getelementptr inbounds i8, ptr %3, i64 %.sink115
  %67 = load i32, ptr %66, align 4, !tbaa !5
  %.not36.2.3 = icmp ne i32 %67, 0
  %68 = icmp sgt i32 %.2.1.3.sink, %67
  %or.cond.2.3 = select i1 %.not36.2.3, i1 %68, i1 false
  %spec.select107 = select i1 %or.cond.2.3, i32 %.sink110, i32 %.232.1.3.sink
  %spec.select108 = select i1 %or.cond.2.3, i32 %.sink, i32 %.228.1.3.sink
  br label %.loopexit.3

.loopexit.3:                                      ; preds = %.loopexit.3.sink.split, %.preheader.2.3, %.loopexit.2
  %.333.3 = phi i32 [ %.333.1, %.loopexit.2 ], [ %.232.1.3, %.preheader.2.3 ], [ %spec.select107, %.loopexit.3.sink.split ]
  %.329.3 = phi i32 [ %.329.1, %.loopexit.2 ], [ %.228.1.3, %.preheader.2.3 ], [ %spec.select108, %.loopexit.3.sink.split ]
  %69 = sext i32 %.329.3 to i64
  %70 = sext i32 %.333.3 to i64
  %71 = getelementptr inbounds [4 x i32], ptr %3, i64 %69, i64 %70
  %72 = load i32, ptr %71, align 4, !tbaa !5
  %73 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %72)
  %74 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %73, ptr noundef nonnull @.str)
  %75 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %74, i32 noundef %.329.3)
  %76 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %75, ptr noundef nonnull @.str.1)
  %77 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %76, i32 noundef %.333.3)
  %78 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %77, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  unreachable
}

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #1

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #1

attributes #0 = { mustprogress noreturn 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 = { inlinehint mustprogress 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 = { "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 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" }

!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++ TBAA"}


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