; LLVM IR from rweather/lightweight-crypto :: src/genavr/code.ll (ZN4Code9ror_bytesERK3Regj)

; 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.Reg = type { %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" = type { ptr, ptr, ptr }

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3Reg4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #0 align 2

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4Code19allocateOptionalRegEj(ptr dead_on_unwind noalias writable sret(%class.Reg) align 8, ptr noundef nonnull align 8 dereferenceable(200), i32 noundef) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4Code10releaseRegERK3Reg(ptr noundef nonnull align 8 dereferenceable(200), ptr noundef nonnull align 8 dereferenceable(24)) #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4Code6tworegEN4Insn4TypeEhh(ptr noundef nonnull align 8 dereferenceable(200), i32 noundef, i8 noundef zeroext, i8 noundef zeroext) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK4Code7hasFlagENS_4FlagE(ptr noundef nonnull align 8 dereferenceable(200), i32 noundef) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4Code6oneregEN4Insn4TypeEh(ptr noundef nonnull align 8 dereferenceable(200), i32 noundef, i8 noundef zeroext) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i8 @_ZN4Code7tempregEv(ptr noundef nonnull align 8 dereferenceable(200)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN4Code12have_tempregEv(ptr noundef nonnull align 8 dereferenceable(200)) #2 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4Code9ror_bytesERK3Regj(ptr noundef nonnull align 8 dereferenceable(200) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %2) #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i8, align 1
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca %class.Reg, align 8
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca %class.Reg, align 8
  %19 = alloca i8, align 1
  %20 = alloca %class.Reg, align 8
  %21 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store i32 %2, ptr %6, align 4, !tbaa !9
  %22 = load ptr, ptr %4, align 8
  %23 = load ptr, ptr %5, align 8, !tbaa !5
  %24 = call noundef i32 @_ZNK3Reg4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %23)
  %25 = icmp eq i32 %24, 0
  br i1 %25, label %26, label %27

26:                                               ; preds = %3
  br label %285

27:                                               ; preds = %3
  %28 = load ptr, ptr %5, align 8, !tbaa !5
  %29 = call noundef i32 @_ZNK3Reg4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %28)
  %30 = load i32, ptr %6, align 4, !tbaa !9
  %31 = urem i32 %30, %29
  store i32 %31, ptr %6, align 4, !tbaa !9
  %32 = load i32, ptr %6, align 4, !tbaa !9
  %33 = icmp eq i32 %32, 0
  br i1 %33, label %34, label %35

34:                                               ; preds = %27
  br label %285

35:                                               ; preds = %27
  %36 = load i32, ptr %6, align 4, !tbaa !9
  %37 = load ptr, ptr %5, align 8, !tbaa !5
  %38 = call noundef i32 @_ZNK3Reg4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %37)
  %39 = sdiv i32 %38, 2
  %40 = icmp ugt i32 %36, %39
  br i1 %40, label %41, label %47

41:                                               ; preds = %35
  %42 = load ptr, ptr %5, align 8, !tbaa !5
  %43 = load ptr, ptr %5, align 8, !tbaa !5
  %44 = call noundef i32 @_ZNK3Reg4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %43)
  %45 = load i32, ptr %6, align 4, !tbaa !9
  %46 = sub i32 %44, %45
  call void @_ZN4Code9rol_bytesERK3Regj(ptr noundef nonnull align 8 dereferenceable(200) %22, ptr noundef nonnull align 8 dereferenceable(24) %42, i32 noundef %46)
  br label %284

47:                                               ; preds = %35
  %48 = load ptr, ptr %5, align 8, !tbaa !5
  %49 = call noundef i32 @_ZNK3Reg4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %48)
  %50 = load i32, ptr %6, align 4, !tbaa !9
  %51 = urem i32 %49, %50
  %52 = icmp eq i32 %51, 0
  br i1 %52, label %53, label %144

53:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  %54 = load ptr, ptr %5, align 8, !tbaa !5
  %55 = call noundef i32 @_ZNK3Reg4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %54)
  %56 = load i32, ptr %6, align 4, !tbaa !9
  %57 = udiv i32 %55, %56
  store i32 %57, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #3
  %58 = call noundef zeroext i1 @_ZN4Code12have_tempregEv(ptr noundef nonnull align 8 dereferenceable(200) %22)
  br i1 %58, label %59, label %62

59:                                               ; preds = %53
  %60 = call noundef zeroext i8 @_ZN4Code7tempregEv(ptr noundef nonnull align 8 dereferenceable(200) %22)
  %61 = zext i8 %60 to i32
  br label %63

62:                                               ; preds = %53
  br label %63

63:                                               ; preds = %62, %59
  %64 = phi i32 [ %61, %59 ], [ 255, %62 ]
  %65 = trunc i32 %64 to i8
  store i8 %65, ptr %10, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #3
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %66

66:                                               ; preds = %140, %63
  %67 = load i32, ptr %11, align 4, !tbaa !9
  %68 = load i32, ptr %6, align 4, !tbaa !9
  %69 = icmp slt i32 %67, %68
  br i1 %69, label %71, label %70

70:                                               ; preds = %66
  store i32 2, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #3
  br label %143

71:                                               ; preds = %66
  %72 = load i8, ptr %10, align 1, !tbaa !11
  %73 = zext i8 %72 to i32
  %74 = icmp ne i32 %73, 255
  br i1 %74, label %75, label %80

75:                                               ; preds = %71
  %76 = load i8, ptr %10, align 1, !tbaa !11
  %77 = load ptr, ptr %5, align 8, !tbaa !5
  %78 = load i32, ptr %11, align 4, !tbaa !9
  %79 = call noundef zeroext i8 @_ZNK3Reg3regEi(ptr noundef nonnull align 8 dereferenceable(24) %77, i32 noundef %78)
  call void @_ZN4Code6tworegEN4Insn4TypeEhh(ptr noundef nonnull align 8 dereferenceable(200) %22, i32 noundef 34, i8 noundef zeroext %76, i8 noundef zeroext %79)
  br label %84

80:                                               ; preds = %71
  %81 = load ptr, ptr %5, align 8, !tbaa !5
  %82 = load i32, ptr %11, align 4, !tbaa !9
  %83 = call noundef zeroext i8 @_ZNK3Reg3regEi(ptr noundef nonnull align 8 dereferenceable(24) %81, i32 noundef %82)
  call void @_ZN4Code6oneregEN4Insn4TypeEh(ptr noundef nonnull align 8 dereferenceable(200) %22, i32 noundef 41, i8 noundef zeroext %83)
  br label %84

84:                                               ; preds = %80, %75
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #3
  store i32 1, ptr %13, align 4, !tbaa !9
  br label %85

85:                                               ; preds = %114, %84
  %86 = load i32, ptr %13, align 4, !tbaa !9
  %87 = load i32, ptr %7, align 4, !tbaa !9
  %88 = icmp slt i32 %86, %87
  br i1 %88, label %90, label %89

89:                                               ; preds = %85
  store i32 5, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #3
  br label %117

90:                                               ; preds = %85
  %91 = load i32, ptr %11, align 4, !tbaa !9
  %92 = load i32, ptr %13, align 4, !tbaa !9
  %93 = load i32, ptr %6, align 4, !tbaa !9
  %94 = mul i32 %92, %93
  %95 = add i32 %91, %94
  %96 = load ptr, ptr %5, align 8, !tbaa !5
  %97 = call noundef i32 @_ZNK3Reg4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %96)
  %98 = urem i32 %95, %97
  store i32 %98, ptr %8, align 4, !tbaa !9
  %99 = load i32, ptr %11, align 4, !tbaa !9
  %100 = load i32, ptr %13, align 4, !tbaa !9
  %101 = sub nsw i32 %100, 1
  %102 = load i32, ptr %6, align 4, !tbaa !9
  %103 = mul i32 %101, %102
  %104 = add i32 %99, %103
  %105 = load ptr, ptr %5, align 8, !tbaa !5
  %106 = call noundef i32 @_ZNK3Reg4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %105)
  %107 = urem i32 %104, %106
  store i32 %107, ptr %9, align 4, !tbaa !9
  %108 = load ptr, ptr %5, align 8, !tbaa !5
  %109 = load i32, ptr %9, align 4, !tbaa !9
  %110 = call noundef zeroext i8 @_ZNK3Reg3regEi(ptr noundef nonnull align 8 dereferenceable(24) %108, i32 noundef %109)
  %111 = load ptr, ptr %5, align 8, !tbaa !5
  %112 = load i32, ptr %8, align 4, !tbaa !9
  %113 = call noundef zeroext i8 @_ZNK3Reg3regEi(ptr noundef nonnull align 8 dereferenceable(24) %111, i32 noundef %112)
  call void @_ZN4Code6tworegEN4Insn4TypeEhh(ptr noundef nonnull align 8 dereferenceable(200) %22, i32 noundef 34, i8 noundef zeroext %110, i8 noundef zeroext %113)
  br label %114

114:                                              ; preds = %90
  %115 = load i32, ptr %13, align 4, !tbaa !9
  %116 = add nsw i32 %115, 1
  store i32 %116, ptr %13, align 4, !tbaa !9
  br label %85, !llvm.loop !12

117:                                              ; preds = %89
  %118 = load i32, ptr %11, align 4, !tbaa !9
  %119 = load i32, ptr %7, align 4, !tbaa !9
  %120 = sub nsw i32 %119, 1
  %121 = load i32, ptr %6, align 4, !tbaa !9
  %122 = mul i32 %120, %121
  %123 = add i32 %118, %122
  %124 = load ptr, ptr %5, align 8, !tbaa !5
  %125 = call noundef i32 @_ZNK3Reg4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %124)
  %126 = urem i32 %123, %125
  store i32 %126, ptr %9, align 4, !tbaa !9
  %127 = load i8, ptr %10, align 1, !tbaa !11
  %128 = zext i8 %127 to i32
  %129 = icmp ne i32 %128, 255
  br i1 %129, label %130, label %135

130:                                              ; preds = %117
  %131 = load ptr, ptr %5, align 8, !tbaa !5
  %132 = load i32, ptr %9, align 4, !tbaa !9
  %133 = call noundef zeroext i8 @_ZNK3Reg3regEi(ptr noundef nonnull align 8 dereferenceable(24) %131, i32 noundef %132)
  %134 = load i8, ptr %10, align 1, !tbaa !11
  call void @_ZN4Code6tworegEN4Insn4TypeEhh(ptr noundef nonnull align 8 dereferenceable(200) %22, i32 noundef 34, i8 noundef zeroext %133, i8 noundef zeroext %134)
  br label %139

135:                                              ; preds = %117
  %136 = load ptr, ptr %5, align 8, !tbaa !5
  %137 = load i32, ptr %9, align 4, !tbaa !9
  %138 = call noundef zeroext i8 @_ZNK3Reg3regEi(ptr noundef nonnull align 8 dereferenceable(24) %136, i32 noundef %137)
  call void @_ZN4Code6oneregEN4Insn4TypeEh(ptr noundef nonnull align 8 dereferenceable(200) %22, i32 noundef 40, i8 noundef zeroext %138)
  br label %139

139:                                              ; preds = %135, %130
  br label %140

140:                                              ; preds = %139
  %141 = load i32, ptr %11, align 4, !tbaa !9
  %142 = add nsw i32 %141, 1
  store i32 %142, ptr %11, align 4, !tbaa !9
  br label %66, !llvm.loop !14

143:                                              ; preds = %70
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  br label %283

144:                                              ; preds = %47
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #3
  call void @llvm.lifetime.start.p0(i64 24, ptr %15) #3
  call void @_ZN3RegC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15)
  %145 = invoke noundef zeroext i1 @_ZNK4Code7hasFlagENS_4FlagE(ptr noundef nonnull align 8 dereferenceable(200) %22, i32 noundef 64)
          to label %146 unwind label %155

146:                                              ; preds = %144
  br i1 %145, label %172, label %147

147:                                              ; preds = %146
  call void @llvm.lifetime.start.p0(i64 24, ptr %18) #3
  %148 = load i32, ptr %6, align 4, !tbaa !9
  %149 = sub i32 %148, 1
  invoke void @_ZN4Code19allocateOptionalRegEj(ptr dead_on_unwind writable sret(%class.Reg) align 8 %18, ptr noundef nonnull align 8 dereferenceable(200) %22, i32 noundef %149)
          to label %150 unwind label %159

150:                                              ; preds = %147
  %151 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3RegaSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 8 dereferenceable(24) %18)
          to label %152 unwind label %163

152:                                              ; preds = %150
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #3
  %153 = getelementptr inbounds %class.Reg, ptr %15, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 1, ptr %19) #3
  store i8 0, ptr %19, align 1, !tbaa !11
  invoke void @_ZNSt6vectorIhSaIhEE9push_backEOh(ptr noundef nonnull align 8 dereferenceable(24) %153, ptr noundef nonnull align 1 dereferenceable(1) %19)
          to label %154 unwind label %168

154:                                              ; preds = %152
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #3
  br label %186

155:                                              ; preds = %280, %234, %228, %224, %216, %209, %205, %203, %199, %196, %191, %144
  %156 = landingpad { ptr, i32 }
          cleanup
  %157 = extractvalue { ptr, i32 } %156, 0
  store ptr %157, ptr %16, align 8
  %158 = extractvalue { ptr, i32 } %156, 1
  store i32 %158, ptr %17, align 4
  br label %282

159:                                              ; preds = %147
  %160 = landingpad { ptr, i32 }
          cleanup
  %161 = extractvalue { ptr, i32 } %160, 0
  store ptr %161, ptr %16, align 8
  %162 = extractvalue { ptr, i32 } %160, 1
  store i32 %162, ptr %17, align 4
  br label %167

163:                                              ; preds = %150
  %164 = landingpad { ptr, i32 }
          cleanup
  %165 = extractvalue { ptr, i32 } %164, 0
  store ptr %165, ptr %16, align 8
  %166 = extractvalue { ptr, i32 } %164, 1
  store i32 %166, ptr %17, align 4
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #3
  br label %167

167:                                              ; preds = %163, %159
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #3
  br label %282

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

172:                                              ; preds = %146
  call void @llvm.lifetime.start.p0(i64 24, ptr %20) #3
  %173 = load i32, ptr %6, align 4, !tbaa !9
  invoke void @_ZN4Code19allocateOptionalRegEj(ptr dead_on_unwind writable sret(%class.Reg) align 8 %20, ptr noundef nonnull align 8 dereferenceable(200) %22, i32 noundef %173)
          to label %174 unwind label %177

174:                                              ; preds = %172
  %175 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3RegaSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 8 dereferenceable(24) %20)
          to label %176 unwind label %181

176:                                              ; preds = %174
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %20) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr %20) #3
  br label %186

177:                                              ; preds = %172
  %178 = landingpad { ptr, i32 }
          cleanup
  %179 = extractvalue { ptr, i32 } %178, 0
  store ptr %179, ptr %16, align 8
  %180 = extractvalue { ptr, i32 } %178, 1
  store i32 %180, ptr %17, align 4
  br label %185

181:                                              ; preds = %174
  %182 = landingpad { ptr, i32 }
          cleanup
  %183 = extractvalue { ptr, i32 } %182, 0
  store ptr %183, ptr %16, align 8
  %184 = extractvalue { ptr, i32 } %182, 1
  store i32 %184, ptr %17, align 4
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %20) #3
  br label %185

185:                                              ; preds = %181, %177
  call void @llvm.lifetime.end.p0(i64 24, ptr %20) #3
  br label %282

186:                                              ; preds = %176, %154
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %187

187:                                              ; preds = %212, %186
  %188 = load i32, ptr %14, align 4, !tbaa !9
  %189 = load i32, ptr %6, align 4, !tbaa !9
  %190 = icmp slt i32 %188, %189
  br i1 %190, label %191, label %215

191:                                              ; preds = %187
  %192 = load i32, ptr %14, align 4, !tbaa !9
  %193 = invoke noundef i32 @_ZNK3Reg4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %15)
          to label %194 unwind label %155

194:                                              ; preds = %191
  %195 = icmp slt i32 %192, %193
  br i1 %195, label %196, label %205

196:                                              ; preds = %194
  %197 = load i32, ptr %14, align 4, !tbaa !9
  %198 = invoke noundef zeroext i8 @_ZNK3Reg3regEi(ptr noundef nonnull align 8 dereferenceable(24) %15, i32 noundef %197)
          to label %199 unwind label %155

199:                                              ; preds = %196
  %200 = load ptr, ptr %5, align 8, !tbaa !5
  %201 = load i32, ptr %14, align 4, !tbaa !9
  %202 = invoke noundef zeroext i8 @_ZNK3Reg3regEi(ptr noundef nonnull align 8 dereferenceable(24) %200, i32 noundef %201)
          to label %203 unwind label %155

203:                                              ; preds = %199
  invoke void @_ZN4Code6tworegEN4Insn4TypeEhh(ptr noundef nonnull align 8 dereferenceable(200) %22, i32 noundef 34, i8 noundef zeroext %198, i8 noundef zeroext %202)
          to label %204 unwind label %155

204:                                              ; preds = %203
  br label %211

205:                                              ; preds = %194
  %206 = load ptr, ptr %5, align 8, !tbaa !5
  %207 = load i32, ptr %14, align 4, !tbaa !9
  %208 = invoke noundef zeroext i8 @_ZNK3Reg3regEi(ptr noundef nonnull align 8 dereferenceable(24) %206, i32 noundef %207)
          to label %209 unwind label %155

209:                                              ; preds = %205
  invoke void @_ZN4Code6oneregEN4Insn4TypeEh(ptr noundef nonnull align 8 dereferenceable(200) %22, i32 noundef 41, i8 noundef zeroext %208)
          to label %210 unwind label %155

210:                                              ; preds = %209
  br label %211

211:                                              ; preds = %210, %204
  br label %212

212:                                              ; preds = %211
  %213 = load i32, ptr %14, align 4, !tbaa !9
  %214 = add nsw i32 %213, 1
  store i32 %214, ptr %14, align 4, !tbaa !9
  br label %187, !llvm.loop !15

215:                                              ; preds = %187
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %216

216:                                              ; preds = %236, %215
  %217 = load i32, ptr %14, align 4, !tbaa !9
  %218 = load ptr, ptr %5, align 8, !tbaa !5
  %219 = invoke noundef i32 @_ZNK3Reg4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %218)
          to label %220 unwind label %155

220:                                              ; preds = %216
  %221 = load i32, ptr %6, align 4, !tbaa !9
  %222 = sub i32 %219, %221
  %223 = icmp slt i32 %217, %222
  br i1 %223, label %224, label %239

224:                                              ; preds = %220
  %225 = load ptr, ptr %5, align 8, !tbaa !5
  %226 = load i32, ptr %14, align 4, !tbaa !9
  %227 = invoke noundef zeroext i8 @_ZNK3Reg3regEi(ptr noundef nonnull align 8 dereferenceable(24) %225, i32 noundef %226)
          to label %228 unwind label %155

228:                                              ; preds = %224
  %229 = load ptr, ptr %5, align 8, !tbaa !5
  %230 = load i32, ptr %14, align 4, !tbaa !9
  %231 = load i32, ptr %6, align 4, !tbaa !9
  %232 = add i32 %230, %231
  %233 = invoke noundef zeroext i8 @_ZNK3Reg3regEi(ptr noundef nonnull align 8 dereferenceable(24) %229, i32 noundef %232)
          to label %234 unwind label %155

234:                                              ; preds = %228
  invoke void @_ZN4Code6tworegEN4Insn4TypeEhh(ptr noundef nonnull align 8 dereferenceable(200) %22, i32 noundef 34, i8 noundef zeroext %227, i8 noundef zeroext %233)
          to label %235 unwind label %155

235:                                              ; preds = %234
  br label %236

236:                                              ; preds = %235
  %237 = load i32, ptr %14, align 4, !tbaa !9
  %238 = add nsw i32 %237, 1
  store i32 %238, ptr %14, align 4, !tbaa !9
  br label %216, !llvm.loop !16

239:                                              ; preds = %220
  %240 = load i32, ptr %6, align 4, !tbaa !9
  %241 = sub i32 %240, 1
  store i32 %241, ptr %14, align 4, !tbaa !9
  br label %242

242:                                              ; preds = %277, %239
  %243 = load i32, ptr %14, align 4, !tbaa !9
  %244 = icmp sge i32 %243, 0
  br i1 %244, label %245, label %280

245:                                              ; preds = %242
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #3
  %246 = load ptr, ptr %5, align 8, !tbaa !5
  %247 = invoke noundef i32 @_ZNK3Reg4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %246)
          to label %248 unwind label %266

248:                                              ; preds = %245
  %249 = load i32, ptr %6, align 4, !tbaa !9
  %250 = sub i32 %247, %249
  %251 = load i32, ptr %14, align 4, !tbaa !9
  %252 = add i32 %250, %251
  store i32 %252, ptr %21, align 4, !tbaa !9
  %253 = load i32, ptr %14, align 4, !tbaa !9
  %254 = invoke noundef i32 @_ZNK3Reg4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %15)
          to label %255 unwind label %266

255:                                              ; preds = %248
  %256 = icmp slt i32 %253, %254
  br i1 %256, label %257, label %270

257:                                              ; preds = %255
  %258 = load ptr, ptr %5, align 8, !tbaa !5
  %259 = load i32, ptr %21, align 4, !tbaa !9
  %260 = invoke noundef zeroext i8 @_ZNK3Reg3regEi(ptr noundef nonnull align 8 dereferenceable(24) %258, i32 noundef %259)
          to label %261 unwind label %266

261:                                              ; preds = %257
  %262 = load i32, ptr %14, align 4, !tbaa !9
  %263 = invoke noundef zeroext i8 @_ZNK3Reg3regEi(ptr noundef nonnull align 8 dereferenceable(24) %15, i32 noundef %262)
          to label %264 unwind label %266

264:                                              ; preds = %261
  invoke void @_ZN4Code6tworegEN4Insn4TypeEhh(ptr noundef nonnull align 8 dereferenceable(200) %22, i32 noundef 34, i8 noundef zeroext %260, i8 noundef zeroext %263)
          to label %265 unwind label %266

265:                                              ; preds = %264
  br label %276

266:                                              ; preds = %274, %270, %264, %261, %257, %248, %245
  %267 = landingpad { ptr, i32 }
          cleanup
  %268 = extractvalue { ptr, i32 } %267, 0
  store ptr %268, ptr %16, align 8
  %269 = extractvalue { ptr, i32 } %267, 1
  store i32 %269, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #3
  br label %282

270:                                              ; preds = %255
  %271 = load ptr, ptr %5, align 8, !tbaa !5
  %272 = load i32, ptr %21, align 4, !tbaa !9
  %273 = invoke noundef zeroext i8 @_ZNK3Reg3regEi(ptr noundef nonnull align 8 dereferenceable(24) %271, i32 noundef %272)
          to label %274 unwind label %266

274:                                              ; preds = %270
  invoke void @_ZN4Code6oneregEN4Insn4TypeEh(ptr noundef nonnull align 8 dereferenceable(200) %22, i32 noundef 40, i8 noundef zeroext %273)
          to label %275 unwind label %266

275:                                              ; preds = %274
  br label %276

276:                                              ; preds = %275, %265
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #3
  br label %277

277:                                              ; preds = %276
  %278 = load i32, ptr %14, align 4, !tbaa !9
  %279 = add nsw i32 %278, -1
  store i32 %279, ptr %14, align 4, !tbaa !9
  br label %242, !llvm.loop !17

280:                                              ; preds = %242
  invoke void @_ZN4Code10releaseRegERK3Reg(ptr noundef nonnull align 8 dereferenceable(200) %22, ptr noundef nonnull align 8 dereferenceable(24) %15)
          to label %281 unwind label %155

281:                                              ; preds = %280
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #3
  br label %283

282:                                              ; preds = %266, %185, %168, %167, %155
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #3
  br label %286

283:                                              ; preds = %281, %143
  br label %284

284:                                              ; preds = %283, %41
  br label %285

285:                                              ; preds = %284, %34, %26
  ret void

286:                                              ; preds = %282
  %287 = load ptr, ptr %16, align 8
  %288 = load i32, ptr %17, align 4
  %289 = insertvalue { ptr, i32 } poison, ptr %287, 0
  %290 = insertvalue { ptr, i32 } %289, i32 %288, 1
  resume { ptr, i32 } %290
}

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

attributes #0 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}
!15 = distinct !{!15, !13}
!16 = distinct !{!16, !13}
!17 = distinct !{!17, !13}


; 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.Reg = type { %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" = type { ptr, ptr, ptr }

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3Reg4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0 align 2

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4Code19allocateOptionalRegEj(ptr dead_on_unwind noalias writable sret(%class.Reg) align 8, ptr noundef nonnull align 8 dereferenceable(200), i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4Code10releaseRegERK3Reg(ptr noundef nonnull align 8 dereferenceable(200), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4Code6tworegEN4Insn4TypeEhh(ptr noundef nonnull align 8 dereferenceable(200), i32 noundef, i8 noundef zeroext, i8 noundef zeroext) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK4Code7hasFlagENS_4FlagE(ptr noundef nonnull align 8 dereferenceable(200), i32 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4Code6oneregEN4Insn4TypeEh(ptr noundef nonnull align 8 dereferenceable(200), i32 noundef, i8 noundef zeroext) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i8 @_ZN4Code7tempregEv(ptr noundef nonnull align 8 dereferenceable(200)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN4Code12have_tempregEv(ptr noundef nonnull align 8 dereferenceable(200)) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4Code9ror_bytesERK3Regj(ptr noundef nonnull align 8 dereferenceable(200) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %2) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %class.Reg, align 8
  %5 = alloca %class.Reg, align 8
  %6 = alloca i8, align 1
  %7 = alloca %class.Reg, align 8
  %8 = tail call noundef i32 @_ZNK3Reg4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %9 = icmp eq i32 %8, 0
  br i1 %9, label %.loopexit, label %10

10:                                               ; preds = %3
  %11 = tail call noundef i32 @_ZNK3Reg4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %12 = urem i32 %2, %11
  %13 = icmp eq i32 %12, 0
  br i1 %13, label %.loopexit, label %14

14:                                               ; preds = %10
  %15 = tail call noundef i32 @_ZNK3Reg4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %16 = sdiv i32 %15, 2
  %17 = icmp ugt i32 %12, %16
  %18 = tail call noundef i32 @_ZNK3Reg4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  br i1 %17, label %19, label %21

19:                                               ; preds = %14
  %20 = sub i32 %18, %12
  tail call void @_ZN4Code9rol_bytesERK3Regj(ptr noundef nonnull align 8 dereferenceable(200) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %20)
  br label %.loopexit

21:                                               ; preds = %14
  %22 = urem i32 %18, %12
  %23 = icmp eq i32 %22, 0
  br i1 %23, label %24, label %63

24:                                               ; preds = %21
  %25 = tail call noundef i32 @_ZNK3Reg4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %26 = udiv i32 %25, %12
  %27 = tail call noundef zeroext i1 @_ZN4Code12have_tempregEv(ptr noundef nonnull align 8 dereferenceable(200) %0)
  br i1 %27, label %28, label %30

28:                                               ; preds = %24
  %29 = tail call noundef zeroext i8 @_ZN4Code7tempregEv(ptr noundef nonnull align 8 dereferenceable(200) %0)
  br label %30

30:                                               ; preds = %24, %28
  %31 = phi i8 [ %29, %28 ], [ -1, %24 ]
  %32 = icmp sgt i32 %12, 0
  br i1 %32, label %.lr.ph113, label %.loopexit

.lr.ph113:                                        ; preds = %30
  %.not = icmp eq i8 %31, -1
  %33 = icmp sgt i32 %26, 1
  %34 = add nsw i32 %26, -1
  %35 = mul i32 %34, %12
  br label %36

36:                                               ; preds = %.lr.ph113, %60
  %.088111 = phi i32 [ 0, %.lr.ph113 ], [ %61, %60 ]
  %37 = tail call noundef zeroext i8 @_ZNK3Reg3regEi(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %.088111)
  br i1 %.not, label %39, label %38

38:                                               ; preds = %36
  tail call void @_ZN4Code6tworegEN4Insn4TypeEhh(ptr noundef nonnull align 8 dereferenceable(200) %0, i32 noundef 34, i8 noundef zeroext %31, i8 noundef zeroext %37)
  br label %40

39:                                               ; preds = %36
  tail call void @_ZN4Code6oneregEN4Insn4TypeEh(ptr noundef nonnull align 8 dereferenceable(200) %0, i32 noundef 41, i8 noundef zeroext %37)
  br label %40

40:                                               ; preds = %39, %38
  br i1 %33, label %.lr.ph109, label %._crit_edge110

._crit_edge110:                                   ; preds = %.lr.ph109, %40
  %41 = add i32 %.088111, %35
  %42 = tail call noundef i32 @_ZNK3Reg4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %43 = urem i32 %41, %42
  %44 = tail call noundef zeroext i8 @_ZNK3Reg3regEi(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %43)
  br i1 %.not, label %59, label %58

.lr.ph109:                                        ; preds = %40, %.lr.ph109
  %.087107 = phi i32 [ %56, %.lr.ph109 ], [ 1, %40 ]
  %45 = mul i32 %.087107, %12
  %46 = add i32 %45, %.088111
  %47 = tail call noundef i32 @_ZNK3Reg4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %48 = urem i32 %46, %47
  %49 = add nsw i32 %.087107, -1
  %50 = mul i32 %49, %12
  %51 = add i32 %50, %.088111
  %52 = tail call noundef i32 @_ZNK3Reg4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %53 = urem i32 %51, %52
  %54 = tail call noundef zeroext i8 @_ZNK3Reg3regEi(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %53)
  %55 = tail call noundef zeroext i8 @_ZNK3Reg3regEi(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %48)
  tail call void @_ZN4Code6tworegEN4Insn4TypeEhh(ptr noundef nonnull align 8 dereferenceable(200) %0, i32 noundef 34, i8 noundef zeroext %54, i8 noundef zeroext %55)
  %56 = add nuw nsw i32 %.087107, 1
  %57 = icmp slt i32 %56, %26
  br i1 %57, label %.lr.ph109, label %._crit_edge110, !llvm.loop !5

58:                                               ; preds = %._crit_edge110
  tail call void @_ZN4Code6tworegEN4Insn4TypeEhh(ptr noundef nonnull align 8 dereferenceable(200) %0, i32 noundef 34, i8 noundef zeroext %44, i8 noundef zeroext %31)
  br label %60

59:                                               ; preds = %._crit_edge110
  tail call void @_ZN4Code6oneregEN4Insn4TypeEh(ptr noundef nonnull align 8 dereferenceable(200) %0, i32 noundef 40, i8 noundef zeroext %44)
  br label %60

60:                                               ; preds = %58, %59
  %61 = add nuw nsw i32 %.088111, 1
  %62 = icmp slt i32 %61, %12
  br i1 %62, label %36, label %.loopexit, !llvm.loop !7

63:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #3
  call void @_ZN3RegC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4)
  %64 = call noundef zeroext i1 @_ZNK4Code7hasFlagENS_4FlagE(ptr noundef nonnull align 8 dereferenceable(200) %0, i32 noundef 64)
  br i1 %64, label %78, label %65

65:                                               ; preds = %63
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #3
  %66 = add i32 %12, -1
  invoke void @_ZN4Code19allocateOptionalRegEj(ptr dead_on_unwind nonnull writable sret(%class.Reg) align 8 %5, ptr noundef nonnull align 8 dereferenceable(200) %0, i32 noundef %66)
          to label %67 unwind label %71

67:                                               ; preds = %65
  %68 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3RegaSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(24) %5)
          to label %69 unwind label %73

69:                                               ; preds = %67
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #3
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #3
  store i8 0, ptr %6, align 1, !tbaa !8
  invoke void @_ZNSt6vectorIhSaIhEE9push_backEOh(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %70 unwind label %76

70:                                               ; preds = %69
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #3
  br label %87

.loopexit97:                                      ; preds = %.lr.ph103, %107, %110
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

.loopexit.split-lp.loopexit:                      ; preds = %101, %99, %98, %96, %94
  %lpad.loopexit98 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

.loopexit.split-lp.loopexit.split-lp:             ; preds = %._crit_edge
  %lpad.loopexit.split-lp99 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

71:                                               ; preds = %65
  %72 = landingpad { ptr, i32 }
          cleanup
  br label %75

73:                                               ; preds = %67
  %74 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #3
  br label %75

75:                                               ; preds = %73, %71
  %.pn = phi { ptr, i32 } [ %74, %73 ], [ %72, %71 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #3
  br label %.loopexit.split-lp

76:                                               ; preds = %69
  %77 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #3
  br label %.loopexit.split-lp

78:                                               ; preds = %63
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #3
  invoke void @_ZN4Code19allocateOptionalRegEj(ptr dead_on_unwind nonnull writable sret(%class.Reg) align 8 %7, ptr noundef nonnull align 8 dereferenceable(200) %0, i32 noundef %12)
          to label %79 unwind label %82

79:                                               ; preds = %78
  %80 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3RegaSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(24) %7)
          to label %81 unwind label %84

81:                                               ; preds = %79
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #3
  br label %87

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

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

86:                                               ; preds = %84, %82
  %.pn92 = phi { ptr, i32 } [ %85, %84 ], [ %83, %82 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #3
  br label %.loopexit.split-lp

87:                                               ; preds = %81, %70
  %88 = icmp sgt i32 %12, 0
  br i1 %88, label %.lr.ph, label %.preheader96

.preheader96:                                     ; preds = %102, %87
  %89 = call noundef i32 @_ZNK3Reg4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %90 = sub i32 %89, %12
  %91 = icmp sgt i32 %90, 0
  br i1 %91, label %.lr.ph103, label %.preheader

.lr.ph:                                           ; preds = %87, %102
  %.084101 = phi i32 [ %103, %102 ], [ 0, %87 ]
  %92 = call noundef i32 @_ZNK3Reg4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4)
  %93 = icmp slt i32 %.084101, %92
  br i1 %93, label %94, label %99

94:                                               ; preds = %.lr.ph
  %95 = invoke noundef zeroext i8 @_ZNK3Reg3regEi(ptr noundef nonnull align 8 dereferenceable(24) %4, i32 noundef %.084101)
          to label %96 unwind label %.loopexit.split-lp.loopexit

96:                                               ; preds = %94
  %97 = invoke noundef zeroext i8 @_ZNK3Reg3regEi(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %.084101)
          to label %98 unwind label %.loopexit.split-lp.loopexit

98:                                               ; preds = %96
  invoke void @_ZN4Code6tworegEN4Insn4TypeEhh(ptr noundef nonnull align 8 dereferenceable(200) %0, i32 noundef 34, i8 noundef zeroext %95, i8 noundef zeroext %97)
          to label %102 unwind label %.loopexit.split-lp.loopexit

99:                                               ; preds = %.lr.ph
  %100 = invoke noundef zeroext i8 @_ZNK3Reg3regEi(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %.084101)
          to label %101 unwind label %.loopexit.split-lp.loopexit

101:                                              ; preds = %99
  invoke void @_ZN4Code6oneregEN4Insn4TypeEh(ptr noundef nonnull align 8 dereferenceable(200) %0, i32 noundef 41, i8 noundef zeroext %100)
          to label %102 unwind label %.loopexit.split-lp.loopexit

102:                                              ; preds = %98, %101
  %103 = add nuw nsw i32 %.084101, 1
  %104 = icmp slt i32 %103, %12
  br i1 %104, label %.lr.ph, label %.preheader96, !llvm.loop !11

.preheader:                                       ; preds = %111, %.preheader96
  %.286104 = add i32 %12, -1
  %105 = icmp sgt i32 %.286104, -1
  br i1 %105, label %.lr.ph106, label %._crit_edge

.lr.ph103:                                        ; preds = %.preheader96, %111
  %.185102 = phi i32 [ %112, %111 ], [ 0, %.preheader96 ]
  %106 = invoke noundef zeroext i8 @_ZNK3Reg3regEi(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %.185102)
          to label %107 unwind label %.loopexit97

107:                                              ; preds = %.lr.ph103
  %108 = add i32 %.185102, %12
  %109 = invoke noundef zeroext i8 @_ZNK3Reg3regEi(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %108)
          to label %110 unwind label %.loopexit97

110:                                              ; preds = %107
  invoke void @_ZN4Code6tworegEN4Insn4TypeEhh(ptr noundef nonnull align 8 dereferenceable(200) %0, i32 noundef 34, i8 noundef zeroext %106, i8 noundef zeroext %109)
          to label %111 unwind label %.loopexit97

111:                                              ; preds = %110
  %112 = add nuw nsw i32 %.185102, 1
  %113 = call noundef i32 @_ZNK3Reg4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %114 = sub i32 %113, %12
  %115 = icmp slt i32 %112, %114
  br i1 %115, label %.lr.ph103, label %.preheader, !llvm.loop !12

.lr.ph106:                                        ; preds = %.preheader, %131
  %.286105 = phi i32 [ %.286, %131 ], [ %.286104, %.preheader ]
  %116 = call noundef i32 @_ZNK3Reg4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %117 = sub i32 %116, %12
  %118 = add i32 %117, %.286105
  %119 = call noundef i32 @_ZNK3Reg4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4)
  %120 = icmp slt i32 %.286105, %119
  br i1 %120, label %121, label %128

121:                                              ; preds = %.lr.ph106
  %122 = invoke noundef zeroext i8 @_ZNK3Reg3regEi(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %118)
          to label %123 unwind label %126

123:                                              ; preds = %121
  %124 = invoke noundef zeroext i8 @_ZNK3Reg3regEi(ptr noundef nonnull align 8 dereferenceable(24) %4, i32 noundef %.286105)
          to label %125 unwind label %126

125:                                              ; preds = %123
  invoke void @_ZN4Code6tworegEN4Insn4TypeEhh(ptr noundef nonnull align 8 dereferenceable(200) %0, i32 noundef 34, i8 noundef zeroext %122, i8 noundef zeroext %124)
          to label %131 unwind label %126

126:                                              ; preds = %130, %128, %125, %123, %121
  %127 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

128:                                              ; preds = %.lr.ph106
  %129 = invoke noundef zeroext i8 @_ZNK3Reg3regEi(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %118)
          to label %130 unwind label %126

130:                                              ; preds = %128
  invoke void @_ZN4Code6oneregEN4Insn4TypeEh(ptr noundef nonnull align 8 dereferenceable(200) %0, i32 noundef 40, i8 noundef zeroext %129)
          to label %131 unwind label %126

131:                                              ; preds = %130, %125
  %.286 = add nsw i32 %.286105, -1
  %132 = icmp sgt i32 %.286105, 0
  br i1 %132, label %.lr.ph106, label %._crit_edge, !llvm.loop !13

._crit_edge:                                      ; preds = %131, %.preheader
  invoke void @_ZN4Code10releaseRegERK3Reg(ptr noundef nonnull align 8 dereferenceable(200) %0, ptr noundef nonnull align 8 dereferenceable(24) %4)
          to label %133 unwind label %.loopexit.split-lp.loopexit.split-lp

133:                                              ; preds = %._crit_edge
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #3
  br label %.loopexit

.loopexit.split-lp:                               ; preds = %.loopexit97, %.loopexit.split-lp.loopexit.split-lp, %.loopexit.split-lp.loopexit, %126, %86, %76, %75
  %.pn94 = phi { ptr, i32 } [ %127, %126 ], [ %.pn92, %86 ], [ %77, %76 ], [ %.pn, %75 ], [ %lpad.loopexit, %.loopexit97 ], [ %lpad.loopexit98, %.loopexit.split-lp.loopexit ], [ %lpad.loopexit.split-lp99, %.loopexit.split-lp.loopexit.split-lp ]
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #3
  resume { ptr, i32 } %.pn94

.loopexit:                                        ; preds = %60, %30, %19, %133, %10, %3
  ret void
}

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

attributes #0 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = distinct !{!7, !6}
!8 = !{!9, !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = distinct !{!11, !6}
!12 = distinct !{!12, !6}
!13 = distinct !{!13, !6}


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