; LLVM IR from NishkarshRaj/Computer-Graphics :: OpenGL/Fractals (LSys)

; 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.vertex = type { double, double }
%struct.line = type { %struct.vertex, %struct.vertex }
%"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::allocator.0" = type { i8 }
%class.LSys = type { %"class.std::vector", %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", i32, double }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<line, std::allocator<line>>::_Vector_impl" }
%"struct.std::_Vector_base<line, std::allocator<line>>::_Vector_impl" = type { %"struct.std::_Vector_base<line, std::allocator<line>>::_Vector_impl_data" }
%"struct.std::_Vector_base<line, std::allocator<line>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@.str = external hidden unnamed_addr constant [1 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: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4LSys11buildHelperENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEd6vertex(ptr noundef nonnull align 8 dereferenceable(136) %0, ptr noundef %1, double noundef %2, double %3, double %4) #2 align 2 personality ptr @__gxx_personality_v0 {
  %6 = alloca %struct.vertex, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca double, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca %struct.vertex, align 8
  %13 = alloca %struct.line, align 8
  %14 = alloca %"class.std::__cxx11::basic_string", align 8
  %15 = alloca %"class.std::allocator.0", align 1
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca %"class.std::__cxx11::basic_string", align 8
  %21 = alloca %struct.vertex, align 8
  %22 = getelementptr inbounds { double, double }, ptr %6, i32 0, i32 0
  store double %3, ptr %22, align 8
  %23 = getelementptr inbounds { double, double }, ptr %6, i32 0, i32 1
  store double %4, ptr %23, align 8
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store double %2, ptr %9, align 8, !tbaa !9
  %24 = load ptr, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 0, ptr %10, align 4, !tbaa !11
  br label %25

25:                                               ; preds = %142, %5
  %26 = load i32, ptr %10, align 4, !tbaa !11
  %27 = sext i32 %26 to i64
  %28 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #6
  %29 = icmp ult i64 %27, %28
  br i1 %29, label %31, label %30

30:                                               ; preds = %25
  store i32 2, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %145

31:                                               ; preds = %25
  %32 = load i32, ptr %10, align 4, !tbaa !11
  %33 = sext i32 %32 to i64
  %34 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %33)
  %35 = load i8, ptr %34, align 1, !tbaa !13
  %36 = sext i8 %35 to i32
  switch i32 %36, label %141 [
    i32 45, label %37
    i32 43, label %42
    i32 70, label %47
    i32 91, label %79
  ]

37:                                               ; preds = %31
  %38 = getelementptr inbounds %class.LSys, ptr %24, i32 0, i32 5
  %39 = load double, ptr %38, align 8, !tbaa !14
  %40 = load double, ptr %9, align 8, !tbaa !9
  %41 = fsub double %40, %39
  store double %41, ptr %9, align 8, !tbaa !9
  br label %141

42:                                               ; preds = %31
  %43 = getelementptr inbounds %class.LSys, ptr %24, i32 0, i32 5
  %44 = load double, ptr %43, align 8, !tbaa !14
  %45 = load double, ptr %9, align 8, !tbaa !9
  %46 = fadd double %45, %44
  store double %46, ptr %9, align 8, !tbaa !9
  br label %141

47:                                               ; preds = %31
  %48 = getelementptr inbounds %struct.vertex, ptr %6, i32 0, i32 0
  %49 = load double, ptr %48, align 8, !tbaa !23
  %50 = load double, ptr %9, align 8, !tbaa !9
  %51 = fmul double %50, 0x400921FB53C8D4F1
  %52 = fdiv double %51, 1.800000e+02
  %53 = call double @sin(double noundef %52) #6
  %54 = getelementptr inbounds %class.LSys, ptr %24, i32 0, i32 4
  %55 = load i32, ptr %54, align 8, !tbaa !25
  %56 = sitofp i32 %55 to double
  %57 = call double @llvm.fmuladd.f64(double %53, double %56, double %49)
  %58 = getelementptr inbounds %struct.vertex, ptr %12, i32 0, i32 0
  store double %57, ptr %58, align 8, !tbaa !23
  %59 = getelementptr inbounds %struct.vertex, ptr %6, i32 0, i32 1
  %60 = load double, ptr %59, align 8, !tbaa !26
  %61 = load double, ptr %9, align 8, !tbaa !9
  %62 = fmul double %61, 0x400921FB53C8D4F1
  %63 = fdiv double %62, 1.800000e+02
  %64 = call double @cos(double noundef %63) #6
  %65 = getelementptr inbounds %class.LSys, ptr %24, i32 0, i32 4
  %66 = load i32, ptr %65, align 8, !tbaa !25
  %67 = sitofp i32 %66 to double
  %68 = call double @llvm.fmuladd.f64(double %64, double %67, double %60)
  %69 = getelementptr inbounds %struct.vertex, ptr %12, i32 0, i32 1
  store double %68, ptr %69, align 8, !tbaa !26
  %70 = getelementptr inbounds %struct.line, ptr %13, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %70, ptr align 8 %6, i64 16, i1 false), !tbaa.struct !27
  %71 = getelementptr inbounds %struct.line, ptr %13, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %71, ptr align 8 %12, i64 16, i1 false), !tbaa.struct !27
  %72 = getelementptr inbounds %class.LSys, ptr %24, i32 0, i32 0
  call void @_ZNSt6vectorI4lineSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %72, ptr noundef nonnull align 8 dereferenceable(32) %13)
  %73 = getelementptr inbounds %struct.vertex, ptr %12, i32 0, i32 0
  %74 = load double, ptr %73, align 8, !tbaa !23
  %75 = getelementptr inbounds %struct.vertex, ptr %6, i32 0, i32 0
  store double %74, ptr %75, align 8, !tbaa !23
  %76 = getelementptr inbounds %struct.vertex, ptr %12, i32 0, i32 1
  %77 = load double, ptr %76, align 8, !tbaa !26
  %78 = getelementptr inbounds %struct.vertex, ptr %6, i32 0, i32 1
  store double %77, ptr %78, align 8, !tbaa !26
  br label %141

79:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 32, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef @.str, ptr noundef nonnull align 1 dereferenceable(1) %15)
          to label %80 unwind label %89

80:                                               ; preds = %79
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  store i32 1, ptr %18, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  %81 = load i32, ptr %10, align 4, !tbaa !11
  %82 = add nsw i32 %81, 1
  store i32 %82, ptr %19, align 4, !tbaa !11
  br label %83

83:                                               ; preds = %134, %80
  %84 = load i32, ptr %19, align 4, !tbaa !11
  %85 = sext i32 %84 to i64
  %86 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #6
  %87 = icmp ult i64 %85, %86
  br i1 %87, label %93, label %88

88:                                               ; preds = %83
  store i32 6, ptr %11, align 4
  br label %137

89:                                               ; preds = %79
  %90 = landingpad { ptr, i32 }
          cleanup
  %91 = extractvalue { ptr, i32 } %90, 0
  store ptr %91, ptr %16, align 8
  %92 = extractvalue { ptr, i32 } %90, 1
  store i32 %92, ptr %17, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #6
  br label %140

93:                                               ; preds = %83
  %94 = load i32, ptr %19, align 4, !tbaa !11
  %95 = sext i32 %94 to i64
  %96 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %95)
          to label %97 unwind label %100

97:                                               ; preds = %93
  %98 = load i8, ptr %96, align 1, !tbaa !13
  %99 = sext i8 %98 to i32
  switch i32 %99, label %110 [
    i32 91, label %104
    i32 93, label %107
  ]

100:                                              ; preds = %130, %126, %113, %93
  %101 = landingpad { ptr, i32 }
          cleanup
  %102 = extractvalue { ptr, i32 } %101, 0
  store ptr %102, ptr %16, align 8
  %103 = extractvalue { ptr, i32 } %101, 1
  store i32 %103, ptr %17, align 4
  br label %138

104:                                              ; preds = %97
  %105 = load i32, ptr %18, align 4, !tbaa !11
  %106 = add nsw i32 %105, 1
  store i32 %106, ptr %18, align 4, !tbaa !11
  br label %110

107:                                              ; preds = %97
  %108 = load i32, ptr %18, align 4, !tbaa !11
  %109 = add nsw i32 %108, -1
  store i32 %109, ptr %18, align 4, !tbaa !11
  br label %110

110:                                              ; preds = %107, %104, %97
  %111 = load i32, ptr %18, align 4, !tbaa !11
  %112 = icmp eq i32 %111, 0
  br i1 %112, label %113, label %126

113:                                              ; preds = %110
  %114 = load i32, ptr %19, align 4, !tbaa !11
  store i32 %114, ptr %10, align 4, !tbaa !11
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %20, ptr noundef nonnull align 8 dereferenceable(32) %14)
          to label %115 unwind label %100

115:                                              ; preds = %113
  %116 = load double, ptr %9, align 8, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %21, ptr align 8 %6, i64 16, i1 false), !tbaa.struct !27
  %117 = getelementptr inbounds { double, double }, ptr %21, i32 0, i32 0
  %118 = load double, ptr %117, align 8
  %119 = getelementptr inbounds { double, double }, ptr %21, i32 0, i32 1
  %120 = load double, ptr %119, align 8
  invoke void @_ZN4LSys11buildHelperENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEd6vertex(ptr noundef nonnull align 8 dereferenceable(136) %24, ptr noundef %20, double noundef %116, double %118, double %120)
          to label %121 unwind label %122

121:                                              ; preds = %115
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #6
  store i32 6, ptr %11, align 4
  br label %137

122:                                              ; preds = %115
  %123 = landingpad { ptr, i32 }
          cleanup
  %124 = extractvalue { ptr, i32 } %123, 0
  store ptr %124, ptr %16, align 8
  %125 = extractvalue { ptr, i32 } %123, 1
  store i32 %125, ptr %17, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #6
  br label %138

126:                                              ; preds = %110
  %127 = load i32, ptr %19, align 4, !tbaa !11
  %128 = sext i32 %127 to i64
  %129 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %128)
          to label %130 unwind label %100

130:                                              ; preds = %126
  %131 = load i8, ptr %129, align 1, !tbaa !13
  %132 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) %14, i8 noundef signext %131)
          to label %133 unwind label %100

133:                                              ; preds = %130
  br label %134

134:                                              ; preds = %133
  %135 = load i32, ptr %19, align 4, !tbaa !11
  %136 = add nsw i32 %135, 1
  store i32 %136, ptr %19, align 4, !tbaa !11
  br label %83, !llvm.loop !28

137:                                              ; preds = %121, %88
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  br label %139

138:                                              ; preds = %122, %100
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #6
  br label %140

139:                                              ; preds = %137
  store i32 5, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #6
  br label %141

140:                                              ; preds = %138, %89
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %146

141:                                              ; preds = %139, %47, %42, %37, %31
  br label %142

142:                                              ; preds = %141
  %143 = load i32, ptr %10, align 4, !tbaa !11
  %144 = add nsw i32 %143, 1
  store i32 %144, ptr %10, align 4, !tbaa !11
  br label %25, !llvm.loop !30

145:                                              ; preds = %30
  ret void

146:                                              ; preds = %140
  %147 = load ptr, ptr %16, align 8
  %148 = load i32, ptr %17, align 4
  %149 = insertvalue { ptr, i32 } poison, ptr %147, 0
  %150 = insertvalue { ptr, i32 } %149, i32 %148, 1
  resume { ptr, i32 } %150
}

; 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) #3

; Function Attrs: mustprogress nounwind uwtable
declare noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) #1 align 2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32), i8 noundef signext) #2 align 2

; Function Attrs: nounwind
declare double @sin(double noundef) #4

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #5

; Function Attrs: nounwind
declare double @cos(double noundef) #4

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { 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 = !{!"double", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!7, !7, i64 0}
!14 = !{!15, !10, i64 128}
!15 = !{!"_ZTS4LSys", !16, i64 0, !20, i64 24, !20, i64 56, !20, i64 88, !12, i64 120, !10, i64 128}
!16 = !{!"_ZTSSt6vectorI4lineSaIS0_EE", !17, i64 0}
!17 = !{!"_ZTSSt12_Vector_baseI4lineSaIS0_EE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseI4lineSaIS0_EE12_Vector_implE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseI4lineSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!20 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !21, i64 0, !22, i64 8, !7, i64 16}
!21 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!22 = !{!"long", !7, i64 0}
!23 = !{!24, !10, i64 0}
!24 = !{!"_ZTS6vertex", !10, i64 0, !10, i64 8}
!25 = !{!15, !12, i64 120}
!26 = !{!24, !10, i64 8}
!27 = !{i64 0, i64 8, !9, i64 8, i64 8, !9}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}
!30 = distinct !{!30, !29}


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

%struct.line = type { %struct.vertex, %struct.vertex }
%struct.vertex = type { double, double }
%"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::allocator.0" = type { i8 }

@.str = external hidden unnamed_addr constant [1 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 nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

declare i32 @__gxx_personality_v0(...)

; 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 nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4LSys11buildHelperENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEd6vertex(ptr noundef nonnull align 8 dereferenceable(136) %0, ptr noundef nonnull %1, double noundef %2, double %3, double %4) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %6 = alloca %struct.line, align 8
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca %"class.std::allocator.0", align 1
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  %10 = tail call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #5
  %.not = icmp eq i64 %10, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %5
  %11 = getelementptr inbounds i8, ptr %0, i64 120
  %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %6, i64 8
  %12 = getelementptr inbounds i8, ptr %6, i64 16
  %13 = getelementptr inbounds i8, ptr %0, i64 128
  %14 = insertelement <2 x double> poison, double %3, i64 0
  %15 = insertelement <2 x double> %14, double %4, i64 1
  br label %16

._crit_edge:                                      ; preds = %70, %5
  ret void

16:                                               ; preds = %.lr.ph, %70
  %17 = phi i64 [ 0, %.lr.ph ], [ %73, %70 ]
  %.02640 = phi double [ %2, %.lr.ph ], [ %.127, %70 ]
  %.02839 = phi i32 [ 0, %.lr.ph ], [ %72, %70 ]
  %18 = phi <2 x double> [ %15, %.lr.ph ], [ %71, %70 ]
  %19 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %17)
  %20 = load i8, ptr %19, align 1, !tbaa !5
  switch i8 %20, label %70 [
    i8 45, label %21
    i8 43, label %24
    i8 70, label %27
    i8 91, label %42
  ]

21:                                               ; preds = %16
  %22 = load double, ptr %13, align 8, !tbaa !8
  %23 = fsub double %.02640, %22
  br label %70

24:                                               ; preds = %16
  %25 = load double, ptr %13, align 8, !tbaa !8
  %26 = fadd double %.02640, %25
  br label %70

27:                                               ; preds = %16
  %28 = fmul double %.02640, 0x400921FB53C8D4F1
  %29 = fdiv double %28, 1.800000e+02
  %30 = call double @sin(double noundef %29) #5
  %31 = load <4 x i32>, ptr %11, align 8
  %32 = shufflevector <4 x i32> %31, <4 x i32> poison, <2 x i32> <i32 0, i32 poison>
  %33 = call double @cos(double noundef %29) #5
  %34 = load i32, ptr %11, align 8, !tbaa !20
  %35 = extractelement <2 x double> %18, i64 0
  store double %35, ptr %6, align 8, !tbaa !21
  %36 = extractelement <2 x double> %18, i64 1
  store double %36, ptr %.sroa.5.0..sroa_idx, align 8, !tbaa !21
  %37 = insertelement <2 x i32> %32, i32 %34, i64 1
  %38 = sitofp <2 x i32> %37 to <2 x double>
  %39 = insertelement <2 x double> poison, double %30, i64 0
  %40 = insertelement <2 x double> %39, double %33, i64 1
  %41 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %40, <2 x double> %38, <2 x double> %18)
  store <2 x double> %41, ptr %12, align 8, !tbaa !21
  call void @_ZNSt6vectorI4lineSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(32) %6)
  br label %70

42:                                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull @.str, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %43 unwind label %48

43:                                               ; preds = %42
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #5
  %44 = sext i32 %.02839 to i64
  br label %45

45:                                               ; preds = %.thread, %43
  %indvars.iv = phi i64 [ %indvars.iv.next, %.thread ], [ %44, %43 ]
  %.021 = phi i32 [ %.135, %.thread ], [ 1, %43 ]
  %indvars.iv.next = add nsw i64 %indvars.iv, 1
  %46 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #5
  %47 = icmp ugt i64 %46, %indvars.iv.next
  br i1 %47, label %50, label %.loopexit

48:                                               ; preds = %42
  %49 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #5
  br label %69

50:                                               ; preds = %45
  %51 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %indvars.iv.next)
  %52 = load i8, ptr %51, align 1, !tbaa !5
  switch i8 %52, label %.thread [
    i8 91, label %54
    i8 93, label %53
  ]

.loopexit36:                                      ; preds = %.thread
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %68

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

53:                                               ; preds = %50
  br label %54

54:                                               ; preds = %50, %53
  %.sink = phi i32 [ -1, %53 ], [ 1, %50 ]
  %55 = add nsw i32 %.021, %.sink
  %56 = icmp eq i32 %55, 0
  br i1 %56, label %57, label %.thread

57:                                               ; preds = %54
  %58 = trunc nsw i64 %indvars.iv.next to i32
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull align 8 dereferenceable(32) %7)
          to label %59 unwind label %.loopexit.split-lp

59:                                               ; preds = %57
  %60 = extractelement <2 x double> %18, i64 0
  %61 = extractelement <2 x double> %18, i64 1
  invoke void @_ZN4LSys11buildHelperENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEd6vertex(ptr noundef nonnull align 8 dereferenceable(136) %0, ptr noundef nonnull %9, double noundef %.02640, double %60, double %61)
          to label %62 unwind label %63

62:                                               ; preds = %59
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #5
  br label %.loopexit

63:                                               ; preds = %59
  %64 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #5
  br label %68

.thread:                                          ; preds = %50, %54
  %.135 = phi i32 [ %55, %54 ], [ %.021, %50 ]
  %65 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %indvars.iv.next)
  %66 = load i8, ptr %65, align 1, !tbaa !5
  %67 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) %7, i8 noundef signext %66)
          to label %45 unwind label %.loopexit36, !llvm.loop !22

.loopexit:                                        ; preds = %45, %62
  %.129 = phi i32 [ %58, %62 ], [ %.02839, %45 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #5
  br label %70

68:                                               ; preds = %.loopexit36, %.loopexit.split-lp, %63
  %.pn = phi { ptr, i32 } [ %64, %63 ], [ %lpad.loopexit, %.loopexit36 ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #5
  br label %69

69:                                               ; preds = %68, %48
  %.pn.pn = phi { ptr, i32 } [ %.pn, %68 ], [ %49, %48 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #5
  resume { ptr, i32 } %.pn.pn

70:                                               ; preds = %16, %21, %24, %27, %.loopexit
  %.2 = phi i32 [ %.02839, %16 ], [ %.129, %.loopexit ], [ %.02839, %27 ], [ %.02839, %24 ], [ %.02839, %21 ]
  %.127 = phi double [ %.02640, %16 ], [ %.02640, %.loopexit ], [ %.02640, %27 ], [ %26, %24 ], [ %23, %21 ]
  %71 = phi <2 x double> [ %18, %16 ], [ %18, %.loopexit ], [ %41, %27 ], [ %18, %24 ], [ %18, %21 ]
  %72 = add nsw i32 %.2, 1
  %73 = sext i32 %72 to i64
  %74 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #5
  %75 = icmp ugt i64 %74, %73
  br i1 %75, label %16, label %._crit_edge, !llvm.loop !24
}

; Function Attrs: mustprogress nounwind uwtable
declare noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32), i8 noundef signext) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @sin(double noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @cos(double noundef) local_unnamed_addr #3

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <2 x double> @llvm.fmuladd.v2f64(<2 x double>, <2 x double>, <2 x double>) #4

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { mustprogress nofree nounwind willreturn memory(write) "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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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, !6, i64 0}
!6 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !19, i64 128}
!9 = !{!"_ZTS4LSys", !10, i64 0, !15, i64 24, !15, i64 56, !15, i64 88, !18, i64 120, !19, i64 128}
!10 = !{!"_ZTSSt6vectorI4lineSaIS0_EE", !11, i64 0}
!11 = !{!"_ZTSSt12_Vector_baseI4lineSaIS0_EE", !12, i64 0}
!12 = !{!"_ZTSNSt12_Vector_baseI4lineSaIS0_EE12_Vector_implE", !13, i64 0}
!13 = !{!"_ZTSNSt12_Vector_baseI4lineSaIS0_EE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!14 = !{!"any pointer", !6, i64 0}
!15 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !16, i64 0, !17, i64 8, !6, i64 16}
!16 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !14, i64 0}
!17 = !{!"long", !6, i64 0}
!18 = !{!"int", !6, i64 0}
!19 = !{!"double", !6, i64 0}
!20 = !{!9, !18, i64 120}
!21 = !{!19, !19, i64 0}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = distinct !{!24, !23}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalDCEPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass,VectorCombinePass