; LLVM IR from dmr-goncalves/HumanAwareRobotNavigation :: src/hokuyo/src (timestamp_test)

; 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.hokuyo::Laser" = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i64, i32, %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", [256 x i8], i32, i32 }
%"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] }
%"struct.hokuyo::LaserScan" = type { %"class.std::vector.3", %"class.std::vector.3", i64, i64, %"struct.hokuyo::LaserConfig" }
%"class.std::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl" }
%"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl" = type { %"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl_data" }
%"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.hokuyo::LaserConfig" = type { float, float, float, float, float, float, float, float }
%"class.hokuyo::Exception" = type { %"class.std::runtime_error" }
%"class.std::runtime_error" = type { %"class.std::exception", %"struct.std::__cow_string" }
%"class.std::exception" = type { ptr }
%"struct.std::__cow_string" = type { %union.anon.8 }
%union.anon.8 = type { ptr }

@stderr = external global ptr, align 8
@.str.7 = external hidden unnamed_addr constant [30 x i8], align 1
@_ZTIN6hokuyo9ExceptionE = external dso_local constant { ptr, ptr, ptr }, align 8
@.str.8 = external hidden unnamed_addr constant [4 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

declare noundef i32 @_ZN6hokuyo5Laser12requestScansEbddiiii(ptr noundef nonnull align 8 dereferenceable(480), i1 noundef zeroext, double noundef, double noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #1

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6hokuyo9LaserScanC2Ev(ptr noundef nonnull align 8 dereferenceable(96)) unnamed_addr #3 align 2

declare noundef i32 @_ZN6hokuyo5Laser11serviceScanERNS_9LaserScanEi(ptr noundef nonnull align 8 dereferenceable(480), ptr noundef nonnull align 8 dereferenceable(96), i32 noundef) #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6hokuyo9LaserScanD2Ev(ptr noundef nonnull align 8 dereferenceable(96)) unnamed_addr #3 align 2

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr noundef %1) #4 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %"class.hokuyo::Laser", align 8
  %8 = alloca %"struct.hokuyo::LaserScan", align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %"class.hokuyo::Exception", align 8
  %12 = alloca %"class.hokuyo::Exception", align 8
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  %13 = load i32, ptr %4, align 4, !tbaa !5
  %14 = icmp ne i32 %13, 2
  br i1 %14, label %15, label %18

15:                                               ; preds = %2
  %16 = load ptr, ptr @stderr, align 8, !tbaa !9
  %17 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %16, ptr noundef @.str.7) #6
  ret i32 1

18:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  %19 = load ptr, ptr %5, align 8, !tbaa !9
  %20 = getelementptr inbounds ptr, ptr %19, i64 1
  %21 = load ptr, ptr %20, align 8, !tbaa !9
  store ptr %21, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 480, ptr %7) #6
  call void @_ZN6hokuyo5LaserC1Ev(ptr noundef nonnull align 8 dereferenceable(480) %7)
  call void @llvm.lifetime.start.p0(i64 96, ptr %8) #6
  call void @_ZN6hokuyo9LaserScanC2Ev(ptr noundef nonnull align 8 dereferenceable(96) %8) #6
  %22 = load ptr, ptr %6, align 8, !tbaa !9
  invoke void @_ZN6hokuyo5Laser4openEPKc(ptr noundef nonnull align 8 dereferenceable(480) %7, ptr noundef %22)
          to label %23 unwind label %32

23:                                               ; preds = %18
  br label %24

24:                                               ; preds = %75, %23
  br label %25

25:                                               ; preds = %24
  %26 = invoke noundef i32 @_ZN6hokuyo5Laser7laserOnEv(ptr noundef nonnull align 8 dereferenceable(480) %7)
          to label %27 unwind label %36

27:                                               ; preds = %25
  %28 = invoke noundef i32 @_ZN6hokuyo5Laser12requestScansEbddiiii(ptr noundef nonnull align 8 dereferenceable(480) %7, i1 noundef zeroext true, double noundef -2.356200e+00, double noundef 2.356200e+00, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef -1)
          to label %29 unwind label %36

29:                                               ; preds = %27
  %30 = invoke noundef i32 @_ZN6hokuyo5Laser11serviceScanERNS_9LaserScanEi(ptr noundef nonnull align 8 dereferenceable(480) %7, ptr noundef nonnull align 8 dereferenceable(96) %8, i32 noundef -1)
          to label %31 unwind label %36

31:                                               ; preds = %29
  br label %52

32:                                               ; preds = %18
  %33 = landingpad { ptr, i32 }
          cleanup
  %34 = extractvalue { ptr, i32 } %33, 0
  store ptr %34, ptr %9, align 8
  %35 = extractvalue { ptr, i32 } %33, 1
  store i32 %35, ptr %10, align 4
  br label %80

36:                                               ; preds = %29, %27, %25
  %37 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN6hokuyo9ExceptionE
  %38 = extractvalue { ptr, i32 } %37, 0
  store ptr %38, ptr %9, align 8
  %39 = extractvalue { ptr, i32 } %37, 1
  store i32 %39, ptr %10, align 4
  br label %40

40:                                               ; preds = %36
  %41 = load i32, ptr %10, align 4
  %42 = call i32 @llvm.eh.typeid.for.p0(ptr @_ZTIN6hokuyo9ExceptionE) #6
  %43 = icmp eq i32 %41, %42
  br i1 %43, label %44, label %80

44:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #6
  %45 = load ptr, ptr %9, align 8
  %46 = call ptr @__cxa_get_exception_ptr(ptr %45) #6
  call void @_ZN6hokuyo9ExceptionC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef nonnull align 8 dereferenceable(16) %46) #6
  %47 = call ptr @__cxa_begin_catch(ptr %45) #6
  %48 = load ptr, ptr @stderr, align 8, !tbaa !9
  %49 = call noundef ptr @_ZNKSt13runtime_error4whatEv(ptr noundef nonnull align 8 dereferenceable(16) %11) #6
  %50 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %48, ptr noundef @.str.8, ptr noundef %49) #6
  call void @_ZNSt13runtime_errorD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %11) #6
  invoke void @__cxa_end_catch()
          to label %51 unwind label %55

51:                                               ; preds = %44
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #6
  br label %52

52:                                               ; preds = %51, %31
  %53 = invoke noundef i32 @_ZN6hokuyo5Laser12stopScanningEv(ptr noundef nonnull align 8 dereferenceable(480) %7)
          to label %54 unwind label %59

54:                                               ; preds = %52
  br label %75

55:                                               ; preds = %44
  %56 = landingpad { ptr, i32 }
          cleanup
  %57 = extractvalue { ptr, i32 } %56, 0
  store ptr %57, ptr %9, align 8
  %58 = extractvalue { ptr, i32 } %56, 1
  store i32 %58, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #6
  br label %80

59:                                               ; preds = %52
  %60 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN6hokuyo9ExceptionE
  %61 = extractvalue { ptr, i32 } %60, 0
  store ptr %61, ptr %9, align 8
  %62 = extractvalue { ptr, i32 } %60, 1
  store i32 %62, ptr %10, align 4
  br label %63

63:                                               ; preds = %59
  %64 = load i32, ptr %10, align 4
  %65 = call i32 @llvm.eh.typeid.for.p0(ptr @_ZTIN6hokuyo9ExceptionE) #6
  %66 = icmp eq i32 %64, %65
  br i1 %66, label %67, label %80

67:                                               ; preds = %63
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #6
  %68 = load ptr, ptr %9, align 8
  %69 = call ptr @__cxa_get_exception_ptr(ptr %68) #6
  call void @_ZN6hokuyo9ExceptionC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 8 dereferenceable(16) %69) #6
  %70 = call ptr @__cxa_begin_catch(ptr %68) #6
  %71 = load ptr, ptr @stderr, align 8, !tbaa !9
  %72 = call noundef ptr @_ZNKSt13runtime_error4whatEv(ptr noundef nonnull align 8 dereferenceable(16) %12) #6
  %73 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %71, ptr noundef @.str.8, ptr noundef %72) #6
  call void @_ZNSt13runtime_errorD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %12) #6
  invoke void @__cxa_end_catch()
          to label %74 unwind label %76

74:                                               ; preds = %67
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #6
  br label %75

75:                                               ; preds = %74, %54
  br label %24, !llvm.loop !11

76:                                               ; preds = %67
  %77 = landingpad { ptr, i32 }
          cleanup
  %78 = extractvalue { ptr, i32 } %77, 0
  store ptr %78, ptr %9, align 8
  %79 = extractvalue { ptr, i32 } %77, 1
  store i32 %79, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #6
  br label %80

80:                                               ; preds = %76, %63, %55, %40, %32
  call void @_ZN6hokuyo9LaserScanD2Ev(ptr noundef nonnull align 8 dereferenceable(96) %8) #6
  call void @llvm.lifetime.end.p0(i64 96, ptr %8) #6
  call void @_ZN6hokuyo5LaserD1Ev(ptr noundef nonnull align 8 dereferenceable(480) %7) #6
  call void @llvm.lifetime.end.p0(i64 480, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  br label %81

81:                                               ; preds = %80
  %82 = load ptr, ptr %9, align 8
  %83 = load i32, ptr %10, align 4
  %84 = insertvalue { ptr, i32 } poison, ptr %82, 0
  %85 = insertvalue { ptr, i32 } %84, i32 %83, 1
  resume { ptr, i32 } %85
}

declare void @_ZN6hokuyo5LaserC1Ev(ptr noundef nonnull align 8 dereferenceable(480)) unnamed_addr #1

declare void @_ZN6hokuyo5Laser4openEPKc(ptr noundef nonnull align 8 dereferenceable(480), ptr noundef) #1

declare noundef i32 @_ZN6hokuyo5Laser7laserOnEv(ptr noundef nonnull align 8 dereferenceable(480)) #1

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

declare ptr @__cxa_get_exception_ptr(ptr)

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6hokuyo9ExceptionC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #3 align 2

declare ptr @__cxa_begin_catch(ptr)

; Function Attrs: nounwind
declare noundef ptr @_ZNKSt13runtime_error4whatEv(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #2

; Function Attrs: nounwind
declare void @_ZNSt13runtime_errorD2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #2

declare void @__cxa_end_catch()

declare noundef i32 @_ZN6hokuyo5Laser12stopScanningEv(ptr noundef nonnull align 8 dereferenceable(480)) #1

; Function Attrs: nounwind
declare void @_ZN6hokuyo5LaserD1Ev(ptr noundef nonnull align 8 dereferenceable(480)) unnamed_addr #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 = { 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 #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress norecurse 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 = { nounwind memory(none) }
attributes #6 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}


; 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.hokuyo::Laser" = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i64, i32, %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", [256 x i8], i32, i32 }
%"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] }
%"struct.hokuyo::LaserScan" = type { %"class.std::vector.3", %"class.std::vector.3", i64, i64, %"struct.hokuyo::LaserConfig" }
%"class.std::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl" }
%"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl" = type { %"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl_data" }
%"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.hokuyo::LaserConfig" = type { float, float, float, float, float, float, float, float }
%"class.hokuyo::Exception" = type { %"class.std::runtime_error" }
%"class.std::runtime_error" = type { %"class.std::exception", %"struct.std::__cow_string" }
%"class.std::exception" = type { ptr }
%"struct.std::__cow_string" = type { %union.anon.8 }
%union.anon.8 = type { ptr }

@stderr = external local_unnamed_addr global ptr, align 8
@.str.7 = external hidden unnamed_addr constant [30 x i8], align 1
@_ZTIN6hokuyo9ExceptionE = external dso_local constant { ptr, ptr, ptr }, align 8
@.str.8 = external hidden unnamed_addr constant [4 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

declare noundef i32 @_ZN6hokuyo5Laser12requestScansEbddiiii(ptr noundef nonnull align 8 dereferenceable(480), i1 noundef zeroext, double noundef, double noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6hokuyo9LaserScanC2Ev(ptr noundef nonnull align 8 dereferenceable(96)) unnamed_addr #3 align 2

declare noundef i32 @_ZN6hokuyo5Laser11serviceScanERNS_9LaserScanEi(ptr noundef nonnull align 8 dereferenceable(480), ptr noundef nonnull align 8 dereferenceable(96), i32 noundef) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6hokuyo9LaserScanD2Ev(ptr noundef nonnull align 8 dereferenceable(96)) unnamed_addr #3 align 2

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #4 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.hokuyo::Laser", align 8
  %4 = alloca %"struct.hokuyo::LaserScan", align 8
  %5 = alloca %"class.hokuyo::Exception", align 8
  %6 = alloca %"class.hokuyo::Exception", align 8
  %.not = icmp eq i32 %0, 2
  br i1 %.not, label %10, label %7

7:                                                ; preds = %2
  %8 = load ptr, ptr @stderr, align 8, !tbaa !5
  %9 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %8, ptr noundef nonnull @.str.7) #7
  ret i32 1

10:                                               ; preds = %2
  %11 = getelementptr inbounds i8, ptr %1, i64 8
  %12 = load ptr, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 480, ptr nonnull %3) #8
  call void @_ZN6hokuyo5LaserC1Ev(ptr noundef nonnull align 8 dereferenceable(480) %3)
  call void @llvm.lifetime.start.p0(i64 96, ptr nonnull %4) #8
  call void @_ZN6hokuyo9LaserScanC2Ev(ptr noundef nonnull align 8 dereferenceable(96) %4) #8
  invoke void @_ZN6hokuyo5Laser4openEPKc(ptr noundef nonnull align 8 dereferenceable(480) %3, ptr noundef %12)
          to label %.preheader unwind label %18

.preheader:                                       ; preds = %10, %.preheader.backedge
  %13 = invoke noundef i32 @_ZN6hokuyo5Laser7laserOnEv(ptr noundef nonnull align 8 dereferenceable(480) %3)
          to label %14 unwind label %20

14:                                               ; preds = %.preheader
  %15 = invoke noundef i32 @_ZN6hokuyo5Laser12requestScansEbddiiii(ptr noundef nonnull align 8 dereferenceable(480) %3, i1 noundef zeroext true, double noundef -2.356200e+00, double noundef 2.356200e+00, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef -1)
          to label %16 unwind label %20

16:                                               ; preds = %14
  %17 = invoke noundef i32 @_ZN6hokuyo5Laser11serviceScanERNS_9LaserScanEi(ptr noundef nonnull align 8 dereferenceable(480) %3, ptr noundef nonnull align 8 dereferenceable(96) %4, i32 noundef -1)
          to label %33 unwind label %20

18:                                               ; preds = %10
  %19 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit

20:                                               ; preds = %16, %14, %.preheader
  %21 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN6hokuyo9ExceptionE
  %22 = extractvalue { ptr, i32 } %21, 1
  %23 = call i32 @llvm.eh.typeid.for.p0(ptr nonnull @_ZTIN6hokuyo9ExceptionE) #8
  %24 = icmp eq i32 %22, %23
  br i1 %24, label %25, label %.loopexit

25:                                               ; preds = %20
  %26 = extractvalue { ptr, i32 } %21, 0
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #8
  %27 = call ptr @__cxa_get_exception_ptr(ptr %26) #8
  call void @_ZN6hokuyo9ExceptionC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(16) %27) #8
  %28 = call ptr @__cxa_begin_catch(ptr %26) #8
  %29 = load ptr, ptr @stderr, align 8, !tbaa !5
  %30 = call noundef ptr @_ZNKSt13runtime_error4whatEv(ptr noundef nonnull align 8 dereferenceable(16) %5) #8
  %31 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %29, ptr noundef nonnull @.str.8, ptr noundef %30) #7
  call void @_ZNSt13runtime_errorD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #8
  invoke void @__cxa_end_catch()
          to label %32 unwind label %35

32:                                               ; preds = %25
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #8
  br label %33

33:                                               ; preds = %16, %32
  %34 = invoke noundef i32 @_ZN6hokuyo5Laser12stopScanningEv(ptr noundef nonnull align 8 dereferenceable(480) %3)
          to label %.preheader.backedge unwind label %37

.preheader.backedge:                              ; preds = %33, %49
  br label %.preheader, !llvm.loop !9

35:                                               ; preds = %25
  %36 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #8
  br label %.loopexit

37:                                               ; preds = %33
  %38 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN6hokuyo9ExceptionE
  %39 = extractvalue { ptr, i32 } %38, 1
  %40 = call i32 @llvm.eh.typeid.for.p0(ptr nonnull @_ZTIN6hokuyo9ExceptionE) #8
  %41 = icmp eq i32 %39, %40
  br i1 %41, label %42, label %.loopexit

42:                                               ; preds = %37
  %43 = extractvalue { ptr, i32 } %38, 0
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #8
  %44 = call ptr @__cxa_get_exception_ptr(ptr %43) #8
  call void @_ZN6hokuyo9ExceptionC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(16) %44) #8
  %45 = call ptr @__cxa_begin_catch(ptr %43) #8
  %46 = load ptr, ptr @stderr, align 8, !tbaa !5
  %47 = call noundef ptr @_ZNKSt13runtime_error4whatEv(ptr noundef nonnull align 8 dereferenceable(16) %6) #8
  %48 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %46, ptr noundef nonnull @.str.8, ptr noundef %47) #7
  call void @_ZNSt13runtime_errorD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #8
  invoke void @__cxa_end_catch()
          to label %49 unwind label %50

49:                                               ; preds = %42
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #8
  br label %.preheader.backedge

50:                                               ; preds = %42
  %51 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #8
  br label %.loopexit

.loopexit:                                        ; preds = %37, %20, %50, %35, %18
  %.merged = phi { ptr, i32 } [ %51, %50 ], [ %36, %35 ], [ %19, %18 ], [ %21, %20 ], [ %38, %37 ]
  call void @_ZN6hokuyo9LaserScanD2Ev(ptr noundef nonnull align 8 dereferenceable(96) %4) #8
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %4) #8
  call void @_ZN6hokuyo5LaserD1Ev(ptr noundef nonnull align 8 dereferenceable(480) %3) #8
  call void @llvm.lifetime.end.p0(i64 480, ptr nonnull %3) #8
  resume { ptr, i32 } %.merged
}

declare void @_ZN6hokuyo5LaserC1Ev(ptr noundef nonnull align 8 dereferenceable(480)) unnamed_addr #1

declare void @_ZN6hokuyo5Laser4openEPKc(ptr noundef nonnull align 8 dereferenceable(480), ptr noundef) local_unnamed_addr #1

declare noundef i32 @_ZN6hokuyo5Laser7laserOnEv(ptr noundef nonnull align 8 dereferenceable(480)) local_unnamed_addr #1

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

declare ptr @__cxa_get_exception_ptr(ptr) local_unnamed_addr

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6hokuyo9ExceptionC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #3 align 2

declare ptr @__cxa_begin_catch(ptr) local_unnamed_addr

; Function Attrs: nounwind
declare noundef ptr @_ZNKSt13runtime_error4whatEv(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #6

; Function Attrs: nounwind
declare void @_ZNSt13runtime_errorD2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #6

declare void @__cxa_end_catch() local_unnamed_addr

declare noundef i32 @_ZN6hokuyo5Laser12stopScanningEv(ptr noundef nonnull align 8 dereferenceable(480)) local_unnamed_addr #1

; Function Attrs: nounwind
declare void @_ZN6hokuyo5LaserD1Ev(ptr noundef nonnull align 8 dereferenceable(480)) unnamed_addr #6

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 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 #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress norecurse 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 = { nofree nosync nounwind memory(none) }
attributes #6 = { 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 = { cold nounwind }
attributes #8 = { 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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}


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