; LLVM IR from ysyesilyurt/ComputerGraphics :: ForwardRenderingPipeline (Main)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"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.std::locale" = type { ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%class.Scene = type { %class.Color, i8, i32, %"class.std::vector", %"class.std::vector.0", %"class.std::vector.5", %"class.std::vector.10", %"class.std::vector.15", %"class.std::vector.20", %"class.std::vector.25", %"class.std::vector.30" }
%class.Color = type { double, double, double }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::vector<Color>, std::allocator<std::vector<Color>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<Color>, std::allocator<std::vector<Color>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<Color>, std::allocator<std::vector<Color>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<Color>, std::allocator<std::vector<Color>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<Camera *, std::allocator<Camera *>>::_Vector_impl" }
%"struct.std::_Vector_base<Camera *, std::allocator<Camera *>>::_Vector_impl" = type { %"struct.std::_Vector_base<Camera *, std::allocator<Camera *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Camera *, std::allocator<Camera *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = 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 }
%"class.std::vector.10" = type { %"struct.std::_Vector_base.11" }
%"struct.std::_Vector_base.11" = type { %"struct.std::_Vector_base<Color *, std::allocator<Color *>>::_Vector_impl" }
%"struct.std::_Vector_base<Color *, std::allocator<Color *>>::_Vector_impl" = type { %"struct.std::_Vector_base<Color *, std::allocator<Color *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Color *, std::allocator<Color *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.15" = type { %"struct.std::_Vector_base.16" }
%"struct.std::_Vector_base.16" = type { %"struct.std::_Vector_base<Scaling *, std::allocator<Scaling *>>::_Vector_impl" }
%"struct.std::_Vector_base<Scaling *, std::allocator<Scaling *>>::_Vector_impl" = type { %"struct.std::_Vector_base<Scaling *, std::allocator<Scaling *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Scaling *, std::allocator<Scaling *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.20" = type { %"struct.std::_Vector_base.21" }
%"struct.std::_Vector_base.21" = type { %"struct.std::_Vector_base<Rotation *, std::allocator<Rotation *>>::_Vector_impl" }
%"struct.std::_Vector_base<Rotation *, std::allocator<Rotation *>>::_Vector_impl" = type { %"struct.std::_Vector_base<Rotation *, std::allocator<Rotation *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Rotation *, std::allocator<Rotation *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.25" = type { %"struct.std::_Vector_base.26" }
%"struct.std::_Vector_base.26" = type { %"struct.std::_Vector_base<Translation *, std::allocator<Translation *>>::_Vector_impl" }
%"struct.std::_Vector_base<Translation *, std::allocator<Translation *>>::_Vector_impl" = type { %"struct.std::_Vector_base<Translation *, std::allocator<Translation *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Translation *, std::allocator<Translation *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.30" = type { %"struct.std::_Vector_base.31" }
%"struct.std::_Vector_base.31" = type { %"struct.std::_Vector_base<Model *, std::allocator<Model *>>::_Vector_impl" }
%"struct.std::_Vector_base<Model *, std::allocator<Model *>>::_Vector_impl" = type { %"struct.std::_Vector_base<Model *, std::allocator<Model *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Model *, std::allocator<Model *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.Camera = type { i32, [4 x i8], %class.Vec3, %class.Vec3, %class.Vec3, %class.Vec3, %class.Vec3, double, double, double, double, double, double, i32, i32, %"class.std::__cxx11::basic_string" }
%class.Vec3 = type <{ double, double, double, i32, [4 x i8] }>

@scene = external dso_local global ptr, align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [30 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [32 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr noundef %1) #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  %11 = load i32, ptr %4, align 4, !tbaa !5
  %12 = icmp ne i32 %11, 2
  br i1 %12, label %13, label %18

13:                                               ; preds = %2
  %14 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  %15 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %16 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef @.str.1)
  %17 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i32 1, ptr %3, align 4
  br label %77

18:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #8
  %19 = load ptr, ptr %5, align 8, !tbaa !9
  %20 = getelementptr inbounds ptr, ptr %19, i64 1
  %21 = load ptr, ptr %20, align 8, !tbaa !9
  store ptr %21, ptr %6, align 8, !tbaa !9
  %22 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 224) #9
  %23 = load ptr, ptr %6, align 8, !tbaa !9
  invoke void @_ZN5SceneC1EPKc(ptr noundef nonnull align 8 dereferenceable(224) %22, ptr noundef %23)
          to label %24 unwind label %33

24:                                               ; preds = %18
  store ptr %22, ptr @scene, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #8
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %25

25:                                               ; preds = %68, %24
  %26 = load i32, ptr %9, align 4, !tbaa !5
  %27 = sext i32 %26 to i64
  %28 = load ptr, ptr @scene, align 8, !tbaa !9
  %29 = getelementptr inbounds %class.Scene, ptr %28, i32 0, i32 4
  %30 = call noundef i64 @_ZNKSt6vectorIP6CameraSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %29) #8
  %31 = icmp ult i64 %27, %30
  br i1 %31, label %37, label %32

32:                                               ; preds = %25
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  br label %75

33:                                               ; preds = %18
  %34 = landingpad { ptr, i32 }
          cleanup
  %35 = extractvalue { ptr, i32 } %34, 0
  store ptr %35, ptr %7, align 8
  %36 = extractvalue { ptr, i32 } %34, 1
  store i32 %36, ptr %8, align 4
  call void @_ZdlPvm(ptr noundef %22, i64 noundef 224) #10
  br label %76

37:                                               ; preds = %25
  %38 = load ptr, ptr @scene, align 8, !tbaa !9
  %39 = load ptr, ptr @scene, align 8, !tbaa !9
  %40 = getelementptr inbounds %class.Scene, ptr %39, i32 0, i32 4
  %41 = load i32, ptr %9, align 4, !tbaa !5
  %42 = sext i32 %41 to i64
  %43 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP6CameraSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %40, i64 noundef %42) #8
  %44 = load ptr, ptr %43, align 8, !tbaa !9
  call void @_ZN5Scene15initializeImageEP6Camera(ptr noundef nonnull align 8 dereferenceable(224) %38, ptr noundef %44)
  %45 = load ptr, ptr @scene, align 8, !tbaa !9
  %46 = load ptr, ptr @scene, align 8, !tbaa !9
  %47 = getelementptr inbounds %class.Scene, ptr %46, i32 0, i32 4
  %48 = load i32, ptr %9, align 4, !tbaa !5
  %49 = sext i32 %48 to i64
  %50 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP6CameraSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %47, i64 noundef %49) #8
  %51 = load ptr, ptr %50, align 8, !tbaa !9
  call void @_ZN5Scene24forwardRenderingPipelineEP6Camera(ptr noundef nonnull align 8 dereferenceable(224) %45, ptr noundef %51)
  %52 = load ptr, ptr @scene, align 8, !tbaa !9
  %53 = load ptr, ptr @scene, align 8, !tbaa !9
  %54 = getelementptr inbounds %class.Scene, ptr %53, i32 0, i32 4
  %55 = load i32, ptr %9, align 4, !tbaa !5
  %56 = sext i32 %55 to i64
  %57 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP6CameraSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %54, i64 noundef %56) #8
  %58 = load ptr, ptr %57, align 8, !tbaa !9
  call void @_ZN5Scene19writeImageToPPMFileEP6Camera(ptr noundef nonnull align 8 dereferenceable(224) %52, ptr noundef %58)
  %59 = load ptr, ptr @scene, align 8, !tbaa !9
  %60 = load ptr, ptr @scene, align 8, !tbaa !9
  %61 = getelementptr inbounds %class.Scene, ptr %60, i32 0, i32 4
  %62 = load i32, ptr %9, align 4, !tbaa !5
  %63 = sext i32 %62 to i64
  %64 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP6CameraSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %61, i64 noundef %63) #8
  %65 = load ptr, ptr %64, align 8, !tbaa !9
  %66 = getelementptr inbounds %class.Camera, ptr %65, i32 0, i32 15
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef nonnull align 8 dereferenceable(32) %66)
  invoke void @_ZN5Scene15convertPPMToPNGENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi(ptr noundef nonnull align 8 dereferenceable(224) %59, ptr noundef %10, i32 noundef 1)
          to label %67 unwind label %71

67:                                               ; preds = %37
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #8
  br label %68

68:                                               ; preds = %67
  %69 = load i32, ptr %9, align 4, !tbaa !5
  %70 = add nsw i32 %69, 1
  store i32 %70, ptr %9, align 4, !tbaa !5
  br label %25, !llvm.loop !11

71:                                               ; preds = %37
  %72 = landingpad { ptr, i32 }
          cleanup
  %73 = extractvalue { ptr, i32 } %72, 0
  store ptr %73, ptr %7, align 8
  %74 = extractvalue { ptr, i32 } %72, 1
  store i32 %74, ptr %8, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  br label %76

75:                                               ; preds = %32
  store i32 0, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  br label %77

76:                                               ; preds = %71, %33
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  br label %79

77:                                               ; preds = %75, %13
  %78 = load i32, ptr %3, align 4
  ret i32 %78

79:                                               ; preds = %76
  %80 = load ptr, ptr %7, align 8
  %81 = load i32, ptr %8, align 4
  %82 = insertvalue { ptr, i32 } poison, ptr %80, 0
  %83 = insertvalue { ptr, i32 } %82, i32 %81, 1
  resume { ptr, i32 } %83
}

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #1

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #4

declare void @_ZN5SceneC1EPKc(ptr noundef nonnull align 8 dereferenceable(224), ptr noundef) unnamed_addr #5

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #6

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

declare void @_ZN5Scene15initializeImageEP6Camera(ptr noundef nonnull align 8 dereferenceable(224), ptr noundef) #5

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

declare void @_ZN5Scene24forwardRenderingPipelineEP6Camera(ptr noundef nonnull align 8 dereferenceable(224), ptr noundef) #5

declare void @_ZN5Scene19writeImageToPPMFileEP6Camera(ptr noundef nonnull align 8 dereferenceable(224), ptr noundef) #5

declare void @_ZN5Scene15convertPPMToPNGENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi(ptr noundef nonnull align 8 dereferenceable(224), ptr noundef, i32 noundef) #5

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #7 align 2

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

attributes #0 = { mustprogress norecurse 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 = { 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 #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nobuiltin allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nobuiltin 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 #7 = { 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 #8 = { nounwind }
attributes #9 = { builtin allocsize(0) }
attributes #10 = { builtin 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"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.std::locale" = type { ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }

@scene = external dso_local local_unnamed_addr global ptr, align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [30 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [32 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef range(i32 0, 2) i32 @main(i32 noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::__cxx11::basic_string", align 8
  %.not = icmp eq i32 %0, 2
  br i1 %.not, label %9, label %4

4:                                                ; preds = %2
  %5 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str)
  %6 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %7 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull @.str.1)
  %8 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %.loopexit

9:                                                ; preds = %2
  %10 = getelementptr inbounds i8, ptr %1, i64 8
  %11 = load ptr, ptr %10, align 8, !tbaa !5
  %12 = tail call noalias noundef nonnull dereferenceable(224) ptr @_Znwm(i64 noundef 224) #7
  invoke void @_ZN5SceneC1EPKc(ptr noundef nonnull align 8 dereferenceable(224) %12, ptr noundef %11)
          to label %13 unwind label %16

13:                                               ; preds = %9
  store ptr %12, ptr @scene, align 8, !tbaa !5
  %14 = getelementptr inbounds i8, ptr %12, i64 56
  %15 = tail call noundef i64 @_ZNKSt6vectorIP6CameraSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %14) #8
  %.not17 = icmp eq i64 %15, 0
  br i1 %.not17, label %.loopexit, label %.lr.ph

16:                                               ; preds = %9
  %17 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZdlPvm(ptr noundef nonnull %12, i64 noundef 224) #9
  br label %42

.lr.ph:                                           ; preds = %13, %35
  %indvars.iv = phi i64 [ %indvars.iv.next, %35 ], [ 0, %13 ]
  %18 = load ptr, ptr @scene, align 8, !tbaa !5
  %19 = getelementptr inbounds i8, ptr %18, i64 56
  %20 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP6CameraSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %19, i64 noundef %indvars.iv) #8
  %21 = load ptr, ptr %20, align 8, !tbaa !5
  call void @_ZN5Scene15initializeImageEP6Camera(ptr noundef nonnull align 8 dereferenceable(224) %18, ptr noundef %21)
  %22 = load ptr, ptr @scene, align 8, !tbaa !5
  %23 = getelementptr inbounds i8, ptr %22, i64 56
  %24 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP6CameraSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %23, i64 noundef %indvars.iv) #8
  %25 = load ptr, ptr %24, align 8, !tbaa !5
  call void @_ZN5Scene24forwardRenderingPipelineEP6Camera(ptr noundef nonnull align 8 dereferenceable(224) %22, ptr noundef %25)
  %26 = load ptr, ptr @scene, align 8, !tbaa !5
  %27 = getelementptr inbounds i8, ptr %26, i64 56
  %28 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP6CameraSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %27, i64 noundef %indvars.iv) #8
  %29 = load ptr, ptr %28, align 8, !tbaa !5
  call void @_ZN5Scene19writeImageToPPMFileEP6Camera(ptr noundef nonnull align 8 dereferenceable(224) %26, ptr noundef %29)
  %30 = load ptr, ptr @scene, align 8, !tbaa !5
  %31 = getelementptr inbounds i8, ptr %30, i64 56
  %32 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP6CameraSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %31, i64 noundef %indvars.iv) #8
  %33 = load ptr, ptr %32, align 8, !tbaa !5
  %34 = getelementptr inbounds i8, ptr %33, i64 224
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull align 8 dereferenceable(32) %34)
  invoke void @_ZN5Scene15convertPPMToPNGENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi(ptr noundef nonnull align 8 dereferenceable(224) %30, ptr noundef nonnull %3, i32 noundef 1)
          to label %35 unwind label %40

35:                                               ; preds = %.lr.ph
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #8
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %36 = load ptr, ptr @scene, align 8, !tbaa !5
  %37 = getelementptr inbounds i8, ptr %36, i64 56
  %38 = call noundef i64 @_ZNKSt6vectorIP6CameraSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %37) #8
  %39 = icmp ugt i64 %38, %indvars.iv.next
  br i1 %39, label %.lr.ph, label %.loopexit, !llvm.loop !9

40:                                               ; preds = %.lr.ph
  %41 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #8
  br label %42

42:                                               ; preds = %40, %16
  %.pn = phi { ptr, i32 } [ %41, %40 ], [ %17, %16 ]
  resume { ptr, i32 } %.pn

.loopexit:                                        ; preds = %35, %13, %4
  %.013 = phi i32 [ 1, %4 ], [ 0, %13 ], [ 0, %35 ]
  ret i32 %.013
}

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #1

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #3

declare void @_ZN5SceneC1EPKc(ptr noundef nonnull align 8 dereferenceable(224), ptr noundef) unnamed_addr #4

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #5

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

declare void @_ZN5Scene15initializeImageEP6Camera(ptr noundef nonnull align 8 dereferenceable(224), ptr noundef) local_unnamed_addr #4

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

declare void @_ZN5Scene24forwardRenderingPipelineEP6Camera(ptr noundef nonnull align 8 dereferenceable(224), ptr noundef) local_unnamed_addr #4

declare void @_ZN5Scene19writeImageToPPMFileEP6Camera(ptr noundef nonnull align 8 dereferenceable(224), ptr noundef) local_unnamed_addr #4

declare void @_ZN5Scene15convertPPMToPNGENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi(ptr noundef nonnull align 8 dereferenceable(224), ptr noundef, i32 noundef) local_unnamed_addr #4

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #6 align 2

attributes #0 = { mustprogress norecurse 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 = { 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 #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nobuiltin allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "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 = { nobuiltin 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 #6 = { 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 = { builtin allocsize(0) }
attributes #8 = { nounwind }
attributes #9 = { builtin 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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}


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