; 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::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] }>

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4ardb5codec17RedisCommandFrame5ClearEv(ptr noundef nonnull align 8 dereferenceable(160)) #1 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: 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) #0

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

; 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 uwtable
declare dso_local noundef i32 @_ZN4ardb5codec19RedisCommandDecoder19ProcessInlineBufferERNS_6BufferERNS0_17RedisCommandFrameE(ptr noundef nonnull align 8 dereferenceable(33), ptr noundef nonnull align 8 dereferenceable(160)) #1 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: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN4ardb6Buffer8ReadByteERc(ptr noundef nonnull align 8 dereferenceable(33), ptr noundef nonnull align 1 dereferenceable(1)) #3 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN4ardb5codec19RedisCommandDecoder6DecodeEPNS_7ChannelERNS_6BufferERNS0_17RedisCommandFrameE(ptr noundef %0, ptr noundef nonnull align 8 dereferenceable(33) %1, ptr noundef nonnull align 8 dereferenceable(160) %2) #1 align 2 {
  %4 = alloca i1, align 1
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca i8, align 1
  %10 = alloca i32, align 4
  %11 = alloca i64, align 8
  %12 = alloca i32, align 4
  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
  br label %13

13:                                               ; preds = %34, %3
  %14 = load ptr, ptr %6, align 8, !tbaa !5
  %15 = call noundef zeroext i1 @_ZNK4ardb6Buffer8ReadableEv(ptr noundef nonnull align 8 dereferenceable(33) %14)
  br i1 %15, label %16, label %32

16:                                               ; preds = %13
  %17 = load ptr, ptr %6, align 8, !tbaa !5
  %18 = call noundef ptr @_ZNK4ardb6Buffer16GetRawReadBufferEv(ptr noundef nonnull align 8 dereferenceable(33) %17)
  %19 = getelementptr inbounds i8, ptr %18, i64 0
  %20 = load i8, ptr %19, align 1, !tbaa !9
  %21 = sext i8 %20 to i32
  %22 = icmp eq i32 %21, 13
  br i1 %22, label %30, label %23

23:                                               ; preds = %16
  %24 = load ptr, ptr %6, align 8, !tbaa !5
  %25 = call noundef ptr @_ZNK4ardb6Buffer16GetRawReadBufferEv(ptr noundef nonnull align 8 dereferenceable(33) %24)
  %26 = getelementptr inbounds i8, ptr %25, i64 0
  %27 = load i8, ptr %26, align 1, !tbaa !9
  %28 = sext i8 %27 to i32
  %29 = icmp eq i32 %28, 10
  br label %30

30:                                               ; preds = %23, %16
  %31 = phi i1 [ true, %16 ], [ %29, %23 ]
  br label %32

32:                                               ; preds = %30, %13
  %33 = phi i1 [ false, %13 ], [ %31, %30 ]
  br i1 %33, label %34, label %36

34:                                               ; preds = %32
  %35 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN4ardb6Buffer16AdvanceReadIndexEi(ptr noundef nonnull align 8 dereferenceable(33) %35, i32 noundef 1)
  br label %13, !llvm.loop !10

36:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %37 = load ptr, ptr %6, align 8, !tbaa !5
  %38 = call noundef i64 @_ZNK4ardb6Buffer12GetReadIndexEv(ptr noundef nonnull align 8 dereferenceable(33) %37)
  store i64 %38, ptr %8, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #4
  %39 = load ptr, ptr %6, align 8, !tbaa !5
  %40 = call noundef zeroext i1 @_ZN4ardb6Buffer8ReadByteERc(ptr noundef nonnull align 8 dereferenceable(33) %39, ptr noundef nonnull align 1 dereferenceable(1) %9)
  br i1 %40, label %41, label %85

41:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store i32 -1, ptr %10, align 4, !tbaa !14
  %42 = load i8, ptr %9, align 1, !tbaa !9
  %43 = sext i8 %42 to i32
  %44 = icmp eq i32 %43, 42
  br i1 %44, label %45, label %52

45:                                               ; preds = %41
  %46 = load ptr, ptr %7, align 8, !tbaa !5
  %47 = getelementptr inbounds %"class.ardb::codec::RedisCommandFrame", ptr %46, i32 0, i32 1
  store i8 0, ptr %47, align 4, !tbaa !16
  %48 = load ptr, ptr %5, align 8, !tbaa !5
  %49 = load ptr, ptr %6, align 8, !tbaa !5
  %50 = load ptr, ptr %7, align 8, !tbaa !5
  %51 = call noundef i32 @_ZN4ardb5codec19RedisCommandDecoder22ProcessMultibulkBufferEPNS_7ChannelERNS_6BufferERNS0_17RedisCommandFrameE(ptr noundef %48, ptr noundef nonnull align 8 dereferenceable(33) %49, ptr noundef nonnull align 8 dereferenceable(160) %50)
  store i32 %51, ptr %10, align 4, !tbaa !14
  br label %59

52:                                               ; preds = %41
  %53 = load ptr, ptr %7, align 8, !tbaa !5
  %54 = getelementptr inbounds %"class.ardb::codec::RedisCommandFrame", ptr %53, i32 0, i32 1
  store i8 1, ptr %54, align 4, !tbaa !16
  %55 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN4ardb6Buffer16AdvanceReadIndexEi(ptr noundef nonnull align 8 dereferenceable(33) %55, i32 noundef -1)
  %56 = load ptr, ptr %6, align 8, !tbaa !5
  %57 = load ptr, ptr %7, align 8, !tbaa !5
  %58 = call noundef i32 @_ZN4ardb5codec19RedisCommandDecoder19ProcessInlineBufferERNS_6BufferERNS0_17RedisCommandFrameE(ptr noundef nonnull align 8 dereferenceable(33) %56, ptr noundef nonnull align 8 dereferenceable(160) %57)
  store i32 %58, ptr %10, align 4, !tbaa !14
  br label %59

59:                                               ; preds = %52, %45
  %60 = load i32, ptr %10, align 4, !tbaa !14
  %61 = icmp sgt i32 %60, 0
  br i1 %61, label %62, label %76

62:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  %63 = load ptr, ptr %6, align 8, !tbaa !5
  %64 = call noundef i64 @_ZNK4ardb6Buffer12GetReadIndexEv(ptr noundef nonnull align 8 dereferenceable(33) %63)
  %65 = load i64, ptr %8, align 8, !tbaa !12
  %66 = sub i64 %64, %65
  store i64 %66, ptr %11, align 8, !tbaa !12
  %67 = load ptr, ptr %7, align 8, !tbaa !5
  %68 = getelementptr inbounds %"class.ardb::codec::RedisCommandFrame", ptr %67, i32 0, i32 5
  %69 = load ptr, ptr %6, align 8, !tbaa !5
  %70 = call noundef ptr @_ZNK4ardb6Buffer16GetRawReadBufferEv(ptr noundef nonnull align 8 dereferenceable(33) %69)
  %71 = load i64, ptr %11, align 8, !tbaa !12
  %72 = sub i64 0, %71
  %73 = getelementptr inbounds i8, ptr %70, i64 %72
  %74 = load i64, ptr %11, align 8, !tbaa !12
  %75 = call noundef zeroext i1 @_ZN4ardb6Buffer19WrapReadableContentEPKvm(ptr noundef nonnull align 8 dereferenceable(33) %68, ptr noundef %73, i64 noundef %74)
  store i1 true, ptr %4, align 1
  store i32 1, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  br label %84

76:                                               ; preds = %59
  %77 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZN4ardb5codec17RedisCommandFrame5ClearEv(ptr noundef nonnull align 8 dereferenceable(160) %77)
  %78 = load i32, ptr %10, align 4, !tbaa !14
  %79 = icmp eq i32 0, %78
  br i1 %79, label %80, label %83

80:                                               ; preds = %76
  %81 = load ptr, ptr %6, align 8, !tbaa !5
  %82 = load i64, ptr %8, align 8, !tbaa !12
  call void @_ZN4ardb6Buffer12SetReadIndexEm(ptr noundef nonnull align 8 dereferenceable(33) %81, i64 noundef %82)
  br label %83

83:                                               ; preds = %80, %76
  store i1 false, ptr %4, align 1
  store i32 1, ptr %12, align 4
  br label %84

84:                                               ; preds = %83, %62
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  br label %88

85:                                               ; preds = %36
  %86 = load ptr, ptr %6, align 8, !tbaa !5
  %87 = load i64, ptr %8, align 8, !tbaa !12
  call void @_ZN4ardb6Buffer12SetReadIndexEm(ptr noundef nonnull align 8 dereferenceable(33) %86, i64 noundef %87)
  store i1 false, ptr %4, align 1
  store i32 1, ptr %12, align 4
  br label %88

88:                                               ; preds = %85, %84
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  %89 = load i1, ptr %4, align 1
  ret i1 %89
}

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = !{!13, !13, i64 0}
!13 = !{!"long", !7, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"int", !7, i64 0}
!16 = !{!17, !19, i64 4}
!17 = !{!"_ZTSN4ardb5codec17RedisCommandFrameE", !18, i64 0, !19, i64 4, !19, i64 5, !20, i64 8, !22, i64 40, !27, i64 120}
!18 = !{!"_ZTSN4ardb5codec16RedisCommandTypeE", !7, i64 0}
!19 = !{!"bool", !7, i64 0}
!20 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !21, i64 0, !13, i64 8, !7, i64 16}
!21 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!22 = !{!"_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, !13, 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, !13, i64 8, !13, i64 16, !13, i64 24, !19, i64 32}


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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4ardb5codec17RedisCommandFrame5ClearEv(ptr noundef nonnull align 8 dereferenceable(160)) local_unnamed_addr #1 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: 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) #0

; 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

; 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 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 #1 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: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN4ardb6Buffer8ReadByteERc(ptr noundef nonnull align 8 dereferenceable(33), ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #3 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN4ardb5codec19RedisCommandDecoder6DecodeEPNS_7ChannelERNS_6BufferERNS0_17RedisCommandFrameE(ptr noundef %0, ptr noundef nonnull align 8 dereferenceable(33) %1, ptr noundef nonnull align 8 dereferenceable(160) %2) local_unnamed_addr #1 align 2 {
  %4 = alloca i8, align 1
  %5 = tail call noundef zeroext i1 @_ZNK4ardb6Buffer8ReadableEv(ptr noundef nonnull align 8 dereferenceable(33) %1)
  br i1 %5, label %.lr.ph, label %.critedge

.lr.ph:                                           ; preds = %3, %.critedge2
  %6 = tail call noundef ptr @_ZNK4ardb6Buffer16GetRawReadBufferEv(ptr noundef nonnull align 8 dereferenceable(33) %1)
  %7 = load i8, ptr %6, align 1, !tbaa !5
  %8 = icmp eq i8 %7, 13
  br i1 %8, label %.critedge2, label %9

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

.critedge2:                                       ; preds = %.lr.ph, %9
  tail call void @_ZN4ardb6Buffer16AdvanceReadIndexEi(ptr noundef nonnull align 8 dereferenceable(33) %1, i32 noundef 1)
  %13 = tail call noundef zeroext i1 @_ZNK4ardb6Buffer8ReadableEv(ptr noundef nonnull align 8 dereferenceable(33) %1)
  br i1 %13, label %.lr.ph, label %.critedge, !llvm.loop !8

.critedge:                                        ; preds = %9, %.critedge2, %3
  %14 = tail call noundef i64 @_ZNK4ardb6Buffer12GetReadIndexEv(ptr noundef nonnull align 8 dereferenceable(33) %1)
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #4
  %15 = call noundef zeroext i1 @_ZN4ardb6Buffer8ReadByteERc(ptr noundef nonnull align 8 dereferenceable(33) %1, ptr noundef nonnull align 1 dereferenceable(1) %4)
  br i1 %15, label %16, label %37

16:                                               ; preds = %.critedge
  %17 = load i8, ptr %4, align 1, !tbaa !5
  %18 = icmp eq i8 %17, 42
  %19 = getelementptr inbounds i8, ptr %2, i64 4
  br i1 %18, label %20, label %22

20:                                               ; preds = %16
  store i8 0, ptr %19, align 4, !tbaa !10
  %21 = call noundef i32 @_ZN4ardb5codec19RedisCommandDecoder22ProcessMultibulkBufferEPNS_7ChannelERNS_6BufferERNS0_17RedisCommandFrameE(ptr noundef %0, ptr noundef nonnull align 8 dereferenceable(33) %1, ptr noundef nonnull align 8 dereferenceable(160) %2)
  br label %24

22:                                               ; preds = %16
  store i8 1, ptr %19, align 4, !tbaa !10
  call void @_ZN4ardb6Buffer16AdvanceReadIndexEi(ptr noundef nonnull align 8 dereferenceable(33) %1, i32 noundef -1)
  %23 = call noundef i32 @_ZN4ardb5codec19RedisCommandDecoder19ProcessInlineBufferERNS_6BufferERNS0_17RedisCommandFrameE(ptr noundef nonnull align 8 dereferenceable(33) %1, ptr noundef nonnull align 8 dereferenceable(160) %2)
  br label %24

24:                                               ; preds = %22, %20
  %.029 = phi i32 [ %21, %20 ], [ %23, %22 ]
  %25 = icmp sgt i32 %.029, 0
  br i1 %25, label %26, label %34

26:                                               ; preds = %24
  %27 = call noundef i64 @_ZNK4ardb6Buffer12GetReadIndexEv(ptr noundef nonnull align 8 dereferenceable(33) %1)
  %28 = sub i64 %27, %14
  %29 = getelementptr inbounds i8, ptr %2, i64 120
  %30 = call noundef ptr @_ZNK4ardb6Buffer16GetRawReadBufferEv(ptr noundef nonnull align 8 dereferenceable(33) %1)
  %31 = sub i64 0, %28
  %32 = getelementptr inbounds i8, ptr %30, i64 %31
  %33 = call noundef zeroext i1 @_ZN4ardb6Buffer19WrapReadableContentEPKvm(ptr noundef nonnull align 8 dereferenceable(33) %29, ptr noundef %32, i64 noundef %28)
  br label %38

34:                                               ; preds = %24
  call void @_ZN4ardb5codec17RedisCommandFrame5ClearEv(ptr noundef nonnull align 8 dereferenceable(160) %2)
  %35 = icmp eq i32 %.029, 0
  br i1 %35, label %36, label %38

36:                                               ; preds = %34
  call void @_ZN4ardb6Buffer12SetReadIndexEm(ptr noundef nonnull align 8 dereferenceable(33) %1, i64 noundef %14)
  br label %38

37:                                               ; preds = %.critedge
  call void @_ZN4ardb6Buffer12SetReadIndexEm(ptr noundef nonnull align 8 dereferenceable(33) %1, i64 noundef %14)
  br label %38

38:                                               ; preds = %26, %36, %34, %37
  %.1 = phi i1 [ false, %37 ], [ false, %34 ], [ false, %36 ], [ true, %26 ]
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #4
  ret i1 %.1
}

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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}
!9 = !{!"llvm.loop.mustprogress"}
!10 = !{!11, !13, i64 4}
!11 = !{!"_ZTSN4ardb5codec17RedisCommandFrameE", !12, i64 0, !13, i64 4, !13, i64 5, !14, i64 8, !18, i64 40, !23, i64 120}
!12 = !{!"_ZTSN4ardb5codec16RedisCommandTypeE", !6, i64 0}
!13 = !{!"bool", !6, i64 0}
!14 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !15, i64 0, !17, i64 8, !6, i64 16}
!15 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !16, i64 0}
!16 = !{!"any pointer", !6, i64 0}
!17 = !{!"long", !6, i64 0}
!18 = !{!"_ZTSSt5dequeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !19, i64 0}
!19 = !{!"_ZTSSt11_Deque_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !20, i64 0}
!20 = !{!"_ZTSNSt11_Deque_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE11_Deque_implE", !21, i64 0}
!21 = !{!"_ZTSNSt11_Deque_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE16_Deque_impl_dataE", !16, i64 0, !17, i64 8, !22, i64 16, !22, i64 48}
!22 = !{!"_ZTSSt15_Deque_iteratorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERS5_PS5_E", !16, i64 0, !16, i64 8, !16, i64 16, !16, i64 24}
!23 = !{!"_ZTSN4ardb6BufferE", !16, i64 0, !17, i64 8, !17, i64 16, !17, i64 24, !13, i64 32}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass