; LLVM IR from intel/qpl :: examples/low-level-api (huffman_only_example)

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

%struct.allocator_t = type { ptr, ptr }
%struct.qpl_job = type { ptr, i32, i32, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, ptr, i32, ptr, i32, i32, i8, i8, i8, i64, i64, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, %struct.qpl_aux_data }
%struct.qpl_aux_data = type { ptr, ptr, ptr, ptr, ptr, i32 }

@.str = external hidden unnamed_addr constant [50 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [97 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [62 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [75 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [62 x i8], align 1
@__const.main.default_allocator_c = external hidden unnamed_addr constant %struct.allocator_t, align 8
@.str.13 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [74 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [82 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [95 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [70 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [80 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [74 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [76 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [21 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 i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca [1000 x i8], align 16
  %9 = alloca [2000 x i8], align 16
  %10 = alloca [1000 x i8], align 16
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca %struct.allocator_t, align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca i64, align 8
  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
  %21 = call ptr @qpl_get_library_version()
  %22 = call i32 (ptr, ...) @printf(ptr noundef @.str, ptr noundef %21)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  store i32 2, ptr %6, align 4, !tbaa !5
  %23 = load i32, ptr %4, align 4, !tbaa !5
  %24 = icmp slt i32 %23, 2
  br i1 %24, label %25, label %27

25:                                               ; preds = %2
  %26 = call i32 (ptr, ...) @printf(ptr noundef @.str.1)
  store i32 1, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %319

27:                                               ; preds = %2
  %28 = load ptr, ptr %5, align 8, !tbaa !9
  %29 = getelementptr inbounds ptr, ptr %28, i64 1
  %30 = load ptr, ptr %29, align 8, !tbaa !9
  %31 = call i32 @strcmp(ptr noundef %30, ptr noundef @.str.2) #8
  %32 = icmp eq i32 %31, 0
  br i1 %32, label %33, label %35

33:                                               ; preds = %27
  store i32 1, ptr %6, align 4, !tbaa !5
  %34 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  br label %59

35:                                               ; preds = %27
  %36 = load ptr, ptr %5, align 8, !tbaa !9
  %37 = getelementptr inbounds ptr, ptr %36, i64 1
  %38 = load ptr, ptr %37, align 8, !tbaa !9
  %39 = call i32 @strcmp(ptr noundef %38, ptr noundef @.str.4) #8
  %40 = icmp eq i32 %39, 0
  br i1 %40, label %41, label %43

41:                                               ; preds = %35
  store i32 2, ptr %6, align 4, !tbaa !5
  %42 = call i32 (ptr, ...) @printf(ptr noundef @.str.5)
  br label %58

43:                                               ; preds = %35
  %44 = load ptr, ptr %5, align 8, !tbaa !9
  %45 = getelementptr inbounds ptr, ptr %44, i64 1
  %46 = load ptr, ptr %45, align 8, !tbaa !9
  %47 = call i32 @strcmp(ptr noundef %46, ptr noundef @.str.6) #8
  %48 = icmp eq i32 %47, 0
  br i1 %48, label %49, label %51

49:                                               ; preds = %43
  store i32 0, ptr %6, align 4, !tbaa !5
  %50 = call i32 (ptr, ...) @printf(ptr noundef @.str.7)
  br label %57

51:                                               ; preds = %43
  %52 = load ptr, ptr %5, align 8, !tbaa !9
  %53 = getelementptr inbounds ptr, ptr %52, i64 1
  %54 = load ptr, ptr %53, align 8, !tbaa !9
  %55 = call i32 (ptr, ...) @printf(ptr noundef @.str.8, ptr noundef %54)
  %56 = call i32 (ptr, ...) @printf(ptr noundef @.str.9)
  store i32 1, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %319

57:                                               ; preds = %49
  br label %58

58:                                               ; preds = %57, %41
  br label %59

59:                                               ; preds = %58, %33
  call void @llvm.lifetime.start.p0(i64 1000, ptr %8) #7
  call void @llvm.lifetime.start.p0(i64 2000, ptr %9) #7
  call void @llvm.lifetime.start.p0(i64 1000, ptr %10) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  store i32 0, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  %60 = load i32, ptr %6, align 4, !tbaa !5
  %61 = call i32 @qpl_get_job_size(i32 noundef %60, ptr noundef %11)
  store i32 %61, ptr %12, align 4, !tbaa !5
  %62 = load i32, ptr %12, align 4, !tbaa !5
  %63 = icmp ne i32 %62, 0
  br i1 %63, label %64, label %68

64:                                               ; preds = %59
  %65 = load i32, ptr %12, align 4, !tbaa !5
  %66 = call i32 (ptr, ...) @printf(ptr noundef @.str.10, i32 noundef %65)
  %67 = load i32, ptr %12, align 4, !tbaa !5
  store i32 %67, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %318

68:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  store ptr null, ptr %13, align 8, !tbaa !9
  %69 = load i32, ptr %11, align 4, !tbaa !5
  %70 = zext i32 %69 to i64
  %71 = call noalias ptr @malloc(i64 noundef %70) #9
  store ptr %71, ptr %13, align 8, !tbaa !9
  %72 = load ptr, ptr %13, align 8, !tbaa !9
  %73 = icmp eq ptr %72, null
  br i1 %73, label %74, label %78

74:                                               ; preds = %68
  %75 = load i32, ptr %12, align 4, !tbaa !5
  %76 = call i32 (ptr, ...) @printf(ptr noundef @.str.11, i32 noundef %75)
  %77 = load i32, ptr %12, align 4, !tbaa !5
  store i32 %77, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %317

78:                                               ; preds = %68
  %79 = load i32, ptr %6, align 4, !tbaa !5
  %80 = load ptr, ptr %13, align 8, !tbaa !9
  %81 = call i32 @qpl_init_job(i32 noundef %79, ptr noundef %80)
  store i32 %81, ptr %12, align 4, !tbaa !5
  %82 = load i32, ptr %12, align 4, !tbaa !5
  %83 = icmp ne i32 %82, 0
  br i1 %83, label %84, label %91

84:                                               ; preds = %78
  %85 = load i32, ptr %12, align 4, !tbaa !5
  %86 = call i32 (ptr, ...) @printf(ptr noundef @.str.12, i32 noundef %85)
  %87 = load ptr, ptr %13, align 8, !tbaa !9
  %88 = call i32 @qpl_fini_job(ptr noundef %87)
  %89 = load ptr, ptr %13, align 8, !tbaa !9
  call void @free(ptr noundef %89) #7
  %90 = load i32, ptr %12, align 4, !tbaa !5
  store i32 %90, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %317

91:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  store ptr null, ptr %14, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %15, ptr align 8 @__const.main.default_allocator_c, i64 16, i1 false)
  %92 = load i32, ptr %6, align 4, !tbaa !5
  %93 = getelementptr inbounds { ptr, ptr }, ptr %15, i32 0, i32 0
  %94 = load ptr, ptr %93, align 8
  %95 = getelementptr inbounds { ptr, ptr }, ptr %15, i32 0, i32 1
  %96 = load ptr, ptr %95, align 8
  %97 = call i32 @qpl_huffman_only_table_create(i32 noundef 1, i32 noundef %92, ptr %94, ptr %96, ptr noundef %14)
  store i32 %97, ptr %12, align 4, !tbaa !5
  %98 = load i32, ptr %12, align 4, !tbaa !5
  %99 = icmp ne i32 %98, 0
  br i1 %99, label %100, label %109

100:                                              ; preds = %91
  %101 = load i32, ptr %12, align 4, !tbaa !5
  %102 = call i32 (ptr, ...) @printf(ptr noundef @.str.13, i32 noundef %101)
  %103 = load ptr, ptr %14, align 8, !tbaa !9
  %104 = call i32 @qpl_huffman_table_destroy(ptr noundef %103)
  %105 = load ptr, ptr %13, align 8, !tbaa !9
  %106 = call i32 @qpl_fini_job(ptr noundef %105)
  %107 = load ptr, ptr %13, align 8, !tbaa !9
  call void @free(ptr noundef %107) #7
  %108 = load i32, ptr %12, align 4, !tbaa !5
  store i32 %108, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %316

109:                                              ; preds = %91
  %110 = load ptr, ptr %13, align 8, !tbaa !9
  %111 = getelementptr inbounds %struct.qpl_job, ptr %110, i32 0, i32 6
  store i32 1, ptr %111, align 8, !tbaa !11
  %112 = getelementptr inbounds [1000 x i8], ptr %8, i64 0, i64 0
  %113 = load ptr, ptr %13, align 8, !tbaa !9
  %114 = getelementptr inbounds %struct.qpl_job, ptr %113, i32 0, i32 0
  store ptr %112, ptr %114, align 8, !tbaa !15
  %115 = getelementptr inbounds [2000 x i8], ptr %9, i64 0, i64 0
  %116 = load ptr, ptr %13, align 8, !tbaa !9
  %117 = getelementptr inbounds %struct.qpl_job, ptr %116, i32 0, i32 3
  store ptr %115, ptr %117, align 8, !tbaa !16
  %118 = load ptr, ptr %13, align 8, !tbaa !9
  %119 = getelementptr inbounds %struct.qpl_job, ptr %118, i32 0, i32 1
  store i32 1000, ptr %119, align 8, !tbaa !17
  %120 = load ptr, ptr %13, align 8, !tbaa !9
  %121 = getelementptr inbounds %struct.qpl_job, ptr %120, i32 0, i32 4
  store i32 2000, ptr %121, align 8, !tbaa !18
  %122 = load ptr, ptr %13, align 8, !tbaa !9
  %123 = getelementptr inbounds %struct.qpl_job, ptr %122, i32 0, i32 7
  store i32 57379, ptr %123, align 4, !tbaa !19
  %124 = load ptr, ptr %14, align 8, !tbaa !9
  %125 = load ptr, ptr %13, align 8, !tbaa !9
  %126 = getelementptr inbounds %struct.qpl_job, ptr %125, i32 0, i32 13
  store ptr %124, ptr %126, align 8, !tbaa !20
  %127 = load ptr, ptr %13, align 8, !tbaa !9
  %128 = call i32 @qpl_execute_job(ptr noundef %127)
  store i32 %128, ptr %12, align 4, !tbaa !5
  %129 = load i32, ptr %12, align 4, !tbaa !5
  %130 = icmp ne i32 %129, 0
  br i1 %130, label %131, label %140

131:                                              ; preds = %109
  %132 = load i32, ptr %12, align 4, !tbaa !5
  %133 = call i32 (ptr, ...) @printf(ptr noundef @.str.14, i32 noundef %132)
  %134 = load ptr, ptr %14, align 8, !tbaa !9
  %135 = call i32 @qpl_huffman_table_destroy(ptr noundef %134)
  %136 = load ptr, ptr %13, align 8, !tbaa !9
  %137 = call i32 @qpl_fini_job(ptr noundef %136)
  %138 = load ptr, ptr %13, align 8, !tbaa !9
  call void @free(ptr noundef %138) #7
  %139 = load i32, ptr %12, align 4, !tbaa !5
  store i32 %139, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %316

140:                                              ; preds = %109
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  %141 = load ptr, ptr %13, align 8, !tbaa !9
  %142 = getelementptr inbounds %struct.qpl_job, ptr %141, i32 0, i32 10
  %143 = load i32, ptr %142, align 8, !tbaa !21
  store i32 %143, ptr %16, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  %144 = load ptr, ptr %13, align 8, !tbaa !9
  %145 = getelementptr inbounds %struct.qpl_job, ptr %144, i32 0, i32 5
  %146 = load i32, ptr %145, align 4, !tbaa !22
  store i32 %146, ptr %17, align 4, !tbaa !5
  %147 = load ptr, ptr %13, align 8, !tbaa !9
  %148 = call i32 @qpl_fini_job(ptr noundef %147)
  store i32 %148, ptr %12, align 4, !tbaa !5
  %149 = load i32, ptr %12, align 4, !tbaa !5
  %150 = icmp ne i32 %149, 0
  br i1 %150, label %151, label %158

151:                                              ; preds = %140
  %152 = load i32, ptr %12, align 4, !tbaa !5
  %153 = call i32 (ptr, ...) @printf(ptr noundef @.str.15, i32 noundef %152)
  %154 = load ptr, ptr %13, align 8, !tbaa !9
  call void @free(ptr noundef %154) #7
  %155 = load ptr, ptr %14, align 8, !tbaa !9
  %156 = call i32 @qpl_huffman_table_destroy(ptr noundef %155)
  %157 = load i32, ptr %12, align 4, !tbaa !5
  store i32 %157, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %315

158:                                              ; preds = %140
  %159 = load ptr, ptr %13, align 8, !tbaa !9
  call void @free(ptr noundef %159) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  store ptr null, ptr %18, align 8, !tbaa !9
  %160 = load i32, ptr %6, align 4, !tbaa !5
  %161 = getelementptr inbounds { ptr, ptr }, ptr %15, i32 0, i32 0
  %162 = load ptr, ptr %161, align 8
  %163 = getelementptr inbounds { ptr, ptr }, ptr %15, i32 0, i32 1
  %164 = load ptr, ptr %163, align 8
  %165 = call i32 @qpl_huffman_only_table_create(i32 noundef 2, i32 noundef %160, ptr %162, ptr %164, ptr noundef %18)
  store i32 %165, ptr %12, align 4, !tbaa !5
  %166 = load i32, ptr %12, align 4, !tbaa !5
  %167 = icmp ne i32 %166, 0
  br i1 %167, label %168, label %176

168:                                              ; preds = %158
  %169 = load i32, ptr %12, align 4, !tbaa !5
  %170 = call i32 (ptr, ...) @printf(ptr noundef @.str.16, i32 noundef %169)
  %171 = load ptr, ptr %14, align 8, !tbaa !9
  %172 = call i32 @qpl_huffman_table_destroy(ptr noundef %171)
  %173 = load ptr, ptr %18, align 8, !tbaa !9
  %174 = call i32 @qpl_huffman_table_destroy(ptr noundef %173)
  %175 = load i32, ptr %12, align 4, !tbaa !5
  store i32 %175, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %314

176:                                              ; preds = %158
  %177 = load ptr, ptr %18, align 8, !tbaa !9
  %178 = load ptr, ptr %14, align 8, !tbaa !9
  %179 = call i32 @qpl_huffman_table_init_with_other(ptr noundef %177, ptr noundef %178)
  store i32 %179, ptr %12, align 4, !tbaa !5
  %180 = load i32, ptr %12, align 4, !tbaa !5
  %181 = icmp ne i32 %180, 0
  br i1 %181, label %182, label %190

182:                                              ; preds = %176
  %183 = load i32, ptr %12, align 4, !tbaa !5
  %184 = call i32 (ptr, ...) @printf(ptr noundef @.str.17, i32 noundef %183)
  %185 = load ptr, ptr %14, align 8, !tbaa !9
  %186 = call i32 @qpl_huffman_table_destroy(ptr noundef %185)
  %187 = load ptr, ptr %18, align 8, !tbaa !9
  %188 = call i32 @qpl_huffman_table_destroy(ptr noundef %187)
  %189 = load i32, ptr %12, align 4, !tbaa !5
  store i32 %189, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %314

190:                                              ; preds = %176
  %191 = load ptr, ptr %14, align 8, !tbaa !9
  %192 = call i32 @qpl_huffman_table_destroy(ptr noundef %191)
  store i32 %192, ptr %12, align 4, !tbaa !5
  %193 = load i32, ptr %12, align 4, !tbaa !5
  %194 = icmp ne i32 %193, 0
  br i1 %194, label %195, label %201

195:                                              ; preds = %190
  %196 = load i32, ptr %12, align 4, !tbaa !5
  %197 = call i32 (ptr, ...) @printf(ptr noundef @.str.18, i32 noundef %196)
  %198 = load ptr, ptr %18, align 8, !tbaa !9
  %199 = call i32 @qpl_huffman_table_destroy(ptr noundef %198)
  %200 = load i32, ptr %12, align 4, !tbaa !5
  store i32 %200, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %314

201:                                              ; preds = %190
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  store ptr null, ptr %19, align 8, !tbaa !9
  %202 = load i32, ptr %11, align 4, !tbaa !5
  %203 = zext i32 %202 to i64
  %204 = call noalias ptr @malloc(i64 noundef %203) #9
  store ptr %204, ptr %19, align 8, !tbaa !9
  %205 = load ptr, ptr %19, align 8, !tbaa !9
  %206 = icmp eq ptr %205, null
  br i1 %206, label %207, label %211

207:                                              ; preds = %201
  %208 = load i32, ptr %12, align 4, !tbaa !5
  %209 = call i32 (ptr, ...) @printf(ptr noundef @.str.19, i32 noundef %208)
  %210 = load i32, ptr %12, align 4, !tbaa !5
  store i32 %210, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %313

211:                                              ; preds = %201
  %212 = load i32, ptr %6, align 4, !tbaa !5
  %213 = load ptr, ptr %19, align 8, !tbaa !9
  %214 = call i32 @qpl_init_job(i32 noundef %212, ptr noundef %213)
  store i32 %214, ptr %12, align 4, !tbaa !5
  %215 = load i32, ptr %12, align 4, !tbaa !5
  %216 = icmp ne i32 %215, 0
  br i1 %216, label %217, label %226

217:                                              ; preds = %211
  %218 = load i32, ptr %12, align 4, !tbaa !5
  %219 = call i32 (ptr, ...) @printf(ptr noundef @.str.20, i32 noundef %218)
  %220 = load ptr, ptr %18, align 8, !tbaa !9
  %221 = call i32 @qpl_huffman_table_destroy(ptr noundef %220)
  %222 = load ptr, ptr %19, align 8, !tbaa !9
  %223 = call i32 @qpl_fini_job(ptr noundef %222)
  %224 = load ptr, ptr %19, align 8, !tbaa !9
  call void @free(ptr noundef %224) #7
  %225 = load i32, ptr %12, align 4, !tbaa !5
  store i32 %225, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %313

226:                                              ; preds = %211
  %227 = load ptr, ptr %19, align 8, !tbaa !9
  %228 = getelementptr inbounds %struct.qpl_job, ptr %227, i32 0, i32 6
  store i32 0, ptr %228, align 8, !tbaa !11
  %229 = getelementptr inbounds [2000 x i8], ptr %9, i64 0, i64 0
  %230 = load ptr, ptr %19, align 8, !tbaa !9
  %231 = getelementptr inbounds %struct.qpl_job, ptr %230, i32 0, i32 0
  store ptr %229, ptr %231, align 8, !tbaa !15
  %232 = getelementptr inbounds [1000 x i8], ptr %10, i64 0, i64 0
  %233 = load ptr, ptr %19, align 8, !tbaa !9
  %234 = getelementptr inbounds %struct.qpl_job, ptr %233, i32 0, i32 3
  store ptr %232, ptr %234, align 8, !tbaa !16
  %235 = load i32, ptr %17, align 4, !tbaa !5
  %236 = load ptr, ptr %19, align 8, !tbaa !9
  %237 = getelementptr inbounds %struct.qpl_job, ptr %236, i32 0, i32 1
  store i32 %235, ptr %237, align 8, !tbaa !17
  %238 = load ptr, ptr %19, align 8, !tbaa !9
  %239 = getelementptr inbounds %struct.qpl_job, ptr %238, i32 0, i32 4
  store i32 1000, ptr %239, align 8, !tbaa !18
  %240 = load i32, ptr %16, align 4, !tbaa !5
  %241 = sub i32 8, %240
  %242 = and i32 %241, 7
  %243 = trunc i32 %242 to i8
  %244 = load ptr, ptr %19, align 8, !tbaa !9
  %245 = getelementptr inbounds %struct.qpl_job, ptr %244, i32 0, i32 21
  store i8 %243, ptr %245, align 2, !tbaa !23
  %246 = load ptr, ptr %19, align 8, !tbaa !9
  %247 = getelementptr inbounds %struct.qpl_job, ptr %246, i32 0, i32 7
  store i32 35, ptr %247, align 4, !tbaa !19
  %248 = load ptr, ptr %18, align 8, !tbaa !9
  %249 = load ptr, ptr %19, align 8, !tbaa !9
  %250 = getelementptr inbounds %struct.qpl_job, ptr %249, i32 0, i32 13
  store ptr %248, ptr %250, align 8, !tbaa !20
  %251 = load ptr, ptr %19, align 8, !tbaa !9
  %252 = call i32 @qpl_execute_job(ptr noundef %251)
  store i32 %252, ptr %12, align 4, !tbaa !5
  %253 = load i32, ptr %12, align 4, !tbaa !5
  %254 = icmp ne i32 %253, 0
  br i1 %254, label %255, label %264

255:                                              ; preds = %226
  %256 = load i32, ptr %12, align 4, !tbaa !5
  %257 = call i32 (ptr, ...) @printf(ptr noundef @.str.21, i32 noundef %256)
  %258 = load ptr, ptr %18, align 8, !tbaa !9
  %259 = call i32 @qpl_huffman_table_destroy(ptr noundef %258)
  %260 = load ptr, ptr %19, align 8, !tbaa !9
  %261 = call i32 @qpl_fini_job(ptr noundef %260)
  %262 = load ptr, ptr %19, align 8, !tbaa !9
  call void @free(ptr noundef %262) #7
  %263 = load i32, ptr %12, align 4, !tbaa !5
  store i32 %263, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %313

264:                                              ; preds = %226
  %265 = load ptr, ptr %19, align 8, !tbaa !9
  %266 = call i32 @qpl_fini_job(ptr noundef %265)
  store i32 %266, ptr %12, align 4, !tbaa !5
  %267 = load i32, ptr %12, align 4, !tbaa !5
  %268 = icmp ne i32 %267, 0
  br i1 %268, label %269, label %276

269:                                              ; preds = %264
  %270 = load i32, ptr %12, align 4, !tbaa !5
  %271 = call i32 (ptr, ...) @printf(ptr noundef @.str.22, i32 noundef %270)
  %272 = load ptr, ptr %18, align 8, !tbaa !9
  %273 = call i32 @qpl_huffman_table_destroy(ptr noundef %272)
  %274 = load ptr, ptr %19, align 8, !tbaa !9
  call void @free(ptr noundef %274) #7
  %275 = load i32, ptr %12, align 4, !tbaa !5
  store i32 %275, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %313

276:                                              ; preds = %264
  %277 = load ptr, ptr %19, align 8, !tbaa !9
  call void @free(ptr noundef %277) #7
  %278 = load ptr, ptr %18, align 8, !tbaa !9
  %279 = call i32 @qpl_huffman_table_destroy(ptr noundef %278)
  store i32 %279, ptr %12, align 4, !tbaa !5
  %280 = load i32, ptr %12, align 4, !tbaa !5
  %281 = icmp ne i32 %280, 0
  br i1 %281, label %282, label %286

282:                                              ; preds = %276
  %283 = load i32, ptr %12, align 4, !tbaa !5
  %284 = call i32 (ptr, ...) @printf(ptr noundef @.str.23, i32 noundef %283)
  %285 = load i32, ptr %12, align 4, !tbaa !5
  store i32 %285, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %313

286:                                              ; preds = %276
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  store i64 0, ptr %20, align 8, !tbaa !24
  br label %287

287:                                              ; preds = %304, %286
  %288 = load i64, ptr %20, align 8, !tbaa !24
  %289 = icmp ult i64 %288, 1000
  br i1 %289, label %291, label %290

290:                                              ; preds = %287
  store i32 2, ptr %7, align 4
  br label %307

291:                                              ; preds = %287
  %292 = load i64, ptr %20, align 8, !tbaa !24
  %293 = getelementptr inbounds [1000 x i8], ptr %8, i64 0, i64 %292
  %294 = load i8, ptr %293, align 1, !tbaa !25
  %295 = zext i8 %294 to i32
  %296 = load i64, ptr %20, align 8, !tbaa !24
  %297 = getelementptr inbounds [1000 x i8], ptr %10, i64 0, i64 %296
  %298 = load i8, ptr %297, align 1, !tbaa !25
  %299 = zext i8 %298 to i32
  %300 = icmp ne i32 %295, %299
  br i1 %300, label %301, label %303

301:                                              ; preds = %291
  %302 = call i32 (ptr, ...) @printf(ptr noundef @.str.24)
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %307

303:                                              ; preds = %291
  br label %304

304:                                              ; preds = %303
  %305 = load i64, ptr %20, align 8, !tbaa !24
  %306 = add i64 %305, 1
  store i64 %306, ptr %20, align 8, !tbaa !24
  br label %287, !llvm.loop !26

307:                                              ; preds = %301, %290
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  %308 = load i32, ptr %7, align 4
  switch i32 %308, label %313 [
    i32 2, label %309
  ]

309:                                              ; preds = %307
  %310 = call i32 (ptr, ...) @printf(ptr noundef @.str.25)
  %311 = load i32, ptr %17, align 4, !tbaa !5
  %312 = call i32 (ptr, ...) @printf(ptr noundef @.str.26, i32 noundef %311)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %313

313:                                              ; preds = %309, %307, %282, %269, %255, %217, %207
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  br label %314

314:                                              ; preds = %313, %195, %182, %168
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  br label %315

315:                                              ; preds = %314, %151
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  br label %316

316:                                              ; preds = %315, %131, %100
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  br label %317

317:                                              ; preds = %316, %84, %74
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  br label %318

318:                                              ; preds = %317, %64
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 1000, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 2000, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 1000, ptr %8) #7
  br label %319

319:                                              ; preds = %318, %51, %25
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  %320 = load i32, ptr %3, align 4
  ret i32 %320
}

declare i32 @printf(ptr noundef, ...) #1

declare ptr @qpl_get_library_version() #1

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

; Function Attrs: nounwind willreturn memory(read)
declare i32 @strcmp(ptr noundef, ptr noundef) #3

declare i32 @qpl_get_job_size(i32 noundef, ptr noundef) #1

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #4

declare i32 @qpl_init_job(i32 noundef, ptr noundef) #1

declare i32 @qpl_fini_job(ptr noundef) #1

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #6

declare i32 @qpl_huffman_only_table_create(i32 noundef, i32 noundef, ptr, ptr, ptr noundef) #1

declare i32 @qpl_huffman_table_destroy(ptr noundef) #1

declare i32 @qpl_execute_job(ptr noundef) #1

declare i32 @qpl_huffman_table_init_with_other(ptr noundef, ptr noundef) #1

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nounwind willreturn memory(read) "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 allocsize(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 #5 = { 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 #6 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { nounwind }
attributes #8 = { nounwind willreturn memory(read) }
attributes #9 = { nounwind allocsize(0) }

!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 = !{!12, !6, i64 32}
!12 = !{!"", !10, i64 0, !6, i64 8, !6, i64 12, !10, i64 16, !6, i64 24, !6, i64 28, !6, i64 32, !6, i64 36, !6, i64 40, !6, i64 44, !6, i64 48, !6, i64 52, !6, i64 56, !10, i64 64, !10, i64 72, !6, i64 80, !10, i64 88, !6, i64 96, !6, i64 100, !7, i64 104, !7, i64 105, !7, i64 106, !13, i64 112, !13, i64 120, !10, i64 128, !6, i64 136, !6, i64 140, !6, i64 144, !6, i64 148, !6, i64 152, !6, i64 156, !6, i64 160, !6, i64 164, !6, i64 168, !6, i64 172, !6, i64 176, !6, i64 180, !6, i64 184, !6, i64 188, !14, i64 192}
!13 = !{!"long", !7, i64 0}
!14 = !{!"qpl_aux_data", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !6, i64 40}
!15 = !{!12, !10, i64 0}
!16 = !{!12, !10, i64 16}
!17 = !{!12, !6, i64 8}
!18 = !{!12, !6, i64 24}
!19 = !{!12, !6, i64 36}
!20 = !{!12, !10, i64 64}
!21 = !{!12, !6, i64 48}
!22 = !{!12, !6, i64 28}
!23 = !{!12, !7, i64 106}
!24 = !{!13, !13, i64 0}
!25 = !{!7, !7, i64 0}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}


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

%struct.allocator_t = type { ptr, ptr }

@.str = external hidden unnamed_addr constant [50 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [97 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [62 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [75 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [62 x i8], align 1
@__const.main.default_allocator_c = external hidden unnamed_addr constant %struct.allocator_t, align 8
@.str.13 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [74 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [82 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [95 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [70 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [80 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [74 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [76 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [21 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @main(i32 noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #0 {
  %3 = alloca [1000 x i8], align 16
  %4 = alloca [2000 x i8], align 16
  %5 = alloca [1000 x i8], align 16
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = tail call ptr @qpl_get_library_version() #7
  %10 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, ptr noundef %9)
  %11 = icmp slt i32 %0, 2
  br i1 %11, label %12, label %14

12:                                               ; preds = %2
  %13 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1)
  br label %178

14:                                               ; preds = %2
  %15 = getelementptr inbounds i8, ptr %1, i64 8
  %16 = load ptr, ptr %15, align 8, !tbaa !5
  %17 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %16, ptr noundef nonnull dereferenceable(1) @.str.2) #8
  %18 = icmp eq i32 %17, 0
  br i1 %18, label %28, label %19

19:                                               ; preds = %14
  %20 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %16, ptr noundef nonnull dereferenceable(1) @.str.4) #8
  %21 = icmp eq i32 %20, 0
  br i1 %21, label %28, label %22

22:                                               ; preds = %19
  %23 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %16, ptr noundef nonnull dereferenceable(1) @.str.6) #8
  %24 = icmp eq i32 %23, 0
  br i1 %24, label %28, label %25

25:                                               ; preds = %22
  %26 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, ptr noundef %16)
  %27 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9)
  br label %178

28:                                               ; preds = %22, %19, %14
  %.str.5.sink = phi ptr [ @.str.3, %14 ], [ @.str.5, %19 ], [ @.str.7, %22 ]
  %.0100 = phi i32 [ 1, %14 ], [ 2, %19 ], [ 0, %22 ]
  %29 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.5.sink)
  call void @llvm.lifetime.start.p0(i64 1000, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 2000, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 1000, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #7
  store i32 0, ptr %6, align 4, !tbaa !9
  %30 = call i32 @qpl_get_job_size(i32 noundef %.0100, ptr noundef nonnull %6) #7
  %.not = icmp eq i32 %30, 0
  br i1 %.not, label %33, label %31

31:                                               ; preds = %28
  %32 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10, i32 noundef %30)
  br label %177

33:                                               ; preds = %28
  %34 = load i32, ptr %6, align 4, !tbaa !9
  %35 = zext i32 %34 to i64
  %36 = call noalias ptr @malloc(i64 noundef %35) #9
  %37 = icmp eq ptr %36, null
  br i1 %37, label %38, label %40

38:                                               ; preds = %33
  %39 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11, i32 noundef 0)
  br label %177

40:                                               ; preds = %33
  %41 = call i32 @qpl_init_job(i32 noundef %.0100, ptr noundef nonnull %36) #7
  %.not118 = icmp eq i32 %41, 0
  br i1 %.not118, label %45, label %42

42:                                               ; preds = %40
  %43 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.12, i32 noundef %41)
  %44 = call i32 @qpl_fini_job(ptr noundef nonnull %36) #7
  call void @free(ptr noundef nonnull %36) #7
  br label %177

45:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  store ptr null, ptr %7, align 8, !tbaa !5
  %.sroa.0.0.copyload = load ptr, ptr @__const.main.default_allocator_c, align 8
  %.sroa.5.0.copyload = load ptr, ptr getelementptr inbounds (i8, ptr @__const.main.default_allocator_c, i64 8), align 8
  %46 = call i32 @qpl_huffman_only_table_create(i32 noundef 1, i32 noundef %.0100, ptr %.sroa.0.0.copyload, ptr %.sroa.5.0.copyload, ptr noundef nonnull %7) #7
  %.not119 = icmp eq i32 %46, 0
  br i1 %.not119, label %52, label %47

47:                                               ; preds = %45
  %48 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.13, i32 noundef %46)
  %49 = load ptr, ptr %7, align 8, !tbaa !5
  %50 = call i32 @qpl_huffman_table_destroy(ptr noundef %49) #7
  %51 = call i32 @qpl_fini_job(ptr noundef nonnull %36) #7
  call void @free(ptr noundef nonnull %36) #7
  br label %176

52:                                               ; preds = %45
  %53 = getelementptr inbounds i8, ptr %36, i64 32
  store i32 1, ptr %53, align 8, !tbaa !11
  store ptr %3, ptr %36, align 8, !tbaa !15
  %54 = getelementptr inbounds i8, ptr %36, i64 16
  store ptr %4, ptr %54, align 8, !tbaa !16
  %55 = getelementptr inbounds i8, ptr %36, i64 8
  store i32 1000, ptr %55, align 8, !tbaa !17
  %56 = getelementptr inbounds i8, ptr %36, i64 24
  store i32 2000, ptr %56, align 8, !tbaa !18
  %57 = getelementptr inbounds i8, ptr %36, i64 36
  store i32 57379, ptr %57, align 4, !tbaa !19
  %58 = load ptr, ptr %7, align 8, !tbaa !5
  %59 = getelementptr inbounds i8, ptr %36, i64 64
  store ptr %58, ptr %59, align 8, !tbaa !20
  %60 = call i32 @qpl_execute_job(ptr noundef nonnull %36) #7
  %.not120 = icmp eq i32 %60, 0
  br i1 %.not120, label %66, label %61

61:                                               ; preds = %52
  %62 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.14, i32 noundef %60)
  %63 = load ptr, ptr %7, align 8, !tbaa !5
  %64 = call i32 @qpl_huffman_table_destroy(ptr noundef %63) #7
  %65 = call i32 @qpl_fini_job(ptr noundef nonnull %36) #7
  call void @free(ptr noundef nonnull %36) #7
  br label %176

66:                                               ; preds = %52
  %67 = getelementptr inbounds i8, ptr %36, i64 48
  %68 = load i32, ptr %67, align 8, !tbaa !21
  %69 = getelementptr inbounds i8, ptr %36, i64 28
  %70 = load i32, ptr %69, align 4, !tbaa !22
  %71 = call i32 @qpl_fini_job(ptr noundef nonnull %36) #7
  %.not121 = icmp eq i32 %71, 0
  br i1 %.not121, label %76, label %72

72:                                               ; preds = %66
  %73 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.15, i32 noundef %71)
  call void @free(ptr noundef nonnull %36) #7
  %74 = load ptr, ptr %7, align 8, !tbaa !5
  %75 = call i32 @qpl_huffman_table_destroy(ptr noundef %74) #7
  br label %176

76:                                               ; preds = %66
  call void @free(ptr noundef nonnull %36) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #7
  store ptr null, ptr %8, align 8, !tbaa !5
  %77 = call i32 @qpl_huffman_only_table_create(i32 noundef 2, i32 noundef %.0100, ptr %.sroa.0.0.copyload, ptr %.sroa.5.0.copyload, ptr noundef nonnull %8) #7
  %.not122 = icmp eq i32 %77, 0
  br i1 %.not122, label %84, label %78

78:                                               ; preds = %76
  %79 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.16, i32 noundef %77)
  %80 = load ptr, ptr %7, align 8, !tbaa !5
  %81 = call i32 @qpl_huffman_table_destroy(ptr noundef %80) #7
  %82 = load ptr, ptr %8, align 8, !tbaa !5
  %83 = call i32 @qpl_huffman_table_destroy(ptr noundef %82) #7
  br label %175

84:                                               ; preds = %76
  %85 = load ptr, ptr %8, align 8, !tbaa !5
  %86 = load ptr, ptr %7, align 8, !tbaa !5
  %87 = call i32 @qpl_huffman_table_init_with_other(ptr noundef %85, ptr noundef %86) #7
  %.not123 = icmp eq i32 %87, 0
  br i1 %.not123, label %94, label %88

88:                                               ; preds = %84
  %89 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.17, i32 noundef %87)
  %90 = load ptr, ptr %7, align 8, !tbaa !5
  %91 = call i32 @qpl_huffman_table_destroy(ptr noundef %90) #7
  %92 = load ptr, ptr %8, align 8, !tbaa !5
  %93 = call i32 @qpl_huffman_table_destroy(ptr noundef %92) #7
  br label %175

94:                                               ; preds = %84
  %95 = load ptr, ptr %7, align 8, !tbaa !5
  %96 = call i32 @qpl_huffman_table_destroy(ptr noundef %95) #7
  %.not124 = icmp eq i32 %96, 0
  br i1 %.not124, label %101, label %97

97:                                               ; preds = %94
  %98 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.18, i32 noundef %96)
  %99 = load ptr, ptr %8, align 8, !tbaa !5
  %100 = call i32 @qpl_huffman_table_destroy(ptr noundef %99) #7
  br label %175

101:                                              ; preds = %94
  %102 = load i32, ptr %6, align 4, !tbaa !9
  %103 = zext i32 %102 to i64
  %104 = call noalias ptr @malloc(i64 noundef %103) #9
  %105 = icmp eq ptr %104, null
  br i1 %105, label %106, label %108

106:                                              ; preds = %101
  %107 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.19, i32 noundef 0)
  br label %175

108:                                              ; preds = %101
  %109 = call i32 @qpl_init_job(i32 noundef %.0100, ptr noundef nonnull %104) #7
  %.not125 = icmp eq i32 %109, 0
  br i1 %.not125, label %115, label %110

110:                                              ; preds = %108
  %111 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.20, i32 noundef %109)
  %112 = load ptr, ptr %8, align 8, !tbaa !5
  %113 = call i32 @qpl_huffman_table_destroy(ptr noundef %112) #7
  %114 = call i32 @qpl_fini_job(ptr noundef nonnull %104) #7
  call void @free(ptr noundef nonnull %104) #7
  br label %175

115:                                              ; preds = %108
  %116 = getelementptr inbounds i8, ptr %104, i64 32
  store i32 0, ptr %116, align 8, !tbaa !11
  store ptr %4, ptr %104, align 8, !tbaa !15
  %117 = getelementptr inbounds i8, ptr %104, i64 16
  store ptr %5, ptr %117, align 8, !tbaa !16
  %118 = getelementptr inbounds i8, ptr %104, i64 8
  store i32 %70, ptr %118, align 8, !tbaa !17
  %119 = getelementptr inbounds i8, ptr %104, i64 24
  store i32 1000, ptr %119, align 8, !tbaa !18
  %120 = trunc i32 %68 to i8
  %121 = sub i8 0, %120
  %122 = and i8 %121, 7
  %123 = getelementptr inbounds i8, ptr %104, i64 106
  store i8 %122, ptr %123, align 2, !tbaa !23
  %124 = getelementptr inbounds i8, ptr %104, i64 36
  store i32 35, ptr %124, align 4, !tbaa !19
  %125 = load ptr, ptr %8, align 8, !tbaa !5
  %126 = getelementptr inbounds i8, ptr %104, i64 64
  store ptr %125, ptr %126, align 8, !tbaa !20
  %127 = call i32 @qpl_execute_job(ptr noundef nonnull %104) #7
  %.not126 = icmp eq i32 %127, 0
  br i1 %.not126, label %133, label %128

128:                                              ; preds = %115
  %129 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.21, i32 noundef %127)
  %130 = load ptr, ptr %8, align 8, !tbaa !5
  %131 = call i32 @qpl_huffman_table_destroy(ptr noundef %130) #7
  %132 = call i32 @qpl_fini_job(ptr noundef nonnull %104) #7
  call void @free(ptr noundef nonnull %104) #7
  br label %175

133:                                              ; preds = %115
  %134 = call i32 @qpl_fini_job(ptr noundef nonnull %104) #7
  %.not127 = icmp eq i32 %134, 0
  br i1 %.not127, label %139, label %135

135:                                              ; preds = %133
  %136 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.22, i32 noundef %134)
  %137 = load ptr, ptr %8, align 8, !tbaa !5
  %138 = call i32 @qpl_huffman_table_destroy(ptr noundef %137) #7
  call void @free(ptr noundef nonnull %104) #7
  br label %175

139:                                              ; preds = %133
  call void @free(ptr noundef nonnull %104) #7
  %140 = load ptr, ptr %8, align 8, !tbaa !5
  %141 = call i32 @qpl_huffman_table_destroy(ptr noundef %140) #7
  %.not128 = icmp eq i32 %141, 0
  br i1 %.not128, label %.preheader, label %142

142:                                              ; preds = %139
  %143 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.23, i32 noundef %141)
  br label %175

.preheader.1:                                     ; preds = %.preheader
  %144 = add nuw nsw i64 %.0131, 1
  %145 = getelementptr inbounds [1000 x i8], ptr %3, i64 0, i64 %144
  %146 = load i8, ptr %145, align 1, !tbaa !24
  %147 = getelementptr inbounds [1000 x i8], ptr %5, i64 0, i64 %144
  %148 = load i8, ptr %147, align 1, !tbaa !24
  %.not129.1 = icmp eq i8 %146, %148
  br i1 %.not129.1, label %.preheader.2, label %170

.preheader.2:                                     ; preds = %.preheader.1
  %149 = add nuw nsw i64 %.0131, 2
  %150 = getelementptr inbounds [1000 x i8], ptr %3, i64 0, i64 %149
  %151 = load i8, ptr %150, align 1, !tbaa !24
  %152 = getelementptr inbounds [1000 x i8], ptr %5, i64 0, i64 %149
  %153 = load i8, ptr %152, align 1, !tbaa !24
  %.not129.2 = icmp eq i8 %151, %153
  br i1 %.not129.2, label %.preheader.3, label %170

.preheader.3:                                     ; preds = %.preheader.2
  %154 = add nuw nsw i64 %.0131, 3
  %155 = getelementptr inbounds [1000 x i8], ptr %3, i64 0, i64 %154
  %156 = load i8, ptr %155, align 1, !tbaa !24
  %157 = getelementptr inbounds [1000 x i8], ptr %5, i64 0, i64 %154
  %158 = load i8, ptr %157, align 1, !tbaa !24
  %.not129.3 = icmp eq i8 %156, %158
  br i1 %.not129.3, label %.preheader.4, label %170

.preheader.4:                                     ; preds = %.preheader.3
  %159 = add nuw nsw i64 %.0131, 4
  %160 = getelementptr inbounds [1000 x i8], ptr %3, i64 0, i64 %159
  %161 = load i8, ptr %160, align 1, !tbaa !24
  %162 = getelementptr inbounds [1000 x i8], ptr %5, i64 0, i64 %159
  %163 = load i8, ptr %162, align 1, !tbaa !24
  %.not129.4 = icmp eq i8 %161, %163
  br i1 %.not129.4, label %164, label %170

164:                                              ; preds = %.preheader.4
  %165 = add nuw nsw i64 %.0131, 5
  %exitcond.4 = icmp eq i64 %165, 1000
  br i1 %exitcond.4, label %172, label %.preheader, !llvm.loop !25

.preheader:                                       ; preds = %139, %164
  %.0131 = phi i64 [ %165, %164 ], [ 0, %139 ]
  %166 = getelementptr inbounds [1000 x i8], ptr %3, i64 0, i64 %.0131
  %167 = load i8, ptr %166, align 1, !tbaa !24
  %168 = getelementptr inbounds [1000 x i8], ptr %5, i64 0, i64 %.0131
  %169 = load i8, ptr %168, align 1, !tbaa !24
  %.not129 = icmp eq i8 %167, %169
  br i1 %.not129, label %.preheader.1, label %170

170:                                              ; preds = %.preheader.4, %.preheader.3, %.preheader.2, %.preheader.1, %.preheader
  %171 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.24)
  br label %175

172:                                              ; preds = %164
  %173 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.25)
  %174 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.26, i32 noundef %70)
  br label %175

175:                                              ; preds = %170, %106, %110, %128, %135, %142, %172, %97, %88, %78
  %.2 = phi i32 [ %77, %78 ], [ %87, %88 ], [ %96, %97 ], [ 0, %106 ], [ %109, %110 ], [ %127, %128 ], [ %134, %135 ], [ %141, %142 ], [ 0, %172 ], [ -1, %170 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  br label %176

176:                                              ; preds = %72, %175, %61, %47
  %.4 = phi i32 [ %46, %47 ], [ %60, %61 ], [ %71, %72 ], [ %.2, %175 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  br label %177

177:                                              ; preds = %38, %42, %176, %31
  %.6 = phi i32 [ %30, %31 ], [ 0, %38 ], [ %41, %42 ], [ %.4, %176 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 1000, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 2000, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 1000, ptr nonnull %3) #7
  br label %178

178:                                              ; preds = %177, %25, %12
  %.7 = phi i32 [ 1, %12 ], [ %.6, %177 ], [ 1, %25 ]
  ret i32 %.7
}

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

declare ptr @qpl_get_library_version() local_unnamed_addr #2

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #4

declare i32 @qpl_get_job_size(i32 noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #5

declare i32 @qpl_init_job(i32 noundef, ptr noundef) local_unnamed_addr #2

declare i32 @qpl_fini_job(ptr noundef) local_unnamed_addr #2

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

declare i32 @qpl_huffman_only_table_create(i32 noundef, i32 noundef, ptr, ptr, ptr noundef) local_unnamed_addr #2

declare i32 @qpl_huffman_table_destroy(ptr noundef) local_unnamed_addr #2

declare i32 @qpl_execute_job(ptr noundef) local_unnamed_addr #2

declare i32 @qpl_huffman_table_init_with_other(ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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 = { 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 #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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { mustprogress nofree nounwind willreturn memory(argmem: read) "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 nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(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 #6 = { 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 #7 = { nounwind }
attributes #8 = { nounwind willreturn memory(read) }
attributes #9 = { nounwind allocsize(0) }

!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 = !{!12, !10, i64 32}
!12 = !{!"", !6, i64 0, !10, i64 8, !10, i64 12, !6, i64 16, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !10, i64 48, !10, i64 52, !10, i64 56, !6, i64 64, !6, i64 72, !10, i64 80, !6, i64 88, !10, i64 96, !10, i64 100, !7, i64 104, !7, i64 105, !7, i64 106, !13, i64 112, !13, i64 120, !6, i64 128, !10, i64 136, !10, i64 140, !10, i64 144, !10, i64 148, !10, i64 152, !10, i64 156, !10, i64 160, !10, i64 164, !10, i64 168, !10, i64 172, !10, i64 176, !10, i64 180, !10, i64 184, !10, i64 188, !14, i64 192}
!13 = !{!"long", !7, i64 0}
!14 = !{!"qpl_aux_data", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !10, i64 40}
!15 = !{!12, !6, i64 0}
!16 = !{!12, !6, i64 16}
!17 = !{!12, !10, i64 8}
!18 = !{!12, !10, i64 24}
!19 = !{!12, !10, i64 36}
!20 = !{!12, !6, i64 64}
!21 = !{!12, !10, i64 48}
!22 = !{!12, !10, i64 28}
!23 = !{!12, !7, i64 106}
!24 = !{!7, !7, i64 0}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}


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