; LLVM IR from yinqiwen/ardb :: src/common/coro (coro_channel)

; 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.std::allocator.0" = type { i8 }
%"class.ardb::CoroRedisClient" = type { %"class.ardb::CoroChannel", %"class.ardb::ChannelUpstreamHandler.33", i64, %"class.std::vector.35", %"class.ardb::codec::RedisReplyDecoder", %"class.ardb::codec::RedisCommandEncoder", %"struct.ardb::codec::RedisReply" }
%"class.ardb::CoroChannel" = type { %"class.ardb::ChannelUpstreamHandler", %"class.ardb::Runnable", ptr, ptr, ptr, ptr, i8, ptr, i8, i32 }
%"class.ardb::ChannelUpstreamHandler" = type { %"class.ardb::AbstractChannelHandler" }
%"class.ardb::AbstractChannelHandler" = type { %"class.ardb::ChannelHandler" }
%"class.ardb::ChannelHandler" = type { ptr }
%"class.ardb::Runnable" = type { ptr }
%"class.ardb::ChannelUpstreamHandler.33" = type { %"class.ardb::AbstractChannelHandler.34" }
%"class.ardb::AbstractChannelHandler.34" = type { %"class.ardb::ChannelHandler" }
%"class.std::vector.35" = type { %"struct.std::_Vector_base.36" }
%"struct.std::_Vector_base.36" = type { %"struct.std::_Vector_base<ardb::codec::RedisReply *, std::allocator<ardb::codec::RedisReply *>>::_Vector_impl" }
%"struct.std::_Vector_base<ardb::codec::RedisReply *, std::allocator<ardb::codec::RedisReply *>>::_Vector_impl" = type { %"struct.std::_Vector_base<ardb::codec::RedisReply *, std::allocator<ardb::codec::RedisReply *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<ardb::codec::RedisReply *, std::allocator<ardb::codec::RedisReply *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.ardb::codec::RedisReplyDecoder" = type { %"class.ardb::codec::StackFrameDecoder" }
%"class.ardb::codec::StackFrameDecoder" = type { %"class.ardb::ChannelUpstreamHandler", %"class.ardb::Buffer" }
%"class.ardb::Buffer" = type <{ ptr, i64, i64, i64, i8, [7 x i8] }>
%"class.ardb::codec::RedisCommandEncoder" = type { %"class.ardb::ChannelDownstreamHandler" }
%"class.ardb::ChannelDownstreamHandler" = type { %"class.ardb::AbstractChannelHandler.40" }
%"class.ardb::AbstractChannelHandler.40" = type { %"class.ardb::ChannelHandler" }
%"struct.ardb::codec::RedisReply" = type { ptr, i32, %"class.std::__cxx11::basic_string", i64, ptr, ptr }

@.str.5 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [16 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 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: mustprogress uwtable
declare dso_local noundef i32 @_ZN4ardb11CoroChannel8WaitCoroEv(ptr noundef nonnull align 8 dereferenceable(72)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN4ardb11CoroChannel9IsTimeoutEv(ptr noundef nonnull align 8 dereferenceable(72)) #1 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN4ardb15CoroRedisClient13SyncMultiCallERSt6vectorINS_5codec17RedisCommandFrameESaIS3_EEi(ptr noundef nonnull align 8 dereferenceable(240) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %2) #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i64, align 8
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  %10 = alloca %"class.std::allocator.0", align 1
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca %"class.std::__cxx11::basic_string", align 8
  %14 = alloca %"class.std::allocator.0", align 1
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store i32 %2, ptr %7, align 4, !tbaa !9
  %15 = load ptr, ptr %5, align 8
  call void @_ZN4ardb15CoroRedisClient5ClearEv(ptr noundef nonnull align 8 dereferenceable(240) %15)
  %16 = load ptr, ptr %6, align 8, !tbaa !5
  %17 = call noundef i64 @_ZNKSt6vectorIN4ardb5codec17RedisCommandFrameESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %16) #3
  %18 = getelementptr inbounds %"class.ardb::CoroRedisClient", ptr %15, i32 0, i32 2
  store i64 %17, ptr %18, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  store i64 0, ptr %8, align 8, !tbaa !35
  br label %19

19:                                               ; preds = %32, %3
  %20 = load i64, ptr %8, align 8, !tbaa !35
  %21 = load ptr, ptr %6, align 8, !tbaa !5
  %22 = call noundef i64 @_ZNKSt6vectorIN4ardb5codec17RedisCommandFrameESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %21) #3
  %23 = icmp ult i64 %20, %22
  br i1 %23, label %25, label %24

24:                                               ; preds = %19
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  br label %35

25:                                               ; preds = %19
  %26 = getelementptr inbounds %"class.ardb::CoroChannel", ptr %15, i32 0, i32 3
  %27 = load ptr, ptr %26, align 8, !tbaa !36
  %28 = load ptr, ptr %6, align 8, !tbaa !5
  %29 = load i64, ptr %8, align 8, !tbaa !35
  %30 = call noundef nonnull align 8 dereferenceable(160) ptr @_ZNSt6vectorIN4ardb5codec17RedisCommandFrameESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %28, i64 noundef %29) #3
  %31 = call noundef zeroext i1 @_ZN4ardb7Channel5WriteINS_5codec17RedisCommandFrameEEEbRT_(ptr noundef nonnull align 8 dereferenceable(256) %27, ptr noundef nonnull align 8 dereferenceable(160) %30)
  br label %32

32:                                               ; preds = %25
  %33 = load i64, ptr %8, align 8, !tbaa !35
  %34 = add i64 %33, 1
  store i64 %34, ptr %8, align 8, !tbaa !35
  br label %19, !llvm.loop !37

35:                                               ; preds = %24
  %36 = load i32, ptr %7, align 4, !tbaa !9
  call void @_ZN4ardb11CoroChannel17CreateTimeoutTaskEi(ptr noundef nonnull align 8 dereferenceable(72) %15, i32 noundef %36)
  %37 = call noundef i32 @_ZN4ardb11CoroChannel8WaitCoroEv(ptr noundef nonnull align 8 dereferenceable(72) %15)
  %38 = icmp ne i32 0, %37
  br i1 %38, label %39, label %40

39:                                               ; preds = %35
  store ptr null, ptr %4, align 8
  br label %76

40:                                               ; preds = %35
  %41 = getelementptr inbounds %"class.ardb::CoroChannel", ptr %15, i32 0, i32 6
  %42 = load i8, ptr %41, align 8, !tbaa !39, !range !40, !noundef !41
  %43 = trunc i8 %42 to i1
  br i1 %43, label %58, label %44

44:                                               ; preds = %40
  %45 = getelementptr inbounds %"class.ardb::CoroRedisClient", ptr %15, i32 0, i32 6
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #3
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #3
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #3
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef @.str.5, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %46 unwind label %49

46:                                               ; preds = %44
  invoke void @_ZN4ardb5codec10RedisReply14SetErrorReasonERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(72) %45, ptr noundef nonnull align 8 dereferenceable(32) %9)
          to label %47 unwind label %53

47:                                               ; preds = %46
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #3
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #3
  call void @_ZN4ardb15CoroRedisClient14FillErrorReplyEv(ptr noundef nonnull align 8 dereferenceable(240) %15)
  %48 = getelementptr inbounds %"class.ardb::CoroRedisClient", ptr %15, i32 0, i32 3
  store ptr %48, ptr %4, align 8
  br label %76

49:                                               ; preds = %44
  %50 = landingpad { ptr, i32 }
          cleanup
  %51 = extractvalue { ptr, i32 } %50, 0
  store ptr %51, ptr %11, align 8
  %52 = extractvalue { ptr, i32 } %50, 1
  store i32 %52, ptr %12, align 4
  br label %57

53:                                               ; preds = %46
  %54 = landingpad { ptr, i32 }
          cleanup
  %55 = extractvalue { ptr, i32 } %54, 0
  store ptr %55, ptr %11, align 8
  %56 = extractvalue { ptr, i32 } %54, 1
  store i32 %56, ptr %12, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #3
  br label %57

57:                                               ; preds = %53, %49
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #3
  br label %78

58:                                               ; preds = %40
  %59 = call noundef zeroext i1 @_ZN4ardb11CoroChannel9IsTimeoutEv(ptr noundef nonnull align 8 dereferenceable(72) %15)
  br i1 %59, label %60, label %74

60:                                               ; preds = %58
  %61 = getelementptr inbounds %"class.ardb::CoroRedisClient", ptr %15, i32 0, i32 6
  call void @llvm.lifetime.start.p0(i64 32, ptr %13) #3
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #3
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #3
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef @.str.6, ptr noundef nonnull align 1 dereferenceable(1) %14)
          to label %62 unwind label %65

62:                                               ; preds = %60
  invoke void @_ZN4ardb5codec10RedisReply14SetErrorReasonERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(72) %61, ptr noundef nonnull align 8 dereferenceable(32) %13)
          to label %63 unwind label %69

63:                                               ; preds = %62
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #3
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #3
  call void @_ZN4ardb15CoroRedisClient14FillErrorReplyEv(ptr noundef nonnull align 8 dereferenceable(240) %15)
  %64 = getelementptr inbounds %"class.ardb::CoroRedisClient", ptr %15, i32 0, i32 3
  store ptr %64, ptr %4, align 8
  br label %76

65:                                               ; preds = %60
  %66 = landingpad { ptr, i32 }
          cleanup
  %67 = extractvalue { ptr, i32 } %66, 0
  store ptr %67, ptr %11, align 8
  %68 = extractvalue { ptr, i32 } %66, 1
  store i32 %68, ptr %12, align 4
  br label %73

69:                                               ; preds = %62
  %70 = landingpad { ptr, i32 }
          cleanup
  %71 = extractvalue { ptr, i32 } %70, 0
  store ptr %71, ptr %11, align 8
  %72 = extractvalue { ptr, i32 } %70, 1
  store i32 %72, ptr %12, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #3
  br label %73

73:                                               ; preds = %69, %65
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #3
  br label %78

74:                                               ; preds = %58
  call void @_ZN4ardb11CoroChannel17CancelTimeoutTaskEv(ptr noundef nonnull align 8 dereferenceable(72) %15)
  %75 = getelementptr inbounds %"class.ardb::CoroRedisClient", ptr %15, i32 0, i32 3
  store ptr %75, ptr %4, align 8
  br label %76

76:                                               ; preds = %74, %63, %47, %39
  %77 = load ptr, ptr %4, align 8
  ret ptr %77

78:                                               ; preds = %73, %57
  %79 = load ptr, ptr %11, align 8
  %80 = load i32, ptr %12, align 4
  %81 = insertvalue { ptr, i32 } poison, ptr %79, 0
  %82 = insertvalue { ptr, i32 } %81, i32 %80, 1
  resume { ptr, i32 } %82
}

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN4ardb7Channel5WriteINS_5codec17RedisCommandFrameEEEbRT_(ptr noundef nonnull align 8 dereferenceable(256), ptr noundef nonnull align 8 dereferenceable(160)) #2 align 2

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { 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 = !{!"int", !7, i64 0}
!11 = !{!12, !21, i64 80}
!12 = !{!"_ZTSN4ardb15CoroRedisClientE", !13, i64 0, !19, i64 72, !21, i64 80, !22, i64 88, !26, i64 112, !29, i64 160, !32, i64 168}
!13 = !{!"_ZTSN4ardb11CoroChannelE", !14, i64 0, !17, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !18, i64 48, !6, i64 56, !18, i64 64, !10, i64 68}
!14 = !{!"_ZTSN4ardb22ChannelUpstreamHandlerINS_6BufferEEE", !15, i64 0}
!15 = !{!"_ZTSN4ardb22AbstractChannelHandlerINS_6BufferEEE", !16, i64 0}
!16 = !{!"_ZTSN4ardb14ChannelHandlerE"}
!17 = !{!"_ZTSN4ardb8RunnableE"}
!18 = !{!"bool", !7, i64 0}
!19 = !{!"_ZTSN4ardb22ChannelUpstreamHandlerINS_5codec10RedisReplyEEE", !20, i64 0}
!20 = !{!"_ZTSN4ardb22AbstractChannelHandlerINS_5codec10RedisReplyEEE", !16, i64 0}
!21 = !{!"long", !7, i64 0}
!22 = !{!"_ZTSSt6vectorIPN4ardb5codec10RedisReplyESaIS3_EE", !23, i64 0}
!23 = !{!"_ZTSSt12_Vector_baseIPN4ardb5codec10RedisReplyESaIS3_EE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseIPN4ardb5codec10RedisReplyESaIS3_EE12_Vector_implE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseIPN4ardb5codec10RedisReplyESaIS3_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!26 = !{!"_ZTSN4ardb5codec17RedisReplyDecoderE", !27, i64 0}
!27 = !{!"_ZTSN4ardb5codec17StackFrameDecoderINS0_10RedisReplyEEE", !14, i64 0, !28, i64 8}
!28 = !{!"_ZTSN4ardb6BufferE", !6, i64 0, !21, i64 8, !21, i64 16, !21, i64 24, !18, i64 32}
!29 = !{!"_ZTSN4ardb5codec19RedisCommandEncoderE", !30, i64 0}
!30 = !{!"_ZTSN4ardb24ChannelDownstreamHandlerINS_5codec17RedisCommandFrameEEE", !31, i64 0}
!31 = !{!"_ZTSN4ardb22AbstractChannelHandlerINS_5codec17RedisCommandFrameEEE", !16, i64 0}
!32 = !{!"_ZTSN4ardb5codec10RedisReplyE", !10, i64 8, !33, i64 16, !21, i64 48, !6, i64 56, !6, i64 64}
!33 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !34, i64 0, !21, i64 8, !7, i64 16}
!34 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!35 = !{!21, !21, i64 0}
!36 = !{!13, !6, i64 24}
!37 = distinct !{!37, !38}
!38 = !{!"llvm.loop.mustprogress"}
!39 = !{!13, !18, i64 48}
!40 = !{i8 0, i8 2}
!41 = !{}


; 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.std::allocator.0" = type { i8 }

@.str.5 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [16 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 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: mustprogress uwtable
declare dso_local noundef i32 @_ZN4ardb11CoroChannel8WaitCoroEv(ptr noundef nonnull align 8 dereferenceable(72)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN4ardb11CoroChannel9IsTimeoutEv(ptr noundef nonnull align 8 dereferenceable(72)) local_unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4ardb15CoroRedisClient5ClearEv(ptr noundef nonnull align 8 dereferenceable(240)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN4ardb15CoroRedisClient13SyncMultiCallERSt6vectorINS_5codec17RedisCommandFrameESaIS3_EEi(ptr noundef nonnull align 8 dereferenceable(240) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %2) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = alloca %"class.std::allocator.0", align 1
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca %"class.std::allocator.0", align 1
  tail call void @_ZN4ardb15CoroRedisClient5ClearEv(ptr noundef nonnull align 8 dereferenceable(240) %0)
  %8 = tail call noundef i64 @_ZNKSt6vectorIN4ardb5codec17RedisCommandFrameESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #3
  %9 = getelementptr inbounds i8, ptr %0, i64 80
  store i64 %8, ptr %9, align 8, !tbaa !5
  %10 = tail call noundef i64 @_ZNKSt6vectorIN4ardb5codec17RedisCommandFrameESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #3
  %.not20 = icmp eq i64 %10, 0
  br i1 %.not20, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %3
  %11 = getelementptr inbounds i8, ptr %0, i64 24
  br label %13

._crit_edge:                                      ; preds = %13, %3
  tail call void @_ZN4ardb11CoroChannel17CreateTimeoutTaskEi(ptr noundef nonnull align 8 dereferenceable(72) %0, i32 noundef %2)
  %12 = tail call noundef i32 @_ZN4ardb11CoroChannel8WaitCoroEv(ptr noundef nonnull align 8 dereferenceable(72) %0)
  %.not = icmp eq i32 %12, 0
  br i1 %.not, label %20, label %48

13:                                               ; preds = %.lr.ph, %13
  %.01319 = phi i64 [ 0, %.lr.ph ], [ %17, %13 ]
  %14 = load ptr, ptr %11, align 8, !tbaa !33
  %15 = tail call noundef nonnull align 8 dereferenceable(160) ptr @_ZNSt6vectorIN4ardb5codec17RedisCommandFrameESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %.01319) #3
  %16 = tail call noundef zeroext i1 @_ZN4ardb7Channel5WriteINS_5codec17RedisCommandFrameEEEbRT_(ptr noundef nonnull align 8 dereferenceable(256) %14, ptr noundef nonnull align 8 dereferenceable(160) %15)
  %17 = add nuw i64 %.01319, 1
  %18 = tail call noundef i64 @_ZNKSt6vectorIN4ardb5codec17RedisCommandFrameESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #3
  %19 = icmp ult i64 %17, %18
  br i1 %19, label %13, label %._crit_edge, !llvm.loop !34

20:                                               ; preds = %._crit_edge
  %21 = getelementptr inbounds i8, ptr %0, i64 48
  %22 = load i8, ptr %21, align 8, !tbaa !36, !range !37, !noundef !38
  %23 = trunc nuw i8 %22 to i1
  br i1 %23, label %34, label %24

24:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #3
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #3
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #3
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull @.str.5, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %25 unwind label %29

25:                                               ; preds = %24
  %26 = getelementptr inbounds i8, ptr %0, i64 168
  invoke void @_ZN4ardb5codec10RedisReply14SetErrorReasonERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(72) %26, ptr noundef nonnull align 8 dereferenceable(32) %4)
          to label %27 unwind label %31

27:                                               ; preds = %25
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #3
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #3
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #3
  call void @_ZN4ardb15CoroRedisClient14FillErrorReplyEv(ptr noundef nonnull align 8 dereferenceable(240) %0)
  %28 = getelementptr inbounds i8, ptr %0, i64 88
  br label %48

29:                                               ; preds = %24
  %30 = landingpad { ptr, i32 }
          cleanup
  br label %33

31:                                               ; preds = %25
  %32 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #3
  br label %33

33:                                               ; preds = %31, %29
  %.pn = phi { ptr, i32 } [ %32, %31 ], [ %30, %29 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #3
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #3
  br label %49

34:                                               ; preds = %20
  %35 = tail call noundef zeroext i1 @_ZN4ardb11CoroChannel9IsTimeoutEv(ptr noundef nonnull align 8 dereferenceable(72) %0)
  br i1 %35, label %36, label %46

36:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #3
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #3
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #3
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull @.str.6, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %37 unwind label %41

37:                                               ; preds = %36
  %38 = getelementptr inbounds i8, ptr %0, i64 168
  invoke void @_ZN4ardb5codec10RedisReply14SetErrorReasonERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(72) %38, ptr noundef nonnull align 8 dereferenceable(32) %6)
          to label %39 unwind label %43

39:                                               ; preds = %37
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #3
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #3
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #3
  call void @_ZN4ardb15CoroRedisClient14FillErrorReplyEv(ptr noundef nonnull align 8 dereferenceable(240) %0)
  %40 = getelementptr inbounds i8, ptr %0, i64 88
  br label %48

41:                                               ; preds = %36
  %42 = landingpad { ptr, i32 }
          cleanup
  br label %45

43:                                               ; preds = %37
  %44 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #3
  br label %45

45:                                               ; preds = %43, %41
  %.pn16 = phi { ptr, i32 } [ %44, %43 ], [ %42, %41 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #3
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #3
  br label %49

46:                                               ; preds = %34
  tail call void @_ZN4ardb11CoroChannel17CancelTimeoutTaskEv(ptr noundef nonnull align 8 dereferenceable(72) %0)
  %47 = getelementptr inbounds i8, ptr %0, i64 88
  br label %48

48:                                               ; preds = %._crit_edge, %46, %39, %27
  %.014 = phi ptr [ %40, %39 ], [ %47, %46 ], [ %28, %27 ], [ null, %._crit_edge ]
  ret ptr %.014

49:                                               ; preds = %45, %33
  %.pn16.pn = phi { ptr, i32 } [ %.pn16, %45 ], [ %.pn, %33 ]
  resume { ptr, i32 } %.pn16.pn
}

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN4ardb7Channel5WriteINS_5codec17RedisCommandFrameEEEbRT_(ptr noundef nonnull align 8 dereferenceable(256), ptr noundef nonnull align 8 dereferenceable(160)) local_unnamed_addr #2 align 2

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { 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, !19, i64 80}
!6 = !{!"_ZTSN4ardb15CoroRedisClientE", !7, i64 0, !17, i64 72, !19, i64 80, !20, i64 88, !24, i64 112, !27, i64 160, !30, i64 168}
!7 = !{!"_ZTSN4ardb11CoroChannelE", !8, i64 0, !11, i64 8, !12, i64 16, !12, i64 24, !12, i64 32, !12, i64 40, !15, i64 48, !12, i64 56, !15, i64 64, !16, i64 68}
!8 = !{!"_ZTSN4ardb22ChannelUpstreamHandlerINS_6BufferEEE", !9, i64 0}
!9 = !{!"_ZTSN4ardb22AbstractChannelHandlerINS_6BufferEEE", !10, i64 0}
!10 = !{!"_ZTSN4ardb14ChannelHandlerE"}
!11 = !{!"_ZTSN4ardb8RunnableE"}
!12 = !{!"any pointer", !13, i64 0}
!13 = !{!"omnipotent char", !14, i64 0}
!14 = !{!"Simple C++ TBAA"}
!15 = !{!"bool", !13, i64 0}
!16 = !{!"int", !13, i64 0}
!17 = !{!"_ZTSN4ardb22ChannelUpstreamHandlerINS_5codec10RedisReplyEEE", !18, i64 0}
!18 = !{!"_ZTSN4ardb22AbstractChannelHandlerINS_5codec10RedisReplyEEE", !10, i64 0}
!19 = !{!"long", !13, i64 0}
!20 = !{!"_ZTSSt6vectorIPN4ardb5codec10RedisReplyESaIS3_EE", !21, i64 0}
!21 = !{!"_ZTSSt12_Vector_baseIPN4ardb5codec10RedisReplyESaIS3_EE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIPN4ardb5codec10RedisReplyESaIS3_EE12_Vector_implE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIPN4ardb5codec10RedisReplyESaIS3_EE17_Vector_impl_dataE", !12, i64 0, !12, i64 8, !12, i64 16}
!24 = !{!"_ZTSN4ardb5codec17RedisReplyDecoderE", !25, i64 0}
!25 = !{!"_ZTSN4ardb5codec17StackFrameDecoderINS0_10RedisReplyEEE", !8, i64 0, !26, i64 8}
!26 = !{!"_ZTSN4ardb6BufferE", !12, i64 0, !19, i64 8, !19, i64 16, !19, i64 24, !15, i64 32}
!27 = !{!"_ZTSN4ardb5codec19RedisCommandEncoderE", !28, i64 0}
!28 = !{!"_ZTSN4ardb24ChannelDownstreamHandlerINS_5codec17RedisCommandFrameEEE", !29, i64 0}
!29 = !{!"_ZTSN4ardb22AbstractChannelHandlerINS_5codec17RedisCommandFrameEEE", !10, i64 0}
!30 = !{!"_ZTSN4ardb5codec10RedisReplyE", !16, i64 8, !31, i64 16, !19, i64 48, !12, i64 56, !12, i64 64}
!31 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !32, i64 0, !19, i64 8, !13, i64 16}
!32 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !12, i64 0}
!33 = !{!7, !12, i64 24}
!34 = distinct !{!34, !35}
!35 = !{!"llvm.loop.mustprogress"}
!36 = !{!7, !15, i64 48}
!37 = !{i8 0, i8 2}
!38 = !{}


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