; LLVM IR from HRI-EU/Rcs :: src/RcsCore (Rcs_mathTests)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.Rcs::CmdLineParser" = type { i8 }

@RCS_GLOBAL_RLOG_CB = external global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [74 x i8], align 1
@RcsLogLevel = external global i32, align 4
@stderr = external global ptr, align 8
@.str.5 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [3 x i8], align 1
@__func__.testEulerAnglesFunctions = external hidden unnamed_addr constant [25 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [18 x i8], align 1

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local zeroext i1 @testEulerAnglesFunctions(i32 noundef %0, ptr noundef %1) #2 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca i8, align 1
  %6 = alloca [3 x double], align 16
  %7 = alloca [3 x double], align 16
  %8 = alloca [3 x [3 x double]], align 16
  %9 = alloca [3 x [3 x double]], align 16
  %10 = alloca [3 x [3 x double]], align 16
  %11 = alloca %"class.Rcs::CmdLineParser", align 1
  %12 = alloca double, align 8
  %13 = alloca double, align 8
  store i32 %0, ptr %3, align 4, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #4
  store i8 1, ptr %5, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 24, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 72, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 72, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 72, ptr %10) #4
  %14 = getelementptr inbounds [3 x double], ptr %6, i64 0, i64 0
  call void @Vec3d_setRandom(ptr noundef %14, double noundef -7.200000e+02, double noundef 7.200000e+02)
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #4
  %15 = load i32, ptr %3, align 4, !tbaa !5
  %16 = load ptr, ptr %4, align 8, !tbaa !9
  call void @_ZN3Rcs13CmdLineParserC1EiPPc(ptr noundef nonnull align 1 dereferenceable(1) %11, i32 noundef %15, ptr noundef %16)
  %17 = getelementptr inbounds [3 x double], ptr %6, i64 0, i64 0
  %18 = call noundef zeroext i1 (ptr, ptr, ptr, ptr, ...) @_ZNK3Rcs13CmdLineParser11getArgumentEPKcPdS2_z(ptr noundef nonnull align 1 dereferenceable(1) %11, ptr noundef @.str.10, ptr noundef %17, ptr noundef null)
  %19 = getelementptr inbounds [3 x double], ptr %6, i64 0, i64 1
  %20 = call noundef zeroext i1 (ptr, ptr, ptr, ptr, ...) @_ZNK3Rcs13CmdLineParser11getArgumentEPKcPdS2_z(ptr noundef nonnull align 1 dereferenceable(1) %11, ptr noundef @.str.11, ptr noundef %19, ptr noundef null)
  %21 = getelementptr inbounds [3 x double], ptr %6, i64 0, i64 2
  %22 = call noundef zeroext i1 (ptr, ptr, ptr, ptr, ...) @_ZNK3Rcs13CmdLineParser11getArgumentEPKcPdS2_z(ptr noundef nonnull align 1 dereferenceable(1) %11, ptr noundef @.str.12, ptr noundef %21, ptr noundef null)
  %23 = getelementptr inbounds [3 x double], ptr %6, i64 0, i64 0
  call void @Vec3d_constMulSelf(ptr noundef %23, double noundef 0x3F91DF46A2529D39)
  %24 = getelementptr inbounds [3 x [3 x double]], ptr %8, i64 0, i64 0
  %25 = getelementptr inbounds [3 x double], ptr %6, i64 0, i64 0
  call void @Mat3d_fromEulerAngles(ptr noundef %24, ptr noundef %25)
  %26 = getelementptr inbounds [3 x double], ptr %7, i64 0, i64 0
  %27 = getelementptr inbounds [3 x [3 x double]], ptr %8, i64 0, i64 0
  call void @Mat3d_toEulerAngles(ptr noundef %26, ptr noundef %27)
  %28 = getelementptr inbounds [3 x [3 x double]], ptr %9, i64 0, i64 0
  %29 = getelementptr inbounds [3 x double], ptr %7, i64 0, i64 0
  call void @Mat3d_fromEulerAngles(ptr noundef %28, ptr noundef %29)
  br label %30

30:                                               ; preds = %2
  %31 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !9
  %32 = icmp ne ptr %31, null
  br i1 %32, label %33, label %44

33:                                               ; preds = %30
  %34 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !9
  %35 = getelementptr inbounds [3 x double], ptr %6, i64 0, i64 0
  %36 = load double, ptr %35, align 16, !tbaa !13
  %37 = fmul double %36, 0x404CA5DC1A63C1F8
  %38 = getelementptr inbounds [3 x double], ptr %6, i64 0, i64 1
  %39 = load double, ptr %38, align 8, !tbaa !13
  %40 = fmul double %39, 0x404CA5DC1A63C1F8
  %41 = getelementptr inbounds [3 x double], ptr %6, i64 0, i64 2
  %42 = load double, ptr %41, align 16, !tbaa !13
  %43 = fmul double %42, 0x404CA5DC1A63C1F8
  call void (i32, ptr, ptr, i32, ptr, ...) %34(i32 noundef 2, ptr noundef @.str.3, ptr noundef @__func__.testEulerAnglesFunctions, i32 noundef 154, ptr noundef @.str.13, double noundef %37, double noundef %40, double noundef %43)
  br label %44

44:                                               ; preds = %33, %30
  %45 = load i32, ptr @RcsLogLevel, align 4, !tbaa !5
  %46 = icmp sle i32 2, %45
  br i1 %46, label %47, label %63

47:                                               ; preds = %44
  %48 = load ptr, ptr @stderr, align 8, !tbaa !9
  %49 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %48, ptr noundef @.str.5, ptr noundef @.str.3, ptr noundef @__func__.testEulerAnglesFunctions, i32 noundef 154) #4
  %50 = load ptr, ptr @stderr, align 8, !tbaa !9
  %51 = getelementptr inbounds [3 x double], ptr %6, i64 0, i64 0
  %52 = load double, ptr %51, align 16, !tbaa !13
  %53 = fmul double %52, 0x404CA5DC1A63C1F8
  %54 = getelementptr inbounds [3 x double], ptr %6, i64 0, i64 1
  %55 = load double, ptr %54, align 8, !tbaa !13
  %56 = fmul double %55, 0x404CA5DC1A63C1F8
  %57 = getelementptr inbounds [3 x double], ptr %6, i64 0, i64 2
  %58 = load double, ptr %57, align 16, !tbaa !13
  %59 = fmul double %58, 0x404CA5DC1A63C1F8
  %60 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %50, ptr noundef @.str.13, double noundef %53, double noundef %56, double noundef %59) #4
  %61 = load ptr, ptr @stderr, align 8, !tbaa !9
  %62 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %61, ptr noundef @.str.6) #4
  br label %63

63:                                               ; preds = %47, %44
  br label %64

64:                                               ; preds = %63
  br label %65

65:                                               ; preds = %64
  br label %66

66:                                               ; preds = %65
  %67 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !9
  %68 = icmp ne ptr %67, null
  br i1 %68, label %69, label %80

69:                                               ; preds = %66
  %70 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !9
  %71 = getelementptr inbounds [3 x double], ptr %7, i64 0, i64 0
  %72 = load double, ptr %71, align 16, !tbaa !13
  %73 = fmul double %72, 0x404CA5DC1A63C1F8
  %74 = getelementptr inbounds [3 x double], ptr %7, i64 0, i64 1
  %75 = load double, ptr %74, align 8, !tbaa !13
  %76 = fmul double %75, 0x404CA5DC1A63C1F8
  %77 = getelementptr inbounds [3 x double], ptr %7, i64 0, i64 2
  %78 = load double, ptr %77, align 16, !tbaa !13
  %79 = fmul double %78, 0x404CA5DC1A63C1F8
  call void (i32, ptr, ptr, i32, ptr, ...) %70(i32 noundef 2, ptr noundef @.str.3, ptr noundef @__func__.testEulerAnglesFunctions, i32 noundef 157, ptr noundef @.str.14, double noundef %73, double noundef %76, double noundef %79)
  br label %80

80:                                               ; preds = %69, %66
  %81 = load i32, ptr @RcsLogLevel, align 4, !tbaa !5
  %82 = icmp sle i32 2, %81
  br i1 %82, label %83, label %99

83:                                               ; preds = %80
  %84 = load ptr, ptr @stderr, align 8, !tbaa !9
  %85 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %84, ptr noundef @.str.5, ptr noundef @.str.3, ptr noundef @__func__.testEulerAnglesFunctions, i32 noundef 157) #4
  %86 = load ptr, ptr @stderr, align 8, !tbaa !9
  %87 = getelementptr inbounds [3 x double], ptr %7, i64 0, i64 0
  %88 = load double, ptr %87, align 16, !tbaa !13
  %89 = fmul double %88, 0x404CA5DC1A63C1F8
  %90 = getelementptr inbounds [3 x double], ptr %7, i64 0, i64 1
  %91 = load double, ptr %90, align 8, !tbaa !13
  %92 = fmul double %91, 0x404CA5DC1A63C1F8
  %93 = getelementptr inbounds [3 x double], ptr %7, i64 0, i64 2
  %94 = load double, ptr %93, align 16, !tbaa !13
  %95 = fmul double %94, 0x404CA5DC1A63C1F8
  %96 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %86, ptr noundef @.str.14, double noundef %89, double noundef %92, double noundef %95) #4
  %97 = load ptr, ptr @stderr, align 8, !tbaa !9
  %98 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %97, ptr noundef @.str.6) #4
  br label %99

99:                                               ; preds = %83, %80
  br label %100

100:                                              ; preds = %99
  br label %101

101:                                              ; preds = %100
  %102 = getelementptr inbounds [3 x [3 x double]], ptr %10, i64 0, i64 0
  %103 = getelementptr inbounds [3 x [3 x double]], ptr %9, i64 0, i64 0
  %104 = getelementptr inbounds [3 x [3 x double]], ptr %8, i64 0, i64 0
  call void @Mat3d_sub(ptr noundef %102, ptr noundef %103, ptr noundef %104)
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  store double 1.000000e-08, ptr %12, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  %105 = getelementptr inbounds [3 x [3 x double]], ptr %10, i64 0, i64 0
  %106 = call double @VecNd_getLength(ptr noundef %105, i32 noundef 9)
  store double %106, ptr %13, align 8, !tbaa !13
  %107 = load double, ptr %13, align 8, !tbaa !13
  %108 = fcmp ogt double %107, 1.000000e-08
  br i1 %108, label %109, label %117

109:                                              ; preds = %101
  %110 = load i32, ptr @RcsLogLevel, align 4, !tbaa !5
  %111 = icmp sle i32 2, %110
  br i1 %111, label %112, label %116

112:                                              ; preds = %109
  %113 = getelementptr inbounds [3 x [3 x double]], ptr %8, i64 0, i64 0
  call void @Mat3d_printCommentDigits(ptr noundef @.str.15, ptr noundef %113, i32 noundef 4)
  %114 = getelementptr inbounds [3 x [3 x double]], ptr %9, i64 0, i64 0
  call void @Mat3d_printCommentDigits(ptr noundef @.str.16, ptr noundef %114, i32 noundef 4)
  %115 = getelementptr inbounds [3 x [3 x double]], ptr %10, i64 0, i64 0
  call void @Mat3d_printCommentDigits(ptr noundef @.str.17, ptr noundef %115, i32 noundef 4)
  br label %116

116:                                              ; preds = %112, %109
  store i8 0, ptr %5, align 1, !tbaa !11
  br label %117

117:                                              ; preds = %116, %101
  br label %118

118:                                              ; preds = %117
  %119 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !9
  %120 = icmp ne ptr %119, null
  br i1 %120, label %121, label %130

121:                                              ; preds = %118
  %122 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !9
  %123 = load i8, ptr %5, align 1, !tbaa !11, !range !15, !noundef !16
  %124 = trunc i8 %123 to i1
  br i1 %124, label %125, label %126

125:                                              ; preds = %121
  br label %127

126:                                              ; preds = %121
  br label %127

127:                                              ; preds = %126, %125
  %128 = phi ptr [ @.str.20, %125 ], [ @.str.21, %126 ]
  %129 = getelementptr inbounds [8 x i8], ptr %128, i64 0, i64 0
  call void (i32, ptr, ptr, i32, ptr, ...) %122(i32 noundef 1, ptr noundef @.str.18, ptr noundef @__func__.testEulerAnglesFunctions, i32 noundef 175, ptr noundef @.str.19, ptr noundef %129)
  br label %130

