; LLVM IR from MiRoboticsLab/cyberdog_ros2 :: cyberdog_common/cyberdog_utils/src/can (socket_can_receiver)

; 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::chrono::duration" = type { i64 }
%struct.timeval = type { i64, i64 }
%struct.fd_set = type { [16 x i64] }
%"class.drivers::socketcan::SocketCanReceiver" = type { i32 }

@.str = external hidden unnamed_addr constant [20 x i8], align 1
@_ZTIN7drivers9socketcan16SocketCanTimeoutE = external dso_local constant { ptr, ptr, ptr }, align 8
@.str.1 = external hidden unnamed_addr constant [20 x i8], align 1

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
define hidden void @_ZNK7drivers9socketcan17SocketCanReceiver4waitENSt6chrono8durationIlSt5ratioILl1ELl1000000000EEEE(ptr noundef nonnull align 4 dereferenceable(4) %0, i64 %1) #0 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::chrono::duration", align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"class.std::chrono::duration", align 8
  %6 = alloca %struct.timeval, align 8
  %7 = alloca %"class.std::chrono::duration", align 8
  %8 = alloca %struct.fd_set, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %struct.fd_set, align 8
  %12 = getelementptr inbounds %"class.std::chrono::duration", ptr %3, i32 0, i32 0
  store i64 %1, ptr %12, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  %13 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  %14 = call i64 @_ZNSt6chrono8durationIlSt5ratioILl1ELl1000000000EEE4zeroEv() #6
  %15 = getelementptr inbounds %"class.std::chrono::duration", ptr %5, i32 0, i32 0
  store i64 %14, ptr %15, align 8
  %16 = call noundef zeroext i1 @_ZNSt6chronoltIlSt5ratioILl1ELl1000000000EElS2_EEbRKNS_8durationIT_T0_EERKNS3_IT1_T2_EE(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %3)
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  br i1 %16, label %17, label %63

17:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 16, ptr %6) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %7, ptr align 8 %3, i64 8, i1 false), !tbaa.struct !9
  %18 = getelementptr inbounds %"class.std::chrono::duration", ptr %7, i32 0, i32 0
  %19 = load i64, ptr %18, align 8
  %20 = call { i64, i64 } @_ZN7drivers9socketcan10to_timevalENSt6chrono8durationIlSt5ratioILl1ELl1000000000EEEE(i64 %19) #6
  %21 = getelementptr inbounds { i64, i64 }, ptr %6, i32 0, i32 0
  %22 = extractvalue { i64, i64 } %20, 0
  store i64 %22, ptr %21, align 8
  %23 = getelementptr inbounds { i64, i64 }, ptr %6, i32 0, i32 1
  %24 = extractvalue { i64, i64 } %20, 1
  store i64 %24, ptr %23, align 8
  call void @llvm.lifetime.start.p0(i64 128, ptr %8) #6
  %25 = getelementptr inbounds %"class.drivers::socketcan::SocketCanReceiver", ptr %13, i32 0, i32 0
  %26 = load i32, ptr %25, align 4, !tbaa !12
  call void @_ZN7drivers9socketcan10single_setEi(ptr dead_on_unwind writable sret(%struct.fd_set) align 8 %8, i32 noundef %26) #6
  %27 = getelementptr inbounds %"class.drivers::socketcan::SocketCanReceiver", ptr %13, i32 0, i32 0
  %28 = load i32, ptr %27, align 4, !tbaa !12
  %29 = add nsw i32 %28, 1
  %30 = call i32 @select(i32 noundef %29, ptr noundef %8, ptr noundef null, ptr noundef null, ptr noundef %6)
  %31 = icmp eq i32 0, %30
  br i1 %31, label %32, label %39

32:                                               ; preds = %17
  %33 = call ptr @__cxa_allocate_exception(i64 16) #6
  invoke void @_ZN7drivers9socketcan16SocketCanTimeoutC2EPKc(ptr noundef nonnull align 8 dereferenceable(16) %33, ptr noundef @.str)
          to label %34 unwind label %35

34:                                               ; preds = %32
  call void @__cxa_throw(ptr %33, ptr @_ZTIN7drivers9socketcan16SocketCanTimeoutE, ptr @_ZNSt13runtime_errorD2Ev) #7
  unreachable

35:                                               ; preds = %32
  %36 = landingpad { ptr, i32 }
          cleanup
  %37 = extractvalue { ptr, i32 } %36, 0
  store ptr %37, ptr %9, align 8
  %38 = extractvalue { ptr, i32 } %36, 1
  store i32 %38, ptr %10, align 4
  call void @__cxa_free_exception(ptr %33) #6
  br label %62

39:                                               ; preds = %17
  %40 = getelementptr inbounds %struct.fd_set, ptr %8, i32 0, i32 0
  %41 = getelementptr inbounds %"class.drivers::socketcan::SocketCanReceiver", ptr %13, i32 0, i32 0
  %42 = load i32, ptr %41, align 4, !tbaa !12
  %43 = sdiv i32 %42, 64
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [16 x i64], ptr %40, i64 0, i64 %44
  %46 = load i64, ptr %45, align 8, !tbaa !10
  %47 = getelementptr inbounds %"class.drivers::socketcan::SocketCanReceiver", ptr %13, i32 0, i32 0
  %48 = load i32, ptr %47, align 4, !tbaa !12
  %49 = srem i32 %48, 64
  %50 = zext i32 %49 to i64
  %51 = shl i64 1, %50
  %52 = and i64 %46, %51
  %53 = icmp ne i64 %52, 0
  br i1 %53, label %61, label %54

54:                                               ; preds = %39
  %55 = call ptr @__cxa_allocate_exception(i64 16) #6
  invoke void @_ZN7drivers9socketcan16SocketCanTimeoutC2EPKc(ptr noundef nonnull align 8 dereferenceable(16) %55, ptr noundef @.str.1)
          to label %56 unwind label %57

56:                                               ; preds = %54
  call void @__cxa_throw(ptr %55, ptr @_ZTIN7drivers9socketcan16SocketCanTimeoutE, ptr @_ZNSt13runtime_errorD2Ev) #7
  unreachable

57:                                               ; preds = %54
  %58 = landingpad { ptr, i32 }
          cleanup
  %59 = extractvalue { ptr, i32 } %58, 0
  store ptr %59, ptr %9, align 8
  %60 = extractvalue { ptr, i32 } %58, 1
  store i32 %60, ptr %10, align 4
  call void @__cxa_free_exception(ptr %55) #6
  br label %62

61:                                               ; preds = %39
  call void @llvm.lifetime.end.p0(i64 128, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #6
  br label %102

62:                                               ; preds = %57, %35
  call void @llvm.lifetime.end.p0(i64 128, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #6
  br label %103

63:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 128, ptr %11) #6
  %64 = getelementptr inbounds %"class.drivers::socketcan::SocketCanReceiver", ptr %13, i32 0, i32 0
  %65 = load i32, ptr %64, align 4, !tbaa !12
  call void @_ZN7drivers9socketcan10single_setEi(ptr dead_on_unwind writable sret(%struct.fd_set) align 8 %11, i32 noundef %65) #6
  %66 = getelementptr inbounds %"class.drivers::socketcan::SocketCanReceiver", ptr %13, i32 0, i32 0
  %67 = load i32, ptr %66, align 4, !tbaa !12
  %68 = add nsw i32 %67, 1
  %69 = call i32 @select(i32 noundef %68, ptr noundef %11, ptr noundef null, ptr noundef null, ptr noundef null)
  %70 = icmp eq i32 0, %69
  br i1 %70, label %71, label %78

71:                                               ; preds = %63
  %72 = call ptr @__cxa_allocate_exception(i64 16) #6
  invoke void @_ZN7drivers9socketcan16SocketCanTimeoutC2EPKc(ptr noundef nonnull align 8 dereferenceable(16) %72, ptr noundef @.str)
          to label %73 unwind label %74

73:                                               ; preds = %71
  call void @__cxa_throw(ptr %72, ptr @_ZTIN7drivers9socketcan16SocketCanTimeoutE, ptr @_ZNSt13runtime_errorD2Ev) #7
  unreachable

74:                                               ; preds = %71
  %75 = landingpad { ptr, i32 }
          cleanup
  %76 = extractvalue { ptr, i32 } %75, 0
  store ptr %76, ptr %9, align 8
  %77 = extractvalue { ptr, i32 } %75, 1
  store i32 %77, ptr %10, align 4
  call void @__cxa_free_exception(ptr %72) #6
  br label %101

78:                                               ; preds = %63
  %79 = getelementptr inbounds %struct.fd_set, ptr %11, i32 0, i32 0
  %80 = getelementptr inbounds %"class.drivers::socketcan::SocketCanReceiver", ptr %13, i32 0, i32 0
  %81 = load i32, ptr %80, align 4, !tbaa !12
  %82 = sdiv i32 %81, 64
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [16 x i64], ptr %79, i64 0, i64 %83
  %85 = load i64, ptr %84, align 8, !tbaa !10
  %86 = getelementptr inbounds %"class.drivers::socketcan::SocketCanReceiver", ptr %13, i32 0, i32 0
  %87 = load i32, ptr %86, align 4, !tbaa !12
  %88 = srem i32 %87, 64
  %89 = zext i32 %88 to i64
  %90 = shl i64 1, %89
  %91 = and i64 %85, %90
  %92 = icmp ne i64 %91, 0
  br i1 %92, label %100, label %93

93:                                               ; preds = %78
  %94 = call ptr @__cxa_allocate_exception(i64 16) #6
  invoke void @_ZN7drivers9socketcan16SocketCanTimeoutC2EPKc(ptr noundef nonnull align 8 dereferenceable(16) %94, ptr noundef @.str.1)
          to label %95 unwind label %96

95:                                               ; preds = %93
  call void @__cxa_throw(ptr %94, ptr @_ZTIN7drivers9socketcan16SocketCanTimeoutE, ptr @_ZNSt13runtime_errorD2Ev) #7
  unreachable

96:                                               ; preds = %93
  %97 = landingpad { ptr, i32 }
          cleanup
  %98 = extractvalue { ptr, i32 } %97, 0
  store ptr %98, ptr %9, align 8
  %99 = extractvalue { ptr, i32 } %97, 1
  store i32 %99, ptr %10, align 4
  call void @__cxa_free_exception(ptr %94) #6
  br label %101

100:                                              ; preds = %78
  call void @llvm.lifetime.end.p0(i64 128, ptr %11) #6
  br label %102

101:                                              ; preds = %96, %74
  call void @llvm.lifetime.end.p0(i64 128, ptr %11) #6
  br label %103

102:                                              ; preds = %100, %61
  ret void

103:                                              ; preds = %101, %62
  %104 = load ptr, ptr %9, align 8
  %105 = load i32, ptr %10, align 4
  %106 = insertvalue { ptr, i32 } poison, ptr %104, 0
  %107 = insertvalue { ptr, i32 } %106, i32 %105, 1
  resume { ptr, i32 } %107
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNSt6chronoltIlSt5ratioILl1ELl1000000000EElS2_EEbRKNS_8durationIT_T0_EERKNS3_IT1_T2_EE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #0

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local i64 @_ZNSt6chrono8durationIlSt5ratioILl1ELl1000000000EEE4zeroEv() #2 align 2

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

; Function Attrs: nounwind
declare { i64, i64 } @_ZN7drivers9socketcan10to_timevalENSt6chrono8durationIlSt5ratioILl1ELl1000000000EEEE(i64) #3

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

; Function Attrs: nounwind
declare void @_ZN7drivers9socketcan10single_setEi(ptr dead_on_unwind writable sret(%struct.fd_set) align 8, i32 noundef) #3

declare i32 @select(i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #5

declare ptr @__cxa_allocate_exception(i64)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7drivers9socketcan16SocketCanTimeoutC2EPKc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) unnamed_addr #0 align 2

declare void @__cxa_free_exception(ptr)

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

declare void @__cxa_throw(ptr, ptr, ptr)

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { "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 = { nounwind }
attributes #7 = { noreturn }

!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 = !{i64 0, i64 8, !10}
!10 = !{!11, !11, i64 0}
!11 = !{!"long", !7, i64 0}
!12 = !{!13, !14, i64 0}
!13 = !{!"_ZTSN7drivers9socketcan17SocketCanReceiverE", !14, i64 0}
!14 = !{!"int", !7, i64 0}


; 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::chrono::duration" = type { i64 }
%struct.timeval = type { i64, i64 }
%struct.fd_set = type { [16 x i64] }

@.str = external hidden unnamed_addr constant [20 x i8], align 1
@_ZTIN7drivers9socketcan16SocketCanTimeoutE = external dso_local constant { ptr, ptr, ptr }, align 8
@.str.1 = external hidden unnamed_addr constant [20 x i8], align 1

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
define hidden void @_ZNK7drivers9socketcan17SocketCanReceiver4waitENSt6chrono8durationIlSt5ratioILl1ELl1000000000EEEE(ptr nocapture noundef nonnull readonly align 4 dereferenceable(4) %0, i64 %1) local_unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::chrono::duration", align 8
  %4 = alloca %"class.std::chrono::duration", align 8
  %5 = alloca %struct.timeval, align 8
  %6 = alloca %struct.fd_set, align 8
  %7 = alloca %struct.fd_set, align 8
  store i64 %1, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  %8 = tail call i64 @_ZNSt6chrono8durationIlSt5ratioILl1ELl1000000000EEE4zeroEv() #5
  store i64 %8, ptr %4, align 8
  %9 = call noundef zeroext i1 @_ZNSt6chronoltIlSt5ratioILl1ELl1000000000EElS2_EEbRKNS_8durationIT_T0_EERKNS3_IT1_T2_EE(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %3)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  br i1 %9, label %10, label %42

10:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #5
  %.sroa.0.0.copyload = load i64, ptr %3, align 8, !tbaa !5
  %11 = call { i64, i64 } @_ZN7drivers9socketcan10to_timevalENSt6chrono8durationIlSt5ratioILl1ELl1000000000EEEE(i64 %.sroa.0.0.copyload) #5
  %12 = extractvalue { i64, i64 } %11, 0
  store i64 %12, ptr %5, align 8
  %13 = getelementptr inbounds i8, ptr %5, i64 8
  %14 = extractvalue { i64, i64 } %11, 1
  store i64 %14, ptr %13, align 8
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %6) #5
  %15 = load i32, ptr %0, align 4, !tbaa !9
  call void @_ZN7drivers9socketcan10single_setEi(ptr dead_on_unwind nonnull writable sret(%struct.fd_set) align 8 %6, i32 noundef %15) #5
  %16 = load i32, ptr %0, align 4, !tbaa !9
  %17 = add nsw i32 %16, 1
  %18 = call i32 @select(i32 noundef %17, ptr noundef nonnull %6, ptr noundef null, ptr noundef null, ptr noundef nonnull %5)
  %19 = icmp eq i32 %18, 0
  br i1 %19, label %20, label %25

20:                                               ; preds = %10
  %21 = call ptr @__cxa_allocate_exception(i64 16) #5
  invoke void @_ZN7drivers9socketcan16SocketCanTimeoutC2EPKc(ptr noundef nonnull align 8 dereferenceable(16) %21, ptr noundef nonnull @.str)
          to label %22 unwind label %23

22:                                               ; preds = %20
  call void @__cxa_throw(ptr nonnull %21, ptr nonnull @_ZTIN7drivers9socketcan16SocketCanTimeoutE, ptr nonnull @_ZNSt13runtime_errorD2Ev) #6
  unreachable

23:                                               ; preds = %20
  %24 = landingpad { ptr, i32 }
          cleanup
  br label %41

25:                                               ; preds = %10
  %26 = load i32, ptr %0, align 4, !tbaa !9
  %27 = sdiv i32 %26, 64
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds [16 x i64], ptr %6, i64 0, i64 %28
  %30 = load i64, ptr %29, align 8, !tbaa !5
  %31 = srem i32 %26, 64
  %32 = zext nneg i32 %31 to i64
  %33 = shl nuw i64 1, %32
  %34 = and i64 %33, %30
  %.not6 = icmp eq i64 %34, 0
  br i1 %.not6, label %35, label %40

35:                                               ; preds = %25
  %36 = call ptr @__cxa_allocate_exception(i64 16) #5
  invoke void @_ZN7drivers9socketcan16SocketCanTimeoutC2EPKc(ptr noundef nonnull align 8 dereferenceable(16) %36, ptr noundef nonnull @.str.1)
          to label %37 unwind label %38

37:                                               ; preds = %35
  call void @__cxa_throw(ptr nonnull %36, ptr nonnull @_ZTIN7drivers9socketcan16SocketCanTimeoutE, ptr nonnull @_ZNSt13runtime_errorD2Ev) #6
  unreachable

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

40:                                               ; preds = %25
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #5
  br label %70

41:                                               ; preds = %38, %23
  %.sink = phi ptr [ %36, %38 ], [ %21, %23 ]
  %.pn7 = phi { ptr, i32 } [ %39, %38 ], [ %24, %23 ]
  call void @__cxa_free_exception(ptr %.sink) #5
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #5
  br label %71

42:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %7) #5
  %43 = load i32, ptr %0, align 4, !tbaa !9
  call void @_ZN7drivers9socketcan10single_setEi(ptr dead_on_unwind nonnull writable sret(%struct.fd_set) align 8 %7, i32 noundef %43) #5
  %44 = load i32, ptr %0, align 4, !tbaa !9
  %45 = add nsw i32 %44, 1
  %46 = call i32 @select(i32 noundef %45, ptr noundef nonnull %7, ptr noundef null, ptr noundef null, ptr noundef null)
  %47 = icmp eq i32 %46, 0
  br i1 %47, label %48, label %53

48:                                               ; preds = %42
  %49 = call ptr @__cxa_allocate_exception(i64 16) #5
  invoke void @_ZN7drivers9socketcan16SocketCanTimeoutC2EPKc(ptr noundef nonnull align 8 dereferenceable(16) %49, ptr noundef nonnull @.str)
          to label %50 unwind label %51

50:                                               ; preds = %48
  call void @__cxa_throw(ptr nonnull %49, ptr nonnull @_ZTIN7drivers9socketcan16SocketCanTimeoutE, ptr nonnull @_ZNSt13runtime_errorD2Ev) #6
  unreachable

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

53:                                               ; preds = %42
  %54 = load i32, ptr %0, align 4, !tbaa !9
  %55 = sdiv i32 %54, 64
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [16 x i64], ptr %7, i64 0, i64 %56
  %58 = load i64, ptr %57, align 8, !tbaa !5
  %59 = srem i32 %54, 64
  %60 = zext nneg i32 %59 to i64
  %61 = shl nuw i64 1, %60
  %62 = and i64 %61, %58
  %.not = icmp eq i64 %62, 0
  br i1 %.not, label %63, label %68

63:                                               ; preds = %53
  %64 = call ptr @__cxa_allocate_exception(i64 16) #5
  invoke void @_ZN7drivers9socketcan16SocketCanTimeoutC2EPKc(ptr noundef nonnull align 8 dereferenceable(16) %64, ptr noundef nonnull @.str.1)
          to label %65 unwind label %66

65:                                               ; preds = %63
  call void @__cxa_throw(ptr nonnull %64, ptr nonnull @_ZTIN7drivers9socketcan16SocketCanTimeoutE, ptr nonnull @_ZNSt13runtime_errorD2Ev) #6
  unreachable

66:                                               ; preds = %63
  %67 = landingpad { ptr, i32 }
          cleanup
  br label %69

68:                                               ; preds = %53
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %7) #5
  br label %70

69:                                               ; preds = %66, %51
  %.sink10 = phi ptr [ %64, %66 ], [ %49, %51 ]
  %.pn = phi { ptr, i32 } [ %67, %66 ], [ %52, %51 ]
  call void @__cxa_free_exception(ptr %.sink10) #5
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %7) #5
  br label %71

70:                                               ; preds = %68, %40
  ret void

71:                                               ; preds = %69, %41
  %.pn7.pn = phi { ptr, i32 } [ %.pn7, %41 ], [ %.pn, %69 ]
  resume { ptr, i32 } %.pn7.pn
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNSt6chronoltIlSt5ratioILl1ELl1000000000EElS2_EEbRKNS_8durationIT_T0_EERKNS3_IT1_T2_EE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local i64 @_ZNSt6chrono8durationIlSt5ratioILl1ELl1000000000EEE4zeroEv() local_unnamed_addr #2 align 2

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

; Function Attrs: nounwind
declare { i64, i64 } @_ZN7drivers9socketcan10to_timevalENSt6chrono8durationIlSt5ratioILl1ELl1000000000EEEE(i64) local_unnamed_addr #3

; Function Attrs: nounwind
declare void @_ZN7drivers9socketcan10single_setEi(ptr dead_on_unwind writable sret(%struct.fd_set) align 8, i32 noundef) local_unnamed_addr #3

declare i32 @select(i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7drivers9socketcan16SocketCanTimeoutC2EPKc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) unnamed_addr #0 align 2

declare void @__cxa_free_exception(ptr) local_unnamed_addr

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

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }
attributes #6 = { noreturn }

!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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"_ZTSN7drivers9socketcan17SocketCanReceiverE", !11, i64 0}
!11 = !{!"int", !7, i64 0}


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