; LLVM IR from doyubkim/fluid-engine-dev :: src/jet (implicit_triangle_mesh3)

; 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.jet::BoundingBox" = type { %"class.jet::Vector", %"class.jet::Vector" }
%"class.jet::Vector" = type { double, double, double }
%"class.std::shared_ptr.0" = type { %"class.std::__shared_ptr.1" }
%"class.std::__shared_ptr.1" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.std::shared_ptr.3" = type { %"class.std::__shared_ptr.4" }
%"class.std::__shared_ptr.4" = type { ptr, %"class.std::__shared_count" }
%"class.jet::CustomImplicitSurface3::Builder" = type <{ %"class.jet::SurfaceBuilderBase3", %"class.std::function", %"class.jet::BoundingBox", double, double, i32, [4 x i8] }>
%"class.jet::SurfaceBuilderBase3" = type { i8, %"class.jet::Transform3" }
%"class.jet::Transform3" = type { %"class.jet::Vector", %"class.jet::Quaternion", %"class.jet::Matrix", %"class.jet::Matrix" }
%"class.jet::Quaternion" = type { double, double, double, double }
%"class.jet::Matrix" = type { %"struct.std::array" }
%"struct.std::array" = type { [9 x double] }
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%class.anon = type { ptr }
%class.anon.39 = type { i8 }
%"class.jet::ImplicitTriangleMesh3" = type { %"class.jet::ImplicitSurface3.base", %"class.std::shared_ptr", %"class.std::shared_ptr.0", %"class.std::shared_ptr.3" }
%"class.jet::ImplicitSurface3.base" = type { %"class.jet::Surface3.base" }
%"class.jet::Surface3.base" = type <{ ptr, %"class.jet::Transform3", i8 }>
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }

@_ZTVN3jet21ImplicitTriangleMesh3E = external dso_local unnamed_addr constant { [15 x ptr] }, align 8

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3jet21ImplicitTriangleMesh3C2ERKSt10shared_ptrINS_13TriangleMesh3EEmdRKNS_10Transform3Eb(ptr noundef nonnull align 8 dereferenceable(264) %0, ptr noundef nonnull align 8 dereferenceable(16) %1, i64 noundef %2, double noundef %3, ptr noundef nonnull align 8 dereferenceable(200) %4, i1 noundef zeroext %5) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i64, align 8
  %10 = alloca double, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i8, align 1
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca %"class.jet::BoundingBox", align 8
  %16 = alloca %"class.jet::Vector", align 8
  %17 = alloca %"class.jet::Vector", align 8
  %18 = alloca %"class.jet::Vector", align 8
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  %21 = alloca double, align 8
  %22 = alloca %"class.std::shared_ptr.0", align 8
  %23 = alloca %"class.std::shared_ptr.3", align 8
  %24 = alloca %"class.jet::CustomImplicitSurface3::Builder", align 8
  %25 = alloca %"class.std::function", align 8
  %26 = alloca %class.anon, align 8
  %27 = alloca %"class.std::shared_ptr.3", align 8
  %28 = alloca %"class.jet::CustomImplicitSurface3::Builder", align 8
  %29 = alloca %"class.std::function", align 8
  %30 = alloca %class.anon.39, align 1
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store i64 %2, ptr %9, align 8, !tbaa !9
  store double %3, ptr %10, align 8, !tbaa !11
  store ptr %4, ptr %11, align 8, !tbaa !5
  %31 = zext i1 %5 to i8
  store i8 %31, ptr %12, align 1, !tbaa !13
  %32 = load ptr, ptr %7, align 8
  %33 = load ptr, ptr %11, align 8, !tbaa !5
  %34 = load i8, ptr %12, align 1, !tbaa !13, !range !15, !noundef !16
  %35 = trunc i8 %34 to i1
  call void @_ZN3jet16ImplicitSurface3C2ERKNS_10Transform3Eb(ptr noundef nonnull align 8 dereferenceable(209) %32, ptr noundef nonnull align 8 dereferenceable(200) %33, i1 noundef zeroext %35)
  store ptr getelementptr inbounds inrange(-16, 104) ({ [15 x ptr] }, ptr @_ZTVN3jet21ImplicitTriangleMesh3E, i32 0, i32 0, i32 2), ptr %32, align 8, !tbaa !17
  %36 = getelementptr inbounds %"class.jet::ImplicitTriangleMesh3", ptr %32, i32 0, i32 1
  %37 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZNSt10shared_ptrIN3jet13TriangleMesh3EEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %36, ptr noundef nonnull align 8 dereferenceable(16) %37) #8
  %38 = getelementptr inbounds %"class.jet::ImplicitTriangleMesh3", ptr %32, i32 0, i32 2
  call void @_ZNSt10shared_ptrIN3jet25VertexCenteredScalarGrid3EEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %38) #8
  %39 = getelementptr inbounds %"class.jet::ImplicitTriangleMesh3", ptr %32, i32 0, i32 3
  call void @_ZNSt10shared_ptrIN3jet22CustomImplicitSurface3EEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %39) #8
  %40 = load ptr, ptr %8, align 8, !tbaa !5
  %41 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3jet13TriangleMesh3ELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %40) #8
  %42 = invoke noundef i64 @_ZNK3jet13TriangleMesh317numberOfTrianglesEv(ptr noundef nonnull align 8 dereferenceable(560) %41)
          to label %43 unwind label %140

43:                                               ; preds = %6
  %44 = icmp ugt i64 %42, 0
  br i1 %44, label %45, label %190

45:                                               ; preds = %43
  %46 = load ptr, ptr %8, align 8, !tbaa !5
  %47 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3jet13TriangleMesh3ELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %46) #8
  %48 = invoke noundef i64 @_ZNK3jet13TriangleMesh314numberOfPointsEv(ptr noundef nonnull align 8 dereferenceable(560) %47)
          to label %49 unwind label %140

49:                                               ; preds = %45
  %50 = icmp ugt i64 %48, 0
  br i1 %50, label %51, label %190

51:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 48, ptr %15) #8
  %52 = getelementptr inbounds %"class.jet::ImplicitTriangleMesh3", ptr %32, i32 0, i32 1
  %53 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3jet13TriangleMesh3ELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %52) #8
  invoke void @_ZNK3jet8Surface311boundingBoxEv(ptr dead_on_unwind writable sret(%"class.jet::BoundingBox") align 8 %15, ptr noundef nonnull align 8 dereferenceable(209) %53)
          to label %54 unwind label %144

54:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 24, ptr %16) #8
  %55 = invoke noundef double @_ZNK3jet11BoundingBoxIdLm3EE5widthEv(ptr noundef nonnull align 8 dereferenceable(48) %15)
          to label %56 unwind label %148

56:                                               ; preds = %54
  %57 = invoke noundef double @_ZNK3jet11BoundingBoxIdLm3EE6heightEv(ptr noundef nonnull align 8 dereferenceable(48) %15)
          to label %58 unwind label %148

58:                                               ; preds = %56
  %59 = invoke noundef double @_ZNK3jet11BoundingBoxIdLm3EE5depthEv(ptr noundef nonnull align 8 dereferenceable(48) %15)
          to label %60 unwind label %148

60:                                               ; preds = %58
  invoke void @_ZN3jet6VectorIdLm3EEC2Eddd(ptr noundef nonnull align 8 dereferenceable(24) %16, double noundef %55, double noundef %57, double noundef %59)
          to label %61 unwind label %148

61:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 24, ptr %17) #8
  %62 = load double, ptr %10, align 8, !tbaa !11
  invoke void @_ZN3jetmlIdEENS_6VectorIT_Lm3EEES2_RKS3_(ptr dead_on_unwind writable sret(%"class.jet::Vector") align 8 %17, double noundef %62, ptr noundef nonnull align 8 dereferenceable(24) %16)
          to label %63 unwind label %152

63:                                               ; preds = %61
  %64 = getelementptr inbounds %"class.jet::BoundingBox", ptr %15, i32 0, i32 0
  %65 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3jet6VectorIdLm3EEmIERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %64, ptr noundef nonnull align 8 dereferenceable(24) %17)
          to label %66 unwind label %152

66:                                               ; preds = %63
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr %18) #8
  %67 = load double, ptr %10, align 8, !tbaa !11
  invoke void @_ZN3jetmlIdEENS_6VectorIT_Lm3EEES2_RKS3_(ptr dead_on_unwind writable sret(%"class.jet::Vector") align 8 %18, double noundef %67, ptr noundef nonnull align 8 dereferenceable(24) %16)
          to label %68 unwind label %156

68:                                               ; preds = %66
  %69 = getelementptr inbounds %"class.jet::BoundingBox", ptr %15, i32 0, i32 1
  %70 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3jet6VectorIdLm3EEpLERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %69, ptr noundef nonnull align 8 dereferenceable(24) %18)
          to label %71 unwind label %156

71:                                               ; preds = %68
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #8
  %72 = load i64, ptr %9, align 8, !tbaa !9
  %73 = uitofp i64 %72 to double
  %74 = invoke noundef double @_ZNK3jet11BoundingBoxIdLm3EE6heightEv(ptr noundef nonnull align 8 dereferenceable(48) %15)
          to label %75 unwind label %160

75:                                               ; preds = %71
  %76 = fmul double %73, %74
  %77 = invoke noundef double @_ZNK3jet11BoundingBoxIdLm3EE5widthEv(ptr noundef nonnull align 8 dereferenceable(48) %15)
          to label %78 unwind label %160

78:                                               ; preds = %75
  %79 = fdiv double %76, %77
  %80 = call double @llvm.ceil.f64(double %79)
  %81 = fptoui double %80 to i64
  store i64 %81, ptr %19, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #8
  %82 = load i64, ptr %9, align 8, !tbaa !9
  %83 = uitofp i64 %82 to double
  %84 = invoke noundef double @_ZNK3jet11BoundingBoxIdLm3EE5depthEv(ptr noundef nonnull align 8 dereferenceable(48) %15)
          to label %85 unwind label %164

85:                                               ; preds = %78
  %86 = fmul double %83, %84
  %87 = invoke noundef double @_ZNK3jet11BoundingBoxIdLm3EE5widthEv(ptr noundef nonnull align 8 dereferenceable(48) %15)
          to label %88 unwind label %164

88:                                               ; preds = %85
  %89 = fdiv double %86, %87
  %90 = call double @llvm.ceil.f64(double %89)
  %91 = fptoui double %90 to i64
  store i64 %91, ptr %20, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #8
  %92 = invoke noundef double @_ZNK3jet11BoundingBoxIdLm3EE5widthEv(ptr noundef nonnull align 8 dereferenceable(48) %15)
          to label %93 unwind label %168

93:                                               ; preds = %88
  %94 = load i64, ptr %9, align 8, !tbaa !9
  %95 = uitofp i64 %94 to double
  %96 = fdiv double %92, %95
  store double %96, ptr %21, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 16, ptr %22) #8
  invoke void @_ZSt11make_sharedIN3jet25VertexCenteredScalarGrid3EJEESt10shared_ptrINSt9enable_ifIXntsr8is_arrayIT_EE5valueES4_E4typeEEDpOT0_(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.0") align 8 %22)
          to label %97 unwind label %172

97:                                               ; preds = %93
  %98 = getelementptr inbounds %"class.jet::ImplicitTriangleMesh3", ptr %32, i32 0, i32 2
  %99 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt10shared_ptrIN3jet25VertexCenteredScalarGrid3EEaSEOS2_(ptr noundef nonnull align 8 dereferenceable(16) %98, ptr noundef nonnull align 8 dereferenceable(16) %22) #8
  call void @_ZNSt12__shared_ptrIN3jet25VertexCenteredScalarGrid3ELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %22) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #8
  %100 = getelementptr inbounds %"class.jet::ImplicitTriangleMesh3", ptr %32, i32 0, i32 2
  %101 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3jet25VertexCenteredScalarGrid3ELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %100) #8
  %102 = load i64, ptr %9, align 8, !tbaa !9
  %103 = load i64, ptr %19, align 8, !tbaa !9
  %104 = load i64, ptr %20, align 8, !tbaa !9
  %105 = load double, ptr %21, align 8, !tbaa !11
  %106 = load double, ptr %21, align 8, !tbaa !11
  %107 = load double, ptr %21, align 8, !tbaa !11
  %108 = getelementptr inbounds %"class.jet::BoundingBox", ptr %15, i32 0, i32 0
  %109 = getelementptr inbounds %"class.jet::Vector", ptr %108, i32 0, i32 0
  %110 = load double, ptr %109, align 8, !tbaa !19
  %111 = getelementptr inbounds %"class.jet::BoundingBox", ptr %15, i32 0, i32 0
  %112 = getelementptr inbounds %"class.jet::Vector", ptr %111, i32 0, i32 1
  %113 = load double, ptr %112, align 8, !tbaa !22
  %114 = getelementptr inbounds %"class.jet::BoundingBox", ptr %15, i32 0, i32 0
  %115 = getelementptr inbounds %"class.jet::Vector", ptr %114, i32 0, i32 2
  %116 = load double, ptr %115, align 8, !tbaa !23
  invoke void @_ZN3jet11ScalarGrid36resizeEmmmddddddd(ptr noundef nonnull align 8 dereferenceable(320) %101, i64 noundef %102, i64 noundef %103, i64 noundef %104, double noundef %105, double noundef %106, double noundef %107, double noundef %110, double noundef %113, double noundef %116, double noundef 0.000000e+00)
          to label %117 unwind label %168

117:                                              ; preds = %97
  %118 = getelementptr inbounds %"class.jet::ImplicitTriangleMesh3", ptr %32, i32 0, i32 1
  %119 = call noundef nonnull align 8 dereferenceable(560) ptr @_ZNKSt19__shared_ptr_accessIN3jet13TriangleMesh3ELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEdeEv(ptr noundef nonnull align 1 dereferenceable(1) %118) #8
  %120 = getelementptr inbounds %"class.jet::ImplicitTriangleMesh3", ptr %32, i32 0, i32 2
  %121 = call noundef ptr @_ZNKSt12__shared_ptrIN3jet25VertexCenteredScalarGrid3ELN9__gnu_cxx12_Lock_policyE2EE3getEv(ptr noundef nonnull align 8 dereferenceable(16) %120) #8
  invoke void @_ZN3jet17triangleMeshToSdfERKNS_13TriangleMesh3EPNS_11ScalarGrid3Ej(ptr noundef nonnull align 8 dereferenceable(560) %119, ptr noundef %121, i32 noundef 1)
          to label %122 unwind label %168

122:                                              ; preds = %117
  call void @llvm.lifetime.start.p0(i64 16, ptr %23) #8
  call void @llvm.lifetime.start.p0(i64 312, ptr %24) #8
  invoke void @_ZN3jet22CustomImplicitSurface37builderEv(ptr dead_on_unwind writable sret(%"class.jet::CustomImplicitSurface3::Builder") align 8 %24)
          to label %123 unwind label %176

123:                                              ; preds = %122
  call void @llvm.lifetime.start.p0(i64 32, ptr %25) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #8
  %124 = getelementptr inbounds %class.anon, ptr %26, i32 0, i32 0
  store ptr %32, ptr %124, align 8, !tbaa !24
  call void @"_ZNSt8functionIFdRKN3jet6VectorIdLm3EEEEEC2IZNS0_21ImplicitTriangleMesh3C1ERKSt10shared_ptrINS0_13TriangleMesh3EEmdRKNS0_10Transform3EbE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %25, ptr noundef nonnull align 8 dereferenceable(8) %26) #8
  %125 = invoke noundef nonnull align 8 dereferenceable(312) ptr @_ZN3jet22CustomImplicitSurface37Builder26withSignedDistanceFunctionERKSt8functionIFdRKNS_6VectorIdLm3EEEEE(ptr noundef nonnull align 8 dereferenceable(312) %24, ptr noundef nonnull align 8 dereferenceable(32) %25)
          to label %126 unwind label %180

126:                                              ; preds = %123
  %127 = getelementptr inbounds %"class.jet::ImplicitTriangleMesh3", ptr %32, i32 0, i32 2
  %128 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3jet25VertexCenteredScalarGrid3ELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %127) #8
  %129 = getelementptr inbounds i8, ptr %128, i64 8
  %130 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZNK3jet5Grid311boundingBoxEv(ptr noundef nonnull align 8 dereferenceable(128) %129)
          to label %131 unwind label %180

131:                                              ; preds = %126
  %132 = invoke noundef nonnull align 8 dereferenceable(312) ptr @_ZN3jet22CustomImplicitSurface37Builder10withDomainERKNS_11BoundingBoxIdLm3EEE(ptr noundef nonnull align 8 dereferenceable(312) %125, ptr noundef nonnull align 8 dereferenceable(48) %130)
          to label %133 unwind label %180

133:                                              ; preds = %131
  %134 = load double, ptr %21, align 8, !tbaa !11
  %135 = invoke noundef nonnull align 8 dereferenceable(312) ptr @_ZN3jet22CustomImplicitSurface37Builder14withResolutionEd(ptr noundef nonnull align 8 dereferenceable(312) %132, double noundef %134)
          to label %136 unwind label %180

136:                                              ; preds = %133
  invoke void @_ZNK3jet22CustomImplicitSurface37Builder10makeSharedEv(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.3") align 8 %23, ptr noundef nonnull align 8 dereferenceable(312) %135)
          to label %137 unwind label %180

137:                                              ; preds = %136
  %138 = getelementptr inbounds %"class.jet::ImplicitTriangleMesh3", ptr %32, i32 0, i32 3
  %139 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt10shared_ptrIN3jet22CustomImplicitSurface3EEaSEOS2_(ptr noundef nonnull align 8 dereferenceable(16) %138, ptr noundef nonnull align 8 dereferenceable(16) %23) #8
  call void @_ZNSt12__shared_ptrIN3jet22CustomImplicitSurface3ELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %23) #8
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %25) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %25) #8
  call void @_ZN3jet22CustomImplicitSurface37BuilderD2Ev(ptr noundef nonnull align 8 dereferenceable(312) %24) #8
  call void @llvm.lifetime.end.p0(i64 312, ptr %24) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %15) #8
  br label %206

140:                                              ; preds = %45, %6
  %141 = landingpad { ptr, i32 }
          cleanup
  %142 = extractvalue { ptr, i32 } %141, 0
  store ptr %142, ptr %13, align 8
  %143 = extractvalue { ptr, i32 } %141, 1
  store i32 %143, ptr %14, align 4
  br label %207

144:                                              ; preds = %51
  %145 = landingpad { ptr, i32 }
          cleanup
  %146 = extractvalue { ptr, i32 } %145, 0
  store ptr %146, ptr %13, align 8
  %147 = extractvalue { ptr, i32 } %145, 1
  store i32 %147, ptr %14, align 4
  br label %189

148:                                              ; preds = %60, %58, %56, %54
  %149 = landingpad { ptr, i32 }
          cleanup
  %150 = extractvalue { ptr, i32 } %149, 0
  store ptr %150, ptr %13, align 8
  %151 = extractvalue { ptr, i32 } %149, 1
  store i32 %151, ptr %14, align 4
  br label %188

152:                                              ; preds = %63, %61
  %153 = landingpad { ptr, i32 }
          cleanup
  %154 = extractvalue { ptr, i32 } %153, 0
  store ptr %154, ptr %13, align 8
  %155 = extractvalue { ptr, i32 } %153, 1
  store i32 %155, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #8
  br label %188

156:                                              ; preds = %68, %66
  %157 = landingpad { ptr, i32 }
          cleanup
  %158 = extractvalue { ptr, i32 } %157, 0
  store ptr %158, ptr %13, align 8
  %159 = extractvalue { ptr, i32 } %157, 1
  store i32 %159, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #8
  br label %188

160:                                              ; preds = %75, %71
  %161 = landingpad { ptr, i32 }
          cleanup
  %162 = extractvalue { ptr, i32 } %161, 0
  store ptr %162, ptr %13, align 8
  %163 = extractvalue { ptr, i32 } %161, 1
  store i32 %163, ptr %14, align 4
  br label %187

164:                                              ; preds = %85, %78
  %165 = landingpad { ptr, i32 }
          cleanup
  %166 = extractvalue { ptr, i32 } %165, 0
  store ptr %166, ptr %13, align 8
  %167 = extractvalue { ptr, i32 } %165, 1
  store i32 %167, ptr %14, align 4
  br label %186

168:                                              ; preds = %117, %97, %88
  %169 = landingpad { ptr, i32 }
          cleanup
  %170 = extractvalue { ptr, i32 } %169, 0
  store ptr %170, ptr %13, align 8
  %171 = extractvalue { ptr, i32 } %169, 1
  store i32 %171, ptr %14, align 4
  br label %185

172:                                              ; preds = %93
  %173 = landingpad { ptr, i32 }
          cleanup
  %174 = extractvalue { ptr, i32 } %173, 0
  store ptr %174, ptr %13, align 8
  %175 = extractvalue { ptr, i32 } %173, 1
  store i32 %175, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #8
  br label %185

176:                                              ; preds = %122
  %177 = landingpad { ptr, i32 }
          cleanup
  %178 = extractvalue { ptr, i32 } %177, 0
  store ptr %178, ptr %13, align 8
  %179 = extractvalue { ptr, i32 } %177, 1
  store i32 %179, ptr %14, align 4
  br label %184

180:                                              ; preds = %136, %133, %131, %126, %123
  %181 = landingpad { ptr, i32 }
          cleanup
  %182 = extractvalue { ptr, i32 } %181, 0
  store ptr %182, ptr %13, align 8
  %183 = extractvalue { ptr, i32 } %181, 1
  store i32 %183, ptr %14, align 4
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %25) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %25) #8
  call void @_ZN3jet22CustomImplicitSurface37BuilderD2Ev(ptr noundef nonnull align 8 dereferenceable(312) %24) #8
  br label %184

184:                                              ; preds = %180, %176
  call void @llvm.lifetime.end.p0(i64 312, ptr %24) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #8
  br label %185

185:                                              ; preds = %184, %172, %168
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  br label %186

186:                                              ; preds = %185, %164
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  br label %187

187:                                              ; preds = %186, %160
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  br label %188

188:                                              ; preds = %187, %156, %152, %148
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #8
  br label %189

189:                                              ; preds = %188, %144
  call void @llvm.lifetime.end.p0(i64 48, ptr %15) #8
  br label %207

190:                                              ; preds = %49, %43
  call void @llvm.lifetime.start.p0(i64 16, ptr %27) #8
  call void @llvm.lifetime.start.p0(i64 312, ptr %28) #8
  invoke void @_ZN3jet22CustomImplicitSurface37builderEv(ptr dead_on_unwind writable sret(%"class.jet::CustomImplicitSurface3::Builder") align 8 %28)
          to label %191 unwind label %197

191:                                              ; preds = %190
  call void @llvm.lifetime.start.p0(i64 32, ptr %29) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr %30) #8
  call void @"_ZNSt8functionIFdRKN3jet6VectorIdLm3EEEEEC2IZNS0_21ImplicitTriangleMesh3C1ERKSt10shared_ptrINS0_13TriangleMesh3EEmdRKNS0_10Transform3EbE3$_1vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %29, ptr noundef nonnull align 1 dereferenceable(1) %30) #8
  %192 = invoke noundef nonnull align 8 dereferenceable(312) ptr @_ZN3jet22CustomImplicitSurface37Builder26withSignedDistanceFunctionERKSt8functionIFdRKNS_6VectorIdLm3EEEEE(ptr noundef nonnull align 8 dereferenceable(312) %28, ptr noundef nonnull align 8 dereferenceable(32) %29)
          to label %193 unwind label %201

193:                                              ; preds = %191
  invoke void @_ZNK3jet22CustomImplicitSurface37Builder10makeSharedEv(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.3") align 8 %27, ptr noundef nonnull align 8 dereferenceable(312) %192)
          to label %194 unwind label %201

194:                                              ; preds = %193
  %195 = getelementptr inbounds %"class.jet::ImplicitTriangleMesh3", ptr %32, i32 0, i32 3
  %196 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt10shared_ptrIN3jet22CustomImplicitSurface3EEaSEOS2_(ptr noundef nonnull align 8 dereferenceable(16) %195, ptr noundef nonnull align 8 dereferenceable(16) %27) #8
  call void @_ZNSt12__shared_ptrIN3jet22CustomImplicitSurface3ELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %27) #8
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %29) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %30) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %29) #8
  call void @_ZN3jet22CustomImplicitSurface37BuilderD2Ev(ptr noundef nonnull align 8 dereferenceable(312) %28) #8
  call void @llvm.lifetime.end.p0(i64 312, ptr %28) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %27) #8
  br label %206

197:                                              ; preds = %190
  %198 = landingpad { ptr, i32 }
          cleanup
  %199 = extractvalue { ptr, i32 } %198, 0
  store ptr %199, ptr %13, align 8
  %200 = extractvalue { ptr, i32 } %198, 1
  store i32 %200, ptr %14, align 4
  br label %205

201:                                              ; preds = %193, %191
  %202 = landingpad { ptr, i32 }
          cleanup
  %203 = extractvalue { ptr, i32 } %202, 0
  store ptr %203, ptr %13, align 8
  %204 = extractvalue { ptr, i32 } %202, 1
  store i32 %204, ptr %14, align 4
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %29) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %30) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %29) #8
  call void @_ZN3jet22CustomImplicitSurface37BuilderD2Ev(ptr noundef nonnull align 8 dereferenceable(312) %28) #8
  br label %205

205:                                              ; preds = %201, %197
  call void @llvm.lifetime.end.p0(i64 312, ptr %28) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %27) #8
  br label %207

206:                                              ; preds = %194, %137
  ret void

207:                                              ; preds = %205, %189, %140
  call void @_ZNSt12__shared_ptrIN3jet22CustomImplicitSurface3ELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %39) #8
  call void @_ZNSt12__shared_ptrIN3jet25VertexCenteredScalarGrid3ELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %38) #8
  call void @_ZNSt12__shared_ptrIN3jet13TriangleMesh3ELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %36) #8
  call void @_ZN3jet16ImplicitSurface3D2Ev(ptr noundef nonnull align 8 dereferenceable(209) %32) #8
  br label %208

208:                                              ; preds = %207
  %209 = load ptr, ptr %13, align 8
  %210 = load i32, ptr %14, align 4
  %211 = insertvalue { ptr, i32 } poison, ptr %209, 0
  %212 = insertvalue { ptr, i32 } %211, i32 %210, 1
  resume { ptr, i32 } %212
}

declare void @_ZN3jet16ImplicitSurface3C2ERKNS_10Transform3Eb(ptr noundef nonnull align 8 dereferenceable(209), ptr noundef nonnull align 8 dereferenceable(200), i1 noundef zeroext) unnamed_addr #1

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

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

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

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

declare noundef i64 @_ZNK3jet13TriangleMesh317numberOfTrianglesEv(ptr noundef nonnull align 8 dereferenceable(560)) #1

declare i32 @__gxx_personality_v0(...)

declare noundef i64 @_ZNK3jet13TriangleMesh314numberOfPointsEv(ptr noundef nonnull align 8 dereferenceable(560)) #1

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

declare void @_ZNK3jet8Surface311boundingBoxEv(ptr dead_on_unwind writable sret(%"class.jet::BoundingBox") align 8, ptr noundef nonnull align 8 dereferenceable(209)) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK3jet11BoundingBoxIdLm3EE5widthEv(ptr noundef nonnull align 8 dereferenceable(48)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK3jet11BoundingBoxIdLm3EE6heightEv(ptr noundef nonnull align 8 dereferenceable(48)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK3jet11BoundingBoxIdLm3EE5depthEv(ptr noundef nonnull align 8 dereferenceable(48)) #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3jetmlIdEENS_6VectorIT_Lm3EEES2_RKS3_(ptr dead_on_unwind noalias writable sret(%"class.jet::Vector") align 8, double noundef, ptr noundef nonnull align 8 dereferenceable(24)) #0

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt11make_sharedIN3jet25VertexCenteredScalarGrid3EJEESt10shared_ptrINSt9enable_ifIXntsr8is_arrayIT_EE5valueES4_E4typeEEDpOT0_(ptr dead_on_unwind noalias writable sret(%"class.std::shared_ptr.0") align 8) #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt10shared_ptrIN3jet25VertexCenteredScalarGrid3EEaSEOS2_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #2 align 2

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

declare void @_ZN3jet11ScalarGrid36resizeEmmmddddddd(ptr noundef nonnull align 8 dereferenceable(320), i64 noundef, i64 noundef, i64 noundef, double noundef, double noundef, double noundef, double noundef, double noundef, double noundef, double noundef) #1

declare void @_ZN3jet17triangleMeshToSdfERKNS_13TriangleMesh3EPNS_11ScalarGrid3Ej(ptr noundef nonnull align 8 dereferenceable(560), ptr noundef, i32 noundef) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(560) ptr @_ZNKSt19__shared_ptr_accessIN3jet13TriangleMesh3ELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEdeEv(ptr noundef nonnull align 1 dereferenceable(1)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt12__shared_ptrIN3jet25VertexCenteredScalarGrid3ELN9__gnu_cxx12_Lock_policyE2EE3getEv(ptr noundef nonnull align 8 dereferenceable(16)) #2 align 2

declare void @_ZN3jet22CustomImplicitSurface37builderEv(ptr dead_on_unwind writable sret(%"class.jet::CustomImplicitSurface3::Builder") align 8) #1

declare noundef nonnull align 8 dereferenceable(312) ptr @_ZN3jet22CustomImplicitSurface37Builder26withSignedDistanceFunctionERKSt8functionIFdRKNS_6VectorIdLm3EEEEE(ptr noundef nonnull align 8 dereferenceable(312), ptr noundef nonnull align 8 dereferenceable(32)) #1

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @"_ZNSt8functionIFdRKN3jet6VectorIdLm3EEEEEC2IZNS0_21ImplicitTriangleMesh3C1ERKSt10shared_ptrINS0_13TriangleMesh3EEmdRKNS0_10Transform3EbE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #2 align 2

declare noundef nonnull align 8 dereferenceable(312) ptr @_ZN3jet22CustomImplicitSurface37Builder10withDomainERKNS_11BoundingBoxIdLm3EEE(ptr noundef nonnull align 8 dereferenceable(312), ptr noundef nonnull align 8 dereferenceable(48)) #1

declare noundef nonnull align 8 dereferenceable(48) ptr @_ZNK3jet5Grid311boundingBoxEv(ptr noundef nonnull align 8 dereferenceable(128)) #1

declare noundef nonnull align 8 dereferenceable(312) ptr @_ZN3jet22CustomImplicitSurface37Builder14withResolutionEd(ptr noundef nonnull align 8 dereferenceable(312), double noundef) #1

declare void @_ZNK3jet22CustomImplicitSurface37Builder10makeSharedEv(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.3") align 8, ptr noundef nonnull align 8 dereferenceable(312)) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt10shared_ptrIN3jet22CustomImplicitSurface3EEaSEOS2_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #2 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @"_ZNSt8functionIFdRKN3jet6VectorIdLm3EEEEEC2IZNS0_21ImplicitTriangleMesh3C1ERKSt10shared_ptrINS0_13TriangleMesh3EEmdRKNS0_10Transform3EbE3$_1vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

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

; Function Attrs: nounwind
declare void @_ZN3jet16ImplicitSurface3D2Ev(ptr noundef nonnull align 8 dereferenceable(209)) unnamed_addr #7

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

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

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"bool", !7, i64 0}
!15 = !{i8 0, i8 2}
!16 = !{}
!17 = !{!18, !18, i64 0}
!18 = !{!"vtable pointer", !8, i64 0}
!19 = !{!20, !12, i64 0}
!20 = !{!"_ZTSN3jet11BoundingBoxIdLm3EEE", !21, i64 0, !21, i64 24}
!21 = !{!"_ZTSN3jet6VectorIdLm3EEE", !12, i64 0, !12, i64 8, !12, i64 16}
!22 = !{!20, !12, i64 8}
!23 = !{!20, !12, i64 16}
!24 = !{!25, !6, i64 0}
!25 = !{!"_ZTSZN3jet21ImplicitTriangleMesh3C1ERKSt10shared_ptrINS_13TriangleMesh3EEmdRKNS_10Transform3EbE3$_0", !6, i64 0}


; 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.jet::BoundingBox" = type { %"class.jet::Vector", %"class.jet::Vector" }
%"class.jet::Vector" = type { double, double, double }
%"class.std::shared_ptr.0" = type { %"class.std::__shared_ptr.1" }
%"class.std::__shared_ptr.1" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.std::shared_ptr.3" = type { %"class.std::__shared_ptr.4" }
%"class.std::__shared_ptr.4" = type { ptr, %"class.std::__shared_count" }
%"class.jet::CustomImplicitSurface3::Builder" = type <{ %"class.jet::SurfaceBuilderBase3", %"class.std::function", %"class.jet::BoundingBox", double, double, i32, [4 x i8] }>
%"class.jet::SurfaceBuilderBase3" = type { i8, %"class.jet::Transform3" }
%"class.jet::Transform3" = type { %"class.jet::Vector", %"class.jet::Quaternion", %"class.jet::Matrix", %"class.jet::Matrix" }
%"class.jet::Quaternion" = type { double, double, double, double }
%"class.jet::Matrix" = type { %"struct.std::array" }
%"struct.std::array" = type { [9 x double] }
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%class.anon = type { ptr }
%class.anon.39 = type { i8 }

@_ZTVN3jet21ImplicitTriangleMesh3E = external dso_local unnamed_addr constant { [15 x ptr] }, align 8

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3jet21ImplicitTriangleMesh3C2ERKSt10shared_ptrINS_13TriangleMesh3EEmdRKNS_10Transform3Eb(ptr noundef nonnull align 8 dereferenceable(264) %0, ptr noundef nonnull align 8 dereferenceable(16) %1, i64 noundef %2, double noundef %3, ptr noundef nonnull align 8 dereferenceable(200) %4, i1 noundef zeroext %5) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %7 = alloca %"class.jet::BoundingBox", align 8
  %8 = alloca %"class.jet::Vector", align 8
  %9 = alloca %"class.jet::Vector", align 8
  %10 = alloca %"class.jet::Vector", align 8
  %11 = alloca %"class.std::shared_ptr.0", align 8
  %12 = alloca %"class.std::shared_ptr.3", align 8
  %13 = alloca %"class.jet::CustomImplicitSurface3::Builder", align 8
  %14 = alloca %"class.std::function", align 8
  %15 = alloca %class.anon, align 8
  %16 = alloca %"class.std::shared_ptr.3", align 8
  %17 = alloca %"class.jet::CustomImplicitSurface3::Builder", align 8
  %18 = alloca %"class.std::function", align 8
  %19 = alloca %class.anon.39, align 1
  tail call void @_ZN3jet16ImplicitSurface3C2ERKNS_10Transform3Eb(ptr noundef nonnull align 8 dereferenceable(209) %0, ptr noundef nonnull align 8 dereferenceable(200) %4, i1 noundef zeroext %5)
  store ptr getelementptr inbounds inrange(-16, 104) (i8, ptr @_ZTVN3jet21ImplicitTriangleMesh3E, i64 16), ptr %0, align 8, !tbaa !5
  %20 = getelementptr inbounds i8, ptr %0, i64 216
  tail call void @_ZNSt10shared_ptrIN3jet13TriangleMesh3EEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %20, ptr noundef nonnull align 8 dereferenceable(16) %1) #8
  %21 = getelementptr inbounds i8, ptr %0, i64 232
  tail call void @_ZNSt10shared_ptrIN3jet25VertexCenteredScalarGrid3EEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %21) #8
  %22 = getelementptr inbounds i8, ptr %0, i64 248
  tail call void @_ZNSt10shared_ptrIN3jet22CustomImplicitSurface3EEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %22) #8
  %23 = tail call noundef ptr @_ZNKSt19__shared_ptr_accessIN3jet13TriangleMesh3ELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %1) #8
  %24 = invoke noundef i64 @_ZNK3jet13TriangleMesh317numberOfTrianglesEv(ptr noundef nonnull align 8 dereferenceable(560) %23)
          to label %25 unwind label %83

25:                                               ; preds = %6
  %.not = icmp eq i64 %24, 0
  br i1 %.not, label %102, label %26

26:                                               ; preds = %25
  %27 = tail call noundef ptr @_ZNKSt19__shared_ptr_accessIN3jet13TriangleMesh3ELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %1) #8
  %28 = invoke noundef i64 @_ZNK3jet13TriangleMesh314numberOfPointsEv(ptr noundef nonnull align 8 dereferenceable(560) %27)
          to label %29 unwind label %83

29:                                               ; preds = %26
  %.not25 = icmp eq i64 %28, 0
  br i1 %.not25, label %102, label %30

30:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %7) #8
  %31 = tail call noundef ptr @_ZNKSt19__shared_ptr_accessIN3jet13TriangleMesh3ELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %20) #8
  invoke void @_ZNK3jet8Surface311boundingBoxEv(ptr dead_on_unwind nonnull writable sret(%"class.jet::BoundingBox") align 8 %7, ptr noundef nonnull align 8 dereferenceable(209) %31)
          to label %32 unwind label %85

32:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #8
  %33 = call noundef double @_ZNK3jet11BoundingBoxIdLm3EE5widthEv(ptr noundef nonnull align 8 dereferenceable(48) %7)
  %34 = call noundef double @_ZNK3jet11BoundingBoxIdLm3EE6heightEv(ptr noundef nonnull align 8 dereferenceable(48) %7)
  %35 = call noundef double @_ZNK3jet11BoundingBoxIdLm3EE5depthEv(ptr noundef nonnull align 8 dereferenceable(48) %7)
  call void @_ZN3jet6VectorIdLm3EEC2Eddd(ptr noundef nonnull align 8 dereferenceable(24) %8, double noundef %33, double noundef %34, double noundef %35)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #8
  invoke void @_ZN3jetmlIdEENS_6VectorIT_Lm3EEES2_RKS3_(ptr dead_on_unwind nonnull writable sret(%"class.jet::Vector") align 8 %9, double noundef %3, ptr noundef nonnull align 8 dereferenceable(24) %8)
          to label %36 unwind label %87

36:                                               ; preds = %32
  %37 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3jet6VectorIdLm3EEmIERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(24) %9)
          to label %38 unwind label %87

38:                                               ; preds = %36
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #8
  invoke void @_ZN3jetmlIdEENS_6VectorIT_Lm3EEES2_RKS3_(ptr dead_on_unwind nonnull writable sret(%"class.jet::Vector") align 8 %10, double noundef %3, ptr noundef nonnull align 8 dereferenceable(24) %8)
          to label %39 unwind label %89

39:                                               ; preds = %38
  %40 = getelementptr inbounds i8, ptr %7, i64 24
  %41 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3jet6VectorIdLm3EEpLERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %40, ptr noundef nonnull align 8 dereferenceable(24) %10)
          to label %42 unwind label %89

42:                                               ; preds = %39
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #8
  %43 = uitofp i64 %2 to double
  %44 = call noundef double @_ZNK3jet11BoundingBoxIdLm3EE6heightEv(ptr noundef nonnull align 8 dereferenceable(48) %7)
  %45 = call noundef double @_ZNK3jet11BoundingBoxIdLm3EE5widthEv(ptr noundef nonnull align 8 dereferenceable(48) %7)
  %46 = call noundef double @_ZNK3jet11BoundingBoxIdLm3EE5depthEv(ptr noundef nonnull align 8 dereferenceable(48) %7)
  %47 = call noundef double @_ZNK3jet11BoundingBoxIdLm3EE5widthEv(ptr noundef nonnull align 8 dereferenceable(48) %7)
  %48 = call noundef double @_ZNK3jet11BoundingBoxIdLm3EE5widthEv(ptr noundef nonnull align 8 dereferenceable(48) %7)
  %49 = fdiv double %48, %43
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #8
  invoke void @_ZSt11make_sharedIN3jet25VertexCenteredScalarGrid3EJEESt10shared_ptrINSt9enable_ifIXntsr8is_arrayIT_EE5valueES4_E4typeEEDpOT0_(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr.0") align 8 %11)
          to label %50 unwind label %93

50:                                               ; preds = %42
  %51 = fmul double %46, %43
  %52 = fdiv double %51, %47
  %53 = call double @llvm.ceil.f64(double %52)
  %54 = fptoui double %53 to i64
  %55 = fmul double %44, %43
  %56 = fdiv double %55, %45
  %57 = call double @llvm.ceil.f64(double %56)
  %58 = fptoui double %57 to i64
  %59 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt10shared_ptrIN3jet25VertexCenteredScalarGrid3EEaSEOS2_(ptr noundef nonnull align 8 dereferenceable(16) %21, ptr noundef nonnull align 8 dereferenceable(16) %11) #8
  call void @_ZNSt12__shared_ptrIN3jet25VertexCenteredScalarGrid3ELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %11) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #8
  %60 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3jet25VertexCenteredScalarGrid3ELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %21) #8
  %61 = load double, ptr %7, align 8, !tbaa !8
  %62 = getelementptr inbounds i8, ptr %7, i64 8
  %63 = load double, ptr %62, align 8, !tbaa !13
  %64 = getelementptr inbounds i8, ptr %7, i64 16
  %65 = load double, ptr %64, align 8, !tbaa !14
  invoke void @_ZN3jet11ScalarGrid36resizeEmmmddddddd(ptr noundef nonnull align 8 dereferenceable(320) %60, i64 noundef %2, i64 noundef %58, i64 noundef %54, double noundef %49, double noundef %49, double noundef %49, double noundef %61, double noundef %63, double noundef %65, double noundef 0.000000e+00)
          to label %66 unwind label %91

66:                                               ; preds = %50
  %67 = call noundef nonnull align 8 dereferenceable(560) ptr @_ZNKSt19__shared_ptr_accessIN3jet13TriangleMesh3ELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEdeEv(ptr noundef nonnull align 1 dereferenceable(1) %20) #8
  %68 = call noundef ptr @_ZNKSt12__shared_ptrIN3jet25VertexCenteredScalarGrid3ELN9__gnu_cxx12_Lock_policyE2EE3getEv(ptr noundef nonnull align 8 dereferenceable(16) %21) #8
  invoke void @_ZN3jet17triangleMeshToSdfERKNS_13TriangleMesh3EPNS_11ScalarGrid3Ej(ptr noundef nonnull align 8 dereferenceable(560) %67, ptr noundef %68, i32 noundef 1)
          to label %69 unwind label %91

69:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #8
  call void @llvm.lifetime.start.p0(i64 312, ptr nonnull %13) #8
  invoke void @_ZN3jet22CustomImplicitSurface37builderEv(ptr dead_on_unwind nonnull writable sret(%"class.jet::CustomImplicitSurface3::Builder") align 8 %13)
          to label %70 unwind label %95

70:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %14) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #8
  store ptr %0, ptr %15, align 8, !tbaa !15
  call void @"_ZNSt8functionIFdRKN3jet6VectorIdLm3EEEEEC2IZNS0_21ImplicitTriangleMesh3C1ERKSt10shared_ptrINS0_13TriangleMesh3EEmdRKNS0_10Transform3EbE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef nonnull align 8 dereferenceable(8) %15) #8
  %71 = invoke noundef nonnull align 8 dereferenceable(312) ptr @_ZN3jet22CustomImplicitSurface37Builder26withSignedDistanceFunctionERKSt8functionIFdRKNS_6VectorIdLm3EEEEE(ptr noundef nonnull align 8 dereferenceable(312) %13, ptr noundef nonnull align 8 dereferenceable(32) %14)
          to label %72 unwind label %97

72:                                               ; preds = %70
  %73 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3jet25VertexCenteredScalarGrid3ELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %21) #8
  %74 = getelementptr inbounds i8, ptr %73, i64 8
  %75 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZNK3jet5Grid311boundingBoxEv(ptr noundef nonnull align 8 dereferenceable(128) %74)
          to label %76 unwind label %97

76:                                               ; preds = %72
  %77 = invoke noundef nonnull align 8 dereferenceable(312) ptr @_ZN3jet22CustomImplicitSurface37Builder10withDomainERKNS_11BoundingBoxIdLm3EEE(ptr noundef nonnull align 8 dereferenceable(312) %71, ptr noundef nonnull align 8 dereferenceable(48) %75)
          to label %78 unwind label %97

78:                                               ; preds = %76
  %79 = invoke noundef nonnull align 8 dereferenceable(312) ptr @_ZN3jet22CustomImplicitSurface37Builder14withResolutionEd(ptr noundef nonnull align 8 dereferenceable(312) %77, double noundef %49)
          to label %80 unwind label %97

80:                                               ; preds = %78
  invoke void @_ZNK3jet22CustomImplicitSurface37Builder10makeSharedEv(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr.3") align 8 %12, ptr noundef nonnull align 8 dereferenceable(312) %79)
          to label %81 unwind label %97

81:                                               ; preds = %80
  %82 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt10shared_ptrIN3jet22CustomImplicitSurface3EEaSEOS2_(ptr noundef nonnull align 8 dereferenceable(16) %22, ptr noundef nonnull align 8 dereferenceable(16) %12) #8
  call void @_ZNSt12__shared_ptrIN3jet22CustomImplicitSurface3ELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %12) #8
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %14) #8
  call void @_ZN3jet22CustomImplicitSurface37BuilderD2Ev(ptr noundef nonnull align 8 dereferenceable(312) %13) #8
  call void @llvm.lifetime.end.p0(i64 312, ptr nonnull %13) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %7) #8
  br label %113

83:                                               ; preds = %26, %6
  %84 = landingpad { ptr, i32 }
          cleanup
  br label %114

85:                                               ; preds = %30
  %86 = landingpad { ptr, i32 }
          cleanup
  br label %101

87:                                               ; preds = %36, %32
  %88 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #8
  br label %100

89:                                               ; preds = %39, %38
  %90 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #8
  br label %100

91:                                               ; preds = %66, %50
  %92 = landingpad { ptr, i32 }
          cleanup
  br label %100

93:                                               ; preds = %42
  %94 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #8
  br label %100

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

97:                                               ; preds = %80, %78, %76, %72, %70
  %98 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %14) #8
  call void @_ZN3jet22CustomImplicitSurface37BuilderD2Ev(ptr noundef nonnull align 8 dereferenceable(312) %13) #8
  br label %99

99:                                               ; preds = %97, %95
  %.pn27 = phi { ptr, i32 } [ %98, %97 ], [ %96, %95 ]
  call void @llvm.lifetime.end.p0(i64 312, ptr nonnull %13) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #8
  br label %100

100:                                              ; preds = %91, %93, %99, %89, %87
  %.pn27.pn.pn = phi { ptr, i32 } [ %90, %89 ], [ %88, %87 ], [ %.pn27, %99 ], [ %92, %91 ], [ %94, %93 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #8
  br label %101

101:                                              ; preds = %100, %85
  %.pn27.pn.pn.pn = phi { ptr, i32 } [ %.pn27.pn.pn, %100 ], [ %86, %85 ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %7) #8
  br label %114

102:                                              ; preds = %29, %25
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %16) #8
  call void @llvm.lifetime.start.p0(i64 312, ptr nonnull %17) #8
  invoke void @_ZN3jet22CustomImplicitSurface37builderEv(ptr dead_on_unwind nonnull writable sret(%"class.jet::CustomImplicitSurface3::Builder") align 8 %17)
          to label %103 unwind label %108

103:                                              ; preds = %102
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %18) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %19) #8
  call void @"_ZNSt8functionIFdRKN3jet6VectorIdLm3EEEEEC2IZNS0_21ImplicitTriangleMesh3C1ERKSt10shared_ptrINS0_13TriangleMesh3EEmdRKNS0_10Transform3EbE3$_1vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %18, ptr noundef nonnull align 1 dereferenceable(1) %19) #8
  %104 = invoke noundef nonnull align 8 dereferenceable(312) ptr @_ZN3jet22CustomImplicitSurface37Builder26withSignedDistanceFunctionERKSt8functionIFdRKNS_6VectorIdLm3EEEEE(ptr noundef nonnull align 8 dereferenceable(312) %17, ptr noundef nonnull align 8 dereferenceable(32) %18)
          to label %105 unwind label %110

105:                                              ; preds = %103
  invoke void @_ZNK3jet22CustomImplicitSurface37Builder10makeSharedEv(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr.3") align 8 %16, ptr noundef nonnull align 8 dereferenceable(312) %104)
          to label %106 unwind label %110

106:                                              ; preds = %105
  %107 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt10shared_ptrIN3jet22CustomImplicitSurface3EEaSEOS2_(ptr noundef nonnull align 8 dereferenceable(16) %22, ptr noundef nonnull align 8 dereferenceable(16) %16) #8
  call void @_ZNSt12__shared_ptrIN3jet22CustomImplicitSurface3ELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %16) #8
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %19) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %18) #8
  call void @_ZN3jet22CustomImplicitSurface37BuilderD2Ev(ptr noundef nonnull align 8 dereferenceable(312) %17) #8
  call void @llvm.lifetime.end.p0(i64 312, ptr nonnull %17) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #8
  br label %113

108:                                              ; preds = %102
  %109 = landingpad { ptr, i32 }
          cleanup
  br label %112

110:                                              ; preds = %105, %103
  %111 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %19) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %18) #8
  call void @_ZN3jet22CustomImplicitSurface37BuilderD2Ev(ptr noundef nonnull align 8 dereferenceable(312) %17) #8
  br label %112

112:                                              ; preds = %110, %108
  %.pn = phi { ptr, i32 } [ %111, %110 ], [ %109, %108 ]
  call void @llvm.lifetime.end.p0(i64 312, ptr nonnull %17) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #8
  br label %114

113:                                              ; preds = %106, %81
  ret void

114:                                              ; preds = %112, %101, %83
  %.pn27.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn27.pn.pn.pn, %101 ], [ %.pn, %112 ], [ %84, %83 ]
  call void @_ZNSt12__shared_ptrIN3jet22CustomImplicitSurface3ELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %22) #8
  call void @_ZNSt12__shared_ptrIN3jet25VertexCenteredScalarGrid3ELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %21) #8
  call void @_ZNSt12__shared_ptrIN3jet13TriangleMesh3ELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %20) #8
  call void @_ZN3jet16ImplicitSurface3D2Ev(ptr noundef nonnull align 8 dereferenceable(209) %0) #8
  resume { ptr, i32 } %.pn27.pn.pn.pn.pn
}

declare void @_ZN3jet16ImplicitSurface3C2ERKNS_10Transform3Eb(ptr noundef nonnull align 8 dereferenceable(209), ptr noundef nonnull align 8 dereferenceable(200), i1 noundef zeroext) unnamed_addr #1

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

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

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

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

declare noundef i64 @_ZNK3jet13TriangleMesh317numberOfTrianglesEv(ptr noundef nonnull align 8 dereferenceable(560)) local_unnamed_addr #1

declare i32 @__gxx_personality_v0(...)

declare noundef i64 @_ZNK3jet13TriangleMesh314numberOfPointsEv(ptr noundef nonnull align 8 dereferenceable(560)) local_unnamed_addr #1

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

declare void @_ZNK3jet8Surface311boundingBoxEv(ptr dead_on_unwind writable sret(%"class.jet::BoundingBox") align 8, ptr noundef nonnull align 8 dereferenceable(209)) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK3jet11BoundingBoxIdLm3EE5widthEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK3jet11BoundingBoxIdLm3EE6heightEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK3jet11BoundingBoxIdLm3EE5depthEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3jetmlIdEENS_6VectorIT_Lm3EEES2_RKS3_(ptr dead_on_unwind noalias writable sret(%"class.jet::Vector") align 8, double noundef, ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0

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

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

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.ceil.f64(double) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt11make_sharedIN3jet25VertexCenteredScalarGrid3EJEESt10shared_ptrINSt9enable_ifIXntsr8is_arrayIT_EE5valueES4_E4typeEEDpOT0_(ptr dead_on_unwind noalias writable sret(%"class.std::shared_ptr.0") align 8) local_unnamed_addr #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt10shared_ptrIN3jet25VertexCenteredScalarGrid3EEaSEOS2_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2 align 2

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

declare void @_ZN3jet11ScalarGrid36resizeEmmmddddddd(ptr noundef nonnull align 8 dereferenceable(320), i64 noundef, i64 noundef, i64 noundef, double noundef, double noundef, double noundef, double noundef, double noundef, double noundef, double noundef) local_unnamed_addr #1

declare void @_ZN3jet17triangleMeshToSdfERKNS_13TriangleMesh3EPNS_11ScalarGrid3Ej(ptr noundef nonnull align 8 dereferenceable(560), ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(560) ptr @_ZNKSt19__shared_ptr_accessIN3jet13TriangleMesh3ELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEdeEv(ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt12__shared_ptrIN3jet25VertexCenteredScalarGrid3ELN9__gnu_cxx12_Lock_policyE2EE3getEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2 align 2

declare void @_ZN3jet22CustomImplicitSurface37builderEv(ptr dead_on_unwind writable sret(%"class.jet::CustomImplicitSurface3::Builder") align 8) local_unnamed_addr #1

declare noundef nonnull align 8 dereferenceable(312) ptr @_ZN3jet22CustomImplicitSurface37Builder26withSignedDistanceFunctionERKSt8functionIFdRKNS_6VectorIdLm3EEEEE(ptr noundef nonnull align 8 dereferenceable(312), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @"_ZNSt8functionIFdRKN3jet6VectorIdLm3EEEEEC2IZNS0_21ImplicitTriangleMesh3C1ERKSt10shared_ptrINS0_13TriangleMesh3EEmdRKNS0_10Transform3EbE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #2 align 2

declare noundef nonnull align 8 dereferenceable(312) ptr @_ZN3jet22CustomImplicitSurface37Builder10withDomainERKNS_11BoundingBoxIdLm3EEE(ptr noundef nonnull align 8 dereferenceable(312), ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #1

declare noundef nonnull align 8 dereferenceable(48) ptr @_ZNK3jet5Grid311boundingBoxEv(ptr noundef nonnull align 8 dereferenceable(128)) local_unnamed_addr #1

declare noundef nonnull align 8 dereferenceable(312) ptr @_ZN3jet22CustomImplicitSurface37Builder14withResolutionEd(ptr noundef nonnull align 8 dereferenceable(312), double noundef) local_unnamed_addr #1

declare void @_ZNK3jet22CustomImplicitSurface37Builder10makeSharedEv(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.3") align 8, ptr noundef nonnull align 8 dereferenceable(312)) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt10shared_ptrIN3jet22CustomImplicitSurface3EEaSEOS2_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @"_ZNSt8functionIFdRKN3jet6VectorIdLm3EEEEEC2IZNS0_21ImplicitTriangleMesh3C1ERKSt10shared_ptrINS0_13TriangleMesh3EEmdRKNS0_10Transform3EbE3$_1vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

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

; Function Attrs: nounwind
declare void @_ZN3jet16ImplicitSurface3D2Ev(ptr noundef nonnull align 8 dereferenceable(209)) unnamed_addr #7

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

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

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !11, i64 0}
!9 = !{!"_ZTSN3jet11BoundingBoxIdLm3EEE", !10, i64 0, !10, i64 24}
!10 = !{!"_ZTSN3jet6VectorIdLm3EEE", !11, i64 0, !11, i64 8, !11, i64 16}
!11 = !{!"double", !12, i64 0}
!12 = !{!"omnipotent char", !7, i64 0}
!13 = !{!9, !11, i64 8}
!14 = !{!9, !11, i64 16}
!15 = !{!16, !17, i64 0}
!16 = !{!"_ZTSZN3jet21ImplicitTriangleMesh3C1ERKSt10shared_ptrINS_13TriangleMesh3EEmdRKNS_10Transform3EbE3$_0", !17, i64 0}
!17 = !{!"any pointer", !12, i64 0}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass