; LLVM IR from goldest-star/seawave-animation :: src/vcl/shape/mesh/mesh_primitive (mesh_primitive)

; 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<std::array<unsigned int, 3>, std::allocator<std::array<unsigned int, 3>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::array<unsigned int, 3>, std::allocator<std::array<unsigned int, 3>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::array<unsigned int, 3>, std::allocator<std::array<unsigned int, 3>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::array<unsigned int, 3>, std::allocator<std::array<unsigned int, 3>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.vcl::mat" = type { float, float, float, float, float, float, float, float, float }
%"struct.vcl::mesh" = type { %"struct.vcl::buffer", %"struct.vcl::buffer", %"struct.vcl::buffer.5", %"struct.vcl::buffer.11", %"struct.vcl::buffer.17" }
%"struct.vcl::buffer" = type { %"class.std::vector.0" }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<vcl::buffer_stack<float, 3>, std::allocator<vcl::buffer_stack<float, 3>>>::_Vector_impl" }
%"struct.std::_Vector_base<vcl::buffer_stack<float, 3>, std::allocator<vcl::buffer_stack<float, 3>>>::_Vector_impl" = type { %"struct.std::_Vector_base<vcl::buffer_stack<float, 3>, std::allocator<vcl::buffer_stack<float, 3>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<vcl::buffer_stack<float, 3>, std::allocator<vcl::buffer_stack<float, 3>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.vcl::buffer.5" = type { %"class.std::vector.6" }
%"class.std::vector.6" = type { %"struct.std::_Vector_base.7" }
%"struct.std::_Vector_base.7" = type { %"struct.std::_Vector_base<vcl::buffer_stack<float, 4>, std::allocator<vcl::buffer_stack<float, 4>>>::_Vector_impl" }
%"struct.std::_Vector_base<vcl::buffer_stack<float, 4>, std::allocator<vcl::buffer_stack<float, 4>>>::_Vector_impl" = type { %"struct.std::_Vector_base<vcl::buffer_stack<float, 4>, std::allocator<vcl::buffer_stack<float, 4>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<vcl::buffer_stack<float, 4>, std::allocator<vcl::buffer_stack<float, 4>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.vcl::buffer.11" = type { %"class.std::vector.12" }
%"class.std::vector.12" = type { %"struct.std::_Vector_base.13" }
%"struct.std::_Vector_base.13" = type { %"struct.std::_Vector_base<vcl::buffer_stack<float, 2>, std::allocator<vcl::buffer_stack<float, 2>>>::_Vector_impl" }
%"struct.std::_Vector_base<vcl::buffer_stack<float, 2>, std::allocator<vcl::buffer_stack<float, 2>>>::_Vector_impl" = type { %"struct.std::_Vector_base<vcl::buffer_stack<float, 2>, std::allocator<vcl::buffer_stack<float, 2>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<vcl::buffer_stack<float, 2>, std::allocator<vcl::buffer_stack<float, 2>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.vcl::buffer.17" = type { %"class.std::vector" }
%"struct.vcl::buffer_stack" = type { float, float, float }
%"struct.vcl::buffer_stack.18" = type { float, float }

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3vcl17connectivity_gridEmmbb(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8, i64 noundef, i64 noundef, i1 noundef zeroext, i1 noundef zeroext) #0

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

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) #1

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3vcl4meshC2Ev(ptr noundef nonnull align 8 dereferenceable(120)) unnamed_addr #3 align 2

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

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

declare void @_ZN3vcl12buffer_stackIfLm3EEC1Efff(ptr noundef nonnull align 4 dereferenceable(12), float noundef, float noundef, float noundef) unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare dso_local { <2 x float>, float } @_ZN3vcl9normalizeILm3EEENS_12buffer_stackIfXT_EEERKS2_(ptr noundef nonnull align 4 dereferenceable(12)) #6

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { <2 x float>, float } @_ZN3vclplIfLm3EEENS_12buffer_stackIT_XT0_EEERKS3_S5_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #0

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

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

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

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

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

declare void @_ZN3vcl28rotation_between_vector_mat3ERKNS_12buffer_stackIfLm3EEES3_(ptr dead_on_unwind writable sret(%"struct.vcl::mat") align 4, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #5

; Function Attrs: mustprogress uwtable
declare dso_local { <2 x float>, float } @_ZN3vclmlILm3ELm3EEENS_12buffer_stackIfXT_EEERKNS_3matIXT_EXT0_EEERKNS1_IfXT0_EEE(ptr noundef nonnull align 4 dereferenceable(36), ptr noundef nonnull align 4 dereferenceable(12)) #0

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3vcl20mesh_primitive_torusEffRKNS_12buffer_stackIfLm3EEES3_mmb(ptr dead_on_unwind noalias writable sret(%"struct.vcl::mesh") align 8 %0, float noundef %1, float noundef %2, ptr noundef nonnull align 4 dereferenceable(12) %3, ptr noundef nonnull align 4 dereferenceable(12) %4, i64 noundef %5, i64 noundef %6, i1 noundef zeroext %7) #6 personality ptr @__gxx_personality_v0 {
  %9 = alloca ptr, align 8
  %10 = alloca float, align 4
  %11 = alloca float, align 4
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca i8, align 1
  %17 = alloca %"struct.vcl::mat", align 4
  %18 = alloca %"struct.vcl::buffer_stack", align 4
  %19 = alloca i1, align 1
  %20 = alloca float, align 4
  %21 = alloca float, align 4
  %22 = alloca i64, align 8
  %23 = alloca i32, align 4
  %24 = alloca i64, align 8
  %25 = alloca float, align 4
  %26 = alloca float, align 4
  %27 = alloca float, align 4
  %28 = alloca float, align 4
  %29 = alloca %"struct.vcl::buffer_stack", align 4
  %30 = alloca ptr, align 8
  %31 = alloca i32, align 4
  %32 = alloca %"struct.vcl::buffer_stack", align 4
  %33 = alloca %"struct.vcl::buffer_stack", align 4
  %34 = alloca %"struct.vcl::buffer_stack", align 4
  %35 = alloca %"struct.vcl::buffer_stack", align 4
  %36 = alloca { <2 x float>, float }, align 8
  %37 = alloca { <2 x float>, float }, align 8
  %38 = alloca %"struct.vcl::buffer_stack.18", align 4
  %39 = alloca %"struct.vcl::buffer_stack", align 4
  %40 = alloca %"struct.vcl::buffer_stack", align 4
  %41 = alloca { <2 x float>, float }, align 8
  %42 = alloca { <2 x float>, float }, align 8
  %43 = alloca %"struct.vcl::buffer.17", align 8
  %44 = alloca %"class.std::vector", align 8
  store ptr %0, ptr %9, align 8
  store float %1, ptr %10, align 4, !tbaa !5
  store float %2, ptr %11, align 4, !tbaa !5
  store ptr %3, ptr %12, align 8, !tbaa !9
  store ptr %4, ptr %13, align 8, !tbaa !9
  store i64 %5, ptr %14, align 8, !tbaa !11
  store i64 %6, ptr %15, align 8, !tbaa !11
  %45 = zext i1 %7 to i8
  store i8 %45, ptr %16, align 1, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 36, ptr %17) #9
  call void @llvm.lifetime.start.p0(i64 12, ptr %18) #9
  call void @_ZN3vcl12buffer_stackIfLm3EEC1Efff(ptr noundef nonnull align 4 dereferenceable(12) %18, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 1.000000e+00)
  %46 = load ptr, ptr %13, align 8, !tbaa !9
  call void @_ZN3vcl28rotation_between_vector_mat3ERKNS_12buffer_stackIfLm3EEES3_(ptr dead_on_unwind writable sret(%"struct.vcl::mat") align 4 %17, ptr noundef nonnull align 4 dereferenceable(12) %18, ptr noundef nonnull align 4 dereferenceable(12) %46)
  call void @llvm.lifetime.end.p0(i64 12, ptr %18) #9
  store i1 false, ptr %19, align 1
  call void @_ZN3vcl4meshC2Ev(ptr noundef nonnull align 8 dereferenceable(120) %0)
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #9
  %47 = load i8, ptr %16, align 1, !tbaa !13, !range !15, !noundef !16
  %48 = trunc i8 %47 to i1
  br i1 %48, label %49, label %52

49:                                               ; preds = %8
  %50 = load i64, ptr %14, align 8, !tbaa !11
  %51 = uitofp i64 %50 to float
  br label %56

52:                                               ; preds = %8
  %53 = load i64, ptr %14, align 8, !tbaa !11
  %54 = sub i64 %53, 1
  %55 = uitofp i64 %54 to float
  br label %56

56:                                               ; preds = %52, %49
  %57 = phi float [ %51, %49 ], [ %55, %52 ]
  store float %57, ptr %20, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #9
  %58 = load i8, ptr %16, align 1, !tbaa !13, !range !15, !noundef !16
  %59 = trunc i8 %58 to i1
  br i1 %59, label %60, label %63

60:                                               ; preds = %56
  %61 = load i64, ptr %15, align 8, !tbaa !11
  %62 = uitofp i64 %61 to float
  br label %67

63:                                               ; preds = %56
  %64 = load i64, ptr %15, align 8, !tbaa !11
  %65 = sub i64 %64, 1
  %66 = uitofp i64 %65 to float
  br label %67

67:                                               ; preds = %63, %60
  %68 = phi float [ %62, %60 ], [ %66, %63 ]
  store float %68, ptr %21, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #9
  store i64 0, ptr %22, align 8, !tbaa !11
  br label %69

69:                                               ; preds = %218, %67
  %70 = load i64, ptr %22, align 8, !tbaa !11
  %71 = load i64, ptr %14, align 8, !tbaa !11
  %72 = icmp ult i64 %70, %71
  br i1 %72, label %74, label %73

73:                                               ; preds = %69
  store i32 2, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #9
  br label %221

74:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #9
  store i64 0, ptr %24, align 8, !tbaa !11
  br label %75

75:                                               ; preds = %185, %74
  %76 = load i64, ptr %24, align 8, !tbaa !11
  %77 = load i64, ptr %15, align 8, !tbaa !11
  %78 = icmp ult i64 %76, %77
  br i1 %78, label %80, label %79

79:                                               ; preds = %75
  store i32 5, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #9
  br label %217

80:                                               ; preds = %75
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #9
  %81 = load i64, ptr %22, align 8, !tbaa !11
  %82 = uitofp i64 %81 to float
  %83 = load float, ptr %20, align 4, !tbaa !5
  %84 = fdiv float %82, %83
  store float %84, ptr %25, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #9
  %85 = load i64, ptr %24, align 8, !tbaa !11
  %86 = uitofp i64 %85 to float
  %87 = load float, ptr %21, align 4, !tbaa !5
  %88 = fdiv float %86, %87
  store float %88, ptr %26, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #9
  %89 = load float, ptr %25, align 4, !tbaa !5
  %90 = fmul float 0x401921FA00000000, %89
  store float %90, ptr %27, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #9
  %91 = load float, ptr %26, align 4, !tbaa !5
  %92 = fmul float 0x401921FA00000000, %91
  store float %92, ptr %28, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %29) #9
  %93 = load float, ptr %10, align 4, !tbaa !5
  %94 = load float, ptr %11, align 4, !tbaa !5
  %95 = load float, ptr %27, align 4, !tbaa !5
  %96 = invoke noundef float @_ZSt3cosf(float noundef %95)
          to label %97 unwind label %188

97:                                               ; preds = %80
  %98 = call float @llvm.fmuladd.f32(float %94, float %96, float %93)
  %99 = load float, ptr %28, align 4, !tbaa !5
  %100 = invoke noundef float @_ZSt3cosf(float noundef %99)
          to label %101 unwind label %188

101:                                              ; preds = %97
  %102 = fmul float %98, %100
  %103 = load float, ptr %10, align 4, !tbaa !5
  %104 = load float, ptr %11, align 4, !tbaa !5
  %105 = load float, ptr %27, align 4, !tbaa !5
  %106 = invoke noundef float @_ZSt3cosf(float noundef %105)
          to label %107 unwind label %188

107:                                              ; preds = %101
  %108 = call float @llvm.fmuladd.f32(float %104, float %106, float %103)
  %109 = load float, ptr %28, align 4, !tbaa !5
  %110 = invoke noundef float @_ZSt3sinf(float noundef %109)
          to label %111 unwind label %188

111:                                              ; preds = %107
  %112 = fmul float %108, %110
  %113 = load float, ptr %11, align 4, !tbaa !5
  %114 = load float, ptr %27, align 4, !tbaa !5
  %115 = invoke noundef float @_ZSt3sinf(float noundef %114)
          to label %116 unwind label %188

116:                                              ; preds = %111
  %117 = fmul float %113, %115
  invoke void @_ZN3vcl12buffer_stackIfLm3EEC1Efff(ptr noundef nonnull align 4 dereferenceable(12) %29, float noundef %102, float noundef %112, float noundef %117)
          to label %118 unwind label %188

118:                                              ; preds = %116
  call void @llvm.lifetime.start.p0(i64 12, ptr %32) #9
  %119 = load float, ptr %11, align 4, !tbaa !5
  %120 = fneg float %119
  %121 = load float, ptr %27, align 4, !tbaa !5
  %122 = invoke noundef float @_ZSt3sinf(float noundef %121)
          to label %123 unwind label %192

123:                                              ; preds = %118
  %124 = fmul float %120, %122
  %125 = load float, ptr %28, align 4, !tbaa !5
  %126 = invoke noundef float @_ZSt3cosf(float noundef %125)
          to label %127 unwind label %192

127:                                              ; preds = %123
  %128 = fmul float %124, %126
  %129 = load float, ptr %11, align 4, !tbaa !5
  %130 = fneg float %129
  %131 = load float, ptr %27, align 4, !tbaa !5
  %132 = invoke noundef float @_ZSt3sinf(float noundef %131)
          to label %133 unwind label %192

133:                                              ; preds = %127
  %134 = fmul float %130, %132
  %135 = load float, ptr %28, align 4, !tbaa !5
  %136 = invoke noundef float @_ZSt3sinf(float noundef %135)
          to label %137 unwind label %192

137:                                              ; preds = %133
  %138 = fmul float %134, %136
  %139 = load float, ptr %11, align 4, !tbaa !5
  %140 = load float, ptr %27, align 4, !tbaa !5
  %141 = invoke noundef float @_ZSt3cosf(float noundef %140)
          to label %142 unwind label %192

142:                                              ; preds = %137
  %143 = fmul float %139, %141
  invoke void @_ZN3vcl12buffer_stackIfLm3EEC1Efff(ptr noundef nonnull align 4 dereferenceable(12) %32, float noundef %128, float noundef %138, float noundef %143)
          to label %144 unwind label %192

144:                                              ; preds = %142
  call void @llvm.lifetime.start.p0(i64 12, ptr %33) #9
  %145 = load float, ptr %10, align 4, !tbaa !5
  %146 = load float, ptr %11, align 4, !tbaa !5
  %147 = load float, ptr %27, align 4, !tbaa !5
  %148 = invoke noundef float @_ZSt3cosf(float noundef %147)
          to label %149 unwind label %196

149:                                              ; preds = %144
  %150 = call float @llvm.fmuladd.f32(float %146, float %148, float %145)
  %151 = fneg float %150
  %152 = load float, ptr %28, align 4, !tbaa !5
  %153 = invoke noundef float @_ZSt3sinf(float noundef %152)
          to label %154 unwind label %196

154:                                              ; preds = %149
  %155 = fmul float %151, %153
  %156 = load float, ptr %10, align 4, !tbaa !5
  %157 = load float, ptr %11, align 4, !tbaa !5
  %158 = load float, ptr %27, align 4, !tbaa !5
  %159 = invoke noundef float @_ZSt3cosf(float noundef %158)
          to label %160 unwind label %196

160:                                              ; preds = %154
  %161 = call float @llvm.fmuladd.f32(float %157, float %159, float %156)
  %162 = load float, ptr %28, align 4, !tbaa !5
  %163 = invoke noundef float @_ZSt3cosf(float noundef %162)
          to label %164 unwind label %196

164:                                              ; preds = %160
  %165 = fmul float %161, %163
  invoke void @_ZN3vcl12buffer_stackIfLm3EEC1Efff(ptr noundef nonnull align 4 dereferenceable(12) %33, float noundef %155, float noundef %165, float noundef 0.000000e+00)
          to label %166 unwind label %196

166:                                              ; preds = %164
  call void @llvm.lifetime.start.p0(i64 12, ptr %34) #9
  call void @llvm.lifetime.start.p0(i64 12, ptr %35) #9
  %167 = invoke { <2 x float>, float } @_ZN3vcl5crossERKNS_12buffer_stackIfLm3EEES3_(ptr noundef nonnull align 4 dereferenceable(12) %33, ptr noundef nonnull align 4 dereferenceable(12) %32)
          to label %168 unwind label %200

168:                                              ; preds = %166
  store { <2 x float>, float } %167, ptr %36, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %35, ptr align 8 %36, i64 12, i1 false)
  %169 = invoke { <2 x float>, float } @_ZN3vcl9normalizeILm3EEENS_12buffer_stackIfXT_EEERKS2_(ptr noundef nonnull align 4 dereferenceable(12) %35)
          to label %170 unwind label %200

170:                                              ; preds = %168
  store { <2 x float>, float } %169, ptr %37, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %34, ptr align 8 %37, i64 12, i1 false)
  call void @llvm.lifetime.end.p0(i64 12, ptr %35) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #9
  %171 = load float, ptr %25, align 4, !tbaa !5
  %172 = load float, ptr %26, align 4, !tbaa !5
  invoke void @_ZN3vcl12buffer_stackIfLm2EEC1Eff(ptr noundef nonnull align 4 dereferenceable(8) %38, float noundef %171, float noundef %172)
          to label %173 unwind label %204

173:                                              ; preds = %170
  %174 = getelementptr inbounds %"struct.vcl::mesh", ptr %0, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 12, ptr %39) #9
  call void @llvm.lifetime.start.p0(i64 12, ptr %40) #9
  %175 = invoke { <2 x float>, float } @_ZN3vclmlILm3ELm3EEENS_12buffer_stackIfXT_EEERKNS_3matIXT_EXT0_EEERKNS1_IfXT0_EEE(ptr noundef nonnull align 4 dereferenceable(36) %17, ptr noundef nonnull align 4 dereferenceable(12) %29)
          to label %176 unwind label %208

176:                                              ; preds = %173
  store { <2 x float>, float } %175, ptr %41, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %40, ptr align 8 %41, i64 12, i1 false)
  %177 = load ptr, ptr %12, align 8, !tbaa !9
  %178 = invoke { <2 x float>, float } @_ZN3vclplIfLm3EEENS_12buffer_stackIT_XT0_EEERKS3_S5_(ptr noundef nonnull align 4 dereferenceable(12) %40, ptr noundef nonnull align 4 dereferenceable(12) %177)
          to label %179 unwind label %208

179:                                              ; preds = %176
  store { <2 x float>, float } %178, ptr %42, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %39, ptr align 8 %42, i64 12, i1 false)
  invoke void @_ZN3vcl6bufferINS_12buffer_stackIfLm3EEEE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %174, ptr noundef nonnull align 4 dereferenceable(12) %39)
          to label %180 unwind label %208

180:                                              ; preds = %179
  call void @llvm.lifetime.end.p0(i64 12, ptr %40) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr %39) #9
  %181 = getelementptr inbounds %"struct.vcl::mesh", ptr %0, i32 0, i32 1
  invoke void @_ZN3vcl6bufferINS_12buffer_stackIfLm3EEEE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %181, ptr noundef nonnull align 4 dereferenceable(12) %34)
          to label %182 unwind label %204

182:                                              ; preds = %180
  %183 = getelementptr inbounds %"struct.vcl::mesh", ptr %0, i32 0, i32 3
  invoke void @_ZN3vcl6bufferINS_12buffer_stackIfLm2EEEE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %183, ptr noundef nonnull align 4 dereferenceable(8) %38)
          to label %184 unwind label %204

184:                                              ; preds = %182
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr %34) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr %33) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr %32) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr %29) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #9
  br label %185

185:                                              ; preds = %184
  %186 = load i64, ptr %24, align 8, !tbaa !11
  %187 = add i64 %186, 1
  store i64 %187, ptr %24, align 8, !tbaa !11
  br label %75, !llvm.loop !17

188:                                              ; preds = %116, %111, %107, %101, %97, %80
  %189 = landingpad { ptr, i32 }
          cleanup
  %190 = extractvalue { ptr, i32 } %189, 0
  store ptr %190, ptr %30, align 8
  %191 = extractvalue { ptr, i32 } %189, 1
  store i32 %191, ptr %31, align 4
  br label %216

192:                                              ; preds = %142, %137, %133, %127, %123, %118
  %193 = landingpad { ptr, i32 }
          cleanup
  %194 = extractvalue { ptr, i32 } %193, 0
  store ptr %194, ptr %30, align 8
  %195 = extractvalue { ptr, i32 } %193, 1
  store i32 %195, ptr %31, align 4
  br label %215

196:                                              ; preds = %164, %160, %154, %149, %144
  %197 = landingpad { ptr, i32 }
          cleanup
  %198 = extractvalue { ptr, i32 } %197, 0
  store ptr %198, ptr %30, align 8
  %199 = extractvalue { ptr, i32 } %197, 1
  store i32 %199, ptr %31, align 4
  br label %214

200:                                              ; preds = %168, %166
  %201 = landingpad { ptr, i32 }
          cleanup
  %202 = extractvalue { ptr, i32 } %201, 0
  store ptr %202, ptr %30, align 8
  %203 = extractvalue { ptr, i32 } %201, 1
  store i32 %203, ptr %31, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %35) #9
  br label %213

204:                                              ; preds = %182, %180, %170
  %205 = landingpad { ptr, i32 }
          cleanup
  %206 = extractvalue { ptr, i32 } %205, 0
  store ptr %206, ptr %30, align 8
  %207 = extractvalue { ptr, i32 } %205, 1
  store i32 %207, ptr %31, align 4
  br label %212

208:                                              ; preds = %179, %176, %173
  %209 = landingpad { ptr, i32 }
          cleanup
  %210 = extractvalue { ptr, i32 } %209, 0
  store ptr %210, ptr %30, align 8
  %211 = extractvalue { ptr, i32 } %209, 1
  store i32 %211, ptr %31, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %40) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr %39) #9
  br label %212

212:                                              ; preds = %208, %204
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #9
  br label %213

213:                                              ; preds = %212, %200
  call void @llvm.lifetime.end.p0(i64 12, ptr %34) #9
  br label %214

214:                                              ; preds = %213, %196
  call void @llvm.lifetime.end.p0(i64 12, ptr %33) #9
  br label %215

215:                                              ; preds = %214, %192
  call void @llvm.lifetime.end.p0(i64 12, ptr %32) #9
  br label %216

216:                                              ; preds = %215, %188
  call void @llvm.lifetime.end.p0(i64 12, ptr %29) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #9
  br label %242

217:                                              ; preds = %79
  br label %218

218:                                              ; preds = %217
  %219 = load i64, ptr %22, align 8, !tbaa !11
  %220 = add i64 %219, 1
  store i64 %220, ptr %22, align 8, !tbaa !11
  br label %69, !llvm.loop !19

221:                                              ; preds = %73
  call void @llvm.lifetime.start.p0(i64 24, ptr %43) #9
  call void @llvm.lifetime.start.p0(i64 24, ptr %44) #9
  %222 = load i64, ptr %14, align 8, !tbaa !11
  %223 = load i64, ptr %15, align 8, !tbaa !11
  %224 = load i8, ptr %16, align 1, !tbaa !13, !range !15, !noundef !16
  %225 = trunc i8 %224 to i1
  %226 = load i8, ptr %16, align 1, !tbaa !13, !range !15, !noundef !16
  %227 = trunc i8 %226 to i1
  invoke void @_ZN3vcl17connectivity_gridEmmbb(ptr dead_on_unwind writable sret(%"class.std::vector") align 8 %44, i64 noundef %222, i64 noundef %223, i1 noundef zeroext %225, i1 noundef zeroext %227)
          to label %228 unwind label %233

228:                                              ; preds = %221
  invoke void @_ZN3vcl6bufferISt5arrayIjLm3EEEC2ERKSt6vectorIS2_SaIS2_EE(ptr noundef nonnull align 8 dereferenceable(24) %43, ptr noundef nonnull align 8 dereferenceable(24) %44)
          to label %229 unwind label %237

229:                                              ; preds = %228
  %230 = getelementptr inbounds %"struct.vcl::mesh", ptr %0, i32 0, i32 4
  %231 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN3vcl6bufferISt5arrayIjLm3EEEaSEOS3_(ptr noundef nonnull align 8 dereferenceable(24) %230, ptr noundef nonnull align 8 dereferenceable(24) %43) #9
  call void @_ZN3vcl6bufferISt5arrayIjLm3EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %43) #9
  call void @_ZNSt6vectorISt5arrayIjLm3EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %44) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %44) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %43) #9
  store i1 true, ptr %19, align 1
  store i32 1, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #9
  %232 = load i1, ptr %19, align 1
  br i1 %232, label %244, label %243

233:                                              ; preds = %221
  %234 = landingpad { ptr, i32 }
          cleanup
  %235 = extractvalue { ptr, i32 } %234, 0
  store ptr %235, ptr %30, align 8
  %236 = extractvalue { ptr, i32 } %234, 1
  store i32 %236, ptr %31, align 4
  br label %241

237:                                              ; preds = %228
  %238 = landingpad { ptr, i32 }
          cleanup
  %239 = extractvalue { ptr, i32 } %238, 0
  store ptr %239, ptr %30, align 8
  %240 = extractvalue { ptr, i32 } %238, 1
  store i32 %240, ptr %31, align 4
  call void @_ZNSt6vectorISt5arrayIjLm3EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %44) #9
  br label %241

241:                                              ; preds = %237, %233
  call void @llvm.lifetime.end.p0(i64 24, ptr %44) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %43) #9
  br label %242

242:                                              ; preds = %241, %216
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #9
  call void @_ZN3vcl4meshD2Ev(ptr noundef nonnull align 8 dereferenceable(120) %0) #9
  call void @llvm.lifetime.end.p0(i64 36, ptr %17) #9
  br label %245

243:                                              ; preds = %229
  call void @_ZN3vcl4meshD2Ev(ptr noundef nonnull align 8 dereferenceable(120) %0) #9
  br label %244

244:                                              ; preds = %243, %229
  call void @llvm.lifetime.end.p0(i64 36, ptr %17) #9
  ret void

245:                                              ; preds = %242
  %246 = load ptr, ptr %30, align 8
  %247 = load i32, ptr %31, align 4
  %248 = insertvalue { ptr, i32 } poison, ptr %246, 0
  %249 = insertvalue { ptr, i32 } %248, i32 %247, 1
  resume { ptr, i32 } %249
}

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

declare { <2 x float>, float } @_ZN3vcl5crossERKNS_12buffer_stackIfLm3EEES3_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #5

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { inlinehint 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 = { 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 #5 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { mustprogress uwtable "min-legal-vector-width"="64" "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 nounwind willreturn memory(argmem: readwrite) }
attributes #8 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #9 = { 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 = !{!"float", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"bool", !7, i64 0}
!15 = !{i8 0, i8 2}
!16 = !{}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = distinct !{!19, !18}


; 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<std::array<unsigned int, 3>, std::allocator<std::array<unsigned int, 3>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::array<unsigned int, 3>, std::allocator<std::array<unsigned int, 3>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::array<unsigned int, 3>, std::allocator<std::array<unsigned int, 3>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::array<unsigned int, 3>, std::allocator<std::array<unsigned int, 3>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.vcl::mat" = type { float, float, float, float, float, float, float, float, float }
%"struct.vcl::mesh" = type { %"struct.vcl::buffer", %"struct.vcl::buffer", %"struct.vcl::buffer.5", %"struct.vcl::buffer.11", %"struct.vcl::buffer.17" }
%"struct.vcl::buffer" = type { %"class.std::vector.0" }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<vcl::buffer_stack<float, 3>, std::allocator<vcl::buffer_stack<float, 3>>>::_Vector_impl" }
%"struct.std::_Vector_base<vcl::buffer_stack<float, 3>, std::allocator<vcl::buffer_stack<float, 3>>>::_Vector_impl" = type { %"struct.std::_Vector_base<vcl::buffer_stack<float, 3>, std::allocator<vcl::buffer_stack<float, 3>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<vcl::buffer_stack<float, 3>, std::allocator<vcl::buffer_stack<float, 3>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.vcl::buffer.5" = type { %"class.std::vector.6" }
%"class.std::vector.6" = type { %"struct.std::_Vector_base.7" }
%"struct.std::_Vector_base.7" = type { %"struct.std::_Vector_base<vcl::buffer_stack<float, 4>, std::allocator<vcl::buffer_stack<float, 4>>>::_Vector_impl" }
%"struct.std::_Vector_base<vcl::buffer_stack<float, 4>, std::allocator<vcl::buffer_stack<float, 4>>>::_Vector_impl" = type { %"struct.std::_Vector_base<vcl::buffer_stack<float, 4>, std::allocator<vcl::buffer_stack<float, 4>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<vcl::buffer_stack<float, 4>, std::allocator<vcl::buffer_stack<float, 4>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.vcl::buffer.11" = type { %"class.std::vector.12" }
%"class.std::vector.12" = type { %"struct.std::_Vector_base.13" }
%"struct.std::_Vector_base.13" = type { %"struct.std::_Vector_base<vcl::buffer_stack<float, 2>, std::allocator<vcl::buffer_stack<float, 2>>>::_Vector_impl" }
%"struct.std::_Vector_base<vcl::buffer_stack<float, 2>, std::allocator<vcl::buffer_stack<float, 2>>>::_Vector_impl" = type { %"struct.std::_Vector_base<vcl::buffer_stack<float, 2>, std::allocator<vcl::buffer_stack<float, 2>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<vcl::buffer_stack<float, 2>, std::allocator<vcl::buffer_stack<float, 2>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.vcl::buffer.17" = type { %"class.std::vector" }
%"struct.vcl::buffer_stack" = type { float, float, float }
%"struct.vcl::buffer_stack.18" = type { float, float }

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3vcl17connectivity_gridEmmbb(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8, i64 noundef, i64 noundef, i1 noundef zeroext, i1 noundef zeroext) local_unnamed_addr #0

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

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) #1

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3vcl4meshC2Ev(ptr noundef nonnull align 8 dereferenceable(120)) unnamed_addr #3 align 2

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

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

declare void @_ZN3vcl12buffer_stackIfLm3EEC1Efff(ptr noundef nonnull align 4 dereferenceable(12), float noundef, float noundef, float noundef) unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare dso_local { <2 x float>, float } @_ZN3vcl9normalizeILm3EEENS_12buffer_stackIfXT_EEERKS2_(ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #6

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { <2 x float>, float } @_ZN3vclplIfLm3EEENS_12buffer_stackIT_XT0_EEERKS3_S5_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #0

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

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

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

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

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

declare void @_ZN3vcl28rotation_between_vector_mat3ERKNS_12buffer_stackIfLm3EEES3_(ptr dead_on_unwind writable sret(%"struct.vcl::mat") align 4, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare dso_local { <2 x float>, float } @_ZN3vclmlILm3ELm3EEENS_12buffer_stackIfXT_EEERKNS_3matIXT_EXT0_EEERKNS1_IfXT0_EEE(ptr noundef nonnull align 4 dereferenceable(36), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3vcl20mesh_primitive_torusEffRKNS_12buffer_stackIfLm3EEES3_mmb(ptr dead_on_unwind noalias writable sret(%"struct.vcl::mesh") align 8 %0, float noundef %1, float noundef %2, ptr noundef nonnull align 4 dereferenceable(12) %3, ptr noundef nonnull align 4 dereferenceable(12) %4, i64 noundef %5, i64 noundef %6, i1 noundef zeroext %7) local_unnamed_addr #6 personality ptr @__gxx_personality_v0 {
  %9 = alloca %"struct.vcl::mat", align 4
  %10 = alloca %"struct.vcl::buffer_stack", align 4
  %11 = alloca %"struct.vcl::buffer_stack", align 4
  %12 = alloca %"struct.vcl::buffer_stack", align 4
  %13 = alloca %"struct.vcl::buffer_stack", align 4
  %14 = alloca %"struct.vcl::buffer_stack", align 8
  %15 = alloca %"struct.vcl::buffer_stack", align 8
  %16 = alloca %"struct.vcl::buffer_stack.18", align 4
  %17 = alloca %"struct.vcl::buffer_stack", align 8
  %18 = alloca %"struct.vcl::buffer_stack", align 8
  %19 = alloca %"struct.vcl::buffer.17", align 8
  %20 = alloca %"class.std::vector", align 8
  call void @llvm.lifetime.start.p0(i64 36, ptr nonnull %9) #8
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %10) #8
  call void @_ZN3vcl12buffer_stackIfLm3EEC1Efff(ptr noundef nonnull align 4 dereferenceable(12) %10, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 1.000000e+00)
  call void @_ZN3vcl28rotation_between_vector_mat3ERKNS_12buffer_stackIfLm3EEES3_(ptr dead_on_unwind nonnull writable sret(%"struct.vcl::mat") align 4 %9, ptr noundef nonnull align 4 dereferenceable(12) %10, ptr noundef nonnull align 4 dereferenceable(12) %4)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %10) #8
  call void @_ZN3vcl4meshC2Ev(ptr noundef nonnull align 8 dereferenceable(120) %0)
  %not. = xor i1 %7, true
  %21 = sext i1 %not. to i64
  %.in = add i64 %21, %5
  %22 = uitofp i64 %.in to float
  %.in76 = add i64 %21, %6
  %23 = uitofp i64 %.in76 to float
  %.not = icmp eq i64 %5, 0
  br i1 %.not, label %._crit_edge88, label %.preheader.lr.ph

.preheader.lr.ph:                                 ; preds = %8
  %.not104 = icmp eq i64 %6, 0
  %24 = fneg float %2
  %.sroa.212.0..sroa_idx = getelementptr inbounds i8, ptr %15, i64 8
  %.sroa.28.0..sroa_idx = getelementptr inbounds i8, ptr %14, i64 8
  %.sroa.24.0..sroa_idx = getelementptr inbounds i8, ptr %18, i64 8
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %17, i64 8
  %25 = getelementptr inbounds i8, ptr %0, i64 24
  %26 = getelementptr inbounds i8, ptr %0, i64 72
  br i1 %.not104, label %._crit_edge88, label %.preheader.us

.preheader.us:                                    ; preds = %.preheader.lr.ph, %._crit_edge.us
  %.087.us = phi i64 [ %79, %._crit_edge.us ], [ 0, %.preheader.lr.ph ]
  %27 = uitofp i64 %.087.us to float
  %28 = fdiv float %27, %22
  %29 = fmul float %28, 0x401921FA00000000
  br label %30

30:                                               ; preds = %.preheader.us, %77
  %.06686.us = phi i64 [ 0, %.preheader.us ], [ %78, %77 ]
  %31 = uitofp i64 %.06686.us to float
  %32 = fdiv float %31, %23
  %33 = fmul float %32, 0x401921FA00000000
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %11) #8
  %34 = call noundef float @_ZSt3cosf(float noundef %29)
  %35 = call float @llvm.fmuladd.f32(float %2, float %34, float %1)
  %36 = call noundef float @_ZSt3cosf(float noundef %33)
  %37 = fmul float %35, %36
  %38 = call noundef float @_ZSt3cosf(float noundef %29)
  %39 = call float @llvm.fmuladd.f32(float %2, float %38, float %1)
  %40 = call noundef float @_ZSt3sinf(float noundef %33)
  %41 = fmul float %39, %40
  %42 = call noundef float @_ZSt3sinf(float noundef %29)
  %43 = fmul float %42, %2
  invoke void @_ZN3vcl12buffer_stackIfLm3EEC1Efff(ptr noundef nonnull align 4 dereferenceable(12) %11, float noundef %37, float noundef %41, float noundef %43)
          to label %44 unwind label %.split.us

44:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %12) #8
  %45 = call noundef float @_ZSt3sinf(float noundef %29)
  %46 = fmul float %45, %24
  %47 = call noundef float @_ZSt3cosf(float noundef %33)
  %48 = fmul float %46, %47
  %49 = call noundef float @_ZSt3sinf(float noundef %29)
  %50 = fmul float %49, %24
  %51 = call noundef float @_ZSt3sinf(float noundef %33)
  %52 = fmul float %50, %51
  %53 = call noundef float @_ZSt3cosf(float noundef %29)
  %54 = fmul float %53, %2
  invoke void @_ZN3vcl12buffer_stackIfLm3EEC1Efff(ptr noundef nonnull align 4 dereferenceable(12) %12, float noundef %48, float noundef %52, float noundef %54)
          to label %55 unwind label %.split90.us

55:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %13) #8
  %56 = call noundef float @_ZSt3cosf(float noundef %29)
  %57 = call float @llvm.fmuladd.f32(float %2, float %56, float %1)
  %58 = fneg float %57
  %59 = call noundef float @_ZSt3sinf(float noundef %33)
  %60 = fmul float %59, %58
  %61 = call noundef float @_ZSt3cosf(float noundef %29)
  %62 = call float @llvm.fmuladd.f32(float %2, float %61, float %1)
  %63 = call noundef float @_ZSt3cosf(float noundef %33)
  %64 = fmul float %62, %63
  invoke void @_ZN3vcl12buffer_stackIfLm3EEC1Efff(ptr noundef nonnull align 4 dereferenceable(12) %13, float noundef %60, float noundef %64, float noundef 0.000000e+00)
          to label %65 unwind label %.split93.us

65:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %14) #8
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %15) #8
  %66 = invoke { <2 x float>, float } @_ZN3vcl5crossERKNS_12buffer_stackIfLm3EEES3_(ptr noundef nonnull align 4 dereferenceable(12) %13, ptr noundef nonnull align 4 dereferenceable(12) %12)
          to label %67 unwind label %.split96.us

67:                                               ; preds = %65
  %.fca.0.extract9.us = extractvalue { <2 x float>, float } %66, 0
  %.fca.1.extract10.us = extractvalue { <2 x float>, float } %66, 1
  store <2 x float> %.fca.0.extract9.us, ptr %15, align 8
  store float %.fca.1.extract10.us, ptr %.sroa.212.0..sroa_idx, align 8
  %68 = invoke { <2 x float>, float } @_ZN3vcl9normalizeILm3EEENS_12buffer_stackIfXT_EEERKS2_(ptr noundef nonnull align 4 dereferenceable(12) %15)
          to label %69 unwind label %.split96.us

69:                                               ; preds = %67
  %.fca.0.extract5.us = extractvalue { <2 x float>, float } %68, 0
  %.fca.1.extract6.us = extractvalue { <2 x float>, float } %68, 1
  store <2 x float> %.fca.0.extract5.us, ptr %14, align 8
  store float %.fca.1.extract6.us, ptr %.sroa.28.0..sroa_idx, align 8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %15) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #8
  invoke void @_ZN3vcl12buffer_stackIfLm2EEC1Eff(ptr noundef nonnull align 4 dereferenceable(8) %16, float noundef %28, float noundef %32)
          to label %70 unwind label %.split99.us

70:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %17) #8
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %18) #8
  %71 = invoke { <2 x float>, float } @_ZN3vclmlILm3ELm3EEENS_12buffer_stackIfXT_EEERKNS_3matIXT_EXT0_EEERKNS1_IfXT0_EEE(ptr noundef nonnull align 4 dereferenceable(36) %9, ptr noundef nonnull align 4 dereferenceable(12) %11)
          to label %72 unwind label %.split102.us

72:                                               ; preds = %70
  %.fca.0.extract1.us = extractvalue { <2 x float>, float } %71, 0
  %.fca.1.extract2.us = extractvalue { <2 x float>, float } %71, 1
  store <2 x float> %.fca.0.extract1.us, ptr %18, align 8
  store float %.fca.1.extract2.us, ptr %.sroa.24.0..sroa_idx, align 8
  %73 = invoke { <2 x float>, float } @_ZN3vclplIfLm3EEENS_12buffer_stackIT_XT0_EEERKS3_S5_(ptr noundef nonnull align 4 dereferenceable(12) %18, ptr noundef nonnull align 4 dereferenceable(12) %3)
          to label %74 unwind label %.split102.us

74:                                               ; preds = %72
  %.fca.0.extract.us = extractvalue { <2 x float>, float } %73, 0
  %.fca.1.extract.us = extractvalue { <2 x float>, float } %73, 1
  store <2 x float> %.fca.0.extract.us, ptr %17, align 8
  store float %.fca.1.extract.us, ptr %.sroa.2.0..sroa_idx, align 8
  invoke void @_ZN3vcl6bufferINS_12buffer_stackIfLm3EEEE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 4 dereferenceable(12) %17)
          to label %75 unwind label %.split102.us

75:                                               ; preds = %74
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %18) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %17) #8
  invoke void @_ZN3vcl6bufferINS_12buffer_stackIfLm3EEEE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %25, ptr noundef nonnull align 4 dereferenceable(12) %14)
          to label %76 unwind label %.split99.us

76:                                               ; preds = %75
  invoke void @_ZN3vcl6bufferINS_12buffer_stackIfLm2EEEE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %26, ptr noundef nonnull align 4 dereferenceable(8) %16)
          to label %77 unwind label %.split99.us

77:                                               ; preds = %76
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %14) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %13) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %11) #8
  %78 = add nuw i64 %.06686.us, 1
  %exitcond.not = icmp eq i64 %78, %6
  br i1 %exitcond.not, label %._crit_edge.us, label %30, !llvm.loop !5

._crit_edge.us:                                   ; preds = %77
  %79 = add nuw i64 %.087.us, 1
  %exitcond106.not = icmp eq i64 %79, %5
  br i1 %exitcond106.not, label %._crit_edge88, label %.preheader.us, !llvm.loop !7

.split.us:                                        ; preds = %30
  %80 = landingpad { ptr, i32 }
          cleanup
  br label %90

.split90.us:                                      ; preds = %44
  %81 = landingpad { ptr, i32 }
          cleanup
  br label %89

.split93.us:                                      ; preds = %55
  %82 = landingpad { ptr, i32 }
          cleanup
  br label %88

.split96.us:                                      ; preds = %67, %65
  %83 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %15) #8
  br label %87

.split99.us:                                      ; preds = %76, %75, %69
  %84 = landingpad { ptr, i32 }
          cleanup
  br label %86

.split102.us:                                     ; preds = %74, %72, %70
  %85 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %18) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %17) #8
  br label %86

._crit_edge88:                                    ; preds = %._crit_edge.us, %.preheader.lr.ph, %8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %19) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %20) #8
  invoke void @_ZN3vcl17connectivity_gridEmmbb(ptr dead_on_unwind nonnull writable sret(%"class.std::vector") align 8 %20, i64 noundef %5, i64 noundef %6, i1 noundef zeroext %7, i1 noundef zeroext %7)
          to label %91 unwind label %95

86:                                               ; preds = %.split102.us, %.split99.us
  %.pn78 = phi { ptr, i32 } [ %84, %.split99.us ], [ %85, %.split102.us ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #8
  br label %87

87:                                               ; preds = %86, %.split96.us
  %.pn78.pn = phi { ptr, i32 } [ %.pn78, %86 ], [ %83, %.split96.us ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %14) #8
  br label %88

88:                                               ; preds = %87, %.split93.us
  %.pn78.pn.pn = phi { ptr, i32 } [ %.pn78.pn, %87 ], [ %82, %.split93.us ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %13) #8
  br label %89

89:                                               ; preds = %88, %.split90.us
  %.pn78.pn.pn.pn = phi { ptr, i32 } [ %.pn78.pn.pn, %88 ], [ %81, %.split90.us ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %12) #8
  br label %90

90:                                               ; preds = %89, %.split.us
  %.pn78.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn78.pn.pn.pn, %89 ], [ %80, %.split.us ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %11) #8
  br label %100

91:                                               ; preds = %._crit_edge88
  invoke void @_ZN3vcl6bufferISt5arrayIjLm3EEEC2ERKSt6vectorIS2_SaIS2_EE(ptr noundef nonnull align 8 dereferenceable(24) %19, ptr noundef nonnull align 8 dereferenceable(24) %20)
          to label %92 unwind label %97

92:                                               ; preds = %91
  %93 = getelementptr inbounds i8, ptr %0, i64 96
  %94 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN3vcl6bufferISt5arrayIjLm3EEEaSEOS3_(ptr noundef nonnull align 8 dereferenceable(24) %93, ptr noundef nonnull align 8 dereferenceable(24) %19) #8
  call void @_ZN3vcl6bufferISt5arrayIjLm3EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %19) #8
  call void @_ZNSt6vectorISt5arrayIjLm3EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %20) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %20) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %19) #8
  call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %9) #8
  ret void

95:                                               ; preds = %._crit_edge88
  %96 = landingpad { ptr, i32 }
          cleanup
  br label %99

97:                                               ; preds = %91
  %98 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorISt5arrayIjLm3EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %20) #8
  br label %99

99:                                               ; preds = %97, %95
  %.pn = phi { ptr, i32 } [ %98, %97 ], [ %96, %95 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %20) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %19) #8
  br label %100

100:                                              ; preds = %99, %90
  %.pn78.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn78.pn.pn.pn.pn, %90 ], [ %.pn, %99 ]
  call void @_ZN3vcl4meshD2Ev(ptr noundef nonnull align 8 dereferenceable(120) %0) #8
  call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %9) #8
  resume { ptr, i32 } %.pn78.pn.pn.pn.pn.pn
}

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

declare { <2 x float>, float } @_ZN3vcl5crossERKNS_12buffer_stackIfLm3EEES3_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #5

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { inlinehint 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 = { 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 #5 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { mustprogress uwtable "min-legal-vector-width"="64" "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 = { mustprogress 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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = distinct !{!7, !6}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass