; LLVM IR from stan-dev/math :: lib/sundials_6.1.1/src/idas (idaa)

; 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.IDAMemRec = type { ptr, double, ptr, ptr, i32, double, double, ptr, i32, i32, ptr, ptr, i32, i32, i32, ptr, ptr, i32, i32, double, double, ptr, i32, i32, i32, i32, ptr, ptr, i32, ptr, ptr, ptr, i32, double, i32, i32, double, ptr, ptr, ptr, i32, ptr, ptr, i32, i32, i32, double, ptr, ptr, ptr, [6 x ptr], [6 x double], [6 x double], [6 x double], [6 x double], [6 x double], ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, [6 x ptr], ptr, ptr, ptr, ptr, [6 x ptr], ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, [6 x ptr], ptr, ptr, ptr, ptr, ptr, double, ptr, ptr, i32, i32, i32, i32, i32, i32, i32, i32, double, double, double, i32, double, i32, i32, i32, i32, i32, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, i32, i32, i32, i32, i64, double, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, double, ptr, ptr, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, i32, ptr, i32, ptr, i32, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, ptr, i32, ptr, ptr, double, double, double, ptr, ptr, ptr, double, double, i32, i32, i64, ptr, i32, ptr, [5 x double], ptr, ptr, i32, ptr, i32 }
%struct.IDAadjMemRec = type { double, double, i32, i32, double, i32, double, ptr, i32, ptr, i32, ptr, ptr, i32, i64, i64, ptr, i64, i32, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i32, [6 x ptr], [6 x ptr], [6 x double], ptr, ptr, ptr, ptr }
%struct.IDABMemRec = type { i32, double, ptr, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, double, ptr, ptr, ptr }

@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [98 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [50 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

declare void @IDAProcessError(ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ...) #1

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

declare void @N_VScale(double noundef, ptr noundef, ptr noundef) #1

declare i32 @IDACalcIC(ptr noundef, i32 noundef, double noundef) #1

; Function Attrs: nounwind uwtable
define dso_local i32 @IDACalcICBS(ptr noundef %0, i32 noundef %1, double noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6) #2 {
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca double, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  store ptr %0, ptr %9, align 8, !tbaa !5
  store i32 %1, ptr %10, align 4, !tbaa !9
  store double %2, ptr %11, align 8, !tbaa !11
  store ptr %3, ptr %12, align 8, !tbaa !5
  store ptr %4, ptr %13, align 8, !tbaa !5
  store ptr %5, ptr %14, align 8, !tbaa !5
  store ptr %6, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #3
  %24 = load ptr, ptr %9, align 8, !tbaa !5
  %25 = icmp eq ptr %24, null
  br i1 %25, label %26, label %27

26:                                               ; preds = %7
  call void (ptr, i32, ptr, ptr, ptr, ...) @IDAProcessError(ptr noundef null, i32 noundef -20, ptr noundef @.str, ptr noundef @.str.28, ptr noundef @.str.2)
  store i32 -20, ptr %8, align 4
  store i32 1, ptr %23, align 4
  br label %148

27:                                               ; preds = %7
  %28 = load ptr, ptr %9, align 8, !tbaa !5
  store ptr %28, ptr %16, align 8, !tbaa !5
  %29 = load ptr, ptr %16, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.IDAMemRec, ptr %29, i32 0, i32 232
  %31 = load i32, ptr %30, align 8, !tbaa !13
  %32 = icmp eq i32 %31, 0
  br i1 %32, label %33, label %35

33:                                               ; preds = %27
  %34 = load ptr, ptr %16, align 8, !tbaa !5
  call void (ptr, i32, ptr, ptr, ptr, ...) @IDAProcessError(ptr noundef %34, i32 noundef -101, ptr noundef @.str, ptr noundef @.str.28, ptr noundef @.str.7)
  store i32 -101, ptr %8, align 4
  store i32 1, ptr %23, align 4
  br label %148

35:                                               ; preds = %27
  %36 = load ptr, ptr %16, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.IDAMemRec, ptr %36, i32 0, i32 231
  %38 = load ptr, ptr %37, align 8, !tbaa !16
  store ptr %38, ptr %17, align 8, !tbaa !5
  %39 = load ptr, ptr %17, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.IDAadjMemRec, ptr %39, i32 0, i32 25
  %41 = load i32, ptr %40, align 8, !tbaa !17
  %42 = icmp ne i32 %41, 0
  br i1 %42, label %45, label %43

43:                                               ; preds = %35
  %44 = load ptr, ptr %16, align 8, !tbaa !5
  call void (ptr, i32, ptr, ptr, ptr, ...) @IDAProcessError(ptr noundef %44, i32 noundef -22, ptr noundef @.str, ptr noundef @.str.28, ptr noundef @.str.19)
  store i32 -22, ptr %8, align 4
  store i32 1, ptr %23, align 4
  br label %148

45:                                               ; preds = %35
  %46 = load i32, ptr %10, align 4, !tbaa !9
  %47 = load ptr, ptr %17, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.IDAadjMemRec, ptr %47, i32 0, i32 8
  %49 = load i32, ptr %48, align 8, !tbaa !19
  %50 = icmp sge i32 %46, %49
  br i1 %50, label %51, label %53

51:                                               ; preds = %45
  %52 = load ptr, ptr %16, align 8, !tbaa !5
  call void (ptr, i32, ptr, ptr, ptr, ...) @IDAProcessError(ptr noundef %52, i32 noundef -22, ptr noundef @.str, ptr noundef @.str.28, ptr noundef @.str.17)
  store i32 -22, ptr %8, align 4
  store i32 1, ptr %23, align 4
  br label %148

53:                                               ; preds = %45
  %54 = load ptr, ptr %17, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.IDAadjMemRec, ptr %54, i32 0, i32 7
  %56 = load ptr, ptr %55, align 8, !tbaa !20
  store ptr %56, ptr %18, align 8, !tbaa !5
  br label %57

57:                                               ; preds = %67, %53
  %58 = load ptr, ptr %18, align 8, !tbaa !5
  %59 = icmp ne ptr %58, null
  br i1 %59, label %60, label %71

60:                                               ; preds = %57
  %61 = load i32, ptr %10, align 4, !tbaa !9
  %62 = load ptr, ptr %18, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.IDABMemRec, ptr %62, i32 0, i32 0
  %64 = load i32, ptr %63, align 8, !tbaa !21
  %65 = icmp eq i32 %61, %64
  br i1 %65, label %66, label %67

66:                                               ; preds = %60
  br label %71

67:                                               ; preds = %60
  %68 = load ptr, ptr %18, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.IDABMemRec, ptr %68, i32 0, i32 17
  %70 = load ptr, ptr %69, align 8, !tbaa !23
  store ptr %70, ptr %18, align 8, !tbaa !5
  br label %57, !llvm.loop !24

71:                                               ; preds = %66, %57
  %72 = load ptr, ptr %18, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.IDABMemRec, ptr %72, i32 0, i32 2
  %74 = load ptr, ptr %73, align 8, !tbaa !26
  store ptr %74, ptr %19, align 8, !tbaa !5
  %75 = load ptr, ptr %18, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.IDABMemRec, ptr %75, i32 0, i32 3
  %77 = load i32, ptr %76, align 8, !tbaa !27
  %78 = icmp ne i32 %77, 0
  br i1 %78, label %81, label %79

79:                                               ; preds = %71
  %80 = load ptr, ptr %16, align 8, !tbaa !5
  call void (ptr, i32, ptr, ptr, ptr, ...) @IDAProcessError(ptr noundef %80, i32 noundef -22, ptr noundef @.str, ptr noundef @.str.28, ptr noundef @.str.29)
  store i32 -22, ptr %8, align 4
  store i32 1, ptr %23, align 4
  br label %148

81:                                               ; preds = %71
  %82 = load ptr, ptr %18, align 8, !tbaa !5
  %83 = load ptr, ptr %17, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.IDAadjMemRec, ptr %83, i32 0, i32 9
  store ptr %82, ptr %84, align 8, !tbaa !28
  %85 = load ptr, ptr %12, align 8, !tbaa !5
  %86 = load ptr, ptr %17, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.IDAadjMemRec, ptr %86, i32 0, i32 31
  %88 = load ptr, ptr %87, align 8, !tbaa !29
  call void @N_VScale(double noundef 1.000000e+00, ptr noundef %85, ptr noundef %88)
  %89 = load ptr, ptr %13, align 8, !tbaa !5
  %90 = load ptr, ptr %17, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.IDAadjMemRec, ptr %90, i32 0, i32 32
  %92 = load ptr, ptr %91, align 8, !tbaa !30
  call void @N_VScale(double noundef 1.000000e+00, ptr noundef %89, ptr noundef %92)
  store i32 0, ptr %21, align 4, !tbaa !9
  br label %93

93:                                               ; preds = %106, %81
  %94 = load i32, ptr %21, align 4, !tbaa !9
  %95 = load ptr, ptr %16, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.IDAMemRec, ptr %95, i32 0, i32 24
  %97 = load i32, ptr %96, align 8, !tbaa !31
  %98 = icmp slt i32 %94, %97
  br i1 %98, label %99, label %109

99:                                               ; preds = %93
  %100 = load ptr, ptr %16, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.IDAMemRec, ptr %100, i32 0, i32 226
  %102 = load ptr, ptr %101, align 8, !tbaa !32
  %103 = load i32, ptr %21, align 4, !tbaa !9
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds double, ptr %102, i64 %104
  store double 1.000000e+00, ptr %105, align 8, !tbaa !11
  br label %106

106:                                              ; preds = %99
  %107 = load i32, ptr %21, align 4, !tbaa !9
  %108 = add nsw i32 %107, 1
  store i32 %108, ptr %21, align 4, !tbaa !9
  br label %93, !llvm.loop !33

109:                                              ; preds = %93
  %110 = load ptr, ptr %16, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.IDAMemRec, ptr %110, i32 0, i32 24
  %112 = load i32, ptr %111, align 8, !tbaa !31
  %113 = load ptr, ptr %16, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.IDAMemRec, ptr %113, i32 0, i32 226
  %115 = load ptr, ptr %114, align 8, !tbaa !32
  %116 = load ptr, ptr %14, align 8, !tbaa !5
  %117 = load ptr, ptr %17, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.IDAadjMemRec, ptr %117, i32 0, i32 33
  %119 = load ptr, ptr %118, align 8, !tbaa !34
  %120 = call i32 @N_VScaleVectorArray(i32 noundef %112, ptr noundef %115, ptr noundef %116, ptr noundef %119)
  store i32 %120, ptr %22, align 4, !tbaa !9
  %121 = load i32, ptr %22, align 4, !tbaa !9
  %122 = icmp ne i32 %121, 0
  br i1 %122, label %123, label %124

123:                                              ; preds = %109
  store i32 -28, ptr %8, align 4
  store i32 1, ptr %23, align 4
  br label %148

124:                                              ; preds = %109
  %125 = load ptr, ptr %16, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.IDAMemRec, ptr %125, i32 0, i32 24
  %127 = load i32, ptr %126, align 8, !tbaa !31
  %128 = load ptr, ptr %16, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.IDAMemRec, ptr %128, i32 0, i32 226
  %130 = load ptr, ptr %129, align 8, !tbaa !32
  %131 = load ptr, ptr %15, align 8, !tbaa !5
  %132 = load ptr, ptr %17, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.IDAadjMemRec, ptr %132, i32 0, i32 34
  %134 = load ptr, ptr %133, align 8, !tbaa !35
  %135 = call i32 @N_VScaleVectorArray(i32 noundef %127, ptr noundef %130, ptr noundef %131, ptr noundef %134)
  store i32 %135, ptr %22, align 4, !tbaa !9
  %136 = load i32, ptr %22, align 4, !tbaa !9
  %137 = icmp ne i32 %136, 0
  br i1 %137, label %138, label %139

138:                                              ; preds = %124
  store i32 -28, ptr %8, align 4
  store i32 1, ptr %23, align 4
  br label %148

139:                                              ; preds = %124
  %140 = load ptr, ptr %17, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.IDAadjMemRec, ptr %140, i32 0, i32 27
  store i32 1, ptr %141, align 8, !tbaa !36
  %142 = load ptr, ptr %19, align 8, !tbaa !5
  %143 = load double, ptr %11, align 8, !tbaa !11
  %144 = call i32 @IDACalcIC(ptr noundef %142, i32 noundef 1, double noundef %143)
  store i32 %144, ptr %20, align 4, !tbaa !9
  %145 = load ptr, ptr %17, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.IDAadjMemRec, ptr %145, i32 0, i32 27
  store i32 0, ptr %146, align 8, !tbaa !36
  %147 = load i32, ptr %20, align 4, !tbaa !9
  store i32 %147, ptr %8, align 4
  store i32 1, ptr %23, align 4
  br label %148

148:                                              ; preds = %139, %138, %123, %79, %51, %43, %33, %26
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  %149 = load i32, ptr %8, align 4
  ret i32 %149
}

declare i32 @N_VScaleVectorArray(i32 noundef, ptr noundef, ptr noundef, ptr noundef) #1

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!14, !10, i64 2056}
!14 = !{!"IDAMemRec", !6, i64 0, !12, i64 8, !6, i64 16, !6, i64 24, !10, i64 32, !12, i64 40, !12, i64 48, !6, i64 56, !10, i64 64, !10, i64 68, !6, i64 72, !6, i64 80, !10, i64 88, !10, i64 92, !10, i64 96, !6, i64 104, !6, i64 112, !10, i64 120, !10, i64 124, !12, i64 128, !12, i64 136, !6, i64 144, !10, i64 152, !10, i64 156, !10, i64 160, !10, i64 164, !6, i64 168, !6, i64 176, !10, i64 184, !6, i64 192, !6, i64 200, !6, i64 208, !10, i64 216, !12, i64 224, !10, i64 232, !10, i64 236, !12, i64 240, !6, i64 248, !6, i64 256, !6, i64 264, !10, i64 272, !6, i64 280, !6, i64 288, !10, i64 296, !10, i64 300, !10, i64 304, !12, i64 312, !6, i64 320, !6, i64 328, !6, i64 336, !7, i64 344, !7, i64 392, !7, i64 440, !7, i64 488, !7, i64 536, !7, i64 584, !6, i64 632, !6, i64 640, !6, i64 648, !6, i64 656, !6, i64 664, !6, i64 672, !6, i64 680, !6, i64 688, !6, i64 696, !6, i64 704, !6, i64 712, !6, i64 720, !6, i64 728, !6, i64 736, !6, i64 744, !6, i64 752, !6, i64 760, !7, i64 768, !6, i64 816, !6, i64 824, !6, i64 832, !6, i64 840, !7, i64 848, !6, i64 896, !6, i64 904, !6, i64 912, !6, i64 920, !6, i64 928, !6, i64 936, !6, i64 944, !6, i64 952, !6, i64 960, !6, i64 968, !6, i64 976, !6, i64 984, !6, i64 992, !6, i64 1000, !6, i64 1008, !6, i64 1016, !7, i64 1024, !6, i64 1072, !6, i64 1080, !6, i64 1088, !6, i64 1096, !6, i64 1104, !12, i64 1112, !6, i64 1120, !6, i64 1128, !10, i64 1136, !10, i64 1140, !10, i64 1144, !10, i64 1148, !10, i64 1152, !10, i64 1156, !10, i64 1160, !10, i64 1164, !12, i64 1168, !12, i64 1176, !12, i64 1184, !10, i64 1192, !12, i64 1200, !10, i64 1208, !10, i64 1212, !10, i64 1216, !10, i64 1220, !10, i64 1224, !12, i64 1232, !12, i64 1240, !12, i64 1248, !12, i64 1256, !12, i64 1264, !12, i64 1272, !12, i64 1280, !12, i64 1288, !12, i64 1296, !12, i64 1304, !12, i64 1312, !12, i64 1320, !12, i64 1328, !12, i64 1336, !12, i64 1344, !12, i64 1352, !12, i64 1360, !10, i64 1368, !10, i64 1372, !10, i64 1376, !10, i64 1380, !15, i64 1384, !12, i64 1392, !15, i64 1400, !15, i64 1408, !15, i64 1416, !15, i64 1424, !15, i64 1432, !15, i64 1440, !15, i64 1448, !15, i64 1456, !15, i64 1464, !15, i64 1472, !15, i64 1480, !15, i64 1488, !15, i64 1496, !15, i64 1504, !15, i64 1512, !15, i64 1520, !15, i64 1528, !15, i64 1536, !15, i64 1544, !15, i64 1552, !15, i64 1560, !15, i64 1568, !15, i64 1576, !15, i64 1584, !12, i64 1592, !6, i64 1600, !6, i64 1608, !6, i64 1616, !10, i64 1624, !10, i64 1628, !10, i64 1632, !10, i64 1636, !10, i64 1640, !10, i64 1644, !10, i64 1648, !10, i64 1652, !10, i64 1656, !10, i64 1660, !10, i64 1664, !10, i64 1668, !10, i64 1672, !6, i64 1680, !10, i64 1688, !6, i64 1696, !10, i64 1704, !6, i64 1712, !10, i64 1720, !6, i64 1728, !6, i64 1736, !6, i64 1744, !6, i64 1752, !6, i64 1760, !6, i64 1768, !10, i64 1776, !10, i64 1780, !6, i64 1784, !6, i64 1792, !6, i64 1800, !6, i64 1808, !6, i64 1816, !6, i64 1824, !6, i64 1832, !10, i64 1840, !10, i64 1844, !6, i64 1848, !10, i64 1856, !6, i64 1864, !6, i64 1872, !12, i64 1880, !12, i64 1888, !12, i64 1896, !6, i64 1904, !6, i64 1912, !6, i64 1920, !12, i64 1928, !12, i64 1936, !10, i64 1944, !10, i64 1948, !15, i64 1952, !6, i64 1960, !10, i64 1968, !6, i64 1976, !7, i64 1984, !6, i64 2024, !6, i64 2032, !10, i64 2040, !6, i64 2048, !10, i64 2056}
!15 = !{!"long", !7, i64 0}
!16 = !{!14, !6, i64 2048}
!17 = !{!18, !10, i64 184}
!18 = !{!"IDAadjMemRec", !12, i64 0, !12, i64 8, !10, i64 16, !10, i64 20, !12, i64 24, !10, i64 32, !12, i64 40, !6, i64 48, !10, i64 56, !6, i64 64, !10, i64 72, !6, i64 80, !6, i64 88, !10, i64 96, !15, i64 104, !15, i64 112, !6, i64 120, !15, i64 128, !10, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !10, i64 176, !10, i64 180, !10, i64 184, !10, i64 188, !10, i64 192, !7, i64 200, !7, i64 248, !7, i64 296, !6, i64 344, !6, i64 352, !6, i64 360, !6, i64 368}
!19 = !{!18, !10, i64 56}
!20 = !{!18, !6, i64 48}
!21 = !{!22, !10, i64 0}
!22 = !{!"IDABMemRec", !10, i64 0, !12, i64 8, !6, i64 16, !10, i64 24, !10, i64 28, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !12, i64 104, !6, i64 112, !6, i64 120, !6, i64 128}
!23 = !{!22, !6, i64 128}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = !{!22, !6, i64 16}
!27 = !{!22, !10, i64 24}
!28 = !{!18, !6, i64 64}
!29 = !{!18, !6, i64 344}
!30 = !{!18, !6, i64 352}
!31 = !{!14, !10, i64 160}
!32 = !{!14, !6, i64 1976}
!33 = distinct !{!33, !25}
!34 = !{!18, !6, i64 360}
!35 = !{!18, !6, i64 368}
!36 = !{!18, !10, i64 192}


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

@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [98 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [50 x i8], align 1

declare void @IDAProcessError(ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ...) local_unnamed_addr #0

declare void @N_VScale(double noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

declare i32 @IDACalcIC(ptr noundef, i32 noundef, double noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local i32 @IDACalcICBS(ptr noundef %0, i32 noundef %1, double noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6) local_unnamed_addr #1 {
  %8 = icmp eq ptr %0, null
  br i1 %8, label %9, label %10

9:                                                ; preds = %7
  tail call void (ptr, i32, ptr, ptr, ptr, ...) @IDAProcessError(ptr noundef null, i32 noundef -20, ptr noundef nonnull @.str, ptr noundef nonnull @.str.28, ptr noundef nonnull @.str.2) #2
  br label %64

10:                                               ; preds = %7
  %11 = getelementptr inbounds i8, ptr %0, i64 2056
  %12 = load i32, ptr %11, align 8, !tbaa !5
  %13 = icmp eq i32 %12, 0
  br i1 %13, label %14, label %15

14:                                               ; preds = %10
  tail call void (ptr, i32, ptr, ptr, ptr, ...) @IDAProcessError(ptr noundef nonnull %0, i32 noundef -101, ptr noundef nonnull @.str, ptr noundef nonnull @.str.28, ptr noundef nonnull @.str.7) #2
  br label %64

15:                                               ; preds = %10
  %16 = getelementptr inbounds i8, ptr %0, i64 2048
  %17 = load ptr, ptr %16, align 8, !tbaa !13
  %18 = getelementptr inbounds i8, ptr %17, i64 184
  %19 = load i32, ptr %18, align 8, !tbaa !14
  %.not = icmp eq i32 %19, 0
  br i1 %.not, label %20, label %21

20:                                               ; preds = %15
  tail call void (ptr, i32, ptr, ptr, ptr, ...) @IDAProcessError(ptr noundef nonnull %0, i32 noundef -22, ptr noundef nonnull @.str, ptr noundef nonnull @.str.28, ptr noundef nonnull @.str.19) #2
  br label %64

21:                                               ; preds = %15
  %22 = getelementptr inbounds i8, ptr %17, i64 56
  %23 = load i32, ptr %22, align 8, !tbaa !16
  %.not49 = icmp sgt i32 %23, %1
  br i1 %.not49, label %25, label %24

24:                                               ; preds = %21
  tail call void (ptr, i32, ptr, ptr, ptr, ...) @IDAProcessError(ptr noundef nonnull %0, i32 noundef -22, ptr noundef nonnull @.str, ptr noundef nonnull @.str.28, ptr noundef nonnull @.str.17) #2
  br label %64

25:                                               ; preds = %21
  %26 = getelementptr inbounds i8, ptr %17, i64 48
  %.04555 = load ptr, ptr %26, align 8, !tbaa !17
  %.not5056 = icmp eq ptr %.04555, null
  br i1 %.not5056, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %25, %29
  %.04557 = phi ptr [ %.045, %29 ], [ %.04555, %25 ]
  %27 = load i32, ptr %.04557, align 8, !tbaa !18
  %28 = icmp eq i32 %27, %1
  br i1 %28, label %._crit_edge, label %29

29:                                               ; preds = %.lr.ph
  %30 = getelementptr inbounds i8, ptr %.04557, i64 128
  %.045 = load ptr, ptr %30, align 8, !tbaa !17
  %.not50 = icmp eq ptr %.045, null
  br i1 %.not50, label %._crit_edge, label %.lr.ph, !llvm.loop !20

._crit_edge:                                      ; preds = %29, %.lr.ph, %25
  %.045.lcssa = phi ptr [ null, %25 ], [ %.04557, %.lr.ph ], [ null, %29 ]
  %31 = getelementptr inbounds i8, ptr %.045.lcssa, i64 16
  %32 = load ptr, ptr %31, align 8, !tbaa !22
  %33 = getelementptr inbounds i8, ptr %.045.lcssa, i64 24
  %34 = load i32, ptr %33, align 8, !tbaa !23
  %.not51 = icmp eq i32 %34, 0
  br i1 %.not51, label %35, label %36

35:                                               ; preds = %._crit_edge
  tail call void (ptr, i32, ptr, ptr, ptr, ...) @IDAProcessError(ptr noundef nonnull %0, i32 noundef -22, ptr noundef nonnull @.str, ptr noundef nonnull @.str.28, ptr noundef nonnull @.str.29) #2
  br label %64

36:                                               ; preds = %._crit_edge
  %37 = getelementptr inbounds i8, ptr %17, i64 64
  store ptr %.045.lcssa, ptr %37, align 8, !tbaa !24
  %38 = getelementptr inbounds i8, ptr %17, i64 344
  %39 = load ptr, ptr %38, align 8, !tbaa !25
  tail call void @N_VScale(double noundef 1.000000e+00, ptr noundef %3, ptr noundef %39) #2
  %40 = getelementptr inbounds i8, ptr %17, i64 352
  %41 = load ptr, ptr %40, align 8, !tbaa !26
  tail call void @N_VScale(double noundef 1.000000e+00, ptr noundef %4, ptr noundef %41) #2
  %42 = getelementptr inbounds i8, ptr %0, i64 160
  %43 = load i32, ptr %42, align 8, !tbaa !27
  %44 = icmp sgt i32 %43, 0
  %45 = getelementptr inbounds i8, ptr %0, i64 1976
  %46 = load ptr, ptr %45, align 8, !tbaa !28
  br i1 %44, label %.lr.ph62, label %._crit_edge63

.lr.ph62:                                         ; preds = %36
  %wide.trip.count = zext nneg i32 %43 to i64
  %min.iters.check = icmp ult i32 %43, 4
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph62
  %n.vec = and i64 %wide.trip.count, 2147483644
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %47 = getelementptr inbounds double, ptr %46, i64 %index
  %48 = getelementptr inbounds i8, ptr %47, i64 16
  store <2 x double> <double 1.000000e+00, double 1.000000e+00>, ptr %47, align 8, !tbaa !29
  store <2 x double> <double 1.000000e+00, double 1.000000e+00>, ptr %48, align 8, !tbaa !29
  %index.next = add nuw i64 %index, 4
  %49 = icmp eq i64 %index.next, %n.vec
  br i1 %49, label %middle.block, label %vector.body, !llvm.loop !30

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %._crit_edge63, label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %middle.block, %.lr.ph62
  %indvars.iv.ph = phi i64 [ 0, %.lr.ph62 ], [ %n.vec, %middle.block ]
  br label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %scalar.ph ], [ %indvars.iv.ph, %scalar.ph.preheader ]
  %50 = getelementptr inbounds double, ptr %46, i64 %indvars.iv
  store double 1.000000e+00, ptr %50, align 8, !tbaa !29
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge63, label %scalar.ph, !llvm.loop !33

._crit_edge63:                                    ; preds = %scalar.ph, %middle.block, %36
  %51 = getelementptr inbounds i8, ptr %17, i64 360
  %52 = load ptr, ptr %51, align 8, !tbaa !34
  %53 = tail call i32 @N_VScaleVectorArray(i32 noundef %43, ptr noundef %46, ptr noundef %5, ptr noundef %52) #2
  %.not52 = icmp eq i32 %53, 0
  br i1 %.not52, label %54, label %64

54:                                               ; preds = %._crit_edge63
  %55 = getelementptr inbounds i8, ptr %0, i64 1976
  %56 = load i32, ptr %42, align 8, !tbaa !27
  %57 = load ptr, ptr %55, align 8, !tbaa !28
  %58 = getelementptr inbounds i8, ptr %17, i64 368
  %59 = load ptr, ptr %58, align 8, !tbaa !35
  %60 = tail call i32 @N_VScaleVectorArray(i32 noundef %56, ptr noundef %57, ptr noundef %6, ptr noundef %59) #2
  %.not53 = icmp eq i32 %60, 0
  br i1 %.not53, label %61, label %64

61:                                               ; preds = %54
  %62 = getelementptr inbounds i8, ptr %17, i64 192
  store i32 1, ptr %62, align 8, !tbaa !36
  %63 = tail call i32 @IDACalcIC(ptr noundef %32, i32 noundef 1, double noundef %2) #2
  store i32 0, ptr %62, align 8, !tbaa !36
  br label %64

64:                                               ; preds = %54, %._crit_edge63, %61, %35, %24, %20, %14, %9
  %.044 = phi i32 [ -20, %9 ], [ -101, %14 ], [ -22, %24 ], [ %63, %61 ], [ -22, %35 ], [ -22, %20 ], [ -28, %._crit_edge63 ], [ -28, %54 ]
  ret i32 %.044
}

declare i32 @N_VScaleVectorArray(i32 noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

attributes #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 = { 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 #2 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !11, i64 2056}
!6 = !{!"IDAMemRec", !7, i64 0, !10, i64 8, !7, i64 16, !7, i64 24, !11, i64 32, !10, i64 40, !10, i64 48, !7, i64 56, !11, i64 64, !11, i64 68, !7, i64 72, !7, i64 80, !11, i64 88, !11, i64 92, !11, i64 96, !7, i64 104, !7, i64 112, !11, i64 120, !11, i64 124, !10, i64 128, !10, i64 136, !7, i64 144, !11, i64 152, !11, i64 156, !11, i64 160, !11, i64 164, !7, i64 168, !7, i64 176, !11, i64 184, !7, i64 192, !7, i64 200, !7, i64 208, !11, i64 216, !10, i64 224, !11, i64 232, !11, i64 236, !10, i64 240, !7, i64 248, !7, i64 256, !7, i64 264, !11, i64 272, !7, i64 280, !7, i64 288, !11, i64 296, !11, i64 300, !11, i64 304, !10, i64 312, !7, i64 320, !7, i64 328, !7, i64 336, !8, i64 344, !8, i64 392, !8, i64 440, !8, i64 488, !8, i64 536, !8, i64 584, !7, i64 632, !7, i64 640, !7, i64 648, !7, i64 656, !7, i64 664, !7, i64 672, !7, i64 680, !7, i64 688, !7, i64 696, !7, i64 704, !7, i64 712, !7, i64 720, !7, i64 728, !7, i64 736, !7, i64 744, !7, i64 752, !7, i64 760, !8, i64 768, !7, i64 816, !7, i64 824, !7, i64 832, !7, i64 840, !8, i64 848, !7, i64 896, !7, i64 904, !7, i64 912, !7, i64 920, !7, i64 928, !7, i64 936, !7, i64 944, !7, i64 952, !7, i64 960, !7, i64 968, !7, i64 976, !7, i64 984, !7, i64 992, !7, i64 1000, !7, i64 1008, !7, i64 1016, !8, i64 1024, !7, i64 1072, !7, i64 1080, !7, i64 1088, !7, i64 1096, !7, i64 1104, !10, i64 1112, !7, i64 1120, !7, i64 1128, !11, i64 1136, !11, i64 1140, !11, i64 1144, !11, i64 1148, !11, i64 1152, !11, i64 1156, !11, i64 1160, !11, i64 1164, !10, i64 1168, !10, i64 1176, !10, i64 1184, !11, i64 1192, !10, i64 1200, !11, i64 1208, !11, i64 1212, !11, i64 1216, !11, i64 1220, !11, i64 1224, !10, i64 1232, !10, i64 1240, !10, i64 1248, !10, i64 1256, !10, i64 1264, !10, i64 1272, !10, i64 1280, !10, i64 1288, !10, i64 1296, !10, i64 1304, !10, i64 1312, !10, i64 1320, !10, i64 1328, !10, i64 1336, !10, i64 1344, !10, i64 1352, !10, i64 1360, !11, i64 1368, !11, i64 1372, !11, i64 1376, !11, i64 1380, !12, i64 1384, !10, i64 1392, !12, i64 1400, !12, i64 1408, !12, i64 1416, !12, i64 1424, !12, i64 1432, !12, i64 1440, !12, i64 1448, !12, i64 1456, !12, i64 1464, !12, i64 1472, !12, i64 1480, !12, i64 1488, !12, i64 1496, !12, i64 1504, !12, i64 1512, !12, i64 1520, !12, i64 1528, !12, i64 1536, !12, i64 1544, !12, i64 1552, !12, i64 1560, !12, i64 1568, !12, i64 1576, !12, i64 1584, !10, i64 1592, !7, i64 1600, !7, i64 1608, !7, i64 1616, !11, i64 1624, !11, i64 1628, !11, i64 1632, !11, i64 1636, !11, i64 1640, !11, i64 1644, !11, i64 1648, !11, i64 1652, !11, i64 1656, !11, i64 1660, !11, i64 1664, !11, i64 1668, !11, i64 1672, !7, i64 1680, !11, i64 1688, !7, i64 1696, !11, i64 1704, !7, i64 1712, !11, i64 1720, !7, i64 1728, !7, i64 1736, !7, i64 1744, !7, i64 1752, !7, i64 1760, !7, i64 1768, !11, i64 1776, !11, i64 1780, !7, i64 1784, !7, i64 1792, !7, i64 1800, !7, i64 1808, !7, i64 1816, !7, i64 1824, !7, i64 1832, !11, i64 1840, !11, i64 1844, !7, i64 1848, !11, i64 1856, !7, i64 1864, !7, i64 1872, !10, i64 1880, !10, i64 1888, !10, i64 1896, !7, i64 1904, !7, i64 1912, !7, i64 1920, !10, i64 1928, !10, i64 1936, !11, i64 1944, !11, i64 1948, !12, i64 1952, !7, i64 1960, !11, i64 1968, !7, i64 1976, !8, i64 1984, !7, i64 2024, !7, i64 2032, !11, i64 2040, !7, i64 2048, !11, i64 2056}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"double", !8, i64 0}
!11 = !{!"int", !8, i64 0}
!12 = !{!"long", !8, i64 0}
!13 = !{!6, !7, i64 2048}
!14 = !{!15, !11, i64 184}
!15 = !{!"IDAadjMemRec", !10, i64 0, !10, i64 8, !11, i64 16, !11, i64 20, !10, i64 24, !11, i64 32, !10, i64 40, !7, i64 48, !11, i64 56, !7, i64 64, !11, i64 72, !7, i64 80, !7, i64 88, !11, i64 96, !12, i64 104, !12, i64 112, !7, i64 120, !12, i64 128, !11, i64 136, !7, i64 144, !7, i64 152, !7, i64 160, !7, i64 168, !11, i64 176, !11, i64 180, !11, i64 184, !11, i64 188, !11, i64 192, !8, i64 200, !8, i64 248, !8, i64 296, !7, i64 344, !7, i64 352, !7, i64 360, !7, i64 368}
!16 = !{!15, !11, i64 56}
!17 = !{!7, !7, i64 0}
!18 = !{!19, !11, i64 0}
!19 = !{!"IDABMemRec", !11, i64 0, !10, i64 8, !7, i64 16, !11, i64 24, !11, i64 28, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !7, i64 80, !7, i64 88, !7, i64 96, !10, i64 104, !7, i64 112, !7, i64 120, !7, i64 128}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = !{!19, !7, i64 16}
!23 = !{!19, !11, i64 24}
!24 = !{!15, !7, i64 64}
!25 = !{!15, !7, i64 344}
!26 = !{!15, !7, i64 352}
!27 = !{!6, !11, i64 160}
!28 = !{!6, !7, i64 1976}
!29 = !{!10, !10, i64 0}
!30 = distinct !{!30, !21, !31, !32}
!31 = !{!"llvm.loop.isvectorized", i32 1}
!32 = !{!"llvm.loop.unroll.runtime.disable"}
!33 = distinct !{!33, !21, !32, !31}
!34 = !{!15, !7, i64 360}
!35 = !{!15, !7, i64 368}
!36 = !{!15, !11, i64 192}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,SROAPass,SimplifyCFGPass,TailCallElimPass