; LLVM IR from dynexcoin/Dynex :: src/System/TcpStream.ll (ZN6System12TcpStreambuf10dumpBufferEb)

; 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.System::TcpStreambuf" = type { %"class.std::basic_streambuf", ptr, %"struct.std::array", %"struct.std::array.0" }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%"struct.std::array" = type { [4096 x i8] }
%"struct.std::array.0" = type { [1024 x i8] }

@_ZTISt9exception = external constant ptr

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt5arrayIhLm1024EE5frontEv(ptr noundef nonnull align 1 dereferenceable(1024)) #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN6System12TcpStreambuf10dumpBufferEb(ptr noundef nonnull align 8 dereferenceable(5192) %0, i1 noundef zeroext %1) #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i1, align 1
  %4 = alloca ptr, align 8
  %5 = alloca i8, align 1
  %6 = alloca i64, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca ptr, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  %15 = zext i1 %1 to i8
  store i8 %15, ptr %5, align 1, !tbaa !9
  %16 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %17 = invoke noundef ptr @_ZNKSt15basic_streambufIcSt11char_traitsIcEE4pptrEv(ptr noundef nonnull align 8 dereferenceable(64) %16)
          to label %18 unwind label %27

18:                                               ; preds = %2
  %19 = invoke noundef ptr @_ZNKSt15basic_streambufIcSt11char_traitsIcEE5pbaseEv(ptr noundef nonnull align 8 dereferenceable(64) %16)
          to label %20 unwind label %27

20:                                               ; preds = %18
  %21 = ptrtoint ptr %17 to i64
  %22 = ptrtoint ptr %19 to i64
  %23 = sub i64 %21, %22
  store i64 %23, ptr %6, align 8, !tbaa !11
  %24 = load i64, ptr %6, align 8, !tbaa !11
  %25 = icmp eq i64 %24, 0
  br i1 %25, label %26, label %31

26:                                               ; preds = %20
  store i1 true, ptr %3, align 1
  store i32 1, ptr %9, align 4
  br label %114

27:                                               ; preds = %18, %2
  %28 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %29 = extractvalue { ptr, i32 } %28, 0
  store ptr %29, ptr %7, align 8
  %30 = extractvalue { ptr, i32 } %28, 1
  store i32 %30, ptr %8, align 4
  br label %118

31:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %32 = getelementptr inbounds %"class.System::TcpStreambuf", ptr %16, i32 0, i32 1
  %33 = load ptr, ptr %32, align 8, !tbaa !13
  %34 = getelementptr inbounds %"class.System::TcpStreambuf", ptr %16, i32 0, i32 3
  %35 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt5arrayIhLm1024EE5frontEv(ptr noundef nonnull align 1 dereferenceable(1024) %34) #5
  %36 = load i64, ptr %6, align 8, !tbaa !11
  %37 = invoke noundef i64 @_ZN6System13TcpConnection5writeEPKhm(ptr noundef nonnull align 8 dereferenceable(32) %33, ptr noundef %35, i64 noundef %36)
          to label %38 unwind label %47

38:                                               ; preds = %31
  store i64 %37, ptr %10, align 8, !tbaa !11
  %39 = load i64, ptr %10, align 8, !tbaa !11
  %40 = load i64, ptr %6, align 8, !tbaa !11
  %41 = icmp eq i64 %39, %40
  br i1 %41, label %42, label %51

42:                                               ; preds = %38
  %43 = load i64, ptr %6, align 8, !tbaa !11
  %44 = trunc i64 %43 to i32
  %45 = sub nsw i32 0, %44
  invoke void @_ZNSt15basic_streambufIcSt11char_traitsIcEE5pbumpEi(ptr noundef nonnull align 8 dereferenceable(64) %16, i32 noundef %45)
          to label %46 unwind label %47

46:                                               ; preds = %42
  br label %113

47:                                               ; preds = %42, %31
  %48 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %49 = extractvalue { ptr, i32 } %48, 0
  store ptr %49, ptr %7, align 8
  %50 = extractvalue { ptr, i32 } %48, 1
  store i32 %50, ptr %8, align 4
  br label %117

51:                                               ; preds = %38
  %52 = load i8, ptr %5, align 1, !tbaa !9, !range !19, !noundef !20
  %53 = trunc i8 %52 to i1
  br i1 %53, label %83, label %54

54:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  store i64 0, ptr %11, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %55 = load i64, ptr %10, align 8, !tbaa !11
  store i64 %55, ptr %12, align 8, !tbaa !11
  br label %56

56:                                               ; preds = %69, %54
  %57 = load i64, ptr %12, align 8, !tbaa !11
  %58 = load i64, ptr %6, align 8, !tbaa !11
  %59 = icmp ult i64 %57, %58
  br i1 %59, label %61, label %60

60:                                               ; preds = %56
  store i32 2, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br label %74

61:                                               ; preds = %56
  %62 = getelementptr inbounds %"class.System::TcpStreambuf", ptr %16, i32 0, i32 3
  %63 = load i64, ptr %12, align 8, !tbaa !11
  %64 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt5arrayIhLm1024EEixEm(ptr noundef nonnull align 1 dereferenceable(1024) %62, i64 noundef %63) #5
  %65 = load i8, ptr %64, align 1, !tbaa !21
  %66 = getelementptr inbounds %"class.System::TcpStreambuf", ptr %16, i32 0, i32 3
  %67 = load i64, ptr %11, align 8, !tbaa !11
  %68 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt5arrayIhLm1024EEixEm(ptr noundef nonnull align 1 dereferenceable(1024) %66, i64 noundef %67) #5
  store i8 %65, ptr %68, align 1, !tbaa !21
  br label %69

69:                                               ; preds = %61
  %70 = load i64, ptr %12, align 8, !tbaa !11
  %71 = add i64 %70, 1
  store i64 %71, ptr %12, align 8, !tbaa !11
  %72 = load i64, ptr %11, align 8, !tbaa !11
  %73 = add i64 %72, 1
  store i64 %73, ptr %11, align 8, !tbaa !11
  br label %56, !llvm.loop !22

74:                                               ; preds = %60
  %75 = load i64, ptr %10, align 8, !tbaa !11
  %76 = trunc i64 %75 to i32
  %77 = sub nsw i32 0, %76
  invoke void @_ZNSt15basic_streambufIcSt11char_traitsIcEE5pbumpEi(ptr noundef nonnull align 8 dereferenceable(64) %16, i32 noundef %77)
          to label %78 unwind label %79

78:                                               ; preds = %74
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br label %112

79:                                               ; preds = %74
  %80 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %81 = extractvalue { ptr, i32 } %80, 0
  store ptr %81, ptr %7, align 8
  %82 = extractvalue { ptr, i32 } %80, 1
  store i32 %82, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br label %117

83:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %84 = load i64, ptr %10, align 8, !tbaa !11
  store i64 %84, ptr %13, align 8, !tbaa !11
  br label %85

85:                                               ; preds = %100, %83
  %86 = load i64, ptr %13, align 8, !tbaa !11
  %87 = load i64, ptr %6, align 8, !tbaa !11
  %88 = icmp ne i64 %86, %87
  br i1 %88, label %89, label %107

89:                                               ; preds = %85
  %90 = getelementptr inbounds %"class.System::TcpStreambuf", ptr %16, i32 0, i32 1
  %91 = load ptr, ptr %90, align 8, !tbaa !13
  %92 = getelementptr inbounds %"class.System::TcpStreambuf", ptr %16, i32 0, i32 3
  %93 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt5arrayIhLm1024EE5frontEv(ptr noundef nonnull align 1 dereferenceable(1024) %92) #5
  %94 = load i64, ptr %13, align 8, !tbaa !11
  %95 = getelementptr inbounds i8, ptr %93, i64 %94
  %96 = load i64, ptr %6, align 8, !tbaa !11
  %97 = load i64, ptr %13, align 8, !tbaa !11
  %98 = sub i64 %96, %97
  %99 = invoke noundef i64 @_ZN6System13TcpConnection5writeEPKhm(ptr noundef nonnull align 8 dereferenceable(32) %91, ptr noundef %95, i64 noundef %98)
          to label %100 unwind label %103

100:                                              ; preds = %89
  %101 = load i64, ptr %13, align 8, !tbaa !11
  %102 = add i64 %101, %99
  store i64 %102, ptr %13, align 8, !tbaa !11
  br label %85, !llvm.loop !24

103:                                              ; preds = %107, %89
  %104 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %105 = extractvalue { ptr, i32 } %104, 0
  store ptr %105, ptr %7, align 8
  %106 = extractvalue { ptr, i32 } %104, 1
  store i32 %106, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  br label %117

107:                                              ; preds = %85
  %108 = load i64, ptr %6, align 8, !tbaa !11
  %109 = trunc i64 %108 to i32
  %110 = sub nsw i32 0, %109
  invoke void @_ZNSt15basic_streambufIcSt11char_traitsIcEE5pbumpEi(ptr noundef nonnull align 8 dereferenceable(64) %16, i32 noundef %110)
          to label %111 unwind label %103

111:                                              ; preds = %107
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  br label %112

112:                                              ; preds = %111, %78
  br label %113

113:                                              ; preds = %112, %46
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  store i32 0, ptr %9, align 4
  br label %114

114:                                              ; preds = %113, %26
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  %115 = load i32, ptr %9, align 4
  switch i32 %115, label %134 [
    i32 0, label %116
    i32 1, label %127
  ]

116:                                              ; preds = %114
  br label %126

117:                                              ; preds = %103, %79, %47
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %118

118:                                              ; preds = %117, %27
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  br label %119

119:                                              ; preds = %118
  %120 = load i32, ptr %8, align 4
  %121 = call i32 @llvm.eh.typeid.for.p0(ptr @_ZTISt9exception) #5
  %122 = icmp eq i32 %120, %121
  br i1 %122, label %123, label %129

123:                                              ; preds = %119
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %124 = load ptr, ptr %7, align 8
  %125 = call ptr @__cxa_begin_catch(ptr %124) #5
  store ptr %125, ptr %14, align 8
  store i1 false, ptr %3, align 1
  store i32 1, ptr %9, align 4
  call void @__cxa_end_catch()
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  br label %127

126:                                              ; preds = %116
  store i1 true, ptr %3, align 1
  br label %127

127:                                              ; preds = %126, %123, %114
  %128 = load i1, ptr %3, align 1
  ret i1 %128

129:                                              ; preds = %119
  %130 = load ptr, ptr %7, align 8
  %131 = load i32, ptr %8, align 4
  %132 = insertvalue { ptr, i32 } poison, ptr %130, 0
  %133 = insertvalue { ptr, i32 } %132, i32 %131, 1
  resume { ptr, i32 } %133

134:                                              ; preds = %114
  unreachable
}

declare ptr @__cxa_begin_catch(ptr)

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNKSt15basic_streambufIcSt11char_traitsIcEE4pptrEv(ptr noundef nonnull align 8 dereferenceable(64)) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt15basic_streambufIcSt11char_traitsIcEE5pbumpEi(ptr noundef nonnull align 8 dereferenceable(64), i32 noundef) #0 align 2

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

; Function Attrs: nounwind memory(none)
declare i32 @llvm.eh.typeid.for.p0(ptr) #3

declare void @__cxa_end_catch()

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNKSt15basic_streambufIcSt11char_traitsIcEE5pbaseEv(ptr noundef nonnull align 8 dereferenceable(64)) #0 align 2

declare noundef i64 @_ZN6System13TcpConnection5writeEPKhm(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, i64 noundef) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt5arrayIhLm1024EEixEm(ptr noundef nonnull align 1 dereferenceable(1024), i64 noundef) #0 align 2

attributes #0 = { 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 #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nounwind memory(none) }
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 = { 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 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !6, i64 64}
!14 = !{!"_ZTSN6System12TcpStreambufE", !15, i64 0, !6, i64 64, !17, i64 72, !18, i64 4168}
!15 = !{!"_ZTSSt15basic_streambufIcSt11char_traitsIcEE", !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !16, i64 56}
!16 = !{!"_ZTSSt6locale", !6, i64 0}
!17 = !{!"_ZTSSt5arrayIcLm4096EE", !7, i64 0}
!18 = !{!"_ZTSSt5arrayIhLm1024EE", !7, i64 0}
!19 = !{i8 0, i8 2}
!20 = !{}
!21 = !{!7, !7, i64 0}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = distinct !{!24, !23}


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

@_ZTISt9exception = external constant ptr

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt5arrayIhLm1024EE5frontEv(ptr noundef nonnull align 1 dereferenceable(1024)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN6System12TcpStreambuf10dumpBufferEb(ptr noundef nonnull align 8 dereferenceable(5192) %0, i1 noundef zeroext %1) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = tail call noundef ptr @_ZNKSt15basic_streambufIcSt11char_traitsIcEE4pptrEv(ptr noundef nonnull align 8 dereferenceable(64) %0)
  %4 = tail call noundef ptr @_ZNKSt15basic_streambufIcSt11char_traitsIcEE5pbaseEv(ptr noundef nonnull align 8 dereferenceable(64) %0)
  %5 = ptrtoint ptr %3 to i64
  %6 = ptrtoint ptr %4 to i64
  %7 = sub i64 %5, %6
  %8 = icmp eq ptr %3, %4
  br i1 %8, label %48, label %9

9:                                                ; preds = %2
  %10 = getelementptr inbounds i8, ptr %0, i64 64
  %11 = load ptr, ptr %10, align 8, !tbaa !5
  %12 = getelementptr inbounds i8, ptr %0, i64 4168
  %13 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt5arrayIhLm1024EE5frontEv(ptr noundef nonnull align 1 dereferenceable(1024) %12) #4
  %14 = invoke noundef i64 @_ZN6System13TcpConnection5writeEPKhm(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef nonnull %13, i64 noundef %7)
          to label %15 unwind label %20

15:                                               ; preds = %9
  %16 = icmp eq i64 %14, %7
  br i1 %16, label %17, label %22

17:                                               ; preds = %15
  %18 = trunc i64 %7 to i32
  %19 = sub nsw i32 0, %18
  tail call void @_ZNSt15basic_streambufIcSt11char_traitsIcEE5pbumpEi(ptr noundef nonnull align 8 dereferenceable(64) %0, i32 noundef %19)
  br label %48

20:                                               ; preds = %9
  %21 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  br label %43

22:                                               ; preds = %15
  br i1 %1, label %.lr.ph41, label %.preheader36

.preheader36:                                     ; preds = %22
  %23 = icmp ult i64 %14, %7
  br i1 %23, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %.preheader36
  %24 = trunc i64 %14 to i32
  %25 = sub nsw i32 0, %24
  tail call void @_ZNSt15basic_streambufIcSt11char_traitsIcEE5pbumpEi(ptr noundef nonnull align 8 dereferenceable(64) %0, i32 noundef %25)
  br label %48

.lr.ph:                                           ; preds = %.preheader36, %.lr.ph
  %.02938 = phi i64 [ %29, %.lr.ph ], [ %14, %.preheader36 ]
  %.03037 = phi i64 [ %30, %.lr.ph ], [ 0, %.preheader36 ]
  %26 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt5arrayIhLm1024EEixEm(ptr noundef nonnull align 1 dereferenceable(1024) %12, i64 noundef %.02938) #4
  %27 = load i8, ptr %26, align 1, !tbaa !14
  %28 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt5arrayIhLm1024EEixEm(ptr noundef nonnull align 1 dereferenceable(1024) %12, i64 noundef %.03037) #4
  store i8 %27, ptr %28, align 1, !tbaa !14
  %29 = add nuw i64 %.02938, 1
  %30 = add i64 %.03037, 1
  %31 = icmp ult i64 %29, %7
  br i1 %31, label %.lr.ph, label %._crit_edge, !llvm.loop !15

.lr.ph41:                                         ; preds = %22, %37
  %.02840 = phi i64 [ %38, %37 ], [ %14, %22 ]
  %32 = load ptr, ptr %10, align 8, !tbaa !5
  %33 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt5arrayIhLm1024EE5frontEv(ptr noundef nonnull align 1 dereferenceable(1024) %12) #4
  %34 = getelementptr inbounds i8, ptr %33, i64 %.02840
  %35 = sub i64 %7, %.02840
  %36 = invoke noundef i64 @_ZN6System13TcpConnection5writeEPKhm(ptr noundef nonnull align 8 dereferenceable(32) %32, ptr noundef nonnull %34, i64 noundef %35)
          to label %37 unwind label %39

37:                                               ; preds = %.lr.ph41
  %38 = add i64 %36, %.02840
  %.not = icmp eq i64 %38, %7
  br i1 %.not, label %._crit_edge42, label %.lr.ph41, !llvm.loop !17

39:                                               ; preds = %.lr.ph41
  %40 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  br label %43

._crit_edge42:                                    ; preds = %37
  %41 = trunc i64 %7 to i32
  %42 = sub nsw i32 0, %41
  tail call void @_ZNSt15basic_streambufIcSt11char_traitsIcEE5pbumpEi(ptr noundef nonnull align 8 dereferenceable(64) %0, i32 noundef %42)
  br label %48

43:                                               ; preds = %39, %20
  %.pn = phi { ptr, i32 } [ %40, %39 ], [ %21, %20 ]
  %.033 = extractvalue { ptr, i32 } %.pn, 1
  %44 = tail call i32 @llvm.eh.typeid.for.p0(ptr nonnull @_ZTISt9exception) #4
  %45 = icmp eq i32 %.033, %44
  br i1 %45, label %46, label %49

46:                                               ; preds = %43
  %.031 = extractvalue { ptr, i32 } %.pn, 0
  %47 = tail call ptr @__cxa_begin_catch(ptr %.031) #4
  tail call void @__cxa_end_catch()
  br label %48

48:                                               ; preds = %2, %._crit_edge, %._crit_edge42, %17, %46
  %.1 = phi i1 [ false, %46 ], [ true, %17 ], [ true, %._crit_edge42 ], [ true, %._crit_edge ], [ true, %2 ]
  ret i1 %.1

49:                                               ; preds = %43
  resume { ptr, i32 } %.pn
}

declare ptr @__cxa_begin_catch(ptr) local_unnamed_addr

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNKSt15basic_streambufIcSt11char_traitsIcEE4pptrEv(ptr noundef nonnull align 8 dereferenceable(64)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt15basic_streambufIcSt11char_traitsIcEE5pbumpEi(ptr noundef nonnull align 8 dereferenceable(64), i32 noundef) local_unnamed_addr #0 align 2

; Function Attrs: nofree nosync nounwind memory(none)
declare i32 @llvm.eh.typeid.for.p0(ptr) #2

declare void @__cxa_end_catch() local_unnamed_addr

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNKSt15basic_streambufIcSt11char_traitsIcEE5pbaseEv(ptr noundef nonnull align 8 dereferenceable(64)) local_unnamed_addr #0 align 2

declare noundef i64 @_ZN6System13TcpConnection5writeEPKhm(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, i64 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt5arrayIhLm1024EEixEm(ptr noundef nonnull align 1 dereferenceable(1024), i64 noundef) local_unnamed_addr #0 align 2

attributes #0 = { 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 #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 = { nofree nosync nounwind memory(none) }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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, !8, i64 64}
!6 = !{!"_ZTSN6System12TcpStreambufE", !7, i64 0, !8, i64 64, !12, i64 72, !13, i64 4168}
!7 = !{!"_ZTSSt15basic_streambufIcSt11char_traitsIcEE", !8, i64 8, !8, i64 16, !8, i64 24, !8, i64 32, !8, i64 40, !8, i64 48, !11, i64 56}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"_ZTSSt6locale", !8, i64 0}
!12 = !{!"_ZTSSt5arrayIcLm4096EE", !9, i64 0}
!13 = !{!"_ZTSSt5arrayIhLm1024EE", !9, i64 0}
!14 = !{!9, !9, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}


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