; LLVM IR from yinqiwen/ardb :: src/common/channel/codec (redis_command_codec)

; 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::codec::FastRedisCommandDecoder" = type <{ %"class.ardb::ChannelUpstreamHandler", i8, [3 x i8], i32, i32, [4 x i8], i64, %"class.ardb::codec::RedisCommandFrame", i32, [4 x i8] }>
%"class.ardb::ChannelUpstreamHandler" = type { %"class.ardb::AbstractChannelHandler" }
%"class.ardb::AbstractChannelHandler" = type { %"class.ardb::ChannelHandler" }
%"class.ardb::ChannelHandler" = type { ptr }
%"class.ardb::codec::RedisCommandFrame" = type { i32, i8, i8, %"class.std::__cxx11::basic_string", %"class.std::deque", %"class.ardb::Buffer" }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Deque_impl" }
%"struct.std::_Deque_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Deque_impl" = type { %"struct.std::_Deque_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Deque_impl_data" }
%"struct.std::_Deque_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%"class.ardb::Buffer" = type <{ ptr, i64, i64, i64, i8, [7 x i8] }>

@.str = external hidden unnamed_addr constant [43 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [36 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN4ardb5codec23FastRedisCommandDecoder22ProcessMultibulkBufferERNS_6BufferERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(196) %0, ptr noundef nonnull align 8 dereferenceable(33) %1, ptr noundef nonnull align 8 dereferenceable(32) %2) #0 align 2 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i64, align 8
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  %14 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  store ptr null, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  store i32 0, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %15 = getelementptr inbounds %"class.ardb::codec::FastRedisCommandDecoder", ptr %14, i32 0, i32 4
  %16 = load i32, ptr %15, align 8, !tbaa !11
  %17 = icmp eq i32 %16, 0
  br i1 %17, label %18, label %86

18:                                               ; preds = %3
  %19 = getelementptr inbounds %"class.ardb::codec::FastRedisCommandDecoder", ptr %14, i32 0, i32 7
  call void @_ZN4ardb5codec17RedisCommandFrame5ClearEv(ptr noundef nonnull align 8 dereferenceable(160) %19)
  %20 = getelementptr inbounds %"class.ardb::codec::FastRedisCommandDecoder", ptr %14, i32 0, i32 8
  store i32 0, ptr %20, align 8, !tbaa !28
  %21 = load ptr, ptr %6, align 8, !tbaa !5
  %22 = call noundef ptr @_ZNK4ardb6Buffer16GetRawReadBufferEv(ptr noundef nonnull align 8 dereferenceable(33) %21)
  %23 = call noundef ptr @strchr(ptr noundef %22, i32 noundef 13) #8
  store ptr %23, ptr %8, align 8, !tbaa !5
  %24 = load ptr, ptr %8, align 8, !tbaa !5
  %25 = icmp eq ptr %24, null
  br i1 %25, label %26, label %34

26:                                               ; preds = %18
  %27 = load ptr, ptr %6, align 8, !tbaa !5
  %28 = call noundef i64 @_ZNK4ardb6Buffer13ReadableBytesEv(ptr noundef nonnull align 8 dereferenceable(33) %27)
  %29 = icmp ugt i64 %28, 65536
  br i1 %29, label %30, label %33

30:                                               ; preds = %26
  %31 = load ptr, ptr %7, align 8, !tbaa !5
  %32 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %31, ptr noundef @.str)
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %12, align 4
  br label %236

33:                                               ; preds = %26
  store i32 0, ptr %4, align 4
  store i32 1, ptr %12, align 4
  br label %236

34:                                               ; preds = %18
  %35 = load ptr, ptr %8, align 8, !tbaa !5
  %36 = load ptr, ptr %6, align 8, !tbaa !5
  %37 = call noundef ptr @_ZNK4ardb6Buffer16GetRawReadBufferEv(ptr noundef nonnull align 8 dereferenceable(33) %36)
  %38 = ptrtoint ptr %35 to i64
  %39 = ptrtoint ptr %37 to i64
  %40 = sub i64 %38, %39
  %41 = load ptr, ptr %6, align 8, !tbaa !5
  %42 = call noundef i64 @_ZNK4ardb6Buffer13ReadableBytesEv(ptr noundef nonnull align 8 dereferenceable(33) %41)
  %43 = sub i64 %42, 2
  %44 = icmp sgt i64 %40, %43
  br i1 %44, label %45, label %46

45:                                               ; preds = %34
  store i32 0, ptr %4, align 4
  store i32 1, ptr %12, align 4
  br label %236

46:                                               ; preds = %34
  %47 = load ptr, ptr %6, align 8, !tbaa !5
  %48 = call noundef ptr @_ZNK4ardb6Buffer16GetRawReadBufferEv(ptr noundef nonnull align 8 dereferenceable(33) %47)
  %49 = getelementptr inbounds i8, ptr %48, i64 1
  %50 = load ptr, ptr %8, align 8, !tbaa !5
  %51 = load ptr, ptr %6, align 8, !tbaa !5
  %52 = call noundef ptr @_ZNK4ardb6Buffer16GetRawReadBufferEv(ptr noundef nonnull align 8 dereferenceable(33) %51)
  %53 = getelementptr inbounds i8, ptr %52, i64 1
  %54 = ptrtoint ptr %50 to i64
  %55 = ptrtoint ptr %53 to i64
  %56 = sub i64 %54, %55
  %57 = call noundef i32 @_ZN4ardb9string2llEPKcmPl(ptr noundef %49, i64 noundef %56, ptr noundef %11)
  store i32 %57, ptr %10, align 4, !tbaa !9
  %58 = load i32, ptr %10, align 4, !tbaa !9
  %59 = icmp ne i32 %58, 0
  br i1 %59, label %60, label %63

60:                                               ; preds = %46
  %61 = load i64, ptr %11, align 8, !tbaa !29
  %62 = icmp sgt i64 %61, 1048576
  br i1 %62, label %63, label %66

63:                                               ; preds = %60, %46
  %64 = load ptr, ptr %7, align 8, !tbaa !5
  %65 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %64, ptr noundef @.str.1)
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %12, align 4
  br label %236

66:                                               ; preds = %60
  %67 = load ptr, ptr %8, align 8, !tbaa !5
  %68 = load ptr, ptr %6, align 8, !tbaa !5
  %69 = call noundef ptr @_ZNK4ardb6Buffer16GetRawReadBufferEv(ptr noundef nonnull align 8 dereferenceable(33) %68)
  %70 = ptrtoint ptr %67 to i64
  %71 = ptrtoint ptr %69 to i64
  %72 = sub i64 %70, %71
  %73 = add nsw i64 %72, 2
  %74 = trunc i64 %73 to i32
  store i32 %74, ptr %9, align 4, !tbaa !9
  %75 = load i64, ptr %11, align 8, !tbaa !29
  %76 = icmp sle i64 %75, 0
  br i1 %76, label %77, label %80

77:                                               ; preds = %66
  %78 = load ptr, ptr %6, align 8, !tbaa !5
  %79 = load i32, ptr %9, align 4, !tbaa !9
  call void @_ZN4ardb6Buffer16AdvanceReadIndexEi(ptr noundef nonnull align 8 dereferenceable(33) %78, i32 noundef %79)
  store i32 1, ptr %4, align 4
  store i32 1, ptr %12, align 4
  br label %236

80:                                               ; preds = %66
  %81 = load i64, ptr %11, align 8, !tbaa !29
  %82 = trunc i64 %81 to i32
  %83 = getelementptr inbounds %"class.ardb::codec::FastRedisCommandDecoder", ptr %14, i32 0, i32 4
  store i32 %82, ptr %83, align 8, !tbaa !11
  %84 = getelementptr inbounds %"class.ardb::codec::FastRedisCommandDecoder", ptr %14, i32 0, i32 7
  %85 = load i64, ptr %11, align 8, !tbaa !29
  call void @_ZN4ardb5codec17RedisCommandFrame11ReserveArgsEm(ptr noundef nonnull align 8 dereferenceable(160) %84, i64 noundef %85)
  br label %86

86:                                               ; preds = %80, %3
  br label %87

87:                                               ; preds = %221, %86
  %88 = getelementptr inbounds %"class.ardb::codec::FastRedisCommandDecoder", ptr %14, i32 0, i32 4
  %89 = load i32, ptr %88, align 8, !tbaa !11
  %90 = icmp ne i32 %89, 0
  br i1 %90, label %91, label %222

91:                                               ; preds = %87
  %92 = getelementptr inbounds %"class.ardb::codec::FastRedisCommandDecoder", ptr %14, i32 0, i32 6
  %93 = load i64, ptr %92, align 8, !tbaa !30
  %94 = icmp eq i64 %93, -1
  br i1 %94, label %95, label %182

95:                                               ; preds = %91
  %96 = load ptr, ptr %6, align 8, !tbaa !5
  %97 = call noundef ptr @_ZNK4ardb6Buffer16GetRawReadBufferEv(ptr noundef nonnull align 8 dereferenceable(33) %96)
  %98 = load i32, ptr %9, align 4, !tbaa !9
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds i8, ptr %97, i64 %99
  %101 = call noundef ptr @strchr(ptr noundef %100, i32 noundef 13) #8
  store ptr %101, ptr %8, align 8, !tbaa !5
  %102 = load ptr, ptr %8, align 8, !tbaa !5
  %103 = icmp eq ptr %102, null
  br i1 %103, label %104, label %112

104:                                              ; preds = %95
  %105 = load ptr, ptr %6, align 8, !tbaa !5
  %106 = call noundef i64 @_ZNK4ardb6Buffer13ReadableBytesEv(ptr noundef nonnull align 8 dereferenceable(33) %105)
  %107 = icmp ugt i64 %106, 65536
  br i1 %107, label %108, label %111

108:                                              ; preds = %104
  %109 = load ptr, ptr %7, align 8, !tbaa !5
  %110 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %109, ptr noundef @.str.2)
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %12, align 4
  br label %236

111:                                              ; preds = %104
  br label %222

112:                                              ; preds = %95
  %113 = load ptr, ptr %8, align 8, !tbaa !5
  %114 = load ptr, ptr %6, align 8, !tbaa !5
  %115 = call noundef ptr @_ZNK4ardb6Buffer16GetRawReadBufferEv(ptr noundef nonnull align 8 dereferenceable(33) %114)
  %116 = ptrtoint ptr %113 to i64
  %117 = ptrtoint ptr %115 to i64
  %118 = sub i64 %116, %117
  %119 = load ptr, ptr %6, align 8, !tbaa !5
  %120 = call noundef i64 @_ZNK4ardb6Buffer13ReadableBytesEv(ptr noundef nonnull align 8 dereferenceable(33) %119)
  %121 = sub i64 %120, 2
  %122 = icmp sgt i64 %118, %121
  br i1 %122, label %123, label %124

123:                                              ; preds = %112
  br label %222

124:                                              ; preds = %112
  %125 = load ptr, ptr %6, align 8, !tbaa !5
  %126 = call noundef ptr @_ZNK4ardb6Buffer16GetRawReadBufferEv(ptr noundef nonnull align 8 dereferenceable(33) %125)
  %127 = load i32, ptr %9, align 4, !tbaa !9
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds i8, ptr %126, i64 %128
  %130 = load i8, ptr %129, align 1, !tbaa !31
  %131 = sext i8 %130 to i32
  %132 = icmp ne i32 %131, 36
  br i1 %132, label %133, label %136

133:                                              ; preds = %124
  %134 = load ptr, ptr %7, align 8, !tbaa !5
  %135 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %134, ptr noundef @.str.3)
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %12, align 4
  br label %236

136:                                              ; preds = %124
  %137 = load ptr, ptr %6, align 8, !tbaa !5
  %138 = call noundef ptr @_ZNK4ardb6Buffer16GetRawReadBufferEv(ptr noundef nonnull align 8 dereferenceable(33) %137)
  %139 = load i32, ptr %9, align 4, !tbaa !9
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds i8, ptr %138, i64 %140
  %142 = getelementptr inbounds i8, ptr %141, i64 1
  %143 = load ptr, ptr %8, align 8, !tbaa !5
  %144 = load ptr, ptr %6, align 8, !tbaa !5
  %145 = call noundef ptr @_ZNK4ardb6Buffer16GetRawReadBufferEv(ptr noundef nonnull align 8 dereferenceable(33) %144)
  %146 = load i32, ptr %9, align 4, !tbaa !9
  %147 = sext i32 %146 to i64
  %148 = getelementptr inbounds i8, ptr %145, i64 %147
  %149 = getelementptr inbounds i8, ptr %148, i64 1
  %150 = ptrtoint ptr %143 to i64
  %151 = ptrtoint ptr %149 to i64
  %152 = sub i64 %150, %151
  %153 = call noundef i32 @_ZN4ardb9string2llEPKcmPl(ptr noundef %142, i64 noundef %152, ptr noundef %11)
  store i32 %153, ptr %10, align 4, !tbaa !9
  %154 = load i32, ptr %10, align 4, !tbaa !9
  %155 = icmp ne i32 %154, 0
  br i1 %155, label %156, label %162

156:                                              ; preds = %136
  %157 = load i64, ptr %11, align 8, !tbaa !29
  %158 = icmp slt i64 %157, 0
  br i1 %158, label %162, label %159

159:                                              ; preds = %156
  %160 = load i64, ptr %11, align 8, !tbaa !29
  %161 = icmp sgt i64 %160, 536870912
  br i1 %161, label %162, label %165

162:                                              ; preds = %159, %156, %136
  %163 = load ptr, ptr %7, align 8, !tbaa !5
  %164 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %163, ptr noundef @.str.4)
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %12, align 4
  br label %236

165:                                              ; preds = %159
  %166 = load ptr, ptr %8, align 8, !tbaa !5
  %167 = load ptr, ptr %6, align 8, !tbaa !5
  %168 = call noundef ptr @_ZNK4ardb6Buffer16GetRawReadBufferEv(ptr noundef nonnull align 8 dereferenceable(33) %167)
  %169 = load i32, ptr %9, align 4, !tbaa !9
  %170 = sext i32 %169 to i64
  %171 = getelementptr inbounds i8, ptr %168, i64 %170
  %172 = ptrtoint ptr %166 to i64
  %173 = ptrtoint ptr %171 to i64
  %174 = sub i64 %172, %173
  %175 = add nsw i64 %174, 2
  %176 = load i32, ptr %9, align 4, !tbaa !9
  %177 = sext i32 %176 to i64
  %178 = add nsw i64 %177, %175
  %179 = trunc i64 %178 to i32
  store i32 %179, ptr %9, align 4, !tbaa !9
  %180 = load i64, ptr %11, align 8, !tbaa !29
  %181 = getelementptr inbounds %"class.ardb::codec::FastRedisCommandDecoder", ptr %14, i32 0, i32 6
  store i64 %180, ptr %181, align 8, !tbaa !30
  br label %182

182:                                              ; preds = %165, %91
  %183 = load ptr, ptr %6, align 8, !tbaa !5
  %184 = call noundef i64 @_ZNK4ardb6Buffer13ReadableBytesEv(ptr noundef nonnull align 8 dereferenceable(33) %183)
  %185 = load i32, ptr %9, align 4, !tbaa !9
  %186 = sext i32 %185 to i64
  %187 = sub i64 %184, %186
  %188 = getelementptr inbounds %"class.ardb::codec::FastRedisCommandDecoder", ptr %14, i32 0, i32 6
  %189 = load i64, ptr %188, align 8, !tbaa !30
  %190 = add nsw i64 %189, 2
  %191 = trunc i64 %190 to i32
  %192 = zext i32 %191 to i64
  %193 = icmp ult i64 %187, %192
  br i1 %193, label %194, label %195

194:                                              ; preds = %182
  br label %222

195:                                              ; preds = %182
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %196 = getelementptr inbounds %"class.ardb::codec::FastRedisCommandDecoder", ptr %14, i32 0, i32 7
  %197 = getelementptr inbounds %"class.ardb::codec::FastRedisCommandDecoder", ptr %14, i32 0, i32 8
  %198 = load i32, ptr %197, align 8, !tbaa !28
  %199 = add nsw i32 %198, 1
  store i32 %199, ptr %197, align 8, !tbaa !28
  %200 = call noundef ptr @_ZN4ardb5codec17RedisCommandFrame18GetMutableArgumentB5cxx11Ej(ptr noundef nonnull align 8 dereferenceable(160) %196, i32 noundef %198)
  store ptr %200, ptr %13, align 8, !tbaa !5
  %201 = load ptr, ptr %13, align 8, !tbaa !5
  %202 = load ptr, ptr %6, align 8, !tbaa !5
  %203 = call noundef ptr @_ZNK4ardb6Buffer16GetRawReadBufferEv(ptr noundef nonnull align 8 dereferenceable(33) %202)
  %204 = load i32, ptr %9, align 4, !tbaa !9
  %205 = sext i32 %204 to i64
  %206 = getelementptr inbounds i8, ptr %203, i64 %205
  %207 = getelementptr inbounds %"class.ardb::codec::FastRedisCommandDecoder", ptr %14, i32 0, i32 6
  %208 = load i64, ptr %207, align 8, !tbaa !30
  %209 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEPKcm(ptr noundef nonnull align 8 dereferenceable(32) %201, ptr noundef %206, i64 noundef %208)
  %210 = getelementptr inbounds %"class.ardb::codec::FastRedisCommandDecoder", ptr %14, i32 0, i32 6
  %211 = load i64, ptr %210, align 8, !tbaa !30
  %212 = add nsw i64 %211, 2
  %213 = load i32, ptr %9, align 4, !tbaa !9
  %214 = sext i32 %213 to i64
  %215 = add nsw i64 %214, %212
  %216 = trunc i64 %215 to i32
  store i32 %216, ptr %9, align 4, !tbaa !9
  %217 = getelementptr inbounds %"class.ardb::codec::FastRedisCommandDecoder", ptr %14, i32 0, i32 6
  store i64 -1, ptr %217, align 8, !tbaa !30
  %218 = getelementptr inbounds %"class.ardb::codec::FastRedisCommandDecoder", ptr %14, i32 0, i32 4
  %219 = load i32, ptr %218, align 8, !tbaa !11
  %220 = add nsw i32 %219, -1
  store i32 %220, ptr %218, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  br label %221

221:                                              ; preds = %195
  br label %87, !llvm.loop !32

222:                                              ; preds = %194, %123, %111, %87
  %223 = load i32, ptr %9, align 4, !tbaa !9
  %224 = icmp ne i32 %223, 0
  br i1 %224, label %225, label %228

225:                                              ; preds = %222
  %226 = load ptr, ptr %6, align 8, !tbaa !5
  %227 = load i32, ptr %9, align 4, !tbaa !9
  call void @_ZN4ardb6Buffer16AdvanceReadIndexEi(ptr noundef nonnull align 8 dereferenceable(33) %226, i32 noundef %227)
  br label %228

228:                                              ; preds = %225, %222
  %229 = getelementptr inbounds %"class.ardb::codec::FastRedisCommandDecoder", ptr %14, i32 0, i32 4
  %230 = load i32, ptr %229, align 8, !tbaa !11
  %231 = icmp eq i32 %230, 0
  br i1 %231, label %232, label %235

232:                                              ; preds = %228
  %233 = getelementptr inbounds %"class.ardb::codec::FastRedisCommandDecoder", ptr %14, i32 0, i32 7
  call void @_ZN4ardb5codec17RedisCommandFrame5AdaptEv(ptr noundef nonnull align 8 dereferenceable(160) %233)
  %234 = getelementptr inbounds %"class.ardb::codec::FastRedisCommandDecoder", ptr %14, i32 0, i32 8
  store i32 0, ptr %234, align 8, !tbaa !28
  store i32 1, ptr %4, align 4
  store i32 1, ptr %12, align 4
  br label %236

235:                                              ; preds = %228
  store i32 0, ptr %4, align 4
  store i32 1, ptr %12, align 4
  br label %236

236:                                              ; preds = %235, %232, %162, %133, %108, %77, %63, %45, %33, %30
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  %237 = load i32, ptr %4, align 4
  ret i32 %237
}

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

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

; Function Attrs: nounwind willreturn memory(read)
declare noundef ptr @strchr(ptr noundef, i32 noundef) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK4ardb6Buffer16GetRawReadBufferEv(ptr noundef nonnull align 8 dereferenceable(33)) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i64 @_ZNK4ardb6Buffer13ReadableBytesEv(ptr noundef nonnull align 8 dereferenceable(33)) #4 align 2

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN4ardb5codec17RedisCommandFrame18GetMutableArgumentB5cxx11Ej(ptr noundef nonnull align 8 dereferenceable(160), i32 noundef) #6 align 2

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 16}
!12 = !{!"_ZTSN4ardb5codec23FastRedisCommandDecoderE", !13, i64 0, !16, i64 8, !10, i64 12, !10, i64 16, !17, i64 24, !18, i64 32, !10, i64 192}
!13 = !{!"_ZTSN4ardb22ChannelUpstreamHandlerINS_6BufferEEE", !14, i64 0}
!14 = !{!"_ZTSN4ardb22AbstractChannelHandlerINS_6BufferEEE", !15, i64 0}
!15 = !{!"_ZTSN4ardb14ChannelHandlerE"}
!16 = !{!"bool", !7, i64 0}
!17 = !{!"long", !7, i64 0}
!18 = !{!"_ZTSN4ardb5codec17RedisCommandFrameE", !19, i64 0, !16, i64 4, !16, i64 5, !20, i64 8, !22, i64 40, !27, i64 120}
!19 = !{!"_ZTSN4ardb5codec16RedisCommandTypeE", !7, i64 0}
!20 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !21, i64 0, !17, i64 8, !7, i64 16}
!21 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!22 = !{!"_ZTSSt5dequeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !23, i64 0}
!23 = !{!"_ZTSSt11_Deque_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !24, i64 0}
!24 = !{!"_ZTSNSt11_Deque_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE11_Deque_implE", !25, i64 0}
!25 = !{!"_ZTSNSt11_Deque_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE16_Deque_impl_dataE", !6, i64 0, !17, i64 8, !26, i64 16, !26, i64 48}
!26 = !{!"_ZTSSt15_Deque_iteratorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERS5_PS5_E", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!27 = !{!"_ZTSN4ardb6BufferE", !6, i64 0, !17, i64 8, !17, i64 16, !17, i64 24, !16, i64 32}
!28 = !{!12, !10, i64 192}
!29 = !{!17, !17, i64 0}
!30 = !{!12, !17, i64 24}
!31 = !{!7, !7, i64 0}
!32 = distinct !{!32, !33}
!33 = !{!"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"

@.str = external hidden unnamed_addr constant [43 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [36 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef range(i32 -1, 2) i32 @_ZN4ardb5codec23FastRedisCommandDecoder22ProcessMultibulkBufferERNS_6BufferERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(196) %0, ptr noundef nonnull align 8 dereferenceable(33) %1, ptr noundef nonnull align 8 dereferenceable(32) %2) local_unnamed_addr #0 align 2 {
  %4 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  %5 = getelementptr inbounds i8, ptr %0, i64 16
  %6 = load i32, ptr %5, align 8, !tbaa !5
  %7 = icmp eq i32 %6, 0
  br i1 %7, label %8, label %.lr.ph

8:                                                ; preds = %3
  %9 = getelementptr inbounds i8, ptr %0, i64 32
  tail call void @_ZN4ardb5codec17RedisCommandFrame5ClearEv(ptr noundef nonnull align 8 dereferenceable(160) %9)
  %10 = getelementptr inbounds i8, ptr %0, i64 192
  store i32 0, ptr %10, align 8, !tbaa !26
  %11 = tail call noundef ptr @_ZNK4ardb6Buffer16GetRawReadBufferEv(ptr noundef nonnull align 8 dereferenceable(33) %1)
  %12 = tail call noundef ptr @strchr(ptr noundef nonnull dereferenceable(1) %11, i32 noundef 13) #8
  %13 = icmp eq ptr %12, null
  br i1 %13, label %14, label %19

14:                                               ; preds = %8
  %15 = tail call noundef i64 @_ZNK4ardb6Buffer13ReadableBytesEv(ptr noundef nonnull align 8 dereferenceable(33) %1)
  %16 = icmp ugt i64 %15, 65536
  br i1 %16, label %17, label %191

17:                                               ; preds = %14
  %18 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull @.str)
  br label %191

19:                                               ; preds = %8
  %20 = tail call noundef ptr @_ZNK4ardb6Buffer16GetRawReadBufferEv(ptr noundef nonnull align 8 dereferenceable(33) %1)
  %21 = ptrtoint ptr %12 to i64
  %22 = ptrtoint ptr %20 to i64
  %23 = sub i64 %21, %22
  %24 = tail call noundef i64 @_ZNK4ardb6Buffer13ReadableBytesEv(ptr noundef nonnull align 8 dereferenceable(33) %1)
  %25 = add i64 %24, -2
  %26 = icmp sgt i64 %23, %25
  br i1 %26, label %191, label %27

27:                                               ; preds = %19
  %28 = tail call noundef ptr @_ZNK4ardb6Buffer16GetRawReadBufferEv(ptr noundef nonnull align 8 dereferenceable(33) %1)
  %29 = getelementptr inbounds i8, ptr %28, i64 1
  %30 = tail call noundef ptr @_ZNK4ardb6Buffer16GetRawReadBufferEv(ptr noundef nonnull align 8 dereferenceable(33) %1)
  %31 = getelementptr inbounds i8, ptr %30, i64 1
  %32 = ptrtoint ptr %31 to i64
  %33 = sub i64 %21, %32
  %34 = call noundef i32 @_ZN4ardb9string2llEPKcmPl(ptr noundef nonnull %29, i64 noundef %33, ptr noundef nonnull %4)
  %35 = icmp eq i32 %34, 0
  %36 = load i64, ptr %4, align 8
  %37 = icmp sgt i64 %36, 1048576
  %or.cond = select i1 %35, i1 true, i1 %37
  br i1 %or.cond, label %38, label %40

38:                                               ; preds = %27
  %39 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull @.str.1)
  br label %191

40:                                               ; preds = %27
  %41 = call noundef ptr @_ZNK4ardb6Buffer16GetRawReadBufferEv(ptr noundef nonnull align 8 dereferenceable(33) %1)
  %42 = ptrtoint ptr %41 to i64
  %43 = sub i64 %21, %42
  %44 = trunc i64 %43 to i32
  %45 = add i32 %44, 2
  %46 = load i64, ptr %4, align 8, !tbaa !27
  %47 = icmp slt i64 %46, 1
  br i1 %47, label %48, label %49

48:                                               ; preds = %40
  call void @_ZN4ardb6Buffer16AdvanceReadIndexEi(ptr noundef nonnull align 8 dereferenceable(33) %1, i32 noundef %45)
  br label %191

49:                                               ; preds = %40
  %50 = trunc i64 %46 to i32
  store i32 %50, ptr %5, align 8, !tbaa !5
  call void @_ZN4ardb5codec17RedisCommandFrame11ReserveArgsEm(ptr noundef nonnull align 8 dereferenceable(160) %9, i64 noundef %46)
  %.pr.pre = load i32, ptr %5, align 8, !tbaa !5
  %51 = icmp eq i32 %.pr.pre, 0
  br i1 %51, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %3, %49
  %.05374 = phi i32 [ %45, %49 ], [ 0, %3 ]
  %52 = getelementptr inbounds i8, ptr %0, i64 24
  %53 = getelementptr inbounds i8, ptr %0, i64 32
  %54 = getelementptr inbounds i8, ptr %0, i64 192
  %.pre = load i64, ptr %52, align 8, !tbaa !28
  %55 = icmp eq i64 %.pre, -1
  br i1 %55, label %56, label %96

56:                                               ; preds = %.lr.ph
  %57 = call noundef ptr @_ZNK4ardb6Buffer16GetRawReadBufferEv(ptr noundef nonnull align 8 dereferenceable(33) %1)
  %58 = sext i32 %.05374 to i64
  %59 = getelementptr inbounds i8, ptr %57, i64 %58
  %60 = call noundef ptr @strchr(ptr noundef nonnull dereferenceable(1) %59, i32 noundef 13) #8
  %61 = icmp eq ptr %60, null
  br i1 %61, label %.loopexit85, label %62

62:                                               ; preds = %56
  %63 = call noundef ptr @_ZNK4ardb6Buffer16GetRawReadBufferEv(ptr noundef nonnull align 8 dereferenceable(33) %1)
  %64 = ptrtoint ptr %60 to i64
  %65 = ptrtoint ptr %63 to i64
  %66 = sub i64 %64, %65
  %67 = call noundef i64 @_ZNK4ardb6Buffer13ReadableBytesEv(ptr noundef nonnull align 8 dereferenceable(33) %1)
  %68 = add i64 %67, -2
  %69 = icmp sgt i64 %66, %68
  br i1 %69, label %.loopexit, label %70

70:                                               ; preds = %62
  %71 = call noundef ptr @_ZNK4ardb6Buffer16GetRawReadBufferEv(ptr noundef nonnull align 8 dereferenceable(33) %1)
  %72 = getelementptr inbounds i8, ptr %71, i64 %58
  %73 = load i8, ptr %72, align 1, !tbaa !29
  %.not57.peel = icmp eq i8 %73, 36
  br i1 %.not57.peel, label %74, label %.loopexit86

74:                                               ; preds = %70
  %75 = call noundef ptr @_ZNK4ardb6Buffer16GetRawReadBufferEv(ptr noundef nonnull align 8 dereferenceable(33) %1)
  %76 = getelementptr inbounds i8, ptr %75, i64 %58
  %77 = getelementptr inbounds i8, ptr %76, i64 1
  %78 = call noundef ptr @_ZNK4ardb6Buffer16GetRawReadBufferEv(ptr noundef nonnull align 8 dereferenceable(33) %1)
  %79 = getelementptr inbounds i8, ptr %78, i64 %58
  %80 = getelementptr inbounds i8, ptr %79, i64 1
  %81 = ptrtoint ptr %80 to i64
  %82 = sub i64 %64, %81
  %83 = call noundef i32 @_ZN4ardb9string2llEPKcmPl(ptr noundef nonnull %77, i64 noundef %82, ptr noundef nonnull %4)
  %84 = icmp eq i32 %83, 0
  %85 = load i64, ptr %4, align 8
  %86 = icmp ugt i64 %85, 536870912
  %or.cond5.peel = select i1 %84, i1 true, i1 %86
  br i1 %or.cond5.peel, label %.loopexit87, label %87

87:                                               ; preds = %74
  %88 = call noundef ptr @_ZNK4ardb6Buffer16GetRawReadBufferEv(ptr noundef nonnull align 8 dereferenceable(33) %1)
  %89 = getelementptr inbounds i8, ptr %88, i64 %58
  %90 = ptrtoint ptr %89 to i64
  %91 = sub i64 %64, %90
  %92 = trunc i64 %91 to i32
  %93 = add i32 %.05374, 2
  %94 = add i32 %93, %92
  %95 = load i64, ptr %4, align 8, !tbaa !27
  store i64 %95, ptr %52, align 8, !tbaa !28
  br label %96

96:                                               ; preds = %87, %.lr.ph
  %.2.peel = phi i32 [ %94, %87 ], [ %.05374, %.lr.ph ]
  %97 = call noundef i64 @_ZNK4ardb6Buffer13ReadableBytesEv(ptr noundef nonnull align 8 dereferenceable(33) %1)
  %98 = sext i32 %.2.peel to i64
  %99 = sub i64 %97, %98
  %100 = load i64, ptr %52, align 8, !tbaa !28
  %101 = add i64 %100, 2
  %102 = and i64 %101, 4294967295
  %103 = icmp ult i64 %99, %102
  br i1 %103, label %.loopexit, label %104

104:                                              ; preds = %96
  %105 = load i32, ptr %54, align 8, !tbaa !26
  %106 = add nsw i32 %105, 1
  store i32 %106, ptr %54, align 8, !tbaa !26
  %107 = call noundef ptr @_ZN4ardb5codec17RedisCommandFrame18GetMutableArgumentB5cxx11Ej(ptr noundef nonnull align 8 dereferenceable(160) %53, i32 noundef %105)
  %108 = call noundef ptr @_ZNK4ardb6Buffer16GetRawReadBufferEv(ptr noundef nonnull align 8 dereferenceable(33) %1)
  %109 = getelementptr inbounds i8, ptr %108, i64 %98
  %110 = load i64, ptr %52, align 8, !tbaa !28
  %111 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEPKcm(ptr noundef nonnull align 8 dereferenceable(32) %107, ptr noundef %109, i64 noundef %110)
  %112 = load i64, ptr %52, align 8, !tbaa !28
  %113 = trunc i64 %112 to i32
  %114 = add i32 %.2.peel, 2
  %115 = add i32 %114, %113
  store i64 -1, ptr %52, align 8, !tbaa !28
  %116 = load i32, ptr %5, align 8, !tbaa !5
  %117 = add nsw i32 %116, -1
  store i32 %117, ptr %5, align 8, !tbaa !5
  %.not.peel = icmp eq i32 %117, 0
  br i1 %.not.peel, label %.loopexit, label %.lr.ph.peel.newph

.lr.ph.peel.newph:                                ; preds = %104, %170
  %.163 = phi i32 [ %181, %170 ], [ %115, %104 ]
  %118 = call noundef ptr @_ZNK4ardb6Buffer16GetRawReadBufferEv(ptr noundef nonnull align 8 dereferenceable(33) %1)
  %119 = sext i32 %.163 to i64
  %120 = getelementptr inbounds i8, ptr %118, i64 %119
  %121 = call noundef ptr @strchr(ptr noundef nonnull dereferenceable(1) %120, i32 noundef 13) #8
  %122 = icmp eq ptr %121, null
  br i1 %122, label %.loopexit85, label %127

.loopexit85:                                      ; preds = %.lr.ph.peel.newph, %56
  %.163.lcssa = phi i32 [ %.05374, %56 ], [ %.163, %.lr.ph.peel.newph ]
  %123 = call noundef i64 @_ZNK4ardb6Buffer13ReadableBytesEv(ptr noundef nonnull align 8 dereferenceable(33) %1)
  %124 = icmp ugt i64 %123, 65536
  br i1 %124, label %125, label %.loopexit

125:                                              ; preds = %.loopexit85
  %126 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull @.str.2)
  br label %191

127:                                              ; preds = %.lr.ph.peel.newph
  %128 = call noundef ptr @_ZNK4ardb6Buffer16GetRawReadBufferEv(ptr noundef nonnull align 8 dereferenceable(33) %1)
  %129 = ptrtoint ptr %121 to i64
  %130 = ptrtoint ptr %128 to i64
  %131 = sub i64 %129, %130
  %132 = call noundef i64 @_ZNK4ardb6Buffer13ReadableBytesEv(ptr noundef nonnull align 8 dereferenceable(33) %1)
  %133 = add i64 %132, -2
  %134 = icmp sgt i64 %131, %133
  br i1 %134, label %.loopexit, label %135

135:                                              ; preds = %127
  %136 = call noundef ptr @_ZNK4ardb6Buffer16GetRawReadBufferEv(ptr noundef nonnull align 8 dereferenceable(33) %1)
  %137 = getelementptr inbounds i8, ptr %136, i64 %119
  %138 = load i8, ptr %137, align 1, !tbaa !29
  %.not57 = icmp eq i8 %138, 36
  br i1 %.not57, label %140, label %.loopexit86

.loopexit86:                                      ; preds = %135, %70
  %139 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull @.str.3)
  br label %191

140:                                              ; preds = %135
  %141 = call noundef ptr @_ZNK4ardb6Buffer16GetRawReadBufferEv(ptr noundef nonnull align 8 dereferenceable(33) %1)
  %142 = getelementptr inbounds i8, ptr %141, i64 %119
  %143 = getelementptr inbounds i8, ptr %142, i64 1
  %144 = call noundef ptr @_ZNK4ardb6Buffer16GetRawReadBufferEv(ptr noundef nonnull align 8 dereferenceable(33) %1)
  %145 = getelementptr inbounds i8, ptr %144, i64 %119
  %146 = getelementptr inbounds i8, ptr %145, i64 1
  %147 = ptrtoint ptr %146 to i64
  %148 = sub i64 %129, %147
  %149 = call noundef i32 @_ZN4ardb9string2llEPKcmPl(ptr noundef nonnull %143, i64 noundef %148, ptr noundef nonnull %4)
  %150 = icmp eq i32 %149, 0
  %151 = load i64, ptr %4, align 8
  %152 = icmp ugt i64 %151, 536870912
  %or.cond5 = select i1 %150, i1 true, i1 %152
  br i1 %or.cond5, label %.loopexit87, label %154

.loopexit87:                                      ; preds = %140, %74
  %153 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull @.str.4)
  br label %191

154:                                              ; preds = %140
  %155 = call noundef ptr @_ZNK4ardb6Buffer16GetRawReadBufferEv(ptr noundef nonnull align 8 dereferenceable(33) %1)
  %156 = getelementptr inbounds i8, ptr %155, i64 %119
  %157 = ptrtoint ptr %156 to i64
  %158 = sub i64 %129, %157
  %159 = trunc i64 %158 to i32
  %160 = add i32 %.163, 2
  %161 = add i32 %160, %159
  %162 = load i64, ptr %4, align 8, !tbaa !27
  store i64 %162, ptr %52, align 8, !tbaa !28
  %163 = call noundef i64 @_ZNK4ardb6Buffer13ReadableBytesEv(ptr noundef nonnull align 8 dereferenceable(33) %1)
  %164 = sext i32 %161 to i64
  %165 = sub i64 %163, %164
  %166 = load i64, ptr %52, align 8, !tbaa !28
  %167 = add i64 %166, 2
  %168 = and i64 %167, 4294967295
  %169 = icmp ult i64 %165, %168
  br i1 %169, label %.loopexit, label %170

170:                                              ; preds = %154
  %171 = load i32, ptr %54, align 8, !tbaa !26
  %172 = add nsw i32 %171, 1
  store i32 %172, ptr %54, align 8, !tbaa !26
  %173 = call noundef ptr @_ZN4ardb5codec17RedisCommandFrame18GetMutableArgumentB5cxx11Ej(ptr noundef nonnull align 8 dereferenceable(160) %53, i32 noundef %171)
  %174 = call noundef ptr @_ZNK4ardb6Buffer16GetRawReadBufferEv(ptr noundef nonnull align 8 dereferenceable(33) %1)
  %175 = getelementptr inbounds i8, ptr %174, i64 %164
  %176 = load i64, ptr %52, align 8, !tbaa !28
  %177 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEPKcm(ptr noundef nonnull align 8 dereferenceable(32) %173, ptr noundef %175, i64 noundef %176)
  %178 = load i64, ptr %52, align 8, !tbaa !28
  %179 = trunc i64 %178 to i32
  %180 = add i32 %161, 2
  %181 = add i32 %180, %179
  store i64 -1, ptr %52, align 8, !tbaa !28
  %182 = load i32, ptr %5, align 8, !tbaa !5
  %183 = add nsw i32 %182, -1
  store i32 %183, ptr %5, align 8, !tbaa !5
  %.not = icmp eq i32 %183, 0
  br i1 %.not, label %.loopexit, label %.lr.ph.peel.newph, !llvm.loop !30

.loopexit:                                        ; preds = %62, %96, %104, %170, %127, %154, %49, %.loopexit85
  %.3 = phi i32 [ %.163.lcssa, %.loopexit85 ], [ %45, %49 ], [ %.05374, %62 ], [ %.2.peel, %96 ], [ %115, %104 ], [ %161, %154 ], [ %.163, %127 ], [ %181, %170 ]
  %.not58 = icmp eq i32 %.3, 0
  br i1 %.not58, label %185, label %184

184:                                              ; preds = %.loopexit
  call void @_ZN4ardb6Buffer16AdvanceReadIndexEi(ptr noundef nonnull align 8 dereferenceable(33) %1, i32 noundef %.3)
  br label %185

185:                                              ; preds = %184, %.loopexit
  %186 = load i32, ptr %5, align 8, !tbaa !5
  %187 = icmp eq i32 %186, 0
  br i1 %187, label %188, label %191

188:                                              ; preds = %185
  %189 = getelementptr inbounds i8, ptr %0, i64 32
  call void @_ZN4ardb5codec17RedisCommandFrame5AdaptEv(ptr noundef nonnull align 8 dereferenceable(160) %189)
  %190 = getelementptr inbounds i8, ptr %0, i64 192
  store i32 0, ptr %190, align 8, !tbaa !26
  br label %191

191:                                              ; preds = %185, %19, %14, %188, %.loopexit87, %.loopexit86, %125, %48, %38, %17
  %.0 = phi i32 [ -1, %17 ], [ -1, %38 ], [ 1, %48 ], [ -1, %125 ], [ 1, %188 ], [ -1, %.loopexit86 ], [ -1, %.loopexit87 ], [ 0, %14 ], [ 0, %19 ], [ 0, %185 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  ret i32 %.0
}

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

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare noundef ptr @strchr(ptr noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK4ardb6Buffer16GetRawReadBufferEv(ptr noundef nonnull align 8 dereferenceable(33)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i64 @_ZNK4ardb6Buffer13ReadableBytesEv(ptr noundef nonnull align 8 dereferenceable(33)) local_unnamed_addr #4 align 2

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

declare noundef i32 @_ZN4ardb9string2llEPKcmPl(ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #5

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN4ardb5codec17RedisCommandFrame18GetMutableArgumentB5cxx11Ej(ptr noundef nonnull align 8 dereferenceable(160), i32 noundef) local_unnamed_addr #6 align 2

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

!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, !13, i64 16}
!6 = !{!"_ZTSN4ardb5codec23FastRedisCommandDecoderE", !7, i64 0, !10, i64 8, !13, i64 12, !13, i64 16, !14, i64 24, !15, i64 32, !13, i64 192}
!7 = !{!"_ZTSN4ardb22ChannelUpstreamHandlerINS_6BufferEEE", !8, i64 0}
!8 = !{!"_ZTSN4ardb22AbstractChannelHandlerINS_6BufferEEE", !9, i64 0}
!9 = !{!"_ZTSN4ardb14ChannelHandlerE"}
!10 = !{!"bool", !11, i64 0}
!11 = !{!"omnipotent char", !12, i64 0}
!12 = !{!"Simple C++ TBAA"}
!13 = !{!"int", !11, i64 0}
!14 = !{!"long", !11, i64 0}
!15 = !{!"_ZTSN4ardb5codec17RedisCommandFrameE", !16, i64 0, !10, i64 4, !10, i64 5, !17, i64 8, !20, i64 40, !25, i64 120}
!16 = !{!"_ZTSN4ardb5codec16RedisCommandTypeE", !11, i64 0}
!17 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !18, i64 0, !14, i64 8, !11, i64 16}
!18 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !19, i64 0}
!19 = !{!"any pointer", !11, i64 0}
!20 = !{!"_ZTSSt5dequeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !21, i64 0}
!21 = !{!"_ZTSSt11_Deque_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !22, i64 0}
!22 = !{!"_ZTSNSt11_Deque_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE11_Deque_implE", !23, i64 0}
!23 = !{!"_ZTSNSt11_Deque_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE16_Deque_impl_dataE", !19, i64 0, !14, i64 8, !24, i64 16, !24, i64 48}
!24 = !{!"_ZTSSt15_Deque_iteratorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERS5_PS5_E", !19, i64 0, !19, i64 8, !19, i64 16, !19, i64 24}
!25 = !{!"_ZTSN4ardb6BufferE", !19, i64 0, !14, i64 8, !14, i64 16, !14, i64 24, !10, i64 32}
!26 = !{!6, !13, i64 192}
!27 = !{!14, !14, i64 0}
!28 = !{!6, !14, i64 24}
!29 = !{!11, !11, i64 0}
!30 = distinct !{!30, !31, !32}
!31 = !{!"llvm.loop.mustprogress"}
!32 = !{!"llvm.loop.peeled.count", i32 1}


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