; LLVM IR from tryingfly/nabo :: nabo_mujoco/main.ll (Z8keyboardP10GLFWwindowiiii)

; 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"

%"struct.Nabo::inputStruct" = type { i32, double, double, double, [3 x double], [3 x double], [3 x double], [3 x double], [3 x double], [12 x double], [12 x double], [12 x double] }
%"class.std::__cxx11::basic_stringstream" = type { %"class.std::basic_iostream.base", %"class.std::__cxx11::basic_stringbuf", %"class.std::basic_ios" }
%"class.std::basic_iostream.base" = type { %"class.std::basic_istream.base", %"class.std::basic_ostream.base" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"class.std::basic_ostream.base" = type { ptr }
%"class.std::__cxx11::basic_stringbuf" = type { %"class.std::basic_streambuf", i32, %"class.std::__cxx11::basic_string" }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.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::allocator" = type { i8 }

@in = external dso_local global %"struct.Nabo::inputStruct", align 8
@_Z3msgB5cxx11 = external dso_local global %"class.std::__cxx11::basic_stringstream", align 8
@m = external dso_local global ptr, align 8
@d = external dso_local global ptr, align 8
@.str = external hidden unnamed_addr constant [1 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [6 x i8], align 1

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z8keyboardP10GLFWwindowiiii(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4) #1 personality ptr @__gxx_personality_v0 {
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca %"class.std::__cxx11::basic_string", align 8
  %12 = alloca %"class.std::allocator", align 1
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store i32 %1, ptr %7, align 4, !tbaa !9
  store i32 %2, ptr %8, align 4, !tbaa !9
  store i32 %3, ptr %9, align 4, !tbaa !9
  store i32 %4, ptr %10, align 4, !tbaa !9
  %15 = load i32, ptr %9, align 4, !tbaa !9
  %16 = icmp eq i32 %15, 1
  br i1 %16, label %17, label %83

17:                                               ; preds = %5
  %18 = load i32, ptr %7, align 4, !tbaa !9
  switch i32 %18, label %43 [
    i32 259, label %19
    i32 32, label %24
    i32 87, label %25
    i32 83, label %28
    i32 65, label %31
    i32 68, label %34
    i32 74, label %37
    i32 76, label %40
  ]

19:                                               ; preds = %17
  %20 = load ptr, ptr @m, align 8, !tbaa !5
  %21 = load ptr, ptr @d, align 8, !tbaa !5
  call void @mj_resetData(ptr noundef %20, ptr noundef %21)
  %22 = load ptr, ptr @m, align 8, !tbaa !5
  %23 = load ptr, ptr @d, align 8, !tbaa !5
  call void @mj_forward(ptr noundef %22, ptr noundef %23)
  br label %24

24:                                               ; preds = %19, %17
  store double 0.000000e+00, ptr getelementptr inbounds (%"struct.Nabo::inputStruct", ptr @in, i32 0, i32 1), align 8, !tbaa !11
  store double 0.000000e+00, ptr getelementptr inbounds (%"struct.Nabo::inputStruct", ptr @in, i32 0, i32 2), align 8, !tbaa !14
  store double 0.000000e+00, ptr getelementptr inbounds (%"struct.Nabo::inputStruct", ptr @in, i32 0, i32 3), align 8, !tbaa !15
  br label %43

25:                                               ; preds = %17
  %26 = load double, ptr getelementptr inbounds (%"struct.Nabo::inputStruct", ptr @in, i32 0, i32 1), align 8, !tbaa !11
  %27 = fadd double %26, 1.000000e-01
  store double %27, ptr getelementptr inbounds (%"struct.Nabo::inputStruct", ptr @in, i32 0, i32 1), align 8, !tbaa !11
  br label %43

28:                                               ; preds = %17
  %29 = load double, ptr getelementptr inbounds (%"struct.Nabo::inputStruct", ptr @in, i32 0, i32 1), align 8, !tbaa !11
  %30 = fsub double %29, 1.000000e-01
  store double %30, ptr getelementptr inbounds (%"struct.Nabo::inputStruct", ptr @in, i32 0, i32 1), align 8, !tbaa !11
  br label %43

31:                                               ; preds = %17
  %32 = load double, ptr getelementptr inbounds (%"struct.Nabo::inputStruct", ptr @in, i32 0, i32 2), align 8, !tbaa !14
  %33 = fadd double %32, 1.000000e-01
  store double %33, ptr getelementptr inbounds (%"struct.Nabo::inputStruct", ptr @in, i32 0, i32 2), align 8, !tbaa !14
  br label %43

34:                                               ; preds = %17
  %35 = load double, ptr getelementptr inbounds (%"struct.Nabo::inputStruct", ptr @in, i32 0, i32 2), align 8, !tbaa !14
  %36 = fsub double %35, 1.000000e-01
  store double %36, ptr getelementptr inbounds (%"struct.Nabo::inputStruct", ptr @in, i32 0, i32 2), align 8, !tbaa !14
  br label %43

37:                                               ; preds = %17
  %38 = load double, ptr getelementptr inbounds (%"struct.Nabo::inputStruct", ptr @in, i32 0, i32 3), align 8, !tbaa !15
  %39 = fadd double %38, 1.000000e-01
  store double %39, ptr getelementptr inbounds (%"struct.Nabo::inputStruct", ptr @in, i32 0, i32 3), align 8, !tbaa !15
  br label %43

40:                                               ; preds = %17
  %41 = load double, ptr getelementptr inbounds (%"struct.Nabo::inputStruct", ptr @in, i32 0, i32 3), align 8, !tbaa !15
  %42 = fsub double %41, 1.000000e-01
  store double %42, ptr getelementptr inbounds (%"struct.Nabo::inputStruct", ptr @in, i32 0, i32 3), align 8, !tbaa !15
  br label %43

43:                                               ; preds = %40, %37, %34, %31, %28, %25, %24, %17
  %44 = load double, ptr getelementptr inbounds (%"struct.Nabo::inputStruct", ptr @in, i32 0, i32 1), align 8, !tbaa !11
  %45 = call noundef double @_ZSt3absd(double noundef %44)
  %46 = fcmp olt double %45, 1.000000e-04
  br i1 %46, label %47, label %48

47:                                               ; preds = %43
  store double 0.000000e+00, ptr getelementptr inbounds (%"struct.Nabo::inputStruct", ptr @in, i32 0, i32 1), align 8, !tbaa !11
  br label %48

48:                                               ; preds = %47, %43
  %49 = load double, ptr getelementptr inbounds (%"struct.Nabo::inputStruct", ptr @in, i32 0, i32 2), align 8, !tbaa !14
  %50 = call noundef double @_ZSt3absd(double noundef %49)
  %51 = fcmp olt double %50, 1.000000e-04
  br i1 %51, label %52, label %53

52:                                               ; preds = %48
  store double 0.000000e+00, ptr getelementptr inbounds (%"struct.Nabo::inputStruct", ptr @in, i32 0, i32 2), align 8, !tbaa !14
  br label %53

53:                                               ; preds = %52, %48
  %54 = load double, ptr getelementptr inbounds (%"struct.Nabo::inputStruct", ptr @in, i32 0, i32 3), align 8, !tbaa !15
  %55 = call noundef double @_ZSt3absd(double noundef %54)
  %56 = fcmp olt double %55, 1.000000e-04
  br i1 %56, label %57, label %58

57:                                               ; preds = %53
  store double 0.000000e+00, ptr getelementptr inbounds (%"struct.Nabo::inputStruct", ptr @in, i32 0, i32 3), align 8, !tbaa !15
  br label %58

58:                                               ; preds = %57, %53
  call void @_Z4clipRdd(ptr noundef nonnull align 8 dereferenceable(8) getelementptr inbounds (%"struct.Nabo::inputStruct", ptr @in, i32 0, i32 1), double noundef 5.000000e-01)
  call void @_Z4clipRdd(ptr noundef nonnull align 8 dereferenceable(8) getelementptr inbounds (%"struct.Nabo::inputStruct", ptr @in, i32 0, i32 2), double noundef 2.000000e-01)
  call void @_Z4clipRdd(ptr noundef nonnull align 8 dereferenceable(8) getelementptr inbounds (%"struct.Nabo::inputStruct", ptr @in, i32 0, i32 3), double noundef 5.000000e-01)
  %59 = load ptr, ptr @_Z3msgB5cxx11, align 8, !tbaa !16
  %60 = getelementptr i8, ptr %59, i64 -24
  %61 = load i64, ptr %60, align 8
  %62 = getelementptr inbounds i8, ptr @_Z3msgB5cxx11, i64 %61
  call void @_ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate(ptr noundef nonnull align 8 dereferenceable(264) %62, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef @.str, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %63 unwind label %74

63:                                               ; preds = %58
  invoke void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strERKNS_12basic_stringIcS2_S3_EE(ptr noundef nonnull align 8 dereferenceable(128) @_Z3msgB5cxx11, ptr noundef nonnull align 8 dereferenceable(32) %11)
          to label %64 unwind label %78

64:                                               ; preds = %63
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #6
  %65 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) getelementptr inbounds (i8, ptr @_Z3msgB5cxx11, i64 16), ptr noundef @.str.1)
  %66 = load double, ptr getelementptr inbounds (%"struct.Nabo::inputStruct", ptr @in, i32 0, i32 1), align 8, !tbaa !11
  %67 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %65, double noundef %66)
  %68 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %67, ptr noundef @.str.2)
  %69 = load double, ptr getelementptr inbounds (%"struct.Nabo::inputStruct", ptr @in, i32 0, i32 2), align 8, !tbaa !14
  %70 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %68, double noundef %69)
  %71 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %70, ptr noundef @.str.3)
  %72 = load double, ptr getelementptr inbounds (%"struct.Nabo::inputStruct", ptr @in, i32 0, i32 3), align 8, !tbaa !15
  %73 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %71, double noundef %72)
  br label %83

74:                                               ; preds = %58
  %75 = landingpad { ptr, i32 }
          cleanup
  %76 = extractvalue { ptr, i32 } %75, 0
  store ptr %76, ptr %13, align 8
  %77 = extractvalue { ptr, i32 } %75, 1
  store i32 %77, ptr %14, align 4
  br label %82

78:                                               ; preds = %63
  %79 = landingpad { ptr, i32 }
          cleanup
  %80 = extractvalue { ptr, i32 } %79, 0
  store ptr %80, ptr %13, align 8
  %81 = extractvalue { ptr, i32 } %79, 1
  store i32 %81, ptr %14, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #6
  br label %82

82:                                               ; preds = %78, %74
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #6
  br label %84

83:                                               ; preds = %64, %5
  ret void

84:                                               ; preds = %82
  %85 = load ptr, ptr %13, align 8
  %86 = load i32, ptr %14, align 4
  %87 = insertvalue { ptr, i32 } poison, ptr %85, 0
  %88 = insertvalue { ptr, i32 } %87, i32 %86, 1
  resume { ptr, i32 } %88
}

declare void @mj_resetData(ptr noundef, ptr noundef) #2

declare void @mj_forward(ptr noundef, ptr noundef) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt3absd(double noundef) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_Z4clipRdd(ptr noundef nonnull align 8 dereferenceable(8), double noundef) #3

declare void @_ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate(ptr noundef nonnull align 8 dereferenceable(264), i32 noundef) #2

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #4 align 2

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !13, i64 8}
!12 = !{!"_ZTSN4Nabo11inputStructE", !10, i64 0, !13, i64 8, !13, i64 16, !13, i64 24, !7, i64 32, !7, i64 56, !7, i64 80, !7, i64 104, !7, i64 128, !7, i64 152, !7, i64 248, !7, i64 344}
!13 = !{!"double", !7, i64 0}
!14 = !{!12, !13, i64 16}
!15 = !{!12, !13, i64 24}
!16 = !{!17, !17, i64 0}
!17 = !{!"vtable pointer", !8, i64 0}


; 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"

%"struct.Nabo::inputStruct" = type { i32, double, double, double, [3 x double], [3 x double], [3 x double], [3 x double], [3 x double], [12 x double], [12 x double], [12 x double] }
%"class.std::__cxx11::basic_stringstream" = type { %"class.std::basic_iostream.base", %"class.std::__cxx11::basic_stringbuf", %"class.std::basic_ios" }
%"class.std::basic_iostream.base" = type { %"class.std::basic_istream.base", %"class.std::basic_ostream.base" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"class.std::basic_ostream.base" = type { ptr }
%"class.std::__cxx11::basic_stringbuf" = type { %"class.std::basic_streambuf", i32, %"class.std::__cxx11::basic_string" }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.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::allocator" = type { i8 }

@in = external dso_local global %"struct.Nabo::inputStruct", align 8
@_Z3msgB5cxx11 = external dso_local global %"class.std::__cxx11::basic_stringstream", align 8
@m = external dso_local local_unnamed_addr global ptr, align 8
@d = external dso_local local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [1 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [6 x i8], align 1

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z8keyboardP10GLFWwindowiiii(ptr nocapture noundef readnone %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4) local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca %"class.std::allocator", align 1
  %8 = icmp eq i32 %3, 1
  br i1 %8, label %9, label %70

9:                                                ; preds = %5
  switch i32 %1, label %34 [
    i32 259, label %10
    i32 32, label %15
    i32 87, label %16
    i32 83, label %19
    i32 65, label %22
    i32 68, label %25
    i32 74, label %28
    i32 76, label %31
  ]

10:                                               ; preds = %9
  %11 = load ptr, ptr @m, align 8, !tbaa !5
  %12 = load ptr, ptr @d, align 8, !tbaa !5
  tail call void @mj_resetData(ptr noundef %11, ptr noundef %12)
  %13 = load ptr, ptr @m, align 8, !tbaa !5
  %14 = load ptr, ptr @d, align 8, !tbaa !5
  tail call void @mj_forward(ptr noundef %13, ptr noundef %14)
  br label %15

15:                                               ; preds = %10, %9
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) getelementptr inbounds (i8, ptr @in, i64 8), i8 0, i64 24, i1 false)
  br label %34

16:                                               ; preds = %9
  %17 = load double, ptr getelementptr inbounds (i8, ptr @in, i64 8), align 8, !tbaa !9
  %18 = fadd double %17, 1.000000e-01
  store double %18, ptr getelementptr inbounds (i8, ptr @in, i64 8), align 8, !tbaa !9
  br label %34

19:                                               ; preds = %9
  %20 = load double, ptr getelementptr inbounds (i8, ptr @in, i64 8), align 8, !tbaa !9
  %21 = fadd double %20, -1.000000e-01
  store double %21, ptr getelementptr inbounds (i8, ptr @in, i64 8), align 8, !tbaa !9
  br label %34

22:                                               ; preds = %9
  %23 = load double, ptr getelementptr inbounds (i8, ptr @in, i64 16), align 8, !tbaa !13
  %24 = fadd double %23, 1.000000e-01
  store double %24, ptr getelementptr inbounds (i8, ptr @in, i64 16), align 8, !tbaa !13
  br label %34

25:                                               ; preds = %9
  %26 = load double, ptr getelementptr inbounds (i8, ptr @in, i64 16), align 8, !tbaa !13
  %27 = fadd double %26, -1.000000e-01
  store double %27, ptr getelementptr inbounds (i8, ptr @in, i64 16), align 8, !tbaa !13
  br label %34

28:                                               ; preds = %9
  %29 = load double, ptr getelementptr inbounds (i8, ptr @in, i64 24), align 8, !tbaa !14
  %30 = fadd double %29, 1.000000e-01
  store double %30, ptr getelementptr inbounds (i8, ptr @in, i64 24), align 8, !tbaa !14
  br label %34

31:                                               ; preds = %9
  %32 = load double, ptr getelementptr inbounds (i8, ptr @in, i64 24), align 8, !tbaa !14
  %33 = fadd double %32, -1.000000e-01
  store double %33, ptr getelementptr inbounds (i8, ptr @in, i64 24), align 8, !tbaa !14
  br label %34

34:                                               ; preds = %31, %28, %25, %22, %19, %16, %15, %9
  %35 = load double, ptr getelementptr inbounds (i8, ptr @in, i64 8), align 8, !tbaa !9
  %36 = tail call noundef double @_ZSt3absd(double noundef %35)
  %37 = fcmp olt double %36, 1.000000e-04
  br i1 %37, label %38, label %39

38:                                               ; preds = %34
  store double 0.000000e+00, ptr getelementptr inbounds (i8, ptr @in, i64 8), align 8, !tbaa !9
  br label %39

39:                                               ; preds = %38, %34
  %40 = load double, ptr getelementptr inbounds (i8, ptr @in, i64 16), align 8, !tbaa !13
  %41 = tail call noundef double @_ZSt3absd(double noundef %40)
  %42 = fcmp olt double %41, 1.000000e-04
  br i1 %42, label %43, label %44

43:                                               ; preds = %39
  store double 0.000000e+00, ptr getelementptr inbounds (i8, ptr @in, i64 16), align 8, !tbaa !13
  br label %44

44:                                               ; preds = %43, %39
  %45 = load double, ptr getelementptr inbounds (i8, ptr @in, i64 24), align 8, !tbaa !14
  %46 = tail call noundef double @_ZSt3absd(double noundef %45)
  %47 = fcmp olt double %46, 1.000000e-04
  br i1 %47, label %48, label %49

48:                                               ; preds = %44
  store double 0.000000e+00, ptr getelementptr inbounds (i8, ptr @in, i64 24), align 8, !tbaa !14
  br label %49

49:                                               ; preds = %48, %44
  tail call void @_Z4clipRdd(ptr noundef nonnull align 8 dereferenceable(8) getelementptr inbounds (i8, ptr @in, i64 8), double noundef 5.000000e-01)
  tail call void @_Z4clipRdd(ptr noundef nonnull align 8 dereferenceable(8) getelementptr inbounds (i8, ptr @in, i64 16), double noundef 2.000000e-01)
  tail call void @_Z4clipRdd(ptr noundef nonnull align 8 dereferenceable(8) getelementptr inbounds (i8, ptr @in, i64 24), double noundef 5.000000e-01)
  %50 = load ptr, ptr @_Z3msgB5cxx11, align 8, !tbaa !15
  %51 = getelementptr i8, ptr %50, i64 -24
  %52 = load i64, ptr %51, align 8
  %53 = getelementptr inbounds i8, ptr @_Z3msgB5cxx11, i64 %52
  tail call void @_ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate(ptr noundef nonnull align 8 dereferenceable(264) %53, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull @.str, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %54 unwind label %65

54:                                               ; preds = %49
  invoke void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strERKNS_12basic_stringIcS2_S3_EE(ptr noundef nonnull align 8 dereferenceable(128) @_Z3msgB5cxx11, ptr noundef nonnull align 8 dereferenceable(32) %6)
          to label %55 unwind label %67

55:                                               ; preds = %54
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #7
  %56 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) getelementptr inbounds (i8, ptr @_Z3msgB5cxx11, i64 16), ptr noundef nonnull @.str.1)
  %57 = load double, ptr getelementptr inbounds (i8, ptr @in, i64 8), align 8, !tbaa !9
  %58 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %56, double noundef %57)
  %59 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %58, ptr noundef nonnull @.str.2)
  %60 = load double, ptr getelementptr inbounds (i8, ptr @in, i64 16), align 8, !tbaa !13
  %61 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %59, double noundef %60)
  %62 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %61, ptr noundef nonnull @.str.3)
  %63 = load double, ptr getelementptr inbounds (i8, ptr @in, i64 24), align 8, !tbaa !14
  %64 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %62, double noundef %63)
  br label %70

65:                                               ; preds = %49
  %66 = landingpad { ptr, i32 }
          cleanup
  br label %69

67:                                               ; preds = %54
  %68 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #7
  br label %69

69:                                               ; preds = %67, %65
  %.pn = phi { ptr, i32 } [ %68, %67 ], [ %66, %65 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #7
  resume { ptr, i32 } %.pn

70:                                               ; preds = %55, %5
  ret void
}

declare void @mj_resetData(ptr noundef, ptr noundef) local_unnamed_addr #2

declare void @mj_forward(ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt3absd(double noundef) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_Z4clipRdd(ptr noundef nonnull align 8 dereferenceable(8), double noundef) local_unnamed_addr #3

declare void @_ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate(ptr noundef nonnull align 8 dereferenceable(264), i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strERKNS_12basic_stringIcS2_S3_EE(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1 align 2

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #4 align 2

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "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 = { 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 #4 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint mustprogress 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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !12, i64 8}
!10 = !{!"_ZTSN4Nabo11inputStructE", !11, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !7, i64 32, !7, i64 56, !7, i64 80, !7, i64 104, !7, i64 128, !7, i64 152, !7, i64 248, !7, i64 344}
!11 = !{!"int", !7, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!10, !12, i64 16}
!14 = !{!10, !12, i64 24}
!15 = !{!16, !16, i64 0}
!16 = !{!"vtable pointer", !8, i64 0}


; Effective O3 passes: GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,MemCpyOptPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass