; LLVM IR from CLASS-SZ/class_sz :: class-sz/source (nonlinear)

; 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.perturbs = type { i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i32, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i32, i32, i32, i32, double, i32, i32, [100 x double], [100 x double], i32, i32, i32, i32, i32, double, i32, i32, [30 x double], double, double, double, ptr, ptr, i32, i16, i16, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, double, double, ptr, i32, double, double, double, ptr, ptr, ptr, ptr, ptr, ptr, i32, ptr, ptr, ptr, [8000 x i8], [8000 x i8], [8000 x i8], i32, i32, i32, [30 x ptr], [30 x ptr], [30 x ptr], [30 x i32], [30 x i32], [30 x i32], i16, [2048 x i8] }
%struct.nonlinear = type { i32, i32, i32, double, double, double, i16, i32, i32, i32, ptr, i16, i16, i32, i32, i32, i32, i32, i16, i32, ptr, ptr, ptr, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, ptr, ptr, ptr, i32, i32, i32, i32, i32, ptr, ptr, ptr, i16, [2048 x i8] }

@.str.3 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.110 = external hidden unnamed_addr constant [12 x i8], align 1
@__func__.nonlinear_get_tau_list = external hidden unnamed_addr constant [23 x i8], align 1
@.str.111 = external hidden unnamed_addr constant [9 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 @class_protect_sprintf(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

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #2

; Function Attrs: nounwind uwtable
define dso_local i32 @nonlinear_get_tau_list(ptr noundef %0, ptr noundef %1) #3 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca [2048 x i8], align 16
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca [2048 x i8], align 16
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  %12 = load ptr, ptr %4, align 8, !tbaa !5
  %13 = getelementptr inbounds %struct.perturbs, ptr %12, i32 0, i32 169
  %14 = load i32, ptr %13, align 8, !tbaa !9
  %15 = load ptr, ptr %5, align 8, !tbaa !5
  %16 = getelementptr inbounds %struct.nonlinear, ptr %15, i32 0, i32 23
  store i32 %14, ptr %16, align 8, !tbaa !14
  %17 = load ptr, ptr %4, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.perturbs, ptr %17, i32 0, i32 169
  %19 = load i32, ptr %18, align 8, !tbaa !9
  %20 = icmp sgt i32 %19, 1
  br i1 %20, label %21, label %72

21:                                               ; preds = %2
  %22 = load ptr, ptr %5, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.nonlinear, ptr %22, i32 0, i32 23
  %24 = load i32, ptr %23, align 8, !tbaa !14
  %25 = sext i32 %24 to i64
  %26 = mul i64 %25, 8
  %27 = call noalias ptr @malloc(i64 noundef %26) #5
  %28 = load ptr, ptr %5, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.nonlinear, ptr %28, i32 0, i32 22
  store ptr %27, ptr %29, align 8, !tbaa !16
  %30 = load ptr, ptr %5, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.nonlinear, ptr %30, i32 0, i32 22
  %32 = load ptr, ptr %31, align 8, !tbaa !16
  %33 = icmp eq ptr %32, null
  br i1 %33, label %34, label %47

34:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  %35 = load ptr, ptr %5, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.nonlinear, ptr %35, i32 0, i32 23
  %37 = load i32, ptr %36, align 8, !tbaa !14
  %38 = sext i32 %37 to i64
  %39 = mul i64 %38, 8
  %40 = trunc i64 %39 to i32
  store i32 %40, ptr %7, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 2048, ptr %8) #4
  %41 = getelementptr inbounds [2048 x i8], ptr %8, i64 0, i64 0
  %42 = load i32, ptr %7, align 4, !tbaa !17
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef %41, ptr noundef @.str.15, ptr noundef @.str.110, i32 noundef %42)
  %43 = load ptr, ptr %5, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.nonlinear, ptr %43, i32 0, i32 45
  %45 = getelementptr inbounds [2048 x i8], ptr %44, i64 0, i64 0
  %46 = getelementptr inbounds [2048 x i8], ptr %8, i64 0, i64 0
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef %45, ptr noundef @.str.3, ptr noundef @__func__.nonlinear_get_tau_list, i32 noundef 1944, ptr noundef %46)
  call void @llvm.lifetime.end.p0(i64 2048, ptr %8) #4
  store i32 1, ptr %3, align 4
  store i32 1, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  br label %134

47:                                               ; preds = %21
  store i32 0, ptr %6, align 4, !tbaa !17
  br label %48

48:                                               ; preds = %68, %47
  %49 = load i32, ptr %6, align 4, !tbaa !17
  %50 = load ptr, ptr %5, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.nonlinear, ptr %50, i32 0, i32 23
  %52 = load i32, ptr %51, align 8, !tbaa !14
  %53 = icmp slt i32 %49, %52
  br i1 %53, label %54, label %71

54:                                               ; preds = %48
  %55 = load ptr, ptr %4, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.perturbs, ptr %55, i32 0, i32 168
  %57 = load ptr, ptr %56, align 8, !tbaa !18
  %58 = load i32, ptr %6, align 4, !tbaa !17
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds double, ptr %57, i64 %59
  %61 = load double, ptr %60, align 8, !tbaa !19
  %62 = load ptr, ptr %5, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.nonlinear, ptr %62, i32 0, i32 22
  %64 = load ptr, ptr %63, align 8, !tbaa !16
  %65 = load i32, ptr %6, align 4, !tbaa !17
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds double, ptr %64, i64 %66
  store double %61, ptr %67, align 8, !tbaa !19
  br label %68

68:                                               ; preds = %54
  %69 = load i32, ptr %6, align 4, !tbaa !17
  %70 = add nsw i32 %69, 1
  store i32 %70, ptr %6, align 4, !tbaa !17
  br label %48, !llvm.loop !20

71:                                               ; preds = %48
  br label %72

72:                                               ; preds = %71, %2
  %73 = load ptr, ptr %5, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.nonlinear, ptr %73, i32 0, i32 0
  %75 = load i32, ptr %74, align 8, !tbaa !22
  %76 = icmp ugt i32 %75, 0
  br i1 %76, label %77, label %133

77:                                               ; preds = %72
  %78 = load ptr, ptr %4, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.perturbs, ptr %78, i32 0, i32 159
  %80 = load i32, ptr %79, align 8, !tbaa !23
  %81 = load ptr, ptr %5, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.nonlinear, ptr %81, i32 0, i32 32
  store i32 %80, ptr %82, align 4, !tbaa !24
  %83 = load ptr, ptr %5, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.nonlinear, ptr %83, i32 0, i32 32
  %85 = load i32, ptr %84, align 4, !tbaa !24
  %86 = sext i32 %85 to i64
  %87 = mul i64 %86, 8
  %88 = call noalias ptr @malloc(i64 noundef %87) #5
  %89 = load ptr, ptr %5, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.nonlinear, ptr %89, i32 0, i32 33
  store ptr %88, ptr %90, align 8, !tbaa !25
  %91 = load ptr, ptr %5, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.nonlinear, ptr %91, i32 0, i32 33
  %93 = load ptr, ptr %92, align 8, !tbaa !25
  %94 = icmp eq ptr %93, null
  br i1 %94, label %95, label %108

95:                                               ; preds = %77
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  %96 = load ptr, ptr %5, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.nonlinear, ptr %96, i32 0, i32 32
  %98 = load i32, ptr %97, align 4, !tbaa !24
  %99 = sext i32 %98 to i64
  %100 = mul i64 %99, 8
  %101 = trunc i64 %100 to i32
  store i32 %101, ptr %10, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 2048, ptr %11) #4
  %102 = getelementptr inbounds [2048 x i8], ptr %11, i64 0, i64 0
  %103 = load i32, ptr %10, align 4, !tbaa !17
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef %102, ptr noundef @.str.15, ptr noundef @.str.111, i32 noundef %103)
  %104 = load ptr, ptr %5, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.nonlinear, ptr %104, i32 0, i32 45
  %106 = getelementptr inbounds [2048 x i8], ptr %105, i64 0, i64 0
  %107 = getelementptr inbounds [2048 x i8], ptr %11, i64 0, i64 0
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef %106, ptr noundef @.str.3, ptr noundef @__func__.nonlinear_get_tau_list, i32 noundef 1956, ptr noundef %107)
  call void @llvm.lifetime.end.p0(i64 2048, ptr %11) #4
  store i32 1, ptr %3, align 4
  store i32 1, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  br label %134

108:                                              ; preds = %77
  store i32 0, ptr %6, align 4, !tbaa !17
  br label %109

109:                                              ; preds = %129, %108
  %110 = load i32, ptr %6, align 4, !tbaa !17
  %111 = load ptr, ptr %5, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.nonlinear, ptr %111, i32 0, i32 32
  %113 = load i32, ptr %112, align 4, !tbaa !24
  %114 = icmp slt i32 %110, %113
  br i1 %114, label %115, label %132

115:                                              ; preds = %109
  %116 = load ptr, ptr %4, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.perturbs, ptr %116, i32 0, i32 158
  %118 = load ptr, ptr %117, align 8, !tbaa !26
  %119 = load i32, ptr %6, align 4, !tbaa !17
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds double, ptr %118, i64 %120
  %122 = load double, ptr %121, align 8, !tbaa !19
  %123 = load ptr, ptr %5, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.nonlinear, ptr %123, i32 0, i32 33
  %125 = load ptr, ptr %124, align 8, !tbaa !25
  %126 = load i32, ptr %6, align 4, !tbaa !17
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds double, ptr %125, i64 %127
  store double %122, ptr %128, align 8, !tbaa !19
  br label %129

129:                                              ; preds = %115
  %130 = load i32, ptr %6, align 4, !tbaa !17
  %131 = add nsw i32 %130, 1
  store i32 %131, ptr %6, align 4, !tbaa !17
  br label %109, !llvm.loop !27

132:                                              ; preds = %109
  br label %133

133:                                              ; preds = %132, %72
  store i32 0, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %134

134:                                              ; preds = %133, %95, %34
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  %135 = load i32, ptr %3, align 4
  ret i32 %135
}

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 allocsize(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 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 #4 = { nounwind }
attributes #5 = { nounwind allocsize(0) }

!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, !12, i64 2480}
!10 = !{!"perturbs", !11, i64 0, !11, i64 2, !11, i64 4, !11, i64 6, !11, i64 8, !11, i64 10, !11, i64 12, !11, i64 14, !11, i64 16, !11, i64 18, !11, i64 20, !12, i64 24, !11, i64 28, !11, i64 30, !11, i64 32, !11, i64 34, !11, i64 36, !11, i64 38, !11, i64 40, !11, i64 42, !11, i64 44, !11, i64 46, !11, i64 48, !11, i64 50, !11, i64 52, !11, i64 54, !11, i64 56, !11, i64 58, !11, i64 60, !12, i64 64, !12, i64 68, !12, i64 72, !12, i64 76, !13, i64 80, !12, i64 88, !12, i64 92, !7, i64 96, !7, i64 896, !12, i64 1696, !12, i64 1700, !12, i64 1704, !12, i64 1708, !12, i64 1712, !13, i64 1720, !12, i64 1728, !12, i64 1732, !7, i64 1736, !13, i64 1976, !13, i64 1984, !13, i64 1992, !6, i64 2000, !6, i64 2008, !12, i64 2016, !11, i64 2020, !11, i64 2022, !12, i64 2024, !12, i64 2028, !12, i64 2032, !12, i64 2036, !12, i64 2040, !12, i64 2044, !12, i64 2048, !12, i64 2052, !12, i64 2056, !12, i64 2060, !12, i64 2064, !6, i64 2072, !11, i64 2080, !11, i64 2082, !11, i64 2084, !11, i64 2086, !11, i64 2088, !11, i64 2090, !11, i64 2092, !11, i64 2094, !11, i64 2096, !11, i64 2098, !11, i64 2100, !11, i64 2102, !11, i64 2104, !11, i64 2106, !11, i64 2108, !11, i64 2110, !11, i64 2112, !11, i64 2114, !11, i64 2116, !11, i64 2118, !11, i64 2120, !11, i64 2122, !11, i64 2124, !11, i64 2126, !11, i64 2128, !11, i64 2130, !11, i64 2132, !11, i64 2134, !11, i64 2136, !11, i64 2138, !11, i64 2140, !11, i64 2142, !11, i64 2144, !11, i64 2146, !11, i64 2148, !11, i64 2150, !11, i64 2152, !11, i64 2154, !11, i64 2156, !11, i64 2158, !12, i64 2160, !12, i64 2164, !12, i64 2168, !12, i64 2172, !12, i64 2176, !12, i64 2180, !12, i64 2184, !12, i64 2188, !12, i64 2192, !12, i64 2196, !12, i64 2200, !12, i64 2204, !12, i64 2208, !12, i64 2212, !12, i64 2216, !12, i64 2220, !12, i64 2224, !12, i64 2228, !12, i64 2232, !12, i64 2236, !12, i64 2240, !12, i64 2244, !12, i64 2248, !12, i64 2252, !12, i64 2256, !12, i64 2260, !12, i64 2264, !12, i64 2268, !12, i64 2272, !12, i64 2276, !12, i64 2280, !12, i64 2284, !12, i64 2288, !12, i64 2292, !12, i64 2296, !12, i64 2300, !12, i64 2304, !12, i64 2308, !12, i64 2312, !12, i64 2316, !12, i64 2320, !12, i64 2324, !12, i64 2328, !12, i64 2332, !6, i64 2336, !6, i64 2344, !6, i64 2352, !6, i64 2360, !6, i64 2368, !13, i64 2376, !13, i64 2384, !6, i64 2392, !12, i64 2400, !13, i64 2408, !13, i64 2416, !13, i64 2424, !6, i64 2432, !6, i64 2440, !6, i64 2448, !6, i64 2456, !6, i64 2464, !6, i64 2472, !12, i64 2480, !6, i64 2488, !6, i64 2496, !6, i64 2504, !7, i64 2512, !7, i64 10512, !7, i64 18512, !12, i64 26512, !12, i64 26516, !12, i64 26520, !7, i64 26528, !7, i64 26768, !7, i64 27008, !7, i64 27248, !7, i64 27368, !7, i64 27488, !11, i64 27608, !7, i64 27610}
!11 = !{!"short", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!"double", !7, i64 0}
!14 = !{!15, !12, i64 120}
!15 = !{!"nonlinear", !12, i64 0, !12, i64 4, !12, i64 8, !13, i64 16, !13, i64 24, !13, i64 32, !11, i64 40, !12, i64 44, !12, i64 48, !12, i64 52, !6, i64 56, !11, i64 64, !11, i64 66, !12, i64 68, !12, i64 72, !12, i64 76, !12, i64 80, !12, i64 84, !11, i64 88, !12, i64 92, !6, i64 96, !6, i64 104, !6, i64 112, !12, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !12, i64 184, !12, i64 188, !6, i64 192, !6, i64 200, !6, i64 208, !12, i64 216, !12, i64 220, !12, i64 224, !12, i64 228, !12, i64 232, !6, i64 240, !6, i64 248, !6, i64 256, !11, i64 264, !7, i64 266}
!16 = !{!15, !6, i64 112}
!17 = !{!12, !12, i64 0}
!18 = !{!10, !6, i64 2472}
!19 = !{!13, !13, i64 0}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = !{!15, !12, i64 0}
!23 = !{!10, !12, i64 2400}
!24 = !{!15, !12, i64 188}
!25 = !{!15, !6, i64 192}
!26 = !{!10, !6, i64 2392}
!27 = distinct !{!27, !21}


; 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.3 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.110 = external hidden unnamed_addr constant [12 x i8], align 1
@__func__.nonlinear_get_tau_list = external hidden unnamed_addr constant [23 x i8], align 1
@.str.111 = external hidden unnamed_addr constant [9 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

declare void @class_protect_sprintf(ptr noundef, ptr noundef, ...) local_unnamed_addr #1

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

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @nonlinear_get_tau_list(ptr nocapture noundef readonly %0, ptr noundef %1) local_unnamed_addr #3 {
  %3 = alloca [2048 x i8], align 16
  %4 = alloca [2048 x i8], align 16
  %5 = getelementptr inbounds i8, ptr %0, i64 2480
  %6 = load i32, ptr %5, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %1, i64 120
  store i32 %6, ptr %7, align 8, !tbaa !13
  %8 = icmp sgt i32 %6, 1
  br i1 %8, label %9, label %.loopexit34

9:                                                ; preds = %2
  %10 = zext nneg i32 %6 to i64
  %11 = shl nuw nsw i64 %10, 3
  %12 = tail call noalias ptr @malloc(i64 noundef %11) #4
  %13 = getelementptr inbounds i8, ptr %1, i64 112
  store ptr %12, ptr %13, align 8, !tbaa !15
  %14 = icmp eq ptr %12, null
  br i1 %14, label %30, label %.lr.ph

.lr.ph:                                           ; preds = %9
  %15 = ptrtoint ptr %12 to i64
  %16 = getelementptr inbounds i8, ptr %0, i64 2472
  %17 = load ptr, ptr %16, align 8, !tbaa !16
  %min.iters.check = icmp ult i32 %6, 6
  %18 = ptrtoint ptr %17 to i64
  %19 = sub i64 %15, %18
  %diff.check = icmp ult i64 %19, 32
  %or.cond = select i1 %min.iters.check, i1 true, i1 %diff.check
  br i1 %or.cond, label %scalar.ph.preheader, label %vector.ph

scalar.ph.preheader:                              ; preds = %middle.block, %.lr.ph
  %indvars.iv.ph = phi i64 [ 0, %.lr.ph ], [ %n.vec, %middle.block ]
  %xtraiter = and i64 %10, 3
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol

scalar.ph.prol:                                   ; preds = %scalar.ph.preheader, %scalar.ph.prol
  %indvars.iv.prol = phi i64 [ %indvars.iv.next.prol, %scalar.ph.prol ], [ %indvars.iv.ph, %scalar.ph.preheader ]
  %prol.iter = phi i64 [ %prol.iter.next, %scalar.ph.prol ], [ 0, %scalar.ph.preheader ]
  %20 = getelementptr inbounds double, ptr %17, i64 %indvars.iv.prol
  %21 = load double, ptr %20, align 8, !tbaa !17
  %22 = getelementptr inbounds double, ptr %12, i64 %indvars.iv.prol
  store double %21, ptr %22, align 8, !tbaa !17
  %indvars.iv.next.prol = add nuw nsw i64 %indvars.iv.prol, 1
  %prol.iter.next = add i64 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter
  br i1 %prol.iter.cmp.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol, !llvm.loop !18

scalar.ph.prol.loopexit:                          ; preds = %scalar.ph.prol, %scalar.ph.preheader
  %indvars.iv.unr = phi i64 [ %indvars.iv.ph, %scalar.ph.preheader ], [ %indvars.iv.next.prol, %scalar.ph.prol ]
  %23 = sub nsw i64 %indvars.iv.ph, %10
  %24 = icmp ugt i64 %23, -4
  br i1 %24, label %.loopexit34, label %scalar.ph

vector.ph:                                        ; preds = %.lr.ph
  %n.vec = and i64 %10, 2147483644
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %25 = getelementptr inbounds double, ptr %17, i64 %index
  %26 = getelementptr inbounds i8, ptr %25, i64 16
  %wide.load = load <2 x double>, ptr %25, align 8, !tbaa !17
  %wide.load44 = load <2 x double>, ptr %26, align 8, !tbaa !17
  %27 = getelementptr inbounds double, ptr %12, i64 %index
  %28 = getelementptr inbounds i8, ptr %27, i64 16
  store <2 x double> %wide.load, ptr %27, align 8, !tbaa !17
  store <2 x double> %wide.load44, ptr %28, align 8, !tbaa !17
  %index.next = add nuw i64 %index, 4
  %29 = icmp eq i64 %index.next, %n.vec
  br i1 %29, label %middle.block, label %vector.body, !llvm.loop !20

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %10
  br i1 %cmp.n, label %.loopexit34, label %scalar.ph.preheader

30:                                               ; preds = %9
  %31 = shl i32 %6, 3
  call void @llvm.lifetime.start.p0(i64 2048, ptr nonnull %3) #5
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef nonnull %3, ptr noundef nonnull @.str.15, ptr noundef nonnull @.str.110, i32 noundef %31) #5
  %32 = getelementptr inbounds i8, ptr %1, i64 266
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef nonnull %32, ptr noundef nonnull @.str.3, ptr noundef nonnull @__func__.nonlinear_get_tau_list, i32 noundef 1944, ptr noundef nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 2048, ptr nonnull %3) #5
  br label %.loopexit

scalar.ph:                                        ; preds = %scalar.ph.prol.loopexit, %scalar.ph
  %indvars.iv = phi i64 [ %indvars.iv.next.3, %scalar.ph ], [ %indvars.iv.unr, %scalar.ph.prol.loopexit ]
  %33 = getelementptr inbounds double, ptr %17, i64 %indvars.iv
  %34 = load double, ptr %33, align 8, !tbaa !17
  %35 = getelementptr inbounds double, ptr %12, i64 %indvars.iv
  store double %34, ptr %35, align 8, !tbaa !17
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %36 = getelementptr inbounds double, ptr %17, i64 %indvars.iv.next
  %37 = load double, ptr %36, align 8, !tbaa !17
  %38 = getelementptr inbounds double, ptr %12, i64 %indvars.iv.next
  store double %37, ptr %38, align 8, !tbaa !17
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %39 = getelementptr inbounds double, ptr %17, i64 %indvars.iv.next.1
  %40 = load double, ptr %39, align 8, !tbaa !17
  %41 = getelementptr inbounds double, ptr %12, i64 %indvars.iv.next.1
  store double %40, ptr %41, align 8, !tbaa !17
  %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv, 3
  %42 = getelementptr inbounds double, ptr %17, i64 %indvars.iv.next.2
  %43 = load double, ptr %42, align 8, !tbaa !17
  %44 = getelementptr inbounds double, ptr %12, i64 %indvars.iv.next.2
  store double %43, ptr %44, align 8, !tbaa !17
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
  %exitcond.not.3 = icmp eq i64 %indvars.iv.next.3, %10
  br i1 %exitcond.not.3, label %.loopexit34, label %scalar.ph, !llvm.loop !24

.loopexit34:                                      ; preds = %scalar.ph.prol.loopexit, %scalar.ph, %middle.block, %2
  %45 = load i32, ptr %1, align 8, !tbaa !25
  %.not = icmp eq i32 %45, 0
  br i1 %.not, label %.loopexit, label %46

46:                                               ; preds = %.loopexit34
  %47 = getelementptr inbounds i8, ptr %0, i64 2400
  %48 = load i32, ptr %47, align 8, !tbaa !26
  %49 = getelementptr inbounds i8, ptr %1, i64 188
  store i32 %48, ptr %49, align 4, !tbaa !27
  %50 = sext i32 %48 to i64
  %51 = shl nsw i64 %50, 3
  %52 = tail call noalias ptr @malloc(i64 noundef %51) #4
  %53 = ptrtoint ptr %52 to i64
  %54 = getelementptr inbounds i8, ptr %1, i64 192
  store ptr %52, ptr %54, align 8, !tbaa !28
  %55 = icmp eq ptr %52, null
  br i1 %55, label %71, label %.preheader

.preheader:                                       ; preds = %46
  %56 = icmp sgt i32 %48, 0
  br i1 %56, label %.lr.ph37, label %.loopexit

.lr.ph37:                                         ; preds = %.preheader
  %57 = getelementptr inbounds i8, ptr %0, i64 2392
  %58 = load ptr, ptr %57, align 8, !tbaa !29
  %wide.trip.count42 = zext nneg i32 %48 to i64
  %min.iters.check49 = icmp ult i32 %48, 6
  %59 = ptrtoint ptr %58 to i64
  %60 = sub i64 %53, %59
  %diff.check46 = icmp ult i64 %60, 32
  %or.cond62 = select i1 %min.iters.check49, i1 true, i1 %diff.check46
  br i1 %or.cond62, label %scalar.ph48.preheader, label %vector.ph50

scalar.ph48.preheader:                            ; preds = %middle.block47, %.lr.ph37
  %indvars.iv39.ph = phi i64 [ 0, %.lr.ph37 ], [ %n.vec52, %middle.block47 ]
  %xtraiter63 = and i64 %wide.trip.count42, 3
  %lcmp.mod64.not = icmp eq i64 %xtraiter63, 0
  br i1 %lcmp.mod64.not, label %scalar.ph48.prol.loopexit, label %scalar.ph48.prol

scalar.ph48.prol:                                 ; preds = %scalar.ph48.preheader, %scalar.ph48.prol
  %indvars.iv39.prol = phi i64 [ %indvars.iv.next40.prol, %scalar.ph48.prol ], [ %indvars.iv39.ph, %scalar.ph48.preheader ]
  %prol.iter65 = phi i64 [ %prol.iter65.next, %scalar.ph48.prol ], [ 0, %scalar.ph48.preheader ]
  %61 = getelementptr inbounds double, ptr %58, i64 %indvars.iv39.prol
  %62 = load double, ptr %61, align 8, !tbaa !17
  %63 = getelementptr inbounds double, ptr %52, i64 %indvars.iv39.prol
  store double %62, ptr %63, align 8, !tbaa !17
  %indvars.iv.next40.prol = add nuw nsw i64 %indvars.iv39.prol, 1
  %prol.iter65.next = add i64 %prol.iter65, 1
  %prol.iter65.cmp.not = icmp eq i64 %prol.iter65.next, %xtraiter63
  br i1 %prol.iter65.cmp.not, label %scalar.ph48.prol.loopexit, label %scalar.ph48.prol, !llvm.loop !30

scalar.ph48.prol.loopexit:                        ; preds = %scalar.ph48.prol, %scalar.ph48.preheader
  %indvars.iv39.unr = phi i64 [ %indvars.iv39.ph, %scalar.ph48.preheader ], [ %indvars.iv.next40.prol, %scalar.ph48.prol ]
  %64 = sub nsw i64 %indvars.iv39.ph, %wide.trip.count42
  %65 = icmp ugt i64 %64, -4
  br i1 %65, label %.loopexit, label %scalar.ph48

vector.ph50:                                      ; preds = %.lr.ph37
  %n.vec52 = and i64 %wide.trip.count42, 2147483644
  br label %vector.body54

vector.body54:                                    ; preds = %vector.body54, %vector.ph50
  %index55 = phi i64 [ 0, %vector.ph50 ], [ %index.next58, %vector.body54 ]
  %66 = getelementptr inbounds double, ptr %58, i64 %index55
  %67 = getelementptr inbounds i8, ptr %66, i64 16
  %wide.load56 = load <2 x double>, ptr %66, align 8, !tbaa !17
  %wide.load57 = load <2 x double>, ptr %67, align 8, !tbaa !17
  %68 = getelementptr inbounds double, ptr %52, i64 %index55
  %69 = getelementptr inbounds i8, ptr %68, i64 16
  store <2 x double> %wide.load56, ptr %68, align 8, !tbaa !17
  store <2 x double> %wide.load57, ptr %69, align 8, !tbaa !17
  %index.next58 = add nuw i64 %index55, 4
  %70 = icmp eq i64 %index.next58, %n.vec52
  br i1 %70, label %middle.block47, label %vector.body54, !llvm.loop !31

middle.block47:                                   ; preds = %vector.body54
  %cmp.n59 = icmp eq i64 %n.vec52, %wide.trip.count42
  br i1 %cmp.n59, label %.loopexit, label %scalar.ph48.preheader

71:                                               ; preds = %46
  %72 = shl i32 %48, 3
  call void @llvm.lifetime.start.p0(i64 2048, ptr nonnull %4) #5
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef nonnull %4, ptr noundef nonnull @.str.15, ptr noundef nonnull @.str.111, i32 noundef %72) #5
  %73 = getelementptr inbounds i8, ptr %1, i64 266
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef nonnull %73, ptr noundef nonnull @.str.3, ptr noundef nonnull @__func__.nonlinear_get_tau_list, i32 noundef 1956, ptr noundef nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 2048, ptr nonnull %4) #5
  br label %.loopexit

scalar.ph48:                                      ; preds = %scalar.ph48.prol.loopexit, %scalar.ph48
  %indvars.iv39 = phi i64 [ %indvars.iv.next40.3, %scalar.ph48 ], [ %indvars.iv39.unr, %scalar.ph48.prol.loopexit ]
  %74 = getelementptr inbounds double, ptr %58, i64 %indvars.iv39
  %75 = load double, ptr %74, align 8, !tbaa !17
  %76 = getelementptr inbounds double, ptr %52, i64 %indvars.iv39
  store double %75, ptr %76, align 8, !tbaa !17
  %indvars.iv.next40 = add nuw nsw i64 %indvars.iv39, 1
  %77 = getelementptr inbounds double, ptr %58, i64 %indvars.iv.next40
  %78 = load double, ptr %77, align 8, !tbaa !17
  %79 = getelementptr inbounds double, ptr %52, i64 %indvars.iv.next40
  store double %78, ptr %79, align 8, !tbaa !17
  %indvars.iv.next40.1 = add nuw nsw i64 %indvars.iv39, 2
  %80 = getelementptr inbounds double, ptr %58, i64 %indvars.iv.next40.1
  %81 = load double, ptr %80, align 8, !tbaa !17
  %82 = getelementptr inbounds double, ptr %52, i64 %indvars.iv.next40.1
  store double %81, ptr %82, align 8, !tbaa !17
  %indvars.iv.next40.2 = add nuw nsw i64 %indvars.iv39, 3
  %83 = getelementptr inbounds double, ptr %58, i64 %indvars.iv.next40.2
  %84 = load double, ptr %83, align 8, !tbaa !17
  %85 = getelementptr inbounds double, ptr %52, i64 %indvars.iv.next40.2
  store double %84, ptr %85, align 8, !tbaa !17
  %indvars.iv.next40.3 = add nuw nsw i64 %indvars.iv39, 4
  %exitcond43.not.3 = icmp eq i64 %indvars.iv.next40.3, %wide.trip.count42
  br i1 %exitcond43.not.3, label %.loopexit, label %scalar.ph48, !llvm.loop !32

.loopexit:                                        ; preds = %scalar.ph48.prol.loopexit, %scalar.ph48, %middle.block47, %.preheader, %.loopexit34, %71, %30
  %.0 = phi i32 [ 1, %30 ], [ 1, %71 ], [ 0, %.loopexit34 ], [ 0, %.preheader ], [ 0, %middle.block47 ], [ 0, %scalar.ph48 ], [ 0, %scalar.ph48.prol.loopexit ]
  ret i32 %.0
}

attributes #0 = { mustprogress 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 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 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 #4 = { nounwind allocsize(0) }
attributes #5 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !10, i64 2480}
!6 = !{!"perturbs", !7, i64 0, !7, i64 2, !7, i64 4, !7, i64 6, !7, i64 8, !7, i64 10, !7, i64 12, !7, i64 14, !7, i64 16, !7, i64 18, !7, i64 20, !10, i64 24, !7, i64 28, !7, i64 30, !7, i64 32, !7, i64 34, !7, i64 36, !7, i64 38, !7, i64 40, !7, i64 42, !7, i64 44, !7, i64 46, !7, i64 48, !7, i64 50, !7, i64 52, !7, i64 54, !7, i64 56, !7, i64 58, !7, i64 60, !10, i64 64, !10, i64 68, !10, i64 72, !10, i64 76, !11, i64 80, !10, i64 88, !10, i64 92, !8, i64 96, !8, i64 896, !10, i64 1696, !10, i64 1700, !10, i64 1704, !10, i64 1708, !10, i64 1712, !11, i64 1720, !10, i64 1728, !10, i64 1732, !8, i64 1736, !11, i64 1976, !11, i64 1984, !11, i64 1992, !12, i64 2000, !12, i64 2008, !10, i64 2016, !7, i64 2020, !7, i64 2022, !10, i64 2024, !10, i64 2028, !10, i64 2032, !10, i64 2036, !10, i64 2040, !10, i64 2044, !10, i64 2048, !10, i64 2052, !10, i64 2056, !10, i64 2060, !10, i64 2064, !12, i64 2072, !7, i64 2080, !7, i64 2082, !7, i64 2084, !7, i64 2086, !7, i64 2088, !7, i64 2090, !7, i64 2092, !7, i64 2094, !7, i64 2096, !7, i64 2098, !7, i64 2100, !7, i64 2102, !7, i64 2104, !7, i64 2106, !7, i64 2108, !7, i64 2110, !7, i64 2112, !7, i64 2114, !7, i64 2116, !7, i64 2118, !7, i64 2120, !7, i64 2122, !7, i64 2124, !7, i64 2126, !7, i64 2128, !7, i64 2130, !7, i64 2132, !7, i64 2134, !7, i64 2136, !7, i64 2138, !7, i64 2140, !7, i64 2142, !7, i64 2144, !7, i64 2146, !7, i64 2148, !7, i64 2150, !7, i64 2152, !7, i64 2154, !7, i64 2156, !7, i64 2158, !10, i64 2160, !10, i64 2164, !10, i64 2168, !10, i64 2172, !10, i64 2176, !10, i64 2180, !10, i64 2184, !10, i64 2188, !10, i64 2192, !10, i64 2196, !10, i64 2200, !10, i64 2204, !10, i64 2208, !10, i64 2212, !10, i64 2216, !10, i64 2220, !10, i64 2224, !10, i64 2228, !10, i64 2232, !10, i64 2236, !10, i64 2240, !10, i64 2244, !10, i64 2248, !10, i64 2252, !10, i64 2256, !10, i64 2260, !10, i64 2264, !10, i64 2268, !10, i64 2272, !10, i64 2276, !10, i64 2280, !10, i64 2284, !10, i64 2288, !10, i64 2292, !10, i64 2296, !10, i64 2300, !10, i64 2304, !10, i64 2308, !10, i64 2312, !10, i64 2316, !10, i64 2320, !10, i64 2324, !10, i64 2328, !10, i64 2332, !12, i64 2336, !12, i64 2344, !12, i64 2352, !12, i64 2360, !12, i64 2368, !11, i64 2376, !11, i64 2384, !12, i64 2392, !10, i64 2400, !11, i64 2408, !11, i64 2416, !11, i64 2424, !12, i64 2432, !12, i64 2440, !12, i64 2448, !12, i64 2456, !12, i64 2464, !12, i64 2472, !10, i64 2480, !12, i64 2488, !12, i64 2496, !12, i64 2504, !8, i64 2512, !8, i64 10512, !8, i64 18512, !10, i64 26512, !10, i64 26516, !10, i64 26520, !8, i64 26528, !8, i64 26768, !8, i64 27008, !8, i64 27248, !8, i64 27368, !8, i64 27488, !7, i64 27608, !8, i64 27610}
!7 = !{!"short", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"double", !8, i64 0}
!12 = !{!"any pointer", !8, i64 0}
!13 = !{!14, !10, i64 120}
!14 = !{!"nonlinear", !10, i64 0, !10, i64 4, !10, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !7, i64 40, !10, i64 44, !10, i64 48, !10, i64 52, !12, i64 56, !7, i64 64, !7, i64 66, !10, i64 68, !10, i64 72, !10, i64 76, !10, i64 80, !10, i64 84, !7, i64 88, !10, i64 92, !12, i64 96, !12, i64 104, !12, i64 112, !10, i64 120, !12, i64 128, !12, i64 136, !12, i64 144, !12, i64 152, !12, i64 160, !12, i64 168, !12, i64 176, !10, i64 184, !10, i64 188, !12, i64 192, !12, i64 200, !12, i64 208, !10, i64 216, !10, i64 220, !10, i64 224, !10, i64 228, !10, i64 232, !12, i64 240, !12, i64 248, !12, i64 256, !7, i64 264, !8, i64 266}
!15 = !{!14, !12, i64 112}
!16 = !{!6, !12, i64 2472}
!17 = !{!11, !11, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.unroll.disable"}
!20 = distinct !{!20, !21, !22, !23}
!21 = !{!"llvm.loop.mustprogress"}
!22 = !{!"llvm.loop.isvectorized", i32 1}
!23 = !{!"llvm.loop.unroll.runtime.disable"}
!24 = distinct !{!24, !21, !22}
!25 = !{!14, !10, i64 0}
!26 = !{!6, !10, i64 2400}
!27 = !{!14, !10, i64 188}
!28 = !{!14, !12, i64 192}
!29 = !{!6, !12, i64 2392}
!30 = distinct !{!30, !19}
!31 = distinct !{!31, !21, !22, !23}
!32 = distinct !{!32, !21, !22}


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