; LLVM IR from bqi343/cp-notebook :: Implementations/content/data-structures/STL (5)/rope_test.ll (Z11ropeExamplev)

; 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.__gnu_cxx::rope" = type { %"struct.__gnu_cxx::_Rope_base" }
%"struct.__gnu_cxx::_Rope_base" = type { ptr }
%"class.std::allocator.3" = type { i8 }
%"class.__gnu_cxx::_Rope_char_ref_proxy" = type { i64, i32, i8, ptr }
%"class.__gnu_cxx::_Rope_iterator" = type { %"class.__gnu_cxx::_Rope_iterator_base.base", ptr }
%"class.__gnu_cxx::_Rope_iterator_base.base" = type <{ i64, ptr, i64, ptr, ptr, ptr, [4 x ptr], i32, i8, [3 x i8], [15 x i32] }>

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z2psv() #1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z11ropeExamplev() #1 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.__gnu_cxx::rope", align 8
  %2 = alloca %"class.std::allocator.3", align 1
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca %"class.__gnu_cxx::_Rope_char_ref_proxy", align 8
  %7 = alloca i32, align 4
  %8 = alloca %"class.__gnu_cxx::rope", align 8
  %9 = alloca %"class.__gnu_cxx::_Rope_iterator", align 8
  %10 = alloca %"class.__gnu_cxx::_Rope_iterator", align 8
  %11 = alloca i32, align 4
  %12 = alloca %"class.__gnu_cxx::_Rope_char_ref_proxy", align 8
  %13 = alloca i8, align 1
  %14 = alloca %"class.__gnu_cxx::_Rope_iterator", align 8
  %15 = alloca %"class.__gnu_cxx::_Rope_iterator", align 8
  %16 = alloca %"class.__gnu_cxx::_Rope_iterator", align 8
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i8, align 1
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr %2) #4
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %2) #4
  invoke void @_ZN9__gnu_cxx4ropeIiSaIiEEC2EmiRKS1_(ptr noundef nonnull align 8 dereferenceable(8) %1, i64 noundef 5, i32 noundef 0, ptr noundef nonnull align 1 dereferenceable(1) %2)
          to label %20 unwind label %28

20:                                               ; preds = %0
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %2) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %2) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %21

21:                                               ; preds = %44, %20
  %22 = load i32, ptr %5, align 4, !tbaa !5
  %23 = invoke noundef i64 @_ZNK9__gnu_cxx4ropeIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %24 unwind label %32

24:                                               ; preds = %21
  %25 = trunc i64 %23 to i32
  %26 = icmp slt i32 %22, %25
  br i1 %26, label %36, label %27

27:                                               ; preds = %24
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  br label %52

28:                                               ; preds = %0
  %29 = landingpad { ptr, i32 }
          cleanup
  %30 = extractvalue { ptr, i32 } %29, 0
  store ptr %30, ptr %3, align 8
  %31 = extractvalue { ptr, i32 } %29, 1
  store i32 %31, ptr %4, align 4
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %2) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %2) #4
  br label %177

32:                                               ; preds = %21
  %33 = landingpad { ptr, i32 }
          cleanup
  %34 = extractvalue { ptr, i32 } %33, 0
  store ptr %34, ptr %3, align 8
  %35 = extractvalue { ptr, i32 } %33, 1
  store i32 %35, ptr %4, align 4
  br label %51

36:                                               ; preds = %24
  %37 = load i32, ptr %5, align 4, !tbaa !5
  %38 = add nsw i32 %37, 1
  call void @llvm.lifetime.start.p0(i64 24, ptr %6) #4
  %39 = load i32, ptr %5, align 4, !tbaa !5
  %40 = sext i32 %39 to i64
  invoke void @_ZN9__gnu_cxx4ropeIiSaIiEE20mutable_reference_atEm(ptr dead_on_unwind writable sret(%"class.__gnu_cxx::_Rope_char_ref_proxy") align 8 %6, ptr noundef nonnull align 8 dereferenceable(8) %1, i64 noundef %40)
          to label %41 unwind label %47

41:                                               ; preds = %36
  %42 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN9__gnu_cxx20_Rope_char_ref_proxyIiSaIiEEaSEi(ptr noundef nonnull align 8 dereferenceable(24) %6, i32 noundef %38)
          to label %43 unwind label %47

43:                                               ; preds = %41
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #4
  br label %44

44:                                               ; preds = %43
  %45 = load i32, ptr %5, align 4, !tbaa !5
  %46 = add nsw i32 %45, 1
  store i32 %46, ptr %5, align 4, !tbaa !5
  br label %21, !llvm.loop !9

47:                                               ; preds = %41, %36
  %48 = landingpad { ptr, i32 }
          cleanup
  %49 = extractvalue { ptr, i32 } %48, 0
  store ptr %49, ptr %3, align 8
  %50 = extractvalue { ptr, i32 } %48, 1
  store i32 %50, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #4
  br label %51

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

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

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

56:                                               ; preds = %53
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  br label %68

57:                                               ; preds = %53
  %58 = load i32, ptr %7, align 4, !tbaa !5
  %59 = add nsw i32 %58, 1
  invoke void @_ZN9__gnu_cxx4ropeIiSaIiEE9push_backEi(ptr noundef nonnull align 8 dereferenceable(8) %1, i32 noundef %59)
          to label %60 unwind label %64

60:                                               ; preds = %57
  br label %61

61:                                               ; preds = %60
  %62 = load i32, ptr %7, align 4, !tbaa !5
  %63 = add nsw i32 %62, 1
  store i32 %63, ptr %7, align 4, !tbaa !5
  br label %53, !llvm.loop !11

64:                                               ; preds = %57
  %65 = landingpad { ptr, i32 }
          cleanup
  %66 = extractvalue { ptr, i32 } %65, 0
  store ptr %66, ptr %3, align 8
  %67 = extractvalue { ptr, i32 } %65, 1
  store i32 %67, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  br label %176

68:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  invoke void @_ZNK9__gnu_cxx4ropeIiSaIiEE6substrEmm(ptr dead_on_unwind writable sret(%"class.__gnu_cxx::rope") align 8 %8, ptr noundef nonnull align 8 dereferenceable(8) %1, i64 noundef 1, i64 noundef 2)
          to label %69 unwind label %77

69:                                               ; preds = %68
  invoke void @_ZN9__gnu_cxx4ropeIiSaIiEE5eraseEmm(ptr noundef nonnull align 8 dereferenceable(8) %1, i64 noundef 1, i64 noundef 3)
          to label %70 unwind label %81

70:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 160, ptr %9) #4
  invoke void @_ZN9__gnu_cxx4ropeIiSaIiEE13mutable_beginEv(ptr dead_on_unwind writable sret(%"class.__gnu_cxx::_Rope_iterator") align 8 %9, ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %71 unwind label %85

71:                                               ; preds = %70
  br label %72

72:                                               ; preds = %105, %71
  call void @llvm.lifetime.start.p0(i64 160, ptr %10) #4
  invoke void @_ZN9__gnu_cxx4ropeIiSaIiEE11mutable_endEv(ptr dead_on_unwind writable sret(%"class.__gnu_cxx::_Rope_iterator") align 8 %10, ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %73 unwind label %89

73:                                               ; preds = %72
  %74 = invoke noundef zeroext i1 @_ZN9__gnu_cxxneIiSaIiEEEbRKNS_14_Rope_iteratorIT_T0_EES7_(ptr noundef nonnull align 8 dereferenceable(160) %9, ptr noundef nonnull align 8 dereferenceable(160) %10)
          to label %75 unwind label %93

75:                                               ; preds = %73
  call void @_ZN9__gnu_cxx14_Rope_iteratorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(160) %10) #4
  call void @llvm.lifetime.end.p0(i64 160, ptr %10) #4
  br i1 %74, label %98, label %76

76:                                               ; preds = %75
  call void @_ZN9__gnu_cxx14_Rope_iteratorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(160) %9) #4
  call void @llvm.lifetime.end.p0(i64 160, ptr %9) #4
  br label %121

77:                                               ; preds = %68
  %78 = landingpad { ptr, i32 }
          cleanup
  %79 = extractvalue { ptr, i32 } %78, 0
  store ptr %79, ptr %3, align 8
  %80 = extractvalue { ptr, i32 } %78, 1
  store i32 %80, ptr %4, align 4
  br label %175

81:                                               ; preds = %172, %125, %121, %69
  %82 = landingpad { ptr, i32 }
          cleanup
  %83 = extractvalue { ptr, i32 } %82, 0
  store ptr %83, ptr %3, align 8
  %84 = extractvalue { ptr, i32 } %82, 1
  store i32 %84, ptr %4, align 4
  br label %174

85:                                               ; preds = %70
  %86 = landingpad { ptr, i32 }
          cleanup
  %87 = extractvalue { ptr, i32 } %86, 0
  store ptr %87, ptr %3, align 8
  %88 = extractvalue { ptr, i32 } %86, 1
  store i32 %88, ptr %4, align 4
  br label %120

89:                                               ; preds = %72
  %90 = landingpad { ptr, i32 }
          cleanup
  %91 = extractvalue { ptr, i32 } %90, 0
  store ptr %91, ptr %3, align 8
  %92 = extractvalue { ptr, i32 } %90, 1
  store i32 %92, ptr %4, align 4
  br label %97

93:                                               ; preds = %73
  %94 = landingpad { ptr, i32 }
          cleanup
  %95 = extractvalue { ptr, i32 } %94, 0
  store ptr %95, ptr %3, align 8
  %96 = extractvalue { ptr, i32 } %94, 1
  store i32 %96, ptr %4, align 4
  call void @_ZN9__gnu_cxx14_Rope_iteratorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(160) %10) #4
  br label %97

97:                                               ; preds = %93, %89
  call void @llvm.lifetime.end.p0(i64 160, ptr %10) #4
  br label %119

98:                                               ; preds = %75
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr %12) #4
  invoke void @_ZN9__gnu_cxx14_Rope_iteratorIiSaIiEEdeEv(ptr dead_on_unwind writable sret(%"class.__gnu_cxx::_Rope_char_ref_proxy") align 8 %12, ptr noundef nonnull align 8 dereferenceable(160) %9)
          to label %99 unwind label %106

99:                                               ; preds = %98
  %100 = invoke noundef i32 @_ZNK9__gnu_cxx20_Rope_char_ref_proxyIiSaIiEEcviEv(ptr noundef nonnull align 8 dereferenceable(24) %12)
          to label %101 unwind label %106

101:                                              ; preds = %99
  store i32 %100, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %13) #4
  store i8 32, ptr %13, align 1, !tbaa !12
  invoke void @_Z2prIiJcEEvRKT_DpRKT0_(ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %102 unwind label %110

102:                                              ; preds = %101
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  br label %103

103:                                              ; preds = %102
  %104 = invoke noundef nonnull align 8 dereferenceable(160) ptr @_ZN9__gnu_cxx14_Rope_iteratorIiSaIiEEppEv(ptr noundef nonnull align 8 dereferenceable(160) %9)
          to label %105 unwind label %115

105:                                              ; preds = %103
  br label %72, !llvm.loop !13

106:                                              ; preds = %99, %98
  %107 = landingpad { ptr, i32 }
          cleanup
  %108 = extractvalue { ptr, i32 } %107, 0
  store ptr %108, ptr %3, align 8
  %109 = extractvalue { ptr, i32 } %107, 1
  store i32 %109, ptr %4, align 4
  br label %114

110:                                              ; preds = %101
  %111 = landingpad { ptr, i32 }
          cleanup
  %112 = extractvalue { ptr, i32 } %111, 0
  store ptr %112, ptr %3, align 8
  %113 = extractvalue { ptr, i32 } %111, 1
  store i32 %113, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #4
  br label %114

114:                                              ; preds = %110, %106
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  br label %119

115:                                              ; preds = %103
  %116 = landingpad { ptr, i32 }
          cleanup
  %117 = extractvalue { ptr, i32 } %116, 0
  store ptr %117, ptr %3, align 8
  %118 = extractvalue { ptr, i32 } %116, 1
  store i32 %118, ptr %4, align 4
  br label %119

119:                                              ; preds = %115, %114, %97
  call void @_ZN9__gnu_cxx14_Rope_iteratorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(160) %9) #4
  br label %120

120:                                              ; preds = %119, %85
  call void @llvm.lifetime.end.p0(i64 160, ptr %9) #4
  br label %174

121:                                              ; preds = %76
  invoke void @_Z2psv()
          to label %122 unwind label %81

122:                                              ; preds = %121
  call void @llvm.lifetime.start.p0(i64 160, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 160, ptr %16) #4
  invoke void @_ZN9__gnu_cxx4ropeIiSaIiEE13mutable_beginEv(ptr dead_on_unwind writable sret(%"class.__gnu_cxx::_Rope_iterator") align 8 %16, ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %123 unwind label %135

123:                                              ; preds = %122
  invoke void @_ZN9__gnu_cxxplIiSaIiEEENS_14_Rope_iteratorIT_T0_EERKS5_l(ptr dead_on_unwind writable sret(%"class.__gnu_cxx::_Rope_iterator") align 8 %15, ptr noundef nonnull align 8 dereferenceable(160) %16, i64 noundef 2)
          to label %124 unwind label %139

124:                                              ; preds = %123
  invoke void @_ZN9__gnu_cxx4ropeIiSaIiEE6insertERKNS_14_Rope_iteratorIiS1_EERKS2_(ptr dead_on_unwind writable sret(%"class.__gnu_cxx::_Rope_iterator") align 8 %14, ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(160) %15, ptr noundef nonnull align 8 dereferenceable(8) %8)
          to label %125 unwind label %143

125:                                              ; preds = %124
  call void @_ZN9__gnu_cxx14_Rope_iteratorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(160) %14) #4
  call void @_ZN9__gnu_cxx14_Rope_iteratorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(160) %15) #4
  call void @_ZN9__gnu_cxx14_Rope_iteratorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(160) %16) #4
  call void @llvm.lifetime.end.p0(i64 160, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 160, ptr %15) #4
  %126 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxxpLIiSaIiEEERNS_4ropeIT_T0_EES6_RKS5_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(8) %8)
          to label %127 unwind label %81

127:                                              ; preds = %125
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  store i32 0, ptr %17, align 4, !tbaa !5
  br label %128

128:                                              ; preds = %159, %127
  %129 = load i32, ptr %17, align 4, !tbaa !5
  %130 = invoke noundef i64 @_ZNK9__gnu_cxx4ropeIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %131 unwind label %149

131:                                              ; preds = %128
  %132 = trunc i64 %130 to i32
  %133 = icmp slt i32 %129, %132
  br i1 %133, label %153, label %134

134:                                              ; preds = %131
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  br label %172

135:                                              ; preds = %122
  %136 = landingpad { ptr, i32 }
          cleanup
  %137 = extractvalue { ptr, i32 } %136, 0
  store ptr %137, ptr %3, align 8
  %138 = extractvalue { ptr, i32 } %136, 1
  store i32 %138, ptr %4, align 4
  br label %148

139:                                              ; preds = %123
  %140 = landingpad { ptr, i32 }
          cleanup
  %141 = extractvalue { ptr, i32 } %140, 0
  store ptr %141, ptr %3, align 8
  %142 = extractvalue { ptr, i32 } %140, 1
  store i32 %142, ptr %4, align 4
  br label %147

143:                                              ; preds = %124
  %144 = landingpad { ptr, i32 }
          cleanup
  %145 = extractvalue { ptr, i32 } %144, 0
  store ptr %145, ptr %3, align 8
  %146 = extractvalue { ptr, i32 } %144, 1
  store i32 %146, ptr %4, align 4
  call void @_ZN9__gnu_cxx14_Rope_iteratorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(160) %15) #4
  br label %147

147:                                              ; preds = %143, %139
  call void @_ZN9__gnu_cxx14_Rope_iteratorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(160) %16) #4
  br label %148

148:                                              ; preds = %147, %135
  call void @llvm.lifetime.end.p0(i64 160, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 160, ptr %15) #4
  br label %174

149:                                              ; preds = %128
  %150 = landingpad { ptr, i32 }
          cleanup
  %151 = extractvalue { ptr, i32 } %150, 0
  store ptr %151, ptr %3, align 8
  %152 = extractvalue { ptr, i32 } %150, 1
  store i32 %152, ptr %4, align 4
  br label %171

153:                                              ; preds = %131
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  %154 = load i32, ptr %17, align 4, !tbaa !5
  %155 = sext i32 %154 to i64
  %156 = invoke noundef i32 @_ZNK9__gnu_cxx4ropeIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(8) %1, i64 noundef %155)
          to label %157 unwind label %162

157:                                              ; preds = %153
  store i32 %156, ptr %18, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %19) #4
  store i8 32, ptr %19, align 1, !tbaa !12
  invoke void @_Z2prIiJcEEvRKT_DpRKT0_(ptr noundef nonnull align 4 dereferenceable(4) %18, ptr noundef nonnull align 1 dereferenceable(1) %19)
          to label %158 unwind label %166

158:                                              ; preds = %157
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  br label %159

159:                                              ; preds = %158
  %160 = load i32, ptr %17, align 4, !tbaa !5
  %161 = add nsw i32 %160, 1
  store i32 %161, ptr %17, align 4, !tbaa !5
  br label %128, !llvm.loop !14

162:                                              ; preds = %153
  %163 = landingpad { ptr, i32 }
          cleanup
  %164 = extractvalue { ptr, i32 } %163, 0
  store ptr %164, ptr %3, align 8
  %165 = extractvalue { ptr, i32 } %163, 1
  store i32 %165, ptr %4, align 4
  br label %170

166:                                              ; preds = %157
  %167 = landingpad { ptr, i32 }
          cleanup
  %168 = extractvalue { ptr, i32 } %167, 0
  store ptr %168, ptr %3, align 8
  %169 = extractvalue { ptr, i32 } %167, 1
  store i32 %169, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #4
  br label %170

170:                                              ; preds = %166, %162
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  br label %171

171:                                              ; preds = %170, %149
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  br label %174

172:                                              ; preds = %134
  invoke void @_Z2psv()
          to label %173 unwind label %81

173:                                              ; preds = %172
  call void @_ZN9__gnu_cxx4ropeIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @_ZN9__gnu_cxx4ropeIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %1) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #4
  ret void

174:                                              ; preds = %171, %148, %120, %81
  call void @_ZN9__gnu_cxx4ropeIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #4
  br label %175

175:                                              ; preds = %174, %77
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  br label %176

176:                                              ; preds = %175, %64, %51
  call void @_ZN9__gnu_cxx4ropeIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %1) #4
  br label %177

177:                                              ; preds = %176, %28
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #4
  br label %178

178:                                              ; preds = %177
  %179 = load ptr, ptr %3, align 8
  %180 = load i32, ptr %4, align 4
  %181 = insertvalue { ptr, i32 } poison, ptr %179, 0
  %182 = insertvalue { ptr, i32 } %181, i32 %180, 1
  resume { ptr, i32 } %182
}

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK9__gnu_cxx4ropeIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9__gnu_cxx4ropeIiSaIiEE20mutable_reference_atEm(ptr dead_on_unwind noalias writable sret(%"class.__gnu_cxx::_Rope_char_ref_proxy") align 8, ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZN9__gnu_cxx20_Rope_char_ref_proxyIiSaIiEEaSEi(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK9__gnu_cxx4ropeIiSaIiEE6substrEmm(ptr dead_on_unwind noalias writable sret(%"class.__gnu_cxx::rope") align 8, ptr noundef nonnull align 8 dereferenceable(8), i64 noundef, i64 noundef) #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9__gnu_cxx4ropeIiSaIiEE13mutable_beginEv(ptr dead_on_unwind noalias writable sret(%"class.__gnu_cxx::_Rope_iterator") align 8, ptr noundef nonnull align 8 dereferenceable(8)) #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIiSaIiEEEbRKNS_14_Rope_iteratorIT_T0_EES7_(ptr noundef nonnull align 8 dereferenceable(160), ptr noundef nonnull align 8 dereferenceable(160)) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9__gnu_cxx4ropeIiSaIiEE11mutable_endEv(ptr dead_on_unwind noalias writable sret(%"class.__gnu_cxx::_Rope_iterator") align 8, ptr noundef nonnull align 8 dereferenceable(8)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9__gnu_cxx14_Rope_iteratorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(160)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z2prIiJcEEvRKT_DpRKT0_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 1 dereferenceable(1)) #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9__gnu_cxx14_Rope_iteratorIiSaIiEEdeEv(ptr dead_on_unwind noalias writable sret(%"class.__gnu_cxx::_Rope_char_ref_proxy") align 8, ptr noundef nonnull align 8 dereferenceable(160)) #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZNK9__gnu_cxx20_Rope_char_ref_proxyIiSaIiEEcviEv(ptr noundef nonnull align 8 dereferenceable(24)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(160) ptr @_ZN9__gnu_cxx14_Rope_iteratorIiSaIiEEppEv(ptr noundef nonnull align 8 dereferenceable(160)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9__gnu_cxx4ropeIiSaIiEE6insertERKNS_14_Rope_iteratorIiS1_EERKS2_(ptr dead_on_unwind noalias writable sret(%"class.__gnu_cxx::_Rope_iterator") align 8, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(160), ptr noundef nonnull align 8 dereferenceable(8)) #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN9__gnu_cxxplIiSaIiEEENS_14_Rope_iteratorIT_T0_EERKS5_l(ptr dead_on_unwind noalias writable sret(%"class.__gnu_cxx::_Rope_iterator") align 8, ptr noundef nonnull align 8 dereferenceable(160), i64 noundef) #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxxpLIiSaIiEEERNS_4ropeIT_T0_EES6_RKS5_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK9__gnu_cxx4ropeIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #1 align 2

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 = { 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 #3 = { 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 #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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = !{!7, !7, i64 0}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}


; 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.__gnu_cxx::rope" = type { %"struct.__gnu_cxx::_Rope_base" }
%"struct.__gnu_cxx::_Rope_base" = type { ptr }
%"class.std::allocator.3" = type { i8 }
%"class.__gnu_cxx::_Rope_char_ref_proxy" = type { i64, i32, i8, ptr }
%"class.__gnu_cxx::_Rope_iterator" = type { %"class.__gnu_cxx::_Rope_iterator_base.base", ptr }
%"class.__gnu_cxx::_Rope_iterator_base.base" = type <{ i64, ptr, i64, ptr, ptr, ptr, [4 x ptr], i32, i8, [3 x i8], [15 x i32] }>

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z2psv() local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z11ropeExamplev() local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.__gnu_cxx::rope", align 8
  %2 = alloca %"class.std::allocator.3", align 1
  %3 = alloca %"class.__gnu_cxx::_Rope_char_ref_proxy", align 8
  %4 = alloca %"class.__gnu_cxx::rope", align 8
  %5 = alloca %"class.__gnu_cxx::_Rope_iterator", align 8
  %6 = alloca %"class.__gnu_cxx::_Rope_iterator", align 8
  %7 = alloca i32, align 4
  %8 = alloca %"class.__gnu_cxx::_Rope_char_ref_proxy", align 8
  %9 = alloca i8, align 1
  %10 = alloca %"class.__gnu_cxx::_Rope_iterator", align 8
  %11 = alloca %"class.__gnu_cxx::_Rope_iterator", align 8
  %12 = alloca %"class.__gnu_cxx::_Rope_iterator", align 8
  %13 = alloca i32, align 4
  %14 = alloca i8, align 1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %2) #4
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %2) #4
  invoke void @_ZN9__gnu_cxx4ropeIiSaIiEEC2EmiRKS1_(ptr noundef nonnull align 8 dereferenceable(8) %1, i64 noundef 5, i32 noundef 0, ptr noundef nonnull align 1 dereferenceable(1) %2)
          to label %15 unwind label %19

15:                                               ; preds = %0
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %2) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %2) #4
  %16 = call noundef i64 @_ZNK9__gnu_cxx4ropeIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
  %17 = trunc i64 %16 to i32
  %18 = icmp sgt i32 %17, 0
  br i1 %18, label %.lr.ph, label %.preheader42.preheader

.preheader42.preheader:                           ; preds = %24, %15
  br label %.preheader42

19:                                               ; preds = %0
  %20 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %2) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %2) #4
  br label %98

.lr.ph:                                           ; preds = %15, %24
  %indvars.iv = phi i64 [ %indvars.iv.next, %24 ], [ 0, %15 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #4
  invoke void @_ZN9__gnu_cxx4ropeIiSaIiEE20mutable_reference_atEm(ptr dead_on_unwind nonnull writable sret(%"class.__gnu_cxx::_Rope_char_ref_proxy") align 8 %3, ptr noundef nonnull align 8 dereferenceable(8) %1, i64 noundef %indvars.iv)
          to label %21 unwind label %28

21:                                               ; preds = %.lr.ph
  %22 = trunc nuw nsw i64 %indvars.iv.next to i32
  %23 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN9__gnu_cxx20_Rope_char_ref_proxyIiSaIiEEaSEi(ptr noundef nonnull align 8 dereferenceable(24) %3, i32 noundef %22)
          to label %24 unwind label %28

24:                                               ; preds = %21
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #4
  %25 = call noundef i64 @_ZNK9__gnu_cxx4ropeIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
  %sext = shl i64 %25, 32
  %26 = ashr exact i64 %sext, 32
  %27 = icmp slt i64 %indvars.iv.next, %26
  br i1 %27, label %.lr.ph, label %.preheader42.preheader, !llvm.loop !5

28:                                               ; preds = %21, %.lr.ph
  %29 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #4
  br label %97

.preheader42:                                     ; preds = %.preheader42.preheader, %31
  %.011 = phi i32 [ %32, %31 ], [ 0, %.preheader42.preheader ]
  %exitcond.not = icmp eq i32 %.011, 5
  br i1 %exitcond.not, label %30, label %31

30:                                               ; preds = %.preheader42
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  invoke void @_ZNK9__gnu_cxx4ropeIiSaIiEE6substrEmm(ptr dead_on_unwind nonnull writable sret(%"class.__gnu_cxx::rope") align 8 %4, ptr noundef nonnull align 8 dereferenceable(8) %1, i64 noundef 1, i64 noundef 2)
          to label %35 unwind label %41

31:                                               ; preds = %.preheader42
  %32 = add nuw nsw i32 %.011, 1
  invoke void @_ZN9__gnu_cxx4ropeIiSaIiEE9push_backEi(ptr noundef nonnull align 8 dereferenceable(8) %1, i32 noundef %32)
          to label %.preheader42 unwind label %33, !llvm.loop !7

33:                                               ; preds = %31
  %34 = landingpad { ptr, i32 }
          cleanup
  br label %97

35:                                               ; preds = %30
  invoke void @_ZN9__gnu_cxx4ropeIiSaIiEE5eraseEmm(ptr noundef nonnull align 8 dereferenceable(8) %1, i64 noundef 1, i64 noundef 3)
          to label %36 unwind label %43

36:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 160, ptr nonnull %5) #4
  invoke void @_ZN9__gnu_cxx4ropeIiSaIiEE13mutable_beginEv(ptr dead_on_unwind nonnull writable sret(%"class.__gnu_cxx::_Rope_iterator") align 8 %5, ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %.preheader41 unwind label %45

.preheader41:                                     ; preds = %36, %56
  call void @llvm.lifetime.start.p0(i64 160, ptr nonnull %6) #4
  invoke void @_ZN9__gnu_cxx4ropeIiSaIiEE11mutable_endEv(ptr dead_on_unwind nonnull writable sret(%"class.__gnu_cxx::_Rope_iterator") align 8 %6, ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %37 unwind label %47

37:                                               ; preds = %.preheader41
  %38 = invoke noundef zeroext i1 @_ZN9__gnu_cxxneIiSaIiEEEbRKNS_14_Rope_iteratorIT_T0_EES7_(ptr noundef nonnull align 8 dereferenceable(160) %5, ptr noundef nonnull align 8 dereferenceable(160) %6)
          to label %39 unwind label %49

39:                                               ; preds = %37
  call void @_ZN9__gnu_cxx14_Rope_iteratorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(160) %6) #4
  call void @llvm.lifetime.end.p0(i64 160, ptr nonnull %6) #4
  br i1 %38, label %52, label %40

40:                                               ; preds = %39
  call void @_ZN9__gnu_cxx14_Rope_iteratorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(160) %5) #4
  call void @llvm.lifetime.end.p0(i64 160, ptr nonnull %5) #4
  invoke void @_Z2psv()
          to label %67 unwind label %43

41:                                               ; preds = %30
  %42 = landingpad { ptr, i32 }
          cleanup
  br label %96

43:                                               ; preds = %._crit_edge, %70, %40, %35
  %44 = landingpad { ptr, i32 }
          cleanup
  br label %95

45:                                               ; preds = %36
  %46 = landingpad { ptr, i32 }
          cleanup
  br label %66

47:                                               ; preds = %.preheader41
  %48 = landingpad { ptr, i32 }
          cleanup
  br label %51

49:                                               ; preds = %37
  %50 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN9__gnu_cxx14_Rope_iteratorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(160) %6) #4
  br label %51

51:                                               ; preds = %49, %47
  %.pn = phi { ptr, i32 } [ %50, %49 ], [ %48, %47 ]
  call void @llvm.lifetime.end.p0(i64 160, ptr nonnull %6) #4
  br label %65

52:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #4
  invoke void @_ZN9__gnu_cxx14_Rope_iteratorIiSaIiEEdeEv(ptr dead_on_unwind nonnull writable sret(%"class.__gnu_cxx::_Rope_char_ref_proxy") align 8 %8, ptr noundef nonnull align 8 dereferenceable(160) %5)
          to label %53 unwind label %58

53:                                               ; preds = %52
  %54 = invoke noundef i32 @_ZNK9__gnu_cxx20_Rope_char_ref_proxyIiSaIiEEcviEv(ptr noundef nonnull align 8 dereferenceable(24) %8)
          to label %55 unwind label %58

55:                                               ; preds = %53
  store i32 %54, ptr %7, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %9) #4
  store i8 32, ptr %9, align 1, !tbaa !12
  invoke void @_Z2prIiJcEEvRKT_DpRKT0_(ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %56 unwind label %60

56:                                               ; preds = %55
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #4
  %57 = invoke noundef nonnull align 8 dereferenceable(160) ptr @_ZN9__gnu_cxx14_Rope_iteratorIiSaIiEEppEv(ptr noundef nonnull align 8 dereferenceable(160) %5)
          to label %.preheader41 unwind label %63, !llvm.loop !13

58:                                               ; preds = %53, %52
  %59 = landingpad { ptr, i32 }
          cleanup
  br label %62

60:                                               ; preds = %55
  %61 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #4
  br label %62

62:                                               ; preds = %60, %58
  %.pn31 = phi { ptr, i32 } [ %61, %60 ], [ %59, %58 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #4
  br label %65

63:                                               ; preds = %56
  %64 = landingpad { ptr, i32 }
          cleanup
  br label %65

65:                                               ; preds = %63, %62, %51
  %.pn33 = phi { ptr, i32 } [ %64, %63 ], [ %.pn31, %62 ], [ %.pn, %51 ]
  call void @_ZN9__gnu_cxx14_Rope_iteratorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(160) %5) #4
  br label %66

66:                                               ; preds = %65, %45
  %.pn33.pn = phi { ptr, i32 } [ %.pn33, %65 ], [ %46, %45 ]
  call void @llvm.lifetime.end.p0(i64 160, ptr nonnull %5) #4
  br label %95

67:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 160, ptr nonnull %11) #4
  call void @llvm.lifetime.start.p0(i64 160, ptr nonnull %12) #4
  invoke void @_ZN9__gnu_cxx4ropeIiSaIiEE13mutable_beginEv(ptr dead_on_unwind nonnull writable sret(%"class.__gnu_cxx::_Rope_iterator") align 8 %12, ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %68 unwind label %75

68:                                               ; preds = %67
  invoke void @_ZN9__gnu_cxxplIiSaIiEEENS_14_Rope_iteratorIT_T0_EERKS5_l(ptr dead_on_unwind nonnull writable sret(%"class.__gnu_cxx::_Rope_iterator") align 8 %11, ptr noundef nonnull align 8 dereferenceable(160) %12, i64 noundef 2)
          to label %69 unwind label %77

69:                                               ; preds = %68
  invoke void @_ZN9__gnu_cxx4ropeIiSaIiEE6insertERKNS_14_Rope_iteratorIiS1_EERKS2_(ptr dead_on_unwind nonnull writable sret(%"class.__gnu_cxx::_Rope_iterator") align 8 %10, ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(160) %11, ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %70 unwind label %79

70:                                               ; preds = %69
  call void @_ZN9__gnu_cxx14_Rope_iteratorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(160) %10) #4
  call void @_ZN9__gnu_cxx14_Rope_iteratorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(160) %11) #4
  call void @_ZN9__gnu_cxx14_Rope_iteratorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(160) %12) #4
  call void @llvm.lifetime.end.p0(i64 160, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 160, ptr nonnull %11) #4
  %71 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxxpLIiSaIiEEERNS_4ropeIT_T0_EES6_RKS5_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %.preheader unwind label %43

.preheader:                                       ; preds = %70
  %72 = call noundef i64 @_ZNK9__gnu_cxx4ropeIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
  %73 = trunc i64 %72 to i32
  %74 = icmp sgt i32 %73, 0
  br i1 %74, label %.lr.ph45, label %._crit_edge

._crit_edge:                                      ; preds = %85, %.preheader
  invoke void @_Z2psv()
          to label %94 unwind label %43

75:                                               ; preds = %67
  %76 = landingpad { ptr, i32 }
          cleanup
  br label %82

77:                                               ; preds = %68
  %78 = landingpad { ptr, i32 }
          cleanup
  br label %81

79:                                               ; preds = %69
  %80 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN9__gnu_cxx14_Rope_iteratorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(160) %11) #4
  br label %81

81:                                               ; preds = %79, %77
  %.pn26 = phi { ptr, i32 } [ %80, %79 ], [ %78, %77 ]
  call void @_ZN9__gnu_cxx14_Rope_iteratorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(160) %12) #4
  br label %82

82:                                               ; preds = %81, %75
  %.pn26.pn = phi { ptr, i32 } [ %.pn26, %81 ], [ %76, %75 ]
  call void @llvm.lifetime.end.p0(i64 160, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 160, ptr nonnull %11) #4
  br label %95

.lr.ph45:                                         ; preds = %.preheader, %85
  %indvars.iv47 = phi i64 [ %indvars.iv.next48, %85 ], [ 0, %.preheader ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #4
  %83 = invoke noundef i32 @_ZNK9__gnu_cxx4ropeIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(8) %1, i64 noundef %indvars.iv47)
          to label %84 unwind label %89

84:                                               ; preds = %.lr.ph45
  store i32 %83, ptr %13, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %14) #4
  store i8 32, ptr %14, align 1, !tbaa !12
  invoke void @_Z2prIiJcEEvRKT_DpRKT0_(ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef nonnull align 1 dereferenceable(1) %14)
          to label %85 unwind label %91

85:                                               ; preds = %84
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #4
  %indvars.iv.next48 = add nuw nsw i64 %indvars.iv47, 1
  %86 = call noundef i64 @_ZNK9__gnu_cxx4ropeIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
  %sext50 = shl i64 %86, 32
  %87 = ashr exact i64 %sext50, 32
  %88 = icmp slt i64 %indvars.iv.next48, %87
  br i1 %88, label %.lr.ph45, label %._crit_edge, !llvm.loop !14

89:                                               ; preds = %.lr.ph45
  %90 = landingpad { ptr, i32 }
          cleanup
  br label %93

91:                                               ; preds = %84
  %92 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %14) #4
  br label %93

93:                                               ; preds = %91, %89
  %.pn29 = phi { ptr, i32 } [ %92, %91 ], [ %90, %89 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #4
  br label %95

94:                                               ; preds = %._crit_edge
  call void @_ZN9__gnu_cxx4ropeIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  call void @_ZN9__gnu_cxx4ropeIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %1) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #4
  ret void

95:                                               ; preds = %93, %82, %66, %43
  %.pn33.pn.pn = phi { ptr, i32 } [ %.pn33.pn, %66 ], [ %.pn29, %93 ], [ %44, %43 ], [ %.pn26.pn, %82 ]
  call void @_ZN9__gnu_cxx4ropeIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  br label %96

96:                                               ; preds = %95, %41
  %.pn33.pn.pn.pn = phi { ptr, i32 } [ %.pn33.pn.pn, %95 ], [ %42, %41 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  br label %97

97:                                               ; preds = %96, %33, %28
  %.pn38 = phi { ptr, i32 } [ %29, %28 ], [ %34, %33 ], [ %.pn33.pn.pn.pn, %96 ]
  call void @_ZN9__gnu_cxx4ropeIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %1) #4
  br label %98

98:                                               ; preds = %97, %19
  %.pn38.pn = phi { ptr, i32 } [ %.pn38, %97 ], [ %20, %19 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #4
  resume { ptr, i32 } %.pn38.pn
}

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK9__gnu_cxx4ropeIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9__gnu_cxx4ropeIiSaIiEE20mutable_reference_atEm(ptr dead_on_unwind noalias writable sret(%"class.__gnu_cxx::_Rope_char_ref_proxy") align 8, ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZN9__gnu_cxx20_Rope_char_ref_proxyIiSaIiEEaSEi(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9__gnu_cxx4ropeIiSaIiEE9push_backEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK9__gnu_cxx4ropeIiSaIiEE6substrEmm(ptr dead_on_unwind noalias writable sret(%"class.__gnu_cxx::rope") align 8, ptr noundef nonnull align 8 dereferenceable(8), i64 noundef, i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9__gnu_cxx4ropeIiSaIiEE5eraseEmm(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef, i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9__gnu_cxx4ropeIiSaIiEE13mutable_beginEv(ptr dead_on_unwind noalias writable sret(%"class.__gnu_cxx::_Rope_iterator") align 8, ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIiSaIiEEEbRKNS_14_Rope_iteratorIT_T0_EES7_(ptr noundef nonnull align 8 dereferenceable(160), ptr noundef nonnull align 8 dereferenceable(160)) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9__gnu_cxx4ropeIiSaIiEE11mutable_endEv(ptr dead_on_unwind noalias writable sret(%"class.__gnu_cxx::_Rope_iterator") align 8, ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9__gnu_cxx14_Rope_iteratorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(160)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z2prIiJcEEvRKT_DpRKT0_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9__gnu_cxx14_Rope_iteratorIiSaIiEEdeEv(ptr dead_on_unwind noalias writable sret(%"class.__gnu_cxx::_Rope_char_ref_proxy") align 8, ptr noundef nonnull align 8 dereferenceable(160)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZNK9__gnu_cxx20_Rope_char_ref_proxyIiSaIiEEcviEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(160) ptr @_ZN9__gnu_cxx14_Rope_iteratorIiSaIiEEppEv(ptr noundef nonnull align 8 dereferenceable(160)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9__gnu_cxx4ropeIiSaIiEE6insertERKNS_14_Rope_iteratorIiS1_EERKS2_(ptr dead_on_unwind noalias writable sret(%"class.__gnu_cxx::_Rope_iterator") align 8, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(160), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN9__gnu_cxxplIiSaIiEEENS_14_Rope_iteratorIT_T0_EERKS5_l(ptr dead_on_unwind noalias writable sret(%"class.__gnu_cxx::_Rope_iterator") align 8, ptr noundef nonnull align 8 dereferenceable(160), i64 noundef) local_unnamed_addr #3

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK9__gnu_cxx4ropeIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) local_unnamed_addr #1 align 2

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 = { 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 #3 = { 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 #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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = distinct !{!7, !6}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!10, !10, i64 0}
!13 = distinct !{!13, !6}
!14 = distinct !{!14, !6}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass