; LLVM IR from taichi-dev/soft2d-release :: tests (minimal)

; 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.ti::Runtime" = type <{ i32, [4 x i8], ptr, i8, [7 x i8] }>
%struct.S2WorldConfig = type { i32, i32, i32, i32, i32, %struct.S2Vec2, %struct.S2Vec2, float, %struct.S2Vec2, i32, i32, i32, float, float, float, i32 }
%struct.S2Vec2 = type { float, float }

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca %"class.ti::Runtime", align 8
  %4 = alloca %struct.S2WorldConfig, align 4
  %5 = alloca %struct.S2Vec2, align 4
  %6 = alloca %struct.S2Vec2, align 4
  %7 = alloca %struct.S2Vec2, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca float, align 4
  %12 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #8
  store i32 1, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %3) #8
  %13 = load i32, ptr %2, align 4, !tbaa !5
  call void @_ZN2ti7RuntimeC2E6TiArchj(ptr noundef nonnull align 8 dereferenceable(17) %3, i32 noundef %13, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 76, ptr %4) #8
  call void @llvm.memset.p0.i64(ptr align 4 %4, i8 0, i64 76, i1 false)
  %14 = getelementptr inbounds %struct.S2WorldConfig, ptr %4, i32 0, i32 0
  store i32 90000, ptr %14, align 4, !tbaa !9
  %15 = getelementptr inbounds %struct.S2WorldConfig, ptr %4, i32 0, i32 1
  store i32 10000, ptr %15, align 4, !tbaa !15
  %16 = getelementptr inbounds %struct.S2WorldConfig, ptr %4, i32 0, i32 2
  store i32 10000, ptr %16, align 4, !tbaa !16
  %17 = getelementptr inbounds %struct.S2WorldConfig, ptr %4, i32 0, i32 3
  store i32 10000, ptr %17, align 4, !tbaa !17
  %18 = getelementptr inbounds %struct.S2WorldConfig, ptr %4, i32 0, i32 4
  store i32 128, ptr %18, align 4, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #8
  %19 = getelementptr inbounds %struct.S2Vec2, ptr %5, i32 0, i32 0
  store float 0.000000e+00, ptr %19, align 4, !tbaa !19
  %20 = getelementptr inbounds %struct.S2Vec2, ptr %5, i32 0, i32 1
  store float 0.000000e+00, ptr %20, align 4, !tbaa !20
  %21 = getelementptr inbounds %struct.S2WorldConfig, ptr %4, i32 0, i32 5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %21, ptr align 4 %5, i64 8, i1 false), !tbaa.struct !21
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #8
  %22 = getelementptr inbounds %struct.S2Vec2, ptr %6, i32 0, i32 0
  store float 0.000000e+00, ptr %22, align 4, !tbaa !19
  %23 = getelementptr inbounds %struct.S2Vec2, ptr %6, i32 0, i32 1
  store float 0.000000e+00, ptr %23, align 4, !tbaa !20
  %24 = getelementptr inbounds %struct.S2WorldConfig, ptr %4, i32 0, i32 6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %24, ptr align 4 %6, i64 8, i1 false), !tbaa.struct !21
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  %25 = getelementptr inbounds %struct.S2WorldConfig, ptr %4, i32 0, i32 7
  store float 0x3F1A36E2E0000000, ptr %25, align 4, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #8
  %26 = getelementptr inbounds %struct.S2Vec2, ptr %7, i32 0, i32 0
  store float 0.000000e+00, ptr %26, align 4, !tbaa !19
  %27 = getelementptr inbounds %struct.S2Vec2, ptr %7, i32 0, i32 1
  store float 0xC0239999A0000000, ptr %27, align 4, !tbaa !20
  %28 = getelementptr inbounds %struct.S2WorldConfig, ptr %4, i32 0, i32 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %28, ptr align 4 %7, i64 8, i1 false), !tbaa.struct !21
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  %29 = getelementptr inbounds %struct.S2WorldConfig, ptr %4, i32 0, i32 10
  store i32 0, ptr %29, align 4, !tbaa !24
  %30 = getelementptr inbounds %struct.S2WorldConfig, ptr %4, i32 0, i32 11
  store i32 0, ptr %30, align 4, !tbaa !25
  %31 = getelementptr inbounds %struct.S2WorldConfig, ptr %4, i32 0, i32 12
  store float 1.000000e+06, ptr %31, align 4, !tbaa !26
  %32 = getelementptr inbounds %struct.S2WorldConfig, ptr %4, i32 0, i32 13
  store float 0x3FB99999A0000000, ptr %32, align 4, !tbaa !27
  %33 = getelementptr inbounds %struct.S2WorldConfig, ptr %4, i32 0, i32 14
  store float 0x3FB99999A0000000, ptr %33, align 4, !tbaa !28
  %34 = getelementptr inbounds %struct.S2WorldConfig, ptr %4, i32 0, i32 15
  store i32 4, ptr %34, align 4, !tbaa !29
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #8
  %35 = load i32, ptr %2, align 4, !tbaa !5
  %36 = invoke noundef ptr @_ZNK2ti7RuntimecvP11TiRuntime_tEv(ptr noundef nonnull align 8 dereferenceable(17) %3)
          to label %37 unwind label %44

37:                                               ; preds = %0
  %38 = invoke ptr @s2_create_world(i32 noundef %35, ptr noundef %36, ptr noundef %4)
          to label %39 unwind label %44

39:                                               ; preds = %37
  store ptr %38, ptr %8, align 8, !tbaa !30
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #8
  store float 0x3F60624DE0000000, ptr %11, align 4, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  store i32 0, ptr %12, align 4, !tbaa !32
  br label %40

40:                                               ; preds = %52, %39
  %41 = load i32, ptr %12, align 4, !tbaa !32
  %42 = icmp slt i32 %41, 100
  br i1 %42, label %48, label %43

43:                                               ; preds = %40
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  br label %59

44:                                               ; preds = %37, %0
  %45 = landingpad { ptr, i32 }
          cleanup
  %46 = extractvalue { ptr, i32 } %45, 0
  store ptr %46, ptr %9, align 8
  %47 = extractvalue { ptr, i32 } %45, 1
  store i32 %47, ptr %10, align 4
  br label %70

48:                                               ; preds = %40
  %49 = load ptr, ptr %8, align 8, !tbaa !30
  %50 = load float, ptr %11, align 4, !tbaa !22
  invoke void @s2_step(ptr noundef %49, float noundef %50)
          to label %51 unwind label %55

51:                                               ; preds = %48
  br label %52

52:                                               ; preds = %51
  %53 = load i32, ptr %12, align 4, !tbaa !32
  %54 = add nsw i32 %53, 1
  store i32 %54, ptr %12, align 4, !tbaa !32
  br label %40, !llvm.loop !33

55:                                               ; preds = %48
  %56 = landingpad { ptr, i32 }
          cleanup
  %57 = extractvalue { ptr, i32 } %56, 0
  store ptr %57, ptr %9, align 8
  %58 = extractvalue { ptr, i32 } %56, 1
  store i32 %58, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  br label %69

59:                                               ; preds = %43
  %60 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
          to label %61 unwind label %65

61:                                               ; preds = %59
  %62 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %60, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %63 unwind label %65

63:                                               ; preds = %61
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 76, ptr %4) #8
  call void @_ZN2ti7RuntimeD2Ev(ptr noundef nonnull align 8 dereferenceable(17) %3) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  %64 = load i32, ptr %1, align 4
  ret i32 %64

65:                                               ; preds = %61, %59
  %66 = landingpad { ptr, i32 }
          cleanup
  %67 = extractvalue { ptr, i32 } %66, 0
  store ptr %67, ptr %9, align 8
  %68 = extractvalue { ptr, i32 } %66, 1
  store i32 %68, ptr %10, align 4
  br label %69

69:                                               ; preds = %65, %55
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  br label %70

70:                                               ; preds = %69, %44
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 76, ptr %4) #8
  call void @_ZN2ti7RuntimeD2Ev(ptr noundef nonnull align 8 dereferenceable(17) %3) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  br label %71

71:                                               ; preds = %70
  %72 = load ptr, ptr %9, align 8
  %73 = load i32, ptr %10, align 4
  %74 = insertvalue { ptr, i32 } poison, ptr %72, 0
  %75 = insertvalue { ptr, i32 } %74, i32 %73, 1
  resume { ptr, i32 } %75
}

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

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

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

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

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

declare ptr @s2_create_world(i32 noundef, ptr noundef, ptr noundef) #5

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

declare i32 @__gxx_personality_v0(...)

declare void @s2_step(ptr noundef, float noundef) #5

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN2ti7RuntimeD2Ev(ptr noundef nonnull align 8 dereferenceable(17)) 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 nounwind willreturn memory(argmem: write) }
attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { 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 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 = !{!"_ZTS6TiArch", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"_ZTS13S2WorldConfig", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !12, i64 20, !12, i64 28, !13, i64 36, !12, i64 40, !14, i64 48, !11, i64 52, !11, i64 56, !13, i64 60, !13, i64 64, !13, i64 68, !11, i64 72}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_ZTS6S2Vec2", !13, i64 0, !13, i64 4}
!13 = !{!"float", !7, i64 0}
!14 = !{!"_ZTS24S2OutWorldBoundaryPolicy", !7, i64 0}
!15 = !{!10, !11, i64 4}
!16 = !{!10, !11, i64 8}
!17 = !{!10, !11, i64 12}
!18 = !{!10, !11, i64 16}
!19 = !{!12, !13, i64 0}
!20 = !{!12, !13, i64 4}
!21 = !{i64 0, i64 4, !22, i64 4, i64 4, !22}
!22 = !{!13, !13, i64 0}
!23 = !{!10, !13, i64 36}
!24 = !{!10, !11, i64 52}
!25 = !{!10, !11, i64 56}
!26 = !{!10, !13, i64 60}
!27 = !{!10, !13, i64 64}
!28 = !{!10, !13, i64 68}
!29 = !{!10, !11, i64 72}
!30 = !{!31, !31, i64 0}
!31 = !{!"any pointer", !7, i64 0}
!32 = !{!11, !11, i64 0}
!33 = distinct !{!33, !34}
!34 = !{!"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.ti::Runtime" = type <{ i32, [4 x i8], ptr, i8, [7 x i8] }>
%struct.S2WorldConfig = type { i32, i32, i32, i32, i32, %struct.S2Vec2, %struct.S2Vec2, float, %struct.S2Vec2, i32, i32, i32, float, float, float, i32 }
%struct.S2Vec2 = type { float, float }

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.ti::Runtime", align 8
  %2 = alloca %struct.S2WorldConfig, align 16
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %1) #7
  call void @_ZN2ti7RuntimeC2E6TiArchj(ptr noundef nonnull align 8 dereferenceable(17) %1, i32 noundef 1, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 76, ptr nonnull %2) #7
  %3 = getelementptr inbounds i8, ptr %2, i64 48
  store i32 0, ptr %3, align 16
  store <4 x i32> <i32 90000, i32 10000, i32 10000, i32 10000>, ptr %2, align 16, !tbaa !5
  %4 = getelementptr inbounds i8, ptr %2, i64 16
  store i32 128, ptr %4, align 16, !tbaa !9
  %5 = getelementptr inbounds i8, ptr %2, i64 20
  %6 = getelementptr inbounds i8, ptr %2, i64 36
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %5, i8 0, i64 16, i1 false)
  store <2 x float> <float 0x3F1A36E2E0000000, float 0.000000e+00>, ptr %6, align 4, !tbaa !14
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %2, i64 44
  store float 0xC0239999A0000000, ptr %.sroa.4.0..sroa_idx, align 4, !tbaa !14
  %7 = getelementptr inbounds i8, ptr %2, i64 52
  store i32 0, ptr %7, align 4, !tbaa !15
  %8 = getelementptr inbounds i8, ptr %2, i64 56
  store i32 0, ptr %8, align 8, !tbaa !16
  %9 = getelementptr inbounds i8, ptr %2, i64 60
  store <2 x float> <float 1.000000e+06, float 0x3FB99999A0000000>, ptr %9, align 4, !tbaa !14
  %10 = getelementptr inbounds i8, ptr %2, i64 68
  store float 0x3FB99999A0000000, ptr %10, align 4, !tbaa !17
  %11 = getelementptr inbounds i8, ptr %2, i64 72
  store i32 4, ptr %11, align 8, !tbaa !18
  %12 = call noundef ptr @_ZNK2ti7RuntimecvP11TiRuntime_tEv(ptr noundef nonnull align 8 dereferenceable(17) %1)
  %13 = invoke ptr @s2_create_world(i32 noundef 1, ptr noundef %12, ptr noundef nonnull %2)
          to label %.preheader unwind label %16

14:                                               ; preds = %18
  %15 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str)
          to label %22 unwind label %25

16:                                               ; preds = %0
  %17 = landingpad { ptr, i32 }
          cleanup
  br label %27

.preheader:                                       ; preds = %0, %18
  %.017 = phi i32 [ %19, %18 ], [ 0, %0 ]
  invoke void @s2_step(ptr noundef %13, float noundef 0x3F60624DE0000000)
          to label %18 unwind label %20

18:                                               ; preds = %.preheader
  %19 = add nuw nsw i32 %.017, 1
  %exitcond.not = icmp eq i32 %19, 100
  br i1 %exitcond.not, label %14, label %.preheader, !llvm.loop !19

20:                                               ; preds = %.preheader
  %21 = landingpad { ptr, i32 }
          cleanup
  br label %27

22:                                               ; preds = %14
  %23 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %24 unwind label %25

24:                                               ; preds = %22
  call void @llvm.lifetime.end.p0(i64 76, ptr nonnull %2) #7
  call void @_ZN2ti7RuntimeD2Ev(ptr noundef nonnull align 8 dereferenceable(17) %1) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %1) #7
  ret i32 0

25:                                               ; preds = %22, %14
  %26 = landingpad { ptr, i32 }
          cleanup
  br label %27

27:                                               ; preds = %20, %25, %16
  %.pn.pn = phi { ptr, i32 } [ %17, %16 ], [ %21, %20 ], [ %26, %25 ]
  call void @llvm.lifetime.end.p0(i64 76, ptr nonnull %2) #7
  call void @_ZN2ti7RuntimeD2Ev(ptr noundef nonnull align 8 dereferenceable(17) %1) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %1) #7
  resume { ptr, i32 } %.pn.pn
}

; 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 uwtable
declare dso_local void @_ZN2ti7RuntimeC2E6TiArchj(ptr noundef nonnull align 8 dereferenceable(17), i32 noundef, i32 noundef) unnamed_addr #2 align 2

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

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

declare ptr @s2_create_world(i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

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

declare i32 @__gxx_personality_v0(...)

declare void @s2_step(ptr noundef, float noundef) local_unnamed_addr #4

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN2ti7RuntimeD2Ev(ptr noundef nonnull align 8 dereferenceable(17)) unnamed_addr #5 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
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 = { 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 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, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 16}
!10 = !{!"_ZTS13S2WorldConfig", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !6, i64 16, !11, i64 20, !11, i64 28, !12, i64 36, !11, i64 40, !13, i64 48, !6, i64 52, !6, i64 56, !12, i64 60, !12, i64 64, !12, i64 68, !6, i64 72}
!11 = !{!"_ZTS6S2Vec2", !12, i64 0, !12, i64 4}
!12 = !{!"float", !7, i64 0}
!13 = !{!"_ZTS24S2OutWorldBoundaryPolicy", !7, i64 0}
!14 = !{!12, !12, i64 0}
!15 = !{!10, !6, i64 52}
!16 = !{!10, !6, i64 56}
!17 = !{!10, !12, i64 68}
!18 = !{!10, !6, i64 72}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: DSEPass,EarlyCSEPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,MemCpyOptPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass