; LLVM IR from fwip/fastqz :: libzpaq.ll (ZN7libzpaq9Predictor7update0Ei)

; 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.libzpaq::Predictor" = type <{ i32, i32, [256 x i32], [256 x i32], ptr, [256 x %"struct.libzpaq::Component"], [256 x i32], [1024 x i32], [4096 x i16], [32768 x i16], %"class.libzpaq::StateTable", ptr, i32, [4 x i8] }>
%"struct.libzpaq::Component" = type { i64, i64, i64, i64, i64, %"class.libzpaq::Array", %"class.libzpaq::Array.0", %"class.libzpaq::Array.2" }
%"class.libzpaq::Array" = type <{ ptr, i64, i32, [4 x i8] }>
%"class.libzpaq::Array.0" = type <{ ptr, i64, i32, [4 x i8] }>
%"class.libzpaq::Array.2" = type <{ ptr, i64, i32, [4 x i8] }>
%"class.libzpaq::StateTable" = type { [1024 x i8] }
%"class.libzpaq::ZPAQL" = type { ptr, ptr, %"class.libzpaq::Array.0", i32, i32, i32, [4 x i8], %"class.libzpaq::Array.0", %"class.libzpaq::Array", %"class.libzpaq::Array", %"class.libzpaq::Array.4", i32, i32, i32, i32, i32, i32, i32, i32, ptr }
%"class.libzpaq::Array.4" = type <{ ptr, i64, i32, [4 x i8] }>

@_ZN7libzpaq8compsizeE = external dso_local constant <{ [10 x i32], [246 x i32] }>, align 16

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN7libzpaq5ArrayIjEixEm(ptr noundef nonnull align 8 dereferenceable(20), i64 noundef) #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN7libzpaq5ArrayIjEclEm(ptr noundef nonnull align 8 dereferenceable(20), i64 noundef) #1 align 2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7libzpaq9Predictor7update0Ei(ptr noundef nonnull align 8 dereferenceable(110620) %0, i32 noundef %1) #2 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca ptr, align 8
  %19 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store i32 %1, ptr %4, align 4, !tbaa !9
  %20 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #3
  %21 = getelementptr inbounds %"class.libzpaq::Predictor", ptr %20, i32 0, i32 4
  %22 = load ptr, ptr %21, align 8, !tbaa !11
  %23 = getelementptr inbounds %"class.libzpaq::ZPAQL", ptr %22, i32 0, i32 2
  %24 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN7libzpaq5ArrayIhEixEm(ptr noundef nonnull align 8 dereferenceable(20) %23, i64 noundef 7)
  store ptr %24, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #3
  %25 = getelementptr inbounds %"class.libzpaq::Predictor", ptr %20, i32 0, i32 4
  %26 = load ptr, ptr %25, align 8, !tbaa !11
  %27 = getelementptr inbounds %"class.libzpaq::ZPAQL", ptr %26, i32 0, i32 2
  %28 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN7libzpaq5ArrayIhEixEm(ptr noundef nonnull align 8 dereferenceable(20) %27, i64 noundef 6)
  %29 = load i8, ptr %28, align 1, !tbaa !14
  %30 = zext i8 %29 to i32
  store i32 %30, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %31

31:                                               ; preds = %450, %2
  %32 = load i32, ptr %7, align 4, !tbaa !9
  %33 = load i32, ptr %6, align 4, !tbaa !9
  %34 = icmp slt i32 %32, %33
  br i1 %34, label %36, label %35

35:                                               ; preds = %31
  store i32 2, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  br label %453

36:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  %37 = getelementptr inbounds %"class.libzpaq::Predictor", ptr %20, i32 0, i32 5
  %38 = load i32, ptr %7, align 4, !tbaa !9
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [256 x %"struct.libzpaq::Component"], ptr %37, i64 0, i64 %39
  store ptr %40, ptr %9, align 8, !tbaa !5
  %41 = load ptr, ptr %5, align 8, !tbaa !5
  %42 = getelementptr inbounds i8, ptr %41, i64 0
  %43 = load i8, ptr %42, align 1, !tbaa !14
  %44 = zext i8 %43 to i32
  switch i32 %44, label %439 [
    i32 1, label %440
    i32 2, label %45
    i32 3, label %48
    i32 4, label %93
    i32 5, label %440
    i32 6, label %250
    i32 7, label %311
    i32 8, label %372
    i32 9, label %436
  ]

45:                                               ; preds = %36
  %46 = load ptr, ptr %9, align 8, !tbaa !5
  %47 = load i32, ptr %4, align 4, !tbaa !9
  call void @_ZN7libzpaq9Predictor5trainERNS_9ComponentEi(ptr noundef nonnull align 8 dereferenceable(110620) %20, ptr noundef nonnull align 8 dereferenceable(112) %46, i32 noundef %47)
  br label %440

48:                                               ; preds = %36
  %49 = getelementptr inbounds %"class.libzpaq::Predictor", ptr %20, i32 0, i32 10
  %50 = load ptr, ptr %9, align 8, !tbaa !5
  %51 = getelementptr inbounds %"struct.libzpaq::Component", ptr %50, i32 0, i32 6
  %52 = load ptr, ptr %9, align 8, !tbaa !5
  %53 = getelementptr inbounds %"struct.libzpaq::Component", ptr %52, i32 0, i32 4
  %54 = load i64, ptr %53, align 8, !tbaa !15
  %55 = getelementptr inbounds %"class.libzpaq::Predictor", ptr %20, i32 0, i32 1
  %56 = load i32, ptr %55, align 4, !tbaa !21
  %57 = and i32 %56, 15
  %58 = sext i32 %57 to i64
  %59 = add i64 %54, %58
  %60 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN7libzpaq5ArrayIhEixEm(ptr noundef nonnull align 8 dereferenceable(20) %51, i64 noundef %59)
  %61 = load i8, ptr %60, align 1, !tbaa !14
  %62 = zext i8 %61 to i32
  %63 = load i32, ptr %4, align 4, !tbaa !9
  %64 = call noundef i32 @_ZN7libzpaq10StateTable4nextEii(ptr noundef nonnull align 1 dereferenceable(1024) %49, i32 noundef %62, i32 noundef %63)
  %65 = trunc i32 %64 to i8
  %66 = load ptr, ptr %9, align 8, !tbaa !5
  %67 = getelementptr inbounds %"struct.libzpaq::Component", ptr %66, i32 0, i32 6
  %68 = load ptr, ptr %9, align 8, !tbaa !5
  %69 = getelementptr inbounds %"struct.libzpaq::Component", ptr %68, i32 0, i32 4
  %70 = load i64, ptr %69, align 8, !tbaa !15
  %71 = getelementptr inbounds %"class.libzpaq::Predictor", ptr %20, i32 0, i32 1
  %72 = load i32, ptr %71, align 4, !tbaa !21
  %73 = and i32 %72, 15
  %74 = sext i32 %73 to i64
  %75 = add i64 %70, %74
  %76 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN7libzpaq5ArrayIhEixEm(ptr noundef nonnull align 8 dereferenceable(20) %67, i64 noundef %75)
  store i8 %65, ptr %76, align 1, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  %77 = load ptr, ptr %9, align 8, !tbaa !5
  %78 = getelementptr inbounds %"struct.libzpaq::Component", ptr %77, i32 0, i32 5
  %79 = load ptr, ptr %9, align 8, !tbaa !5
  %80 = getelementptr inbounds %"struct.libzpaq::Component", ptr %79, i32 0, i32 1
  %81 = load i64, ptr %80, align 8, !tbaa !22
  %82 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN7libzpaq5ArrayIjEclEm(ptr noundef nonnull align 8 dereferenceable(20) %78, i64 noundef %81)
  store ptr %82, ptr %10, align 8, !tbaa !5
  %83 = load i32, ptr %4, align 4, !tbaa !9
  %84 = mul nsw i32 %83, 32767
  %85 = load ptr, ptr %10, align 8, !tbaa !5
  %86 = load i32, ptr %85, align 4, !tbaa !9
  %87 = lshr i32 %86, 8
  %88 = sub i32 %84, %87
  %89 = ashr i32 %88, 2
  %90 = load ptr, ptr %10, align 8, !tbaa !5
  %91 = load i32, ptr %90, align 4, !tbaa !9
  %92 = add i32 %91, %89
  store i32 %92, ptr %90, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  br label %440

93:                                               ; preds = %36
  %94 = load ptr, ptr %9, align 8, !tbaa !5
  %95 = getelementptr inbounds %"struct.libzpaq::Component", ptr %94, i32 0, i32 4
  %96 = load i64, ptr %95, align 8, !tbaa !15
  %97 = trunc i64 %96 to i32
  %98 = load i32, ptr %4, align 4, !tbaa !9
  %99 = icmp ne i32 %97, %98
  br i1 %99, label %100, label %103

100:                                              ; preds = %93
  %101 = load ptr, ptr %9, align 8, !tbaa !5
  %102 = getelementptr inbounds %"struct.libzpaq::Component", ptr %101, i32 0, i32 2
  store i64 0, ptr %102, align 8, !tbaa !23
  br label %103

103:                                              ; preds = %100, %93
  %104 = load ptr, ptr %9, align 8, !tbaa !5
  %105 = getelementptr inbounds %"struct.libzpaq::Component", ptr %104, i32 0, i32 6
  %106 = load ptr, ptr %9, align 8, !tbaa !5
  %107 = getelementptr inbounds %"struct.libzpaq::Component", ptr %106, i32 0, i32 0
  %108 = load i64, ptr %107, align 8, !tbaa !24
  %109 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN7libzpaq5ArrayIhEclEm(ptr noundef nonnull align 8 dereferenceable(20) %105, i64 noundef %108)
  %110 = load i8, ptr %109, align 1, !tbaa !14
  %111 = zext i8 %110 to i32
  %112 = load i32, ptr %4, align 4, !tbaa !9
  %113 = add nsw i32 %111, %112
  %114 = load ptr, ptr %9, align 8, !tbaa !5
  %115 = getelementptr inbounds %"struct.libzpaq::Component", ptr %114, i32 0, i32 6
  %116 = load ptr, ptr %9, align 8, !tbaa !5
  %117 = getelementptr inbounds %"struct.libzpaq::Component", ptr %116, i32 0, i32 0
  %118 = load i64, ptr %117, align 8, !tbaa !24
  %119 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN7libzpaq5ArrayIhEclEm(ptr noundef nonnull align 8 dereferenceable(20) %115, i64 noundef %118)
  %120 = load i8, ptr %119, align 1, !tbaa !14
  %121 = zext i8 %120 to i32
  %122 = add nsw i32 %121, %113
  %123 = trunc i32 %122 to i8
  store i8 %123, ptr %119, align 1, !tbaa !14
  %124 = load ptr, ptr %9, align 8, !tbaa !5
  %125 = getelementptr inbounds %"struct.libzpaq::Component", ptr %124, i32 0, i32 1
  %126 = load i64, ptr %125, align 8, !tbaa !22
  %127 = add i64 %126, 1
  store i64 %127, ptr %125, align 8, !tbaa !22
  %128 = icmp eq i64 %127, 8
  br i1 %128, label %129, label %249

129:                                              ; preds = %103
  %130 = load ptr, ptr %9, align 8, !tbaa !5
  %131 = getelementptr inbounds %"struct.libzpaq::Component", ptr %130, i32 0, i32 1
  store i64 0, ptr %131, align 8, !tbaa !22
  %132 = load ptr, ptr %9, align 8, !tbaa !5
  %133 = getelementptr inbounds %"struct.libzpaq::Component", ptr %132, i32 0, i32 0
  %134 = load i64, ptr %133, align 8, !tbaa !24
  %135 = add i64 %134, 1
  store i64 %135, ptr %133, align 8, !tbaa !24
  %136 = load ptr, ptr %5, align 8, !tbaa !5
  %137 = getelementptr inbounds i8, ptr %136, i64 2
  %138 = load i8, ptr %137, align 1, !tbaa !14
  %139 = zext i8 %138 to i32
  %140 = shl i32 1, %139
  %141 = sub nsw i32 %140, 1
  %142 = sext i32 %141 to i64
  %143 = load ptr, ptr %9, align 8, !tbaa !5
  %144 = getelementptr inbounds %"struct.libzpaq::Component", ptr %143, i32 0, i32 0
  %145 = load i64, ptr %144, align 8, !tbaa !24
  %146 = and i64 %145, %142
  store i64 %146, ptr %144, align 8, !tbaa !24
  %147 = load ptr, ptr %9, align 8, !tbaa !5
  %148 = getelementptr inbounds %"struct.libzpaq::Component", ptr %147, i32 0, i32 2
  %149 = load i64, ptr %148, align 8, !tbaa !23
  %150 = icmp eq i64 %149, 0
  br i1 %150, label %151, label %225

151:                                              ; preds = %129
  %152 = load ptr, ptr %9, align 8, !tbaa !5
  %153 = getelementptr inbounds %"struct.libzpaq::Component", ptr %152, i32 0, i32 0
  %154 = load i64, ptr %153, align 8, !tbaa !24
  %155 = load ptr, ptr %9, align 8, !tbaa !5
  %156 = getelementptr inbounds %"struct.libzpaq::Component", ptr %155, i32 0, i32 5
  %157 = getelementptr inbounds %"class.libzpaq::Predictor", ptr %20, i32 0, i32 3
  %158 = load i32, ptr %7, align 4, !tbaa !9
  %159 = sext i32 %158 to i64
  %160 = getelementptr inbounds [256 x i32], ptr %157, i64 0, i64 %159
  %161 = load i32, ptr %160, align 4, !tbaa !9
  %162 = zext i32 %161 to i64
  %163 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN7libzpaq5ArrayIjEclEm(ptr noundef nonnull align 8 dereferenceable(20) %156, i64 noundef %162)
  %164 = load i32, ptr %163, align 4, !tbaa !9
  %165 = zext i32 %164 to i64
  %166 = sub i64 %154, %165
  %167 = load ptr, ptr %9, align 8, !tbaa !5
  %168 = getelementptr inbounds %"struct.libzpaq::Component", ptr %167, i32 0, i32 3
  store i64 %166, ptr %168, align 8, !tbaa !25
  %169 = load ptr, ptr %9, align 8, !tbaa !5
  %170 = getelementptr inbounds %"struct.libzpaq::Component", ptr %169, i32 0, i32 3
  %171 = load i64, ptr %170, align 8, !tbaa !25
  %172 = load ptr, ptr %9, align 8, !tbaa !5
  %173 = getelementptr inbounds %"struct.libzpaq::Component", ptr %172, i32 0, i32 6
  %174 = call noundef i64 @_ZNK7libzpaq5ArrayIhE4sizeEv(ptr noundef nonnull align 8 dereferenceable(20) %173)
  %175 = sub i64 %174, 1
  %176 = and i64 %171, %175
  %177 = icmp ne i64 %176, 0
  br i1 %177, label %178, label %224

178:                                              ; preds = %151
  br label %179

179:                                              ; preds = %218, %178
  %180 = load ptr, ptr %9, align 8, !tbaa !5
  %181 = getelementptr inbounds %"struct.libzpaq::Component", ptr %180, i32 0, i32 2
  %182 = load i64, ptr %181, align 8, !tbaa !23
  %183 = icmp ult i64 %182, 255
  br i1 %183, label %184, label %216

184:                                              ; preds = %179
  %185 = load ptr, ptr %9, align 8, !tbaa !5
  %186 = getelementptr inbounds %"struct.libzpaq::Component", ptr %185, i32 0, i32 6
  %187 = load ptr, ptr %9, align 8, !tbaa !5
  %188 = getelementptr inbounds %"struct.libzpaq::Component", ptr %187, i32 0, i32 0
  %189 = load i64, ptr %188, align 8, !tbaa !24
  %190 = load ptr, ptr %9, align 8, !tbaa !5
  %191 = getelementptr inbounds %"struct.libzpaq::Component", ptr %190, i32 0, i32 2
  %192 = load i64, ptr %191, align 8, !tbaa !23
  %193 = sub i64 %189, %192
  %194 = sub i64 %193, 1
  %195 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN7libzpaq5ArrayIhEclEm(ptr noundef nonnull align 8 dereferenceable(20) %186, i64 noundef %194)
  %196 = load i8, ptr %195, align 1, !tbaa !14
  %197 = zext i8 %196 to i32
  %198 = load ptr, ptr %9, align 8, !tbaa !5
  %199 = getelementptr inbounds %"struct.libzpaq::Component", ptr %198, i32 0, i32 6
  %200 = load ptr, ptr %9, align 8, !tbaa !5
  %201 = getelementptr inbounds %"struct.libzpaq::Component", ptr %200, i32 0, i32 0
  %202 = load i64, ptr %201, align 8, !tbaa !24
  %203 = load ptr, ptr %9, align 8, !tbaa !5
  %204 = getelementptr inbounds %"struct.libzpaq::Component", ptr %203, i32 0, i32 2
  %205 = load i64, ptr %204, align 8, !tbaa !23
  %206 = sub i64 %202, %205
  %207 = load ptr, ptr %9, align 8, !tbaa !5
  %208 = getelementptr inbounds %"struct.libzpaq::Component", ptr %207, i32 0, i32 3
  %209 = load i64, ptr %208, align 8, !tbaa !25
  %210 = sub i64 %206, %209
  %211 = sub i64 %210, 1
  %212 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN7libzpaq5ArrayIhEclEm(ptr noundef nonnull align 8 dereferenceable(20) %199, i64 noundef %211)
  %213 = load i8, ptr %212, align 1, !tbaa !14
  %214 = zext i8 %213 to i32
  %215 = icmp eq i32 %197, %214
  br label %216

216:                                              ; preds = %184, %179
  %217 = phi i1 [ false, %179 ], [ %215, %184 ]
  br i1 %217, label %218, label %223

218:                                              ; preds = %216
  %219 = load ptr, ptr %9, align 8, !tbaa !5
  %220 = getelementptr inbounds %"struct.libzpaq::Component", ptr %219, i32 0, i32 2
  %221 = load i64, ptr %220, align 8, !tbaa !23
  %222 = add i64 %221, 1
  store i64 %222, ptr %220, align 8, !tbaa !23
  br label %179, !llvm.loop !26

223:                                              ; preds = %216
  br label %224

224:                                              ; preds = %223, %151
  br label %235

225:                                              ; preds = %129
  %226 = load ptr, ptr %9, align 8, !tbaa !5
  %227 = getelementptr inbounds %"struct.libzpaq::Component", ptr %226, i32 0, i32 2
  %228 = load i64, ptr %227, align 8, !tbaa !23
  %229 = icmp ult i64 %228, 255
  %230 = zext i1 %229 to i64
  %231 = load ptr, ptr %9, align 8, !tbaa !5
  %232 = getelementptr inbounds %"struct.libzpaq::Component", ptr %231, i32 0, i32 2
  %233 = load i64, ptr %232, align 8, !tbaa !23
  %234 = add i64 %233, %230
  store i64 %234, ptr %232, align 8, !tbaa !23
  br label %235

235:                                              ; preds = %225, %224
  %236 = load ptr, ptr %9, align 8, !tbaa !5
  %237 = getelementptr inbounds %"struct.libzpaq::Component", ptr %236, i32 0, i32 0
  %238 = load i64, ptr %237, align 8, !tbaa !24
  %239 = trunc i64 %238 to i32
  %240 = load ptr, ptr %9, align 8, !tbaa !5
  %241 = getelementptr inbounds %"struct.libzpaq::Component", ptr %240, i32 0, i32 5
  %242 = getelementptr inbounds %"class.libzpaq::Predictor", ptr %20, i32 0, i32 3
  %243 = load i32, ptr %7, align 4, !tbaa !9
  %244 = sext i32 %243 to i64
  %245 = getelementptr inbounds [256 x i32], ptr %242, i64 0, i64 %244
  %246 = load i32, ptr %245, align 4, !tbaa !9
  %247 = zext i32 %246 to i64
  %248 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN7libzpaq5ArrayIjEclEm(ptr noundef nonnull align 8 dereferenceable(20) %241, i64 noundef %247)
  store i32 %239, ptr %248, align 4, !tbaa !9
  br label %249

249:                                              ; preds = %235, %103
  br label %440

250:                                              ; preds = %36
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #3
  %251 = load i32, ptr %4, align 4, !tbaa !9
  %252 = mul nsw i32 %251, 32767
  %253 = getelementptr inbounds %"class.libzpaq::Predictor", ptr %20, i32 0, i32 2
  %254 = load i32, ptr %7, align 4, !tbaa !9
  %255 = sext i32 %254 to i64
  %256 = getelementptr inbounds [256 x i32], ptr %253, i64 0, i64 %255
  %257 = load i32, ptr %256, align 4, !tbaa !9
  %258 = call noundef i32 @_ZN7libzpaq9Predictor6squashEi(ptr noundef nonnull align 8 dereferenceable(110620) %20, i32 noundef %257)
  %259 = sub nsw i32 %252, %258
  %260 = load ptr, ptr %5, align 8, !tbaa !5
  %261 = getelementptr inbounds i8, ptr %260, i64 4
  %262 = load i8, ptr %261, align 1, !tbaa !14
  %263 = zext i8 %262 to i32
  %264 = mul nsw i32 %259, %263
  %265 = ashr i32 %264, 5
  store i32 %265, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #3
  %266 = load ptr, ptr %9, align 8, !tbaa !5
  %267 = getelementptr inbounds %"struct.libzpaq::Component", ptr %266, i32 0, i32 7
  %268 = load ptr, ptr %9, align 8, !tbaa !5
  %269 = getelementptr inbounds %"struct.libzpaq::Component", ptr %268, i32 0, i32 1
  %270 = load i64, ptr %269, align 8, !tbaa !22
  %271 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZN7libzpaq5ArrayItEixEm(ptr noundef nonnull align 8 dereferenceable(20) %267, i64 noundef %270)
  %272 = load i16, ptr %271, align 2, !tbaa !28
  %273 = zext i16 %272 to i32
  store i32 %273, ptr %12, align 4, !tbaa !9
  %274 = load i32, ptr %11, align 4, !tbaa !9
  %275 = getelementptr inbounds %"class.libzpaq::Predictor", ptr %20, i32 0, i32 2
  %276 = load ptr, ptr %5, align 8, !tbaa !5
  %277 = getelementptr inbounds i8, ptr %276, i64 2
  %278 = load i8, ptr %277, align 1, !tbaa !14
  %279 = zext i8 %278 to i64
  %280 = getelementptr inbounds [256 x i32], ptr %275, i64 0, i64 %279
  %281 = load i32, ptr %280, align 4, !tbaa !9
  %282 = getelementptr inbounds %"class.libzpaq::Predictor", ptr %20, i32 0, i32 2
  %283 = load ptr, ptr %5, align 8, !tbaa !5
  %284 = getelementptr inbounds i8, ptr %283, i64 3
  %285 = load i8, ptr %284, align 1, !tbaa !14
  %286 = zext i8 %285 to i64
  %287 = getelementptr inbounds [256 x i32], ptr %282, i64 0, i64 %286
  %288 = load i32, ptr %287, align 4, !tbaa !9
  %289 = sub nsw i32 %281, %288
  %290 = mul nsw i32 %274, %289
  %291 = add nsw i32 %290, 4096
  %292 = ashr i32 %291, 13
  %293 = load i32, ptr %12, align 4, !tbaa !9
  %294 = add nsw i32 %293, %292
  store i32 %294, ptr %12, align 4, !tbaa !9
  %295 = load i32, ptr %12, align 4, !tbaa !9
  %296 = icmp slt i32 %295, 0
  br i1 %296, label %297, label %298

297:                                              ; preds = %250
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %298

298:                                              ; preds = %297, %250
  %299 = load i32, ptr %12, align 4, !tbaa !9
  %300 = icmp sgt i32 %299, 65535
  br i1 %300, label %301, label %302

301:                                              ; preds = %298
  store i32 65535, ptr %12, align 4, !tbaa !9
  br label %302

302:                                              ; preds = %301, %298
  %303 = load i32, ptr %12, align 4, !tbaa !9
  %304 = trunc i32 %303 to i16
  %305 = load ptr, ptr %9, align 8, !tbaa !5
  %306 = getelementptr inbounds %"struct.libzpaq::Component", ptr %305, i32 0, i32 7
  %307 = load ptr, ptr %9, align 8, !tbaa !5
  %308 = getelementptr inbounds %"struct.libzpaq::Component", ptr %307, i32 0, i32 1
  %309 = load i64, ptr %308, align 8, !tbaa !22
  %310 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZN7libzpaq5ArrayItEixEm(ptr noundef nonnull align 8 dereferenceable(20) %306, i64 noundef %309)
  store i16 %304, ptr %310, align 2, !tbaa !28
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #3
  br label %440

311:                                              ; preds = %36
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #3
  %312 = load ptr, ptr %5, align 8, !tbaa !5
  %313 = getelementptr inbounds i8, ptr %312, i64 3
  %314 = load i8, ptr %313, align 1, !tbaa !14
  %315 = zext i8 %314 to i32
  store i32 %315, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #3
  %316 = load i32, ptr %4, align 4, !tbaa !9
  %317 = mul nsw i32 %316, 32767
  %318 = getelementptr inbounds %"class.libzpaq::Predictor", ptr %20, i32 0, i32 2
  %319 = load i32, ptr %7, align 4, !tbaa !9
  %320 = sext i32 %319 to i64
  %321 = getelementptr inbounds [256 x i32], ptr %318, i64 0, i64 %320
  %322 = load i32, ptr %321, align 4, !tbaa !9
  %323 = call noundef i32 @_ZN7libzpaq9Predictor6squashEi(ptr noundef nonnull align 8 dereferenceable(110620) %20, i32 noundef %322)
  %324 = sub nsw i32 %317, %323
  %325 = load ptr, ptr %5, align 8, !tbaa !5
  %326 = getelementptr inbounds i8, ptr %325, i64 4
  %327 = load i8, ptr %326, align 1, !tbaa !14
  %328 = zext i8 %327 to i32
  %329 = mul nsw i32 %324, %328
  %330 = ashr i32 %329, 4
  store i32 %330, ptr %14, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  %331 = load ptr, ptr %9, align 8, !tbaa !5
  %332 = getelementptr inbounds %"struct.libzpaq::Component", ptr %331, i32 0, i32 5
  %333 = load ptr, ptr %9, align 8, !tbaa !5
  %334 = getelementptr inbounds %"struct.libzpaq::Component", ptr %333, i32 0, i32 1
  %335 = load i64, ptr %334, align 8, !tbaa !22
  %336 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN7libzpaq5ArrayIjEixEm(ptr noundef nonnull align 8 dereferenceable(20) %332, i64 noundef %335)
  store ptr %336, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #3
  store i32 0, ptr %16, align 4, !tbaa !9
  br label %337

337:                                              ; preds = %368, %311
  %338 = load i32, ptr %16, align 4, !tbaa !9
  %339 = load i32, ptr %13, align 4, !tbaa !9
  %340 = icmp slt i32 %338, %339
  br i1 %340, label %342, label %341

341:                                              ; preds = %337
  store i32 8, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #3
  br label %371

342:                                              ; preds = %337
  %343 = load ptr, ptr %15, align 8, !tbaa !5
  %344 = load i32, ptr %16, align 4, !tbaa !9
  %345 = sext i32 %344 to i64
  %346 = getelementptr inbounds i32, ptr %343, i64 %345
  %347 = load i32, ptr %346, align 4, !tbaa !9
  %348 = load i32, ptr %14, align 4, !tbaa !9
  %349 = getelementptr inbounds %"class.libzpaq::Predictor", ptr %20, i32 0, i32 2
  %350 = load ptr, ptr %5, align 8, !tbaa !5
  %351 = getelementptr inbounds i8, ptr %350, i64 2
  %352 = load i8, ptr %351, align 1, !tbaa !14
  %353 = zext i8 %352 to i32
  %354 = load i32, ptr %16, align 4, !tbaa !9
  %355 = add nsw i32 %353, %354
  %356 = sext i32 %355 to i64
  %357 = getelementptr inbounds [256 x i32], ptr %349, i64 0, i64 %356
  %358 = load i32, ptr %357, align 4, !tbaa !9
  %359 = mul nsw i32 %348, %358
  %360 = add nsw i32 %359, 4096
  %361 = ashr i32 %360, 13
  %362 = add nsw i32 %347, %361
  %363 = call noundef i32 @_ZN7libzpaq9Predictor9clamp512kEi(ptr noundef nonnull align 8 dereferenceable(110620) %20, i32 noundef %362)
  %364 = load ptr, ptr %15, align 8, !tbaa !5
  %365 = load i32, ptr %16, align 4, !tbaa !9
  %366 = sext i32 %365 to i64
  %367 = getelementptr inbounds i32, ptr %364, i64 %366
  store i32 %363, ptr %367, align 4, !tbaa !9
  br label %368

368:                                              ; preds = %342
  %369 = load i32, ptr %16, align 4, !tbaa !9
  %370 = add nsw i32 %369, 1
  store i32 %370, ptr %16, align 4, !tbaa !9
  br label %337, !llvm.loop !30

371:                                              ; preds = %341
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #3
  br label %440

372:                                              ; preds = %36
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #3
  %373 = load i32, ptr %4, align 4, !tbaa !9
  %374 = mul nsw i32 %373, 32767
  %375 = getelementptr inbounds %"class.libzpaq::Predictor", ptr %20, i32 0, i32 2
  %376 = load i32, ptr %7, align 4, !tbaa !9
  %377 = sext i32 %376 to i64
  %378 = getelementptr inbounds [256 x i32], ptr %375, i64 0, i64 %377
  %379 = load i32, ptr %378, align 4, !tbaa !9
  %380 = call noundef i32 @_ZN7libzpaq9Predictor6squashEi(ptr noundef nonnull align 8 dereferenceable(110620) %20, i32 noundef %379)
  %381 = sub nsw i32 %374, %380
  store i32 %381, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #3
  %382 = load ptr, ptr %9, align 8, !tbaa !5
  %383 = getelementptr inbounds %"struct.libzpaq::Component", ptr %382, i32 0, i32 5
  %384 = load ptr, ptr %9, align 8, !tbaa !5
  %385 = getelementptr inbounds %"struct.libzpaq::Component", ptr %384, i32 0, i32 1
  %386 = load i64, ptr %385, align 8, !tbaa !22
  %387 = mul i64 %386, 2
  %388 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN7libzpaq5ArrayIjEixEm(ptr noundef nonnull align 8 dereferenceable(20) %383, i64 noundef %387)
  store ptr %388, ptr %18, align 8, !tbaa !5
  %389 = load ptr, ptr %18, align 8, !tbaa !5
  %390 = getelementptr inbounds i32, ptr %389, i64 0
  %391 = load i32, ptr %390, align 4, !tbaa !9
  %392 = load i32, ptr %17, align 4, !tbaa !9
  %393 = getelementptr inbounds %"class.libzpaq::Predictor", ptr %20, i32 0, i32 2
  %394 = load ptr, ptr %5, align 8, !tbaa !5
  %395 = getelementptr inbounds i8, ptr %394, i64 2
  %396 = load i8, ptr %395, align 1, !tbaa !14
  %397 = zext i8 %396 to i64
  %398 = getelementptr inbounds [256 x i32], ptr %393, i64 0, i64 %397
  %399 = load i32, ptr %398, align 4, !tbaa !9
  %400 = mul nsw i32 %392, %399
  %401 = add nsw i32 %400, 4096
  %402 = ashr i32 %401, 13
  %403 = add nsw i32 %391, %402
  %404 = call noundef i32 @_ZN7libzpaq9Predictor9clamp512kEi(ptr noundef nonnull align 8 dereferenceable(110620) %20, i32 noundef %403)
  %405 = load ptr, ptr %18, align 8, !tbaa !5
  %406 = getelementptr inbounds i32, ptr %405, i64 0
  store i32 %404, ptr %406, align 4, !tbaa !9
  %407 = load ptr, ptr %18, align 8, !tbaa !5
  %408 = getelementptr inbounds i32, ptr %407, i64 1
  %409 = load i32, ptr %408, align 4, !tbaa !9
  %410 = load i32, ptr %17, align 4, !tbaa !9
  %411 = add nsw i32 %410, 16
  %412 = ashr i32 %411, 5
  %413 = add nsw i32 %409, %412
  %414 = call noundef i32 @_ZN7libzpaq9Predictor9clamp512kEi(ptr noundef nonnull align 8 dereferenceable(110620) %20, i32 noundef %413)
  %415 = load ptr, ptr %18, align 8, !tbaa !5
  %416 = getelementptr inbounds i32, ptr %415, i64 1
  store i32 %414, ptr %416, align 4, !tbaa !9
  %417 = getelementptr inbounds %"class.libzpaq::Predictor", ptr %20, i32 0, i32 10
  %418 = load ptr, ptr %9, align 8, !tbaa !5
  %419 = getelementptr inbounds %"struct.libzpaq::Component", ptr %418, i32 0, i32 1
  %420 = load i64, ptr %419, align 8, !tbaa !22
  %421 = trunc i64 %420 to i32
  %422 = load i32, ptr %4, align 4, !tbaa !9
  %423 = call noundef i32 @_ZN7libzpaq10StateTable4nextEii(ptr noundef nonnull align 1 dereferenceable(1024) %417, i32 noundef %421, i32 noundef %422)
  %424 = trunc i32 %423 to i8
  %425 = load ptr, ptr %9, align 8, !tbaa !5
  %426 = getelementptr inbounds %"struct.libzpaq::Component", ptr %425, i32 0, i32 6
  %427 = load ptr, ptr %9, align 8, !tbaa !5
  %428 = getelementptr inbounds %"struct.libzpaq::Component", ptr %427, i32 0, i32 4
  %429 = load i64, ptr %428, align 8, !tbaa !15
  %430 = getelementptr inbounds %"class.libzpaq::Predictor", ptr %20, i32 0, i32 1
  %431 = load i32, ptr %430, align 4, !tbaa !21
  %432 = and i32 %431, 15
  %433 = sext i32 %432 to i64
  %434 = add i64 %429, %433
  %435 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN7libzpaq5ArrayIhEixEm(ptr noundef nonnull align 8 dereferenceable(20) %426, i64 noundef %434)
  store i8 %424, ptr %435, align 1, !tbaa !14
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #3
  br label %440

436:                                              ; preds = %36
  %437 = load ptr, ptr %9, align 8, !tbaa !5
  %438 = load i32, ptr %4, align 4, !tbaa !9
  call void @_ZN7libzpaq9Predictor5trainERNS_9ComponentEi(ptr noundef nonnull align 8 dereferenceable(110620) %20, ptr noundef nonnull align 8 dereferenceable(112) %437, i32 noundef %438)
  br label %440

439:                                              ; preds = %36
  br label %440

440:                                              ; preds = %439, %436, %372, %371, %302, %249, %48, %45, %36, %36
  %441 = load ptr, ptr %5, align 8, !tbaa !5
  %442 = getelementptr inbounds i8, ptr %441, i64 0
  %443 = load i8, ptr %442, align 1, !tbaa !14
  %444 = zext i8 %443 to i64
  %445 = getelementptr inbounds [256 x i32], ptr @_ZN7libzpaq8compsizeE, i64 0, i64 %444
  %446 = load i32, ptr %445, align 4, !tbaa !9
  %447 = load ptr, ptr %5, align 8, !tbaa !5
  %448 = sext i32 %446 to i64
  %449 = getelementptr inbounds i8, ptr %447, i64 %448
  store ptr %449, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  br label %450

450:                                              ; preds = %440
  %451 = load i32, ptr %7, align 4, !tbaa !9
  %452 = add nsw i32 %451, 1
  store i32 %452, ptr %7, align 4, !tbaa !9
  br label %31, !llvm.loop !31

453:                                              ; preds = %35
  %454 = getelementptr inbounds %"class.libzpaq::Predictor", ptr %20, i32 0, i32 0
  %455 = load i32, ptr %454, align 8, !tbaa !32
  %456 = load i32, ptr %4, align 4, !tbaa !9
  %457 = add nsw i32 %455, %456
  %458 = getelementptr inbounds %"class.libzpaq::Predictor", ptr %20, i32 0, i32 0
  %459 = load i32, ptr %458, align 8, !tbaa !32
  %460 = add nsw i32 %459, %457
  store i32 %460, ptr %458, align 8, !tbaa !32
  %461 = getelementptr inbounds %"class.libzpaq::Predictor", ptr %20, i32 0, i32 0
  %462 = load i32, ptr %461, align 8, !tbaa !32
  %463 = icmp sge i32 %462, 256
  br i1 %463, label %464, label %490

464:                                              ; preds = %453
  %465 = getelementptr inbounds %"class.libzpaq::Predictor", ptr %20, i32 0, i32 4
  %466 = load ptr, ptr %465, align 8, !tbaa !11
  %467 = getelementptr inbounds %"class.libzpaq::Predictor", ptr %20, i32 0, i32 0
  %468 = load i32, ptr %467, align 8, !tbaa !32
  %469 = sub nsw i32 %468, 256
  call void @_ZN7libzpaq5ZPAQL3runEj(ptr noundef nonnull align 8 dereferenceable(192) %466, i32 noundef %469)
  %470 = getelementptr inbounds %"class.libzpaq::Predictor", ptr %20, i32 0, i32 1
  store i32 1, ptr %470, align 4, !tbaa !21
  %471 = getelementptr inbounds %"class.libzpaq::Predictor", ptr %20, i32 0, i32 0
  store i32 1, ptr %471, align 8, !tbaa !32
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #3
  store i32 0, ptr %19, align 4, !tbaa !9
  br label %472

472:                                              ; preds = %486, %464
  %473 = load i32, ptr %19, align 4, !tbaa !9
  %474 = load i32, ptr %6, align 4, !tbaa !9
  %475 = icmp slt i32 %473, %474
  br i1 %475, label %477, label %476

476:                                              ; preds = %472
  store i32 11, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #3
  br label %489

477:                                              ; preds = %472
  %478 = getelementptr inbounds %"class.libzpaq::Predictor", ptr %20, i32 0, i32 4
  %479 = load ptr, ptr %478, align 8, !tbaa !11
  %480 = load i32, ptr %19, align 4, !tbaa !9
  %481 = call noundef i32 @_ZN7libzpaq5ZPAQL1HEi(ptr noundef nonnull align 8 dereferenceable(192) %479, i32 noundef %480)
  %482 = getelementptr inbounds %"class.libzpaq::Predictor", ptr %20, i32 0, i32 3
  %483 = load i32, ptr %19, align 4, !tbaa !9
  %484 = sext i32 %483 to i64
  %485 = getelementptr inbounds [256 x i32], ptr %482, i64 0, i64 %484
  store i32 %481, ptr %485, align 4, !tbaa !9
  br label %486

486:                                              ; preds = %477
  %487 = load i32, ptr %19, align 4, !tbaa !9
  %488 = add nsw i32 %487, 1
  store i32 %488, ptr %19, align 4, !tbaa !9
  br label %472, !llvm.loop !33

489:                                              ; preds = %476
  br label %522

490:                                              ; preds = %453
  %491 = getelementptr inbounds %"class.libzpaq::Predictor", ptr %20, i32 0, i32 0
  %492 = load i32, ptr %491, align 8, !tbaa !32
  %493 = icmp sge i32 %492, 16
  br i1 %493, label %494, label %508

494:                                              ; preds = %490
  %495 = getelementptr inbounds %"class.libzpaq::Predictor", ptr %20, i32 0, i32 0
  %496 = load i32, ptr %495, align 8, !tbaa !32
  %497 = icmp slt i32 %496, 32
  br i1 %497, label %498, label %508

498:                                              ; preds = %494
  %499 = getelementptr inbounds %"class.libzpaq::Predictor", ptr %20, i32 0, i32 1
  %500 = load i32, ptr %499, align 4, !tbaa !21
  %501 = and i32 %500, 15
  %502 = shl i32 %501, 5
  %503 = load i32, ptr %4, align 4, !tbaa !9
  %504 = shl i32 %503, 4
  %505 = or i32 %502, %504
  %506 = or i32 %505, 1
  %507 = getelementptr inbounds %"class.libzpaq::Predictor", ptr %20, i32 0, i32 1
  store i32 %506, ptr %507, align 4, !tbaa !21
  br label %521

508:                                              ; preds = %494, %490
  %509 = getelementptr inbounds %"class.libzpaq::Predictor", ptr %20, i32 0, i32 1
  %510 = load i32, ptr %509, align 4, !tbaa !21
  %511 = and i32 %510, 496
  %512 = getelementptr inbounds %"class.libzpaq::Predictor", ptr %20, i32 0, i32 1
  %513 = load i32, ptr %512, align 4, !tbaa !21
  %514 = and i32 %513, 15
  %515 = mul nsw i32 %514, 2
  %516 = load i32, ptr %4, align 4, !tbaa !9
  %517 = add nsw i32 %515, %516
  %518 = and i32 %517, 15
  %519 = or i32 %511, %518
  %520 = getelementptr inbounds %"class.libzpaq::Predictor", ptr %20, i32 0, i32 1
  store i32 %519, ptr %520, align 4, !tbaa !21
  br label %521

521:                                              ; preds = %508, %498
  br label %522

522:                                              ; preds = %521, %489
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #3
  ret void
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN7libzpaq10StateTable4nextEii(ptr noundef nonnull align 1 dereferenceable(1024), i32 noundef, i32 noundef) #1 align 2

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 2056}
!12 = !{!"_ZTSN7libzpaq9PredictorE", !10, i64 0, !10, i64 4, !7, i64 8, !7, i64 1032, !6, i64 2056, !7, i64 2064, !7, i64 30736, !7, i64 31760, !7, i64 35856, !7, i64 44048, !13, i64 109584, !6, i64 110608, !10, i64 110616}
!13 = !{!"_ZTSN7libzpaq10StateTableE", !7, i64 0}
!14 = !{!7, !7, i64 0}
!15 = !{!16, !17, i64 32}
!16 = !{!"_ZTSN7libzpaq9ComponentE", !17, i64 0, !17, i64 8, !17, i64 16, !17, i64 24, !17, i64 32, !18, i64 40, !19, i64 64, !20, i64 88}
!17 = !{!"long", !7, i64 0}
!18 = !{!"_ZTSN7libzpaq5ArrayIjEE", !6, i64 0, !17, i64 8, !10, i64 16}
!19 = !{!"_ZTSN7libzpaq5ArrayIhEE", !6, i64 0, !17, i64 8, !10, i64 16}
!20 = !{!"_ZTSN7libzpaq5ArrayItEE", !6, i64 0, !17, i64 8, !10, i64 16}
!21 = !{!12, !10, i64 4}
!22 = !{!16, !17, i64 8}
!23 = !{!16, !17, i64 16}
!24 = !{!16, !17, i64 0}
!25 = !{!16, !17, i64 24}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}
!28 = !{!29, !29, i64 0}
!29 = !{!"short", !7, i64 0}
!30 = distinct !{!30, !27}
!31 = distinct !{!31, !27}
!32 = !{!12, !10, i64 0}
!33 = distinct !{!33, !27}


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

%"struct.libzpaq::Component" = type { i64, i64, i64, i64, i64, %"class.libzpaq::Array", %"class.libzpaq::Array.0", %"class.libzpaq::Array.2" }
%"class.libzpaq::Array" = type <{ ptr, i64, i32, [4 x i8] }>
%"class.libzpaq::Array.0" = type <{ ptr, i64, i32, [4 x i8] }>
%"class.libzpaq::Array.2" = type <{ ptr, i64, i32, [4 x i8] }>

@_ZN7libzpaq8compsizeE = external dso_local local_unnamed_addr constant <{ [10 x i32], [246 x i32] }>, align 16

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZN7libzpaq5ArrayIhEixEm(ptr noundef nonnull align 8 dereferenceable(20), i64 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN7libzpaq5ArrayIjEixEm(ptr noundef nonnull align 8 dereferenceable(20), i64 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZN7libzpaq5ArrayIhEclEm(ptr noundef nonnull align 8 dereferenceable(20), i64 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN7libzpaq5ArrayIjEclEm(ptr noundef nonnull align 8 dereferenceable(20), i64 noundef) local_unnamed_addr #0 align 2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7libzpaq9Predictor7update0Ei(ptr noundef nonnull align 8 dereferenceable(110620) %0, i32 noundef %1) local_unnamed_addr #1 align 2 {
  %3 = getelementptr inbounds i8, ptr %0, i64 2056
  %4 = load ptr, ptr %3, align 8, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %4, i64 16
  %6 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZN7libzpaq5ArrayIhEixEm(ptr noundef nonnull align 8 dereferenceable(20) %5, i64 noundef 7)
  %7 = load ptr, ptr %3, align 8, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %7, i64 16
  %9 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZN7libzpaq5ArrayIhEixEm(ptr noundef nonnull align 8 dereferenceable(20) %8, i64 noundef 6)
  %10 = load i8, ptr %9, align 1, !tbaa !12
  %.not127 = icmp eq i8 %10, 0
  br i1 %.not127, label %._crit_edge, label %.lr.ph123

.lr.ph123:                                        ; preds = %2
  %11 = getelementptr inbounds i8, ptr %0, i64 2064
  %12 = mul nsw i32 %1, 32767
  %13 = getelementptr inbounds i8, ptr %0, i64 8
  %14 = getelementptr inbounds i8, ptr %0, i64 109584
  %15 = getelementptr inbounds i8, ptr %0, i64 4
  %16 = trunc i32 %1 to i8
  %17 = getelementptr inbounds i8, ptr %0, i64 1032
  %wide.trip.count134 = zext i8 %10 to i64
  br label %21

._crit_edge:                                      ; preds = %.loopexit117, %2
  %18 = load i32, ptr %0, align 8, !tbaa !13
  %reass.add = shl i32 %18, 1
  %19 = add i32 %reass.add, %1
  store i32 %19, ptr %0, align 8, !tbaa !13
  %20 = icmp sgt i32 %19, 255
  br i1 %20, label %239, label %249

21:                                               ; preds = %.lr.ph123, %.loopexit117
  %indvars.iv131 = phi i64 [ 0, %.lr.ph123 ], [ %indvars.iv.next132, %.loopexit117 ]
  %.0109122 = phi ptr [ %6, %.lr.ph123 ], [ %238, %.loopexit117 ]
  %22 = getelementptr inbounds [256 x %"struct.libzpaq::Component"], ptr %11, i64 0, i64 %indvars.iv131
  %23 = load i8, ptr %.0109122, align 1, !tbaa !12
  switch i8 %23, label %.loopexit117 [
    i8 9, label %232
    i8 2, label %24
    i8 3, label %25
    i8 4, label %53
    i8 8, label %193
    i8 6, label %129
    i8 7, label %163
  ]

24:                                               ; preds = %21
  tail call void @_ZN7libzpaq9Predictor5trainERNS_9ComponentEi(ptr noundef nonnull align 8 dereferenceable(110620) %0, ptr noundef nonnull align 8 dereferenceable(112) %22, i32 noundef %1)
  br label %.loopexit117

25:                                               ; preds = %21
  %26 = getelementptr inbounds i8, ptr %22, i64 64
  %27 = getelementptr inbounds i8, ptr %22, i64 32
  %28 = load i64, ptr %27, align 8, !tbaa !14
  %29 = load i32, ptr %15, align 4, !tbaa !20
  %30 = and i32 %29, 15
  %31 = zext nneg i32 %30 to i64
  %32 = add i64 %28, %31
  %33 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZN7libzpaq5ArrayIhEixEm(ptr noundef nonnull align 8 dereferenceable(20) %26, i64 noundef %32)
  %34 = load i8, ptr %33, align 1, !tbaa !12
  %35 = zext i8 %34 to i32
  %36 = tail call noundef i32 @_ZN7libzpaq10StateTable4nextEii(ptr noundef nonnull align 1 dereferenceable(1024) %14, i32 noundef %35, i32 noundef %1)
  %37 = trunc i32 %36 to i8
  %38 = load i64, ptr %27, align 8, !tbaa !14
  %39 = load i32, ptr %15, align 4, !tbaa !20
  %40 = and i32 %39, 15
  %41 = zext nneg i32 %40 to i64
  %42 = add i64 %38, %41
  %43 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZN7libzpaq5ArrayIhEixEm(ptr noundef nonnull align 8 dereferenceable(20) %26, i64 noundef %42)
  store i8 %37, ptr %43, align 1, !tbaa !12
  %44 = getelementptr inbounds i8, ptr %22, i64 40
  %45 = getelementptr inbounds i8, ptr %22, i64 8
  %46 = load i64, ptr %45, align 8, !tbaa !21
  %47 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZN7libzpaq5ArrayIjEclEm(ptr noundef nonnull align 8 dereferenceable(20) %44, i64 noundef %46)
  %48 = load i32, ptr %47, align 4, !tbaa !22
  %49 = lshr i32 %48, 8
  %50 = sub i32 %12, %49
  %51 = ashr i32 %50, 2
  %52 = add i32 %51, %48
  store i32 %52, ptr %47, align 4, !tbaa !22
  br label %.loopexit117

53:                                               ; preds = %21
  %54 = getelementptr inbounds i8, ptr %22, i64 32
  %55 = load i64, ptr %54, align 8, !tbaa !14
  %56 = trunc i64 %55 to i32
  %.not = icmp eq i32 %56, %1
  br i1 %.not, label %59, label %57

57:                                               ; preds = %53
  %58 = getelementptr inbounds i8, ptr %22, i64 16
  store i64 0, ptr %58, align 8, !tbaa !23
  br label %59

59:                                               ; preds = %57, %53
  %60 = getelementptr inbounds i8, ptr %22, i64 64
  %61 = load i64, ptr %22, align 8, !tbaa !24
  %62 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZN7libzpaq5ArrayIhEclEm(ptr noundef nonnull align 8 dereferenceable(20) %60, i64 noundef %61)
  %63 = load i8, ptr %62, align 1, !tbaa !12
  %64 = load i64, ptr %22, align 8, !tbaa !24
  %65 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZN7libzpaq5ArrayIhEclEm(ptr noundef nonnull align 8 dereferenceable(20) %60, i64 noundef %64)
  %66 = load i8, ptr %65, align 1, !tbaa !12
  %67 = add i8 %63, %16
  %68 = add i8 %67, %66
  store i8 %68, ptr %65, align 1, !tbaa !12
  %69 = getelementptr inbounds i8, ptr %22, i64 8
  %70 = load i64, ptr %69, align 8, !tbaa !21
  %71 = add i64 %70, 1
  store i64 %71, ptr %69, align 8, !tbaa !21
  %72 = icmp eq i64 %71, 8
  br i1 %72, label %73, label %.loopexit117

73:                                               ; preds = %59
  store i64 0, ptr %69, align 8, !tbaa !21
  %74 = load i64, ptr %22, align 8, !tbaa !24
  %75 = add i64 %74, 1
  store i64 %75, ptr %22, align 8, !tbaa !24
  %76 = getelementptr inbounds i8, ptr %.0109122, i64 2
  %77 = load i8, ptr %76, align 1, !tbaa !12
  %78 = zext nneg i8 %77 to i32
  %notmask = shl nsw i32 -1, %78
  %79 = xor i32 %notmask, -1
  %80 = zext nneg i32 %79 to i64
  %81 = and i64 %75, %80
  store i64 %81, ptr %22, align 8, !tbaa !24
  %82 = getelementptr inbounds i8, ptr %22, i64 16
  %83 = load i64, ptr %82, align 8, !tbaa !23
  %84 = icmp eq i64 %83, 0
  br i1 %84, label %85, label %118

85:                                               ; preds = %73
  %86 = getelementptr inbounds i8, ptr %22, i64 40
  %87 = getelementptr inbounds [256 x i32], ptr %17, i64 0, i64 %indvars.iv131
  %88 = load i32, ptr %87, align 4, !tbaa !22
  %89 = zext i32 %88 to i64
  %90 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZN7libzpaq5ArrayIjEclEm(ptr noundef nonnull align 8 dereferenceable(20) %86, i64 noundef %89)
  %91 = load i32, ptr %90, align 4, !tbaa !22
  %92 = zext i32 %91 to i64
  %93 = sub nsw i64 %81, %92
  %94 = getelementptr inbounds i8, ptr %22, i64 24
  store i64 %93, ptr %94, align 8, !tbaa !25
  %95 = tail call noundef i64 @_ZNK7libzpaq5ArrayIhE4sizeEv(ptr noundef nonnull align 8 dereferenceable(20) %60)
  %96 = add i64 %95, -1
  %97 = and i64 %96, %93
  %.not116 = icmp eq i64 %97, 0
  br i1 %.not116, label %.critedge, label %thread-pre-split

thread-pre-split:                                 ; preds = %85
  %.pr = load i64, ptr %82, align 8, !tbaa !23
  %98 = icmp ult i64 %.pr, 255
  br i1 %98, label %.lr.ph119, label %.critedge

.lr.ph119:                                        ; preds = %thread-pre-split, %114
  %99 = phi i64 [ %116, %114 ], [ %.pr, %thread-pre-split ]
  %100 = load i64, ptr %22, align 8, !tbaa !24
  %101 = xor i64 %99, -1
  %102 = add i64 %100, %101
  %103 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZN7libzpaq5ArrayIhEclEm(ptr noundef nonnull align 8 dereferenceable(20) %60, i64 noundef %102)
  %104 = load i8, ptr %103, align 1, !tbaa !12
  %105 = load i64, ptr %22, align 8, !tbaa !24
  %106 = load i64, ptr %82, align 8, !tbaa !23
  %107 = load i64, ptr %94, align 8, !tbaa !25
  %108 = add i64 %107, %106
  %109 = xor i64 %108, -1
  %110 = add i64 %105, %109
  %111 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZN7libzpaq5ArrayIhEclEm(ptr noundef nonnull align 8 dereferenceable(20) %60, i64 noundef %110)
  %112 = load i8, ptr %111, align 1, !tbaa !12
  %113 = icmp eq i8 %104, %112
  br i1 %113, label %114, label %.critedge

114:                                              ; preds = %.lr.ph119
  %115 = load i64, ptr %82, align 8, !tbaa !23
  %116 = add i64 %115, 1
  store i64 %116, ptr %82, align 8, !tbaa !23
  %117 = icmp ult i64 %116, 255
  br i1 %117, label %.lr.ph119, label %.critedge, !llvm.loop !26

118:                                              ; preds = %73
  %119 = icmp ult i64 %83, 255
  %120 = zext i1 %119 to i64
  %121 = add i64 %83, %120
  store i64 %121, ptr %82, align 8, !tbaa !23
  br label %.critedge

.critedge:                                        ; preds = %.lr.ph119, %114, %thread-pre-split, %85, %118
  %122 = load i64, ptr %22, align 8, !tbaa !24
  %123 = trunc i64 %122 to i32
  %124 = getelementptr inbounds i8, ptr %22, i64 40
  %125 = getelementptr inbounds [256 x i32], ptr %17, i64 0, i64 %indvars.iv131
  %126 = load i32, ptr %125, align 4, !tbaa !22
  %127 = zext i32 %126 to i64
  %128 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZN7libzpaq5ArrayIjEclEm(ptr noundef nonnull align 8 dereferenceable(20) %124, i64 noundef %127)
  store i32 %123, ptr %128, align 4, !tbaa !22
  br label %.loopexit117

129:                                              ; preds = %21
  %130 = getelementptr inbounds [256 x i32], ptr %13, i64 0, i64 %indvars.iv131
  %131 = load i32, ptr %130, align 4, !tbaa !22
  %132 = tail call noundef i32 @_ZN7libzpaq9Predictor6squashEi(ptr noundef nonnull align 8 dereferenceable(110620) %0, i32 noundef %131)
  %133 = sub nsw i32 %12, %132
  %134 = getelementptr inbounds i8, ptr %.0109122, i64 4
  %135 = load i8, ptr %134, align 1, !tbaa !12
  %136 = zext i8 %135 to i32
  %137 = mul nsw i32 %133, %136
  %138 = ashr i32 %137, 5
  %139 = getelementptr inbounds i8, ptr %22, i64 88
  %140 = getelementptr inbounds i8, ptr %22, i64 8
  %141 = load i64, ptr %140, align 8, !tbaa !21
  %142 = tail call noundef nonnull align 2 dereferenceable(2) ptr @_ZN7libzpaq5ArrayItEixEm(ptr noundef nonnull align 8 dereferenceable(20) %139, i64 noundef %141)
  %143 = load i16, ptr %142, align 2, !tbaa !28
  %144 = zext i16 %143 to i32
  %145 = getelementptr inbounds i8, ptr %.0109122, i64 2
  %146 = load i8, ptr %145, align 1, !tbaa !12
  %147 = zext i8 %146 to i64
  %148 = getelementptr inbounds [256 x i32], ptr %13, i64 0, i64 %147
  %149 = load i32, ptr %148, align 4, !tbaa !22
  %150 = getelementptr inbounds i8, ptr %.0109122, i64 3
  %151 = load i8, ptr %150, align 1, !tbaa !12
  %152 = zext i8 %151 to i64
  %153 = getelementptr inbounds [256 x i32], ptr %13, i64 0, i64 %152
  %154 = load i32, ptr %153, align 4, !tbaa !22
  %155 = sub nsw i32 %149, %154
  %156 = mul nsw i32 %155, %138
  %157 = add nsw i32 %156, 4096
  %158 = ashr i32 %157, 13
  %159 = add nsw i32 %158, %144
  %spec.store.select = tail call i32 @llvm.smax.i32(i32 %159, i32 0)
  %spec.store.select1 = tail call i32 @llvm.umin.i32(i32 %spec.store.select, i32 65535)
  %160 = trunc nuw i32 %spec.store.select1 to i16
  %161 = load i64, ptr %140, align 8, !tbaa !21
  %162 = tail call noundef nonnull align 2 dereferenceable(2) ptr @_ZN7libzpaq5ArrayItEixEm(ptr noundef nonnull align 8 dereferenceable(20) %139, i64 noundef %161)
  store i16 %160, ptr %162, align 2, !tbaa !28
  br label %.loopexit117

163:                                              ; preds = %21
  %164 = getelementptr inbounds i8, ptr %.0109122, i64 3
  %165 = load i8, ptr %164, align 1, !tbaa !12
  %166 = getelementptr inbounds [256 x i32], ptr %13, i64 0, i64 %indvars.iv131
  %167 = load i32, ptr %166, align 4, !tbaa !22
  %168 = tail call noundef i32 @_ZN7libzpaq9Predictor6squashEi(ptr noundef nonnull align 8 dereferenceable(110620) %0, i32 noundef %167)
  %169 = sub nsw i32 %12, %168
  %170 = getelementptr inbounds i8, ptr %.0109122, i64 4
  %171 = load i8, ptr %170, align 1, !tbaa !12
  %172 = zext i8 %171 to i32
  %173 = mul nsw i32 %169, %172
  %174 = ashr i32 %173, 4
  %175 = getelementptr inbounds i8, ptr %22, i64 40
  %176 = getelementptr inbounds i8, ptr %22, i64 8
  %177 = load i64, ptr %176, align 8, !tbaa !21
  %178 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZN7libzpaq5ArrayIjEixEm(ptr noundef nonnull align 8 dereferenceable(20) %175, i64 noundef %177)
  %.not128 = icmp eq i8 %165, 0
  br i1 %.not128, label %.loopexit117, label %.lr.ph

.lr.ph:                                           ; preds = %163
  %179 = getelementptr inbounds i8, ptr %.0109122, i64 2
  %wide.trip.count = zext i8 %165 to i64
  br label %180

180:                                              ; preds = %.lr.ph, %180
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %180 ]
  %181 = getelementptr inbounds i32, ptr %178, i64 %indvars.iv
  %182 = load i32, ptr %181, align 4, !tbaa !22
  %183 = load i8, ptr %179, align 1, !tbaa !12
  %184 = zext i8 %183 to i64
  %185 = add nuw nsw i64 %indvars.iv, %184
  %186 = getelementptr inbounds [256 x i32], ptr %13, i64 0, i64 %185
  %187 = load i32, ptr %186, align 4, !tbaa !22
  %188 = mul nsw i32 %187, %174
  %189 = add nsw i32 %188, 4096
  %190 = ashr i32 %189, 13
  %191 = add nsw i32 %190, %182
  %192 = tail call noundef i32 @_ZN7libzpaq9Predictor9clamp512kEi(ptr noundef nonnull align 8 dereferenceable(110620) %0, i32 noundef %191)
  store i32 %192, ptr %181, align 4, !tbaa !22
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.loopexit117, label %180, !llvm.loop !30

193:                                              ; preds = %21
  %194 = getelementptr inbounds [256 x i32], ptr %13, i64 0, i64 %indvars.iv131
  %195 = load i32, ptr %194, align 4, !tbaa !22
  %196 = tail call noundef i32 @_ZN7libzpaq9Predictor6squashEi(ptr noundef nonnull align 8 dereferenceable(110620) %0, i32 noundef %195)
  %197 = sub nsw i32 %12, %196
  %198 = getelementptr inbounds i8, ptr %22, i64 40
  %199 = getelementptr inbounds i8, ptr %22, i64 8
  %200 = load i64, ptr %199, align 8, !tbaa !21
  %201 = shl i64 %200, 1
  %202 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZN7libzpaq5ArrayIjEixEm(ptr noundef nonnull align 8 dereferenceable(20) %198, i64 noundef %201)
  %203 = load i32, ptr %202, align 4, !tbaa !22
  %204 = getelementptr inbounds i8, ptr %.0109122, i64 2
  %205 = load i8, ptr %204, align 1, !tbaa !12
  %206 = zext i8 %205 to i64
  %207 = getelementptr inbounds [256 x i32], ptr %13, i64 0, i64 %206
  %208 = load i32, ptr %207, align 4, !tbaa !22
  %209 = mul nsw i32 %208, %197
  %210 = add nsw i32 %209, 4096
  %211 = ashr i32 %210, 13
  %212 = add nsw i32 %211, %203
  %213 = tail call noundef i32 @_ZN7libzpaq9Predictor9clamp512kEi(ptr noundef nonnull align 8 dereferenceable(110620) %0, i32 noundef %212)
  store i32 %213, ptr %202, align 4, !tbaa !22
  %214 = getelementptr inbounds i8, ptr %202, i64 4
  %215 = load i32, ptr %214, align 4, !tbaa !22
  %216 = add nsw i32 %197, 16
  %217 = ashr i32 %216, 5
  %218 = add nsw i32 %215, %217
  %219 = tail call noundef i32 @_ZN7libzpaq9Predictor9clamp512kEi(ptr noundef nonnull align 8 dereferenceable(110620) %0, i32 noundef %218)
  store i32 %219, ptr %214, align 4, !tbaa !22
  %220 = load i64, ptr %199, align 8, !tbaa !21
  %221 = trunc i64 %220 to i32
  %222 = tail call noundef i32 @_ZN7libzpaq10StateTable4nextEii(ptr noundef nonnull align 1 dereferenceable(1024) %14, i32 noundef %221, i32 noundef %1)
  %223 = trunc i32 %222 to i8
  %224 = getelementptr inbounds i8, ptr %22, i64 64
  %225 = getelementptr inbounds i8, ptr %22, i64 32
  %226 = load i64, ptr %225, align 8, !tbaa !14
  %227 = load i32, ptr %15, align 4, !tbaa !20
  %228 = and i32 %227, 15
  %229 = zext nneg i32 %228 to i64
  %230 = add i64 %226, %229
  %231 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZN7libzpaq5ArrayIhEixEm(ptr noundef nonnull align 8 dereferenceable(20) %224, i64 noundef %230)
  store i8 %223, ptr %231, align 1, !tbaa !12
  br label %.loopexit117

232:                                              ; preds = %21
  tail call void @_ZN7libzpaq9Predictor5trainERNS_9ComponentEi(ptr noundef nonnull align 8 dereferenceable(110620) %0, ptr noundef nonnull align 8 dereferenceable(112) %22, i32 noundef %1)
  br label %.loopexit117

.loopexit117:                                     ; preds = %180, %163, %21, %59, %.critedge, %232, %193, %129, %25, %24
  %233 = load i8, ptr %.0109122, align 1, !tbaa !12
  %234 = zext i8 %233 to i64
  %235 = getelementptr inbounds [256 x i32], ptr @_ZN7libzpaq8compsizeE, i64 0, i64 %234
  %236 = load i32, ptr %235, align 4, !tbaa !22
  %237 = sext i32 %236 to i64
  %238 = getelementptr inbounds i8, ptr %.0109122, i64 %237
  %indvars.iv.next132 = add nuw nsw i64 %indvars.iv131, 1
  %exitcond135.not = icmp eq i64 %indvars.iv.next132, %wide.trip.count134
  br i1 %exitcond135.not, label %._crit_edge, label %21, !llvm.loop !31

239:                                              ; preds = %._crit_edge
  %240 = load ptr, ptr %3, align 8, !tbaa !5
  %241 = add nsw i32 %19, -256
  tail call void @_ZN7libzpaq5ZPAQL3runEj(ptr noundef nonnull align 8 dereferenceable(192) %240, i32 noundef %241)
  %242 = getelementptr inbounds i8, ptr %0, i64 4
  store i32 1, ptr %242, align 4, !tbaa !20
  store i32 1, ptr %0, align 8, !tbaa !13
  br i1 %.not127, label %.loopexit, label %.lr.ph126

.lr.ph126:                                        ; preds = %239
  %243 = getelementptr inbounds i8, ptr %0, i64 1032
  %wide.trip.count139 = zext i8 %10 to i64
  br label %244

244:                                              ; preds = %.lr.ph126, %244
  %indvars.iv136 = phi i64 [ 0, %.lr.ph126 ], [ %indvars.iv.next137, %244 ]
  %245 = load ptr, ptr %3, align 8, !tbaa !5
  %246 = trunc nuw nsw i64 %indvars.iv136 to i32
  %247 = tail call noundef i32 @_ZN7libzpaq5ZPAQL1HEi(ptr noundef nonnull align 8 dereferenceable(192) %245, i32 noundef %246)
  %248 = getelementptr inbounds [256 x i32], ptr %243, i64 0, i64 %indvars.iv136
  store i32 %247, ptr %248, align 4, !tbaa !22
  %indvars.iv.next137 = add nuw nsw i64 %indvars.iv136, 1
  %exitcond140.not = icmp eq i64 %indvars.iv.next137, %wide.trip.count139
  br i1 %exitcond140.not, label %.loopexit, label %244, !llvm.loop !32

249:                                              ; preds = %._crit_edge
  %250 = and i32 %19, -16
  %or.cond = icmp eq i32 %250, 16
  %251 = getelementptr inbounds i8, ptr %0, i64 4
  %252 = load i32, ptr %251, align 4, !tbaa !20
  br i1 %or.cond, label %253, label %259

253:                                              ; preds = %249
  %254 = shl i32 %252, 5
  %255 = and i32 %254, 480
  %256 = shl i32 %1, 4
  %257 = or i32 %256, %255
  %258 = or disjoint i32 %257, 1
  br label %.loopexit.sink.split

259:                                              ; preds = %249
  %260 = and i32 %252, 496
  %261 = shl i32 %252, 1
  %262 = add i32 %261, %1
  %263 = and i32 %262, 15
  %264 = or disjoint i32 %263, %260
  br label %.loopexit.sink.split

.loopexit.sink.split:                             ; preds = %259, %253
  %.sink = phi i32 [ %258, %253 ], [ %264, %259 ]
  store i32 %.sink, ptr %251, align 4, !tbaa !20
  br label %.loopexit

.loopexit:                                        ; preds = %244, %.loopexit.sink.split, %239
  ret void
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN7libzpaq10StateTable4nextEii(ptr noundef nonnull align 1 dereferenceable(1024), i32 noundef, i32 noundef) local_unnamed_addr #0 align 2

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.umin.i32(i32, i32) #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 uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }

!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, !10, i64 2056}
!6 = !{!"_ZTSN7libzpaq9PredictorE", !7, i64 0, !7, i64 4, !8, i64 8, !8, i64 1032, !10, i64 2056, !8, i64 2064, !8, i64 30736, !8, i64 31760, !8, i64 35856, !8, i64 44048, !11, i64 109584, !10, i64 110608, !7, i64 110616}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"_ZTSN7libzpaq10StateTableE", !8, i64 0}
!12 = !{!8, !8, i64 0}
!13 = !{!6, !7, i64 0}
!14 = !{!15, !16, i64 32}
!15 = !{!"_ZTSN7libzpaq9ComponentE", !16, i64 0, !16, i64 8, !16, i64 16, !16, i64 24, !16, i64 32, !17, i64 40, !18, i64 64, !19, i64 88}
!16 = !{!"long", !8, i64 0}
!17 = !{!"_ZTSN7libzpaq5ArrayIjEE", !10, i64 0, !16, i64 8, !7, i64 16}
!18 = !{!"_ZTSN7libzpaq5ArrayIhEE", !10, i64 0, !16, i64 8, !7, i64 16}
!19 = !{!"_ZTSN7libzpaq5ArrayItEE", !10, i64 0, !16, i64 8, !7, i64 16}
!20 = !{!6, !7, i64 4}
!21 = !{!15, !16, i64 8}
!22 = !{!7, !7, i64 0}
!23 = !{!15, !16, i64 16}
!24 = !{!15, !16, i64 0}
!25 = !{!15, !16, i64 24}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}
!28 = !{!29, !29, i64 0}
!29 = !{!"short", !8, i64 0}
!30 = distinct !{!30, !27}
!31 = distinct !{!31, !27}
!32 = distinct !{!32, !27}


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