; 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::DataSystemStatus" = type { %"class.clearpath::Message.base", i8, i8, i8, [4 x i8] }
%"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
@_ZTVN9clearpath16DataSystemStatusE = 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 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 @_ZN9clearpath16DataSystemStatusC2EPvm(ptr noundef nonnull align 8 dereferenceable(276) %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 i64, align 8
  %10 = alloca %"class.std::__cxx11::basic_stringstream", align 8
  %11 = alloca %"class.std::__cxx11::basic_string", align 8
  %12 = alloca i1, align 1
  %13 = 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
  %14 = load ptr, ptr %4, align 8
  %15 = load ptr, ptr %5, align 8, !tbaa !5
  %16 = load i64, ptr %6, align 8, !tbaa !9
  call void @_ZN9clearpath7MessageC2EPvm(ptr noundef nonnull align 8 dereferenceable(273) %14, ptr noundef %15, i64 noundef %16)
  store ptr getelementptr inbounds inrange(-16, 24) ({ [5 x ptr] }, ptr @_ZTVN9clearpath16DataSystemStatusE, i32 0, i32 0, i32 2), ptr %14, align 8, !tbaa !11
  %17 = getelementptr inbounds %"class.clearpath::DataSystemStatus", ptr %14, i32 0, i32 1
  store i8 4, ptr %17, align 1, !tbaa !13
  %18 = getelementptr inbounds %"class.clearpath::DataSystemStatus", ptr %14, i32 0, i32 1
  %19 = load i8, ptr %18, align 1, !tbaa !13
  %20 = zext i8 %19 to i32
  %21 = add nsw i32 %20, 1
  %22 = invoke noundef zeroext i8 @_ZN9clearpath16DataSystemStatus16getVoltagesCountEv(ptr noundef nonnull align 8 dereferenceable(276) %14)
          to label %23 unwind label %81

23:                                               ; preds = %3
  %24 = zext i8 %22 to i32
  %25 = mul nsw i32 %24, 2
  %26 = add nsw i32 %21, %25
  %27 = trunc i32 %26 to i8
  %28 = getelementptr inbounds %"class.clearpath::DataSystemStatus", ptr %14, i32 0, i32 2
  store i8 %27, ptr %28, align 2, !tbaa !17
  %29 = getelementptr inbounds %"class.clearpath::DataSystemStatus", ptr %14, i32 0, i32 2
  %30 = load i8, ptr %29, align 2, !tbaa !17
  %31 = zext i8 %30 to i32
  %32 = add nsw i32 %31, 1
  %33 = invoke noundef zeroext i8 @_ZN9clearpath16DataSystemStatus16getCurrentsCountEv(ptr noundef nonnull align 8 dereferenceable(276) %14)
          to label %34 unwind label %81

34:                                               ; preds = %23
  %35 = zext i8 %33 to i32
  %36 = mul nsw i32 %35, 2
  %37 = add nsw i32 %32, %36
  %38 = trunc i32 %37 to i8
  %39 = getelementptr inbounds %"class.clearpath::DataSystemStatus", ptr %14, i32 0, i32 3
  store i8 %38, ptr %39, align 1, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #8
  %40 = invoke noundef zeroext i8 @_ZN9clearpath16DataSystemStatus16getVoltagesCountEv(ptr noundef nonnull align 8 dereferenceable(276) %14)
          to label %41 unwind label %85

41:                                               ; preds = %34
  %42 = zext i8 %40 to i32
  %43 = mul nsw i32 2, %42
  %44 = add nsw i32 7, %43
  %45 = invoke noundef zeroext i8 @_ZN9clearpath16DataSystemStatus16getCurrentsCountEv(ptr noundef nonnull align 8 dereferenceable(276) %14)
          to label %46 unwind label %85

46:                                               ; preds = %41
  %47 = zext i8 %45 to i32
  %48 = mul nsw i32 2, %47
  %49 = add nsw i32 %44, %48
  %50 = invoke noundef zeroext i8 @_ZN9clearpath16DataSystemStatus20getTemperaturesCountEv(ptr noundef nonnull align 8 dereferenceable(276) %14)
          to label %51 unwind label %85

51:                                               ; preds = %46
  %52 = zext i8 %50 to i32
  %53 = mul nsw i32 2, %52
  %54 = add nsw i32 %49, %53
  %55 = sext i32 %54 to i64
  store i64 %55, ptr %9, align 8, !tbaa !9
  %56 = invoke noundef i64 @_ZN9clearpath7Message16getPayloadLengthEv(ptr noundef nonnull align 8 dereferenceable(273) %14)
          to label %57 unwind label %85

57:                                               ; preds = %51
  %58 = load i64, ptr %9, align 8, !tbaa !9
  %59 = icmp ne i64 %56, %58
  br i1 %59, label %60, label %119

60:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 392, ptr %10) #8
  invoke void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128) %10)
          to label %61 unwind label %89

61:                                               ; preds = %60
  %62 = getelementptr inbounds i8, ptr %10, i64 16
  %63 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %62, ptr noundef @.str)
          to label %64 unwind label %93

64:                                               ; preds = %61
  %65 = invoke noundef i64 @_ZN9clearpath7Message16getPayloadLengthEv(ptr noundef nonnull align 8 dereferenceable(273) %14)
          to label %66 unwind label %93

66:                                               ; preds = %64
  %67 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) %63, i64 noundef %65)
          to label %68 unwind label %93

68:                                               ; preds = %66
  %69 = getelementptr inbounds i8, ptr %10, i64 16
  %70 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %69, ptr noundef @.str.1)
          to label %71 unwind label %93

71:                                               ; preds = %68
  %72 = load i64, ptr %9, align 8, !tbaa !9
  %73 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) %70, i64 noundef %72)
          to label %74 unwind label %93

74:                                               ; preds = %71
  store i1 true, ptr %13, align 1
  %75 = call ptr @__cxa_allocate_exception(i64 8) #8
  %76 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 16) #9
          to label %77 unwind label %97

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

78:                                               ; preds = %77
  %79 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %11) #8
  invoke void @_ZN9clearpath16MessageExceptionC1EPKcNS0_6errorsE(ptr noundef nonnull align 8 dereferenceable(12) %76, ptr noundef %79, i32 noundef 1)
          to label %80 unwind label %105

80:                                               ; preds = %78
  store i1 false, ptr %12, align 1
  store ptr %76, ptr %75, align 16, !tbaa !5
  store i1 false, ptr %13, align 1
  invoke void @__cxa_throw(ptr %75, ptr @_ZTIPN9clearpath16MessageExceptionE, ptr null) #10
          to label %127 unwind label %105

81:                                               ; preds = %23, %3
  %82 = landingpad { ptr, i32 }
          cleanup
  %83 = extractvalue { ptr, i32 } %82, 0
  store ptr %83, ptr %7, align 8
  %84 = extractvalue { ptr, i32 } %82, 1
  store i32 %84, ptr %8, align 4
  br label %121

85:                                               ; preds = %51, %46, %41, %34
  %86 = landingpad { ptr, i32 }
          cleanup
  %87 = extractvalue { ptr, i32 } %86, 0
  store ptr %87, ptr %7, align 8
  %88 = extractvalue { ptr, i32 } %86, 1
  store i32 %88, ptr %8, align 4
  br label %120

89:                                               ; preds = %60
  %90 = landingpad { ptr, i32 }
          cleanup
  %91 = extractvalue { ptr, i32 } %90, 0
  store ptr %91, ptr %7, align 8
  %92 = extractvalue { ptr, i32 } %90, 1
  store i32 %92, ptr %8, align 4
  br label %118

93:                                               ; preds = %71, %68, %66, %64, %61
  %94 = landingpad { ptr, i32 }
          cleanup
  %95 = extractvalue { ptr, i32 } %94, 0
  store ptr %95, ptr %7, align 8
  %96 = extractvalue { ptr, i32 } %94, 1
  store i32 %96, ptr %8, align 4
  br label %117

97:                                               ; preds = %74
  %98 = landingpad { ptr, i32 }
          cleanup
  %99 = extractvalue { ptr, i32 } %98, 0
  store ptr %99, ptr %7, align 8
  %100 = extractvalue { ptr, i32 } %98, 1
  store i32 %100, ptr %8, align 4
  br label %113

101:                                              ; preds = %77
  %102 = landingpad { ptr, i32 }
          cleanup
  %103 = extractvalue { ptr, i32 } %102, 0
  store ptr %103, ptr %7, align 8
  %104 = extractvalue { ptr, i32 } %102, 1
  store i32 %104, ptr %8, align 4
  br label %109

105:                                              ; preds = %80, %78
  %106 = landingpad { ptr, i32 }
          cleanup
  %107 = extractvalue { ptr, i32 } %106, 0
  store ptr %107, ptr %7, align 8
  %108 = extractvalue { ptr, i32 } %106, 1
  store i32 %108, ptr %8, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #8
  br label %109

109:                                              ; preds = %105, %101
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #8
  %110 = load i1, ptr %12, align 1
  br i1 %110, label %111, label %112

111:                                              ; preds = %109
  call void @_ZdlPvm(ptr noundef %76, i64 noundef 16) #11
  br label %112

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

113:                                              ; preds = %112, %97
  %114 = load i1, ptr %13, align 1
  br i1 %114, label %115, label %116

115:                                              ; preds = %113
  call void @__cxa_free_exception(ptr %75) #8
  br label %116

116:                                              ; preds = %115, %113
  br label %117

117:                                              ; preds = %116, %93
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %10) #8
  br label %118

118:                                              ; preds = %117, %89
  call void @llvm.lifetime.end.p0(i64 392, ptr %10) #8
  br label %120

119:                                              ; preds = %57
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  ret void

120:                                              ; preds = %118, %85
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  br label %121

121:                                              ; preds = %120, %81
  call void @_ZN9clearpath7MessageD2Ev(ptr noundef nonnull align 8 dereferenceable(273) %14) #8
  br label %122

122:                                              ; preds = %121
  %123 = load ptr, ptr %7, align 8
  %124 = load i32, ptr %8, align 4
  %125 = insertvalue { ptr, i32 } poison, ptr %123, 0
  %126 = insertvalue { ptr, i32 } %125, i32 %124, 1
  resume { ptr, i32 } %126

127:                                              ; preds = %80
  unreachable
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i8 @_ZN9clearpath16DataSystemStatus20getTemperaturesCountEv(ptr noundef nonnull align 8 dereferenceable(276)) #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, !7, i64 273}
!14 = !{!"_ZTSN9clearpath16DataSystemStatusE", !15, i64 0, !7, i64 273, !7, i64 274, !7, i64 275}
!15 = !{!"_ZTSN9clearpath7MessageE", !7, i64 8, !10, i64 264, !16, i64 272}
!16 = !{!"bool", !7, i64 0}
!17 = !{!14, !7, i64 274}
!18 = !{!14, !7, i64 275}


; 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
@_ZTVN9clearpath16DataSystemStatusE = 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 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 @_ZN9clearpath16DataSystemStatusC2EPvm(ptr noundef nonnull align 8 dereferenceable(276) %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 @_ZTVN9clearpath16DataSystemStatusE, i64 16), ptr %0, align 8, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %0, i64 273
  store i8 4, ptr %6, align 1, !tbaa !8
  %7 = invoke noundef zeroext i8 @_ZN9clearpath16DataSystemStatus16getVoltagesCountEv(ptr noundef nonnull align 8 dereferenceable(276) %0)
          to label %8 unwind label %51

8:                                                ; preds = %3
  %9 = shl i8 %7, 1
  %10 = add i8 %9, 5
  %11 = getelementptr inbounds i8, ptr %0, i64 274
  store i8 %10, ptr %11, align 2, !tbaa !14
  %12 = invoke noundef zeroext i8 @_ZN9clearpath16DataSystemStatus16getCurrentsCountEv(ptr noundef nonnull align 8 dereferenceable(276) %0)
          to label %13 unwind label %51

13:                                               ; preds = %8
  %14 = add i8 %9, 6
  %15 = shl i8 %12, 1
  %16 = add i8 %14, %15
  %17 = getelementptr inbounds i8, ptr %0, i64 275
  store i8 %16, ptr %17, align 1, !tbaa !15
  %18 = invoke noundef zeroext i8 @_ZN9clearpath16DataSystemStatus16getVoltagesCountEv(ptr noundef nonnull align 8 dereferenceable(276) %0)
          to label %19 unwind label %53

19:                                               ; preds = %13
  %20 = invoke noundef zeroext i8 @_ZN9clearpath16DataSystemStatus16getCurrentsCountEv(ptr noundef nonnull align 8 dereferenceable(276) %0)
          to label %21 unwind label %53

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

23:                                               ; preds = %21
  %24 = zext i8 %20 to i64
  %25 = zext i8 %18 to i64
  %26 = add nuw nsw i64 %24, %25
  %27 = zext i8 %22 to i64
  %28 = add nuw nsw i64 %26, %27
  %29 = shl nuw nsw i64 %28, 1
  %30 = add nuw nsw i64 %29, 7
  %31 = tail call noundef i64 @_ZN9clearpath7Message16getPayloadLengthEv(ptr noundef nonnull align 8 dereferenceable(273) %0)
  %.not = icmp eq i64 %31, %30
  br i1 %.not, label %68, label %32

32:                                               ; preds = %23
  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 %33 unwind label %55

33:                                               ; preds = %32
  %34 = getelementptr inbounds i8, ptr %4, 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 nonnull @.str)
          to label %36 unwind label %57

36:                                               ; preds = %33
  %37 = call noundef i64 @_ZN9clearpath7Message16getPayloadLengthEv(ptr noundef nonnull align 8 dereferenceable(273) %0)
  %38 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) %35, i64 noundef %37)
          to label %39 unwind label %57

39:                                               ; preds = %36
  %40 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %34, ptr noundef nonnull @.str.1)
          to label %41 unwind label %57

41:                                               ; preds = %39
  %42 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) %40, i64 noundef %30)
          to label %43 unwind label %57

43:                                               ; preds = %41
  %44 = call ptr @__cxa_allocate_exception(i64 8) #8
  %45 = invoke noalias noundef nonnull dereferenceable(16) ptr @_Znwm(i64 noundef 16) #9
          to label %46 unwind label %59

46:                                               ; preds = %43
  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 %47 unwind label %.thread

47:                                               ; preds = %46
  %48 = 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) %45, ptr noundef %48, i32 noundef 1)
          to label %50 unwind label %.thread30

.thread30:                                        ; preds = %47
  %49 = 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 %62

50:                                               ; preds = %47
  store ptr %45, ptr %44, align 16, !tbaa !16
  invoke void @__cxa_throw(ptr nonnull %44, ptr nonnull @_ZTIPN9clearpath16MessageExceptionE, ptr null) #10
          to label %70 unwind label %63

51:                                               ; preds = %8, %3
  %52 = landingpad { ptr, i32 }
          cleanup
  br label %69

53:                                               ; preds = %21, %19, %13
  %54 = landingpad { ptr, i32 }
          cleanup
  br label %69

55:                                               ; preds = %32
  %56 = landingpad { ptr, i32 }
          cleanup
  br label %67

57:                                               ; preds = %41, %39, %36, %33
  %58 = landingpad { ptr, i32 }
          cleanup
  br label %66

59:                                               ; preds = %43
  %60 = landingpad { ptr, i32 }
          cleanup
  br label %65

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

62:                                               ; preds = %.thread30, %.thread
  %.pn28 = phi { ptr, i32 } [ %61, %.thread ], [ %49, %.thread30 ]
  call void @_ZdlPvm(ptr noundef nonnull %45, i64 noundef 16) #11
  br label %65

63:                                               ; preds = %50
  %64 = 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 %66

65:                                               ; preds = %62, %59
  %.pn.pn.ph = phi { ptr, i32 } [ %60, %59 ], [ %.pn28, %62 ]
  call void @__cxa_free_exception(ptr %44) #8
  br label %66

66:                                               ; preds = %63, %65, %57
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.ph, %65 ], [ %64, %63 ], [ %58, %57 ]
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %4) #8
  br label %67

67:                                               ; preds = %66, %55
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %66 ], [ %56, %55 ]
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %4) #8
  br label %69

68:                                               ; preds = %23
  ret void

69:                                               ; preds = %53, %67, %51
  %.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %52, %51 ], [ %.pn.pn.pn.pn, %67 ], [ %54, %53 ]
  call void @_ZN9clearpath7MessageD2Ev(ptr noundef nonnull align 8 dereferenceable(273) %0) #8
  resume { ptr, i32 } %.pn.pn.pn.pn.pn.pn

70:                                               ; preds = %50
  unreachable
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i8 @_ZN9clearpath16DataSystemStatus20getTemperaturesCountEv(ptr noundef nonnull align 8 dereferenceable(276)) 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, !11, i64 273}
!9 = !{!"_ZTSN9clearpath16DataSystemStatusE", !10, i64 0, !11, i64 273, !11, i64 274, !11, i64 275}
!10 = !{!"_ZTSN9clearpath7MessageE", !11, i64 8, !12, i64 264, !13, i64 272}
!11 = !{!"omnipotent char", !7, i64 0}
!12 = !{!"long", !11, i64 0}
!13 = !{!"bool", !11, i64 0}
!14 = !{!9, !11, i64 274}
!15 = !{!9, !11, i64 275}
!16 = !{!17, !17, i64 0}
!17 = !{!"any pointer", !11, i64 0}


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