; LLVM IR from jrouwe/JoltPhysics :: TestFramework/Application (DebugUI)

; 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.UITexturedQuad = type { %"class.JPH::RefConst.0", i32, i32, i32, i32, i32, i32, i32, i32 }
%"class.JPH::RefConst.0" = type { ptr }
%"class.std::function.16" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%class.DebugUI = type { ptr, %"class.JPH::RefConst", %"class.JPH::RefConst.0" }
%"class.JPH::RefConst" = type { ptr }

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

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

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

declare void @_ZN9UIElement3AddEPS_(ptr noundef nonnull align 8 dereferenceable(144), ptr noundef) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9UIElement15SetPaddingRightEiNS_6EUnitsE(ptr noundef nonnull align 8 dereferenceable(144), i32 noundef, i32 noundef) #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN12UIStaticText7SetTextERKSt17basic_string_viewIcSt11char_traitsIcEE(ptr noundef nonnull align 8 dereferenceable(213), ptr noundef nonnull align 8 dereferenceable(16)) #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN12UIStaticText7SetFontEPK4Font(ptr noundef nonnull align 8 dereferenceable(213), ptr noundef) #4 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN7DebugUI14CreateCheckBoxEP9UIElementRKSt17basic_string_viewIcSt11char_traitsIcEEbSt8functionIFvN10UICheckBox6EStateEEE(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef %1, ptr noundef nonnull align 8 dereferenceable(16) %2, i1 noundef zeroext %3, ptr noundef %4) #4 align 2 personality ptr @__gxx_personality_v0 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i8, align 1
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca %class.UITexturedQuad, align 8
  %15 = alloca %class.UITexturedQuad, align 8
  %16 = alloca %"class.std::function.16", align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  %17 = zext i1 %3 to i8
  store i8 %17, ptr %9, align 1, !tbaa !9
  store ptr %4, ptr %10, align 8, !tbaa !5
  %18 = load ptr, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #9
  %19 = call noundef ptr @_ZN10UICheckBoxnwEm(i64 noundef 352)
  call void @llvm.memset.p0.i64(ptr align 8 %19, i8 0, i64 352, i1 false)
  invoke void @_ZN10UICheckBoxC2Ev(ptr noundef nonnull align 8 dereferenceable(349) %19)
          to label %20 unwind label %45

20:                                               ; preds = %5
  store ptr %19, ptr %11, align 8, !tbaa !5
  %21 = load ptr, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 40, ptr %14) #9
  %22 = getelementptr inbounds %class.DebugUI, ptr %18, i32 0, i32 2
  %23 = call noundef ptr @_ZNK3JPH8RefConstI7TextureEcvPKS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %22)
  call void @_ZN14UITexturedQuadC2EPK7Textureiiii(ptr noundef nonnull align 8 dereferenceable(40) %14, ptr noundef %23, i32 noundef 48, i32 noundef 0, i32 noundef 16, i32 noundef 16)
  invoke void @_ZN10UICheckBox21SetUncheckedStateQuadERK14UITexturedQuad(ptr noundef nonnull align 8 dereferenceable(349) %21, ptr noundef nonnull align 8 dereferenceable(40) %14)
          to label %24 unwind label %49

24:                                               ; preds = %20
  call void @_ZN14UITexturedQuadD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %14) #9
  call void @llvm.lifetime.end.p0(i64 40, ptr %14) #9
  %25 = load ptr, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 40, ptr %15) #9
  %26 = getelementptr inbounds %class.DebugUI, ptr %18, i32 0, i32 2
  %27 = call noundef ptr @_ZNK3JPH8RefConstI7TextureEcvPKS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %26)
  call void @_ZN14UITexturedQuadC2EPK7Textureiiii(ptr noundef nonnull align 8 dereferenceable(40) %15, ptr noundef %27, i32 noundef 65, i32 noundef 0, i32 noundef 16, i32 noundef 16)
  invoke void @_ZN10UICheckBox19SetCheckedStateQuadERK14UITexturedQuad(ptr noundef nonnull align 8 dereferenceable(349) %25, ptr noundef nonnull align 8 dereferenceable(40) %15)
          to label %28 unwind label %53

28:                                               ; preds = %24
  call void @_ZN14UITexturedQuadD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %15) #9
  call void @llvm.lifetime.end.p0(i64 40, ptr %15) #9
  %29 = load ptr, ptr %11, align 8, !tbaa !5
  %30 = getelementptr inbounds %class.DebugUI, ptr %18, i32 0, i32 1
  %31 = call noundef ptr @_ZNK3JPH8RefConstI4FontEcvPKS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %30)
  call void @_ZN12UIStaticText7SetFontEPK4Font(ptr noundef nonnull align 8 dereferenceable(213) %29, ptr noundef %31)
  %32 = load ptr, ptr %11, align 8, !tbaa !5
  %33 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN12UIStaticText7SetTextERKSt17basic_string_viewIcSt11char_traitsIcEE(ptr noundef nonnull align 8 dereferenceable(213) %32, ptr noundef nonnull align 8 dereferenceable(16) %33)
  %34 = load ptr, ptr %11, align 8, !tbaa !5
  call void @_ZNSt8functionIFvN10UICheckBox6EStateEEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef nonnull align 8 dereferenceable(32) %4)
  invoke void @_ZN10UICheckBox14SetClickActionESt8functionIFvNS_6EStateEEE(ptr noundef nonnull align 8 dereferenceable(349) %34, ptr noundef %16)
          to label %35 unwind label %57

35:                                               ; preds = %28
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #9
  %36 = load ptr, ptr %11, align 8, !tbaa !5
  %37 = load i8, ptr %9, align 1, !tbaa !9, !range !11, !noundef !12
  %38 = trunc i8 %37 to i1
  %39 = zext i1 %38 to i64
  %40 = select i1 %38, i32 1, i32 0
  call void @_ZN10UICheckBox8SetStateENS_6EStateE(ptr noundef nonnull align 8 dereferenceable(349) %36, i32 noundef %40)
  %41 = load ptr, ptr %11, align 8, !tbaa !5
  call void @_ZN9UIElement15SetPaddingRightEiNS_6EUnitsE(ptr noundef nonnull align 8 dereferenceable(144) %41, i32 noundef 24, i32 noundef 0)
  %42 = load ptr, ptr %7, align 8, !tbaa !5
  %43 = load ptr, ptr %11, align 8, !tbaa !5
  call void @_ZN9UIElement3AddEPS_(ptr noundef nonnull align 8 dereferenceable(144) %42, ptr noundef %43)
  %44 = load ptr, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #9
  ret ptr %44

45:                                               ; preds = %5
  %46 = landingpad { ptr, i32 }
          cleanup
  %47 = extractvalue { ptr, i32 } %46, 0
  store ptr %47, ptr %12, align 8
  %48 = extractvalue { ptr, i32 } %46, 1
  store i32 %48, ptr %13, align 4
  call void @_ZN10UICheckBoxdlEPv(ptr noundef %19) #9
  br label %61

49:                                               ; preds = %20
  %50 = landingpad { ptr, i32 }
          cleanup
  %51 = extractvalue { ptr, i32 } %50, 0
  store ptr %51, ptr %12, align 8
  %52 = extractvalue { ptr, i32 } %50, 1
  store i32 %52, ptr %13, align 4
  call void @_ZN14UITexturedQuadD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %14) #9
  call void @llvm.lifetime.end.p0(i64 40, ptr %14) #9
  br label %61

53:                                               ; preds = %24
  %54 = landingpad { ptr, i32 }
          cleanup
  %55 = extractvalue { ptr, i32 } %54, 0
  store ptr %55, ptr %12, align 8
  %56 = extractvalue { ptr, i32 } %54, 1
  store i32 %56, ptr %13, align 4
  call void @_ZN14UITexturedQuadD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %15) #9
  call void @llvm.lifetime.end.p0(i64 40, ptr %15) #9
  br label %61

57:                                               ; preds = %28
  %58 = landingpad { ptr, i32 }
          cleanup
  %59 = extractvalue { ptr, i32 } %58, 0
  store ptr %59, ptr %12, align 8
  %60 = extractvalue { ptr, i32 } %58, 1
  store i32 %60, ptr %13, align 4
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #9
  br label %61

61:                                               ; preds = %57, %53, %49, %45
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #9
  br label %62

62:                                               ; preds = %61
  %63 = load ptr, ptr %12, align 8
  %64 = load i32, ptr %13, align 4
  %65 = insertvalue { ptr, i32 } poison, ptr %63, 0
  %66 = insertvalue { ptr, i32 } %65, i32 %64, 1
  resume { ptr, i32 } %66
}

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef ptr @_ZN10UICheckBoxnwEm(i64 noundef) #5 align 2

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

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN10UICheckBoxdlEPv(ptr noundef) #7 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10UICheckBox21SetUncheckedStateQuadERK14UITexturedQuad(ptr noundef nonnull align 8 dereferenceable(349), ptr noundef nonnull align 8 dereferenceable(40)) #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN14UITexturedQuadC2EPK7Textureiiii(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10UICheckBox19SetCheckedStateQuadERK14UITexturedQuad(ptr noundef nonnull align 8 dereferenceable(349), ptr noundef nonnull align 8 dereferenceable(40)) #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10UICheckBox14SetClickActionESt8functionIFvNS_6EStateEEE(ptr noundef nonnull align 8 dereferenceable(349), ptr noundef) #4 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN10UICheckBox8SetStateENS_6EStateE(ptr noundef nonnull align 8 dereferenceable(349), i32 noundef) #8 align 2

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

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


; 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.UITexturedQuad = type { %"class.JPH::RefConst.0", i32, i32, i32, i32, i32, i32, i32, i32 }
%"class.JPH::RefConst.0" = type { ptr }
%"class.std::function.16" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

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

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

declare void @_ZN9UIElement3AddEPS_(ptr noundef nonnull align 8 dereferenceable(144), ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9UIElement15SetPaddingRightEiNS_6EUnitsE(ptr noundef nonnull align 8 dereferenceable(144), i32 noundef, i32 noundef) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN12UIStaticText7SetTextERKSt17basic_string_viewIcSt11char_traitsIcEE(ptr noundef nonnull align 8 dereferenceable(213), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #4 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN7DebugUI14CreateCheckBoxEP9UIElementRKSt17basic_string_viewIcSt11char_traitsIcEEbSt8functionIFvN10UICheckBox6EStateEEE(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef %1, ptr noundef nonnull align 8 dereferenceable(16) %2, i1 noundef zeroext %3, ptr noundef %4) local_unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %6 = alloca %class.UITexturedQuad, align 8
  %7 = alloca %class.UITexturedQuad, align 8
  %8 = alloca %"class.std::function.16", align 8
  %9 = tail call noundef ptr @_ZN10UICheckBoxnwEm(i64 noundef 352)
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(352) %9, i8 0, i64 352, i1 false)
  invoke void @_ZN10UICheckBoxC2Ev(ptr noundef nonnull align 8 dereferenceable(349) %9)
          to label %10 unwind label %20

10:                                               ; preds = %5
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %6) #9
  %11 = getelementptr inbounds i8, ptr %0, i64 16
  %12 = tail call noundef ptr @_ZNK3JPH8RefConstI7TextureEcvPKS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %11)
  call void @_ZN14UITexturedQuadC2EPK7Textureiiii(ptr noundef nonnull align 8 dereferenceable(40) %6, ptr noundef %12, i32 noundef 48, i32 noundef 0, i32 noundef 16, i32 noundef 16)
  invoke void @_ZN10UICheckBox21SetUncheckedStateQuadERK14UITexturedQuad(ptr noundef nonnull align 8 dereferenceable(349) %9, ptr noundef nonnull align 8 dereferenceable(40) %6)
          to label %13 unwind label %22

13:                                               ; preds = %10
  call void @_ZN14UITexturedQuadD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %6) #9
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %6) #9
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %7) #9
  %14 = call noundef ptr @_ZNK3JPH8RefConstI7TextureEcvPKS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %11)
  call void @_ZN14UITexturedQuadC2EPK7Textureiiii(ptr noundef nonnull align 8 dereferenceable(40) %7, ptr noundef %14, i32 noundef 65, i32 noundef 0, i32 noundef 16, i32 noundef 16)
  invoke void @_ZN10UICheckBox19SetCheckedStateQuadERK14UITexturedQuad(ptr noundef nonnull align 8 dereferenceable(349) %9, ptr noundef nonnull align 8 dereferenceable(40) %7)
          to label %15 unwind label %24

15:                                               ; preds = %13
  call void @_ZN14UITexturedQuadD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %7) #9
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %7) #9
  %16 = getelementptr inbounds i8, ptr %0, i64 8
  %17 = call noundef ptr @_ZNK3JPH8RefConstI4FontEcvPKS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %16)
  call void @_ZN12UIStaticText7SetFontEPK4Font(ptr noundef nonnull align 8 dereferenceable(213) %9, ptr noundef %17)
  call void @_ZN12UIStaticText7SetTextERKSt17basic_string_viewIcSt11char_traitsIcEE(ptr noundef nonnull align 8 dereferenceable(213) %9, ptr noundef nonnull align 8 dereferenceable(16) %2)
  call void @_ZNSt8functionIFvN10UICheckBox6EStateEEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull align 8 dereferenceable(32) %4)
  invoke void @_ZN10UICheckBox14SetClickActionESt8functionIFvNS_6EStateEEE(ptr noundef nonnull align 8 dereferenceable(349) %9, ptr noundef nonnull %8)
          to label %18 unwind label %26

18:                                               ; preds = %15
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #9
  %19 = zext i1 %3 to i32
  call void @_ZN10UICheckBox8SetStateENS_6EStateE(ptr noundef nonnull align 8 dereferenceable(349) %9, i32 noundef %19)
  call void @_ZN9UIElement15SetPaddingRightEiNS_6EUnitsE(ptr noundef nonnull align 8 dereferenceable(144) %9, i32 noundef 24, i32 noundef 0)
  call void @_ZN9UIElement3AddEPS_(ptr noundef nonnull align 8 dereferenceable(144) %1, ptr noundef nonnull %9)
  ret ptr %9

20:                                               ; preds = %5
  %21 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZN10UICheckBoxdlEPv(ptr noundef nonnull %9) #9
  br label %28

22:                                               ; preds = %10
  %23 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN14UITexturedQuadD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %6) #9
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %6) #9
  br label %28

24:                                               ; preds = %13
  %25 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN14UITexturedQuadD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %7) #9
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %7) #9
  br label %28

26:                                               ; preds = %15
  %27 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #9
  br label %28

28:                                               ; preds = %26, %24, %22, %20
  %.pn = phi { ptr, i32 } [ %27, %26 ], [ %25, %24 ], [ %23, %22 ], [ %21, %20 ]
  resume { ptr, i32 } %.pn
}

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef ptr @_ZN10UICheckBoxnwEm(i64 noundef) local_unnamed_addr #5 align 2

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

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN10UICheckBoxdlEPv(ptr noundef) local_unnamed_addr #7 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10UICheckBox21SetUncheckedStateQuadERK14UITexturedQuad(ptr noundef nonnull align 8 dereferenceable(349), ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN14UITexturedQuadC2EPK7Textureiiii(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10UICheckBox19SetCheckedStateQuadERK14UITexturedQuad(ptr noundef nonnull align 8 dereferenceable(349), ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #4 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN10UICheckBox8SetStateENS_6EStateE(ptr noundef nonnull align 8 dereferenceable(349), i32 noundef) local_unnamed_addr #8 align 2

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

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


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