; LLVM IR from alekmaul/pvsneslib :: tools/gfx4snes/src (lz77)

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

@textsize = external dso_local global i32, align 4
@text_buf = external dso_local global [4113 x i8], align 16
@match_length = external dso_local global i32, align 4
@match_position = external dso_local global i32, align 4
@InOffset = external dso_local global i32, align 4
@InSize = external dso_local global i32, align 4
@OutSize = external dso_local global i32, align 4
@.str = external hidden unnamed_addr constant [25 x i8], align 1
@codesize = external hidden global i32, align 4
@.str.1 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [56 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @InitTree() #0

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @InsertNode(i32 noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local void @DeleteNode(i32 noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @InChar(ptr noundef) #0

; Function Attrs: nounwind uwtable
define dso_local i32 @Convert2PicLZ77(ptr noundef %0, i32 noundef %1, ptr noundef %2, i32 noundef %3) #0 {
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca [17 x i8], align 16
  %18 = alloca i16, align 2
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store i32 %1, ptr %7, align 4, !tbaa !9
  store ptr %2, ptr %8, align 8, !tbaa !5
  store i32 %3, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #3
  call void @llvm.lifetime.start.p0(i64 17, ptr %17) #3
  call void @llvm.lifetime.start.p0(i64 2, ptr %18) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #3
  %23 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %23, ptr @InSize, align 4, !tbaa !9
  store i32 4, ptr @OutSize, align 4, !tbaa !9
  store i32 0, ptr @InOffset, align 4, !tbaa !9
  store i32 4078, ptr %20, align 4, !tbaa !9
  store i32 4078, ptr @match_position, align 4, !tbaa !9
  call void @InitTree()
  %24 = getelementptr inbounds [17 x i8], ptr %17, i64 0, i64 0
  store i8 0, ptr %24, align 16, !tbaa !11
  store i32 1, ptr %16, align 4, !tbaa !9
  store i32 0, ptr %14, align 4, !tbaa !9
  store i32 4078, ptr %13, align 4, !tbaa !9
  %25 = load i32, ptr %14, align 4, !tbaa !9
  store i32 %25, ptr %10, align 4, !tbaa !9
  br label %26

26:                                               ; preds = %34, %4
  %27 = load i32, ptr %10, align 4, !tbaa !9
  %28 = load i32, ptr %13, align 4, !tbaa !9
  %29 = icmp slt i32 %27, %28
  br i1 %29, label %30, label %37

30:                                               ; preds = %26
  %31 = load i32, ptr %10, align 4, !tbaa !9
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds [4113 x i8], ptr @text_buf, i64 0, i64 %32
  store i8 0, ptr %33, align 1, !tbaa !11
  br label %34

34:                                               ; preds = %30
  %35 = load i32, ptr %10, align 4, !tbaa !9
  %36 = add nsw i32 %35, 1
  store i32 %36, ptr %10, align 4, !tbaa !9
  br label %26, !llvm.loop !12

37:                                               ; preds = %26
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %38

38:                                               ; preds = %55, %37
  %39 = load i32, ptr %12, align 4, !tbaa !9
  %40 = icmp slt i32 %39, 18
  br i1 %40, label %41, label %45

41:                                               ; preds = %38
  %42 = load ptr, ptr %6, align 8, !tbaa !5
  %43 = call i32 @InChar(ptr noundef %42)
  store i32 %43, ptr %11, align 4, !tbaa !9
  %44 = icmp ne i32 %43, -1
  br label %45

45:                                               ; preds = %41, %38
  %46 = phi i1 [ false, %38 ], [ %44, %41 ]
  br i1 %46, label %47, label %58

47:                                               ; preds = %45
  %48 = load i32, ptr %11, align 4, !tbaa !9
  %49 = trunc i32 %48 to i8
  %50 = load i32, ptr %13, align 4, !tbaa !9
  %51 = load i32, ptr %12, align 4, !tbaa !9
  %52 = add nsw i32 %50, %51
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [4113 x i8], ptr @text_buf, i64 0, i64 %53
  store i8 %49, ptr %54, align 1, !tbaa !11
  br label %55

55:                                               ; preds = %47
  %56 = load i32, ptr %12, align 4, !tbaa !9
  %57 = add nsw i32 %56, 1
  store i32 %57, ptr %12, align 4, !tbaa !9
  br label %38, !llvm.loop !14

58:                                               ; preds = %45
  %59 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %59, ptr @textsize, align 4, !tbaa !9
  %60 = icmp eq i32 %59, 0
  br i1 %60, label %61, label %62

61:                                               ; preds = %58
  call void (ptr, ...) @errorcontinue(ptr noundef @.str)
  store i32 0, ptr %5, align 4
  store i32 1, ptr %22, align 4
  br label %289

62:                                               ; preds = %58
  %63 = load i32, ptr %13, align 4, !tbaa !9
  call void @InsertNode(i32 noundef %63)
  store i16 128, ptr %18, align 2, !tbaa !15
  br label %64

64:                                               ; preds = %213, %62
  %65 = load i32, ptr @match_length, align 4, !tbaa !9
  %66 = load i32, ptr %12, align 4, !tbaa !9
  %67 = icmp sgt i32 %65, %66
  br i1 %67, label %68, label %70

68:                                               ; preds = %64
  %69 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %69, ptr @match_length, align 4, !tbaa !9
  br label %70

70:                                               ; preds = %68, %64
  %71 = load i32, ptr @match_length, align 4, !tbaa !9
  %72 = icmp sle i32 %71, 2
  br i1 %72, label %73, label %82

73:                                               ; preds = %70
  store i32 1, ptr @match_length, align 4, !tbaa !9
  %74 = load i32, ptr %13, align 4, !tbaa !9
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [4113 x i8], ptr @text_buf, i64 0, i64 %75
  %77 = load i8, ptr %76, align 1, !tbaa !11
  %78 = load i32, ptr %16, align 4, !tbaa !9
  %79 = add nsw i32 %78, 1
  store i32 %79, ptr %16, align 4, !tbaa !9
  %80 = sext i32 %78 to i64
  %81 = getelementptr inbounds [17 x i8], ptr %17, i64 0, i64 %80
  store i8 %77, ptr %81, align 1, !tbaa !11
  br label %115

82:                                               ; preds = %70
  %83 = load i16, ptr %18, align 2, !tbaa !15
  %84 = zext i16 %83 to i32
  %85 = getelementptr inbounds [17 x i8], ptr %17, i64 0, i64 0
  %86 = load i8, ptr %85, align 16, !tbaa !11
  %87 = zext i8 %86 to i32
  %88 = or i32 %87, %84
  %89 = trunc i32 %88 to i8
  store i8 %89, ptr %85, align 16, !tbaa !11
  %90 = load i32, ptr %20, align 4, !tbaa !9
  %91 = load i32, ptr @match_position, align 4, !tbaa !9
  %92 = sub i32 %90, %91
  %93 = and i32 %92, 4095
  %94 = sub i32 %93, 1
  store i32 %94, ptr %21, align 4, !tbaa !9
  %95 = load i32, ptr %21, align 4, !tbaa !9
  %96 = lshr i32 %95, 8
  %97 = and i32 %96, 15
  %98 = trunc i32 %97 to i8
  %99 = zext i8 %98 to i32
  %100 = load i32, ptr @match_length, align 4, !tbaa !9
  %101 = sub nsw i32 %100, 3
  %102 = shl i32 %101, 4
  %103 = or i32 %99, %102
  %104 = trunc i32 %103 to i8
  %105 = load i32, ptr %16, align 4, !tbaa !9
  %106 = add nsw i32 %105, 1
  store i32 %106, ptr %16, align 4, !tbaa !9
  %107 = sext i32 %105 to i64
  %108 = getelementptr inbounds [17 x i8], ptr %17, i64 0, i64 %107
  store i8 %104, ptr %108, align 1, !tbaa !11
  %109 = load i32, ptr %21, align 4, !tbaa !9
  %110 = trunc i32 %109 to i8
  %111 = load i32, ptr %16, align 4, !tbaa !9
  %112 = add nsw i32 %111, 1
  store i32 %112, ptr %16, align 4, !tbaa !9
  %113 = sext i32 %111 to i64
  %114 = getelementptr inbounds [17 x i8], ptr %17, i64 0, i64 %113
  store i8 %110, ptr %114, align 1, !tbaa !11
  br label %115

115:                                              ; preds = %82, %73
  %116 = load i32, ptr @match_length, align 4, !tbaa !9
  %117 = load i32, ptr %20, align 4, !tbaa !9
  %118 = add i32 %117, %116
  store i32 %118, ptr %20, align 4, !tbaa !9
  %119 = load i32, ptr %20, align 4, !tbaa !9
  %120 = and i32 %119, 4095
  store i32 %120, ptr %20, align 4, !tbaa !9
  %121 = load i16, ptr %18, align 2, !tbaa !15
  %122 = zext i16 %121 to i32
  %123 = ashr i32 %122, 1
  %124 = trunc i32 %123 to i16
  store i16 %124, ptr %18, align 2, !tbaa !15
  %125 = zext i16 %124 to i32
  %126 = icmp eq i32 %125, 0
  br i1 %126, label %127, label %150

127:                                              ; preds = %115
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %128

128:                                              ; preds = %142, %127
  %129 = load i32, ptr %10, align 4, !tbaa !9
  %130 = load i32, ptr %16, align 4, !tbaa !9
  %131 = icmp slt i32 %129, %130
  br i1 %131, label %132, label %145

132:                                              ; preds = %128
  %133 = load i32, ptr %10, align 4, !tbaa !9
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds [17 x i8], ptr %17, i64 0, i64 %134
  %136 = load i8, ptr %135, align 1, !tbaa !11
  %137 = load ptr, ptr %8, align 8, !tbaa !5
  %138 = load i32, ptr @OutSize, align 4, !tbaa !9
  %139 = add nsw i32 %138, 1
  store i32 %139, ptr @OutSize, align 4, !tbaa !9
  %140 = sext i32 %138 to i64
  %141 = getelementptr inbounds i8, ptr %137, i64 %140
  store i8 %136, ptr %141, align 1, !tbaa !11
  br label %142

142:                                              ; preds = %132
  %143 = load i32, ptr %10, align 4, !tbaa !9
  %144 = add nsw i32 %143, 1
  store i32 %144, ptr %10, align 4, !tbaa !9
  br label %128, !llvm.loop !17

145:                                              ; preds = %128
  %146 = load i32, ptr %16, align 4, !tbaa !9
  %147 = load i32, ptr @codesize, align 4, !tbaa !9
  %148 = add i32 %147, %146
  store i32 %148, ptr @codesize, align 4, !tbaa !9
  %149 = getelementptr inbounds [17 x i8], ptr %17, i64 0, i64 0
  store i8 0, ptr %149, align 16, !tbaa !11
  store i32 1, ptr %16, align 4, !tbaa !9
  store i16 128, ptr %18, align 2, !tbaa !15
  br label %150

150:                                              ; preds = %145, %115
  %151 = load i32, ptr @match_length, align 4, !tbaa !9
  store i32 %151, ptr %15, align 4, !tbaa !9
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %152

152:                                              ; preds = %186, %150
  %153 = load i32, ptr %10, align 4, !tbaa !9
  %154 = load i32, ptr %15, align 4, !tbaa !9
  %155 = icmp slt i32 %153, %154
  br i1 %155, label %156, label %160

156:                                              ; preds = %152
  %157 = load ptr, ptr %6, align 8, !tbaa !5
  %158 = call i32 @InChar(ptr noundef %157)
  store i32 %158, ptr %11, align 4, !tbaa !9
  %159 = icmp ne i32 %158, -1
  br label %160

160:                                              ; preds = %156, %152
  %161 = phi i1 [ false, %152 ], [ %159, %156 ]
  br i1 %161, label %162, label %189

162:                                              ; preds = %160
  %163 = load i32, ptr %14, align 4, !tbaa !9
  call void @DeleteNode(i32 noundef %163)
  %164 = load i32, ptr %11, align 4, !tbaa !9
  %165 = trunc i32 %164 to i8
  %166 = load i32, ptr %14, align 4, !tbaa !9
  %167 = sext i32 %166 to i64
  %168 = getelementptr inbounds [4113 x i8], ptr @text_buf, i64 0, i64 %167
  store i8 %165, ptr %168, align 1, !tbaa !11
  %169 = load i32, ptr %14, align 4, !tbaa !9
  %170 = icmp slt i32 %169, 17
  br i1 %170, label %171, label %178

171:                                              ; preds = %162
  %172 = load i32, ptr %11, align 4, !tbaa !9
  %173 = trunc i32 %172 to i8
  %174 = load i32, ptr %14, align 4, !tbaa !9
  %175 = add nsw i32 %174, 4096
  %176 = sext i32 %175 to i64
  %177 = getelementptr inbounds [4113 x i8], ptr @text_buf, i64 0, i64 %176
  store i8 %173, ptr %177, align 1, !tbaa !11
  br label %178

178:                                              ; preds = %171, %162
  %179 = load i32, ptr %14, align 4, !tbaa !9
  %180 = add nsw i32 %179, 1
  %181 = and i32 %180, 4095
  store i32 %181, ptr %14, align 4, !tbaa !9
  %182 = load i32, ptr %13, align 4, !tbaa !9
  %183 = add nsw i32 %182, 1
  %184 = and i32 %183, 4095
  store i32 %184, ptr %13, align 4, !tbaa !9
  %185 = load i32, ptr %13, align 4, !tbaa !9
  call void @InsertNode(i32 noundef %185)
  br label %186

186:                                              ; preds = %178
  %187 = load i32, ptr %10, align 4, !tbaa !9
  %188 = add nsw i32 %187, 1
  store i32 %188, ptr %10, align 4, !tbaa !9
  br label %152, !llvm.loop !18

189:                                              ; preds = %160
  %190 = load i32, ptr %10, align 4, !tbaa !9
  %191 = load i32, ptr @textsize, align 4, !tbaa !9
  %192 = add i32 %191, %190
  store i32 %192, ptr @textsize, align 4, !tbaa !9
  br label %193

193:                                              ; preds = %211, %189
  %194 = load i32, ptr %10, align 4, !tbaa !9
  %195 = add nsw i32 %194, 1
  store i32 %195, ptr %10, align 4, !tbaa !9
  %196 = load i32, ptr %15, align 4, !tbaa !9
  %197 = icmp slt i32 %194, %196
  br i1 %197, label %198, label %212

198:                                              ; preds = %193
  %199 = load i32, ptr %14, align 4, !tbaa !9
  call void @DeleteNode(i32 noundef %199)
  %200 = load i32, ptr %14, align 4, !tbaa !9
  %201 = add nsw i32 %200, 1
  %202 = and i32 %201, 4095
  store i32 %202, ptr %14, align 4, !tbaa !9
  %203 = load i32, ptr %13, align 4, !tbaa !9
  %204 = add nsw i32 %203, 1
  %205 = and i32 %204, 4095
  store i32 %205, ptr %13, align 4, !tbaa !9
  %206 = load i32, ptr %12, align 4, !tbaa !9
  %207 = add nsw i32 %206, -1
  store i32 %207, ptr %12, align 4, !tbaa !9
  %208 = icmp ne i32 %207, 0
  br i1 %208, label %209, label %211

209:                                              ; preds = %198
  %210 = load i32, ptr %13, align 4, !tbaa !9
  call void @InsertNode(i32 noundef %210)
  br label %211

211:                                              ; preds = %209, %198
  br label %193, !llvm.loop !19

212:                                              ; preds = %193
  br label %213

213:                                              ; preds = %212
  %214 = load i32, ptr %12, align 4, !tbaa !9
  %215 = icmp sgt i32 %214, 0
  br i1 %215, label %64, label %216, !llvm.loop !20

216:                                              ; preds = %213
  %217 = load i32, ptr %16, align 4, !tbaa !9
  %218 = icmp sgt i32 %217, 1
  br i1 %218, label %219, label %241

219:                                              ; preds = %216
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %220

220:                                              ; preds = %234, %219
  %221 = load i32, ptr %10, align 4, !tbaa !9
  %222 = load i32, ptr %16, align 4, !tbaa !9
  %223 = icmp slt i32 %221, %222
  br i1 %223, label %224, label %237

224:                                              ; preds = %220
  %225 = load i32, ptr %10, align 4, !tbaa !9
  %226 = sext i32 %225 to i64
  %227 = getelementptr inbounds [17 x i8], ptr %17, i64 0, i64 %226
  %228 = load i8, ptr %227, align 1, !tbaa !11
  %229 = load ptr, ptr %8, align 8, !tbaa !5
  %230 = load i32, ptr @OutSize, align 4, !tbaa !9
  %231 = add nsw i32 %230, 1
  store i32 %231, ptr @OutSize, align 4, !tbaa !9
  %232 = sext i32 %230 to i64
  %233 = getelementptr inbounds i8, ptr %229, i64 %232
  store i8 %228, ptr %233, align 1, !tbaa !11
  br label %234

234:                                              ; preds = %224
  %235 = load i32, ptr %10, align 4, !tbaa !9
  %236 = add nsw i32 %235, 1
  store i32 %236, ptr %10, align 4, !tbaa !9
  br label %220, !llvm.loop !21

237:                                              ; preds = %220
  %238 = load i32, ptr %16, align 4, !tbaa !9
  %239 = load i32, ptr @codesize, align 4, !tbaa !9
  %240 = add i32 %239, %238
  store i32 %240, ptr @codesize, align 4, !tbaa !9
  br label %241

241:                                              ; preds = %237, %216
  %242 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %242, ptr %19, align 8, !tbaa !5
  %243 = load ptr, ptr %19, align 8, !tbaa !5
  %244 = getelementptr inbounds i8, ptr %243, i64 0
  store i8 16, ptr %244, align 1, !tbaa !11
  %245 = load i32, ptr @InSize, align 4, !tbaa !9
  %246 = ashr i32 %245, 0
  %247 = and i32 %246, 255
  %248 = trunc i32 %247 to i8
  %249 = load ptr, ptr %19, align 8, !tbaa !5
  %250 = getelementptr inbounds i8, ptr %249, i64 1
  store i8 %248, ptr %250, align 1, !tbaa !11
  %251 = load i32, ptr @InSize, align 4, !tbaa !9
  %252 = ashr i32 %251, 8
  %253 = and i32 %252, 255
  %254 = trunc i32 %253 to i8
  %255 = load ptr, ptr %19, align 8, !tbaa !5
  %256 = getelementptr inbounds i8, ptr %255, i64 2
  store i8 %254, ptr %256, align 1, !tbaa !11
  %257 = load i32, ptr @InSize, align 4, !tbaa !9
  %258 = ashr i32 %257, 16
  %259 = and i32 %258, 255
  %260 = trunc i32 %259 to i8
  %261 = load ptr, ptr %19, align 8, !tbaa !5
  %262 = getelementptr inbounds i8, ptr %261, i64 3
  store i8 %260, ptr %262, align 1, !tbaa !11
  %263 = load i32, ptr @textsize, align 4, !tbaa !9
  %264 = mul i32 %263, 100
  %265 = load i32, ptr @OutSize, align 4, !tbaa !9
  %266 = udiv i32 %264, %265
  %267 = icmp ult i32 %266, 100
  br i1 %267, label %268, label %273

268:                                              ; preds = %241
  %269 = load i32, ptr @textsize, align 4, !tbaa !9
  %270 = mul i32 %269, 100
  %271 = load i32, ptr @OutSize, align 4, !tbaa !9
  %272 = udiv i32 %270, %271
  call void (ptr, ...) @errorcontinue(ptr noundef @.str.1, i32 noundef %272)
  store i32 0, ptr %5, align 4
  store i32 1, ptr %22, align 4
  br label %289

273:                                              ; preds = %241
  %274 = load i32, ptr @OutSize, align 4, !tbaa !9
  %275 = add nsw i32 %274, 3
  %276 = and i32 %275, -4
  store i32 %276, ptr @OutSize, align 4, !tbaa !9
  %277 = load i32, ptr %9, align 4, !tbaa !9
  %278 = icmp ne i32 %277, 0
  br i1 %278, label %287, label %279

279:                                              ; preds = %273
  %280 = load i32, ptr @textsize, align 4, !tbaa !9
  %281 = load i32, ptr @OutSize, align 4, !tbaa !9
  %282 = load i32, ptr @textsize, align 4, !tbaa !9
  %283 = mul i32 %282, 100
  %284 = load i32, ptr @OutSize, align 4, !tbaa !9
  %285 = udiv i32 %283, %284
  %286 = sub i32 %285, 100
  call void (ptr, ...) @info(ptr noundef @.str.2, i32 noundef %280, i32 noundef %281, i32 noundef %286)
  br label %287

287:                                              ; preds = %279, %273
  %288 = load i32, ptr @OutSize, align 4, !tbaa !9
  store i32 %288, ptr %5, align 4
  store i32 1, ptr %22, align 4
  br label %289

289:                                              ; preds = %287, %268, %61
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 2, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 17, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #3
  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
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  %290 = load i32, ptr %5, align 4
  ret i32 %290
}

declare void @errorcontinue(ptr noundef, ...) #2

declare void @info(ptr noundef, ...) #2

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}
!15 = !{!16, !16, i64 0}
!16 = !{!"short", !7, i64 0}
!17 = distinct !{!17, !13}
!18 = distinct !{!18, !13}
!19 = distinct !{!19, !13}
!20 = distinct !{!20, !13}
!21 = distinct !{!21, !13}


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

@textsize = external dso_local local_unnamed_addr global i32, align 4
@text_buf = external dso_local local_unnamed_addr global [4113 x i8], align 16
@match_length = external dso_local local_unnamed_addr global i32, align 4
@match_position = external dso_local local_unnamed_addr global i32, align 4
@InOffset = external dso_local local_unnamed_addr global i32, align 4
@InSize = external dso_local local_unnamed_addr global i32, align 4
@OutSize = external dso_local local_unnamed_addr global i32, align 4
@.str = external hidden unnamed_addr constant [25 x i8], align 1
@codesize = external hidden local_unnamed_addr global i32, align 4
@.str.1 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [56 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @InitTree() local_unnamed_addr #0

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @InsertNode(i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local void @DeleteNode(i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @InChar(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local i32 @Convert2PicLZ77(ptr noundef %0, i32 noundef %1, ptr nocapture noundef writeonly %2, i32 noundef %3) local_unnamed_addr #0 {
.preheader93.preheader:
  %4 = alloca [17 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 17, ptr nonnull %4) #4
  store i32 %1, ptr @InSize, align 4, !tbaa !5
  store i32 4, ptr @OutSize, align 4, !tbaa !5
  store i32 0, ptr @InOffset, align 4, !tbaa !5
  store i32 4078, ptr @match_position, align 4, !tbaa !5
  tail call void @InitTree()
  store i8 0, ptr %4, align 16, !tbaa !9
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(4078) @text_buf, i8 0, i64 4078, i1 false), !tbaa !9
  %5 = tail call i32 @InChar(ptr noundef %0)
  %.not = icmp eq i32 %5, -1
  br i1 %.not, label %41, label %.preheader93.1

.preheader93.1:                                   ; preds = %.preheader93.preheader
  %6 = trunc i32 %5 to i8
  store i8 %6, ptr getelementptr inbounds (i8, ptr @text_buf, i64 4078), align 2, !tbaa !9
  %7 = tail call i32 @InChar(ptr noundef %0)
  %.not.1 = icmp eq i32 %7, -1
  br i1 %.not.1, label %.critedge.thread135, label %.preheader93.2

.preheader93.2:                                   ; preds = %.preheader93.1
  %8 = trunc i32 %7 to i8
  store i8 %8, ptr getelementptr inbounds (i8, ptr @text_buf, i64 4079), align 1, !tbaa !9
  %9 = tail call i32 @InChar(ptr noundef %0)
  %.not.2 = icmp eq i32 %9, -1
  br i1 %.not.2, label %.critedge.thread135, label %.preheader93.3

.preheader93.3:                                   ; preds = %.preheader93.2
  %10 = trunc i32 %9 to i8
  store i8 %10, ptr getelementptr inbounds (i8, ptr @text_buf, i64 4080), align 16, !tbaa !9
  %11 = tail call i32 @InChar(ptr noundef %0)
  %.not.3 = icmp eq i32 %11, -1
  br i1 %.not.3, label %.critedge.thread135, label %.preheader93.4

.preheader93.4:                                   ; preds = %.preheader93.3
  %12 = trunc i32 %11 to i8
  store i8 %12, ptr getelementptr inbounds (i8, ptr @text_buf, i64 4081), align 1, !tbaa !9
  %13 = tail call i32 @InChar(ptr noundef %0)
  %.not.4 = icmp eq i32 %13, -1
  br i1 %.not.4, label %.critedge.thread135, label %.preheader93.5

.preheader93.5:                                   ; preds = %.preheader93.4
  %14 = trunc i32 %13 to i8
  store i8 %14, ptr getelementptr inbounds (i8, ptr @text_buf, i64 4082), align 2, !tbaa !9
  %15 = tail call i32 @InChar(ptr noundef %0)
  %.not.5 = icmp eq i32 %15, -1
  br i1 %.not.5, label %.critedge.thread135, label %.preheader93.6

.preheader93.6:                                   ; preds = %.preheader93.5
  %16 = trunc i32 %15 to i8
  store i8 %16, ptr getelementptr inbounds (i8, ptr @text_buf, i64 4083), align 1, !tbaa !9
  %17 = tail call i32 @InChar(ptr noundef %0)
  %.not.6 = icmp eq i32 %17, -1
  br i1 %.not.6, label %.critedge.thread135, label %.preheader93.7

.preheader93.7:                                   ; preds = %.preheader93.6
  %18 = trunc i32 %17 to i8
  store i8 %18, ptr getelementptr inbounds (i8, ptr @text_buf, i64 4084), align 4, !tbaa !9
  %19 = tail call i32 @InChar(ptr noundef %0)
  %.not.7 = icmp eq i32 %19, -1
  br i1 %.not.7, label %.critedge.thread135, label %.preheader93.8

.preheader93.8:                                   ; preds = %.preheader93.7
  %20 = trunc i32 %19 to i8
  store i8 %20, ptr getelementptr inbounds (i8, ptr @text_buf, i64 4085), align 1, !tbaa !9
  %21 = tail call i32 @InChar(ptr noundef %0)
  %.not.8 = icmp eq i32 %21, -1
  br i1 %.not.8, label %.critedge.thread135, label %.preheader93.9

.preheader93.9:                                   ; preds = %.preheader93.8
  %22 = trunc i32 %21 to i8
  store i8 %22, ptr getelementptr inbounds (i8, ptr @text_buf, i64 4086), align 2, !tbaa !9
  %23 = tail call i32 @InChar(ptr noundef %0)
  %.not.9 = icmp eq i32 %23, -1
  br i1 %.not.9, label %.critedge.thread135, label %.preheader93.10

.preheader93.10:                                  ; preds = %.preheader93.9
  %24 = trunc i32 %23 to i8
  store i8 %24, ptr getelementptr inbounds (i8, ptr @text_buf, i64 4087), align 1, !tbaa !9
  %25 = tail call i32 @InChar(ptr noundef %0)
  %.not.10 = icmp eq i32 %25, -1
  br i1 %.not.10, label %.critedge.thread135, label %.preheader93.11

.preheader93.11:                                  ; preds = %.preheader93.10
  %26 = trunc i32 %25 to i8
  store i8 %26, ptr getelementptr inbounds (i8, ptr @text_buf, i64 4088), align 8, !tbaa !9
  %27 = tail call i32 @InChar(ptr noundef %0)
  %.not.11 = icmp eq i32 %27, -1
  br i1 %.not.11, label %.critedge.thread135, label %.preheader93.12

.preheader93.12:                                  ; preds = %.preheader93.11
  %28 = trunc i32 %27 to i8
  store i8 %28, ptr getelementptr inbounds (i8, ptr @text_buf, i64 4089), align 1, !tbaa !9
  %29 = tail call i32 @InChar(ptr noundef %0)
  %.not.12 = icmp eq i32 %29, -1
  br i1 %.not.12, label %.critedge.thread135, label %.preheader93.13

.preheader93.13:                                  ; preds = %.preheader93.12
  %30 = trunc i32 %29 to i8
  store i8 %30, ptr getelementptr inbounds (i8, ptr @text_buf, i64 4090), align 2, !tbaa !9
  %31 = tail call i32 @InChar(ptr noundef %0)
  %.not.13 = icmp eq i32 %31, -1
  br i1 %.not.13, label %.critedge.thread135, label %.preheader93.14

.preheader93.14:                                  ; preds = %.preheader93.13
  %32 = trunc i32 %31 to i8
  store i8 %32, ptr getelementptr inbounds (i8, ptr @text_buf, i64 4091), align 1, !tbaa !9
  %33 = tail call i32 @InChar(ptr noundef %0)
  %.not.14 = icmp eq i32 %33, -1
  br i1 %.not.14, label %.critedge.thread135, label %.preheader93.15

.preheader93.15:                                  ; preds = %.preheader93.14
  %34 = trunc i32 %33 to i8
  store i8 %34, ptr getelementptr inbounds (i8, ptr @text_buf, i64 4092), align 4, !tbaa !9
  %35 = tail call i32 @InChar(ptr noundef %0)
  %.not.15 = icmp eq i32 %35, -1
  br i1 %.not.15, label %.critedge.thread135, label %.preheader93.16

.preheader93.16:                                  ; preds = %.preheader93.15
  %36 = trunc i32 %35 to i8
  store i8 %36, ptr getelementptr inbounds (i8, ptr @text_buf, i64 4093), align 1, !tbaa !9
  %37 = tail call i32 @InChar(ptr noundef %0)
  %.not.16 = icmp eq i32 %37, -1
  br i1 %.not.16, label %.critedge.thread135, label %.preheader93.17

.preheader93.17:                                  ; preds = %.preheader93.16
  %38 = trunc i32 %37 to i8
  store i8 %38, ptr getelementptr inbounds (i8, ptr @text_buf, i64 4094), align 2, !tbaa !9
  %39 = tail call i32 @InChar(ptr noundef %0)
  %.not.17 = icmp eq i32 %39, -1
  br i1 %.not.17, label %.critedge.thread135, label %.critedge.thread

.critedge.thread:                                 ; preds = %.preheader93.17
  %40 = trunc i32 %39 to i8
  store i8 %40, ptr getelementptr inbounds (i8, ptr @text_buf, i64 4095), align 1, !tbaa !9
  br label %.critedge.thread135

41:                                               ; preds = %.preheader93.preheader
  store i32 0, ptr @textsize, align 4, !tbaa !5
  tail call void (ptr, ...) @errorcontinue(ptr noundef nonnull @.str) #4
  br label %185

.critedge.thread135:                              ; preds = %.preheader93.1, %.preheader93.2, %.preheader93.3, %.preheader93.4, %.preheader93.5, %.preheader93.6, %.preheader93.7, %.preheader93.8, %.preheader93.9, %.preheader93.10, %.preheader93.11, %.preheader93.12, %.preheader93.13, %.preheader93.14, %.preheader93.15, %.preheader93.16, %.preheader93.17, %.critedge.thread
  %.08397.lcssa.wide.ph.sink = phi i32 [ 18, %.critedge.thread ], [ 17, %.preheader93.17 ], [ 16, %.preheader93.16 ], [ 15, %.preheader93.15 ], [ 14, %.preheader93.14 ], [ 13, %.preheader93.13 ], [ 12, %.preheader93.12 ], [ 11, %.preheader93.11 ], [ 10, %.preheader93.10 ], [ 9, %.preheader93.9 ], [ 8, %.preheader93.8 ], [ 7, %.preheader93.7 ], [ 6, %.preheader93.6 ], [ 5, %.preheader93.5 ], [ 4, %.preheader93.4 ], [ 3, %.preheader93.3 ], [ 2, %.preheader93.2 ], [ 1, %.preheader93.1 ]
  store i32 %.08397.lcssa.wide.ph.sink, ptr @textsize, align 4, !tbaa !5
  tail call void @InsertNode(i32 noundef 4078)
  br label %42

42:                                               ; preds = %._crit_edge114, %.critedge.thread135
  %.184 = phi i32 [ %.08397.lcssa.wide.ph.sink, %.critedge.thread135 ], [ %.285.lcssa, %._crit_edge114 ]
  %.080 = phi i32 [ 4078, %.critedge.thread135 ], [ %.282.lcssa, %._crit_edge114 ]
  %.077 = phi i32 [ 0, %.critedge.thread135 ], [ %.279.lcssa, %._crit_edge114 ]
  %.074 = phi i32 [ 1, %.critedge.thread135 ], [ %.276139151, %._crit_edge114 ]
  %.072 = phi i16 [ 128, %.critedge.thread135 ], [ %.173141150, %._crit_edge114 ]
  %.070 = phi i32 [ 4078, %.critedge.thread135 ], [ %75, %._crit_edge114 ]
  %43 = load i32, ptr @match_length, align 4, !tbaa !5
  %44 = icmp sgt i32 %43, %.184
  br i1 %44, label %45, label %46

45:                                               ; preds = %42
  store i32 %.184, ptr @match_length, align 4, !tbaa !5
  br label %46

46:                                               ; preds = %45, %42
  %47 = phi i32 [ %.184, %45 ], [ %43, %42 ]
  %48 = icmp slt i32 %47, 3
  br i1 %48, label %49, label %53

49:                                               ; preds = %46
  store i32 1, ptr @match_length, align 4, !tbaa !5
  %50 = sext i32 %.080 to i64
  %51 = getelementptr inbounds [4113 x i8], ptr @text_buf, i64 0, i64 %50
  %52 = load i8, ptr %51, align 1, !tbaa !9
  br label %70

53:                                               ; preds = %46
  %54 = load i8, ptr %4, align 16, !tbaa !9
  %55 = trunc i16 %.072 to i8
  %56 = or i8 %54, %55
  store i8 %56, ptr %4, align 16, !tbaa !9
  %57 = load i32, ptr @match_position, align 4, !tbaa !5
  %58 = xor i32 %57, -1
  %59 = add i32 %.070, %58
  %60 = lshr i32 %59, 8
  %61 = and i32 %60, 15
  %62 = shl i32 %47, 4
  %63 = add i32 %62, 208
  %64 = or disjoint i32 %61, %63
  %65 = trunc i32 %64 to i8
  %66 = add nsw i32 %.074, 1
  %67 = sext i32 %.074 to i64
  %68 = getelementptr inbounds [17 x i8], ptr %4, i64 0, i64 %67
  store i8 %65, ptr %68, align 1, !tbaa !9
  %69 = trunc i32 %59 to i8
  br label %70

70:                                               ; preds = %53, %49
  %.sink161 = phi i32 [ 2, %53 ], [ 1, %49 ]
  %.sink160 = phi i32 [ %66, %53 ], [ %.074, %49 ]
  %.sink = phi i8 [ %69, %53 ], [ %52, %49 ]
  %71 = phi i32 [ %47, %53 ], [ 1, %49 ]
  %72 = add nsw i32 %.074, %.sink161
  %73 = sext i32 %.sink160 to i64
  %74 = getelementptr inbounds [17 x i8], ptr %4, i64 0, i64 %73
  store i8 %.sink, ptr %74, align 1, !tbaa !9
  %75 = add i32 %71, %.070
  %76 = lshr i16 %.072, 1
  %77 = icmp ult i16 %.072, 2
  br i1 %77, label %.preheader92, label %.lr.ph103.preheader

.preheader92:                                     ; preds = %70
  %78 = icmp sgt i32 %72, 0
  br i1 %78, label %.lr.ph.preheader, label %.thread143

.thread143:                                       ; preds = %.preheader92
  %79 = load i32, ptr @codesize, align 4, !tbaa !5
  %80 = add i32 %79, %72
  store i32 %80, ptr @codesize, align 4, !tbaa !5
  store i8 0, ptr %4, align 16, !tbaa !9
  br label %.lr.ph103.preheader

.lr.ph.preheader:                                 ; preds = %.preheader92
  %wide.trip.count = zext nneg i32 %72 to i64
  %xtraiter = and i64 %wide.trip.count, 1
  %81 = icmp eq i32 %72, 1
  br i1 %81, label %.unr-lcssa, label %.lr.ph.preheader.new

.lr.ph.preheader.new:                             ; preds = %.lr.ph.preheader
  %unroll_iter = and i64 %wide.trip.count, 2147483646
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph, %.lr.ph.preheader.new
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader.new ], [ %indvars.iv.next.1, %.lr.ph ]
  %niter = phi i64 [ 0, %.lr.ph.preheader.new ], [ %niter.next.1, %.lr.ph ]
  %82 = getelementptr inbounds [17 x i8], ptr %4, i64 0, i64 %indvars.iv
  %83 = load i8, ptr %82, align 2, !tbaa !9
  %84 = load i32, ptr @OutSize, align 4, !tbaa !5
  %85 = add nsw i32 %84, 1
  store i32 %85, ptr @OutSize, align 4, !tbaa !5
  %86 = sext i32 %84 to i64
  %87 = getelementptr inbounds i8, ptr %2, i64 %86
  store i8 %83, ptr %87, align 1, !tbaa !9
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %88 = getelementptr inbounds [17 x i8], ptr %4, i64 0, i64 %indvars.iv.next
  %89 = load i8, ptr %88, align 1, !tbaa !9
  %90 = load i32, ptr @OutSize, align 4, !tbaa !5
  %91 = add nsw i32 %90, 1
  store i32 %91, ptr @OutSize, align 4, !tbaa !5
  %92 = sext i32 %90 to i64
  %93 = getelementptr inbounds i8, ptr %2, i64 %92
  store i8 %89, ptr %93, align 1, !tbaa !9
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %.unr-lcssa, label %.lr.ph, !llvm.loop !10

.unr-lcssa:                                       ; preds = %.lr.ph, %.lr.ph.preheader
  %indvars.iv.unr = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next.1, %.lr.ph ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %100, label %.lr.ph.epil

.lr.ph.epil:                                      ; preds = %.unr-lcssa
  %94 = getelementptr inbounds [17 x i8], ptr %4, i64 0, i64 %indvars.iv.unr
  %95 = load i8, ptr %94, align 1, !tbaa !9
  %96 = load i32, ptr @OutSize, align 4, !tbaa !5
  %97 = add nsw i32 %96, 1
  store i32 %97, ptr @OutSize, align 4, !tbaa !5
  %98 = sext i32 %96 to i64
  %99 = getelementptr inbounds i8, ptr %2, i64 %98
  store i8 %95, ptr %99, align 1, !tbaa !9
  br label %100

100:                                              ; preds = %.unr-lcssa, %.lr.ph.epil
  %.pre.pre = load i32, ptr @match_length, align 4, !tbaa !5
  %101 = load i32, ptr @codesize, align 4, !tbaa !5
  %102 = add i32 %101, %72
  store i32 %102, ptr @codesize, align 4, !tbaa !5
  store i8 0, ptr %4, align 16, !tbaa !9
  %103 = icmp sgt i32 %.pre.pre, 0
  br i1 %103, label %.lr.ph103.preheader, label %.critedge2

.lr.ph103.preheader:                              ; preds = %70, %.thread143, %100
  %.173142 = phi i16 [ 128, %100 ], [ 128, %.thread143 ], [ %76, %70 ]
  %.276140 = phi i32 [ 1, %100 ], [ 1, %.thread143 ], [ %72, %70 ]
  %104 = phi i32 [ %.pre.pre, %100 ], [ %71, %.thread143 ], [ %71, %70 ]
  br label %.lr.ph103

.lr.ph103:                                        ; preds = %.lr.ph103.preheader, %115
  %.2101 = phi i32 [ %120, %115 ], [ 0, %.lr.ph103.preheader ]
  %.178100 = phi i32 [ %117, %115 ], [ %.077, %.lr.ph103.preheader ]
  %.18199 = phi i32 [ %119, %115 ], [ %.080, %.lr.ph103.preheader ]
  %105 = tail call i32 @InChar(ptr noundef %0)
  %.not89 = icmp eq i32 %105, -1
  br i1 %.not89, label %.critedge2, label %106

106:                                              ; preds = %.lr.ph103
  tail call void @DeleteNode(i32 noundef %.178100)
  %107 = trunc i32 %105 to i8
  %108 = sext i32 %.178100 to i64
  %109 = getelementptr inbounds [4113 x i8], ptr @text_buf, i64 0, i64 %108
  store i8 %107, ptr %109, align 1, !tbaa !9
  %110 = icmp slt i32 %.178100, 17
  br i1 %110, label %111, label %115

111:                                              ; preds = %106
  %112 = add nsw i32 %.178100, 4096
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds [4113 x i8], ptr @text_buf, i64 0, i64 %113
  store i8 %107, ptr %114, align 1, !tbaa !9
  br label %115

115:                                              ; preds = %111, %106
  %116 = add nsw i32 %.178100, 1
  %117 = and i32 %116, 4095
  %118 = add nsw i32 %.18199, 1
  %119 = and i32 %118, 4095
  tail call void @InsertNode(i32 noundef %119)
  %120 = add nuw nsw i32 %.2101, 1
  %exitcond126.not = icmp eq i32 %120, %104
  br i1 %exitcond126.not, label %.critedge2.thread, label %.lr.ph103, !llvm.loop !12

.critedge2.thread:                                ; preds = %115
  %121 = load i32, ptr @textsize, align 4, !tbaa !5
  %122 = add i32 %121, %104
  store i32 %122, ptr @textsize, align 4, !tbaa !5
  br label %._crit_edge114

.critedge2:                                       ; preds = %.lr.ph103, %100
  %.173141 = phi i16 [ 128, %100 ], [ %.173142, %.lr.ph103 ]
  %.276139 = phi i32 [ 1, %100 ], [ %.276140, %.lr.ph103 ]
  %123 = phi i32 [ %.pre.pre, %100 ], [ %104, %.lr.ph103 ]
  %.181.lcssa = phi i32 [ %.080, %100 ], [ %.18199, %.lr.ph103 ]
  %.178.lcssa = phi i32 [ %.077, %100 ], [ %.178100, %.lr.ph103 ]
  %.2.lcssa = phi i32 [ 0, %100 ], [ %.2101, %.lr.ph103 ]
  %124 = load i32, ptr @textsize, align 4, !tbaa !5
  %125 = add i32 %124, %.2.lcssa
  store i32 %125, ptr @textsize, align 4, !tbaa !5
  %126 = icmp slt i32 %.2.lcssa, %123
  br i1 %126, label %.lr.ph113.preheader, label %._crit_edge114

.lr.ph113.preheader:                              ; preds = %.critedge2
  %127 = add i32 %.184, %.2.lcssa
  br label %.lr.ph113

.lr.ph113:                                        ; preds = %.lr.ph113.preheader, %135
  %.in = phi i32 [ %128, %135 ], [ %.2.lcssa, %.lr.ph113.preheader ]
  %.279112 = phi i32 [ %130, %135 ], [ %.178.lcssa, %.lr.ph113.preheader ]
  %.282111 = phi i32 [ %132, %135 ], [ %.181.lcssa, %.lr.ph113.preheader ]
  %.285110 = phi i32 [ %133, %135 ], [ %.184, %.lr.ph113.preheader ]
  %128 = add nuw i32 %.in, 1
  tail call void @DeleteNode(i32 noundef %.279112)
  %129 = add nsw i32 %.279112, 1
  %130 = and i32 %129, 4095
  %131 = add nsw i32 %.282111, 1
  %132 = and i32 %131, 4095
  %133 = add nsw i32 %.285110, -1
  %.not91 = icmp eq i32 %133, 0
  br i1 %.not91, label %135, label %134

134:                                              ; preds = %.lr.ph113
  tail call void @InsertNode(i32 noundef %132)
  br label %135

135:                                              ; preds = %134, %.lr.ph113
  %exitcond127.not = icmp eq i32 %128, %123
  br i1 %exitcond127.not, label %._crit_edge114.loopexit, label %.lr.ph113, !llvm.loop !13

._crit_edge114.loopexit:                          ; preds = %135
  %136 = sub i32 %127, %123
  br label %._crit_edge114

._crit_edge114:                                   ; preds = %.critedge2.thread, %._crit_edge114.loopexit, %.critedge2
  %.276139151 = phi i32 [ %.276139, %.critedge2 ], [ %.276139, %._crit_edge114.loopexit ], [ %.276140, %.critedge2.thread ]
  %.173141150 = phi i16 [ %.173141, %.critedge2 ], [ %.173141, %._crit_edge114.loopexit ], [ %.173142, %.critedge2.thread ]
  %.285.lcssa = phi i32 [ %.184, %.critedge2 ], [ %136, %._crit_edge114.loopexit ], [ %.184, %.critedge2.thread ]
  %.282.lcssa = phi i32 [ %.181.lcssa, %.critedge2 ], [ %132, %._crit_edge114.loopexit ], [ %119, %.critedge2.thread ]
  %.279.lcssa = phi i32 [ %.178.lcssa, %.critedge2 ], [ %130, %._crit_edge114.loopexit ], [ %117, %.critedge2.thread ]
  %137 = icmp sgt i32 %.285.lcssa, 0
  br i1 %137, label %42, label %138, !llvm.loop !14

138:                                              ; preds = %._crit_edge114
  %139 = icmp sgt i32 %.276139151, 1
  br i1 %139, label %.preheader.preheader, label %161

.preheader.preheader:                             ; preds = %138
  %wide.trip.count131 = zext nneg i32 %.276139151 to i64
  %xtraiter175 = and i64 %wide.trip.count131, 1
  %unroll_iter177 = and i64 %wide.trip.count131, 2147483646
  br label %.preheader

.preheader:                                       ; preds = %.preheader, %.preheader.preheader
  %indvars.iv128 = phi i64 [ 0, %.preheader.preheader ], [ %indvars.iv.next129.1, %.preheader ]
  %niter178 = phi i64 [ 0, %.preheader.preheader ], [ %niter178.next.1, %.preheader ]
  %140 = getelementptr inbounds [17 x i8], ptr %4, i64 0, i64 %indvars.iv128
  %141 = load i8, ptr %140, align 2, !tbaa !9
  %142 = load i32, ptr @OutSize, align 4, !tbaa !5
  %143 = add nsw i32 %142, 1
  store i32 %143, ptr @OutSize, align 4, !tbaa !5
  %144 = sext i32 %142 to i64
  %145 = getelementptr inbounds i8, ptr %2, i64 %144
  store i8 %141, ptr %145, align 1, !tbaa !9
  %indvars.iv.next129 = or disjoint i64 %indvars.iv128, 1
  %146 = getelementptr inbounds [17 x i8], ptr %4, i64 0, i64 %indvars.iv.next129
  %147 = load i8, ptr %146, align 1, !tbaa !9
  %148 = load i32, ptr @OutSize, align 4, !tbaa !5
  %149 = add nsw i32 %148, 1
  store i32 %149, ptr @OutSize, align 4, !tbaa !5
  %150 = sext i32 %148 to i64
  %151 = getelementptr inbounds i8, ptr %2, i64 %150
  store i8 %147, ptr %151, align 1, !tbaa !9
  %indvars.iv.next129.1 = add nuw nsw i64 %indvars.iv128, 2
  %niter178.next.1 = add i64 %niter178, 2
  %niter178.ncmp.1 = icmp eq i64 %niter178.next.1, %unroll_iter177
  br i1 %niter178.ncmp.1, label %.unr-lcssa174, label %.preheader, !llvm.loop !15

.unr-lcssa174:                                    ; preds = %.preheader
  %lcmp.mod176.not = icmp eq i64 %xtraiter175, 0
  br i1 %lcmp.mod176.not, label %158, label %.preheader.epil

.preheader.epil:                                  ; preds = %.unr-lcssa174
  %152 = getelementptr inbounds [17 x i8], ptr %4, i64 0, i64 %indvars.iv.next129.1
  %153 = load i8, ptr %152, align 1, !tbaa !9
  %154 = load i32, ptr @OutSize, align 4, !tbaa !5
  %155 = add nsw i32 %154, 1
  store i32 %155, ptr @OutSize, align 4, !tbaa !5
  %156 = sext i32 %154 to i64
  %157 = getelementptr inbounds i8, ptr %2, i64 %156
  store i8 %153, ptr %157, align 1, !tbaa !9
  br label %158

158:                                              ; preds = %.unr-lcssa174, %.preheader.epil
  %159 = load i32, ptr @codesize, align 4, !tbaa !5
  %160 = add i32 %159, %.276139151
  store i32 %160, ptr @codesize, align 4, !tbaa !5
  br label %161

161:                                              ; preds = %158, %138
  store i8 16, ptr %2, align 1, !tbaa !9
  %162 = load i32, ptr @InSize, align 4, !tbaa !5
  %163 = trunc i32 %162 to i8
  %164 = getelementptr inbounds i8, ptr %2, i64 1
  store i8 %163, ptr %164, align 1, !tbaa !9
  %165 = load i32, ptr @InSize, align 4, !tbaa !5
  %166 = lshr i32 %165, 8
  %167 = trunc i32 %166 to i8
  %168 = getelementptr inbounds i8, ptr %2, i64 2
  store i8 %167, ptr %168, align 1, !tbaa !9
  %169 = load i32, ptr @InSize, align 4, !tbaa !5
  %170 = lshr i32 %169, 16
  %171 = trunc i32 %170 to i8
  %172 = getelementptr inbounds i8, ptr %2, i64 3
  store i8 %171, ptr %172, align 1, !tbaa !9
  %173 = load i32, ptr @textsize, align 4, !tbaa !5
  %174 = mul i32 %173, 100
  %175 = load i32, ptr @OutSize, align 4, !tbaa !5
  %176 = udiv i32 %174, %175
  %177 = icmp ult i32 %176, 100
  br i1 %177, label %178, label %179

178:                                              ; preds = %161
  tail call void (ptr, ...) @errorcontinue(ptr noundef nonnull @.str.1, i32 noundef %176) #4
  br label %185

179:                                              ; preds = %161
  %180 = add nsw i32 %175, 3
  %181 = and i32 %180, -4
  store i32 %181, ptr @OutSize, align 4, !tbaa !5
  %.not90 = icmp eq i32 %3, 0
  br i1 %.not90, label %182, label %185

182:                                              ; preds = %179
  %183 = udiv i32 %174, %181
  %184 = add i32 %183, -100
  tail call void (ptr, ...) @info(ptr noundef nonnull @.str.2, i32 noundef %173, i32 noundef %181, i32 noundef %184) #4
  %.pre133 = load i32, ptr @OutSize, align 4, !tbaa !5
  br label %185

185:                                              ; preds = %179, %182, %178, %41
  %.0 = phi i32 [ 0, %41 ], [ 0, %178 ], [ %.pre133, %182 ], [ %181, %179 ]
  call void @llvm.lifetime.end.p0(i64 17, ptr nonnull %4) #4
  ret i32 %.0
}

declare void @errorcontinue(ptr noundef, ...) local_unnamed_addr #2

declare void @info(ptr noundef, ...) local_unnamed_addr #2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

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

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

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


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