; LLVM IR from kazunetakahashi/atcoder :: 2017/1001_kupc2017/C.ll (Z7maximalB5cxx11i)

; 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::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator" = type { i8 }
%"class.std::initializer_list" = type { ptr, i64 }

@A = external dso_local global i32, align 4
@.str.4 = external hidden unnamed_addr constant [1 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #0 align 2

; 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: mustprogress uwtable
define dso_local void @_Z7maximalB5cxx11i(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8 %0, i32 noundef %1) #2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i1, align 1
  %6 = alloca %"class.std::allocator", align 1
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca %"class.std::__cxx11::basic_string", align 8
  %12 = alloca %"class.std::initializer_list", align 8
  %13 = alloca [1 x i8], align 1
  %14 = alloca %"class.std::allocator", align 1
  %15 = alloca %"class.std::__cxx11::basic_string", align 8
  store ptr %0, ptr %3, align 8
  store i32 %1, ptr %4, align 4, !tbaa !5
  store i1 false, ptr %5, align 1
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #3
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #3
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef @.str.4, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %16 unwind label %25

16:                                               ; preds = %2
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #3
  br label %17

17:                                               ; preds = %75, %16
  %18 = load i32, ptr %4, align 4, !tbaa !5
  %19 = icmp sgt i32 %18, 0
  br i1 %19, label %20, label %76

20:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  store i32 26, ptr %9, align 4, !tbaa !5
  br label %21

21:                                               ; preds = %71, %20
  %22 = load i32, ptr %9, align 4, !tbaa !5
  %23 = icmp sge i32 %22, 1
  br i1 %23, label %29, label %24

24:                                               ; preds = %21
  store i32 4, ptr %10, align 4
  br label %74

25:                                               ; preds = %2
  %26 = landingpad { ptr, i32 }
          cleanup
  %27 = extractvalue { ptr, i32 } %26, 0
  store ptr %27, ptr %7, align 8
  %28 = extractvalue { ptr, i32 } %26, 1
  store i32 %28, ptr %8, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #3
  br label %80

29:                                               ; preds = %21
  %30 = load i32, ptr %4, align 4, !tbaa !5
  %31 = load i32, ptr %9, align 4, !tbaa !5
  %32 = sub nsw i32 %30, %31
  %33 = icmp slt i32 %32, 0
  br i1 %33, label %34, label %35

34:                                               ; preds = %29
  br label %71

35:                                               ; preds = %29
  %36 = load i32, ptr %4, align 4, !tbaa !5
  %37 = load i32, ptr %9, align 4, !tbaa !5
  %38 = sub nsw i32 %36, %37
  %39 = load i32, ptr @A, align 4, !tbaa !5
  %40 = srem i32 %38, %39
  %41 = icmp eq i32 %40, 0
  br i1 %41, label %42, label %70

42:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 1, ptr %13) #3
  %43 = load i32, ptr %9, align 4, !tbaa !5
  %44 = add nsw i32 97, %43
  %45 = sub nsw i32 %44, 1
  %46 = trunc i32 %45 to i8
  store i8 %46, ptr %13, align 1, !tbaa !9
  %47 = getelementptr inbounds %"class.std::initializer_list", ptr %12, i32 0, i32 0
  store ptr %13, ptr %47, align 8, !tbaa !10
  %48 = getelementptr inbounds %"class.std::initializer_list", ptr %12, i32 0, i32 1
  store i64 1, ptr %48, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #3
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #3
  %49 = getelementptr inbounds { ptr, i64 }, ptr %12, i32 0, i32 0
  %50 = load ptr, ptr %49, align 8
  %51 = getelementptr inbounds { ptr, i64 }, ptr %12, i32 0, i32 1
  %52 = load i64, ptr %51, align 8
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ESt16initializer_listIcERKS3_(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr %50, i64 %52, ptr noundef nonnull align 1 dereferenceable(1) %14)
          to label %53 unwind label %61

53:                                               ; preds = %42
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #3
  call void @llvm.lifetime.start.p0(i64 32, ptr %15) #3
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_SA_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %15, ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %11)
          to label %54 unwind label %65

54:                                               ; preds = %53
  %55 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %15) #3
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #3
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #3
  %56 = load i32, ptr %4, align 4, !tbaa !5
  %57 = load i32, ptr %9, align 4, !tbaa !5
  %58 = sub nsw i32 %56, %57
  %59 = load i32, ptr @A, align 4, !tbaa !5
  %60 = sdiv i32 %58, %59
  store i32 %60, ptr %4, align 4, !tbaa !5
  store i32 4, ptr %10, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #3
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #3
  br label %74

61:                                               ; preds = %42
  %62 = landingpad { ptr, i32 }
          cleanup
  %63 = extractvalue { ptr, i32 } %62, 0
  store ptr %63, ptr %7, align 8
  %64 = extractvalue { ptr, i32 } %62, 1
  store i32 %64, ptr %8, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #3
  br label %69

65:                                               ; preds = %53
  %66 = landingpad { ptr, i32 }
          cleanup
  %67 = extractvalue { ptr, i32 } %66, 0
  store ptr %67, ptr %7, align 8
  %68 = extractvalue { ptr, i32 } %66, 1
  store i32 %68, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #3
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #3
  br label %69

69:                                               ; preds = %65, %61
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %0) #3
  br label %80

70:                                               ; preds = %35
  br label %71

71:                                               ; preds = %70, %34
  %72 = load i32, ptr %9, align 4, !tbaa !5
  %73 = add nsw i32 %72, -1
  store i32 %73, ptr %9, align 4, !tbaa !5
  br label %21, !llvm.loop !15

74:                                               ; preds = %54, %24
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  br label %75

75:                                               ; preds = %74
  br label %17, !llvm.loop !17

76:                                               ; preds = %17
  store i1 true, ptr %5, align 1
  store i32 1, ptr %10, align 4
  %77 = load i1, ptr %5, align 1
  br i1 %77, label %79, label %78

78:                                               ; preds = %76
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %0) #3
  br label %79

79:                                               ; preds = %78, %76
  ret void

80:                                               ; preds = %69, %25
  %81 = load ptr, ptr %7, align 8
  %82 = load i32, ptr %8, align 4
  %83 = insertvalue { ptr, i32 } poison, ptr %81, 0
  %84 = insertvalue { ptr, i32 } %83, i32 %82, 1
  resume { ptr, i32 } %84
}

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ESt16initializer_listIcERKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr, i64, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_SA_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) #2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

attributes #0 = { mustprogress 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 = { 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 = { 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++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = !{!11, !12, i64 0}
!11 = !{!"_ZTSSt16initializer_listIcE", !12, i64 0, !13, i64 8}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!"long", !7, i64 0}
!14 = !{!11, !13, i64 8}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}


; 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::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator" = type { i8 }

