; LLVM IR from yinqiwen/ardb :: src/db/engine.ll (ZN4ardb12compare_keysEPKcmS1_mb)

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

%"class.ardb::Buffer" = type <{ ptr, i64, i64, i64, i8, [7 x i8] }>
%"struct.ardb::KeyObject" = type { %"struct.ardb::Data", i8, [7 x i8], %"struct.ardb::Data", %"class.std::vector" }
%"struct.ardb::Data" = type <{ i64, i32, i8, [3 x i8] }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<ardb::Data, std::allocator<ardb::Data>>::_Vector_impl" }
%"struct.std::_Vector_base<ardb::Data, std::allocator<ardb::Data>>::_Vector_impl" = type { %"struct.std::_Vector_base<ardb::Data, std::allocator<ardb::Data>>::_Vector_impl_data" }
%"struct.std::_Vector_base<ardb::Data, std::allocator<ardb::Data>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@.str = external hidden unnamed_addr constant [65 x i8], align 1
@__FUNCTION__._ZN4ardb12compare_keysEPKcmS1_mb = external hidden unnamed_addr constant [13 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [37 x i8], align 1

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN4ardb12compare_keysEPKcmS1_mb(ptr noundef %0, i64 noundef %1, ptr noundef %2, i64 noundef %3, i1 noundef zeroext %4) #0 personality ptr @__gxx_personality_v0 {
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i64, align 8
  %11 = alloca i8, align 1
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca %"class.ardb::Buffer", align 8
  %15 = alloca %"class.ardb::Buffer", align 8
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca %"struct.ardb::KeyObject", align 8
  %19 = alloca %"struct.ardb::KeyObject", align 8
  %20 = alloca i8, align 1
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  store ptr %0, ptr %7, align 8, !tbaa !5
  store i64 %1, ptr %8, align 8, !tbaa !9
  store ptr %2, ptr %9, align 8, !tbaa !5
  store i64 %3, ptr %10, align 8, !tbaa !9
  %24 = zext i1 %4 to i8
  store i8 %24, ptr %11, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  %25 = load ptr, ptr %9, align 8, !tbaa !5
  %26 = icmp ne ptr null, %25
  %27 = zext i1 %26 to i32
  %28 = load ptr, ptr %7, align 8, !tbaa !5
  %29 = icmp ne ptr null, %28
  %30 = zext i1 %29 to i32
  %31 = sub nsw i32 %27, %30
  store i32 %31, ptr %12, align 4, !tbaa !13
  %32 = load i32, ptr %12, align 4, !tbaa !13
  %33 = icmp ne i32 0, %32
  br i1 %33, label %34, label %36

34:                                               ; preds = %5
  %35 = load i32, ptr %12, align 4, !tbaa !13
  store i32 %35, ptr %6, align 4
  store i32 1, ptr %13, align 4
  br label %303

36:                                               ; preds = %5
  call void @llvm.lifetime.start.p0(i64 40, ptr %14) #6
  %37 = load ptr, ptr %7, align 8, !tbaa !5
  %38 = load i64, ptr %8, align 8, !tbaa !9
  %39 = trunc i64 %38 to i32
  call void @_ZN4ardb6BufferC2EPcii(ptr noundef nonnull align 8 dereferenceable(33) %14, ptr noundef %37, i32 noundef 0, i32 noundef %39)
  call void @llvm.lifetime.start.p0(i64 40, ptr %15) #6
  %40 = load ptr, ptr %9, align 8, !tbaa !5
  %41 = load i64, ptr %10, align 8, !tbaa !9
  %42 = trunc i64 %41 to i32
  invoke void @_ZN4ardb6BufferC2EPcii(ptr noundef nonnull align 8 dereferenceable(33) %15, ptr noundef %40, i32 noundef 0, i32 noundef %42)
          to label %43 unwind label %61

43:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 64, ptr %18) #6
  invoke void @_ZN4ardb9KeyObjectC2Eh(ptr noundef nonnull align 8 dereferenceable(64) %18, i8 noundef zeroext 0)
          to label %44 unwind label %65

44:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 64, ptr %19) #6
  invoke void @_ZN4ardb9KeyObjectC2Eh(ptr noundef nonnull align 8 dereferenceable(64) %19, i8 noundef zeroext 0)
          to label %45 unwind label %69

45:                                               ; preds = %44
  %46 = load i8, ptr %11, align 1, !tbaa !11, !range !15, !noundef !16
  %47 = trunc i8 %46 to i1
  br i1 %47, label %48, label %108

48:                                               ; preds = %45
  %49 = invoke noundef zeroext i1 @_ZN4ardb9KeyObject8DecodeNSERNS_6BufferEb(ptr noundef nonnull align 8 dereferenceable(64) %18, ptr noundef nonnull align 8 dereferenceable(33) %14, i1 noundef zeroext false)
          to label %50 unwind label %73

50:                                               ; preds = %48
  br i1 %49, label %80, label %51

51:                                               ; preds = %50
  br label %52

52:                                               ; preds = %51
  %53 = invoke noundef ptr @_ZN4ardb10ArdbLogger13GetLogCheckerEv()
          to label %54 unwind label %73

54:                                               ; preds = %52
  %55 = invoke noundef zeroext i1 %53(i32 noundef 1)
          to label %56 unwind label %73

56:                                               ; preds = %54
  br i1 %55, label %57, label %77

57:                                               ; preds = %56
  %58 = invoke noundef ptr @_ZN4ardb10ArdbLogger13GetLogHandlerEv()
          to label %59 unwind label %73

59:                                               ; preds = %57
  invoke void (i32, ptr, ptr, i32, ptr, ...) %58(i32 noundef 1, ptr noundef @.str, ptr noundef @__FUNCTION__._ZN4ardb12compare_keysEPKcmS1_mb, i32 noundef 69, ptr noundef @.str.1)
          to label %60 unwind label %73

60:                                               ; preds = %59
  call void @abort() #7
  unreachable

61:                                               ; preds = %36
  %62 = landingpad { ptr, i32 }
          cleanup
  %63 = extractvalue { ptr, i32 } %62, 0
  store ptr %63, ptr %16, align 8
  %64 = extractvalue { ptr, i32 } %62, 1
  store i32 %64, ptr %17, align 4
  br label %302

65:                                               ; preds = %43
  %66 = landingpad { ptr, i32 }
          cleanup
  %67 = extractvalue { ptr, i32 } %66, 0
  store ptr %67, ptr %16, align 8
  %68 = extractvalue { ptr, i32 } %66, 1
  store i32 %68, ptr %17, align 4
  br label %301

69:                                               ; preds = %44
  %70 = landingpad { ptr, i32 }
          cleanup
  %71 = extractvalue { ptr, i32 } %70, 0
  store ptr %71, ptr %16, align 8
  %72 = extractvalue { ptr, i32 } %70, 1
  store i32 %72, ptr %17, align 4
  br label %300

73:                                               ; preds = %165, %163, %153, %151, %144, %142, %140, %135, %133, %130, %128, %124, %119, %117, %114, %112, %108, %100, %98, %96, %91, %89, %86, %84, %80, %59, %57, %54, %52, %48
  %74 = landingpad { ptr, i32 }
          cleanup
  %75 = extractvalue { ptr, i32 } %74, 0
  store ptr %75, ptr %16, align 8
  %76 = extractvalue { ptr, i32 } %74, 1
  store i32 %76, ptr %17, align 4
  br label %299

77:                                               ; preds = %56
  br label %78

78:                                               ; preds = %77
  br label %79

79:                                               ; preds = %78
  br label %80

80:                                               ; preds = %79, %50
  %81 = invoke noundef zeroext i1 @_ZN4ardb9KeyObject8DecodeNSERNS_6BufferEb(ptr noundef nonnull align 8 dereferenceable(64) %19, ptr noundef nonnull align 8 dereferenceable(33) %15, i1 noundef zeroext false)
          to label %82 unwind label %73

82:                                               ; preds = %80
  br i1 %81, label %96, label %83

83:                                               ; preds = %82
  br label %84

84:                                               ; preds = %83
  %85 = invoke noundef ptr @_ZN4ardb10ArdbLogger13GetLogCheckerEv()
          to label %86 unwind label %73

86:                                               ; preds = %84
  %87 = invoke noundef zeroext i1 %85(i32 noundef 1)
          to label %88 unwind label %73

88:                                               ; preds = %86
  br i1 %87, label %89, label %93

89:                                               ; preds = %88
  %90 = invoke noundef ptr @_ZN4ardb10ArdbLogger13GetLogHandlerEv()
          to label %91 unwind label %73

91:                                               ; preds = %89
  invoke void (i32, ptr, ptr, i32, ptr, ...) %90(i32 noundef 1, ptr noundef @.str, ptr noundef @__FUNCTION__._ZN4ardb12compare_keysEPKcmS1_mb, i32 noundef 73, ptr noundef @.str.2)
          to label %92 unwind label %73

92:                                               ; preds = %91
  call void @abort() #7
  unreachable

93:                                               ; preds = %88
  br label %94

94:                                               ; preds = %93
  br label %95

95:                                               ; preds = %94
  br label %96

96:                                               ; preds = %95, %82
  %97 = invoke noundef nonnull align 8 dereferenceable(13) ptr @_ZNK4ardb9KeyObject12GetNameSpaceEv(ptr noundef nonnull align 8 dereferenceable(64) %18)
          to label %98 unwind label %73

98:                                               ; preds = %96
  %99 = invoke noundef nonnull align 8 dereferenceable(13) ptr @_ZNK4ardb9KeyObject12GetNameSpaceEv(ptr noundef nonnull align 8 dereferenceable(64) %19)
          to label %100 unwind label %73

100:                                              ; preds = %98
  %101 = invoke noundef i32 @_ZNK4ardb4Data7CompareERKS0_b(ptr noundef nonnull align 8 dereferenceable(13) %97, ptr noundef nonnull align 8 dereferenceable(13) %99, i1 noundef zeroext false)
          to label %102 unwind label %73

102:                                              ; preds = %100
  store i32 %101, ptr %12, align 4, !tbaa !13
  %103 = load i32, ptr %12, align 4, !tbaa !13
  %104 = icmp ne i32 %103, 0
  br i1 %104, label %105, label %107

105:                                              ; preds = %102
  %106 = load i32, ptr %12, align 4, !tbaa !13
  store i32 %106, ptr %6, align 4
  store i32 1, ptr %13, align 4
  br label %298

107:                                              ; preds = %102
  br label %108

108:                                              ; preds = %107, %45
  %109 = invoke noundef zeroext i1 @_ZN4ardb9KeyObject9DecodeKeyERNS_6BufferEb(ptr noundef nonnull align 8 dereferenceable(64) %18, ptr noundef nonnull align 8 dereferenceable(33) %14, i1 noundef zeroext false)
          to label %110 unwind label %73

110:                                              ; preds = %108
  br i1 %109, label %124, label %111

111:                                              ; preds = %110
  br label %112

112:                                              ; preds = %111
  %113 = invoke noundef ptr @_ZN4ardb10ArdbLogger13GetLogCheckerEv()
          to label %114 unwind label %73

114:                                              ; preds = %112
  %115 = invoke noundef zeroext i1 %113(i32 noundef 1)
          to label %116 unwind label %73

116:                                              ; preds = %114
  br i1 %115, label %117, label %121

117:                                              ; preds = %116
  %118 = invoke noundef ptr @_ZN4ardb10ArdbLogger13GetLogHandlerEv()
          to label %119 unwind label %73

119:                                              ; preds = %117
  invoke void (i32, ptr, ptr, i32, ptr, ...) %118(i32 noundef 1, ptr noundef @.str, ptr noundef @__FUNCTION__._ZN4ardb12compare_keysEPKcmS1_mb, i32 noundef 87, ptr noundef @.str.3)
          to label %120 unwind label %73

120:                                              ; preds = %119
  call void @abort() #7
  unreachable

121:                                              ; preds = %116
  br label %122

122:                                              ; preds = %121
  br label %123

123:                                              ; preds = %122
  br label %124

124:                                              ; preds = %123, %110
  %125 = invoke noundef zeroext i1 @_ZN4ardb9KeyObject9DecodeKeyERNS_6BufferEb(ptr noundef nonnull align 8 dereferenceable(64) %19, ptr noundef nonnull align 8 dereferenceable(33) %15, i1 noundef zeroext false)
          to label %126 unwind label %73

126:                                              ; preds = %124
  br i1 %125, label %140, label %127

127:                                              ; preds = %126
  br label %128

128:                                              ; preds = %127
  %129 = invoke noundef ptr @_ZN4ardb10ArdbLogger13GetLogCheckerEv()
          to label %130 unwind label %73

130:                                              ; preds = %128
  %131 = invoke noundef zeroext i1 %129(i32 noundef 1)
          to label %132 unwind label %73

132:                                              ; preds = %130
  br i1 %131, label %133, label %137

133:                                              ; preds = %132
  %134 = invoke noundef ptr @_ZN4ardb10ArdbLogger13GetLogHandlerEv()
          to label %135 unwind label %73

135:                                              ; preds = %133
  invoke void (i32, ptr, ptr, i32, ptr, ...) %134(i32 noundef 1, ptr noundef @.str, ptr noundef @__FUNCTION__._ZN4ardb12compare_keysEPKcmS1_mb, i32 noundef 91, ptr noundef @.str.4)
          to label %136 unwind label %73

136:                                              ; preds = %135
  call void @abort() #7
  unreachable

137:                                              ; preds = %132
  br label %138

138:                                              ; preds = %137
  br label %139

139:                                              ; preds = %138
  br label %140

140:                                              ; preds = %139, %126
  %141 = invoke noundef nonnull align 8 dereferenceable(13) ptr @_ZNK4ardb9KeyObject6GetKeyEv(ptr noundef nonnull align 8 dereferenceable(64) %18)
          to label %142 unwind label %73

142:                                              ; preds = %140
  %143 = invoke noundef nonnull align 8 dereferenceable(13) ptr @_ZNK4ardb9KeyObject6GetKeyEv(ptr noundef nonnull align 8 dereferenceable(64) %19)
          to label %144 unwind label %73

144:                                              ; preds = %142
  %145 = invoke noundef i32 @_ZNK4ardb4Data7CompareERKS0_b(ptr noundef nonnull align 8 dereferenceable(13) %141, ptr noundef nonnull align 8 dereferenceable(13) %143, i1 noundef zeroext true)
          to label %146 unwind label %73

146:                                              ; preds = %144
  store i32 %145, ptr %12, align 4, !tbaa !13
  %147 = load i32, ptr %12, align 4, !tbaa !13
  %148 = icmp ne i32 %147, 0
  br i1 %148, label %149, label %151

149:                                              ; preds = %146
  %150 = load i32, ptr %12, align 4, !tbaa !13
  store i32 %150, ptr %6, align 4
  store i32 1, ptr %13, align 4
  br label %298

151:                                              ; preds = %146
  %152 = invoke noundef zeroext i1 @_ZN4ardb9KeyObject10DecodeTypeERNS_6BufferE(ptr noundef nonnull align 8 dereferenceable(64) %18, ptr noundef nonnull align 8 dereferenceable(33) %14)
          to label %153 unwind label %73

153:                                              ; preds = %151
  %154 = zext i1 %152 to i32
  %155 = invoke noundef zeroext i1 @_ZN4ardb9KeyObject10DecodeTypeERNS_6BufferE(ptr noundef nonnull align 8 dereferenceable(64) %19, ptr noundef nonnull align 8 dereferenceable(33) %15)
          to label %156 unwind label %73

156:                                              ; preds = %153
  %157 = zext i1 %155 to i32
  %158 = sub nsw i32 %154, %157
  store i32 %158, ptr %12, align 4, !tbaa !13
  %159 = load i32, ptr %12, align 4, !tbaa !13
  %160 = icmp ne i32 %159, 0
  br i1 %160, label %161, label %163

161:                                              ; preds = %156
  %162 = load i32, ptr %12, align 4, !tbaa !13
  store i32 %162, ptr %6, align 4
  store i32 1, ptr %13, align 4
  br label %298

163:                                              ; preds = %156
  %164 = invoke noundef i32 @_ZNK4ardb9KeyObject7GetTypeEv(ptr noundef nonnull align 8 dereferenceable(64) %18)
          to label %165 unwind label %73

165:                                              ; preds = %163
  %166 = invoke noundef i32 @_ZNK4ardb9KeyObject7GetTypeEv(ptr noundef nonnull align 8 dereferenceable(64) %19)
          to label %167 unwind label %73

167:                                              ; preds = %165
  %168 = sub nsw i32 %164, %166
  store i32 %168, ptr %12, align 4, !tbaa !13
  %169 = load i32, ptr %12, align 4, !tbaa !13
  %170 = icmp ne i32 %169, 0
  br i1 %170, label %171, label %173

171:                                              ; preds = %167
  %172 = load i32, ptr %12, align 4, !tbaa !13
  store i32 %172, ptr %6, align 4
  store i32 1, ptr %13, align 4
  br label %298

173:                                              ; preds = %167
  call void @llvm.lifetime.start.p0(i64 1, ptr %20) #6
  %174 = invoke noundef i32 @_ZNK4ardb9KeyObject7GetTypeEv(ptr noundef nonnull align 8 dereferenceable(64) %18)
          to label %175 unwind label %200

175:                                              ; preds = %173
  %176 = trunc i32 %174 to i8
  store i8 %176, ptr %20, align 1, !tbaa !17
  %177 = load i8, ptr %20, align 1, !tbaa !17
  %178 = zext i8 %177 to i32
  %179 = icmp ne i32 %178, 1
  br i1 %179, label %180, label %294

180:                                              ; preds = %175
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #6
  %181 = invoke noundef i32 @_ZN4ardb9KeyObject19DecodeElementLengthERNS_6BufferE(ptr noundef nonnull align 8 dereferenceable(64) %18, ptr noundef nonnull align 8 dereferenceable(33) %14)
          to label %182 unwind label %204

182:                                              ; preds = %180
  store i32 %181, ptr %21, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #6
  %183 = invoke noundef i32 @_ZN4ardb9KeyObject19DecodeElementLengthERNS_6BufferE(ptr noundef nonnull align 8 dereferenceable(64) %19, ptr noundef nonnull align 8 dereferenceable(33) %15)
          to label %184 unwind label %208

184:                                              ; preds = %182
  store i32 %183, ptr %22, align 4, !tbaa !13
  %185 = load i32, ptr %21, align 4, !tbaa !13
  %186 = icmp slt i32 %185, 0
  br i1 %186, label %190, label %187

187:                                              ; preds = %184
  %188 = load i32, ptr %22, align 4, !tbaa !13
  %189 = icmp slt i32 %188, 0
  br i1 %189, label %190, label %215

190:                                              ; preds = %187, %184
  br label %191

191:                                              ; preds = %190
  %192 = invoke noundef ptr @_ZN4ardb10ArdbLogger13GetLogCheckerEv()
          to label %193 unwind label %208

193:                                              ; preds = %191
  %194 = invoke noundef zeroext i1 %192(i32 noundef 1)
          to label %195 unwind label %208

195:                                              ; preds = %193
  br i1 %194, label %196, label %212

196:                                              ; preds = %195
  %197 = invoke noundef ptr @_ZN4ardb10ArdbLogger13GetLogHandlerEv()
          to label %198 unwind label %208

198:                                              ; preds = %196
  invoke void (i32, ptr, ptr, i32, ptr, ...) %197(i32 noundef 1, ptr noundef @.str, ptr noundef @__FUNCTION__._ZN4ardb12compare_keysEPKcmS1_mb, i32 noundef 126, ptr noundef @.str.5)
          to label %199 unwind label %208

199:                                              ; preds = %198
  call void @abort() #7
  unreachable

200:                                              ; preds = %173
  %201 = landingpad { ptr, i32 }
          cleanup
  %202 = extractvalue { ptr, i32 } %201, 0
  store ptr %202, ptr %16, align 8
  %203 = extractvalue { ptr, i32 } %201, 1
  store i32 %203, ptr %17, align 4
  br label %297

204:                                              ; preds = %180
  %205 = landingpad { ptr, i32 }
          cleanup
  %206 = extractvalue { ptr, i32 } %205, 0
  store ptr %206, ptr %16, align 8
  %207 = extractvalue { ptr, i32 } %205, 1
  store i32 %207, ptr %17, align 4
  br label %293

208:                                              ; preds = %198, %196, %193, %191, %182
  %209 = landingpad { ptr, i32 }
          cleanup
  %210 = extractvalue { ptr, i32 } %209, 0
  store ptr %210, ptr %16, align 8
  %211 = extractvalue { ptr, i32 } %209, 1
  store i32 %211, ptr %17, align 4
  br label %292

212:                                              ; preds = %195
  br label %213

213:                                              ; preds = %212
  br label %214

214:                                              ; preds = %213
  br label %215

215:                                              ; preds = %214, %187
  %216 = load i32, ptr %21, align 4, !tbaa !13
  %217 = load i32, ptr %22, align 4, !tbaa !13
  %218 = sub nsw i32 %216, %217
  store i32 %218, ptr %12, align 4, !tbaa !13
  %219 = load i32, ptr %12, align 4, !tbaa !13
  %220 = icmp ne i32 %219, 0
  br i1 %220, label %221, label %223

221:                                              ; preds = %215
  %222 = load i32, ptr %12, align 4, !tbaa !13
  store i32 %222, ptr %6, align 4
  store i32 1, ptr %13, align 4
  br label %289

223:                                              ; preds = %215
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #6
  store i32 0, ptr %23, align 4, !tbaa !13
  br label %224

224:                                              ; preds = %283, %223
  %225 = load i32, ptr %23, align 4, !tbaa !13
  %226 = load i32, ptr %21, align 4, !tbaa !13
  %227 = icmp slt i32 %225, %226
  br i1 %227, label %229, label %228

228:                                              ; preds = %224
  store i32 12, ptr %13, align 4
  br label %286

229:                                              ; preds = %224
  %230 = load i32, ptr %23, align 4, !tbaa !13
  %231 = invoke noundef zeroext i1 @_ZN4ardb9KeyObject13DecodeElementERNS_6BufferEbi(ptr noundef nonnull align 8 dereferenceable(64) %18, ptr noundef nonnull align 8 dereferenceable(33) %14, i1 noundef zeroext false, i32 noundef %230)
          to label %232 unwind label %244

232:                                              ; preds = %229
  br i1 %231, label %251, label %233

233:                                              ; preds = %232
  br label %234

234:                                              ; preds = %233
  %235 = invoke noundef ptr @_ZN4ardb10ArdbLogger13GetLogCheckerEv()
          to label %236 unwind label %244

236:                                              ; preds = %234
  %237 = invoke noundef zeroext i1 %235(i32 noundef 1)
          to label %238 unwind label %244

238:                                              ; preds = %236
  br i1 %237, label %239, label %248

239:                                              ; preds = %238
  %240 = invoke noundef ptr @_ZN4ardb10ArdbLogger13GetLogHandlerEv()
          to label %241 unwind label %244

241:                                              ; preds = %239
  %242 = load i32, ptr %23, align 4, !tbaa !13
  invoke void (i32, ptr, ptr, i32, ptr, ...) %240(i32 noundef 1, ptr noundef @.str, ptr noundef @__FUNCTION__._ZN4ardb12compare_keysEPKcmS1_mb, i32 noundef 137, ptr noundef @.str.6, i32 noundef %242)
          to label %243 unwind label %244

243:                                              ; preds = %241
  call void @abort() #7
  unreachable

244:                                              ; preds = %275, %272, %269, %263, %261, %258, %256, %251, %241, %239, %236, %234, %229
  %245 = landingpad { ptr, i32 }
          cleanup
  %246 = extractvalue { ptr, i32 } %245, 0
  store ptr %246, ptr %16, align 8
  %247 = extractvalue { ptr, i32 } %245, 1
  store i32 %247, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #6
  br label %292

248:                                              ; preds = %238
  br label %249

249:                                              ; preds = %248
  br label %250

250:                                              ; preds = %249
  br label %251

251:                                              ; preds = %250, %232
  %252 = load i32, ptr %23, align 4, !tbaa !13
  %253 = invoke noundef zeroext i1 @_ZN4ardb9KeyObject13DecodeElementERNS_6BufferEbi(ptr noundef nonnull align 8 dereferenceable(64) %19, ptr noundef nonnull align 8 dereferenceable(33) %15, i1 noundef zeroext false, i32 noundef %252)
          to label %254 unwind label %244

254:                                              ; preds = %251
  br i1 %253, label %269, label %255

255:                                              ; preds = %254
  br label %256

256:                                              ; preds = %255
  %257 = invoke noundef ptr @_ZN4ardb10ArdbLogger13GetLogCheckerEv()
          to label %258 unwind label %244

258:                                              ; preds = %256
  %259 = invoke noundef zeroext i1 %257(i32 noundef 1)
          to label %260 unwind label %244

260:                                              ; preds = %258
  br i1 %259, label %261, label %266

261:                                              ; preds = %260
  %262 = invoke noundef ptr @_ZN4ardb10ArdbLogger13GetLogHandlerEv()
          to label %263 unwind label %244

263:                                              ; preds = %261
  %264 = load i32, ptr %23, align 4, !tbaa !13
  invoke void (i32, ptr, ptr, i32, ptr, ...) %262(i32 noundef 1, ptr noundef @.str, ptr noundef @__FUNCTION__._ZN4ardb12compare_keysEPKcmS1_mb, i32 noundef 141, ptr noundef @.str.7, i32 noundef %264)
          to label %265 unwind label %244

265:                                              ; preds = %263
  call void @abort() #7
  unreachable

266:                                              ; preds = %260
  br label %267

267:                                              ; preds = %266
  br label %268

268:                                              ; preds = %267
  br label %269

269:                                              ; preds = %268, %254
  %270 = load i32, ptr %23, align 4, !tbaa !13
  %271 = invoke noundef nonnull align 8 dereferenceable(13) ptr @_ZNK4ardb9KeyObject10GetElementEi(ptr noundef nonnull align 8 dereferenceable(64) %18, i32 noundef %270)
          to label %272 unwind label %244

272:                                              ; preds = %269
  %273 = load i32, ptr %23, align 4, !tbaa !13
  %274 = invoke noundef nonnull align 8 dereferenceable(13) ptr @_ZNK4ardb9KeyObject10GetElementEi(ptr noundef nonnull align 8 dereferenceable(64) %19, i32 noundef %273)
          to label %275 unwind label %244

275:                                              ; preds = %272
  %276 = invoke noundef i32 @_ZNK4ardb4Data7CompareERKS0_b(ptr noundef nonnull align 8 dereferenceable(13) %271, ptr noundef nonnull align 8 dereferenceable(13) %274, i1 noundef zeroext false)
          to label %277 unwind label %244

277:                                              ; preds = %275
  store i32 %276, ptr %12, align 4, !tbaa !13
  %278 = load i32, ptr %12, align 4, !tbaa !13
  %279 = icmp ne i32 %278, 0
  br i1 %279, label %280, label %282

280:                                              ; preds = %277
  %281 = load i32, ptr %12, align 4, !tbaa !13
  store i32 %281, ptr %6, align 4
  store i32 1, ptr %13, align 4
  br label %286

282:                                              ; preds = %277
  br label %283

283:                                              ; preds = %282
  %284 = load i32, ptr %23, align 4, !tbaa !13
  %285 = add nsw i32 %284, 1
  store i32 %285, ptr %23, align 4, !tbaa !13
  br label %224, !llvm.loop !18

286:                                              ; preds = %280, %228
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #6
  %287 = load i32, ptr %13, align 4
  switch i32 %287, label %289 [
    i32 12, label %288
  ]

288:                                              ; preds = %286
  store i32 0, ptr %13, align 4
  br label %289

289:                                              ; preds = %288, %286, %221
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  %290 = load i32, ptr %13, align 4
  switch i32 %290, label %296 [
    i32 0, label %291
  ]

291:                                              ; preds = %289
  br label %294

292:                                              ; preds = %244, %208
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  br label %293

293:                                              ; preds = %292, %204
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  br label %297

294:                                              ; preds = %291, %175
  %295 = load i32, ptr %12, align 4, !tbaa !13
  store i32 %295, ptr %6, align 4
  store i32 1, ptr %13, align 4
  br label %296

296:                                              ; preds = %294, %289
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #6
  br label %298

297:                                              ; preds = %293, %200
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #6
  br label %299

298:                                              ; preds = %296, %171, %161, %149, %105
  call void @_ZN4ardb9KeyObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(64) %19) #6
  call void @llvm.lifetime.end.p0(i64 64, ptr %19) #6
  call void @_ZN4ardb9KeyObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(64) %18) #6
  call void @llvm.lifetime.end.p0(i64 64, ptr %18) #6
  call void @_ZN4ardb6BufferD2Ev(ptr noundef nonnull align 8 dereferenceable(33) %15) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr %15) #6
  call void @_ZN4ardb6BufferD2Ev(ptr noundef nonnull align 8 dereferenceable(33) %14) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr %14) #6
  br label %303

299:                                              ; preds = %297, %73
  call void @_ZN4ardb9KeyObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(64) %19) #6
  br label %300

300:                                              ; preds = %299, %69
  call void @llvm.lifetime.end.p0(i64 64, ptr %19) #6
  call void @_ZN4ardb9KeyObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(64) %18) #6
  br label %301

301:                                              ; preds = %300, %65
  call void @llvm.lifetime.end.p0(i64 64, ptr %18) #6
  call void @_ZN4ardb6BufferD2Ev(ptr noundef nonnull align 8 dereferenceable(33) %15) #6
  br label %302

302:                                              ; preds = %301, %61
  call void @llvm.lifetime.end.p0(i64 40, ptr %15) #6
  call void @_ZN4ardb6BufferD2Ev(ptr noundef nonnull align 8 dereferenceable(33) %14) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %305

303:                                              ; preds = %298, %34
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  %304 = load i32, ptr %6, align 4
  ret i32 %304

305:                                              ; preds = %302
  %306 = load ptr, ptr %16, align 8
  %307 = load i32, ptr %17, align 4
  %308 = insertvalue { ptr, i32 } poison, ptr %306, 0
  %309 = insertvalue { ptr, i32 } %308, i32 %307, 1
  resume { ptr, i32 } %309
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4ardb9KeyObjectC2Eh(ptr noundef nonnull align 8 dereferenceable(64), i8 noundef zeroext) unnamed_addr #0 align 2

declare noundef zeroext i1 @_ZN4ardb9KeyObject8DecodeNSERNS_6BufferEb(ptr noundef nonnull align 8 dereferenceable(64), ptr noundef nonnull align 8 dereferenceable(33), i1 noundef zeroext) #3

declare noundef ptr @_ZN4ardb10ArdbLogger13GetLogCheckerEv() #3

declare noundef ptr @_ZN4ardb10ArdbLogger13GetLogHandlerEv() #3

; Function Attrs: noreturn nounwind
declare void @abort() #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(13) ptr @_ZNK4ardb9KeyObject12GetNameSpaceEv(ptr noundef nonnull align 8 dereferenceable(64)) #5 align 2

declare noundef i32 @_ZNK4ardb4Data7CompareERKS0_b(ptr noundef nonnull align 8 dereferenceable(13), ptr noundef nonnull align 8 dereferenceable(13), i1 noundef zeroext) #3

declare noundef zeroext i1 @_ZN4ardb9KeyObject9DecodeKeyERNS_6BufferEb(ptr noundef nonnull align 8 dereferenceable(64), ptr noundef nonnull align 8 dereferenceable(33), i1 noundef zeroext) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(13) ptr @_ZNK4ardb9KeyObject6GetKeyEv(ptr noundef nonnull align 8 dereferenceable(64)) #5 align 2

declare noundef zeroext i1 @_ZN4ardb9KeyObject10DecodeTypeERNS_6BufferE(ptr noundef nonnull align 8 dereferenceable(64), ptr noundef nonnull align 8 dereferenceable(33)) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK4ardb9KeyObject7GetTypeEv(ptr noundef nonnull align 8 dereferenceable(64)) #5 align 2

declare noundef i32 @_ZN4ardb9KeyObject19DecodeElementLengthERNS_6BufferE(ptr noundef nonnull align 8 dereferenceable(64), ptr noundef nonnull align 8 dereferenceable(33)) #3

declare noundef zeroext i1 @_ZN4ardb9KeyObject13DecodeElementERNS_6BufferEbi(ptr noundef nonnull align 8 dereferenceable(64), ptr noundef nonnull align 8 dereferenceable(33), i1 noundef zeroext, i32 noundef) #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(13) ptr @_ZNK4ardb9KeyObject10GetElementEi(ptr noundef nonnull align 8 dereferenceable(64), i32 noundef) #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 nounwind uwtable
declare dso_local void @_ZN4ardb9KeyObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(64)) unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4ardb6BufferD2Ev(ptr noundef nonnull align 8 dereferenceable(33)) 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 = { inlinehint 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }
attributes #7 = { noreturn nounwind }

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

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


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

%"class.ardb::Buffer" = type <{ ptr, i64, i64, i64, i8, [7 x i8] }>
%"struct.ardb::KeyObject" = type { %"struct.ardb::Data", i8, [7 x i8], %"struct.ardb::Data", %"class.std::vector" }
%"struct.ardb::Data" = type <{ i64, i32, i8, [3 x i8] }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<ardb::Data, std::allocator<ardb::Data>>::_Vector_impl" }
%"struct.std::_Vector_base<ardb::Data, std::allocator<ardb::Data>>::_Vector_impl" = type { %"struct.std::_Vector_base<ardb::Data, std::allocator<ardb::Data>>::_Vector_impl_data" }
%"struct.std::_Vector_base<ardb::Data, std::allocator<ardb::Data>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@.str = external hidden unnamed_addr constant [65 x i8], align 1
@__FUNCTION__._ZN4ardb12compare_keysEPKcmS1_mb = external hidden unnamed_addr constant [13 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [37 x i8], align 1

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN4ardb12compare_keysEPKcmS1_mb(ptr noundef %0, i64 noundef %1, ptr noundef %2, i64 noundef %3, i1 noundef zeroext %4) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %6 = alloca %"class.ardb::Buffer", align 8
  %7 = alloca %"class.ardb::Buffer", align 8
  %8 = alloca %"struct.ardb::KeyObject", align 8
  %9 = alloca %"struct.ardb::KeyObject", align 8
  %10 = icmp ne ptr %2, null
  %11 = zext i1 %10 to i32
  %12 = icmp ne ptr %0, null
  %.neg = sext i1 %12 to i32
  %13 = add nsw i32 %11, %.neg
  %.not = icmp eq i32 %13, 0
  br i1 %.not, label %14, label %153

14:                                               ; preds = %5
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %6) #6
  %15 = trunc i64 %1 to i32
  call void @_ZN4ardb6BufferC2EPcii(ptr noundef nonnull align 8 dereferenceable(33) %6, ptr noundef %0, i32 noundef 0, i32 noundef %15)
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %7) #6
  %16 = trunc i64 %3 to i32
  call void @_ZN4ardb6BufferC2EPcii(ptr noundef nonnull align 8 dereferenceable(33) %7, ptr noundef %2, i32 noundef 0, i32 noundef %16)
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %8) #6
  invoke void @_ZN4ardb9KeyObjectC2Eh(ptr noundef nonnull align 8 dereferenceable(64) %8, i8 noundef zeroext 0)
          to label %17 unwind label %31

17:                                               ; preds = %14
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %9) #6
  invoke void @_ZN4ardb9KeyObjectC2Eh(ptr noundef nonnull align 8 dereferenceable(64) %9, i8 noundef zeroext 0)
          to label %18 unwind label %33

18:                                               ; preds = %17
  br i1 %4, label %19, label %54

19:                                               ; preds = %18
  %20 = invoke noundef zeroext i1 @_ZN4ardb9KeyObject8DecodeNSERNS_6BufferEb(ptr noundef nonnull align 8 dereferenceable(64) %8, ptr noundef nonnull align 8 dereferenceable(33) %6, i1 noundef zeroext false)
          to label %21 unwind label %35

21:                                               ; preds = %19
  br i1 %20, label %37, label %22

22:                                               ; preds = %21
  %23 = invoke noundef ptr @_ZN4ardb10ArdbLogger13GetLogCheckerEv()
          to label %24 unwind label %35

24:                                               ; preds = %22
  %25 = invoke noundef zeroext i1 %23(i32 noundef 1)
          to label %26 unwind label %35

26:                                               ; preds = %24
  br i1 %25, label %27, label %37

27:                                               ; preds = %26
  %28 = invoke noundef ptr @_ZN4ardb10ArdbLogger13GetLogHandlerEv()
          to label %29 unwind label %35

29:                                               ; preds = %27
  invoke void (i32, ptr, ptr, i32, ptr, ...) %28(i32 noundef 1, ptr noundef nonnull @.str, ptr noundef nonnull @__FUNCTION__._ZN4ardb12compare_keysEPKcmS1_mb, i32 noundef 69, ptr noundef nonnull @.str.1)
          to label %30 unwind label %35

30:                                               ; preds = %29
  call void @abort() #7
  unreachable

31:                                               ; preds = %14
  %32 = landingpad { ptr, i32 }
          cleanup
  br label %152

33:                                               ; preds = %17
  %34 = landingpad { ptr, i32 }
          cleanup
  br label %151

35:                                               ; preds = %85, %83, %78, %76, %74, %71, %69, %66, %64, %62, %59, %57, %54, %49, %47, %45, %42, %40, %37, %29, %27, %24, %22, %19
  %36 = landingpad { ptr, i32 }
          cleanup
  br label %150

37:                                               ; preds = %26, %21
  %38 = invoke noundef zeroext i1 @_ZN4ardb9KeyObject8DecodeNSERNS_6BufferEb(ptr noundef nonnull align 8 dereferenceable(64) %9, ptr noundef nonnull align 8 dereferenceable(33) %7, i1 noundef zeroext false)
          to label %39 unwind label %35

39:                                               ; preds = %37
  br i1 %38, label %49, label %40

40:                                               ; preds = %39
  %41 = invoke noundef ptr @_ZN4ardb10ArdbLogger13GetLogCheckerEv()
          to label %42 unwind label %35

42:                                               ; preds = %40
  %43 = invoke noundef zeroext i1 %41(i32 noundef 1)
          to label %44 unwind label %35

44:                                               ; preds = %42
  br i1 %43, label %45, label %49

45:                                               ; preds = %44
  %46 = invoke noundef ptr @_ZN4ardb10ArdbLogger13GetLogHandlerEv()
          to label %47 unwind label %35

47:                                               ; preds = %45
  invoke void (i32, ptr, ptr, i32, ptr, ...) %46(i32 noundef 1, ptr noundef nonnull @.str, ptr noundef nonnull @__FUNCTION__._ZN4ardb12compare_keysEPKcmS1_mb, i32 noundef 73, ptr noundef nonnull @.str.2)
          to label %48 unwind label %35

48:                                               ; preds = %47
  call void @abort() #7
  unreachable

49:                                               ; preds = %44, %39
  %50 = call noundef nonnull align 8 dereferenceable(13) ptr @_ZNK4ardb9KeyObject12GetNameSpaceEv(ptr noundef nonnull align 8 dereferenceable(64) %8)
  %51 = call noundef nonnull align 8 dereferenceable(13) ptr @_ZNK4ardb9KeyObject12GetNameSpaceEv(ptr noundef nonnull align 8 dereferenceable(64) %9)
  %52 = invoke noundef i32 @_ZNK4ardb4Data7CompareERKS0_b(ptr noundef nonnull align 8 dereferenceable(13) %50, ptr noundef nonnull align 8 dereferenceable(13) %51, i1 noundef zeroext false)
          to label %53 unwind label %35

53:                                               ; preds = %49
  %.not69 = icmp eq i32 %52, 0
  br i1 %.not69, label %54, label %.thread

54:                                               ; preds = %53, %18
  %55 = invoke noundef zeroext i1 @_ZN4ardb9KeyObject9DecodeKeyERNS_6BufferEb(ptr noundef nonnull align 8 dereferenceable(64) %8, ptr noundef nonnull align 8 dereferenceable(33) %6, i1 noundef zeroext false)
          to label %56 unwind label %35

56:                                               ; preds = %54
  br i1 %55, label %66, label %57

57:                                               ; preds = %56
  %58 = invoke noundef ptr @_ZN4ardb10ArdbLogger13GetLogCheckerEv()
          to label %59 unwind label %35

59:                                               ; preds = %57
  %60 = invoke noundef zeroext i1 %58(i32 noundef 1)
          to label %61 unwind label %35

61:                                               ; preds = %59
  br i1 %60, label %62, label %66

62:                                               ; preds = %61
  %63 = invoke noundef ptr @_ZN4ardb10ArdbLogger13GetLogHandlerEv()
          to label %64 unwind label %35

64:                                               ; preds = %62
  invoke void (i32, ptr, ptr, i32, ptr, ...) %63(i32 noundef 1, ptr noundef nonnull @.str, ptr noundef nonnull @__FUNCTION__._ZN4ardb12compare_keysEPKcmS1_mb, i32 noundef 87, ptr noundef nonnull @.str.3)
          to label %65 unwind label %35

65:                                               ; preds = %64
  call void @abort() #7
  unreachable

66:                                               ; preds = %61, %56
  %67 = invoke noundef zeroext i1 @_ZN4ardb9KeyObject9DecodeKeyERNS_6BufferEb(ptr noundef nonnull align 8 dereferenceable(64) %9, ptr noundef nonnull align 8 dereferenceable(33) %7, i1 noundef zeroext false)
          to label %68 unwind label %35

68:                                               ; preds = %66
  br i1 %67, label %78, label %69

69:                                               ; preds = %68
  %70 = invoke noundef ptr @_ZN4ardb10ArdbLogger13GetLogCheckerEv()
          to label %71 unwind label %35

71:                                               ; preds = %69
  %72 = invoke noundef zeroext i1 %70(i32 noundef 1)
          to label %73 unwind label %35

73:                                               ; preds = %71
  br i1 %72, label %74, label %78

74:                                               ; preds = %73
  %75 = invoke noundef ptr @_ZN4ardb10ArdbLogger13GetLogHandlerEv()
          to label %76 unwind label %35

76:                                               ; preds = %74
  invoke void (i32, ptr, ptr, i32, ptr, ...) %75(i32 noundef 1, ptr noundef nonnull @.str, ptr noundef nonnull @__FUNCTION__._ZN4ardb12compare_keysEPKcmS1_mb, i32 noundef 91, ptr noundef nonnull @.str.4)
          to label %77 unwind label %35

77:                                               ; preds = %76
  call void @abort() #7
  unreachable

78:                                               ; preds = %73, %68
  %79 = call noundef nonnull align 8 dereferenceable(13) ptr @_ZNK4ardb9KeyObject6GetKeyEv(ptr noundef nonnull align 8 dereferenceable(64) %8)
  %80 = call noundef nonnull align 8 dereferenceable(13) ptr @_ZNK4ardb9KeyObject6GetKeyEv(ptr noundef nonnull align 8 dereferenceable(64) %9)
  %81 = invoke noundef i32 @_ZNK4ardb4Data7CompareERKS0_b(ptr noundef nonnull align 8 dereferenceable(13) %79, ptr noundef nonnull align 8 dereferenceable(13) %80, i1 noundef zeroext true)
          to label %82 unwind label %35

82:                                               ; preds = %78
  %.not70 = icmp eq i32 %81, 0
  br i1 %.not70, label %83, label %.thread

83:                                               ; preds = %82
  %84 = invoke noundef zeroext i1 @_ZN4ardb9KeyObject10DecodeTypeERNS_6BufferE(ptr noundef nonnull align 8 dereferenceable(64) %8, ptr noundef nonnull align 8 dereferenceable(33) %6)
          to label %85 unwind label %35

85:                                               ; preds = %83
  %86 = invoke noundef zeroext i1 @_ZN4ardb9KeyObject10DecodeTypeERNS_6BufferE(ptr noundef nonnull align 8 dereferenceable(64) %9, ptr noundef nonnull align 8 dereferenceable(33) %7)
          to label %87 unwind label %35

87:                                               ; preds = %85
  %88 = zext i1 %84 to i32
  %.neg71 = sext i1 %86 to i32
  %89 = add nsw i32 %.neg71, %88
  %.not72 = icmp eq i32 %89, 0
  br i1 %.not72, label %90, label %.thread

90:                                               ; preds = %87
  %91 = call noundef i32 @_ZNK4ardb9KeyObject7GetTypeEv(ptr noundef nonnull align 8 dereferenceable(64) %8)
  %92 = call noundef i32 @_ZNK4ardb9KeyObject7GetTypeEv(ptr noundef nonnull align 8 dereferenceable(64) %9)
  %93 = sub nsw i32 %91, %92
  %.not73 = icmp eq i32 %93, 0
  br i1 %.not73, label %94, label %.thread

94:                                               ; preds = %90
  %95 = call noundef i32 @_ZNK4ardb9KeyObject7GetTypeEv(ptr noundef nonnull align 8 dereferenceable(64) %8)
  %96 = and i32 %95, 255
  %.not74 = icmp eq i32 %96, 1
  br i1 %.not74, label %.thread, label %97

97:                                               ; preds = %94
  %98 = invoke noundef i32 @_ZN4ardb9KeyObject19DecodeElementLengthERNS_6BufferE(ptr noundef nonnull align 8 dereferenceable(64) %8, ptr noundef nonnull align 8 dereferenceable(33) %6)
          to label %99 unwind label %112

99:                                               ; preds = %97
  %100 = invoke noundef i32 @_ZN4ardb9KeyObject19DecodeElementLengthERNS_6BufferE(ptr noundef nonnull align 8 dereferenceable(64) %9, ptr noundef nonnull align 8 dereferenceable(33) %7)
          to label %101 unwind label %114

101:                                              ; preds = %99
  %102 = or i32 %100, %98
  %or.cond.not = icmp sgt i32 %102, -1
  br i1 %or.cond.not, label %116, label %103

103:                                              ; preds = %101
  %104 = invoke noundef ptr @_ZN4ardb10ArdbLogger13GetLogCheckerEv()
          to label %105 unwind label %114

105:                                              ; preds = %103
  %106 = invoke noundef zeroext i1 %104(i32 noundef 1)
          to label %107 unwind label %114

107:                                              ; preds = %105
  br i1 %106, label %108, label %116

108:                                              ; preds = %107
  %109 = invoke noundef ptr @_ZN4ardb10ArdbLogger13GetLogHandlerEv()
          to label %110 unwind label %114

110:                                              ; preds = %108
  invoke void (i32, ptr, ptr, i32, ptr, ...) %109(i32 noundef 1, ptr noundef nonnull @.str, ptr noundef nonnull @__FUNCTION__._ZN4ardb12compare_keysEPKcmS1_mb, i32 noundef 126, ptr noundef nonnull @.str.5)
          to label %111 unwind label %114

111:                                              ; preds = %110
  call void @abort() #7
  unreachable

112:                                              ; preds = %97
  %113 = landingpad { ptr, i32 }
          cleanup
  br label %150

114:                                              ; preds = %110, %108, %105, %103, %99
  %115 = landingpad { ptr, i32 }
          cleanup
  br label %150

116:                                              ; preds = %107, %101
  %117 = sub nsw i32 %98, %100
  %.not75 = icmp eq i32 %117, 0
  br i1 %.not75, label %.preheader, label %.thread

.preheader:                                       ; preds = %116
  %.not77.not89 = icmp sgt i32 %98, 0
  br i1 %.not77.not89, label %.lr.ph, label %.thread

.lr.ph:                                           ; preds = %.preheader, %148
  %.090 = phi i32 [ %149, %148 ], [ 0, %.preheader ]
  %118 = invoke noundef zeroext i1 @_ZN4ardb9KeyObject13DecodeElementERNS_6BufferEbi(ptr noundef nonnull align 8 dereferenceable(64) %8, ptr noundef nonnull align 8 dereferenceable(33) %6, i1 noundef zeroext false, i32 noundef %.090)
          to label %119 unwind label %.loopexit

119:                                              ; preds = %.lr.ph
  br i1 %118, label %129, label %120

120:                                              ; preds = %119
  %121 = invoke noundef ptr @_ZN4ardb10ArdbLogger13GetLogCheckerEv()
          to label %122 unwind label %.loopexit

122:                                              ; preds = %120
  %123 = invoke noundef zeroext i1 %121(i32 noundef 1)
          to label %124 unwind label %.loopexit

124:                                              ; preds = %122
  br i1 %123, label %125, label %129

125:                                              ; preds = %124
  %126 = invoke noundef ptr @_ZN4ardb10ArdbLogger13GetLogHandlerEv()
          to label %127 unwind label %.loopexit.split-lp

127:                                              ; preds = %125
  invoke void (i32, ptr, ptr, i32, ptr, ...) %126(i32 noundef 1, ptr noundef nonnull @.str, ptr noundef nonnull @__FUNCTION__._ZN4ardb12compare_keysEPKcmS1_mb, i32 noundef 137, ptr noundef nonnull @.str.6, i32 noundef %.090)
          to label %128 unwind label %.loopexit.split-lp

128:                                              ; preds = %127
  call void @abort() #7
  unreachable

.loopexit:                                        ; preds = %.lr.ph, %120, %122, %129, %132, %134, %141, %143, %145
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %150

.loopexit.split-lp:                               ; preds = %125, %127, %137, %139
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %150

129:                                              ; preds = %124, %119
  %130 = invoke noundef zeroext i1 @_ZN4ardb9KeyObject13DecodeElementERNS_6BufferEbi(ptr noundef nonnull align 8 dereferenceable(64) %9, ptr noundef nonnull align 8 dereferenceable(33) %7, i1 noundef zeroext false, i32 noundef %.090)
          to label %131 unwind label %.loopexit

131:                                              ; preds = %129
  br i1 %130, label %141, label %132

132:                                              ; preds = %131
  %133 = invoke noundef ptr @_ZN4ardb10ArdbLogger13GetLogCheckerEv()
          to label %134 unwind label %.loopexit

134:                                              ; preds = %132
  %135 = invoke noundef zeroext i1 %133(i32 noundef 1)
          to label %136 unwind label %.loopexit

136:                                              ; preds = %134
  br i1 %135, label %137, label %141

137:                                              ; preds = %136
  %138 = invoke noundef ptr @_ZN4ardb10ArdbLogger13GetLogHandlerEv()
          to label %139 unwind label %.loopexit.split-lp

139:                                              ; preds = %137
  invoke void (i32, ptr, ptr, i32, ptr, ...) %138(i32 noundef 1, ptr noundef nonnull @.str, ptr noundef nonnull @__FUNCTION__._ZN4ardb12compare_keysEPKcmS1_mb, i32 noundef 141, ptr noundef nonnull @.str.7, i32 noundef %.090)
          to label %140 unwind label %.loopexit.split-lp

140:                                              ; preds = %139
  call void @abort() #7
  unreachable

141:                                              ; preds = %136, %131
  %142 = invoke noundef nonnull align 8 dereferenceable(13) ptr @_ZNK4ardb9KeyObject10GetElementEi(ptr noundef nonnull align 8 dereferenceable(64) %8, i32 noundef %.090)
          to label %143 unwind label %.loopexit

143:                                              ; preds = %141
  %144 = invoke noundef nonnull align 8 dereferenceable(13) ptr @_ZNK4ardb9KeyObject10GetElementEi(ptr noundef nonnull align 8 dereferenceable(64) %9, i32 noundef %.090)
          to label %145 unwind label %.loopexit

145:                                              ; preds = %143
  %146 = invoke noundef i32 @_ZNK4ardb4Data7CompareERKS0_b(ptr noundef nonnull align 8 dereferenceable(13) %142, ptr noundef nonnull align 8 dereferenceable(13) %144, i1 noundef zeroext false)
          to label %147 unwind label %.loopexit

147:                                              ; preds = %145
  %.not76 = icmp eq i32 %146, 0
  br i1 %.not76, label %148, label %.thread

148:                                              ; preds = %147
  %149 = add nuw nsw i32 %.090, 1
  %exitcond.not = icmp eq i32 %149, %98
  br i1 %exitcond.not, label %.thread, label %.lr.ph, !llvm.loop !5

.thread:                                          ; preds = %148, %147, %.preheader, %116, %94, %90, %87, %82, %53
  %.3 = phi i32 [ %52, %53 ], [ %81, %82 ], [ %89, %87 ], [ %93, %90 ], [ 0, %94 ], [ %117, %116 ], [ 0, %.preheader ], [ 0, %148 ], [ %146, %147 ]
  call void @_ZN4ardb9KeyObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(64) %9) #6
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %9) #6
  call void @_ZN4ardb9KeyObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(64) %8) #6
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %8) #6
  call void @_ZN4ardb6BufferD2Ev(ptr noundef nonnull align 8 dereferenceable(33) %7) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %7) #6
  call void @_ZN4ardb6BufferD2Ev(ptr noundef nonnull align 8 dereferenceable(33) %6) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %6) #6
  br label %153

150:                                              ; preds = %.loopexit, %.loopexit.split-lp, %112, %114, %35
  %.pn.pn.pn = phi { ptr, i32 } [ %36, %35 ], [ %113, %112 ], [ %115, %114 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @_ZN4ardb9KeyObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(64) %9) #6
  br label %151

151:                                              ; preds = %150, %33
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %150 ], [ %34, %33 ]
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %9) #6
  call void @_ZN4ardb9KeyObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(64) %8) #6
  br label %152

152:                                              ; preds = %151, %31
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn, %151 ], [ %32, %31 ]
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %8) #6
  call void @_ZN4ardb6BufferD2Ev(ptr noundef nonnull align 8 dereferenceable(33) %7) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %7) #6
  call void @_ZN4ardb6BufferD2Ev(ptr noundef nonnull align 8 dereferenceable(33) %6) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %6) #6
  resume { ptr, i32 } %.pn.pn.pn.pn.pn

153:                                              ; preds = %5, %.thread
  %.4 = phi i32 [ %.3, %.thread ], [ %13, %5 ]
  ret i32 %.4
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4ardb9KeyObjectC2Eh(ptr noundef nonnull align 8 dereferenceable(64), i8 noundef zeroext) unnamed_addr #0 align 2

declare noundef zeroext i1 @_ZN4ardb9KeyObject8DecodeNSERNS_6BufferEb(ptr noundef nonnull align 8 dereferenceable(64), ptr noundef nonnull align 8 dereferenceable(33), i1 noundef zeroext) local_unnamed_addr #3

declare noundef ptr @_ZN4ardb10ArdbLogger13GetLogCheckerEv() local_unnamed_addr #3

declare noundef ptr @_ZN4ardb10ArdbLogger13GetLogHandlerEv() local_unnamed_addr #3

; Function Attrs: noreturn nounwind
declare void @abort() local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(13) ptr @_ZNK4ardb9KeyObject12GetNameSpaceEv(ptr noundef nonnull align 8 dereferenceable(64)) local_unnamed_addr #5 align 2

declare noundef i32 @_ZNK4ardb4Data7CompareERKS0_b(ptr noundef nonnull align 8 dereferenceable(13), ptr noundef nonnull align 8 dereferenceable(13), i1 noundef zeroext) local_unnamed_addr #3

declare noundef zeroext i1 @_ZN4ardb9KeyObject9DecodeKeyERNS_6BufferEb(ptr noundef nonnull align 8 dereferenceable(64), ptr noundef nonnull align 8 dereferenceable(33), i1 noundef zeroext) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(13) ptr @_ZNK4ardb9KeyObject6GetKeyEv(ptr noundef nonnull align 8 dereferenceable(64)) local_unnamed_addr #5 align 2

declare noundef zeroext i1 @_ZN4ardb9KeyObject10DecodeTypeERNS_6BufferE(ptr noundef nonnull align 8 dereferenceable(64), ptr noundef nonnull align 8 dereferenceable(33)) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK4ardb9KeyObject7GetTypeEv(ptr noundef nonnull align 8 dereferenceable(64)) local_unnamed_addr #5 align 2

declare noundef i32 @_ZN4ardb9KeyObject19DecodeElementLengthERNS_6BufferE(ptr noundef nonnull align 8 dereferenceable(64), ptr noundef nonnull align 8 dereferenceable(33)) local_unnamed_addr #3

declare noundef zeroext i1 @_ZN4ardb9KeyObject13DecodeElementERNS_6BufferEbi(ptr noundef nonnull align 8 dereferenceable(64), ptr noundef nonnull align 8 dereferenceable(33), i1 noundef zeroext, i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(13) ptr @_ZNK4ardb9KeyObject10GetElementEi(ptr noundef nonnull align 8 dereferenceable(64), i32 noundef) 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 nounwind uwtable
declare dso_local void @_ZN4ardb9KeyObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(64)) unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4ardb6BufferD2Ev(ptr noundef nonnull align 8 dereferenceable(33)) 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 = { inlinehint 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }
attributes #7 = { noreturn nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}


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