; LLVM IR from dmr-goncalves/HumanAwareRobotNavigation :: src/husky/husky_base/src/horizon_legacy (Message_data)

; 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::__cxx11::basic_stringstream" = type { %"class.std::basic_iostream.base", %"class.std::__cxx11::basic_stringbuf", %"class.std::basic_ios" }
%"class.std::basic_iostream.base" = type { %"class.std::basic_istream.base", %"class.std::basic_ostream.base" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"class.std::basic_ostream.base" = type { ptr }
%"class.std::__cxx11::basic_stringbuf" = type { %"class.std::basic_streambuf", i32, %"class.std::__cxx11::basic_string" }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.clearpath::DataEncoders" = type { %"class.clearpath::Message.base", i64, i64 }
%"class.clearpath::Message.base" = type <{ ptr, [256 x i8], i64, i8 }>

@.str = external hidden unnamed_addr constant [28 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [15 x i8], align 1
@_ZTIPN9clearpath16MessageExceptionE = external dso_local constant { ptr, ptr, i32, ptr }, align 8
@_ZTVN9clearpath12DataEncodersE = external dso_local unnamed_addr constant { [5 x ptr] }, align 8

declare void @_ZN9clearpath7MessageC2EPvm(ptr noundef nonnull align 8 dereferenceable(273), ptr noundef, i64 noundef) unnamed_addr #0

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

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) #2

; Function Attrs: mustprogress uwtable
declare void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128)) unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #4

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #3 align 2

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #0

declare ptr @__cxa_allocate_exception(i64)

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #5

; Function Attrs: mustprogress uwtable
declare void @_ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(128)) #3 align 2

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

declare void @_ZN9clearpath16MessageExceptionC1EPKcNS0_6errorsE(ptr noundef nonnull align 8 dereferenceable(12), ptr noundef, i32 noundef) unnamed_addr #0

declare void @__cxa_throw(ptr, ptr, ptr)

; 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) #2

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #6

declare void @__cxa_free_exception(ptr)

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN9clearpath12DataEncodersC2EPvm(ptr noundef nonnull align 8 dereferenceable(296) %0, ptr noundef %1, i64 noundef %2) unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca %"class.std::__cxx11::basic_stringstream", align 8
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca i1, align 1
  %12 = alloca i1, align 1
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store i64 %2, ptr %6, align 8, !tbaa !9
  %13 = load ptr, ptr %4, align 8
  %14 = load ptr, ptr %5, align 8, !tbaa !5
  %15 = load i64, ptr %6, align 8, !tbaa !9
  call void @_ZN9clearpath7MessageC2EPvm(ptr noundef nonnull align 8 dereferenceable(273) %13, ptr noundef %14, i64 noundef %15)
  store ptr getelementptr inbounds inrange(-16, 24) ({ [5 x ptr] }, ptr @_ZTVN9clearpath12DataEncodersE, i32 0, i32 0, i32 2), ptr %13, align 8, !tbaa !11
  %16 = invoke noundef i64 @_ZN9clearpath7Message16getPayloadLengthEv(ptr noundef nonnull align 8 dereferenceable(273) %13)
          to label %17 unwind label %50

17:                                               ; preds = %3
  %18 = invoke noundef zeroext i8 @_ZN9clearpath12DataEncoders8getCountEv(ptr noundef nonnull align 8 dereferenceable(296) %13)
          to label %19 unwind label %50

19:                                               ; preds = %17
  %20 = zext i8 %18 to i32
  %21 = mul nsw i32 %20, 6
  %22 = add nsw i32 1, %21
  %23 = sext i32 %22 to i64
  %24 = icmp ne i64 %16, %23
  br i1 %24, label %25, label %84

25:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 392, ptr %9) #8
  invoke void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128) %9)
          to label %26 unwind label %54

26:                                               ; preds = %25
  %27 = getelementptr inbounds i8, ptr %9, i64 16
  %28 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef @.str)
          to label %29 unwind label %58

29:                                               ; preds = %26
  %30 = invoke noundef i64 @_ZN9clearpath7Message16getPayloadLengthEv(ptr noundef nonnull align 8 dereferenceable(273) %13)
          to label %31 unwind label %58

31:                                               ; preds = %29
  %32 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) %28, i64 noundef %30)
          to label %33 unwind label %58

33:                                               ; preds = %31
  %34 = getelementptr inbounds i8, ptr %9, i64 16
  %35 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %34, ptr noundef @.str.1)
          to label %36 unwind label %58

36:                                               ; preds = %33
  %37 = invoke noundef zeroext i8 @_ZN9clearpath12DataEncoders8getCountEv(ptr noundef nonnull align 8 dereferenceable(296) %13)
          to label %38 unwind label %58

38:                                               ; preds = %36
  %39 = zext i8 %37 to i32
  %40 = mul nsw i32 %39, 6
  %41 = add nsw i32 1, %40
  %42 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %35, i32 noundef %41)
          to label %43 unwind label %58

43:                                               ; preds = %38
  store i1 true, ptr %12, align 1
  %44 = call ptr @__cxa_allocate_exception(i64 8) #8
  %45 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 16) #9
          to label %46 unwind label %62

46:                                               ; preds = %43
  store i1 true, ptr %11, align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr %10) #8
  invoke void @_ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %10, ptr noundef nonnull align 8 dereferenceable(128) %9)
          to label %47 unwind label %66

47:                                               ; preds = %46
  %48 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %10) #8
  invoke void @_ZN9clearpath16MessageExceptionC1EPKcNS0_6errorsE(ptr noundef nonnull align 8 dereferenceable(12) %45, ptr noundef %48, i32 noundef 1)
          to label %49 unwind label %70

49:                                               ; preds = %47
  store i1 false, ptr %11, align 1
  store ptr %45, ptr %44, align 16, !tbaa !5
  store i1 false, ptr %12, align 1
  invoke void @__cxa_throw(ptr %44, ptr @_ZTIPN9clearpath16MessageExceptionE, ptr null) #10
          to label %101 unwind label %70

50:                                               ; preds = %84, %17, %3
  %51 = landingpad { ptr, i32 }
          cleanup
  %52 = extractvalue { ptr, i32 } %51, 0
  store ptr %52, ptr %7, align 8
  %53 = extractvalue { ptr, i32 } %51, 1
  store i32 %53, ptr %8, align 4
  br label %95

54:                                               ; preds = %25
  %55 = landingpad { ptr, i32 }
          cleanup
  %56 = extractvalue { ptr, i32 } %55, 0
  store ptr %56, ptr %7, align 8
  %57 = extractvalue { ptr, i32 } %55, 1
  store i32 %57, ptr %8, align 4
  br label %83

58:                                               ; preds = %38, %36, %33, %31, %29, %26
  %59 = landingpad { ptr, i32 }
          cleanup
  %60 = extractvalue { ptr, i32 } %59, 0
  store ptr %60, ptr %7, align 8
  %61 = extractvalue { ptr, i32 } %59, 1
  store i32 %61, ptr %8, align 4
  br label %82

62:                                               ; preds = %43
  %63 = landingpad { ptr, i32 }
          cleanup
  %64 = extractvalue { ptr, i32 } %63, 0
  store ptr %64, ptr %7, align 8
  %65 = extractvalue { ptr, i32 } %63, 1
  store i32 %65, ptr %8, align 4
  br label %78

66:                                               ; preds = %46
  %67 = landingpad { ptr, i32 }
          cleanup
  %68 = extractvalue { ptr, i32 } %67, 0
  store ptr %68, ptr %7, align 8
  %69 = extractvalue { ptr, i32 } %67, 1
  store i32 %69, ptr %8, align 4
  br label %74

70:                                               ; preds = %49, %47
  %71 = landingpad { ptr, i32 }
          cleanup
  %72 = extractvalue { ptr, i32 } %71, 0
  store ptr %72, ptr %7, align 8
  %73 = extractvalue { ptr, i32 } %71, 1
  store i32 %73, ptr %8, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #8
  br label %74

74:                                               ; preds = %70, %66
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #8
  %75 = load i1, ptr %11, align 1
  br i1 %75, label %76, label %77

76:                                               ; preds = %74
  call void @_ZdlPvm(ptr noundef %45, i64 noundef 16) #11
  br label %77

77:                                               ; preds = %76, %74
  br label %78

78:                                               ; preds = %77, %62
  %79 = load i1, ptr %12, align 1
  br i1 %79, label %80, label %81

80:                                               ; preds = %78
  call void @__cxa_free_exception(ptr %44) #8
  br label %81

81:                                               ; preds = %80, %78
  br label %82

82:                                               ; preds = %81, %58
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %9) #8
  br label %83

83:                                               ; preds = %82, %54
  call void @llvm.lifetime.end.p0(i64 392, ptr %9) #8
  br label %95

84:                                               ; preds = %19
  %85 = getelementptr inbounds %"class.clearpath::DataEncoders", ptr %13, i32 0, i32 1
  store i64 1, ptr %85, align 8, !tbaa !13
  %86 = getelementptr inbounds %"class.clearpath::DataEncoders", ptr %13, i32 0, i32 1
  %87 = load i64, ptr %86, align 8, !tbaa !13
  %88 = invoke noundef zeroext i8 @_ZN9clearpath12DataEncoders8getCountEv(ptr noundef nonnull align 8 dereferenceable(296) %13)
          to label %89 unwind label %50

89:                                               ; preds = %84
  %90 = zext i8 %88 to i32
  %91 = mul nsw i32 %90, 4
  %92 = sext i32 %91 to i64
  %93 = add i64 %87, %92
  %94 = getelementptr inbounds %"class.clearpath::DataEncoders", ptr %13, i32 0, i32 2
  store i64 %93, ptr %94, align 8, !tbaa !17
  ret void

95:                                               ; preds = %83, %50
  call void @_ZN9clearpath7MessageD2Ev(ptr noundef nonnull align 8 dereferenceable(273) %13) #8
  br label %96

96:                                               ; preds = %95
  %97 = load ptr, ptr %7, align 8
  %98 = load i32, ptr %8, align 4
  %99 = insertvalue { ptr, i32 } poison, ptr %97, 0
  %100 = insertvalue { ptr, i32 } %99, i32 %98, 1
  resume { ptr, i32 } %100

101:                                              ; preds = %49
  unreachable
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i8 @_ZN9clearpath12DataEncoders8getCountEv(ptr noundef nonnull align 8 dereferenceable(296)) #3 align 2

; Function Attrs: nounwind
declare void @_ZN9clearpath7MessageD2Ev(ptr noundef nonnull align 8 dereferenceable(273)) unnamed_addr #7

attributes #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 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nobuiltin allocsize(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 = { nobuiltin nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind "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 #8 = { nounwind }
attributes #9 = { builtin allocsize(0) }
attributes #10 = { noreturn }
attributes #11 = { builtin 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 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"vtable pointer", !8, i64 0}
!13 = !{!14, !10, i64 280}
!14 = !{!"_ZTSN9clearpath12DataEncodersE", !15, i64 0, !10, i64 280, !10, i64 288}
!15 = !{!"_ZTSN9clearpath7MessageE", !7, i64 8, !10, i64 264, !16, i64 272}
!16 = !{!"bool", !7, i64 0}
!17 = !{!14, !10, i64 288}


; 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::__cxx11::basic_stringstream" = type { %"class.std::basic_iostream.base", %"class.std::__cxx11::basic_stringbuf", %"class.std::basic_ios" }
%"class.std::basic_iostream.base" = type { %"class.std::basic_istream.base", %"class.std::basic_ostream.base" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"class.std::basic_ostream.base" = type { ptr }
%"class.std::__cxx11::basic_stringbuf" = type { %"class.std::basic_streambuf", i32, %"class.std::__cxx11::basic_string" }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }

@.str = external hidden unnamed_addr constant [28 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [15 x i8], align 1
@_ZTIPN9clearpath16MessageExceptionE = external dso_local constant { ptr, ptr, i32, ptr }, align 8
@_ZTVN9clearpath12DataEncodersE = external dso_local unnamed_addr constant { [5 x ptr] }, align 8

declare void @_ZN9clearpath7MessageC2EPvm(ptr noundef nonnull align 8 dereferenceable(273), ptr noundef, i64 noundef) unnamed_addr #0

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

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) #2

; Function Attrs: mustprogress uwtable
declare void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128)) unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) local_unnamed_addr #3 align 2

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #0

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare void @_ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(128)) local_unnamed_addr #3 align 2

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

declare void @_ZN9clearpath16MessageExceptionC1EPKcNS0_6errorsE(ptr noundef nonnull align 8 dereferenceable(12), ptr noundef, i32 noundef) unnamed_addr #0

declare void @__cxa_throw(ptr, ptr, ptr) local_unnamed_addr

; 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) #2

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #6

declare void @__cxa_free_exception(ptr) local_unnamed_addr

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN9clearpath12DataEncodersC2EPvm(ptr noundef nonnull align 8 dereferenceable(296) %0, ptr noundef %1, i64 noundef %2) unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.std::__cxx11::basic_stringstream", align 8
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  tail call void @_ZN9clearpath7MessageC2EPvm(ptr noundef nonnull align 8 dereferenceable(273) %0, ptr noundef %1, i64 noundef %2)
  store ptr getelementptr inbounds inrange(-16, 24) (i8, ptr @_ZTVN9clearpath12DataEncodersE, i64 16), ptr %0, align 8, !tbaa !5
  %6 = tail call noundef i64 @_ZN9clearpath7Message16getPayloadLengthEv(ptr noundef nonnull align 8 dereferenceable(273) %0)
  %7 = invoke noundef zeroext i8 @_ZN9clearpath12DataEncoders8getCountEv(ptr noundef nonnull align 8 dereferenceable(296) %0)
          to label %8 unwind label %36

8:                                                ; preds = %3
  %9 = zext i8 %7 to i64
  %10 = mul nuw nsw i64 %9, 6
  %11 = or disjoint i64 %10, 1
  %.not = icmp eq i64 %6, %11
  br i1 %.not, label %51, label %12

12:                                               ; preds = %8
  call void @llvm.lifetime.start.p0(i64 392, ptr nonnull %4) #8
  invoke void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128) %4)
          to label %13 unwind label %38

13:                                               ; preds = %12
  %14 = getelementptr inbounds i8, ptr %4, i64 16
  %15 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull @.str)
          to label %16 unwind label %40

16:                                               ; preds = %13
  %17 = call noundef i64 @_ZN9clearpath7Message16getPayloadLengthEv(ptr noundef nonnull align 8 dereferenceable(273) %0)
  %18 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) %15, i64 noundef %17)
          to label %19 unwind label %40

19:                                               ; preds = %16
  %20 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull @.str.1)
          to label %21 unwind label %40

21:                                               ; preds = %19
  %22 = invoke noundef zeroext i8 @_ZN9clearpath12DataEncoders8getCountEv(ptr noundef nonnull align 8 dereferenceable(296) %0)
          to label %23 unwind label %40

23:                                               ; preds = %21
  %24 = zext i8 %22 to i32
  %25 = mul nuw nsw i32 %24, 6
  %26 = or disjoint i32 %25, 1
  %27 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %20, i32 noundef %26)
          to label %28 unwind label %40

28:                                               ; preds = %23
  %29 = call ptr @__cxa_allocate_exception(i64 8) #8
  %30 = invoke noalias noundef nonnull dereferenceable(16) ptr @_Znwm(i64 noundef 16) #9
          to label %31 unwind label %42

31:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #8
  invoke void @_ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %5, ptr noundef nonnull align 8 dereferenceable(128) %4)
          to label %32 unwind label %.thread

32:                                               ; preds = %31
  %33 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %5) #8
  invoke void @_ZN9clearpath16MessageExceptionC1EPKcNS0_6errorsE(ptr noundef nonnull align 8 dereferenceable(12) %30, ptr noundef %33, i32 noundef 1)
          to label %35 unwind label %.thread25

.thread25:                                        ; preds = %32
  %34 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #8
  br label %45

35:                                               ; preds = %32
  store ptr %30, ptr %29, align 16, !tbaa !8
  invoke void @__cxa_throw(ptr nonnull %29, ptr nonnull @_ZTIPN9clearpath16MessageExceptionE, ptr null) #10
          to label %60 unwind label %46

36:                                               ; preds = %51, %3
  %37 = landingpad { ptr, i32 }
          cleanup
  br label %59

38:                                               ; preds = %12
  %39 = landingpad { ptr, i32 }
          cleanup
  br label %50

40:                                               ; preds = %23, %21, %19, %16, %13
  %41 = landingpad { ptr, i32 }
          cleanup
  br label %49

42:                                               ; preds = %28
  %43 = landingpad { ptr, i32 }
          cleanup
  br label %48

.thread:                                          ; preds = %31
  %44 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #8
  br label %45

45:                                               ; preds = %.thread25, %.thread
  %.pn23 = phi { ptr, i32 } [ %44, %.thread ], [ %34, %.thread25 ]
  call void @_ZdlPvm(ptr noundef nonnull %30, i64 noundef 16) #11
  br label %48

46:                                               ; preds = %35
  %47 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #8
  br label %49

48:                                               ; preds = %45, %42
  %.pn.pn.ph = phi { ptr, i32 } [ %43, %42 ], [ %.pn23, %45 ]
  call void @__cxa_free_exception(ptr %29) #8
  br label %49

49:                                               ; preds = %46, %48, %40
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.ph, %48 ], [ %47, %46 ], [ %41, %40 ]
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %4) #8
  br label %50

50:                                               ; preds = %49, %38
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %49 ], [ %39, %38 ]
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %4) #8
  br label %59

51:                                               ; preds = %8
  %52 = getelementptr inbounds i8, ptr %0, i64 280
  store i64 1, ptr %52, align 8, !tbaa !11
  %53 = invoke noundef zeroext i8 @_ZN9clearpath12DataEncoders8getCountEv(ptr noundef nonnull align 8 dereferenceable(296) %0)
          to label %54 unwind label %36

54:                                               ; preds = %51
  %55 = zext i8 %53 to i64
  %56 = shl nuw nsw i64 %55, 2
  %57 = or disjoint i64 %56, 1
  %58 = getelementptr inbounds i8, ptr %0, i64 288
  store i64 %57, ptr %58, align 8, !tbaa !16
  ret void

59:                                               ; preds = %50, %36
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn, %50 ], [ %37, %36 ]
  call void @_ZN9clearpath7MessageD2Ev(ptr noundef nonnull align 8 dereferenceable(273) %0) #8
  resume { ptr, i32 } %.pn.pn.pn.pn.pn

60:                                               ; preds = %35
  unreachable
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i8 @_ZN9clearpath12DataEncoders8getCountEv(ptr noundef nonnull align 8 dereferenceable(296)) local_unnamed_addr #3 align 2

; Function Attrs: nounwind
declare void @_ZN9clearpath7MessageD2Ev(ptr noundef nonnull align 8 dereferenceable(273)) unnamed_addr #7

attributes #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 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nobuiltin allocsize(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 = { nobuiltin nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind "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 #8 = { nounwind }
attributes #9 = { builtin allocsize(0) }
attributes #10 = { noreturn }
attributes #11 = { builtin 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = !{!12, !14, i64 280}
!12 = !{!"_ZTSN9clearpath12DataEncodersE", !13, i64 0, !14, i64 280, !14, i64 288}
!13 = !{!"_ZTSN9clearpath7MessageE", !10, i64 8, !14, i64 264, !15, i64 272}
!14 = !{!"long", !10, i64 0}
!15 = !{!"bool", !10, i64 0}
!16 = !{!12, !14, i64 288}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass