; LLVM IR from rweather/lightweight-crypto :: src/genavr/algorithm_gift128.ll (ZN12Gift128State10load_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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN12Gift128State10load_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 @_ZN4Code3ldxERK3Regh(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 @_ZN4Code3ldxERK3Regh(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 @_ZN4Code3ldxERK3Regh(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 @_ZN4Code3ldxERK3Regh(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 @_ZN4Code3ldxERK3Regh(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 @_ZN4Code3ldxERK3Regh(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 @_ZN4Code3ldxERK3Regh(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 @_ZN4Code3ldxERK3Regh(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 = %125, %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
  %72 = load ptr, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %15) #4
  %73 = getelementptr inbounds %class.Gift128State, ptr %20, i32 0, i32 5
  call void @_ZNK3Reg8reversedEv(ptr dead_on_unwind writable sret(%class.Reg) align 8 %15, ptr noundef nonnull align 8 dereferenceable(24) %73)
  invoke void @_ZN4Code3ldxERK3Regh(ptr noundef nonnull align 8 dereferenceable(200) %72, ptr noundef nonnull align 8 dereferenceable(24) %15, i8 noundef zeroext -1)
          to label %74 unwind label %81

74:                                               ; preds = %71
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #4
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %75

75:                                               ; preds = %121, %74
  %76 = load i32, ptr %14, align 4, !tbaa !9
  %77 = icmp slt i32 %76, 32
  br i1 %77, label %78, label %124

78:                                               ; preds = %75
  call void @llvm.lifetime.start.p0(i64 24, ptr %16) #4
  call void @_ZN3RegC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16)
  %79 = load i32, ptr %14, align 4, !tbaa !9
  %80 = srem i32 %79, 4
  switch i32 %80, label %86 [
    i32 0, label %85
    i32 1, label %94
    i32 2, label %98
    i32 3, label %102
  ]

81:                                               ; preds = %71
  %82 = landingpad { ptr, i32 }
          cleanup
  %83 = extractvalue { ptr, i32 } %82, 0
  store ptr %83, ptr %8, align 8
  %84 = extractvalue { ptr, i32 } %82, 1
  store i32 %84, 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

85:                                               ; preds = %78
  br label %86

86:                                               ; preds = %85, %78
  %87 = getelementptr inbounds %class.Gift128State, ptr %20, i32 0, i32 3
  %88 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3RegaSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %16, ptr noundef nonnull align 8 dereferenceable(24) %87)
          to label %89 unwind label %90

89:                                               ; preds = %86
  br label %106

90:                                               ; preds = %111, %106, %102, %98, %94, %86
  %91 = landingpad { ptr, i32 }
          cleanup
  %92 = extractvalue { ptr, i32 } %91, 0
  store ptr %92, ptr %8, align 8
  %93 = extractvalue { ptr, i32 } %91, 1
  store i32 %93, 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

94:                                               ; preds = %78
  %95 = getelementptr inbounds %class.Gift128State, ptr %20, i32 0, i32 2
  %96 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3RegaSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %16, ptr noundef nonnull align 8 dereferenceable(24) %95)
          to label %97 unwind label %90

97:                                               ; preds = %94
  br label %106

98:                                               ; preds = %78
  %99 = getelementptr inbounds %class.Gift128State, ptr %20, i32 0, i32 1
  %100 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3RegaSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %16, ptr noundef nonnull align 8 dereferenceable(24) %99)
          to label %101 unwind label %90

101:                                              ; preds = %98
  br label %106

102:                                              ; preds = %78
  %103 = getelementptr inbounds %class.Gift128State, ptr %20, i32 0, i32 0
  %104 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3RegaSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %16, ptr noundef nonnull align 8 dereferenceable(24) %103)
          to label %105 unwind label %90

105:                                              ; preds = %102
  br label %106

106:                                              ; preds = %105, %101, %97, %89
  %107 = load ptr, ptr %5, align 8, !tbaa !5
  %108 = getelementptr inbounds %class.Gift128State, ptr %20, i32 0, i32 5
  %109 = load i32, ptr %14, align 4, !tbaa !9
  %110 = sub nsw i32 31, %109
  invoke void @_ZN4Code7bit_getERK3Regi(ptr noundef nonnull align 8 dereferenceable(200) %107, ptr noundef nonnull align 8 dereferenceable(24) %108, i32 noundef %110)
          to label %111 unwind label %90

111:                                              ; preds = %106
  %112 = load ptr, ptr %5, align 8, !tbaa !5
  %113 = load i32, ptr %14, align 4, !tbaa !9
  %114 = sub nsw i32 31, %113
  %115 = sdiv i32 %114, 4
  %116 = load i32, ptr %13, align 4, !tbaa !9
  %117 = sub nsw i32 3, %116
  %118 = mul nsw i32 %117, 8
  %119 = add nsw i32 %115, %118
  invoke void @_ZN4Code7bit_putERK3Regi(ptr noundef nonnull align 8 dereferenceable(200) %112, ptr noundef nonnull align 8 dereferenceable(24) %16, i32 noundef %119)
          to label %120 unwind label %90

120:                                              ; preds = %111
  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 %14, align 4, !tbaa !9
  %123 = add nsw i32 %122, 1
  store i32 %123, ptr %14, align 4, !tbaa !9
  br label %75, !llvm.loop !11

124:                                              ; preds = %75
  br label %125

125:                                              ; preds = %124
  %126 = load i32, ptr %13, align 4, !tbaa !9
  %127 = add nsw i32 %126, 1
  store i32 %127, ptr %13, align 4, !tbaa !9
  br label %68, !llvm.loop !13

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 = %90, %81
  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
  %135 = load ptr, ptr %5, align 8, !tbaa !5
  %136 = getelementptr inbounds %class.Gift128State, ptr %20, i32 0, i32 5
  call void @_ZN4Code3ldxERK3Regh(ptr noundef nonnull align 8 dereferenceable(200) %135, ptr noundef nonnull align 8 dereferenceable(24) %136, i8 noundef zeroext -1)
  store i32 0, ptr %18, align 4, !tbaa !9
  br label %137

137:                                              ; preds = %176, %134
  %138 = load i32, ptr %18, align 4, !tbaa !9
  %139 = icmp slt i32 %138, 32
  br i1 %139, label %140, label %179

140:                                              ; preds = %137
  call void @llvm.lifetime.start.p0(i64 24, ptr %19) #4
  call void @_ZN3RegC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %19)
  %141 = load i32, ptr %18, align 4, !tbaa !9
  %142 = srem i32 %141, 4
  switch i32 %142, label %144 [
    i32 0, label %143
    i32 1, label %152
    i32 2, label %156
    i32 3, label %160
  ]

143:                                              ; preds = %140
  br label %144

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

147:                                              ; preds = %144
  br label %164

148:                                              ; preds = %168, %164, %160, %156, %152, %144
  %149 = landingpad { ptr, i32 }
          cleanup
  %150 = extractvalue { ptr, i32 } %149, 0
  store ptr %150, ptr %8, align 8
  %151 = extractvalue { ptr, i32 } %149, 1
  store i32 %151, 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

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

155:                                              ; preds = %152
  br label %164

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

159:                                              ; preds = %156
  br label %164

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

163:                                              ; preds = %160
  br label %164

164:                                              ; preds = %163, %159, %155, %147
  %165 = load ptr, ptr %5, align 8, !tbaa !5
  %166 = getelementptr inbounds %class.Gift128State, ptr %20, i32 0, i32 5
  %167 = load i32, ptr %18, align 4, !tbaa !9
  invoke void @_ZN4Code7bit_getERK3Regi(ptr noundef nonnull align 8 dereferenceable(200) %165, ptr noundef nonnull align 8 dereferenceable(24) %166, i32 noundef %167)
          to label %168 unwind label %148

168:                                              ; preds = %164
  %169 = load ptr, ptr %5, align 8, !tbaa !5
  %170 = load i32, ptr %18, align 4, !tbaa !9
  %171 = sdiv i32 %170, 4
  %172 = load i32, ptr %17, align 4, !tbaa !9
  %173 = mul nsw i32 %172, 8
  %174 = add nsw i32 %171, %173
  invoke void @_ZN4Code7bit_putERK3Regi(ptr noundef nonnull align 8 dereferenceable(200) %169, ptr noundef nonnull align 8 dereferenceable(24) %19, i32 noundef %174)
          to label %175 unwind label %148

175:                                              ; preds = %168
  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 %176

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

179:                                              ; preds = %137
  br label %180

180:                                              ; preds = %179
  %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 = %148, %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 @_ZN4Code3ldxERK3Regh(ptr noundef nonnull align 8 dereferenceable(200), ptr noundef nonnull align 8 dereferenceable(24), i8 noundef zeroext) #2 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN12Gift128State10load_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 %.preheader [
    i32 0, label %19
    i32 1, label %35
    i32 3, label %.preheader46
  ]

.preheader46:                                     ; preds = %3
  %11 = getelementptr inbounds i8, ptr %0, i64 120
  %12 = getelementptr inbounds i8, ptr %0, i64 72
  %13 = getelementptr inbounds i8, ptr %0, i64 24
  %14 = getelementptr inbounds i8, ptr %0, i64 48
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #4
  call void @_ZNK3Reg8reversedEv(ptr dead_on_unwind nonnull writable sret(%class.Reg) align 8 %8, ptr noundef nonnull align 8 dereferenceable(24) %11)
  invoke void @_ZN4Code3ldxERK3Regh(ptr noundef nonnull align 8 dereferenceable(200) %1, ptr noundef nonnull align 8 dereferenceable(24) %8, i8 noundef zeroext -1)
          to label %39 unwind label %42

.preheader:                                       ; preds = %3
  %15 = getelementptr inbounds i8, ptr %0, i64 120
  %16 = getelementptr inbounds i8, ptr %0, i64 48
  %17 = getelementptr inbounds i8, ptr %0, i64 24
  %18 = getelementptr inbounds i8, ptr %0, i64 72
  tail call void @_ZN4Code3ldxERK3Regh(ptr noundef nonnull align 8 dereferenceable(200) %1, ptr noundef nonnull align 8 dereferenceable(24) %15, i8 noundef zeroext -1)
  br label %103

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 @_ZN4Code3ldxERK3Regh(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 @_ZN4Code3ldxERK3Regh(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 @_ZN4Code3ldxERK3Regh(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 @_ZN4Code3ldxERK3Regh(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 %157

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 %157

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 %157

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 %157

35:                                               ; preds = %3
  tail call void @_ZN4Code3ldxERK3Regh(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 @_ZN4Code3ldxERK3Regh(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 @_ZN4Code3ldxERK3Regh(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 @_ZN4Code3ldxERK3Regh(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 = %.preheader46
  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 %40

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

42:                                               ; preds = %88, %72, %56, %.preheader46
  %43 = landingpad { ptr, i32 }
          cleanup
  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 %157

.unreachabledefault:                              ; preds = %40
  unreachable

default.unreachable:                              ; preds = %58, %74, %90, %103, %116, %130, %144
  unreachable

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

.invoke:                                          ; preds = %40, %48, %47, %44
  %45 = phi ptr [ %12, %44 ], [ %13, %47 ], [ %0, %48 ], [ %14, %40 ]
  %46 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3RegaSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 8 dereferenceable(24) %45)
          to label %49 unwind label %.loopexit56

.loopexit56:                                      ; preds = %.invoke, %49, %51
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

.loopexit.split-lp.loopexit:                      ; preds = %.invoke89, %67, %65
  %lpad.loopexit58 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

.loopexit.split-lp.loopexit.split-lp.loopexit:    ; preds = %.invoke90, %81, %83
  %lpad.loopexit62 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp: ; preds = %.invoke91, %97, %99
  %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, %.loopexit56
  %lpad.phi = phi { ptr, i32 } [ %lpad.loopexit, %.loopexit56 ], [ %lpad.loopexit58, %.loopexit.split-lp.loopexit ], [ %lpad.loopexit62, %.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) %9) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #4
  br label %157

47:                                               ; preds = %40
  br label %.invoke

48:                                               ; preds = %40
  br label %.invoke

49:                                               ; preds = %.invoke
  %50 = sub nuw nsw i32 31, %.03648
  invoke void @_ZN4Code7bit_getERK3Regi(ptr noundef nonnull align 8 dereferenceable(200) %1, ptr noundef nonnull align 8 dereferenceable(24) %11, i32 noundef %50)
          to label %51 unwind label %.loopexit56

51:                                               ; preds = %49
  %52 = lshr i32 %50, 2
  %53 = or disjoint i32 %52, 24
  invoke void @_ZN4Code7bit_putERK3Regi(ptr noundef nonnull align 8 dereferenceable(200) %1, ptr noundef nonnull align 8 dereferenceable(24) %9, i32 noundef %53)
          to label %54 unwind label %.loopexit56

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

56:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #4
  call void @_ZNK3Reg8reversedEv(ptr dead_on_unwind nonnull writable sret(%class.Reg) align 8 %8, ptr noundef nonnull align 8 dereferenceable(24) %11)
  invoke void @_ZN4Code3ldxERK3Regh(ptr noundef nonnull align 8 dereferenceable(200) %1, ptr noundef nonnull align 8 dereferenceable(24) %8, i8 noundef zeroext -1)
          to label %57 unwind label %42

57:                                               ; preds = %56
  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 %58

58:                                               ; preds = %70, %57
  %.03648.1 = phi i32 [ 0, %57 ], [ %71, %70 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #4
  call void @_ZN3RegC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9)
  %59 = and i32 %.03648.1, 3
  switch i32 %59, label %default.unreachable [
    i32 3, label %62
    i32 1, label %61
    i32 2, label %60
    i32 0, label %.invoke89
  ]

60:                                               ; preds = %58
  br label %.invoke89

61:                                               ; preds = %58
  br label %.invoke89

62:                                               ; preds = %58
  br label %.invoke89

.invoke89:                                        ; preds = %58, %60, %61, %62
  %63 = phi ptr [ %0, %62 ], [ %14, %61 ], [ %13, %60 ], [ %12, %58 ]
  %64 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3RegaSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 8 dereferenceable(24) %63)
          to label %65 unwind label %.loopexit.split-lp.loopexit

65:                                               ; preds = %.invoke89
  %66 = sub nuw nsw i32 31, %.03648.1
  invoke void @_ZN4Code7bit_getERK3Regi(ptr noundef nonnull align 8 dereferenceable(200) %1, ptr noundef nonnull align 8 dereferenceable(24) %11, i32 noundef %66)
          to label %67 unwind label %.loopexit.split-lp.loopexit

67:                                               ; preds = %65
  %68 = lshr i32 %66, 2
  %69 = or disjoint i32 %68, 16
  invoke void @_ZN4Code7bit_putERK3Regi(ptr noundef nonnull align 8 dereferenceable(200) %1, ptr noundef nonnull align 8 dereferenceable(24) %9, i32 noundef %69)
          to label %70 unwind label %.loopexit.split-lp.loopexit

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

72:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #4
  call void @_ZNK3Reg8reversedEv(ptr dead_on_unwind nonnull writable sret(%class.Reg) align 8 %8, ptr noundef nonnull align 8 dereferenceable(24) %11)
  invoke void @_ZN4Code3ldxERK3Regh(ptr noundef nonnull align 8 dereferenceable(200) %1, ptr noundef nonnull align 8 dereferenceable(24) %8, i8 noundef zeroext -1)
          to label %73 unwind label %42

73:                                               ; preds = %72
  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 %74

74:                                               ; preds = %86, %73
  %.03648.2 = phi i32 [ 0, %73 ], [ %87, %86 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #4
  call void @_ZN3RegC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9)
  %75 = and i32 %.03648.2, 3
  switch i32 %75, label %default.unreachable [
    i32 3, label %80
    i32 1, label %79
    i32 2, label %78
    i32 0, label %.invoke90
  ]

.invoke90:                                        ; preds = %74, %80, %79, %78
  %76 = phi ptr [ %13, %78 ], [ %14, %79 ], [ %0, %80 ], [ %12, %74 ]
  %77 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3RegaSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 8 dereferenceable(24) %76)
          to label %81 unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit

78:                                               ; preds = %74
  br label %.invoke90

79:                                               ; preds = %74
  br label %.invoke90

80:                                               ; preds = %74
  br label %.invoke90

81:                                               ; preds = %.invoke90
  %82 = sub nuw nsw i32 31, %.03648.2
  invoke void @_ZN4Code7bit_getERK3Regi(ptr noundef nonnull align 8 dereferenceable(200) %1, ptr noundef nonnull align 8 dereferenceable(24) %11, i32 noundef %82)
          to label %83 unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit

83:                                               ; preds = %81
  %84 = lshr i32 %82, 2
  %85 = or disjoint i32 %84, 8
  invoke void @_ZN4Code7bit_putERK3Regi(ptr noundef nonnull align 8 dereferenceable(200) %1, ptr noundef nonnull align 8 dereferenceable(24) %9, i32 noundef %85)
          to label %86 unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit

86:                                               ; 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
  %87 = add nuw nsw i32 %.03648.2, 1
  %exitcond.2.not = icmp eq i32 %87, 32
  br i1 %exitcond.2.not, label %88, label %74, !llvm.loop !5

88:                                               ; preds = %86
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #4
  call void @_ZNK3Reg8reversedEv(ptr dead_on_unwind nonnull writable sret(%class.Reg) align 8 %8, ptr noundef nonnull align 8 dereferenceable(24) %11)
  invoke void @_ZN4Code3ldxERK3Regh(ptr noundef nonnull align 8 dereferenceable(200) %1, ptr noundef nonnull align 8 dereferenceable(24) %8, i8 noundef zeroext -1)
          to label %89 unwind label %42

89:                                               ; preds = %88
  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 %90

90:                                               ; preds = %101, %89
  %.03648.3 = phi i32 [ 0, %89 ], [ %102, %101 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #4
  call void @_ZN3RegC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9)
  %91 = and i32 %.03648.3, 3
  switch i32 %91, label %default.unreachable [
    i32 3, label %96
    i32 1, label %95
    i32 2, label %94
    i32 0, label %.invoke91
  ]

.invoke91:                                        ; preds = %90, %96, %95, %94
  %92 = phi ptr [ %13, %94 ], [ %14, %95 ], [ %0, %96 ], [ %12, %90 ]
  %93 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3RegaSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 8 dereferenceable(24) %92)
          to label %97 unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp

94:                                               ; preds = %90
  br label %.invoke91

95:                                               ; preds = %90
  br label %.invoke91

96:                                               ; preds = %90
  br label %.invoke91

97:                                               ; preds = %.invoke91
  %98 = sub nuw nsw i32 31, %.03648.3
  invoke void @_ZN4Code7bit_getERK3Regi(ptr noundef nonnull align 8 dereferenceable(200) %1, ptr noundef nonnull align 8 dereferenceable(24) %11, i32 noundef %98)
          to label %99 unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp

99:                                               ; preds = %97
  %100 = lshr i32 %98, 2
  invoke void @_ZN4Code7bit_putERK3Regi(ptr noundef nonnull align 8 dereferenceable(200) %1, ptr noundef nonnull align 8 dereferenceable(24) %9, i32 noundef %100)
          to label %101 unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp

101:                                              ; preds = %99
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #4
  %102 = add nuw nsw i32 %.03648.3, 1
  %exitcond.3.not = icmp eq i32 %102, 32
  br i1 %exitcond.3.not, label %.loopexit, label %90, !llvm.loop !5

103:                                              ; preds = %.preheader, %113
  %.050 = phi i32 [ 0, %.preheader ], [ %114, %113 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #4
  call void @_ZN3RegC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10)
  %104 = and i32 %.050, 3
  switch i32 %104, label %default.unreachable [
    i32 3, label %109
    i32 1, label %.invoke92
    i32 2, label %108
    i32 0, label %105
  ]

105:                                              ; preds = %103
  br label %.invoke92

.invoke92:                                        ; preds = %103, %109, %108, %105
  %106 = phi ptr [ %0, %105 ], [ %16, %108 ], [ %18, %109 ], [ %17, %103 ]
  %107 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3RegaSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(24) %106)
          to label %110 unwind label %.loopexit67

.loopexit67:                                      ; preds = %.invoke92, %110, %111
  %lpad.loopexit69 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp68

.loopexit.split-lp68.loopexit:                    ; preds = %.invoke93, %124, %123
  %lpad.loopexit73 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp68

.loopexit.split-lp68.loopexit.split-lp.loopexit:  ; preds = %.invoke94, %137, %138
  %lpad.loopexit77 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp68

.loopexit.split-lp68.loopexit.split-lp.loopexit.split-lp: ; preds = %.invoke95, %151, %152
  %lpad.loopexit.split-lp78 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp68

.loopexit.split-lp68:                             ; preds = %.loopexit.split-lp68.loopexit, %.loopexit.split-lp68.loopexit.split-lp.loopexit.split-lp, %.loopexit.split-lp68.loopexit.split-lp.loopexit, %.loopexit67
  %lpad.phi71 = phi { ptr, i32 } [ %lpad.loopexit69, %.loopexit67 ], [ %lpad.loopexit73, %.loopexit.split-lp68.loopexit ], [ %lpad.loopexit77, %.loopexit.split-lp68.loopexit.split-lp.loopexit ], [ %lpad.loopexit.split-lp78, %.loopexit.split-lp68.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 %157

108:                                              ; preds = %103
  br label %.invoke92

109:                                              ; preds = %103
  br label %.invoke92

110:                                              ; preds = %.invoke92
  invoke void @_ZN4Code7bit_getERK3Regi(ptr noundef nonnull align 8 dereferenceable(200) %1, ptr noundef nonnull align 8 dereferenceable(24) %15, i32 noundef %.050)
          to label %111 unwind label %.loopexit67

111:                                              ; preds = %110
  %112 = lshr i32 %.050, 2
  invoke void @_ZN4Code7bit_putERK3Regi(ptr noundef nonnull align 8 dereferenceable(200) %1, ptr noundef nonnull align 8 dereferenceable(24) %10, i32 noundef %112)
          to label %113 unwind label %.loopexit67

113:                                              ; preds = %111
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #4
  %114 = add nuw nsw i32 %.050, 1
  %exitcond65.not = icmp eq i32 %114, 32
  br i1 %exitcond65.not, label %115, label %103, !llvm.loop !7

115:                                              ; preds = %113
  call void @_ZN4Code3ldxERK3Regh(ptr noundef nonnull align 8 dereferenceable(200) %1, ptr noundef nonnull align 8 dereferenceable(24) %15, i8 noundef zeroext -1)
  br label %116

116:                                              ; preds = %127, %115
  %.050.1 = phi i32 [ 0, %115 ], [ %128, %127 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #4
  call void @_ZN3RegC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10)
  %117 = and i32 %.050.1, 3
  switch i32 %117, label %default.unreachable [
    i32 3, label %120
    i32 1, label %119
    i32 2, label %118
    i32 0, label %.invoke93
  ]

118:                                              ; preds = %116
  br label %.invoke93

119:                                              ; preds = %116
  br label %.invoke93

120:                                              ; preds = %116
  br label %.invoke93

.invoke93:                                        ; preds = %116, %118, %119, %120
  %121 = phi ptr [ %18, %120 ], [ %17, %119 ], [ %16, %118 ], [ %0, %116 ]
  %122 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3RegaSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(24) %121)
          to label %123 unwind label %.loopexit.split-lp68.loopexit

123:                                              ; preds = %.invoke93
  invoke void @_ZN4Code7bit_getERK3Regi(ptr noundef nonnull align 8 dereferenceable(200) %1, ptr noundef nonnull align 8 dereferenceable(24) %15, i32 noundef %.050.1)
          to label %124 unwind label %.loopexit.split-lp68.loopexit

124:                                              ; preds = %123
  %125 = lshr i32 %.050.1, 2
  %126 = add nuw nsw i32 %125, 8
  invoke void @_ZN4Code7bit_putERK3Regi(ptr noundef nonnull align 8 dereferenceable(200) %1, ptr noundef nonnull align 8 dereferenceable(24) %10, i32 noundef %126)
          to label %127 unwind label %.loopexit.split-lp68.loopexit

127:                                              ; preds = %124
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #4
  %128 = add nuw nsw i32 %.050.1, 1
  %exitcond65.1.not = icmp eq i32 %128, 32
  br i1 %exitcond65.1.not, label %129, label %116, !llvm.loop !7

129:                                              ; preds = %127
  call void @_ZN4Code3ldxERK3Regh(ptr noundef nonnull align 8 dereferenceable(200) %1, ptr noundef nonnull align 8 dereferenceable(24) %15, i8 noundef zeroext -1)
  br label %130

130:                                              ; preds = %141, %129
  %.050.2 = phi i32 [ 0, %129 ], [ %142, %141 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #4
  call void @_ZN3RegC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10)
  %131 = and i32 %.050.2, 3
  switch i32 %131, label %default.unreachable [
    i32 3, label %136
    i32 1, label %135
    i32 2, label %134
    i32 0, label %.invoke94
  ]

.invoke94:                                        ; preds = %130, %136, %135, %134
  %132 = phi ptr [ %16, %134 ], [ %17, %135 ], [ %18, %136 ], [ %0, %130 ]
  %133 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3RegaSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(24) %132)
          to label %137 unwind label %.loopexit.split-lp68.loopexit.split-lp.loopexit

134:                                              ; preds = %130
  br label %.invoke94

135:                                              ; preds = %130
  br label %.invoke94

136:                                              ; preds = %130
  br label %.invoke94

137:                                              ; preds = %.invoke94
  invoke void @_ZN4Code7bit_getERK3Regi(ptr noundef nonnull align 8 dereferenceable(200) %1, ptr noundef nonnull align 8 dereferenceable(24) %15, i32 noundef %.050.2)
          to label %138 unwind label %.loopexit.split-lp68.loopexit.split-lp.loopexit

138:                                              ; preds = %137
  %139 = lshr i32 %.050.2, 2
  %140 = add nuw nsw i32 %139, 16
  invoke void @_ZN4Code7bit_putERK3Regi(ptr noundef nonnull align 8 dereferenceable(200) %1, ptr noundef nonnull align 8 dereferenceable(24) %10, i32 noundef %140)
          to label %141 unwind label %.loopexit.split-lp68.loopexit.split-lp.loopexit

141:                                              ; preds = %138
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #4
  %142 = add nuw nsw i32 %.050.2, 1
  %exitcond65.2.not = icmp eq i32 %142, 32
  br i1 %exitcond65.2.not, label %143, label %130, !llvm.loop !7

143:                                              ; preds = %141
  call void @_ZN4Code3ldxERK3Regh(ptr noundef nonnull align 8 dereferenceable(200) %1, ptr noundef nonnull align 8 dereferenceable(24) %15, i8 noundef zeroext -1)
  br label %144

144:                                              ; preds = %155, %143
  %.050.3 = phi i32 [ 0, %143 ], [ %156, %155 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #4
  call void @_ZN3RegC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10)
  %145 = and i32 %.050.3, 3
  switch i32 %145, label %default.unreachable [
    i32 3, label %150
    i32 1, label %149
    i32 2, label %148
    i32 0, label %.invoke95
  ]

.invoke95:                                        ; preds = %144, %150, %149, %148
  %146 = phi ptr [ %16, %148 ], [ %17, %149 ], [ %18, %150 ], [ %0, %144 ]
  %147 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3RegaSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(24) %146)
          to label %151 unwind label %.loopexit.split-lp68.loopexit.split-lp.loopexit.split-lp

148:                                              ; preds = %144
  br label %.invoke95

149:                                              ; preds = %144
  br label %.invoke95

150:                                              ; preds = %144
  br label %.invoke95

151:                                              ; preds = %.invoke95
  invoke void @_ZN4Code7bit_getERK3Regi(ptr noundef nonnull align 8 dereferenceable(200) %1, ptr noundef nonnull align 8 dereferenceable(24) %15, i32 noundef %.050.3)
          to label %152 unwind label %.loopexit.split-lp68.loopexit.split-lp.loopexit.split-lp

152:                                              ; preds = %151
  %153 = lshr i32 %.050.3, 2
  %154 = add nuw nsw i32 %153, 24
  invoke void @_ZN4Code7bit_putERK3Regi(ptr noundef nonnull align 8 dereferenceable(200) %1, ptr noundef nonnull align 8 dereferenceable(24) %10, i32 noundef %154)
          to label %155 unwind label %.loopexit.split-lp68.loopexit.split-lp.loopexit.split-lp

155:                                              ; preds = %152
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #4
  %156 = add nuw nsw i32 %.050.3, 1
  %exitcond65.3.not = icmp eq i32 %156, 32
  br i1 %exitcond65.3.not, label %.loopexit, label %144, !llvm.loop !7

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

157:                                              ; preds = %42, %.loopexit.split-lp, %.loopexit.split-lp68, %33, %31, %29, %27
  %.pn43 = phi { ptr, i32 } [ %34, %33 ], [ %32, %31 ], [ %30, %29 ], [ %28, %27 ], [ %lpad.phi71, %.loopexit.split-lp68 ], [ %lpad.phi, %.loopexit.split-lp ], [ %43, %42 ]
  resume { ptr, i32 } %.pn43
}

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

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

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