@A = external dso_local local_unnamed_addr global i32, align 4
@.str.4 = external hidden unnamed_addr constant [1 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #0 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z7maximalB5cxx11i(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8 %0, i32 noundef %1) local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::allocator", align 1
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = alloca [1 x i8], align 1
  %6 = alloca %"class.std::allocator", align 1
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #3
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #3
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull @.str.4, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %8 unwind label %12

8:                                                ; preds = %2
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #3
  %9 = icmp sgt i32 %1, 0
  br i1 %9, label %.preheader.preheader, label %._crit_edge

.preheader.preheader:                             ; preds = %8
  %.pre25 = load i32, ptr @A, align 4
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader, %.loopexit
  %10 = phi i32 [ %141, %.loopexit ], [ %.pre25, %.preheader.preheader ]
  %.022 = phi i32 [ %.1, %.loopexit ], [ %1, %.preheader.preheader ]
  %11 = icmp ult i32 %.022, 26
  br i1 %11, label %29, label %14

12:                                               ; preds = %2
  %13 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #3
  br label %143

14:                                               ; preds = %.preheader
  %15 = add nsw i32 %.022, -26
  %16 = srem i32 %15, %10
  %17 = icmp eq i32 %16, 0
  br i1 %17, label %18, label %.thread

18:                                               ; preds = %137, %.thread48, %.thread47, %.thread46, %.thread45, %.thread44, %.thread43, %.thread42, %.thread41, %.thread40, %.thread39, %.thread38, %.thread37, %.thread36, %.thread35, %.thread34, %.thread33, %.thread32, %.thread31, %.thread30, %.thread29, %.thread28, %.thread27, %.thread26, %.thread, %14
  %.01221.lcssa = phi i8 [ 122, %14 ], [ 121, %.thread ], [ 120, %.thread26 ], [ 119, %.thread27 ], [ 118, %.thread28 ], [ 117, %.thread29 ], [ 116, %.thread30 ], [ 115, %.thread31 ], [ 114, %.thread32 ], [ 113, %.thread33 ], [ 112, %.thread34 ], [ 111, %.thread35 ], [ 110, %.thread36 ], [ 109, %.thread37 ], [ 108, %.thread38 ], [ 107, %.thread39 ], [ 106, %.thread40 ], [ 105, %.thread41 ], [ 104, %.thread42 ], [ 103, %.thread43 ], [ 102, %.thread44 ], [ 101, %.thread45 ], [ 100, %.thread46 ], [ 99, %.thread47 ], [ 98, %.thread48 ], [ 97, %137 ]
  %.lcssa = phi i32 [ %15, %14 ], [ %30, %.thread ], [ %35, %.thread26 ], [ %39, %.thread27 ], [ %44, %.thread28 ], [ %48, %.thread29 ], [ %53, %.thread30 ], [ %57, %.thread31 ], [ %62, %.thread32 ], [ %66, %.thread33 ], [ %71, %.thread34 ], [ %75, %.thread35 ], [ %80, %.thread36 ], [ %84, %.thread37 ], [ %89, %.thread38 ], [ %93, %.thread39 ], [ %98, %.thread40 ], [ %102, %.thread41 ], [ %107, %.thread42 ], [ %111, %.thread43 ], [ %116, %.thread44 ], [ %120, %.thread45 ], [ %125, %.thread46 ], [ %129, %.thread47 ], [ %134, %.thread48 ], [ %138, %137 ]
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #3
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #3
  store i8 %.01221.lcssa, ptr %5, align 1, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #3
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #3
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ESt16initializer_listIcERKS3_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr nonnull %5, i64 1, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %19 unwind label %24

19:                                               ; preds = %18
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #3
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #3
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_SA_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %7, ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %4)
          to label %20 unwind label %26

20:                                               ; preds = %19
  %21 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %7) #3
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #3
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #3
  %22 = load i32, ptr @A, align 4, !tbaa !8
  %23 = sdiv i32 %.lcssa, %22
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #3
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #3
  %.pre = load i32, ptr @A, align 4
  br label %.loopexit

24:                                               ; preds = %18
  %25 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #3
  br label %28

26:                                               ; preds = %19
  %27 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #3
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #3
  br label %28

28:                                               ; preds = %26, %24
  %.pn = phi { ptr, i32 } [ %27, %26 ], [ %25, %24 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #3
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %0) #3
  br label %143

29:                                               ; preds = %.preheader
  %.not = icmp eq i32 %.022, 25
  br i1 %.not, label %.thread, label %33

.thread:                                          ; preds = %14, %29
  %30 = add nsw i32 %.022, -25
  %31 = srem i32 %30, %10
  %32 = icmp eq i32 %31, 0
  br i1 %32, label %18, label %.thread26

33:                                               ; preds = %29
  %34 = icmp ult i32 %.022, 24
  br i1 %34, label %38, label %.thread26

.thread26:                                        ; preds = %.thread, %33
  %35 = add nsw i32 %.022, -24
  %36 = srem i32 %35, %10
  %37 = icmp eq i32 %36, 0
  br i1 %37, label %18, label %.thread27

38:                                               ; preds = %33
  %.not49 = icmp eq i32 %.022, 23
  br i1 %.not49, label %.thread27, label %42

.thread27:                                        ; preds = %.thread26, %38
  %39 = add nsw i32 %.022, -23
  %40 = srem i32 %39, %10
  %41 = icmp eq i32 %40, 0
  br i1 %41, label %18, label %.thread28

42:                                               ; preds = %38
  %43 = icmp ult i32 %.022, 22
  br i1 %43, label %47, label %.thread28

.thread28:                                        ; preds = %.thread27, %42
  %44 = add nsw i32 %.022, -22
  %45 = srem i32 %44, %10
  %46 = icmp eq i32 %45, 0
  br i1 %46, label %18, label %.thread29

47:                                               ; preds = %42
  %.not50 = icmp eq i32 %.022, 21
  br i1 %.not50, label %.thread29, label %51

.thread29:                                        ; preds = %.thread28, %47
  %48 = add nsw i32 %.022, -21
  %49 = srem i32 %48, %10
  %50 = icmp eq i32 %49, 0
  br i1 %50, label %18, label %.thread30

51:                                               ; preds = %47
  %52 = icmp ult i32 %.022, 20
  br i1 %52, label %56, label %.thread30

.thread30:                                        ; preds = %.thread29, %51
  %53 = add nsw i32 %.022, -20
  %54 = srem i32 %53, %10
  %55 = icmp eq i32 %54, 0
  br i1 %55, label %18, label %.thread31

56:                                               ; preds = %51
  %.not51 = icmp eq i32 %.022, 19
  br i1 %.not51, label %.thread31, label %60

.thread31:                                        ; preds = %.thread30, %56
  %57 = add nsw i32 %.022, -19
  %58 = srem i32 %57, %10
  %59 = icmp eq i32 %58, 0
  br i1 %59, label %18, label %.thread32

60:                                               ; preds = %56
  %61 = icmp ult i32 %.022, 18
  br i1 %61, label %65, label %.thread32

.thread32:                                        ; preds = %.thread31, %60
  %62 = add nsw i32 %.022, -18
  %63 = srem i32 %62, %10
  %64 = icmp eq i32 %63, 0
  br i1 %64, label %18, label %.thread33

65:                                               ; preds = %60
  %.not52 = icmp eq i32 %.022, 17
  br i1 %.not52, label %.thread33, label %69

.thread33:                                        ; preds = %.thread32, %65
  %66 = add nsw i32 %.022, -17
  %67 = srem i32 %66, %10
  %68 = icmp eq i32 %67, 0
  br i1 %68, label %18, label %.thread34

69:                                               ; preds = %65
  %70 = icmp ult i32 %.022, 16
  br i1 %70, label %74, label %.thread34

.thread34:                                        ; preds = %.thread33, %69
  %71 = add nsw i32 %.022, -16
  %72 = srem i32 %71, %10
  %73 = icmp eq i32 %72, 0
  br i1 %73, label %18, label %.thread35

74:                                               ; preds = %69
  %.not53 = icmp eq i32 %.022, 15
  br i1 %.not53, label %.thread35, label %78

.thread35:                                        ; preds = %.thread34, %74
  %75 = add nsw i32 %.022, -15
  %76 = srem i32 %75, %10
  %77 = icmp eq i32 %76, 0
  br i1 %77, label %18, label %.thread36

78:                                               ; preds = %74
  %79 = icmp ult i32 %.022, 14
  br i1 %79, label %83, label %.thread36

.thread36:                                        ; preds = %.thread35, %78
  %80 = add nsw i32 %.022, -14
  %81 = srem i32 %80, %10
  %82 = icmp eq i32 %81, 0
  br i1 %82, label %18, label %.thread37

83:                                               ; preds = %78
  %.not54 = icmp eq i32 %.022, 13
  br i1 %.not54, label %.thread37, label %87

.thread37:                                        ; preds = %.thread36, %83
  %84 = add nsw i32 %.022, -13
  %85 = srem i32 %84, %10
  %86 = icmp eq i32 %85, 0
  br i1 %86, label %18, label %.thread38

87:                                               ; preds = %83
  %88 = icmp ult i32 %.022, 12
  br i1 %88, label %92, label %.thread38

.thread38:                                        ; preds = %.thread37, %87
  %89 = add nsw i32 %.022, -12
  %90 = srem i32 %89, %10
  %91 = icmp eq i32 %90, 0
  br i1 %91, label %18, label %.thread39

92:                                               ; preds = %87
  %.not55 = icmp eq i32 %.022, 11
  br i1 %.not55, label %.thread39, label %96

.thread39:                                        ; preds = %.thread38, %92
  %93 = add nsw i32 %.022, -11
  %94 = srem i32 %93, %10
  %95 = icmp eq i32 %94, 0
  br i1 %95, label %18, label %.thread40

96:                                               ; preds = %92
  %97 = icmp ult i32 %.022, 10
  br i1 %97, label %101, label %.thread40

.thread40:                                        ; preds = %.thread39, %96
  %98 = add nsw i32 %.022, -10
  %99 = srem i32 %98, %10
  %100 = icmp eq i32 %99, 0
  br i1 %100, label %18, label %.thread41

101:                                              ; preds = %96
  %.not56 = icmp eq i32 %.022, 9
  br i1 %.not56, label %.thread41, label %105

.thread41:                                        ; preds = %.thread40, %101
  %102 = add nsw i32 %.022, -9
  %103 = srem i32 %102, %10
  %104 = icmp eq i32 %103, 0
  br i1 %104, label %18, label %.thread42

105:                                              ; preds = %101
  %106 = icmp ult i32 %.022, 8
  br i1 %106, label %110, label %.thread42

.thread42:                                        ; preds = %.thread41, %105
  %107 = add nsw i32 %.022, -8
  %108 = srem i32 %107, %10
  %109 = icmp eq i32 %108, 0
  br i1 %109, label %18, label %.thread43

110:                                              ; preds = %105
  %.not57 = icmp eq i32 %.022, 7
  br i1 %.not57, label %.thread43, label %114

.thread43:                                        ; preds = %.thread42, %110
  %111 = add nsw i32 %.022, -7
  %112 = srem i32 %111, %10
  %113 = icmp eq i32 %112, 0
  br i1 %113, label %18, label %.thread44

114:                                              ; preds = %110
  %115 = icmp ult i32 %.022, 6
  br i1 %115, label %119, label %.thread44

.thread44:                                        ; preds = %.thread43, %114
  %116 = add nsw i32 %.022, -6
  %117 = srem i32 %116, %10
  %118 = icmp eq i32 %117, 0
  br i1 %118, label %18, label %.thread45

119:                                              ; preds = %114
  %.not58 = icmp eq i32 %.022, 5
  br i1 %.not58, label %.thread45, label %123

.thread45:                                        ; preds = %.thread44, %119
  %120 = add nsw i32 %.022, -5
  %121 = srem i32 %120, %10
  %122 = icmp eq i32 %121, 0
  br i1 %122, label %18, label %.thread46

123:                                              ; preds = %119
  %124 = icmp ult i32 %.022, 4
  br i1 %124, label %128, label %.thread46

.thread46:                                        ; preds = %.thread45, %123
  %125 = add nsw i32 %.022, -4
  %126 = srem i32 %125, %10
  %127 = icmp eq i32 %126, 0
  br i1 %127, label %18, label %.thread47

128:                                              ; preds = %123
  %.not59 = icmp eq i32 %.022, 3
  br i1 %.not59, label %.thread47, label %132

.thread47:                                        ; preds = %.thread46, %128
  %129 = add nsw i32 %.022, -3
  %130 = srem i32 %129, %10
  %131 = icmp eq i32 %130, 0
  br i1 %131, label %18, label %.thread48

132:                                              ; preds = %128
  %133 = icmp ult i32 %.022, 2
  br i1 %133, label %137, label %.thread48

.thread48:                                        ; preds = %.thread47, %132
  %134 = add nsw i32 %.022, -2
  %135 = srem i32 %134, %10
  %136 = icmp eq i32 %135, 0
  br i1 %136, label %18, label %137

137:                                              ; preds = %132, %.thread48
  %138 = add nsw i32 %.022, -1
  %139 = srem i32 %138, %10
  %140 = icmp eq i32 %139, 0
  br i1 %140, label %18, label %.loopexit

.loopexit:                                        ; preds = %137, %20
  %141 = phi i32 [ %.pre, %20 ], [ %10, %137 ]
  %.1 = phi i32 [ %23, %20 ], [ %.022, %137 ]
  %142 = icmp sgt i32 %.1, 0
  br i1 %142, label %.preheader, label %._crit_edge, !llvm.loop !10

._crit_edge:                                      ; preds = %.loopexit, %8
  ret void

143:                                              ; preds = %28, %12
  %.pn.pn = phi { ptr, i32 } [ %.pn, %28 ], [ %13, %12 ]
  resume { ptr, i32 } %.pn.pn
}

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ESt16initializer_listIcERKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr, i64, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_SA_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

attributes #0 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 = { 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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !6, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}


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