; LLVM IR from sejja/3D-Software-Rasterizer :: Rasterizer/Engine/System (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.sf::Color" = type { i8, i8, i8, i8 }
%"class.sf::RenderStates" = type { %"struct.sf::BlendMode", %"class.sf::Transform", ptr, ptr }
%"struct.sf::BlendMode" = type { i32, i32, i32, i32, i32, i32 }
%"class.sf::Transform" = type { [16 x float] }
%"class.sf::RenderWindow" = type { %"class.sf::Window", %"class.sf::RenderTarget" }
%"class.sf::Window" = type { ptr, ptr, ptr, %"class.sf::Clock", %"class.sf::Time", %"class.sf::Vector2" }
%"class.sf::Clock" = type { %"class.sf::Time" }
%"class.sf::Time" = type { i64 }
%"class.sf::Vector2" = type { i32, i32 }
%"class.sf::RenderTarget" = type { ptr, %"class.sf::View", %"class.sf::View", %"struct.sf::RenderTarget::StatesCache", i64 }
%"class.sf::View" = type <{ %"class.sf::Vector2.0", %"class.sf::Vector2.0", float, %"class.sf::Rect", %"class.sf::Transform", %"class.sf::Transform", i8, i8, [2 x i8] }>
%"class.sf::Vector2.0" = type { float, float }
%"class.sf::Rect" = type { float, float, float, float }
%"struct.sf::RenderTarget::StatesCache" = type <{ i8, i8, i8, i8, %"struct.sf::BlendMode", [4 x i8], i64, i8, i8, [2 x i8], [4 x %"class.sf::Vertex"], [4 x i8] }>
%"class.sf::Vertex" = type { %"class.sf::Vector2.0", %"class.sf::Color", %"class.sf::Vector2.0" }
%"class.sf::VideoMode" = type { i32, i32, i32 }
%"class.sf::String" = type { %"class.std::__cxx11::basic_string" }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<unsigned int>::_Alloc_hider", i64, %union.anon.4 }
%"struct.std::__cxx11::basic_string<unsigned int>::_Alloc_hider" = type { ptr }
%union.anon.4 = type { i64, [8 x i8] }
%"class.std::locale" = type { ptr }
%"struct.sf::ContextSettings" = type <{ i32, i32, i32, i32, i32, i32, i8, [3 x i8] }>
%"class.sf::Image" = type { %"class.sf::Vector2", %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.sf::Texture" = type { %"class.sf::Vector2", %"class.sf::Vector2", i32, i8, i8, i8, i8, i8, i8, i64 }
%"class.sf::Sprite" = type { %"class.sf::Drawable", %"class.sf::Transformable.base", [4 x %"class.sf::Vertex"], ptr, %"class.sf::Rect.5" }
%"class.sf::Drawable" = type { ptr }
%"class.sf::Transformable.base" = type <{ ptr, %"class.sf::Vector2.0", %"class.sf::Vector2.0", float, %"class.sf::Vector2.0", %"class.sf::Transform", i8, [3 x i8], %"class.sf::Transform", i8 }>
%"class.sf::Rect.5" = type { i32, i32, i32, i32 }
%"class.sf::Event" = type { i32, %union.anon.6 }
%union.anon.6 = type { %"struct.sf::Event::MouseWheelScrollEvent" }
%"struct.sf::Event::MouseWheelScrollEvent" = type { i32, float, i32, i32 }

@.str = external hidden unnamed_addr constant [14 x i8], align 1
@_ZN2sf5Color5WhiteE = external global %"class.sf::Color", align 1
@_ZN2sf12RenderStates7DefaultE = external global %"class.sf::RenderStates", align 8

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z29ConvertFrameBufferToSFMLImageRN2sf5ImageE(ptr noundef nonnull align 8 dereferenceable(32)) #0

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #3 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca %"class.sf::RenderWindow", align 8
  %5 = alloca %"class.sf::VideoMode", align 4
  %6 = alloca %"class.sf::String", align 8
  %7 = alloca %"class.std::locale", align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca %"struct.sf::ContextSettings", align 4
  %11 = alloca { i64, i32 }, align 4
  %12 = alloca %"class.sf::Image", align 8
  %13 = alloca %"class.sf::Texture", align 8
  %14 = alloca %"class.sf::Sprite", align 8
  %15 = alloca %"class.sf::Clock", align 8
  %16 = alloca %"class.sf::Event", align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #8
  store i32 1280, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #8
  store i32 720, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 528, ptr %4) #8
  call void @_ZN2sf9VideoModeC1Ejjj(ptr noundef nonnull align 4 dereferenceable(12) %5, i32 noundef 1280, i32 noundef 720, i32 noundef 32)
  call void @llvm.lifetime.start.p0(i64 32, ptr %6) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #8
  call void @_ZNSt6localeC1Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #8
  invoke void @_ZN2sf6StringC1EPKcRKSt6locale(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef @.str, ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %17 unwind label %46

17:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 28, ptr %10) #8
  invoke void @_ZN2sf15ContextSettingsC2Ejjjjjjb(ptr noundef nonnull align 4 dereferenceable(25) %10, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 1, i32 noundef 1, i32 noundef 0, i1 noundef zeroext false)
          to label %18 unwind label %50

18:                                               ; preds = %17
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %11, ptr align 4 %5, i64 12, i1 false)
  %19 = getelementptr inbounds { i64, i32 }, ptr %11, i32 0, i32 0
  %20 = load i64, ptr %19, align 4
  %21 = getelementptr inbounds { i64, i32 }, ptr %11, i32 0, i32 1
  %22 = load i32, ptr %21, align 4
  invoke void @_ZN2sf12RenderWindowC1ENS_9VideoModeERKNS_6StringEjRKNS_15ContextSettingsE(ptr noundef nonnull align 8 dereferenceable(528) %4, i64 %20, i32 %22, ptr noundef nonnull align 8 dereferenceable(32) %6, i32 noundef 7, ptr noundef nonnull align 4 dereferenceable(25) %10)
          to label %23 unwind label %50

23:                                               ; preds = %18
  call void @llvm.lifetime.end.p0(i64 28, ptr %10) #8
  call void @_ZN2sf6StringD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #8
  call void @_ZNSt6localeD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %6) #8
  invoke void @_ZN11FrameBuffer4InitEii(i32 noundef 1280, i32 noundef 720)
          to label %24 unwind label %55

24:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #8
  invoke void @_ZN2sf5ImageC1Ev(ptr noundef nonnull align 8 dereferenceable(32) %12)
          to label %25 unwind label %59

25:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 40, ptr %13) #8
  invoke void @_ZN2sf7TextureC1Ev(ptr noundef nonnull align 8 dereferenceable(40) %13)
          to label %26 unwind label %63

26:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 288, ptr %14) #8
  invoke void @_ZN2sf6SpriteC1Ev(ptr noundef nonnull align 8 dereferenceable(288) %14)
          to label %27 unwind label %67

27:                                               ; preds = %26
  %28 = invoke noundef zeroext i1 @_ZN2sf7Texture6createEjj(ptr noundef nonnull align 8 dereferenceable(40) %13, i32 noundef 1280, i32 noundef 720)
          to label %29 unwind label %71

29:                                               ; preds = %27
  invoke void @_ZN2sf5Image6createEjjRKNS_5ColorE(ptr noundef nonnull align 8 dereferenceable(32) %12, i32 noundef 1280, i32 noundef 720, ptr noundef nonnull align 1 dereferenceable(4) @_ZN2sf5Color5WhiteE)
          to label %30 unwind label %71

30:                                               ; preds = %29
  invoke void @_ZN5Scene4InitEv()
          to label %31 unwind label %71

31:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #8
  invoke void @_ZN2sf5ClockC1Ev(ptr noundef nonnull align 8 dereferenceable(8) %15)
          to label %32 unwind label %75

32:                                               ; preds = %31
  br label %33

33:                                               ; preds = %97, %32
  %34 = invoke noundef zeroext i1 @_ZNK2sf6Window6isOpenEv(ptr noundef nonnull align 8 dereferenceable(48) %4)
          to label %35 unwind label %75

35:                                               ; preds = %33
  br i1 %34, label %36, label %98

36:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 20, ptr %16) #8
  br label %37

37:                                               ; preds = %83, %36
  %38 = invoke noundef zeroext i1 @_ZN2sf6Window9pollEventERNS_5EventE(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 4 dereferenceable(20) %16)
          to label %39 unwind label %79

39:                                               ; preds = %37
  br i1 %38, label %40, label %84

40:                                               ; preds = %39
  %41 = getelementptr inbounds %"class.sf::Event", ptr %16, i32 0, i32 0
  %42 = load i32, ptr %41, align 4, !tbaa !9
  %43 = icmp eq i32 %42, 0
  br i1 %43, label %44, label %83

44:                                               ; preds = %40
  invoke void @_ZN2sf6Window5closeEv(ptr noundef nonnull align 8 dereferenceable(48) %4)
          to label %45 unwind label %79

45:                                               ; preds = %44
  br label %83

46:                                               ; preds = %0
  %47 = landingpad { ptr, i32 }
          cleanup
  %48 = extractvalue { ptr, i32 } %47, 0
  store ptr %48, ptr %8, align 8
  %49 = extractvalue { ptr, i32 } %47, 1
  store i32 %49, ptr %9, align 4
  br label %54

50:                                               ; preds = %18, %17
  %51 = landingpad { ptr, i32 }
          cleanup
  %52 = extractvalue { ptr, i32 } %51, 0
  store ptr %52, ptr %8, align 8
  %53 = extractvalue { ptr, i32 } %51, 1
  store i32 %53, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 28, ptr %10) #8
  call void @_ZN2sf6StringD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #8
  br label %54

54:                                               ; preds = %50, %46
  call void @_ZNSt6localeD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %6) #8
  br label %108

55:                                               ; preds = %23
  %56 = landingpad { ptr, i32 }
          cleanup
  %57 = extractvalue { ptr, i32 } %56, 0
  store ptr %57, ptr %8, align 8
  %58 = extractvalue { ptr, i32 } %56, 1
  store i32 %58, ptr %9, align 4
  br label %107

59:                                               ; preds = %24
  %60 = landingpad { ptr, i32 }
          cleanup
  %61 = extractvalue { ptr, i32 } %60, 0
  store ptr %61, ptr %8, align 8
  %62 = extractvalue { ptr, i32 } %60, 1
  store i32 %62, ptr %9, align 4
  br label %106

63:                                               ; preds = %25
  %64 = landingpad { ptr, i32 }
          cleanup
  %65 = extractvalue { ptr, i32 } %64, 0
  store ptr %65, ptr %8, align 8
  %66 = extractvalue { ptr, i32 } %64, 1
  store i32 %66, ptr %9, align 4
  br label %105

67:                                               ; preds = %26
  %68 = landingpad { ptr, i32 }
          cleanup
  %69 = extractvalue { ptr, i32 } %68, 0
  store ptr %69, ptr %8, align 8
  %70 = extractvalue { ptr, i32 } %68, 1
  store i32 %70, ptr %9, align 4
  br label %104

71:                                               ; preds = %30, %29, %27
  %72 = landingpad { ptr, i32 }
          cleanup
  %73 = extractvalue { ptr, i32 } %72, 0
  store ptr %73, ptr %8, align 8
  %74 = extractvalue { ptr, i32 } %72, 1
  store i32 %74, ptr %9, align 4
  br label %103

75:                                               ; preds = %99, %98, %33, %31
  %76 = landingpad { ptr, i32 }
          cleanup
  %77 = extractvalue { ptr, i32 } %76, 0
  store ptr %77, ptr %8, align 8
  %78 = extractvalue { ptr, i32 } %76, 1
  store i32 %78, ptr %9, align 4
  br label %102

79:                                               ; preds = %96, %95, %93, %92, %91, %90, %89, %87, %84, %44, %37
  %80 = landingpad { ptr, i32 }
          cleanup
  %81 = extractvalue { ptr, i32 } %80, 0
  store ptr %81, ptr %8, align 8
  %82 = extractvalue { ptr, i32 } %80, 1
  store i32 %82, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 20, ptr %16) #8
  br label %102

83:                                               ; preds = %45, %40
  br label %37, !llvm.loop !12

84:                                               ; preds = %39
  %85 = invoke noundef zeroext i1 @_ZN2sf8Keyboard12isKeyPressedENS0_3KeyE(i32 noundef 36)
          to label %86 unwind label %79

86:                                               ; preds = %84
  br i1 %85, label %87, label %89

87:                                               ; preds = %86
  invoke void @_ZN2sf6Window5closeEv(ptr noundef nonnull align 8 dereferenceable(48) %4)
          to label %88 unwind label %79

88:                                               ; preds = %87
  br label %89

89:                                               ; preds = %88, %86
  invoke void @_ZN5Scene6UpdateEv()
          to label %90 unwind label %79

90:                                               ; preds = %89
  invoke void @_Z29ConvertFrameBufferToSFMLImageRN2sf5ImageE(ptr noundef nonnull align 8 dereferenceable(32) %12)
          to label %91 unwind label %79

91:                                               ; preds = %90
  invoke void @_ZN2sf7Texture6updateERKNS_5ImageE(ptr noundef nonnull align 8 dereferenceable(40) %13, ptr noundef nonnull align 8 dereferenceable(32) %12)
          to label %92 unwind label %79

92:                                               ; preds = %91
  invoke void @_ZN2sf6Sprite10setTextureERKNS_7TextureEb(ptr noundef nonnull align 8 dereferenceable(288) %14, ptr noundef nonnull align 8 dereferenceable(40) %13, i1 noundef zeroext false)
          to label %93 unwind label %79

93:                                               ; preds = %92
  %94 = getelementptr inbounds i8, ptr %4, i64 48
  invoke void @_ZN2sf12RenderTarget4drawERKNS_8DrawableERKNS_12RenderStatesE(ptr noundef nonnull align 8 dereferenceable(480) %94, ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(104) @_ZN2sf12RenderStates7DefaultE)
          to label %95 unwind label %79

95:                                               ; preds = %93
  invoke void @_ZN2sf6Window7displayEv(ptr noundef nonnull align 8 dereferenceable(48) %4)
          to label %96 unwind label %79

96:                                               ; preds = %95
  invoke void @_ZN11FrameBuffer5ClearEhhh(i8 noundef zeroext -1, i8 noundef zeroext -1, i8 noundef zeroext -1)
          to label %97 unwind label %79

97:                                               ; preds = %96
  call void @llvm.lifetime.end.p0(i64 20, ptr %16) #8
  br label %33, !llvm.loop !14

98:                                               ; preds = %35
  invoke void @_ZN5Scene8ShutdownEv()
          to label %99 unwind label %75

99:                                               ; preds = %98
  invoke void @_ZN11FrameBuffer4FreeEv()
          to label %100 unwind label %75

100:                                              ; preds = %99
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  call void @_ZN2sf6SpriteD2Ev(ptr noundef nonnull align 8 dereferenceable(288) %14) #8
  call void @llvm.lifetime.end.p0(i64 288, ptr %14) #8
  call void @_ZN2sf7TextureD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %13) #8
  call void @llvm.lifetime.end.p0(i64 40, ptr %13) #8
  call void @_ZN2sf5ImageD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #8
  call void @_ZN2sf12RenderWindowD1Ev(ptr noundef nonnull align 8 dereferenceable(528) %4) #8
  call void @llvm.lifetime.end.p0(i64 528, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  %101 = load i32, ptr %1, align 4
  ret i32 %101

102:                                              ; preds = %79, %75
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  br label %103

103:                                              ; preds = %102, %71
  call void @_ZN2sf6SpriteD2Ev(ptr noundef nonnull align 8 dereferenceable(288) %14) #8
  br label %104

104:                                              ; preds = %103, %67
  call void @llvm.lifetime.end.p0(i64 288, ptr %14) #8
  call void @_ZN2sf7TextureD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %13) #8
  br label %105

105:                                              ; preds = %104, %63
  call void @llvm.lifetime.end.p0(i64 40, ptr %13) #8
  call void @_ZN2sf5ImageD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #8
  br label %106

106:                                              ; preds = %105, %59
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #8
  br label %107

107:                                              ; preds = %106, %55
  call void @_ZN2sf12RenderWindowD1Ev(ptr noundef nonnull align 8 dereferenceable(528) %4) #8
  br label %108

108:                                              ; preds = %107, %54
  call void @llvm.lifetime.end.p0(i64 528, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  br label %109

109:                                              ; preds = %108
  %110 = load ptr, ptr %8, align 8
  %111 = load i32, ptr %9, align 4
  %112 = insertvalue { ptr, i32 } poison, ptr %110, 0
  %113 = insertvalue { ptr, i32 } %112, i32 %111, 1
  resume { ptr, i32 } %113
}

declare void @_ZN2sf9VideoModeC1Ejjj(ptr noundef nonnull align 4 dereferenceable(12), i32 noundef, i32 noundef, i32 noundef) unnamed_addr #4

; Function Attrs: nounwind
declare void @_ZNSt6localeC1Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #5

declare void @_ZN2sf6StringC1EPKcRKSt6locale(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #4

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN2sf15ContextSettingsC2Ejjjjjjb(ptr noundef nonnull align 4 dereferenceable(25), i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i1 noundef zeroext) unnamed_addr #6 align 2

declare void @_ZN2sf12RenderWindowC1ENS_9VideoModeERKNS_6StringEjRKNS_15ContextSettingsE(ptr noundef nonnull align 8 dereferenceable(528), i64, i32, ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, ptr noundef nonnull align 4 dereferenceable(25)) unnamed_addr #4

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

; Function Attrs: nounwind
declare void @_ZNSt6localeD1Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #5

declare void @_ZN11FrameBuffer4InitEii(i32 noundef, i32 noundef) #4

declare void @_ZN2sf5ImageC1Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #4

declare void @_ZN2sf7TextureC1Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #4

declare void @_ZN2sf6SpriteC1Ev(ptr noundef nonnull align 8 dereferenceable(288)) unnamed_addr #4

declare noundef zeroext i1 @_ZN2sf7Texture6createEjj(ptr noundef nonnull align 8 dereferenceable(40), i32 noundef, i32 noundef) #4

declare void @_ZN2sf5Image6createEjjRKNS_5ColorE(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i32 noundef, ptr noundef nonnull align 1 dereferenceable(4)) #4

declare void @_ZN5Scene4InitEv() #4

declare void @_ZN2sf5ClockC1Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #4

declare noundef zeroext i1 @_ZNK2sf6Window6isOpenEv(ptr noundef nonnull align 8 dereferenceable(48)) #4

declare noundef zeroext i1 @_ZN2sf6Window9pollEventERNS_5EventE(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(20)) #4

declare void @_ZN2sf6Window5closeEv(ptr noundef nonnull align 8 dereferenceable(48)) #4

declare noundef zeroext i1 @_ZN2sf8Keyboard12isKeyPressedENS0_3KeyE(i32 noundef) #4

declare void @_ZN5Scene6UpdateEv() #4

declare void @_ZN2sf7Texture6updateERKNS_5ImageE(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(32)) #4

declare void @_ZN2sf6Sprite10setTextureERKNS_7TextureEb(ptr noundef nonnull align 8 dereferenceable(288), ptr noundef nonnull align 8 dereferenceable(40), i1 noundef zeroext) #4

declare void @_ZN2sf12RenderTarget4drawERKNS_8DrawableERKNS_12RenderStatesE(ptr noundef nonnull align 8 dereferenceable(480), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(104)) #4

declare void @_ZN2sf6Window7displayEv(ptr noundef nonnull align 8 dereferenceable(48)) #4

declare void @_ZN11FrameBuffer5ClearEhhh(i8 noundef zeroext, i8 noundef zeroext, i8 noundef zeroext) #4

declare void @_ZN5Scene8ShutdownEv() #4

declare void @_ZN11FrameBuffer4FreeEv() #4

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

; Function Attrs: nounwind
declare void @_ZN2sf7TextureD1Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #5

; Function Attrs: nounwind
declare void @_ZN2sf5ImageD1Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #5

; Function Attrs: nounwind
declare void @_ZN2sf12RenderWindowD1Ev(ptr noundef nonnull align 8 dereferenceable(528)) unnamed_addr #5

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


; 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.sf::Color" = type { i8, i8, i8, i8 }
%"class.sf::RenderStates" = type { %"struct.sf::BlendMode", %"class.sf::Transform", ptr, ptr }
%"struct.sf::BlendMode" = type { i32, i32, i32, i32, i32, i32 }
%"class.sf::Transform" = type { [16 x float] }
%"class.sf::RenderWindow" = type { %"class.sf::Window", %"class.sf::RenderTarget" }
%"class.sf::Window" = type { ptr, ptr, ptr, %"class.sf::Clock", %"class.sf::Time", %"class.sf::Vector2" }
%"class.sf::Clock" = type { %"class.sf::Time" }
%"class.sf::Time" = type { i64 }
%"class.sf::Vector2" = type { i32, i32 }
%"class.sf::RenderTarget" = type { ptr, %"class.sf::View", %"class.sf::View", %"struct.sf::RenderTarget::StatesCache", i64 }
%"class.sf::View" = type <{ %"class.sf::Vector2.0", %"class.sf::Vector2.0", float, %"class.sf::Rect", %"class.sf::Transform", %"class.sf::Transform", i8, i8, [2 x i8] }>
%"class.sf::Vector2.0" = type { float, float }
%"class.sf::Rect" = type { float, float, float, float }
%"struct.sf::RenderTarget::StatesCache" = type <{ i8, i8, i8, i8, %"struct.sf::BlendMode", [4 x i8], i64, i8, i8, [2 x i8], [4 x %"class.sf::Vertex"], [4 x i8] }>
%"class.sf::Vertex" = type { %"class.sf::Vector2.0", %"class.sf::Color", %"class.sf::Vector2.0" }
%"class.sf::VideoMode" = type { i32, i32, i32 }
%"class.sf::String" = type { %"class.std::__cxx11::basic_string" }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<unsigned int>::_Alloc_hider", i64, %union.anon.4 }
%"struct.std::__cxx11::basic_string<unsigned int>::_Alloc_hider" = type { ptr }
%union.anon.4 = type { i64, [8 x i8] }
%"class.std::locale" = type { ptr }
%"struct.sf::ContextSettings" = type <{ i32, i32, i32, i32, i32, i32, i8, [3 x i8] }>
%"class.sf::Image" = type { %"class.sf::Vector2", %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.sf::Texture" = type { %"class.sf::Vector2", %"class.sf::Vector2", i32, i8, i8, i8, i8, i8, i8, i64 }
%"class.sf::Sprite" = type { %"class.sf::Drawable", %"class.sf::Transformable.base", [4 x %"class.sf::Vertex"], ptr, %"class.sf::Rect.5" }
%"class.sf::Drawable" = type { ptr }
%"class.sf::Transformable.base" = type <{ ptr, %"class.sf::Vector2.0", %"class.sf::Vector2.0", float, %"class.sf::Vector2.0", %"class.sf::Transform", i8, [3 x i8], %"class.sf::Transform", i8 }>
%"class.sf::Rect.5" = type { i32, i32, i32, i32 }
%"class.sf::Event" = type { i32, %union.anon.6 }
%union.anon.6 = type { %"struct.sf::Event::MouseWheelScrollEvent" }
%"struct.sf::Event::MouseWheelScrollEvent" = type { i32, float, i32, i32 }

@.str = external hidden unnamed_addr constant [14 x i8], align 1
@_ZN2sf5Color5WhiteE = external global %"class.sf::Color", align 1
@_ZN2sf12RenderStates7DefaultE = external global %"class.sf::RenderStates", align 8

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z29ConvertFrameBufferToSFMLImageRN2sf5ImageE(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #0

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.sf::RenderWindow", align 8
  %2 = alloca %"class.sf::VideoMode", align 8
  %3 = alloca %"class.sf::String", align 8
  %4 = alloca %"class.std::locale", align 8
  %5 = alloca %"struct.sf::ContextSettings", align 4
  %6 = alloca %"class.sf::Image", align 8
  %7 = alloca %"class.sf::Texture", align 8
  %8 = alloca %"class.sf::Sprite", align 8
  %9 = alloca %"class.sf::Clock", align 8
  %10 = alloca %"class.sf::Event", align 4
  call void @llvm.lifetime.start.p0(i64 528, ptr nonnull %1) #7
  call void @_ZN2sf9VideoModeC1Ejjj(ptr noundef nonnull align 4 dereferenceable(12) %2, i32 noundef 1280, i32 noundef 720, i32 noundef 32)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  call void @_ZNSt6localeC1Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #7
  invoke void @_ZN2sf6StringC1EPKcRKSt6locale(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull @.str, ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %11 unwind label %33

11:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 28, ptr nonnull %5) #7
  call void @_ZN2sf15ContextSettingsC2Ejjjjjjb(ptr noundef nonnull align 4 dereferenceable(25) %5, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 1, i32 noundef 1, i32 noundef 0, i1 noundef zeroext false)
  %.sroa.0.0.copyload = load i64, ptr %2, align 8
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %2, i64 8
  %.sroa.2.0.copyload = load i32, ptr %.sroa.2.0..sroa_idx, align 8
  invoke void @_ZN2sf12RenderWindowC1ENS_9VideoModeERKNS_6StringEjRKNS_15ContextSettingsE(ptr noundef nonnull align 8 dereferenceable(528) %1, i64 %.sroa.0.0.copyload, i32 %.sroa.2.0.copyload, ptr noundef nonnull align 8 dereferenceable(32) %3, i32 noundef 7, ptr noundef nonnull align 4 dereferenceable(25) %5)
          to label %12 unwind label %35

12:                                               ; preds = %11
  call void @llvm.lifetime.end.p0(i64 28, ptr nonnull %5) #7
  call void @_ZN2sf6StringD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #7
  call void @_ZNSt6localeD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #7
  invoke void @_ZN11FrameBuffer4InitEii(i32 noundef 1280, i32 noundef 720)
          to label %13 unwind label %38

13:                                               ; preds = %12
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #7
  invoke void @_ZN2sf5ImageC1Ev(ptr noundef nonnull align 8 dereferenceable(32) %6)
          to label %14 unwind label %40

14:                                               ; preds = %13
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %7) #7
  invoke void @_ZN2sf7TextureC1Ev(ptr noundef nonnull align 8 dereferenceable(40) %7)
          to label %15 unwind label %42

15:                                               ; preds = %14
  call void @llvm.lifetime.start.p0(i64 288, ptr nonnull %8) #7
  invoke void @_ZN2sf6SpriteC1Ev(ptr noundef nonnull align 8 dereferenceable(288) %8)
          to label %16 unwind label %44

16:                                               ; preds = %15
  %17 = invoke noundef zeroext i1 @_ZN2sf7Texture6createEjj(ptr noundef nonnull align 8 dereferenceable(40) %7, i32 noundef 1280, i32 noundef 720)
          to label %18 unwind label %46

18:                                               ; preds = %16
  invoke void @_ZN2sf5Image6createEjjRKNS_5ColorE(ptr noundef nonnull align 8 dereferenceable(32) %6, i32 noundef 1280, i32 noundef 720, ptr noundef nonnull align 1 dereferenceable(4) @_ZN2sf5Color5WhiteE)
          to label %19 unwind label %46

19:                                               ; preds = %18
  invoke void @_ZN5Scene4InitEv()
          to label %20 unwind label %46

20:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #7
  invoke void @_ZN2sf5ClockC1Ev(ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %.preheader unwind label %.loopexit.split-lp20

.preheader:                                       ; preds = %20
  %21 = getelementptr inbounds i8, ptr %1, i64 48
  br label %22

22:                                               ; preds = %.preheader, %60
  %23 = invoke noundef zeroext i1 @_ZNK2sf6Window6isOpenEv(ptr noundef nonnull align 8 dereferenceable(48) %1)
          to label %24 unwind label %.loopexit19

24:                                               ; preds = %22
  br i1 %23, label %25, label %61

25:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 20, ptr nonnull %10) #7
  br label %26

26:                                               ; preds = %.backedge, %25
  %27 = invoke noundef zeroext i1 @_ZN2sf6Window9pollEventERNS_5EventE(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 4 dereferenceable(20) %10)
          to label %28 unwind label %.loopexit

28:                                               ; preds = %26
  br i1 %27, label %29, label %49

29:                                               ; preds = %28
  %30 = load i32, ptr %10, align 4, !tbaa !5
  %31 = icmp eq i32 %30, 0
  br i1 %31, label %32, label %.backedge

32:                                               ; preds = %29
  invoke void @_ZN2sf6Window5closeEv(ptr noundef nonnull align 8 dereferenceable(48) %1)
          to label %.backedge unwind label %.loopexit

.backedge:                                        ; preds = %32, %29
  br label %26, !llvm.loop !10

33:                                               ; preds = %0
  %34 = landingpad { ptr, i32 }
          cleanup
  br label %37

35:                                               ; preds = %11
  %36 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 28, ptr nonnull %5) #7
  call void @_ZN2sf6StringD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #7
  br label %37

37:                                               ; preds = %35, %33
  %.pn = phi { ptr, i32 } [ %36, %35 ], [ %34, %33 ]
  call void @_ZNSt6localeD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #7
  br label %70

38:                                               ; preds = %12
  %39 = landingpad { ptr, i32 }
          cleanup
  br label %69

40:                                               ; preds = %13
  %41 = landingpad { ptr, i32 }
          cleanup
  br label %68

42:                                               ; preds = %14
  %43 = landingpad { ptr, i32 }
          cleanup
  br label %67

44:                                               ; preds = %15
  %45 = landingpad { ptr, i32 }
          cleanup
  br label %66

46:                                               ; preds = %19, %18, %16
  %47 = landingpad { ptr, i32 }
          cleanup
  br label %65

.loopexit19:                                      ; preds = %22
  %lpad.loopexit21 = landingpad { ptr, i32 }
          cleanup
  br label %64

.loopexit.split-lp20:                             ; preds = %20, %61, %62
  %lpad.loopexit.split-lp22 = landingpad { ptr, i32 }
          cleanup
  br label %64

.loopexit:                                        ; preds = %26, %32
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %48

.loopexit.split-lp:                               ; preds = %49, %52, %53, %54, %55, %56, %57, %58, %59
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %48

48:                                               ; preds = %.loopexit.split-lp, %.loopexit
  %lpad.phi = phi { ptr, i32 } [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %10) #7
  br label %64

49:                                               ; preds = %28
  %50 = invoke noundef zeroext i1 @_ZN2sf8Keyboard12isKeyPressedENS0_3KeyE(i32 noundef 36)
          to label %51 unwind label %.loopexit.split-lp

51:                                               ; preds = %49
  br i1 %50, label %52, label %53

52:                                               ; preds = %51
  invoke void @_ZN2sf6Window5closeEv(ptr noundef nonnull align 8 dereferenceable(48) %1)
          to label %53 unwind label %.loopexit.split-lp

53:                                               ; preds = %52, %51
  invoke void @_ZN5Scene6UpdateEv()
          to label %54 unwind label %.loopexit.split-lp

54:                                               ; preds = %53
  invoke void @_Z29ConvertFrameBufferToSFMLImageRN2sf5ImageE(ptr noundef nonnull align 8 dereferenceable(32) %6)
          to label %55 unwind label %.loopexit.split-lp

55:                                               ; preds = %54
  invoke void @_ZN2sf7Texture6updateERKNS_5ImageE(ptr noundef nonnull align 8 dereferenceable(40) %7, ptr noundef nonnull align 8 dereferenceable(32) %6)
          to label %56 unwind label %.loopexit.split-lp

56:                                               ; preds = %55
  invoke void @_ZN2sf6Sprite10setTextureERKNS_7TextureEb(ptr noundef nonnull align 8 dereferenceable(288) %8, ptr noundef nonnull align 8 dereferenceable(40) %7, i1 noundef zeroext false)
          to label %57 unwind label %.loopexit.split-lp

57:                                               ; preds = %56
  invoke void @_ZN2sf12RenderTarget4drawERKNS_8DrawableERKNS_12RenderStatesE(ptr noundef nonnull align 8 dereferenceable(480) %21, ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(104) @_ZN2sf12RenderStates7DefaultE)
          to label %58 unwind label %.loopexit.split-lp

58:                                               ; preds = %57
  invoke void @_ZN2sf6Window7displayEv(ptr noundef nonnull align 8 dereferenceable(48) %1)
          to label %59 unwind label %.loopexit.split-lp

59:                                               ; preds = %58
  invoke void @_ZN11FrameBuffer5ClearEhhh(i8 noundef zeroext -1, i8 noundef zeroext -1, i8 noundef zeroext -1)
          to label %60 unwind label %.loopexit.split-lp

60:                                               ; preds = %59
  call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %10) #7
  br label %22, !llvm.loop !12

61:                                               ; preds = %24
  invoke void @_ZN5Scene8ShutdownEv()
          to label %62 unwind label %.loopexit.split-lp20

62:                                               ; preds = %61
  invoke void @_ZN11FrameBuffer4FreeEv()
          to label %63 unwind label %.loopexit.split-lp20

63:                                               ; preds = %62
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  call void @_ZN2sf6SpriteD2Ev(ptr noundef nonnull align 8 dereferenceable(288) %8) #7
  call void @llvm.lifetime.end.p0(i64 288, ptr nonnull %8) #7
  call void @_ZN2sf7TextureD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %7) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %7) #7
  call void @_ZN2sf5ImageD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #7
  call void @_ZN2sf12RenderWindowD1Ev(ptr noundef nonnull align 8 dereferenceable(528) %1) #7
  call void @llvm.lifetime.end.p0(i64 528, ptr nonnull %1) #7
  ret i32 0

64:                                               ; preds = %.loopexit19, %.loopexit.split-lp20, %48
  %.pn11 = phi { ptr, i32 } [ %lpad.phi, %48 ], [ %lpad.loopexit21, %.loopexit19 ], [ %lpad.loopexit.split-lp22, %.loopexit.split-lp20 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  br label %65

65:                                               ; preds = %64, %46
  %.pn11.pn = phi { ptr, i32 } [ %.pn11, %64 ], [ %47, %46 ]
  call void @_ZN2sf6SpriteD2Ev(ptr noundef nonnull align 8 dereferenceable(288) %8) #7
  br label %66

66:                                               ; preds = %65, %44
  %.pn11.pn.pn = phi { ptr, i32 } [ %.pn11.pn, %65 ], [ %45, %44 ]
  call void @llvm.lifetime.end.p0(i64 288, ptr nonnull %8) #7
  call void @_ZN2sf7TextureD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %7) #7
  br label %67

67:                                               ; preds = %66, %42
  %.pn11.pn.pn.pn = phi { ptr, i32 } [ %.pn11.pn.pn, %66 ], [ %43, %42 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %7) #7
  call void @_ZN2sf5ImageD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #7
  br label %68

68:                                               ; preds = %67, %40
  %.pn11.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn11.pn.pn.pn, %67 ], [ %41, %40 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #7
  br label %69

69:                                               ; preds = %68, %38
  %.pn11.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn11.pn.pn.pn.pn, %68 ], [ %39, %38 ]
  call void @_ZN2sf12RenderWindowD1Ev(ptr noundef nonnull align 8 dereferenceable(528) %1) #7
  br label %70

70:                                               ; preds = %69, %37
  %.pn11.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn11.pn.pn.pn.pn.pn, %69 ], [ %.pn, %37 ]
  call void @llvm.lifetime.end.p0(i64 528, ptr nonnull %1) #7
  resume { ptr, i32 } %.pn11.pn.pn.pn.pn.pn.pn
}

declare void @_ZN2sf9VideoModeC1Ejjj(ptr noundef nonnull align 4 dereferenceable(12), i32 noundef, i32 noundef, i32 noundef) unnamed_addr #3

; Function Attrs: nounwind
declare void @_ZNSt6localeC1Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #4

declare void @_ZN2sf6StringC1EPKcRKSt6locale(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #3

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN2sf15ContextSettingsC2Ejjjjjjb(ptr noundef nonnull align 4 dereferenceable(25), i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i1 noundef zeroext) unnamed_addr #5 align 2

declare void @_ZN2sf12RenderWindowC1ENS_9VideoModeERKNS_6StringEjRKNS_15ContextSettingsE(ptr noundef nonnull align 8 dereferenceable(528), i64, i32, ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, ptr noundef nonnull align 4 dereferenceable(25)) unnamed_addr #3

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

; Function Attrs: nounwind
declare void @_ZNSt6localeD1Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #4

declare void @_ZN11FrameBuffer4InitEii(i32 noundef, i32 noundef) local_unnamed_addr #3

declare void @_ZN2sf5ImageC1Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #3

declare void @_ZN2sf7TextureC1Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #3

declare void @_ZN2sf6SpriteC1Ev(ptr noundef nonnull align 8 dereferenceable(288)) unnamed_addr #3

declare noundef zeroext i1 @_ZN2sf7Texture6createEjj(ptr noundef nonnull align 8 dereferenceable(40), i32 noundef, i32 noundef) local_unnamed_addr #3

declare void @_ZN2sf5Image6createEjjRKNS_5ColorE(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i32 noundef, ptr noundef nonnull align 1 dereferenceable(4)) local_unnamed_addr #3

declare void @_ZN5Scene4InitEv() local_unnamed_addr #3

declare void @_ZN2sf5ClockC1Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #3

declare noundef zeroext i1 @_ZNK2sf6Window6isOpenEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #3

declare noundef zeroext i1 @_ZN2sf6Window9pollEventERNS_5EventE(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(20)) local_unnamed_addr #3

declare void @_ZN2sf6Window5closeEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #3

declare noundef zeroext i1 @_ZN2sf8Keyboard12isKeyPressedENS0_3KeyE(i32 noundef) local_unnamed_addr #3

declare void @_ZN5Scene6UpdateEv() local_unnamed_addr #3

declare void @_ZN2sf7Texture6updateERKNS_5ImageE(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #3

declare void @_ZN2sf6Sprite10setTextureERKNS_7TextureEb(ptr noundef nonnull align 8 dereferenceable(288), ptr noundef nonnull align 8 dereferenceable(40), i1 noundef zeroext) local_unnamed_addr #3

declare void @_ZN2sf12RenderTarget4drawERKNS_8DrawableERKNS_12RenderStatesE(ptr noundef nonnull align 8 dereferenceable(480), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(104)) local_unnamed_addr #3

declare void @_ZN2sf6Window7displayEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #3

declare void @_ZN11FrameBuffer5ClearEhhh(i8 noundef zeroext, i8 noundef zeroext, i8 noundef zeroext) local_unnamed_addr #3

declare void @_ZN5Scene8ShutdownEv() local_unnamed_addr #3

declare void @_ZN11FrameBuffer4FreeEv() local_unnamed_addr #3

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

; Function Attrs: nounwind
declare void @_ZN2sf7TextureD1Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #4

; Function Attrs: nounwind
declare void @_ZN2sf5ImageD1Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #4

; Function Attrs: nounwind
declare void @_ZN2sf12RenderWindowD1Ev(ptr noundef nonnull align 8 dereferenceable(528)) unnamed_addr #4

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

!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, !7, i64 0}
!6 = !{!"_ZTSN2sf5EventE", !7, i64 0, !8, i64 4}
!7 = !{!"_ZTSN2sf5Event9EventTypeE", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,LICMPass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass