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

; 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 }
%class.Gift128State = type <{ %class.Reg, %class.Reg, %class.Reg, %class.Reg, %class.Reg, %class.Reg, i8, [7 x i8] }>

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

declare i32 @__gxx_personality_v0(...)

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

; 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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3RegD2Ev(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.end.p0(i64 immarg, ptr nocapture) #1

declare void @_ZNK3Reg8reversedEv(ptr dead_on_unwind writable sret(%class.Reg) align 8, ptr noundef nonnull align 8 dereferenceable(24)) #3

declare void @_ZN4Code7bit_getERK3Regi(ptr noundef nonnull align 8 dereferenceable(200), ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) #3

declare void @_ZN4Code7bit_putERK3Regi(ptr noundef nonnull align 8 dereferenceable(200), ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) #3

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN12Gift128State11store_stateER4Codei(ptr noundef nonnull align 8 dereferenceable(145) %0, ptr noundef nonnull align 8 dereferenceable(200) %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 %class.Reg, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca %class.Reg, align 8
  %11 = alloca %class.Reg, align 8
  %12 = alloca %class.Reg, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca %class.Reg, align 8
  %16 = alloca %class.Reg, align 8
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca %class.Reg, align 8
  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
  %20 = load ptr, ptr %4, align 8
  %21 = load i32, ptr %6, align 4, !tbaa !9
  %22 = icmp eq i32 %21, 0
  br i1 %22, label %23, label %52

23:                                               ; preds = %3
  %24 = load ptr, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %7) #4
  %25 = getelementptr inbounds %class.Gift128State, ptr %20, i32 0, i32 0
  call void @_ZNK3Reg8reversedEv(ptr dead_on_unwind writable sret(%class.Reg) align 8 %7, ptr noundef nonnull align 8 dereferenceable(24) %25)
  invoke void @_ZN4Code3stxERK3Regh(ptr noundef nonnull align 8 dereferenceable(200) %24, ptr noundef nonnull align 8 dereferenceable(24) %7, i8 noundef zeroext -1)
          to label %26 unwind label %36

26:                                               ; preds = %23
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #4
  %27 = load ptr, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %10) #4
  %28 = getelementptr inbounds %class.Gift128State, ptr %20, i32 0, i32 1
  call void @_ZNK3Reg8reversedEv(ptr dead_on_unwind writable sret(%class.Reg) align 8 %10, ptr noundef nonnull align 8 dereferenceable(24) %28)
  invoke void @_ZN4Code3stxERK3Regh(ptr noundef nonnull align 8 dereferenceable(200) %27, ptr noundef nonnull align 8 dereferenceable(24) %10, i8 noundef zeroext -1)
          to label %29 unwind label %40

29:                                               ; preds = %26
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #4
  %30 = load ptr, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %11) #4
  %31 = getelementptr inbounds %class.Gift128State, ptr %20, i32 0, i32 2
  call void @_ZNK3Reg8reversedEv(ptr dead_on_unwind writable sret(%class.Reg) align 8 %11, ptr noundef nonnull align 8 dereferenceable(24) %31)
  invoke void @_ZN4Code3stxERK3Regh(ptr noundef nonnull align 8 dereferenceable(200) %30, ptr noundef nonnull align 8 dereferenceable(24) %11, i8 noundef zeroext -1)
          to label %32 unwind label %44

32:                                               ; preds = %29
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #4
  %33 = load ptr, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %12) #4
  %34 = getelementptr inbounds %class.Gift128State, ptr %20, i32 0, i32 3
  call void @_ZNK3Reg8reversedEv(ptr dead_on_unwind writable sret(%class.Reg) align 8 %12, ptr noundef nonnull align 8 dereferenceable(24) %34)
  invoke void @_ZN4Code3stxERK3Regh(ptr noundef nonnull align 8 dereferenceable(200) %33, ptr noundef nonnull align 8 dereferenceable(24) %12, i8 noundef zeroext -1)
          to label %35 unwind label %48

35:                                               ; preds = %32
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #4
  br label %186

36:                                               ; preds = %23
  %37 = landingpad { ptr, i32 }
          cleanup
  %38 = extractvalue { ptr, i32 } %37, 0
  store ptr %38, ptr %8, align 8
  %39 = extractvalue { ptr, i32 } %37, 1
  store i32 %39, ptr %9, align 4
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #4
  br label %187

40:                                               ; preds = %26
  %41 = landingpad { ptr, i32 }
          cleanup
  %42 = extractvalue { ptr, i32 } %41, 0
  store ptr %42, ptr %8, align 8
  %43 = extractvalue { ptr, i32 } %41, 1
  store i32 %43, ptr %9, align 4
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #4
  br label %187

44:                                               ; preds = %29
  %45 = landingpad { ptr, i32 }
          cleanup
  %46 = extractvalue { ptr, i32 } %45, 0
  store ptr %46, ptr %8, align 8
  %47 = extractvalue { ptr, i32 } %45, 1
  store i32 %47, ptr %9, align 4
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #4
  br label %187

48:                                               ; preds = %32
  %49 = landingpad { ptr, i32 }
          cleanup
  %50 = extractvalue { ptr, i32 } %49, 0
  store ptr %50, ptr %8, align 8
  %51 = extractvalue { ptr, i32 } %49, 1
  store i32 %51, ptr %9, align 4
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #4
  br label %187

52:                                               ; preds = %3
  %53 = load i32, ptr %6, align 4, !tbaa !9
  %54 = icmp eq i32 %53, 1
  br i1 %54, label %55, label %64

55:                                               ; preds = %52
  %56 = load ptr, ptr %5, align 8, !tbaa !5
  %57 = getelementptr inbounds %class.Gift128State, ptr %20, i32 0, i32 0
  call void @_ZN4Code3stxERK3Regh(ptr noundef nonnull align 8 dereferenceable(200) %56, ptr noundef nonnull align 8 dereferenceable(24) %57, i8 noundef zeroext -1)
  %58 = load ptr, ptr %5, align 8, !tbaa !5
  %59 = getelementptr inbounds %class.Gift128State, ptr %20, i32 0, i32 1
  call void @_ZN4Code3stxERK3Regh(ptr noundef nonnull align 8 dereferenceable(200) %58, ptr noundef nonnull align 8 dereferenceable(24) %59, i8 noundef zeroext -1)
  %60 = load ptr, ptr %5, align 8, !tbaa !5
  %61 = getelementptr inbounds %class.Gift128State, ptr %20, i32 0, i32 2
  call void @_ZN4Code3stxERK3Regh(ptr noundef nonnull align 8 dereferenceable(200) %60, ptr noundef nonnull align 8 dereferenceable(24) %61, i8 noundef zeroext -1)
  %62 = load ptr, ptr %5, align 8, !tbaa !5
  %63 = getelementptr inbounds %class.Gift128State, ptr %20, i32 0, i32 3
  call void @_ZN4Code3stxERK3Regh(ptr noundef nonnull align 8 dereferenceable(200) %62, ptr noundef nonnull align 8 dereferenceable(24) %63, i8 noundef zeroext -1)
  br label %185

64:                                               ; preds = %52
  %65 = load i32, ptr %6, align 4, !tbaa !9
  %66 = icmp eq i32 %65, 3
  br i1 %66, label %67, label %130

67:                                               ; preds = %64
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %68

68:                                               ; preds = %121, %67
  %69 = load i32, ptr %13, align 4, !tbaa !9
  %70 = icmp slt i32 %69, 4
  br i1 %70, label %71, label %128

71:                                               ; preds = %68
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %72

72:                                               ; preds = %114, %71
  %73 = load i32, ptr %14, align 4, !tbaa !9
  %74 = icmp slt i32 %73, 32
  br i1 %74, label %75, label %117

75:                                               ; preds = %72
  call void @llvm.lifetime.start.p0(i64 24, ptr %15) #4
  call void @_ZN3RegC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15)
  %76 = load i32, ptr %14, align 4, !tbaa !9
  %77 = srem i32 %76, 4
  switch i32 %77, label %79 [
    i32 0, label %78
    i32 1, label %87
    i32 2, label %91
    i32 3, label %95
  ]

78:                                               ; preds = %75
  br label %79

79:                                               ; preds = %78, %75
  %80 = getelementptr inbounds %class.Gift128State, ptr %20, i32 0, i32 3
  %81 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3RegaSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 8 dereferenceable(24) %80)
          to label %82 unwind label %83

82:                                               ; preds = %79
  br label %99

83:                                               ; preds = %108, %99, %95, %91, %87, %79
  %84 = landingpad { ptr, i32 }
          cleanup
  %85 = extractvalue { ptr, i32 } %84, 0
  store ptr %85, ptr %8, align 8
  %86 = extractvalue { ptr, i32 } %84, 1
  store i32 %86, ptr %9, align 4
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #4
  br label %129

87:                                               ; preds = %75
  %88 = getelementptr inbounds %class.Gift128State, ptr %20, i32 0, i32 2
  %89 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3RegaSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 8 dereferenceable(24) %88)
          to label %90 unwind label %83

90:                                               ; preds = %87
  br label %99

91:                                               ; preds = %75
  %92 = getelementptr inbounds %class.Gift128State, ptr %20, i32 0, i32 1
  %93 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3RegaSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 8 dereferenceable(24) %92)
          to label %94 unwind label %83

94:                                               ; preds = %91
  br label %99

95:                                               ; preds = %75
  %96 = getelementptr inbounds %class.Gift128State, ptr %20, i32 0, i32 0
  %97 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3RegaSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 8 dereferenceable(24) %96)
          to label %98 unwind label %83

98:                                               ; preds = %95
  br label %99

99:                                               ; preds = %98, %94, %90, %82
  %100 = load ptr, ptr %5, align 8, !tbaa !5
  %101 = load i32, ptr %14, align 4, !tbaa !9
  %102 = sub nsw i32 31, %101
  %103 = sdiv i32 %102, 4
  %104 = load i32, ptr %13, align 4, !tbaa !9
  %105 = sub nsw i32 3, %104
  %106 = mul nsw i32 %105, 8
  %107 = add nsw i32 %103, %106
  invoke void @_ZN4Code7bit_getERK3Regi(ptr noundef nonnull align 8 dereferenceable(200) %100, ptr noundef nonnull align 8 dereferenceable(24) %15, i32 noundef %107)
          to label %108 unwind label %83

108:                                              ; preds = %99
  %109 = load ptr, ptr %5, align 8, !tbaa !5
  %110 = getelementptr inbounds %class.Gift128State, ptr %20, i32 0, i32 5
  %111 = load i32, ptr %14, align 4, !tbaa !9
  %112 = sub nsw i32 31, %111
  invoke void @_ZN4Code7bit_putERK3Regi(ptr noundef nonnull align 8 dereferenceable(200) %109, ptr noundef nonnull align 8 dereferenceable(24) %110, i32 noundef %112)
          to label %113 unwind label %83

113:                                              ; preds = %108
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #4
  br label %114

114:                                              ; preds = %113
  %115 = load i32, ptr %14, align 4, !tbaa !9
  %116 = add nsw i32 %115, 1
  store i32 %116, ptr %14, align 4, !tbaa !9
  br label %72, !llvm.loop !11

117:                                              ; preds = %72
  %118 = load ptr, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %16) #4
  %119 = getelementptr inbounds %class.Gift128State, ptr %20, i32 0, i32 5
  call void @_ZNK3Reg8reversedEv(ptr dead_on_unwind writable sret(%class.Reg) align 8 %16, ptr noundef nonnull align 8 dereferenceable(24) %119)
  invoke void @_ZN4Code3stxERK3Regh(ptr noundef nonnull align 8 dereferenceable(200) %118, ptr noundef nonnull align 8 dereferenceable(24) %16, i8 noundef zeroext -1)
          to label %120 unwind label %124

120:                                              ; preds = %117
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #4
  br label %121

121:                                              ; preds = %120
  %122 = load i32, ptr %13, align 4, !tbaa !9
  %123 = add nsw i32 %122, 1
  store i32 %123, ptr %13, align 4, !tbaa !9
  br label %68, !llvm.loop !13

124:                                              ; preds = %117
  %125 = landingpad { ptr, i32 }
          cleanup
  %126 = extractvalue { ptr, i32 } %125, 0
  store ptr %126, ptr %8, align 8
  %127 = extractvalue { ptr, i32 } %125, 1
  store i32 %127, ptr %9, align 4
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #4
  br label %129

128:                                              ; preds = %68
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  br label %184

129:                                              ; preds = %124, %83
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  br label %187

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

131:                                              ; preds = %180, %130
  %132 = load i32, ptr %17, align 4, !tbaa !9
  %133 = icmp slt i32 %132, 4
  br i1 %133, label %134, label %183

134:                                              ; preds = %131
  store i32 0, ptr %18, align 4, !tbaa !9
  br label %135

135:                                              ; preds = %174, %134
  %136 = load i32, ptr %18, align 4, !tbaa !9
  %137 = icmp slt i32 %136, 32
  br i1 %137, label %138, label %177

138:                                              ; preds = %135
  call void @llvm.lifetime.start.p0(i64 24, ptr %19) #4
  call void @_ZN3RegC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %19)
  %139 = load i32, ptr %18, align 4, !tbaa !9
  %140 = srem i32 %139, 4
  switch i32 %140, label %142 [
    i32 0, label %141
    i32 1, label %150
    i32 2, label %154
    i32 3, label %158
  ]

141:                                              ; preds = %138
  br label %142

142:                                              ; preds = %141, %138
  %143 = getelementptr inbounds %class.Gift128State, ptr %20, i32 0, i32 0
  %144 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3RegaSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %19, ptr noundef nonnull align 8 dereferenceable(24) %143)
          to label %145 unwind label %146

145:                                              ; preds = %142
  br label %162

146:                                              ; preds = %169, %162, %158, %154, %150, %142
  %147 = landingpad { ptr, i32 }
          cleanup
  %148 = extractvalue { ptr, i32 } %147, 0
  store ptr %148, ptr %8, align 8
  %149 = extractvalue { ptr, i32 } %147, 1
  store i32 %149, ptr %9, align 4
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %19) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  br label %187

150:                                              ; preds = %138
  %151 = getelementptr inbounds %class.Gift128State, ptr %20, i32 0, i32 1
  %152 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3RegaSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %19, ptr noundef nonnull align 8 dereferenceable(24) %151)
          to label %153 unwind label %146

153:                                              ; preds = %150
  br label %162

154:                                              ; preds = %138
  %155 = getelementptr inbounds %class.Gift128State, ptr %20, i32 0, i32 2
  %156 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3RegaSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %19, ptr noundef nonnull align 8 dereferenceable(24) %155)
          to label %157 unwind label %146

157:                                              ; preds = %154
  br label %162

158:                                              ; preds = %138
  %159 = getelementptr inbounds %class.Gift128State, ptr %20, i32 0, i32 3
  %160 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3RegaSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %19, ptr noundef nonnull align 8 dereferenceable(24) %159)
          to label %161 unwind label %146

161:                                              ; preds = %158
  br label %162

162:                                              ; preds = %161, %157, %153, %145
  %163 = load ptr, ptr %5, align 8, !tbaa !5
  %164 = load i32, ptr %18, align 4, !tbaa !9
  %165 = sdiv i32 %164, 4
  %166 = load i32, ptr %17, align 4, !tbaa !9
  %167 = mul nsw i32 %166, 8
  %168 = add nsw i32 %165, %167
  invoke void @_ZN4Code7bit_getERK3Regi(ptr noundef nonnull align 8 dereferenceable(200) %163, ptr noundef nonnull align 8 dereferenceable(24) %19, i32 noundef %168)
          to label %169 unwind label %146

169:                                              ; preds = %162
  %170 = load ptr, ptr %5, align 8, !tbaa !5
  %171 = getelementptr inbounds %class.Gift128State, ptr %20, i32 0, i32 5
  %172 = load i32, ptr %18, align 4, !tbaa !9
  invoke void @_ZN4Code7bit_putERK3Regi(ptr noundef nonnull align 8 dereferenceable(200) %170, ptr noundef nonnull align 8 dereferenceable(24) %171, i32 noundef %172)
          to label %173 unwind label %146

173:                                              ; preds = %169
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %19) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %19) #4
  br label %174

174:                                              ; preds = %173
  %175 = load i32, ptr %18, align 4, !tbaa !9
  %176 = add nsw i32 %175, 1
  store i32 %176, ptr %18, align 4, !tbaa !9
  br label %135, !llvm.loop !14

177:                                              ; preds = %135
  %178 = load ptr, ptr %5, align 8, !tbaa !5
  %179 = getelementptr inbounds %class.Gift128State, ptr %20, i32 0, i32 5
  call void @_ZN4Code3stxERK3Regh(ptr noundef nonnull align 8 dereferenceable(200) %178, ptr noundef nonnull align 8 dereferenceable(24) %179, i8 noundef zeroext -1)
  br label %180

180:                                              ; preds = %177
  %181 = load i32, ptr %17, align 4, !tbaa !9
  %182 = add nsw i32 %181, 1
  store i32 %182, ptr %17, align 4, !tbaa !9
  br label %131, !llvm.loop !15

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

184:                                              ; preds = %183, %128
  br label %185

185:                                              ; preds = %184, %55
  br label %186

186:                                              ; preds = %185, %35
  ret void

187:                                              ; preds = %146, %129, %48, %44, %40, %36
  %188 = load ptr, ptr %8, align 8
  %189 = load i32, ptr %9, align 4
  %190 = insertvalue { ptr, i32 } poison, ptr %188, 0
  %191 = insertvalue { ptr, i32 } %190, i32 %189, 1
  resume { ptr, i32 } %191
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4Code3stxERK3Regh(ptr noundef nonnull align 8 dereferenceable(200), ptr noundef nonnull align 8 dereferenceable(24), i8 noundef zeroext) #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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }

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

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


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%class.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 }

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

declare i32 @__gxx_personality_v0(...)

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

; 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

declare void @_ZNK3Reg8reversedEv(ptr dead_on_unwind writable sret(%class.Reg) align 8, ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3

declare void @_ZN4Code7bit_getERK3Regi(ptr noundef nonnull align 8 dereferenceable(200), ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) local_unnamed_addr #3

declare void @_ZN4Code7bit_putERK3Regi(ptr noundef nonnull align 8 dereferenceable(200), ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN12Gift128State11store_stateER4Codei(ptr noundef nonnull align 8 dereferenceable(145) %0, ptr noundef nonnull align 8 dereferenceable(200) %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 %class.Reg, align 8
  %7 = alloca %class.Reg, align 8
  %8 = alloca %class.Reg, align 8
  %9 = alloca %class.Reg, align 8
  %10 = alloca %class.Reg, align 8
  switch i32 %2, label %.preheader46 [
    i32 0, label %19
    i32 1, label %35
    i32 3, label %.preheader48
  ]

.preheader48:                                     ; preds = %3
  %11 = getelementptr inbounds i8, ptr %0, i64 72
  %12 = getelementptr inbounds i8, ptr %0, i64 24
  %13 = getelementptr inbounds i8, ptr %0, i64 48
  %14 = getelementptr inbounds i8, ptr %0, i64 120
  br label %39

.preheader46:                                     ; preds = %3
  %15 = getelementptr inbounds i8, ptr %0, i64 48
  %16 = getelementptr inbounds i8, ptr %0, i64 24
  %17 = getelementptr inbounds i8, ptr %0, i64 72
  %18 = getelementptr inbounds i8, ptr %0, i64 120
  br label %100

19:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #4
  call void @_ZNK3Reg8reversedEv(ptr dead_on_unwind nonnull writable sret(%class.Reg) align 8 %4, ptr noundef nonnull align 8 dereferenceable(24) %0)
  invoke void @_ZN4Code3stxERK3Regh(ptr noundef nonnull align 8 dereferenceable(200) %1, ptr noundef nonnull align 8 dereferenceable(24) %4, i8 noundef zeroext -1)
          to label %20 unwind label %27

20:                                               ; preds = %19
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #4
  %21 = getelementptr inbounds i8, ptr %0, i64 24
  call void @_ZNK3Reg8reversedEv(ptr dead_on_unwind nonnull writable sret(%class.Reg) align 8 %5, ptr noundef nonnull align 8 dereferenceable(24) %21)
  invoke void @_ZN4Code3stxERK3Regh(ptr noundef nonnull align 8 dereferenceable(200) %1, ptr noundef nonnull align 8 dereferenceable(24) %5, i8 noundef zeroext -1)
          to label %22 unwind label %29

22:                                               ; preds = %20
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #4
  %23 = getelementptr inbounds i8, ptr %0, i64 48
  call void @_ZNK3Reg8reversedEv(ptr dead_on_unwind nonnull writable sret(%class.Reg) align 8 %6, ptr noundef nonnull align 8 dereferenceable(24) %23)
  invoke void @_ZN4Code3stxERK3Regh(ptr noundef nonnull align 8 dereferenceable(200) %1, ptr noundef nonnull align 8 dereferenceable(24) %6, i8 noundef zeroext -1)
          to label %24 unwind label %31

24:                                               ; preds = %22
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #4
  %25 = getelementptr inbounds i8, ptr %0, i64 72
  call void @_ZNK3Reg8reversedEv(ptr dead_on_unwind nonnull writable sret(%class.Reg) align 8 %7, ptr noundef nonnull align 8 dereferenceable(24) %25)
  invoke void @_ZN4Code3stxERK3Regh(ptr noundef nonnull align 8 dereferenceable(200) %1, ptr noundef nonnull align 8 dereferenceable(24) %7, i8 noundef zeroext -1)
          to label %26 unwind label %33

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

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

29:                                               ; preds = %20
  %30 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #4
  br label %151

31:                                               ; preds = %22
  %32 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #4
  br label %151

33:                                               ; preds = %24
  %34 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #4
  br label %151

35:                                               ; preds = %3
  tail call void @_ZN4Code3stxERK3Regh(ptr noundef nonnull align 8 dereferenceable(200) %1, ptr noundef nonnull align 8 dereferenceable(24) %0, i8 noundef zeroext -1)
  %36 = getelementptr inbounds i8, ptr %0, i64 24
  tail call void @_ZN4Code3stxERK3Regh(ptr noundef nonnull align 8 dereferenceable(200) %1, ptr noundef nonnull align 8 dereferenceable(24) %36, i8 noundef zeroext -1)
  %37 = getelementptr inbounds i8, ptr %0, i64 48
  tail call void @_ZN4Code3stxERK3Regh(ptr noundef nonnull align 8 dereferenceable(200) %1, ptr noundef nonnull align 8 dereferenceable(24) %37, i8 noundef zeroext -1)
  %38 = getelementptr inbounds i8, ptr %0, i64 72
  tail call void @_ZN4Code3stxERK3Regh(ptr noundef nonnull align 8 dereferenceable(200) %1, ptr noundef nonnull align 8 dereferenceable(24) %38, i8 noundef zeroext -1)
  br label %.loopexit

39:                                               ; preds = %.preheader48, %51
  %.03650 = phi i32 [ 0, %.preheader48 ], [ %52, %51 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #4
  call void @_ZN3RegC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8)
  %40 = and i32 %.03650, 3
  switch i32 %40, label %.unreachabledefault [
    i32 3, label %45
    i32 1, label %.invoke
    i32 2, label %44
    i32 0, label %41
  ]

.unreachabledefault:                              ; preds = %39
  unreachable

default.unreachable:                              ; preds = %54, %69, %84, %100, %112, %125, %138
  unreachable

41:                                               ; preds = %39
  br label %.invoke

.invoke:                                          ; preds = %39, %45, %44, %41
  %42 = phi ptr [ %11, %41 ], [ %12, %44 ], [ %0, %45 ], [ %13, %39 ]
  %43 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3RegaSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(24) %42)
          to label %46 unwind label %.loopexit58

.loopexit58:                                      ; preds = %.invoke, %46, %50
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

.loopexit.split-lp.loopexit:                      ; preds = %.invoke90, %65, %61
  %lpad.loopexit60 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

.loopexit.split-lp.loopexit.split-lp.loopexit:    ; preds = %.invoke91, %76, %80
  %lpad.loopexit64 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

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

.loopexit.split-lp:                               ; preds = %.loopexit.split-lp.loopexit, %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp, %.loopexit.split-lp.loopexit.split-lp.loopexit, %.loopexit58
  %lpad.phi = phi { ptr, i32 } [ %lpad.loopexit, %.loopexit58 ], [ %lpad.loopexit60, %.loopexit.split-lp.loopexit ], [ %lpad.loopexit64, %.loopexit.split-lp.loopexit.split-lp.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp ]
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #4
  br label %151

44:                                               ; preds = %39
  br label %.invoke

45:                                               ; preds = %39
  br label %.invoke

46:                                               ; preds = %.invoke
  %47 = sub nuw nsw i32 31, %.03650
  %48 = lshr i32 %47, 2
  %49 = or disjoint i32 %48, 24
  invoke void @_ZN4Code7bit_getERK3Regi(ptr noundef nonnull align 8 dereferenceable(200) %1, ptr noundef nonnull align 8 dereferenceable(24) %8, i32 noundef %49)
          to label %50 unwind label %.loopexit58

50:                                               ; preds = %46
  invoke void @_ZN4Code7bit_putERK3Regi(ptr noundef nonnull align 8 dereferenceable(200) %1, ptr noundef nonnull align 8 dereferenceable(24) %14, i32 noundef %47)
          to label %51 unwind label %.loopexit58

51:                                               ; preds = %50
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #4
  %52 = add nuw nsw i32 %.03650, 1
  %exitcond.not = icmp eq i32 %52, 32
  br i1 %exitcond.not, label %53, label %39, !llvm.loop !5

53:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #4
  call void @_ZNK3Reg8reversedEv(ptr dead_on_unwind nonnull writable sret(%class.Reg) align 8 %9, ptr noundef nonnull align 8 dereferenceable(24) %14)
  invoke void @_ZN4Code3stxERK3Regh(ptr noundef nonnull align 8 dereferenceable(200) %1, ptr noundef nonnull align 8 dereferenceable(24) %9, i8 noundef zeroext -1)
          to label %.preheader47.1 unwind label %98

.preheader47.1:                                   ; preds = %53
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #4
  br label %54

54:                                               ; preds = %66, %.preheader47.1
  %.03650.1 = phi i32 [ 0, %.preheader47.1 ], [ %67, %66 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #4
  call void @_ZN3RegC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8)
  %55 = and i32 %.03650.1, 3
  switch i32 %55, label %default.unreachable [
    i32 3, label %58
    i32 1, label %57
    i32 2, label %56
    i32 0, label %.invoke90
  ]

56:                                               ; preds = %54
  br label %.invoke90

57:                                               ; preds = %54
  br label %.invoke90

58:                                               ; preds = %54
  br label %.invoke90

.invoke90:                                        ; preds = %54, %56, %57, %58
  %59 = phi ptr [ %0, %58 ], [ %13, %57 ], [ %12, %56 ], [ %11, %54 ]
  %60 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3RegaSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(24) %59)
          to label %61 unwind label %.loopexit.split-lp.loopexit

61:                                               ; preds = %.invoke90
  %62 = sub nuw nsw i32 31, %.03650.1
  %63 = lshr i32 %62, 2
  %64 = or disjoint i32 %63, 16
  invoke void @_ZN4Code7bit_getERK3Regi(ptr noundef nonnull align 8 dereferenceable(200) %1, ptr noundef nonnull align 8 dereferenceable(24) %8, i32 noundef %64)
          to label %65 unwind label %.loopexit.split-lp.loopexit

65:                                               ; preds = %61
  invoke void @_ZN4Code7bit_putERK3Regi(ptr noundef nonnull align 8 dereferenceable(200) %1, ptr noundef nonnull align 8 dereferenceable(24) %14, i32 noundef %62)
          to label %66 unwind label %.loopexit.split-lp.loopexit

66:                                               ; preds = %65
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #4
  %67 = add nuw nsw i32 %.03650.1, 1
  %exitcond.1.not = icmp eq i32 %67, 32
  br i1 %exitcond.1.not, label %68, label %54, !llvm.loop !5

68:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #4
  call void @_ZNK3Reg8reversedEv(ptr dead_on_unwind nonnull writable sret(%class.Reg) align 8 %9, ptr noundef nonnull align 8 dereferenceable(24) %14)
  invoke void @_ZN4Code3stxERK3Regh(ptr noundef nonnull align 8 dereferenceable(200) %1, ptr noundef nonnull align 8 dereferenceable(24) %9, i8 noundef zeroext -1)
          to label %.preheader47.2 unwind label %98

.preheader47.2:                                   ; preds = %68
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #4
  br label %69

69:                                               ; preds = %81, %.preheader47.2
  %.03650.2 = phi i32 [ 0, %.preheader47.2 ], [ %82, %81 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #4
  call void @_ZN3RegC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8)
  %70 = and i32 %.03650.2, 3
  switch i32 %70, label %default.unreachable [
    i32 3, label %75
    i32 1, label %74
    i32 2, label %73
    i32 0, label %.invoke91
  ]

.invoke91:                                        ; preds = %69, %75, %74, %73
  %71 = phi ptr [ %12, %73 ], [ %13, %74 ], [ %0, %75 ], [ %11, %69 ]
  %72 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3RegaSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(24) %71)
          to label %76 unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit

73:                                               ; preds = %69
  br label %.invoke91

74:                                               ; preds = %69
  br label %.invoke91

75:                                               ; preds = %69
  br label %.invoke91

76:                                               ; preds = %.invoke91
  %77 = sub nuw nsw i32 31, %.03650.2
  %78 = lshr i32 %77, 2
  %79 = or disjoint i32 %78, 8
  invoke void @_ZN4Code7bit_getERK3Regi(ptr noundef nonnull align 8 dereferenceable(200) %1, ptr noundef nonnull align 8 dereferenceable(24) %8, i32 noundef %79)
          to label %80 unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit

80:                                               ; preds = %76
  invoke void @_ZN4Code7bit_putERK3Regi(ptr noundef nonnull align 8 dereferenceable(200) %1, ptr noundef nonnull align 8 dereferenceable(24) %14, i32 noundef %77)
          to label %81 unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit

81:                                               ; preds = %80
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #4
  %82 = add nuw nsw i32 %.03650.2, 1
  %exitcond.2.not = icmp eq i32 %82, 32
  br i1 %exitcond.2.not, label %83, label %69, !llvm.loop !5

83:                                               ; preds = %81
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #4
  call void @_ZNK3Reg8reversedEv(ptr dead_on_unwind nonnull writable sret(%class.Reg) align 8 %9, ptr noundef nonnull align 8 dereferenceable(24) %14)
  invoke void @_ZN4Code3stxERK3Regh(ptr noundef nonnull align 8 dereferenceable(200) %1, ptr noundef nonnull align 8 dereferenceable(24) %9, i8 noundef zeroext -1)
          to label %.preheader47.3 unwind label %98

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

84:                                               ; preds = %95, %.preheader47.3
  %.03650.3 = phi i32 [ 0, %.preheader47.3 ], [ %96, %95 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #4
  call void @_ZN3RegC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8)
  %85 = and i32 %.03650.3, 3
  switch i32 %85, label %default.unreachable [
    i32 3, label %90
    i32 1, label %89
    i32 2, label %88
    i32 0, label %.invoke92
  ]

.invoke92:                                        ; preds = %84, %90, %89, %88
  %86 = phi ptr [ %12, %88 ], [ %13, %89 ], [ %0, %90 ], [ %11, %84 ]
  %87 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3RegaSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(24) %86)
          to label %91 unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp

88:                                               ; preds = %84
  br label %.invoke92

89:                                               ; preds = %84
  br label %.invoke92

90:                                               ; preds = %84
  br label %.invoke92

91:                                               ; preds = %.invoke92
  %92 = sub nuw nsw i32 31, %.03650.3
  %93 = lshr i32 %92, 2
  invoke void @_ZN4Code7bit_getERK3Regi(ptr noundef nonnull align 8 dereferenceable(200) %1, ptr noundef nonnull align 8 dereferenceable(24) %8, i32 noundef %93)
          to label %94 unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp

94:                                               ; preds = %91
  invoke void @_ZN4Code7bit_putERK3Regi(ptr noundef nonnull align 8 dereferenceable(200) %1, ptr noundef nonnull align 8 dereferenceable(24) %14, i32 noundef %92)
          to label %95 unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp

95:                                               ; preds = %94
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #4
  %96 = add nuw nsw i32 %.03650.3, 1
  %exitcond.3.not = icmp eq i32 %96, 32
  br i1 %exitcond.3.not, label %97, label %84, !llvm.loop !5

97:                                               ; preds = %95
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #4
  call void @_ZNK3Reg8reversedEv(ptr dead_on_unwind nonnull writable sret(%class.Reg) align 8 %9, ptr noundef nonnull align 8 dereferenceable(24) %14)
  invoke void @_ZN4Code3stxERK3Regh(ptr noundef nonnull align 8 dereferenceable(200) %1, ptr noundef nonnull align 8 dereferenceable(24) %9, i8 noundef zeroext -1)
          to label %.loopexit.loopexit56 unwind label %98

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

98:                                               ; preds = %97, %83, %68, %53
  %99 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #4
  br label %151

100:                                              ; preds = %.preheader46, %110
  %.052 = phi i32 [ 0, %.preheader46 ], [ %111, %110 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #4
  call void @_ZN3RegC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10)
  %101 = and i32 %.052, 3
  switch i32 %101, label %default.unreachable [
    i32 3, label %106
    i32 1, label %.invoke93
    i32 2, label %105
    i32 0, label %102
  ]

102:                                              ; preds = %100
  br label %.invoke93

.invoke93:                                        ; preds = %100, %106, %105, %102
  %103 = phi ptr [ %0, %102 ], [ %15, %105 ], [ %17, %106 ], [ %16, %100 ]
  %104 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3RegaSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(24) %103)
          to label %107 unwind label %.loopexit69

.loopexit69:                                      ; preds = %.invoke93, %107, %109
  %lpad.loopexit71 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp70

.loopexit.split-lp70.loopexit:                    ; preds = %.invoke94, %122, %119
  %lpad.loopexit75 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp70

.loopexit.split-lp70.loopexit.split-lp.loopexit:  ; preds = %.invoke95, %132, %135
  %lpad.loopexit79 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp70

.loopexit.split-lp70.loopexit.split-lp.loopexit.split-lp: ; preds = %.invoke96, %145, %148
  %lpad.loopexit.split-lp80 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp70

.loopexit.split-lp70:                             ; preds = %.loopexit.split-lp70.loopexit, %.loopexit.split-lp70.loopexit.split-lp.loopexit.split-lp, %.loopexit.split-lp70.loopexit.split-lp.loopexit, %.loopexit69
  %lpad.phi73 = phi { ptr, i32 } [ %lpad.loopexit71, %.loopexit69 ], [ %lpad.loopexit75, %.loopexit.split-lp70.loopexit ], [ %lpad.loopexit79, %.loopexit.split-lp70.loopexit.split-lp.loopexit ], [ %lpad.loopexit.split-lp80, %.loopexit.split-lp70.loopexit.split-lp.loopexit.split-lp ]
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #4
  br label %151

105:                                              ; preds = %100
  br label %.invoke93

106:                                              ; preds = %100
  br label %.invoke93

107:                                              ; preds = %.invoke93
  %108 = lshr i32 %.052, 2
  invoke void @_ZN4Code7bit_getERK3Regi(ptr noundef nonnull align 8 dereferenceable(200) %1, ptr noundef nonnull align 8 dereferenceable(24) %10, i32 noundef %108)
          to label %109 unwind label %.loopexit69

109:                                              ; preds = %107
  invoke void @_ZN4Code7bit_putERK3Regi(ptr noundef nonnull align 8 dereferenceable(200) %1, ptr noundef nonnull align 8 dereferenceable(24) %18, i32 noundef %.052)
          to label %110 unwind label %.loopexit69

110:                                              ; preds = %109
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #4
  %111 = add nuw nsw i32 %.052, 1
  %exitcond67.not = icmp eq i32 %111, 32
  br i1 %exitcond67.not, label %.preheader.1, label %100, !llvm.loop !7

.preheader.1:                                     ; preds = %110
  call void @_ZN4Code3stxERK3Regh(ptr noundef nonnull align 8 dereferenceable(200) %1, ptr noundef nonnull align 8 dereferenceable(24) %18, i8 noundef zeroext -1)
  br label %112

112:                                              ; preds = %123, %.preheader.1
  %.052.1 = phi i32 [ 0, %.preheader.1 ], [ %124, %123 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #4
  call void @_ZN3RegC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10)
  %113 = and i32 %.052.1, 3
  switch i32 %113, label %default.unreachable [
    i32 3, label %116
    i32 1, label %115
    i32 2, label %114
    i32 0, label %.invoke94
  ]

114:                                              ; preds = %112
  br label %.invoke94

115:                                              ; preds = %112
  br label %.invoke94

116:                                              ; preds = %112
  br label %.invoke94

.invoke94:                                        ; preds = %112, %114, %115, %116
  %117 = phi ptr [ %17, %116 ], [ %16, %115 ], [ %15, %114 ], [ %0, %112 ]
  %118 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3RegaSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(24) %117)
          to label %119 unwind label %.loopexit.split-lp70.loopexit

119:                                              ; preds = %.invoke94
  %120 = lshr i32 %.052.1, 2
  %121 = add nuw nsw i32 %120, 8
  invoke void @_ZN4Code7bit_getERK3Regi(ptr noundef nonnull align 8 dereferenceable(200) %1, ptr noundef nonnull align 8 dereferenceable(24) %10, i32 noundef %121)
          to label %122 unwind label %.loopexit.split-lp70.loopexit

122:                                              ; preds = %119
  invoke void @_ZN4Code7bit_putERK3Regi(ptr noundef nonnull align 8 dereferenceable(200) %1, ptr noundef nonnull align 8 dereferenceable(24) %18, i32 noundef %.052.1)
          to label %123 unwind label %.loopexit.split-lp70.loopexit

123:                                              ; preds = %122
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #4
  %124 = add nuw nsw i32 %.052.1, 1
  %exitcond67.1.not = icmp eq i32 %124, 32
  br i1 %exitcond67.1.not, label %.preheader.2, label %112, !llvm.loop !7

.preheader.2:                                     ; preds = %123
  call void @_ZN4Code3stxERK3Regh(ptr noundef nonnull align 8 dereferenceable(200) %1, ptr noundef nonnull align 8 dereferenceable(24) %18, i8 noundef zeroext -1)
  br label %125

125:                                              ; preds = %136, %.preheader.2
  %.052.2 = phi i32 [ 0, %.preheader.2 ], [ %137, %136 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #4
  call void @_ZN3RegC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10)
  %126 = and i32 %.052.2, 3
  switch i32 %126, label %default.unreachable [
    i32 3, label %131
    i32 1, label %130
    i32 2, label %129
    i32 0, label %.invoke95
  ]

.invoke95:                                        ; preds = %125, %131, %130, %129
  %127 = phi ptr [ %15, %129 ], [ %16, %130 ], [ %17, %131 ], [ %0, %125 ]
  %128 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3RegaSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(24) %127)
          to label %132 unwind label %.loopexit.split-lp70.loopexit.split-lp.loopexit

129:                                              ; preds = %125
  br label %.invoke95

130:                                              ; preds = %125
  br label %.invoke95

131:                                              ; preds = %125
  br label %.invoke95

132:                                              ; preds = %.invoke95
  %133 = lshr i32 %.052.2, 2
  %134 = add nuw nsw i32 %133, 16
  invoke void @_ZN4Code7bit_getERK3Regi(ptr noundef nonnull align 8 dereferenceable(200) %1, ptr noundef nonnull align 8 dereferenceable(24) %10, i32 noundef %134)
          to label %135 unwind label %.loopexit.split-lp70.loopexit.split-lp.loopexit

135:                                              ; preds = %132
  invoke void @_ZN4Code7bit_putERK3Regi(ptr noundef nonnull align 8 dereferenceable(200) %1, ptr noundef nonnull align 8 dereferenceable(24) %18, i32 noundef %.052.2)
          to label %136 unwind label %.loopexit.split-lp70.loopexit.split-lp.loopexit

136:                                              ; preds = %135
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #4
  %137 = add nuw nsw i32 %.052.2, 1
  %exitcond67.2.not = icmp eq i32 %137, 32
  br i1 %exitcond67.2.not, label %.preheader.3, label %125, !llvm.loop !7

.preheader.3:                                     ; preds = %136
  call void @_ZN4Code3stxERK3Regh(ptr noundef nonnull align 8 dereferenceable(200) %1, ptr noundef nonnull align 8 dereferenceable(24) %18, i8 noundef zeroext -1)
  br label %138

138:                                              ; preds = %149, %.preheader.3
  %.052.3 = phi i32 [ 0, %.preheader.3 ], [ %150, %149 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #4
  call void @_ZN3RegC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10)
  %139 = and i32 %.052.3, 3
  switch i32 %139, label %default.unreachable [
    i32 3, label %144
    i32 1, label %143
    i32 2, label %142
    i32 0, label %.invoke96
  ]

.invoke96:                                        ; preds = %138, %144, %143, %142
  %140 = phi ptr [ %15, %142 ], [ %16, %143 ], [ %17, %144 ], [ %0, %138 ]
  %141 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3RegaSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(24) %140)
          to label %145 unwind label %.loopexit.split-lp70.loopexit.split-lp.loopexit.split-lp

142:                                              ; preds = %138
  br label %.invoke96

143:                                              ; preds = %138
  br label %.invoke96

144:                                              ; preds = %138
  br label %.invoke96

145:                                              ; preds = %.invoke96
  %146 = lshr i32 %.052.3, 2
  %147 = add nuw nsw i32 %146, 24
  invoke void @_ZN4Code7bit_getERK3Regi(ptr noundef nonnull align 8 dereferenceable(200) %1, ptr noundef nonnull align 8 dereferenceable(24) %10, i32 noundef %147)
          to label %148 unwind label %.loopexit.split-lp70.loopexit.split-lp.loopexit.split-lp

148:                                              ; preds = %145
  invoke void @_ZN4Code7bit_putERK3Regi(ptr noundef nonnull align 8 dereferenceable(200) %1, ptr noundef nonnull align 8 dereferenceable(24) %18, i32 noundef %.052.3)
          to label %149 unwind label %.loopexit.split-lp70.loopexit.split-lp.loopexit.split-lp

149:                                              ; preds = %148
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #4
  %150 = add nuw nsw i32 %.052.3, 1
  %exitcond67.3.not = icmp eq i32 %150, 32
  br i1 %exitcond67.3.not, label %.loopexit.loopexit, label %138, !llvm.loop !7

.loopexit.loopexit:                               ; preds = %149
  call void @_ZN4Code3stxERK3Regh(ptr noundef nonnull align 8 dereferenceable(200) %1, ptr noundef nonnull align 8 dereferenceable(24) %18, i8 noundef zeroext -1)
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.loopexit56, %.loopexit.loopexit, %35, %26
  ret void

151:                                              ; preds = %.loopexit.split-lp, %98, %.loopexit.split-lp70, %33, %31, %29, %27
  %.pn43 = phi { ptr, i32 } [ %34, %33 ], [ %32, %31 ], [ %30, %29 ], [ %28, %27 ], [ %lpad.phi73, %.loopexit.split-lp70 ], [ %lpad.phi, %.loopexit.split-lp ], [ %99, %98 ]
  resume { ptr, i32 } %.pn43
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4Code3stxERK3Regh(ptr noundef nonnull align 8 dereferenceable(200), ptr noundef nonnull align 8 dereferenceable(24), i8 noundef zeroext) 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = distinct !{!7, !6}


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