; LLVM IR from cruppstahl/upscaledb :: tools/ups_bench/upscaledb.ll (ZN15UpscaleDatabase12do_create_dbEi)

; 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.ups_parameter_t = type { i32, i64 }
%class.Database = type { ptr, i32, ptr }
%struct.Configuration = type <{ i8, [3 x i8], i32, i8, i8, i8, [5 x i8], %"class.std::__cxx11::basic_string", i8, [3 x i8], i32, i32, i32, i8, [3 x i8], i32, i64, i64, i64, i64, i32, i8, [3 x i8], i32, i32, i32, i32, i8, i8, [2 x i8], i32, i8, [3 x i8], i32, i8, i8, i8, i8, i8, [3 x i8], i32, i32, i32, i8, i8, i8, i8, i32, i32, %"class.std::__cxx11::basic_string", i32, i32, i32, i8, i8, [2 x i8], i32, i32, i32, i8, i8, i8, i8, i32, i8, i8, [2 x i8] }>
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%class.UpscaleDatabase = type { %class.Database, ptr, ptr, %struct.ups_env_metrics_t, ptr }
%struct.ups_env_metrics_t = type { i16, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, %struct.btree_metrics_t, %struct.btree_metrics_t, i32 }
%struct.btree_metrics_t = type { i16, i64, i64, i64, i32, %struct.min_max_avg_u32_t, %struct.min_max_avg_u32_t, %struct.min_max_avg_u32_t, %struct.min_max_avg_u32_t, %struct.min_max_avg_u32_t, %struct.min_max_avg_u32_t, %struct.min_max_avg_u32_t, %struct.min_max_avg_u32_t, %struct.min_max_avg_u32_t }
%struct.min_max_avg_u32_t = type { i32, i32, i32, i32, i32 }

@_ZN15UpscaleDatabase6ms_envE = external dso_local global ptr, align 8
@.str.4 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [83 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [21 x i8], align 1
@__PRETTY_FUNCTION__._ZN15UpscaleDatabase12do_create_dbEi = external hidden unnamed_addr constant [56 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [45 x i8], align 1

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

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

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

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

declare ptr @ups_strerror(i32 noundef) #2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN15UpscaleDatabase12do_create_dbEi(ptr noundef nonnull align 8 dereferenceable(712) %0, i32 noundef %1) unnamed_addr #4 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca [8 x %struct.ups_parameter_t], align 16
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store i32 %1, ptr %4, align 4, !tbaa !9
  %9 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.start.p0(i64 128, ptr %6) #6
  call void @llvm.memset.p0.i64(ptr align 16 %6, i8 0, i64 128, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 0, ptr %7, align 4, !tbaa !9
  %10 = load i32, ptr %7, align 4, !tbaa !9
  %11 = sext i32 %10 to i64
  %12 = getelementptr inbounds [8 x %struct.ups_parameter_t], ptr %6, i64 0, i64 %11
  %13 = getelementptr inbounds %struct.ups_parameter_t, ptr %12, i32 0, i32 0
  store i32 258, ptr %13, align 16, !tbaa !11
  %14 = load i32, ptr %7, align 4, !tbaa !9
  %15 = sext i32 %14 to i64
  %16 = getelementptr inbounds [8 x %struct.ups_parameter_t], ptr %6, i64 0, i64 %15
  %17 = getelementptr inbounds %struct.ups_parameter_t, ptr %16, i32 0, i32 1
  store i64 0, ptr %17, align 8, !tbaa !14
  %18 = load i32, ptr %7, align 4, !tbaa !9
  %19 = add nsw i32 %18, 1
  store i32 %19, ptr %7, align 4, !tbaa !9
  %20 = getelementptr inbounds %class.Database, ptr %9, i32 0, i32 2
  %21 = load ptr, ptr %20, align 8, !tbaa !15
  %22 = getelementptr inbounds %struct.Configuration, ptr %21, i32 0, i32 10
  %23 = load i32, ptr %22, align 4, !tbaa !17
  switch i32 %23, label %134 [
    i32 2, label %24
    i32 0, label %51
    i32 1, label %51
    i32 3, label %68
    i32 4, label %79
    i32 5, label %90
    i32 6, label %101
    i32 7, label %112
    i32 8, label %123
  ]

24:                                               ; preds = %2
  %25 = getelementptr inbounds %class.Database, ptr %9, i32 0, i32 2
  %26 = load ptr, ptr %25, align 8, !tbaa !15
  %27 = getelementptr inbounds %struct.Configuration, ptr %26, i32 0, i32 21
  %28 = load i8, ptr %27, align 4, !tbaa !22, !range !23, !noundef !24
  %29 = trunc i8 %28 to i1
  br i1 %29, label %30, label %35

30:                                               ; preds = %24
  %31 = getelementptr inbounds %class.Database, ptr %9, i32 0, i32 2
  %32 = load ptr, ptr %31, align 8, !tbaa !15
  %33 = getelementptr inbounds %struct.Configuration, ptr %32, i32 0, i32 20
  %34 = load i32, ptr %33, align 8, !tbaa !25
  br label %36

35:                                               ; preds = %24
  br label %36

36:                                               ; preds = %35, %30
  %37 = phi i32 [ %34, %30 ], [ 65535, %35 ]
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds [8 x %struct.ups_parameter_t], ptr %6, i64 0, i64 0
  %40 = getelementptr inbounds %struct.ups_parameter_t, ptr %39, i32 0, i32 1
  store i64 %38, ptr %40, align 8, !tbaa !14
  %41 = load i32, ptr %7, align 4, !tbaa !9
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds [8 x %struct.ups_parameter_t], ptr %6, i64 0, i64 %42
  %44 = getelementptr inbounds %struct.ups_parameter_t, ptr %43, i32 0, i32 0
  store i32 260, ptr %44, align 16, !tbaa !11
  %45 = load i32, ptr %7, align 4, !tbaa !9
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds [8 x %struct.ups_parameter_t], ptr %6, i64 0, i64 %46
  %48 = getelementptr inbounds %struct.ups_parameter_t, ptr %47, i32 0, i32 1
  store i64 1, ptr %48, align 8, !tbaa !14
  %49 = load i32, ptr %7, align 4, !tbaa !9
  %50 = add nsw i32 %49, 1
  store i32 %50, ptr %7, align 4, !tbaa !9
  br label %135

51:                                               ; preds = %2, %2
  %52 = getelementptr inbounds %class.Database, ptr %9, i32 0, i32 2
  %53 = load ptr, ptr %52, align 8, !tbaa !15
  %54 = getelementptr inbounds %struct.Configuration, ptr %53, i32 0, i32 21
  %55 = load i8, ptr %54, align 4, !tbaa !22, !range !23, !noundef !24
  %56 = trunc i8 %55 to i1
  br i1 %56, label %57, label %62

57:                                               ; preds = %51
  %58 = getelementptr inbounds %class.Database, ptr %9, i32 0, i32 2
  %59 = load ptr, ptr %58, align 8, !tbaa !15
  %60 = getelementptr inbounds %struct.Configuration, ptr %59, i32 0, i32 20
  %61 = load i32, ptr %60, align 8, !tbaa !25
  br label %63

62:                                               ; preds = %51
  br label %63

63:                                               ; preds = %62, %57
  %64 = phi i32 [ %61, %57 ], [ 65535, %62 ]
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [8 x %struct.ups_parameter_t], ptr %6, i64 0, i64 0
  %67 = getelementptr inbounds %struct.ups_parameter_t, ptr %66, i32 0, i32 1
  store i64 %65, ptr %67, align 8, !tbaa !14
  br label %135

68:                                               ; preds = %2
  %69 = load i32, ptr %7, align 4, !tbaa !9
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [8 x %struct.ups_parameter_t], ptr %6, i64 0, i64 %70
  %72 = getelementptr inbounds %struct.ups_parameter_t, ptr %71, i32 0, i32 0
  store i32 260, ptr %72, align 16, !tbaa !11
  %73 = load i32, ptr %7, align 4, !tbaa !9
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds [8 x %struct.ups_parameter_t], ptr %6, i64 0, i64 %74
  %76 = getelementptr inbounds %struct.ups_parameter_t, ptr %75, i32 0, i32 1
  store i64 3, ptr %76, align 8, !tbaa !14
  %77 = load i32, ptr %7, align 4, !tbaa !9
  %78 = add nsw i32 %77, 1
  store i32 %78, ptr %7, align 4, !tbaa !9
  br label %135

79:                                               ; preds = %2
  %80 = load i32, ptr %7, align 4, !tbaa !9
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [8 x %struct.ups_parameter_t], ptr %6, i64 0, i64 %81
  %83 = getelementptr inbounds %struct.ups_parameter_t, ptr %82, i32 0, i32 0
  store i32 260, ptr %83, align 16, !tbaa !11
  %84 = load i32, ptr %7, align 4, !tbaa !9
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds [8 x %struct.ups_parameter_t], ptr %6, i64 0, i64 %85
  %87 = getelementptr inbounds %struct.ups_parameter_t, ptr %86, i32 0, i32 1
  store i64 5, ptr %87, align 8, !tbaa !14
  %88 = load i32, ptr %7, align 4, !tbaa !9
  %89 = add nsw i32 %88, 1
  store i32 %89, ptr %7, align 4, !tbaa !9
  br label %135

90:                                               ; preds = %2
  %91 = load i32, ptr %7, align 4, !tbaa !9
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [8 x %struct.ups_parameter_t], ptr %6, i64 0, i64 %92
  %94 = getelementptr inbounds %struct.ups_parameter_t, ptr %93, i32 0, i32 0
  store i32 260, ptr %94, align 16, !tbaa !11
  %95 = load i32, ptr %7, align 4, !tbaa !9
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [8 x %struct.ups_parameter_t], ptr %6, i64 0, i64 %96
  %98 = getelementptr inbounds %struct.ups_parameter_t, ptr %97, i32 0, i32 1
  store i64 7, ptr %98, align 8, !tbaa !14
  %99 = load i32, ptr %7, align 4, !tbaa !9
  %100 = add nsw i32 %99, 1
  store i32 %100, ptr %7, align 4, !tbaa !9
  br label %135

101:                                              ; preds = %2
  %102 = load i32, ptr %7, align 4, !tbaa !9
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [8 x %struct.ups_parameter_t], ptr %6, i64 0, i64 %103
  %105 = getelementptr inbounds %struct.ups_parameter_t, ptr %104, i32 0, i32 0
  store i32 260, ptr %105, align 16, !tbaa !11
  %106 = load i32, ptr %7, align 4, !tbaa !9
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds [8 x %struct.ups_parameter_t], ptr %6, i64 0, i64 %107
  %109 = getelementptr inbounds %struct.ups_parameter_t, ptr %108, i32 0, i32 1
  store i64 9, ptr %109, align 8, !tbaa !14
  %110 = load i32, ptr %7, align 4, !tbaa !9
  %111 = add nsw i32 %110, 1
  store i32 %111, ptr %7, align 4, !tbaa !9
  br label %135

112:                                              ; preds = %2
  %113 = load i32, ptr %7, align 4, !tbaa !9
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [8 x %struct.ups_parameter_t], ptr %6, i64 0, i64 %114
  %116 = getelementptr inbounds %struct.ups_parameter_t, ptr %115, i32 0, i32 0
  store i32 260, ptr %116, align 16, !tbaa !11
  %117 = load i32, ptr %7, align 4, !tbaa !9
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds [8 x %struct.ups_parameter_t], ptr %6, i64 0, i64 %118
  %120 = getelementptr inbounds %struct.ups_parameter_t, ptr %119, i32 0, i32 1
  store i64 11, ptr %120, align 8, !tbaa !14
  %121 = load i32, ptr %7, align 4, !tbaa !9
  %122 = add nsw i32 %121, 1
  store i32 %122, ptr %7, align 4, !tbaa !9
  br label %135

123:                                              ; preds = %2
  %124 = load i32, ptr %7, align 4, !tbaa !9
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds [8 x %struct.ups_parameter_t], ptr %6, i64 0, i64 %125
  %127 = getelementptr inbounds %struct.ups_parameter_t, ptr %126, i32 0, i32 0
  store i32 260, ptr %127, align 16, !tbaa !11
  %128 = load i32, ptr %7, align 4, !tbaa !9
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds [8 x %struct.ups_parameter_t], ptr %6, i64 0, i64 %129
  %131 = getelementptr inbounds %struct.ups_parameter_t, ptr %130, i32 0, i32 1
  store i64 12, ptr %131, align 8, !tbaa !14
  %132 = load i32, ptr %7, align 4, !tbaa !9
  %133 = add nsw i32 %132, 1
  store i32 %133, ptr %7, align 4, !tbaa !9
  br label %135

134:                                              ; preds = %2
  call void @__assert_fail(ptr noundef @.str.10, ptr noundef @.str.8, i32 noundef 323, ptr noundef @__PRETTY_FUNCTION__._ZN15UpscaleDatabase12do_create_dbEi) #7
  unreachable

135:                                              ; preds = %123, %112, %101, %90, %79, %68, %63, %36
  %136 = getelementptr inbounds %class.Database, ptr %9, i32 0, i32 2
  %137 = load ptr, ptr %136, align 8, !tbaa !15
  %138 = getelementptr inbounds %struct.Configuration, ptr %137, i32 0, i32 11
  %139 = load i32, ptr %138, align 8, !tbaa !26
  switch i32 %139, label %207 [
    i32 0, label %140
    i32 1, label %140
    i32 3, label %141
    i32 4, label %152
    i32 5, label %163
    i32 6, label %174
    i32 7, label %185
    i32 8, label %196
  ]

140:                                              ; preds = %135, %135
  br label %208

141:                                              ; preds = %135
  %142 = load i32, ptr %7, align 4, !tbaa !9
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds [8 x %struct.ups_parameter_t], ptr %6, i64 0, i64 %143
  %145 = getelementptr inbounds %struct.ups_parameter_t, ptr %144, i32 0, i32 0
  store i32 274, ptr %145, align 16, !tbaa !11
  %146 = load i32, ptr %7, align 4, !tbaa !9
  %147 = sext i32 %146 to i64
  %148 = getelementptr inbounds [8 x %struct.ups_parameter_t], ptr %6, i64 0, i64 %147
  %149 = getelementptr inbounds %struct.ups_parameter_t, ptr %148, i32 0, i32 1
  store i64 3, ptr %149, align 8, !tbaa !14
  %150 = load i32, ptr %7, align 4, !tbaa !9
  %151 = add nsw i32 %150, 1
  store i32 %151, ptr %7, align 4, !tbaa !9
  br label %208

152:                                              ; preds = %135
  %153 = load i32, ptr %7, align 4, !tbaa !9
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds [8 x %struct.ups_parameter_t], ptr %6, i64 0, i64 %154
  %156 = getelementptr inbounds %struct.ups_parameter_t, ptr %155, i32 0, i32 0
  store i32 274, ptr %156, align 16, !tbaa !11
  %157 = load i32, ptr %7, align 4, !tbaa !9
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds [8 x %struct.ups_parameter_t], ptr %6, i64 0, i64 %158
  %160 = getelementptr inbounds %struct.ups_parameter_t, ptr %159, i32 0, i32 1
  store i64 5, ptr %160, align 8, !tbaa !14
  %161 = load i32, ptr %7, align 4, !tbaa !9
  %162 = add nsw i32 %161, 1
  store i32 %162, ptr %7, align 4, !tbaa !9
  br label %208

163:                                              ; preds = %135
  %164 = load i32, ptr %7, align 4, !tbaa !9
  %165 = sext i32 %164 to i64
  %166 = getelementptr inbounds [8 x %struct.ups_parameter_t], ptr %6, i64 0, i64 %165
  %167 = getelementptr inbounds %struct.ups_parameter_t, ptr %166, i32 0, i32 0
  store i32 274, ptr %167, align 16, !tbaa !11
  %168 = load i32, ptr %7, align 4, !tbaa !9
  %169 = sext i32 %168 to i64
  %170 = getelementptr inbounds [8 x %struct.ups_parameter_t], ptr %6, i64 0, i64 %169
  %171 = getelementptr inbounds %struct.ups_parameter_t, ptr %170, i32 0, i32 1
  store i64 7, ptr %171, align 8, !tbaa !14
  %172 = load i32, ptr %7, align 4, !tbaa !9
  %173 = add nsw i32 %172, 1
  store i32 %173, ptr %7, align 4, !tbaa !9
  br label %208

174:                                              ; preds = %135
  %175 = load i32, ptr %7, align 4, !tbaa !9
  %176 = sext i32 %175 to i64
  %177 = getelementptr inbounds [8 x %struct.ups_parameter_t], ptr %6, i64 0, i64 %176
  %178 = getelementptr inbounds %struct.ups_parameter_t, ptr %177, i32 0, i32 0
  store i32 274, ptr %178, align 16, !tbaa !11
  %179 = load i32, ptr %7, align 4, !tbaa !9
  %180 = sext i32 %179 to i64
  %181 = getelementptr inbounds [8 x %struct.ups_parameter_t], ptr %6, i64 0, i64 %180
  %182 = getelementptr inbounds %struct.ups_parameter_t, ptr %181, i32 0, i32 1
  store i64 9, ptr %182, align 8, !tbaa !14
  %183 = load i32, ptr %7, align 4, !tbaa !9
  %184 = add nsw i32 %183, 1
  store i32 %184, ptr %7, align 4, !tbaa !9
  br label %208

185:                                              ; preds = %135
  %186 = load i32, ptr %7, align 4, !tbaa !9
  %187 = sext i32 %186 to i64
  %188 = getelementptr inbounds [8 x %struct.ups_parameter_t], ptr %6, i64 0, i64 %187
  %189 = getelementptr inbounds %struct.ups_parameter_t, ptr %188, i32 0, i32 0
  store i32 274, ptr %189, align 16, !tbaa !11
  %190 = load i32, ptr %7, align 4, !tbaa !9
  %191 = sext i32 %190 to i64
  %192 = getelementptr inbounds [8 x %struct.ups_parameter_t], ptr %6, i64 0, i64 %191
  %193 = getelementptr inbounds %struct.ups_parameter_t, ptr %192, i32 0, i32 1
  store i64 11, ptr %193, align 8, !tbaa !14
  %194 = load i32, ptr %7, align 4, !tbaa !9
  %195 = add nsw i32 %194, 1
  store i32 %195, ptr %7, align 4, !tbaa !9
  br label %208

196:                                              ; preds = %135
  %197 = load i32, ptr %7, align 4, !tbaa !9
  %198 = sext i32 %197 to i64
  %199 = getelementptr inbounds [8 x %struct.ups_parameter_t], ptr %6, i64 0, i64 %198
  %200 = getelementptr inbounds %struct.ups_parameter_t, ptr %199, i32 0, i32 0
  store i32 274, ptr %200, align 16, !tbaa !11
  %201 = load i32, ptr %7, align 4, !tbaa !9
  %202 = sext i32 %201 to i64
  %203 = getelementptr inbounds [8 x %struct.ups_parameter_t], ptr %6, i64 0, i64 %202
  %204 = getelementptr inbounds %struct.ups_parameter_t, ptr %203, i32 0, i32 1
  store i64 12, ptr %204, align 8, !tbaa !14
  %205 = load i32, ptr %7, align 4, !tbaa !9
  %206 = add nsw i32 %205, 1
  store i32 %206, ptr %7, align 4, !tbaa !9
  br label %208

207:                                              ; preds = %135
  call void @__assert_fail(ptr noundef @.str.10, ptr noundef @.str.8, i32 noundef 360, ptr noundef @__PRETTY_FUNCTION__._ZN15UpscaleDatabase12do_create_dbEi) #7
  unreachable

208:                                              ; preds = %196, %185, %174, %163, %152, %141, %140
  %209 = load i32, ptr %7, align 4, !tbaa !9
  %210 = sext i32 %209 to i64
  %211 = getelementptr inbounds [8 x %struct.ups_parameter_t], ptr %6, i64 0, i64 %210
  %212 = getelementptr inbounds %struct.ups_parameter_t, ptr %211, i32 0, i32 0
  store i32 264, ptr %212, align 16, !tbaa !11
  %213 = getelementptr inbounds %class.Database, ptr %9, i32 0, i32 2
  %214 = load ptr, ptr %213, align 8, !tbaa !15
  %215 = getelementptr inbounds %struct.Configuration, ptr %214, i32 0, i32 12
  %216 = load i32, ptr %215, align 4, !tbaa !27
  %217 = zext i32 %216 to i64
  %218 = load i32, ptr %7, align 4, !tbaa !9
  %219 = sext i32 %218 to i64
  %220 = getelementptr inbounds [8 x %struct.ups_parameter_t], ptr %6, i64 0, i64 %219
  %221 = getelementptr inbounds %struct.ups_parameter_t, ptr %220, i32 0, i32 1
  store i64 %217, ptr %221, align 8, !tbaa !14
  %222 = load i32, ptr %7, align 4, !tbaa !9
  %223 = add nsw i32 %222, 1
  store i32 %223, ptr %7, align 4, !tbaa !9
  %224 = getelementptr inbounds %class.Database, ptr %9, i32 0, i32 2
  %225 = load ptr, ptr %224, align 8, !tbaa !15
  %226 = getelementptr inbounds %struct.Configuration, ptr %225, i32 0, i32 57
  %227 = load i32, ptr %226, align 4, !tbaa !28
  %228 = icmp ne i32 %227, 0
  br i1 %228, label %229, label %245

229:                                              ; preds = %208
  %230 = load i32, ptr %7, align 4, !tbaa !9
  %231 = sext i32 %230 to i64
  %232 = getelementptr inbounds [8 x %struct.ups_parameter_t], ptr %6, i64 0, i64 %231
  %233 = getelementptr inbounds %struct.ups_parameter_t, ptr %232, i32 0, i32 0
  store i32 4097, ptr %233, align 16, !tbaa !11
  %234 = getelementptr inbounds %class.Database, ptr %9, i32 0, i32 2
  %235 = load ptr, ptr %234, align 8, !tbaa !15
  %236 = getelementptr inbounds %struct.Configuration, ptr %235, i32 0, i32 57
  %237 = load i32, ptr %236, align 4, !tbaa !28
  %238 = sext i32 %237 to i64
  %239 = load i32, ptr %7, align 4, !tbaa !9
  %240 = sext i32 %239 to i64
  %241 = getelementptr inbounds [8 x %struct.ups_parameter_t], ptr %6, i64 0, i64 %240
  %242 = getelementptr inbounds %struct.ups_parameter_t, ptr %241, i32 0, i32 1
  store i64 %238, ptr %242, align 8, !tbaa !14
  %243 = load i32, ptr %7, align 4, !tbaa !9
  %244 = add nsw i32 %243, 1
  store i32 %244, ptr %7, align 4, !tbaa !9
  br label %245

245:                                              ; preds = %229, %208
  %246 = getelementptr inbounds %class.Database, ptr %9, i32 0, i32 2
  %247 = load ptr, ptr %246, align 8, !tbaa !15
  %248 = getelementptr inbounds %struct.Configuration, ptr %247, i32 0, i32 58
  %249 = load i32, ptr %248, align 8, !tbaa !29
  %250 = icmp ne i32 %249, 0
  br i1 %250, label %251, label %267

251:                                              ; preds = %245
  %252 = load i32, ptr %7, align 4, !tbaa !9
  %253 = sext i32 %252 to i64
  %254 = getelementptr inbounds [8 x %struct.ups_parameter_t], ptr %6, i64 0, i64 %253
  %255 = getelementptr inbounds %struct.ups_parameter_t, ptr %254, i32 0, i32 0
  store i32 4098, ptr %255, align 16, !tbaa !11
  %256 = getelementptr inbounds %class.Database, ptr %9, i32 0, i32 2
  %257 = load ptr, ptr %256, align 8, !tbaa !15
  %258 = getelementptr inbounds %struct.Configuration, ptr %257, i32 0, i32 58
  %259 = load i32, ptr %258, align 8, !tbaa !29
  %260 = sext i32 %259 to i64
  %261 = load i32, ptr %7, align 4, !tbaa !9
  %262 = sext i32 %261 to i64
  %263 = getelementptr inbounds [8 x %struct.ups_parameter_t], ptr %6, i64 0, i64 %262
  %264 = getelementptr inbounds %struct.ups_parameter_t, ptr %263, i32 0, i32 1
  store i64 %260, ptr %264, align 8, !tbaa !14
  %265 = load i32, ptr %7, align 4, !tbaa !9
  %266 = add nsw i32 %265, 1
  store i32 %266, ptr %7, align 4, !tbaa !9
  br label %267

267:                                              ; preds = %251, %245
  %268 = getelementptr inbounds %class.Database, ptr %9, i32 0, i32 2
  %269 = load ptr, ptr %268, align 8, !tbaa !15
  %270 = getelementptr inbounds %struct.Configuration, ptr %269, i32 0, i32 10
  %271 = load i32, ptr %270, align 4, !tbaa !17
  %272 = icmp eq i32 %271, 2
  br i1 %272, label %273, label %285

273:                                              ; preds = %267
  %274 = call i32 @ups_register_compare(ptr noundef @.str.11, ptr noundef @_ZL12compare_keysP8ups_db_tPKhjS2_j)
  %275 = load i32, ptr %7, align 4, !tbaa !9
  %276 = sext i32 %275 to i64
  %277 = getelementptr inbounds [8 x %struct.ups_parameter_t], ptr %6, i64 0, i64 %276
  %278 = getelementptr inbounds %struct.ups_parameter_t, ptr %277, i32 0, i32 0
  store i32 273, ptr %278, align 16, !tbaa !11
  %279 = load i32, ptr %7, align 4, !tbaa !9
  %280 = sext i32 %279 to i64
  %281 = getelementptr inbounds [8 x %struct.ups_parameter_t], ptr %6, i64 0, i64 %280
  %282 = getelementptr inbounds %struct.ups_parameter_t, ptr %281, i32 0, i32 1
  store i64 ptrtoint (ptr @.str.11 to i64), ptr %282, align 8, !tbaa !14
  %283 = load i32, ptr %7, align 4, !tbaa !9
  %284 = add nsw i32 %283, 1
  store i32 %284, ptr %7, align 4, !tbaa !9
  br label %285

285:                                              ; preds = %273, %267
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  store i32 0, ptr %8, align 4, !tbaa !9
  %286 = getelementptr inbounds %class.Database, ptr %9, i32 0, i32 2
  %287 = load ptr, ptr %286, align 8, !tbaa !15
  %288 = getelementptr inbounds %struct.Configuration, ptr %287, i32 0, i32 30
  %289 = load i32, ptr %288, align 4, !tbaa !30
  %290 = icmp ne i32 %289, 0
  %291 = zext i1 %290 to i64
  %292 = select i1 %290, i32 16384, i32 0
  %293 = load i32, ptr %8, align 4, !tbaa !9
  %294 = or i32 %293, %292
  store i32 %294, ptr %8, align 4, !tbaa !9
  %295 = getelementptr inbounds %class.Database, ptr %9, i32 0, i32 2
  %296 = load ptr, ptr %295, align 8, !tbaa !15
  %297 = getelementptr inbounds %struct.Configuration, ptr %296, i32 0, i32 61
  %298 = load i8, ptr %297, align 2, !tbaa !31, !range !23, !noundef !24
  %299 = trunc i8 %298 to i1
  %300 = zext i1 %299 to i64
  %301 = select i1 %299, i32 4096, i32 0
  %302 = load i32, ptr %8, align 4, !tbaa !9
  %303 = or i32 %302, %301
  store i32 %303, ptr %8, align 4, !tbaa !9
  %304 = getelementptr inbounds %class.Database, ptr %9, i32 0, i32 2
  %305 = load ptr, ptr %304, align 8, !tbaa !15
  %306 = getelementptr inbounds %struct.Configuration, ptr %305, i32 0, i32 62
  %307 = load i8, ptr %306, align 1, !tbaa !32, !range !23, !noundef !24
  %308 = trunc i8 %307 to i1
  %309 = zext i1 %308 to i64
  %310 = select i1 %308, i32 8192, i32 0
  %311 = load i32, ptr %8, align 4, !tbaa !9
  %312 = or i32 %311, %310
  store i32 %312, ptr %8, align 4, !tbaa !9
  %313 = getelementptr inbounds %class.Database, ptr %9, i32 0, i32 2
  %314 = load ptr, ptr %313, align 8, !tbaa !15
  %315 = getelementptr inbounds %struct.Configuration, ptr %314, i32 0, i32 13
  %316 = load i8, ptr %315, align 8, !tbaa !33, !range !23, !noundef !24
  %317 = trunc i8 %316 to i1
  br i1 %317, label %318, label %321

318:                                              ; preds = %285
  %319 = load i32, ptr %8, align 4, !tbaa !9
  %320 = or i32 %319, 8388608
  store i32 %320, ptr %8, align 4, !tbaa !9
  br label %321

321:                                              ; preds = %318, %285
  %322 = getelementptr inbounds %class.UpscaleDatabase, ptr %9, i32 0, i32 1
  %323 = load ptr, ptr %322, align 8, !tbaa !34
  %324 = icmp ne ptr %323, null
  br i1 %324, label %325, label %328

325:                                              ; preds = %321
  %326 = getelementptr inbounds %class.UpscaleDatabase, ptr %9, i32 0, i32 1
  %327 = load ptr, ptr %326, align 8, !tbaa !34
  br label %330

328:                                              ; preds = %321
  %329 = load ptr, ptr @_ZN15UpscaleDatabase6ms_envE, align 8, !tbaa !5
  br label %330

330:                                              ; preds = %328, %325
  %331 = phi ptr [ %327, %325 ], [ %329, %328 ]
  %332 = getelementptr inbounds %class.UpscaleDatabase, ptr %9, i32 0, i32 2
  %333 = load i32, ptr %4, align 4, !tbaa !9
  %334 = add nsw i32 1, %333
  %335 = trunc i32 %334 to i16
  %336 = load i32, ptr %8, align 4, !tbaa !9
  %337 = getelementptr inbounds [8 x %struct.ups_parameter_t], ptr %6, i64 0, i64 0
  %338 = call i32 @ups_env_create_db(ptr noundef %331, ptr noundef %332, i16 noundef zeroext %335, i32 noundef %336, ptr noundef %337)
  store i32 %338, ptr %5, align 4, !tbaa !9
  %339 = load i32, ptr %5, align 4, !tbaa !9
  %340 = icmp ne i32 %339, 0
  br i1 %340, label %341, label %350

341:                                              ; preds = %330
  br label %342

342:                                              ; preds = %341
  %343 = call i32 (ptr, ...) @printf(ptr noundef @.str.4)
  %344 = load i32, ptr %5, align 4, !tbaa !9
  %345 = load i32, ptr %5, align 4, !tbaa !9
  %346 = call ptr @ups_strerror(i32 noundef %345)
  %347 = call i32 (ptr, ...) @printf(ptr noundef @.str.12, i32 noundef %344, ptr noundef %346)
  br label %348

348:                                              ; preds = %342
  br label %349

349:                                              ; preds = %348
  call void @exit(i32 noundef -1) #7
  unreachable

350:                                              ; preds = %330
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 128, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  ret i32 0
}

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL12compare_keysP8ups_db_tPKhjS2_j(ptr noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef) #5

declare i32 @ups_env_create_db(ptr noundef, ptr noundef, i16 noundef zeroext, i32 noundef, ptr noundef) #2

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }
attributes #7 = { 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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 0}
!12 = !{!"_ZTS15ups_parameter_t", !10, i64 0, !13, i64 8}
!13 = !{!"long", !7, i64 0}
!14 = !{!12, !13, i64 8}
!15 = !{!16, !6, i64 16}
!16 = !{!"_ZTS8Database", !10, i64 8, !6, i64 16}
!17 = !{!18, !10, i64 52}
!18 = !{!"_ZTS13Configuration", !19, i64 0, !10, i64 4, !19, i64 8, !19, i64 9, !19, i64 10, !20, i64 16, !19, i64 48, !10, i64 52, !10, i64 56, !10, i64 60, !19, i64 64, !10, i64 68, !13, i64 72, !13, i64 80, !13, i64 88, !13, i64 96, !10, i64 104, !19, i64 108, !10, i64 112, !10, i64 116, !10, i64 120, !10, i64 124, !19, i64 128, !19, i64 129, !10, i64 132, !19, i64 136, !10, i64 140, !19, i64 144, !19, i64 145, !19, i64 146, !19, i64 147, !19, i64 148, !10, i64 152, !10, i64 156, !10, i64 160, !19, i64 164, !19, i64 165, !19, i64 166, !10, i64 168, !10, i64 172, !20, i64 176, !10, i64 208, !10, i64 212, !10, i64 216, !19, i64 220, !19, i64 221, !10, i64 224, !10, i64 228, !10, i64 232, !19, i64 236, !19, i64 237, !19, i64 238, !19, i64 239, !10, i64 240, !19, i64 244, !19, i64 245}
!19 = !{!"bool", !7, i64 0}
!20 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !21, i64 0, !13, i64 8, !7, i64 16}
!21 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!22 = !{!18, !19, i64 108}
!23 = !{i8 0, i8 2}
!24 = !{}
!25 = !{!18, !10, i64 104}
!26 = !{!18, !10, i64 56}
!27 = !{!18, !10, i64 60}
!28 = !{!18, !10, i64 228}
!29 = !{!18, !10, i64 232}
!30 = !{!18, !10, i64 132}
!31 = !{!18, !19, i64 238}
!32 = !{!18, !19, i64 239}
!33 = !{!18, !19, i64 64}
!34 = !{!35, !6, i64 24}
!35 = !{!"_ZTS15UpscaleDatabase", !16, i64 0, !6, i64 24, !6, i64 32, !36, i64 40, !6, i64 704}
!36 = !{!"_ZTS17ups_env_metrics_t", !37, i64 0, !13, i64 8, !13, i64 16, !13, i64 24, !13, i64 32, !13, i64 40, !13, i64 48, !13, i64 56, !13, i64 64, !13, i64 72, !13, i64 80, !13, i64 88, !13, i64 96, !13, i64 104, !13, i64 112, !13, i64 120, !13, i64 128, !13, i64 136, !13, i64 144, !13, i64 152, !13, i64 160, !13, i64 168, !13, i64 176, !13, i64 184, !13, i64 192, !13, i64 200, !13, i64 208, !13, i64 216, !38, i64 224, !38, i64 440, !10, i64 656}
!37 = !{!"short", !7, i64 0}
!38 = !{!"_ZTS15btree_metrics_t", !37, i64 0, !13, i64 8, !13, i64 16, !13, i64 24, !10, i64 32, !39, i64 36, !39, i64 56, !39, i64 76, !39, i64 96, !39, i64 116, !39, i64 136, !39, i64 156, !39, i64 176, !39, i64 196}
!39 = !{!"_ZTS17min_max_avg_u32_t", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16}


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

@_ZN15UpscaleDatabase6ms_envE = external dso_local local_unnamed_addr global ptr, align 8
@.str.4 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [83 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [21 x i8], align 1
@__PRETTY_FUNCTION__._ZN15UpscaleDatabase12do_create_dbEi = external hidden unnamed_addr constant [56 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [45 x i8], align 1

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

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

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

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

declare ptr @ups_strerror(i32 noundef) local_unnamed_addr #3

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN15UpscaleDatabase12do_create_dbEi(ptr noundef nonnull align 8 dereferenceable(712) %0, i32 noundef %1) unnamed_addr #5 align 2 {
  %3 = alloca [8 x %struct.ups_parameter_t], align 16
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %3) #7
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(128) %3, i8 0, i64 128, i1 false)
  store i32 258, ptr %3, align 16, !tbaa !5
  %4 = getelementptr inbounds i8, ptr %3, i64 8
  %5 = getelementptr inbounds i8, ptr %0, i64 16
  %6 = load ptr, ptr %5, align 8, !tbaa !11
  %7 = getelementptr inbounds i8, ptr %6, i64 52
  %8 = load i32, ptr %7, align 4, !tbaa !14
  switch i32 %8, label %49 [
    i32 2, label %9
    i32 0, label %21
    i32 1, label %21
    i32 3, label %31
    i32 4, label %34
    i32 5, label %37
    i32 6, label %40
    i32 7, label %43
    i32 8, label %46
  ]

9:                                                ; preds = %2
  %10 = getelementptr inbounds i8, ptr %6, i64 108
  %11 = load i8, ptr %10, align 4, !tbaa !19, !range !20, !noundef !21
  %12 = trunc nuw i8 %11 to i1
  br i1 %12, label %13, label %17

13:                                               ; preds = %9
  %14 = getelementptr inbounds i8, ptr %6, i64 104
  %15 = load i32, ptr %14, align 8, !tbaa !22
  %16 = sext i32 %15 to i64
  br label %17

17:                                               ; preds = %9, %13
  %18 = phi i64 [ %16, %13 ], [ 65535, %9 ]
  store i64 %18, ptr %4, align 8, !tbaa !23
  %19 = getelementptr inbounds i8, ptr %3, i64 16
  store i32 260, ptr %19, align 16, !tbaa !5
  %20 = getelementptr inbounds i8, ptr %3, i64 24
  store i64 1, ptr %20, align 8, !tbaa !23
  br label %50

21:                                               ; preds = %2, %2
  %22 = getelementptr inbounds i8, ptr %6, i64 108
  %23 = load i8, ptr %22, align 4, !tbaa !19, !range !20, !noundef !21
  %24 = trunc nuw i8 %23 to i1
  br i1 %24, label %25, label %29

25:                                               ; preds = %21
  %26 = getelementptr inbounds i8, ptr %6, i64 104
  %27 = load i32, ptr %26, align 8, !tbaa !22
  %28 = sext i32 %27 to i64
  br label %29

29:                                               ; preds = %21, %25
  %30 = phi i64 [ %28, %25 ], [ 65535, %21 ]
  store i64 %30, ptr %4, align 8, !tbaa !23
  br label %50

31:                                               ; preds = %2
  %32 = getelementptr inbounds i8, ptr %3, i64 16
  store i32 260, ptr %32, align 16, !tbaa !5
  %33 = getelementptr inbounds i8, ptr %3, i64 24
  store i64 3, ptr %33, align 8, !tbaa !23
  br label %50

34:                                               ; preds = %2
  %35 = getelementptr inbounds i8, ptr %3, i64 16
  store i32 260, ptr %35, align 16, !tbaa !5
  %36 = getelementptr inbounds i8, ptr %3, i64 24
  store i64 5, ptr %36, align 8, !tbaa !23
  br label %50

37:                                               ; preds = %2
  %38 = getelementptr inbounds i8, ptr %3, i64 16
  store i32 260, ptr %38, align 16, !tbaa !5
  %39 = getelementptr inbounds i8, ptr %3, i64 24
  store i64 7, ptr %39, align 8, !tbaa !23
  br label %50

40:                                               ; preds = %2
  %41 = getelementptr inbounds i8, ptr %3, i64 16
  store i32 260, ptr %41, align 16, !tbaa !5
  %42 = getelementptr inbounds i8, ptr %3, i64 24
  store i64 9, ptr %42, align 8, !tbaa !23
  br label %50

43:                                               ; preds = %2
  %44 = getelementptr inbounds i8, ptr %3, i64 16
  store i32 260, ptr %44, align 16, !tbaa !5
  %45 = getelementptr inbounds i8, ptr %3, i64 24
  store i64 11, ptr %45, align 8, !tbaa !23
  br label %50

46:                                               ; preds = %2
  %47 = getelementptr inbounds i8, ptr %3, i64 16
  store i32 260, ptr %47, align 16, !tbaa !5
  %48 = getelementptr inbounds i8, ptr %3, i64 24
  store i64 12, ptr %48, align 8, !tbaa !23
  br label %50

49:                                               ; preds = %2
  tail call void @__assert_fail(ptr noundef nonnull @.str.10, ptr noundef nonnull @.str.8, i32 noundef 323, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN15UpscaleDatabase12do_create_dbEi) #8
  unreachable

50:                                               ; preds = %46, %43, %40, %37, %34, %31, %29, %17
  %.063 = phi i32 [ 2, %46 ], [ 2, %43 ], [ 2, %40 ], [ 2, %37 ], [ 2, %34 ], [ 2, %31 ], [ 1, %29 ], [ 2, %17 ]
  %51 = getelementptr inbounds i8, ptr %6, i64 56
  %52 = load i32, ptr %51, align 8, !tbaa !24
  switch i32 %52, label %58 [
    i32 0, label %63
    i32 1, label %63
    i32 3, label %.sink.split
    i32 4, label %53
    i32 5, label %54
    i32 6, label %55
    i32 7, label %56
    i32 8, label %57
  ]

53:                                               ; preds = %50
  br label %.sink.split

54:                                               ; preds = %50
  br label %.sink.split

55:                                               ; preds = %50
  br label %.sink.split

56:                                               ; preds = %50
  br label %.sink.split

57:                                               ; preds = %50
  br label %.sink.split

58:                                               ; preds = %50
  tail call void @__assert_fail(ptr noundef nonnull @.str.10, ptr noundef nonnull @.str.8, i32 noundef 360, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN15UpscaleDatabase12do_create_dbEi) #8
  unreachable

.sink.split:                                      ; preds = %50, %53, %54, %55, %56, %57
  %.sink = phi i64 [ 12, %57 ], [ 11, %56 ], [ 9, %55 ], [ 7, %54 ], [ 5, %53 ], [ 3, %50 ]
  %59 = zext nneg i32 %.063 to i64
  %60 = getelementptr inbounds [8 x %struct.ups_parameter_t], ptr %3, i64 0, i64 %59
  store i32 274, ptr %60, align 16, !tbaa !5
  %61 = getelementptr inbounds i8, ptr %60, i64 8
  store i64 %.sink, ptr %61, align 8, !tbaa !23
  %62 = add nuw nsw i32 %.063, 1
  br label %63

63:                                               ; preds = %.sink.split, %50, %50
  %.1 = phi i32 [ %.063, %50 ], [ %.063, %50 ], [ %62, %.sink.split ]
  %64 = zext nneg i32 %.1 to i64
  %65 = getelementptr inbounds [8 x %struct.ups_parameter_t], ptr %3, i64 0, i64 %64
  store i32 264, ptr %65, align 16, !tbaa !5
  %66 = getelementptr inbounds i8, ptr %6, i64 60
  %67 = load i32, ptr %66, align 4, !tbaa !25
  %68 = zext i32 %67 to i64
  %69 = getelementptr inbounds i8, ptr %65, i64 8
  store i64 %68, ptr %69, align 8, !tbaa !23
  %70 = add nuw nsw i32 %.1, 1
  %71 = getelementptr inbounds i8, ptr %6, i64 228
  %72 = load i32, ptr %71, align 4, !tbaa !26
  %.not = icmp eq i32 %72, 0
  br i1 %.not, label %79, label %73

73:                                               ; preds = %63
  %74 = zext nneg i32 %70 to i64
  %75 = getelementptr inbounds [8 x %struct.ups_parameter_t], ptr %3, i64 0, i64 %74
  store i32 4097, ptr %75, align 16, !tbaa !5
  %76 = sext i32 %72 to i64
  %77 = getelementptr inbounds i8, ptr %75, i64 8
  store i64 %76, ptr %77, align 8, !tbaa !23
  %78 = add nuw nsw i32 %.1, 2
  br label %79

79:                                               ; preds = %73, %63
  %.2 = phi i32 [ %78, %73 ], [ %70, %63 ]
  %80 = getelementptr inbounds i8, ptr %6, i64 232
  %81 = load i32, ptr %80, align 8, !tbaa !27
  %.not66 = icmp eq i32 %81, 0
  br i1 %.not66, label %88, label %82

82:                                               ; preds = %79
  %83 = zext nneg i32 %.2 to i64
  %84 = getelementptr inbounds [8 x %struct.ups_parameter_t], ptr %3, i64 0, i64 %83
  store i32 4098, ptr %84, align 16, !tbaa !5
  %85 = sext i32 %81 to i64
  %86 = getelementptr inbounds i8, ptr %84, i64 8
  store i64 %85, ptr %86, align 8, !tbaa !23
  %87 = add nuw nsw i32 %.2, 1
  br label %88

88:                                               ; preds = %82, %79
  %.3 = phi i32 [ %87, %82 ], [ %.2, %79 ]
  %89 = icmp eq i32 %8, 2
  br i1 %89, label %90, label %95

90:                                               ; preds = %88
  %91 = tail call i32 @ups_register_compare(ptr noundef nonnull @.str.11, ptr noundef nonnull @_ZL12compare_keysP8ups_db_tPKhjS2_j)
  %92 = zext nneg i32 %.3 to i64
  %93 = getelementptr inbounds [8 x %struct.ups_parameter_t], ptr %3, i64 0, i64 %92
  store i32 273, ptr %93, align 16, !tbaa !5
  %94 = getelementptr inbounds i8, ptr %93, i64 8
  store i64 ptrtoint (ptr @.str.11 to i64), ptr %94, align 8, !tbaa !23
  %.pre = load ptr, ptr %5, align 8, !tbaa !11
  br label %95

95:                                               ; preds = %90, %88
  %96 = phi ptr [ %.pre, %90 ], [ %6, %88 ]
  %97 = getelementptr inbounds i8, ptr %96, i64 132
  %98 = load i32, ptr %97, align 4, !tbaa !28
  %.not67 = icmp eq i32 %98, 0
  %99 = select i1 %.not67, i32 0, i32 16384
  %100 = getelementptr inbounds i8, ptr %96, i64 238
  %101 = load i8, ptr %100, align 2, !tbaa !29, !range !20, !noundef !21
  %102 = trunc nuw i8 %101 to i1
  %103 = select i1 %102, i32 4096, i32 0
  %104 = or disjoint i32 %103, %99
  %105 = getelementptr inbounds i8, ptr %96, i64 239
  %106 = load i8, ptr %105, align 1, !tbaa !30, !range !20, !noundef !21
  %107 = trunc nuw i8 %106 to i1
  %108 = select i1 %107, i32 8192, i32 0
  %109 = or disjoint i32 %104, %108
  %110 = getelementptr inbounds i8, ptr %96, i64 64
  %111 = load i8, ptr %110, align 8, !tbaa !31, !range !20, !noundef !21
  %112 = trunc nuw i8 %111 to i1
  %113 = or disjoint i32 %109, 8388608
  %spec.select = select i1 %112, i32 %113, i32 %109
  %114 = getelementptr inbounds i8, ptr %0, i64 24
  %115 = load ptr, ptr %114, align 8, !tbaa !32
  %.not68 = icmp eq ptr %115, null
  %116 = load ptr, ptr @_ZN15UpscaleDatabase6ms_envE, align 8
  %117 = select i1 %.not68, ptr %116, ptr %115
  %118 = getelementptr inbounds i8, ptr %0, i64 32
  %119 = trunc i32 %1 to i16
  %120 = add i16 %119, 1
  %121 = call i32 @ups_env_create_db(ptr noundef %117, ptr noundef nonnull %118, i16 noundef zeroext %120, i32 noundef %spec.select, ptr noundef nonnull %3)
  %.not69 = icmp eq i32 %121, 0
  br i1 %.not69, label %126, label %122

122:                                              ; preds = %95
  %123 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4)
  %124 = call ptr @ups_strerror(i32 noundef %121)
  %125 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.12, i32 noundef %121, ptr noundef %124)
  call void @exit(i32 noundef -1) #8
  unreachable

126:                                              ; preds = %95
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %3) #7
  ret i32 0
}

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL12compare_keysP8ups_db_tPKhjS2_j(ptr noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef) #6

declare i32 @ups_env_create_db(ptr noundef, ptr noundef, i16 noundef zeroext, i32 noundef, ptr noundef) local_unnamed_addr #3

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }
attributes #8 = { 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, !7, i64 0}
!6 = !{!"_ZTS15ups_parameter_t", !7, i64 0, !10, i64 8}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"long", !8, i64 0}
!11 = !{!12, !13, i64 16}
!12 = !{!"_ZTS8Database", !7, i64 8, !13, i64 16}
!13 = !{!"any pointer", !8, i64 0}
!14 = !{!15, !7, i64 52}
!15 = !{!"_ZTS13Configuration", !16, i64 0, !7, i64 4, !16, i64 8, !16, i64 9, !16, i64 10, !17, i64 16, !16, i64 48, !7, i64 52, !7, i64 56, !7, i64 60, !16, i64 64, !7, i64 68, !10, i64 72, !10, i64 80, !10, i64 88, !10, i64 96, !7, i64 104, !16, i64 108, !7, i64 112, !7, i64 116, !7, i64 120, !7, i64 124, !16, i64 128, !16, i64 129, !7, i64 132, !16, i64 136, !7, i64 140, !16, i64 144, !16, i64 145, !16, i64 146, !16, i64 147, !16, i64 148, !7, i64 152, !7, i64 156, !7, i64 160, !16, i64 164, !16, i64 165, !16, i64 166, !7, i64 168, !7, i64 172, !17, i64 176, !7, i64 208, !7, i64 212, !7, i64 216, !16, i64 220, !16, i64 221, !7, i64 224, !7, i64 228, !7, i64 232, !16, i64 236, !16, i64 237, !16, i64 238, !16, i64 239, !7, i64 240, !16, i64 244, !16, i64 245}
!16 = !{!"bool", !8, i64 0}
!17 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !18, i64 0, !10, i64 8, !8, i64 16}
!18 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !13, i64 0}
!19 = !{!15, !16, i64 108}
!20 = !{i8 0, i8 2}
!21 = !{}
!22 = !{!15, !7, i64 104}
!23 = !{!6, !10, i64 8}
!24 = !{!15, !7, i64 56}
!25 = !{!15, !7, i64 60}
!26 = !{!15, !7, i64 228}
!27 = !{!15, !7, i64 232}
!28 = !{!15, !7, i64 132}
!29 = !{!15, !16, i64 238}
!30 = !{!15, !16, i64 239}
!31 = !{!15, !16, i64 64}
!32 = !{!33, !13, i64 24}
!33 = !{!"_ZTS15UpscaleDatabase", !12, i64 0, !13, i64 24, !13, i64 32, !34, i64 40, !13, i64 704}
!34 = !{!"_ZTS17ups_env_metrics_t", !35, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !10, i64 96, !10, i64 104, !10, i64 112, !10, i64 120, !10, i64 128, !10, i64 136, !10, i64 144, !10, i64 152, !10, i64 160, !10, i64 168, !10, i64 176, !10, i64 184, !10, i64 192, !10, i64 200, !10, i64 208, !10, i64 216, !36, i64 224, !36, i64 440, !7, i64 656}
!35 = !{!"short", !8, i64 0}
!36 = !{!"_ZTS15btree_metrics_t", !35, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !7, i64 32, !37, i64 36, !37, i64 56, !37, i64 76, !37, i64 96, !37, i64 116, !37, i64 136, !37, i64 156, !37, i64 176, !37, i64 196}
!37 = !{!"_ZTS17min_max_avg_u32_t", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16}


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass