; LLVM IR from goldest-star/seawave-animation :: src/scenes/3D_graphics/01_modeling/modeling.ll (Z13create_islandRK19gui_scene_structure)

; 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.vcl::mesh" = type { %"struct.vcl::buffer.24", %"struct.vcl::buffer.24", %"struct.vcl::buffer.25", %"struct.vcl::buffer.31", %"struct.vcl::buffer.37" }
%"struct.vcl::buffer.24" = type { %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = 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.25" = type { %"class.std::vector.26" }
%"class.std::vector.26" = type { %"struct.std::_Vector_base.27" }
%"struct.std::_Vector_base.27" = 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.31" = type { %"class.std::vector.32" }
%"class.std::vector.32" = type { %"struct.std::_Vector_base.33" }
%"struct.std::_Vector_base.33" = 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.37" = type { %"class.std::vector.38" }
%"class.std::vector.38" = type { %"struct.std::_Vector_base.39" }
%"struct.std::_Vector_base.39" = 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::buffer_stack" = type { float, float, float }
%"struct.vcl::buffer_stack.48" = type { float, float }
%"struct.std::array" = type { [3 x i32] }

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

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z13create_islandRK19gui_scene_structure(ptr dead_on_unwind noalias writable sret(%"struct.vcl::mesh") align 8 %0, ptr noundef nonnull align 4 dereferenceable(20) %1) #3 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i64, align 8
  %6 = alloca i1, align 1
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i64, align 8
  %10 = alloca i32, align 4
  %11 = alloca i64, align 8
  %12 = alloca float, align 4
  %13 = alloca float, align 4
  %14 = alloca %"struct.vcl::buffer_stack", align 4
  %15 = alloca { <2 x float>, float }, align 8
  %16 = alloca %"struct.vcl::buffer_stack.48", align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca %"struct.std::array", align 4
  %22 = alloca %"struct.std::array", align 4
  store ptr %0, ptr %3, align 8
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  store i64 100, ptr %5, align 8, !tbaa !9
  store i1 false, ptr %6, align 1
  call void @_ZN3vcl4meshC2Ev(ptr noundef nonnull align 8 dereferenceable(120) %0)
  %23 = getelementptr inbounds %"struct.vcl::mesh", ptr %0, i32 0, i32 0
  invoke void @_ZN3vcl6bufferINS_12buffer_stackIfLm3EEEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %23, i64 noundef 10000)
          to label %24 unwind label %31

24:                                               ; preds = %2
  %25 = getelementptr inbounds %"struct.vcl::mesh", ptr %0, i32 0, i32 3
  invoke void @_ZN3vcl6bufferINS_12buffer_stackIfLm2EEEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %25, i64 noundef 10000)
          to label %26 unwind label %31

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

27:                                               ; preds = %88, %26
  %28 = load i64, ptr %9, align 8, !tbaa !9
  %29 = icmp ult i64 %28, 100
  br i1 %29, label %35, label %30

30:                                               ; preds = %27
  store i32 2, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  br label %91

31:                                               ; preds = %24, %2
  %32 = landingpad { ptr, i32 }
          cleanup
  %33 = extractvalue { ptr, i32 } %32, 0
  store ptr %33, ptr %7, align 8
  %34 = extractvalue { ptr, i32 } %32, 1
  store i32 %34, ptr %8, align 4
  br label %146

35:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  store i64 0, ptr %11, align 8, !tbaa !9
  br label %36

36:                                               ; preds = %75, %35
  %37 = load i64, ptr %11, align 8, !tbaa !9
  %38 = icmp ult i64 %37, 100
  br i1 %38, label %40, label %39

39:                                               ; preds = %36
  store i32 5, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  br label %87

40:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  %41 = load i64, ptr %9, align 8, !tbaa !9
  %42 = uitofp i64 %41 to float
  %43 = fdiv float %42, 9.900000e+01
  store float %43, ptr %12, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  %44 = load i64, ptr %11, align 8, !tbaa !9
  %45 = uitofp i64 %44 to float
  %46 = fdiv float %45, 9.900000e+01
  store float %46, ptr %13, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 12, ptr %14) #7
  %47 = load float, ptr %12, align 4, !tbaa !11
  %48 = load float, ptr %13, align 4, !tbaa !11
  %49 = load ptr, ptr %4, align 8, !tbaa !5
  %50 = invoke { <2 x float>, float } @_Z22evaluate_perlin_islandffRK19gui_scene_structure(float noundef %47, float noundef %48, ptr noundef nonnull align 4 dereferenceable(20) %49)
          to label %51 unwind label %78

51:                                               ; preds = %40
  store { <2 x float>, float } %50, ptr %15, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %14, ptr align 8 %15, i64 12, i1 false)
  %52 = getelementptr inbounds %"struct.vcl::mesh", ptr %0, i32 0, i32 0
  %53 = load i64, ptr %11, align 8, !tbaa !9
  %54 = load i64, ptr %9, align 8, !tbaa !9
  %55 = mul i64 100, %54
  %56 = add i64 %53, %55
  %57 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZN3vcl6bufferINS_12buffer_stackIfLm3EEEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %52, i64 noundef %56)
          to label %58 unwind label %78

58:                                               ; preds = %51
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %57, ptr align 4 %14, i64 12, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 12, ptr %14) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %59 = load i64, ptr %9, align 8, !tbaa !9
  %60 = mul i64 5, %59
  %61 = uitofp i64 %60 to float
  %62 = fdiv float %61, 1.000000e+02
  %63 = load i64, ptr %11, align 8, !tbaa !9
  %64 = mul i64 5, %63
  %65 = uitofp i64 %64 to float
  %66 = fdiv float %65, 1.000000e+02
  invoke void @_ZN3vcl12buffer_stackIfLm2EEC1Eff(ptr noundef nonnull align 4 dereferenceable(8) %16, float noundef %62, float noundef %66)
          to label %67 unwind label %82

67:                                               ; preds = %58
  %68 = getelementptr inbounds %"struct.vcl::mesh", ptr %0, i32 0, i32 3
  %69 = load i64, ptr %11, align 8, !tbaa !9
  %70 = load i64, ptr %9, align 8, !tbaa !9
  %71 = mul i64 100, %70
  %72 = add i64 %69, %71
  %73 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZN3vcl6bufferINS_12buffer_stackIfLm2EEEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %68, i64 noundef %72)
          to label %74 unwind label %82

74:                                               ; preds = %67
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %73, ptr align 4 %16, i64 8, i1 false), !tbaa.struct !14
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %75

75:                                               ; preds = %74
  %76 = load i64, ptr %11, align 8, !tbaa !9
  %77 = add i64 %76, 1
  store i64 %77, ptr %11, align 8, !tbaa !9
  br label %36, !llvm.loop !15

78:                                               ; preds = %51, %40
  %79 = landingpad { ptr, i32 }
          cleanup
  %80 = extractvalue { ptr, i32 } %79, 0
  store ptr %80, ptr %7, align 8
  %81 = extractvalue { ptr, i32 } %79, 1
  store i32 %81, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %14) #7
  br label %86

82:                                               ; preds = %67, %58
  %83 = landingpad { ptr, i32 }
          cleanup
  %84 = extractvalue { ptr, i32 } %83, 0
  store ptr %84, ptr %7, align 8
  %85 = extractvalue { ptr, i32 } %83, 1
  store i32 %85, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  br label %86

86:                                               ; preds = %82, %78
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  br label %146

87:                                               ; preds = %39
  br label %88

88:                                               ; preds = %87
  %89 = load i64, ptr %9, align 8, !tbaa !9
  %90 = add i64 %89, 1
  store i64 %90, ptr %9, align 8, !tbaa !9
  br label %27, !llvm.loop !17

91:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  store i32 100, ptr %17, align 4, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  store i32 0, ptr %18, align 4, !tbaa !18
  br label %92

92:                                               ; preds = %139, %91
  %93 = load i32, ptr %18, align 4, !tbaa !18
  %94 = icmp ult i32 %93, 99
  br i1 %94, label %96, label %95

95:                                               ; preds = %92
  store i32 8, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  br label %142

96:                                               ; preds = %92
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  store i32 0, ptr %19, align 4, !tbaa !18
  br label %97

97:                                               ; preds = %131, %96
  %98 = load i32, ptr %19, align 4, !tbaa !18
  %99 = icmp ult i32 %98, 99
  br i1 %99, label %101, label %100

100:                                              ; preds = %97
  store i32 11, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  br label %138

101:                                              ; preds = %97
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  %102 = load i32, ptr %19, align 4, !tbaa !18
  %103 = zext i32 %102 to i64
  %104 = load i32, ptr %18, align 4, !tbaa !18
  %105 = zext i32 %104 to i64
  %106 = mul i64 100, %105
  %107 = add i64 %103, %106
  %108 = trunc i64 %107 to i32
  store i32 %108, ptr %20, align 4, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 12, ptr %21) #7
  %109 = getelementptr inbounds %"struct.std::array", ptr %21, i32 0, i32 0
  %110 = load i32, ptr %20, align 4, !tbaa !18
  store i32 %110, ptr %109, align 4, !tbaa !18
  %111 = getelementptr inbounds i32, ptr %109, i64 1
  %112 = load i32, ptr %20, align 4, !tbaa !18
  %113 = add i32 %112, 1
  %114 = add i32 %113, 100
  store i32 %114, ptr %111, align 4, !tbaa !18
  %115 = getelementptr inbounds i32, ptr %109, i64 2
  %116 = load i32, ptr %20, align 4, !tbaa !18
  %117 = add i32 %116, 1
  store i32 %117, ptr %115, align 4, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 12, ptr %22) #7
  %118 = getelementptr inbounds %"struct.std::array", ptr %22, i32 0, i32 0
  %119 = load i32, ptr %20, align 4, !tbaa !18
  store i32 %119, ptr %118, align 4, !tbaa !18
  %120 = getelementptr inbounds i32, ptr %118, i64 1
  %121 = load i32, ptr %20, align 4, !tbaa !18
  %122 = add i32 %121, 100
  store i32 %122, ptr %120, align 4, !tbaa !18
  %123 = getelementptr inbounds i32, ptr %118, i64 2
  %124 = load i32, ptr %20, align 4, !tbaa !18
  %125 = add i32 %124, 1
  %126 = add i32 %125, 100
  store i32 %126, ptr %123, align 4, !tbaa !18
  %127 = getelementptr inbounds %"struct.vcl::mesh", ptr %0, i32 0, i32 4
  invoke void @_ZN3vcl6bufferISt5arrayIjLm3EEE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %127, ptr noundef nonnull align 4 dereferenceable(12) %21)
          to label %128 unwind label %134

128:                                              ; preds = %101
  %129 = getelementptr inbounds %"struct.vcl::mesh", ptr %0, i32 0, i32 4
  invoke void @_ZN3vcl6bufferISt5arrayIjLm3EEE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %129, ptr noundef nonnull align 4 dereferenceable(12) %22)
          to label %130 unwind label %134

130:                                              ; preds = %128
  call void @llvm.lifetime.end.p0(i64 12, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  br label %131

131:                                              ; preds = %130
  %132 = load i32, ptr %19, align 4, !tbaa !18
  %133 = add i32 %132, 1
  store i32 %133, ptr %19, align 4, !tbaa !18
  br label %97, !llvm.loop !20

134:                                              ; preds = %128, %101
  %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 12, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %146

138:                                              ; preds = %100
  br label %139

139:                                              ; preds = %138
  %140 = load i32, ptr %18, align 4, !tbaa !18
  %141 = add i32 %140, 1
  store i32 %141, ptr %18, align 4, !tbaa !18
  br label %92, !llvm.loop !21

142:                                              ; preds = %95
  store i1 true, ptr %6, align 1
  store i32 1, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  %143 = load i1, ptr %6, align 1
  br i1 %143, label %145, label %144

144:                                              ; preds = %142
  call void @_ZN3vcl4meshD2Ev(ptr noundef nonnull align 8 dereferenceable(120) %0) #7
  br label %145

145:                                              ; preds = %144, %142
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  ret void

146:                                              ; preds = %134, %86, %31
  call void @_ZN3vcl4meshD2Ev(ptr noundef nonnull align 8 dereferenceable(120) %0) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  br label %147

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

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

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

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

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

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

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #4 = { 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 #5 = { 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 #6 = { "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 = { 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 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{i64 0, i64 4, !11, i64 4, i64 4, !11, i64 8, i64 4, !11}
!14 = !{i64 0, i64 4, !11, i64 4, i64 4, !11}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}
!18 = !{!19, !19, i64 0}
!19 = !{!"int", !7, i64 0}
!20 = distinct !{!20, !16}
!21 = distinct !{!21, !16}


; 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.vcl::mesh" = type { %"struct.vcl::buffer.24", %"struct.vcl::buffer.24", %"struct.vcl::buffer.25", %"struct.vcl::buffer.31", %"struct.vcl::buffer.37" }
%"struct.vcl::buffer.24" = type { %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = 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.25" = type { %"class.std::vector.26" }
%"class.std::vector.26" = type { %"struct.std::_Vector_base.27" }
%"struct.std::_Vector_base.27" = 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.31" = type { %"class.std::vector.32" }
%"class.std::vector.32" = type { %"struct.std::_Vector_base.33" }
%"struct.std::_Vector_base.33" = 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.37" = type { %"class.std::vector.38" }
%"class.std::vector.38" = type { %"struct.std::_Vector_base.39" }
%"struct.std::_Vector_base.39" = 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::buffer_stack.48" = type { float, float }
%"struct.std::array" = type { [3 x i32] }

; 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z13create_islandRK19gui_scene_structure(ptr dead_on_unwind noalias nonnull writable sret(%"struct.vcl::mesh") align 8 %0, ptr noundef nonnull align 4 dereferenceable(20) %1) local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"struct.vcl::buffer_stack.48", align 8
  %4 = alloca %"struct.std::array", align 4
  %5 = alloca %"struct.std::array", align 4
  tail call void @_ZN3vcl4meshC2Ev(ptr noundef nonnull align 8 dereferenceable(120) %0)
  invoke void @_ZN3vcl6bufferINS_12buffer_stackIfLm3EEEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 10000)
          to label %6 unwind label %19

6:                                                ; preds = %2
  %7 = getelementptr inbounds i8, ptr %0, i64 72
  invoke void @_ZN3vcl6bufferINS_12buffer_stackIfLm2EEEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef 10000)
          to label %.preheader40 unwind label %19

.preheader40:                                     ; preds = %6, %21
  %.03443 = phi i64 [ %22, %21 ], [ 0, %6 ]
  %8 = uitofp nneg i64 %.03443 to float
  %9 = fdiv float %8, 9.900000e+01
  %10 = mul nuw nsw i64 %.03443, 100
  %11 = mul nuw nsw i64 %.03443, 5
  %12 = uitofp nneg i64 %11 to float
  %13 = fdiv float %12, 1.000000e+02
  br label %23

.preheader39:                                     ; preds = %21
  %14 = getelementptr inbounds i8, ptr %4, i64 4
  %15 = getelementptr inbounds i8, ptr %4, i64 8
  %16 = getelementptr inbounds i8, ptr %5, i64 4
  %17 = getelementptr inbounds i8, ptr %5, i64 8
  %18 = getelementptr inbounds i8, ptr %0, i64 96
  br label %.preheader

19:                                               ; preds = %6, %2
  %20 = landingpad { ptr, i32 }
          cleanup
  br label %55

21:                                               ; preds = %36
  %22 = add nuw nsw i64 %.03443, 1
  %exitcond46.not = icmp eq i64 %22, 100
  br i1 %exitcond46.not, label %.preheader39, label %.preheader40, !llvm.loop !5

23:                                               ; preds = %.preheader40, %36
  %.03542 = phi i64 [ 0, %.preheader40 ], [ %38, %36 ]
  %24 = uitofp nneg i64 %.03542 to float
  %25 = fdiv float %24, 9.900000e+01
  %26 = invoke { <2 x float>, float } @_Z22evaluate_perlin_islandffRK19gui_scene_structure(float noundef %9, float noundef %25, ptr noundef nonnull align 4 dereferenceable(20) %1)
          to label %27 unwind label %39

27:                                               ; preds = %23
  %28 = add nuw nsw i64 %.03542, %10
  %29 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZN3vcl6bufferINS_12buffer_stackIfLm3EEEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %28)
          to label %30 unwind label %39

30:                                               ; preds = %27
  %.fca.1.extract = extractvalue { <2 x float>, float } %26, 1
  %.fca.0.extract = extractvalue { <2 x float>, float } %26, 0
  store <2 x float> %.fca.0.extract, ptr %29, align 4
  %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %29, i64 8
  store float %.fca.1.extract, ptr %.sroa.5.0..sroa_idx, align 4, !tbaa !7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  %31 = mul nuw nsw i64 %.03542, 5
  %32 = uitofp nneg i64 %31 to float
  %33 = fdiv float %32, 1.000000e+02
  invoke void @_ZN3vcl12buffer_stackIfLm2EEC1Eff(ptr noundef nonnull align 4 dereferenceable(8) %3, float noundef %13, float noundef %33)
          to label %34 unwind label %41

34:                                               ; preds = %30
  %35 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZN3vcl6bufferINS_12buffer_stackIfLm2EEEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %28)
          to label %36 unwind label %41

36:                                               ; preds = %34
  %37 = load i64, ptr %3, align 8
  store i64 %37, ptr %35, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  %38 = add nuw nsw i64 %.03542, 1
  %exitcond.not = icmp eq i64 %38, 100
  br i1 %exitcond.not, label %21, label %23, !llvm.loop !11

39:                                               ; preds = %27, %23
  %40 = landingpad { ptr, i32 }
          cleanup
  br label %55

41:                                               ; preds = %34, %30
  %42 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  br label %55

.preheader:                                       ; preds = %.preheader39, %43
  %.03045 = phi i32 [ 0, %.preheader39 ], [ %44, %43 ]
  %narrow = mul nuw nsw i32 %.03045, 100
  br label %45

43:                                               ; preds = %50
  %44 = add nuw nsw i32 %.03045, 1
  %exitcond48.not = icmp eq i32 %44, 99
  br i1 %exitcond48.not, label %54, label %.preheader, !llvm.loop !12

45:                                               ; preds = %.preheader, %50
  %.044 = phi i32 [ 0, %.preheader ], [ %51, %50 ]
  %narrow36 = add nuw nsw i32 %.044, %narrow
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %4) #6
  store i32 %narrow36, ptr %4, align 4, !tbaa !13
  %46 = add nuw nsw i32 %narrow36, 1
  %47 = add nuw nsw i32 %narrow36, 101
  store i32 %47, ptr %14, align 4, !tbaa !13
  store i32 %46, ptr %15, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %5) #6
  store i32 %narrow36, ptr %5, align 4, !tbaa !13
  %48 = add nuw nsw i32 %narrow36, 100
  store i32 %48, ptr %16, align 4, !tbaa !13
  store i32 %47, ptr %17, align 4, !tbaa !13
  invoke void @_ZN3vcl6bufferISt5arrayIjLm3EEE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %18, ptr noundef nonnull align 4 dereferenceable(12) %4)
          to label %49 unwind label %52

49:                                               ; preds = %45
  invoke void @_ZN3vcl6bufferISt5arrayIjLm3EEE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %18, ptr noundef nonnull align 4 dereferenceable(12) %5)
          to label %50 unwind label %52

50:                                               ; preds = %49
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %4) #6
  %51 = add nuw nsw i32 %.044, 1
  %exitcond47.not = icmp eq i32 %51, 99
  br i1 %exitcond47.not, label %43, label %45, !llvm.loop !15

52:                                               ; preds = %49, %45
  %53 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %4) #6
  br label %55

54:                                               ; preds = %43
  ret void

55:                                               ; preds = %39, %41, %52, %19
  %.pn.pn = phi { ptr, i32 } [ %53, %52 ], [ %20, %19 ], [ %42, %41 ], [ %40, %39 ]
  call void @_ZN3vcl4meshD2Ev(ptr noundef nonnull align 8 dereferenceable(120) %0) #6
  resume { ptr, i32 } %.pn.pn
}

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

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

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

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

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 noundef nonnull align 4 dereferenceable(8) ptr @_ZN3vcl6bufferINS_12buffer_stackIfLm2EEEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #4 align 2

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

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

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

!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 = !{!8, !8, i64 0}
!8 = !{!"float", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = distinct !{!11, !6}
!12 = distinct !{!12, !6}
!13 = !{!14, !14, i64 0}
!14 = !{!"int", !9, i64 0}
!15 = distinct !{!15, !6}


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