130:                                              ; preds = %127, %118
  %131 = load i32, ptr @RcsLogLevel, align 4, !tbaa !5
  %132 = icmp sle i32 1, %131
  br i1 %132, label %133, label %147

133:                                              ; preds = %130
  %134 = load ptr, ptr @stderr, align 8, !tbaa !9
  %135 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %134, ptr noundef @.str.22, ptr noundef @__func__.testEulerAnglesFunctions, i32 noundef 175) #4
  %136 = load ptr, ptr @stderr, align 8, !tbaa !9
  %137 = load i8, ptr %5, align 1, !tbaa !11, !range !15, !noundef !16
  %138 = trunc i8 %137 to i1
  br i1 %138, label %139, label %140

139:                                              ; preds = %133
  br label %141

140:                                              ; preds = %133
  br label %141

141:                                              ; preds = %140, %139
  %142 = phi ptr [ @.str.20, %139 ], [ @.str.21, %140 ]
  %143 = getelementptr inbounds [8 x i8], ptr %142, i64 0, i64 0
  %144 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %136, ptr noundef @.str.19, ptr noundef %143) #4
  %145 = load ptr, ptr @stderr, align 8, !tbaa !9
  %146 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %145, ptr noundef @.str.6) #4
  br label %147

147:                                              ; preds = %141, %130
  br label %148

148:                                              ; preds = %147
  br label %149

149:                                              ; preds = %148
  br label %150

150:                                              ; preds = %149
  %151 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !9
  %152 = icmp ne ptr %151, null
  br i1 %152, label %153, label %156

153:                                              ; preds = %150
  %154 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !9
  %155 = load double, ptr %13, align 8, !tbaa !13
  call void (i32, ptr, ptr, i32, ptr, ...) %154(i32 noundef 2, ptr noundef @.str.3, ptr noundef @__func__.testEulerAnglesFunctions, i32 noundef 176, ptr noundef @.str.23, double noundef %155, double noundef 1.000000e-08)
  br label %156

156:                                              ; preds = %153, %150
  %157 = load i32, ptr @RcsLogLevel, align 4, !tbaa !5
  %158 = icmp sle i32 2, %157
  br i1 %158, label %159, label %167

159:                                              ; preds = %156
  %160 = load ptr, ptr @stderr, align 8, !tbaa !9
  %161 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %160, ptr noundef @.str.5, ptr noundef @.str.3, ptr noundef @__func__.testEulerAnglesFunctions, i32 noundef 176) #4
  %162 = load ptr, ptr @stderr, align 8, !tbaa !9
  %163 = load double, ptr %13, align 8, !tbaa !13
  %164 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %162, ptr noundef @.str.23, double noundef %163, double noundef 1.000000e-08) #4
  %165 = load ptr, ptr @stderr, align 8, !tbaa !9
  %166 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %165, ptr noundef @.str.6) #4
  br label %167

167:                                              ; preds = %159, %156
  br label %168

168:                                              ; preds = %167
  br label %169

169:                                              ; preds = %168
  %170 = load i8, ptr %5, align 1, !tbaa !11, !range !15, !noundef !16
  %171 = trunc i8 %170 to i1
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 72, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 72, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 72, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #4
  ret i1 %171
}

declare void @Vec3d_setRandom(ptr noundef, double noundef, double noundef) #3

declare void @_ZN3Rcs13CmdLineParserC1EiPPc(ptr noundef nonnull align 1 dereferenceable(1), i32 noundef, ptr noundef) unnamed_addr #3

declare noundef zeroext i1 @_ZNK3Rcs13CmdLineParser11getArgumentEPKcPdS2_z(ptr noundef nonnull align 1 dereferenceable(1), ptr noundef, ptr noundef, ptr noundef, ...) #3

declare void @Vec3d_constMulSelf(ptr noundef, double noundef) #3

declare void @Mat3d_fromEulerAngles(ptr noundef, ptr noundef) #3

declare void @Mat3d_toEulerAngles(ptr noundef, ptr noundef) #3

declare void @Mat3d_sub(ptr noundef, ptr noundef, ptr noundef) #3

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

declare void @Mat3d_printCommentDigits(ptr noundef, ptr noundef, i32 noundef) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"double", !7, i64 0}
!15 = !{i8 0, i8 2}
!16 = !{}


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

%"class.Rcs::CmdLineParser" = type { i8 }

@RCS_GLOBAL_RLOG_CB = external local_unnamed_addr global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [74 x i8], align 1
@RcsLogLevel = external local_unnamed_addr global i32, align 4
@stderr = external local_unnamed_addr global ptr, align 8
@.str.5 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [3 x i8], align 1
@__func__.testEulerAnglesFunctions = external hidden unnamed_addr constant [25 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [18 x i8], align 1

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local zeroext i1 @testEulerAnglesFunctions(i32 noundef %0, ptr noundef %1) local_unnamed_addr #2 {
  %3 = alloca [3 x double], align 16
  %4 = alloca [3 x double], align 16
  %5 = alloca [3 x [3 x double]], align 16
  %6 = alloca [3 x [3 x double]], align 16
  %7 = alloca [3 x [3 x double]], align 16
  %8 = alloca %"class.Rcs::CmdLineParser", align 1
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #4
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %5) #4
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %6) #4
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %7) #4
  call void @Vec3d_setRandom(ptr noundef nonnull %3, double noundef -7.200000e+02, double noundef 7.200000e+02)
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #4
  call void @_ZN3Rcs13CmdLineParserC1EiPPc(ptr noundef nonnull align 1 dereferenceable(1) %8, i32 noundef %0, ptr noundef %1)
  %9 = call noundef zeroext i1 (ptr, ptr, ptr, ptr, ...) @_ZNK3Rcs13CmdLineParser11getArgumentEPKcPdS2_z(ptr noundef nonnull align 1 dereferenceable(1) %8, ptr noundef nonnull @.str.10, ptr noundef nonnull %3, ptr noundef null)
  %10 = getelementptr inbounds i8, ptr %3, i64 8
  %11 = call noundef zeroext i1 (ptr, ptr, ptr, ptr, ...) @_ZNK3Rcs13CmdLineParser11getArgumentEPKcPdS2_z(ptr noundef nonnull align 1 dereferenceable(1) %8, ptr noundef nonnull @.str.11, ptr noundef nonnull %10, ptr noundef null)
  %12 = getelementptr inbounds i8, ptr %3, i64 16
  %13 = call noundef zeroext i1 (ptr, ptr, ptr, ptr, ...) @_ZNK3Rcs13CmdLineParser11getArgumentEPKcPdS2_z(ptr noundef nonnull align 1 dereferenceable(1) %8, ptr noundef nonnull @.str.12, ptr noundef nonnull %12, ptr noundef null)
  call void @Vec3d_constMulSelf(ptr noundef nonnull %3, double noundef 0x3F91DF46A2529D39)
  call void @Mat3d_fromEulerAngles(ptr noundef nonnull %5, ptr noundef nonnull %3)
  call void @Mat3d_toEulerAngles(ptr noundef nonnull %4, ptr noundef nonnull %5)
  call void @Mat3d_fromEulerAngles(ptr noundef nonnull %6, ptr noundef nonnull %4)
  %14 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %.not = icmp eq ptr %14, null
  br i1 %.not, label %22, label %15

15:                                               ; preds = %2
  %16 = load double, ptr %3, align 16, !tbaa !9
  %17 = fmul double %16, 0x404CA5DC1A63C1F8
  %18 = load double, ptr %10, align 8, !tbaa !9
  %19 = fmul double %18, 0x404CA5DC1A63C1F8
  %20 = load double, ptr %12, align 16, !tbaa !9
  %21 = fmul double %20, 0x404CA5DC1A63C1F8
  call void (i32, ptr, ptr, i32, ptr, ...) %14(i32 noundef 2, ptr noundef nonnull @.str.3, ptr noundef nonnull @__func__.testEulerAnglesFunctions, i32 noundef 154, ptr noundef nonnull @.str.13, double noundef %17, double noundef %19, double noundef %21)
  br label %22

22:                                               ; preds = %15, %2
  %23 = load i32, ptr @RcsLogLevel, align 4, !tbaa !11
  %24 = icmp sgt i32 %23, 1
  br i1 %24, label %25, label %38

25:                                               ; preds = %22
  %26 = load ptr, ptr @stderr, align 8, !tbaa !5
  %27 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %26, ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.3, ptr noundef nonnull @__func__.testEulerAnglesFunctions, i32 noundef 154) #5
  %28 = load ptr, ptr @stderr, align 8, !tbaa !5
  %29 = load double, ptr %3, align 16, !tbaa !9
  %30 = fmul double %29, 0x404CA5DC1A63C1F8
  %31 = load double, ptr %10, align 8, !tbaa !9
  %32 = fmul double %31, 0x404CA5DC1A63C1F8
  %33 = load double, ptr %12, align 16, !tbaa !9
  %34 = fmul double %33, 0x404CA5DC1A63C1F8
  %35 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %28, ptr noundef nonnull @.str.13, double noundef %30, double noundef %32, double noundef %34) #5
  %36 = load ptr, ptr @stderr, align 8, !tbaa !5
  %37 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %36, ptr noundef nonnull @.str.6) #5
  br label %38

38:                                               ; preds = %22, %25
  %39 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %.not12 = icmp eq ptr %39, null
  br i1 %.not12, label %49, label %40

40:                                               ; preds = %38
  %41 = load double, ptr %4, align 16, !tbaa !9
  %42 = fmul double %41, 0x404CA5DC1A63C1F8
  %43 = getelementptr inbounds i8, ptr %4, i64 8
  %44 = load double, ptr %43, align 8, !tbaa !9
  %45 = fmul double %44, 0x404CA5DC1A63C1F8
  %46 = getelementptr inbounds i8, ptr %4, i64 16
  %47 = load double, ptr %46, align 16, !tbaa !9
  %48 = fmul double %47, 0x404CA5DC1A63C1F8
  call void (i32, ptr, ptr, i32, ptr, ...) %39(i32 noundef 2, ptr noundef nonnull @.str.3, ptr noundef nonnull @__func__.testEulerAnglesFunctions, i32 noundef 157, ptr noundef nonnull @.str.14, double noundef %42, double noundef %45, double noundef %48)
  br label %49

49:                                               ; preds = %40, %38
  %50 = load i32, ptr @RcsLogLevel, align 4, !tbaa !11
  %51 = icmp sgt i32 %50, 1
  br i1 %51, label %52, label %67

52:                                               ; preds = %49
  %53 = load ptr, ptr @stderr, align 8, !tbaa !5
  %54 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %53, ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.3, ptr noundef nonnull @__func__.testEulerAnglesFunctions, i32 noundef 157) #5
  %55 = load ptr, ptr @stderr, align 8, !tbaa !5
  %56 = load double, ptr %4, align 16, !tbaa !9
  %57 = fmul double %56, 0x404CA5DC1A63C1F8
  %58 = getelementptr inbounds i8, ptr %4, i64 8
  %59 = load double, ptr %58, align 8, !tbaa !9
  %60 = fmul double %59, 0x404CA5DC1A63C1F8
  %61 = getelementptr inbounds i8, ptr %4, i64 16
  %62 = load double, ptr %61, align 16, !tbaa !9
  %63 = fmul double %62, 0x404CA5DC1A63C1F8
  %64 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %55, ptr noundef nonnull @.str.14, double noundef %57, double noundef %60, double noundef %63) #5
  %65 = load ptr, ptr @stderr, align 8, !tbaa !5
  %66 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %65, ptr noundef nonnull @.str.6) #5
  br label %67

67:                                               ; preds = %52, %49
  call void @Mat3d_sub(ptr noundef nonnull %7, ptr noundef nonnull %6, ptr noundef nonnull %5)
  %68 = call double @VecNd_getLength(ptr noundef nonnull %7, i32 noundef 9)
  %69 = fcmp ule double %68, 1.000000e-08
  %70 = load i32, ptr @RcsLogLevel, align 4
  %71 = icmp slt i32 %70, 2
  %or.cond.not = select i1 %69, i1 true, i1 %71
  br i1 %or.cond.not, label %73, label %72

72:                                               ; preds = %67
  call void @Mat3d_printCommentDigits(ptr noundef nonnull @.str.15, ptr noundef nonnull %5, i32 noundef 4)
  call void @Mat3d_printCommentDigits(ptr noundef nonnull @.str.16, ptr noundef nonnull %6, i32 noundef 4)
  call void @Mat3d_printCommentDigits(ptr noundef nonnull @.str.17, ptr noundef nonnull %7, i32 noundef 4)
  br label %73

73:                                               ; preds = %72, %67
  %74 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %.not13 = icmp eq ptr %74, null
  br i1 %.not13, label %76, label %75

75:                                               ; preds = %73
  %.str.20..str.21 = select i1 %69, ptr @.str.20, ptr @.str.21
  call void (i32, ptr, ptr, i32, ptr, ...) %74(i32 noundef 1, ptr noundef nonnull @.str.18, ptr noundef nonnull @__func__.testEulerAnglesFunctions, i32 noundef 175, ptr noundef nonnull @.str.19, ptr noundef nonnull %.str.20..str.21)
  br label %76

76:                                               ; preds = %75, %73
  %77 = load i32, ptr @RcsLogLevel, align 4, !tbaa !11
  %78 = icmp sgt i32 %77, 0
  br i1 %78, label %79, label %86

79:                                               ; preds = %76
  %80 = load ptr, ptr @stderr, align 8, !tbaa !5
  %81 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %80, ptr noundef nonnull @.str.22, ptr noundef nonnull @__func__.testEulerAnglesFunctions, i32 noundef 175) #5
  %82 = load ptr, ptr @stderr, align 8, !tbaa !5
  %.str.20..str.211 = select i1 %69, ptr @.str.20, ptr @.str.21
  %83 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %82, ptr noundef nonnull @.str.19, ptr noundef nonnull %.str.20..str.211) #5
  %84 = load ptr, ptr @stderr, align 8, !tbaa !5
  %85 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %84, ptr noundef nonnull @.str.6) #5
  br label %86

86:                                               ; preds = %76, %79
  %87 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %.not14 = icmp eq ptr %87, null
  br i1 %.not14, label %89, label %88

88:                                               ; preds = %86
  call void (i32, ptr, ptr, i32, ptr, ...) %87(i32 noundef 2, ptr noundef nonnull @.str.3, ptr noundef nonnull @__func__.testEulerAnglesFunctions, i32 noundef 176, ptr noundef nonnull @.str.23, double noundef %68, double noundef 1.000000e-08)
  br label %89

89:                                               ; preds = %88, %86
  %90 = load i32, ptr @RcsLogLevel, align 4, !tbaa !11
  %91 = icmp sgt i32 %90, 1
  br i1 %91, label %92, label %99

92:                                               ; preds = %89
  %93 = load ptr, ptr @stderr, align 8, !tbaa !5
  %94 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %93, ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.3, ptr noundef nonnull @__func__.testEulerAnglesFunctions, i32 noundef 176) #5
  %95 = load ptr, ptr @stderr, align 8, !tbaa !5
  %96 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %95, ptr noundef nonnull @.str.23, double noundef %68, double noundef 1.000000e-08) #5
  %97 = load ptr, ptr @stderr, align 8, !tbaa !5
  %98 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %97, ptr noundef nonnull @.str.6) #5
  br label %99

99:                                               ; preds = %92, %89
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #4
  ret i1 %69
}

declare void @Vec3d_setRandom(ptr noundef, double noundef, double noundef) local_unnamed_addr #3

declare void @_ZN3Rcs13CmdLineParserC1EiPPc(ptr noundef nonnull align 1 dereferenceable(1), i32 noundef, ptr noundef) unnamed_addr #3

declare noundef zeroext i1 @_ZNK3Rcs13CmdLineParser11getArgumentEPKcPdS2_z(ptr noundef nonnull align 1 dereferenceable(1), ptr noundef, ptr noundef, ptr noundef, ...) local_unnamed_addr #3

declare void @Vec3d_constMulSelf(ptr noundef, double noundef) local_unnamed_addr #3

declare void @Mat3d_fromEulerAngles(ptr noundef, ptr noundef) local_unnamed_addr #3

declare void @Mat3d_toEulerAngles(ptr noundef, ptr noundef) local_unnamed_addr #3

declare void @Mat3d_sub(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

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

declare void @Mat3d_printCommentDigits(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}


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