; LLVM IR from mncoppola/rpef :: utilities_src/squashfs2.1/lzma/C/7zip/Compress/LZMA (LZMAEncoder)

; 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.CLZInWindow = type { ptr, ptr, ptr, i32, i8, ptr, ptr, i32, i32, i32, i32, i32, i32 }
%"class.NBT3::CMatchFinderBinTree" = type { %struct.IMatchFinder, %struct.IMatchFinderSetCallback, %class.CLZInWindow, %class.CMyUnknownImp, i32, i32, i32, ptr, i32, %class.CMyComPtr }
%struct.IMatchFinder = type { %struct.IInWindowStream }
%struct.IInWindowStream = type { %struct.IUnknown }
%struct.IUnknown = type { ptr }
%struct.IMatchFinderSetCallback = type { %struct.IUnknown }
%class.CMyUnknownImp = type { i32 }
%class.CMyComPtr = type { ptr }

; 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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z5MyMinIjET_S0_S0_(i32 noundef, i32 noundef) #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN4NBT34HashEPKhRj(ptr noundef, ptr noundef nonnull align 4 dereferenceable(4)) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4NBT319CMatchFinderBinTree17DummyLongestMatchEv(ptr noundef nonnull align 8 dereferenceable(128) %0) unnamed_addr #2 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca ptr, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %21 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #3
  %22 = getelementptr inbounds i8, ptr %21, i64 16
  %23 = getelementptr inbounds %class.CLZInWindow, ptr %22, i32 0, i32 8
  %24 = load i32, ptr %23, align 4, !tbaa !9
  %25 = getelementptr inbounds %"class.NBT3::CMatchFinderBinTree", ptr %21, i32 0, i32 6
  %26 = load i32, ptr %25, align 4, !tbaa !13
  %27 = add i32 %24, %26
  %28 = getelementptr inbounds i8, ptr %21, i64 16
  %29 = getelementptr inbounds %class.CLZInWindow, ptr %28, i32 0, i32 12
  %30 = load i32, ptr %29, align 4, !tbaa !21
  %31 = icmp ule i32 %27, %30
  br i1 %31, label %32, label %35

32:                                               ; preds = %1
  %33 = getelementptr inbounds %"class.NBT3::CMatchFinderBinTree", ptr %21, i32 0, i32 6
  %34 = load i32, ptr %33, align 4, !tbaa !13
  store i32 %34, ptr %3, align 4, !tbaa !22
  br label %47

35:                                               ; preds = %1
  %36 = getelementptr inbounds i8, ptr %21, i64 16
  %37 = getelementptr inbounds %class.CLZInWindow, ptr %36, i32 0, i32 12
  %38 = load i32, ptr %37, align 4, !tbaa !21
  %39 = getelementptr inbounds i8, ptr %21, i64 16
  %40 = getelementptr inbounds %class.CLZInWindow, ptr %39, i32 0, i32 8
  %41 = load i32, ptr %40, align 4, !tbaa !9
  %42 = sub i32 %38, %41
  store i32 %42, ptr %3, align 4, !tbaa !22
  %43 = load i32, ptr %3, align 4, !tbaa !22
  %44 = icmp ult i32 %43, 3
  br i1 %44, label %45, label %46

45:                                               ; preds = %35
  store i32 1, ptr %4, align 4
  br label %243

46:                                               ; preds = %35
  br label %47

47:                                               ; preds = %46, %32
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #3
  %48 = getelementptr inbounds i8, ptr %21, i64 16
  %49 = getelementptr inbounds %class.CLZInWindow, ptr %48, i32 0, i32 8
  %50 = load i32, ptr %49, align 4, !tbaa !9
  %51 = getelementptr inbounds %"class.NBT3::CMatchFinderBinTree", ptr %21, i32 0, i32 5
  %52 = load i32, ptr %51, align 8, !tbaa !23
  %53 = icmp ugt i32 %50, %52
  br i1 %53, label %54, label %61

54:                                               ; preds = %47
  %55 = getelementptr inbounds i8, ptr %21, i64 16
  %56 = getelementptr inbounds %class.CLZInWindow, ptr %55, i32 0, i32 8
  %57 = load i32, ptr %56, align 4, !tbaa !9
  %58 = getelementptr inbounds %"class.NBT3::CMatchFinderBinTree", ptr %21, i32 0, i32 5
  %59 = load i32, ptr %58, align 8, !tbaa !23
  %60 = sub i32 %57, %59
  br label %62

61:                                               ; preds = %47
  br label %62

62:                                               ; preds = %61, %54
  %63 = phi i32 [ %60, %54 ], [ 0, %61 ]
  store i32 %63, ptr %5, align 4, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  %64 = getelementptr inbounds i8, ptr %21, i64 16
  %65 = getelementptr inbounds %class.CLZInWindow, ptr %64, i32 0, i32 6
  %66 = load ptr, ptr %65, align 8, !tbaa !24
  %67 = getelementptr inbounds i8, ptr %21, i64 16
  %68 = getelementptr inbounds %class.CLZInWindow, ptr %67, i32 0, i32 8
  %69 = load i32, ptr %68, align 4, !tbaa !9
  %70 = zext i32 %69 to i64
  %71 = getelementptr inbounds i8, ptr %66, i64 %70
  store ptr %71, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #3
  %72 = load ptr, ptr %6, align 8, !tbaa !5
  %73 = call noundef i32 @_ZN4NBT34HashEPKhRj(ptr noundef %72, ptr noundef nonnull align 4 dereferenceable(4) %7)
  store i32 %73, ptr %8, align 4, !tbaa !22
  %74 = getelementptr inbounds i8, ptr %21, i64 16
  %75 = getelementptr inbounds %class.CLZInWindow, ptr %74, i32 0, i32 8
  %76 = load i32, ptr %75, align 4, !tbaa !9
  %77 = getelementptr inbounds %"class.NBT3::CMatchFinderBinTree", ptr %21, i32 0, i32 7
  %78 = load ptr, ptr %77, align 8, !tbaa !25
  %79 = load i32, ptr %7, align 4, !tbaa !22
  %80 = add i32 16777216, %79
  %81 = zext i32 %80 to i64
  %82 = getelementptr inbounds i32, ptr %78, i64 %81
  store i32 %76, ptr %82, align 4, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  %83 = getelementptr inbounds %"class.NBT3::CMatchFinderBinTree", ptr %21, i32 0, i32 7
  %84 = load ptr, ptr %83, align 8, !tbaa !25
  %85 = load i32, ptr %8, align 4, !tbaa !22
  %86 = zext i32 %85 to i64
  %87 = getelementptr inbounds i32, ptr %84, i64 %86
  %88 = load i32, ptr %87, align 4, !tbaa !22
  store i32 %88, ptr %9, align 4, !tbaa !22
  %89 = getelementptr inbounds i8, ptr %21, i64 16
  %90 = getelementptr inbounds %class.CLZInWindow, ptr %89, i32 0, i32 8
  %91 = load i32, ptr %90, align 4, !tbaa !9
  %92 = getelementptr inbounds %"class.NBT3::CMatchFinderBinTree", ptr %21, i32 0, i32 7
  %93 = load ptr, ptr %92, align 8, !tbaa !25
  %94 = load i32, ptr %8, align 4, !tbaa !22
  %95 = zext i32 %94 to i64
  %96 = getelementptr inbounds i32, ptr %93, i64 %95
  store i32 %91, ptr %96, align 4, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  %97 = getelementptr inbounds %"class.NBT3::CMatchFinderBinTree", ptr %21, i32 0, i32 7
  %98 = load ptr, ptr %97, align 8, !tbaa !25
  %99 = getelementptr inbounds i32, ptr %98, i64 16778240
  store ptr %99, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  %100 = load ptr, ptr %10, align 8, !tbaa !5
  %101 = getelementptr inbounds %"class.NBT3::CMatchFinderBinTree", ptr %21, i32 0, i32 4
  %102 = load i32, ptr %101, align 4, !tbaa !26
  %103 = shl i32 %102, 1
  %104 = zext i32 %103 to i64
  %105 = getelementptr inbounds i32, ptr %100, i64 %104
  %106 = getelementptr inbounds i32, ptr %105, i64 1
  store ptr %106, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  %107 = load ptr, ptr %10, align 8, !tbaa !5
  %108 = getelementptr inbounds %"class.NBT3::CMatchFinderBinTree", ptr %21, i32 0, i32 4
  %109 = load i32, ptr %108, align 4, !tbaa !26
  %110 = shl i32 %109, 1
  %111 = zext i32 %110 to i64
  %112 = getelementptr inbounds i32, ptr %107, i64 %111
  store ptr %112, ptr %12, align 8, !tbaa !5
  %113 = load i32, ptr %3, align 4, !tbaa !22
  %114 = icmp ne i32 %113, 3
  br i1 %114, label %115, label %239

115:                                              ; preds = %62
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #3
  store i32 3, ptr %14, align 4, !tbaa !22
  store i32 3, ptr %13, align 4, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #3
  %116 = getelementptr inbounds %"class.NBT3::CMatchFinderBinTree", ptr %21, i32 0, i32 8
  %117 = load i32, ptr %116, align 8, !tbaa !27
  store i32 %117, ptr %15, align 4, !tbaa !22
  br label %118

118:                                              ; preds = %234, %115
  br label %119

119:                                              ; preds = %118
  %120 = load i32, ptr %9, align 4, !tbaa !22
  %121 = load i32, ptr %5, align 4, !tbaa !22
  %122 = icmp ule i32 %120, %121
  br i1 %122, label %127, label %123

123:                                              ; preds = %119
  %124 = load i32, ptr %15, align 4, !tbaa !22
  %125 = add i32 %124, -1
  store i32 %125, ptr %15, align 4, !tbaa !22
  %126 = icmp eq i32 %124, 0
  br i1 %126, label %127, label %128

127:                                              ; preds = %123, %119
  br label %235

128:                                              ; preds = %123
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  %129 = getelementptr inbounds i8, ptr %21, i64 16
  %130 = getelementptr inbounds %class.CLZInWindow, ptr %129, i32 0, i32 6
  %131 = load ptr, ptr %130, align 8, !tbaa !24
  %132 = load i32, ptr %9, align 4, !tbaa !22
  %133 = zext i32 %132 to i64
  %134 = getelementptr inbounds i8, ptr %131, i64 %133
  store ptr %134, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #3
  %135 = load i32, ptr %13, align 4, !tbaa !22
  %136 = load i32, ptr %14, align 4, !tbaa !22
  %137 = call noundef i32 @_Z5MyMinIjET_S0_S0_(i32 noundef %135, i32 noundef %136)
  store i32 %137, ptr %17, align 4, !tbaa !22
  br label %138

138:                                              ; preds = %154, %128
  %139 = load ptr, ptr %16, align 8, !tbaa !5
  %140 = load i32, ptr %17, align 4, !tbaa !22
  %141 = zext i32 %140 to i64
  %142 = getelementptr inbounds i8, ptr %139, i64 %141
  %143 = load i8, ptr %142, align 1, !tbaa !28
  %144 = zext i8 %143 to i32
  %145 = load ptr, ptr %6, align 8, !tbaa !5
  %146 = load i32, ptr %17, align 4, !tbaa !22
  %147 = zext i32 %146 to i64
  %148 = getelementptr inbounds i8, ptr %145, i64 %147
  %149 = load i8, ptr %148, align 1, !tbaa !28
  %150 = zext i8 %149 to i32
  %151 = icmp ne i32 %144, %150
  br i1 %151, label %152, label %153

152:                                              ; preds = %138
  br label %159

153:                                              ; preds = %138
  br label %154

154:                                              ; preds = %153
  %155 = load i32, ptr %17, align 4, !tbaa !22
  %156 = add i32 %155, 1
  store i32 %156, ptr %17, align 4, !tbaa !22
  %157 = load i32, ptr %3, align 4, !tbaa !22
  %158 = icmp ne i32 %156, %157
  br i1 %158, label %138, label %159, !llvm.loop !29

159:                                              ; preds = %154, %152
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #3
  %160 = getelementptr inbounds i8, ptr %21, i64 16
  %161 = getelementptr inbounds %class.CLZInWindow, ptr %160, i32 0, i32 8
  %162 = load i32, ptr %161, align 4, !tbaa !9
  %163 = load i32, ptr %9, align 4, !tbaa !22
  %164 = sub i32 %162, %163
  store i32 %164, ptr %18, align 4, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #3
  %165 = load i32, ptr %18, align 4, !tbaa !22
  %166 = getelementptr inbounds %"class.NBT3::CMatchFinderBinTree", ptr %21, i32 0, i32 4
  %167 = load i32, ptr %166, align 4, !tbaa !26
  %168 = icmp ule i32 %165, %167
  br i1 %168, label %169, label %174

169:                                              ; preds = %159
  %170 = getelementptr inbounds %"class.NBT3::CMatchFinderBinTree", ptr %21, i32 0, i32 4
  %171 = load i32, ptr %170, align 4, !tbaa !26
  %172 = load i32, ptr %18, align 4, !tbaa !22
  %173 = sub i32 %171, %172
  br label %182

174:                                              ; preds = %159
  %175 = getelementptr inbounds %"class.NBT3::CMatchFinderBinTree", ptr %21, i32 0, i32 4
  %176 = load i32, ptr %175, align 4, !tbaa !26
  %177 = load i32, ptr %18, align 4, !tbaa !22
  %178 = sub i32 %176, %177
  %179 = getelementptr inbounds %"class.NBT3::CMatchFinderBinTree", ptr %21, i32 0, i32 5
  %180 = load i32, ptr %179, align 8, !tbaa !23
  %181 = add i32 %178, %180
  br label %182

182:                                              ; preds = %174, %169
  %183 = phi i32 [ %173, %169 ], [ %181, %174 ]
  store i32 %183, ptr %19, align 4, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #3
  %184 = load ptr, ptr %10, align 8, !tbaa !5
  %185 = load i32, ptr %19, align 4, !tbaa !22
  %186 = shl i32 %185, 1
  %187 = zext i32 %186 to i64
  %188 = getelementptr inbounds i32, ptr %184, i64 %187
  store ptr %188, ptr %20, align 8, !tbaa !5
  %189 = load i32, ptr %17, align 4, !tbaa !22
  %190 = load i32, ptr %3, align 4, !tbaa !22
  %191 = icmp ne i32 %189, %190
  br i1 %191, label %192, label %222

192:                                              ; preds = %182
  %193 = load ptr, ptr %16, align 8, !tbaa !5
  %194 = load i32, ptr %17, align 4, !tbaa !22
  %195 = zext i32 %194 to i64
  %196 = getelementptr inbounds i8, ptr %193, i64 %195
  %197 = load i8, ptr %196, align 1, !tbaa !28
  %198 = zext i8 %197 to i32
  %199 = load ptr, ptr %6, align 8, !tbaa !5
  %200 = load i32, ptr %17, align 4, !tbaa !22
  %201 = zext i32 %200 to i64
  %202 = getelementptr inbounds i8, ptr %199, i64 %201
  %203 = load i8, ptr %202, align 1, !tbaa !28
  %204 = zext i8 %203 to i32
  %205 = icmp slt i32 %198, %204
  br i1 %205, label %206, label %214

206:                                              ; preds = %192
  %207 = load i32, ptr %9, align 4, !tbaa !22
  %208 = load ptr, ptr %12, align 8, !tbaa !5
  store i32 %207, ptr %208, align 4, !tbaa !22
  %209 = load ptr, ptr %20, align 8, !tbaa !5
  %210 = getelementptr inbounds i32, ptr %209, i64 1
  store ptr %210, ptr %12, align 8, !tbaa !5
  %211 = load ptr, ptr %12, align 8, !tbaa !5
  %212 = load i32, ptr %211, align 4, !tbaa !22
  store i32 %212, ptr %9, align 4, !tbaa !22
  %213 = load i32, ptr %17, align 4, !tbaa !22
  store i32 %213, ptr %14, align 4, !tbaa !22
  br label %221

214:                                              ; preds = %192
  %215 = load i32, ptr %9, align 4, !tbaa !22
  %216 = load ptr, ptr %11, align 8, !tbaa !5
  store i32 %215, ptr %216, align 4, !tbaa !22
  %217 = load ptr, ptr %20, align 8, !tbaa !5
  store ptr %217, ptr %11, align 8, !tbaa !5
  %218 = load ptr, ptr %11, align 8, !tbaa !5
  %219 = load i32, ptr %218, align 4, !tbaa !22
  store i32 %219, ptr %9, align 4, !tbaa !22
  %220 = load i32, ptr %17, align 4, !tbaa !22
  store i32 %220, ptr %13, align 4, !tbaa !22
  br label %221

221:                                              ; preds = %214, %206
  br label %231

222:                                              ; preds = %182
  %223 = load ptr, ptr %20, align 8, !tbaa !5
  %224 = getelementptr inbounds i32, ptr %223, i64 0
  %225 = load i32, ptr %224, align 4, !tbaa !22
  %226 = load ptr, ptr %12, align 8, !tbaa !5
  store i32 %225, ptr %226, align 4, !tbaa !22
  %227 = load ptr, ptr %20, align 8, !tbaa !5
  %228 = getelementptr inbounds i32, ptr %227, i64 1
  %229 = load i32, ptr %228, align 4, !tbaa !22
  %230 = load ptr, ptr %11, align 8, !tbaa !5
  store i32 %229, ptr %230, align 4, !tbaa !22
  store i32 1, ptr %4, align 4
  br label %232

231:                                              ; preds = %221
  store i32 0, ptr %4, align 4
  br label %232

232:                                              ; preds = %231, %222
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  %233 = load i32, ptr %4, align 4
  switch i32 %233, label %236 [
    i32 0, label %234
  ]

234:                                              ; preds = %232
  br label %118, !llvm.loop !31

235:                                              ; preds = %127
  store i32 0, ptr %4, align 4
  br label %236

236:                                              ; preds = %235, %232
  call void @llvm.lifetime.end.p0(i64 4, 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
  %237 = load i32, ptr %4, align 4
  switch i32 %237, label %242 [
    i32 0, label %238
  ]

238:                                              ; preds = %236
  br label %239

239:                                              ; preds = %238, %62
  %240 = load ptr, ptr %11, align 8, !tbaa !5
  store i32 0, ptr %240, align 4, !tbaa !22
  %241 = load ptr, ptr %12, align 8, !tbaa !5
  store i32 0, ptr %241, align 4, !tbaa !22
  store i32 0, ptr %4, align 4
  br label %242

242:                                              ; preds = %239, %236
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #3
  br label %243

243:                                              ; preds = %242, %45
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #3
  %244 = load i32, ptr %4, align 4
  switch i32 %244, label %246 [
    i32 0, label %245
    i32 1, label %245
  ]

245:                                              ; preds = %243, %243
  ret void

246:                                              ; preds = %243
  unreachable
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { inlinehint 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, !11, i64 52}
!10 = !{!"_ZTS11CLZInWindow", !6, i64 8, !6, i64 16, !11, i64 24, !12, i64 28, !6, i64 32, !6, i64 40, !11, i64 48, !11, i64 52, !11, i64 56, !11, i64 60, !11, i64 64, !11, i64 68}
!11 = !{!"int", !7, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!14, !11, i64 100}
!14 = !{!"_ZTSN4NBT319CMatchFinderBinTreeE", !15, i64 0, !18, i64 8, !10, i64 16, !19, i64 88, !11, i64 92, !11, i64 96, !11, i64 100, !6, i64 104, !11, i64 112, !20, i64 120}
!15 = !{!"_ZTS12IMatchFinder", !16, i64 0}
!16 = !{!"_ZTS15IInWindowStream", !17, i64 0}
!17 = !{!"_ZTS8IUnknown"}
!18 = !{!"_ZTS23IMatchFinderSetCallback", !17, i64 0}
!19 = !{!"_ZTS13CMyUnknownImp", !11, i64 0}
!20 = !{!"_ZTS9CMyComPtrI20IMatchFinderCallbackE", !6, i64 0}
!21 = !{!10, !11, i64 68}
!22 = !{!11, !11, i64 0}
!23 = !{!14, !11, i64 96}
!24 = !{!10, !6, i64 40}
!25 = !{!14, !6, i64 104}
!26 = !{!14, !11, i64 92}
!27 = !{!14, !11, i64 112}
!28 = !{!7, !7, i64 0}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.mustprogress"}
!31 = distinct !{!31, !30}


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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z5MyMinIjET_S0_S0_(i32 noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN4NBT34HashEPKhRj(ptr noundef, ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN4NBT319CMatchFinderBinTree17DummyLongestMatchEv(ptr nocapture noundef nonnull readonly align 8 dereferenceable(128) %0) unnamed_addr #2 align 2 {
  %2 = alloca i32, align 4
  %3 = getelementptr inbounds i8, ptr %0, i64 68
  %4 = load i32, ptr %3, align 4, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %0, i64 100
  %6 = load i32, ptr %5, align 4, !tbaa !12
  %7 = add i32 %6, %4
  %8 = getelementptr inbounds i8, ptr %0, i64 84
  %9 = load i32, ptr %8, align 4, !tbaa !20
  %.not = icmp ugt i32 %7, %9
  br i1 %.not, label %10, label %13

10:                                               ; preds = %1
  %11 = sub i32 %9, %4
  %12 = icmp ult i32 %11, 3
  br i1 %12, label %82, label %13

13:                                               ; preds = %1, %10
  %.0 = phi i32 [ %11, %10 ], [ %6, %1 ]
  %14 = getelementptr inbounds i8, ptr %0, i64 96
  %15 = load i32, ptr %14, align 8, !tbaa !21
  %spec.select = tail call i32 @llvm.usub.sat.i32(i32 %4, i32 %15)
  %16 = getelementptr inbounds i8, ptr %0, i64 56
  %17 = load ptr, ptr %16, align 8, !tbaa !22
  %18 = zext i32 %4 to i64
  %19 = getelementptr inbounds i8, ptr %17, i64 %18
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #4
  %20 = call noundef i32 @_ZN4NBT34HashEPKhRj(ptr noundef %19, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %21 = load i32, ptr %3, align 4, !tbaa !5
  %22 = getelementptr inbounds i8, ptr %0, i64 104
  %23 = load ptr, ptr %22, align 8, !tbaa !23
  %24 = load i32, ptr %2, align 4, !tbaa !24
  %25 = add i32 %24, 16777216
  %26 = zext i32 %25 to i64
  %27 = getelementptr inbounds i32, ptr %23, i64 %26
  store i32 %21, ptr %27, align 4, !tbaa !24
  %28 = zext i32 %20 to i64
  %29 = getelementptr inbounds i32, ptr %23, i64 %28
  %30 = load i32, ptr %29, align 4, !tbaa !24
  store i32 %21, ptr %29, align 4, !tbaa !24
  %31 = getelementptr inbounds i8, ptr %23, i64 67112960
  %32 = getelementptr inbounds i8, ptr %0, i64 92
  %33 = load i32, ptr %32, align 4, !tbaa !25
  %34 = shl i32 %33, 1
  %35 = zext i32 %34 to i64
  %36 = getelementptr inbounds i32, ptr %31, i64 %35
  %37 = getelementptr inbounds i8, ptr %36, i64 4
  %.not80 = icmp ne i32 %.0, 3
  %.not8197 = icmp ugt i32 %30, %spec.select
  %or.cond = select i1 %.not80, i1 %.not8197, i1 false
  br i1 %or.cond, label %.lr.ph.preheader, label %.thread91

.lr.ph.preheader:                                 ; preds = %13
  %38 = getelementptr inbounds i8, ptr %0, i64 112
  %39 = load i32, ptr %38, align 8
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %76
  %.051103 = phi i32 [ %.152, %76 ], [ %30, %.lr.ph.preheader ]
  %.055102 = phi ptr [ %.156, %76 ], [ %37, %.lr.ph.preheader ]
  %.058101 = phi i32 [ %40, %76 ], [ %39, %.lr.ph.preheader ]
  %.059100 = phi i32 [ %.160, %76 ], [ 3, %.lr.ph.preheader ]
  %.06299 = phi i32 [ %.163, %76 ], [ 3, %.lr.ph.preheader ]
  %.06598 = phi ptr [ %.166, %76 ], [ %36, %.lr.ph.preheader ]
  %40 = add i32 %.058101, -1
  %41 = icmp eq i32 %.058101, 0
  br i1 %41, label %.thread91, label %42

42:                                               ; preds = %.lr.ph
  %43 = load ptr, ptr %16, align 8, !tbaa !22
  %44 = zext i32 %.051103 to i64
  %45 = getelementptr inbounds i8, ptr %43, i64 %44
  %46 = call noundef i32 @_Z5MyMinIjET_S0_S0_(i32 noundef %.06299, i32 noundef %.059100)
  br label %47

47:                                               ; preds = %53, %42
  %.053 = phi i32 [ %46, %42 ], [ %54, %53 ]
  %48 = zext i32 %.053 to i64
  %49 = getelementptr inbounds i8, ptr %45, i64 %48
  %50 = load i8, ptr %49, align 1, !tbaa !26
  %51 = getelementptr inbounds i8, ptr %19, i64 %48
  %52 = load i8, ptr %51, align 1, !tbaa !26
  %.not82 = icmp eq i8 %50, %52
  br i1 %.not82, label %53, label %55

53:                                               ; preds = %47
  %54 = add i32 %.053, 1
  %.not83 = icmp eq i32 %54, %.0
  br i1 %.not83, label %55, label %47, !llvm.loop !27

55:                                               ; preds = %47, %53
  %.154 = phi i32 [ %.053, %47 ], [ %.0, %53 ]
  %56 = load i32, ptr %3, align 4, !tbaa !5
  %57 = sub i32 %56, %.051103
  %58 = load i32, ptr %32, align 4, !tbaa !25
  %.not84 = icmp ugt i32 %57, %58
  %59 = sub i32 %58, %57
  %60 = load i32, ptr %14, align 8
  %61 = select i1 %.not84, i32 %60, i32 0
  %62 = add i32 %59, %61
  %63 = shl i32 %62, 1
  %64 = zext i32 %63 to i64
  %65 = getelementptr inbounds i32, ptr %31, i64 %64
  %.not85.not = icmp eq i32 %.154, %.0
  br i1 %.not85.not, label %77, label %66

66:                                               ; preds = %55
  %67 = zext i32 %.154 to i64
  %68 = getelementptr inbounds i8, ptr %45, i64 %67
  %69 = load i8, ptr %68, align 1, !tbaa !26
  %70 = getelementptr inbounds i8, ptr %19, i64 %67
  %71 = load i8, ptr %70, align 1, !tbaa !26
  %72 = icmp ult i8 %69, %71
  br i1 %72, label %73, label %75

73:                                               ; preds = %66
  store i32 %.051103, ptr %.06598, align 4, !tbaa !24
  %74 = getelementptr inbounds i8, ptr %65, i64 4
  br label %76

75:                                               ; preds = %66
  store i32 %.051103, ptr %.055102, align 4, !tbaa !24
  br label %76

76:                                               ; preds = %75, %73
  %.166 = phi ptr [ %74, %73 ], [ %.06598, %75 ]
  %.163 = phi i32 [ %.06299, %73 ], [ %.154, %75 ]
  %.160 = phi i32 [ %.154, %73 ], [ %.059100, %75 ]
  %.156 = phi ptr [ %.055102, %73 ], [ %65, %75 ]
  %.152.in = phi ptr [ %74, %73 ], [ %65, %75 ]
  %.152 = load i32, ptr %.152.in, align 4, !tbaa !24
  %.not81 = icmp ugt i32 %.152, %spec.select
  br i1 %.not81, label %.lr.ph, label %.thread91

77:                                               ; preds = %55
  %78 = load i32, ptr %65, align 4, !tbaa !24
  store i32 %78, ptr %.06598, align 4, !tbaa !24
  %79 = getelementptr inbounds i8, ptr %65, i64 4
  %80 = load i32, ptr %79, align 4, !tbaa !24
  store i32 %80, ptr %.055102, align 4, !tbaa !24
  br label %81

.thread91:                                        ; preds = %76, %.lr.ph, %13
  %.469 = phi ptr [ %36, %13 ], [ %.166, %76 ], [ %.06598, %.lr.ph ]
  %.4 = phi ptr [ %37, %13 ], [ %.156, %76 ], [ %.055102, %.lr.ph ]
  store i32 0, ptr %.4, align 4, !tbaa !24
  store i32 0, ptr %.469, align 4, !tbaa !24
  br label %81

81:                                               ; preds = %77, %.thread91
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #4
  br label %82

82:                                               ; preds = %10, %81
  ret void
}

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { inlinehint 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 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 #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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, !10, i64 52}
!6 = !{!"_ZTS11CLZInWindow", !7, i64 8, !7, i64 16, !10, i64 24, !11, i64 28, !7, i64 32, !7, i64 40, !10, i64 48, !10, i64 52, !10, i64 56, !10, i64 60, !10, i64 64, !10, i64 68}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"bool", !8, i64 0}
!12 = !{!13, !10, i64 100}
!13 = !{!"_ZTSN4NBT319CMatchFinderBinTreeE", !14, i64 0, !17, i64 8, !6, i64 16, !18, i64 88, !10, i64 92, !10, i64 96, !10, i64 100, !7, i64 104, !10, i64 112, !19, i64 120}
!14 = !{!"_ZTS12IMatchFinder", !15, i64 0}
!15 = !{!"_ZTS15IInWindowStream", !16, i64 0}
!16 = !{!"_ZTS8IUnknown"}
!17 = !{!"_ZTS23IMatchFinderSetCallback", !16, i64 0}
!18 = !{!"_ZTS13CMyUnknownImp", !10, i64 0}
!19 = !{!"_ZTS9CMyComPtrI20IMatchFinderCallbackE", !7, i64 0}
!20 = !{!6, !10, i64 68}
!21 = !{!13, !10, i64 96}
!22 = !{!6, !7, i64 40}
!23 = !{!13, !7, i64 104}
!24 = !{!10, !10, i64 0}
!25 = !{!13, !10, i64 92}
!26 = !{!8, !8, i64 0}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}


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