; LLVM IR from microbotsio/CodeCell :: src (sh2_SensorValue)

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

%struct.sh2_SensorEvent = type { i64, i8, i8, [16 x i8] }
%struct.sh2_SensorValue = type { i8, i8, i8, i64, i32, %union.anon }
%union.anon = type { %struct.sh2_GyroIntegratedRV }
%struct.sh2_GyroIntegratedRV = type { float, float, float, float, float, float, float }

; Function Attrs: nounwind uwtable
define dso_local i32 @sh2_decodeSensorEvent(ptr noundef %0, ptr noundef %1) #0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #2
  store i32 0, ptr %5, align 4, !tbaa !9
  %6 = load ptr, ptr %4, align 8, !tbaa !5
  %7 = getelementptr inbounds %struct.sh2_SensorEvent, ptr %6, i32 0, i32 2
  %8 = load i8, ptr %7, align 1, !tbaa !11
  %9 = load ptr, ptr %3, align 8, !tbaa !5
  %10 = getelementptr inbounds %struct.sh2_SensorValue, ptr %9, i32 0, i32 0
  store i8 %8, ptr %10, align 8, !tbaa !14
  %11 = load ptr, ptr %4, align 8, !tbaa !5
  %12 = getelementptr inbounds %struct.sh2_SensorEvent, ptr %11, i32 0, i32 0
  %13 = load i64, ptr %12, align 8, !tbaa !16
  %14 = load ptr, ptr %3, align 8, !tbaa !5
  %15 = getelementptr inbounds %struct.sh2_SensorValue, ptr %14, i32 0, i32 3
  store i64 %13, ptr %15, align 8, !tbaa !17
  %16 = load ptr, ptr %3, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct.sh2_SensorValue, ptr %16, i32 0, i32 0
  %18 = load i8, ptr %17, align 8, !tbaa !14
  %19 = zext i8 %18 to i32
  %20 = icmp ne i32 %19, 42
  br i1 %20, label %21, label %37

21:                                               ; preds = %2
  %22 = load ptr, ptr %4, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.sh2_SensorEvent, ptr %22, i32 0, i32 3
  %24 = getelementptr inbounds [16 x i8], ptr %23, i64 0, i64 1
  %25 = load i8, ptr %24, align 1, !tbaa !18
  %26 = load ptr, ptr %3, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.sh2_SensorValue, ptr %26, i32 0, i32 1
  store i8 %25, ptr %27, align 1, !tbaa !19
  %28 = load ptr, ptr %4, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.sh2_SensorEvent, ptr %28, i32 0, i32 3
  %30 = getelementptr inbounds [16 x i8], ptr %29, i64 0, i64 2
  %31 = load i8, ptr %30, align 2, !tbaa !18
  %32 = zext i8 %31 to i32
  %33 = and i32 %32, 3
  %34 = trunc i32 %33 to i8
  %35 = load ptr, ptr %3, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.sh2_SensorValue, ptr %35, i32 0, i32 2
  store i8 %34, ptr %36, align 2, !tbaa !20
  br label %42

37:                                               ; preds = %2
  %38 = load ptr, ptr %3, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.sh2_SensorValue, ptr %38, i32 0, i32 1
  store i8 0, ptr %39, align 1, !tbaa !19
  %40 = load ptr, ptr %3, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.sh2_SensorValue, ptr %40, i32 0, i32 2
  store i8 0, ptr %41, align 2, !tbaa !20
  br label %42

42:                                               ; preds = %37, %21
  %43 = load ptr, ptr %3, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.sh2_SensorValue, ptr %43, i32 0, i32 0
  %45 = load i8, ptr %44, align 8, !tbaa !14
  %46 = zext i8 %45 to i32
  switch i32 %46, label %199 [
    i32 20, label %47
    i32 1, label %51
    i32 4, label %55
    i32 6, label %59
    i32 21, label %63
    i32 2, label %67
    i32 7, label %71
    i32 22, label %75
    i32 3, label %79
    i32 15, label %83
    i32 5, label %87
    i32 8, label %91
    i32 9, label %95
    i32 10, label %99
    i32 11, label %103
    i32 12, label %107
    i32 13, label %111
    i32 14, label %115
    i32 23, label %119
    i32 16, label %123
    i32 24, label %127
    i32 17, label %131
    i32 18, label %135
    i32 19, label %139
    i32 25, label %143
    i32 26, label %147
    i32 27, label %151
    i32 28, label %155
    i32 30, label %159
    i32 31, label %163
    i32 32, label %167
    i32 33, label %171
    i32 34, label %175
    i32 35, label %179
    i32 40, label %183
    i32 41, label %187
    i32 42, label %191
    i32 43, label %195
  ]

47:                                               ; preds = %42
  %48 = load ptr, ptr %3, align 8, !tbaa !5
  %49 = load ptr, ptr %4, align 8, !tbaa !5
  %50 = call i32 @decodeRawAccelerometer(ptr noundef %48, ptr noundef %49)
  store i32 %50, ptr %5, align 4, !tbaa !9
  br label %200

51:                                               ; preds = %42
  %52 = load ptr, ptr %3, align 8, !tbaa !5
  %53 = load ptr, ptr %4, align 8, !tbaa !5
  %54 = call i32 @decodeAccelerometer(ptr noundef %52, ptr noundef %53)
  store i32 %54, ptr %5, align 4, !tbaa !9
  br label %200

55:                                               ; preds = %42
  %56 = load ptr, ptr %3, align 8, !tbaa !5
  %57 = load ptr, ptr %4, align 8, !tbaa !5
  %58 = call i32 @decodeLinearAcceleration(ptr noundef %56, ptr noundef %57)
  store i32 %58, ptr %5, align 4, !tbaa !9
  br label %200

59:                                               ; preds = %42
  %60 = load ptr, ptr %3, align 8, !tbaa !5
  %61 = load ptr, ptr %4, align 8, !tbaa !5
  %62 = call i32 @decodeGravity(ptr noundef %60, ptr noundef %61)
  store i32 %62, ptr %5, align 4, !tbaa !9
  br label %200

63:                                               ; preds = %42
  %64 = load ptr, ptr %3, align 8, !tbaa !5
  %65 = load ptr, ptr %4, align 8, !tbaa !5
  %66 = call i32 @decodeRawGyroscope(ptr noundef %64, ptr noundef %65)
  store i32 %66, ptr %5, align 4, !tbaa !9
  br label %200

67:                                               ; preds = %42
  %68 = load ptr, ptr %3, align 8, !tbaa !5
  %69 = load ptr, ptr %4, align 8, !tbaa !5
  %70 = call i32 @decodeGyroscopeCalibrated(ptr noundef %68, ptr noundef %69)
  store i32 %70, ptr %5, align 4, !tbaa !9
  br label %200

71:                                               ; preds = %42
  %72 = load ptr, ptr %3, align 8, !tbaa !5
  %73 = load ptr, ptr %4, align 8, !tbaa !5
  %74 = call i32 @decodeGyroscopeUncal(ptr noundef %72, ptr noundef %73)
  store i32 %74, ptr %5, align 4, !tbaa !9
  br label %200

75:                                               ; preds = %42
  %76 = load ptr, ptr %3, align 8, !tbaa !5
  %77 = load ptr, ptr %4, align 8, !tbaa !5
  %78 = call i32 @decodeRawMagnetometer(ptr noundef %76, ptr noundef %77)
  store i32 %78, ptr %5, align 4, !tbaa !9
  br label %200

79:                                               ; preds = %42
  %80 = load ptr, ptr %3, align 8, !tbaa !5
  %81 = load ptr, ptr %4, align 8, !tbaa !5
  %82 = call i32 @decodeMagneticFieldCalibrated(ptr noundef %80, ptr noundef %81)
  store i32 %82, ptr %5, align 4, !tbaa !9
  br label %200

83:                                               ; preds = %42
  %84 = load ptr, ptr %3, align 8, !tbaa !5
  %85 = load ptr, ptr %4, align 8, !tbaa !5
  %86 = call i32 @decodeMagneticFieldUncal(ptr noundef %84, ptr noundef %85)
  store i32 %86, ptr %5, align 4, !tbaa !9
  br label %200

87:                                               ; preds = %42
  %88 = load ptr, ptr %3, align 8, !tbaa !5
  %89 = load ptr, ptr %4, align 8, !tbaa !5
  %90 = call i32 @decodeRotationVector(ptr noundef %88, ptr noundef %89)
  store i32 %90, ptr %5, align 4, !tbaa !9
  br label %200

91:                                               ; preds = %42
  %92 = load ptr, ptr %3, align 8, !tbaa !5
  %93 = load ptr, ptr %4, align 8, !tbaa !5
  %94 = call i32 @decodeGameRotationVector(ptr noundef %92, ptr noundef %93)
  store i32 %94, ptr %5, align 4, !tbaa !9
  br label %200

95:                                               ; preds = %42
  %96 = load ptr, ptr %3, align 8, !tbaa !5
  %97 = load ptr, ptr %4, align 8, !tbaa !5
  %98 = call i32 @decodeGeomagneticRotationVector(ptr noundef %96, ptr noundef %97)
  store i32 %98, ptr %5, align 4, !tbaa !9
  br label %200

99:                                               ; preds = %42
  %100 = load ptr, ptr %3, align 8, !tbaa !5
  %101 = load ptr, ptr %4, align 8, !tbaa !5
  %102 = call i32 @decodePressure(ptr noundef %100, ptr noundef %101)
  store i32 %102, ptr %5, align 4, !tbaa !9
  br label %200

103:                                              ; preds = %42
  %104 = load ptr, ptr %3, align 8, !tbaa !5
  %105 = load ptr, ptr %4, align 8, !tbaa !5
  %106 = call i32 @decodeAmbientLight(ptr noundef %104, ptr noundef %105)
  store i32 %106, ptr %5, align 4, !tbaa !9
  br label %200

107:                                              ; preds = %42
  %108 = load ptr, ptr %3, align 8, !tbaa !5
  %109 = load ptr, ptr %4, align 8, !tbaa !5
  %110 = call i32 @decodeHumidity(ptr noundef %108, ptr noundef %109)
  store i32 %110, ptr %5, align 4, !tbaa !9
  br label %200

111:                                              ; preds = %42
  %112 = load ptr, ptr %3, align 8, !tbaa !5
  %113 = load ptr, ptr %4, align 8, !tbaa !5
  %114 = call i32 @decodeProximity(ptr noundef %112, ptr noundef %113)
  store i32 %114, ptr %5, align 4, !tbaa !9
  br label %200

115:                                              ; preds = %42
  %116 = load ptr, ptr %3, align 8, !tbaa !5
  %117 = load ptr, ptr %4, align 8, !tbaa !5
  %118 = call i32 @decodeTemperature(ptr noundef %116, ptr noundef %117)
  store i32 %118, ptr %5, align 4, !tbaa !9
  br label %200

119:                                              ; preds = %42
  %120 = load ptr, ptr %3, align 8, !tbaa !5
  %121 = load ptr, ptr %4, align 8, !tbaa !5
  %122 = call i32 @decodeReserved(ptr noundef %120, ptr noundef %121)
  store i32 %122, ptr %5, align 4, !tbaa !9
  br label %200

123:                                              ; preds = %42
  %124 = load ptr, ptr %3, align 8, !tbaa !5
  %125 = load ptr, ptr %4, align 8, !tbaa !5
  %126 = call i32 @decodeTapDetector(ptr noundef %124, ptr noundef %125)
  store i32 %126, ptr %5, align 4, !tbaa !9
  br label %200

127:                                              ; preds = %42
  %128 = load ptr, ptr %3, align 8, !tbaa !5
  %129 = load ptr, ptr %4, align 8, !tbaa !5
  %130 = call i32 @decodeStepDetector(ptr noundef %128, ptr noundef %129)
  store i32 %130, ptr %5, align 4, !tbaa !9
  br label %200

131:                                              ; preds = %42
  %132 = load ptr, ptr %3, align 8, !tbaa !5
  %133 = load ptr, ptr %4, align 8, !tbaa !5
  %134 = call i32 @decodeStepCounter(ptr noundef %132, ptr noundef %133)
  store i32 %134, ptr %5, align 4, !tbaa !9
  br label %200

135:                                              ; preds = %42
  %136 = load ptr, ptr %3, align 8, !tbaa !5
  %137 = load ptr, ptr %4, align 8, !tbaa !5
  %138 = call i32 @decodeSignificantMotion(ptr noundef %136, ptr noundef %137)
  store i32 %138, ptr %5, align 4, !tbaa !9
  br label %200

139:                                              ; preds = %42
  %140 = load ptr, ptr %3, align 8, !tbaa !5
  %141 = load ptr, ptr %4, align 8, !tbaa !5
  %142 = call i32 @decodeStabilityClassifier(ptr noundef %140, ptr noundef %141)
  store i32 %142, ptr %5, align 4, !tbaa !9
  br label %200

143:                                              ; preds = %42
  %144 = load ptr, ptr %3, align 8, !tbaa !5
  %145 = load ptr, ptr %4, align 8, !tbaa !5
  %146 = call i32 @decodeShakeDetector(ptr noundef %144, ptr noundef %145)
  store i32 %146, ptr %5, align 4, !tbaa !9
  br label %200

147:                                              ; preds = %42
  %148 = load ptr, ptr %3, align 8, !tbaa !5
  %149 = load ptr, ptr %4, align 8, !tbaa !5
  %150 = call i32 @decodeFlipDetector(ptr noundef %148, ptr noundef %149)
  store i32 %150, ptr %5, align 4, !tbaa !9
  br label %200

151:                                              ; preds = %42
  %152 = load ptr, ptr %3, align 8, !tbaa !5
  %153 = load ptr, ptr %4, align 8, !tbaa !5
  %154 = call i32 @decodePickupDetector(ptr noundef %152, ptr noundef %153)
  store i32 %154, ptr %5, align 4, !tbaa !9
  br label %200

155:                                              ; preds = %42
  %156 = load ptr, ptr %3, align 8, !tbaa !5
  %157 = load ptr, ptr %4, align 8, !tbaa !5
  %158 = call i32 @decodeStabilityDetector(ptr noundef %156, ptr noundef %157)
  store i32 %158, ptr %5, align 4, !tbaa !9
  br label %200

159:                                              ; preds = %42
  %160 = load ptr, ptr %3, align 8, !tbaa !5
  %161 = load ptr, ptr %4, align 8, !tbaa !5
  %162 = call i32 @decodePersonalActivityClassifier(ptr noundef %160, ptr noundef %161)
  store i32 %162, ptr %5, align 4, !tbaa !9
  br label %200

163:                                              ; preds = %42
  %164 = load ptr, ptr %3, align 8, !tbaa !5
  %165 = load ptr, ptr %4, align 8, !tbaa !5
  %166 = call i32 @decodeSleepDetector(ptr noundef %164, ptr noundef %165)
  store i32 %166, ptr %5, align 4, !tbaa !9
  br label %200

167:                                              ; preds = %42
  %168 = load ptr, ptr %3, align 8, !tbaa !5
  %169 = load ptr, ptr %4, align 8, !tbaa !5
  %170 = call i32 @decodeTiltDetector(ptr noundef %168, ptr noundef %169)
  store i32 %170, ptr %5, align 4, !tbaa !9
  br label %200

171:                                              ; preds = %42
  %172 = load ptr, ptr %3, align 8, !tbaa !5
  %173 = load ptr, ptr %4, align 8, !tbaa !5
  %174 = call i32 @decodePocketDetector(ptr noundef %172, ptr noundef %173)
  store i32 %174, ptr %5, align 4, !tbaa !9
  br label %200

175:                                              ; preds = %42
  %176 = load ptr, ptr %3, align 8, !tbaa !5
  %177 = load ptr, ptr %4, align 8, !tbaa !5
  %178 = call i32 @decodeCircLEDetector(ptr noundef %176, ptr noundef %177)
  store i32 %178, ptr %5, align 4, !tbaa !9
  br label %200

179:                                              ; preds = %42
  %180 = load ptr, ptr %3, align 8, !tbaa !5
  %181 = load ptr, ptr %4, align 8, !tbaa !5
  %182 = call i32 @decodeHeartRateMonitor(ptr noundef %180, ptr noundef %181)
  store i32 %182, ptr %5, align 4, !tbaa !9
  br label %200

183:                                              ; preds = %42
  %184 = load ptr, ptr %3, align 8, !tbaa !5
  %185 = load ptr, ptr %4, align 8, !tbaa !5
  %186 = call i32 @decodeArvrStabilizedRV(ptr noundef %184, ptr noundef %185)
  store i32 %186, ptr %5, align 4, !tbaa !9
  br label %200

187:                                              ; preds = %42
  %188 = load ptr, ptr %3, align 8, !tbaa !5
  %189 = load ptr, ptr %4, align 8, !tbaa !5
  %190 = call i32 @decodeArvrStabilizedGRV(ptr noundef %188, ptr noundef %189)
  store i32 %190, ptr %5, align 4, !tbaa !9
  br label %200

191:                                              ; preds = %42
  %192 = load ptr, ptr %3, align 8, !tbaa !5
  %193 = load ptr, ptr %4, align 8, !tbaa !5
  %194 = call i32 @decodeGyroIntegratedRV(ptr noundef %192, ptr noundef %193)
  store i32 %194, ptr %5, align 4, !tbaa !9
  br label %200

195:                                              ; preds = %42
  %196 = load ptr, ptr %3, align 8, !tbaa !5
  %197 = load ptr, ptr %4, align 8, !tbaa !5
  %198 = call i32 @decodeIZroRequest(ptr noundef %196, ptr noundef %197)
  store i32 %198, ptr %5, align 4, !tbaa !9
  br label %200

199:                                              ; preds = %42
  store i32 -1, ptr %5, align 4, !tbaa !9
  br label %200

200:                                              ; preds = %199, %195, %191, %187, %183, %179, %175, %171, %167, %163, %159, %155, %151, %147, %143, %139, %135, %131, %127, %123, %119, %115, %111, %107, %103, %99, %95, %91, %87, %83, %79, %75, %71, %67, %63, %59, %55, %51, %47
  %201 = load i32, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #2
  ret i32 %201
}

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

; Function Attrs: nounwind uwtable
declare hidden i32 @decodeRawAccelerometer(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @decodeAccelerometer(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @decodeLinearAcceleration(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @decodeGravity(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @decodeRawGyroscope(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @decodeGyroscopeCalibrated(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @decodeGyroscopeUncal(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @decodeRawMagnetometer(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @decodeMagneticFieldCalibrated(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @decodeMagneticFieldUncal(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @decodeRotationVector(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @decodeGameRotationVector(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @decodeGeomagneticRotationVector(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @decodePressure(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @decodeAmbientLight(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @decodeHumidity(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @decodeProximity(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @decodeTemperature(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @decodeReserved(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @decodeTapDetector(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @decodeStepDetector(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @decodeStepCounter(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @decodeSignificantMotion(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @decodeStabilityClassifier(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @decodeShakeDetector(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @decodeFlipDetector(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @decodePickupDetector(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @decodeStabilityDetector(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @decodePersonalActivityClassifier(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @decodeSleepDetector(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @decodeTiltDetector(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @decodePocketDetector(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @decodeCircLEDetector(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @decodeHeartRateMonitor(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @decodeArvrStabilizedRV(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @decodeArvrStabilizedGRV(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @decodeGyroIntegratedRV(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @decodeIZroRequest(ptr noundef, ptr noundef) #0

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !7, i64 9}
!12 = !{!"sh2_SensorEvent", !13, i64 0, !7, i64 8, !7, i64 9, !7, i64 10}
!13 = !{!"long", !7, i64 0}
!14 = !{!15, !7, i64 0}
!15 = !{!"sh2_SensorValue", !7, i64 0, !7, i64 1, !7, i64 2, !13, i64 8, !10, i64 16, !7, i64 20}
!16 = !{!12, !13, i64 0}
!17 = !{!15, !13, i64 8}
!18 = !{!7, !7, i64 0}
!19 = !{!15, !7, i64 1}
!20 = !{!15, !7, i64 2}


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

; Function Attrs: nounwind uwtable
define dso_local i32 @sh2_decodeSensorEvent(ptr noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = getelementptr inbounds i8, ptr %1, i64 9
  %4 = load i8, ptr %3, align 1, !tbaa !5
  store i8 %4, ptr %0, align 8, !tbaa !10
  %5 = load i64, ptr %1, align 8, !tbaa !13
  %6 = getelementptr inbounds i8, ptr %0, i64 8
  store i64 %5, ptr %6, align 8, !tbaa !14
  %.not = icmp eq i8 %4, 42
  br i1 %.not, label %.thread, label %10

.thread:                                          ; preds = %2
  %7 = getelementptr inbounds i8, ptr %0, i64 1
  store i8 0, ptr %7, align 1, !tbaa !15
  %8 = getelementptr inbounds i8, ptr %0, i64 2
  store i8 0, ptr %8, align 2, !tbaa !16
  %9 = tail call i32 @decodeGyroIntegratedRV(ptr noundef nonnull %0, ptr noundef nonnull %1)
  br label %92

10:                                               ; preds = %2
  %11 = getelementptr inbounds i8, ptr %1, i64 11
  %12 = load i8, ptr %11, align 1, !tbaa !17
  %13 = getelementptr inbounds i8, ptr %0, i64 1
  store i8 %12, ptr %13, align 1, !tbaa !15
  %14 = getelementptr inbounds i8, ptr %1, i64 12
  %15 = load i8, ptr %14, align 2, !tbaa !17
  %16 = and i8 %15, 3
  %17 = getelementptr inbounds i8, ptr %0, i64 2
  store i8 %16, ptr %17, align 2, !tbaa !16
  switch i8 %4, label %92 [
    i8 20, label %18
    i8 1, label %20
    i8 4, label %22
    i8 6, label %24
    i8 21, label %26
    i8 2, label %28
    i8 7, label %30
    i8 22, label %32
    i8 3, label %34
    i8 15, label %36
    i8 5, label %38
    i8 8, label %40
    i8 9, label %42
    i8 10, label %44
    i8 11, label %46
    i8 12, label %48
    i8 13, label %50
    i8 14, label %52
    i8 23, label %54
    i8 16, label %56
    i8 24, label %58
    i8 17, label %60
    i8 18, label %62
    i8 19, label %64
    i8 25, label %66
    i8 26, label %68
    i8 27, label %70
    i8 28, label %72
    i8 30, label %74
    i8 31, label %76
    i8 32, label %78
    i8 33, label %80
    i8 34, label %82
    i8 35, label %84
    i8 40, label %86
    i8 41, label %88
    i8 43, label %90
  ]

18:                                               ; preds = %10
  %19 = tail call i32 @decodeRawAccelerometer(ptr noundef nonnull %0, ptr noundef nonnull %1)
  br label %92

20:                                               ; preds = %10
  %21 = tail call i32 @decodeAccelerometer(ptr noundef nonnull %0, ptr noundef nonnull %1)
  br label %92

22:                                               ; preds = %10
  %23 = tail call i32 @decodeLinearAcceleration(ptr noundef nonnull %0, ptr noundef nonnull %1)
  br label %92

24:                                               ; preds = %10
  %25 = tail call i32 @decodeGravity(ptr noundef nonnull %0, ptr noundef nonnull %1)
  br label %92

26:                                               ; preds = %10
  %27 = tail call i32 @decodeRawGyroscope(ptr noundef nonnull %0, ptr noundef nonnull %1)
  br label %92

28:                                               ; preds = %10
  %29 = tail call i32 @decodeGyroscopeCalibrated(ptr noundef nonnull %0, ptr noundef nonnull %1)
  br label %92

30:                                               ; preds = %10
  %31 = tail call i32 @decodeGyroscopeUncal(ptr noundef nonnull %0, ptr noundef nonnull %1)
  br label %92

32:                                               ; preds = %10
  %33 = tail call i32 @decodeRawMagnetometer(ptr noundef nonnull %0, ptr noundef nonnull %1)
  br label %92

34:                                               ; preds = %10
  %35 = tail call i32 @decodeMagneticFieldCalibrated(ptr noundef nonnull %0, ptr noundef nonnull %1)
  br label %92

36:                                               ; preds = %10
  %37 = tail call i32 @decodeMagneticFieldUncal(ptr noundef nonnull %0, ptr noundef nonnull %1)
  br label %92

38:                                               ; preds = %10
  %39 = tail call i32 @decodeRotationVector(ptr noundef nonnull %0, ptr noundef nonnull %1)
  br label %92

40:                                               ; preds = %10
  %41 = tail call i32 @decodeGameRotationVector(ptr noundef nonnull %0, ptr noundef nonnull %1)
  br label %92

42:                                               ; preds = %10
  %43 = tail call i32 @decodeGeomagneticRotationVector(ptr noundef nonnull %0, ptr noundef nonnull %1)
  br label %92

44:                                               ; preds = %10
  %45 = tail call i32 @decodePressure(ptr noundef nonnull %0, ptr noundef nonnull %1)
  br label %92

46:                                               ; preds = %10
  %47 = tail call i32 @decodeAmbientLight(ptr noundef nonnull %0, ptr noundef nonnull %1)
  br label %92

48:                                               ; preds = %10
  %49 = tail call i32 @decodeHumidity(ptr noundef nonnull %0, ptr noundef nonnull %1)
  br label %92

50:                                               ; preds = %10
  %51 = tail call i32 @decodeProximity(ptr noundef nonnull %0, ptr noundef nonnull %1)
  br label %92

52:                                               ; preds = %10
  %53 = tail call i32 @decodeTemperature(ptr noundef nonnull %0, ptr noundef nonnull %1)
  br label %92

54:                                               ; preds = %10
  %55 = tail call i32 @decodeReserved(ptr noundef nonnull %0, ptr noundef nonnull %1)
  br label %92

56:                                               ; preds = %10
  %57 = tail call i32 @decodeTapDetector(ptr noundef nonnull %0, ptr noundef nonnull %1)
  br label %92

58:                                               ; preds = %10
  %59 = tail call i32 @decodeStepDetector(ptr noundef nonnull %0, ptr noundef nonnull %1)
  br label %92

60:                                               ; preds = %10
  %61 = tail call i32 @decodeStepCounter(ptr noundef nonnull %0, ptr noundef nonnull %1)
  br label %92

62:                                               ; preds = %10
  %63 = tail call i32 @decodeSignificantMotion(ptr noundef nonnull %0, ptr noundef nonnull %1)
  br label %92

64:                                               ; preds = %10
  %65 = tail call i32 @decodeStabilityClassifier(ptr noundef nonnull %0, ptr noundef nonnull %1)
  br label %92

66:                                               ; preds = %10
  %67 = tail call i32 @decodeShakeDetector(ptr noundef nonnull %0, ptr noundef nonnull %1)
  br label %92

68:                                               ; preds = %10
  %69 = tail call i32 @decodeFlipDetector(ptr noundef nonnull %0, ptr noundef nonnull %1)
  br label %92

70:                                               ; preds = %10
  %71 = tail call i32 @decodePickupDetector(ptr noundef nonnull %0, ptr noundef nonnull %1)
  br label %92

72:                                               ; preds = %10
  %73 = tail call i32 @decodeStabilityDetector(ptr noundef nonnull %0, ptr noundef nonnull %1)
  br label %92

74:                                               ; preds = %10
  %75 = tail call i32 @decodePersonalActivityClassifier(ptr noundef nonnull %0, ptr noundef nonnull %1)
  br label %92

76:                                               ; preds = %10
  %77 = tail call i32 @decodeSleepDetector(ptr noundef nonnull %0, ptr noundef nonnull %1)
  br label %92

78:                                               ; preds = %10
  %79 = tail call i32 @decodeTiltDetector(ptr noundef nonnull %0, ptr noundef nonnull %1)
  br label %92

80:                                               ; preds = %10
  %81 = tail call i32 @decodePocketDetector(ptr noundef nonnull %0, ptr noundef nonnull %1)
  br label %92

82:                                               ; preds = %10
  %83 = tail call i32 @decodeCircLEDetector(ptr noundef nonnull %0, ptr noundef nonnull %1)
  br label %92

84:                                               ; preds = %10
  %85 = tail call i32 @decodeHeartRateMonitor(ptr noundef nonnull %0, ptr noundef nonnull %1)
  br label %92

86:                                               ; preds = %10
  %87 = tail call i32 @decodeArvrStabilizedRV(ptr noundef nonnull %0, ptr noundef nonnull %1)
  br label %92

88:                                               ; preds = %10
  %89 = tail call i32 @decodeArvrStabilizedGRV(ptr noundef nonnull %0, ptr noundef nonnull %1)
  br label %92

90:                                               ; preds = %10
  %91 = tail call i32 @decodeIZroRequest(ptr noundef nonnull %0, ptr noundef nonnull %1)
  br label %92

92:                                               ; preds = %10, %90, %.thread, %88, %86, %84, %82, %80, %78, %76, %74, %72, %70, %68, %66, %64, %62, %60, %58, %56, %54, %52, %50, %48, %46, %44, %42, %40, %38, %36, %34, %32, %30, %28, %26, %24, %22, %20, %18
  %.0 = phi i32 [ %91, %90 ], [ %9, %.thread ], [ %89, %88 ], [ %87, %86 ], [ %85, %84 ], [ %83, %82 ], [ %81, %80 ], [ %79, %78 ], [ %77, %76 ], [ %75, %74 ], [ %73, %72 ], [ %71, %70 ], [ %69, %68 ], [ %67, %66 ], [ %65, %64 ], [ %63, %62 ], [ %61, %60 ], [ %59, %58 ], [ %57, %56 ], [ %55, %54 ], [ %53, %52 ], [ %51, %50 ], [ %49, %48 ], [ %47, %46 ], [ %45, %44 ], [ %43, %42 ], [ %41, %40 ], [ %39, %38 ], [ %37, %36 ], [ %35, %34 ], [ %33, %32 ], [ %31, %30 ], [ %29, %28 ], [ %27, %26 ], [ %25, %24 ], [ %23, %22 ], [ %21, %20 ], [ %19, %18 ], [ -1, %10 ]
  ret i32 %.0
}

; Function Attrs: nounwind uwtable
declare hidden i32 @decodeRawAccelerometer(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden i32 @decodeAccelerometer(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden i32 @decodeLinearAcceleration(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden i32 @decodeGravity(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden i32 @decodeRawGyroscope(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden i32 @decodeGyroscopeCalibrated(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden i32 @decodeGyroscopeUncal(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden i32 @decodeRawMagnetometer(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden i32 @decodeMagneticFieldCalibrated(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden i32 @decodeMagneticFieldUncal(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden i32 @decodeRotationVector(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden i32 @decodeGameRotationVector(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden i32 @decodeGeomagneticRotationVector(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden i32 @decodePressure(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden i32 @decodeAmbientLight(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden i32 @decodeHumidity(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden i32 @decodeProximity(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden i32 @decodeTemperature(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden i32 @decodeReserved(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden i32 @decodeTapDetector(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden i32 @decodeStepDetector(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden i32 @decodeStepCounter(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden i32 @decodeSignificantMotion(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden i32 @decodeStabilityClassifier(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden i32 @decodeShakeDetector(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden i32 @decodeFlipDetector(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden i32 @decodePickupDetector(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden i32 @decodeStabilityDetector(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden i32 @decodePersonalActivityClassifier(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden i32 @decodeSleepDetector(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden i32 @decodeTiltDetector(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden i32 @decodePocketDetector(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden i32 @decodeCircLEDetector(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden i32 @decodeHeartRateMonitor(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden i32 @decodeArvrStabilizedRV(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden i32 @decodeArvrStabilizedGRV(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden i32 @decodeGyroIntegratedRV(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden i32 @decodeIZroRequest(ptr noundef, ptr noundef) local_unnamed_addr #0

attributes #0 = { 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" }

!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, !8, i64 9}
!6 = !{!"sh2_SensorEvent", !7, i64 0, !8, i64 8, !8, i64 9, !8, i64 10}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!11, !8, i64 0}
!11 = !{!"sh2_SensorValue", !8, i64 0, !8, i64 1, !8, i64 2, !7, i64 8, !12, i64 16, !8, i64 20}
!12 = !{!"int", !8, i64 0}
!13 = !{!6, !7, i64 0}
!14 = !{!11, !7, i64 8}
!15 = !{!11, !8, i64 1}
!16 = !{!11, !8, i64 2}
!17 = !{!8, !8, i64 0}


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