; LLVM IR from CWI-EvolutionaryIntelligence/GOMEA :: gomea/src/fitness (fitness)

; 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.gomea::fitness::fitness_t.42" = type { %"class.gomea::fitness::fitness_generic_t", %"class.std::__cxx11::basic_string", i32, i32, i32, i32, double, double, %"class.std::map", %"class.std::map", double, i32, ptr, double, i8, i8, i32, i8, double, i32, double, double, i8, %"class.std::vector" }
%"class.gomea::fitness::fitness_generic_t" = type { ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<int, std::pair<const int, std::set<int>>, std::_Select1st<std::pair<const int, std::set<int>>>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, std::pair<const int, std::set<int>>, std::_Select1st<std::pair<const int, std::set<int>>>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::vector<double>, std::allocator<std::vector<double>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<double>, std::allocator<std::vector<double>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<double>, std::allocator<std::vector<double>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<double>, std::allocator<std::vector<double>>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@.str.6 = external hidden unnamed_addr constant [98 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [31 x i8], align 1
@__PRETTY_FUNCTION__._ZN5gomea7fitness9fitness_tIdE23rotateVariablesInBlocksEPdiiiPS3_ = external hidden unnamed_addr constant [116 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: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #1

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare { i64, i1 } @llvm.umul.with.overflow.i64(i64, i64) #2

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) #3

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) #4

declare noundef ptr @_ZN5gomea5utils26matrixVectorMultiplicationEPPdS1_ii(ptr noundef, ptr noundef, i32 noundef, i32 noundef) #5

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN5gomea7fitness9fitness_tIdE23rotateVariablesInBlocksEPdiiiPS3_(ptr noundef nonnull align 8 dereferenceable(280) %0, ptr noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, ptr noundef %5) #6 align 2 {
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca ptr, align 8
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store i32 %2, ptr %9, align 4, !tbaa !9
  store i32 %3, ptr %10, align 4, !tbaa !9
  store i32 %4, ptr %11, align 4, !tbaa !9
  store ptr %5, ptr %12, align 8, !tbaa !5
  %23 = load ptr, ptr %7, align 8
  %24 = load i32, ptr %9, align 4, !tbaa !9
  %25 = getelementptr inbounds %"class.gomea::fitness::fitness_t.42", ptr %23, i32 0, i32 11
  %26 = load i32, ptr %25, align 8, !tbaa !11
  %27 = srem i32 %24, %26
  %28 = icmp eq i32 %27, 0
  br i1 %28, label %29, label %30

29:                                               ; preds = %6
  br label %32

30:                                               ; preds = %6
  call void @__assert_fail(ptr noundef @.str.12, ptr noundef @.str.6, i32 noundef 441, ptr noundef @__PRETTY_FUNCTION__._ZN5gomea7fitness9fitness_tIdE23rotateVariablesInBlocksEPdiiiPS3_) #7
  unreachable

31:                                               ; No predecessors!
  br label %32

32:                                               ; preds = %31, %29
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  %33 = load i32, ptr %9, align 4, !tbaa !9
  %34 = getelementptr inbounds %"class.gomea::fitness::fitness_t.42", ptr %23, i32 0, i32 11
  %35 = load i32, ptr %34, align 8, !tbaa !11
  %36 = sdiv i32 %33, %35
  store i32 %36, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #8
  %37 = load i32, ptr %9, align 4, !tbaa !9
  %38 = sext i32 %37 to i64
  %39 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %38, i64 8)
  %40 = extractvalue { i64, i1 } %39, 1
  %41 = extractvalue { i64, i1 } %39, 0
  %42 = select i1 %40, i64 -1, i64 %41
  %43 = call noalias noundef nonnull ptr @_Znam(i64 noundef %42) #9
  store ptr %43, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #8
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %44

44:                                               ; preds = %59, %32
  %45 = load i32, ptr %15, align 4, !tbaa !9
  %46 = load i32, ptr %10, align 4, !tbaa !9
  %47 = icmp slt i32 %45, %46
  br i1 %47, label %49, label %48

48:                                               ; preds = %44
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  br label %62

49:                                               ; preds = %44
  %50 = load ptr, ptr %8, align 8, !tbaa !5
  %51 = load i32, ptr %15, align 4, !tbaa !9
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds double, ptr %50, i64 %52
  %54 = load double, ptr %53, align 8, !tbaa !33
  %55 = load ptr, ptr %14, align 8, !tbaa !5
  %56 = load i32, ptr %15, align 4, !tbaa !9
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds double, ptr %55, i64 %57
  store double %54, ptr %58, align 8, !tbaa !33
  br label %59

59:                                               ; preds = %49
  %60 = load i32, ptr %15, align 4, !tbaa !9
  %61 = add nsw i32 %60, 1
  store i32 %61, ptr %15, align 4, !tbaa !9
  br label %44, !llvm.loop !34

62:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #8
  %63 = getelementptr inbounds %"class.gomea::fitness::fitness_t.42", ptr %23, i32 0, i32 11
  %64 = load i32, ptr %63, align 8, !tbaa !11
  %65 = sext i32 %64 to i64
  %66 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %65, i64 8)
  %67 = extractvalue { i64, i1 } %66, 1
  %68 = extractvalue { i64, i1 } %66, 0
  %69 = select i1 %67, i64 -1, i64 %68
  %70 = call noalias noundef nonnull ptr @_Znam(i64 noundef %69) #9
  store ptr %70, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #8
  store i32 0, ptr %17, align 4, !tbaa !9
  br label %71

71:                                               ; preds = %142, %62
  %72 = load i32, ptr %17, align 4, !tbaa !9
  %73 = load i32, ptr %13, align 4, !tbaa !9
  %74 = icmp slt i32 %72, %73
  br i1 %74, label %76, label %75

75:                                               ; preds = %71
  store i32 5, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  br label %145

76:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #8
  store i32 0, ptr %19, align 4, !tbaa !9
  br label %77

77:                                               ; preds = %100, %76
  %78 = load i32, ptr %19, align 4, !tbaa !9
  %79 = getelementptr inbounds %"class.gomea::fitness::fitness_t.42", ptr %23, i32 0, i32 11
  %80 = load i32, ptr %79, align 8, !tbaa !11
  %81 = icmp slt i32 %78, %80
  br i1 %81, label %83, label %82

82:                                               ; preds = %77
  store i32 8, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  br label %103

83:                                               ; preds = %77
  %84 = load ptr, ptr %8, align 8, !tbaa !5
  %85 = load i32, ptr %10, align 4, !tbaa !9
  %86 = load i32, ptr %17, align 4, !tbaa !9
  %87 = getelementptr inbounds %"class.gomea::fitness::fitness_t.42", ptr %23, i32 0, i32 11
  %88 = load i32, ptr %87, align 8, !tbaa !11
  %89 = mul nsw i32 %86, %88
  %90 = add nsw i32 %85, %89
  %91 = load i32, ptr %19, align 4, !tbaa !9
  %92 = add nsw i32 %90, %91
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds double, ptr %84, i64 %93
  %95 = load double, ptr %94, align 8, !tbaa !33
  %96 = load ptr, ptr %16, align 8, !tbaa !5
  %97 = load i32, ptr %19, align 4, !tbaa !9
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds double, ptr %96, i64 %98
  store double %95, ptr %99, align 8, !tbaa !33
  br label %100

100:                                              ; preds = %83
  %101 = load i32, ptr %19, align 4, !tbaa !9
  %102 = add nsw i32 %101, 1
  store i32 %102, ptr %19, align 4, !tbaa !9
  br label %77, !llvm.loop !36

103:                                              ; preds = %82
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #8
  %104 = load ptr, ptr %12, align 8, !tbaa !5
  %105 = load ptr, ptr %16, align 8, !tbaa !5
  %106 = getelementptr inbounds %"class.gomea::fitness::fitness_t.42", ptr %23, i32 0, i32 11
  %107 = load i32, ptr %106, align 8, !tbaa !11
  %108 = getelementptr inbounds %"class.gomea::fitness::fitness_t.42", ptr %23, i32 0, i32 11
  %109 = load i32, ptr %108, align 8, !tbaa !11
  %110 = call noundef ptr @_ZN5gomea5utils26matrixVectorMultiplicationEPPdS1_ii(ptr noundef %104, ptr noundef %105, i32 noundef %107, i32 noundef %109)
  store ptr %110, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #8
  store i32 0, ptr %21, align 4, !tbaa !9
  br label %111

111:                                              ; preds = %134, %103
  %112 = load i32, ptr %21, align 4, !tbaa !9
  %113 = getelementptr inbounds %"class.gomea::fitness::fitness_t.42", ptr %23, i32 0, i32 11
  %114 = load i32, ptr %113, align 8, !tbaa !11
  %115 = icmp slt i32 %112, %114
  br i1 %115, label %117, label %116

116:                                              ; preds = %111
  store i32 11, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  br label %137

117:                                              ; preds = %111
  %118 = load ptr, ptr %20, align 8, !tbaa !5
  %119 = load i32, ptr %21, align 4, !tbaa !9
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds double, ptr %118, i64 %120
  %122 = load double, ptr %121, align 8, !tbaa !33
  %123 = load ptr, ptr %14, align 8, !tbaa !5
  %124 = load i32, ptr %10, align 4, !tbaa !9
  %125 = load i32, ptr %17, align 4, !tbaa !9
  %126 = getelementptr inbounds %"class.gomea::fitness::fitness_t.42", ptr %23, i32 0, i32 11
  %127 = load i32, ptr %126, align 8, !tbaa !11
  %128 = mul nsw i32 %125, %127
  %129 = add nsw i32 %124, %128
  %130 = load i32, ptr %21, align 4, !tbaa !9
  %131 = add nsw i32 %129, %130
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds double, ptr %123, i64 %132
  store double %122, ptr %133, align 8, !tbaa !33
  br label %134

134:                                              ; preds = %117
  %135 = load i32, ptr %21, align 4, !tbaa !9
  %136 = add nsw i32 %135, 1
  store i32 %136, ptr %21, align 4, !tbaa !9
  br label %111, !llvm.loop !37

137:                                              ; preds = %116
  %138 = load ptr, ptr %20, align 8, !tbaa !5
  %139 = icmp eq ptr %138, null
  br i1 %139, label %141, label %140

140:                                              ; preds = %137
  call void @_ZdaPv(ptr noundef %138) #10
  br label %141

141:                                              ; preds = %140, %137
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  br label %142

142:                                              ; preds = %141
  %143 = load i32, ptr %17, align 4, !tbaa !9
  %144 = add nsw i32 %143, 1
  store i32 %144, ptr %17, align 4, !tbaa !9
  br label %71, !llvm.loop !38

145:                                              ; preds = %75
  %146 = load ptr, ptr %16, align 8, !tbaa !5
  %147 = icmp eq ptr %146, null
  br i1 %147, label %149, label %148

148:                                              ; preds = %145
  call void @_ZdaPv(ptr noundef %146) #10
  br label %149

149:                                              ; preds = %148, %145
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #8
  %150 = load i32, ptr %11, align 4, !tbaa !9
  %151 = add nsw i32 %150, 1
  store i32 %151, ptr %22, align 4, !tbaa !9
  br label %152

152:                                              ; preds = %167, %149
  %153 = load i32, ptr %22, align 4, !tbaa !9
  %154 = load i32, ptr %9, align 4, !tbaa !9
  %155 = icmp slt i32 %153, %154
  br i1 %155, label %157, label %156

156:                                              ; preds = %152
  store i32 14, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #8
  br label %170

157:                                              ; preds = %152
  %158 = load ptr, ptr %8, align 8, !tbaa !5
  %159 = load i32, ptr %22, align 4, !tbaa !9
  %160 = sext i32 %159 to i64
  %161 = getelementptr inbounds double, ptr %158, i64 %160
  %162 = load double, ptr %161, align 8, !tbaa !33
  %163 = load ptr, ptr %14, align 8, !tbaa !5
  %164 = load i32, ptr %22, align 4, !tbaa !9
  %165 = sext i32 %164 to i64
  %166 = getelementptr inbounds double, ptr %163, i64 %165
  store double %162, ptr %166, align 8, !tbaa !33
  br label %167

167:                                              ; preds = %157
  %168 = load i32, ptr %22, align 4, !tbaa !9
  %169 = add nsw i32 %168, 1
  store i32 %169, ptr %22, align 4, !tbaa !9
  br label %152, !llvm.loop !39

170:                                              ; preds = %156
  %171 = load ptr, ptr %14, align 8, !tbaa !5
  store i32 1, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  ret ptr %171
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { nobuiltin 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 #4 = { nobuiltin 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 = { "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 = { 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 #7 = { noreturn nounwind }
attributes #8 = { nounwind }
attributes #9 = { builtin allocsize(0) }
attributes #10 = { builtin 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 176}
!12 = !{!"_ZTSN5gomea7fitness9fitness_tIdEE", !13, i64 0, !14, i64 8, !10, i64 40, !10, i64 44, !10, i64 48, !17, i64 52, !18, i64 56, !18, i64 64, !19, i64 72, !19, i64 120, !18, i64 168, !10, i64 176, !6, i64 184, !18, i64 192, !27, i64 200, !27, i64 201, !28, i64 204, !27, i64 208, !18, i64 216, !10, i64 224, !18, i64 232, !18, i64 240, !27, i64 248, !29, i64 256}
!13 = !{!"_ZTSN5gomea7fitness17fitness_generic_tE"}
!14 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !15, i64 0, !16, i64 8, !7, i64 16}
!15 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!16 = !{!"long", !7, i64 0}
!17 = !{!"_ZTSN5gomea7fitness8opt_modeE", !7, i64 0}
!18 = !{!"double", !7, i64 0}
!19 = !{!"_ZTSSt3mapIiSt3setIiSt4lessIiESaIiEES2_SaISt4pairIKiS4_EEE", !20, i64 0}
!20 = !{!"_ZTSSt8_Rb_treeIiSt4pairIKiSt3setIiSt4lessIiESaIiEEESt10_Select1stIS7_ES4_SaIS7_EE", !21, i64 0}
!21 = !{!"_ZTSNSt8_Rb_treeIiSt4pairIKiSt3setIiSt4lessIiESaIiEEESt10_Select1stIS7_ES4_SaIS7_EE13_Rb_tree_implIS4_Lb1EEE", !22, i64 0, !24, i64 8}
!22 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIiEE", !23, i64 0}
!23 = !{!"_ZTSSt4lessIiE"}
!24 = !{!"_ZTSSt15_Rb_tree_header", !25, i64 0, !16, i64 32}
!25 = !{!"_ZTSSt18_Rb_tree_node_base", !26, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!26 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!27 = !{!"bool", !7, i64 0}
!28 = !{!"_ZTSN5gomea18output_frequency_tE", !7, i64 0}
!29 = !{!"_ZTSSt6vectorIS_IdSaIdEESaIS1_EE", !30, i64 0}
!30 = !{!"_ZTSSt12_Vector_baseISt6vectorIdSaIdEESaIS2_EE", !31, i64 0}
!31 = !{!"_ZTSNSt12_Vector_baseISt6vectorIdSaIdEESaIS2_EE12_Vector_implE", !32, i64 0}
!32 = !{!"_ZTSNSt12_Vector_baseISt6vectorIdSaIdEESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!33 = !{!18, !18, i64 0}
!34 = distinct !{!34, !35}
!35 = !{!"llvm.loop.mustprogress"}
!36 = distinct !{!36, !35}
!37 = distinct !{!37, !35}
!38 = distinct !{!38, !35}
!39 = distinct !{!39, !35}


; 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.6 = external hidden unnamed_addr constant [98 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [31 x i8], align 1
@__PRETTY_FUNCTION__._ZN5gomea7fitness9fitness_tIdE23rotateVariablesInBlocksEPdiiiPS3_ = external hidden unnamed_addr constant [116 x i8], align 1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) local_unnamed_addr #1

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) local_unnamed_addr #2

declare noundef ptr @_ZN5gomea5utils26matrixVectorMultiplicationEPPdS1_ii(ptr noundef, ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local noalias noundef nonnull ptr @_ZN5gomea7fitness9fitness_tIdE23rotateVariablesInBlocksEPdiiiPS3_(ptr nocapture noundef nonnull readonly align 8 dereferenceable(280) %0, ptr nocapture noundef readonly %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, ptr noundef %5) local_unnamed_addr #4 align 2 {
  %7 = getelementptr inbounds i8, ptr %0, i64 176
  %8 = load i32, ptr %7, align 8, !tbaa !5
  %9 = srem i32 %2, %8
  %10 = sdiv i32 %2, %8
  %11 = icmp eq i32 %9, 0
  br i1 %11, label %13, label %12

12:                                               ; preds = %6
  tail call void @__assert_fail(ptr noundef nonnull @.str.12, ptr noundef nonnull @.str.6, i32 noundef 441, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN5gomea7fitness9fitness_tIdE23rotateVariablesInBlocksEPdiiiPS3_) #6
  unreachable

13:                                               ; preds = %6
  %14 = zext nneg i32 %2 to i64
  %15 = icmp slt i32 %2, 0
  %16 = shl nuw nsw i64 %14, 3
  %17 = select i1 %15, i64 -1, i64 %16
  %18 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %17) #7
  %19 = icmp sgt i32 %3, 0
  br i1 %19, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %13
  %20 = zext nneg i32 %3 to i64
  %21 = shl nuw nsw i64 %20, 3
  tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 8 %18, ptr align 8 %1, i64 %21, i1 false), !tbaa !31
  br label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph.preheader, %13
  %22 = sext i32 %8 to i64
  %23 = icmp slt i32 %8, 0
  %24 = shl nsw i64 %22, 3
  %25 = select i1 %23, i64 -1, i64 %24
  %26 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %25) #7
  %27 = icmp sgt i32 %10, 0
  br i1 %27, label %.preheader, label %._crit_edge59

.preheader:                                       ; preds = %._crit_edge, %114
  %.04558 = phi i32 [ %115, %114 ], [ 0, %._crit_edge ]
  %28 = load i32, ptr %7, align 8, !tbaa !5
  %29 = icmp sgt i32 %28, 0
  br i1 %29, label %.lr.ph52, label %._crit_edge53

.lr.ph52:                                         ; preds = %.preheader
  %30 = mul nuw nsw i32 %28, %.04558
  %wide.trip.count = zext nneg i32 %28 to i64
  %min.iters.check81 = icmp ult i32 %28, 10
  br i1 %min.iters.check81, label %scalar.ph80.preheader, label %vector.scevcheck78

scalar.ph80.preheader:                            ; preds = %middle.block79, %vector.scevcheck78, %.lr.ph52
  %indvars.iv.ph = phi i64 [ 0, %vector.scevcheck78 ], [ 0, %.lr.ph52 ], [ %n.vec84, %middle.block79 ]
  %xtraiter = and i64 %wide.trip.count, 1
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %scalar.ph80.prol.loopexit, label %scalar.ph80.prol

scalar.ph80.prol:                                 ; preds = %scalar.ph80.preheader
  %31 = trunc nuw nsw i64 %indvars.iv.ph to i32
  %32 = add i32 %31, %3
  %33 = add i32 %32, %30
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds double, ptr %1, i64 %34
  %36 = load double, ptr %35, align 8, !tbaa !31
  %37 = getelementptr inbounds double, ptr %26, i64 %indvars.iv.ph
  store double %36, ptr %37, align 8, !tbaa !31
  %indvars.iv.next.prol = or disjoint i64 %indvars.iv.ph, 1
  br label %scalar.ph80.prol.loopexit

scalar.ph80.prol.loopexit:                        ; preds = %scalar.ph80.prol, %scalar.ph80.preheader
  %indvars.iv.unr = phi i64 [ %indvars.iv.ph, %scalar.ph80.preheader ], [ %indvars.iv.next.prol, %scalar.ph80.prol ]
  %38 = add nsw i64 %wide.trip.count, -1
  %39 = icmp eq i64 %indvars.iv.ph, %38
  br i1 %39, label %._crit_edge53, label %scalar.ph80

vector.scevcheck78:                               ; preds = %.lr.ph52
  %40 = add nsw i64 %wide.trip.count, -1
  %41 = add i32 %30, %3
  %42 = trunc nsw i64 %40 to i32
  %43 = add i32 %41, %42
  %44 = icmp slt i32 %43, %41
  %45 = icmp ugt i64 %40, 4294967295
  %46 = or i1 %44, %45
  br i1 %46, label %scalar.ph80.preheader, label %vector.ph82

vector.ph82:                                      ; preds = %vector.scevcheck78
  %n.vec84 = and i64 %wide.trip.count, 2147483644
  br label %vector.body86

vector.body86:                                    ; preds = %vector.body86, %vector.ph82
  %index87 = phi i64 [ 0, %vector.ph82 ], [ %index.next90, %vector.body86 ]
  %47 = trunc i64 %index87 to i32
  %48 = add i32 %47, %3
  %49 = add i32 %48, %30
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds double, ptr %1, i64 %50
  %52 = getelementptr inbounds i8, ptr %51, i64 16
  %wide.load88 = load <2 x double>, ptr %51, align 8, !tbaa !31
  %wide.load89 = load <2 x double>, ptr %52, align 8, !tbaa !31
  %53 = getelementptr inbounds double, ptr %26, i64 %index87
  %54 = getelementptr inbounds i8, ptr %53, i64 16
  store <2 x double> %wide.load88, ptr %53, align 8, !tbaa !31
  store <2 x double> %wide.load89, ptr %54, align 8, !tbaa !31
  %index.next90 = add nuw i64 %index87, 4
  %55 = icmp eq i64 %index.next90, %n.vec84
  br i1 %55, label %middle.block79, label %vector.body86, !llvm.loop !32

middle.block79:                                   ; preds = %vector.body86
  %cmp.n91 = icmp eq i64 %n.vec84, %wide.trip.count
  br i1 %cmp.n91, label %._crit_edge53, label %scalar.ph80.preheader

._crit_edge53:                                    ; preds = %scalar.ph80.prol.loopexit, %scalar.ph80, %middle.block79, %.preheader
  %56 = tail call noundef ptr @_ZN5gomea5utils26matrixVectorMultiplicationEPPdS1_ii(ptr noundef %5, ptr noundef nonnull %26, i32 noundef %28, i32 noundef %28)
  %57 = load i32, ptr %7, align 8, !tbaa !5
  %58 = icmp sgt i32 %57, 0
  br i1 %58, label %.lr.ph56, label %._crit_edge57

.lr.ph56:                                         ; preds = %._crit_edge53
  %59 = mul nuw nsw i32 %57, %.04558
  %wide.trip.count70 = zext nneg i32 %57 to i64
  %min.iters.check = icmp ult i32 %57, 10
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.scevcheck

scalar.ph.preheader:                              ; preds = %middle.block, %vector.scevcheck, %.lr.ph56
  %indvars.iv67.ph = phi i64 [ 0, %vector.scevcheck ], [ 0, %.lr.ph56 ], [ %n.vec, %middle.block ]
  %xtraiter92 = and i64 %wide.trip.count70, 1
  %lcmp.mod93.not = icmp eq i64 %xtraiter92, 0
  br i1 %lcmp.mod93.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol

scalar.ph.prol:                                   ; preds = %scalar.ph.preheader
  %60 = getelementptr inbounds double, ptr %56, i64 %indvars.iv67.ph
  %61 = load double, ptr %60, align 8, !tbaa !31
  %62 = trunc nuw nsw i64 %indvars.iv67.ph to i32
  %63 = add i32 %62, %3
  %64 = add i32 %63, %59
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds double, ptr %18, i64 %65
  store double %61, ptr %66, align 8, !tbaa !31
  %indvars.iv.next68.prol = or disjoint i64 %indvars.iv67.ph, 1
  br label %scalar.ph.prol.loopexit

scalar.ph.prol.loopexit:                          ; preds = %scalar.ph.prol, %scalar.ph.preheader
  %indvars.iv67.unr = phi i64 [ %indvars.iv67.ph, %scalar.ph.preheader ], [ %indvars.iv.next68.prol, %scalar.ph.prol ]
  %67 = add nsw i64 %wide.trip.count70, -1
  %68 = icmp eq i64 %indvars.iv67.ph, %67
  br i1 %68, label %._crit_edge57.thread, label %scalar.ph

vector.scevcheck:                                 ; preds = %.lr.ph56
  %69 = add nsw i64 %wide.trip.count70, -1
  %70 = add i32 %59, %3
  %71 = trunc nsw i64 %69 to i32
  %72 = add i32 %70, %71
  %73 = icmp slt i32 %72, %70
  %74 = icmp ugt i64 %69, 4294967295
  %75 = or i1 %73, %74
  br i1 %75, label %scalar.ph.preheader, label %vector.ph

vector.ph:                                        ; preds = %vector.scevcheck
  %n.vec = and i64 %wide.trip.count70, 2147483644
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %76 = trunc i64 %index to i32
  %77 = getelementptr inbounds double, ptr %56, i64 %index
  %78 = getelementptr inbounds i8, ptr %77, i64 16
  %wide.load = load <2 x double>, ptr %77, align 8, !tbaa !31
  %wide.load77 = load <2 x double>, ptr %78, align 8, !tbaa !31
  %79 = add i32 %76, %3
  %80 = add i32 %79, %59
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds double, ptr %18, i64 %81
  %83 = getelementptr inbounds i8, ptr %82, i64 16
  store <2 x double> %wide.load, ptr %82, align 8, !tbaa !31
  store <2 x double> %wide.load77, ptr %83, align 8, !tbaa !31
  %index.next = add nuw i64 %index, 4
  %84 = icmp eq i64 %index.next, %n.vec
  br i1 %84, label %middle.block, label %vector.body, !llvm.loop !36

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

scalar.ph80:                                      ; preds = %scalar.ph80.prol.loopexit, %scalar.ph80
  %indvars.iv = phi i64 [ %indvars.iv.next.1, %scalar.ph80 ], [ %indvars.iv.unr, %scalar.ph80.prol.loopexit ]
  %85 = trunc nuw nsw i64 %indvars.iv to i32
  %86 = add i32 %85, %3
  %87 = add i32 %86, %30
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds double, ptr %1, i64 %88
  %90 = load double, ptr %89, align 8, !tbaa !31
  %91 = getelementptr inbounds double, ptr %26, i64 %indvars.iv
  store double %90, ptr %91, align 8, !tbaa !31
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %92 = trunc nuw nsw i64 %indvars.iv.next to i32
  %93 = add i32 %92, %3
  %94 = add i32 %93, %30
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds double, ptr %1, i64 %95
  %97 = load double, ptr %96, align 8, !tbaa !31
  %98 = getelementptr inbounds double, ptr %26, i64 %indvars.iv.next
  store double %97, ptr %98, align 8, !tbaa !31
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %exitcond.not.1 = icmp eq i64 %indvars.iv.next.1, %wide.trip.count
  br i1 %exitcond.not.1, label %._crit_edge53, label %scalar.ph80, !llvm.loop !37

._crit_edge57:                                    ; preds = %._crit_edge53
  %99 = icmp eq ptr %56, null
  br i1 %99, label %114, label %._crit_edge57.thread

scalar.ph:                                        ; preds = %scalar.ph.prol.loopexit, %scalar.ph
  %indvars.iv67 = phi i64 [ %indvars.iv.next68.1, %scalar.ph ], [ %indvars.iv67.unr, %scalar.ph.prol.loopexit ]
  %100 = getelementptr inbounds double, ptr %56, i64 %indvars.iv67
  %101 = load double, ptr %100, align 8, !tbaa !31
  %102 = trunc nuw nsw i64 %indvars.iv67 to i32
  %103 = add i32 %102, %3
  %104 = add i32 %103, %59
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds double, ptr %18, i64 %105
  store double %101, ptr %106, align 8, !tbaa !31
  %indvars.iv.next68 = add nuw nsw i64 %indvars.iv67, 1
  %107 = getelementptr inbounds double, ptr %56, i64 %indvars.iv.next68
  %108 = load double, ptr %107, align 8, !tbaa !31
  %109 = trunc nuw nsw i64 %indvars.iv.next68 to i32
  %110 = add i32 %109, %3
  %111 = add i32 %110, %59
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds double, ptr %18, i64 %112
  store double %108, ptr %113, align 8, !tbaa !31
  %indvars.iv.next68.1 = add nuw nsw i64 %indvars.iv67, 2
  %exitcond71.not.1 = icmp eq i64 %indvars.iv.next68.1, %wide.trip.count70
  br i1 %exitcond71.not.1, label %._crit_edge57.thread, label %scalar.ph, !llvm.loop !38

._crit_edge57.thread:                             ; preds = %scalar.ph.prol.loopexit, %scalar.ph, %middle.block, %._crit_edge57
  tail call void @_ZdaPv(ptr noundef nonnull %56) #8
  br label %114

114:                                              ; preds = %._crit_edge57.thread, %._crit_edge57
  %115 = add nuw nsw i32 %.04558, 1
  %exitcond72.not = icmp eq i32 %115, %10
  br i1 %exitcond72.not, label %._crit_edge59, label %.preheader, !llvm.loop !39

._crit_edge59:                                    ; preds = %114, %._crit_edge
  tail call void @_ZdaPv(ptr noundef nonnull %26) #8
  %.060 = add nsw i32 %4, 1
  %116 = icmp slt i32 %.060, %2
  br i1 %116, label %.lr.ph63.preheader, label %._crit_edge64

.lr.ph63.preheader:                               ; preds = %._crit_edge59
  %117 = sext i32 %.060 to i64
  %118 = shl nsw i64 %117, 3
  %scevgep = getelementptr i8, ptr %18, i64 %118
  %scevgep73 = getelementptr i8, ptr %1, i64 %118
  %119 = add nsw i32 %2, -2
  %120 = sub i32 %119, %4
  %121 = zext i32 %120 to i64
  %122 = shl nuw nsw i64 %121, 3
  %123 = add nuw nsw i64 %122, 8
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %scevgep, ptr noundef nonnull align 8 dereferenceable(1) %scevgep73, i64 %123, i1 false), !tbaa !31
  br label %._crit_edge64

._crit_edge64:                                    ; preds = %.lr.ph63.preheader, %._crit_edge59
  ret ptr %18
}

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #5

attributes #0 = { 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 #1 = { nobuiltin 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 #2 = { nobuiltin nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { noreturn nounwind }
attributes #7 = { builtin allocsize(0) }
attributes #8 = { builtin 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, !14, i64 176}
!6 = !{!"_ZTSN5gomea7fitness9fitness_tIdEE", !7, i64 0, !8, i64 8, !14, i64 40, !14, i64 44, !14, i64 48, !15, i64 52, !16, i64 56, !16, i64 64, !17, i64 72, !17, i64 120, !16, i64 168, !14, i64 176, !10, i64 184, !16, i64 192, !25, i64 200, !25, i64 201, !26, i64 204, !25, i64 208, !16, i64 216, !14, i64 224, !16, i64 232, !16, i64 240, !25, i64 248, !27, i64 256}
!7 = !{!"_ZTSN5gomea7fitness17fitness_generic_tE"}
!8 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !9, i64 0, !13, i64 8, !11, i64 16}
!9 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !10, i64 0}
!10 = !{!"any pointer", !11, i64 0}
!11 = !{!"omnipotent char", !12, i64 0}
!12 = !{!"Simple C++ TBAA"}
!13 = !{!"long", !11, i64 0}
!14 = !{!"int", !11, i64 0}
!15 = !{!"_ZTSN5gomea7fitness8opt_modeE", !11, i64 0}
!16 = !{!"double", !11, i64 0}
!17 = !{!"_ZTSSt3mapIiSt3setIiSt4lessIiESaIiEES2_SaISt4pairIKiS4_EEE", !18, i64 0}
!18 = !{!"_ZTSSt8_Rb_treeIiSt4pairIKiSt3setIiSt4lessIiESaIiEEESt10_Select1stIS7_ES4_SaIS7_EE", !19, i64 0}
!19 = !{!"_ZTSNSt8_Rb_treeIiSt4pairIKiSt3setIiSt4lessIiESaIiEEESt10_Select1stIS7_ES4_SaIS7_EE13_Rb_tree_implIS4_Lb1EEE", !20, i64 0, !22, i64 8}
!20 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIiEE", !21, i64 0}
!21 = !{!"_ZTSSt4lessIiE"}
!22 = !{!"_ZTSSt15_Rb_tree_header", !23, i64 0, !13, i64 32}
!23 = !{!"_ZTSSt18_Rb_tree_node_base", !24, i64 0, !10, i64 8, !10, i64 16, !10, i64 24}
!24 = !{!"_ZTSSt14_Rb_tree_color", !11, i64 0}
!25 = !{!"bool", !11, i64 0}
!26 = !{!"_ZTSN5gomea18output_frequency_tE", !11, i64 0}
!27 = !{!"_ZTSSt6vectorIS_IdSaIdEESaIS1_EE", !28, i64 0}
!28 = !{!"_ZTSSt12_Vector_baseISt6vectorIdSaIdEESaIS2_EE", !29, i64 0}
!29 = !{!"_ZTSNSt12_Vector_baseISt6vectorIdSaIdEESaIS2_EE12_Vector_implE", !30, i64 0}
!30 = !{!"_ZTSNSt12_Vector_baseISt6vectorIdSaIdEESaIS2_EE17_Vector_impl_dataE", !10, i64 0, !10, i64 8, !10, i64 16}
!31 = !{!16, !16, i64 0}
!32 = distinct !{!32, !33, !34, !35}
!33 = !{!"llvm.loop.mustprogress"}
!34 = !{!"llvm.loop.isvectorized", i32 1}
!35 = !{!"llvm.loop.unroll.runtime.disable"}
!36 = distinct !{!36, !33, !34, !35}
!37 = distinct !{!37, !33, !34}
!38 = distinct !{!38, !33, !34}
!39 = distinct !{!39, !33}


; Effective O3 passes: CorrelatedValuePropagationPass,DivRemPairsPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LICMPass,LoopIdiomRecognizePass,LoopInstSimplifyPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass