; LLVM IR from fogleman/CellularForms :: tracer/src (image)

; 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.Vec3 = type { double, double, double }
%"class.std::basic_ofstream" = type { %"class.std::basic_ostream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_ostream.base" = type { ptr }
%"class.std::basic_filebuf" = type { %"class.std::basic_streambuf", %union.pthread_mutex_t, %"class.std::__basic_file", i32, %struct.__mbstate_t, %struct.__mbstate_t, %struct.__mbstate_t, ptr, i64, i8, i8, i8, i8, ptr, ptr, i8, ptr, ptr, i64, ptr, ptr }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.std::__basic_file" = type <{ ptr, i8, [7 x i8] }>
%struct.__mbstate_t = type { i32, %union.anon }
%union.anon = type { i32 }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%class.Image = type { i32, i32, %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<Vec3, std::allocator<Vec3>>::_Vector_impl" }
%"struct.std::_Vector_base<Vec3, std::allocator<Vec3>>::_Vector_impl" = type { %"struct.std::_Vector_base<Vec3, std::allocator<Vec3>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Vec3, std::allocator<Vec3>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@.str = external hidden unnamed_addr constant [4 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #2

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #3

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8), double noundef) #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZmlRK4Vec3d(ptr dead_on_unwind noalias writable sret(%class.Vec3) align 8, ptr noundef nonnull align 8 dereferenceable(24), double noundef) #2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #5

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

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

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

; Function Attrs: mustprogress uwtable
declare void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248)) #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK5Image12SaveDepthPPMERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEddd(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %1, double noundef %2, double noundef %3, double noundef %4) #1 align 2 personality ptr @__gxx_personality_v0 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca double, align 8
  %9 = alloca double, align 8
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = alloca double, align 8
  %13 = alloca %"class.std::basic_ofstream", align 8
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca ptr, align 8
  %21 = alloca %class.Vec3, align 8
  %22 = alloca %class.Vec3, align 8
  %23 = alloca %class.Vec3, align 8
  %24 = alloca i32, align 4
  %25 = alloca double, align 8
  %26 = alloca i32, align 4
  %27 = alloca double, align 8
  %28 = alloca i32, align 4
  %29 = alloca double, align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store double %2, ptr %8, align 8, !tbaa !9
  store double %3, ptr %9, align 8, !tbaa !9
  store double %4, ptr %10, align 8, !tbaa !9
  %30 = load ptr, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  store double 6.553500e+04, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %31 = load double, ptr %8, align 8, !tbaa !9
  %32 = fdiv double 1.000000e+00, %31
  store double %32, ptr %12, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 512, ptr %13) #6
  %33 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1ERKNSt7__cxx1112basic_stringIcS1_SaIcEEESt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %13, ptr noundef nonnull align 8 dereferenceable(32) %33, i32 noundef 16)
  %34 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef @.str)
          to label %35 unwind label %58

35:                                               ; preds = %5
  %36 = getelementptr inbounds %class.Image, ptr %30, i32 0, i32 0
  %37 = load i32, ptr %36, align 8, !tbaa !11
  %38 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %13, i32 noundef %37)
          to label %39 unwind label %58

39:                                               ; preds = %35
  %40 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %38, ptr noundef @.str.1)
          to label %41 unwind label %58

41:                                               ; preds = %39
  %42 = getelementptr inbounds %class.Image, ptr %30, i32 0, i32 1
  %43 = load i32, ptr %42, align 4, !tbaa !18
  %44 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %40, i32 noundef %43)
          to label %45 unwind label %58

45:                                               ; preds = %41
  %46 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %44, ptr noundef @.str.2)
          to label %47 unwind label %58

47:                                               ; preds = %45
  %48 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %13, double noundef 6.553500e+04)
          to label %49 unwind label %58

49:                                               ; preds = %47
  %50 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %48, ptr noundef @.str.2)
          to label %51 unwind label %58

51:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  store i32 0, ptr %16, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  store i32 0, ptr %17, align 4, !tbaa !19
  br label %52

52:                                               ; preds = %150, %51
  %53 = load i32, ptr %17, align 4, !tbaa !19
  %54 = getelementptr inbounds %class.Image, ptr %30, i32 0, i32 1
  %55 = load i32, ptr %54, align 4, !tbaa !18
  %56 = icmp slt i32 %53, %55
  br i1 %56, label %62, label %57

57:                                               ; preds = %52
  store i32 2, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %153

58:                                               ; preds = %49, %47, %45, %41, %39, %35, %5
  %59 = landingpad { ptr, i32 }
          cleanup
  %60 = extractvalue { ptr, i32 } %59, 0
  store ptr %60, ptr %14, align 8
  %61 = extractvalue { ptr, i32 } %59, 1
  store i32 %61, ptr %15, align 4
  br label %160

62:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  store i32 0, ptr %19, align 4, !tbaa !19
  br label %63

63:                                               ; preds = %122, %62
  %64 = load i32, ptr %19, align 4, !tbaa !19
  %65 = getelementptr inbounds %class.Image, ptr %30, i32 0, i32 0
  %66 = load i32, ptr %65, align 8, !tbaa !11
  %67 = icmp slt i32 %64, %66
  br i1 %67, label %69, label %68

68:                                               ; preds = %63
  store i32 5, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  br label %149

69:                                               ; preds = %63
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %21) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %22) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %23) #6
  %70 = getelementptr inbounds %class.Image, ptr %30, i32 0, i32 2
  %71 = load i32, ptr %16, align 4, !tbaa !19
  %72 = add nsw i32 %71, 1
  store i32 %72, ptr %16, align 4, !tbaa !19
  %73 = sext i32 %71 to i64
  %74 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt6vectorI4Vec3SaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %70, i64 noundef %73) #6
  %75 = load double, ptr %12, align 8, !tbaa !9
  invoke void @_ZmlRK4Vec3d(ptr dead_on_unwind writable sret(%class.Vec3) align 8 %23, ptr noundef nonnull align 8 dereferenceable(24) %74, double noundef %75)
          to label %76 unwind label %125

76:                                               ; preds = %69
  %77 = load double, ptr %9, align 8, !tbaa !9
  invoke void @_ZmiRK4Vec3d(ptr dead_on_unwind writable sret(%class.Vec3) align 8 %22, ptr noundef nonnull align 8 dereferenceable(24) %23, double noundef %77)
          to label %78 unwind label %125

78:                                               ; preds = %76
  %79 = load double, ptr %10, align 8, !tbaa !9
  %80 = load double, ptr %9, align 8, !tbaa !9
  %81 = fsub double %79, %80
  invoke void @_ZdvRK4Vec3d(ptr dead_on_unwind writable sret(%class.Vec3) align 8 %21, ptr noundef nonnull align 8 dereferenceable(24) %22, double noundef %81)
          to label %82 unwind label %125

82:                                               ; preds = %78
  call void @llvm.lifetime.end.p0(i64 24, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %22) #6
  store ptr %21, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #6
  %83 = load ptr, ptr %20, align 8, !tbaa !5
  %84 = invoke noundef double @_ZNK4Vec31REv(ptr noundef nonnull align 8 dereferenceable(24) %83)
          to label %85 unwind label %129

85:                                               ; preds = %82
  %86 = fmul double %84, 6.553500e+04
  store double %86, ptr %25, align 8, !tbaa !9
  %87 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef nonnull align 8 dereferenceable(8) %11)
          to label %88 unwind label %129

88:                                               ; preds = %85
  %89 = load double, ptr %87, align 8, !tbaa !9
  %90 = fptosi double %89 to i32
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #6
  store i32 %90, ptr %24, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #6
  %91 = load ptr, ptr %20, align 8, !tbaa !5
  %92 = invoke noundef double @_ZNK4Vec31GEv(ptr noundef nonnull align 8 dereferenceable(24) %91)
          to label %93 unwind label %133

93:                                               ; preds = %88
  %94 = fmul double %92, 6.553500e+04
  store double %94, ptr %27, align 8, !tbaa !9
  %95 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef nonnull align 8 dereferenceable(8) %11)
          to label %96 unwind label %133

96:                                               ; preds = %93
  %97 = load double, ptr %95, align 8, !tbaa !9
  %98 = fptosi double %97 to i32
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #6
  store i32 %98, ptr %26, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #6
  %99 = load ptr, ptr %20, align 8, !tbaa !5
  %100 = invoke noundef double @_ZNK4Vec31BEv(ptr noundef nonnull align 8 dereferenceable(24) %99)
          to label %101 unwind label %137

101:                                              ; preds = %96
  %102 = fmul double %100, 6.553500e+04
  store double %102, ptr %29, align 8, !tbaa !9
  %103 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %29, ptr noundef nonnull align 8 dereferenceable(8) %11)
          to label %104 unwind label %137

104:                                              ; preds = %101
  %105 = load double, ptr %103, align 8, !tbaa !9
  %106 = fptosi double %105 to i32
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #6
  store i32 %106, ptr %28, align 4, !tbaa !19
  %107 = load i32, ptr %24, align 4, !tbaa !19
  %108 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %13, i32 noundef %107)
          to label %109 unwind label %141

109:                                              ; preds = %104
  %110 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %108, ptr noundef @.str.1)
          to label %111 unwind label %141

111:                                              ; preds = %109
  %112 = load i32, ptr %26, align 4, !tbaa !19
  %113 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %110, i32 noundef %112)
          to label %114 unwind label %141

114:                                              ; preds = %111
  %115 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %113, ptr noundef @.str.1)
          to label %116 unwind label %141

116:                                              ; preds = %114
  %117 = load i32, ptr %28, align 4, !tbaa !19
  %118 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %115, i32 noundef %117)
          to label %119 unwind label %141

119:                                              ; preds = %116
  %120 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %118, ptr noundef @.str.2)
          to label %121 unwind label %141

121:                                              ; preds = %119
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  br label %122

122:                                              ; preds = %121
  %123 = load i32, ptr %19, align 4, !tbaa !19
  %124 = add nsw i32 %123, 1
  store i32 %124, ptr %19, align 4, !tbaa !19
  br label %63, !llvm.loop !20

125:                                              ; preds = %78, %76, %69
  %126 = landingpad { ptr, i32 }
          cleanup
  %127 = extractvalue { ptr, i32 } %126, 0
  store ptr %127, ptr %14, align 8
  %128 = extractvalue { ptr, i32 } %126, 1
  store i32 %128, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 24, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %22) #6
  br label %148

129:                                              ; preds = %85, %82
  %130 = landingpad { ptr, i32 }
          cleanup
  %131 = extractvalue { ptr, i32 } %130, 0
  store ptr %131, ptr %14, align 8
  %132 = extractvalue { ptr, i32 } %130, 1
  store i32 %132, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #6
  br label %147

133:                                              ; preds = %93, %88
  %134 = landingpad { ptr, i32 }
          cleanup
  %135 = extractvalue { ptr, i32 } %134, 0
  store ptr %135, ptr %14, align 8
  %136 = extractvalue { ptr, i32 } %134, 1
  store i32 %136, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #6
  br label %146

137:                                              ; preds = %101, %96
  %138 = landingpad { ptr, i32 }
          cleanup
  %139 = extractvalue { ptr, i32 } %138, 0
  store ptr %139, ptr %14, align 8
  %140 = extractvalue { ptr, i32 } %138, 1
  store i32 %140, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #6
  br label %145

141:                                              ; preds = %119, %116, %114, %111, %109, %104
  %142 = landingpad { ptr, i32 }
          cleanup
  %143 = extractvalue { ptr, i32 } %142, 0
  store ptr %143, ptr %14, align 8
  %144 = extractvalue { ptr, i32 } %142, 1
  store i32 %144, ptr %15, align 4
  br label %145

145:                                              ; preds = %141, %137
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #6
  br label %146

146:                                              ; preds = %145, %133
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #6
  br label %147

147:                                              ; preds = %146, %129
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %21) #6
  br label %148

148:                                              ; preds = %147, %125
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %159

149:                                              ; preds = %68
  br label %150

150:                                              ; preds = %149
  %151 = load i32, ptr %17, align 4, !tbaa !19
  %152 = add nsw i32 %151, 1
  store i32 %152, ptr %17, align 4, !tbaa !19
  br label %52, !llvm.loop !22

153:                                              ; preds = %57
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %13)
          to label %154 unwind label %155

154:                                              ; preds = %153
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %13) #6
  call void @llvm.lifetime.end.p0(i64 512, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  ret void

155:                                              ; preds = %153
  %156 = landingpad { ptr, i32 }
          cleanup
  %157 = extractvalue { ptr, i32 } %156, 0
  store ptr %157, ptr %14, align 8
  %158 = extractvalue { ptr, i32 } %156, 1
  store i32 %158, ptr %15, align 4
  br label %159

159:                                              ; preds = %155, %148
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  br label %160

160:                                              ; preds = %159, %58
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %13) #6
  call void @llvm.lifetime.end.p0(i64 512, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  br label %161

161:                                              ; preds = %160
  %162 = load ptr, ptr %14, align 8
  %163 = load i32, ptr %15, align 4
  %164 = insertvalue { ptr, i32 } poison, ptr %162, 0
  %165 = insertvalue { ptr, i32 } %164, i32 %163, 1
  resume { ptr, i32 } %165
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZdvRK4Vec3d(ptr dead_on_unwind noalias writable sret(%class.Vec3) align 8, ptr noundef nonnull align 8 dereferenceable(24), double noundef) #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZmiRK4Vec3d(ptr dead_on_unwind noalias writable sret(%class.Vec3) align 8, ptr noundef nonnull align 8 dereferenceable(24), double noundef) #2

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !13, i64 0}
!12 = !{!"_ZTS5Image", !13, i64 0, !13, i64 4, !14, i64 8}
!13 = !{!"int", !7, i64 0}
!14 = !{!"_ZTSSt6vectorI4Vec3SaIS0_EE", !15, i64 0}
!15 = !{!"_ZTSSt12_Vector_baseI4Vec3SaIS0_EE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseI4Vec3SaIS0_EE12_Vector_implE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseI4Vec3SaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!18 = !{!12, !13, i64 4}
!19 = !{!13, !13, i64 0}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = distinct !{!22, !21}


; 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.Vec3 = type { double, double, double }
%"class.std::basic_ofstream" = type { %"class.std::basic_ostream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_ostream.base" = type { ptr }
%"class.std::basic_filebuf" = type { %"class.std::basic_streambuf", %union.pthread_mutex_t, %"class.std::__basic_file", i32, %struct.__mbstate_t, %struct.__mbstate_t, %struct.__mbstate_t, ptr, i64, i8, i8, i8, i8, ptr, ptr, i8, ptr, ptr, i64, ptr, ptr }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.std::__basic_file" = type <{ ptr, i8, [7 x i8] }>
%struct.__mbstate_t = type { i32, %union.anon }
%union.anon = type { i32 }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }

@.str = external hidden unnamed_addr constant [4 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #2

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8), double noundef) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZmlRK4Vec3d(ptr dead_on_unwind noalias writable sret(%class.Vec3) align 8, ptr noundef nonnull align 8 dereferenceable(24), double noundef) local_unnamed_addr #2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #5

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

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

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

; Function Attrs: mustprogress uwtable
declare void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK5Image12SaveDepthPPMERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEddd(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %1, double noundef %2, double noundef %3, double noundef %4) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %6 = alloca double, align 8
  %7 = alloca %"class.std::basic_ofstream", align 8
  %8 = alloca %class.Vec3, align 8
  %9 = alloca %class.Vec3, align 8
  %10 = alloca %class.Vec3, align 8
  %11 = alloca double, align 8
  %12 = alloca double, align 8
  %13 = alloca double, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  store double 6.553500e+04, ptr %6, align 8, !tbaa !5
  %14 = fdiv double 1.000000e+00, %2
  call void @llvm.lifetime.start.p0(i64 512, ptr nonnull %7) #6
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1ERKNSt7__cxx1112basic_stringIcS1_SaIcEEESt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %7, ptr noundef nonnull align 8 dereferenceable(32) %1, i32 noundef 16)
  %15 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull @.str)
          to label %16 unwind label %41

16:                                               ; preds = %5
  %17 = load i32, ptr %0, align 8, !tbaa !9
  %18 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %7, i32 noundef %17)
          to label %19 unwind label %41

19:                                               ; preds = %16
  %20 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull @.str.1)
          to label %21 unwind label %41

21:                                               ; preds = %19
  %22 = getelementptr inbounds i8, ptr %0, i64 4
  %23 = load i32, ptr %22, align 4, !tbaa !17
  %24 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %20, i32 noundef %23)
          to label %25 unwind label %41

25:                                               ; preds = %21
  %26 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %24, ptr noundef nonnull @.str.2)
          to label %27 unwind label %41

27:                                               ; preds = %25
  %28 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %7, double noundef 6.553500e+04)
          to label %29 unwind label %41

29:                                               ; preds = %27
  %30 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %28, ptr noundef nonnull @.str.2)
          to label %.preheader29 unwind label %41

.preheader29:                                     ; preds = %29
  %31 = load i32, ptr %22, align 4, !tbaa !17
  %32 = icmp sgt i32 %31, 0
  br i1 %32, label %.preheader.lr.ph, label %._crit_edge36

.preheader.lr.ph:                                 ; preds = %.preheader29
  %33 = getelementptr inbounds i8, ptr %0, i64 8
  %34 = fsub double %4, %3
  %35 = load i32, ptr %0, align 8, !tbaa !9
  %36 = icmp sgt i32 %35, 0
  br i1 %36, label %.preheader, label %._crit_edge36

.preheader:                                       ; preds = %.preheader.lr.ph, %._crit_edge
  %37 = phi i32 [ %44, %._crit_edge ], [ %31, %.preheader.lr.ph ]
  %38 = phi i32 [ %45, %._crit_edge ], [ %35, %.preheader.lr.ph ]
  %.02235 = phi i32 [ %.123.lcssa, %._crit_edge ], [ 0, %.preheader.lr.ph ]
  %.02434 = phi i32 [ %46, %._crit_edge ], [ 0, %.preheader.lr.ph ]
  %39 = icmp sgt i32 %38, 0
  br i1 %39, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %.preheader
  %40 = sext i32 %.02235 to i64
  br label %.lr.ph

._crit_edge36:                                    ; preds = %._crit_edge, %.preheader.lr.ph, %.preheader29
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %7)
          to label %86 unwind label %87

41:                                               ; preds = %29, %27, %25, %21, %19, %16, %5
  %42 = landingpad { ptr, i32 }
          cleanup
  br label %89

._crit_edge.loopexit:                             ; preds = %78
  %43 = trunc nsw i64 %indvars.iv.next to i32
  %.pre = load i32, ptr %22, align 4, !tbaa !17
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader
  %44 = phi i32 [ %37, %.preheader ], [ %.pre, %._crit_edge.loopexit ]
  %45 = phi i32 [ %38, %.preheader ], [ %80, %._crit_edge.loopexit ]
  %.123.lcssa = phi i32 [ %.02235, %.preheader ], [ %43, %._crit_edge.loopexit ]
  %46 = add nuw nsw i32 %.02434, 1
  %47 = icmp slt i32 %46, %44
  br i1 %47, label %.preheader, label %._crit_edge36, !llvm.loop !18

.lr.ph:                                           ; preds = %.lr.ph.preheader, %78
  %indvars.iv = phi i64 [ %40, %.lr.ph.preheader ], [ %indvars.iv.next, %78 ]
  %.02532 = phi i32 [ 0, %.lr.ph.preheader ], [ %79, %78 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #6
  %indvars.iv.next = add nsw i64 %indvars.iv, 1
  %48 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt6vectorI4Vec3SaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %33, i64 noundef %indvars.iv) #6
  invoke void @_ZmlRK4Vec3d(ptr dead_on_unwind nonnull writable sret(%class.Vec3) align 8 %10, ptr noundef nonnull align 8 dereferenceable(24) %48, double noundef %14)
          to label %49 unwind label %82

49:                                               ; preds = %.lr.ph
  invoke void @_ZmiRK4Vec3d(ptr dead_on_unwind nonnull writable sret(%class.Vec3) align 8 %9, ptr noundef nonnull align 8 dereferenceable(24) %10, double noundef %3)
          to label %50 unwind label %82

50:                                               ; preds = %49
  invoke void @_ZdvRK4Vec3d(ptr dead_on_unwind nonnull writable sret(%class.Vec3) align 8 %8, ptr noundef nonnull align 8 dereferenceable(24) %9, double noundef %34)
          to label %51 unwind label %82

51:                                               ; preds = %50
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #6
  %52 = call noundef double @_ZNK4Vec31REv(ptr noundef nonnull align 8 dereferenceable(24) %8)
  %53 = fmul double %52, 6.553500e+04
  store double %53, ptr %11, align 8, !tbaa !5
  %54 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %55 = load double, ptr %54, align 8, !tbaa !5
  %56 = fptosi double %55 to i32
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #6
  %57 = call noundef double @_ZNK4Vec31GEv(ptr noundef nonnull align 8 dereferenceable(24) %8)
  %58 = fmul double %57, 6.553500e+04
  store double %58, ptr %12, align 8, !tbaa !5
  %59 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %60 = load double, ptr %59, align 8, !tbaa !5
  %61 = fptosi double %60 to i32
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #6
  %62 = call noundef double @_ZNK4Vec31BEv(ptr noundef nonnull align 8 dereferenceable(24) %8)
  %63 = fmul double %62, 6.553500e+04
  store double %63, ptr %13, align 8, !tbaa !5
  %64 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %65 = load double, ptr %64, align 8, !tbaa !5
  %66 = fptosi double %65 to i32
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #6
  %67 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %7, i32 noundef %56)
          to label %68 unwind label %84

68:                                               ; preds = %51
  %69 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %67, ptr noundef nonnull @.str.1)
          to label %70 unwind label %84

70:                                               ; preds = %68
  %71 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %69, i32 noundef %61)
          to label %72 unwind label %84

72:                                               ; preds = %70
  %73 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %71, ptr noundef nonnull @.str.1)
          to label %74 unwind label %84

74:                                               ; preds = %72
  %75 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %73, i32 noundef %66)
          to label %76 unwind label %84

76:                                               ; preds = %74
  %77 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %75, ptr noundef nonnull @.str.2)
          to label %78 unwind label %84

78:                                               ; preds = %76
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #6
  %79 = add nuw nsw i32 %.02532, 1
  %80 = load i32, ptr %0, align 8, !tbaa !9
  %81 = icmp slt i32 %79, %80
  br i1 %81, label %.lr.ph, label %._crit_edge.loopexit, !llvm.loop !21

82:                                               ; preds = %50, %49, %.lr.ph
  %83 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #6
  br label %89

84:                                               ; preds = %76, %74, %72, %70, %68, %51
  %85 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #6
  br label %89

86:                                               ; preds = %._crit_edge36
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %7) #6
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  ret void

87:                                               ; preds = %._crit_edge36
  %88 = landingpad { ptr, i32 }
          cleanup
  br label %89

89:                                               ; preds = %87, %84, %82, %41
  %.pn.pn.pn = phi { ptr, i32 } [ %42, %41 ], [ %88, %87 ], [ %85, %84 ], [ %83, %82 ]
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %7) #6
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  resume { ptr, i32 } %.pn.pn.pn
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZdvRK4Vec3d(ptr dead_on_unwind noalias writable sret(%class.Vec3) align 8, ptr noundef nonnull align 8 dereferenceable(24), double noundef) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZmiRK4Vec3d(ptr dead_on_unwind noalias writable sret(%class.Vec3) align 8, ptr noundef nonnull align 8 dereferenceable(24), double noundef) local_unnamed_addr #2

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


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimpleLoopUnswitchPass,SimplifyCFGPass