; 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.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.ardb::APIException" = type <{ %"class.ardb::Exception", i32, [4 x i8] }>
%"class.ardb::Exception" = type { %"class.std::exception", %"class.std::__cxx11::basic_string" }
%"class.std::exception" = type { ptr }
%"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::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.5 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [96 x i8], align 1
@__FUNCTION__._ZN4ardb5codec23FastRedisCommandDecoder15MessageReceivedERNS_21ChannelHandlerContextERNS_12MessageEventINS_6BufferEEE = external hidden unnamed_addr constant [16 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [22 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN4ardb5codec23FastRedisCommandDecoder22ProcessMultibulkBufferERNS_6BufferERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(196), ptr noundef nonnull align 8 dereferenceable(33), ptr noundef nonnull align 8 dereferenceable(32)) #0 align 2

; 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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK4ardb6Buffer16GetRawReadBufferEv(ptr noundef nonnull align 8 dereferenceable(33)) #2 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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4ardb6Buffer16AdvanceReadIndexEi(ptr noundef nonnull align 8 dereferenceable(33), i32 noundef) #2 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
define dso_local void @_ZN4ardb5codec23FastRedisCommandDecoder15MessageReceivedERNS_21ChannelHandlerContextERNS_12MessageEventINS_6BufferEEE(ptr noundef nonnull align 8 dereferenceable(196) %0, ptr noundef nonnull align 8 dereferenceable(66) %1, ptr noundef nonnull align 8 dereferenceable(40) %2) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i8, align 1
  %9 = alloca ptr, align 8
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca i64, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i64, align 8
  %15 = alloca %"class.ardb::APIException", align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %16 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %17 = load ptr, ptr %6, align 8, !tbaa !5
  %18 = call noundef ptr @_ZN4ardb12MessageEventINS_6BufferEE10GetMessageEv(ptr noundef nonnull align 8 dereferenceable(40) %17)
  store ptr %18, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #6
  store i8 0, ptr %8, align 1, !tbaa !9
  br label %19

19:                                               ; preds = %35, %3
  %20 = load ptr, ptr %7, align 8, !tbaa !5
  %21 = call noundef ptr @_ZNK4ardb6Buffer16GetRawReadBufferEv(ptr noundef nonnull align 8 dereferenceable(33) %20)
  %22 = getelementptr inbounds i8, ptr %21, i64 0
  %23 = load i8, ptr %22, align 1, !tbaa !11
  %24 = sext i8 %23 to i32
  %25 = icmp eq i32 %24, 13
  br i1 %25, label %33, label %26

26:                                               ; preds = %19
  %27 = load ptr, ptr %7, align 8, !tbaa !5
  %28 = call noundef ptr @_ZNK4ardb6Buffer16GetRawReadBufferEv(ptr noundef nonnull align 8 dereferenceable(33) %27)
  %29 = getelementptr inbounds i8, ptr %28, i64 0
  %30 = load i8, ptr %29, align 1, !tbaa !11
  %31 = sext i8 %30 to i32
  %32 = icmp eq i32 %31, 10
  br label %33

33:                                               ; preds = %26, %19
  %34 = phi i1 [ true, %19 ], [ %32, %26 ]
  br i1 %34, label %35, label %37

35:                                               ; preds = %33
  %36 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZN4ardb6Buffer16AdvanceReadIndexEi(ptr noundef nonnull align 8 dereferenceable(33) %36, i32 noundef 1)
  store i8 1, ptr %8, align 1, !tbaa !9
  br label %19, !llvm.loop !12

37:                                               ; preds = %33
  %38 = getelementptr inbounds %"class.ardb::codec::FastRedisCommandDecoder", ptr %16, i32 0, i32 1
  %39 = load i8, ptr %38, align 8, !tbaa !14, !range !31, !noundef !32
  %40 = trunc i8 %39 to i1
  br i1 %40, label %49, label %41

41:                                               ; preds = %37
  %42 = load i8, ptr %8, align 1, !tbaa !9, !range !31, !noundef !32
  %43 = trunc i8 %42 to i1
  br i1 %43, label %44, label %49

44:                                               ; preds = %41
  %45 = getelementptr inbounds %"class.ardb::codec::FastRedisCommandDecoder", ptr %16, i32 0, i32 7
  call void @_ZN4ardb5codec17RedisCommandFrame5ClearEv(ptr noundef nonnull align 8 dereferenceable(160) %45)
  %46 = load ptr, ptr %5, align 8, !tbaa !5
  %47 = getelementptr inbounds %"class.ardb::codec::FastRedisCommandDecoder", ptr %16, i32 0, i32 7
  %48 = call noundef zeroext i1 @_ZN4ardb21fire_message_receivedINS_5codec17RedisCommandFrameEEEbRNS_21ChannelHandlerContextEPT_PNS_4TypeIS5_E10DestructorE(ptr noundef nonnull align 8 dereferenceable(66) %46, ptr noundef %47, ptr noundef null)
  br label %49

49:                                               ; preds = %44, %41, %37
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %50 = load ptr, ptr %5, align 8, !tbaa !5
  %51 = call noundef ptr @_ZN4ardb21ChannelHandlerContext10GetChannelEv(ptr noundef nonnull align 8 dereferenceable(66) %50)
  store ptr %51, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %10) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %52 = load ptr, ptr %7, align 8, !tbaa !5
  %53 = invoke noundef i64 @_ZNK4ardb6Buffer12GetReadIndexEv(ptr noundef nonnull align 8 dereferenceable(33) %52)
          to label %54 unwind label %80

54:                                               ; preds = %49
  store i64 %53, ptr %11, align 8, !tbaa !33
  br label %55

55:                                               ; preds = %177, %54
  %56 = load ptr, ptr %7, align 8, !tbaa !5
  %57 = invoke noundef zeroext i1 @_ZNK4ardb6Buffer8ReadableEv(ptr noundef nonnull align 8 dereferenceable(33) %56)
          to label %58 unwind label %80

58:                                               ; preds = %55
  br i1 %57, label %59, label %64

59:                                               ; preds = %58
  %60 = load ptr, ptr %9, align 8, !tbaa !5
  %61 = invoke noundef zeroext i1 @_ZN4ardb7Channel13IsReadBlockedEv(ptr noundef nonnull align 8 dereferenceable(256) %60)
          to label %62 unwind label %80

62:                                               ; preds = %59
  %63 = xor i1 %61, true
  br label %64

64:                                               ; preds = %62, %58
  %65 = phi i1 [ false, %58 ], [ %63, %62 ]
  br i1 %65, label %66, label %178

66:                                               ; preds = %64
  %67 = getelementptr inbounds %"class.ardb::codec::FastRedisCommandDecoder", ptr %16, i32 0, i32 3
  %68 = load i32, ptr %67, align 4, !tbaa !34
  %69 = icmp ne i32 %68, 0
  br i1 %69, label %87, label %70

70:                                               ; preds = %66
  %71 = load ptr, ptr %7, align 8, !tbaa !5
  %72 = invoke noundef ptr @_ZNK4ardb6Buffer16GetRawReadBufferEv(ptr noundef nonnull align 8 dereferenceable(33) %71)
          to label %73 unwind label %80

73:                                               ; preds = %70
  %74 = getelementptr inbounds i8, ptr %72, i64 0
  %75 = load i8, ptr %74, align 1, !tbaa !11
  %76 = sext i8 %75 to i32
  %77 = icmp eq i32 %76, 42
  br i1 %77, label %78, label %84

78:                                               ; preds = %73
  %79 = getelementptr inbounds %"class.ardb::codec::FastRedisCommandDecoder", ptr %16, i32 0, i32 3
  store i32 2, ptr %79, align 4, !tbaa !34
  br label %86

80:                                               ; preds = %142, %110, %99, %93, %91, %70, %59, %55, %49
  %81 = landingpad { ptr, i32 }
          cleanup
  %82 = extractvalue { ptr, i32 } %81, 0
  store ptr %82, ptr %12, align 8
  %83 = extractvalue { ptr, i32 } %81, 1
  store i32 %83, ptr %13, align 4
  br label %179

84:                                               ; preds = %73
  %85 = getelementptr inbounds %"class.ardb::codec::FastRedisCommandDecoder", ptr %16, i32 0, i32 3
  store i32 1, ptr %85, align 4, !tbaa !34
  br label %86

86:                                               ; preds = %84, %78
  br label %87

87:                                               ; preds = %86, %66
  %88 = getelementptr inbounds %"class.ardb::codec::FastRedisCommandDecoder", ptr %16, i32 0, i32 3
  %89 = load i32, ptr %88, align 4, !tbaa !34
  %90 = icmp eq i32 %89, 1
  br i1 %90, label %91, label %106

91:                                               ; preds = %87
  %92 = getelementptr inbounds %"class.ardb::codec::FastRedisCommandDecoder", ptr %16, i32 0, i32 7
  invoke void @_ZN4ardb5codec17RedisCommandFrame5ClearEv(ptr noundef nonnull align 8 dereferenceable(160) %92)
          to label %93 unwind label %80

93:                                               ; preds = %91
  %94 = load ptr, ptr %7, align 8, !tbaa !5
  %95 = getelementptr inbounds %"class.ardb::codec::FastRedisCommandDecoder", ptr %16, i32 0, i32 7
  %96 = invoke noundef i32 @_ZN4ardb5codec19RedisCommandDecoder19ProcessInlineBufferERNS_6BufferERNS0_17RedisCommandFrameE(ptr noundef nonnull align 8 dereferenceable(33) %94, ptr noundef nonnull align 8 dereferenceable(160) %95)
          to label %97 unwind label %80

97:                                               ; preds = %93
  %98 = icmp eq i32 %96, 1
  br i1 %98, label %99, label %104

99:                                               ; preds = %97
  %100 = load ptr, ptr %5, align 8, !tbaa !5
  %101 = getelementptr inbounds %"class.ardb::codec::FastRedisCommandDecoder", ptr %16, i32 0, i32 7
  %102 = invoke noundef zeroext i1 @_ZN4ardb21fire_message_receivedINS_5codec17RedisCommandFrameEEEbRNS_21ChannelHandlerContextEPT_PNS_4TypeIS5_E10DestructorE(ptr noundef nonnull align 8 dereferenceable(66) %100, ptr noundef %101, ptr noundef null)
          to label %103 unwind label %80

103:                                              ; preds = %99
  br label %105

104:                                              ; preds = %97
  br label %178

105:                                              ; preds = %103
  br label %146

106:                                              ; preds = %87
  %107 = getelementptr inbounds %"class.ardb::codec::FastRedisCommandDecoder", ptr %16, i32 0, i32 3
  %108 = load i32, ptr %107, align 4, !tbaa !34
  %109 = icmp eq i32 %108, 2
  br i1 %109, label %110, label %142

110:                                              ; preds = %106
  %111 = load ptr, ptr %7, align 8, !tbaa !5
  %112 = invoke noundef i32 @_ZN4ardb5codec23FastRedisCommandDecoder22ProcessMultibulkBufferERNS_6BufferERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(196) %16, ptr noundef nonnull align 8 dereferenceable(33) %111, ptr noundef nonnull align 8 dereferenceable(32) %10)
          to label %113 unwind label %80

113:                                              ; preds = %110
  %114 = icmp eq i32 %112, 1
  br i1 %114, label %115, label %140

115:                                              ; preds = %113
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %116 = load ptr, ptr %7, align 8, !tbaa !5
  %117 = invoke noundef i64 @_ZNK4ardb6Buffer12GetReadIndexEv(ptr noundef nonnull align 8 dereferenceable(33) %116)
          to label %118 unwind label %136

118:                                              ; preds = %115
  %119 = load i64, ptr %11, align 8, !tbaa !33
  %120 = sub i64 %117, %119
  store i64 %120, ptr %14, align 8, !tbaa !33
  %121 = getelementptr inbounds %"class.ardb::codec::FastRedisCommandDecoder", ptr %16, i32 0, i32 7
  %122 = getelementptr inbounds %"class.ardb::codec::RedisCommandFrame", ptr %121, i32 0, i32 5
  %123 = load ptr, ptr %7, align 8, !tbaa !5
  %124 = invoke noundef ptr @_ZNK4ardb6Buffer16GetRawReadBufferEv(ptr noundef nonnull align 8 dereferenceable(33) %123)
          to label %125 unwind label %136

125:                                              ; preds = %118
  %126 = load i64, ptr %14, align 8, !tbaa !33
  %127 = sub i64 0, %126
  %128 = getelementptr inbounds i8, ptr %124, i64 %127
  %129 = load i64, ptr %14, align 8, !tbaa !33
  %130 = invoke noundef zeroext i1 @_ZN4ardb6Buffer19WrapReadableContentEPKvm(ptr noundef nonnull align 8 dereferenceable(33) %122, ptr noundef %128, i64 noundef %129)
          to label %131 unwind label %136

131:                                              ; preds = %125
  %132 = load ptr, ptr %5, align 8, !tbaa !5
  %133 = getelementptr inbounds %"class.ardb::codec::FastRedisCommandDecoder", ptr %16, i32 0, i32 7
  %134 = invoke noundef zeroext i1 @_ZN4ardb21fire_message_receivedINS_5codec17RedisCommandFrameEEEbRNS_21ChannelHandlerContextEPT_PNS_4TypeIS5_E10DestructorE(ptr noundef nonnull align 8 dereferenceable(66) %132, ptr noundef %133, ptr noundef null)
          to label %135 unwind label %136

135:                                              ; preds = %131
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  br label %141

136:                                              ; preds = %131, %125, %118, %115
  %137 = landingpad { ptr, i32 }
          cleanup
  %138 = extractvalue { ptr, i32 } %137, 0
  store ptr %138, ptr %12, align 8
  %139 = extractvalue { ptr, i32 } %137, 1
  store i32 %139, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  br label %179

140:                                              ; preds = %113
  br label %178

141:                                              ; preds = %135
  br label %145

142:                                              ; preds = %106
  %143 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef @.str.5)
          to label %144 unwind label %80

144:                                              ; preds = %142
  br label %145

145:                                              ; preds = %144, %141
  br label %146

146:                                              ; preds = %145, %105
  %147 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %10) #6
  br i1 %147, label %177, label %148

148:                                              ; preds = %146
  call void @llvm.lifetime.start.p0(i64 48, ptr %15) #6
  invoke void @_ZN4ardb12APIExceptionC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(44) %15, ptr noundef nonnull align 8 dereferenceable(32) %10)
          to label %149 unwind label %165

149:                                              ; preds = %148
  %150 = load ptr, ptr %5, align 8, !tbaa !5
  %151 = invoke noundef ptr @_ZN4ardb21ChannelHandlerContext10GetChannelEv(ptr noundef nonnull align 8 dereferenceable(66) %150)
          to label %152 unwind label %169

152:                                              ; preds = %149
  %153 = invoke noundef zeroext i1 @_ZN4ardb21fire_exception_caughtEPNS_7ChannelERKNS_12APIExceptionE(ptr noundef %151, ptr noundef nonnull align 8 dereferenceable(44) %15)
          to label %154 unwind label %169

154:                                              ; preds = %152
  br label %155

155:                                              ; preds = %154
  %156 = invoke noundef ptr @_ZN4ardb10ArdbLogger13GetLogCheckerEv()
          to label %157 unwind label %169

157:                                              ; preds = %155
  %158 = invoke noundef zeroext i1 %156(i32 noundef 2)
          to label %159 unwind label %169

159:                                              ; preds = %157
  br i1 %158, label %160, label %173

160:                                              ; preds = %159
  %161 = invoke noundef ptr @_ZN4ardb10ArdbLogger13GetLogHandlerEv()
          to label %162 unwind label %169

162:                                              ; preds = %160
  %163 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %10) #6
  invoke void (i32, ptr, ptr, i32, ptr, ...) %161(i32 noundef 2, ptr noundef @.str.6, ptr noundef @__FUNCTION__._ZN4ardb5codec23FastRedisCommandDecoder15MessageReceivedERNS_21ChannelHandlerContextERNS_12MessageEventINS_6BufferEEE, i32 noundef 234, ptr noundef @.str.7, ptr noundef %163)
          to label %164 unwind label %169

164:                                              ; preds = %162
  br label %173

165:                                              ; preds = %148
  %166 = landingpad { ptr, i32 }
          cleanup
  %167 = extractvalue { ptr, i32 } %166, 0
  store ptr %167, ptr %12, align 8
  %168 = extractvalue { ptr, i32 } %166, 1
  store i32 %168, ptr %13, align 4
  br label %176

169:                                              ; preds = %162, %160, %157, %155, %152, %149
  %170 = landingpad { ptr, i32 }
          cleanup
  %171 = extractvalue { ptr, i32 } %170, 0
  store ptr %171, ptr %12, align 8
  %172 = extractvalue { ptr, i32 } %170, 1
  store i32 %172, ptr %13, align 4
  call void @_ZN4ardb9ExceptionD2Ev(ptr noundef nonnull align 8 dereferenceable(44) %15) #6
  br label %176

173:                                              ; preds = %164, %159
  br label %174

174:                                              ; preds = %173
  br label %175

175:                                              ; preds = %174
  call void @_ZN4ardb9ExceptionD2Ev(ptr noundef nonnull align 8 dereferenceable(44) %15) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %15) #6
  br label %177

176:                                              ; preds = %169, %165
  call void @llvm.lifetime.end.p0(i64 48, ptr %15) #6
  br label %179

177:                                              ; preds = %175, %146
  br label %55, !llvm.loop !35

178:                                              ; preds = %140, %104, %64
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  ret void

179:                                              ; preds = %176, %136, %80
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  br label %180

180:                                              ; preds = %179
  %181 = load ptr, ptr %12, align 8
  %182 = load i32, ptr %13, align 4
  %183 = insertvalue { ptr, i32 } poison, ptr %181, 0
  %184 = insertvalue { ptr, i32 } %183, i32 %182, 1
  resume { ptr, i32 } %184
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN4ardb21fire_message_receivedINS_5codec17RedisCommandFrameEEEbRNS_21ChannelHandlerContextEPT_PNS_4TypeIS5_E10DestructorE(ptr noundef nonnull align 8 dereferenceable(66), ptr noundef, ptr noundef) #3

declare noundef ptr @_ZN4ardb21ChannelHandlerContext10GetChannelEv(ptr noundef nonnull align 8 dereferenceable(66)) #4

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

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN4ardb7Channel13IsReadBlockedEv(ptr noundef nonnull align 8 dereferenceable(256)) #5 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN4ardb6Buffer19WrapReadableContentEPKvm(ptr noundef nonnull align 8 dereferenceable(33), ptr noundef, i64 noundef) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32)) #5 align 2

declare void @_ZN4ardb12APIExceptionC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(44), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #4

declare noundef zeroext i1 @_ZN4ardb21fire_exception_caughtEPNS_7ChannelERKNS_12APIExceptionE(ptr noundef, ptr noundef nonnull align 8 dereferenceable(44)) #4

declare noundef ptr @_ZN4ardb10ArdbLogger13GetLogCheckerEv() #4

declare noundef ptr @_ZN4ardb10ArdbLogger13GetLogHandlerEv() #4

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32)) #5 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4ardb9ExceptionD2Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #5 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 = { 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 #4 = { "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 }

!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 = !{!"bool", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = !{!15, !10, i64 8}
!15 = !{!"_ZTSN4ardb5codec23FastRedisCommandDecoderE", !16, i64 0, !10, i64 8, !19, i64 12, !19, i64 16, !20, i64 24, !21, i64 32, !19, i64 192}
!16 = !{!"_ZTSN4ardb22ChannelUpstreamHandlerINS_6BufferEEE", !17, i64 0}
!17 = !{!"_ZTSN4ardb22AbstractChannelHandlerINS_6BufferEEE", !18, i64 0}
!18 = !{!"_ZTSN4ardb14ChannelHandlerE"}
!19 = !{!"int", !7, i64 0}
!20 = !{!"long", !7, i64 0}
!21 = !{!"_ZTSN4ardb5codec17RedisCommandFrameE", !22, i64 0, !10, i64 4, !10, i64 5, !23, i64 8, !25, i64 40, !30, i64 120}
!22 = !{!"_ZTSN4ardb5codec16RedisCommandTypeE", !7, i64 0}
!23 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !24, i64 0, !20, i64 8, !7, i64 16}
!24 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!25 = !{!"_ZTSSt5dequeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !26, i64 0}
!26 = !{!"_ZTSSt11_Deque_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !27, i64 0}
!27 = !{!"_ZTSNSt11_Deque_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE11_Deque_implE", !28, i64 0}
!28 = !{!"_ZTSNSt11_Deque_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE16_Deque_impl_dataE", !6, i64 0, !20, i64 8, !29, i64 16, !29, i64 48}
!29 = !{!"_ZTSSt15_Deque_iteratorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERS5_PS5_E", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!30 = !{!"_ZTSN4ardb6BufferE", !6, i64 0, !20, i64 8, !20, i64 16, !20, i64 24, !10, i64 32}
!31 = !{i8 0, i8 2}
!32 = !{}
!33 = !{!20, !20, i64 0}
!34 = !{!15, !19, i64 12}
!35 = distinct !{!35, !13}


; 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.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.ardb::APIException" = type <{ %"class.ardb::Exception", i32, [4 x i8] }>
%"class.ardb::Exception" = type { %"class.std::exception", %"class.std::__cxx11::basic_string" }
%"class.std::exception" = type { ptr }

@.str.5 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [96 x i8], align 1
@__FUNCTION__._ZN4ardb5codec23FastRedisCommandDecoder15MessageReceivedERNS_21ChannelHandlerContextERNS_12MessageEventINS_6BufferEEE = external hidden unnamed_addr constant [16 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [22 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN4ardb5codec23FastRedisCommandDecoder22ProcessMultibulkBufferERNS_6BufferERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(196), ptr noundef nonnull align 8 dereferenceable(33), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #0 align 2

; 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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK4ardb6Buffer16GetRawReadBufferEv(ptr noundef nonnull align 8 dereferenceable(33)) local_unnamed_addr #2 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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4ardb6Buffer16AdvanceReadIndexEi(ptr noundef nonnull align 8 dereferenceable(33), i32 noundef) local_unnamed_addr #2 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
define dso_local void @_ZN4ardb5codec23FastRedisCommandDecoder15MessageReceivedERNS_21ChannelHandlerContextERNS_12MessageEventINS_6BufferEEE(ptr noundef nonnull align 8 dereferenceable(196) %0, ptr noundef nonnull align 8 dereferenceable(66) %1, ptr noundef nonnull align 8 dereferenceable(40) %2) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
.peel.begin:
  %3 = alloca %"class.std::__cxx11::basic_string", align 8
  %4 = alloca %"class.ardb::APIException", align 8
  %5 = tail call noundef ptr @_ZN4ardb12MessageEventINS_6BufferEE10GetMessageEv(ptr noundef nonnull align 8 dereferenceable(40) %2)
  %6 = tail call noundef ptr @_ZNK4ardb6Buffer16GetRawReadBufferEv(ptr noundef nonnull align 8 dereferenceable(33) %5)
  %7 = load i8, ptr %6, align 1, !tbaa !5
  %8 = icmp eq i8 %7, 13
  br i1 %8, label %.critedge.peel.preheader, label %9

9:                                                ; preds = %.peel.begin
  %10 = tail call noundef ptr @_ZNK4ardb6Buffer16GetRawReadBufferEv(ptr noundef nonnull align 8 dereferenceable(33) %5)
  %11 = load i8, ptr %10, align 1, !tbaa !5
  %12 = icmp eq i8 %11, 10
  br i1 %12, label %.critedge.peel.preheader, label %.loopexit.thread

.critedge.peel.preheader:                         ; preds = %9, %.peel.begin
  br label %.critedge.peel

.critedge.peel:                                   ; preds = %.critedge.peel.backedge, %.critedge.peel.preheader
  tail call void @_ZN4ardb6Buffer16AdvanceReadIndexEi(ptr noundef nonnull align 8 dereferenceable(33) %5, i32 noundef 1)
  %13 = tail call noundef ptr @_ZNK4ardb6Buffer16GetRawReadBufferEv(ptr noundef nonnull align 8 dereferenceable(33) %5)
  %14 = load i8, ptr %13, align 1, !tbaa !5
  %15 = icmp eq i8 %14, 13
  br i1 %15, label %.critedge.peel.backedge, label %16

.critedge.peel.backedge:                          ; preds = %.critedge.peel, %16
  br label %.critedge.peel, !llvm.loop !8

16:                                               ; preds = %.critedge.peel
  %17 = tail call noundef ptr @_ZNK4ardb6Buffer16GetRawReadBufferEv(ptr noundef nonnull align 8 dereferenceable(33) %5)
  %18 = load i8, ptr %17, align 1, !tbaa !5
  %19 = icmp eq i8 %18, 10
  br i1 %19, label %.critedge.peel.backedge, label %.loopexit

.loopexit:                                        ; preds = %16
  %20 = getelementptr inbounds i8, ptr %0, i64 8
  %21 = load i8, ptr %20, align 8, !tbaa !11, !range !30, !noundef !31
  %22 = trunc nuw i8 %21 to i1
  br i1 %22, label %.loopexit.thread, label %23

23:                                               ; preds = %.loopexit
  %24 = getelementptr inbounds i8, ptr %0, i64 32
  tail call void @_ZN4ardb5codec17RedisCommandFrame5ClearEv(ptr noundef nonnull align 8 dereferenceable(160) %24)
  %25 = tail call noundef zeroext i1 @_ZN4ardb21fire_message_receivedINS_5codec17RedisCommandFrameEEEbRNS_21ChannelHandlerContextEPT_PNS_4TypeIS5_E10DestructorE(ptr noundef nonnull align 8 dereferenceable(66) %1, ptr noundef nonnull %24, ptr noundef null)
  br label %.loopexit.thread

.loopexit.thread:                                 ; preds = %9, %.loopexit, %23
  %26 = tail call noundef ptr @_ZN4ardb21ChannelHandlerContext10GetChannelEv(ptr noundef nonnull align 8 dereferenceable(66) %1)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #6
  %27 = call noundef i64 @_ZNK4ardb6Buffer12GetReadIndexEv(ptr noundef nonnull align 8 dereferenceable(33) %5)
  %28 = call noundef zeroext i1 @_ZNK4ardb6Buffer8ReadableEv(ptr noundef nonnull align 8 dereferenceable(33) %5)
  br i1 %28, label %.lr.ph, label %.critedge2

.lr.ph:                                           ; preds = %.loopexit.thread
  %29 = getelementptr inbounds i8, ptr %0, i64 12
  %30 = getelementptr inbounds i8, ptr %0, i64 32
  %31 = getelementptr inbounds i8, ptr %0, i64 152
  br label %32

32:                                               ; preds = %.lr.ph, %87
  %33 = call noundef zeroext i1 @_ZN4ardb7Channel13IsReadBlockedEv(ptr noundef nonnull align 8 dereferenceable(256) %26)
  br i1 %33, label %.critedge2, label %34

34:                                               ; preds = %32
  %35 = load i32, ptr %29, align 4, !tbaa !32
  switch i32 %35, label %63 [
    i32 0, label %36
    i32 1, label %42
    i32 2, label %49
  ]

36:                                               ; preds = %34
  %37 = call noundef ptr @_ZNK4ardb6Buffer16GetRawReadBufferEv(ptr noundef nonnull align 8 dereferenceable(33) %5)
  %38 = load i8, ptr %37, align 1, !tbaa !5
  %39 = icmp eq i8 %38, 42
  br i1 %39, label %.thread31, label %.thread

.thread31:                                        ; preds = %36
  store i32 2, ptr %29, align 4, !tbaa !32
  br label %49

40:                                               ; preds = %63, %49, %47, %43, %42
  %41 = landingpad { ptr, i32 }
          cleanup
  br label %89

.thread:                                          ; preds = %36
  store i32 1, ptr %29, align 4, !tbaa !32
  br label %42

42:                                               ; preds = %34, %.thread
  invoke void @_ZN4ardb5codec17RedisCommandFrame5ClearEv(ptr noundef nonnull align 8 dereferenceable(160) %30)
          to label %43 unwind label %40

43:                                               ; preds = %42
  %44 = invoke noundef i32 @_ZN4ardb5codec19RedisCommandDecoder19ProcessInlineBufferERNS_6BufferERNS0_17RedisCommandFrameE(ptr noundef nonnull align 8 dereferenceable(33) %5, ptr noundef nonnull align 8 dereferenceable(160) %30)
          to label %45 unwind label %40

45:                                               ; preds = %43
  %46 = icmp eq i32 %44, 1
  br i1 %46, label %47, label %.critedge2

47:                                               ; preds = %45
  %48 = invoke noundef zeroext i1 @_ZN4ardb21fire_message_receivedINS_5codec17RedisCommandFrameEEEbRNS_21ChannelHandlerContextEPT_PNS_4TypeIS5_E10DestructorE(ptr noundef nonnull align 8 dereferenceable(66) %1, ptr noundef nonnull %30, ptr noundef null)
          to label %65 unwind label %40

49:                                               ; preds = %34, %.thread31
  %50 = invoke noundef i32 @_ZN4ardb5codec23FastRedisCommandDecoder22ProcessMultibulkBufferERNS_6BufferERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(196) %0, ptr noundef nonnull align 8 dereferenceable(33) %5, ptr noundef nonnull align 8 dereferenceable(32) %3)
          to label %51 unwind label %40

51:                                               ; preds = %49
  %52 = icmp eq i32 %50, 1
  br i1 %52, label %53, label %.critedge2

53:                                               ; preds = %51
  %54 = call noundef i64 @_ZNK4ardb6Buffer12GetReadIndexEv(ptr noundef nonnull align 8 dereferenceable(33) %5)
  %55 = sub i64 %54, %27
  %56 = call noundef ptr @_ZNK4ardb6Buffer16GetRawReadBufferEv(ptr noundef nonnull align 8 dereferenceable(33) %5)
  %57 = sub i64 0, %55
  %58 = getelementptr inbounds i8, ptr %56, i64 %57
  %59 = call noundef zeroext i1 @_ZN4ardb6Buffer19WrapReadableContentEPKvm(ptr noundef nonnull align 8 dereferenceable(33) %31, ptr noundef %58, i64 noundef %55)
  %60 = invoke noundef zeroext i1 @_ZN4ardb21fire_message_receivedINS_5codec17RedisCommandFrameEEEbRNS_21ChannelHandlerContextEPT_PNS_4TypeIS5_E10DestructorE(ptr noundef nonnull align 8 dereferenceable(66) %1, ptr noundef nonnull %30, ptr noundef null)
          to label %65 unwind label %61

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

63:                                               ; preds = %34
  %64 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull @.str.5)
          to label %65 unwind label %40

65:                                               ; preds = %53, %63, %47
  %66 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %3) #6
  br i1 %66, label %87, label %67

67:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %4) #6
  invoke void @_ZN4ardb12APIExceptionC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(44) %4, ptr noundef nonnull align 8 dereferenceable(32) %3)
          to label %68 unwind label %81

68:                                               ; preds = %67
  %69 = invoke noundef ptr @_ZN4ardb21ChannelHandlerContext10GetChannelEv(ptr noundef nonnull align 8 dereferenceable(66) %1)
          to label %70 unwind label %83

70:                                               ; preds = %68
  %71 = invoke noundef zeroext i1 @_ZN4ardb21fire_exception_caughtEPNS_7ChannelERKNS_12APIExceptionE(ptr noundef %69, ptr noundef nonnull align 8 dereferenceable(44) %4)
          to label %72 unwind label %83

72:                                               ; preds = %70
  %73 = invoke noundef ptr @_ZN4ardb10ArdbLogger13GetLogCheckerEv()
          to label %74 unwind label %83

74:                                               ; preds = %72
  %75 = invoke noundef zeroext i1 %73(i32 noundef 2)
          to label %76 unwind label %83

76:                                               ; preds = %74
  br i1 %75, label %77, label %85

77:                                               ; preds = %76
  %78 = invoke noundef ptr @_ZN4ardb10ArdbLogger13GetLogHandlerEv()
          to label %79 unwind label %83

79:                                               ; preds = %77
  %80 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %3) #6
  invoke void (i32, ptr, ptr, i32, ptr, ...) %78(i32 noundef 2, ptr noundef nonnull @.str.6, ptr noundef nonnull @__FUNCTION__._ZN4ardb5codec23FastRedisCommandDecoder15MessageReceivedERNS_21ChannelHandlerContextERNS_12MessageEventINS_6BufferEEE, i32 noundef 234, ptr noundef nonnull @.str.7, ptr noundef %80)
          to label %85 unwind label %83

81:                                               ; preds = %67
  %82 = landingpad { ptr, i32 }
          cleanup
  br label %86

83:                                               ; preds = %79, %77, %74, %72, %70, %68
  %84 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN4ardb9ExceptionD2Ev(ptr noundef nonnull align 8 dereferenceable(44) %4) #6
  br label %86

85:                                               ; preds = %79, %76
  call void @_ZN4ardb9ExceptionD2Ev(ptr noundef nonnull align 8 dereferenceable(44) %4) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %4) #6
  br label %87

86:                                               ; preds = %83, %81
  %.pn = phi { ptr, i32 } [ %84, %83 ], [ %82, %81 ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %4) #6
  br label %89

87:                                               ; preds = %85, %65
  %88 = call noundef zeroext i1 @_ZNK4ardb6Buffer8ReadableEv(ptr noundef nonnull align 8 dereferenceable(33) %5)
  br i1 %88, label %32, label %.critedge2, !llvm.loop !33

.critedge2:                                       ; preds = %32, %45, %51, %87, %.loopexit.thread
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #6
  ret void

89:                                               ; preds = %86, %61, %40
  %.pn.pn = phi { ptr, i32 } [ %.pn, %86 ], [ %41, %40 ], [ %62, %61 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #6
  resume { ptr, i32 } %.pn.pn
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN4ardb21fire_message_receivedINS_5codec17RedisCommandFrameEEEbRNS_21ChannelHandlerContextEPT_PNS_4TypeIS5_E10DestructorE(ptr noundef nonnull align 8 dereferenceable(66), ptr noundef, ptr noundef) local_unnamed_addr #3

declare noundef ptr @_ZN4ardb21ChannelHandlerContext10GetChannelEv(ptr noundef nonnull align 8 dereferenceable(66)) local_unnamed_addr #4

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

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN4ardb7Channel13IsReadBlockedEv(ptr noundef nonnull align 8 dereferenceable(256)) local_unnamed_addr #5 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN4ardb6Buffer19WrapReadableContentEPKvm(ptr noundef nonnull align 8 dereferenceable(33), ptr noundef, i64 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #5 align 2

declare void @_ZN4ardb12APIExceptionC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(44), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #4

declare noundef zeroext i1 @_ZN4ardb21fire_exception_caughtEPNS_7ChannelERKNS_12APIExceptionE(ptr noundef, ptr noundef nonnull align 8 dereferenceable(44)) local_unnamed_addr #4

declare noundef ptr @_ZN4ardb10ArdbLogger13GetLogCheckerEv() local_unnamed_addr #4

declare noundef ptr @_ZN4ardb10ArdbLogger13GetLogHandlerEv() local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #5 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4ardb9ExceptionD2Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #5 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 = { 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 #4 = { "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 }

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


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