; LLVM IR from beagleboard/librobotcontrol :: library/src/math (kalman)

; 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_matrix_t = type { i32, 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_vector_t = type { i32, ptr, i32 }

@stderr = external global ptr, align 8
@.str = external hidden unnamed_addr constant [53 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [65 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [48 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @rc_kalman_alloc_lin(ptr noundef %0, ptr noundef byval(%struct.rc_matrix_t) align 8 %1, ptr noundef byval(%struct.rc_matrix_t) align 8 %2, 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) #0 {
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  store ptr %0, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  %12 = load ptr, ptr %9, align 8, !tbaa !5
  %13 = icmp eq ptr %12, null
  br i1 %13, label %14, label %17

14:                                               ; preds = %7
  %15 = load ptr, ptr @stderr, align 8, !tbaa !5
  %16 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %15, ptr noundef @.str) #4
  store i32 -1, ptr %8, align 4
  store i32 1, ptr %11, align 4
  br label %150

17:                                               ; preds = %7
  %18 = getelementptr inbounds %struct.rc_matrix_t, ptr %1, i32 0, i32 3
  %19 = load i32, ptr %18, align 8, !tbaa !9
  %20 = icmp ne i32 %19, 0
  br i1 %20, label %21, label %25

21:                                               ; preds = %17
  %22 = getelementptr inbounds %struct.rc_matrix_t, ptr %3, i32 0, i32 3
  %23 = load i32, ptr %22, align 8, !tbaa !9
  %24 = icmp ne i32 %23, 0
  br i1 %24, label %28, label %25

25:                                               ; preds = %21, %17
  %26 = load ptr, ptr @stderr, align 8, !tbaa !5
  %27 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %26, ptr noundef @.str.1) #4
  store i32 -1, ptr %8, align 4
  store i32 1, ptr %11, align 4
  br label %150

28:                                               ; preds = %21
  %29 = getelementptr inbounds %struct.rc_matrix_t, ptr %4, i32 0, i32 3
  %30 = load i32, ptr %29, align 8, !tbaa !9
  %31 = icmp ne i32 %30, 0
  br i1 %31, label %32, label %36

32:                                               ; preds = %28
  %33 = getelementptr inbounds %struct.rc_matrix_t, ptr %5, i32 0, i32 3
  %34 = load i32, ptr %33, align 8, !tbaa !9
  %35 = icmp ne i32 %34, 0
  br i1 %35, label %39, label %36

36:                                               ; preds = %32, %28
  %37 = load ptr, ptr @stderr, align 8, !tbaa !5
  %38 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %37, ptr noundef @.str.2) #4
  store i32 -1, ptr %8, align 4
  store i32 1, ptr %11, align 4
  br label %150

39:                                               ; preds = %32
  %40 = getelementptr inbounds %struct.rc_matrix_t, ptr %1, i32 0, i32 0
  %41 = load i32, ptr %40, align 8, !tbaa !12
  %42 = getelementptr inbounds %struct.rc_matrix_t, ptr %1, i32 0, i32 1
  %43 = load i32, ptr %42, align 4, !tbaa !13
  %44 = icmp ne i32 %41, %43
  br i1 %44, label %45, label %48

45:                                               ; preds = %39
  %46 = load ptr, ptr @stderr, align 8, !tbaa !5
  %47 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %46, ptr noundef @.str.3) #4
  store i32 -1, ptr %8, align 4
  store i32 1, ptr %11, align 4
  br label %150

48:                                               ; preds = %39
  %49 = getelementptr inbounds %struct.rc_matrix_t, ptr %3, i32 0, i32 1
  %50 = load i32, ptr %49, align 4, !tbaa !13
  %51 = getelementptr inbounds %struct.rc_matrix_t, ptr %1, i32 0, i32 1
  %52 = load i32, ptr %51, align 4, !tbaa !13
  %53 = icmp ne i32 %50, %52
  br i1 %53, label %54, label %57

54:                                               ; preds = %48
  %55 = load ptr, ptr @stderr, align 8, !tbaa !5
  %56 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %55, ptr noundef @.str.4) #4
  store i32 -1, ptr %8, align 4
  store i32 1, ptr %11, align 4
  br label %150

57:                                               ; preds = %48
  %58 = getelementptr inbounds %struct.rc_matrix_t, ptr %2, i32 0, i32 0
  %59 = load i32, ptr %58, align 8, !tbaa !12
  %60 = getelementptr inbounds %struct.rc_matrix_t, ptr %1, i32 0, i32 0
  %61 = load i32, ptr %60, align 8, !tbaa !12
  %62 = icmp ne i32 %59, %61
  br i1 %62, label %63, label %66

63:                                               ; preds = %57
  %64 = load ptr, ptr @stderr, align 8, !tbaa !5
  %65 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %64, ptr noundef @.str.5) #4
  store i32 -1, ptr %8, align 4
  store i32 1, ptr %11, align 4
  br label %150

66:                                               ; preds = %57
  %67 = getelementptr inbounds %struct.rc_matrix_t, ptr %4, i32 0, i32 0
  %68 = load i32, ptr %67, align 8, !tbaa !12
  %69 = getelementptr inbounds %struct.rc_matrix_t, ptr %4, i32 0, i32 1
  %70 = load i32, ptr %69, align 4, !tbaa !13
  %71 = icmp ne i32 %68, %70
  br i1 %71, label %72, label %75

72:                                               ; preds = %66
  %73 = load ptr, ptr @stderr, align 8, !tbaa !5
  %74 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %73, ptr noundef @.str.6) #4
  store i32 -1, ptr %8, align 4
  store i32 1, ptr %11, align 4
  br label %150

75:                                               ; preds = %66
  %76 = getelementptr inbounds %struct.rc_matrix_t, ptr %5, i32 0, i32 0
  %77 = load i32, ptr %76, align 8, !tbaa !12
  %78 = getelementptr inbounds %struct.rc_matrix_t, ptr %5, i32 0, i32 1
  %79 = load i32, ptr %78, align 4, !tbaa !13
  %80 = icmp ne i32 %77, %79
  br i1 %80, label %81, label %84

81:                                               ; preds = %75
  %82 = load ptr, ptr @stderr, align 8, !tbaa !5
  %83 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %82, ptr noundef @.str.7) #4
  store i32 -1, ptr %8, align 4
  store i32 1, ptr %11, align 4
  br label %150

84:                                               ; preds = %75
  %85 = load ptr, ptr %9, align 8, !tbaa !5
  %86 = call i32 @rc_kalman_free(ptr noundef %85)
  %87 = icmp eq i32 %86, -1
  br i1 %87, label %88, label %89

88:                                               ; preds = %84
  store i32 -1, ptr %8, align 4
  store i32 1, ptr %11, align 4
  br label %150

89:                                               ; preds = %84
  %90 = getelementptr inbounds %struct.rc_matrix_t, ptr %1, i32 0, i32 1
  %91 = load i32, ptr %90, align 4, !tbaa !13
  store i32 %91, ptr %10, align 4, !tbaa !14
  %92 = load ptr, ptr %9, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.rc_kalman_t, ptr %92, i32 0, i32 0
  %94 = call i32 @rc_matrix_duplicate(ptr noundef byval(%struct.rc_matrix_t) align 8 %1, ptr noundef %93)
  %95 = icmp eq i32 %94, -1
  br i1 %95, label %96, label %97

96:                                               ; preds = %89
  store i32 -1, ptr %8, align 4
  store i32 1, ptr %11, align 4
  br label %150

97:                                               ; preds = %89
  %98 = load ptr, ptr %9, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.rc_kalman_t, ptr %98, i32 0, i32 1
  %100 = call i32 @rc_matrix_duplicate(ptr noundef byval(%struct.rc_matrix_t) align 8 %2, ptr noundef %99)
  %101 = icmp eq i32 %100, -1
  br i1 %101, label %102, label %103

102:                                              ; preds = %97
  store i32 -1, ptr %8, align 4
  store i32 1, ptr %11, align 4
  br label %150

103:                                              ; preds = %97
  %104 = load ptr, ptr %9, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.rc_kalman_t, ptr %104, i32 0, i32 2
  %106 = call i32 @rc_matrix_duplicate(ptr noundef byval(%struct.rc_matrix_t) align 8 %3, ptr noundef %105)
  %107 = icmp eq i32 %106, -1
  br i1 %107, label %108, label %109

108:                                              ; preds = %103
  store i32 -1, ptr %8, align 4
  store i32 1, ptr %11, align 4
  br label %150

109:                                              ; preds = %103
  %110 = load ptr, ptr %9, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.rc_kalman_t, ptr %110, i32 0, i32 3
  %112 = call i32 @rc_matrix_duplicate(ptr noundef byval(%struct.rc_matrix_t) align 8 %4, ptr noundef %111)
  %113 = icmp eq i32 %112, -1
  br i1 %113, label %114, label %115

114:                                              ; preds = %109
  store i32 -1, ptr %8, align 4
  store i32 1, ptr %11, align 4
  br label %150

115:                                              ; preds = %109
  %116 = load ptr, ptr %9, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.rc_kalman_t, ptr %116, i32 0, i32 4
  %118 = call i32 @rc_matrix_duplicate(ptr noundef byval(%struct.rc_matrix_t) align 8 %5, ptr noundef %117)
  %119 = icmp eq i32 %118, -1
  br i1 %119, label %120, label %121

120:                                              ; preds = %115
  store i32 -1, ptr %8, align 4
  store i32 1, ptr %11, align 4
  br label %150

121:                                              ; preds = %115
  %122 = load ptr, ptr %9, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.rc_kalman_t, ptr %122, i32 0, i32 5
  %124 = call i32 @rc_matrix_duplicate(ptr noundef byval(%struct.rc_matrix_t) align 8 %6, ptr noundef %123)
  %125 = icmp eq i32 %124, -1
  br i1 %125, label %126, label %127

126:                                              ; preds = %121
  store i32 -1, ptr %8, align 4
  store i32 1, ptr %11, align 4
  br label %150

127:                                              ; preds = %121
  %128 = load ptr, ptr %9, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.rc_kalman_t, ptr %128, i32 0, i32 6
  %130 = call i32 @rc_matrix_duplicate(ptr noundef byval(%struct.rc_matrix_t) align 8 %6, ptr noundef %129)
  %131 = icmp eq i32 %130, -1
  br i1 %131, label %132, label %133

132:                                              ; preds = %127
  store i32 -1, ptr %8, align 4
  store i32 1, ptr %11, align 4
  br label %150

133:                                              ; preds = %127
  %134 = load ptr, ptr %9, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.rc_kalman_t, ptr %134, i32 0, i32 7
  %136 = load i32, ptr %10, align 4, !tbaa !14
  %137 = call i32 @rc_vector_zeros(ptr noundef %135, i32 noundef %136)
  %138 = icmp eq i32 %137, -1
  br i1 %138, label %139, label %140

139:                                              ; preds = %133
  store i32 -1, ptr %8, align 4
  store i32 1, ptr %11, align 4
  br label %150

140:                                              ; preds = %133
  %141 = load ptr, ptr %9, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.rc_kalman_t, ptr %141, i32 0, i32 8
  %143 = load i32, ptr %10, align 4, !tbaa !14
  %144 = call i32 @rc_vector_zeros(ptr noundef %142, i32 noundef %143)
  %145 = icmp eq i32 %144, -1
  br i1 %145, label %146, label %147

146:                                              ; preds = %140
  store i32 -1, ptr %8, align 4
  store i32 1, ptr %11, align 4
  br label %150

147:                                              ; preds = %140
  %148 = load ptr, ptr %9, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.rc_kalman_t, ptr %148, i32 0, i32 9
  store i32 1, ptr %149, align 8, !tbaa !15
  store i32 0, ptr %8, align 4
  store i32 1, ptr %11, align 4
  br label %150

150:                                              ; preds = %147, %146, %139, %132, %126, %120, %114, %108, %102, %96, %88, %81, %72, %63, %54, %45, %36, %25, %14
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  %151 = load i32, ptr %8, align 4
  ret i32 %151
}

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @rc_kalman_free(ptr noundef) #0

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

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

; 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 "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "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 }

!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, !11, i64 16}
!10 = !{!"rc_matrix_t", !11, i64 0, !11, i64 4, !6, i64 8, !11, i64 16}
!11 = !{!"int", !7, i64 0}
!12 = !{!10, !11, i64 0}
!13 = !{!10, !11, i64 4}
!14 = !{!11, !11, i64 0}
!15 = !{!16, !11, i64 216}
!16 = !{!"rc_kalman_t", !10, i64 0, !10, i64 24, !10, i64 48, !10, i64 72, !10, i64 96, !10, i64 120, !10, i64 144, !17, i64 168, !17, i64 192, !11, i64 216, !18, i64 224}
!17 = !{!"rc_vector_t", !11, i64 0, !6, i64 8, !11, i64 16}
!18 = !{!"long", !7, i64 0}


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

%struct.rc_matrix_t = type { i32, i32, ptr, i32 }

@stderr = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [53 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [65 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [48 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local range(i32 -1, 1) i32 @rc_kalman_alloc_lin(ptr noundef %0, ptr noundef byval(%struct.rc_matrix_t) align 8 %1, ptr noundef byval(%struct.rc_matrix_t) align 8 %2, 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) local_unnamed_addr #0 {
  %8 = icmp eq ptr %0, null
  br i1 %8, label %9, label %12

9:                                                ; preds = %7
  %10 = load ptr, ptr @stderr, align 8, !tbaa !5
  %11 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %10, ptr noundef nonnull @.str) #3
  br label %104

12:                                               ; preds = %7
  %13 = getelementptr inbounds i8, ptr %1, i64 16
  %14 = load i32, ptr %13, align 8, !tbaa !9
  %15 = icmp ne i32 %14, 0
  %16 = getelementptr inbounds i8, ptr %3, i64 16
  %17 = load i32, ptr %16, align 8
  %18 = icmp ne i32 %17, 0
  %or.cond = select i1 %15, i1 %18, i1 false
  br i1 %or.cond, label %22, label %19

19:                                               ; preds = %12
  %20 = load ptr, ptr @stderr, align 8, !tbaa !5
  %21 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %20, ptr noundef nonnull @.str.1) #3
  br label %104

22:                                               ; preds = %12
  %23 = getelementptr inbounds i8, ptr %4, i64 16
  %24 = load i32, ptr %23, align 8, !tbaa !9
  %25 = icmp ne i32 %24, 0
  %26 = getelementptr inbounds i8, ptr %5, i64 16
  %27 = load i32, ptr %26, align 8
  %28 = icmp ne i32 %27, 0
  %or.cond5 = select i1 %25, i1 %28, i1 false
  br i1 %or.cond5, label %32, label %29

29:                                               ; preds = %22
  %30 = load ptr, ptr @stderr, align 8, !tbaa !5
  %31 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %30, ptr noundef nonnull @.str.2) #3
  br label %104

32:                                               ; preds = %22
  %33 = load i32, ptr %1, align 8, !tbaa !12
  %34 = getelementptr inbounds i8, ptr %1, i64 4
  %35 = load i32, ptr %34, align 4, !tbaa !13
  %.not = icmp eq i32 %33, %35
  br i1 %.not, label %39, label %36

36:                                               ; preds = %32
  %37 = load ptr, ptr @stderr, align 8, !tbaa !5
  %38 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %37, ptr noundef nonnull @.str.3) #3
  br label %104

39:                                               ; preds = %32
  %40 = getelementptr inbounds i8, ptr %3, i64 4
  %41 = load i32, ptr %40, align 4, !tbaa !13
  %.not22 = icmp eq i32 %41, %33
  br i1 %.not22, label %45, label %42

42:                                               ; preds = %39
  %43 = load ptr, ptr @stderr, align 8, !tbaa !5
  %44 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %43, ptr noundef nonnull @.str.4) #3
  br label %104

45:                                               ; preds = %39
  %46 = load i32, ptr %2, align 8, !tbaa !12
  %.not23 = icmp eq i32 %46, %33
  br i1 %.not23, label %50, label %47

47:                                               ; preds = %45
  %48 = load ptr, ptr @stderr, align 8, !tbaa !5
  %49 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %48, ptr noundef nonnull @.str.5) #3
  br label %104

50:                                               ; preds = %45
  %51 = load i32, ptr %4, align 8, !tbaa !12
  %52 = getelementptr inbounds i8, ptr %4, i64 4
  %53 = load i32, ptr %52, align 4, !tbaa !13
  %.not24 = icmp eq i32 %51, %53
  br i1 %.not24, label %57, label %54

54:                                               ; preds = %50
  %55 = load ptr, ptr @stderr, align 8, !tbaa !5
  %56 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %55, ptr noundef nonnull @.str.6) #3
  br label %104

57:                                               ; preds = %50
  %58 = load i32, ptr %5, align 8, !tbaa !12
  %59 = getelementptr inbounds i8, ptr %5, i64 4
  %60 = load i32, ptr %59, align 4, !tbaa !13
  %.not25 = icmp eq i32 %58, %60
  br i1 %.not25, label %64, label %61

61:                                               ; preds = %57
  %62 = load ptr, ptr @stderr, align 8, !tbaa !5
  %63 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %62, ptr noundef nonnull @.str.7) #3
  br label %104

64:                                               ; preds = %57
  %65 = tail call i32 @rc_kalman_free(ptr noundef nonnull %0)
  %66 = icmp eq i32 %65, -1
  br i1 %66, label %104, label %67

67:                                               ; preds = %64
  %68 = tail call i32 @rc_matrix_duplicate(ptr noundef nonnull byval(%struct.rc_matrix_t) align 8 %1, ptr noundef nonnull %0) #4
  %69 = icmp eq i32 %68, -1
  br i1 %69, label %104, label %70

70:                                               ; preds = %67
  %71 = getelementptr inbounds i8, ptr %0, i64 24
  %72 = tail call i32 @rc_matrix_duplicate(ptr noundef nonnull byval(%struct.rc_matrix_t) align 8 %2, ptr noundef nonnull %71) #4
  %73 = icmp eq i32 %72, -1
  br i1 %73, label %104, label %74

74:                                               ; preds = %70
  %75 = getelementptr inbounds i8, ptr %0, i64 48
  %76 = tail call i32 @rc_matrix_duplicate(ptr noundef nonnull byval(%struct.rc_matrix_t) align 8 %3, ptr noundef nonnull %75) #4
  %77 = icmp eq i32 %76, -1
  br i1 %77, label %104, label %78

78:                                               ; preds = %74
  %79 = getelementptr inbounds i8, ptr %0, i64 72
  %80 = tail call i32 @rc_matrix_duplicate(ptr noundef nonnull byval(%struct.rc_matrix_t) align 8 %4, ptr noundef nonnull %79) #4
  %81 = icmp eq i32 %80, -1
  br i1 %81, label %104, label %82

82:                                               ; preds = %78
  %83 = getelementptr inbounds i8, ptr %0, i64 96
  %84 = tail call i32 @rc_matrix_duplicate(ptr noundef nonnull byval(%struct.rc_matrix_t) align 8 %5, ptr noundef nonnull %83) #4
  %85 = icmp eq i32 %84, -1
  br i1 %85, label %104, label %86

86:                                               ; preds = %82
  %87 = getelementptr inbounds i8, ptr %0, i64 120
  %88 = tail call i32 @rc_matrix_duplicate(ptr noundef nonnull byval(%struct.rc_matrix_t) align 8 %6, ptr noundef nonnull %87) #4
  %89 = icmp eq i32 %88, -1
  br i1 %89, label %104, label %90

90:                                               ; preds = %86
  %91 = getelementptr inbounds i8, ptr %0, i64 144
  %92 = tail call i32 @rc_matrix_duplicate(ptr noundef nonnull byval(%struct.rc_matrix_t) align 8 %6, ptr noundef nonnull %91) #4
  %93 = icmp eq i32 %92, -1
  br i1 %93, label %104, label %94

94:                                               ; preds = %90
  %95 = getelementptr inbounds i8, ptr %0, i64 168
  %96 = tail call i32 @rc_vector_zeros(ptr noundef nonnull %95, i32 noundef %33) #4
  %97 = icmp eq i32 %96, -1
  br i1 %97, label %104, label %98

98:                                               ; preds = %94
  %99 = getelementptr inbounds i8, ptr %0, i64 192
  %100 = tail call i32 @rc_vector_zeros(ptr noundef nonnull %99, i32 noundef %33) #4
  %101 = icmp eq i32 %100, -1
  br i1 %101, label %104, label %102

102:                                              ; preds = %98
  %103 = getelementptr inbounds i8, ptr %0, i64 216
  store i32 1, ptr %103, align 8, !tbaa !14
  br label %104

104:                                              ; preds = %98, %94, %90, %86, %82, %78, %74, %70, %67, %64, %102, %61, %54, %47, %42, %36, %29, %19, %9
  %.0 = phi i32 [ -1, %9 ], [ -1, %36 ], [ -1, %42 ], [ -1, %47 ], [ -1, %54 ], [ -1, %61 ], [ 0, %102 ], [ -1, %29 ], [ -1, %19 ], [ -1, %64 ], [ -1, %67 ], [ -1, %70 ], [ -1, %74 ], [ -1, %78 ], [ -1, %82 ], [ -1, %86 ], [ -1, %90 ], [ -1, %94 ], [ -1, %98 ]
  ret i32 %.0
}

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @rc_kalman_free(ptr noundef) local_unnamed_addr #0

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

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

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 = { 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 #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { cold nounwind }
attributes #4 = { 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, !11, i64 16}
!10 = !{!"rc_matrix_t", !11, i64 0, !11, i64 4, !6, i64 8, !11, i64 16}
!11 = !{!"int", !7, i64 0}
!12 = !{!10, !11, i64 0}
!13 = !{!10, !11, i64 4}
!14 = !{!15, !11, i64 216}
!15 = !{!"rc_kalman_t", !10, i64 0, !10, i64 24, !10, i64 48, !10, i64 72, !10, i64 96, !10, i64 120, !10, i64 144, !16, i64 168, !16, i64 192, !11, i64 216, !17, i64 224}
!16 = !{!"rc_vector_t", !11, i64 0, !6, i64 8, !11, i64 16}
!17 = !{!"long", !7, i64 0}


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