; LLVM IR from mbheinen/bpa-ipf-tsp :: libgui (dmgr)

; 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.schem = type { i8, i8, i64, i64, i64, ptr }
%struct.DBID = type { ptr, i64, i64, i64, i64, i64, i64, ptr, i64 }

@.str.4 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [46 x i8], align 1

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

; Function Attrs: nounwind uwtable
declare dso_local void @db_setlock(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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

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

; Function Attrs: nounwind uwtable
define dso_local i32 @db_create(ptr noundef %0, i64 noundef %1, i64 noundef %2, ptr noundef %3) #0 {
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca ptr, align 8
  %9 = alloca [80 x i8], align 16
  %10 = alloca i64, align 8
  %11 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i64 %1, ptr %6, align 8, !tbaa !9
  store i64 %2, ptr %7, align 8, !tbaa !9
  store ptr %3, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 80, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %12 = load i64, ptr %6, align 8, !tbaa !9
  %13 = sub nsw i64 %12, 1
  store i64 %13, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  %14 = load ptr, ptr %5, align 8, !tbaa !5
  %15 = getelementptr inbounds %struct.schem, ptr %14, i64 0
  %16 = getelementptr inbounds %struct.schem, ptr %15, i32 0, i32 0
  %17 = load i8, ptr %16, align 8, !tbaa !11
  %18 = sext i8 %17 to i32
  %19 = icmp ne i32 %18, 78
  br i1 %19, label %20, label %28

20:                                               ; preds = %4
  %21 = load ptr, ptr %5, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.schem, ptr %21, i64 0
  %23 = getelementptr inbounds %struct.schem, ptr %22, i32 0, i32 0
  %24 = load i8, ptr %23, align 8, !tbaa !11
  %25 = sext i8 %24 to i32
  %26 = icmp ne i32 %25, 110
  br i1 %26, label %27, label %28

27:                                               ; preds = %20
  call void @db_exit(ptr noundef @.str.4)
  br label %28

28:                                               ; preds = %27, %20, %4
  %29 = load ptr, ptr %5, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.schem, ptr %29, i64 0
  %31 = getelementptr inbounds %struct.schem, ptr %30, i32 0, i32 1
  %32 = load i8, ptr %31, align 1, !tbaa !13
  %33 = sext i8 %32 to i32
  %34 = icmp ne i32 %33, 67
  br i1 %34, label %35, label %43

35:                                               ; preds = %28
  %36 = load ptr, ptr %5, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.schem, ptr %36, i64 0
  %38 = getelementptr inbounds %struct.schem, ptr %37, i32 0, i32 1
  %39 = load i8, ptr %38, align 1, !tbaa !13
  %40 = sext i8 %39 to i32
  %41 = icmp ne i32 %40, 99
  br i1 %41, label %42, label %43

42:                                               ; preds = %35
  call void @db_exit(ptr noundef @.str.5)
  br label %43

43:                                               ; preds = %42, %35, %28
  %44 = load ptr, ptr %5, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.schem, ptr %44, i64 0
  %46 = getelementptr inbounds %struct.schem, ptr %45, i32 0, i32 2
  %47 = load i64, ptr %46, align 8, !tbaa !14
  %48 = add i64 %47, 8
  %49 = sub i64 %48, 1
  %50 = udiv i64 %49, 8
  %51 = mul i64 %50, 8
  %52 = load ptr, ptr %8, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.DBID, ptr %52, i32 0, i32 5
  store i64 %51, ptr %53, align 8, !tbaa !15
  %54 = load ptr, ptr %8, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.DBID, ptr %54, i32 0, i32 8
  store i64 0, ptr %55, align 8, !tbaa !17
  %56 = load ptr, ptr %8, align 8, !tbaa !5
  call void @db_setlock(ptr noundef %56)
  %57 = load i64, ptr %10, align 8, !tbaa !9
  %58 = load ptr, ptr %8, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.DBID, ptr %58, i32 0, i32 4
  store i64 %57, ptr %59, align 8, !tbaa !18
  %60 = load ptr, ptr %8, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.DBID, ptr %60, i32 0, i32 2
  store i64 0, ptr %61, align 8, !tbaa !19
  %62 = load ptr, ptr %8, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.DBID, ptr %62, i32 0, i32 3
  store i64 0, ptr %63, align 8, !tbaa !20
  %64 = load ptr, ptr %8, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.DBID, ptr %64, i32 0, i32 6
  store i64 1, ptr %65, align 8, !tbaa !21
  %66 = load i64, ptr %7, align 8, !tbaa !9
  %67 = icmp sgt i64 %66, 0
  br i1 %67, label %68, label %70

68:                                               ; preds = %43
  %69 = load i64, ptr %7, align 8, !tbaa !9
  br label %71

70:                                               ; preds = %43
  br label %71

71:                                               ; preds = %70, %68
  %72 = phi i64 [ %69, %68 ], [ 16, %70 ]
  %73 = load ptr, ptr %8, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.DBID, ptr %73, i32 0, i32 1
  store i64 %72, ptr %74, align 8, !tbaa !22
  %75 = load i64, ptr %6, align 8, !tbaa !9
  %76 = mul i64 40, %75
  %77 = call noalias ptr @malloc(i64 noundef %76) #5
  %78 = load ptr, ptr %8, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.DBID, ptr %78, i32 0, i32 0
  store ptr %77, ptr %79, align 8, !tbaa !23
  %80 = load ptr, ptr %8, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.DBID, ptr %80, i32 0, i32 0
  %82 = load ptr, ptr %81, align 8, !tbaa !23
  %83 = icmp eq ptr %82, null
  br i1 %83, label %84, label %85

84:                                               ; preds = %71
  call void @db_exit(ptr noundef @.str.6)
  br label %85

85:                                               ; preds = %84, %71
  br label %86

86:                                               ; preds = %347, %85
  %87 = load i64, ptr %10, align 8, !tbaa !9
  %88 = icmp sge i64 %87, 0
  br i1 %88, label %89, label %350

89:                                               ; preds = %86
  %90 = load ptr, ptr %5, align 8, !tbaa !5
  %91 = load i64, ptr %10, align 8, !tbaa !9
  %92 = getelementptr inbounds %struct.schem, ptr %90, i64 %91
  %93 = getelementptr inbounds %struct.schem, ptr %92, i32 0, i32 3
  %94 = load i64, ptr %93, align 8, !tbaa !24
  %95 = load ptr, ptr %8, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.DBID, ptr %95, i32 0, i32 0
  %97 = load ptr, ptr %96, align 8, !tbaa !23
  %98 = load i64, ptr %10, align 8, !tbaa !9
  %99 = getelementptr inbounds [0 x %struct.schem], ptr %97, i64 0, i64 %98
  %100 = getelementptr inbounds %struct.schem, ptr %99, i32 0, i32 3
  store i64 %94, ptr %100, align 8, !tbaa !24
  %101 = icmp slt i64 %94, 0
  br i1 %101, label %102, label %103

102:                                              ; preds = %89
  call void @db_exit(ptr noundef @.str.7)
  br label %103

103:                                              ; preds = %102, %89
  %104 = load ptr, ptr %5, align 8, !tbaa !5
  %105 = load i64, ptr %10, align 8, !tbaa !9
  %106 = getelementptr inbounds %struct.schem, ptr %104, i64 %105
  %107 = getelementptr inbounds %struct.schem, ptr %106, i32 0, i32 2
  %108 = load i64, ptr %107, align 8, !tbaa !14
  %109 = load ptr, ptr %8, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.DBID, ptr %109, i32 0, i32 0
  %111 = load ptr, ptr %110, align 8, !tbaa !23
  %112 = load i64, ptr %10, align 8, !tbaa !9
  %113 = getelementptr inbounds [0 x %struct.schem], ptr %111, i64 0, i64 %112
  %114 = getelementptr inbounds %struct.schem, ptr %113, i32 0, i32 2
  store i64 %108, ptr %114, align 8, !tbaa !14
  %115 = icmp slt i64 %108, 0
  br i1 %115, label %116, label %117

116:                                              ; preds = %103
  call void @db_exit(ptr noundef @.str.8)
  br label %117

117:                                              ; preds = %116, %103
  %118 = load ptr, ptr %5, align 8, !tbaa !5
  %119 = load i64, ptr %10, align 8, !tbaa !9
  %120 = getelementptr inbounds %struct.schem, ptr %118, i64 %119
  %121 = getelementptr inbounds %struct.schem, ptr %120, i32 0, i32 0
  %122 = load i8, ptr %121, align 8, !tbaa !11
  %123 = sext i8 %122 to i32
  switch i32 %123, label %165 [
    i32 85, label %124
    i32 117, label %124
    i32 68, label %141
    i32 100, label %141
    i32 78, label %158
    i32 110, label %158
  ]

124:                                              ; preds = %117, %117
  %125 = load ptr, ptr %8, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.DBID, ptr %125, i32 0, i32 2
  %127 = load i64, ptr %126, align 8, !tbaa !19
  %128 = add nsw i64 %127, 1
  store i64 %128, ptr %126, align 8, !tbaa !19
  %129 = load ptr, ptr %8, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.DBID, ptr %129, i32 0, i32 0
  %131 = load ptr, ptr %130, align 8, !tbaa !23
  %132 = load i64, ptr %10, align 8, !tbaa !9
  %133 = getelementptr inbounds [0 x %struct.schem], ptr %131, i64 0, i64 %132
  %134 = getelementptr inbounds %struct.schem, ptr %133, i32 0, i32 4
  store i64 %127, ptr %134, align 8, !tbaa !25
  %135 = load ptr, ptr %8, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.DBID, ptr %135, i32 0, i32 0
  %137 = load ptr, ptr %136, align 8, !tbaa !23
  %138 = load i64, ptr %10, align 8, !tbaa !9
  %139 = getelementptr inbounds [0 x %struct.schem], ptr %137, i64 0, i64 %138
  %140 = getelementptr inbounds %struct.schem, ptr %139, i32 0, i32 0
  store i8 117, ptr %140, align 8, !tbaa !11
  br label %175

141:                                              ; preds = %117, %117
  %142 = load ptr, ptr %8, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.DBID, ptr %142, i32 0, i32 2
  %144 = load i64, ptr %143, align 8, !tbaa !19
  %145 = add nsw i64 %144, 1
  store i64 %145, ptr %143, align 8, !tbaa !19
  %146 = load ptr, ptr %8, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.DBID, ptr %146, i32 0, i32 0
  %148 = load ptr, ptr %147, align 8, !tbaa !23
  %149 = load i64, ptr %10, align 8, !tbaa !9
  %150 = getelementptr inbounds [0 x %struct.schem], ptr %148, i64 0, i64 %149
  %151 = getelementptr inbounds %struct.schem, ptr %150, i32 0, i32 4
  store i64 %144, ptr %151, align 8, !tbaa !25
  %152 = load ptr, ptr %8, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.DBID, ptr %152, i32 0, i32 0
  %154 = load ptr, ptr %153, align 8, !tbaa !23
  %155 = load i64, ptr %10, align 8, !tbaa !9
  %156 = getelementptr inbounds [0 x %struct.schem], ptr %154, i64 0, i64 %155
  %157 = getelementptr inbounds %struct.schem, ptr %156, i32 0, i32 0
  store i8 100, ptr %157, align 8, !tbaa !11
  br label %175

158:                                              ; preds = %117, %117
  %159 = load ptr, ptr %8, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct.DBID, ptr %159, i32 0, i32 0
  %161 = load ptr, ptr %160, align 8, !tbaa !23
  %162 = load i64, ptr %10, align 8, !tbaa !9
  %163 = getelementptr inbounds [0 x %struct.schem], ptr %161, i64 0, i64 %162
  %164 = getelementptr inbounds %struct.schem, ptr %163, i32 0, i32 0
  store i8 110, ptr %164, align 8, !tbaa !11
  br label %175

165:                                              ; preds = %117
  %166 = getelementptr inbounds [80 x i8], ptr %9, i64 0, i64 0
  %167 = load ptr, ptr %5, align 8, !tbaa !5
  %168 = load i64, ptr %10, align 8, !tbaa !9
  %169 = getelementptr inbounds %struct.schem, ptr %167, i64 %168
  %170 = getelementptr inbounds %struct.schem, ptr %169, i32 0, i32 0
  %171 = load i8, ptr %170, align 8, !tbaa !11
  %172 = sext i8 %171 to i32
  %173 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %166, ptr noundef @.str.9, i32 noundef %172) #4
  %174 = getelementptr inbounds [80 x i8], ptr %9, i64 0, i64 0
  call void @db_exit(ptr noundef %174)
  br label %175

175:                                              ; preds = %165, %158, %141, %124
  %176 = load ptr, ptr %5, align 8, !tbaa !5
  %177 = load i64, ptr %10, align 8, !tbaa !9
  %178 = getelementptr inbounds %struct.schem, ptr %176, i64 %177
  %179 = getelementptr inbounds %struct.schem, ptr %178, i32 0, i32 1
  %180 = load i8, ptr %179, align 1, !tbaa !13
  %181 = sext i8 %180 to i32
  switch i32 %181, label %328 [
    i32 73, label %182
    i32 105, label %182
    i32 67, label %206
    i32 99, label %206
    i32 70, label %219
    i32 102, label %219
    i32 68, label %243
    i32 100, label %243
    i32 76, label %267
    i32 108, label %267
    i32 85, label %310
    i32 117, label %310
  ]

182:                                              ; preds = %175, %175
  %183 = load ptr, ptr %5, align 8, !tbaa !5
  %184 = load i64, ptr %10, align 8, !tbaa !9
  %185 = getelementptr inbounds %struct.schem, ptr %183, i64 %184
  %186 = getelementptr inbounds %struct.schem, ptr %185, i32 0, i32 2
  %187 = load i64, ptr %186, align 8, !tbaa !14
  %188 = icmp ne i64 %187, 8
  br i1 %188, label %189, label %193

189:                                              ; preds = %182
  %190 = getelementptr inbounds [80 x i8], ptr %9, i64 0, i64 0
  %191 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %190, ptr noundef @.str.10, i64 noundef 8) #4
  %192 = getelementptr inbounds [80 x i8], ptr %9, i64 0, i64 0
  call void @db_exit(ptr noundef %192)
  br label %193

193:                                              ; preds = %189, %182
  %194 = load ptr, ptr %8, align 8, !tbaa !5
  %195 = getelementptr inbounds %struct.DBID, ptr %194, i32 0, i32 0
  %196 = load ptr, ptr %195, align 8, !tbaa !23
  %197 = load i64, ptr %10, align 8, !tbaa !9
  %198 = getelementptr inbounds [0 x %struct.schem], ptr %196, i64 0, i64 %197
  %199 = getelementptr inbounds %struct.schem, ptr %198, i32 0, i32 1
  store i8 105, ptr %199, align 1, !tbaa !13
  %200 = load ptr, ptr %8, align 8, !tbaa !5
  %201 = getelementptr inbounds %struct.DBID, ptr %200, i32 0, i32 0
  %202 = load ptr, ptr %201, align 8, !tbaa !23
  %203 = load i64, ptr %10, align 8, !tbaa !9
  %204 = getelementptr inbounds [0 x %struct.schem], ptr %202, i64 0, i64 %203
  %205 = getelementptr inbounds %struct.schem, ptr %204, i32 0, i32 5
  store ptr @db_intcmp, ptr %205, align 8, !tbaa !26
  br label %329

206:                                              ; preds = %175, %175
  %207 = load ptr, ptr %8, align 8, !tbaa !5
  %208 = getelementptr inbounds %struct.DBID, ptr %207, i32 0, i32 0
  %209 = load ptr, ptr %208, align 8, !tbaa !23
  %210 = load i64, ptr %10, align 8, !tbaa !9
  %211 = getelementptr inbounds [0 x %struct.schem], ptr %209, i64 0, i64 %210
  %212 = getelementptr inbounds %struct.schem, ptr %211, i32 0, i32 1
  store i8 99, ptr %212, align 1, !tbaa !13
  %213 = load ptr, ptr %8, align 8, !tbaa !5
  %214 = getelementptr inbounds %struct.DBID, ptr %213, i32 0, i32 0
  %215 = load ptr, ptr %214, align 8, !tbaa !23
  %216 = load i64, ptr %10, align 8, !tbaa !9
  %217 = getelementptr inbounds [0 x %struct.schem], ptr %215, i64 0, i64 %216
  %218 = getelementptr inbounds %struct.schem, ptr %217, i32 0, i32 5
  store ptr @db_strcmp, ptr %218, align 8, !tbaa !26
  br label %329

219:                                              ; preds = %175, %175
  %220 = load ptr, ptr %5, align 8, !tbaa !5
  %221 = load i64, ptr %10, align 8, !tbaa !9
  %222 = getelementptr inbounds %struct.schem, ptr %220, i64 %221
  %223 = getelementptr inbounds %struct.schem, ptr %222, i32 0, i32 2
  %224 = load i64, ptr %223, align 8, !tbaa !14
  %225 = icmp ne i64 %224, 4
  br i1 %225, label %226, label %230

226:                                              ; preds = %219
  %227 = getelementptr inbounds [80 x i8], ptr %9, i64 0, i64 0
  %228 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %227, ptr noundef @.str.11, i64 noundef 4) #4
  %229 = getelementptr inbounds [80 x i8], ptr %9, i64 0, i64 0
  call void @db_exit(ptr noundef %229)
  br label %230

230:                                              ; preds = %226, %219
  %231 = load ptr, ptr %8, align 8, !tbaa !5
  %232 = getelementptr inbounds %struct.DBID, ptr %231, i32 0, i32 0
  %233 = load ptr, ptr %232, align 8, !tbaa !23
  %234 = load i64, ptr %10, align 8, !tbaa !9
  %235 = getelementptr inbounds [0 x %struct.schem], ptr %233, i64 0, i64 %234
  %236 = getelementptr inbounds %struct.schem, ptr %235, i32 0, i32 1
  store i8 102, ptr %236, align 1, !tbaa !13
  %237 = load ptr, ptr %8, align 8, !tbaa !5
  %238 = getelementptr inbounds %struct.DBID, ptr %237, i32 0, i32 0
  %239 = load ptr, ptr %238, align 8, !tbaa !23
  %240 = load i64, ptr %10, align 8, !tbaa !9
  %241 = getelementptr inbounds [0 x %struct.schem], ptr %239, i64 0, i64 %240
  %242 = getelementptr inbounds %struct.schem, ptr %241, i32 0, i32 5
  store ptr @db_fltcmp, ptr %242, align 8, !tbaa !26
  br label %329

243:                                              ; preds = %175, %175
  %244 = load ptr, ptr %5, align 8, !tbaa !5
  %245 = load i64, ptr %10, align 8, !tbaa !9
  %246 = getelementptr inbounds %struct.schem, ptr %244, i64 %245
  %247 = getelementptr inbounds %struct.schem, ptr %246, i32 0, i32 2
  %248 = load i64, ptr %247, align 8, !tbaa !14
  %249 = icmp ne i64 %248, 8
  br i1 %249, label %250, label %254

250:                                              ; preds = %243
  %251 = getelementptr inbounds [80 x i8], ptr %9, i64 0, i64 0
  %252 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %251, ptr noundef @.str.12, i64 noundef 8) #4
  %253 = getelementptr inbounds [80 x i8], ptr %9, i64 0, i64 0
  call void @db_exit(ptr noundef %253)
  br label %254

254:                                              ; preds = %250, %243
  %255 = load ptr, ptr %8, align 8, !tbaa !5
  %256 = getelementptr inbounds %struct.DBID, ptr %255, i32 0, i32 0
  %257 = load ptr, ptr %256, align 8, !tbaa !23
  %258 = load i64, ptr %10, align 8, !tbaa !9
  %259 = getelementptr inbounds [0 x %struct.schem], ptr %257, i64 0, i64 %258
  %260 = getelementptr inbounds %struct.schem, ptr %259, i32 0, i32 1
  store i8 100, ptr %260, align 1, !tbaa !13
  %261 = load ptr, ptr %8, align 8, !tbaa !5
  %262 = getelementptr inbounds %struct.DBID, ptr %261, i32 0, i32 0
  %263 = load ptr, ptr %262, align 8, !tbaa !23
  %264 = load i64, ptr %10, align 8, !tbaa !9
  %265 = getelementptr inbounds [0 x %struct.schem], ptr %263, i64 0, i64 %264
  %266 = getelementptr inbounds %struct.schem, ptr %265, i32 0, i32 5
  store ptr @db_dblcmp, ptr %266, align 8, !tbaa !26
  br label %329

267:                                              ; preds = %175, %175
  %268 = load ptr, ptr %8, align 8, !tbaa !5
  %269 = getelementptr inbounds %struct.DBID, ptr %268, i32 0, i32 0
  %270 = load ptr, ptr %269, align 8, !tbaa !23
  %271 = load i64, ptr %10, align 8, !tbaa !9
  %272 = getelementptr inbounds [0 x %struct.schem], ptr %270, i64 0, i64 %271
  %273 = getelementptr inbounds %struct.schem, ptr %272, i32 0, i32 0
  %274 = load i8, ptr %273, align 8, !tbaa !11
  %275 = sext i8 %274 to i32
  %276 = icmp ne i32 %275, 110
  br i1 %276, label %277, label %278

277:                                              ; preds = %267
  call void @db_exit(ptr noundef @.str.13)
  br label %278

278:                                              ; preds = %277, %267
  %279 = load ptr, ptr %8, align 8, !tbaa !5
  %280 = getelementptr inbounds %struct.DBID, ptr %279, i32 0, i32 0
  %281 = load ptr, ptr %280, align 8, !tbaa !23
  %282 = load i64, ptr %10, align 8, !tbaa !9
  %283 = getelementptr inbounds [0 x %struct.schem], ptr %281, i64 0, i64 %282
  %284 = getelementptr inbounds %struct.schem, ptr %283, i32 0, i32 1
  store i8 108, ptr %284, align 1, !tbaa !13
  %285 = load ptr, ptr %8, align 8, !tbaa !5
  %286 = getelementptr inbounds %struct.DBID, ptr %285, i32 0, i32 3
  %287 = load i64, ptr %286, align 8, !tbaa !20
  %288 = add nsw i64 %287, 1
  store i64 %288, ptr %286, align 8, !tbaa !20
  %289 = load ptr, ptr %8, align 8, !tbaa !5
  %290 = getelementptr inbounds %struct.DBID, ptr %289, i32 0, i32 0
  %291 = load ptr, ptr %290, align 8, !tbaa !23
  %292 = load i64, ptr %10, align 8, !tbaa !9
  %293 = getelementptr inbounds [0 x %struct.schem], ptr %291, i64 0, i64 %292
  %294 = getelementptr inbounds %struct.schem, ptr %293, i32 0, i32 3
  store i64 %287, ptr %294, align 8, !tbaa !24
  %295 = load ptr, ptr %5, align 8, !tbaa !5
  %296 = load i64, ptr %10, align 8, !tbaa !9
  %297 = getelementptr inbounds %struct.schem, ptr %295, i64 %296
  %298 = getelementptr inbounds %struct.schem, ptr %297, i32 0, i32 2
  %299 = load i64, ptr %298, align 8, !tbaa !14
  %300 = add i64 %299, 8
  %301 = sub i64 %300, 1
  %302 = udiv i64 %301, 8
  %303 = mul i64 %302, 8
  %304 = load ptr, ptr %8, align 8, !tbaa !5
  %305 = getelementptr inbounds %struct.DBID, ptr %304, i32 0, i32 0
  %306 = load ptr, ptr %305, align 8, !tbaa !23
  %307 = load i64, ptr %10, align 8, !tbaa !9
  %308 = getelementptr inbounds [0 x %struct.schem], ptr %306, i64 0, i64 %307
  %309 = getelementptr inbounds %struct.schem, ptr %308, i32 0, i32 2
  store i64 %303, ptr %309, align 8, !tbaa !14
  br label %347

310:                                              ; preds = %175, %175
  %311 = load ptr, ptr %8, align 8, !tbaa !5
  %312 = getelementptr inbounds %struct.DBID, ptr %311, i32 0, i32 0
  %313 = load ptr, ptr %312, align 8, !tbaa !23
  %314 = load i64, ptr %10, align 8, !tbaa !9
  %315 = getelementptr inbounds [0 x %struct.schem], ptr %313, i64 0, i64 %314
  %316 = getelementptr inbounds %struct.schem, ptr %315, i32 0, i32 1
  store i8 117, ptr %316, align 1, !tbaa !13
  %317 = load ptr, ptr %5, align 8, !tbaa !5
  %318 = load i64, ptr %10, align 8, !tbaa !9
  %319 = getelementptr inbounds %struct.schem, ptr %317, i64 %318
  %320 = getelementptr inbounds %struct.schem, ptr %319, i32 0, i32 5
  %321 = load ptr, ptr %320, align 8, !tbaa !26
  %322 = load ptr, ptr %8, align 8, !tbaa !5
  %323 = getelementptr inbounds %struct.DBID, ptr %322, i32 0, i32 0
  %324 = load ptr, ptr %323, align 8, !tbaa !23
  %325 = load i64, ptr %10, align 8, !tbaa !9
  %326 = getelementptr inbounds [0 x %struct.schem], ptr %324, i64 0, i64 %325
  %327 = getelementptr inbounds %struct.schem, ptr %326, i32 0, i32 5
  store ptr %321, ptr %327, align 8, !tbaa !26
  br label %329

328:                                              ; preds = %175
  call void @db_exit(ptr noundef @.str.14)
  br label %329

329:                                              ; preds = %328, %310, %254, %230, %206, %193
  %330 = load ptr, ptr %5, align 8, !tbaa !5
  %331 = load i64, ptr %10, align 8, !tbaa !9
  %332 = getelementptr inbounds %struct.schem, ptr %330, i64 %331
  %333 = getelementptr inbounds %struct.schem, ptr %332, i32 0, i32 3
  %334 = load i64, ptr %333, align 8, !tbaa !24
  %335 = load ptr, ptr %5, align 8, !tbaa !5
  %336 = load i64, ptr %10, align 8, !tbaa !9
  %337 = getelementptr inbounds %struct.schem, ptr %335, i64 %336
  %338 = getelementptr inbounds %struct.schem, ptr %337, i32 0, i32 2
  %339 = load i64, ptr %338, align 8, !tbaa !14
  %340 = add nsw i64 %334, %339
  %341 = load ptr, ptr %8, align 8, !tbaa !5
  %342 = getelementptr inbounds %struct.DBID, ptr %341, i32 0, i32 5
  %343 = load i64, ptr %342, align 8, !tbaa !15
  %344 = icmp sgt i64 %340, %343
  br i1 %344, label %345, label %346

345:                                              ; preds = %329
  call void @db_exit(ptr noundef @.str.15)
  br label %346

346:                                              ; preds = %345, %329
  br label %347

347:                                              ; preds = %346, %278
  %348 = load i64, ptr %10, align 8, !tbaa !9
  %349 = add nsw i64 %348, -1
  store i64 %349, ptr %10, align 8, !tbaa !9
  br label %86, !llvm.loop !27

350:                                              ; preds = %86
  %351 = load ptr, ptr %8, align 8, !tbaa !5
  %352 = getelementptr inbounds %struct.DBID, ptr %351, i32 0, i32 2
  %353 = load i64, ptr %352, align 8, !tbaa !19
  %354 = icmp eq i64 %353, 0
  br i1 %354, label %355, label %356

355:                                              ; preds = %350
  call void @db_exit(ptr noundef @.str.16)
  br label %356

356:                                              ; preds = %355, %350
  %357 = load ptr, ptr %8, align 8, !tbaa !5
  %358 = getelementptr inbounds %struct.DBID, ptr %357, i32 0, i32 7
  %359 = load ptr, ptr %8, align 8, !tbaa !5
  %360 = getelementptr inbounds %struct.DBID, ptr %359, i32 0, i32 2
  %361 = load i64, ptr %360, align 8, !tbaa !19
  %362 = load ptr, ptr %8, align 8, !tbaa !5
  %363 = getelementptr inbounds %struct.DBID, ptr %362, i32 0, i32 5
  %364 = load i64, ptr %363, align 8, !tbaa !15
  %365 = load ptr, ptr %8, align 8, !tbaa !5
  %366 = getelementptr inbounds %struct.DBID, ptr %365, i32 0, i32 3
  %367 = load i64, ptr %366, align 8, !tbaa !20
  %368 = call i32 @db_newnode(ptr noundef %358, i64 noundef 32, i64 noundef %361, i64 noundef %364, i64 noundef %367)
  store i32 %368, ptr %11, align 4, !tbaa !29
  %369 = load ptr, ptr %8, align 8, !tbaa !5
  call void @db_resetlock(ptr noundef %369)
  %370 = load i32, ptr %11, align 4, !tbaa !29
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr %9) #4
  ret i32 %370
}

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
declare hidden i32 @db_newnode(ptr noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef) #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 allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }
attributes #5 = { nounwind allocsize(0) }

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

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


; 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.schem = type { i8, i8, i64, i64, i64, ptr }

@.str.4 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [46 x i8], align 1

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

; Function Attrs: nounwind uwtable
declare dso_local void @db_setlock(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: 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 hidden void @db_exit(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local i32 @db_create(ptr nocapture noundef readonly %0, i64 noundef %1, i64 noundef %2, ptr noundef %3) local_unnamed_addr #0 {
  %5 = alloca [80 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %5) #5
  %6 = add nsw i64 %1, -1
  %7 = load i8, ptr %0, align 8, !tbaa !5
  switch i8 %7, label %8 [
    i8 78, label %9
    i8 110, label %9
  ]

8:                                                ; preds = %4
  tail call void @db_exit(ptr noundef nonnull @.str.4)
  br label %9

9:                                                ; preds = %4, %4, %8
  %10 = getelementptr inbounds i8, ptr %0, i64 1
  %11 = load i8, ptr %10, align 1, !tbaa !11
  switch i8 %11, label %12 [
    i8 67, label %13
    i8 99, label %13
  ]

12:                                               ; preds = %9
  tail call void @db_exit(ptr noundef nonnull @.str.5)
  br label %13

13:                                               ; preds = %9, %9, %12
  %14 = getelementptr inbounds i8, ptr %0, i64 8
  %15 = load i64, ptr %14, align 8, !tbaa !12
  %16 = add i64 %15, 7
  %17 = and i64 %16, -8
  %18 = getelementptr inbounds i8, ptr %3, i64 40
  store i64 %17, ptr %18, align 8, !tbaa !13
  %19 = getelementptr inbounds i8, ptr %3, i64 64
  store i64 0, ptr %19, align 8, !tbaa !15
  tail call void @db_setlock(ptr noundef %3)
  %20 = getelementptr inbounds i8, ptr %3, i64 32
  store i64 %6, ptr %20, align 8, !tbaa !16
  %21 = getelementptr inbounds i8, ptr %3, i64 16
  %22 = getelementptr inbounds i8, ptr %3, i64 24
  %23 = getelementptr inbounds i8, ptr %3, i64 48
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %21, i8 0, i64 16, i1 false)
  store i64 1, ptr %23, align 8, !tbaa !17
  %24 = icmp sgt i64 %2, 0
  %25 = select i1 %24, i64 %2, i64 16
  %26 = getelementptr inbounds i8, ptr %3, i64 8
  store i64 %25, ptr %26, align 8, !tbaa !18
  %27 = mul i64 %1, 40
  %28 = tail call noalias ptr @malloc(i64 noundef %27) #6
  store ptr %28, ptr %3, align 8, !tbaa !19
  %29 = icmp eq ptr %28, null
  br i1 %29, label %30, label %31

30:                                               ; preds = %13
  tail call void @db_exit(ptr noundef nonnull @.str.6)
  br label %31

31:                                               ; preds = %30, %13
  %32 = icmp sgt i64 %1, 0
  br i1 %32, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %31, %127
  %.0107 = phi i64 [ %128, %127 ], [ %6, %31 ]
  %33 = getelementptr inbounds %struct.schem, ptr %0, i64 %.0107
  %34 = getelementptr inbounds i8, ptr %33, i64 16
  %35 = load i64, ptr %34, align 8, !tbaa !20
  %36 = load ptr, ptr %3, align 8, !tbaa !19
  %37 = getelementptr inbounds [0 x %struct.schem], ptr %36, i64 0, i64 %.0107, i32 3
  store i64 %35, ptr %37, align 8, !tbaa !20
  %38 = icmp slt i64 %35, 0
  br i1 %38, label %39, label %40

39:                                               ; preds = %.lr.ph
  call void @db_exit(ptr noundef nonnull @.str.7)
  %.pre = load ptr, ptr %3, align 8, !tbaa !19
  br label %40

40:                                               ; preds = %39, %.lr.ph
  %41 = phi ptr [ %.pre, %39 ], [ %36, %.lr.ph ]
  %42 = getelementptr inbounds i8, ptr %33, i64 8
  %43 = load i64, ptr %42, align 8, !tbaa !12
  %44 = getelementptr inbounds [0 x %struct.schem], ptr %41, i64 0, i64 %.0107, i32 2
  store i64 %43, ptr %44, align 8, !tbaa !12
  %45 = icmp slt i64 %43, 0
  br i1 %45, label %46, label %47

46:                                               ; preds = %40
  call void @db_exit(ptr noundef nonnull @.str.8)
  br label %47

47:                                               ; preds = %46, %40
  %48 = load i8, ptr %33, align 8, !tbaa !5
  switch i8 %48, label %64 [
    i8 85, label %49
    i8 117, label %49
    i8 68, label %55
    i8 100, label %55
    i8 78, label %61
    i8 110, label %61
  ]

49:                                               ; preds = %47, %47
  %50 = load i64, ptr %21, align 8, !tbaa !21
  %51 = add nsw i64 %50, 1
  store i64 %51, ptr %21, align 8, !tbaa !21
  %52 = load ptr, ptr %3, align 8, !tbaa !19
  %53 = getelementptr inbounds [0 x %struct.schem], ptr %52, i64 0, i64 %.0107, i32 4
  store i64 %50, ptr %53, align 8, !tbaa !22
  %54 = getelementptr inbounds [0 x %struct.schem], ptr %52, i64 0, i64 %.0107
  store i8 117, ptr %54, align 8, !tbaa !5
  br label %67

55:                                               ; preds = %47, %47
  %56 = load i64, ptr %21, align 8, !tbaa !21
  %57 = add nsw i64 %56, 1
  store i64 %57, ptr %21, align 8, !tbaa !21
  %58 = load ptr, ptr %3, align 8, !tbaa !19
  %59 = getelementptr inbounds [0 x %struct.schem], ptr %58, i64 0, i64 %.0107, i32 4
  store i64 %56, ptr %59, align 8, !tbaa !22
  %60 = getelementptr inbounds [0 x %struct.schem], ptr %58, i64 0, i64 %.0107
  store i8 100, ptr %60, align 8, !tbaa !5
  br label %67

61:                                               ; preds = %47, %47
  %62 = load ptr, ptr %3, align 8, !tbaa !19
  %63 = getelementptr inbounds [0 x %struct.schem], ptr %62, i64 0, i64 %.0107
  store i8 110, ptr %63, align 8, !tbaa !5
  br label %67

64:                                               ; preds = %47
  %65 = sext i8 %48 to i32
  %66 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %5, ptr noundef nonnull dereferenceable(1) @.str.9, i32 noundef %65) #5
  call void @db_exit(ptr noundef nonnull %5)
  br label %67

67:                                               ; preds = %64, %61, %55, %49
  %68 = getelementptr inbounds i8, ptr %33, i64 1
  %69 = load i8, ptr %68, align 1, !tbaa !11
  switch i8 %69, label %119 [
    i8 73, label %70
    i8 105, label %70
    i8 67, label %78
    i8 99, label %78
    i8 70, label %82
    i8 102, label %82
    i8 68, label %90
    i8 100, label %90
    i8 76, label %98
    i8 108, label %98
    i8 85, label %113
    i8 117, label %113
  ]

70:                                               ; preds = %67, %67
  %71 = load i64, ptr %42, align 8, !tbaa !12
  %.not106 = icmp eq i64 %71, 8
  br i1 %.not106, label %74, label %72

72:                                               ; preds = %70
  %73 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %5, ptr noundef nonnull dereferenceable(1) @.str.10, i64 noundef 8) #5
  call void @db_exit(ptr noundef nonnull %5)
  br label %74

74:                                               ; preds = %72, %70
  %75 = load ptr, ptr %3, align 8, !tbaa !19
  %76 = getelementptr inbounds [0 x %struct.schem], ptr %75, i64 0, i64 %.0107, i32 1
  store i8 105, ptr %76, align 1, !tbaa !11
  %77 = getelementptr inbounds [0 x %struct.schem], ptr %75, i64 0, i64 %.0107, i32 5
  store ptr @db_intcmp, ptr %77, align 8, !tbaa !23
  br label %120

78:                                               ; preds = %67, %67
  %79 = load ptr, ptr %3, align 8, !tbaa !19
  %80 = getelementptr inbounds [0 x %struct.schem], ptr %79, i64 0, i64 %.0107, i32 1
  store i8 99, ptr %80, align 1, !tbaa !11
  %81 = getelementptr inbounds [0 x %struct.schem], ptr %79, i64 0, i64 %.0107, i32 5
  store ptr @db_strcmp, ptr %81, align 8, !tbaa !23
  br label %120

82:                                               ; preds = %67, %67
  %83 = load i64, ptr %42, align 8, !tbaa !12
  %.not105 = icmp eq i64 %83, 4
  br i1 %.not105, label %86, label %84

84:                                               ; preds = %82
  %85 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %5, ptr noundef nonnull dereferenceable(1) @.str.11, i64 noundef 4) #5
  call void @db_exit(ptr noundef nonnull %5)
  br label %86

86:                                               ; preds = %84, %82
  %87 = load ptr, ptr %3, align 8, !tbaa !19
  %88 = getelementptr inbounds [0 x %struct.schem], ptr %87, i64 0, i64 %.0107, i32 1
  store i8 102, ptr %88, align 1, !tbaa !11
  %89 = getelementptr inbounds [0 x %struct.schem], ptr %87, i64 0, i64 %.0107, i32 5
  store ptr @db_fltcmp, ptr %89, align 8, !tbaa !23
  br label %120

90:                                               ; preds = %67, %67
  %91 = load i64, ptr %42, align 8, !tbaa !12
  %.not104 = icmp eq i64 %91, 8
  br i1 %.not104, label %94, label %92

92:                                               ; preds = %90
  %93 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %5, ptr noundef nonnull dereferenceable(1) @.str.12, i64 noundef 8) #5
  call void @db_exit(ptr noundef nonnull %5)
  br label %94

94:                                               ; preds = %92, %90
  %95 = load ptr, ptr %3, align 8, !tbaa !19
  %96 = getelementptr inbounds [0 x %struct.schem], ptr %95, i64 0, i64 %.0107, i32 1
  store i8 100, ptr %96, align 1, !tbaa !11
  %97 = getelementptr inbounds [0 x %struct.schem], ptr %95, i64 0, i64 %.0107, i32 5
  store ptr @db_dblcmp, ptr %97, align 8, !tbaa !23
  br label %120

98:                                               ; preds = %67, %67
  %99 = load ptr, ptr %3, align 8, !tbaa !19
  %100 = getelementptr inbounds [0 x %struct.schem], ptr %99, i64 0, i64 %.0107
  %101 = load i8, ptr %100, align 8, !tbaa !5
  %.not103 = icmp eq i8 %101, 110
  br i1 %.not103, label %103, label %102

102:                                              ; preds = %98
  call void @db_exit(ptr noundef nonnull @.str.13)
  %.pre109 = load ptr, ptr %3, align 8, !tbaa !19
  br label %103

103:                                              ; preds = %102, %98
  %104 = phi ptr [ %.pre109, %102 ], [ %99, %98 ]
  %105 = getelementptr inbounds [0 x %struct.schem], ptr %104, i64 0, i64 %.0107, i32 1
  store i8 108, ptr %105, align 1, !tbaa !11
  %106 = load i64, ptr %22, align 8, !tbaa !24
  %107 = add nsw i64 %106, 1
  store i64 %107, ptr %22, align 8, !tbaa !24
  %108 = getelementptr inbounds [0 x %struct.schem], ptr %104, i64 0, i64 %.0107, i32 3
  store i64 %106, ptr %108, align 8, !tbaa !20
  %109 = load i64, ptr %42, align 8, !tbaa !12
  %110 = add i64 %109, 7
  %111 = and i64 %110, -8
  %112 = getelementptr inbounds [0 x %struct.schem], ptr %104, i64 0, i64 %.0107, i32 2
  store i64 %111, ptr %112, align 8, !tbaa !12
  br label %127

113:                                              ; preds = %67, %67
  %114 = load ptr, ptr %3, align 8, !tbaa !19
  %115 = getelementptr inbounds [0 x %struct.schem], ptr %114, i64 0, i64 %.0107, i32 1
  store i8 117, ptr %115, align 1, !tbaa !11
  %116 = getelementptr inbounds i8, ptr %33, i64 32
  %117 = load ptr, ptr %116, align 8, !tbaa !23
  %118 = getelementptr inbounds [0 x %struct.schem], ptr %114, i64 0, i64 %.0107, i32 5
  store ptr %117, ptr %118, align 8, !tbaa !23
  br label %120

119:                                              ; preds = %67
  call void @db_exit(ptr noundef nonnull @.str.14)
  br label %120

120:                                              ; preds = %119, %113, %94, %86, %78, %74
  %121 = load i64, ptr %34, align 8, !tbaa !20
  %122 = load i64, ptr %42, align 8, !tbaa !12
  %123 = add nsw i64 %122, %121
  %124 = load i64, ptr %18, align 8, !tbaa !13
  %125 = icmp sgt i64 %123, %124
  br i1 %125, label %126, label %127

126:                                              ; preds = %120
  call void @db_exit(ptr noundef nonnull @.str.15)
  br label %127

127:                                              ; preds = %120, %126, %103
  %128 = add nsw i64 %.0107, -1
  %129 = icmp sgt i64 %.0107, 0
  br i1 %129, label %.lr.ph, label %._crit_edge, !llvm.loop !25

._crit_edge:                                      ; preds = %127, %31
  %130 = load i64, ptr %21, align 8, !tbaa !21
  %131 = icmp eq i64 %130, 0
  br i1 %131, label %132, label %133

132:                                              ; preds = %._crit_edge
  call void @db_exit(ptr noundef nonnull @.str.16)
  %.pre110 = load i64, ptr %21, align 8, !tbaa !21
  br label %133

133:                                              ; preds = %132, %._crit_edge
  %134 = phi i64 [ %.pre110, %132 ], [ %130, %._crit_edge ]
  %135 = getelementptr inbounds i8, ptr %3, i64 56
  %136 = load i64, ptr %18, align 8, !tbaa !13
  %137 = load i64, ptr %22, align 8, !tbaa !24
  %138 = call i32 @db_newnode(ptr noundef nonnull %135, i64 noundef 32, i64 noundef %134, i64 noundef %136, i64 noundef %137)
  call void @db_resetlock(ptr noundef nonnull %3)
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %5) #5
  ret i32 %138
}

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

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

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

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

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

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

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

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

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 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { nounwind }
attributes #6 = { nounwind allocsize(0) }

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

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


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