; LLVM IR from cjurjiu/RubikDetector-Android :: rubikdetectorcore/src/data/processing/RubikFacelet.ll (ZN4rbdt12RubikFacelet7cornersEv)

; 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" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<rbdt::Point2d, std::allocator<rbdt::Point2d>>::_Vector_impl" }
%"struct.std::_Vector_base<rbdt::Point2d, std::allocator<rbdt::Point2d>>::_Vector_impl" = type { %"struct.std::_Vector_base<rbdt::Point2d, std::allocator<rbdt::Point2d>>::_Vector_impl_data" }
%"struct.std::_Vector_base<rbdt::Point2d, std::allocator<rbdt::Point2d>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }
%"class.rbdt::Point2d" = type { float, float }
%"class.rbdt::RubikFacelet" = type { i32, %"class.rbdt::Point2d", float, float, float }

declare void @_ZN4rbdt7Point2dC1Eff(ptr noundef nonnull align 4 dereferenceable(8), float noundef, float noundef) unnamed_addr #0

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nounwind
declare void @_ZN4rbdt7Point2dD1Ev(ptr noundef nonnull align 4 dereferenceable(8)) unnamed_addr #1

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4rbdt12RubikFacelet7cornersEv(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8 %0, ptr noundef nonnull align 4 dereferenceable(24) %1) #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i1, align 1
  %6 = alloca %"class.std::allocator", align 1
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca float, align 4
  %10 = alloca float, align 4
  %11 = alloca %"class.rbdt::Point2d", align 4
  %12 = alloca %"class.rbdt::Point2d", align 4
  %13 = alloca %"class.rbdt::Point2d", align 4
  %14 = alloca %"class.rbdt::Point2d", align 4
  store ptr %0, ptr %3, align 8
  store ptr %1, ptr %4, align 8, !tbaa !5
  %15 = load ptr, ptr %4, align 8
  store i1 false, ptr %5, align 1
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #8
  call void @_ZNSaIN4rbdt7Point2dEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #8
  invoke void @_ZNSt6vectorIN4rbdt7Point2dESaIS1_EEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 4, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %16 unwind label %118

16:                                               ; preds = %2
  call void @_ZNSt15__new_allocatorIN4rbdt7Point2dEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #8
  %17 = getelementptr inbounds %"class.rbdt::RubikFacelet", ptr %15, i32 0, i32 4
  %18 = load float, ptr %17, align 4, !tbaa !9
  %19 = invoke noundef float @_ZSt3sinf(float noundef %18)
          to label %20 unwind label %122

20:                                               ; preds = %16
  %21 = fmul float %19, 5.000000e-01
  store float %21, ptr %9, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #8
  %22 = getelementptr inbounds %"class.rbdt::RubikFacelet", ptr %15, i32 0, i32 4
  %23 = load float, ptr %22, align 4, !tbaa !9
  %24 = invoke noundef float @_ZSt3cosf(float noundef %23)
          to label %25 unwind label %126

25:                                               ; preds = %20
  %26 = fmul float %24, 5.000000e-01
  store float %26, ptr %10, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  %27 = getelementptr inbounds %"class.rbdt::RubikFacelet", ptr %15, i32 0, i32 1
  %28 = getelementptr inbounds %"class.rbdt::Point2d", ptr %27, i32 0, i32 0
  %29 = load float, ptr %28, align 4, !tbaa !15
  %30 = load float, ptr %9, align 4, !tbaa !14
  %31 = getelementptr inbounds %"class.rbdt::RubikFacelet", ptr %15, i32 0, i32 3
  %32 = load float, ptr %31, align 4, !tbaa !16
  %33 = fneg float %30
  %34 = call float @llvm.fmuladd.f32(float %33, float %32, float %29)
  %35 = load float, ptr %10, align 4, !tbaa !14
  %36 = getelementptr inbounds %"class.rbdt::RubikFacelet", ptr %15, i32 0, i32 2
  %37 = load float, ptr %36, align 4, !tbaa !17
  %38 = fneg float %35
  %39 = call float @llvm.fmuladd.f32(float %38, float %37, float %34)
  %40 = getelementptr inbounds %"class.rbdt::RubikFacelet", ptr %15, i32 0, i32 1
  %41 = getelementptr inbounds %"class.rbdt::Point2d", ptr %40, i32 0, i32 1
  %42 = load float, ptr %41, align 4, !tbaa !18
  %43 = load float, ptr %10, align 4, !tbaa !14
  %44 = getelementptr inbounds %"class.rbdt::RubikFacelet", ptr %15, i32 0, i32 3
  %45 = load float, ptr %44, align 4, !tbaa !16
  %46 = call float @llvm.fmuladd.f32(float %43, float %45, float %42)
  %47 = load float, ptr %9, align 4, !tbaa !14
  %48 = getelementptr inbounds %"class.rbdt::RubikFacelet", ptr %15, i32 0, i32 2
  %49 = load float, ptr %48, align 4, !tbaa !17
  %50 = fneg float %47
  %51 = call float @llvm.fmuladd.f32(float %50, float %49, float %46)
  invoke void @_ZN4rbdt7Point2dC1Eff(ptr noundef nonnull align 4 dereferenceable(8) %11, float noundef %39, float noundef %51)
          to label %52 unwind label %130

52:                                               ; preds = %25
  %53 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorIN4rbdt7Point2dESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 0) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %53, ptr align 4 %11, i64 8, i1 false), !tbaa.struct !19
  call void @_ZN4rbdt7Point2dD1Ev(ptr noundef nonnull align 4 dereferenceable(8) %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #8
  %54 = getelementptr inbounds %"class.rbdt::RubikFacelet", ptr %15, i32 0, i32 1
  %55 = getelementptr inbounds %"class.rbdt::Point2d", ptr %54, i32 0, i32 0
  %56 = load float, ptr %55, align 4, !tbaa !15
  %57 = load float, ptr %9, align 4, !tbaa !14
  %58 = getelementptr inbounds %"class.rbdt::RubikFacelet", ptr %15, i32 0, i32 3
  %59 = load float, ptr %58, align 4, !tbaa !16
  %60 = call float @llvm.fmuladd.f32(float %57, float %59, float %56)
  %61 = load float, ptr %10, align 4, !tbaa !14
  %62 = getelementptr inbounds %"class.rbdt::RubikFacelet", ptr %15, i32 0, i32 2
  %63 = load float, ptr %62, align 4, !tbaa !17
  %64 = fneg float %61
  %65 = call float @llvm.fmuladd.f32(float %64, float %63, float %60)
  %66 = getelementptr inbounds %"class.rbdt::RubikFacelet", ptr %15, i32 0, i32 1
  %67 = getelementptr inbounds %"class.rbdt::Point2d", ptr %66, i32 0, i32 1
  %68 = load float, ptr %67, align 4, !tbaa !18
  %69 = load float, ptr %10, align 4, !tbaa !14
  %70 = getelementptr inbounds %"class.rbdt::RubikFacelet", ptr %15, i32 0, i32 3
  %71 = load float, ptr %70, align 4, !tbaa !16
  %72 = fneg float %69
  %73 = call float @llvm.fmuladd.f32(float %72, float %71, float %68)
  %74 = load float, ptr %9, align 4, !tbaa !14
  %75 = getelementptr inbounds %"class.rbdt::RubikFacelet", ptr %15, i32 0, i32 2
  %76 = load float, ptr %75, align 4, !tbaa !17
  %77 = fneg float %74
  %78 = call float @llvm.fmuladd.f32(float %77, float %76, float %73)
  invoke void @_ZN4rbdt7Point2dC1Eff(ptr noundef nonnull align 4 dereferenceable(8) %12, float noundef %65, float noundef %78)
          to label %79 unwind label %134

79:                                               ; preds = %52
  %80 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorIN4rbdt7Point2dESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 1) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %80, ptr align 4 %12, i64 8, i1 false), !tbaa.struct !19
  call void @_ZN4rbdt7Point2dD1Ev(ptr noundef nonnull align 4 dereferenceable(8) %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #8
  %81 = getelementptr inbounds %"class.rbdt::RubikFacelet", ptr %15, i32 0, i32 1
  %82 = getelementptr inbounds %"class.rbdt::Point2d", ptr %81, i32 0, i32 0
  %83 = load float, ptr %82, align 4, !tbaa !15
  %84 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorIN4rbdt7Point2dESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 0) #8
  %85 = getelementptr inbounds %"class.rbdt::Point2d", ptr %84, i32 0, i32 0
  %86 = load float, ptr %85, align 4, !tbaa !20
  %87 = fneg float %86
  %88 = call float @llvm.fmuladd.f32(float 2.000000e+00, float %83, float %87)
  %89 = getelementptr inbounds %"class.rbdt::RubikFacelet", ptr %15, i32 0, i32 1
  %90 = getelementptr inbounds %"class.rbdt::Point2d", ptr %89, i32 0, i32 1
  %91 = load float, ptr %90, align 4, !tbaa !18
  %92 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorIN4rbdt7Point2dESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 0) #8
  %93 = getelementptr inbounds %"class.rbdt::Point2d", ptr %92, i32 0, i32 1
  %94 = load float, ptr %93, align 4, !tbaa !21
  %95 = fneg float %94
  %96 = call float @llvm.fmuladd.f32(float 2.000000e+00, float %91, float %95)
  invoke void @_ZN4rbdt7Point2dC1Eff(ptr noundef nonnull align 4 dereferenceable(8) %13, float noundef %88, float noundef %96)
          to label %97 unwind label %138

97:                                               ; preds = %79
  %98 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorIN4rbdt7Point2dESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 2) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %98, ptr align 4 %13, i64 8, i1 false), !tbaa.struct !19
  call void @_ZN4rbdt7Point2dD1Ev(ptr noundef nonnull align 4 dereferenceable(8) %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #8
  %99 = getelementptr inbounds %"class.rbdt::RubikFacelet", ptr %15, i32 0, i32 1
  %100 = getelementptr inbounds %"class.rbdt::Point2d", ptr %99, i32 0, i32 0
  %101 = load float, ptr %100, align 4, !tbaa !15
  %102 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorIN4rbdt7Point2dESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 1) #8
  %103 = getelementptr inbounds %"class.rbdt::Point2d", ptr %102, i32 0, i32 0
  %104 = load float, ptr %103, align 4, !tbaa !20
  %105 = fneg float %104
  %106 = call float @llvm.fmuladd.f32(float 2.000000e+00, float %101, float %105)
  %107 = getelementptr inbounds %"class.rbdt::RubikFacelet", ptr %15, i32 0, i32 1
  %108 = getelementptr inbounds %"class.rbdt::Point2d", ptr %107, i32 0, i32 1
  %109 = load float, ptr %108, align 4, !tbaa !18
  %110 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorIN4rbdt7Point2dESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 1) #8
  %111 = getelementptr inbounds %"class.rbdt::Point2d", ptr %110, i32 0, i32 1
  %112 = load float, ptr %111, align 4, !tbaa !21
  %113 = fneg float %112
  %114 = call float @llvm.fmuladd.f32(float 2.000000e+00, float %109, float %113)
  invoke void @_ZN4rbdt7Point2dC1Eff(ptr noundef nonnull align 4 dereferenceable(8) %14, float noundef %106, float noundef %114)
          to label %115 unwind label %142

115:                                              ; preds = %97
  %116 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorIN4rbdt7Point2dESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 3) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %116, ptr align 4 %14, i64 8, i1 false), !tbaa.struct !19
  call void @_ZN4rbdt7Point2dD1Ev(ptr noundef nonnull align 4 dereferenceable(8) %14) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  store i1 true, ptr %5, align 1
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  %117 = load i1, ptr %5, align 1
  br i1 %117, label %149, label %148

118:                                              ; preds = %2
  %119 = landingpad { ptr, i32 }
          cleanup
  %120 = extractvalue { ptr, i32 } %119, 0
  store ptr %120, ptr %7, align 8
  %121 = extractvalue { ptr, i32 } %119, 1
  store i32 %121, ptr %8, align 4
  call void @_ZNSt15__new_allocatorIN4rbdt7Point2dEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #8
  br label %150

122:                                              ; preds = %16
  %123 = landingpad { ptr, i32 }
          cleanup
  %124 = extractvalue { ptr, i32 } %123, 0
  store ptr %124, ptr %7, align 8
  %125 = extractvalue { ptr, i32 } %123, 1
  store i32 %125, ptr %8, align 4
  br label %147

126:                                              ; preds = %20
  %127 = landingpad { ptr, i32 }
          cleanup
  %128 = extractvalue { ptr, i32 } %127, 0
  store ptr %128, ptr %7, align 8
  %129 = extractvalue { ptr, i32 } %127, 1
  store i32 %129, ptr %8, align 4
  br label %146

130:                                              ; preds = %25
  %131 = landingpad { ptr, i32 }
          cleanup
  %132 = extractvalue { ptr, i32 } %131, 0
  store ptr %132, ptr %7, align 8
  %133 = extractvalue { ptr, i32 } %131, 1
  store i32 %133, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  br label %146

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

138:                                              ; preds = %79
  %139 = landingpad { ptr, i32 }
          cleanup
  %140 = extractvalue { ptr, i32 } %139, 0
  store ptr %140, ptr %7, align 8
  %141 = extractvalue { ptr, i32 } %139, 1
  store i32 %141, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  br label %146

142:                                              ; preds = %97
  %143 = landingpad { ptr, i32 }
          cleanup
  %144 = extractvalue { ptr, i32 } %143, 0
  store ptr %144, ptr %7, align 8
  %145 = extractvalue { ptr, i32 } %143, 1
  store i32 %145, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  br label %146

146:                                              ; preds = %142, %138, %134, %130, %126
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  br label %147

147:                                              ; preds = %146, %122
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  call void @_ZNSt6vectorIN4rbdt7Point2dESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #8
  br label %150

148:                                              ; preds = %115
  call void @_ZNSt6vectorIN4rbdt7Point2dESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #8
  br label %149

149:                                              ; preds = %148, %115
  ret void

150:                                              ; preds = %147, %118
  %151 = load ptr, ptr %7, align 8
  %152 = load i32, ptr %8, align 4
  %153 = insertvalue { ptr, i32 } poison, ptr %151, 0
  %154 = insertvalue { ptr, i32 } %153, i32 %152, 1
  resume { ptr, i32 } %154
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIN4rbdt7Point2dESaIS1_EEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt3sinf(float noundef) #6

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt3cosf(float noundef) #6

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #7

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

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

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

attributes #0 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nounwind "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 nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { inlinehint 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 #7 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #8 = { 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, !13, i64 20}
!10 = !{!"_ZTSN4rbdt12RubikFaceletE", !11, i64 0, !12, i64 4, !13, i64 12, !13, i64 16, !13, i64 20}
!11 = !{!"_ZTSN4rbdt12RubikFacelet5ColorE", !7, i64 0}
!12 = !{!"_ZTSN4rbdt7Point2dE", !13, i64 0, !13, i64 4}
!13 = !{!"float", !7, i64 0}
!14 = !{!13, !13, i64 0}
!15 = !{!10, !13, i64 4}
!16 = !{!10, !13, i64 16}
!17 = !{!10, !13, i64 12}
!18 = !{!10, !13, i64 8}
!19 = !{i64 0, i64 4, !14, i64 4, i64 4, !14}
!20 = !{!12, !13, i64 0}
!21 = !{!12, !13, i64 4}


; 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" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<rbdt::Point2d, std::allocator<rbdt::Point2d>>::_Vector_impl" }
%"struct.std::_Vector_base<rbdt::Point2d, std::allocator<rbdt::Point2d>>::_Vector_impl" = type { %"struct.std::_Vector_base<rbdt::Point2d, std::allocator<rbdt::Point2d>>::_Vector_impl_data" }
%"struct.std::_Vector_base<rbdt::Point2d, std::allocator<rbdt::Point2d>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }
%"class.rbdt::Point2d" = type { float, float }

declare void @_ZN4rbdt7Point2dC1Eff(ptr noundef nonnull align 4 dereferenceable(8), float noundef, float noundef) unnamed_addr #0

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nounwind
declare void @_ZN4rbdt7Point2dD1Ev(ptr noundef nonnull align 4 dereferenceable(8)) unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4rbdt12RubikFacelet7cornersEv(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8 %0, ptr nocapture noundef nonnull readonly align 4 dereferenceable(24) %1) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::allocator", align 1
  %4 = alloca %"class.rbdt::Point2d", align 8
  %5 = alloca %"class.rbdt::Point2d", align 8
  %6 = alloca %"class.rbdt::Point2d", align 8
  %7 = alloca %"class.rbdt::Point2d", align 8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #7
  call void @_ZNSaIN4rbdt7Point2dEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #7
  invoke void @_ZNSt6vectorIN4rbdt7Point2dESaIS1_EEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 4, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %8 unwind label %72

8:                                                ; preds = %2
  call void @_ZNSt15__new_allocatorIN4rbdt7Point2dEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #7
  %9 = getelementptr inbounds i8, ptr %1, i64 20
  %10 = load float, ptr %9, align 4, !tbaa !5
  %11 = call noundef float @_ZSt3sinf(float noundef %10)
  %12 = fmul float %11, 5.000000e-01
  %13 = load float, ptr %9, align 4, !tbaa !5
  %14 = call noundef float @_ZSt3cosf(float noundef %13)
  %15 = fmul float %14, 5.000000e-01
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  %16 = getelementptr inbounds i8, ptr %1, i64 4
  %17 = load float, ptr %16, align 4, !tbaa !12
  %18 = getelementptr inbounds i8, ptr %1, i64 16
  %19 = load float, ptr %18, align 4, !tbaa !13
  %20 = fneg float %12
  %21 = call float @llvm.fmuladd.f32(float %20, float %19, float %17)
  %22 = getelementptr inbounds i8, ptr %1, i64 12
  %23 = load float, ptr %22, align 4, !tbaa !14
  %24 = fneg float %15
  %25 = call float @llvm.fmuladd.f32(float %24, float %23, float %21)
  %26 = getelementptr inbounds i8, ptr %1, i64 8
  %27 = load float, ptr %26, align 4, !tbaa !15
  %28 = call float @llvm.fmuladd.f32(float %15, float %19, float %27)
  %29 = call float @llvm.fmuladd.f32(float %20, float %23, float %28)
  invoke void @_ZN4rbdt7Point2dC1Eff(ptr noundef nonnull align 4 dereferenceable(8) %4, float noundef %25, float noundef %29)
          to label %30 unwind label %74

30:                                               ; preds = %8
  %31 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorIN4rbdt7Point2dESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 0) #7
  %32 = load i64, ptr %4, align 8
  store i64 %32, ptr %31, align 4
  call void @_ZN4rbdt7Point2dD1Ev(ptr noundef nonnull align 4 dereferenceable(8) %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  %33 = load float, ptr %16, align 4, !tbaa !12
  %34 = load float, ptr %18, align 4, !tbaa !13
  %35 = call float @llvm.fmuladd.f32(float %12, float %34, float %33)
  %36 = load float, ptr %22, align 4, !tbaa !14
  %37 = call float @llvm.fmuladd.f32(float %24, float %36, float %35)
  %38 = load float, ptr %26, align 4, !tbaa !15
  %39 = call float @llvm.fmuladd.f32(float %24, float %34, float %38)
  %40 = call float @llvm.fmuladd.f32(float %20, float %36, float %39)
  invoke void @_ZN4rbdt7Point2dC1Eff(ptr noundef nonnull align 4 dereferenceable(8) %5, float noundef %37, float noundef %40)
          to label %41 unwind label %76

41:                                               ; preds = %30
  %42 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorIN4rbdt7Point2dESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 1) #7
  %43 = load i64, ptr %5, align 8
  store i64 %43, ptr %42, align 4
  call void @_ZN4rbdt7Point2dD1Ev(ptr noundef nonnull align 4 dereferenceable(8) %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  %44 = load float, ptr %16, align 4, !tbaa !12
  %45 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorIN4rbdt7Point2dESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 0) #7
  %46 = load float, ptr %45, align 4, !tbaa !16
  %47 = fneg float %46
  %48 = call float @llvm.fmuladd.f32(float %44, float 2.000000e+00, float %47)
  %49 = load float, ptr %26, align 4, !tbaa !15
  %50 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorIN4rbdt7Point2dESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 0) #7
  %51 = getelementptr inbounds i8, ptr %50, i64 4
  %52 = load float, ptr %51, align 4, !tbaa !17
  %53 = fneg float %52
  %54 = call float @llvm.fmuladd.f32(float %49, float 2.000000e+00, float %53)
  invoke void @_ZN4rbdt7Point2dC1Eff(ptr noundef nonnull align 4 dereferenceable(8) %6, float noundef %48, float noundef %54)
          to label %55 unwind label %78

55:                                               ; preds = %41
  %56 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorIN4rbdt7Point2dESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 2) #7
  %57 = load i64, ptr %6, align 8
  store i64 %57, ptr %56, align 4
  call void @_ZN4rbdt7Point2dD1Ev(ptr noundef nonnull align 4 dereferenceable(8) %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  %58 = load float, ptr %16, align 4, !tbaa !12
  %59 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorIN4rbdt7Point2dESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 1) #7
  %60 = load float, ptr %59, align 4, !tbaa !16
  %61 = fneg float %60
  %62 = call float @llvm.fmuladd.f32(float %58, float 2.000000e+00, float %61)
  %63 = load float, ptr %26, align 4, !tbaa !15
  %64 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorIN4rbdt7Point2dESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 1) #7
  %65 = getelementptr inbounds i8, ptr %64, i64 4
  %66 = load float, ptr %65, align 4, !tbaa !17
  %67 = fneg float %66
  %68 = call float @llvm.fmuladd.f32(float %63, float 2.000000e+00, float %67)
  invoke void @_ZN4rbdt7Point2dC1Eff(ptr noundef nonnull align 4 dereferenceable(8) %7, float noundef %62, float noundef %68)
          to label %69 unwind label %80

69:                                               ; preds = %55
  %70 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorIN4rbdt7Point2dESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 3) #7
  %71 = load i64, ptr %7, align 8
  store i64 %71, ptr %70, align 4
  call void @_ZN4rbdt7Point2dD1Ev(ptr noundef nonnull align 4 dereferenceable(8) %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  ret void

72:                                               ; preds = %2
  %73 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIN4rbdt7Point2dEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #7
  br label %83

74:                                               ; preds = %8
  %75 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  br label %82

76:                                               ; preds = %30
  %77 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  br label %82

78:                                               ; preds = %41
  %79 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  br label %82

80:                                               ; preds = %55
  %81 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  br label %82

82:                                               ; preds = %80, %78, %76, %74
  %.pn = phi { ptr, i32 } [ %81, %80 ], [ %79, %78 ], [ %77, %76 ], [ %75, %74 ]
  call void @_ZNSt6vectorIN4rbdt7Point2dESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #7
  br label %83

83:                                               ; preds = %82, %72
  %.pn.pn = phi { ptr, i32 } [ %.pn, %82 ], [ %73, %72 ]
  resume { ptr, i32 } %.pn.pn
}

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt3sinf(float noundef) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt3cosf(float noundef) local_unnamed_addr #5

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #6

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

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

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

attributes #0 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nounwind "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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #5 = { inlinehint 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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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, !11, i64 20}
!6 = !{!"_ZTSN4rbdt12RubikFaceletE", !7, i64 0, !10, i64 4, !11, i64 12, !11, i64 16, !11, i64 20}
!7 = !{!"_ZTSN4rbdt12RubikFacelet5ColorE", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN4rbdt7Point2dE", !11, i64 0, !11, i64 4}
!11 = !{!"float", !8, i64 0}
!12 = !{!6, !11, i64 4}
!13 = !{!6, !11, i64 16}
!14 = !{!6, !11, i64 12}
!15 = !{!6, !11, i64 8}
!16 = !{!10, !11, i64 0}
!17 = !{!10, !11, i64 4}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass