; LLVM IR from cruppstahl/upscaledb :: samples/env3.ll (Z8run_demov)

; 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.customer_t = type { i32, [32 x i8] }
%struct.order_t = type { i32, i32, [32 x i8] }
%struct.ups_parameter_t = type { i32, i64 }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.upscaledb::env" = type { ptr }
%"class.upscaledb::db" = type { ptr }
%"class.upscaledb::cursor" = type { ptr }
%"class.upscaledb::key" = type { %struct.ups_key_t }
%struct.ups_key_t = type { i16, ptr, i32, i32 }
%"class.upscaledb::record" = type { %struct.ups_record_t }
%struct.ups_record_t = type { i32, ptr, i32 }

@__const._Z8run_demov.customers = external hidden unnamed_addr constant [4 x %struct.customer_t], align 16
@__const._Z8run_demov.orders = external hidden unnamed_addr constant [8 x %struct.order_t], align 16
@.str = external hidden unnamed_addr constant [8 x i8], align 1
@__const._Z8run_demov.params = external hidden unnamed_addr constant [2 x %struct.ups_parameter_t], align 16
@_ZTIN9upscaledb5errorE = external dso_local constant { ptr, ptr }, align 8
@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@.str.1 = external hidden unnamed_addr constant [28 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.2 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [9 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z8run_demov() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca %"class.upscaledb::env", align 8
  %4 = alloca [3 x %"class.upscaledb::db"], align 16
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca [3 x %"class.upscaledb::cursor"], align 16
  %8 = alloca %"class.upscaledb::key", align 8
  %9 = alloca %"class.upscaledb::key", align 8
  %10 = alloca %"class.upscaledb::key", align 8
  %11 = alloca %"class.upscaledb::key", align 8
  %12 = alloca %"class.upscaledb::record", align 8
  %13 = alloca %"class.upscaledb::record", align 8
  %14 = alloca %"class.upscaledb::record", align 8
  %15 = alloca %"class.upscaledb::record", align 8
  %16 = alloca [4 x %struct.customer_t], align 16
  %17 = alloca [8 x %struct.order_t], align 16
  %18 = alloca [2 x %struct.ups_parameter_t], align 16
  %19 = alloca [3 x %struct.ups_parameter_t], align 16
  %20 = alloca %"class.upscaledb::db", align 8
  %21 = alloca %"class.upscaledb::db", align 8
  %22 = alloca %"class.upscaledb::db", align 8
  %23 = alloca ptr, align 8
  %24 = alloca ptr, align 8
  %25 = alloca i32, align 4
  %26 = alloca ptr, align 8
  %27 = alloca i32, align 4
  %28 = alloca %"class.upscaledb::record", align 8
  %29 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #9
  call void @_ZN9upscaledb3envC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3)
  call void @llvm.lifetime.start.p0(i64 24, ptr %4) #9
  %30 = getelementptr inbounds [3 x %"class.upscaledb::db"], ptr %4, i32 0, i32 0
  %31 = getelementptr inbounds %"class.upscaledb::db", ptr %30, i64 3
  br label %32

32:                                               ; preds = %34, %0
  %33 = phi ptr [ %30, %0 ], [ %35, %34 ]
  invoke void @_ZN9upscaledb2dbC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %33)
          to label %34 unwind label %90

34:                                               ; preds = %32
  %35 = getelementptr inbounds %"class.upscaledb::db", ptr %33, i64 1
  %36 = icmp eq ptr %35, %31
  br i1 %36, label %37, label %32

37:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 24, ptr %7) #9
  %38 = getelementptr inbounds [3 x %"class.upscaledb::cursor"], ptr %7, i32 0, i32 0
  %39 = getelementptr inbounds %"class.upscaledb::cursor", ptr %38, i64 3
  br label %40

40:                                               ; preds = %42, %37
  %41 = phi ptr [ %38, %37 ], [ %43, %42 ]
  invoke void @_ZN9upscaledb6cursorC2EPNS_2dbEPNS_3txnEj(ptr noundef nonnull align 8 dereferenceable(8) %41, ptr noundef null, ptr noundef null, i32 noundef 0)
          to label %42 unwind label %100

42:                                               ; preds = %40
  %43 = getelementptr inbounds %"class.upscaledb::cursor", ptr %41, i64 1
  %44 = icmp eq ptr %43, %39
  br i1 %44, label %45, label %40

45:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 24, ptr %8) #9
  invoke void @_ZN9upscaledb3keyC2EPvtj(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef null, i16 noundef zeroext 0, i32 noundef 0)
          to label %46 unwind label %110

46:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 24, ptr %9) #9
  invoke void @_ZN9upscaledb3keyC2EPvtj(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef null, i16 noundef zeroext 0, i32 noundef 0)
          to label %47 unwind label %114

47:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 24, ptr %10) #9
  invoke void @_ZN9upscaledb3keyC2EPvtj(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef null, i16 noundef zeroext 0, i32 noundef 0)
          to label %48 unwind label %118

48:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 24, ptr %11) #9
  invoke void @_ZN9upscaledb3keyC2EPvtj(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef null, i16 noundef zeroext 0, i32 noundef 0)
          to label %49 unwind label %122

49:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 24, ptr %12) #9
  invoke void @_ZN9upscaledb6recordC2EPvjj(ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef null, i32 noundef 0, i32 noundef 0)
          to label %50 unwind label %126

50:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 24, ptr %13) #9
  invoke void @_ZN9upscaledb6recordC2EPvjj(ptr noundef nonnull align 8 dereferenceable(24) %13, ptr noundef null, i32 noundef 0, i32 noundef 0)
          to label %51 unwind label %130

51:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #9
  invoke void @_ZN9upscaledb6recordC2EPvjj(ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef null, i32 noundef 0, i32 noundef 0)
          to label %52 unwind label %134

52:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 24, ptr %15) #9
  invoke void @_ZN9upscaledb6recordC2EPvjj(ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef null, i32 noundef 0, i32 noundef 0)
          to label %53 unwind label %138

53:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 144, ptr %16) #9
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %16, ptr align 16 @__const._Z8run_demov.customers, i64 144, i1 false)
  call void @llvm.lifetime.start.p0(i64 320, ptr %17) #9
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %17, ptr align 16 @__const._Z8run_demov.orders, i64 320, i1 false)
  invoke void @_ZN9upscaledb3env6createEPKcjjPK15ups_parameter_t(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef @.str, i32 noundef 0, i32 noundef 420, ptr noundef null)
          to label %54 unwind label %142

54:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 32, ptr %18) #9
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %18, ptr align 16 @__const._Z8run_demov.params, i64 32, i1 false)
  call void @llvm.lifetime.start.p0(i64 48, ptr %19) #9
  call void @llvm.memset.p0.i64(ptr align 16 %19, i8 0, i64 48, i1 false)
  %55 = getelementptr inbounds [3 x %struct.ups_parameter_t], ptr %19, i32 0, i32 0
  %56 = getelementptr inbounds %struct.ups_parameter_t, ptr %55, i32 0, i32 0
  store i32 260, ptr %56, align 16
  %57 = getelementptr inbounds %struct.ups_parameter_t, ptr %55, i32 0, i32 1
  store i64 7, ptr %57, align 8
  %58 = getelementptr inbounds [3 x %struct.ups_parameter_t], ptr %19, i32 0, i32 1
  %59 = getelementptr inbounds %struct.ups_parameter_t, ptr %58, i32 0, i32 0
  store i32 264, ptr %59, align 16
  %60 = getelementptr inbounds %struct.ups_parameter_t, ptr %58, i32 0, i32 1
  store i64 4, ptr %60, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #9
  %61 = getelementptr inbounds [2 x %struct.ups_parameter_t], ptr %18, i64 0, i64 0
  invoke void @_ZN9upscaledb3env9create_dbEtjPK15ups_parameter_t(ptr dead_on_unwind writable sret(%"class.upscaledb::db") align 8 %20, ptr noundef nonnull align 8 dereferenceable(8) %3, i16 noundef zeroext 1, i32 noundef 0, ptr noundef %61)
          to label %62 unwind label %146

62:                                               ; preds = %54
  %63 = getelementptr inbounds [3 x %"class.upscaledb::db"], ptr %4, i64 0, i64 0
  %64 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN9upscaledb2dbaSERKS0_(ptr noundef nonnull align 8 dereferenceable(8) %63, ptr noundef nonnull align 8 dereferenceable(8) %20)
          to label %65 unwind label %150

65:                                               ; preds = %62
  call void @_ZN9upscaledb2dbD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %20) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #9
  %66 = getelementptr inbounds [2 x %struct.ups_parameter_t], ptr %18, i64 0, i64 0
  invoke void @_ZN9upscaledb3env9create_dbEtjPK15ups_parameter_t(ptr dead_on_unwind writable sret(%"class.upscaledb::db") align 8 %21, ptr noundef nonnull align 8 dereferenceable(8) %3, i16 noundef zeroext 2, i32 noundef 0, ptr noundef %66)
          to label %67 unwind label %155

67:                                               ; preds = %65
  %68 = getelementptr inbounds [3 x %"class.upscaledb::db"], ptr %4, i64 0, i64 1
  %69 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN9upscaledb2dbaSERKS0_(ptr noundef nonnull align 8 dereferenceable(8) %68, ptr noundef nonnull align 8 dereferenceable(8) %21)
          to label %70 unwind label %159

70:                                               ; preds = %67
  call void @_ZN9upscaledb2dbD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %21) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #9
  %71 = getelementptr inbounds [3 x %struct.ups_parameter_t], ptr %19, i64 0, i64 0
  invoke void @_ZN9upscaledb3env9create_dbEtjPK15ups_parameter_t(ptr dead_on_unwind writable sret(%"class.upscaledb::db") align 8 %22, ptr noundef nonnull align 8 dereferenceable(8) %3, i16 noundef zeroext 3, i32 noundef 16384, ptr noundef %71)
          to label %72 unwind label %164

72:                                               ; preds = %70
  %73 = getelementptr inbounds [3 x %"class.upscaledb::db"], ptr %4, i64 0, i64 2
  %74 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN9upscaledb2dbaSERKS0_(ptr noundef nonnull align 8 dereferenceable(8) %73, ptr noundef nonnull align 8 dereferenceable(8) %22)
          to label %75 unwind label %168

75:                                               ; preds = %72
  call void @_ZN9upscaledb2dbD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %22) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #9
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %76

76:                                               ; preds = %87, %75
  %77 = load i32, ptr %2, align 4, !tbaa !5
  %78 = icmp slt i32 %77, 3
  br i1 %78, label %79, label %177

79:                                               ; preds = %76
  %80 = load i32, ptr %2, align 4, !tbaa !5
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [3 x %"class.upscaledb::cursor"], ptr %7, i64 0, i64 %81
  %83 = load i32, ptr %2, align 4, !tbaa !5
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds [3 x %"class.upscaledb::db"], ptr %4, i64 0, i64 %84
  invoke void @_ZN9upscaledb6cursor6createEPNS_2dbEPNS_3txnEj(ptr noundef nonnull align 8 dereferenceable(8) %82, ptr noundef %85, ptr noundef null, i32 noundef 0)
          to label %86 unwind label %173

86:                                               ; preds = %79
  br label %87

87:                                               ; preds = %86
  %88 = load i32, ptr %2, align 4, !tbaa !5
  %89 = add nsw i32 %88, 1
  store i32 %89, ptr %2, align 4, !tbaa !5
  br label %76, !llvm.loop !9

90:                                               ; preds = %32
  %91 = landingpad { ptr, i32 }
          cleanup
  %92 = extractvalue { ptr, i32 } %91, 0
  store ptr %92, ptr %5, align 8
  %93 = extractvalue { ptr, i32 } %91, 1
  store i32 %93, ptr %6, align 4
  %94 = icmp eq ptr %30, %33
  br i1 %94, label %99, label %95

95:                                               ; preds = %95, %90
  %96 = phi ptr [ %33, %90 ], [ %97, %95 ]
  %97 = getelementptr inbounds %"class.upscaledb::db", ptr %96, i64 -1
  call void @_ZN9upscaledb2dbD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %97) #9
  %98 = icmp eq ptr %97, %30
  br i1 %98, label %99, label %95

99:                                               ; preds = %95, %90
  br label %488

100:                                              ; preds = %40
  %101 = landingpad { ptr, i32 }
          cleanup
  %102 = extractvalue { ptr, i32 } %101, 0
  store ptr %102, ptr %5, align 8
  %103 = extractvalue { ptr, i32 } %101, 1
  store i32 %103, ptr %6, align 4
  %104 = icmp eq ptr %38, %41
  br i1 %104, label %109, label %105

105:                                              ; preds = %105, %100
  %106 = phi ptr [ %41, %100 ], [ %107, %105 ]
  %107 = getelementptr inbounds %"class.upscaledb::cursor", ptr %106, i64 -1
  call void @_ZN9upscaledb6cursorD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %107) #9
  %108 = icmp eq ptr %107, %38
  br i1 %108, label %109, label %105

109:                                              ; preds = %105, %100
  br label %474

110:                                              ; preds = %45
  %111 = landingpad { ptr, i32 }
          cleanup
  %112 = extractvalue { ptr, i32 } %111, 0
  store ptr %112, ptr %5, align 8
  %113 = extractvalue { ptr, i32 } %111, 1
  store i32 %113, ptr %6, align 4
  br label %459

114:                                              ; preds = %46
  %115 = landingpad { ptr, i32 }
          cleanup
  %116 = extractvalue { ptr, i32 } %115, 0
  store ptr %116, ptr %5, align 8
  %117 = extractvalue { ptr, i32 } %115, 1
  store i32 %117, ptr %6, align 4
  br label %458

118:                                              ; preds = %47
  %119 = landingpad { ptr, i32 }
          cleanup
  %120 = extractvalue { ptr, i32 } %119, 0
  store ptr %120, ptr %5, align 8
  %121 = extractvalue { ptr, i32 } %119, 1
  store i32 %121, ptr %6, align 4
  br label %457

122:                                              ; preds = %48
  %123 = landingpad { ptr, i32 }
          cleanup
  %124 = extractvalue { ptr, i32 } %123, 0
  store ptr %124, ptr %5, align 8
  %125 = extractvalue { ptr, i32 } %123, 1
  store i32 %125, ptr %6, align 4
  br label %456

126:                                              ; preds = %49
  %127 = landingpad { ptr, i32 }
          cleanup
  %128 = extractvalue { ptr, i32 } %127, 0
  store ptr %128, ptr %5, align 8
  %129 = extractvalue { ptr, i32 } %127, 1
  store i32 %129, ptr %6, align 4
  br label %455

130:                                              ; preds = %50
  %131 = landingpad { ptr, i32 }
          cleanup
  %132 = extractvalue { ptr, i32 } %131, 0
  store ptr %132, ptr %5, align 8
  %133 = extractvalue { ptr, i32 } %131, 1
  store i32 %133, ptr %6, align 4
  br label %454

134:                                              ; preds = %51
  %135 = landingpad { ptr, i32 }
          cleanup
  %136 = extractvalue { ptr, i32 } %135, 0
  store ptr %136, ptr %5, align 8
  %137 = extractvalue { ptr, i32 } %135, 1
  store i32 %137, ptr %6, align 4
  br label %453

138:                                              ; preds = %52
  %139 = landingpad { ptr, i32 }
          cleanup
  %140 = extractvalue { ptr, i32 } %139, 0
  store ptr %140, ptr %5, align 8
  %141 = extractvalue { ptr, i32 } %139, 1
  store i32 %141, ptr %6, align 4
  br label %452

142:                                              ; preds = %53
  %143 = landingpad { ptr, i32 }
          cleanup
  %144 = extractvalue { ptr, i32 } %143, 0
  store ptr %144, ptr %5, align 8
  %145 = extractvalue { ptr, i32 } %143, 1
  store i32 %145, ptr %6, align 4
  br label %451

146:                                              ; preds = %54
  %147 = landingpad { ptr, i32 }
          cleanup
  %148 = extractvalue { ptr, i32 } %147, 0
  store ptr %148, ptr %5, align 8
  %149 = extractvalue { ptr, i32 } %147, 1
  store i32 %149, ptr %6, align 4
  br label %154

150:                                              ; preds = %62
  %151 = landingpad { ptr, i32 }
          cleanup
  %152 = extractvalue { ptr, i32 } %151, 0
  store ptr %152, ptr %5, align 8
  %153 = extractvalue { ptr, i32 } %151, 1
  store i32 %153, ptr %6, align 4
  call void @_ZN9upscaledb2dbD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %20) #9
  br label %154

154:                                              ; preds = %150, %146
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #9
  br label %450

155:                                              ; preds = %65
  %156 = landingpad { ptr, i32 }
          cleanup
  %157 = extractvalue { ptr, i32 } %156, 0
  store ptr %157, ptr %5, align 8
  %158 = extractvalue { ptr, i32 } %156, 1
  store i32 %158, ptr %6, align 4
  br label %163

159:                                              ; preds = %67
  %160 = landingpad { ptr, i32 }
          cleanup
  %161 = extractvalue { ptr, i32 } %160, 0
  store ptr %161, ptr %5, align 8
  %162 = extractvalue { ptr, i32 } %160, 1
  store i32 %162, ptr %6, align 4
  call void @_ZN9upscaledb2dbD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %21) #9
  br label %163

163:                                              ; preds = %159, %155
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #9
  br label %450

164:                                              ; preds = %70
  %165 = landingpad { ptr, i32 }
          cleanup
  %166 = extractvalue { ptr, i32 } %165, 0
  store ptr %166, ptr %5, align 8
  %167 = extractvalue { ptr, i32 } %165, 1
  store i32 %167, ptr %6, align 4
  br label %172

168:                                              ; preds = %72
  %169 = landingpad { ptr, i32 }
          cleanup
  %170 = extractvalue { ptr, i32 } %169, 0
  store ptr %170, ptr %5, align 8
  %171 = extractvalue { ptr, i32 } %169, 1
  store i32 %171, ptr %6, align 4
  call void @_ZN9upscaledb2dbD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %22) #9
  br label %172

172:                                              ; preds = %168, %164
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #9
  br label %450

173:                                              ; preds = %444, %442, %237, %232, %231, %226, %225, %215, %209, %208, %203, %202, %192, %188, %187, %182, %181, %79
  %174 = landingpad { ptr, i32 }
          cleanup
  %175 = extractvalue { ptr, i32 } %174, 0
  store ptr %175, ptr %5, align 8
  %176 = extractvalue { ptr, i32 } %174, 1
  store i32 %176, ptr %6, align 4
  br label %450

177:                                              ; preds = %76
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %178

178:                                              ; preds = %195, %177
  %179 = load i32, ptr %2, align 4, !tbaa !5
  %180 = icmp slt i32 %179, 4
  br i1 %180, label %181, label %198

181:                                              ; preds = %178
  invoke void @_ZN9upscaledb3key8set_sizeEt(ptr noundef nonnull align 8 dereferenceable(24) %8, i16 noundef zeroext 4)
          to label %182 unwind label %173

182:                                              ; preds = %181
  %183 = load i32, ptr %2, align 4, !tbaa !5
  %184 = sext i32 %183 to i64
  %185 = getelementptr inbounds [4 x %struct.customer_t], ptr %16, i64 0, i64 %184
  %186 = getelementptr inbounds %struct.customer_t, ptr %185, i32 0, i32 0
  invoke void @_ZN9upscaledb3key8set_dataEPv(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef %186)
          to label %187 unwind label %173

187:                                              ; preds = %182
  invoke void @_ZN9upscaledb6record8set_sizeEj(ptr noundef nonnull align 8 dereferenceable(24) %12, i32 noundef 36)
          to label %188 unwind label %173

188:                                              ; preds = %187
  %189 = load i32, ptr %2, align 4, !tbaa !5
  %190 = sext i32 %189 to i64
  %191 = getelementptr inbounds [4 x %struct.customer_t], ptr %16, i64 0, i64 %190
  invoke void @_ZN9upscaledb6record8set_dataEPv(ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef %191)
          to label %192 unwind label %173

192:                                              ; preds = %188
  %193 = getelementptr inbounds [3 x %"class.upscaledb::db"], ptr %4, i64 0, i64 0
  invoke void @_ZN9upscaledb2db6insertEPNS_3keyEPNS_6recordEj(ptr noundef nonnull align 8 dereferenceable(8) %193, ptr noundef %8, ptr noundef %12, i32 noundef 0)
          to label %194 unwind label %173

194:                                              ; preds = %192
  br label %195

195:                                              ; preds = %194
  %196 = load i32, ptr %2, align 4, !tbaa !5
  %197 = add nsw i32 %196, 1
  store i32 %197, ptr %2, align 4, !tbaa !5
  br label %178, !llvm.loop !11

198:                                              ; preds = %178
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %199

199:                                              ; preds = %218, %198
  %200 = load i32, ptr %2, align 4, !tbaa !5
  %201 = icmp slt i32 %200, 8
  br i1 %201, label %202, label %221

202:                                              ; preds = %199
  invoke void @_ZN9upscaledb3key8set_sizeEt(ptr noundef nonnull align 8 dereferenceable(24) %8, i16 noundef zeroext 4)
          to label %203 unwind label %173

203:                                              ; preds = %202
  %204 = load i32, ptr %2, align 4, !tbaa !5
  %205 = sext i32 %204 to i64
  %206 = getelementptr inbounds [8 x %struct.order_t], ptr %17, i64 0, i64 %205
  %207 = getelementptr inbounds %struct.order_t, ptr %206, i32 0, i32 0
  invoke void @_ZN9upscaledb3key8set_dataEPv(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef %207)
          to label %208 unwind label %173

208:                                              ; preds = %203
  invoke void @_ZN9upscaledb6record8set_sizeEj(ptr noundef nonnull align 8 dereferenceable(24) %12, i32 noundef 32)
          to label %209 unwind label %173

209:                                              ; preds = %208
  %210 = load i32, ptr %2, align 4, !tbaa !5
  %211 = sext i32 %210 to i64
  %212 = getelementptr inbounds [8 x %struct.order_t], ptr %17, i64 0, i64 %211
  %213 = getelementptr inbounds %struct.order_t, ptr %212, i32 0, i32 2
  %214 = getelementptr inbounds [32 x i8], ptr %213, i64 0, i64 0
  invoke void @_ZN9upscaledb6record8set_dataEPv(ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef %214)
          to label %215 unwind label %173

215:                                              ; preds = %209
  %216 = getelementptr inbounds [3 x %"class.upscaledb::db"], ptr %4, i64 0, i64 1
  invoke void @_ZN9upscaledb2db6insertEPNS_3keyEPNS_6recordEj(ptr noundef nonnull align 8 dereferenceable(8) %216, ptr noundef %8, ptr noundef %12, i32 noundef 0)
          to label %217 unwind label %173

217:                                              ; preds = %215
  br label %218

218:                                              ; preds = %217
  %219 = load i32, ptr %2, align 4, !tbaa !5
  %220 = add nsw i32 %219, 1
  store i32 %220, ptr %2, align 4, !tbaa !5
  br label %199, !llvm.loop !12

221:                                              ; preds = %199
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %222

222:                                              ; preds = %240, %221
  %223 = load i32, ptr %2, align 4, !tbaa !5
  %224 = icmp slt i32 %223, 8
  br i1 %224, label %225, label %243

225:                                              ; preds = %222
  invoke void @_ZN9upscaledb3key8set_sizeEt(ptr noundef nonnull align 8 dereferenceable(24) %8, i16 noundef zeroext 4)
          to label %226 unwind label %173

226:                                              ; preds = %225
  %227 = load i32, ptr %2, align 4, !tbaa !5
  %228 = sext i32 %227 to i64
  %229 = getelementptr inbounds [8 x %struct.order_t], ptr %17, i64 0, i64 %228
  %230 = getelementptr inbounds %struct.order_t, ptr %229, i32 0, i32 1
  invoke void @_ZN9upscaledb3key8set_dataEPv(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef %230)
          to label %231 unwind label %173

231:                                              ; preds = %226
  invoke void @_ZN9upscaledb6record8set_sizeEj(ptr noundef nonnull align 8 dereferenceable(24) %12, i32 noundef 4)
          to label %232 unwind label %173

232:                                              ; preds = %231
  %233 = load i32, ptr %2, align 4, !tbaa !5
  %234 = sext i32 %233 to i64
  %235 = getelementptr inbounds [8 x %struct.order_t], ptr %17, i64 0, i64 %234
  %236 = getelementptr inbounds %struct.order_t, ptr %235, i32 0, i32 0
  invoke void @_ZN9upscaledb6record8set_dataEPv(ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef %236)
          to label %237 unwind label %173

237:                                              ; preds = %232
  %238 = getelementptr inbounds [3 x %"class.upscaledb::db"], ptr %4, i64 0, i64 2
  invoke void @_ZN9upscaledb2db6insertEPNS_3keyEPNS_6recordEj(ptr noundef nonnull align 8 dereferenceable(8) %238, ptr noundef %8, ptr noundef %12, i32 noundef 2)
          to label %239 unwind label %173

239:                                              ; preds = %237
  br label %240

240:                                              ; preds = %239
  %241 = load i32, ptr %2, align 4, !tbaa !5
  %242 = add nsw i32 %241, 1
  store i32 %242, ptr %2, align 4, !tbaa !5
  br label %222, !llvm.loop !13

243:                                              ; preds = %222
  br label %244

244:                                              ; preds = %439, %437, %243
  br label %245

245:                                              ; preds = %244
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #9
  %246 = getelementptr inbounds [3 x %"class.upscaledb::cursor"], ptr %7, i64 0, i64 0
  invoke void @_ZN9upscaledb6cursor9move_nextEPNS_3keyEPNS_6recordE(ptr noundef nonnull align 8 dereferenceable(8) %246, ptr noundef %9, ptr noundef %13)
          to label %247 unwind label %248

247:                                              ; preds = %245
  br label %286

248:                                              ; preds = %245
  %249 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN9upscaledb5errorE
  %250 = extractvalue { ptr, i32 } %249, 0
  store ptr %250, ptr %5, align 8
  %251 = extractvalue { ptr, i32 } %249, 1
  store i32 %251, ptr %6, align 4
  br label %252

252:                                              ; preds = %248
  %253 = load i32, ptr %6, align 4
  %254 = call i32 @llvm.eh.typeid.for.p0(ptr @_ZTIN9upscaledb5errorE) #9
  %255 = icmp eq i32 %253, %254
  br i1 %255, label %256, label %441

256:                                              ; preds = %252
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #9
  %257 = load ptr, ptr %5, align 8
  %258 = call ptr @__cxa_begin_catch(ptr %257) #9
  store ptr %258, ptr %24, align 8
  %259 = load ptr, ptr %24, align 8, !tbaa !14
  %260 = invoke noundef i32 @_ZNK9upscaledb5error9get_errnoEv(ptr noundef nonnull align 4 dereferenceable(4) %259)
          to label %261 unwind label %264

261:                                              ; preds = %256
  %262 = icmp eq i32 %260, -11
  br i1 %262, label %263, label %268

263:                                              ; preds = %261
  store i32 15, ptr %25, align 4
  br label %278

264:                                              ; preds = %275, %273, %270, %268, %256
  %265 = landingpad { ptr, i32 }
          cleanup
  %266 = extractvalue { ptr, i32 } %265, 0
  store ptr %266, ptr %5, align 8
  %267 = extractvalue { ptr, i32 } %265, 1
  store i32 %267, ptr %6, align 4
  invoke void @__cxa_end_catch()
          to label %284 unwind label %494

268:                                              ; preds = %261
  %269 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.1)
          to label %270 unwind label %264

270:                                              ; preds = %268
  %271 = load ptr, ptr %24, align 8, !tbaa !14
  %272 = invoke noundef ptr @_ZNK9upscaledb5error10get_stringEv(ptr noundef nonnull align 4 dereferenceable(4) %271)
          to label %273 unwind label %264

273:                                              ; preds = %270
  %274 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %269, ptr noundef %272)
          to label %275 unwind label %264

275:                                              ; preds = %273
  %276 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %274, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %277 unwind label %264

277:                                              ; preds = %275
  store i32 -1, ptr %1, align 4
  store i32 1, ptr %25, align 4
  br label %278

278:                                              ; preds = %277, %263
  invoke void @__cxa_end_catch()
          to label %279 unwind label %280

279:                                              ; preds = %278
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #9
  br label %437

280:                                              ; preds = %278
  %281 = landingpad { ptr, i32 }
          cleanup
  %282 = extractvalue { ptr, i32 } %281, 0
  store ptr %282, ptr %5, align 8
  %283 = extractvalue { ptr, i32 } %281, 1
  store i32 %283, ptr %6, align 4
  br label %285

284:                                              ; preds = %264
  br label %285

285:                                              ; preds = %284, %280
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #9
  br label %441

286:                                              ; preds = %247
  %287 = invoke noundef ptr @_ZNK9upscaledb6record8get_dataEv(ptr noundef nonnull align 8 dereferenceable(24) %13)
          to label %288 unwind label %313

288:                                              ; preds = %286
  store ptr %287, ptr %23, align 8, !tbaa !14
  %289 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.2)
          to label %290 unwind label %313

290:                                              ; preds = %288
  %291 = load ptr, ptr %23, align 8, !tbaa !14
  %292 = getelementptr inbounds %struct.customer_t, ptr %291, i32 0, i32 0
  %293 = load i32, ptr %292, align 4, !tbaa !16
  %294 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8) %289, i32 noundef %293)
          to label %295 unwind label %313

295:                                              ; preds = %290
  %296 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %294, ptr noundef @.str.3)
          to label %297 unwind label %313

297:                                              ; preds = %295
  %298 = load ptr, ptr %23, align 8, !tbaa !14
  %299 = getelementptr inbounds %struct.customer_t, ptr %298, i32 0, i32 1
  %300 = getelementptr inbounds [32 x i8], ptr %299, i64 0, i64 0
  %301 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %296, ptr noundef %300)
          to label %302 unwind label %313

302:                                              ; preds = %297
  %303 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %301, ptr noundef @.str.4)
          to label %304 unwind label %313

304:                                              ; preds = %302
  %305 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %303, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %306 unwind label %313

306:                                              ; preds = %304
  %307 = load ptr, ptr %23, align 8, !tbaa !14
  %308 = getelementptr inbounds %struct.customer_t, ptr %307, i32 0, i32 0
  invoke void @_ZN9upscaledb3key8set_dataEPv(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef %308)
          to label %309 unwind label %313

309:                                              ; preds = %306
  invoke void @_ZN9upscaledb3key8set_sizeEt(ptr noundef nonnull align 8 dereferenceable(24) %11, i16 noundef zeroext 4)
          to label %310 unwind label %313

310:                                              ; preds = %309
  %311 = getelementptr inbounds [3 x %"class.upscaledb::cursor"], ptr %7, i64 0, i64 2
  invoke void @_ZN9upscaledb6cursor4findEPNS_3keyEPNS_6recordEj(ptr noundef nonnull align 8 dereferenceable(8) %311, ptr noundef %11, ptr noundef null, i32 noundef 0)
          to label %312 unwind label %317

312:                                              ; preds = %310
  br label %355

313:                                              ; preds = %355, %309, %306, %304, %302, %297, %295, %290, %288, %286
  %314 = landingpad { ptr, i32 }
          cleanup
  %315 = extractvalue { ptr, i32 } %314, 0
  store ptr %315, ptr %5, align 8
  %316 = extractvalue { ptr, i32 } %314, 1
  store i32 %316, ptr %6, align 4
  br label %441

317:                                              ; preds = %310
  %318 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN9upscaledb5errorE
  %319 = extractvalue { ptr, i32 } %318, 0
  store ptr %319, ptr %5, align 8
  %320 = extractvalue { ptr, i32 } %318, 1
  store i32 %320, ptr %6, align 4
  br label %321

321:                                              ; preds = %317
  %322 = load i32, ptr %6, align 4
  %323 = call i32 @llvm.eh.typeid.for.p0(ptr @_ZTIN9upscaledb5errorE) #9
  %324 = icmp eq i32 %322, %323
  br i1 %324, label %325, label %441

325:                                              ; preds = %321
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #9
  %326 = load ptr, ptr %5, align 8
  %327 = call ptr @__cxa_begin_catch(ptr %326) #9
  store ptr %327, ptr %26, align 8
  %328 = load ptr, ptr %26, align 8, !tbaa !14
  %329 = invoke noundef i32 @_ZNK9upscaledb5error9get_errnoEv(ptr noundef nonnull align 4 dereferenceable(4) %328)
          to label %330 unwind label %333

330:                                              ; preds = %325
  %331 = icmp eq i32 %329, -11
  br i1 %331, label %332, label %337

332:                                              ; preds = %330
  store i32 14, ptr %25, align 4
  br label %347, !llvm.loop !18

333:                                              ; preds = %344, %342, %339, %337, %325
  %334 = landingpad { ptr, i32 }
          cleanup
  %335 = extractvalue { ptr, i32 } %334, 0
  store ptr %335, ptr %5, align 8
  %336 = extractvalue { ptr, i32 } %334, 1
  store i32 %336, ptr %6, align 4
  invoke void @__cxa_end_catch()
          to label %353 unwind label %494

337:                                              ; preds = %330
  %338 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.5)
          to label %339 unwind label %333

339:                                              ; preds = %337
  %340 = load ptr, ptr %26, align 8, !tbaa !14
  %341 = invoke noundef ptr @_ZNK9upscaledb5error10get_stringEv(ptr noundef nonnull align 4 dereferenceable(4) %340)
          to label %342 unwind label %333

342:                                              ; preds = %339
  %343 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %338, ptr noundef %341)
          to label %344 unwind label %333

344:                                              ; preds = %342
  %345 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %343, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %346 unwind label %333

346:                                              ; preds = %344
  store i32 -1, ptr %1, align 4
  store i32 1, ptr %25, align 4
  br label %347

347:                                              ; preds = %346, %332
  invoke void @__cxa_end_catch()
          to label %348 unwind label %349

348:                                              ; preds = %347
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #9
  br label %437

349:                                              ; preds = %347
  %350 = landingpad { ptr, i32 }
          cleanup
  %351 = extractvalue { ptr, i32 } %350, 0
  store ptr %351, ptr %5, align 8
  %352 = extractvalue { ptr, i32 } %350, 1
  store i32 %352, ptr %6, align 4
  br label %354

353:                                              ; preds = %333
  br label %354

354:                                              ; preds = %353, %349
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #9
  br label %441

355:                                              ; preds = %312
  %356 = getelementptr inbounds [3 x %"class.upscaledb::cursor"], ptr %7, i64 0, i64 2
  invoke void @_ZN9upscaledb6cursor4moveEPNS_3keyEPNS_6recordEj(ptr noundef nonnull align 8 dereferenceable(8) %356, ptr noundef null, ptr noundef %15, i32 noundef 0)
          to label %357 unwind label %313

357:                                              ; preds = %355
  br label %358

358:                                              ; preds = %435, %357
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #9
  %359 = invoke noundef ptr @_ZNK9upscaledb6record8get_dataEv(ptr noundef nonnull align 8 dereferenceable(24) %15)
          to label %360 unwind label %385

360:                                              ; preds = %358
  %361 = load i32, ptr %359, align 4, !tbaa !5
  store i32 %361, ptr %27, align 4, !tbaa !5
  invoke void @_ZN9upscaledb3key8set_dataEPv(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef %27)
          to label %362 unwind label %385

362:                                              ; preds = %360
  invoke void @_ZN9upscaledb3key8set_sizeEt(ptr noundef nonnull align 8 dereferenceable(24) %10, i16 noundef zeroext 4)
          to label %363 unwind label %385

363:                                              ; preds = %362
  call void @llvm.lifetime.start.p0(i64 24, ptr %28) #9
  %364 = getelementptr inbounds [3 x %"class.upscaledb::db"], ptr %4, i64 0, i64 1
  invoke void @_ZN9upscaledb2db4findEPNS_3keyEj(ptr dead_on_unwind writable sret(%"class.upscaledb::record") align 8 %28, ptr noundef nonnull align 8 dereferenceable(8) %364, ptr noundef %10, i32 noundef 0)
          to label %365 unwind label %389

365:                                              ; preds = %363
  %366 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN9upscaledb6recordaSERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull align 8 dereferenceable(24) %28)
          to label %367 unwind label %389

367:                                              ; preds = %365
  call void @llvm.lifetime.end.p0(i64 24, ptr %28) #9
  %368 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.6)
          to label %369 unwind label %385

369:                                              ; preds = %367
  %370 = load i32, ptr %27, align 4, !tbaa !5
  %371 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %368, i32 noundef %370)
          to label %372 unwind label %385

372:                                              ; preds = %369
  %373 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %371, ptr noundef @.str.7)
          to label %374 unwind label %385

374:                                              ; preds = %372
  %375 = invoke noundef ptr @_ZNK9upscaledb6record8get_dataEv(ptr noundef nonnull align 8 dereferenceable(24) %14)
          to label %376 unwind label %385

376:                                              ; preds = %374
  %377 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %373, ptr noundef %375)
          to label %378 unwind label %385

378:                                              ; preds = %376
  %379 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %377, ptr noundef @.str.8)
          to label %380 unwind label %385

380:                                              ; preds = %378
  %381 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %379, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %382 unwind label %385

382:                                              ; preds = %380
  %383 = getelementptr inbounds [3 x %"class.upscaledb::cursor"], ptr %7, i64 0, i64 2
  invoke void @_ZN9upscaledb6cursor4moveEPNS_3keyEPNS_6recordEj(ptr noundef nonnull align 8 dereferenceable(8) %383, ptr noundef %11, ptr noundef %15, i32 noundef 36)
          to label %384 unwind label %393

384:                                              ; preds = %382
  br label %431

385:                                              ; preds = %380, %378, %376, %374, %372, %369, %367, %362, %360, %358
  %386 = landingpad { ptr, i32 }
          cleanup
  %387 = extractvalue { ptr, i32 } %386, 0
  store ptr %387, ptr %5, align 8
  %388 = extractvalue { ptr, i32 } %386, 1
  store i32 %388, ptr %6, align 4
  br label %440

389:                                              ; preds = %365, %363
  %390 = landingpad { ptr, i32 }
          cleanup
  %391 = extractvalue { ptr, i32 } %390, 0
  store ptr %391, ptr %5, align 8
  %392 = extractvalue { ptr, i32 } %390, 1
  store i32 %392, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 24, ptr %28) #9
  br label %440

393:                                              ; preds = %382
  %394 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN9upscaledb5errorE
  %395 = extractvalue { ptr, i32 } %394, 0
  store ptr %395, ptr %5, align 8
  %396 = extractvalue { ptr, i32 } %394, 1
  store i32 %396, ptr %6, align 4
  br label %397

397:                                              ; preds = %393
  %398 = load i32, ptr %6, align 4
  %399 = call i32 @llvm.eh.typeid.for.p0(ptr @_ZTIN9upscaledb5errorE) #9
  %400 = icmp eq i32 %398, %399
  br i1 %400, label %401, label %440

401:                                              ; preds = %397
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #9
  %402 = load ptr, ptr %5, align 8
  %403 = call ptr @__cxa_begin_catch(ptr %402) #9
  store ptr %403, ptr %29, align 8
  %404 = load ptr, ptr %29, align 8, !tbaa !14
  %405 = invoke noundef i32 @_ZNK9upscaledb5error9get_errnoEv(ptr noundef nonnull align 4 dereferenceable(4) %404)
          to label %406 unwind label %409

406:                                              ; preds = %401
  %407 = icmp eq i32 %405, -11
  br i1 %407, label %408, label %413

408:                                              ; preds = %406
  store i32 16, ptr %25, align 4
  br label %423

409:                                              ; preds = %420, %418, %415, %413, %401
  %410 = landingpad { ptr, i32 }
          cleanup
  %411 = extractvalue { ptr, i32 } %410, 0
  store ptr %411, ptr %5, align 8
  %412 = extractvalue { ptr, i32 } %410, 1
  store i32 %412, ptr %6, align 4
  invoke void @__cxa_end_catch()
          to label %429 unwind label %494

413:                                              ; preds = %406
  %414 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.9)
          to label %415 unwind label %409

415:                                              ; preds = %413
  %416 = load ptr, ptr %29, align 8, !tbaa !14
  %417 = invoke noundef ptr @_ZNK9upscaledb5error10get_stringEv(ptr noundef nonnull align 4 dereferenceable(4) %416)
          to label %418 unwind label %409

418:                                              ; preds = %415
  %419 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %414, ptr noundef %417)
          to label %420 unwind label %409

420:                                              ; preds = %418
  %421 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %419, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %422 unwind label %409

422:                                              ; preds = %420
  store i32 -1, ptr %1, align 4
  store i32 1, ptr %25, align 4
  br label %423

423:                                              ; preds = %422, %408
  invoke void @__cxa_end_catch()
          to label %424 unwind label %425

424:                                              ; preds = %423
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #9
  br label %432

425:                                              ; preds = %423
  %426 = landingpad { ptr, i32 }
          cleanup
  %427 = extractvalue { ptr, i32 } %426, 0
  store ptr %427, ptr %5, align 8
  %428 = extractvalue { ptr, i32 } %426, 1
  store i32 %428, ptr %6, align 4
  br label %430

429:                                              ; preds = %409
  br label %430

430:                                              ; preds = %429, %425
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #9
  br label %440

431:                                              ; preds = %384
  store i32 0, ptr %25, align 4
  br label %432

432:                                              ; preds = %431, %424
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #9
  %433 = load i32, ptr %25, align 4
  switch i32 %433, label %437 [
    i32 0, label %434
    i32 16, label %436
  ]

434:                                              ; preds = %432
  br label %435

435:                                              ; preds = %434
  br i1 true, label %358, label %436, !llvm.loop !19

436:                                              ; preds = %435, %432
  store i32 0, ptr %25, align 4
  br label %437

437:                                              ; preds = %436, %432, %348, %279
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #9
  %438 = load i32, ptr %25, align 4
  switch i32 %438, label %447 [
    i32 0, label %439
    i32 15, label %442
    i32 14, label %244
  ]

439:                                              ; preds = %437
  br label %244, !llvm.loop !18

440:                                              ; preds = %430, %397, %389, %385
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #9
  br label %441

441:                                              ; preds = %440, %354, %321, %313, %285, %252
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #9
  br label %450

442:                                              ; preds = %437
  %443 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.10)
          to label %444 unwind label %173

444:                                              ; preds = %442
  %445 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %443, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %446 unwind label %173

446:                                              ; preds = %444
  store i32 0, ptr %1, align 4
  store i32 1, ptr %25, align 4
  br label %447

447:                                              ; preds = %446, %437
  call void @llvm.lifetime.end.p0(i64 48, ptr %19) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #9
  call void @llvm.lifetime.end.p0(i64 320, ptr %17) #9
  call void @llvm.lifetime.end.p0(i64 144, ptr %16) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #9
  %448 = getelementptr inbounds [3 x %"class.upscaledb::cursor"], ptr %7, i32 0, i32 0
  %449 = getelementptr inbounds %"class.upscaledb::cursor", ptr %448, i64 3
  br label %462

450:                                              ; preds = %441, %173, %172, %163, %154
  call void @llvm.lifetime.end.p0(i64 48, ptr %19) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #9
  br label %451

451:                                              ; preds = %450, %142
  call void @llvm.lifetime.end.p0(i64 320, ptr %17) #9
  call void @llvm.lifetime.end.p0(i64 144, ptr %16) #9
  br label %452

452:                                              ; preds = %451, %138
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #9
  br label %453

453:                                              ; preds = %452, %134
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #9
  br label %454

454:                                              ; preds = %453, %130
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #9
  br label %455

455:                                              ; preds = %454, %126
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #9
  br label %456

456:                                              ; preds = %455, %122
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #9
  br label %457

457:                                              ; preds = %456, %118
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #9
  br label %458

458:                                              ; preds = %457, %114
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #9
  br label %459

459:                                              ; preds = %458, %110
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #9
  %460 = getelementptr inbounds [3 x %"class.upscaledb::cursor"], ptr %7, i32 0, i32 0
  %461 = getelementptr inbounds %"class.upscaledb::cursor", ptr %460, i64 3
  br label %469

462:                                              ; preds = %462, %447
  %463 = phi ptr [ %449, %447 ], [ %464, %462 ]
  %464 = getelementptr inbounds %"class.upscaledb::cursor", ptr %463, i64 -1
  call void @_ZN9upscaledb6cursorD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %464) #9
  %465 = icmp eq ptr %464, %448
  br i1 %465, label %466, label %462

466:                                              ; preds = %462
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #9
  %467 = getelementptr inbounds [3 x %"class.upscaledb::db"], ptr %4, i32 0, i32 0
  %468 = getelementptr inbounds %"class.upscaledb::db", ptr %467, i64 3
  br label %477

469:                                              ; preds = %469, %459
  %470 = phi ptr [ %461, %459 ], [ %471, %469 ]
  %471 = getelementptr inbounds %"class.upscaledb::cursor", ptr %470, i64 -1
  call void @_ZN9upscaledb6cursorD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %471) #9
  %472 = icmp eq ptr %471, %460
  br i1 %472, label %473, label %469

473:                                              ; preds = %469
  br label %474

474:                                              ; preds = %473, %109
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #9
  %475 = getelementptr inbounds [3 x %"class.upscaledb::db"], ptr %4, i32 0, i32 0
  %476 = getelementptr inbounds %"class.upscaledb::db", ptr %475, i64 3
  br label %483

477:                                              ; preds = %477, %466
  %478 = phi ptr [ %468, %466 ], [ %479, %477 ]
  %479 = getelementptr inbounds %"class.upscaledb::db", ptr %478, i64 -1
  call void @_ZN9upscaledb2dbD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %479) #9
  %480 = icmp eq ptr %479, %467
  br i1 %480, label %481, label %477

481:                                              ; preds = %477
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #9
  call void @_ZN9upscaledb3envD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #9
  %482 = load i32, ptr %1, align 4
  ret i32 %482

483:                                              ; preds = %483, %474
  %484 = phi ptr [ %476, %474 ], [ %485, %483 ]
  %485 = getelementptr inbounds %"class.upscaledb::db", ptr %484, i64 -1
  call void @_ZN9upscaledb2dbD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %485) #9
  %486 = icmp eq ptr %485, %475
  br i1 %486, label %487, label %483

487:                                              ; preds = %483
  br label %488

488:                                              ; preds = %487, %99
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #9
  call void @_ZN9upscaledb3envD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #9
  br label %489

489:                                              ; preds = %488
  %490 = load ptr, ptr %5, align 8
  %491 = load i32, ptr %6, align 4
  %492 = insertvalue { ptr, i32 } poison, ptr %490, 0
  %493 = insertvalue { ptr, i32 } %492, i32 %491, 1
  resume { ptr, i32 } %493

494:                                              ; preds = %409, %333, %264
  %495 = landingpad { ptr, i32 }
          catch ptr null
  %496 = extractvalue { ptr, i32 } %495, 0
  call void @__clang_call_terminate(ptr %496) #10
  unreachable
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9upscaledb3envC2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9upscaledb2dbC2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #2 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9upscaledb2dbD2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9upscaledb6cursorC2EPNS_2dbEPNS_3txnEj(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef, ptr noundef, i32 noundef) unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9upscaledb6cursorD2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9upscaledb3keyC2EPvtj(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef, i16 noundef zeroext, i32 noundef) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9upscaledb6recordC2EPvjj(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef, i32 noundef, i32 noundef) unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9upscaledb3env6createEPKcjjPK15ups_parameter_t(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef, i32 noundef, i32 noundef, ptr noundef) #0 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9upscaledb3env9create_dbEtjPK15ups_parameter_t(ptr dead_on_unwind noalias writable sret(%"class.upscaledb::db") align 8, ptr noundef nonnull align 8 dereferenceable(8), i16 noundef zeroext, i32 noundef, ptr noundef) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN9upscaledb2dbaSERKS0_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #0 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9upscaledb6cursor6createEPNS_2dbEPNS_3txnEj(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef, ptr noundef, i32 noundef) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9upscaledb3key8set_sizeEt(ptr noundef nonnull align 8 dereferenceable(24), i16 noundef zeroext) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9upscaledb3key8set_dataEPv(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9upscaledb6record8set_sizeEj(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9upscaledb6record8set_dataEPv(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9upscaledb2db6insertEPNS_3keyEPNS_6recordEj(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef, ptr noundef, i32 noundef) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9upscaledb6cursor9move_nextEPNS_3keyEPNS_6recordE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef, ptr noundef) #0 align 2

; Function Attrs: nounwind memory(none)
declare i32 @llvm.eh.typeid.for.p0(ptr) #5

declare ptr @__cxa_begin_catch(ptr)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK9upscaledb5error9get_errnoEv(ptr noundef nonnull align 4 dereferenceable(4)) #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #6

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZNK9upscaledb5error10get_stringEv(ptr noundef nonnull align 4 dereferenceable(4)) #0 align 2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #6

declare void @__cxa_end_catch()

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) #7

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK9upscaledb6record8get_dataEv(ptr noundef nonnull align 8 dereferenceable(24)) #2 align 2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9upscaledb6cursor4findEPNS_3keyEPNS_6recordEj(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef, ptr noundef, i32 noundef) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9upscaledb6cursor4moveEPNS_3keyEPNS_6recordEj(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef, ptr noundef, i32 noundef) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9upscaledb2db4findEPNS_3keyEj(ptr dead_on_unwind noalias writable sret(%"class.upscaledb::record") align 8, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef, i32 noundef) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZN9upscaledb6recordaSERKS0_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #2 align 2

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #8

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9upscaledb3envD2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #2 align 2

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { nounwind memory(none) }
attributes #6 = { inlinehint 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 #7 = { noinline noreturn nounwind uwtable "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { "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 #9 = { nounwind }
attributes #10 = { noreturn nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = !{!15, !15, i64 0}
!15 = !{!"any pointer", !7, i64 0}
!16 = !{!17, !6, i64 0}
!17 = !{!"_ZTS10customer_t", !6, i64 0, !7, i64 4}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10}


; 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.customer_t = type { i32, [32 x i8] }
%struct.order_t = type { i32, i32, [32 x i8] }
%struct.ups_parameter_t = type { i32, i64 }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.upscaledb::env" = type { ptr }
%"class.upscaledb::db" = type { ptr }
%"class.upscaledb::cursor" = type { ptr }
%"class.upscaledb::key" = type { %struct.ups_key_t }
%struct.ups_key_t = type { i16, ptr, i32, i32 }
%"class.upscaledb::record" = type { %struct.ups_record_t }
%struct.ups_record_t = type { i32, ptr, i32 }

@__const._Z8run_demov.customers = external hidden unnamed_addr constant [4 x %struct.customer_t], align 16
@__const._Z8run_demov.orders = external hidden unnamed_addr constant [8 x %struct.order_t], align 16
@.str = external hidden unnamed_addr constant [8 x i8], align 1
@__const._Z8run_demov.params = external hidden unnamed_addr constant [2 x %struct.ups_parameter_t], align 16
@_ZTIN9upscaledb5errorE = external dso_local constant { ptr, ptr }, align 8
@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@.str.1 = external hidden unnamed_addr constant [28 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.2 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [9 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z8run_demov() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.upscaledb::env", align 8
  %2 = alloca [3 x %"class.upscaledb::db"], align 16
  %3 = alloca [3 x %"class.upscaledb::cursor"], align 16
  %4 = alloca %"class.upscaledb::key", align 8
  %5 = alloca %"class.upscaledb::key", align 8
  %6 = alloca %"class.upscaledb::key", align 8
  %7 = alloca %"class.upscaledb::key", align 8
  %8 = alloca %"class.upscaledb::record", align 8
  %9 = alloca %"class.upscaledb::record", align 8
  %10 = alloca %"class.upscaledb::record", align 8
  %11 = alloca %"class.upscaledb::record", align 8
  %12 = alloca [4 x %struct.customer_t], align 16
  %13 = alloca [8 x %struct.order_t], align 16
  %14 = alloca [2 x %struct.ups_parameter_t], align 16
  %15 = alloca [3 x %struct.ups_parameter_t], align 16
  %16 = alloca %"class.upscaledb::db", align 8
  %17 = alloca %"class.upscaledb::db", align 8
  %18 = alloca %"class.upscaledb::db", align 8
  %19 = alloca i32, align 4
  %20 = alloca %"class.upscaledb::record", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #9
  call void @_ZN9upscaledb3envC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %1)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #9
  call void @_ZN9upscaledb2dbC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %2)
  %.ptr.1 = getelementptr inbounds i8, ptr %2, i64 8
  call void @_ZN9upscaledb2dbC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %.ptr.1)
  %.ptr.2 = getelementptr inbounds i8, ptr %2, i64 16
  call void @_ZN9upscaledb2dbC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %.ptr.2)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #9
  invoke void @_ZN9upscaledb6cursorC2EPNS_2dbEPNS_3txnEj(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef null, ptr noundef null, i32 noundef 0)
          to label %21 unwind label %39

21:                                               ; preds = %0
  %.ptr76.1 = getelementptr inbounds i8, ptr %3, i64 8
  invoke void @_ZN9upscaledb6cursorC2EPNS_2dbEPNS_3txnEj(ptr noundef nonnull align 8 dereferenceable(8) %.ptr76.1, ptr noundef null, ptr noundef null, i32 noundef 0)
          to label %22 unwind label %.preheader106.preheader

22:                                               ; preds = %21
  %.ptr76.2 = getelementptr inbounds i8, ptr %3, i64 16
  invoke void @_ZN9upscaledb6cursorC2EPNS_2dbEPNS_3txnEj(ptr noundef nonnull align 8 dereferenceable(8) %.ptr76.2, ptr noundef null, ptr noundef null, i32 noundef 0)
          to label %23 unwind label %.preheader106.preheader

23:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #9
  call void @_ZN9upscaledb3keyC2EPvtj(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef null, i16 noundef zeroext 0, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #9
  call void @_ZN9upscaledb3keyC2EPvtj(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef null, i16 noundef zeroext 0, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #9
  call void @_ZN9upscaledb3keyC2EPvtj(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef null, i16 noundef zeroext 0, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #9
  call void @_ZN9upscaledb3keyC2EPvtj(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef null, i16 noundef zeroext 0, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #9
  call void @_ZN9upscaledb6recordC2EPvjj(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef null, i32 noundef 0, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #9
  call void @_ZN9upscaledb6recordC2EPvjj(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef null, i32 noundef 0, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #9
  call void @_ZN9upscaledb6recordC2EPvjj(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef null, i32 noundef 0, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %11) #9
  call void @_ZN9upscaledb6recordC2EPvjj(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef null, i32 noundef 0, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 144, ptr nonnull %12) #9
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(144) %12, ptr noundef nonnull align 16 dereferenceable(144) @__const._Z8run_demov.customers, i64 144, i1 false)
  call void @llvm.lifetime.start.p0(i64 320, ptr nonnull %13) #9
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(320) %13, ptr noundef nonnull align 16 dereferenceable(320) @__const._Z8run_demov.orders, i64 320, i1 false)
  invoke void @_ZN9upscaledb3env6createEPKcjjPK15ups_parameter_t(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull @.str, i32 noundef 0, i32 noundef 420, ptr noundef null)
          to label %24 unwind label %47

24:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %14) #9
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %14, ptr noundef nonnull align 16 dereferenceable(32) @__const._Z8run_demov.params, i64 32, i1 false)
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %15) #9
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(48) %15, i8 0, i64 48, i1 false)
  store i32 260, ptr %15, align 16
  %25 = getelementptr inbounds i8, ptr %15, i64 8
  store i64 7, ptr %25, align 8
  %26 = getelementptr inbounds i8, ptr %15, i64 16
  store i32 264, ptr %26, align 16
  %27 = getelementptr inbounds i8, ptr %15, i64 24
  store i64 4, ptr %27, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #9
  invoke void @_ZN9upscaledb3env9create_dbEtjPK15ups_parameter_t(ptr dead_on_unwind nonnull writable sret(%"class.upscaledb::db") align 8 %16, ptr noundef nonnull align 8 dereferenceable(8) %1, i16 noundef zeroext 1, i32 noundef 0, ptr noundef nonnull %14)
          to label %28 unwind label %51

28:                                               ; preds = %24
  %29 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN9upscaledb2dbaSERKS0_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %16)
          to label %30 unwind label %53

30:                                               ; preds = %28
  call void @_ZN9upscaledb2dbD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %16) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #9
  invoke void @_ZN9upscaledb3env9create_dbEtjPK15ups_parameter_t(ptr dead_on_unwind nonnull writable sret(%"class.upscaledb::db") align 8 %17, ptr noundef nonnull align 8 dereferenceable(8) %1, i16 noundef zeroext 2, i32 noundef 0, ptr noundef nonnull %14)
          to label %31 unwind label %56

31:                                               ; preds = %30
  %32 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN9upscaledb2dbaSERKS0_(ptr noundef nonnull align 8 dereferenceable(8) %.ptr.1, ptr noundef nonnull align 8 dereferenceable(8) %17)
          to label %33 unwind label %58

33:                                               ; preds = %31
  call void @_ZN9upscaledb2dbD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %17) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #9
  invoke void @_ZN9upscaledb3env9create_dbEtjPK15ups_parameter_t(ptr dead_on_unwind nonnull writable sret(%"class.upscaledb::db") align 8 %18, ptr noundef nonnull align 8 dereferenceable(8) %1, i16 noundef zeroext 3, i32 noundef 16384, ptr noundef nonnull %15)
          to label %34 unwind label %61

34:                                               ; preds = %33
  %35 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN9upscaledb2dbaSERKS0_(ptr noundef nonnull align 8 dereferenceable(8) %.ptr.2, ptr noundef nonnull align 8 dereferenceable(8) %18)
          to label %36 unwind label %63

36:                                               ; preds = %34
  call void @_ZN9upscaledb2dbD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %18) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #9
  invoke void @_ZN9upscaledb6cursor6createEPNS_2dbEPNS_3txnEj(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull %2, ptr noundef null, i32 noundef 0)
          to label %37 unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit

37:                                               ; preds = %36
  invoke void @_ZN9upscaledb6cursor6createEPNS_2dbEPNS_3txnEj(ptr noundef nonnull align 8 dereferenceable(8) %.ptr76.1, ptr noundef nonnull %.ptr.1, ptr noundef null, i32 noundef 0)
          to label %38 unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit

38:                                               ; preds = %37
  invoke void @_ZN9upscaledb6cursor6createEPNS_2dbEPNS_3txnEj(ptr noundef nonnull align 8 dereferenceable(8) %.ptr76.2, ptr noundef nonnull %.ptr.2, ptr noundef null, i32 noundef 0)
          to label %.preheader100.preheader unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit

.preheader100.preheader:                          ; preds = %38
  call void @_ZN9upscaledb3key8set_sizeEt(ptr noundef nonnull align 8 dereferenceable(24) %4, i16 noundef zeroext 4)
  call void @_ZN9upscaledb3key8set_dataEPv(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull %12)
  call void @_ZN9upscaledb6record8set_sizeEj(ptr noundef nonnull align 8 dereferenceable(24) %8, i32 noundef 36)
  call void @_ZN9upscaledb6record8set_dataEPv(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull %12)
  invoke void @_ZN9upscaledb2db6insertEPNS_3keyEPNS_6recordEj(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull %4, ptr noundef nonnull %8, i32 noundef 0)
          to label %.preheader100.1 unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit

39:                                               ; preds = %0
  %lpad.thr_comm.split-lp = landingpad { ptr, i32 }
          cleanup
  %40 = extractvalue { ptr, i32 } %lpad.thr_comm.split-lp, 0
  %41 = extractvalue { ptr, i32 } %lpad.thr_comm.split-lp, 1
  br label %.loopexit

.preheader106.preheader:                          ; preds = %21, %22
  %.ptr76.lcssa.ph = phi ptr [ %.ptr76.2, %22 ], [ %.ptr76.1, %21 ]
  %lpad.thr_comm = landingpad { ptr, i32 }
          cleanup
  %42 = extractvalue { ptr, i32 } %lpad.thr_comm, 0
  %43 = extractvalue { ptr, i32 } %lpad.thr_comm, 1
  br label %.preheader106

.preheader106:                                    ; preds = %.preheader106.preheader, %.preheader106
  %44 = phi ptr [ %45, %.preheader106 ], [ %.ptr76.lcssa.ph, %.preheader106.preheader ]
  %45 = getelementptr inbounds i8, ptr %44, i64 -8
  call void @_ZN9upscaledb6cursorD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %45) #9
  %46 = icmp eq ptr %45, %3
  br i1 %46, label %.loopexit, label %.preheader106

47:                                               ; preds = %23
  %48 = landingpad { ptr, i32 }
          cleanup
  %49 = extractvalue { ptr, i32 } %48, 0
  %50 = extractvalue { ptr, i32 } %48, 1
  br label %.loopexit.loopexit

51:                                               ; preds = %24
  %52 = landingpad { ptr, i32 }
          cleanup
  br label %55

53:                                               ; preds = %28
  %54 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN9upscaledb2dbD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %16) #9
  br label %55

55:                                               ; preds = %53, %51
  %.pn = phi { ptr, i32 } [ %54, %53 ], [ %52, %51 ]
  %.044 = extractvalue { ptr, i32 } %.pn, 0
  %.052 = extractvalue { ptr, i32 } %.pn, 1
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #9
  br label %.loopexit92

56:                                               ; preds = %30
  %57 = landingpad { ptr, i32 }
          cleanup
  br label %60

58:                                               ; preds = %31
  %59 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN9upscaledb2dbD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %17) #9
  br label %60

60:                                               ; preds = %58, %56
  %.pn79 = phi { ptr, i32 } [ %59, %58 ], [ %57, %56 ]
  %.145 = extractvalue { ptr, i32 } %.pn79, 0
  %.153 = extractvalue { ptr, i32 } %.pn79, 1
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #9
  br label %.loopexit92

61:                                               ; preds = %33
  %62 = landingpad { ptr, i32 }
          cleanup
  br label %65

63:                                               ; preds = %34
  %64 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN9upscaledb2dbD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %18) #9
  br label %65

65:                                               ; preds = %63, %61
  %.pn81 = phi { ptr, i32 } [ %64, %63 ], [ %62, %61 ]
  %.246 = extractvalue { ptr, i32 } %.pn81, 0
  %.254 = extractvalue { ptr, i32 } %.pn81, 1
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #9
  br label %.loopexit92

.loopexit95:                                      ; preds = %.preheader94.7, %.preheader94.6, %.preheader94.5, %.preheader94.4, %.preheader94.3, %.preheader94.2, %.preheader94.1, %.preheader94.preheader
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

.loopexit.split-lp.loopexit:                      ; preds = %.preheader96.7, %.preheader96.6, %.preheader96.5, %.preheader96.4, %.preheader96.3, %.preheader96.2, %.preheader96.1, %.preheader96.preheader
  %lpad.loopexit97 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

.loopexit.split-lp.loopexit.split-lp.loopexit:    ; preds = %.preheader100.3, %.preheader100.2, %.preheader100.1, %.preheader100.preheader
  %lpad.loopexit101 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit: ; preds = %38, %37, %36
  %lpad.loopexit103 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp: ; preds = %216, %214
  %lpad.loopexit.split-lp104 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

.loopexit.split-lp:                               ; preds = %.loopexit.split-lp.loopexit, %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit, %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp, %.loopexit.split-lp.loopexit.split-lp.loopexit, %.loopexit95
  %lpad.phi = phi { ptr, i32 } [ %lpad.loopexit, %.loopexit95 ], [ %lpad.loopexit97, %.loopexit.split-lp.loopexit ], [ %lpad.loopexit101, %.loopexit.split-lp.loopexit.split-lp.loopexit ], [ %lpad.loopexit103, %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit ], [ %lpad.loopexit.split-lp104, %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp ]
  %66 = extractvalue { ptr, i32 } %lpad.phi, 0
  %67 = extractvalue { ptr, i32 } %lpad.phi, 1
  br label %.loopexit92

.preheader100.1:                                  ; preds = %.preheader100.preheader
  call void @_ZN9upscaledb3key8set_sizeEt(ptr noundef nonnull align 8 dereferenceable(24) %4, i16 noundef zeroext 4)
  %68 = getelementptr inbounds i8, ptr %12, i64 36
  call void @_ZN9upscaledb3key8set_dataEPv(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull %68)
  call void @_ZN9upscaledb6record8set_sizeEj(ptr noundef nonnull align 8 dereferenceable(24) %8, i32 noundef 36)
  call void @_ZN9upscaledb6record8set_dataEPv(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull %68)
  invoke void @_ZN9upscaledb2db6insertEPNS_3keyEPNS_6recordEj(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull %4, ptr noundef nonnull %8, i32 noundef 0)
          to label %.preheader100.2 unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit

.preheader100.2:                                  ; preds = %.preheader100.1
  call void @_ZN9upscaledb3key8set_sizeEt(ptr noundef nonnull align 8 dereferenceable(24) %4, i16 noundef zeroext 4)
  %69 = getelementptr inbounds i8, ptr %12, i64 72
  call void @_ZN9upscaledb3key8set_dataEPv(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull %69)
  call void @_ZN9upscaledb6record8set_sizeEj(ptr noundef nonnull align 8 dereferenceable(24) %8, i32 noundef 36)
  call void @_ZN9upscaledb6record8set_dataEPv(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull %69)
  invoke void @_ZN9upscaledb2db6insertEPNS_3keyEPNS_6recordEj(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull %4, ptr noundef nonnull %8, i32 noundef 0)
          to label %.preheader100.3 unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit

.preheader100.3:                                  ; preds = %.preheader100.2
  call void @_ZN9upscaledb3key8set_sizeEt(ptr noundef nonnull align 8 dereferenceable(24) %4, i16 noundef zeroext 4)
  %70 = getelementptr inbounds i8, ptr %12, i64 108
  call void @_ZN9upscaledb3key8set_dataEPv(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull %70)
  call void @_ZN9upscaledb6record8set_sizeEj(ptr noundef nonnull align 8 dereferenceable(24) %8, i32 noundef 36)
  call void @_ZN9upscaledb6record8set_dataEPv(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull %70)
  invoke void @_ZN9upscaledb2db6insertEPNS_3keyEPNS_6recordEj(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull %4, ptr noundef nonnull %8, i32 noundef 0)
          to label %.preheader96.preheader unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit

.preheader96.preheader:                           ; preds = %.preheader100.3
  call void @_ZN9upscaledb3key8set_sizeEt(ptr noundef nonnull align 8 dereferenceable(24) %4, i16 noundef zeroext 4)
  call void @_ZN9upscaledb3key8set_dataEPv(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull %13)
  call void @_ZN9upscaledb6record8set_sizeEj(ptr noundef nonnull align 8 dereferenceable(24) %8, i32 noundef 32)
  %71 = getelementptr inbounds i8, ptr %13, i64 8
  call void @_ZN9upscaledb6record8set_dataEPv(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull %71)
  invoke void @_ZN9upscaledb2db6insertEPNS_3keyEPNS_6recordEj(ptr noundef nonnull align 8 dereferenceable(8) %.ptr.1, ptr noundef nonnull %4, ptr noundef nonnull %8, i32 noundef 0)
          to label %.preheader96.1 unwind label %.loopexit.split-lp.loopexit

.preheader96.1:                                   ; preds = %.preheader96.preheader
  call void @_ZN9upscaledb3key8set_sizeEt(ptr noundef nonnull align 8 dereferenceable(24) %4, i16 noundef zeroext 4)
  %72 = getelementptr inbounds i8, ptr %13, i64 40
  call void @_ZN9upscaledb3key8set_dataEPv(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull %72)
  call void @_ZN9upscaledb6record8set_sizeEj(ptr noundef nonnull align 8 dereferenceable(24) %8, i32 noundef 32)
  %73 = getelementptr inbounds i8, ptr %13, i64 48
  call void @_ZN9upscaledb6record8set_dataEPv(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull %73)
  invoke void @_ZN9upscaledb2db6insertEPNS_3keyEPNS_6recordEj(ptr noundef nonnull align 8 dereferenceable(8) %.ptr.1, ptr noundef nonnull %4, ptr noundef nonnull %8, i32 noundef 0)
          to label %.preheader96.2 unwind label %.loopexit.split-lp.loopexit

.preheader96.2:                                   ; preds = %.preheader96.1
  call void @_ZN9upscaledb3key8set_sizeEt(ptr noundef nonnull align 8 dereferenceable(24) %4, i16 noundef zeroext 4)
  %74 = getelementptr inbounds i8, ptr %13, i64 80
  call void @_ZN9upscaledb3key8set_dataEPv(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull %74)
  call void @_ZN9upscaledb6record8set_sizeEj(ptr noundef nonnull align 8 dereferenceable(24) %8, i32 noundef 32)
  %75 = getelementptr inbounds i8, ptr %13, i64 88
  call void @_ZN9upscaledb6record8set_dataEPv(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull %75)
  invoke void @_ZN9upscaledb2db6insertEPNS_3keyEPNS_6recordEj(ptr noundef nonnull align 8 dereferenceable(8) %.ptr.1, ptr noundef nonnull %4, ptr noundef nonnull %8, i32 noundef 0)
          to label %.preheader96.3 unwind label %.loopexit.split-lp.loopexit

.preheader96.3:                                   ; preds = %.preheader96.2
  call void @_ZN9upscaledb3key8set_sizeEt(ptr noundef nonnull align 8 dereferenceable(24) %4, i16 noundef zeroext 4)
  %76 = getelementptr inbounds i8, ptr %13, i64 120
  call void @_ZN9upscaledb3key8set_dataEPv(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull %76)
  call void @_ZN9upscaledb6record8set_sizeEj(ptr noundef nonnull align 8 dereferenceable(24) %8, i32 noundef 32)
  %77 = getelementptr inbounds i8, ptr %13, i64 128
  call void @_ZN9upscaledb6record8set_dataEPv(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull %77)
  invoke void @_ZN9upscaledb2db6insertEPNS_3keyEPNS_6recordEj(ptr noundef nonnull align 8 dereferenceable(8) %.ptr.1, ptr noundef nonnull %4, ptr noundef nonnull %8, i32 noundef 0)
          to label %.preheader96.4 unwind label %.loopexit.split-lp.loopexit

.preheader96.4:                                   ; preds = %.preheader96.3
  call void @_ZN9upscaledb3key8set_sizeEt(ptr noundef nonnull align 8 dereferenceable(24) %4, i16 noundef zeroext 4)
  %78 = getelementptr inbounds i8, ptr %13, i64 160
  call void @_ZN9upscaledb3key8set_dataEPv(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull %78)
  call void @_ZN9upscaledb6record8set_sizeEj(ptr noundef nonnull align 8 dereferenceable(24) %8, i32 noundef 32)
  %79 = getelementptr inbounds i8, ptr %13, i64 168
  call void @_ZN9upscaledb6record8set_dataEPv(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull %79)
  invoke void @_ZN9upscaledb2db6insertEPNS_3keyEPNS_6recordEj(ptr noundef nonnull align 8 dereferenceable(8) %.ptr.1, ptr noundef nonnull %4, ptr noundef nonnull %8, i32 noundef 0)
          to label %.preheader96.5 unwind label %.loopexit.split-lp.loopexit

.preheader96.5:                                   ; preds = %.preheader96.4
  call void @_ZN9upscaledb3key8set_sizeEt(ptr noundef nonnull align 8 dereferenceable(24) %4, i16 noundef zeroext 4)
  %80 = getelementptr inbounds i8, ptr %13, i64 200
  call void @_ZN9upscaledb3key8set_dataEPv(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull %80)
  call void @_ZN9upscaledb6record8set_sizeEj(ptr noundef nonnull align 8 dereferenceable(24) %8, i32 noundef 32)
  %81 = getelementptr inbounds i8, ptr %13, i64 208
  call void @_ZN9upscaledb6record8set_dataEPv(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull %81)
  invoke void @_ZN9upscaledb2db6insertEPNS_3keyEPNS_6recordEj(ptr noundef nonnull align 8 dereferenceable(8) %.ptr.1, ptr noundef nonnull %4, ptr noundef nonnull %8, i32 noundef 0)
          to label %.preheader96.6 unwind label %.loopexit.split-lp.loopexit

.preheader96.6:                                   ; preds = %.preheader96.5
  call void @_ZN9upscaledb3key8set_sizeEt(ptr noundef nonnull align 8 dereferenceable(24) %4, i16 noundef zeroext 4)
  %82 = getelementptr inbounds i8, ptr %13, i64 240
  call void @_ZN9upscaledb3key8set_dataEPv(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull %82)
  call void @_ZN9upscaledb6record8set_sizeEj(ptr noundef nonnull align 8 dereferenceable(24) %8, i32 noundef 32)
  %83 = getelementptr inbounds i8, ptr %13, i64 248
  call void @_ZN9upscaledb6record8set_dataEPv(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull %83)
  invoke void @_ZN9upscaledb2db6insertEPNS_3keyEPNS_6recordEj(ptr noundef nonnull align 8 dereferenceable(8) %.ptr.1, ptr noundef nonnull %4, ptr noundef nonnull %8, i32 noundef 0)
          to label %.preheader96.7 unwind label %.loopexit.split-lp.loopexit

.preheader96.7:                                   ; preds = %.preheader96.6
  call void @_ZN9upscaledb3key8set_sizeEt(ptr noundef nonnull align 8 dereferenceable(24) %4, i16 noundef zeroext 4)
  %84 = getelementptr inbounds i8, ptr %13, i64 280
  call void @_ZN9upscaledb3key8set_dataEPv(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull %84)
  call void @_ZN9upscaledb6record8set_sizeEj(ptr noundef nonnull align 8 dereferenceable(24) %8, i32 noundef 32)
  %85 = getelementptr inbounds i8, ptr %13, i64 288
  call void @_ZN9upscaledb6record8set_dataEPv(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull %85)
  invoke void @_ZN9upscaledb2db6insertEPNS_3keyEPNS_6recordEj(ptr noundef nonnull align 8 dereferenceable(8) %.ptr.1, ptr noundef nonnull %4, ptr noundef nonnull %8, i32 noundef 0)
          to label %.preheader94.preheader unwind label %.loopexit.split-lp.loopexit

.preheader94.preheader:                           ; preds = %.preheader96.7
  call void @_ZN9upscaledb3key8set_sizeEt(ptr noundef nonnull align 8 dereferenceable(24) %4, i16 noundef zeroext 4)
  %86 = getelementptr inbounds i8, ptr %13, i64 4
  call void @_ZN9upscaledb3key8set_dataEPv(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull %86)
  call void @_ZN9upscaledb6record8set_sizeEj(ptr noundef nonnull align 8 dereferenceable(24) %8, i32 noundef 4)
  call void @_ZN9upscaledb6record8set_dataEPv(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull %13)
  invoke void @_ZN9upscaledb2db6insertEPNS_3keyEPNS_6recordEj(ptr noundef nonnull align 8 dereferenceable(8) %.ptr.2, ptr noundef nonnull %4, ptr noundef nonnull %8, i32 noundef 2)
          to label %.preheader94.1 unwind label %.loopexit95

.preheader94.1:                                   ; preds = %.preheader94.preheader
  call void @_ZN9upscaledb3key8set_sizeEt(ptr noundef nonnull align 8 dereferenceable(24) %4, i16 noundef zeroext 4)
  %87 = getelementptr inbounds i8, ptr %13, i64 44
  call void @_ZN9upscaledb3key8set_dataEPv(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull %87)
  call void @_ZN9upscaledb6record8set_sizeEj(ptr noundef nonnull align 8 dereferenceable(24) %8, i32 noundef 4)
  call void @_ZN9upscaledb6record8set_dataEPv(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull %72)
  invoke void @_ZN9upscaledb2db6insertEPNS_3keyEPNS_6recordEj(ptr noundef nonnull align 8 dereferenceable(8) %.ptr.2, ptr noundef nonnull %4, ptr noundef nonnull %8, i32 noundef 2)
          to label %.preheader94.2 unwind label %.loopexit95

.preheader94.2:                                   ; preds = %.preheader94.1
  call void @_ZN9upscaledb3key8set_sizeEt(ptr noundef nonnull align 8 dereferenceable(24) %4, i16 noundef zeroext 4)
  %88 = getelementptr inbounds i8, ptr %13, i64 84
  call void @_ZN9upscaledb3key8set_dataEPv(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull %88)
  call void @_ZN9upscaledb6record8set_sizeEj(ptr noundef nonnull align 8 dereferenceable(24) %8, i32 noundef 4)
  call void @_ZN9upscaledb6record8set_dataEPv(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull %74)
  invoke void @_ZN9upscaledb2db6insertEPNS_3keyEPNS_6recordEj(ptr noundef nonnull align 8 dereferenceable(8) %.ptr.2, ptr noundef nonnull %4, ptr noundef nonnull %8, i32 noundef 2)
          to label %.preheader94.3 unwind label %.loopexit95

.preheader94.3:                                   ; preds = %.preheader94.2
  call void @_ZN9upscaledb3key8set_sizeEt(ptr noundef nonnull align 8 dereferenceable(24) %4, i16 noundef zeroext 4)
  %89 = getelementptr inbounds i8, ptr %13, i64 124
  call void @_ZN9upscaledb3key8set_dataEPv(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull %89)
  call void @_ZN9upscaledb6record8set_sizeEj(ptr noundef nonnull align 8 dereferenceable(24) %8, i32 noundef 4)
  call void @_ZN9upscaledb6record8set_dataEPv(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull %76)
  invoke void @_ZN9upscaledb2db6insertEPNS_3keyEPNS_6recordEj(ptr noundef nonnull align 8 dereferenceable(8) %.ptr.2, ptr noundef nonnull %4, ptr noundef nonnull %8, i32 noundef 2)
          to label %.preheader94.4 unwind label %.loopexit95

.preheader94.4:                                   ; preds = %.preheader94.3
  call void @_ZN9upscaledb3key8set_sizeEt(ptr noundef nonnull align 8 dereferenceable(24) %4, i16 noundef zeroext 4)
  %90 = getelementptr inbounds i8, ptr %13, i64 164
  call void @_ZN9upscaledb3key8set_dataEPv(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull %90)
  call void @_ZN9upscaledb6record8set_sizeEj(ptr noundef nonnull align 8 dereferenceable(24) %8, i32 noundef 4)
  call void @_ZN9upscaledb6record8set_dataEPv(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull %78)
  invoke void @_ZN9upscaledb2db6insertEPNS_3keyEPNS_6recordEj(ptr noundef nonnull align 8 dereferenceable(8) %.ptr.2, ptr noundef nonnull %4, ptr noundef nonnull %8, i32 noundef 2)
          to label %.preheader94.5 unwind label %.loopexit95

.preheader94.5:                                   ; preds = %.preheader94.4
  call void @_ZN9upscaledb3key8set_sizeEt(ptr noundef nonnull align 8 dereferenceable(24) %4, i16 noundef zeroext 4)
  %91 = getelementptr inbounds i8, ptr %13, i64 204
  call void @_ZN9upscaledb3key8set_dataEPv(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull %91)
  call void @_ZN9upscaledb6record8set_sizeEj(ptr noundef nonnull align 8 dereferenceable(24) %8, i32 noundef 4)
  call void @_ZN9upscaledb6record8set_dataEPv(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull %80)
  invoke void @_ZN9upscaledb2db6insertEPNS_3keyEPNS_6recordEj(ptr noundef nonnull align 8 dereferenceable(8) %.ptr.2, ptr noundef nonnull %4, ptr noundef nonnull %8, i32 noundef 2)
          to label %.preheader94.6 unwind label %.loopexit95

.preheader94.6:                                   ; preds = %.preheader94.5
  call void @_ZN9upscaledb3key8set_sizeEt(ptr noundef nonnull align 8 dereferenceable(24) %4, i16 noundef zeroext 4)
  %92 = getelementptr inbounds i8, ptr %13, i64 244
  call void @_ZN9upscaledb3key8set_dataEPv(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull %92)
  call void @_ZN9upscaledb6record8set_sizeEj(ptr noundef nonnull align 8 dereferenceable(24) %8, i32 noundef 4)
  call void @_ZN9upscaledb6record8set_dataEPv(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull %82)
  invoke void @_ZN9upscaledb2db6insertEPNS_3keyEPNS_6recordEj(ptr noundef nonnull align 8 dereferenceable(8) %.ptr.2, ptr noundef nonnull %4, ptr noundef nonnull %8, i32 noundef 2)
          to label %.preheader94.7 unwind label %.loopexit95

.preheader94.7:                                   ; preds = %.preheader94.6
  call void @_ZN9upscaledb3key8set_sizeEt(ptr noundef nonnull align 8 dereferenceable(24) %4, i16 noundef zeroext 4)
  %93 = getelementptr inbounds i8, ptr %13, i64 284
  call void @_ZN9upscaledb3key8set_dataEPv(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull %93)
  call void @_ZN9upscaledb6record8set_sizeEj(ptr noundef nonnull align 8 dereferenceable(24) %8, i32 noundef 4)
  call void @_ZN9upscaledb6record8set_dataEPv(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull %84)
  invoke void @_ZN9upscaledb2db6insertEPNS_3keyEPNS_6recordEj(ptr noundef nonnull align 8 dereferenceable(8) %.ptr.2, ptr noundef nonnull %4, ptr noundef nonnull %8, i32 noundef 2)
          to label %.preheader91 unwind label %.loopexit95

.preheader91:                                     ; preds = %.preheader94.7, %.backedge
  invoke void @_ZN9upscaledb6cursor9move_nextEPNS_3keyEPNS_6recordE(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull %5, ptr noundef nonnull %9)
          to label %118 unwind label %94

94:                                               ; preds = %.preheader91
  %95 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN9upscaledb5errorE
  %96 = extractvalue { ptr, i32 } %95, 0
  %97 = extractvalue { ptr, i32 } %95, 1
  %98 = call i32 @llvm.eh.typeid.for.p0(ptr nonnull @_ZTIN9upscaledb5errorE) #9
  %99 = icmp eq i32 %97, %98
  br i1 %99, label %100, label %.loopexit92

100:                                              ; preds = %94
  %101 = call ptr @__cxa_begin_catch(ptr %96) #9
  %102 = call noundef i32 @_ZNK9upscaledb5error9get_errnoEv(ptr noundef nonnull align 4 dereferenceable(4) %101)
  %103 = icmp eq i32 %102, -11
  br i1 %103, label %114, label %106

104:                                              ; preds = %112, %110, %108, %106
  %105 = landingpad { ptr, i32 }
          cleanup
  invoke void @__cxa_end_catch()
          to label %117 unwind label %228

106:                                              ; preds = %100
  %107 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str.1)
          to label %108 unwind label %104

108:                                              ; preds = %106
  %109 = invoke noundef ptr @_ZNK9upscaledb5error10get_stringEv(ptr noundef nonnull align 4 dereferenceable(4) %101)
          to label %110 unwind label %104

110:                                              ; preds = %108
  %111 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %107, ptr noundef %109)
          to label %112 unwind label %104

112:                                              ; preds = %110
  %113 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %111, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %114 unwind label %104

114:                                              ; preds = %112, %100
  %.039 = phi i32 [ 15, %100 ], [ 1, %112 ]
  invoke void @__cxa_end_catch()
          to label %.loopexit90 unwind label %115

115:                                              ; preds = %114
  %116 = landingpad { ptr, i32 }
          cleanup
  br label %117

117:                                              ; preds = %104, %115
  %.pn83 = phi { ptr, i32 } [ %116, %115 ], [ %105, %104 ]
  %.347 = extractvalue { ptr, i32 } %.pn83, 0
  %.355 = extractvalue { ptr, i32 } %.pn83, 1
  br label %.loopexit92

118:                                              ; preds = %.preheader91
  %119 = call noundef ptr @_ZNK9upscaledb6record8get_dataEv(ptr noundef nonnull align 8 dereferenceable(24) %9)
  %120 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.2)
          to label %121 unwind label %134

121:                                              ; preds = %118
  %122 = load i32, ptr %119, align 4, !tbaa !5
  %123 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8) %120, i32 noundef %122)
          to label %124 unwind label %134

124:                                              ; preds = %121
  %125 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %123, ptr noundef nonnull @.str.3)
          to label %126 unwind label %134

126:                                              ; preds = %124
  %127 = getelementptr inbounds i8, ptr %119, i64 4
  %128 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %125, ptr noundef nonnull %127)
          to label %129 unwind label %134

129:                                              ; preds = %126
  %130 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %128, ptr noundef nonnull @.str.4)
          to label %131 unwind label %134

131:                                              ; preds = %129
  %132 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %130, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %133 unwind label %134

133:                                              ; preds = %131
  call void @_ZN9upscaledb3key8set_dataEPv(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull %119)
  call void @_ZN9upscaledb3key8set_sizeEt(ptr noundef nonnull align 8 dereferenceable(24) %7, i16 noundef zeroext 4)
  invoke void @_ZN9upscaledb6cursor4findEPNS_3keyEPNS_6recordEj(ptr noundef nonnull align 8 dereferenceable(8) %.ptr76.2, ptr noundef nonnull %7, ptr noundef null, i32 noundef 0)
          to label %162 unwind label %138

134:                                              ; preds = %162, %131, %129, %126, %124, %121, %118
  %135 = landingpad { ptr, i32 }
          cleanup
  %136 = extractvalue { ptr, i32 } %135, 0
  %137 = extractvalue { ptr, i32 } %135, 1
  br label %.loopexit92

138:                                              ; preds = %133
  %139 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN9upscaledb5errorE
  %140 = extractvalue { ptr, i32 } %139, 0
  %141 = extractvalue { ptr, i32 } %139, 1
  %142 = call i32 @llvm.eh.typeid.for.p0(ptr nonnull @_ZTIN9upscaledb5errorE) #9
  %143 = icmp eq i32 %141, %142
  br i1 %143, label %144, label %.loopexit92

144:                                              ; preds = %138
  %145 = call ptr @__cxa_begin_catch(ptr %140) #9
  %146 = call noundef i32 @_ZNK9upscaledb5error9get_errnoEv(ptr noundef nonnull align 4 dereferenceable(4) %145)
  %147 = icmp eq i32 %146, -11
  br i1 %147, label %158, label %150, !llvm.loop !10

148:                                              ; preds = %156, %154, %152, %150
  %149 = landingpad { ptr, i32 }
          cleanup
  invoke void @__cxa_end_catch()
          to label %161 unwind label %228

150:                                              ; preds = %144
  %151 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str.5)
          to label %152 unwind label %148

152:                                              ; preds = %150
  %153 = invoke noundef ptr @_ZNK9upscaledb5error10get_stringEv(ptr noundef nonnull align 4 dereferenceable(4) %145)
          to label %154 unwind label %148

154:                                              ; preds = %152
  %155 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %151, ptr noundef %153)
          to label %156 unwind label %148

156:                                              ; preds = %154
  %157 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %155, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %158 unwind label %148

158:                                              ; preds = %156, %144
  %.140 = phi i32 [ 14, %144 ], [ 1, %156 ]
  invoke void @__cxa_end_catch()
          to label %.loopexit90 unwind label %159

159:                                              ; preds = %158
  %160 = landingpad { ptr, i32 }
          cleanup
  br label %161

161:                                              ; preds = %148, %159
  %.pn85 = phi { ptr, i32 } [ %160, %159 ], [ %149, %148 ]
  %.448 = extractvalue { ptr, i32 } %.pn85, 0
  %.456 = extractvalue { ptr, i32 } %.pn85, 1
  br label %.loopexit92

162:                                              ; preds = %133
  invoke void @_ZN9upscaledb6cursor4moveEPNS_3keyEPNS_6recordEj(ptr noundef nonnull align 8 dereferenceable(8) %.ptr76.2, ptr noundef null, ptr noundef nonnull %11, i32 noundef 0)
          to label %.preheader unwind label %134

.preheader:                                       ; preds = %162, %213
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %19) #9
  %163 = call noundef ptr @_ZNK9upscaledb6record8get_dataEv(ptr noundef nonnull align 8 dereferenceable(24) %11)
  %164 = load i32, ptr %163, align 4, !tbaa !12
  store i32 %164, ptr %19, align 4, !tbaa !12
  call void @_ZN9upscaledb3key8set_dataEPv(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull %19)
  call void @_ZN9upscaledb3key8set_sizeEt(ptr noundef nonnull align 8 dereferenceable(24) %6, i16 noundef zeroext 4)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %20) #9
  invoke void @_ZN9upscaledb2db4findEPNS_3keyEj(ptr dead_on_unwind nonnull writable sret(%"class.upscaledb::record") align 8 %20, ptr noundef nonnull align 8 dereferenceable(8) %.ptr.1, ptr noundef nonnull %6, i32 noundef 0)
          to label %165 unwind label %185

165:                                              ; preds = %.preheader
  %166 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN9upscaledb6recordaSERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(24) %20)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %20) #9
  %167 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.6)
          to label %168 unwind label %181

168:                                              ; preds = %165
  %169 = load i32, ptr %19, align 4, !tbaa !12
  %170 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %167, i32 noundef %169)
          to label %171 unwind label %181

171:                                              ; preds = %168
  %172 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %170, ptr noundef nonnull @.str.7)
          to label %173 unwind label %181

173:                                              ; preds = %171
  %174 = call noundef ptr @_ZNK9upscaledb6record8get_dataEv(ptr noundef nonnull align 8 dereferenceable(24) %10)
  %175 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %172, ptr noundef %174)
          to label %176 unwind label %181

176:                                              ; preds = %173
  %177 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %175, ptr noundef nonnull @.str.8)
          to label %178 unwind label %181

178:                                              ; preds = %176
  %179 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %177, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %180 unwind label %181

180:                                              ; preds = %178
  invoke void @_ZN9upscaledb6cursor4moveEPNS_3keyEPNS_6recordEj(ptr noundef nonnull align 8 dereferenceable(8) %.ptr76.2, ptr noundef nonnull %7, ptr noundef nonnull %11, i32 noundef 36)
          to label %213 unwind label %189

181:                                              ; preds = %178, %176, %173, %171, %168, %165
  %182 = landingpad { ptr, i32 }
          cleanup
  %183 = extractvalue { ptr, i32 } %182, 0
  %184 = extractvalue { ptr, i32 } %182, 1
  br label %.loopexit89

185:                                              ; preds = %.preheader
  %186 = landingpad { ptr, i32 }
          cleanup
  %187 = extractvalue { ptr, i32 } %186, 0
  %188 = extractvalue { ptr, i32 } %186, 1
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %20) #9
  br label %.loopexit89

189:                                              ; preds = %180
  %190 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN9upscaledb5errorE
  %191 = extractvalue { ptr, i32 } %190, 0
  %192 = extractvalue { ptr, i32 } %190, 1
  %193 = call i32 @llvm.eh.typeid.for.p0(ptr nonnull @_ZTIN9upscaledb5errorE) #9
  %194 = icmp eq i32 %192, %193
  br i1 %194, label %195, label %.loopexit89

195:                                              ; preds = %189
  %196 = call ptr @__cxa_begin_catch(ptr %191) #9
  %197 = call noundef i32 @_ZNK9upscaledb5error9get_errnoEv(ptr noundef nonnull align 4 dereferenceable(4) %196)
  %198 = icmp eq i32 %197, -11
  br i1 %198, label %209, label %201

199:                                              ; preds = %207, %205, %203, %201
  %200 = landingpad { ptr, i32 }
          cleanup
  invoke void @__cxa_end_catch()
          to label %212 unwind label %228

201:                                              ; preds = %195
  %202 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str.9)
          to label %203 unwind label %199

203:                                              ; preds = %201
  %204 = invoke noundef ptr @_ZNK9upscaledb5error10get_stringEv(ptr noundef nonnull align 4 dereferenceable(4) %196)
          to label %205 unwind label %199

205:                                              ; preds = %203
  %206 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %202, ptr noundef %204)
          to label %207 unwind label %199

207:                                              ; preds = %205
  %208 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %206, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %209 unwind label %199

209:                                              ; preds = %207, %195
  %.241 = phi i32 [ 16, %195 ], [ 1, %207 ]
  invoke void @__cxa_end_catch()
          to label %213 unwind label %210

210:                                              ; preds = %209
  %211 = landingpad { ptr, i32 }
          cleanup
  br label %212

212:                                              ; preds = %199, %210
  %.pn87 = phi { ptr, i32 } [ %211, %210 ], [ %200, %199 ]
  %.549 = extractvalue { ptr, i32 } %.pn87, 0
  %.557 = extractvalue { ptr, i32 } %.pn87, 1
  br label %.loopexit89

213:                                              ; preds = %180, %209
  %.342 = phi i32 [ %.241, %209 ], [ 0, %180 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %19) #9
  switch i32 %.342, label %.loopexit90 [
    i32 0, label %.preheader
    i32 16, label %.backedge
  ], !llvm.loop !13

.loopexit90:                                      ; preds = %213, %158, %114
  %.443 = phi i32 [ %.039, %114 ], [ %.140, %158 ], [ %.342, %213 ]
  switch i32 %.443, label %.loopexit93 [
    i32 0, label %.backedge
    i32 15, label %214
    i32 14, label %.backedge
  ]

.backedge:                                        ; preds = %213, %.loopexit90, %.loopexit90
  br label %.preheader91, !llvm.loop !10

.loopexit89:                                      ; preds = %189, %212, %185, %181
  %.658 = phi i32 [ %.557, %212 ], [ %184, %181 ], [ %188, %185 ], [ %192, %189 ]
  %.650 = phi ptr [ %.549, %212 ], [ %183, %181 ], [ %187, %185 ], [ %191, %189 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %19) #9
  br label %.loopexit92

214:                                              ; preds = %.loopexit90
  %215 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.10)
          to label %216 unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp

216:                                              ; preds = %214
  %217 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %215, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %.loopexit93 unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp

.loopexit93:                                      ; preds = %.loopexit90, %216
  %.7 = phi i32 [ 0, %216 ], [ -1, %.loopexit90 ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %15) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %14) #9
  call void @llvm.lifetime.end.p0(i64 320, ptr nonnull %13) #9
  call void @llvm.lifetime.end.p0(i64 144, ptr nonnull %12) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #9
  %218 = getelementptr inbounds i8, ptr %3, i64 16
  call void @_ZN9upscaledb6cursorD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %218) #9
  %219 = getelementptr inbounds i8, ptr %3, i64 8
  call void @_ZN9upscaledb6cursorD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %219) #9
  call void @_ZN9upscaledb6cursorD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #9
  %220 = getelementptr inbounds i8, ptr %2, i64 16
  call void @_ZN9upscaledb2dbD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %220) #9
  %221 = getelementptr inbounds i8, ptr %2, i64 8
  call void @_ZN9upscaledb2dbD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %221) #9
  call void @_ZN9upscaledb2dbD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %2) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #9
  call void @_ZN9upscaledb3envD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %1) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #9
  ret i32 %.7

.loopexit92:                                      ; preds = %94, %138, %117, %134, %161, %.loopexit89, %.loopexit.split-lp, %65, %60, %55
  %.860 = phi i32 [ %67, %.loopexit.split-lp ], [ %.254, %65 ], [ %.153, %60 ], [ %.052, %55 ], [ %.658, %.loopexit89 ], [ %137, %134 ], [ %.456, %161 ], [ %.355, %117 ], [ %97, %94 ], [ %141, %138 ]
  %.8 = phi ptr [ %66, %.loopexit.split-lp ], [ %.246, %65 ], [ %.145, %60 ], [ %.044, %55 ], [ %.650, %.loopexit89 ], [ %136, %134 ], [ %.448, %161 ], [ %.347, %117 ], [ %96, %94 ], [ %140, %138 ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %15) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %14) #9
  br label %.loopexit.loopexit

.loopexit.loopexit:                               ; preds = %.loopexit92, %47
  %.961 = phi i32 [ %.860, %.loopexit92 ], [ %50, %47 ]
  %.9 = phi ptr [ %.8, %.loopexit92 ], [ %49, %47 ]
  call void @llvm.lifetime.end.p0(i64 320, ptr nonnull %13) #9
  call void @llvm.lifetime.end.p0(i64 144, ptr nonnull %12) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #9
  %222 = getelementptr inbounds i8, ptr %3, i64 16
  call void @_ZN9upscaledb6cursorD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %222) #9
  %223 = getelementptr inbounds i8, ptr %3, i64 8
  call void @_ZN9upscaledb6cursorD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %223) #9
  call void @_ZN9upscaledb6cursorD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #9
  br label %.loopexit

.loopexit:                                        ; preds = %.preheader106, %39, %.loopexit.loopexit
  %.1062 = phi i32 [ %41, %39 ], [ %.961, %.loopexit.loopexit ], [ %43, %.preheader106 ]
  %.10 = phi ptr [ %40, %39 ], [ %.9, %.loopexit.loopexit ], [ %42, %.preheader106 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #9
  %224 = getelementptr inbounds i8, ptr %2, i64 16
  call void @_ZN9upscaledb2dbD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %224) #9
  %225 = getelementptr inbounds i8, ptr %2, i64 8
  call void @_ZN9upscaledb2dbD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %225) #9
  call void @_ZN9upscaledb2dbD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %2) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #9
  call void @_ZN9upscaledb3envD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %1) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #9
  %226 = insertvalue { ptr, i32 } poison, ptr %.10, 0
  %227 = insertvalue { ptr, i32 } %226, i32 %.1062, 1
  resume { ptr, i32 } %227

228:                                              ; preds = %199, %148, %104
  %229 = landingpad { ptr, i32 }
          catch ptr null
  %230 = extractvalue { ptr, i32 } %229, 0
  call void @__clang_call_terminate(ptr %230) #10
  unreachable
}

; 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 nounwind uwtable
declare dso_local void @_ZN9upscaledb3envC2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9upscaledb2dbC2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #2 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9upscaledb2dbD2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9upscaledb6cursorC2EPNS_2dbEPNS_3txnEj(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef, ptr noundef, i32 noundef) unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9upscaledb6cursorD2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9upscaledb3keyC2EPvtj(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef, i16 noundef zeroext, i32 noundef) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9upscaledb6recordC2EPvjj(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef, i32 noundef, i32 noundef) unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9upscaledb3env6createEPKcjjPK15ups_parameter_t(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #0 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9upscaledb3env9create_dbEtjPK15ups_parameter_t(ptr dead_on_unwind noalias writable sret(%"class.upscaledb::db") align 8, ptr noundef nonnull align 8 dereferenceable(8), i16 noundef zeroext, i32 noundef, ptr noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN9upscaledb2dbaSERKS0_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9upscaledb6cursor6createEPNS_2dbEPNS_3txnEj(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9upscaledb3key8set_sizeEt(ptr noundef nonnull align 8 dereferenceable(24), i16 noundef zeroext) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9upscaledb3key8set_dataEPv(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9upscaledb6record8set_sizeEj(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9upscaledb6record8set_dataEPv(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9upscaledb2db6insertEPNS_3keyEPNS_6recordEj(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9upscaledb6cursor9move_nextEPNS_3keyEPNS_6recordE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef, ptr noundef) local_unnamed_addr #0 align 2

; Function Attrs: nofree nosync nounwind memory(none)
declare i32 @llvm.eh.typeid.for.p0(ptr) #5

declare ptr @__cxa_begin_catch(ptr) local_unnamed_addr

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK9upscaledb5error9get_errnoEv(ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #6

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZNK9upscaledb5error10get_stringEv(ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #6

declare void @__cxa_end_catch() local_unnamed_addr

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) local_unnamed_addr #7

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK9upscaledb6record8get_dataEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9upscaledb6cursor4findEPNS_3keyEPNS_6recordEj(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9upscaledb6cursor4moveEPNS_3keyEPNS_6recordEj(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9upscaledb2db4findEPNS_3keyEj(ptr dead_on_unwind noalias writable sret(%"class.upscaledb::record") align 8, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef, i32 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZN9upscaledb6recordaSERKS0_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #8

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9upscaledb3envD2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #2 align 2

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { nofree nosync nounwind memory(none) }
attributes #6 = { inlinehint 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 #7 = { noinline noreturn nounwind uwtable "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { "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 #9 = { nounwind }
attributes #10 = { noreturn nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"_ZTS10customer_t", !7, i64 0, !8, i64 4}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = !{!7, !7, i64 0}
!13 = distinct !{!13, !11}


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