; LLVM IR from KamilSJaron/smudgeplot :: src_ploidyplot (libfastk)

; 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.Kmer_Stream = type { i32, i32, i64, i64, ptr, i32, i32, i32, i32, i32, i32, [10 x ptr] }
%struct.Kmer_Table = type { i32, i32, i64, [7 x ptr] }
%struct._Kmer_Table = type { i32, i32, i64, i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, i32 }

@stderr = external global ptr, align 8
@.str.20 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [58 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [24 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local ptr @Malloc(i64 noundef, ptr noundef) #0

; 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 @fprintf(ptr noundef, ptr noundef, ...) #2

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

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @Root(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #3

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

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

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #4

declare i32 @open(ptr noundef, i32 noundef, ...) #5

declare i64 @read(i32 noundef, ptr noundef, i64 noundef) #5

declare i32 @close(i32 noundef) #5

; Function Attrs: nounwind uwtable
define dso_local ptr @Load_Kmer_Table(ptr noundef %0, i32 noundef %1) #0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i64, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca i64, align 8
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca ptr, align 8
  %24 = alloca ptr, align 8
  %25 = alloca ptr, align 8
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca i64, align 8
  %31 = alloca ptr, align 8
  %32 = alloca i64, align 8
  %33 = alloca i32, align 4
  %34 = alloca i32, align 4
  %35 = alloca i64, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #8
  call void @setup_fmer_table()
  %36 = load ptr, ptr %4, align 8, !tbaa !5
  %37 = call ptr @PathTo(ptr noundef %36)
  store ptr %37, ptr %23, align 8, !tbaa !5
  %38 = load ptr, ptr %4, align 8, !tbaa !5
  %39 = call ptr @Root(ptr noundef %38, ptr noundef @.str.24)
  store ptr %39, ptr %24, align 8, !tbaa !5
  %40 = load ptr, ptr %23, align 8, !tbaa !5
  %41 = call i64 @strlen(ptr noundef %40) #9
  %42 = load ptr, ptr %24, align 8, !tbaa !5
  %43 = call i64 @strlen(ptr noundef %42) #9
  %44 = add i64 %41, %43
  %45 = add i64 %44, 20
  %46 = call ptr @Malloc(i64 noundef %45, ptr noundef @.str.20)
  store ptr %46, ptr %25, align 8, !tbaa !5
  %47 = load ptr, ptr %25, align 8, !tbaa !5
  %48 = icmp eq ptr %47, null
  br i1 %48, label %49, label %50

49:                                               ; preds = %2
  call void @exit(i32 noundef 1) #10
  unreachable

50:                                               ; preds = %2
  %51 = load ptr, ptr %25, align 8, !tbaa !5
  %52 = load ptr, ptr %23, align 8, !tbaa !5
  %53 = load ptr, ptr %24, align 8, !tbaa !5
  %54 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %51, ptr noundef @.str.25, ptr noundef %52, ptr noundef %53) #8
  %55 = load ptr, ptr %25, align 8, !tbaa !5
  %56 = call i32 (ptr, i32, ...) @open(ptr noundef %55, i32 noundef 0)
  store i32 %56, ptr %21, align 4, !tbaa !9
  %57 = load ptr, ptr %25, align 8, !tbaa !5
  %58 = load ptr, ptr %23, align 8, !tbaa !5
  %59 = load ptr, ptr %24, align 8, !tbaa !5
  %60 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %57, ptr noundef @.str.26, ptr noundef %58, ptr noundef %59) #8
  %61 = load ptr, ptr %25, align 8, !tbaa !5
  %62 = call i64 @strlen(ptr noundef %61) #9
  %63 = trunc i64 %62 to i32
  store i32 %63, ptr %22, align 4, !tbaa !9
  %64 = load ptr, ptr %24, align 8, !tbaa !5
  call void @free(ptr noundef %64) #8
  %65 = load ptr, ptr %23, align 8, !tbaa !5
  call void @free(ptr noundef %65) #8
  %66 = load i32, ptr %21, align 4, !tbaa !9
  %67 = icmp slt i32 %66, 0
  br i1 %67, label %68, label %70

68:                                               ; preds = %50
  %69 = load ptr, ptr %25, align 8, !tbaa !5
  call void @free(ptr noundef %69) #8
  store ptr null, ptr %3, align 8
  store i32 1, ptr %28, align 4
  br label %346

70:                                               ; preds = %50
  %71 = load i32, ptr %21, align 4, !tbaa !9
  %72 = call i64 @read(i32 noundef %71, ptr noundef %26, i64 noundef 4)
  %73 = load i32, ptr %21, align 4, !tbaa !9
  %74 = call i64 @read(i32 noundef %73, ptr noundef %27, i64 noundef 4)
  %75 = load i32, ptr %21, align 4, !tbaa !9
  %76 = call i64 @read(i32 noundef %75, ptr noundef %11, i64 noundef 4)
  %77 = load i32, ptr %21, align 4, !tbaa !9
  %78 = call i64 @read(i32 noundef %77, ptr noundef %12, i64 noundef 4)
  %79 = load i32, ptr %26, align 4, !tbaa !9
  store i32 %79, ptr %8, align 4, !tbaa !9
  %80 = load i32, ptr %8, align 4, !tbaa !9
  %81 = add nsw i32 %80, 3
  %82 = ashr i32 %81, 2
  store i32 %82, ptr %10, align 4, !tbaa !9
  %83 = load i32, ptr %10, align 4, !tbaa !9
  %84 = add nsw i32 %83, 2
  store i32 %84, ptr %9, align 4, !tbaa !9
  %85 = load i32, ptr %9, align 4, !tbaa !9
  %86 = load i32, ptr %12, align 4, !tbaa !9
  %87 = sub nsw i32 %85, %86
  store i32 %87, ptr %13, align 4, !tbaa !9
  %88 = load i32, ptr %10, align 4, !tbaa !9
  %89 = load i32, ptr %12, align 4, !tbaa !9
  %90 = sub nsw i32 %88, %89
  store i32 %90, ptr %14, align 4, !tbaa !9
  %91 = load i32, ptr %12, align 4, !tbaa !9
  %92 = mul nsw i32 8, %91
  %93 = shl i32 1, %92
  %94 = sext i32 %93 to i64
  store i64 %94, ptr %18, align 8, !tbaa !11
  %95 = load i64, ptr %18, align 8, !tbaa !11
  %96 = mul i64 %95, 8
  %97 = call ptr @Malloc(i64 noundef %96, ptr noundef @.str.27)
  store ptr %97, ptr %17, align 8, !tbaa !5
  %98 = load ptr, ptr %17, align 8, !tbaa !5
  %99 = icmp eq ptr %98, null
  br i1 %99, label %100, label %101

100:                                              ; preds = %70
  call void @exit(i32 noundef 1) #10
  unreachable

101:                                              ; preds = %70
  store i64 0, ptr %15, align 8, !tbaa !11
  %102 = load i32, ptr %5, align 4, !tbaa !9
  %103 = load i32, ptr %11, align 4, !tbaa !9
  %104 = icmp sgt i32 %102, %103
  br i1 %104, label %105, label %132

105:                                              ; preds = %101
  %106 = load ptr, ptr %17, align 8, !tbaa !5
  %107 = load i64, ptr %18, align 8, !tbaa !11
  %108 = mul i64 %107, 8
  call void @llvm.memset.p0.i64(ptr align 8 %106, i8 0, i64 %108, i1 false)
  %109 = load i32, ptr %21, align 4, !tbaa !9
  %110 = call i32 @close(i32 noundef %109)
  %111 = load ptr, ptr %4, align 8, !tbaa !5
  %112 = call ptr @Open_Kmer_Stream(ptr noundef %111)
  store ptr %112, ptr %7, align 8, !tbaa !5
  %113 = load ptr, ptr %7, align 8, !tbaa !5
  call void @First_Kmer_Entry(ptr noundef %113)
  br label %114

114:                                              ; preds = %128, %105
  %115 = load ptr, ptr %7, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.Kmer_Stream, ptr %115, i32 0, i32 4
  %117 = load ptr, ptr %116, align 8, !tbaa !13
  %118 = icmp ne ptr %117, null
  br i1 %118, label %119, label %130

119:                                              ; preds = %114
  %120 = load ptr, ptr %7, align 8, !tbaa !5
  %121 = call i32 @Current_Count(ptr noundef %120)
  %122 = load i32, ptr %5, align 4, !tbaa !9
  %123 = icmp sge i32 %121, %122
  br i1 %123, label %124, label %127

124:                                              ; preds = %119
  %125 = load i64, ptr %15, align 8, !tbaa !11
  %126 = add nsw i64 %125, 1
  store i64 %126, ptr %15, align 8, !tbaa !11
  br label %127

127:                                              ; preds = %124, %119
  br label %128

128:                                              ; preds = %127
  %129 = load ptr, ptr %7, align 8, !tbaa !5
  call void @Next_Kmer_Entry(ptr noundef %129)
  br label %114, !llvm.loop !15

130:                                              ; preds = %114
  %131 = load ptr, ptr %7, align 8, !tbaa !5
  call void @Free_Kmer_Stream(ptr noundef %131)
  br label %181

132:                                              ; preds = %101
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #8
  %133 = load i32, ptr %21, align 4, !tbaa !9
  %134 = load ptr, ptr %17, align 8, !tbaa !5
  %135 = load i64, ptr %18, align 8, !tbaa !11
  %136 = mul i64 %135, 8
  %137 = call i64 @read(i32 noundef %133, ptr noundef %134, i64 noundef %136)
  %138 = load i32, ptr %21, align 4, !tbaa !9
  %139 = call i32 @close(i32 noundef %138)
  store i32 1, ptr %29, align 4, !tbaa !9
  br label %140

140:                                              ; preds = %177, %132
  %141 = load i32, ptr %29, align 4, !tbaa !9
  %142 = load i32, ptr %27, align 4, !tbaa !9
  %143 = icmp sle i32 %141, %142
  br i1 %143, label %144, label %180

144:                                              ; preds = %140
  %145 = load ptr, ptr %25, align 8, !tbaa !5
  %146 = load i32, ptr %22, align 4, !tbaa !9
  %147 = sext i32 %146 to i64
  %148 = getelementptr inbounds i8, ptr %145, i64 %147
  %149 = load i32, ptr %29, align 4, !tbaa !9
  %150 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %148, ptr noundef @.str.28, i32 noundef %149) #8
  %151 = load ptr, ptr %25, align 8, !tbaa !5
  %152 = call i32 (ptr, i32, ...) @open(ptr noundef %151, i32 noundef 0)
  store i32 %152, ptr %21, align 4, !tbaa !9
  %153 = load i32, ptr %21, align 4, !tbaa !9
  %154 = icmp slt i32 %153, 0
  br i1 %154, label %155, label %159

155:                                              ; preds = %144
  %156 = load ptr, ptr @stderr, align 8, !tbaa !5
  %157 = load ptr, ptr %25, align 8, !tbaa !5
  %158 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %156, ptr noundef @.str.29, ptr noundef %157) #8
  call void @exit(i32 noundef 1) #10
  unreachable

159:                                              ; preds = %144
  %160 = load i32, ptr %21, align 4, !tbaa !9
  %161 = call i64 @read(i32 noundef %160, ptr noundef %8, i64 noundef 4)
  %162 = load i32, ptr %21, align 4, !tbaa !9
  %163 = call i64 @read(i32 noundef %162, ptr noundef %30, i64 noundef 8)
  %164 = load i64, ptr %30, align 8, !tbaa !11
  %165 = load i64, ptr %15, align 8, !tbaa !11
  %166 = add nsw i64 %165, %164
  store i64 %166, ptr %15, align 8, !tbaa !11
  %167 = load i32, ptr %8, align 4, !tbaa !9
  %168 = load i32, ptr %26, align 4, !tbaa !9
  %169 = icmp ne i32 %167, %168
  br i1 %169, label %170, label %174

170:                                              ; preds = %159
  %171 = load ptr, ptr @stderr, align 8, !tbaa !5
  %172 = load ptr, ptr %25, align 8, !tbaa !5
  %173 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %171, ptr noundef @.str.30, ptr noundef %172) #8
  call void @exit(i32 noundef 1) #10
  unreachable

174:                                              ; preds = %159
  %175 = load i32, ptr %21, align 4, !tbaa !9
  %176 = call i32 @close(i32 noundef %175)
  br label %177

177:                                              ; preds = %174
  %178 = load i32, ptr %29, align 4, !tbaa !9
  %179 = add nsw i32 %178, 1
  store i32 %179, ptr %29, align 4, !tbaa !9
  br label %140, !llvm.loop !17

180:                                              ; preds = %140
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #8
  br label %181

181:                                              ; preds = %180, %130
  %182 = call ptr @Malloc(i64 noundef 72, ptr noundef @.str.31)
  store ptr %182, ptr %6, align 8, !tbaa !5
  %183 = load i64, ptr %15, align 8, !tbaa !11
  %184 = load i32, ptr %13, align 4, !tbaa !9
  %185 = sext i32 %184 to i64
  %186 = mul nsw i64 %183, %185
  %187 = call ptr @Malloc(i64 noundef %186, ptr noundef @.str.32)
  store ptr %187, ptr %16, align 8, !tbaa !5
  %188 = load ptr, ptr %6, align 8, !tbaa !5
  %189 = icmp eq ptr %188, null
  br i1 %189, label %193, label %190

190:                                              ; preds = %181
  %191 = load ptr, ptr %16, align 8, !tbaa !5
  %192 = icmp eq ptr %191, null
  br i1 %192, label %193, label %194

193:                                              ; preds = %190, %181
  call void @exit(i32 noundef 1) #10
  unreachable

194:                                              ; preds = %190
  %195 = load i32, ptr %5, align 4, !tbaa !9
  %196 = load i32, ptr %11, align 4, !tbaa !9
  %197 = icmp sgt i32 %195, %196
  br i1 %197, label %198, label %259

198:                                              ; preds = %194
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #8
  %199 = load ptr, ptr %4, align 8, !tbaa !5
  %200 = call ptr @Open_Kmer_Stream(ptr noundef %199)
  store ptr %200, ptr %7, align 8, !tbaa !5
  %201 = load ptr, ptr %16, align 8, !tbaa !5
  store ptr %201, ptr %31, align 8, !tbaa !5
  %202 = load ptr, ptr %7, align 8, !tbaa !5
  call void @First_Kmer_Entry(ptr noundef %202)
  br label %203

203:                                              ; preds = %232, %198
  %204 = load ptr, ptr %7, align 8, !tbaa !5
  %205 = getelementptr inbounds %struct.Kmer_Stream, ptr %204, i32 0, i32 4
  %206 = load ptr, ptr %205, align 8, !tbaa !13
  %207 = icmp ne ptr %206, null
  br i1 %207, label %208, label %234

208:                                              ; preds = %203
  %209 = load ptr, ptr %7, align 8, !tbaa !5
  %210 = call i32 @Current_Count(ptr noundef %209)
  %211 = load i32, ptr %5, align 4, !tbaa !9
  %212 = icmp sge i32 %210, %211
  br i1 %212, label %213, label %231

213:                                              ; preds = %208
  %214 = load ptr, ptr %31, align 8, !tbaa !5
  %215 = load ptr, ptr %7, align 8, !tbaa !5
  %216 = getelementptr inbounds %struct.Kmer_Stream, ptr %215, i32 0, i32 4
  %217 = load ptr, ptr %216, align 8, !tbaa !13
  %218 = load i32, ptr %13, align 4, !tbaa !9
  call void @mycpy(ptr noundef %214, ptr noundef %217, i32 noundef %218)
  %219 = load i32, ptr %13, align 4, !tbaa !9
  %220 = load ptr, ptr %31, align 8, !tbaa !5
  %221 = sext i32 %219 to i64
  %222 = getelementptr inbounds i8, ptr %220, i64 %221
  store ptr %222, ptr %31, align 8, !tbaa !5
  %223 = load ptr, ptr %17, align 8, !tbaa !5
  %224 = load ptr, ptr %7, align 8, !tbaa !5
  %225 = getelementptr inbounds %struct.Kmer_Stream, ptr %224, i32 0, i32 5
  %226 = load i32, ptr %225, align 8, !tbaa !18
  %227 = sext i32 %226 to i64
  %228 = getelementptr inbounds i64, ptr %223, i64 %227
  %229 = load i64, ptr %228, align 8, !tbaa !11
  %230 = add nsw i64 %229, 1
  store i64 %230, ptr %228, align 8, !tbaa !11
  br label %231

231:                                              ; preds = %213, %208
  br label %232

232:                                              ; preds = %231
  %233 = load ptr, ptr %7, align 8, !tbaa !5
  call void @Next_Kmer_Entry(ptr noundef %233)
  br label %203, !llvm.loop !19

234:                                              ; preds = %203
  %235 = load ptr, ptr %7, align 8, !tbaa !5
  call void @Free_Kmer_Stream(ptr noundef %235)
  store i64 0, ptr %32, align 8, !tbaa !11
  store i32 0, ptr %33, align 4, !tbaa !9
  br label %236

236:                                              ; preds = %254, %234
  %237 = load i32, ptr %33, align 4, !tbaa !9
  %238 = sext i32 %237 to i64
  %239 = load i64, ptr %18, align 8, !tbaa !11
  %240 = icmp slt i64 %238, %239
  br i1 %240, label %241, label %257

241:                                              ; preds = %236
  %242 = load ptr, ptr %17, align 8, !tbaa !5
  %243 = load i32, ptr %33, align 4, !tbaa !9
  %244 = sext i32 %243 to i64
  %245 = getelementptr inbounds i64, ptr %242, i64 %244
  %246 = load i64, ptr %245, align 8, !tbaa !11
  %247 = load i64, ptr %32, align 8, !tbaa !11
  %248 = add nsw i64 %247, %246
  store i64 %248, ptr %32, align 8, !tbaa !11
  %249 = load i64, ptr %32, align 8, !tbaa !11
  %250 = load ptr, ptr %17, align 8, !tbaa !5
  %251 = load i32, ptr %33, align 4, !tbaa !9
  %252 = sext i32 %251 to i64
  %253 = getelementptr inbounds i64, ptr %250, i64 %252
  store i64 %249, ptr %253, align 8, !tbaa !11
  br label %254

254:                                              ; preds = %241
  %255 = load i32, ptr %33, align 4, !tbaa !9
  %256 = add nsw i32 %255, 1
  store i32 %256, ptr %33, align 4, !tbaa !9
  br label %236, !llvm.loop !20

257:                                              ; preds = %236
  %258 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %258, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #8
  br label %298

259:                                              ; preds = %194
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #8
  store i64 0, ptr %15, align 8, !tbaa !11
  store i32 1, ptr %34, align 4, !tbaa !9
  br label %260

260:                                              ; preds = %294, %259
  %261 = load i32, ptr %34, align 4, !tbaa !9
  %262 = load i32, ptr %27, align 4, !tbaa !9
  %263 = icmp sle i32 %261, %262
  br i1 %263, label %264, label %297

264:                                              ; preds = %260
  %265 = load ptr, ptr %25, align 8, !tbaa !5
  %266 = load i32, ptr %22, align 4, !tbaa !9
  %267 = sext i32 %266 to i64
  %268 = getelementptr inbounds i8, ptr %265, i64 %267
  %269 = load i32, ptr %34, align 4, !tbaa !9
  %270 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %268, ptr noundef @.str.28, i32 noundef %269) #8
  %271 = load ptr, ptr %25, align 8, !tbaa !5
  %272 = call i32 (ptr, i32, ...) @open(ptr noundef %271, i32 noundef 0)
  store i32 %272, ptr %21, align 4, !tbaa !9
  %273 = load i32, ptr %21, align 4, !tbaa !9
  %274 = call i64 @read(i32 noundef %273, ptr noundef %8, i64 noundef 4)
  %275 = load i32, ptr %21, align 4, !tbaa !9
  %276 = call i64 @read(i32 noundef %275, ptr noundef %35, i64 noundef 8)
  %277 = load i32, ptr %21, align 4, !tbaa !9
  %278 = load ptr, ptr %16, align 8, !tbaa !5
  %279 = load i64, ptr %15, align 8, !tbaa !11
  %280 = load i32, ptr %13, align 4, !tbaa !9
  %281 = sext i32 %280 to i64
  %282 = mul nsw i64 %279, %281
  %283 = getelementptr inbounds i8, ptr %278, i64 %282
  %284 = load i64, ptr %35, align 8, !tbaa !11
  %285 = load i32, ptr %13, align 4, !tbaa !9
  %286 = sext i32 %285 to i64
  %287 = mul nsw i64 %284, %286
  %288 = call i64 @big_read(i32 noundef %277, ptr noundef %283, i64 noundef %287)
  %289 = load i64, ptr %35, align 8, !tbaa !11
  %290 = load i64, ptr %15, align 8, !tbaa !11
  %291 = add nsw i64 %290, %289
  store i64 %291, ptr %15, align 8, !tbaa !11
  %292 = load i32, ptr %21, align 4, !tbaa !9
  %293 = call i32 @close(i32 noundef %292)
  br label %294

294:                                              ; preds = %264
  %295 = load i32, ptr %34, align 4, !tbaa !9
  %296 = add nsw i32 %295, 1
  store i32 %296, ptr %34, align 4, !tbaa !9
  br label %260, !llvm.loop !21

297:                                              ; preds = %260
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #8
  br label %298

298:                                              ; preds = %297, %257
  %299 = load ptr, ptr %25, align 8, !tbaa !5
  call void @free(ptr noundef %299) #8
  %300 = load i64, ptr %18, align 8, !tbaa !11
  %301 = trunc i64 %300 to i32
  %302 = load i64, ptr %15, align 8, !tbaa !11
  %303 = load ptr, ptr %17, align 8, !tbaa !5
  %304 = call ptr @inverse_index(i32 noundef %301, i64 noundef %302, ptr noundef %303, ptr noundef %20)
  store ptr %304, ptr %19, align 8, !tbaa !5
  %305 = load i32, ptr %8, align 4, !tbaa !9
  %306 = load ptr, ptr %6, align 8, !tbaa !5
  %307 = getelementptr inbounds %struct.Kmer_Table, ptr %306, i32 0, i32 0
  store i32 %305, ptr %307, align 8, !tbaa !22
  %308 = load i32, ptr %11, align 4, !tbaa !9
  %309 = load ptr, ptr %6, align 8, !tbaa !5
  %310 = getelementptr inbounds %struct.Kmer_Table, ptr %309, i32 0, i32 1
  store i32 %308, ptr %310, align 4, !tbaa !24
  %311 = load i64, ptr %15, align 8, !tbaa !11
  %312 = load ptr, ptr %6, align 8, !tbaa !5
  %313 = getelementptr inbounds %struct.Kmer_Table, ptr %312, i32 0, i32 2
  store i64 %311, ptr %313, align 8, !tbaa !25
  %314 = load i32, ptr %9, align 4, !tbaa !9
  %315 = load ptr, ptr %6, align 8, !tbaa !5
  %316 = getelementptr inbounds %struct._Kmer_Table, ptr %315, i32 0, i32 5
  store i32 %314, ptr %316, align 8, !tbaa !26
  %317 = load i32, ptr %10, align 4, !tbaa !9
  %318 = load ptr, ptr %6, align 8, !tbaa !5
  %319 = getelementptr inbounds %struct._Kmer_Table, ptr %318, i32 0, i32 4
  store i32 %317, ptr %319, align 4, !tbaa !28
  %320 = load i32, ptr %12, align 4, !tbaa !9
  %321 = load ptr, ptr %6, align 8, !tbaa !5
  %322 = getelementptr inbounds %struct._Kmer_Table, ptr %321, i32 0, i32 3
  store i32 %320, ptr %322, align 8, !tbaa !29
  %323 = load i32, ptr %13, align 4, !tbaa !9
  %324 = load ptr, ptr %6, align 8, !tbaa !5
  %325 = getelementptr inbounds %struct._Kmer_Table, ptr %324, i32 0, i32 7
  store i32 %323, ptr %325, align 8, !tbaa !30
  %326 = load i32, ptr %14, align 4, !tbaa !9
  %327 = load ptr, ptr %6, align 8, !tbaa !5
  %328 = getelementptr inbounds %struct._Kmer_Table, ptr %327, i32 0, i32 6
  store i32 %326, ptr %328, align 4, !tbaa !31
  %329 = load i64, ptr %18, align 8, !tbaa !11
  %330 = trunc i64 %329 to i32
  %331 = load ptr, ptr %6, align 8, !tbaa !5
  %332 = getelementptr inbounds %struct._Kmer_Table, ptr %331, i32 0, i32 8
  store i32 %330, ptr %332, align 4, !tbaa !32
  %333 = load ptr, ptr %16, align 8, !tbaa !5
  %334 = load ptr, ptr %6, align 8, !tbaa !5
  %335 = getelementptr inbounds %struct._Kmer_Table, ptr %334, i32 0, i32 9
  store ptr %333, ptr %335, align 8, !tbaa !33
  %336 = load ptr, ptr %17, align 8, !tbaa !5
  %337 = load ptr, ptr %6, align 8, !tbaa !5
  %338 = getelementptr inbounds %struct._Kmer_Table, ptr %337, i32 0, i32 10
  store ptr %336, ptr %338, align 8, !tbaa !34
  %339 = load ptr, ptr %19, align 8, !tbaa !5
  %340 = load ptr, ptr %6, align 8, !tbaa !5
  %341 = getelementptr inbounds %struct._Kmer_Table, ptr %340, i32 0, i32 11
  store ptr %339, ptr %341, align 8, !tbaa !35
  %342 = load i32, ptr %20, align 4, !tbaa !9
  %343 = load ptr, ptr %6, align 8, !tbaa !5
  %344 = getelementptr inbounds %struct._Kmer_Table, ptr %343, i32 0, i32 12
  store i32 %342, ptr %344, align 8, !tbaa !36
  %345 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %345, ptr %3, align 8
  store i32 1, ptr %28, align 4
  br label %346

346:                                              ; preds = %298, %68
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 4, 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 8, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  %347 = load ptr, ptr %3, align 8
  ret ptr %347
}

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

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

; Function Attrs: inlinehint nounwind uwtable
declare dso_local void @First_Kmer_Entry(ptr noundef) #7

; Function Attrs: inlinehint nounwind uwtable
declare dso_local i32 @Current_Count(ptr noundef) #7

; Function Attrs: inlinehint nounwind uwtable
declare dso_local void @Next_Kmer_Entry(ptr noundef) #7

; Function Attrs: nounwind uwtable
declare dso_local void @Free_Kmer_Stream(ptr noundef) #0

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @mycpy(ptr noundef, ptr noundef, i32 noundef) #7

; Function Attrs: inlinehint nounwind uwtable
declare hidden i64 @big_read(i32 noundef, ptr noundef, i64 noundef) #7

; Function Attrs: nounwind uwtable
declare hidden ptr @inverse_index(i32 noundef, i64 noundef, ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @setup_fmer_table() #0

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 = { 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 = { 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 #5 = { "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: write) }
attributes #7 = { 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 #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 = !{!"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, !12, i64 0}
!12 = !{!"long long", !7, i64 0}
!13 = !{!14, !6, i64 24}
!14 = !{!"", !10, i64 0, !10, i64 4, !12, i64 8, !12, i64 16, !6, i64 24, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !10, i64 48, !10, i64 52, !7, i64 56}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}
!18 = !{!14, !10, i64 32}
!19 = distinct !{!19, !16}
!20 = distinct !{!20, !16}
!21 = distinct !{!21, !16}
!22 = !{!23, !10, i64 0}
!23 = !{!"", !10, i64 0, !10, i64 4, !12, i64 8, !7, i64 16}
!24 = !{!23, !10, i64 4}
!25 = !{!23, !12, i64 8}
!26 = !{!27, !10, i64 24}
!27 = !{!"", !10, i64 0, !10, i64 4, !12, i64 8, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !6, i64 40, !6, i64 48, !6, i64 56, !10, i64 64}
!28 = !{!27, !10, i64 20}
!29 = !{!27, !10, i64 16}
!30 = !{!27, !10, i64 32}
!31 = !{!27, !10, i64 28}
!32 = !{!27, !10, i64 36}
!33 = !{!27, !6, i64 40}
!34 = !{!27, !6, i64 48}
!35 = !{!27, !6, i64 56}
!36 = !{!27, !10, i64 64}


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

@stderr = external local_unnamed_addr global ptr, align 8
@.str.20 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [58 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [24 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local ptr @Malloc(i64 noundef, ptr noundef) local_unnamed_addr #0

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

; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) 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) #1

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

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #3

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

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

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #5

; Function Attrs: nofree
declare noundef i32 @open(ptr nocapture noundef readonly, i32 noundef, ...) local_unnamed_addr #6

; Function Attrs: nofree
declare noundef i64 @read(i32 noundef, ptr nocapture noundef, i64 noundef) local_unnamed_addr #6

declare i32 @close(i32 noundef) local_unnamed_addr #7

; Function Attrs: nounwind uwtable
define dso_local ptr @Load_Kmer_Table(ptr noundef %0, i32 noundef %1) local_unnamed_addr #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #10
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #10
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #10
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #10
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #10
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #10
  tail call void @setup_fmer_table()
  %11 = tail call ptr @PathTo(ptr noundef %0)
  %12 = tail call ptr @Root(ptr noundef %0, ptr noundef nonnull @.str.24)
  %13 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %11) #11
  %14 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %12) #11
  %15 = add i64 %13, 20
  %16 = add i64 %15, %14
  %17 = tail call ptr @Malloc(i64 noundef %16, ptr noundef nonnull @.str.20)
  %18 = icmp eq ptr %17, null
  br i1 %18, label %19, label %20

19:                                               ; preds = %2
  tail call void @exit(i32 noundef 1) #12
  unreachable

20:                                               ; preds = %2
  %21 = tail call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %17, ptr noundef nonnull dereferenceable(1) @.str.25, ptr noundef %11, ptr noundef %12) #10
  %22 = tail call i32 (ptr, i32, ...) @open(ptr noundef nonnull %17, i32 noundef 0) #10
  %23 = tail call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %17, ptr noundef nonnull dereferenceable(1) @.str.26, ptr noundef %11, ptr noundef %12) #10
  %24 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %17) #11
  tail call void @free(ptr noundef %12) #10
  tail call void @free(ptr noundef %11) #10
  %25 = icmp slt i32 %22, 0
  br i1 %25, label %26, label %27

26:                                               ; preds = %20
  tail call void @free(ptr noundef nonnull %17) #10
  br label %158

27:                                               ; preds = %20
  %28 = call i64 @read(i32 noundef %22, ptr noundef nonnull %7, i64 noundef 4) #10
  %29 = call i64 @read(i32 noundef %22, ptr noundef nonnull %8, i64 noundef 4) #10
  %30 = call i64 @read(i32 noundef %22, ptr noundef nonnull %4, i64 noundef 4) #10
  %31 = call i64 @read(i32 noundef %22, ptr noundef nonnull %5, i64 noundef 4) #10
  %32 = load i32, ptr %7, align 4, !tbaa !5
  store i32 %32, ptr %3, align 4, !tbaa !5
  %33 = add nsw i32 %32, 3
  %34 = ashr i32 %33, 2
  %35 = add nsw i32 %34, 2
  %36 = load i32, ptr %5, align 4, !tbaa !5
  %37 = sub nsw i32 %35, %36
  %38 = sub nsw i32 %34, %36
  %39 = shl nsw i32 %36, 3
  %40 = shl nuw i32 1, %39
  %41 = shl i32 8, %39
  %42 = zext nneg i32 %41 to i64
  %43 = tail call ptr @Malloc(i64 noundef %42, ptr noundef nonnull @.str.27)
  %44 = icmp eq ptr %43, null
  br i1 %44, label %45, label %46

45:                                               ; preds = %27
  tail call void @exit(i32 noundef 1) #12
  unreachable

46:                                               ; preds = %27
  %47 = load i32, ptr %4, align 4, !tbaa !5
  %48 = icmp slt i32 %47, %1
  br i1 %48, label %49, label %57

49:                                               ; preds = %46
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %43, i8 0, i64 %42, i1 false)
  %50 = tail call i32 @close(i32 noundef %22) #10
  %51 = tail call ptr @Open_Kmer_Stream(ptr noundef %0)
  tail call void @First_Kmer_Entry(ptr noundef %51)
  %52 = getelementptr inbounds i8, ptr %51, i64 24
  %53 = load ptr, ptr %52, align 8, !tbaa !9
  %.not145156 = icmp eq ptr %53, null
  br i1 %.not145156, label %._crit_edge160, label %.lr.ph159

.lr.ph159:                                        ; preds = %49, %.lr.ph159
  %.0133157 = phi i64 [ %spec.select, %.lr.ph159 ], [ 0, %49 ]
  %54 = tail call i32 @Current_Count(ptr noundef nonnull %51)
  %.not150 = icmp sge i32 %54, %1
  %55 = zext i1 %.not150 to i64
  %spec.select = add nuw nsw i64 %.0133157, %55
  tail call void @Next_Kmer_Entry(ptr noundef nonnull %51)
  %56 = load ptr, ptr %52, align 8, !tbaa !9
  %.not145 = icmp eq ptr %56, null
  br i1 %.not145, label %._crit_edge160, label %.lr.ph159, !llvm.loop !13

._crit_edge160:                                   ; preds = %.lr.ph159, %49
  %.0133.lcssa = phi i64 [ 0, %49 ], [ %spec.select, %.lr.ph159 ]
  tail call void @Free_Kmer_Stream(ptr noundef nonnull %51)
  br label %82

57:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #10
  %58 = tail call i64 @read(i32 noundef %22, ptr noundef nonnull %43, i64 noundef %42) #10
  %59 = tail call i32 @close(i32 noundef %22) #10
  %60 = load i32, ptr %8, align 4, !tbaa !5
  %.not153 = icmp slt i32 %60, 1
  br i1 %.not153, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %57
  %sext = shl i64 %24, 32
  %61 = ashr exact i64 %sext, 32
  %62 = getelementptr inbounds i8, ptr %17, i64 %61
  br label %63

63:                                               ; preds = %.lr.ph, %77
  %.0131155 = phi i32 [ 1, %.lr.ph ], [ %81, %77 ]
  %.2154 = phi i64 [ 0, %.lr.ph ], [ %79, %77 ]
  %64 = tail call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %62, ptr noundef nonnull dereferenceable(1) @.str.28, i32 noundef %.0131155) #10
  %65 = tail call i32 (ptr, i32, ...) @open(ptr noundef nonnull %17, i32 noundef 0) #10
  %66 = icmp slt i32 %65, 0
  br i1 %66, label %67, label %70

67:                                               ; preds = %63
  %68 = load ptr, ptr @stderr, align 8, !tbaa !15
  %69 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %68, ptr noundef nonnull @.str.29, ptr noundef nonnull %17) #13
  tail call void @exit(i32 noundef 1) #12
  unreachable

70:                                               ; preds = %63
  %71 = call i64 @read(i32 noundef %65, ptr noundef nonnull %3, i64 noundef 4) #10
  %72 = call i64 @read(i32 noundef %65, ptr noundef nonnull %9, i64 noundef 8) #10
  %73 = load i32, ptr %3, align 4, !tbaa !5
  %.not144 = icmp eq i32 %73, %32
  br i1 %.not144, label %77, label %74

74:                                               ; preds = %70
  %75 = load ptr, ptr @stderr, align 8, !tbaa !15
  %76 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %75, ptr noundef nonnull @.str.30, ptr noundef nonnull %17) #13
  tail call void @exit(i32 noundef 1) #12
  unreachable

77:                                               ; preds = %70
  %78 = load i64, ptr %9, align 8, !tbaa !16
  %79 = add nsw i64 %78, %.2154
  %80 = tail call i32 @close(i32 noundef %65) #10
  %81 = add nuw i32 %.0131155, 1
  %exitcond.not = icmp eq i32 %.0131155, %60
  br i1 %exitcond.not, label %._crit_edge, label %63, !llvm.loop !17

._crit_edge:                                      ; preds = %77, %57
  %.2.lcssa = phi i64 [ 0, %57 ], [ %79, %77 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #10
  br label %82

82:                                               ; preds = %._crit_edge, %._crit_edge160
  %.3 = phi i64 [ %.0133.lcssa, %._crit_edge160 ], [ %.2.lcssa, %._crit_edge ]
  %83 = tail call ptr @Malloc(i64 noundef 72, ptr noundef nonnull @.str.31)
  %84 = sext i32 %37 to i64
  %85 = mul nsw i64 %.3, %84
  %86 = tail call ptr @Malloc(i64 noundef %85, ptr noundef nonnull @.str.32)
  %87 = icmp eq ptr %83, null
  %88 = icmp eq ptr %86, null
  %or.cond = select i1 %87, i1 true, i1 %88
  br i1 %or.cond, label %89, label %90

89:                                               ; preds = %82
  tail call void @exit(i32 noundef 1) #12
  unreachable

90:                                               ; preds = %82
  br i1 %48, label %91, label %122

91:                                               ; preds = %90
  %92 = tail call ptr @Open_Kmer_Stream(ptr noundef %0)
  tail call void @First_Kmer_Entry(ptr noundef %92)
  %93 = getelementptr inbounds i8, ptr %92, i64 24
  %94 = load ptr, ptr %93, align 8, !tbaa !9
  %.not148169 = icmp eq ptr %94, null
  br i1 %.not148169, label %._crit_edge173, label %.lr.ph172

.lr.ph172:                                        ; preds = %91
  %95 = getelementptr inbounds i8, ptr %92, i64 32
  br label %96

96:                                               ; preds = %.lr.ph172, %106
  %.0130170 = phi ptr [ %86, %.lr.ph172 ], [ %.1, %106 ]
  %97 = tail call i32 @Current_Count(ptr noundef nonnull %92)
  %.not149 = icmp slt i32 %97, %1
  br i1 %.not149, label %106, label %98

98:                                               ; preds = %96
  %99 = load ptr, ptr %93, align 8, !tbaa !9
  tail call void @mycpy(ptr noundef %.0130170, ptr noundef %99, i32 noundef %37)
  %100 = getelementptr inbounds i8, ptr %.0130170, i64 %84
  %101 = load i32, ptr %95, align 8, !tbaa !18
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds i64, ptr %43, i64 %102
  %104 = load i64, ptr %103, align 8, !tbaa !16
  %105 = add nsw i64 %104, 1
  store i64 %105, ptr %103, align 8, !tbaa !16
  br label %106

106:                                              ; preds = %96, %98
  %.1 = phi ptr [ %100, %98 ], [ %.0130170, %96 ]
  tail call void @Next_Kmer_Entry(ptr noundef nonnull %92)
  %107 = load ptr, ptr %93, align 8, !tbaa !9
  %.not148 = icmp eq ptr %107, null
  br i1 %.not148, label %._crit_edge173, label %96, !llvm.loop !19

._crit_edge173:                                   ; preds = %106, %91
  tail call void @Free_Kmer_Stream(ptr noundef nonnull %92)
  %wide.trip.count = zext nneg i32 %40 to i64
  %xtraiter = and i64 %wide.trip.count, 1
  %108 = icmp eq i32 %36, 0
  br i1 %108, label %.loopexit.loopexit.unr-lcssa, label %._crit_edge173.new

._crit_edge173.new:                               ; preds = %._crit_edge173
  %unroll_iter = and i64 %wide.trip.count, 16843008
  br label %109

109:                                              ; preds = %109, %._crit_edge173.new
  %indvars.iv = phi i64 [ 0, %._crit_edge173.new ], [ %indvars.iv.next.3, %109 ]
  %.0129174 = phi i64 [ 0, %._crit_edge173.new ], [ %121, %109 ]
  %niter = phi i64 [ 0, %._crit_edge173.new ], [ %niter.next.3, %109 ]
  %110 = getelementptr inbounds i64, ptr %43, i64 %indvars.iv
  %111 = load i64, ptr %110, align 8, !tbaa !16
  %112 = add nsw i64 %111, %.0129174
  store i64 %112, ptr %110, align 8, !tbaa !16
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %113 = getelementptr inbounds i64, ptr %43, i64 %indvars.iv.next
  %114 = load i64, ptr %113, align 8, !tbaa !16
  %115 = add nsw i64 %114, %112
  store i64 %115, ptr %113, align 8, !tbaa !16
  %indvars.iv.next.1 = or disjoint i64 %indvars.iv, 2
  %116 = getelementptr inbounds i64, ptr %43, i64 %indvars.iv.next.1
  %117 = load i64, ptr %116, align 8, !tbaa !16
  %118 = add nsw i64 %117, %115
  store i64 %118, ptr %116, align 8, !tbaa !16
  %indvars.iv.next.2 = or disjoint i64 %indvars.iv, 3
  %119 = getelementptr inbounds i64, ptr %43, i64 %indvars.iv.next.2
  %120 = load i64, ptr %119, align 8, !tbaa !16
  %121 = add nsw i64 %120, %118
  store i64 %121, ptr %119, align 8, !tbaa !16
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %.loopexit.loopexit.unr-lcssa, label %109, !llvm.loop !20

122:                                              ; preds = %90
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #10
  %123 = load i32, ptr %8, align 4, !tbaa !5
  %.not146162 = icmp slt i32 %123, 1
  br i1 %.not146162, label %._crit_edge167, label %.lr.ph166

.lr.ph166:                                        ; preds = %122
  %sext147 = shl i64 %24, 32
  %124 = ashr exact i64 %sext147, 32
  %125 = getelementptr inbounds i8, ptr %17, i64 %124
  br label %126

126:                                              ; preds = %.lr.ph166, %126
  %.0164 = phi i32 [ 1, %.lr.ph166 ], [ %138, %126 ]
  %.4163 = phi i64 [ 0, %.lr.ph166 ], [ %136, %126 ]
  %127 = tail call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %125, ptr noundef nonnull dereferenceable(1) @.str.28, i32 noundef %.0164) #10
  %128 = tail call i32 (ptr, i32, ...) @open(ptr noundef nonnull %17, i32 noundef 0) #10
  %129 = call i64 @read(i32 noundef %128, ptr noundef nonnull %3, i64 noundef 4) #10
  %130 = call i64 @read(i32 noundef %128, ptr noundef nonnull %10, i64 noundef 8) #10
  %131 = mul nsw i64 %.4163, %84
  %132 = getelementptr inbounds i8, ptr %86, i64 %131
  %133 = load i64, ptr %10, align 8, !tbaa !16
  %134 = mul nsw i64 %133, %84
  %135 = tail call i64 @big_read(i32 noundef %128, ptr noundef %132, i64 noundef %134)
  %136 = add nsw i64 %133, %.4163
  %137 = tail call i32 @close(i32 noundef %128) #10
  %138 = add nuw i32 %.0164, 1
  %exitcond177.not = icmp eq i32 %.0164, %123
  br i1 %exitcond177.not, label %._crit_edge167.loopexit, label %126, !llvm.loop !21

._crit_edge167.loopexit:                          ; preds = %126
  %.pre.pre = load i32, ptr %3, align 4, !tbaa !5
  br label %._crit_edge167

._crit_edge167:                                   ; preds = %._crit_edge167.loopexit, %122
  %.pre = phi i32 [ %32, %122 ], [ %.pre.pre, %._crit_edge167.loopexit ]
  %.4.lcssa = phi i64 [ 0, %122 ], [ %136, %._crit_edge167.loopexit ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #10
  br label %.loopexit

.loopexit.loopexit.unr-lcssa:                     ; preds = %109, %._crit_edge173
  %indvars.iv.unr = phi i64 [ 0, %._crit_edge173 ], [ %indvars.iv.next.3, %109 ]
  %.0129174.unr = phi i64 [ 0, %._crit_edge173 ], [ %121, %109 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.loopexit, label %.epil.preheader

.epil.preheader:                                  ; preds = %.loopexit.loopexit.unr-lcssa, %.epil.preheader
  %indvars.iv.epil = phi i64 [ %indvars.iv.next.epil, %.epil.preheader ], [ %indvars.iv.unr, %.loopexit.loopexit.unr-lcssa ]
  %.0129174.epil = phi i64 [ %141, %.epil.preheader ], [ %.0129174.unr, %.loopexit.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %.loopexit.loopexit.unr-lcssa ]
  %139 = getelementptr inbounds i64, ptr %43, i64 %indvars.iv.epil
  %140 = load i64, ptr %139, align 8, !tbaa !16
  %141 = add nsw i64 %140, %.0129174.epil
  store i64 %141, ptr %139, align 8, !tbaa !16
  %indvars.iv.next.epil = add nuw nsw i64 %indvars.iv.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %.loopexit, label %.epil.preheader, !llvm.loop !22

.loopexit:                                        ; preds = %.loopexit.loopexit.unr-lcssa, %.epil.preheader, %._crit_edge167
  %142 = phi i32 [ %47, %._crit_edge167 ], [ %1, %.epil.preheader ], [ %1, %.loopexit.loopexit.unr-lcssa ]
  %143 = phi i32 [ %.pre, %._crit_edge167 ], [ %32, %.epil.preheader ], [ %32, %.loopexit.loopexit.unr-lcssa ]
  %.5 = phi i64 [ %.4.lcssa, %._crit_edge167 ], [ %.3, %.epil.preheader ], [ %.3, %.loopexit.loopexit.unr-lcssa ]
  tail call void @free(ptr noundef %17) #10
  %144 = call ptr @inverse_index(i32 noundef %40, i64 noundef %.5, ptr noundef nonnull %43, ptr noundef nonnull %6)
  store i32 %143, ptr %83, align 8, !tbaa !24
  %145 = getelementptr inbounds i8, ptr %83, i64 4
  store i32 %142, ptr %145, align 4, !tbaa !26
  %146 = getelementptr inbounds i8, ptr %83, i64 8
  store i64 %.5, ptr %146, align 8, !tbaa !27
  %147 = getelementptr inbounds i8, ptr %83, i64 24
  store i32 %35, ptr %147, align 8, !tbaa !28
  %148 = getelementptr inbounds i8, ptr %83, i64 20
  store i32 %34, ptr %148, align 4, !tbaa !30
  %149 = getelementptr inbounds i8, ptr %83, i64 16
  store i32 %36, ptr %149, align 8, !tbaa !31
  %150 = getelementptr inbounds i8, ptr %83, i64 32
  store i32 %37, ptr %150, align 8, !tbaa !32
  %151 = getelementptr inbounds i8, ptr %83, i64 28
  store i32 %38, ptr %151, align 4, !tbaa !33
  %152 = getelementptr inbounds i8, ptr %83, i64 36
  store i32 %40, ptr %152, align 4, !tbaa !34
  %153 = getelementptr inbounds i8, ptr %83, i64 40
  store ptr %86, ptr %153, align 8, !tbaa !35
  %154 = getelementptr inbounds i8, ptr %83, i64 48
  store ptr %43, ptr %154, align 8, !tbaa !36
  %155 = getelementptr inbounds i8, ptr %83, i64 56
  store ptr %144, ptr %155, align 8, !tbaa !37
  %156 = load i32, ptr %6, align 4, !tbaa !5
  %157 = getelementptr inbounds i8, ptr %83, i64 64
  store i32 %156, ptr %157, align 8, !tbaa !38
  br label %158

158:                                              ; preds = %.loopexit, %26
  %.0132 = phi ptr [ null, %26 ], [ %83, %.loopexit ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #10
  ret ptr %.0132
}

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

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

; Function Attrs: inlinehint nounwind uwtable
declare dso_local void @First_Kmer_Entry(ptr noundef) local_unnamed_addr #9

; Function Attrs: inlinehint nounwind uwtable
declare dso_local i32 @Current_Count(ptr noundef) local_unnamed_addr #9

; Function Attrs: inlinehint nounwind uwtable
declare dso_local void @Next_Kmer_Entry(ptr noundef) local_unnamed_addr #9

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @mycpy(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #9

; Function Attrs: inlinehint nounwind uwtable
declare hidden i64 @big_read(i32 noundef, ptr noundef, i64 noundef) local_unnamed_addr #9

; Function Attrs: nounwind uwtable
declare hidden ptr @inverse_index(i32 noundef, i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden void @setup_fmer_table() local_unnamed_addr #0

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 #6 = { nofree "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 = { "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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #9 = { 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 #10 = { nounwind }
attributes #11 = { nounwind willreturn memory(read) }
attributes #12 = { noreturn nounwind }
attributes #13 = { cold 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, !12, i64 24}
!10 = !{!"", !6, i64 0, !6, i64 4, !11, i64 8, !11, i64 16, !12, i64 24, !6, i64 32, !6, i64 36, !6, i64 40, !6, i64 44, !6, i64 48, !6, i64 52, !7, i64 56}
!11 = !{!"long long", !7, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!12, !12, i64 0}
!16 = !{!11, !11, i64 0}
!17 = distinct !{!17, !14}
!18 = !{!10, !6, i64 32}
!19 = distinct !{!19, !14}
!20 = distinct !{!20, !14}
!21 = distinct !{!21, !14}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.unroll.disable"}
!24 = !{!25, !6, i64 0}
!25 = !{!"", !6, i64 0, !6, i64 4, !11, i64 8, !7, i64 16}
!26 = !{!25, !6, i64 4}
!27 = !{!25, !11, i64 8}
!28 = !{!29, !6, i64 24}
!29 = !{!"", !6, i64 0, !6, i64 4, !11, i64 8, !6, i64 16, !6, i64 20, !6, i64 24, !6, i64 28, !6, i64 32, !6, i64 36, !12, i64 40, !12, i64 48, !12, i64 56, !6, i64 64}
!30 = !{!29, !6, i64 20}
!31 = !{!29, !6, i64 16}
!32 = !{!29, !6, i64 32}
!33 = !{!29, !6, i64 28}
!34 = !{!29, !6, i64 36}
!35 = !{!29, !12, i64 40}
!36 = !{!29, !12, i64 48}
!37 = !{!29, !12, i64 56}
!38 = !{!29, !6, i64 64}


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