; LLVM IR from cyberbotics/epuck_ros2 :: epuck_ros2_driver/src/mpu9250.ll (ZN7MPU92508read_rawEPsS0_)

; 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.MPU9250 = type { [3 x float], [3 x float], [3 x i16], [3 x i16], i32, %"class.std::shared_ptr" }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }

@_ZZN7MPU92508read_rawEPsS0_E6buffer = external hidden global [6 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN7MPU925013read_registerEcPci(ptr noundef nonnull align 8 dereferenceable(56), i8 noundef signext, ptr noundef, i32 noundef) #0 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7MPU92508read_rawEPsS0_(ptr noundef nonnull align 8 dereferenceable(56) %0, ptr noundef %1, ptr noundef %2) #0 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %12 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #3
  store i32 0, ptr %8, align 4, !tbaa !9
  br label %13

13:                                               ; preds = %105, %3
  %14 = load i32, ptr %8, align 4, !tbaa !9
  %15 = icmp slt i32 %14, 5
  br i1 %15, label %17, label %16

16:                                               ; preds = %13
  store i32 2, ptr %9, align 4
  br label %108

17:                                               ; preds = %13
  %18 = getelementptr inbounds %class.MPU9250, ptr %12, i32 0, i32 5
  %19 = call noundef ptr @_ZNKSt19__shared_ptr_accessI10I2CWrapperLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %18) #3
  %20 = getelementptr inbounds %class.MPU9250, ptr %12, i32 0, i32 4
  %21 = load i32, ptr %20, align 4, !tbaa !11
  %22 = load ptr, ptr %19, align 8, !tbaa !16
  %23 = getelementptr inbounds ptr, ptr %22, i64 0
  %24 = load ptr, ptr %23, align 8
  %25 = call noundef i32 %24(ptr noundef nonnull align 8 dereferenceable(12) %19, i32 noundef %21)
  store i32 %25, ptr %7, align 4, !tbaa !9
  %26 = call noundef i32 @_ZN7MPU925013read_registerEcPci(ptr noundef nonnull align 8 dereferenceable(56) %12, i8 noundef signext 59, ptr noundef @_ZZN7MPU92508read_rawEPsS0_E6buffer, i32 noundef 6)
  %27 = load i32, ptr %7, align 4, !tbaa !9
  %28 = xor i32 %27, %26
  store i32 %28, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %29

29:                                               ; preds = %56, %17
  %30 = load i32, ptr %10, align 4, !tbaa !9
  %31 = icmp slt i32 %30, 3
  br i1 %31, label %33, label %32

32:                                               ; preds = %29
  store i32 5, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  br label %59

33:                                               ; preds = %29
  %34 = load i32, ptr %10, align 4, !tbaa !9
  %35 = mul nsw i32 %34, 2
  %36 = add nsw i32 %35, 1
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds [6 x i8], ptr @_ZZN7MPU92508read_rawEPsS0_E6buffer, i64 0, i64 %37
  %39 = load i8, ptr %38, align 1, !tbaa !18
  %40 = sext i8 %39 to i32
  %41 = and i32 %40, 255
  %42 = load i32, ptr %10, align 4, !tbaa !9
  %43 = mul nsw i32 %42, 2
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [6 x i8], ptr @_ZZN7MPU92508read_rawEPsS0_E6buffer, i64 0, i64 %44
  %46 = load i8, ptr %45, align 1, !tbaa !18
  %47 = sext i8 %46 to i32
  %48 = shl i32 %47, 8
  %49 = and i32 %48, 65280
  %50 = or i32 %41, %49
  %51 = trunc i32 %50 to i16
  %52 = load ptr, ptr %5, align 8, !tbaa !5
  %53 = load i32, ptr %10, align 4, !tbaa !9
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds i16, ptr %52, i64 %54
  store i16 %51, ptr %55, align 2, !tbaa !19
  br label %56

56:                                               ; preds = %33
  %57 = load i32, ptr %10, align 4, !tbaa !9
  %58 = add nsw i32 %57, 1
  store i32 %58, ptr %10, align 4, !tbaa !9
  br label %29, !llvm.loop !21

59:                                               ; preds = %32
  %60 = call noundef i32 @_ZN7MPU925013read_registerEcPci(ptr noundef nonnull align 8 dereferenceable(56) %12, i8 noundef signext 67, ptr noundef @_ZZN7MPU92508read_rawEPsS0_E6buffer, i32 noundef 6)
  %61 = load i32, ptr %7, align 4, !tbaa !9
  %62 = xor i32 %61, %60
  store i32 %62, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #3
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %63

63:                                               ; preds = %90, %59
  %64 = load i32, ptr %11, align 4, !tbaa !9
  %65 = icmp slt i32 %64, 3
  br i1 %65, label %67, label %66

66:                                               ; preds = %63
  store i32 8, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #3
  br label %93

67:                                               ; preds = %63
  %68 = load i32, ptr %11, align 4, !tbaa !9
  %69 = mul nsw i32 %68, 2
  %70 = add nsw i32 %69, 1
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [6 x i8], ptr @_ZZN7MPU92508read_rawEPsS0_E6buffer, i64 0, i64 %71
  %73 = load i8, ptr %72, align 1, !tbaa !18
  %74 = sext i8 %73 to i32
  %75 = and i32 %74, 255
  %76 = load i32, ptr %11, align 4, !tbaa !9
  %77 = mul nsw i32 %76, 2
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds [6 x i8], ptr @_ZZN7MPU92508read_rawEPsS0_E6buffer, i64 0, i64 %78
  %80 = load i8, ptr %79, align 1, !tbaa !18
  %81 = sext i8 %80 to i32
  %82 = shl i32 %81, 8
  %83 = and i32 %82, 65280
  %84 = or i32 %75, %83
  %85 = trunc i32 %84 to i16
  %86 = load ptr, ptr %6, align 8, !tbaa !5
  %87 = load i32, ptr %11, align 4, !tbaa !9
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds i16, ptr %86, i64 %88
  store i16 %85, ptr %89, align 2, !tbaa !19
  br label %90

90:                                               ; preds = %67
  %91 = load i32, ptr %11, align 4, !tbaa !9
  %92 = add nsw i32 %91, 1
  store i32 %92, ptr %11, align 4, !tbaa !9
  br label %63, !llvm.loop !23

93:                                               ; preds = %66
  %94 = load i32, ptr %7, align 4, !tbaa !9
  %95 = icmp ne i32 %94, 0
  br i1 %95, label %96, label %103

96:                                               ; preds = %93
  %97 = getelementptr inbounds %class.MPU9250, ptr %12, i32 0, i32 4
  %98 = load i32, ptr %97, align 4, !tbaa !11
  %99 = icmp eq i32 %98, 105
  %100 = zext i1 %99 to i64
  %101 = select i1 %99, i32 104, i32 105
  %102 = getelementptr inbounds %class.MPU9250, ptr %12, i32 0, i32 4
  store i32 %101, ptr %102, align 4, !tbaa !11
  br label %104

103:                                              ; preds = %93
  store i32 2, ptr %9, align 4
  br label %108

104:                                              ; preds = %96
  br label %105

105:                                              ; preds = %104
  %106 = load i32, ptr %8, align 4, !tbaa !9
  %107 = add nsw i32 %106, 1
  store i32 %107, ptr %8, align 4, !tbaa !9
  br label %13, !llvm.loop !24

108:                                              ; preds = %103, %16
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  br label %109

109:                                              ; preds = %108
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  ret void
}

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

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

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 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 = { 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 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 36}
!12 = !{!"_ZTS7MPU9250", !7, i64 0, !7, i64 12, !7, i64 24, !7, i64 30, !10, i64 36, !13, i64 40}
!13 = !{!"_ZTSSt10shared_ptrI10I2CWrapperE", !14, i64 0}
!14 = !{!"_ZTSSt12__shared_ptrI10I2CWrapperLN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0, !15, i64 8}
!15 = !{!"_ZTSSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"vtable pointer", !8, i64 0}
!18 = !{!7, !7, i64 0}
!19 = !{!20, !20, i64 0}
!20 = !{!"short", !7, i64 0}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = distinct !{!23, !22}
!24 = distinct !{!24, !22}


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

@_ZZN7MPU92508read_rawEPsS0_E6buffer = external hidden global [6 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN7MPU925013read_registerEcPci(ptr noundef nonnull align 8 dereferenceable(56), i8 noundef signext, ptr noundef, i32 noundef) local_unnamed_addr #0 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7MPU92508read_rawEPsS0_(ptr noundef nonnull align 8 dereferenceable(56) %0, ptr nocapture noundef writeonly %1, ptr nocapture noundef writeonly %2) local_unnamed_addr #0 align 2 {
  %4 = getelementptr inbounds i8, ptr %0, i64 40
  %5 = getelementptr inbounds i8, ptr %0, i64 36
  %6 = tail call noundef ptr @_ZNKSt19__shared_ptr_accessI10I2CWrapperLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %4) #2
  %7 = load i32, ptr %5, align 4, !tbaa !5
  %8 = load ptr, ptr %6, align 8, !tbaa !14
  %9 = load ptr, ptr %8, align 8
  %10 = tail call noundef i32 %9(ptr noundef nonnull align 8 dereferenceable(12) %6, i32 noundef %7)
  %11 = tail call noundef i32 @_ZN7MPU925013read_registerEcPci(ptr noundef nonnull align 8 dereferenceable(56) %0, i8 noundef signext 59, ptr noundef nonnull @_ZZN7MPU92508read_rawEPsS0_E6buffer, i32 noundef 6)
  %12 = load i8, ptr getelementptr inbounds (i8, ptr @_ZZN7MPU92508read_rawEPsS0_E6buffer, i64 1), align 1, !tbaa !16
  %13 = zext i8 %12 to i16
  %14 = load i8, ptr @_ZZN7MPU92508read_rawEPsS0_E6buffer, align 1, !tbaa !16
  %15 = zext i8 %14 to i16
  %16 = shl nuw i16 %15, 8
  %17 = or disjoint i16 %16, %13
  store i16 %17, ptr %1, align 2, !tbaa !17
  %18 = load i8, ptr getelementptr inbounds (i8, ptr @_ZZN7MPU92508read_rawEPsS0_E6buffer, i64 3), align 1, !tbaa !16
  %19 = zext i8 %18 to i16
  %20 = load i8, ptr getelementptr inbounds (i8, ptr @_ZZN7MPU92508read_rawEPsS0_E6buffer, i64 2), align 1, !tbaa !16
  %21 = zext i8 %20 to i16
  %22 = shl nuw i16 %21, 8
  %23 = or disjoint i16 %22, %19
  %24 = getelementptr inbounds i8, ptr %1, i64 2
  store i16 %23, ptr %24, align 2, !tbaa !17
  %25 = load i8, ptr getelementptr inbounds (i8, ptr @_ZZN7MPU92508read_rawEPsS0_E6buffer, i64 5), align 1, !tbaa !16
  %26 = zext i8 %25 to i16
  %27 = load i8, ptr getelementptr inbounds (i8, ptr @_ZZN7MPU92508read_rawEPsS0_E6buffer, i64 4), align 1, !tbaa !16
  %28 = zext i8 %27 to i16
  %29 = shl nuw i16 %28, 8
  %30 = or disjoint i16 %29, %26
  %31 = getelementptr inbounds i8, ptr %1, i64 4
  store i16 %30, ptr %31, align 2, !tbaa !17
  %32 = tail call noundef i32 @_ZN7MPU925013read_registerEcPci(ptr noundef nonnull align 8 dereferenceable(56) %0, i8 noundef signext 67, ptr noundef nonnull @_ZZN7MPU92508read_rawEPsS0_E6buffer, i32 noundef 6)
  %33 = load i8, ptr getelementptr inbounds (i8, ptr @_ZZN7MPU92508read_rawEPsS0_E6buffer, i64 1), align 1, !tbaa !16
  %34 = zext i8 %33 to i16
  %35 = load i8, ptr @_ZZN7MPU92508read_rawEPsS0_E6buffer, align 1, !tbaa !16
  %36 = zext i8 %35 to i16
  %37 = shl nuw i16 %36, 8
  %38 = or disjoint i16 %37, %34
  store i16 %38, ptr %2, align 2, !tbaa !17
  %39 = load i8, ptr getelementptr inbounds (i8, ptr @_ZZN7MPU92508read_rawEPsS0_E6buffer, i64 3), align 1, !tbaa !16
  %40 = zext i8 %39 to i16
  %41 = load i8, ptr getelementptr inbounds (i8, ptr @_ZZN7MPU92508read_rawEPsS0_E6buffer, i64 2), align 1, !tbaa !16
  %42 = zext i8 %41 to i16
  %43 = shl nuw i16 %42, 8
  %44 = or disjoint i16 %43, %40
  %45 = getelementptr inbounds i8, ptr %2, i64 2
  store i16 %44, ptr %45, align 2, !tbaa !17
  %46 = load i8, ptr getelementptr inbounds (i8, ptr @_ZZN7MPU92508read_rawEPsS0_E6buffer, i64 5), align 1, !tbaa !16
  %47 = zext i8 %46 to i16
  %48 = load i8, ptr getelementptr inbounds (i8, ptr @_ZZN7MPU92508read_rawEPsS0_E6buffer, i64 4), align 1, !tbaa !16
  %49 = zext i8 %48 to i16
  %50 = shl nuw i16 %49, 8
  %51 = or disjoint i16 %50, %47
  %52 = getelementptr inbounds i8, ptr %2, i64 4
  store i16 %51, ptr %52, align 2, !tbaa !17
  %53 = xor i32 %11, %10
  %.not = icmp eq i32 %53, %32
  br i1 %.not, label %250, label %54

54:                                               ; preds = %3
  %55 = load i32, ptr %5, align 4, !tbaa !5
  %56 = icmp eq i32 %55, 105
  %57 = select i1 %56, i32 104, i32 105
  store i32 %57, ptr %5, align 4, !tbaa !5
  %58 = tail call noundef ptr @_ZNKSt19__shared_ptr_accessI10I2CWrapperLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %4) #2
  %59 = load i32, ptr %5, align 4, !tbaa !5
  %60 = load ptr, ptr %58, align 8, !tbaa !14
  %61 = load ptr, ptr %60, align 8
  %62 = tail call noundef i32 %61(ptr noundef nonnull align 8 dereferenceable(12) %58, i32 noundef %59)
  %63 = tail call noundef i32 @_ZN7MPU925013read_registerEcPci(ptr noundef nonnull align 8 dereferenceable(56) %0, i8 noundef signext 59, ptr noundef nonnull @_ZZN7MPU92508read_rawEPsS0_E6buffer, i32 noundef 6)
  %64 = load i8, ptr getelementptr inbounds (i8, ptr @_ZZN7MPU92508read_rawEPsS0_E6buffer, i64 1), align 1, !tbaa !16
  %65 = zext i8 %64 to i16
  %66 = load i8, ptr @_ZZN7MPU92508read_rawEPsS0_E6buffer, align 1, !tbaa !16
  %67 = zext i8 %66 to i16
  %68 = shl nuw i16 %67, 8
  %69 = or disjoint i16 %68, %65
  store i16 %69, ptr %1, align 2, !tbaa !17
  %70 = load i8, ptr getelementptr inbounds (i8, ptr @_ZZN7MPU92508read_rawEPsS0_E6buffer, i64 3), align 1, !tbaa !16
  %71 = zext i8 %70 to i16
  %72 = load i8, ptr getelementptr inbounds (i8, ptr @_ZZN7MPU92508read_rawEPsS0_E6buffer, i64 2), align 1, !tbaa !16
  %73 = zext i8 %72 to i16
  %74 = shl nuw i16 %73, 8
  %75 = or disjoint i16 %74, %71
  store i16 %75, ptr %24, align 2, !tbaa !17
  %76 = load i8, ptr getelementptr inbounds (i8, ptr @_ZZN7MPU92508read_rawEPsS0_E6buffer, i64 5), align 1, !tbaa !16
  %77 = zext i8 %76 to i16
  %78 = load i8, ptr getelementptr inbounds (i8, ptr @_ZZN7MPU92508read_rawEPsS0_E6buffer, i64 4), align 1, !tbaa !16
  %79 = zext i8 %78 to i16
  %80 = shl nuw i16 %79, 8
  %81 = or disjoint i16 %80, %77
  store i16 %81, ptr %31, align 2, !tbaa !17
  %82 = tail call noundef i32 @_ZN7MPU925013read_registerEcPci(ptr noundef nonnull align 8 dereferenceable(56) %0, i8 noundef signext 67, ptr noundef nonnull @_ZZN7MPU92508read_rawEPsS0_E6buffer, i32 noundef 6)
  %83 = load i8, ptr getelementptr inbounds (i8, ptr @_ZZN7MPU92508read_rawEPsS0_E6buffer, i64 1), align 1, !tbaa !16
  %84 = zext i8 %83 to i16
  %85 = load i8, ptr @_ZZN7MPU92508read_rawEPsS0_E6buffer, align 1, !tbaa !16
  %86 = zext i8 %85 to i16
  %87 = shl nuw i16 %86, 8
  %88 = or disjoint i16 %87, %84
  store i16 %88, ptr %2, align 2, !tbaa !17
  %89 = load i8, ptr getelementptr inbounds (i8, ptr @_ZZN7MPU92508read_rawEPsS0_E6buffer, i64 3), align 1, !tbaa !16
  %90 = zext i8 %89 to i16
  %91 = load i8, ptr getelementptr inbounds (i8, ptr @_ZZN7MPU92508read_rawEPsS0_E6buffer, i64 2), align 1, !tbaa !16
  %92 = zext i8 %91 to i16
  %93 = shl nuw i16 %92, 8
  %94 = or disjoint i16 %93, %90
  store i16 %94, ptr %45, align 2, !tbaa !17
  %95 = load i8, ptr getelementptr inbounds (i8, ptr @_ZZN7MPU92508read_rawEPsS0_E6buffer, i64 5), align 1, !tbaa !16
  %96 = zext i8 %95 to i16
  %97 = load i8, ptr getelementptr inbounds (i8, ptr @_ZZN7MPU92508read_rawEPsS0_E6buffer, i64 4), align 1, !tbaa !16
  %98 = zext i8 %97 to i16
  %99 = shl nuw i16 %98, 8
  %100 = or disjoint i16 %99, %96
  store i16 %100, ptr %52, align 2, !tbaa !17
  %101 = xor i32 %63, %62
  %.not.1 = icmp eq i32 %101, %82
  br i1 %.not.1, label %250, label %102

102:                                              ; preds = %54
  %103 = load i32, ptr %5, align 4, !tbaa !5
  %104 = icmp eq i32 %103, 105
  %105 = select i1 %104, i32 104, i32 105
  store i32 %105, ptr %5, align 4, !tbaa !5
  %106 = tail call noundef ptr @_ZNKSt19__shared_ptr_accessI10I2CWrapperLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %4) #2
  %107 = load i32, ptr %5, align 4, !tbaa !5
  %108 = load ptr, ptr %106, align 8, !tbaa !14
  %109 = load ptr, ptr %108, align 8
  %110 = tail call noundef i32 %109(ptr noundef nonnull align 8 dereferenceable(12) %106, i32 noundef %107)
  %111 = tail call noundef i32 @_ZN7MPU925013read_registerEcPci(ptr noundef nonnull align 8 dereferenceable(56) %0, i8 noundef signext 59, ptr noundef nonnull @_ZZN7MPU92508read_rawEPsS0_E6buffer, i32 noundef 6)
  %112 = load i8, ptr getelementptr inbounds (i8, ptr @_ZZN7MPU92508read_rawEPsS0_E6buffer, i64 1), align 1, !tbaa !16
  %113 = zext i8 %112 to i16
  %114 = load i8, ptr @_ZZN7MPU92508read_rawEPsS0_E6buffer, align 1, !tbaa !16
  %115 = zext i8 %114 to i16
  %116 = shl nuw i16 %115, 8
  %117 = or disjoint i16 %116, %113
  store i16 %117, ptr %1, align 2, !tbaa !17
  %118 = load i8, ptr getelementptr inbounds (i8, ptr @_ZZN7MPU92508read_rawEPsS0_E6buffer, i64 3), align 1, !tbaa !16
  %119 = zext i8 %118 to i16
  %120 = load i8, ptr getelementptr inbounds (i8, ptr @_ZZN7MPU92508read_rawEPsS0_E6buffer, i64 2), align 1, !tbaa !16
  %121 = zext i8 %120 to i16
  %122 = shl nuw i16 %121, 8
  %123 = or disjoint i16 %122, %119
  store i16 %123, ptr %24, align 2, !tbaa !17
  %124 = load i8, ptr getelementptr inbounds (i8, ptr @_ZZN7MPU92508read_rawEPsS0_E6buffer, i64 5), align 1, !tbaa !16
  %125 = zext i8 %124 to i16
  %126 = load i8, ptr getelementptr inbounds (i8, ptr @_ZZN7MPU92508read_rawEPsS0_E6buffer, i64 4), align 1, !tbaa !16
  %127 = zext i8 %126 to i16
  %128 = shl nuw i16 %127, 8
  %129 = or disjoint i16 %128, %125
  store i16 %129, ptr %31, align 2, !tbaa !17
  %130 = tail call noundef i32 @_ZN7MPU925013read_registerEcPci(ptr noundef nonnull align 8 dereferenceable(56) %0, i8 noundef signext 67, ptr noundef nonnull @_ZZN7MPU92508read_rawEPsS0_E6buffer, i32 noundef 6)
  %131 = load i8, ptr getelementptr inbounds (i8, ptr @_ZZN7MPU92508read_rawEPsS0_E6buffer, i64 1), align 1, !tbaa !16
  %132 = zext i8 %131 to i16
  %133 = load i8, ptr @_ZZN7MPU92508read_rawEPsS0_E6buffer, align 1, !tbaa !16
  %134 = zext i8 %133 to i16
  %135 = shl nuw i16 %134, 8
  %136 = or disjoint i16 %135, %132
  store i16 %136, ptr %2, align 2, !tbaa !17
  %137 = load i8, ptr getelementptr inbounds (i8, ptr @_ZZN7MPU92508read_rawEPsS0_E6buffer, i64 3), align 1, !tbaa !16
  %138 = zext i8 %137 to i16
  %139 = load i8, ptr getelementptr inbounds (i8, ptr @_ZZN7MPU92508read_rawEPsS0_E6buffer, i64 2), align 1, !tbaa !16
  %140 = zext i8 %139 to i16
  %141 = shl nuw i16 %140, 8
  %142 = or disjoint i16 %141, %138
  store i16 %142, ptr %45, align 2, !tbaa !17
  %143 = load i8, ptr getelementptr inbounds (i8, ptr @_ZZN7MPU92508read_rawEPsS0_E6buffer, i64 5), align 1, !tbaa !16
  %144 = zext i8 %143 to i16
  %145 = load i8, ptr getelementptr inbounds (i8, ptr @_ZZN7MPU92508read_rawEPsS0_E6buffer, i64 4), align 1, !tbaa !16
  %146 = zext i8 %145 to i16
  %147 = shl nuw i16 %146, 8
  %148 = or disjoint i16 %147, %144
  store i16 %148, ptr %52, align 2, !tbaa !17
  %149 = xor i32 %111, %110
  %.not.2 = icmp eq i32 %149, %130
  br i1 %.not.2, label %250, label %150

150:                                              ; preds = %102
  %151 = load i32, ptr %5, align 4, !tbaa !5
  %152 = icmp eq i32 %151, 105
  %153 = select i1 %152, i32 104, i32 105
  store i32 %153, ptr %5, align 4, !tbaa !5
  %154 = tail call noundef ptr @_ZNKSt19__shared_ptr_accessI10I2CWrapperLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %4) #2
  %155 = load i32, ptr %5, align 4, !tbaa !5
  %156 = load ptr, ptr %154, align 8, !tbaa !14
  %157 = load ptr, ptr %156, align 8
  %158 = tail call noundef i32 %157(ptr noundef nonnull align 8 dereferenceable(12) %154, i32 noundef %155)
  %159 = tail call noundef i32 @_ZN7MPU925013read_registerEcPci(ptr noundef nonnull align 8 dereferenceable(56) %0, i8 noundef signext 59, ptr noundef nonnull @_ZZN7MPU92508read_rawEPsS0_E6buffer, i32 noundef 6)
  %160 = load i8, ptr getelementptr inbounds (i8, ptr @_ZZN7MPU92508read_rawEPsS0_E6buffer, i64 1), align 1, !tbaa !16
  %161 = zext i8 %160 to i16
  %162 = load i8, ptr @_ZZN7MPU92508read_rawEPsS0_E6buffer, align 1, !tbaa !16
  %163 = zext i8 %162 to i16
  %164 = shl nuw i16 %163, 8
  %165 = or disjoint i16 %164, %161
  store i16 %165, ptr %1, align 2, !tbaa !17
  %166 = load i8, ptr getelementptr inbounds (i8, ptr @_ZZN7MPU92508read_rawEPsS0_E6buffer, i64 3), align 1, !tbaa !16
  %167 = zext i8 %166 to i16
  %168 = load i8, ptr getelementptr inbounds (i8, ptr @_ZZN7MPU92508read_rawEPsS0_E6buffer, i64 2), align 1, !tbaa !16
  %169 = zext i8 %168 to i16
  %170 = shl nuw i16 %169, 8
  %171 = or disjoint i16 %170, %167
  store i16 %171, ptr %24, align 2, !tbaa !17
  %172 = load i8, ptr getelementptr inbounds (i8, ptr @_ZZN7MPU92508read_rawEPsS0_E6buffer, i64 5), align 1, !tbaa !16
  %173 = zext i8 %172 to i16
  %174 = load i8, ptr getelementptr inbounds (i8, ptr @_ZZN7MPU92508read_rawEPsS0_E6buffer, i64 4), align 1, !tbaa !16
  %175 = zext i8 %174 to i16
  %176 = shl nuw i16 %175, 8
  %177 = or disjoint i16 %176, %173
  store i16 %177, ptr %31, align 2, !tbaa !17
  %178 = tail call noundef i32 @_ZN7MPU925013read_registerEcPci(ptr noundef nonnull align 8 dereferenceable(56) %0, i8 noundef signext 67, ptr noundef nonnull @_ZZN7MPU92508read_rawEPsS0_E6buffer, i32 noundef 6)
  %179 = load i8, ptr getelementptr inbounds (i8, ptr @_ZZN7MPU92508read_rawEPsS0_E6buffer, i64 1), align 1, !tbaa !16
  %180 = zext i8 %179 to i16
  %181 = load i8, ptr @_ZZN7MPU92508read_rawEPsS0_E6buffer, align 1, !tbaa !16
  %182 = zext i8 %181 to i16
  %183 = shl nuw i16 %182, 8
  %184 = or disjoint i16 %183, %180
  store i16 %184, ptr %2, align 2, !tbaa !17
  %185 = load i8, ptr getelementptr inbounds (i8, ptr @_ZZN7MPU92508read_rawEPsS0_E6buffer, i64 3), align 1, !tbaa !16
  %186 = zext i8 %185 to i16
  %187 = load i8, ptr getelementptr inbounds (i8, ptr @_ZZN7MPU92508read_rawEPsS0_E6buffer, i64 2), align 1, !tbaa !16
  %188 = zext i8 %187 to i16
  %189 = shl nuw i16 %188, 8
  %190 = or disjoint i16 %189, %186
  store i16 %190, ptr %45, align 2, !tbaa !17
  %191 = load i8, ptr getelementptr inbounds (i8, ptr @_ZZN7MPU92508read_rawEPsS0_E6buffer, i64 5), align 1, !tbaa !16
  %192 = zext i8 %191 to i16
  %193 = load i8, ptr getelementptr inbounds (i8, ptr @_ZZN7MPU92508read_rawEPsS0_E6buffer, i64 4), align 1, !tbaa !16
  %194 = zext i8 %193 to i16
  %195 = shl nuw i16 %194, 8
  %196 = or disjoint i16 %195, %192
  store i16 %196, ptr %52, align 2, !tbaa !17
  %197 = xor i32 %159, %158
  %.not.3 = icmp eq i32 %197, %178
  br i1 %.not.3, label %250, label %198

198:                                              ; preds = %150
  %199 = load i32, ptr %5, align 4, !tbaa !5
  %200 = icmp eq i32 %199, 105
  %201 = select i1 %200, i32 104, i32 105
  store i32 %201, ptr %5, align 4, !tbaa !5
  %202 = tail call noundef ptr @_ZNKSt19__shared_ptr_accessI10I2CWrapperLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %4) #2
  %203 = load i32, ptr %5, align 4, !tbaa !5
  %204 = load ptr, ptr %202, align 8, !tbaa !14
  %205 = load ptr, ptr %204, align 8
  %206 = tail call noundef i32 %205(ptr noundef nonnull align 8 dereferenceable(12) %202, i32 noundef %203)
  %207 = tail call noundef i32 @_ZN7MPU925013read_registerEcPci(ptr noundef nonnull align 8 dereferenceable(56) %0, i8 noundef signext 59, ptr noundef nonnull @_ZZN7MPU92508read_rawEPsS0_E6buffer, i32 noundef 6)
  %208 = load i8, ptr getelementptr inbounds (i8, ptr @_ZZN7MPU92508read_rawEPsS0_E6buffer, i64 1), align 1, !tbaa !16
  %209 = zext i8 %208 to i16
  %210 = load i8, ptr @_ZZN7MPU92508read_rawEPsS0_E6buffer, align 1, !tbaa !16
  %211 = zext i8 %210 to i16
  %212 = shl nuw i16 %211, 8
  %213 = or disjoint i16 %212, %209
  store i16 %213, ptr %1, align 2, !tbaa !17
  %214 = load i8, ptr getelementptr inbounds (i8, ptr @_ZZN7MPU92508read_rawEPsS0_E6buffer, i64 3), align 1, !tbaa !16
  %215 = zext i8 %214 to i16
  %216 = load i8, ptr getelementptr inbounds (i8, ptr @_ZZN7MPU92508read_rawEPsS0_E6buffer, i64 2), align 1, !tbaa !16
  %217 = zext i8 %216 to i16
  %218 = shl nuw i16 %217, 8
  %219 = or disjoint i16 %218, %215
  store i16 %219, ptr %24, align 2, !tbaa !17
  %220 = load i8, ptr getelementptr inbounds (i8, ptr @_ZZN7MPU92508read_rawEPsS0_E6buffer, i64 5), align 1, !tbaa !16
  %221 = zext i8 %220 to i16
  %222 = load i8, ptr getelementptr inbounds (i8, ptr @_ZZN7MPU92508read_rawEPsS0_E6buffer, i64 4), align 1, !tbaa !16
  %223 = zext i8 %222 to i16
  %224 = shl nuw i16 %223, 8
  %225 = or disjoint i16 %224, %221
  store i16 %225, ptr %31, align 2, !tbaa !17
  %226 = tail call noundef i32 @_ZN7MPU925013read_registerEcPci(ptr noundef nonnull align 8 dereferenceable(56) %0, i8 noundef signext 67, ptr noundef nonnull @_ZZN7MPU92508read_rawEPsS0_E6buffer, i32 noundef 6)
  %227 = load i8, ptr getelementptr inbounds (i8, ptr @_ZZN7MPU92508read_rawEPsS0_E6buffer, i64 1), align 1, !tbaa !16
  %228 = zext i8 %227 to i16
  %229 = load i8, ptr @_ZZN7MPU92508read_rawEPsS0_E6buffer, align 1, !tbaa !16
  %230 = zext i8 %229 to i16
  %231 = shl nuw i16 %230, 8
  %232 = or disjoint i16 %231, %228
  store i16 %232, ptr %2, align 2, !tbaa !17
  %233 = load i8, ptr getelementptr inbounds (i8, ptr @_ZZN7MPU92508read_rawEPsS0_E6buffer, i64 3), align 1, !tbaa !16
  %234 = zext i8 %233 to i16
  %235 = load i8, ptr getelementptr inbounds (i8, ptr @_ZZN7MPU92508read_rawEPsS0_E6buffer, i64 2), align 1, !tbaa !16
  %236 = zext i8 %235 to i16
  %237 = shl nuw i16 %236, 8
  %238 = or disjoint i16 %237, %234
  store i16 %238, ptr %45, align 2, !tbaa !17
  %239 = load i8, ptr getelementptr inbounds (i8, ptr @_ZZN7MPU92508read_rawEPsS0_E6buffer, i64 5), align 1, !tbaa !16
  %240 = zext i8 %239 to i16
  %241 = load i8, ptr getelementptr inbounds (i8, ptr @_ZZN7MPU92508read_rawEPsS0_E6buffer, i64 4), align 1, !tbaa !16
  %242 = zext i8 %241 to i16
  %243 = shl nuw i16 %242, 8
  %244 = or disjoint i16 %243, %240
  store i16 %244, ptr %52, align 2, !tbaa !17
  %245 = xor i32 %207, %206
  %.not.4 = icmp eq i32 %245, %226
  br i1 %.not.4, label %250, label %246

246:                                              ; preds = %198
  %247 = load i32, ptr %5, align 4, !tbaa !5
  %248 = icmp eq i32 %247, 105
  %249 = select i1 %248, i32 104, i32 105
  store i32 %249, ptr %5, align 4, !tbaa !5
  br label %250

250:                                              ; preds = %246, %198, %150, %102, %54, %3
  ret void
}

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 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 = { 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, !9, i64 36}
!6 = !{!"_ZTS7MPU9250", !7, i64 0, !7, i64 12, !7, i64 24, !7, i64 30, !9, i64 36, !10, i64 40}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!"int", !7, i64 0}
!10 = !{!"_ZTSSt10shared_ptrI10I2CWrapperE", !11, i64 0}
!11 = !{!"_ZTSSt12__shared_ptrI10I2CWrapperLN9__gnu_cxx12_Lock_policyE2EE", !12, i64 0, !13, i64 8}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!"_ZTSSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EE", !12, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"vtable pointer", !8, i64 0}
!16 = !{!7, !7, i64 0}
!17 = !{!18, !18, i64 0}
!18 = !{!"short", !7, i64 0}


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