; LLVM IR from clausecker/24puzzle :: cmd (etacount)

; 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.heuristic = type { ptr, ptr, ptr, ptr, i32, i32, i32 }
%struct.quality = type { i64, double }
%struct.patterndb = type { %struct.index_aux, i32, ptr, [16 x i8] }
%struct.index_aux = type { [32 x i8], [16 x i8], i32, i32, i32, i32, i32, ptr, [16 x i8] }

@.str = external hidden unnamed_addr constant [10 x i8], align 1
@optarg = external global ptr, align 8
@pdb_jobs = external global i32, align 4
@stderr = external global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [44 x i8], align 1
@optind = external global i32, align 4
@.str.2 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [68 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [23 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [16 x i8], align 1
@no_bias = external hidden constant [25 x double], align 16
@equilibrium_bias = external constant [25 x double], align 16
@.str.18 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [28 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 %struct.heuristic, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca [4 x %struct.quality], align 16
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = alloca double, align 8
  %13 = alloca [4 x ptr], align 16
  %14 = alloca [2 x ptr], align 16
  %15 = alloca i64, align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca ptr, align 8
  %23 = alloca ptr, align 8
  %24 = 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 48, ptr %6) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #8
  store ptr null, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 64, ptr %9) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr %13) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  store i32 0, ptr %16, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #8
  store i32 0, ptr %18, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #8
  store i32 0, ptr %19, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #8
  store i32 0, ptr %21, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #8
  store ptr null, ptr %22, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #8
  br label %25

25:                                               ; preds = %62, %2
  %26 = load i32, ptr %4, align 4, !tbaa !5
  %27 = load ptr, ptr %5, align 8, !tbaa !9
  %28 = call i32 @__posix_getopt(i32 noundef %26, ptr noundef %27, ptr noundef @.str) #8
  store i32 %28, ptr %17, align 4, !tbaa !5
  %29 = load i32, ptr %17, align 4, !tbaa !5
  %30 = icmp ne i32 %29, -1
  br i1 %30, label %31, label %63

31:                                               ; preds = %25
  %32 = load i32, ptr %17, align 4, !tbaa !5
  switch i32 %32, label %58 [
    i32 81, label %33
    i32 98, label %41
    i32 100, label %42
    i32 105, label %44
    i32 106, label %45
    i32 113, label %57
  ]

33:                                               ; preds = %31
  %34 = load ptr, ptr @optarg, align 8, !tbaa !9
  %35 = call ptr @qualities_load(ptr noundef %34)
  store ptr %35, ptr %8, align 8, !tbaa !9
  %36 = load ptr, ptr %8, align 8, !tbaa !9
  %37 = icmp eq ptr %36, null
  br i1 %37, label %38, label %40

38:                                               ; preds = %33
  %39 = load ptr, ptr @optarg, align 8, !tbaa !9
  call void @perror(ptr noundef %39)
  store i32 1, ptr %3, align 4
  store i32 1, ptr %24, align 4
  br label %367

40:                                               ; preds = %33
  br label %62

41:                                               ; preds = %31
  store i32 1, ptr %19, align 4, !tbaa !5
  br label %62

42:                                               ; preds = %31
  %43 = load ptr, ptr @optarg, align 8, !tbaa !9
  store ptr %43, ptr %22, align 8, !tbaa !9
  br label %62

44:                                               ; preds = %31
  store i32 1, ptr %18, align 4, !tbaa !5
  br label %62

45:                                               ; preds = %31
  %46 = load ptr, ptr @optarg, align 8, !tbaa !9
  %47 = call i32 @atoi(ptr noundef %46) #9
  store i32 %47, ptr @pdb_jobs, align 4, !tbaa !5
  %48 = load i32, ptr @pdb_jobs, align 4, !tbaa !5
  %49 = icmp slt i32 %48, 1
  br i1 %49, label %53, label %50

50:                                               ; preds = %45
  %51 = load i32, ptr @pdb_jobs, align 4, !tbaa !5
  %52 = icmp sgt i32 %51, 256
  br i1 %52, label %53, label %56

53:                                               ; preds = %50, %45
  %54 = load ptr, ptr @stderr, align 8, !tbaa !9
  %55 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %54, ptr noundef @.str.1, i32 noundef 256) #8
  store i32 1, ptr %3, align 4
  store i32 1, ptr %24, align 4
  br label %367

56:                                               ; preds = %50
  br label %62

57:                                               ; preds = %31
  store i32 1, ptr %16, align 4, !tbaa !5
  br label %62

58:                                               ; preds = %31
  %59 = load ptr, ptr %5, align 8, !tbaa !9
  %60 = getelementptr inbounds ptr, ptr %59, i64 0
  %61 = load ptr, ptr %60, align 8, !tbaa !9
  call void @usage(ptr noundef %61)
  br label %62

62:                                               ; preds = %58, %57, %56, %44, %42, %41, %40
  br label %25, !llvm.loop !11

63:                                               ; preds = %25
  %64 = load i32, ptr %4, align 4, !tbaa !5
  %65 = load i32, ptr @optind, align 4, !tbaa !5
  %66 = sub nsw i32 %64, %65
  %67 = icmp ne i32 %66, 4
  br i1 %67, label %68, label %72

68:                                               ; preds = %63
  %69 = load ptr, ptr %5, align 8, !tbaa !9
  %70 = getelementptr inbounds ptr, ptr %69, i64 0
  %71 = load ptr, ptr %70, align 8, !tbaa !9
  call void @usage(ptr noundef %71)
  br label %72

72:                                               ; preds = %68, %63
  store i64 0, ptr %15, align 8, !tbaa !13
  br label %73

73:                                               ; preds = %174, %72
  %74 = load i64, ptr %15, align 8, !tbaa !13
  %75 = icmp ult i64 %74, 4
  br i1 %75, label %76, label %177

76:                                               ; preds = %73
  %77 = load ptr, ptr %5, align 8, !tbaa !9
  %78 = load i32, ptr @optind, align 4, !tbaa !5
  %79 = sext i32 %78 to i64
  %80 = load i64, ptr %15, align 8, !tbaa !13
  %81 = add i64 %79, %80
  %82 = getelementptr inbounds ptr, ptr %77, i64 %81
  %83 = load ptr, ptr %82, align 8, !tbaa !9
  %84 = call i32 @tileset_parse(ptr noundef %20, ptr noundef %83)
  %85 = icmp ne i32 %84, 0
  br i1 %85, label %86, label %96

86:                                               ; preds = %76
  %87 = load ptr, ptr @stderr, align 8, !tbaa !9
  %88 = load ptr, ptr %5, align 8, !tbaa !9
  %89 = load i32, ptr @optind, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  %91 = load i64, ptr %15, align 8, !tbaa !13
  %92 = add i64 %90, %91
  %93 = getelementptr inbounds ptr, ptr %88, i64 %92
  %94 = load ptr, ptr %93, align 8, !tbaa !9
  %95 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %87, ptr noundef @.str.2, ptr noundef %94) #8
  store i32 1, ptr %3, align 4
  store i32 1, ptr %24, align 4
  br label %367

96:                                               ; preds = %76
  %97 = load i32, ptr %20, align 4, !tbaa !5
  %98 = call i32 @tileset_remove(i32 noundef %97, i32 noundef 0)
  %99 = call i32 @tileset_count(i32 noundef %98)
  %100 = icmp ne i32 %99, 6
  br i1 %100, label %101, label %111

101:                                              ; preds = %96
  %102 = load ptr, ptr @stderr, align 8, !tbaa !9
  %103 = load ptr, ptr %5, align 8, !tbaa !9
  %104 = load i32, ptr @optind, align 4, !tbaa !5
  %105 = sext i32 %104 to i64
  %106 = load i64, ptr %15, align 8, !tbaa !13
  %107 = add i64 %105, %106
  %108 = getelementptr inbounds ptr, ptr %103, i64 %107
  %109 = load ptr, ptr %108, align 8, !tbaa !9
  %110 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %102, ptr noundef @.str.3, ptr noundef %109) #8
  store i32 1, ptr %3, align 4
  store i32 1, ptr %24, align 4
  br label %367

111:                                              ; preds = %96
  %112 = load i32, ptr %20, align 4, !tbaa !5
  %113 = load i32, ptr %21, align 4, !tbaa !5
  %114 = call i32 @tileset_intersect(i32 noundef %112, i32 noundef %113)
  %115 = call i32 @tileset_remove(i32 noundef %114, i32 noundef 0)
  %116 = call i32 @tileset_empty(i32 noundef %115)
  %117 = icmp ne i32 %116, 0
  br i1 %117, label %121, label %118

118:                                              ; preds = %111
  %119 = load ptr, ptr @stderr, align 8, !tbaa !9
  %120 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %119, ptr noundef @.str.4) #8
  store i32 1, ptr %3, align 4
  store i32 1, ptr %24, align 4
  br label %367

121:                                              ; preds = %111
  %122 = load i32, ptr %21, align 4, !tbaa !5
  %123 = load i32, ptr %20, align 4, !tbaa !5
  %124 = call i32 @tileset_union(i32 noundef %122, i32 noundef %123)
  store i32 %124, ptr %21, align 4, !tbaa !5
  %125 = load i32, ptr %20, align 4, !tbaa !5
  %126 = call i32 @tileset_has(i32 noundef %125, i32 noundef 0)
  %127 = icmp ne i32 %126, 0
  br i1 %127, label %129, label %128

128:                                              ; preds = %121
  store ptr @.str.5, ptr %23, align 8, !tbaa !9
  br label %135

129:                                              ; preds = %121
  %130 = load i32, ptr %18, align 4, !tbaa !5
  %131 = icmp ne i32 %130, 0
  br i1 %131, label %132, label %133

132:                                              ; preds = %129
  store ptr @.str.6, ptr %23, align 8, !tbaa !9
  br label %134

133:                                              ; preds = %129
  store ptr @.str.7, ptr %23, align 8, !tbaa !9
  br label %134

134:                                              ; preds = %133, %132
  br label %135

135:                                              ; preds = %134, %128
  %136 = load ptr, ptr %8, align 8, !tbaa !9
  %137 = icmp ne ptr %136, null
  br i1 %137, label %138, label %144

138:                                              ; preds = %135
  %139 = load i64, ptr %15, align 8, !tbaa !13
  %140 = getelementptr inbounds [4 x %struct.quality], ptr %9, i64 0, i64 %139
  %141 = load ptr, ptr %8, align 8, !tbaa !9
  %142 = load i32, ptr %20, align 4, !tbaa !5
  %143 = call ptr @get_quality(ptr noundef %141, i32 noundef %142)
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %140, ptr align 8 %143, i64 16, i1 false), !tbaa.struct !15
  br label %144

144:                                              ; preds = %138, %135
  %145 = load ptr, ptr %22, align 8, !tbaa !9
  %146 = load i32, ptr %20, align 4, !tbaa !5
  %147 = load ptr, ptr %23, align 8, !tbaa !9
  %148 = load i32, ptr %16, align 4, !tbaa !5
  %149 = icmp ne i32 %148, 0
  %150 = zext i1 %149 to i64
  %151 = select i1 %149, i32 0, i32 4
  %152 = or i32 3, %151
  %153 = call i32 @heu_open(ptr noundef %6, ptr noundef %145, i32 noundef %146, ptr noundef %147, i32 noundef %152)
  %154 = icmp ne i32 %153, 0
  br i1 %154, label %155, label %156

155:                                              ; preds = %144
  call void @perror(ptr noundef @.str.8)
  store i32 1, ptr %3, align 4
  store i32 1, ptr %24, align 4
  br label %367

156:                                              ; preds = %144
  %157 = getelementptr inbounds %struct.heuristic, ptr %6, i32 0, i32 5
  %158 = load i32, ptr %157, align 4, !tbaa !20
  %159 = icmp eq i32 %158, 0
  br i1 %159, label %160, label %161

160:                                              ; preds = %156
  br label %162

161:                                              ; preds = %156
  call void @__assert_fail(ptr noundef @.str.9, ptr noundef @.str.10, i32 noundef 375, ptr noundef @__PRETTY_FUNCTION__.main) #10
  unreachable

162:                                              ; preds = %160
  %163 = getelementptr inbounds %struct.heuristic, ptr %6, i32 0, i32 0
  %164 = load ptr, ptr %163, align 8, !tbaa !22
  %165 = call ptr @make_cohort_etas(ptr noundef %164)
  %166 = load i64, ptr %15, align 8, !tbaa !13
  %167 = getelementptr inbounds [4 x ptr], ptr %13, i64 0, i64 %166
  store ptr %165, ptr %167, align 8, !tbaa !9
  %168 = load i64, ptr %15, align 8, !tbaa !13
  %169 = getelementptr inbounds [4 x ptr], ptr %13, i64 0, i64 %168
  %170 = load ptr, ptr %169, align 8, !tbaa !9
  %171 = icmp eq ptr %170, null
  br i1 %171, label %172, label %173

172:                                              ; preds = %162
  call void @perror(ptr noundef @.str.11)
  store i32 1, ptr %3, align 4
  store i32 1, ptr %24, align 4
  br label %367

173:                                              ; preds = %162
  call void @heu_free(ptr noundef %6)
  br label %174

174:                                              ; preds = %173
  %175 = load i64, ptr %15, align 8, !tbaa !13
  %176 = add i64 %175, 1
  store i64 %176, ptr %15, align 8, !tbaa !13
  br label %73, !llvm.loop !23

177:                                              ; preds = %73
  %178 = load i32, ptr %21, align 4, !tbaa !5
  %179 = call i32 @tileset_add(i32 noundef %178, i32 noundef 0)
  %180 = icmp eq i32 %179, 33554431
  br i1 %180, label %181, label %182

181:                                              ; preds = %177
  br label %183

182:                                              ; preds = %177
  call void @__assert_fail(ptr noundef @.str.12, ptr noundef @.str.10, i32 noundef 385, ptr noundef @__PRETTY_FUNCTION__.main) #10
  unreachable

183:                                              ; preds = %181
  %184 = load ptr, ptr %8, align 8, !tbaa !9
  %185 = icmp ne ptr %184, null
  br i1 %185, label %186, label %188

186:                                              ; preds = %183
  %187 = load ptr, ptr %8, align 8, !tbaa !9
  call void @qualities_free(ptr noundef %187)
  br label %188

188:                                              ; preds = %186, %183
  %189 = call i32 @tileset_least(i32 noundef 13)
  %190 = call ptr @pdb_dummy(i32 noundef %189)
  store ptr %190, ptr %7, align 8, !tbaa !9
  %191 = load ptr, ptr %7, align 8, !tbaa !9
  %192 = icmp eq ptr %191, null
  br i1 %192, label %193, label %194

193:                                              ; preds = %188
  call void @perror(ptr noundef @.str.13)
  store i32 1, ptr %3, align 4
  store i32 1, ptr %24, align 4
  br label %367

194:                                              ; preds = %188
  %195 = load ptr, ptr %7, align 8, !tbaa !9
  %196 = getelementptr inbounds %struct.patterndb, ptr %195, i32 0, i32 0
  %197 = getelementptr inbounds %struct.index_aux, ptr %196, i32 0, i32 3
  %198 = load i32, ptr %197, align 4, !tbaa !24
  %199 = icmp eq i32 %198, 5200300
  br i1 %199, label %200, label %201

200:                                              ; preds = %194
  br label %202

201:                                              ; preds = %194
  call void @__assert_fail(ptr noundef @.str.14, ptr noundef @.str.10, i32 noundef 397, ptr noundef @__PRETTY_FUNCTION__.main) #10
  unreachable

202:                                              ; preds = %200
  %203 = load i32, ptr %16, align 4, !tbaa !5
  %204 = icmp ne i32 %203, 0
  br i1 %204, label %220, label %205

205:                                              ; preds = %202
  %206 = load ptr, ptr @stderr, align 8, !tbaa !9
  %207 = load ptr, ptr %5, align 8, !tbaa !9
  %208 = load i32, ptr @optind, align 4, !tbaa !5
  %209 = add nsw i32 %208, 0
  %210 = sext i32 %209 to i64
  %211 = getelementptr inbounds ptr, ptr %207, i64 %210
  %212 = load ptr, ptr %211, align 8, !tbaa !9
  %213 = load ptr, ptr %5, align 8, !tbaa !9
  %214 = load i32, ptr @optind, align 4, !tbaa !5
  %215 = add nsw i32 %214, 1
  %216 = sext i32 %215 to i64
  %217 = getelementptr inbounds ptr, ptr %213, i64 %216
  %218 = load ptr, ptr %217, align 8, !tbaa !9
  %219 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %206, ptr noundef @.str.15, ptr noundef %212, ptr noundef %218) #8
  br label %220

220:                                              ; preds = %205, %202
  %221 = getelementptr inbounds [4 x ptr], ptr %13, i64 0, i64 0
  %222 = load ptr, ptr %221, align 16, !tbaa !9
  %223 = getelementptr inbounds [4 x ptr], ptr %13, i64 0, i64 1
  %224 = load ptr, ptr %223, align 8, !tbaa !9
  %225 = load ptr, ptr %7, align 8, !tbaa !9
  %226 = call ptr @make_half_etas(ptr noundef %222, ptr noundef %224, ptr noundef %225)
  %227 = getelementptr inbounds [2 x ptr], ptr %14, i64 0, i64 0
  store ptr %226, ptr %227, align 16, !tbaa !9
  %228 = getelementptr inbounds [2 x ptr], ptr %14, i64 0, i64 0
  %229 = load ptr, ptr %228, align 16, !tbaa !9
  %230 = icmp eq ptr %229, null
  br i1 %230, label %231, label %232

231:                                              ; preds = %220
  call void @perror(ptr noundef @.str.16)
  store i32 1, ptr %3, align 4
  store i32 1, ptr %24, align 4
  br label %367

232:                                              ; preds = %220
  %233 = load i32, ptr %16, align 4, !tbaa !5
  %234 = icmp ne i32 %233, 0
  br i1 %234, label %250, label %235

235:                                              ; preds = %232
  %236 = load ptr, ptr @stderr, align 8, !tbaa !9
  %237 = load ptr, ptr %5, align 8, !tbaa !9
  %238 = load i32, ptr @optind, align 4, !tbaa !5
  %239 = add nsw i32 %238, 2
  %240 = sext i32 %239 to i64
  %241 = getelementptr inbounds ptr, ptr %237, i64 %240
  %242 = load ptr, ptr %241, align 8, !tbaa !9
  %243 = load ptr, ptr %5, align 8, !tbaa !9
  %244 = load i32, ptr @optind, align 4, !tbaa !5
  %245 = add nsw i32 %244, 3
  %246 = sext i32 %245 to i64
  %247 = getelementptr inbounds ptr, ptr %243, i64 %246
  %248 = load ptr, ptr %247, align 8, !tbaa !9
  %249 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %236, ptr noundef @.str.15, ptr noundef %242, ptr noundef %248) #8
  br label %250

250:                                              ; preds = %235, %232
  %251 = getelementptr inbounds [4 x ptr], ptr %13, i64 0, i64 2
  %252 = load ptr, ptr %251, align 16, !tbaa !9
  %253 = getelementptr inbounds [4 x ptr], ptr %13, i64 0, i64 3
  %254 = load ptr, ptr %253, align 8, !tbaa !9
  %255 = load ptr, ptr %7, align 8, !tbaa !9
  %256 = call ptr @make_half_etas(ptr noundef %252, ptr noundef %254, ptr noundef %255)
  %257 = getelementptr inbounds [2 x ptr], ptr %14, i64 0, i64 1
  store ptr %256, ptr %257, align 8, !tbaa !9
  %258 = getelementptr inbounds [2 x ptr], ptr %14, i64 0, i64 1
  %259 = load ptr, ptr %258, align 8, !tbaa !9
  %260 = icmp eq ptr %259, null
  br i1 %260, label %261, label %262

261:                                              ; preds = %250
  call void @perror(ptr noundef @.str.16)
  store i32 1, ptr %3, align 4
  store i32 1, ptr %24, align 4
  br label %367

262:                                              ; preds = %250
  %263 = load i32, ptr %16, align 4, !tbaa !5
  %264 = icmp ne i32 %263, 0
  br i1 %264, label %268, label %265

265:                                              ; preds = %262
  %266 = load ptr, ptr @stderr, align 8, !tbaa !9
  %267 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %266, ptr noundef @.str.17) #8
  br label %268

268:                                              ; preds = %265, %262
  %269 = getelementptr inbounds [2 x ptr], ptr %14, i64 0, i64 0
  %270 = load ptr, ptr %269, align 16, !tbaa !9
  %271 = getelementptr inbounds [2 x ptr], ptr %14, i64 0, i64 1
  %272 = load ptr, ptr %271, align 8, !tbaa !9
  %273 = load ptr, ptr %7, align 8, !tbaa !9
  %274 = load i32, ptr %19, align 4, !tbaa !5
  %275 = icmp ne i32 %274, 0
  %276 = zext i1 %275 to i64
  %277 = select i1 %275, ptr @no_bias, ptr @equilibrium_bias
  %278 = call double @make_eta(ptr noundef %270, ptr noundef %272, ptr noundef %273, ptr noundef %277)
  store double %278, ptr %10, align 8, !tbaa !18
  %279 = load ptr, ptr %8, align 8, !tbaa !9
  %280 = icmp eq ptr %279, null
  br i1 %280, label %281, label %307

281:                                              ; preds = %268
  %282 = load double, ptr %10, align 8, !tbaa !18
  %283 = load ptr, ptr %5, align 8, !tbaa !9
  %284 = load i32, ptr @optind, align 4, !tbaa !5
  %285 = sext i32 %284 to i64
  %286 = getelementptr inbounds ptr, ptr %283, i64 %285
  %287 = load ptr, ptr %286, align 8, !tbaa !9
  %288 = load ptr, ptr %5, align 8, !tbaa !9
  %289 = load i32, ptr @optind, align 4, !tbaa !5
  %290 = add nsw i32 %289, 1
  %291 = sext i32 %290 to i64
  %292 = getelementptr inbounds ptr, ptr %288, i64 %291
  %293 = load ptr, ptr %292, align 8, !tbaa !9
  %294 = load ptr, ptr %5, align 8, !tbaa !9
  %295 = load i32, ptr @optind, align 4, !tbaa !5
  %296 = add nsw i32 %295, 2
  %297 = sext i32 %296 to i64
  %298 = getelementptr inbounds ptr, ptr %294, i64 %297
  %299 = load ptr, ptr %298, align 8, !tbaa !9
  %300 = load ptr, ptr %5, align 8, !tbaa !9
  %301 = load i32, ptr @optind, align 4, !tbaa !5
  %302 = add nsw i32 %301, 3
  %303 = sext i32 %302 to i64
  %304 = getelementptr inbounds ptr, ptr %300, i64 %303
  %305 = load ptr, ptr %304, align 8, !tbaa !9
  %306 = call i32 (ptr, ...) @printf(ptr noundef @.str.18, double noundef %282, ptr noundef %287, ptr noundef %293, ptr noundef %299, ptr noundef %305)
  br label %366

307:                                              ; preds = %268
  %308 = getelementptr inbounds [4 x %struct.quality], ptr %9, i64 0, i64 0
  %309 = getelementptr inbounds %struct.quality, ptr %308, i32 0, i32 0
  %310 = load i64, ptr %309, align 16, !tbaa !27
  %311 = getelementptr inbounds [4 x %struct.quality], ptr %9, i64 0, i64 1
  %312 = getelementptr inbounds %struct.quality, ptr %311, i32 0, i32 0
  %313 = load i64, ptr %312, align 16, !tbaa !27
  %314 = add i64 %310, %313
  %315 = getelementptr inbounds [4 x %struct.quality], ptr %9, i64 0, i64 2
  %316 = getelementptr inbounds %struct.quality, ptr %315, i32 0, i32 0
  %317 = load i64, ptr %316, align 16, !tbaa !27
  %318 = add i64 %314, %317
  %319 = getelementptr inbounds [4 x %struct.quality], ptr %9, i64 0, i64 3
  %320 = getelementptr inbounds %struct.quality, ptr %319, i32 0, i32 0
  %321 = load i64, ptr %320, align 16, !tbaa !27
  %322 = add i64 %318, %321
  %323 = call double @quality_to_hval(i64 noundef %322)
  store double %323, ptr %12, align 8, !tbaa !18
  %324 = getelementptr inbounds [4 x %struct.quality], ptr %9, i64 0, i64 0
  %325 = getelementptr inbounds %struct.quality, ptr %324, i32 0, i32 1
  %326 = load double, ptr %325, align 8, !tbaa !29
  %327 = getelementptr inbounds [4 x %struct.quality], ptr %9, i64 0, i64 1
  %328 = getelementptr inbounds %struct.quality, ptr %327, i32 0, i32 1
  %329 = load double, ptr %328, align 8, !tbaa !29
  %330 = fmul double %326, %329
  %331 = getelementptr inbounds [4 x %struct.quality], ptr %9, i64 0, i64 2
  %332 = getelementptr inbounds %struct.quality, ptr %331, i32 0, i32 1
  %333 = load double, ptr %332, align 8, !tbaa !29
  %334 = fmul double %330, %333
  %335 = getelementptr inbounds [4 x %struct.quality], ptr %9, i64 0, i64 3
  %336 = getelementptr inbounds %struct.quality, ptr %335, i32 0, i32 1
  %337 = load double, ptr %336, align 8, !tbaa !29
  %338 = fmul double %334, %337
  store double %338, ptr %11, align 8, !tbaa !18
  %339 = load double, ptr %10, align 8, !tbaa !18
  %340 = load double, ptr %11, align 8, !tbaa !18
  %341 = load double, ptr %12, align 8, !tbaa !18
  %342 = load ptr, ptr %5, align 8, !tbaa !9
  %343 = load i32, ptr @optind, align 4, !tbaa !5
  %344 = sext i32 %343 to i64
  %345 = getelementptr inbounds ptr, ptr %342, i64 %344
  %346 = load ptr, ptr %345, align 8, !tbaa !9
  %347 = load ptr, ptr %5, align 8, !tbaa !9
  %348 = load i32, ptr @optind, align 4, !tbaa !5
  %349 = add nsw i32 %348, 1
  %350 = sext i32 %349 to i64
  %351 = getelementptr inbounds ptr, ptr %347, i64 %350
  %352 = load ptr, ptr %351, align 8, !tbaa !9
  %353 = load ptr, ptr %5, align 8, !tbaa !9
  %354 = load i32, ptr @optind, align 4, !tbaa !5
  %355 = add nsw i32 %354, 2
  %356 = sext i32 %355 to i64
  %357 = getelementptr inbounds ptr, ptr %353, i64 %356
  %358 = load ptr, ptr %357, align 8, !tbaa !9
  %359 = load ptr, ptr %5, align 8, !tbaa !9
  %360 = load i32, ptr @optind, align 4, !tbaa !5
  %361 = add nsw i32 %360, 3
  %362 = sext i32 %361 to i64
  %363 = getelementptr inbounds ptr, ptr %359, i64 %362
  %364 = load ptr, ptr %363, align 8, !tbaa !9
  %365 = call i32 (ptr, ...) @printf(ptr noundef @.str.19, double noundef %339, double noundef %340, double noundef %341, ptr noundef %346, ptr noundef %352, ptr noundef %358, ptr noundef %364)
  br label %366

366:                                              ; preds = %307, %281
  store i32 0, ptr %3, align 4
  store i32 1, ptr %24, align 4
  br label %367

367:                                              ; preds = %366, %261, %231, %193, %172, %155, %118, %101, %86, %53, %38
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 64, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %6) #8
  %368 = load i32, ptr %3, align 4
  ret i32 %368
}

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

; Function Attrs: nounwind
declare i32 @__posix_getopt(i32 noundef, ptr noundef, ptr noundef) #2

declare ptr @qualities_load(ptr noundef) #3

declare void @perror(ptr noundef) #3

; Function Attrs: inlinehint nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr noundef nonnull) #4

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

; Function Attrs: nounwind uwtable
declare hidden void @usage(ptr noundef) #0

declare i32 @tileset_parse(ptr noundef, ptr noundef) #3

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @tileset_count(i32 noundef) #5

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @tileset_remove(i32 noundef, i32 noundef) #5

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @tileset_empty(i32 noundef) #5

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @tileset_intersect(i32 noundef, i32 noundef) #5

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @tileset_union(i32 noundef, i32 noundef) #5

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @tileset_has(i32 noundef, i32 noundef) #5

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @get_quality(ptr noundef, i32 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 @heu_open(ptr noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef) #3

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #7

; Function Attrs: nounwind uwtable
declare hidden ptr @make_cohort_etas(ptr noundef) #0

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @heu_free(ptr noundef) #5

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @tileset_add(i32 noundef, i32 noundef) #5

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @qualities_free(ptr noundef) #5

declare ptr @pdb_dummy(i32 noundef) #3

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @tileset_least(i32 noundef) #5

; Function Attrs: nounwind uwtable
declare hidden ptr @make_half_etas(ptr noalias noundef, ptr noalias noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden double @make_eta(ptr noalias noundef, ptr noalias noundef, ptr noundef, ptr noundef) #0

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden double @quality_to_hval(i64 noundef) #5

; 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 = { 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 = { inlinehint nounwind willreturn memory(read) 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 #5 = { inlinehint 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 #6 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { noreturn 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 #8 = { nounwind }
attributes #9 = { nounwind willreturn memory(read) }
attributes #10 = { noreturn nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !14, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = !{i64 0, i64 8, !16, i64 8, i64 8, !18}
!16 = !{!17, !17, i64 0}
!17 = !{!"long long", !7, i64 0}
!18 = !{!19, !19, i64 0}
!19 = !{!"double", !7, i64 0}
!20 = !{!21, !6, i64 36}
!21 = !{!"heuristic", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !6, i64 32, !6, i64 36, !6, i64 40}
!22 = !{!21, !10, i64 0}
!23 = distinct !{!23, !12}
!24 = !{!25, !6, i64 52}
!25 = !{!"patterndb", !26, i64 0, !6, i64 96, !10, i64 104}
!26 = !{!"index_aux", !7, i64 0, !7, i64 32, !6, i64 48, !6, i64 52, !6, i64 56, !6, i64 60, !6, i64 64, !10, i64 72}
!27 = !{!28, !17, i64 0}
!28 = !{!"quality", !17, i64 0, !19, i64 8}
!29 = !{!28, !19, i64 8}


; 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.heuristic = type { ptr, ptr, ptr, ptr, i32, i32, i32 }

@.str = external hidden unnamed_addr constant [10 x i8], align 1
@optarg = external local_unnamed_addr global ptr, align 8
@pdb_jobs = external local_unnamed_addr global i32, align 4
@stderr = external local_unnamed_addr global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [44 x i8], align 1
@optind = external local_unnamed_addr global i32, align 4
@.str.2 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [68 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [23 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [16 x i8], align 1
@no_bias = external hidden constant [25 x double], align 16
@equilibrium_bias = external constant [25 x double], align 16
@.str.18 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [28 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @main(i32 noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = alloca %struct.heuristic, align 8
  %4 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %3) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #8
  br label %.outer

.outer:                                           ; preds = %7, %2
  %.069.ph = phi ptr [ %9, %7 ], [ null, %2 ]
  %.066.ph = phi i32 [ %.066.ph158, %7 ], [ 0, %2 ]
  %.063.ph = phi i32 [ %.063.ph163, %7 ], [ 0, %2 ]
  %.061.ph = phi i32 [ %.061.ph167, %7 ], [ 0, %2 ]
  %.059.ph = phi ptr [ %.059.ph170, %7 ], [ null, %2 ]
  br label %.outer157

.outer157:                                        ; preds = %.outer, %23
  %.066.ph158 = phi i32 [ %.066.ph, %.outer ], [ 1, %23 ]
  %.063.ph159 = phi i32 [ %.063.ph, %.outer ], [ %.063.ph163, %23 ]
  %.061.ph160 = phi i32 [ %.061.ph, %.outer ], [ %.061.ph167, %23 ]
  %.059.ph161 = phi ptr [ %.059.ph, %.outer ], [ %.059.ph170, %23 ]
  br label %.outer162

.outer162:                                        ; preds = %.outer157, %15
  %.063.ph163 = phi i32 [ %.063.ph159, %.outer157 ], [ 1, %15 ]
  %.061.ph164 = phi i32 [ %.061.ph160, %.outer157 ], [ %.061.ph167, %15 ]
  %.059.ph165 = phi ptr [ %.059.ph161, %.outer157 ], [ %.059.ph170, %15 ]
  br label %.outer166

.outer166:                                        ; preds = %5, %.outer162
  %.061.ph167 = phi i32 [ %.061.ph164, %.outer162 ], [ 1, %5 ]
  %.059.ph168 = phi ptr [ %.059.ph165, %.outer162 ], [ %.059.ph170, %5 ]
  br label %.outer169

.outer169:                                        ; preds = %.outer166, %13
  %.059.ph170 = phi ptr [ %.059.ph168, %.outer166 ], [ %14, %13 ]
  br label %5

5:                                                ; preds = %.backedge, %.outer169
  %6 = tail call i32 @__posix_getopt(i32 noundef %0, ptr noundef %1, ptr noundef nonnull @.str) #8
  switch i32 %6, label %24 [
    i32 -1, label %26
    i32 81, label %7
    i32 98, label %.outer166
    i32 100, label %13
    i32 105, label %15
    i32 106, label %16
    i32 113, label %23
  ], !llvm.loop !5

7:                                                ; preds = %5
  %8 = load ptr, ptr @optarg, align 8, !tbaa !7
  %9 = tail call ptr @qualities_load(ptr noundef %8) #8
  %10 = icmp eq ptr %9, null
  br i1 %10, label %11, label %.outer, !llvm.loop !5

11:                                               ; preds = %7
  %12 = load ptr, ptr @optarg, align 8, !tbaa !7
  tail call void @perror(ptr noundef %12) #9
  br label %271

13:                                               ; preds = %5
  %14 = load ptr, ptr @optarg, align 8, !tbaa !7
  br label %.outer169, !llvm.loop !5

15:                                               ; preds = %5
  br label %.outer162, !llvm.loop !5

16:                                               ; preds = %5
  %17 = load ptr, ptr @optarg, align 8, !tbaa !7
  %18 = tail call i32 @atoi(ptr nocapture noundef %17) #10
  store i32 %18, ptr @pdb_jobs, align 4, !tbaa !11
  %19 = add i32 %18, -257
  %or.cond = icmp ult i32 %19, -256
  br i1 %or.cond, label %20, label %.backedge

.backedge:                                        ; preds = %16, %24
  br label %5, !llvm.loop !5

20:                                               ; preds = %16
  %21 = load ptr, ptr @stderr, align 8, !tbaa !7
  %22 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %21, ptr noundef nonnull @.str.1, i32 noundef 256) #11
  br label %271

23:                                               ; preds = %5
  br label %.outer157, !llvm.loop !5

24:                                               ; preds = %5
  %25 = load ptr, ptr %1, align 8, !tbaa !7
  tail call void @usage(ptr noundef %25)
  br label %.backedge

26:                                               ; preds = %5
  %27 = load i32, ptr @optind, align 4, !tbaa !11
  %28 = sub nsw i32 %0, %27
  %.not76 = icmp eq i32 %28, 4
  br i1 %.not76, label %31, label %29

29:                                               ; preds = %26
  %30 = load ptr, ptr %1, align 8, !tbaa !7
  tail call void @usage(ptr noundef %30)
  %.pre = load i32, ptr @optind, align 4, !tbaa !11
  br label %31

31:                                               ; preds = %29, %26
  %32 = phi i32 [ %.pre, %29 ], [ %27, %26 ]
  %.not84 = icmp eq i32 %.063.ph163, 0
  %.str.7..str.6 = select i1 %.not84, ptr @.str.7, ptr @.str.6
  %.not85 = icmp eq ptr %.069.ph, null
  %.not86 = icmp eq i32 %.066.ph158, 0
  %33 = select i1 %.not86, i32 7, i32 3
  %34 = getelementptr inbounds i8, ptr %3, i64 36
  %35 = sext i32 %32 to i64
  %36 = getelementptr ptr, ptr %1, i64 %35
  %37 = load ptr, ptr %36, align 8, !tbaa !7
  %38 = call i32 @tileset_parse(ptr noundef nonnull %4, ptr noundef %37) #8
  %.not80 = icmp eq i32 %38, 0
  br i1 %.not80, label %46, label %39

39:                                               ; preds = %154, %120, %86, %31
  %.lcssa = phi ptr [ %1, %31 ], [ %89, %86 ], [ %123, %120 ], [ %157, %154 ]
  %40 = load ptr, ptr @stderr, align 8, !tbaa !7
  %41 = load i32, ptr @optind, align 4, !tbaa !11
  %42 = sext i32 %41 to i64
  %43 = getelementptr ptr, ptr %.lcssa, i64 %42
  %44 = load ptr, ptr %43, align 8, !tbaa !7
  %45 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %40, ptr noundef nonnull @.str.2, ptr noundef %44) #11
  br label %271

46:                                               ; preds = %31
  %47 = load i32, ptr %4, align 4, !tbaa !11
  %48 = call i32 @tileset_remove(i32 noundef %47, i32 noundef 0)
  %49 = call i32 @tileset_count(i32 noundef %48)
  %.not81 = icmp eq i32 %49, 6
  br i1 %.not81, label %57, label %50

50:                                               ; preds = %161, %127, %93, %46
  %.lcssa111 = phi ptr [ %1, %46 ], [ %89, %93 ], [ %123, %127 ], [ %157, %161 ]
  %51 = load ptr, ptr @stderr, align 8, !tbaa !7
  %52 = load i32, ptr @optind, align 4, !tbaa !11
  %53 = sext i32 %52 to i64
  %54 = getelementptr ptr, ptr %.lcssa111, i64 %53
  %55 = load ptr, ptr %54, align 8, !tbaa !7
  %56 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %51, ptr noundef nonnull @.str.3, ptr noundef %55) #11
  br label %271

57:                                               ; preds = %46
  %58 = load i32, ptr %4, align 4, !tbaa !11
  %59 = call i32 @tileset_intersect(i32 noundef %58, i32 noundef 0)
  %60 = call i32 @tileset_remove(i32 noundef %59, i32 noundef 0)
  %61 = call i32 @tileset_empty(i32 noundef %60)
  %.not82 = icmp eq i32 %61, 0
  br i1 %.not82, label %62, label %65

62:                                               ; preds = %165, %131, %97, %57
  %63 = load ptr, ptr @stderr, align 8, !tbaa !7
  %64 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %63, ptr noundef nonnull @.str.4) #11
  br label %271

65:                                               ; preds = %57
  %66 = load i32, ptr %4, align 4, !tbaa !11
  %67 = call i32 @tileset_union(i32 noundef 0, i32 noundef %66)
  %68 = load i32, ptr %4, align 4, !tbaa !11
  %69 = call i32 @tileset_has(i32 noundef %68, i32 noundef 0)
  %.not83 = icmp eq i32 %69, 0
  %.0 = select i1 %.not83, ptr @.str.5, ptr %.str.7..str.6
  br i1 %.not85, label %73, label %70

70:                                               ; preds = %65
  %71 = load i32, ptr %4, align 4, !tbaa !11
  %72 = call ptr @get_quality(ptr noundef nonnull %.069.ph, i32 noundef %71)
  %.sroa.0131.0.copyload = load i64, ptr %72, align 8, !tbaa !13
  %.sroa.4132.0..sroa_idx = getelementptr inbounds i8, ptr %72, i64 8
  %.sroa.4132.0.copyload = load double, ptr %.sroa.4132.0..sroa_idx, align 8, !tbaa !15
  br label %73

73:                                               ; preds = %70, %65
  %.sroa.4132.0 = phi double [ undef, %65 ], [ %.sroa.4132.0.copyload, %70 ]
  %.sroa.0131.0 = phi i64 [ undef, %65 ], [ %.sroa.0131.0.copyload, %70 ]
  %74 = load i32, ptr %4, align 4, !tbaa !11
  %75 = call i32 @heu_open(ptr noundef nonnull %3, ptr noundef %.059.ph170, i32 noundef %74, ptr noundef nonnull %.0, i32 noundef %33) #8
  %.not87 = icmp eq i32 %75, 0
  br i1 %.not87, label %77, label %76

76:                                               ; preds = %178, %144, %110, %73
  call void @perror(ptr noundef nonnull @.str.8) #9
  br label %271

77:                                               ; preds = %73
  %78 = load i32, ptr %34, align 4, !tbaa !17
  %79 = icmp eq i32 %78, 0
  br i1 %79, label %81, label %80

80:                                               ; preds = %181, %147, %113, %77
  call void @__assert_fail(ptr noundef nonnull @.str.9, ptr noundef nonnull @.str.10, i32 noundef 375, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #12
  unreachable

81:                                               ; preds = %77
  %82 = load ptr, ptr %3, align 8, !tbaa !19
  %83 = call ptr @make_cohort_etas(ptr noundef %82)
  %84 = icmp eq ptr %83, null
  br i1 %84, label %85, label %86

85:                                               ; preds = %184, %150, %116, %81
  call void @perror(ptr noundef nonnull @.str.11) #9
  br label %271

86:                                               ; preds = %81
  call void @heu_free(ptr noundef nonnull %3)
  %87 = load i32, ptr @optind, align 4, !tbaa !11
  %88 = sext i32 %87 to i64
  %89 = getelementptr i8, ptr %1, i64 8
  %90 = getelementptr ptr, ptr %89, i64 %88
  %91 = load ptr, ptr %90, align 8, !tbaa !7
  %92 = call i32 @tileset_parse(ptr noundef nonnull %4, ptr noundef %91) #8
  %.not80.1 = icmp eq i32 %92, 0
  br i1 %.not80.1, label %93, label %39

93:                                               ; preds = %86
  %94 = load i32, ptr %4, align 4, !tbaa !11
  %95 = call i32 @tileset_remove(i32 noundef %94, i32 noundef 0)
  %96 = call i32 @tileset_count(i32 noundef %95)
  %.not81.1 = icmp eq i32 %96, 6
  br i1 %.not81.1, label %97, label %50

97:                                               ; preds = %93
  %98 = load i32, ptr %4, align 4, !tbaa !11
  %99 = call i32 @tileset_intersect(i32 noundef %98, i32 noundef %67)
  %100 = call i32 @tileset_remove(i32 noundef %99, i32 noundef 0)
  %101 = call i32 @tileset_empty(i32 noundef %100)
  %.not82.1 = icmp eq i32 %101, 0
  br i1 %.not82.1, label %62, label %102

102:                                              ; preds = %97
  %103 = load i32, ptr %4, align 4, !tbaa !11
  %104 = call i32 @tileset_union(i32 noundef %67, i32 noundef %103)
  %105 = load i32, ptr %4, align 4, !tbaa !11
  %106 = call i32 @tileset_has(i32 noundef %105, i32 noundef 0)
  %.not83.1 = icmp eq i32 %106, 0
  %.0.1 = select i1 %.not83.1, ptr @.str.5, ptr %.str.7..str.6
  br i1 %.not85, label %110, label %107

107:                                              ; preds = %102
  %108 = load i32, ptr %4, align 4, !tbaa !11
  %109 = call ptr @get_quality(ptr noundef nonnull %.069.ph, i32 noundef %108)
  %.sroa.5.16.copyload = load i64, ptr %109, align 8, !tbaa !13
  %.sroa.7.16..sroa_idx = getelementptr inbounds i8, ptr %109, i64 8
  %.sroa.7.16.copyload = load double, ptr %.sroa.7.16..sroa_idx, align 8, !tbaa !15
  br label %110

110:                                              ; preds = %107, %102
  %.sroa.7.0 = phi double [ undef, %102 ], [ %.sroa.7.16.copyload, %107 ]
  %.sroa.5.0 = phi i64 [ undef, %102 ], [ %.sroa.5.16.copyload, %107 ]
  %111 = load i32, ptr %4, align 4, !tbaa !11
  %112 = call i32 @heu_open(ptr noundef nonnull %3, ptr noundef %.059.ph170, i32 noundef %111, ptr noundef nonnull %.0.1, i32 noundef %33) #8
  %.not87.1 = icmp eq i32 %112, 0
  br i1 %.not87.1, label %113, label %76

113:                                              ; preds = %110
  %114 = load i32, ptr %34, align 4, !tbaa !17
  %115 = icmp eq i32 %114, 0
  br i1 %115, label %116, label %80

116:                                              ; preds = %113
  %117 = load ptr, ptr %3, align 8, !tbaa !19
  %118 = call ptr @make_cohort_etas(ptr noundef %117)
  %119 = icmp eq ptr %118, null
  br i1 %119, label %85, label %120

120:                                              ; preds = %116
  call void @heu_free(ptr noundef nonnull %3)
  %121 = load i32, ptr @optind, align 4, !tbaa !11
  %122 = sext i32 %121 to i64
  %123 = getelementptr i8, ptr %1, i64 16
  %124 = getelementptr ptr, ptr %123, i64 %122
  %125 = load ptr, ptr %124, align 8, !tbaa !7
  %126 = call i32 @tileset_parse(ptr noundef nonnull %4, ptr noundef %125) #8
  %.not80.2 = icmp eq i32 %126, 0
  br i1 %.not80.2, label %127, label %39

127:                                              ; preds = %120
  %128 = load i32, ptr %4, align 4, !tbaa !11
  %129 = call i32 @tileset_remove(i32 noundef %128, i32 noundef 0)
  %130 = call i32 @tileset_count(i32 noundef %129)
  %.not81.2 = icmp eq i32 %130, 6
  br i1 %.not81.2, label %131, label %50

131:                                              ; preds = %127
  %132 = load i32, ptr %4, align 4, !tbaa !11
  %133 = call i32 @tileset_intersect(i32 noundef %132, i32 noundef %104)
  %134 = call i32 @tileset_remove(i32 noundef %133, i32 noundef 0)
  %135 = call i32 @tileset_empty(i32 noundef %134)
  %.not82.2 = icmp eq i32 %135, 0
  br i1 %.not82.2, label %62, label %136

136:                                              ; preds = %131
  %137 = load i32, ptr %4, align 4, !tbaa !11
  %138 = call i32 @tileset_union(i32 noundef %104, i32 noundef %137)
  %139 = load i32, ptr %4, align 4, !tbaa !11
  %140 = call i32 @tileset_has(i32 noundef %139, i32 noundef 0)
  %.not83.2 = icmp eq i32 %140, 0
  %.0.2 = select i1 %.not83.2, ptr @.str.5, ptr %.str.7..str.6
  br i1 %.not85, label %144, label %141

141:                                              ; preds = %136
  %142 = load i32, ptr %4, align 4, !tbaa !11
  %143 = call ptr @get_quality(ptr noundef nonnull %.069.ph, i32 noundef %142)
  %.sroa.8133.32.copyload = load i64, ptr %143, align 8, !tbaa !13
  %.sroa.10.32..sroa_idx = getelementptr inbounds i8, ptr %143, i64 8
  %.sroa.10.32.copyload = load double, ptr %.sroa.10.32..sroa_idx, align 8, !tbaa !15
  br label %144

144:                                              ; preds = %141, %136
  %.sroa.8133.0 = phi i64 [ undef, %136 ], [ %.sroa.8133.32.copyload, %141 ]
  %.sroa.10.0 = phi double [ undef, %136 ], [ %.sroa.10.32.copyload, %141 ]
  %145 = load i32, ptr %4, align 4, !tbaa !11
  %146 = call i32 @heu_open(ptr noundef nonnull %3, ptr noundef %.059.ph170, i32 noundef %145, ptr noundef nonnull %.0.2, i32 noundef %33) #8
  %.not87.2 = icmp eq i32 %146, 0
  br i1 %.not87.2, label %147, label %76

147:                                              ; preds = %144
  %148 = load i32, ptr %34, align 4, !tbaa !17
  %149 = icmp eq i32 %148, 0
  br i1 %149, label %150, label %80

150:                                              ; preds = %147
  %151 = load ptr, ptr %3, align 8, !tbaa !19
  %152 = call ptr @make_cohort_etas(ptr noundef %151)
  %153 = icmp eq ptr %152, null
  br i1 %153, label %85, label %154

154:                                              ; preds = %150
  call void @heu_free(ptr noundef nonnull %3)
  %155 = load i32, ptr @optind, align 4, !tbaa !11
  %156 = sext i32 %155 to i64
  %157 = getelementptr i8, ptr %1, i64 24
  %158 = getelementptr ptr, ptr %157, i64 %156
  %159 = load ptr, ptr %158, align 8, !tbaa !7
  %160 = call i32 @tileset_parse(ptr noundef nonnull %4, ptr noundef %159) #8
  %.not80.3 = icmp eq i32 %160, 0
  br i1 %.not80.3, label %161, label %39

161:                                              ; preds = %154
  %162 = load i32, ptr %4, align 4, !tbaa !11
  %163 = call i32 @tileset_remove(i32 noundef %162, i32 noundef 0)
  %164 = call i32 @tileset_count(i32 noundef %163)
  %.not81.3 = icmp eq i32 %164, 6
  br i1 %.not81.3, label %165, label %50

165:                                              ; preds = %161
  %166 = load i32, ptr %4, align 4, !tbaa !11
  %167 = call i32 @tileset_intersect(i32 noundef %166, i32 noundef %138)
  %168 = call i32 @tileset_remove(i32 noundef %167, i32 noundef 0)
  %169 = call i32 @tileset_empty(i32 noundef %168)
  %.not82.3 = icmp eq i32 %169, 0
  br i1 %.not82.3, label %62, label %170

170:                                              ; preds = %165
  %171 = load i32, ptr %4, align 4, !tbaa !11
  %172 = call i32 @tileset_union(i32 noundef %138, i32 noundef %171)
  %173 = load i32, ptr %4, align 4, !tbaa !11
  %174 = call i32 @tileset_has(i32 noundef %173, i32 noundef 0)
  %.not83.3 = icmp eq i32 %174, 0
  %.0.3 = select i1 %.not83.3, ptr @.str.5, ptr %.str.7..str.6
  br i1 %.not85, label %178, label %175

175:                                              ; preds = %170
  %176 = load i32, ptr %4, align 4, !tbaa !11
  %177 = call ptr @get_quality(ptr noundef nonnull %.069.ph, i32 noundef %176)
  %.sroa.11.48.copyload = load i64, ptr %177, align 8, !tbaa !13
  %.sroa.13.48..sroa_idx = getelementptr inbounds i8, ptr %177, i64 8
  %.sroa.13.48.copyload = load double, ptr %.sroa.13.48..sroa_idx, align 8, !tbaa !15
  br label %178

178:                                              ; preds = %175, %170
  %.sroa.11.0 = phi i64 [ undef, %170 ], [ %.sroa.11.48.copyload, %175 ]
  %.sroa.13.0 = phi double [ undef, %170 ], [ %.sroa.13.48.copyload, %175 ]
  %179 = load i32, ptr %4, align 4, !tbaa !11
  %180 = call i32 @heu_open(ptr noundef nonnull %3, ptr noundef %.059.ph170, i32 noundef %179, ptr noundef nonnull %.0.3, i32 noundef %33) #8
  %.not87.3 = icmp eq i32 %180, 0
  br i1 %.not87.3, label %181, label %76

181:                                              ; preds = %178
  %182 = load i32, ptr %34, align 4, !tbaa !17
  %183 = icmp eq i32 %182, 0
  br i1 %183, label %184, label %80

184:                                              ; preds = %181
  %185 = load ptr, ptr %3, align 8, !tbaa !19
  %186 = call ptr @make_cohort_etas(ptr noundef %185)
  %187 = icmp eq ptr %186, null
  br i1 %187, label %85, label %188

188:                                              ; preds = %184
  call void @heu_free(ptr noundef nonnull %3)
  %189 = call i32 @tileset_add(i32 noundef %172, i32 noundef 0)
  %190 = icmp eq i32 %189, 33554431
  br i1 %190, label %192, label %191

191:                                              ; preds = %188
  call void @__assert_fail(ptr noundef nonnull @.str.12, ptr noundef nonnull @.str.10, i32 noundef 385, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #12
  unreachable

192:                                              ; preds = %188
  br i1 %.not85, label %194, label %193

193:                                              ; preds = %192
  call void @qualities_free(ptr noundef nonnull %.069.ph)
  br label %194

194:                                              ; preds = %193, %192
  %195 = call i32 @tileset_least(i32 noundef 13)
  %196 = call ptr @pdb_dummy(i32 noundef %195) #8
  %197 = icmp eq ptr %196, null
  br i1 %197, label %198, label %199

198:                                              ; preds = %194
  call void @perror(ptr noundef nonnull @.str.13) #9
  br label %271

199:                                              ; preds = %194
  %200 = getelementptr inbounds i8, ptr %196, i64 52
  %201 = load i32, ptr %200, align 4, !tbaa !20
  %202 = icmp eq i32 %201, 5200300
  br i1 %202, label %204, label %203

203:                                              ; preds = %199
  call void @__assert_fail(ptr noundef nonnull @.str.14, ptr noundef nonnull @.str.10, i32 noundef 397, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #12
  unreachable

204:                                              ; preds = %199
  br i1 %.not86, label %205, label %.thread

205:                                              ; preds = %204
  %206 = load ptr, ptr @stderr, align 8, !tbaa !7
  %207 = load i32, ptr @optind, align 4, !tbaa !11
  %208 = sext i32 %207 to i64
  %209 = getelementptr inbounds ptr, ptr %1, i64 %208
  %210 = load ptr, ptr %209, align 8, !tbaa !7
  %211 = getelementptr i8, ptr %209, i64 8
  %212 = load ptr, ptr %211, align 8, !tbaa !7
  %213 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %206, ptr noundef nonnull @.str.15, ptr noundef %210, ptr noundef %212) #11
  %214 = call ptr @make_half_etas(ptr noundef nonnull %83, ptr noundef nonnull %118, ptr noundef nonnull %196)
  %215 = icmp eq ptr %214, null
  br i1 %215, label %218, label %.thread135

.thread:                                          ; preds = %204
  %216 = call ptr @make_half_etas(ptr noundef nonnull %83, ptr noundef nonnull %118, ptr noundef nonnull %196)
  %217 = icmp eq ptr %216, null
  br i1 %217, label %218, label %.thread134

218:                                              ; preds = %.thread, %205
  call void @perror(ptr noundef nonnull @.str.16) #9
  br label %271

.thread134:                                       ; preds = %.thread
  %219 = call ptr @make_half_etas(ptr noundef nonnull %152, ptr noundef nonnull %186, ptr noundef nonnull %196)
  %220 = icmp eq ptr %219, null
  br i1 %220, label %232, label %235

.thread135:                                       ; preds = %205
  %221 = load ptr, ptr @stderr, align 8, !tbaa !7
  %222 = load i32, ptr @optind, align 4, !tbaa !11
  %223 = sext i32 %222 to i64
  %224 = getelementptr ptr, ptr %1, i64 %223
  %225 = getelementptr i8, ptr %224, i64 16
  %226 = load ptr, ptr %225, align 8, !tbaa !7
  %227 = getelementptr i8, ptr %224, i64 24
  %228 = load ptr, ptr %227, align 8, !tbaa !7
  %229 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %221, ptr noundef nonnull @.str.15, ptr noundef %226, ptr noundef %228) #11
  %230 = call ptr @make_half_etas(ptr noundef nonnull %152, ptr noundef nonnull %186, ptr noundef nonnull %196)
  %231 = icmp eq ptr %230, null
  br i1 %231, label %232, label %.thread136

232:                                              ; preds = %.thread135, %.thread134
  call void @perror(ptr noundef nonnull @.str.16) #9
  br label %271

.thread136:                                       ; preds = %.thread135
  %233 = load ptr, ptr @stderr, align 8, !tbaa !7
  %234 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %233, ptr noundef nonnull @.str.17) #11
  br label %235

235:                                              ; preds = %.thread134, %.thread136
  %236 = phi ptr [ %214, %.thread136 ], [ %216, %.thread134 ]
  %237 = phi ptr [ %230, %.thread136 ], [ %219, %.thread134 ]
  %.not79 = icmp eq i32 %.061.ph167, 0
  %238 = select i1 %.not79, ptr @equilibrium_bias, ptr @no_bias
  %239 = call double @make_eta(ptr noundef nonnull %236, ptr noundef nonnull %237, ptr noundef nonnull %196, ptr noundef nonnull %238)
  br i1 %.not85, label %240, label %252

240:                                              ; preds = %235
  %241 = load i32, ptr @optind, align 4, !tbaa !11
  %242 = sext i32 %241 to i64
  %243 = getelementptr inbounds ptr, ptr %1, i64 %242
  %244 = load ptr, ptr %243, align 8, !tbaa !7
  %245 = getelementptr i8, ptr %243, i64 8
  %246 = load ptr, ptr %245, align 8, !tbaa !7
  %247 = getelementptr i8, ptr %243, i64 16
  %248 = load ptr, ptr %247, align 8, !tbaa !7
  %249 = getelementptr i8, ptr %243, i64 24
  %250 = load ptr, ptr %249, align 8, !tbaa !7
  %251 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.18, double noundef %239, ptr noundef %244, ptr noundef %246, ptr noundef %248, ptr noundef %250)
  br label %271

252:                                              ; preds = %235
  %253 = add i64 %.sroa.5.0, %.sroa.0131.0
  %254 = add i64 %253, %.sroa.8133.0
  %255 = add i64 %254, %.sroa.11.0
  %256 = call double @quality_to_hval(i64 noundef %255)
  %257 = fmul double %.sroa.4132.0, %.sroa.7.0
  %258 = fmul double %257, %.sroa.10.0
  %259 = fmul double %258, %.sroa.13.0
  %260 = load i32, ptr @optind, align 4, !tbaa !11
  %261 = sext i32 %260 to i64
  %262 = getelementptr inbounds ptr, ptr %1, i64 %261
  %263 = load ptr, ptr %262, align 8, !tbaa !7
  %264 = getelementptr i8, ptr %262, i64 8
  %265 = load ptr, ptr %264, align 8, !tbaa !7
  %266 = getelementptr i8, ptr %262, i64 16
  %267 = load ptr, ptr %266, align 8, !tbaa !7
  %268 = getelementptr i8, ptr %262, i64 24
  %269 = load ptr, ptr %268, align 8, !tbaa !7
  %270 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.19, double noundef %239, double noundef %259, double noundef %256, ptr noundef %263, ptr noundef %265, ptr noundef %267, ptr noundef %269)
  br label %271

271:                                              ; preds = %240, %252, %232, %218, %198, %85, %76, %62, %50, %39, %20, %11
  %.065 = phi i32 [ 1, %20 ], [ 1, %11 ], [ 1, %39 ], [ 1, %50 ], [ 1, %76 ], [ 1, %85 ], [ 1, %62 ], [ 1, %198 ], [ 1, %218 ], [ 1, %232 ], [ 0, %252 ], [ 0, %240 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %3) #8
  ret i32 %.065
}

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

; Function Attrs: nounwind
declare i32 @__posix_getopt(i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare ptr @qualities_load(ptr noundef) local_unnamed_addr #3

; Function Attrs: nofree nounwind
declare void @perror(ptr nocapture noundef readonly) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress nofree nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr nocapture noundef nonnull) local_unnamed_addr #5

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

; Function Attrs: nounwind uwtable
declare hidden void @usage(ptr noundef) local_unnamed_addr #0

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @tileset_count(i32 noundef) local_unnamed_addr #6

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @tileset_remove(i32 noundef, i32 noundef) local_unnamed_addr #6

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @tileset_empty(i32 noundef) local_unnamed_addr #6

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @tileset_intersect(i32 noundef, i32 noundef) local_unnamed_addr #6

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @tileset_union(i32 noundef, i32 noundef) local_unnamed_addr #6

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @tileset_has(i32 noundef, i32 noundef) local_unnamed_addr #6

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @get_quality(ptr noundef, i32 noundef) local_unnamed_addr #6

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #7

; Function Attrs: nounwind uwtable
declare hidden ptr @make_cohort_etas(ptr noundef) local_unnamed_addr #0

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @heu_free(ptr noundef) local_unnamed_addr #6

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @tileset_add(i32 noundef, i32 noundef) local_unnamed_addr #6

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @qualities_free(ptr noundef) local_unnamed_addr #6

declare ptr @pdb_dummy(i32 noundef) local_unnamed_addr #3

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @tileset_least(i32 noundef) local_unnamed_addr #6

; Function Attrs: nounwind uwtable
declare hidden ptr @make_half_etas(ptr noalias noundef, ptr noalias noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden double @make_eta(ptr noalias noundef, ptr noalias noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden double @quality_to_hval(i64 noundef) local_unnamed_addr #6

; 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 = { 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 = { 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 #5 = { inlinehint mustprogress nofree nounwind willreturn memory(read) 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 #6 = { inlinehint 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 #7 = { noreturn 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 #8 = { nounwind }
attributes #9 = { cold }
attributes #10 = { nounwind willreturn memory(read) }
attributes #11 = { cold nounwind }
attributes #12 = { noreturn nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = !{!8, !8, i64 0}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C/C++ TBAA"}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !9, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"long long", !9, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"double", !9, i64 0}
!17 = !{!18, !12, i64 36}
!18 = !{!"heuristic", !8, i64 0, !8, i64 8, !8, i64 16, !8, i64 24, !12, i64 32, !12, i64 36, !12, i64 40}
!19 = !{!18, !8, i64 0}
!20 = !{!21, !12, i64 52}
!21 = !{!"patterndb", !22, i64 0, !12, i64 96, !8, i64 104}
!22 = !{!"index_aux", !9, i64 0, !9, i64 32, !12, i64 48, !12, i64 52, !12, i64 56, !12, i64 60, !12, i64 64, !8, i64 72}


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