; 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 }
%struct._MatNd = type { ptr, i32, i32, i32, i8 }

@.str.3 = external hidden unnamed_addr constant [74 x i8], align 1
@stderr = external global ptr, align 8
@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.57 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.60 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.165 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.166 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.168 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.169 = external hidden unnamed_addr constant [43 x i8], align 1
@__func__.testInterpolation = external hidden unnamed_addr constant [18 x i8], align 1
@.str.235 = external hidden unnamed_addr constant [286 x i8], align 1
@.str.236 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.237 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.238 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.239 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.240 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.241 = external hidden unnamed_addr constant [151 x i8], align 1
@.str.242 = external hidden unnamed_addr constant [17 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

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

declare ptr @MatNd_create(i32 noundef, i32 noundef) #2

declare void @MatNd_setRandom(ptr noundef, double noundef, double noundef) #2

declare double @MatNd_get(ptr noundef, i32 noundef, i32 noundef) #2

declare void @MatNd_destroy(ptr noundef) #2

declare i32 @fflush(ptr noundef) #2

declare void @MatNd_set(ptr noundef, i32 noundef, i32 noundef, double noundef) #2

declare zeroext i1 @MatNd_toFile(ptr noundef, ptr noundef) #2

declare i32 @system(ptr noundef) #2

declare void @print_trace() #2

; Function Attrs: noreturn nounwind
declare void @abort() #3

declare noundef zeroext i1 @_ZNK3Rcs13CmdLineParser11getArgumentEPKcPiS2_z(ptr noundef nonnull align 1 dereferenceable(1), ptr noundef, ptr noundef, ptr noundef, ...) #2

declare noalias ptr @fopen(ptr noundef, ptr noundef) #2

declare i32 @fclose(ptr noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local zeroext i1 @testInterpolation(i32 noundef %0, ptr noundef %1) #4 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca %"class.Rcs::CmdLineParser", align 1
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  store i32 %0, ptr %3, align 4, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !9
  br label %16

16:                                               ; preds = %2
  %17 = load ptr, ptr @stderr, align 8, !tbaa !9
  %18 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %17, ptr noundef @.str.22, ptr noundef @__func__.testInterpolation, i32 noundef 2340) #5
  %19 = load ptr, ptr @stderr, align 8, !tbaa !9
  %20 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %19, ptr noundef @.str.235) #5
  %21 = load ptr, ptr @stderr, align 8, !tbaa !9
  %22 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %21, ptr noundef @.str.6) #5
  %23 = load ptr, ptr @stderr, align 8, !tbaa !9
  %24 = call i32 @fflush(ptr noundef %23)
  br label %25

25:                                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  store i32 3, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  store i32 10, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #5
  %26 = load i32, ptr %3, align 4, !tbaa !5
  %27 = load ptr, ptr %4, align 8, !tbaa !9
  call void @_ZN3Rcs13CmdLineParserC1EiPPc(ptr noundef nonnull align 1 dereferenceable(1) %7, i32 noundef %26, ptr noundef %27)
  %28 = call noundef zeroext i1 (ptr, ptr, ptr, ptr, ...) @_ZNK3Rcs13CmdLineParser11getArgumentEPKcPiS2_z(ptr noundef nonnull align 1 dereferenceable(1) %7, ptr noundef @.str.236, ptr noundef %5, ptr noundef null)
  %29 = call noundef zeroext i1 (ptr, ptr, ptr, ptr, ...) @_ZNK3Rcs13CmdLineParser11getArgumentEPKcPiS2_z(ptr noundef nonnull align 1 dereferenceable(1) %7, ptr noundef @.str.60, ptr noundef %6, ptr noundef null)
  br label %30

30:                                               ; preds = %25
  %31 = load i32, ptr %5, align 4, !tbaa !5
  %32 = icmp sgt i32 %31, 0
  br i1 %32, label %33, label %37

33:                                               ; preds = %30
  %34 = load i32, ptr %5, align 4, !tbaa !5
  %35 = load i32, ptr %6, align 4, !tbaa !5
  %36 = icmp slt i32 %34, %35
  br i1 %36, label %46, label %37

37:                                               ; preds = %33, %30
  %38 = load ptr, ptr @stderr, align 8, !tbaa !9
  %39 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %38, ptr noundef @.str.237, ptr noundef @.str.3, ptr noundef @__func__.testInterpolation, i32 noundef 2349, ptr noundef @.str.238) #5
  %40 = load ptr, ptr @stderr, align 8, !tbaa !9
  %41 = load i32, ptr %5, align 4, !tbaa !5
  %42 = load i32, ptr %6, align 4, !tbaa !5
  %43 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %40, ptr noundef @.str.239, i32 noundef %41, i32 noundef %42) #5
  %44 = load ptr, ptr @stderr, align 8, !tbaa !9
  %45 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %44, ptr noundef @.str.6) #5
  call void @print_trace()
  call void @exit(i32 noundef 1) #6
  unreachable

46:                                               ; preds = %33
  br label %47

47:                                               ; preds = %46
  br label %48

48:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %49 = load i32, ptr %6, align 4, !tbaa !5
  %50 = call ptr @MatNd_create(i32 noundef %49, i32 noundef 3)
  store ptr %50, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %51 = load i32, ptr %5, align 4, !tbaa !5
  %52 = load ptr, ptr %8, align 8, !tbaa !9
  %53 = getelementptr inbounds %struct._MatNd, ptr %52, i32 0, i32 1
  %54 = load i32, ptr %53, align 8, !tbaa !11
  %55 = mul i32 %51, %54
  %56 = call ptr @MatNd_create(i32 noundef %55, i32 noundef 3)
  store ptr %56, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %57 = load i32, ptr %5, align 4, !tbaa !5
  %58 = load ptr, ptr %8, align 8, !tbaa !9
  %59 = getelementptr inbounds %struct._MatNd, ptr %58, i32 0, i32 1
  %60 = load i32, ptr %59, align 8, !tbaa !11
  %61 = mul i32 %57, %60
  %62 = call ptr @MatNd_create(i32 noundef %61, i32 noundef 3)
  store ptr %62, ptr %10, align 8, !tbaa !9
  %63 = load ptr, ptr %8, align 8, !tbaa !9
  call void @MatNd_setRandom(ptr noundef %63, double noundef 0.000000e+00, double noundef 1.000000e+00)
  %64 = load ptr, ptr %10, align 8, !tbaa !9
  %65 = load ptr, ptr %8, align 8, !tbaa !9
  %66 = load i32, ptr %5, align 4, !tbaa !5
  call void @MatNd_interpolateFifthOrder(ptr noundef %64, ptr noundef %65, i32 noundef %66)
  %67 = load ptr, ptr %9, align 8, !tbaa !9
  %68 = load ptr, ptr %8, align 8, !tbaa !9
  %69 = load i32, ptr %5, align 4, !tbaa !5
  call void @MatNd_interpolateLinear(ptr noundef %67, ptr noundef %68, i32 noundef %69)
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %70 = load ptr, ptr %9, align 8, !tbaa !9
  %71 = getelementptr inbounds %struct._MatNd, ptr %70, i32 0, i32 1
  %72 = load i32, ptr %71, align 8, !tbaa !11
  %73 = call ptr @MatNd_create(i32 noundef %72, i32 noundef 4)
  store ptr %73, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %74

74:                                               ; preds = %103, %48
  %75 = load i32, ptr %12, align 4, !tbaa !5
  %76 = load ptr, ptr %11, align 8, !tbaa !9
  %77 = getelementptr inbounds %struct._MatNd, ptr %76, i32 0, i32 1
  %78 = load i32, ptr %77, align 8, !tbaa !11
  %79 = icmp ult i32 %75, %78
  br i1 %79, label %81, label %80

80:                                               ; preds = %74
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %106

81:                                               ; preds = %74
  %82 = load ptr, ptr %11, align 8, !tbaa !9
  %83 = load i32, ptr %12, align 4, !tbaa !5
  %84 = load i32, ptr %12, align 4, !tbaa !5
  %85 = uitofp i32 %84 to double
  call void @MatNd_set(ptr noundef %82, i32 noundef %83, i32 noundef 0, double noundef %85)
  %86 = load ptr, ptr %11, align 8, !tbaa !9
  %87 = load i32, ptr %12, align 4, !tbaa !5
  %88 = load ptr, ptr %8, align 8, !tbaa !9
  %89 = load i32, ptr %12, align 4, !tbaa !5
  %90 = load i32, ptr %5, align 4, !tbaa !5
  %91 = udiv i32 %89, %90
  %92 = call double @MatNd_get(ptr noundef %88, i32 noundef %91, i32 noundef 0)
  call void @MatNd_set(ptr noundef %86, i32 noundef %87, i32 noundef 1, double noundef %92)
  %93 = load ptr, ptr %11, align 8, !tbaa !9
  %94 = load i32, ptr %12, align 4, !tbaa !5
  %95 = load ptr, ptr %9, align 8, !tbaa !9
  %96 = load i32, ptr %12, align 4, !tbaa !5
  %97 = call double @MatNd_get(ptr noundef %95, i32 noundef %96, i32 noundef 0)
  call void @MatNd_set(ptr noundef %93, i32 noundef %94, i32 noundef 2, double noundef %97)
  %98 = load ptr, ptr %11, align 8, !tbaa !9
  %99 = load i32, ptr %12, align 4, !tbaa !5
  %100 = load ptr, ptr %10, align 8, !tbaa !9
  %101 = load i32, ptr %12, align 4, !tbaa !5
  %102 = call double @MatNd_get(ptr noundef %100, i32 noundef %101, i32 noundef 0)
  call void @MatNd_set(ptr noundef %98, i32 noundef %99, i32 noundef 3, double noundef %102)
  br label %103

103:                                              ; preds = %81
  %104 = load i32, ptr %12, align 4, !tbaa !5
  %105 = add i32 %104, 1
  store i32 %105, ptr %12, align 4, !tbaa !5
  br label %74, !llvm.loop !14

106:                                              ; preds = %80
  %107 = load ptr, ptr %11, align 8, !tbaa !9
  %108 = call zeroext i1 @MatNd_toFile(ptr noundef %107, ptr noundef @.str.240)
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  store ptr @.str.241, ptr %13, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %109 = call noalias ptr @fopen(ptr noundef @.str.242, ptr noundef @.str.165)
  store ptr %109, ptr %14, align 8, !tbaa !9
  br label %110

110:                                              ; preds = %106
  %111 = load ptr, ptr %14, align 8, !tbaa !9
  %112 = icmp ne ptr %111, null
  br i1 %112, label %116, label %113

113:                                              ; preds = %110
  %114 = load ptr, ptr @stderr, align 8, !tbaa !9
  %115 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %114, ptr noundef @.str.57, ptr noundef @.str.3, ptr noundef @__func__.testInterpolation, i32 noundef 2375, ptr noundef @.str.166) #5
  call void @print_trace()
  call void @abort() #6
  unreachable

116:                                              ; preds = %110
  br label %117

117:                                              ; preds = %116
  br label %118

118:                                              ; preds = %117
  %119 = load ptr, ptr %14, align 8, !tbaa !9
  %120 = load ptr, ptr %13, align 8, !tbaa !9
  %121 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %119, ptr noundef %120) #5
  %122 = load ptr, ptr %14, align 8, !tbaa !9
  %123 = call i32 @fflush(ptr noundef %122)
  %124 = load ptr, ptr %14, align 8, !tbaa !9
  %125 = call i32 @fclose(ptr noundef %124)
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  %126 = call i32 @system(ptr noundef @.str.169)
  store i32 %126, ptr %15, align 4, !tbaa !5
  %127 = load i32, ptr %15, align 4, !tbaa !5
  %128 = icmp eq i32 %127, -1
  br i1 %128, label %129, label %141

129:                                              ; preds = %118
  br label %130

130:                                              ; preds = %129
  %131 = load ptr, ptr @stderr, align 8, !tbaa !9
  %132 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %131, ptr noundef @.str.22, ptr noundef @__func__.testInterpolation, i32 noundef 2384) #5
  %133 = load ptr, ptr @stderr, align 8, !tbaa !9
  %134 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %133, ptr noundef @.str.168) #5
  %135 = load ptr, ptr @stderr, align 8, !tbaa !9
  %136 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %135, ptr noundef @.str.6) #5
  %137 = load ptr, ptr @stderr, align 8, !tbaa !9
  %138 = call i32 @fflush(ptr noundef %137)
  br label %139

139:                                              ; preds = %130
  br label %140

140:                                              ; preds = %139
  br label %153

141:                                              ; preds = %118
  br label %142

142:                                              ; preds = %141
  %143 = load ptr, ptr @stderr, align 8, !tbaa !9
  %144 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %143, ptr noundef @.str.22, ptr noundef @__func__.testInterpolation, i32 noundef 2388) #5
  %145 = load ptr, ptr @stderr, align 8, !tbaa !9
  %146 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %145, ptr noundef @.str.169) #5
  %147 = load ptr, ptr @stderr, align 8, !tbaa !9
  %148 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %147, ptr noundef @.str.6) #5
  %149 = load ptr, ptr @stderr, align 8, !tbaa !9
  %150 = call i32 @fflush(ptr noundef %149)
  br label %151

151:                                              ; preds = %142
  br label %152

152:                                              ; preds = %151
  br label %153

153:                                              ; preds = %152, %140
  %154 = load ptr, ptr %11, align 8, !tbaa !9
  call void @MatNd_destroy(ptr noundef %154)
  %155 = load ptr, ptr %8, align 8, !tbaa !9
  call void @MatNd_destroy(ptr noundef %155)
  %156 = load ptr, ptr %9, align 8, !tbaa !9
  call void @MatNd_destroy(ptr noundef %156)
  %157 = load ptr, ptr %10, align 8, !tbaa !9
  call void @MatNd_destroy(ptr noundef %157)
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  ret i1 true
}

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #3

declare void @MatNd_interpolateFifthOrder(ptr noundef, ptr noundef, i32 noundef) #2

declare void @MatNd_interpolateLinear(ptr noundef, ptr noundef, i32 noundef) #2

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 = { "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 = { noreturn 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 #4 = { 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 #5 = { nounwind }
attributes #6 = { noreturn 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, !6, i64 8}
!12 = !{!"_ZTS6_MatNd", !10, i64 0, !6, i64 8, !6, i64 12, !6, i64 16, !13, i64 20}
!13 = !{!"bool", !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"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"

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

@.str.3 = external hidden unnamed_addr constant [74 x i8], align 1
@stderr = external local_unnamed_addr global ptr, align 8
@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.57 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.60 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.165 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.166 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.168 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.169 = external hidden unnamed_addr constant [43 x i8], align 1
@__func__.testInterpolation = external hidden unnamed_addr constant [18 x i8], align 1
@.str.235 = external hidden unnamed_addr constant [286 x i8], align 1
@.str.236 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.237 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.238 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.239 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.240 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.241 = external hidden unnamed_addr constant [151 x i8], align 1
@.str.242 = external hidden unnamed_addr constant [17 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

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

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

declare void @MatNd_setRandom(ptr noundef, double noundef, double noundef) local_unnamed_addr #2

declare double @MatNd_get(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

declare void @MatNd_destroy(ptr noundef) local_unnamed_addr #2

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

declare void @MatNd_set(ptr noundef, i32 noundef, i32 noundef, double noundef) local_unnamed_addr #2

declare zeroext i1 @MatNd_toFile(ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nofree
declare noundef i32 @system(ptr nocapture noundef readonly) local_unnamed_addr #3

declare void @print_trace() local_unnamed_addr #2

; Function Attrs: noreturn nounwind
declare void @abort() local_unnamed_addr #4

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

; Function Attrs: nofree nounwind
declare noalias noundef ptr @fopen(ptr nocapture noundef readonly, ptr nocapture noundef readonly) local_unnamed_addr #1

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @testInterpolation(i32 noundef %0, ptr noundef %1) local_unnamed_addr #5 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca %"class.Rcs::CmdLineParser", align 1
  %6 = load ptr, ptr @stderr, align 8, !tbaa !5
  %7 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %6, ptr noundef nonnull @.str.22, ptr noundef nonnull @__func__.testInterpolation, i32 noundef 2340) #6
  %8 = load ptr, ptr @stderr, align 8, !tbaa !5
  %9 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %8, ptr noundef nonnull @.str.235) #6
  %10 = load ptr, ptr @stderr, align 8, !tbaa !5
  %11 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %10, ptr noundef nonnull @.str.6) #6
  %12 = load ptr, ptr @stderr, align 8, !tbaa !5
  %13 = tail call i32 @fflush(ptr noundef %12)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  store i32 3, ptr %3, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  store i32 10, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #7
  call void @_ZN3Rcs13CmdLineParserC1EiPPc(ptr noundef nonnull align 1 dereferenceable(1) %5, i32 noundef %0, ptr noundef %1)
  %14 = call noundef zeroext i1 (ptr, ptr, ptr, ptr, ...) @_ZNK3Rcs13CmdLineParser11getArgumentEPKcPiS2_z(ptr noundef nonnull align 1 dereferenceable(1) %5, ptr noundef nonnull @.str.236, ptr noundef nonnull %3, ptr noundef null)
  %15 = call noundef zeroext i1 (ptr, ptr, ptr, ptr, ...) @_ZNK3Rcs13CmdLineParser11getArgumentEPKcPiS2_z(ptr noundef nonnull align 1 dereferenceable(1) %5, ptr noundef nonnull @.str.60, ptr noundef nonnull %4, ptr noundef null)
  %16 = load i32, ptr %3, align 4, !tbaa !9
  %17 = icmp sgt i32 %16, 0
  br i1 %17, label %18, label %21

18:                                               ; preds = %2
  %19 = load i32, ptr %4, align 4, !tbaa !9
  %20 = icmp slt i32 %16, %19
  br i1 %20, label %30, label %21

21:                                               ; preds = %18, %2
  %22 = load ptr, ptr @stderr, align 8, !tbaa !5
  %23 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %22, ptr noundef nonnull @.str.237, ptr noundef nonnull @.str.3, ptr noundef nonnull @__func__.testInterpolation, i32 noundef 2349, ptr noundef nonnull @.str.238) #6
  %24 = load ptr, ptr @stderr, align 8, !tbaa !5
  %25 = load i32, ptr %3, align 4, !tbaa !9
  %26 = load i32, ptr %4, align 4, !tbaa !9
  %27 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %24, ptr noundef nonnull @.str.239, i32 noundef %25, i32 noundef %26) #6
  %28 = load ptr, ptr @stderr, align 8, !tbaa !5
  %29 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %28, ptr noundef nonnull @.str.6) #6
  call void @print_trace()
  call void @exit(i32 noundef 1) #8
  unreachable

30:                                               ; preds = %18
  %31 = call ptr @MatNd_create(i32 noundef %19, i32 noundef 3)
  %32 = load i32, ptr %3, align 4, !tbaa !9
  %33 = getelementptr inbounds i8, ptr %31, i64 8
  %34 = load i32, ptr %33, align 8, !tbaa !11
  %35 = mul i32 %34, %32
  %36 = call ptr @MatNd_create(i32 noundef %35, i32 noundef 3)
  %37 = load i32, ptr %3, align 4, !tbaa !9
  %38 = load i32, ptr %33, align 8, !tbaa !11
  %39 = mul i32 %38, %37
  %40 = call ptr @MatNd_create(i32 noundef %39, i32 noundef 3)
  call void @MatNd_setRandom(ptr noundef %31, double noundef 0.000000e+00, double noundef 1.000000e+00)
  %41 = load i32, ptr %3, align 4, !tbaa !9
  call void @MatNd_interpolateFifthOrder(ptr noundef %40, ptr noundef %31, i32 noundef %41)
  %42 = load i32, ptr %3, align 4, !tbaa !9
  call void @MatNd_interpolateLinear(ptr noundef %36, ptr noundef %31, i32 noundef %42)
  %43 = getelementptr inbounds i8, ptr %36, i64 8
  %44 = load i32, ptr %43, align 8, !tbaa !11
  %45 = call ptr @MatNd_create(i32 noundef %44, i32 noundef 4)
  %46 = getelementptr inbounds i8, ptr %45, i64 8
  %47 = load i32, ptr %46, align 8, !tbaa !11
  %.not42 = icmp eq i32 %47, 0
  br i1 %.not42, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %30
  %48 = call zeroext i1 @MatNd_toFile(ptr noundef nonnull %45, ptr noundef nonnull @.str.240)
  %49 = call noalias ptr @fopen(ptr noundef nonnull @.str.242, ptr noundef nonnull @.str.165)
  %.not = icmp eq ptr %49, null
  br i1 %.not, label %59, label %62

.lr.ph:                                           ; preds = %30, %.lr.ph
  %.041 = phi i32 [ %56, %.lr.ph ], [ 0, %30 ]
  %50 = uitofp i32 %.041 to double
  call void @MatNd_set(ptr noundef nonnull %45, i32 noundef %.041, i32 noundef 0, double noundef %50)
  %51 = load i32, ptr %3, align 4, !tbaa !9
  %52 = udiv i32 %.041, %51
  %53 = call double @MatNd_get(ptr noundef %31, i32 noundef %52, i32 noundef 0)
  call void @MatNd_set(ptr noundef nonnull %45, i32 noundef %.041, i32 noundef 1, double noundef %53)
  %54 = call double @MatNd_get(ptr noundef %36, i32 noundef %.041, i32 noundef 0)
  call void @MatNd_set(ptr noundef nonnull %45, i32 noundef %.041, i32 noundef 2, double noundef %54)
  %55 = call double @MatNd_get(ptr noundef %40, i32 noundef %.041, i32 noundef 0)
  call void @MatNd_set(ptr noundef nonnull %45, i32 noundef %.041, i32 noundef 3, double noundef %55)
  %56 = add nuw i32 %.041, 1
  %57 = load i32, ptr %46, align 8, !tbaa !11
  %58 = icmp ult i32 %56, %57
  br i1 %58, label %.lr.ph, label %._crit_edge, !llvm.loop !14

59:                                               ; preds = %._crit_edge
  %60 = load ptr, ptr @stderr, align 8, !tbaa !5
  %61 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %60, ptr noundef nonnull @.str.57, ptr noundef nonnull @.str.3, ptr noundef nonnull @__func__.testInterpolation, i32 noundef 2375, ptr noundef nonnull @.str.166) #6
  call void @print_trace()
  call void @abort() #8
  unreachable

62:                                               ; preds = %._crit_edge
  %63 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %49, ptr noundef nonnull @.str.241) #7
  %64 = call i32 @fflush(ptr noundef nonnull %49)
  %65 = call i32 @fclose(ptr noundef nonnull %49)
  %66 = call i32 @system(ptr noundef nonnull @.str.169)
  %67 = icmp eq i32 %66, -1
  %68 = load ptr, ptr @stderr, align 8, !tbaa !5
  %. = select i1 %67, i32 2384, i32 2388
  %.str.168..str.169 = select i1 %67, ptr @.str.168, ptr @.str.169
  %69 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %68, ptr noundef nonnull @.str.22, ptr noundef nonnull @__func__.testInterpolation, i32 noundef %.) #6
  %70 = load ptr, ptr @stderr, align 8, !tbaa !5
  %71 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %70, ptr noundef nonnull %.str.168..str.169) #6
  %72 = load ptr, ptr @stderr, align 8, !tbaa !5
  %73 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %72, ptr noundef nonnull @.str.6) #6
  %74 = load ptr, ptr @stderr, align 8, !tbaa !5
  %75 = call i32 @fflush(ptr noundef %74)
  call void @MatNd_destroy(ptr noundef nonnull %45)
  call void @MatNd_destroy(ptr noundef %31)
  call void @MatNd_destroy(ptr noundef %36)
  call void @MatNd_destroy(ptr noundef %40)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  ret i1 true
}

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #4

declare void @MatNd_interpolateFifthOrder(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

declare void @MatNd_interpolateLinear(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

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 = { "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 = { nofree "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 = { noreturn 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 = { 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 #6 = { cold nounwind }
attributes #7 = { nounwind }
attributes #8 = { noreturn nounwind }

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

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


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass