; LLVM IR from jingweizhanghuai/Morn :: test/test_list2.ll (Z11test_structv)

; 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.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<Test, std::allocator<Test>>::_Vector_impl" }
%"struct.std::_Vector_base<Test, std::allocator<Test>>::_Vector_impl" = type { %"struct.std::_Vector_base<Test, std::allocator<Test>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Test, std::allocator<Test>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.Test = type { [32 x i8], i32, float, double, ptr, ptr, ptr }
%struct.MList = type { i32, ptr }

@.str = external hidden unnamed_addr constant [17 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [75 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [16 x i8], align 1
@__FUNCTION__._Z11test_structv = external hidden unnamed_addr constant [12 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: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #1

declare i32 @m_Rand(i32 noundef, i32 noundef) #2

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

declare i32 @__gxx_personality_v0(...)

declare void @_mTimerBegin(ptr noundef) #2

declare float @_mTimerEnd(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #2

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

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

declare void @mListRelease(ptr noundef) #2

; Function Attrs: nounwind
declare void @free(ptr noundef) #3

; Function Attrs: mustprogress uwtable
define dso_local void @_Z11test_structv() #4 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca ptr, align 8
  %3 = alloca %"class.std::vector.0", align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #6
  %11 = call noalias ptr @malloc(i64 noundef 720000000) #7
  store ptr %11, ptr %2, align 8, !tbaa !5
  store i32 0, ptr %1, align 4, !tbaa !9
  br label %12

12:                                               ; preds = %68, %0
  %13 = load i32, ptr %1, align 4, !tbaa !9
  %14 = icmp slt i32 %13, 10000000
  br i1 %14, label %15, label %71

15:                                               ; preds = %12
  %16 = call i32 @m_Rand(i32 noundef -10000, i32 noundef 10000)
  %17 = load ptr, ptr %2, align 8, !tbaa !5
  %18 = load i32, ptr %1, align 4, !tbaa !9
  %19 = sext i32 %18 to i64
  %20 = getelementptr inbounds %struct.Test, ptr %17, i64 %19
  %21 = getelementptr inbounds %struct.Test, ptr %20, i32 0, i32 1
  store i32 %16, ptr %21, align 8, !tbaa !11
  %22 = call i32 @m_Rand(i32 noundef -10000, i32 noundef 10000)
  %23 = sitofp i32 %22 to float
  %24 = fdiv float %23, 1.000000e+05
  %25 = load ptr, ptr %2, align 8, !tbaa !5
  %26 = load i32, ptr %1, align 4, !tbaa !9
  %27 = sext i32 %26 to i64
  %28 = getelementptr inbounds %struct.Test, ptr %25, i64 %27
  %29 = getelementptr inbounds %struct.Test, ptr %28, i32 0, i32 2
  store float %24, ptr %29, align 4, !tbaa !15
  %30 = call i32 @m_Rand(i32 noundef -10000, i32 noundef 10000)
  %31 = sitofp i32 %30 to double
  %32 = fdiv double %31, 1.000000e+05
  %33 = load ptr, ptr %2, align 8, !tbaa !5
  %34 = load i32, ptr %1, align 4, !tbaa !9
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds %struct.Test, ptr %33, i64 %35
  %37 = getelementptr inbounds %struct.Test, ptr %36, i32 0, i32 3
  store double %32, ptr %37, align 8, !tbaa !16
  %38 = load ptr, ptr %2, align 8, !tbaa !5
  %39 = load i32, ptr %1, align 4, !tbaa !9
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds %struct.Test, ptr %38, i64 %40
  %42 = getelementptr inbounds %struct.Test, ptr %41, i32 0, i32 1
  %43 = load ptr, ptr %2, align 8, !tbaa !5
  %44 = load i32, ptr %1, align 4, !tbaa !9
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds %struct.Test, ptr %43, i64 %45
  %47 = getelementptr inbounds %struct.Test, ptr %46, i32 0, i32 4
  store ptr %42, ptr %47, align 8, !tbaa !17
  %48 = load ptr, ptr %2, align 8, !tbaa !5
  %49 = load i32, ptr %1, align 4, !tbaa !9
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds %struct.Test, ptr %48, i64 %50
  %52 = getelementptr inbounds %struct.Test, ptr %51, i32 0, i32 2
  %53 = load ptr, ptr %2, align 8, !tbaa !5
  %54 = load i32, ptr %1, align 4, !tbaa !9
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds %struct.Test, ptr %53, i64 %55
  %57 = getelementptr inbounds %struct.Test, ptr %56, i32 0, i32 5
  store ptr %52, ptr %57, align 8, !tbaa !18
  %58 = load ptr, ptr %2, align 8, !tbaa !5
  %59 = load i32, ptr %1, align 4, !tbaa !9
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds %struct.Test, ptr %58, i64 %60
  %62 = getelementptr inbounds %struct.Test, ptr %61, i32 0, i32 3
  %63 = load ptr, ptr %2, align 8, !tbaa !5
  %64 = load i32, ptr %1, align 4, !tbaa !9
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds %struct.Test, ptr %63, i64 %65
  %67 = getelementptr inbounds %struct.Test, ptr %66, i32 0, i32 6
  store ptr %62, ptr %67, align 8, !tbaa !19
  br label %68

68:                                               ; preds = %15
  %69 = load i32, ptr %1, align 4, !tbaa !9
  %70 = add nsw i32 %69, 1
  store i32 %70, ptr %1, align 4, !tbaa !9
  br label %12, !llvm.loop !20

71:                                               ; preds = %12
  call void @llvm.lifetime.start.p0(i64 24, ptr %3) #6
  call void @_ZNSt6vectorI4TestSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #6
  %72 = invoke ptr @ListCreate(i32 noundef -1, ptr noundef null)
          to label %73 unwind label %87

73:                                               ; preds = %71
  store ptr %72, ptr %4, align 8, !tbaa !5
  invoke void @_mTimerBegin(ptr noundef @.str)
          to label %74 unwind label %87

74:                                               ; preds = %73
  store i32 0, ptr %1, align 4, !tbaa !9
  br label %75

75:                                               ; preds = %84, %74
  %76 = load i32, ptr %1, align 4, !tbaa !9
  %77 = icmp slt i32 %76, 10000000
  br i1 %77, label %78, label %91

78:                                               ; preds = %75
  %79 = load ptr, ptr %2, align 8, !tbaa !5
  %80 = load i32, ptr %1, align 4, !tbaa !9
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds %struct.Test, ptr %79, i64 %81
  invoke void @_ZNSt6vectorI4TestSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(72) %82)
          to label %83 unwind label %87

83:                                               ; preds = %78
  br label %84

84:                                               ; preds = %83
  %85 = load i32, ptr %1, align 4, !tbaa !9
  %86 = add nsw i32 %85, 1
  store i32 %86, ptr %1, align 4, !tbaa !9
  br label %75, !llvm.loop !22

87:                                               ; preds = %167, %165, %140, %138, %112, %110, %98, %93, %91, %78, %73, %71
  %88 = landingpad { ptr, i32 }
          cleanup
  %89 = extractvalue { ptr, i32 } %88, 0
  store ptr %89, ptr %5, align 8
  %90 = extractvalue { ptr, i32 } %88, 1
  store i32 %90, ptr %6, align 4
  br label %171

91:                                               ; preds = %75
  %92 = invoke float @_mTimerEnd(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 85, ptr noundef @__FUNCTION__._Z11test_structv)
          to label %93 unwind label %87

93:                                               ; preds = %91
  invoke void @_mTimerBegin(ptr noundef @.str.2)
          to label %94 unwind label %87

94:                                               ; preds = %93
  store i32 0, ptr %1, align 4, !tbaa !9
  br label %95

95:                                               ; preds = %107, %94
  %96 = load i32, ptr %1, align 4, !tbaa !9
  %97 = icmp slt i32 %96, 10000000
  br i1 %97, label %98, label %110

98:                                               ; preds = %95
  %99 = load ptr, ptr %4, align 8, !tbaa !5
  %100 = load i32, ptr %1, align 4, !tbaa !9
  %101 = load ptr, ptr %2, align 8, !tbaa !5
  %102 = load i32, ptr %1, align 4, !tbaa !9
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds %struct.Test, ptr %101, i64 %103
  %105 = invoke ptr @mListWrite(ptr noundef %99, i32 noundef %100, ptr noundef %104, i32 noundef 72)
          to label %106 unwind label %87

106:                                              ; preds = %98
  br label %107

107:                                              ; preds = %106
  %108 = load i32, ptr %1, align 4, !tbaa !9
  %109 = add nsw i32 %108, 1
  store i32 %109, ptr %1, align 4, !tbaa !9
  br label %95, !llvm.loop !23

110:                                              ; preds = %95
  %111 = invoke float @_mTimerEnd(ptr noundef @.str.2, ptr noundef @.str.1, i32 noundef 90, ptr noundef @__FUNCTION__._Z11test_structv)
          to label %112 unwind label %87

112:                                              ; preds = %110
  invoke void @_mTimerBegin(ptr noundef @.str.3)
          to label %113 unwind label %87

113:                                              ; preds = %112
  store i32 0, ptr %1, align 4, !tbaa !9
  br label %114

114:                                              ; preds = %126, %113
  %115 = load i32, ptr %1, align 4, !tbaa !9
  %116 = icmp slt i32 %115, 10000000
  br i1 %116, label %117, label %138

117:                                              ; preds = %114
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  %118 = call noundef i64 @_ZNKSt6vectorI4TestSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  %119 = trunc i64 %118 to i32
  %120 = invoke i32 @m_Rand(i32 noundef 0, i32 noundef %119)
          to label %121 unwind label %129

121:                                              ; preds = %117
  store i32 %120, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %122 = load i32, ptr %7, align 4, !tbaa !9
  %123 = sext i32 %122 to i64
  %124 = invoke noundef nonnull align 8 dereferenceable(72) ptr @_ZNSt6vectorI4TestSaIS0_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %123)
          to label %125 unwind label %133

125:                                              ; preds = %121
  store ptr %124, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %126

126:                                              ; preds = %125
  %127 = load i32, ptr %1, align 4, !tbaa !9
  %128 = add nsw i32 %127, 1
  store i32 %128, ptr %1, align 4, !tbaa !9
  br label %114, !llvm.loop !24

129:                                              ; preds = %117
  %130 = landingpad { ptr, i32 }
          cleanup
  %131 = extractvalue { ptr, i32 } %130, 0
  store ptr %131, ptr %5, align 8
  %132 = extractvalue { ptr, i32 } %130, 1
  store i32 %132, ptr %6, align 4
  br label %137

133:                                              ; preds = %121
  %134 = landingpad { ptr, i32 }
          cleanup
  %135 = extractvalue { ptr, i32 } %134, 0
  store ptr %135, ptr %5, align 8
  %136 = extractvalue { ptr, i32 } %134, 1
  store i32 %136, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %137

137:                                              ; preds = %133, %129
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %171

138:                                              ; preds = %114
  %139 = invoke float @_mTimerEnd(ptr noundef @.str.3, ptr noundef @.str.1, i32 noundef 98, ptr noundef @__FUNCTION__._Z11test_structv)
          to label %140 unwind label %87

140:                                              ; preds = %138
  invoke void @_mTimerBegin(ptr noundef @.str.4)
          to label %141 unwind label %87

141:                                              ; preds = %140
  store i32 0, ptr %1, align 4, !tbaa !9
  br label %142

142:                                              ; preds = %158, %141
  %143 = load i32, ptr %1, align 4, !tbaa !9
  %144 = icmp slt i32 %143, 10000000
  br i1 %144, label %145, label %165

145:                                              ; preds = %142
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  %146 = load ptr, ptr %4, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.MList, ptr %146, i32 0, i32 0
  %148 = load i32, ptr %147, align 8, !tbaa !25
  %149 = invoke i32 @m_Rand(i32 noundef 0, i32 noundef %148)
          to label %150 unwind label %161

150:                                              ; preds = %145
  store i32 %149, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %151 = load ptr, ptr %4, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.MList, ptr %151, i32 0, i32 1
  %153 = load ptr, ptr %152, align 8, !tbaa !27
  %154 = load i32, ptr %1, align 4, !tbaa !9
  %155 = sext i32 %154 to i64
  %156 = getelementptr inbounds ptr, ptr %153, i64 %155
  %157 = load ptr, ptr %156, align 8, !tbaa !5
  store ptr %157, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %158

158:                                              ; preds = %150
  %159 = load i32, ptr %1, align 4, !tbaa !9
  %160 = add nsw i32 %159, 1
  store i32 %160, ptr %1, align 4, !tbaa !9
  br label %142, !llvm.loop !28

161:                                              ; preds = %145
  %162 = landingpad { ptr, i32 }
          cleanup
  %163 = extractvalue { ptr, i32 } %162, 0
  store ptr %163, ptr %5, align 8
  %164 = extractvalue { ptr, i32 } %162, 1
  store i32 %164, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %171

165:                                              ; preds = %142
  %166 = invoke float @_mTimerEnd(ptr noundef @.str.4, ptr noundef @.str.1, i32 noundef 106, ptr noundef @__FUNCTION__._Z11test_structv)
          to label %167 unwind label %87

167:                                              ; preds = %165
  %168 = load ptr, ptr %4, align 8, !tbaa !5
  invoke void @mListRelease(ptr noundef %168)
          to label %169 unwind label %87

169:                                              ; preds = %167
  %170 = load ptr, ptr %2, align 8, !tbaa !5
  call void @free(ptr noundef %170) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  call void @_ZNSt6vectorI4TestSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #6
  ret void

171:                                              ; preds = %161, %137, %87
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  call void @_ZNSt6vectorI4TestSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #6
  br label %172

172:                                              ; preds = %171
  %173 = load ptr, ptr %5, align 8
  %174 = load i32, ptr %6, align 4
  %175 = insertvalue { ptr, i32 } poison, ptr %173, 0
  %176 = insertvalue { ptr, i32 } %175, i32 %174, 1
  resume { ptr, i32 } %176
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorI4TestSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorI4TestSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(72)) #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorI4TestSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(72) ptr @_ZNSt6vectorI4TestSaIS0_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorI4TestSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #5 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress 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 #6 = { nounwind }
attributes #7 = { 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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 32}
!12 = !{!"_ZTS4Test", !7, i64 0, !10, i64 32, !13, i64 36, !14, i64 40, !6, i64 48, !6, i64 56, !6, i64 64}
!13 = !{!"float", !7, i64 0}
!14 = !{!"double", !7, i64 0}
!15 = !{!12, !13, i64 36}
!16 = !{!12, !14, i64 40}
!17 = !{!12, !6, i64 48}
!18 = !{!12, !6, i64 56}
!19 = !{!12, !6, i64 64}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = distinct !{!22, !21}
!23 = distinct !{!23, !21}
!24 = distinct !{!24, !21}
!25 = !{!26, !10, i64 0}
!26 = !{!"_ZTS5MList", !10, i64 0, !6, i64 8}
!27 = !{!26, !6, i64 8}
!28 = distinct !{!28, !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"

%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<Test, std::allocator<Test>>::_Vector_impl" }
%"struct.std::_Vector_base<Test, std::allocator<Test>>::_Vector_impl" = type { %"struct.std::_Vector_base<Test, std::allocator<Test>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Test, std::allocator<Test>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.Test = type { [32 x i8], i32, float, double, ptr, ptr, ptr }

@.str = external hidden unnamed_addr constant [17 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [75 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [16 x i8], align 1
@__FUNCTION__._Z11test_structv = external hidden unnamed_addr constant [12 x i8], align 1

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

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

declare i32 @m_Rand(i32 noundef, i32 noundef) local_unnamed_addr #2

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

declare i32 @__gxx_personality_v0(...)

declare void @_mTimerBegin(ptr noundef) local_unnamed_addr #2

declare float @_mTimerEnd(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #2

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

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

declare void @mListRelease(ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local void @_Z11test_structv() local_unnamed_addr #4 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::vector.0", align 8
  %2 = tail call noalias dereferenceable_or_null(720000000) ptr @malloc(i64 noundef 720000000) #6
  br label %3

3:                                                ; preds = %0, %3
  %indvars.iv = phi i64 [ 0, %0 ], [ %indvars.iv.next, %3 ]
  %4 = tail call i32 @m_Rand(i32 noundef -10000, i32 noundef 10000)
  %5 = getelementptr inbounds %struct.Test, ptr %2, i64 %indvars.iv
  %6 = getelementptr inbounds i8, ptr %5, i64 32
  store i32 %4, ptr %6, align 8, !tbaa !5
  %7 = tail call i32 @m_Rand(i32 noundef -10000, i32 noundef 10000)
  %8 = sitofp i32 %7 to float
  %9 = fdiv float %8, 1.000000e+05
  %10 = getelementptr inbounds i8, ptr %5, i64 36
  store float %9, ptr %10, align 4, !tbaa !13
  %11 = tail call i32 @m_Rand(i32 noundef -10000, i32 noundef 10000)
  %12 = sitofp i32 %11 to double
  %13 = fdiv double %12, 1.000000e+05
  %14 = getelementptr inbounds i8, ptr %5, i64 40
  store double %13, ptr %14, align 8, !tbaa !14
  %15 = getelementptr inbounds i8, ptr %5, i64 48
  store ptr %6, ptr %15, align 8, !tbaa !15
  %16 = getelementptr inbounds i8, ptr %5, i64 56
  store ptr %10, ptr %16, align 8, !tbaa !16
  %17 = getelementptr inbounds i8, ptr %5, i64 64
  store ptr %14, ptr %17, align 8, !tbaa !17
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 10000000
  br i1 %exitcond.not, label %18, label %3, !llvm.loop !18

18:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %1) #7
  call void @_ZNSt6vectorI4TestSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #7
  %19 = invoke ptr @ListCreate(i32 noundef -1, ptr noundef null)
          to label %20 unwind label %.loopexit.split-lp.loopexit.split-lp

20:                                               ; preds = %18
  invoke void @_mTimerBegin(ptr noundef nonnull @.str)
          to label %.preheader50 unwind label %.loopexit.split-lp.loopexit.split-lp

.preheader50:                                     ; preds = %20, %22
  %indvars.iv60 = phi i64 [ %indvars.iv.next61, %22 ], [ 0, %20 ]
  %21 = getelementptr inbounds %struct.Test, ptr %2, i64 %indvars.iv60
  invoke void @_ZNSt6vectorI4TestSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(72) %21)
          to label %22 unwind label %.loopexit.split-lp.loopexit

22:                                               ; preds = %.preheader50
  %indvars.iv.next61 = add nuw nsw i64 %indvars.iv60, 1
  %exitcond63.not = icmp eq i64 %indvars.iv.next61, 10000000
  br i1 %exitcond63.not, label %23, label %.preheader50, !llvm.loop !20

.loopexit:                                        ; preds = %.preheader49
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

.loopexit.split-lp.loopexit:                      ; preds = %.preheader50
  %lpad.loopexit51 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

.loopexit.split-lp.loopexit.split-lp:             ; preds = %56, %54, %47, %45, %32, %30, %25, %23, %20, %18
  %lpad.loopexit.split-lp52 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

23:                                               ; preds = %22
  %24 = invoke float @_mTimerEnd(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 85, ptr noundef nonnull @__FUNCTION__._Z11test_structv)
          to label %25 unwind label %.loopexit.split-lp.loopexit.split-lp

25:                                               ; preds = %23
  invoke void @_mTimerBegin(ptr noundef nonnull @.str.2)
          to label %.preheader49 unwind label %.loopexit.split-lp.loopexit.split-lp

.preheader49:                                     ; preds = %25, %29
  %indvars.iv64 = phi i64 [ %indvars.iv.next65, %29 ], [ 0, %25 ]
  %26 = getelementptr inbounds %struct.Test, ptr %2, i64 %indvars.iv64
  %27 = trunc nuw nsw i64 %indvars.iv64 to i32
  %28 = invoke ptr @mListWrite(ptr noundef %19, i32 noundef %27, ptr noundef %26, i32 noundef 72)
          to label %29 unwind label %.loopexit

29:                                               ; preds = %.preheader49
  %indvars.iv.next65 = add nuw nsw i64 %indvars.iv64, 1
  %exitcond67.not = icmp eq i64 %indvars.iv.next65, 10000000
  br i1 %exitcond67.not, label %30, label %.preheader49, !llvm.loop !21

30:                                               ; preds = %29
  %31 = invoke float @_mTimerEnd(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.1, i32 noundef 90, ptr noundef nonnull @__FUNCTION__._Z11test_structv)
          to label %32 unwind label %.loopexit.split-lp.loopexit.split-lp

32:                                               ; preds = %30
  invoke void @_mTimerBegin(ptr noundef nonnull @.str.3)
          to label %.preheader48 unwind label %.loopexit.split-lp.loopexit.split-lp

.preheader48:                                     ; preds = %32, %39
  %.357 = phi i32 [ %40, %39 ], [ 0, %32 ]
  %33 = call noundef i64 @_ZNKSt6vectorI4TestSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #7
  %34 = trunc i64 %33 to i32
  %35 = invoke i32 @m_Rand(i32 noundef 0, i32 noundef %34)
          to label %36 unwind label %41

36:                                               ; preds = %.preheader48
  %37 = sext i32 %35 to i64
  %38 = invoke noundef nonnull align 8 dereferenceable(72) ptr @_ZNSt6vectorI4TestSaIS0_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %37)
          to label %39 unwind label %43

39:                                               ; preds = %36
  %40 = add nuw nsw i32 %.357, 1
  %exitcond68.not = icmp eq i32 %40, 10000000
  br i1 %exitcond68.not, label %45, label %.preheader48, !llvm.loop !22

41:                                               ; preds = %.preheader48
  %42 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

43:                                               ; preds = %36
  %44 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

45:                                               ; preds = %39
  %46 = invoke float @_mTimerEnd(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.1, i32 noundef 98, ptr noundef nonnull @__FUNCTION__._Z11test_structv)
          to label %47 unwind label %.loopexit.split-lp.loopexit.split-lp

47:                                               ; preds = %45
  invoke void @_mTimerBegin(ptr noundef nonnull @.str.4)
          to label %.preheader unwind label %.loopexit.split-lp.loopexit.split-lp

.preheader:                                       ; preds = %47, %50
  %.458 = phi i32 [ %51, %50 ], [ 0, %47 ]
  %48 = load i32, ptr %19, align 8, !tbaa !23
  %49 = invoke i32 @m_Rand(i32 noundef 0, i32 noundef %48)
          to label %50 unwind label %52

50:                                               ; preds = %.preheader
  %51 = add nuw nsw i32 %.458, 1
  %exitcond69.not = icmp eq i32 %51, 10000000
  br i1 %exitcond69.not, label %54, label %.preheader, !llvm.loop !25

52:                                               ; preds = %.preheader
  %53 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

54:                                               ; preds = %50
  %55 = invoke float @_mTimerEnd(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1, i32 noundef 106, ptr noundef nonnull @__FUNCTION__._Z11test_structv)
          to label %56 unwind label %.loopexit.split-lp.loopexit.split-lp

56:                                               ; preds = %54
  invoke void @mListRelease(ptr noundef nonnull %19)
          to label %57 unwind label %.loopexit.split-lp.loopexit.split-lp

57:                                               ; preds = %56
  call void @free(ptr noundef %2) #7
  call void @_ZNSt6vectorI4TestSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %1) #7
  ret void

.loopexit.split-lp:                               ; preds = %.loopexit, %.loopexit.split-lp.loopexit.split-lp, %.loopexit.split-lp.loopexit, %41, %43, %52
  %.pn46 = phi { ptr, i32 } [ %53, %52 ], [ %44, %43 ], [ %42, %41 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit51, %.loopexit.split-lp.loopexit ], [ %lpad.loopexit.split-lp52, %.loopexit.split-lp.loopexit.split-lp ]
  call void @_ZNSt6vectorI4TestSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %1) #7
  resume { ptr, i32 } %.pn46
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorI4TestSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorI4TestSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(72)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorI4TestSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(72) ptr @_ZNSt6vectorI4TestSaIS0_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorI4TestSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #5 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, 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 #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 = { mustprogress 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 #6 = { nounwind allocsize(0) }
attributes #7 = { 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, !9, i64 32}
!6 = !{!"_ZTS4Test", !7, i64 0, !9, i64 32, !10, i64 36, !11, i64 40, !12, i64 48, !12, i64 56, !12, i64 64}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!"int", !7, i64 0}
!10 = !{!"float", !7, i64 0}
!11 = !{!"double", !7, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!6, !10, i64 36}
!14 = !{!6, !11, i64 40}
!15 = !{!6, !12, i64 48}
!16 = !{!6, !12, i64 56}
!17 = !{!6, !12, i64 64}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}
!21 = distinct !{!21, !19}
!22 = distinct !{!22, !19}
!23 = !{!24, !9, i64 0}
!24 = !{!"_ZTS5MList", !9, i64 0, !12, i64 8}
!25 = distinct !{!25, !19}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass