; LLVM IR from beagleboard/librobotcontrol :: examples/src (rc_altitude)

; 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.rc_vector_t = type { i32, ptr, i32 }
%struct.rc_kalman_t = type { %struct.rc_matrix_t, %struct.rc_matrix_t, %struct.rc_matrix_t, %struct.rc_matrix_t, %struct.rc_matrix_t, %struct.rc_matrix_t, %struct.rc_matrix_t, %struct.rc_vector_t, %struct.rc_vector_t, i32, i64 }
%struct.rc_matrix_t = type { i32, i32, ptr, i32 }
%struct.rc_filter_t = type { i32, double, double, %struct.rc_vector_t, %struct.rc_vector_t, i32, double, double, i32, i32, double, %struct.rc_ringbuf_t, %struct.rc_ringbuf_t, double, double, i64, i32 }
%struct.rc_ringbuf_t = type { ptr, i32, i32, i32 }
%struct.rc_bmp_data_t = type { double, double, double }
%struct.rc_mpu_data_t = type { [3 x double], [3 x double], [3 x double], double, [3 x i16], [3 x i16], double, double, [4 x double], [3 x double], i32, i32, i32, [4 x double], [3 x double], double, double }
%struct.rc_mpu_config_t = type { i32, i32, i32, i8, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, double, i32, i32, i32, i32, i32 }

@u = external hidden global %struct.rc_vector_t, align 8
@y = external hidden global %struct.rc_vector_t, align 8
@kf = external hidden global %struct.rc_kalman_t, align 8
@acc_lp = external hidden global %struct.rc_filter_t, align 8
@running = external hidden global i32, align 4
@.str = external hidden unnamed_addr constant [24 x i8], align 1
@bmp_data = external hidden global %struct.rc_bmp_data_t, align 8
@.str.1 = external hidden unnamed_addr constant [18 x i8], align 1
@mpu_data = external hidden global %struct.rc_mpu_data_t, align 8
@.str.2 = external hidden unnamed_addr constant [30 x i8], align 1
@stdout = external global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [9 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca %struct.rc_mpu_config_t, align 8
  %3 = alloca %struct.rc_matrix_t, align 8
  %4 = alloca %struct.rc_matrix_t, align 8
  %5 = alloca %struct.rc_matrix_t, align 8
  %6 = alloca %struct.rc_matrix_t, align 8
  %7 = alloca %struct.rc_matrix_t, align 8
  %8 = alloca %struct.rc_matrix_t, align 8
  %9 = alloca i32, align 4
  %10 = alloca %struct.rc_mpu_config_t, align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 88, ptr %2) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %3) #6
  call void @llvm.memset.p0.i64(ptr align 8 %3, i8 0, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 24, ptr %4) #6
  call void @llvm.memset.p0.i64(ptr align 8 %4, i8 0, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 24, ptr %5) #6
  call void @llvm.memset.p0.i64(ptr align 8 %5, i8 0, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 24, ptr %6) #6
  call void @llvm.memset.p0.i64(ptr align 8 %6, i8 0, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 24, ptr %7) #6
  call void @llvm.memset.p0.i64(ptr align 8 %7, i8 0, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 24, ptr %8) #6
  call void @llvm.memset.p0.i64(ptr align 8 %8, i8 0, i64 24, i1 false)
  %11 = call i32 @rc_matrix_zeros(ptr noundef %3, i32 noundef 3, i32 noundef 3)
  %12 = call i32 @rc_matrix_zeros(ptr noundef %4, i32 noundef 3, i32 noundef 1)
  %13 = call i32 @rc_matrix_zeros(ptr noundef %5, i32 noundef 1, i32 noundef 3)
  %14 = call i32 @rc_matrix_zeros(ptr noundef %6, i32 noundef 3, i32 noundef 3)
  %15 = call i32 @rc_matrix_zeros(ptr noundef %7, i32 noundef 1, i32 noundef 1)
  %16 = call i32 @rc_matrix_zeros(ptr noundef %8, i32 noundef 3, i32 noundef 3)
  %17 = call i32 @rc_vector_zeros(ptr noundef @u, i32 noundef 1)
  %18 = call i32 @rc_vector_zeros(ptr noundef @y, i32 noundef 1)
  %19 = getelementptr inbounds %struct.rc_matrix_t, ptr %3, i32 0, i32 2
  %20 = load ptr, ptr %19, align 8, !tbaa !5
  %21 = getelementptr inbounds ptr, ptr %20, i64 0
  %22 = load ptr, ptr %21, align 8, !tbaa !11
  %23 = getelementptr inbounds double, ptr %22, i64 0
  store double 1.000000e+00, ptr %23, align 8, !tbaa !12
  %24 = getelementptr inbounds %struct.rc_matrix_t, ptr %3, i32 0, i32 2
  %25 = load ptr, ptr %24, align 8, !tbaa !5
  %26 = getelementptr inbounds ptr, ptr %25, i64 0
  %27 = load ptr, ptr %26, align 8, !tbaa !11
  %28 = getelementptr inbounds double, ptr %27, i64 1
  store double 5.000000e-03, ptr %28, align 8, !tbaa !12
  %29 = getelementptr inbounds %struct.rc_matrix_t, ptr %3, i32 0, i32 2
  %30 = load ptr, ptr %29, align 8, !tbaa !5
  %31 = getelementptr inbounds ptr, ptr %30, i64 0
  %32 = load ptr, ptr %31, align 8, !tbaa !11
  %33 = getelementptr inbounds double, ptr %32, i64 2
  store double 0.000000e+00, ptr %33, align 8, !tbaa !12
  %34 = getelementptr inbounds %struct.rc_matrix_t, ptr %3, i32 0, i32 2
  %35 = load ptr, ptr %34, align 8, !tbaa !5
  %36 = getelementptr inbounds ptr, ptr %35, i64 1
  %37 = load ptr, ptr %36, align 8, !tbaa !11
  %38 = getelementptr inbounds double, ptr %37, i64 0
  store double 0.000000e+00, ptr %38, align 8, !tbaa !12
  %39 = getelementptr inbounds %struct.rc_matrix_t, ptr %3, i32 0, i32 2
  %40 = load ptr, ptr %39, align 8, !tbaa !5
  %41 = getelementptr inbounds ptr, ptr %40, i64 1
  %42 = load ptr, ptr %41, align 8, !tbaa !11
  %43 = getelementptr inbounds double, ptr %42, i64 1
  store double 1.000000e+00, ptr %43, align 8, !tbaa !12
  %44 = getelementptr inbounds %struct.rc_matrix_t, ptr %3, i32 0, i32 2
  %45 = load ptr, ptr %44, align 8, !tbaa !5
  %46 = getelementptr inbounds ptr, ptr %45, i64 1
  %47 = load ptr, ptr %46, align 8, !tbaa !11
  %48 = getelementptr inbounds double, ptr %47, i64 2
  store double -5.000000e-03, ptr %48, align 8, !tbaa !12
  %49 = getelementptr inbounds %struct.rc_matrix_t, ptr %3, i32 0, i32 2
  %50 = load ptr, ptr %49, align 8, !tbaa !5
  %51 = getelementptr inbounds ptr, ptr %50, i64 2
  %52 = load ptr, ptr %51, align 8, !tbaa !11
  %53 = getelementptr inbounds double, ptr %52, i64 0
  store double 0.000000e+00, ptr %53, align 8, !tbaa !12
  %54 = getelementptr inbounds %struct.rc_matrix_t, ptr %3, i32 0, i32 2
  %55 = load ptr, ptr %54, align 8, !tbaa !5
  %56 = getelementptr inbounds ptr, ptr %55, i64 2
  %57 = load ptr, ptr %56, align 8, !tbaa !11
  %58 = getelementptr inbounds double, ptr %57, i64 1
  store double 0.000000e+00, ptr %58, align 8, !tbaa !12
  %59 = getelementptr inbounds %struct.rc_matrix_t, ptr %3, i32 0, i32 2
  %60 = load ptr, ptr %59, align 8, !tbaa !5
  %61 = getelementptr inbounds ptr, ptr %60, i64 2
  %62 = load ptr, ptr %61, align 8, !tbaa !11
  %63 = getelementptr inbounds double, ptr %62, i64 2
  store double 1.000000e+00, ptr %63, align 8, !tbaa !12
  %64 = getelementptr inbounds %struct.rc_matrix_t, ptr %4, i32 0, i32 2
  %65 = load ptr, ptr %64, align 8, !tbaa !5
  %66 = getelementptr inbounds ptr, ptr %65, i64 0
  %67 = load ptr, ptr %66, align 8, !tbaa !11
  %68 = getelementptr inbounds double, ptr %67, i64 0
  store double 1.250000e-05, ptr %68, align 8, !tbaa !12
  %69 = getelementptr inbounds %struct.rc_matrix_t, ptr %4, i32 0, i32 2
  %70 = load ptr, ptr %69, align 8, !tbaa !5
  %71 = getelementptr inbounds ptr, ptr %70, i64 0
  %72 = load ptr, ptr %71, align 8, !tbaa !11
  %73 = getelementptr inbounds double, ptr %72, i64 1
  store double 5.000000e-03, ptr %73, align 8, !tbaa !12
  %74 = getelementptr inbounds %struct.rc_matrix_t, ptr %4, i32 0, i32 2
  %75 = load ptr, ptr %74, align 8, !tbaa !5
  %76 = getelementptr inbounds ptr, ptr %75, i64 0
  %77 = load ptr, ptr %76, align 8, !tbaa !11
  %78 = getelementptr inbounds double, ptr %77, i64 2
  store double 0.000000e+00, ptr %78, align 8, !tbaa !12
  %79 = getelementptr inbounds %struct.rc_matrix_t, ptr %5, i32 0, i32 2
  %80 = load ptr, ptr %79, align 8, !tbaa !5
  %81 = getelementptr inbounds ptr, ptr %80, i64 0
  %82 = load ptr, ptr %81, align 8, !tbaa !11
  %83 = getelementptr inbounds double, ptr %82, i64 0
  store double 1.000000e+00, ptr %83, align 8, !tbaa !12
  %84 = getelementptr inbounds %struct.rc_matrix_t, ptr %5, i32 0, i32 2
  %85 = load ptr, ptr %84, align 8, !tbaa !5
  %86 = getelementptr inbounds ptr, ptr %85, i64 0
  %87 = load ptr, ptr %86, align 8, !tbaa !11
  %88 = getelementptr inbounds double, ptr %87, i64 1
  store double 0.000000e+00, ptr %88, align 8, !tbaa !12
  %89 = getelementptr inbounds %struct.rc_matrix_t, ptr %5, i32 0, i32 2
  %90 = load ptr, ptr %89, align 8, !tbaa !5
  %91 = getelementptr inbounds ptr, ptr %90, i64 0
  %92 = load ptr, ptr %91, align 8, !tbaa !11
  %93 = getelementptr inbounds double, ptr %92, i64 2
  store double 0.000000e+00, ptr %93, align 8, !tbaa !12
  %94 = getelementptr inbounds %struct.rc_matrix_t, ptr %6, i32 0, i32 2
  %95 = load ptr, ptr %94, align 8, !tbaa !5
  %96 = getelementptr inbounds ptr, ptr %95, i64 0
  %97 = load ptr, ptr %96, align 8, !tbaa !11
  %98 = getelementptr inbounds double, ptr %97, i64 0
  store double 1.000000e-09, ptr %98, align 8, !tbaa !12
  %99 = getelementptr inbounds %struct.rc_matrix_t, ptr %6, i32 0, i32 2
  %100 = load ptr, ptr %99, align 8, !tbaa !5
  %101 = getelementptr inbounds ptr, ptr %100, i64 1
  %102 = load ptr, ptr %101, align 8, !tbaa !11
  %103 = getelementptr inbounds double, ptr %102, i64 1
  store double 1.000000e-09, ptr %103, align 8, !tbaa !12
  %104 = getelementptr inbounds %struct.rc_matrix_t, ptr %6, i32 0, i32 2
  %105 = load ptr, ptr %104, align 8, !tbaa !5
  %106 = getelementptr inbounds ptr, ptr %105, i64 2
  %107 = load ptr, ptr %106, align 8, !tbaa !11
  %108 = getelementptr inbounds double, ptr %107, i64 2
  store double 1.000000e-04, ptr %108, align 8, !tbaa !12
  %109 = getelementptr inbounds %struct.rc_matrix_t, ptr %7, i32 0, i32 2
  %110 = load ptr, ptr %109, align 8, !tbaa !5
  %111 = getelementptr inbounds ptr, ptr %110, i64 0
  %112 = load ptr, ptr %111, align 8, !tbaa !11
  %113 = getelementptr inbounds double, ptr %112, i64 0
  store double 1.000000e+06, ptr %113, align 8, !tbaa !12
  %114 = getelementptr inbounds %struct.rc_matrix_t, ptr %8, i32 0, i32 2
  %115 = load ptr, ptr %114, align 8, !tbaa !5
  %116 = getelementptr inbounds ptr, ptr %115, i64 0
  %117 = load ptr, ptr %116, align 8, !tbaa !11
  %118 = getelementptr inbounds double, ptr %117, i64 0
  store double 1.258690e+03, ptr %118, align 8, !tbaa !12
  %119 = getelementptr inbounds %struct.rc_matrix_t, ptr %8, i32 0, i32 2
  %120 = load ptr, ptr %119, align 8, !tbaa !5
  %121 = getelementptr inbounds ptr, ptr %120, i64 0
  %122 = load ptr, ptr %121, align 8, !tbaa !11
  %123 = getelementptr inbounds double, ptr %122, i64 1
  store double 0x4063D39096BB98C8, ptr %123, align 8, !tbaa !12
  %124 = getelementptr inbounds %struct.rc_matrix_t, ptr %8, i32 0, i32 2
  %125 = load ptr, ptr %124, align 8, !tbaa !5
  %126 = getelementptr inbounds ptr, ptr %125, i64 0
  %127 = load ptr, ptr %126, align 8, !tbaa !11
  %128 = getelementptr inbounds double, ptr %127, i64 2
  store double -9.993700e+00, ptr %128, align 8, !tbaa !12
  %129 = getelementptr inbounds %struct.rc_matrix_t, ptr %8, i32 0, i32 2
  %130 = load ptr, ptr %129, align 8, !tbaa !5
  %131 = getelementptr inbounds ptr, ptr %130, i64 1
  %132 = load ptr, ptr %131, align 8, !tbaa !11
  %133 = getelementptr inbounds double, ptr %132, i64 0
  store double 0x4063D39096BB98C8, ptr %133, align 8, !tbaa !12
  %134 = getelementptr inbounds %struct.rc_matrix_t, ptr %8, i32 0, i32 2
  %135 = load ptr, ptr %134, align 8, !tbaa !5
  %136 = getelementptr inbounds ptr, ptr %135, i64 1
  %137 = load ptr, ptr %136, align 8, !tbaa !11
  %138 = getelementptr inbounds double, ptr %137, i64 1
  store double 2.998700e+01, ptr %138, align 8, !tbaa !12
  %139 = getelementptr inbounds %struct.rc_matrix_t, ptr %8, i32 0, i32 2
  %140 = load ptr, ptr %139, align 8, !tbaa !5
  %141 = getelementptr inbounds ptr, ptr %140, i64 1
  %142 = load ptr, ptr %141, align 8, !tbaa !11
  %143 = getelementptr inbounds double, ptr %142, i64 2
  store double -2.519100e+00, ptr %143, align 8, !tbaa !12
  %144 = getelementptr inbounds %struct.rc_matrix_t, ptr %8, i32 0, i32 2
  %145 = load ptr, ptr %144, align 8, !tbaa !5
  %146 = getelementptr inbounds ptr, ptr %145, i64 2
  %147 = load ptr, ptr %146, align 8, !tbaa !11
  %148 = getelementptr inbounds double, ptr %147, i64 0
  store double -9.993700e+00, ptr %148, align 8, !tbaa !12
  %149 = getelementptr inbounds %struct.rc_matrix_t, ptr %8, i32 0, i32 2
  %150 = load ptr, ptr %149, align 8, !tbaa !5
  %151 = getelementptr inbounds ptr, ptr %150, i64 2
  %152 = load ptr, ptr %151, align 8, !tbaa !11
  %153 = getelementptr inbounds double, ptr %152, i64 1
  store double -2.519100e+00, ptr %153, align 8, !tbaa !12
  %154 = getelementptr inbounds %struct.rc_matrix_t, ptr %8, i32 0, i32 2
  %155 = load ptr, ptr %154, align 8, !tbaa !5
  %156 = getelementptr inbounds ptr, ptr %155, i64 2
  %157 = load ptr, ptr %156, align 8, !tbaa !11
  %158 = getelementptr inbounds double, ptr %157, i64 2
  store double 3.174000e-01, ptr %158, align 8, !tbaa !12
  %159 = call i32 @rc_kalman_alloc_lin(ptr noundef @kf, ptr noundef byval(%struct.rc_matrix_t) align 8 %3, ptr noundef byval(%struct.rc_matrix_t) align 8 %4, ptr noundef byval(%struct.rc_matrix_t) align 8 %5, ptr noundef byval(%struct.rc_matrix_t) align 8 %6, ptr noundef byval(%struct.rc_matrix_t) align 8 %7, ptr noundef byval(%struct.rc_matrix_t) align 8 %8)
  %160 = icmp eq i32 %159, -1
  br i1 %160, label %161, label %162

161:                                              ; preds = %0
  store i32 -1, ptr %1, align 4
  store i32 1, ptr %9, align 4
  br label %222

162:                                              ; preds = %0
  %163 = call i32 @rc_filter_first_order_lowpass(ptr noundef @acc_lp, double noundef 5.000000e-03, double noundef 1.000000e-01)
  %164 = icmp ne i32 %163, 0
  br i1 %164, label %165, label %166

165:                                              ; preds = %162
  store i32 -1, ptr %1, align 4
  store i32 1, ptr %9, align 4
  br label %222

166:                                              ; preds = %162
  %167 = call ptr @signal(i32 noundef 2, ptr noundef @__signal_handler) #6
  store i32 1, ptr @running, align 4, !tbaa !14
  %168 = call i32 (ptr, ...) @printf(ptr noundef @.str)
  %169 = call i32 @rc_bmp_init(i32 noundef 20, i32 noundef 16)
  %170 = icmp ne i32 %169, 0
  br i1 %170, label %171, label %172

171:                                              ; preds = %166
  store i32 -1, ptr %1, align 4
  store i32 1, ptr %9, align 4
  br label %222

172:                                              ; preds = %166
  %173 = call i32 @rc_bmp_read(ptr noundef @bmp_data)
  %174 = icmp ne i32 %173, 0
  br i1 %174, label %175, label %176

175:                                              ; preds = %172
  store i32 -1, ptr %1, align 4
  store i32 1, ptr %9, align 4
  br label %222

176:                                              ; preds = %172
  %177 = call i32 (ptr, ...) @printf(ptr noundef @.str.1)
  call void @llvm.lifetime.start.p0(i64 88, ptr %10) #6
  call void @rc_mpu_default_config(ptr dead_on_unwind writable sret(%struct.rc_mpu_config_t) align 8 %10)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %2, ptr align 8 %10, i64 88, i1 false), !tbaa.struct !15
  call void @llvm.lifetime.end.p0(i64 88, ptr %10) #6
  %178 = getelementptr inbounds %struct.rc_mpu_config_t, ptr %2, i32 0, i32 10
  store i32 200, ptr %178, align 8, !tbaa !17
  %179 = getelementptr inbounds %struct.rc_mpu_config_t, ptr %2, i32 0, i32 11
  store i32 1, ptr %179, align 4, !tbaa !19
  %180 = call i32 @rc_mpu_initialize_dmp(ptr noundef @mpu_data, ptr noundef byval(%struct.rc_mpu_config_t) align 8 %2)
  %181 = icmp ne i32 %180, 0
  br i1 %181, label %182, label %183

182:                                              ; preds = %176
  store i32 -1, ptr %1, align 4
  store i32 1, ptr %9, align 4
  br label %222

183:                                              ; preds = %176
  %184 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  %185 = load ptr, ptr @stdout, align 8, !tbaa !11
  %186 = call i32 @fflush(ptr noundef %185)
  call void @rc_usleep(i32 noundef 3000000)
  %187 = call i32 @rc_mpu_set_dmp_callback(ptr noundef @__dmp_handler)
  %188 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  %189 = call i32 (ptr, ...) @printf(ptr noundef @.str.4)
  %190 = call i32 (ptr, ...) @printf(ptr noundef @.str.5)
  %191 = call i32 (ptr, ...) @printf(ptr noundef @.str.6)
  %192 = call i32 (ptr, ...) @printf(ptr noundef @.str.7)
  %193 = call i32 (ptr, ...) @printf(ptr noundef @.str.8)
  %194 = call i32 (ptr, ...) @printf(ptr noundef @.str.9)
  br label %195

195:                                              ; preds = %198, %183
  %196 = load i32, ptr @running, align 4, !tbaa !14
  %197 = icmp ne i32 %196, 0
  br i1 %197, label %198, label %218

198:                                              ; preds = %195
  call void @rc_usleep(i32 noundef 100000)
  %199 = call i32 (ptr, ...) @printf(ptr noundef @.str.10)
  %200 = load ptr, ptr getelementptr inbounds (%struct.rc_vector_t, ptr getelementptr inbounds (%struct.rc_kalman_t, ptr @kf, i32 0, i32 7), i32 0, i32 1), align 8, !tbaa !20
  %201 = getelementptr inbounds double, ptr %200, i64 0
  %202 = load double, ptr %201, align 8, !tbaa !12
  %203 = call i32 (ptr, ...) @printf(ptr noundef @.str.11, double noundef %202)
  %204 = load ptr, ptr getelementptr inbounds (%struct.rc_vector_t, ptr getelementptr inbounds (%struct.rc_kalman_t, ptr @kf, i32 0, i32 7), i32 0, i32 1), align 8, !tbaa !20
  %205 = getelementptr inbounds double, ptr %204, i64 1
  %206 = load double, ptr %205, align 8, !tbaa !12
  %207 = call i32 (ptr, ...) @printf(ptr noundef @.str.12, double noundef %206)
  %208 = load ptr, ptr getelementptr inbounds (%struct.rc_vector_t, ptr getelementptr inbounds (%struct.rc_kalman_t, ptr @kf, i32 0, i32 7), i32 0, i32 1), align 8, !tbaa !20
  %209 = getelementptr inbounds double, ptr %208, i64 2
  %210 = load double, ptr %209, align 8, !tbaa !12
  %211 = call i32 (ptr, ...) @printf(ptr noundef @.str.13, double noundef %210)
  %212 = load double, ptr getelementptr inbounds (%struct.rc_bmp_data_t, ptr @bmp_data, i32 0, i32 1), align 8, !tbaa !24
  %213 = call i32 (ptr, ...) @printf(ptr noundef @.str.14, double noundef %212)
  %214 = load double, ptr getelementptr inbounds (%struct.rc_filter_t, ptr @acc_lp, i32 0, i32 14), align 8, !tbaa !26
  %215 = call i32 (ptr, ...) @printf(ptr noundef @.str.13, double noundef %214)
  %216 = load ptr, ptr @stdout, align 8, !tbaa !11
  %217 = call i32 @fflush(ptr noundef %216)
  br label %195, !llvm.loop !29

218:                                              ; preds = %195
  %219 = call i32 (ptr, ...) @printf(ptr noundef @.str.9)
  %220 = call i32 @rc_mpu_power_off()
  %221 = call i32 @rc_bmp_power_off()
  store i32 0, ptr %1, align 4
  store i32 1, ptr %9, align 4
  br label %222

222:                                              ; preds = %218, %182, %175, %171, %165, %161
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 88, ptr %2) #6
  %223 = load i32, ptr %1, align 4
  ret i32 %223
}

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

declare i32 @rc_matrix_zeros(ptr noundef, i32 noundef, i32 noundef) #3

declare i32 @rc_vector_zeros(ptr noundef, i32 noundef) #3

declare i32 @rc_kalman_alloc_lin(ptr noundef, ptr noundef byval(%struct.rc_matrix_t) align 8, ptr noundef byval(%struct.rc_matrix_t) align 8, ptr noundef byval(%struct.rc_matrix_t) align 8, ptr noundef byval(%struct.rc_matrix_t) align 8, ptr noundef byval(%struct.rc_matrix_t) align 8, ptr noundef byval(%struct.rc_matrix_t) align 8) #3

declare i32 @rc_filter_first_order_lowpass(ptr noundef, double noundef, double noundef) #3

; Function Attrs: nounwind
declare ptr @signal(i32 noundef, ptr noundef) #4

; Function Attrs: nounwind uwtable
declare hidden void @__signal_handler(i32 noundef) #0

declare i32 @printf(ptr noundef, ...) #3

declare i32 @rc_bmp_init(i32 noundef, i32 noundef) #3

declare i32 @rc_bmp_read(ptr noundef) #3

declare void @rc_mpu_default_config(ptr dead_on_unwind writable sret(%struct.rc_mpu_config_t) align 8) #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) #5

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

declare i32 @rc_mpu_initialize_dmp(ptr noundef, ptr noundef byval(%struct.rc_mpu_config_t) align 8) #3

declare i32 @fflush(ptr noundef) #3

declare void @rc_usleep(i32 noundef) #3

declare i32 @rc_mpu_set_dmp_callback(ptr noundef) #3

; Function Attrs: nounwind uwtable
declare hidden void @__dmp_handler() #0

declare i32 @rc_mpu_power_off() #3

declare i32 @rc_bmp_power_off() #3

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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { "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 = { 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 #5 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !10, i64 8}
!6 = !{!"rc_matrix_t", !7, i64 0, !7, i64 4, !10, i64 8, !7, i64 16}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!10, !10, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"double", !8, i64 0}
!14 = !{!7, !7, i64 0}
!15 = !{i64 0, i64 4, !14, i64 4, i64 4, !14, i64 8, i64 4, !14, i64 12, i64 1, !16, i64 16, i64 4, !14, i64 20, i64 4, !14, i64 24, i64 4, !14, i64 28, i64 4, !14, i64 32, i64 4, !14, i64 36, i64 4, !14, i64 40, i64 4, !14, i64 44, i64 4, !14, i64 48, i64 4, !14, i64 52, i64 4, !14, i64 56, i64 8, !12, i64 64, i64 4, !14, i64 68, i64 4, !14, i64 72, i64 4, !14, i64 76, i64 4, !14, i64 80, i64 4, !14}
!16 = !{!8, !8, i64 0}
!17 = !{!18, !7, i64 40}
!18 = !{!"rc_mpu_config_t", !7, i64 0, !7, i64 4, !7, i64 8, !8, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28, !7, i64 32, !7, i64 36, !7, i64 40, !7, i64 44, !7, i64 48, !7, i64 52, !13, i64 56, !7, i64 64, !7, i64 68, !7, i64 72, !7, i64 76, !7, i64 80}
!19 = !{!18, !7, i64 44}
!20 = !{!21, !10, i64 176}
!21 = !{!"rc_kalman_t", !6, i64 0, !6, i64 24, !6, i64 48, !6, i64 72, !6, i64 96, !6, i64 120, !6, i64 144, !22, i64 168, !22, i64 192, !7, i64 216, !23, i64 224}
!22 = !{!"rc_vector_t", !7, i64 0, !10, i64 8, !7, i64 16}
!23 = !{!"long", !8, i64 0}
!24 = !{!25, !13, i64 8}
!25 = !{!"rc_bmp_data_t", !13, i64 0, !13, i64 8, !13, i64 16}
!26 = !{!27, !13, i64 168}
!27 = !{!"rc_filter_t", !7, i64 0, !13, i64 8, !13, i64 16, !22, i64 24, !22, i64 48, !7, i64 72, !13, i64 80, !13, i64 88, !7, i64 96, !7, i64 100, !13, i64 104, !28, i64 112, !28, i64 136, !13, i64 160, !13, i64 168, !23, i64 176, !7, i64 184}
!28 = !{!"rc_ringbuf_t", !10, i64 0, !7, i64 8, !7, i64 12, !7, i64 16}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.mustprogress"}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.rc_vector_t = type { i32, ptr, i32 }
%struct.rc_kalman_t = type { %struct.rc_matrix_t, %struct.rc_matrix_t, %struct.rc_matrix_t, %struct.rc_matrix_t, %struct.rc_matrix_t, %struct.rc_matrix_t, %struct.rc_matrix_t, %struct.rc_vector_t, %struct.rc_vector_t, i32, i64 }
%struct.rc_matrix_t = type { i32, i32, ptr, i32 }
%struct.rc_filter_t = type { i32, double, double, %struct.rc_vector_t, %struct.rc_vector_t, i32, double, double, i32, i32, double, %struct.rc_ringbuf_t, %struct.rc_ringbuf_t, double, double, i64, i32 }
%struct.rc_ringbuf_t = type { ptr, i32, i32, i32 }
%struct.rc_bmp_data_t = type { double, double, double }
%struct.rc_mpu_data_t = type { [3 x double], [3 x double], [3 x double], double, [3 x i16], [3 x i16], double, double, [4 x double], [3 x double], i32, i32, i32, [4 x double], [3 x double], double, double }
%struct.rc_mpu_config_t = type { i32, i32, i32, i8, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, double, i32, i32, i32, i32, i32 }

@u = external hidden global %struct.rc_vector_t, align 8
@y = external hidden global %struct.rc_vector_t, align 8
@kf = external hidden global %struct.rc_kalman_t, align 8
@acc_lp = external hidden global %struct.rc_filter_t, align 8
@running = external hidden local_unnamed_addr global i32, align 4
@.str = external hidden unnamed_addr constant [24 x i8], align 1
@bmp_data = external hidden global %struct.rc_bmp_data_t, align 8
@.str.1 = external hidden unnamed_addr constant [18 x i8], align 1
@mpu_data = external hidden global %struct.rc_mpu_data_t, align 8
@.str.2 = external hidden unnamed_addr constant [30 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [9 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local range(i32 -1, 1) i32 @main() local_unnamed_addr #0 {
  %1 = alloca %struct.rc_mpu_config_t, align 8
  %2 = alloca %struct.rc_matrix_t, align 8
  %3 = alloca %struct.rc_matrix_t, align 8
  %4 = alloca %struct.rc_matrix_t, align 8
  %5 = alloca %struct.rc_matrix_t, align 8
  %6 = alloca %struct.rc_matrix_t, align 8
  %7 = alloca %struct.rc_matrix_t, align 8
  call void @llvm.lifetime.start.p0(i64 88, ptr nonnull %1) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #6
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %2, i8 0, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #6
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %3, i8 0, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #6
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %4, i8 0, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #6
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %5, i8 0, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #6
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %6, i8 0, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #6
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %7, i8 0, i64 24, i1 false)
  %8 = call i32 @rc_matrix_zeros(ptr noundef nonnull %2, i32 noundef 3, i32 noundef 3) #6
  %9 = call i32 @rc_matrix_zeros(ptr noundef nonnull %3, i32 noundef 3, i32 noundef 1) #6
  %10 = call i32 @rc_matrix_zeros(ptr noundef nonnull %4, i32 noundef 1, i32 noundef 3) #6
  %11 = call i32 @rc_matrix_zeros(ptr noundef nonnull %5, i32 noundef 3, i32 noundef 3) #6
  %12 = call i32 @rc_matrix_zeros(ptr noundef nonnull %6, i32 noundef 1, i32 noundef 1) #6
  %13 = call i32 @rc_matrix_zeros(ptr noundef nonnull %7, i32 noundef 3, i32 noundef 3) #6
  %14 = call i32 @rc_vector_zeros(ptr noundef nonnull @u, i32 noundef 1) #6
  %15 = call i32 @rc_vector_zeros(ptr noundef nonnull @y, i32 noundef 1) #6
  %16 = getelementptr inbounds i8, ptr %2, i64 8
  %17 = load ptr, ptr %16, align 8, !tbaa !5
  %18 = load ptr, ptr %17, align 8, !tbaa !11
  store <2 x double> <double 1.000000e+00, double 5.000000e-03>, ptr %18, align 8, !tbaa !12
  %19 = getelementptr inbounds i8, ptr %18, i64 16
  store double 0.000000e+00, ptr %19, align 8, !tbaa !12
  %20 = getelementptr inbounds i8, ptr %17, i64 8
  %21 = load ptr, ptr %20, align 8, !tbaa !11
  store <2 x double> <double 0.000000e+00, double 1.000000e+00>, ptr %21, align 8, !tbaa !12
  %22 = getelementptr inbounds i8, ptr %21, i64 16
  store double -5.000000e-03, ptr %22, align 8, !tbaa !12
  %23 = getelementptr inbounds i8, ptr %17, i64 16
  %24 = load ptr, ptr %23, align 8, !tbaa !11
  %25 = getelementptr inbounds i8, ptr %24, i64 16
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %24, i8 0, i64 16, i1 false)
  store double 1.000000e+00, ptr %25, align 8, !tbaa !12
  %26 = getelementptr inbounds i8, ptr %3, i64 8
  %27 = load ptr, ptr %26, align 8, !tbaa !5
  %28 = load ptr, ptr %27, align 8, !tbaa !11
  store <2 x double> <double 1.250000e-05, double 5.000000e-03>, ptr %28, align 8, !tbaa !12
  %29 = getelementptr inbounds i8, ptr %28, i64 16
  store double 0.000000e+00, ptr %29, align 8, !tbaa !12
  %30 = getelementptr inbounds i8, ptr %4, i64 8
  %31 = load ptr, ptr %30, align 8, !tbaa !5
  %32 = load ptr, ptr %31, align 8, !tbaa !11
  store double 1.000000e+00, ptr %32, align 8, !tbaa !12
  %33 = getelementptr inbounds i8, ptr %32, i64 8
  %34 = getelementptr inbounds i8, ptr %5, i64 8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %33, i8 0, i64 16, i1 false)
  %35 = load ptr, ptr %34, align 8, !tbaa !5
  %36 = load ptr, ptr %35, align 8, !tbaa !11
  store double 1.000000e-09, ptr %36, align 8, !tbaa !12
  %37 = getelementptr inbounds i8, ptr %35, i64 8
  %38 = load ptr, ptr %37, align 8, !tbaa !11
  %39 = getelementptr inbounds i8, ptr %38, i64 8
  store double 1.000000e-09, ptr %39, align 8, !tbaa !12
  %40 = getelementptr inbounds i8, ptr %35, i64 16
  %41 = load ptr, ptr %40, align 8, !tbaa !11
  %42 = getelementptr inbounds i8, ptr %41, i64 16
  store double 1.000000e-04, ptr %42, align 8, !tbaa !12
  %43 = getelementptr inbounds i8, ptr %6, i64 8
  %44 = load ptr, ptr %43, align 8, !tbaa !5
  %45 = load ptr, ptr %44, align 8, !tbaa !11
  store double 1.000000e+06, ptr %45, align 8, !tbaa !12
  %46 = getelementptr inbounds i8, ptr %7, i64 8
  %47 = load ptr, ptr %46, align 8, !tbaa !5
  %48 = load ptr, ptr %47, align 8, !tbaa !11
  store <2 x double> <double 1.258690e+03, double 0x4063D39096BB98C8>, ptr %48, align 8, !tbaa !12
  %49 = getelementptr inbounds i8, ptr %48, i64 16
  store double -9.993700e+00, ptr %49, align 8, !tbaa !12
  %50 = getelementptr inbounds i8, ptr %47, i64 8
  %51 = load ptr, ptr %50, align 8, !tbaa !11
  store <2 x double> <double 0x4063D39096BB98C8, double 2.998700e+01>, ptr %51, align 8, !tbaa !12
  %52 = getelementptr inbounds i8, ptr %51, i64 16
  store double -2.519100e+00, ptr %52, align 8, !tbaa !12
  %53 = getelementptr inbounds i8, ptr %47, i64 16
  %54 = load ptr, ptr %53, align 8, !tbaa !11
  store <2 x double> <double -9.993700e+00, double -2.519100e+00>, ptr %54, align 8, !tbaa !12
  %55 = getelementptr inbounds i8, ptr %54, i64 16
  store double 3.174000e-01, ptr %55, align 8, !tbaa !12
  %56 = call i32 @rc_kalman_alloc_lin(ptr noundef nonnull @kf, ptr noundef nonnull byval(%struct.rc_matrix_t) align 8 %2, ptr noundef nonnull byval(%struct.rc_matrix_t) align 8 %3, ptr noundef nonnull byval(%struct.rc_matrix_t) align 8 %4, ptr noundef nonnull byval(%struct.rc_matrix_t) align 8 %5, ptr noundef nonnull byval(%struct.rc_matrix_t) align 8 %6, ptr noundef nonnull byval(%struct.rc_matrix_t) align 8 %7) #6
  %57 = icmp eq i32 %56, -1
  br i1 %57, label %106, label %58

58:                                               ; preds = %0
  %59 = call i32 @rc_filter_first_order_lowpass(ptr noundef nonnull @acc_lp, double noundef 5.000000e-03, double noundef 1.000000e-01) #6
  %.not = icmp eq i32 %59, 0
  br i1 %.not, label %60, label %106

60:                                               ; preds = %58
  %61 = call ptr @signal(i32 noundef 2, ptr noundef nonnull @__signal_handler) #6
  store i32 1, ptr @running, align 4, !tbaa !14
  %62 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str)
  %63 = call i32 @rc_bmp_init(i32 noundef 20, i32 noundef 16) #6
  %.not1 = icmp eq i32 %63, 0
  br i1 %.not1, label %64, label %106

64:                                               ; preds = %60
  %65 = call i32 @rc_bmp_read(ptr noundef nonnull @bmp_data) #6
  %.not2 = icmp eq i32 %65, 0
  br i1 %.not2, label %66, label %106

66:                                               ; preds = %64
  %67 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1)
  call void @rc_mpu_default_config(ptr dead_on_unwind nonnull writable sret(%struct.rc_mpu_config_t) align 8 %1) #6
  %68 = getelementptr inbounds i8, ptr %1, i64 40
  store i32 200, ptr %68, align 8, !tbaa !15
  %69 = getelementptr inbounds i8, ptr %1, i64 44
  store i32 1, ptr %69, align 4, !tbaa !17
  %70 = call i32 @rc_mpu_initialize_dmp(ptr noundef nonnull @mpu_data, ptr noundef nonnull byval(%struct.rc_mpu_config_t) align 8 %1) #6
  %.not3 = icmp eq i32 %70, 0
  br i1 %.not3, label %71, label %106

71:                                               ; preds = %66
  %72 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  %73 = load ptr, ptr @stdout, align 8, !tbaa !11
  %74 = call i32 @fflush(ptr noundef %73)
  call void @rc_usleep(i32 noundef 3000000) #6
  %75 = call i32 @rc_mpu_set_dmp_callback(ptr noundef nonnull @__dmp_handler) #6
  %76 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3)
  %77 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4)
  %78 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5)
  %79 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6)
  %80 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7)
  %81 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8)
  %82 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9)
  %83 = load i32, ptr @running, align 4, !tbaa !14
  %.not45 = icmp eq i32 %83, 0
  br i1 %.not45, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %71, %.lr.ph
  call void @rc_usleep(i32 noundef 100000) #6
  %84 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10)
  %85 = load ptr, ptr getelementptr inbounds (i8, ptr @kf, i64 176), align 8, !tbaa !18
  %86 = load double, ptr %85, align 8, !tbaa !12
  %87 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11, double noundef %86)
  %88 = load ptr, ptr getelementptr inbounds (i8, ptr @kf, i64 176), align 8, !tbaa !18
  %89 = getelementptr inbounds i8, ptr %88, i64 8
  %90 = load double, ptr %89, align 8, !tbaa !12
  %91 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.12, double noundef %90)
  %92 = load ptr, ptr getelementptr inbounds (i8, ptr @kf, i64 176), align 8, !tbaa !18
  %93 = getelementptr inbounds i8, ptr %92, i64 16
  %94 = load double, ptr %93, align 8, !tbaa !12
  %95 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.13, double noundef %94)
  %96 = load double, ptr getelementptr inbounds (i8, ptr @bmp_data, i64 8), align 8, !tbaa !22
  %97 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.14, double noundef %96)
  %98 = load double, ptr getelementptr inbounds (i8, ptr @acc_lp, i64 168), align 8, !tbaa !24
  %99 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.13, double noundef %98)
  %100 = load ptr, ptr @stdout, align 8, !tbaa !11
  %101 = call i32 @fflush(ptr noundef %100)
  %102 = load i32, ptr @running, align 4, !tbaa !14
  %.not4 = icmp eq i32 %102, 0
  br i1 %.not4, label %._crit_edge, label %.lr.ph, !llvm.loop !27

._crit_edge:                                      ; preds = %.lr.ph, %71
  %103 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9)
  %104 = call i32 @rc_mpu_power_off() #6
  %105 = call i32 @rc_bmp_power_off() #6
  br label %106

106:                                              ; preds = %66, %64, %60, %58, %0, %._crit_edge
  %.0 = phi i32 [ 0, %._crit_edge ], [ -1, %0 ], [ -1, %58 ], [ -1, %60 ], [ -1, %64 ], [ -1, %66 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 88, ptr nonnull %1) #6
  ret i32 %.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 nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

declare i32 @rc_matrix_zeros(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #3

declare i32 @rc_vector_zeros(ptr noundef, i32 noundef) local_unnamed_addr #3

declare i32 @rc_kalman_alloc_lin(ptr noundef, ptr noundef byval(%struct.rc_matrix_t) align 8, ptr noundef byval(%struct.rc_matrix_t) align 8, ptr noundef byval(%struct.rc_matrix_t) align 8, ptr noundef byval(%struct.rc_matrix_t) align 8, ptr noundef byval(%struct.rc_matrix_t) align 8, ptr noundef byval(%struct.rc_matrix_t) align 8) local_unnamed_addr #3

declare i32 @rc_filter_first_order_lowpass(ptr noundef, double noundef, double noundef) local_unnamed_addr #3

; Function Attrs: nounwind
declare ptr @signal(i32 noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
declare hidden void @__signal_handler(i32 noundef) #0

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

declare i32 @rc_bmp_init(i32 noundef, i32 noundef) local_unnamed_addr #3

declare i32 @rc_bmp_read(ptr noundef) local_unnamed_addr #3

declare void @rc_mpu_default_config(ptr dead_on_unwind writable sret(%struct.rc_mpu_config_t) align 8) local_unnamed_addr #3

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

declare i32 @rc_mpu_initialize_dmp(ptr noundef, ptr noundef byval(%struct.rc_mpu_config_t) align 8) local_unnamed_addr #3

; Function Attrs: nofree nounwind
declare noundef i32 @fflush(ptr nocapture noundef) local_unnamed_addr #5

declare void @rc_usleep(i32 noundef) local_unnamed_addr #3

declare i32 @rc_mpu_set_dmp_callback(ptr noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare hidden void @__dmp_handler() #0

declare i32 @rc_mpu_power_off() local_unnamed_addr #3

declare i32 @rc_bmp_power_off() local_unnamed_addr #3

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !10, i64 8}
!6 = !{!"rc_matrix_t", !7, i64 0, !7, i64 4, !10, i64 8, !7, i64 16}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!10, !10, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"double", !8, i64 0}
!14 = !{!7, !7, i64 0}
!15 = !{!16, !7, i64 40}
!16 = !{!"rc_mpu_config_t", !7, i64 0, !7, i64 4, !7, i64 8, !8, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28, !7, i64 32, !7, i64 36, !7, i64 40, !7, i64 44, !7, i64 48, !7, i64 52, !13, i64 56, !7, i64 64, !7, i64 68, !7, i64 72, !7, i64 76, !7, i64 80}
!17 = !{!16, !7, i64 44}
!18 = !{!19, !10, i64 176}
!19 = !{!"rc_kalman_t", !6, i64 0, !6, i64 24, !6, i64 48, !6, i64 72, !6, i64 96, !6, i64 120, !6, i64 144, !20, i64 168, !20, i64 192, !7, i64 216, !21, i64 224}
!20 = !{!"rc_vector_t", !7, i64 0, !10, i64 8, !7, i64 16}
!21 = !{!"long", !8, i64 0}
!22 = !{!23, !13, i64 8}
!23 = !{!"rc_bmp_data_t", !13, i64 0, !13, i64 8, !13, i64 16}
!24 = !{!25, !13, i64 168}
!25 = !{!"rc_filter_t", !7, i64 0, !13, i64 8, !13, i64 16, !20, i64 24, !20, i64 48, !7, i64 72, !13, i64 80, !13, i64 88, !7, i64 96, !7, i64 100, !13, i64 104, !26, i64 112, !26, i64 136, !13, i64 160, !13, i64 168, !21, i64 176, !7, i64 184}
!26 = !{!"rc_ringbuf_t", !10, i64 0, !7, i64 8, !7, i64 12, !7, i64 16}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,MemCpyOptPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass