; LLVM IR from lzyrapx/Competitive-Programming :: LibreOJ (105（rope）（区间翻转）)

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

@rop = external dso_local global %"class.__gnu_cxx::rope", align 8
@rp = external dso_local global %"class.__gnu_cxx::rope", align 8
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [5 x i8], align 1

; 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 nounwind uwtable
declare dso_local void @_ZN9__gnu_cxx4ropeIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #1 align 2

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #2 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca %"class.__gnu_cxx::rope", align 8
  %9 = alloca %"class.__gnu_cxx::rope", align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca %"class.__gnu_cxx::rope", align 8
  %13 = alloca %"class.__gnu_cxx::rope", align 8
  %14 = alloca %"class.__gnu_cxx::rope", align 8
  %15 = alloca %"class.__gnu_cxx::rope", align 8
  %16 = alloca %"class.__gnu_cxx::rope", align 8
  %17 = alloca %"class.__gnu_cxx::rope", align 8
  %18 = alloca %"class.__gnu_cxx::rope", align 8
  %19 = alloca %"class.__gnu_cxx::rope", align 8
  %20 = alloca i8, align 1
  %21 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  %22 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %2, ptr noundef %3)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  store i32 1, ptr %4, align 4, !tbaa !5
  br label %23

23:                                               ; preds = %34, %0
  %24 = load i32, ptr %4, align 4, !tbaa !5
  %25 = load i32, ptr %2, align 4, !tbaa !5
  %26 = icmp sle i32 %24, %25
  br i1 %26, label %28, label %27

27:                                               ; preds = %23
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  br label %37

28:                                               ; preds = %23
  %29 = load i32, ptr %2, align 4, !tbaa !5
  %30 = load i32, ptr %4, align 4, !tbaa !5
  %31 = sub nsw i32 %29, %30
  %32 = add nsw i32 %31, 1
  call void @_ZN9__gnu_cxx4ropeIiSaIiEE9push_backEi(ptr noundef nonnull align 8 dereferenceable(8) @rop, i32 noundef %32)
  %33 = load i32, ptr %4, align 4, !tbaa !5
  call void @_ZN9__gnu_cxx4ropeIiSaIiEE9push_backEi(ptr noundef nonnull align 8 dereferenceable(8) @rp, i32 noundef %33)
  br label %34

34:                                               ; preds = %28
  %35 = load i32, ptr %4, align 4, !tbaa !5
  %36 = add nsw i32 %35, 1
  store i32 %36, ptr %4, align 4, !tbaa !5
  br label %23, !llvm.loop !9

37:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  store i32 1, ptr %5, align 4, !tbaa !5
  br label %38

38:                                               ; preds = %96, %37
  %39 = load i32, ptr %5, align 4, !tbaa !5
  %40 = load i32, ptr %3, align 4, !tbaa !5
  %41 = icmp sle i32 %39, %40
  br i1 %41, label %43, label %42

42:                                               ; preds = %38
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  br label %153

43:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  %44 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %6, ptr noundef %7)
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %45 = load i32, ptr %6, align 4, !tbaa !5
  %46 = sub nsw i32 %45, 1
  %47 = sext i32 %46 to i64
  %48 = load i32, ptr %7, align 4, !tbaa !5
  %49 = load i32, ptr %6, align 4, !tbaa !5
  %50 = sub nsw i32 %48, %49
  %51 = add nsw i32 %50, 1
  %52 = sext i32 %51 to i64
  call void @_ZNK9__gnu_cxx4ropeIiSaIiEE6substrEmm(ptr dead_on_unwind writable sret(%"class.__gnu_cxx::rope") align 8 %8, ptr noundef nonnull align 8 dereferenceable(8) @rp, i64 noundef %47, i64 noundef %52)
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %53 = load i32, ptr %2, align 4, !tbaa !5
  %54 = load i32, ptr %7, align 4, !tbaa !5
  %55 = sub nsw i32 %53, %54
  %56 = sext i32 %55 to i64
  %57 = load i32, ptr %7, align 4, !tbaa !5
  %58 = load i32, ptr %6, align 4, !tbaa !5
  %59 = sub nsw i32 %57, %58
  %60 = add nsw i32 %59, 1
  %61 = sext i32 %60 to i64
  invoke void @_ZNK9__gnu_cxx4ropeIiSaIiEE6substrEmm(ptr dead_on_unwind writable sret(%"class.__gnu_cxx::rope") align 8 %9, ptr noundef nonnull align 8 dereferenceable(8) @rop, i64 noundef %56, i64 noundef %61)
          to label %62 unwind label %99

62:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %63 = load i32, ptr %6, align 4, !tbaa !5
  %64 = sub nsw i32 %63, 1
  %65 = sext i32 %64 to i64
  invoke void @_ZNK9__gnu_cxx4ropeIiSaIiEE6substrEmm(ptr dead_on_unwind writable sret(%"class.__gnu_cxx::rope") align 8 %14, ptr noundef nonnull align 8 dereferenceable(8) @rp, i64 noundef 0, i64 noundef %65)
          to label %66 unwind label %103

66:                                               ; preds = %62
  invoke void @_ZN9__gnu_cxxplIiSaIiEEENS_4ropeIT_T0_EERKS5_S7_(ptr dead_on_unwind writable sret(%"class.__gnu_cxx::rope") align 8 %13, ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %67 unwind label %107

67:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %68 = load i32, ptr %7, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = load i32, ptr %2, align 4, !tbaa !5
  %71 = load i32, ptr %7, align 4, !tbaa !5
  %72 = sub nsw i32 %70, %71
  %73 = sext i32 %72 to i64
  invoke void @_ZNK9__gnu_cxx4ropeIiSaIiEE6substrEmm(ptr dead_on_unwind writable sret(%"class.__gnu_cxx::rope") align 8 %15, ptr noundef nonnull align 8 dereferenceable(8) @rp, i64 noundef %69, i64 noundef %73)
          to label %74 unwind label %111

74:                                               ; preds = %67
  invoke void @_ZN9__gnu_cxxplIiSaIiEEENS_4ropeIT_T0_EERKS5_S7_(ptr dead_on_unwind writable sret(%"class.__gnu_cxx::rope") align 8 %12, ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %15)
          to label %75 unwind label %115

75:                                               ; preds = %74
  %76 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx4ropeIiSaIiEEaSERKS2_(ptr noundef nonnull align 8 dereferenceable(8) @rp, ptr noundef nonnull align 8 dereferenceable(8) %12)
          to label %77 unwind label %119

77:                                               ; preds = %75
  call void @_ZN9__gnu_cxx4ropeIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #6
  call void @_ZN9__gnu_cxx4ropeIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @_ZN9__gnu_cxx4ropeIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %13) #6
  call void @_ZN9__gnu_cxx4ropeIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  %78 = load i32, ptr %2, align 4, !tbaa !5
  %79 = load i32, ptr %7, align 4, !tbaa !5
  %80 = sub nsw i32 %78, %79
  %81 = sext i32 %80 to i64
  invoke void @_ZNK9__gnu_cxx4ropeIiSaIiEE6substrEmm(ptr dead_on_unwind writable sret(%"class.__gnu_cxx::rope") align 8 %18, ptr noundef nonnull align 8 dereferenceable(8) @rop, i64 noundef 0, i64 noundef %81)
          to label %82 unwind label %127

82:                                               ; preds = %77
  invoke void @_ZN9__gnu_cxxplIiSaIiEEENS_4ropeIT_T0_EERKS5_S7_(ptr dead_on_unwind writable sret(%"class.__gnu_cxx::rope") align 8 %17, ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull align 8 dereferenceable(8) %8)
          to label %83 unwind label %131

83:                                               ; preds = %82
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  %84 = load i32, ptr %2, align 4, !tbaa !5
  %85 = load i32, ptr %6, align 4, !tbaa !5
  %86 = sub nsw i32 %84, %85
  %87 = add nsw i32 %86, 1
  %88 = sext i32 %87 to i64
  %89 = load i32, ptr %6, align 4, !tbaa !5
  %90 = sub nsw i32 %89, 1
  %91 = sext i32 %90 to i64
  invoke void @_ZNK9__gnu_cxx4ropeIiSaIiEE6substrEmm(ptr dead_on_unwind writable sret(%"class.__gnu_cxx::rope") align 8 %19, ptr noundef nonnull align 8 dereferenceable(8) @rop, i64 noundef %88, i64 noundef %91)
          to label %92 unwind label %135

92:                                               ; preds = %83
  invoke void @_ZN9__gnu_cxxplIiSaIiEEENS_4ropeIT_T0_EERKS5_S7_(ptr dead_on_unwind writable sret(%"class.__gnu_cxx::rope") align 8 %16, ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 8 dereferenceable(8) %19)
          to label %93 unwind label %139

93:                                               ; preds = %92
  %94 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx4ropeIiSaIiEEaSERKS2_(ptr noundef nonnull align 8 dereferenceable(8) @rop, ptr noundef nonnull align 8 dereferenceable(8) %16)
          to label %95 unwind label %143

95:                                               ; preds = %93
  call void @_ZN9__gnu_cxx4ropeIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %16) #6
  call void @_ZN9__gnu_cxx4ropeIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  call void @_ZN9__gnu_cxx4ropeIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %17) #6
  call void @_ZN9__gnu_cxx4ropeIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @_ZN9__gnu_cxx4ropeIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @_ZN9__gnu_cxx4ropeIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %96

96:                                               ; preds = %95
  %97 = load i32, ptr %5, align 4, !tbaa !5
  %98 = add nsw i32 %97, 1
  store i32 %98, ptr %5, align 4, !tbaa !5
  br label %38, !llvm.loop !11

99:                                               ; preds = %43
  %100 = landingpad { ptr, i32 }
          cleanup
  %101 = extractvalue { ptr, i32 } %100, 0
  store ptr %101, ptr %10, align 8
  %102 = extractvalue { ptr, i32 } %100, 1
  store i32 %102, ptr %11, align 4
  br label %152

103:                                              ; preds = %62
  %104 = landingpad { ptr, i32 }
          cleanup
  %105 = extractvalue { ptr, i32 } %104, 0
  store ptr %105, ptr %10, align 8
  %106 = extractvalue { ptr, i32 } %104, 1
  store i32 %106, ptr %11, align 4
  br label %126

107:                                              ; preds = %66
  %108 = landingpad { ptr, i32 }
          cleanup
  %109 = extractvalue { ptr, i32 } %108, 0
  store ptr %109, ptr %10, align 8
  %110 = extractvalue { ptr, i32 } %108, 1
  store i32 %110, ptr %11, align 4
  br label %125

111:                                              ; preds = %67
  %112 = landingpad { ptr, i32 }
          cleanup
  %113 = extractvalue { ptr, i32 } %112, 0
  store ptr %113, ptr %10, align 8
  %114 = extractvalue { ptr, i32 } %112, 1
  store i32 %114, ptr %11, align 4
  br label %124

115:                                              ; preds = %74
  %116 = landingpad { ptr, i32 }
          cleanup
  %117 = extractvalue { ptr, i32 } %116, 0
  store ptr %117, ptr %10, align 8
  %118 = extractvalue { ptr, i32 } %116, 1
  store i32 %118, ptr %11, align 4
  br label %123

119:                                              ; preds = %75
  %120 = landingpad { ptr, i32 }
          cleanup
  %121 = extractvalue { ptr, i32 } %120, 0
  store ptr %121, ptr %10, align 8
  %122 = extractvalue { ptr, i32 } %120, 1
  store i32 %122, ptr %11, align 4
  call void @_ZN9__gnu_cxx4ropeIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #6
  br label %123

123:                                              ; preds = %119, %115
  call void @_ZN9__gnu_cxx4ropeIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %15) #6
  br label %124

124:                                              ; preds = %123, %111
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @_ZN9__gnu_cxx4ropeIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %13) #6
  br label %125

125:                                              ; preds = %124, %107
  call void @_ZN9__gnu_cxx4ropeIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %14) #6
  br label %126

126:                                              ; preds = %125, %103
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %151

127:                                              ; preds = %77
  %128 = landingpad { ptr, i32 }
          cleanup
  %129 = extractvalue { ptr, i32 } %128, 0
  store ptr %129, ptr %10, align 8
  %130 = extractvalue { ptr, i32 } %128, 1
  store i32 %130, ptr %11, align 4
  br label %150

131:                                              ; preds = %82
  %132 = landingpad { ptr, i32 }
          cleanup
  %133 = extractvalue { ptr, i32 } %132, 0
  store ptr %133, ptr %10, align 8
  %134 = extractvalue { ptr, i32 } %132, 1
  store i32 %134, ptr %11, align 4
  br label %149

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

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

143:                                              ; preds = %93
  %144 = landingpad { ptr, i32 }
          cleanup
  %145 = extractvalue { ptr, i32 } %144, 0
  store ptr %145, ptr %10, align 8
  %146 = extractvalue { ptr, i32 } %144, 1
  store i32 %146, ptr %11, align 4
  call void @_ZN9__gnu_cxx4ropeIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %16) #6
  br label %147

147:                                              ; preds = %143, %139
  call void @_ZN9__gnu_cxx4ropeIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %19) #6
  br label %148

148:                                              ; preds = %147, %135
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  call void @_ZN9__gnu_cxx4ropeIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %17) #6
  br label %149

149:                                              ; preds = %148, %131
  call void @_ZN9__gnu_cxx4ropeIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %18) #6
  br label %150

150:                                              ; preds = %149, %127
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  br label %151

151:                                              ; preds = %150, %126
  call void @_ZN9__gnu_cxx4ropeIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  br label %152

152:                                              ; preds = %151, %99
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @_ZN9__gnu_cxx4ropeIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  br label %177

153:                                              ; preds = %42
  call void @llvm.lifetime.start.p0(i64 1, ptr %20) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #6
  store i32 0, ptr %21, align 4, !tbaa !5
  br label %154

154:                                              ; preds = %173, %153
  %155 = load i32, ptr %21, align 4, !tbaa !5
  %156 = load i32, ptr %2, align 4, !tbaa !5
  %157 = icmp slt i32 %155, %156
  br i1 %157, label %159, label %158

158:                                              ; preds = %154
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  br label %176

159:                                              ; preds = %154
  %160 = load i32, ptr %21, align 4, !tbaa !5
  %161 = sext i32 %160 to i64
  %162 = call noundef i32 @_ZNK9__gnu_cxx4ropeIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(8) @rp, i64 noundef %161)
  %163 = load i32, ptr %21, align 4, !tbaa !5
  %164 = trunc i32 %163 to i8
  store i8 %164, ptr %20, align 1, !tbaa !12
  %165 = sext i8 %164 to i32
  %166 = load i32, ptr %2, align 4, !tbaa !5
  %167 = sub nsw i32 %166, 1
  %168 = icmp eq i32 %165, %167
  %169 = zext i1 %168 to i64
  %170 = select i1 %168, i8 10, i8 32
  %171 = sext i8 %170 to i32
  %172 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, i32 noundef %162, i32 noundef %171)
  br label %173

173:                                              ; preds = %159
  %174 = load i32, ptr %21, align 4, !tbaa !5
  %175 = add nsw i32 %174, 1
  store i32 %175, ptr %21, align 4, !tbaa !5
  br label %154, !llvm.loop !13

176:                                              ; preds = %158
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  ret i32 0

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

declare i32 @__isoc99_scanf(ptr noundef, ...) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9__gnu_cxx4ropeIiSaIiEE9push_backEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #4 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) #4 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx4ropeIiSaIiEEaSERKS2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #4 align 2

declare i32 @printf(ptr noundef, ...) #3

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { mustprogress norecurse 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 = { 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 #5 = { 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 #6 = { 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}


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

@rop = external dso_local global %"class.__gnu_cxx::rope", align 8
@rp = external dso_local global %"class.__gnu_cxx::rope", align 8
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [5 x i8], align 1

; 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 nounwind uwtable
declare dso_local void @_ZN9__gnu_cxx4ropeIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #1 align 2

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca %"class.__gnu_cxx::rope", align 8
  %6 = alloca %"class.__gnu_cxx::rope", align 8
  %7 = alloca %"class.__gnu_cxx::rope", align 8
  %8 = alloca %"class.__gnu_cxx::rope", align 8
  %9 = alloca %"class.__gnu_cxx::rope", align 8
  %10 = alloca %"class.__gnu_cxx::rope", align 8
  %11 = alloca %"class.__gnu_cxx::rope", align 8
  %12 = alloca %"class.__gnu_cxx::rope", align 8
  %13 = alloca %"class.__gnu_cxx::rope", align 8
  %14 = alloca %"class.__gnu_cxx::rope", align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  %15 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1, ptr noundef nonnull %2)
  %16 = load i32, ptr %1, align 4, !tbaa !5
  %.not40 = icmp slt i32 %16, 1
  br i1 %.not40, label %.preheader39, label %.lr.ph

.preheader39:                                     ; preds = %.lr.ph, %0
  %17 = phi i32 [ %16, %0 ], [ %22, %.lr.ph ]
  %18 = load i32, ptr %2, align 4, !tbaa !5
  %.not2542 = icmp slt i32 %18, 1
  br i1 %.not2542, label %.preheader, label %.lr.ph44

.lr.ph:                                           ; preds = %0, %.lr.ph
  %19 = phi i32 [ %22, %.lr.ph ], [ %16, %0 ]
  %.01141 = phi i32 [ %21, %.lr.ph ], [ 1, %0 ]
  %reass.sub = sub i32 %19, %.01141
  %20 = add i32 %reass.sub, 1
  call void @_ZN9__gnu_cxx4ropeIiSaIiEE9push_backEi(ptr noundef nonnull align 8 dereferenceable(8) @rop, i32 noundef %20)
  call void @_ZN9__gnu_cxx4ropeIiSaIiEE9push_backEi(ptr noundef nonnull align 8 dereferenceable(8) @rp, i32 noundef %.01141)
  %21 = add nuw nsw i32 %.01141, 1
  %22 = load i32, ptr %1, align 4, !tbaa !5
  %.not.not = icmp slt i32 %.01141, %22
  br i1 %.not.not, label %.lr.ph, label %.preheader39, !llvm.loop !9

.preheader.loopexit:                              ; preds = %71
  %.pre = load i32, ptr %1, align 4, !tbaa !5
  br label %.preheader

.preheader:                                       ; preds = %.preheader.loopexit, %.preheader39
  %23 = phi i32 [ %.pre, %.preheader.loopexit ], [ %17, %.preheader39 ]
  %24 = icmp sgt i32 %23, 0
  br i1 %24, label %.lr.ph46, label %._crit_edge

.lr.ph44:                                         ; preds = %.preheader39, %71
  %.02343 = phi i32 [ %72, %71 ], [ 1, %.preheader39 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #6
  %25 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %3, ptr noundef nonnull %4)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  %26 = load i32, ptr %3, align 4, !tbaa !5
  %27 = add nsw i32 %26, -1
  %28 = sext i32 %27 to i64
  %29 = load i32, ptr %4, align 4, !tbaa !5
  %reass.sub47 = sub i32 %29, %26
  %30 = add i32 %reass.sub47, 1
  %31 = sext i32 %30 to i64
  call void @_ZNK9__gnu_cxx4ropeIiSaIiEE6substrEmm(ptr dead_on_unwind nonnull writable sret(%"class.__gnu_cxx::rope") align 8 %5, ptr noundef nonnull align 8 dereferenceable(8) @rp, i64 noundef %28, i64 noundef %31)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  %32 = load i32, ptr %1, align 4, !tbaa !5
  %33 = load i32, ptr %4, align 4, !tbaa !5
  %34 = sub nsw i32 %32, %33
  %35 = sext i32 %34 to i64
  %36 = load i32, ptr %3, align 4, !tbaa !5
  %37 = add i32 %33, 1
  %38 = sub i32 %37, %36
  %39 = sext i32 %38 to i64
  invoke void @_ZNK9__gnu_cxx4ropeIiSaIiEE6substrEmm(ptr dead_on_unwind nonnull writable sret(%"class.__gnu_cxx::rope") align 8 %6, ptr noundef nonnull align 8 dereferenceable(8) @rop, i64 noundef %35, i64 noundef %39)
          to label %40 unwind label %74

40:                                               ; preds = %.lr.ph44
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #6
  %41 = load i32, ptr %3, align 4, !tbaa !5
  %42 = add nsw i32 %41, -1
  %43 = sext i32 %42 to i64
  invoke void @_ZNK9__gnu_cxx4ropeIiSaIiEE6substrEmm(ptr dead_on_unwind nonnull writable sret(%"class.__gnu_cxx::rope") align 8 %9, ptr noundef nonnull align 8 dereferenceable(8) @rp, i64 noundef 0, i64 noundef %43)
          to label %44 unwind label %76

44:                                               ; preds = %40
  invoke void @_ZN9__gnu_cxxplIiSaIiEEENS_4ropeIT_T0_EERKS5_S7_(ptr dead_on_unwind nonnull writable sret(%"class.__gnu_cxx::rope") align 8 %8, ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %45 unwind label %78

45:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #6
  %46 = load i32, ptr %4, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = load i32, ptr %1, align 4, !tbaa !5
  %49 = sub nsw i32 %48, %46
  %50 = sext i32 %49 to i64
  invoke void @_ZNK9__gnu_cxx4ropeIiSaIiEE6substrEmm(ptr dead_on_unwind nonnull writable sret(%"class.__gnu_cxx::rope") align 8 %10, ptr noundef nonnull align 8 dereferenceable(8) @rp, i64 noundef %47, i64 noundef %50)
          to label %51 unwind label %80

51:                                               ; preds = %45
  invoke void @_ZN9__gnu_cxxplIiSaIiEEENS_4ropeIT_T0_EERKS5_S7_(ptr dead_on_unwind nonnull writable sret(%"class.__gnu_cxx::rope") align 8 %7, ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %10)
          to label %52 unwind label %82

52:                                               ; preds = %51
  %53 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx4ropeIiSaIiEEaSERKS2_(ptr noundef nonnull align 8 dereferenceable(8) @rp, ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %54 unwind label %84

54:                                               ; preds = %52
  call void @_ZN9__gnu_cxx4ropeIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  call void @_ZN9__gnu_cxx4ropeIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #6
  call void @_ZN9__gnu_cxx4ropeIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  call void @_ZN9__gnu_cxx4ropeIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #6
  %55 = load i32, ptr %1, align 4, !tbaa !5
  %56 = load i32, ptr %4, align 4, !tbaa !5
  %57 = sub nsw i32 %55, %56
  %58 = sext i32 %57 to i64
  invoke void @_ZNK9__gnu_cxx4ropeIiSaIiEE6substrEmm(ptr dead_on_unwind nonnull writable sret(%"class.__gnu_cxx::rope") align 8 %13, ptr noundef nonnull align 8 dereferenceable(8) @rop, i64 noundef 0, i64 noundef %58)
          to label %59 unwind label %90

59:                                               ; preds = %54
  invoke void @_ZN9__gnu_cxxplIiSaIiEEENS_4ropeIT_T0_EERKS5_S7_(ptr dead_on_unwind nonnull writable sret(%"class.__gnu_cxx::rope") align 8 %12, ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %60 unwind label %92

60:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #6
  %61 = load i32, ptr %1, align 4, !tbaa !5
  %62 = load i32, ptr %3, align 4, !tbaa !5
  %63 = add i32 %61, 1
  %64 = sub i32 %63, %62
  %65 = sext i32 %64 to i64
  %66 = add nsw i32 %62, -1
  %67 = sext i32 %66 to i64
  invoke void @_ZNK9__gnu_cxx4ropeIiSaIiEE6substrEmm(ptr dead_on_unwind nonnull writable sret(%"class.__gnu_cxx::rope") align 8 %14, ptr noundef nonnull align 8 dereferenceable(8) @rop, i64 noundef %65, i64 noundef %67)
          to label %68 unwind label %94

68:                                               ; preds = %60
  invoke void @_ZN9__gnu_cxxplIiSaIiEEENS_4ropeIT_T0_EERKS5_S7_(ptr dead_on_unwind nonnull writable sret(%"class.__gnu_cxx::rope") align 8 %11, ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %69 unwind label %96

69:                                               ; preds = %68
  %70 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx4ropeIiSaIiEEaSERKS2_(ptr noundef nonnull align 8 dereferenceable(8) @rop, ptr noundef nonnull align 8 dereferenceable(8) %11)
          to label %71 unwind label %98

71:                                               ; preds = %69
  call void @_ZN9__gnu_cxx4ropeIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %11) #6
  call void @_ZN9__gnu_cxx4ropeIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #6
  call void @_ZN9__gnu_cxx4ropeIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #6
  call void @_ZN9__gnu_cxx4ropeIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #6
  call void @_ZN9__gnu_cxx4ropeIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  call void @_ZN9__gnu_cxx4ropeIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  %72 = add nuw nsw i32 %.02343, 1
  %73 = load i32, ptr %2, align 4, !tbaa !5
  %.not25.not = icmp slt i32 %.02343, %73
  br i1 %.not25.not, label %.lr.ph44, label %.preheader.loopexit, !llvm.loop !11

74:                                               ; preds = %.lr.ph44
  %75 = landingpad { ptr, i32 }
          cleanup
  br label %105

76:                                               ; preds = %40
  %77 = landingpad { ptr, i32 }
          cleanup
  br label %89

78:                                               ; preds = %44
  %79 = landingpad { ptr, i32 }
          cleanup
  br label %88

80:                                               ; preds = %45
  %81 = landingpad { ptr, i32 }
          cleanup
  br label %87

82:                                               ; preds = %51
  %83 = landingpad { ptr, i32 }
          cleanup
  br label %86

84:                                               ; preds = %52
  %85 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN9__gnu_cxx4ropeIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  br label %86

86:                                               ; preds = %84, %82
  %.pn = phi { ptr, i32 } [ %85, %84 ], [ %83, %82 ]
  call void @_ZN9__gnu_cxx4ropeIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %10) #6
  br label %87

87:                                               ; preds = %86, %80
  %.pn.pn = phi { ptr, i32 } [ %.pn, %86 ], [ %81, %80 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #6
  call void @_ZN9__gnu_cxx4ropeIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  br label %88

88:                                               ; preds = %87, %78
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %87 ], [ %79, %78 ]
  call void @_ZN9__gnu_cxx4ropeIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  br label %89

89:                                               ; preds = %88, %76
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %88 ], [ %77, %76 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  br label %104

90:                                               ; preds = %54
  %91 = landingpad { ptr, i32 }
          cleanup
  br label %103

92:                                               ; preds = %59
  %93 = landingpad { ptr, i32 }
          cleanup
  br label %102

94:                                               ; preds = %60
  %95 = landingpad { ptr, i32 }
          cleanup
  br label %101

96:                                               ; preds = %68
  %97 = landingpad { ptr, i32 }
          cleanup
  br label %100

98:                                               ; preds = %69
  %99 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN9__gnu_cxx4ropeIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %11) #6
  br label %100

100:                                              ; preds = %98, %96
  %.pn30 = phi { ptr, i32 } [ %99, %98 ], [ %97, %96 ]
  call void @_ZN9__gnu_cxx4ropeIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %14) #6
  br label %101

101:                                              ; preds = %100, %94
  %.pn30.pn = phi { ptr, i32 } [ %.pn30, %100 ], [ %95, %94 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #6
  call void @_ZN9__gnu_cxx4ropeIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #6
  br label %102

102:                                              ; preds = %101, %92
  %.pn30.pn.pn = phi { ptr, i32 } [ %.pn30.pn, %101 ], [ %93, %92 ]
  call void @_ZN9__gnu_cxx4ropeIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %13) #6
  br label %103

103:                                              ; preds = %102, %90
  %.pn30.pn.pn.pn = phi { ptr, i32 } [ %.pn30.pn.pn, %102 ], [ %91, %90 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #6
  br label %104

104:                                              ; preds = %103, %89
  %.pn30.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn30.pn.pn.pn, %103 ], [ %.pn.pn.pn.pn, %89 ]
  call void @_ZN9__gnu_cxx4ropeIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  br label %105

105:                                              ; preds = %104, %74
  %.pn30.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn30.pn.pn.pn.pn, %104 ], [ %75, %74 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  call void @_ZN9__gnu_cxx4ropeIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  resume { ptr, i32 } %.pn30.pn.pn.pn.pn.pn

._crit_edge:                                      ; preds = %.lr.ph46, %.preheader
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  ret i32 0

.lr.ph46:                                         ; preds = %.preheader, %.lr.ph46
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph46 ], [ 0, %.preheader ]
  %106 = call noundef i32 @_ZNK9__gnu_cxx4ropeIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(8) @rp, i64 noundef %indvars.iv)
  %107 = trunc nuw nsw i64 %indvars.iv to i32
  %sext = shl i32 %107, 24
  %108 = ashr exact i32 %sext, 24
  %109 = load i32, ptr %1, align 4, !tbaa !5
  %110 = add nsw i32 %109, -1
  %111 = icmp eq i32 %108, %110
  %112 = select i1 %111, i32 10, i32 32
  %113 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %106, i32 noundef %112)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %114 = load i32, ptr %1, align 4, !tbaa !5
  %115 = sext i32 %114 to i64
  %116 = icmp slt i64 %indvars.iv.next, %115
  br i1 %116, label %.lr.ph46, label %._crit_edge, !llvm.loop !12
}

; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9__gnu_cxx4ropeIiSaIiEE9push_backEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #4 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 #4 align 2

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) 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 #4 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { mustprogress norecurse 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 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 #5 = { 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 #6 = { 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 = distinct !{!12, !10}


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