; LLVM IR from yourtion/LearningMasteringAlgorithms-C :: Example/compress (main)

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

@.str = external hidden unnamed_addr constant [11 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@stdout = external global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [23 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @main(i32 noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca [500000 x i8], align 16
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %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
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 500000, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  %16 = call noalias ptr @fopen(ptr noundef @.str, ptr noundef @.str.1)
  store ptr %16, ptr %6, align 8, !tbaa !9
  %17 = icmp eq ptr %16, null
  br i1 %17, label %18, label %19

18:                                               ; preds = %2
  store i32 1, ptr %3, align 4
  store i32 1, ptr %15, align 4
  br label %317

19:                                               ; preds = %2
  store i32 0, ptr %14, align 4, !tbaa !5
  br label %20

20:                                               ; preds = %29, %19
  %21 = load ptr, ptr %6, align 8, !tbaa !9
  %22 = call i32 @getc(ptr noundef %21)
  store i32 %22, ptr %13, align 4, !tbaa !5
  %23 = icmp ne i32 %22, -1
  br i1 %23, label %24, label %27

24:                                               ; preds = %20
  %25 = load i32, ptr %14, align 4, !tbaa !5
  %26 = icmp slt i32 %25, 500000
  br label %27

27:                                               ; preds = %24, %20
  %28 = phi i1 [ false, %20 ], [ %26, %24 ]
  br i1 %28, label %29, label %37

29:                                               ; preds = %27
  %30 = load i32, ptr %13, align 4, !tbaa !5
  %31 = trunc i32 %30 to i8
  %32 = load i32, ptr %14, align 4, !tbaa !5
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds [500000 x i8], ptr %7, i64 0, i64 %33
  store i8 %31, ptr %34, align 1, !tbaa !11
  %35 = load i32, ptr %14, align 4, !tbaa !5
  %36 = add nsw i32 %35, 1
  store i32 %36, ptr %14, align 4, !tbaa !5
  br label %20, !llvm.loop !12

37:                                               ; preds = %27
  %38 = load i32, ptr %14, align 4, !tbaa !5
  store i32 %38, ptr %11, align 4, !tbaa !5
  %39 = load ptr, ptr %6, align 8, !tbaa !9
  %40 = call i32 @fclose(ptr noundef %39)
  %41 = load ptr, ptr @stdout, align 8, !tbaa !9
  %42 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %41, ptr noundef @.str.2) #5
  %43 = load ptr, ptr @stdout, align 8, !tbaa !9
  %44 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %43, ptr noundef @.str.3) #5
  %45 = getelementptr inbounds [500000 x i8], ptr %7, i64 0, i64 0
  %46 = load i32, ptr %11, align 4, !tbaa !5
  %47 = call i32 @huffman_compress(ptr noundef %45, ptr noundef %8, i32 noundef %46)
  store i32 %47, ptr %10, align 4, !tbaa !5
  %48 = icmp slt i32 %47, 0
  br i1 %48, label %49, label %52

49:                                               ; preds = %37
  %50 = load ptr, ptr @stdout, align 8, !tbaa !9
  %51 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %50, ptr noundef @.str.4) #5
  store i32 1, ptr %3, align 4
  store i32 1, ptr %15, align 4
  br label %317

52:                                               ; preds = %37
  %53 = load ptr, ptr @stdout, align 8, !tbaa !9
  %54 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %53, ptr noundef @.str.5) #5
  %55 = load ptr, ptr @stdout, align 8, !tbaa !9
  %56 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %55, ptr noundef @.str.6) #5
  %57 = load ptr, ptr %8, align 8, !tbaa !9
  %58 = call i32 @huffman_uncompress(ptr noundef %57, ptr noundef %9)
  store i32 %58, ptr %12, align 4, !tbaa !5
  %59 = icmp slt i32 %58, 0
  br i1 %59, label %60, label %64

60:                                               ; preds = %52
  %61 = load ptr, ptr @stdout, align 8, !tbaa !9
  %62 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %61, ptr noundef @.str.4) #5
  %63 = load ptr, ptr %8, align 8, !tbaa !9
  call void @free(ptr noundef %63) #5
  store i32 1, ptr %3, align 4
  store i32 1, ptr %15, align 4
  br label %317

64:                                               ; preds = %52
  %65 = load ptr, ptr @stdout, align 8, !tbaa !9
  %66 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %65, ptr noundef @.str.5) #5
  %67 = load ptr, ptr @stdout, align 8, !tbaa !9
  %68 = load i32, ptr %11, align 4, !tbaa !5
  %69 = load i32, ptr %10, align 4, !tbaa !5
  %70 = load i32, ptr %12, align 4, !tbaa !5
  %71 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %67, ptr noundef @.str.7, i32 noundef %68, i32 noundef %69, i32 noundef %70) #5
  %72 = load i32, ptr %12, align 4, !tbaa !5
  %73 = load i32, ptr %11, align 4, !tbaa !5
  %74 = icmp ne i32 %72, %73
  br i1 %74, label %75, label %80

75:                                               ; preds = %64
  %76 = load ptr, ptr @stdout, align 8, !tbaa !9
  %77 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %76, ptr noundef @.str.8) #5
  %78 = load ptr, ptr %8, align 8, !tbaa !9
  call void @free(ptr noundef %78) #5
  %79 = load ptr, ptr %9, align 8, !tbaa !9
  call void @free(ptr noundef %79) #5
  store i32 1, ptr %3, align 4
  store i32 1, ptr %15, align 4
  br label %317

80:                                               ; preds = %64
  store i32 0, ptr %14, align 4, !tbaa !5
  br label %81

81:                                               ; preds = %171, %80
  %82 = load i32, ptr %14, align 4, !tbaa !5
  %83 = load i32, ptr %12, align 4, !tbaa !5
  %84 = icmp slt i32 %82, %83
  br i1 %84, label %85, label %174

85:                                               ; preds = %81
  %86 = load i32, ptr %14, align 4, !tbaa !5
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds [500000 x i8], ptr %7, i64 0, i64 %87
  %89 = load i8, ptr %88, align 1, !tbaa !11
  %90 = zext i8 %89 to i32
  %91 = load ptr, ptr %9, align 8, !tbaa !9
  %92 = load i32, ptr %14, align 4, !tbaa !5
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds i8, ptr %91, i64 %93
  %95 = load i8, ptr %94, align 1, !tbaa !11
  %96 = zext i8 %95 to i32
  %97 = icmp ne i32 %90, %96
  br i1 %97, label %98, label %170

98:                                               ; preds = %85
  %99 = load ptr, ptr @stdout, align 8, !tbaa !9
  %100 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %99, ptr noundef @.str.8) #5
  %101 = call ptr @__ctype_b_loc() #6
  %102 = load ptr, ptr %101, align 8, !tbaa !9
  %103 = load i32, ptr %14, align 4, !tbaa !5
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds [500000 x i8], ptr %7, i64 0, i64 %104
  %106 = load i8, ptr %105, align 1, !tbaa !11
  %107 = zext i8 %106 to i32
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds i16, ptr %102, i64 %108
  %110 = load i16, ptr %109, align 2, !tbaa !14
  %111 = zext i16 %110 to i32
  %112 = and i32 %111, 32768
  %113 = icmp ne i32 %112, 0
  br i1 %113, label %114, label %123

114:                                              ; preds = %98
  %115 = load ptr, ptr @stdout, align 8, !tbaa !9
  %116 = load i32, ptr %14, align 4, !tbaa !5
  %117 = load i32, ptr %14, align 4, !tbaa !5
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds [500000 x i8], ptr %7, i64 0, i64 %118
  %120 = load i8, ptr %119, align 1, !tbaa !11
  %121 = zext i8 %120 to i32
  %122 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %115, ptr noundef @.str.9, i32 noundef %116, i32 noundef %121) #5
  br label %132

123:                                              ; preds = %98
  %124 = load ptr, ptr @stdout, align 8, !tbaa !9
  %125 = load i32, ptr %14, align 4, !tbaa !5
  %126 = load i32, ptr %14, align 4, !tbaa !5
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds [500000 x i8], ptr %7, i64 0, i64 %127
  %129 = load i8, ptr %128, align 1, !tbaa !11
  %130 = zext i8 %129 to i32
  %131 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %124, ptr noundef @.str.10, i32 noundef %125, i32 noundef %130) #5
  br label %132

132:                                              ; preds = %123, %114
  %133 = call ptr @__ctype_b_loc() #6
  %134 = load ptr, ptr %133, align 8, !tbaa !9
  %135 = load ptr, ptr %9, align 8, !tbaa !9
  %136 = load i32, ptr %14, align 4, !tbaa !5
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds i8, ptr %135, i64 %137
  %139 = load i8, ptr %138, align 1, !tbaa !11
  %140 = zext i8 %139 to i32
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds i16, ptr %134, i64 %141
  %143 = load i16, ptr %142, align 2, !tbaa !14
  %144 = zext i16 %143 to i32
  %145 = and i32 %144, 32768
  %146 = icmp ne i32 %145, 0
  br i1 %146, label %147, label %157

147:                                              ; preds = %132
  %148 = load ptr, ptr @stdout, align 8, !tbaa !9
  %149 = load i32, ptr %14, align 4, !tbaa !5
  %150 = load ptr, ptr %9, align 8, !tbaa !9
  %151 = load i32, ptr %14, align 4, !tbaa !5
  %152 = sext i32 %151 to i64
  %153 = getelementptr inbounds i8, ptr %150, i64 %152
  %154 = load i8, ptr %153, align 1, !tbaa !11
  %155 = zext i8 %154 to i32
  %156 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %148, ptr noundef @.str.11, i32 noundef %149, i32 noundef %155) #5
  br label %167

157:                                              ; preds = %132
  %158 = load ptr, ptr @stdout, align 8, !tbaa !9
  %159 = load i32, ptr %14, align 4, !tbaa !5
  %160 = load ptr, ptr %9, align 8, !tbaa !9
  %161 = load i32, ptr %14, align 4, !tbaa !5
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds i8, ptr %160, i64 %162
  %164 = load i8, ptr %163, align 1, !tbaa !11
  %165 = zext i8 %164 to i32
  %166 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %158, ptr noundef @.str.12, i32 noundef %159, i32 noundef %165) #5
  br label %167

167:                                              ; preds = %157, %147
  %168 = load ptr, ptr %8, align 8, !tbaa !9
  call void @free(ptr noundef %168) #5
  %169 = load ptr, ptr %9, align 8, !tbaa !9
  call void @free(ptr noundef %169) #5
  store i32 1, ptr %3, align 4
  store i32 1, ptr %15, align 4
  br label %317

170:                                              ; preds = %85
  br label %171

171:                                              ; preds = %170
  %172 = load i32, ptr %14, align 4, !tbaa !5
  %173 = add nsw i32 %172, 1
  store i32 %173, ptr %14, align 4, !tbaa !5
  br label %81, !llvm.loop !16

174:                                              ; preds = %81
  br label %175

175:                                              ; preds = %174
  %176 = load ptr, ptr @stdout, align 8, !tbaa !9
  %177 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %176, ptr noundef @.str.13) #5
  %178 = load ptr, ptr %8, align 8, !tbaa !9
  call void @free(ptr noundef %178) #5
  %179 = load ptr, ptr %9, align 8, !tbaa !9
  call void @free(ptr noundef %179) #5
  %180 = load ptr, ptr @stdout, align 8, !tbaa !9
  %181 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %180, ptr noundef @.str.14) #5
  %182 = load ptr, ptr @stdout, align 8, !tbaa !9
  %183 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %182, ptr noundef @.str.3) #5
  %184 = getelementptr inbounds [500000 x i8], ptr %7, i64 0, i64 0
  %185 = load i32, ptr %11, align 4, !tbaa !5
  %186 = call i32 @lz77_compress(ptr noundef %184, ptr noundef %8, i32 noundef %185)
  store i32 %186, ptr %10, align 4, !tbaa !5
  %187 = icmp slt i32 %186, 0
  br i1 %187, label %188, label %189

188:                                              ; preds = %175
  store i32 1, ptr %3, align 4
  store i32 1, ptr %15, align 4
  br label %317

189:                                              ; preds = %175
  %190 = load ptr, ptr @stdout, align 8, !tbaa !9
  %191 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %190, ptr noundef @.str.5) #5
  %192 = load ptr, ptr @stdout, align 8, !tbaa !9
  %193 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %192, ptr noundef @.str.6) #5
  %194 = load ptr, ptr %8, align 8, !tbaa !9
  %195 = call i32 @lz77_uncompress(ptr noundef %194, ptr noundef %9)
  store i32 %195, ptr %12, align 4, !tbaa !5
  %196 = icmp slt i32 %195, 0
  br i1 %196, label %197, label %201

197:                                              ; preds = %189
  %198 = load ptr, ptr @stdout, align 8, !tbaa !9
  %199 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %198, ptr noundef @.str.4) #5
  %200 = load ptr, ptr %8, align 8, !tbaa !9
  call void @free(ptr noundef %200) #5
  store i32 1, ptr %3, align 4
  store i32 1, ptr %15, align 4
  br label %317

201:                                              ; preds = %189
  %202 = load ptr, ptr @stdout, align 8, !tbaa !9
  %203 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %202, ptr noundef @.str.5) #5
  %204 = load ptr, ptr @stdout, align 8, !tbaa !9
  %205 = load i32, ptr %11, align 4, !tbaa !5
  %206 = load i32, ptr %10, align 4, !tbaa !5
  %207 = load i32, ptr %12, align 4, !tbaa !5
  %208 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %204, ptr noundef @.str.7, i32 noundef %205, i32 noundef %206, i32 noundef %207) #5
  %209 = load i32, ptr %12, align 4, !tbaa !5
  %210 = load i32, ptr %11, align 4, !tbaa !5
  %211 = icmp ne i32 %209, %210
  br i1 %211, label %212, label %217

212:                                              ; preds = %201
  %213 = load ptr, ptr @stdout, align 8, !tbaa !9
  %214 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %213, ptr noundef @.str.8) #5
  %215 = load ptr, ptr %8, align 8, !tbaa !9
  call void @free(ptr noundef %215) #5
  %216 = load ptr, ptr %9, align 8, !tbaa !9
  call void @free(ptr noundef %216) #5
  store i32 1, ptr %3, align 4
  store i32 1, ptr %15, align 4
  br label %317

217:                                              ; preds = %201
  store i32 0, ptr %14, align 4, !tbaa !5
  br label %218

218:                                              ; preds = %308, %217
  %219 = load i32, ptr %14, align 4, !tbaa !5
  %220 = load i32, ptr %12, align 4, !tbaa !5
  %221 = icmp slt i32 %219, %220
  br i1 %221, label %222, label %311

222:                                              ; preds = %218
  %223 = load i32, ptr %14, align 4, !tbaa !5
  %224 = sext i32 %223 to i64
  %225 = getelementptr inbounds [500000 x i8], ptr %7, i64 0, i64 %224
  %226 = load i8, ptr %225, align 1, !tbaa !11
  %227 = zext i8 %226 to i32
  %228 = load ptr, ptr %9, align 8, !tbaa !9
  %229 = load i32, ptr %14, align 4, !tbaa !5
  %230 = sext i32 %229 to i64
  %231 = getelementptr inbounds i8, ptr %228, i64 %230
  %232 = load i8, ptr %231, align 1, !tbaa !11
  %233 = zext i8 %232 to i32
  %234 = icmp ne i32 %227, %233
  br i1 %234, label %235, label %307

235:                                              ; preds = %222
  %236 = load ptr, ptr @stdout, align 8, !tbaa !9
  %237 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %236, ptr noundef @.str.8) #5
  %238 = call ptr @__ctype_b_loc() #6
  %239 = load ptr, ptr %238, align 8, !tbaa !9
  %240 = load i32, ptr %14, align 4, !tbaa !5
  %241 = sext i32 %240 to i64
  %242 = getelementptr inbounds [500000 x i8], ptr %7, i64 0, i64 %241
  %243 = load i8, ptr %242, align 1, !tbaa !11
  %244 = zext i8 %243 to i32
  %245 = sext i32 %244 to i64
  %246 = getelementptr inbounds i16, ptr %239, i64 %245
  %247 = load i16, ptr %246, align 2, !tbaa !14
  %248 = zext i16 %247 to i32
  %249 = and i32 %248, 32768
  %250 = icmp ne i32 %249, 0
  br i1 %250, label %251, label %260

251:                                              ; preds = %235
  %252 = load ptr, ptr @stdout, align 8, !tbaa !9
  %253 = load i32, ptr %14, align 4, !tbaa !5
  %254 = load i32, ptr %14, align 4, !tbaa !5
  %255 = sext i32 %254 to i64
  %256 = getelementptr inbounds [500000 x i8], ptr %7, i64 0, i64 %255
  %257 = load i8, ptr %256, align 1, !tbaa !11
  %258 = zext i8 %257 to i32
  %259 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %252, ptr noundef @.str.9, i32 noundef %253, i32 noundef %258) #5
  br label %269

260:                                              ; preds = %235
  %261 = load ptr, ptr @stdout, align 8, !tbaa !9
  %262 = load i32, ptr %14, align 4, !tbaa !5
  %263 = load i32, ptr %14, align 4, !tbaa !5
  %264 = sext i32 %263 to i64
  %265 = getelementptr inbounds [500000 x i8], ptr %7, i64 0, i64 %264
  %266 = load i8, ptr %265, align 1, !tbaa !11
  %267 = zext i8 %266 to i32
  %268 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %261, ptr noundef @.str.10, i32 noundef %262, i32 noundef %267) #5
  br label %269

269:                                              ; preds = %260, %251
  %270 = call ptr @__ctype_b_loc() #6
  %271 = load ptr, ptr %270, align 8, !tbaa !9
  %272 = load ptr, ptr %9, align 8, !tbaa !9
  %273 = load i32, ptr %14, align 4, !tbaa !5
  %274 = sext i32 %273 to i64
  %275 = getelementptr inbounds i8, ptr %272, i64 %274
  %276 = load i8, ptr %275, align 1, !tbaa !11
  %277 = zext i8 %276 to i32
  %278 = sext i32 %277 to i64
  %279 = getelementptr inbounds i16, ptr %271, i64 %278
  %280 = load i16, ptr %279, align 2, !tbaa !14
  %281 = zext i16 %280 to i32
  %282 = and i32 %281, 32768
  %283 = icmp ne i32 %282, 0
  br i1 %283, label %284, label %294

284:                                              ; preds = %269
  %285 = load ptr, ptr @stdout, align 8, !tbaa !9
  %286 = load i32, ptr %14, align 4, !tbaa !5
  %287 = load ptr, ptr %9, align 8, !tbaa !9
  %288 = load i32, ptr %14, align 4, !tbaa !5
  %289 = sext i32 %288 to i64
  %290 = getelementptr inbounds i8, ptr %287, i64 %289
  %291 = load i8, ptr %290, align 1, !tbaa !11
  %292 = zext i8 %291 to i32
  %293 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %285, ptr noundef @.str.11, i32 noundef %286, i32 noundef %292) #5
  br label %304

294:                                              ; preds = %269
  %295 = load ptr, ptr @stdout, align 8, !tbaa !9
  %296 = load i32, ptr %14, align 4, !tbaa !5
  %297 = load ptr, ptr %9, align 8, !tbaa !9
  %298 = load i32, ptr %14, align 4, !tbaa !5
  %299 = sext i32 %298 to i64
  %300 = getelementptr inbounds i8, ptr %297, i64 %299
  %301 = load i8, ptr %300, align 1, !tbaa !11
  %302 = zext i8 %301 to i32
  %303 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %295, ptr noundef @.str.12, i32 noundef %296, i32 noundef %302) #5
  br label %304

304:                                              ; preds = %294, %284
  %305 = load ptr, ptr %8, align 8, !tbaa !9
  call void @free(ptr noundef %305) #5
  %306 = load ptr, ptr %9, align 8, !tbaa !9
  call void @free(ptr noundef %306) #5
  store i32 1, ptr %3, align 4
  store i32 1, ptr %15, align 4
  br label %317

307:                                              ; preds = %222
  br label %308

308:                                              ; preds = %307
  %309 = load i32, ptr %14, align 4, !tbaa !5
  %310 = add nsw i32 %309, 1
  store i32 %310, ptr %14, align 4, !tbaa !5
  br label %218, !llvm.loop !17

311:                                              ; preds = %218
  br label %312

312:                                              ; preds = %311
  %313 = load ptr, ptr @stdout, align 8, !tbaa !9
  %314 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %313, ptr noundef @.str.13) #5
  %315 = load ptr, ptr %8, align 8, !tbaa !9
  call void @free(ptr noundef %315) #5
  %316 = load ptr, ptr %9, align 8, !tbaa !9
  call void @free(ptr noundef %316) #5
  store i32 0, ptr %3, align 4
  store i32 1, ptr %15, align 4
  br label %317

317:                                              ; preds = %312, %304, %212, %197, %188, %167, %75, %60, %49, %18
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 500000, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  %318 = load i32, ptr %3, align 4
  ret i32 %318
}

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

declare noalias ptr @fopen(ptr noundef, ptr noundef) #2

declare i32 @getc(ptr noundef) #2

declare i32 @fclose(ptr noundef) #2

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #3

declare i32 @huffman_compress(ptr noundef, ptr noundef, i32 noundef) #2

declare i32 @huffman_uncompress(ptr noundef, ptr noundef) #2

; Function Attrs: nounwind
declare void @free(ptr noundef) #3

; Function Attrs: nounwind willreturn memory(none)
declare ptr @__ctype_b_loc() #4

declare i32 @lz77_compress(ptr noundef, ptr noundef, i32 noundef) #2

declare i32 @lz77_uncompress(ptr noundef, ptr noundef) #2

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

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 "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind willreturn memory(none) "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 #5 = { nounwind }
attributes #6 = { nounwind 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, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = !{!15, !15, i64 0}
!15 = !{!"short", !7, i64 0}
!16 = distinct !{!16, !13}
!17 = distinct !{!17, !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"

@.str = external hidden unnamed_addr constant [11 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [23 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @main(i32 noundef %0, ptr nocapture noundef readnone %1) local_unnamed_addr #0 {
  %3 = alloca [500000 x i8], align 16
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 500000, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  %6 = tail call noalias ptr @fopen(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1)
  %7 = icmp eq ptr %6, null
  br i1 %7, label %148, label %.preheader64

.preheader64:                                     ; preds = %2
  %8 = tail call i32 @getc(ptr noundef nonnull %6)
  %.not79 = icmp eq i32 %8, -1
  br i1 %.not79, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader64, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %.preheader64 ]
  %9 = phi i32 [ %12, %.lr.ph ], [ %8, %.preheader64 ]
  %10 = trunc i32 %9 to i8
  %11 = getelementptr inbounds [500000 x i8], ptr %3, i64 0, i64 %indvars.iv
  store i8 %10, ptr %11, align 1, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %12 = tail call i32 @getc(ptr noundef nonnull %6)
  %13 = icmp ne i32 %12, -1
  %14 = icmp ult i64 %indvars.iv, 499999
  %15 = and i1 %13, %14
  br i1 %15, label %.lr.ph, label %._crit_edge.loopexit, !llvm.loop !8

._crit_edge.loopexit:                             ; preds = %.lr.ph
  %16 = trunc nuw nsw i64 %indvars.iv.next to i32
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader64
  %.0.lcssa = phi i32 [ 0, %.preheader64 ], [ %16, %._crit_edge.loopexit ]
  %17 = tail call i32 @fclose(ptr noundef nonnull %6)
  %18 = load ptr, ptr @stdout, align 8, !tbaa !10
  %19 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %18, ptr noundef nonnull @.str.2) #6
  %20 = load ptr, ptr @stdout, align 8, !tbaa !10
  %21 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %20, ptr noundef nonnull @.str.3) #6
  %22 = call i32 @huffman_compress(ptr noundef nonnull %3, ptr noundef nonnull %4, i32 noundef %.0.lcssa) #6
  %23 = icmp slt i32 %22, 0
  %24 = load ptr, ptr @stdout, align 8, !tbaa !10
  br i1 %23, label %25, label %27

25:                                               ; preds = %._crit_edge
  %26 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %24, ptr noundef nonnull @.str.4) #6
  br label %148

27:                                               ; preds = %._crit_edge
  %28 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %24, ptr noundef nonnull @.str.5) #6
  %29 = load ptr, ptr @stdout, align 8, !tbaa !10
  %30 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %29, ptr noundef nonnull @.str.6) #6
  %31 = load ptr, ptr %4, align 8, !tbaa !10
  %32 = call i32 @huffman_uncompress(ptr noundef %31, ptr noundef nonnull %5) #6
  %33 = icmp slt i32 %32, 0
  %34 = load ptr, ptr @stdout, align 8, !tbaa !10
  br i1 %33, label %35, label %38

35:                                               ; preds = %27
  %36 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %34, ptr noundef nonnull @.str.4) #6
  %37 = load ptr, ptr %4, align 8, !tbaa !10
  call void @free(ptr noundef %37) #6
  br label %148

38:                                               ; preds = %27
  %39 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %34, ptr noundef nonnull @.str.5) #6
  %40 = load ptr, ptr @stdout, align 8, !tbaa !10
  %41 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %40, ptr noundef nonnull @.str.7, i32 noundef %.0.lcssa, i32 noundef %22, i32 noundef %32) #6
  %.not = icmp eq i32 %32, %.0.lcssa
  br i1 %.not, label %.preheader63, label %43

.preheader63:                                     ; preds = %38
  %.not80 = icmp eq i32 %.0.lcssa, 0
  br i1 %.not80, label %._crit_edge74, label %.lr.ph73

.lr.ph73:                                         ; preds = %.preheader63
  %42 = load ptr, ptr %5, align 8, !tbaa !10
  %wide.trip.count = zext nneg i32 %.0.lcssa to i64
  br label %48

43:                                               ; preds = %38
  %44 = load ptr, ptr @stdout, align 8, !tbaa !10
  %45 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %44, ptr noundef nonnull @.str.8) #6
  %46 = load ptr, ptr %4, align 8, !tbaa !10
  call void @free(ptr noundef %46) #6
  %47 = load ptr, ptr %5, align 8, !tbaa !10
  call void @free(ptr noundef %47) #6
  br label %148

48:                                               ; preds = %.lr.ph73, %79
  %indvars.iv89 = phi i64 [ 0, %.lr.ph73 ], [ %indvars.iv.next90, %79 ]
  %49 = getelementptr inbounds [500000 x i8], ptr %3, i64 0, i64 %indvars.iv89
  %50 = load i8, ptr %49, align 1, !tbaa !5
  %51 = getelementptr inbounds i8, ptr %42, i64 %indvars.iv89
  %52 = load i8, ptr %51, align 1, !tbaa !5
  %.not60 = icmp eq i8 %50, %52
  br i1 %.not60, label %79, label %53

53:                                               ; preds = %48
  %54 = getelementptr inbounds [500000 x i8], ptr %3, i64 0, i64 %indvars.iv89
  %55 = trunc nuw nsw i64 %indvars.iv89 to i32
  %56 = load ptr, ptr @stdout, align 8, !tbaa !10
  %57 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %56, ptr noundef nonnull @.str.8) #6
  %58 = tail call ptr @__ctype_b_loc() #7
  %59 = load ptr, ptr %58, align 8, !tbaa !10
  %60 = load i8, ptr %54, align 1, !tbaa !5
  %61 = zext i8 %60 to i32
  %62 = zext i8 %60 to i64
  %63 = getelementptr inbounds i16, ptr %59, i64 %62
  %64 = load i16, ptr %63, align 2, !tbaa !12
  %.not61 = icmp sgt i16 %64, -1
  %65 = load ptr, ptr @stdout, align 8, !tbaa !10
  %.str.10..str.9 = select i1 %.not61, ptr @.str.10, ptr @.str.9
  %66 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %65, ptr noundef nonnull %.str.10..str.9, i32 noundef %55, i32 noundef %61) #6
  %67 = load ptr, ptr %58, align 8, !tbaa !10
  %68 = load ptr, ptr %5, align 8, !tbaa !10
  %69 = getelementptr inbounds i8, ptr %68, i64 %indvars.iv89
  %70 = load i8, ptr %69, align 1, !tbaa !5
  %71 = zext i8 %70 to i32
  %72 = zext i8 %70 to i64
  %73 = getelementptr inbounds i16, ptr %67, i64 %72
  %74 = load i16, ptr %73, align 2, !tbaa !12
  %.not62 = icmp sgt i16 %74, -1
  %.str.12.sink = select i1 %.not62, ptr @.str.12, ptr @.str.11
  %75 = load ptr, ptr @stdout, align 8, !tbaa !10
  %76 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %75, ptr noundef nonnull %.str.12.sink, i32 noundef %55, i32 noundef %71) #6
  %77 = load ptr, ptr %4, align 8, !tbaa !10
  call void @free(ptr noundef %77) #6
  %78 = load ptr, ptr %5, align 8, !tbaa !10
  call void @free(ptr noundef %78) #6
  br label %148

79:                                               ; preds = %48
  %indvars.iv.next90 = add nuw nsw i64 %indvars.iv89, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next90, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge74, label %48, !llvm.loop !14

._crit_edge74:                                    ; preds = %79, %.preheader63
  %80 = load ptr, ptr @stdout, align 8, !tbaa !10
  %81 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %80, ptr noundef nonnull @.str.13) #6
  %82 = load ptr, ptr %4, align 8, !tbaa !10
  call void @free(ptr noundef %82) #6
  %83 = load ptr, ptr %5, align 8, !tbaa !10
  call void @free(ptr noundef %83) #6
  %84 = load ptr, ptr @stdout, align 8, !tbaa !10
  %85 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %84, ptr noundef nonnull @.str.14) #6
  %86 = load ptr, ptr @stdout, align 8, !tbaa !10
  %87 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %86, ptr noundef nonnull @.str.3) #6
  %88 = call i32 @lz77_compress(ptr noundef nonnull %3, ptr noundef nonnull %4, i32 noundef %.0.lcssa) #6
  %89 = icmp slt i32 %88, 0
  br i1 %89, label %148, label %90

90:                                               ; preds = %._crit_edge74
  %91 = load ptr, ptr @stdout, align 8, !tbaa !10
  %92 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %91, ptr noundef nonnull @.str.5) #6
  %93 = load ptr, ptr @stdout, align 8, !tbaa !10
  %94 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %93, ptr noundef nonnull @.str.6) #6
  %95 = load ptr, ptr %4, align 8, !tbaa !10
  %96 = call i32 @lz77_uncompress(ptr noundef %95, ptr noundef nonnull %5) #6
  %97 = icmp slt i32 %96, 0
  %98 = load ptr, ptr @stdout, align 8, !tbaa !10
  br i1 %97, label %99, label %102

99:                                               ; preds = %90
  %100 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %98, ptr noundef nonnull @.str.4) #6
  %101 = load ptr, ptr %4, align 8, !tbaa !10
  call void @free(ptr noundef %101) #6
  br label %148

102:                                              ; preds = %90
  %103 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %98, ptr noundef nonnull @.str.5) #6
  %104 = load ptr, ptr @stdout, align 8, !tbaa !10
  %105 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %104, ptr noundef nonnull @.str.7, i32 noundef %.0.lcssa, i32 noundef %88, i32 noundef %96) #6
  %.not56 = icmp eq i32 %96, %.0.lcssa
  br i1 %.not56, label %.preheader, label %107

.preheader:                                       ; preds = %102
  br i1 %.not80, label %._crit_edge78, label %.lr.ph77

.lr.ph77:                                         ; preds = %.preheader
  %106 = load ptr, ptr %5, align 8, !tbaa !10
  %wide.trip.count95 = zext nneg i32 %.0.lcssa to i64
  br label %112

107:                                              ; preds = %102
  %108 = load ptr, ptr @stdout, align 8, !tbaa !10
  %109 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %108, ptr noundef nonnull @.str.8) #6
  %110 = load ptr, ptr %4, align 8, !tbaa !10
  call void @free(ptr noundef %110) #6
  %111 = load ptr, ptr %5, align 8, !tbaa !10
  call void @free(ptr noundef %111) #6
  br label %148

112:                                              ; preds = %.lr.ph77, %143
  %indvars.iv92 = phi i64 [ 0, %.lr.ph77 ], [ %indvars.iv.next93, %143 ]
  %113 = getelementptr inbounds [500000 x i8], ptr %3, i64 0, i64 %indvars.iv92
  %114 = load i8, ptr %113, align 1, !tbaa !5
  %115 = getelementptr inbounds i8, ptr %106, i64 %indvars.iv92
  %116 = load i8, ptr %115, align 1, !tbaa !5
  %.not57 = icmp eq i8 %114, %116
  br i1 %.not57, label %143, label %117

117:                                              ; preds = %112
  %118 = getelementptr inbounds [500000 x i8], ptr %3, i64 0, i64 %indvars.iv92
  %119 = trunc nuw nsw i64 %indvars.iv92 to i32
  %120 = load ptr, ptr @stdout, align 8, !tbaa !10
  %121 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %120, ptr noundef nonnull @.str.8) #6
  %122 = tail call ptr @__ctype_b_loc() #7
  %123 = load ptr, ptr %122, align 8, !tbaa !10
  %124 = load i8, ptr %118, align 1, !tbaa !5
  %125 = zext i8 %124 to i32
  %126 = zext i8 %124 to i64
  %127 = getelementptr inbounds i16, ptr %123, i64 %126
  %128 = load i16, ptr %127, align 2, !tbaa !12
  %.not58 = icmp sgt i16 %128, -1
  %129 = load ptr, ptr @stdout, align 8, !tbaa !10
  %.str.10..str.9106 = select i1 %.not58, ptr @.str.10, ptr @.str.9
  %130 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %129, ptr noundef nonnull %.str.10..str.9106, i32 noundef %119, i32 noundef %125) #6
  %131 = load ptr, ptr %122, align 8, !tbaa !10
  %132 = load ptr, ptr %5, align 8, !tbaa !10
  %133 = getelementptr inbounds i8, ptr %132, i64 %indvars.iv92
  %134 = load i8, ptr %133, align 1, !tbaa !5
  %135 = zext i8 %134 to i32
  %136 = zext i8 %134 to i64
  %137 = getelementptr inbounds i16, ptr %131, i64 %136
  %138 = load i16, ptr %137, align 2, !tbaa !12
  %.not59 = icmp sgt i16 %138, -1
  %.str.12.sink105 = select i1 %.not59, ptr @.str.12, ptr @.str.11
  %139 = load ptr, ptr @stdout, align 8, !tbaa !10
  %140 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %139, ptr noundef nonnull %.str.12.sink105, i32 noundef %119, i32 noundef %135) #6
  %141 = load ptr, ptr %4, align 8, !tbaa !10
  call void @free(ptr noundef %141) #6
  %142 = load ptr, ptr %5, align 8, !tbaa !10
  call void @free(ptr noundef %142) #6
  br label %148

143:                                              ; preds = %112
  %indvars.iv.next93 = add nuw nsw i64 %indvars.iv92, 1
  %exitcond96.not = icmp eq i64 %indvars.iv.next93, %wide.trip.count95
  br i1 %exitcond96.not, label %._crit_edge78, label %112, !llvm.loop !15

._crit_edge78:                                    ; preds = %143, %.preheader
  %144 = load ptr, ptr @stdout, align 8, !tbaa !10
  %145 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %144, ptr noundef nonnull @.str.13) #6
  %146 = load ptr, ptr %4, align 8, !tbaa !10
  call void @free(ptr noundef %146) #6
  %147 = load ptr, ptr %5, align 8, !tbaa !10
  call void @free(ptr noundef %147) #6
  br label %148

148:                                              ; preds = %._crit_edge74, %2, %._crit_edge78, %117, %107, %99, %53, %43, %35, %25
  %.049 = phi i32 [ 1, %25 ], [ 1, %35 ], [ 1, %43 ], [ 1, %53 ], [ 1, %99 ], [ 1, %107 ], [ 1, %117 ], [ 0, %._crit_edge78 ], [ 1, %2 ], [ 1, %._crit_edge74 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 500000, ptr nonnull %3) #6
  ret i32 %.049
}

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

; Function Attrs: nofree nounwind
declare noalias noundef ptr @fopen(ptr nocapture noundef readonly, ptr nocapture noundef readonly) local_unnamed_addr #2

; Function Attrs: nofree nounwind
declare noundef i32 @getc(ptr nocapture noundef) local_unnamed_addr #2

; Function Attrs: nofree nounwind
declare noundef i32 @fclose(ptr nocapture noundef) local_unnamed_addr #2

; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #2

declare i32 @huffman_compress(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

declare i32 @huffman_uncompress(ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none)
declare ptr @__ctype_b_loc() local_unnamed_addr #5

declare i32 @lz77_compress(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

declare i32 @lz77_uncompress(ptr noundef, ptr noundef) local_unnamed_addr #3

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

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 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 #5 = { mustprogress nofree nosync nounwind willreturn memory(none) "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 #6 = { nounwind }
attributes #7 = { nounwind 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, !6, i64 0}
!6 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = distinct !{!8, !9}
!9 = !{!"llvm.loop.mustprogress"}
!10 = !{!11, !11, i64 0}
!11 = !{!"any pointer", !6, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"short", !6, i64 0}
!14 = distinct !{!14, !9}
!15 = distinct !{!15, !9}


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