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

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

%"class.std::__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 }
%struct.mjvCamera_ = type { i32, i32, i32, [3 x double], double, double, double }
%struct.mjvOption_ = type { i32, i32, [6 x i8], [6 x i8], [6 x i8], [6 x i8], [6 x i8], [6 x i8], [6 x i8], [32 x i8], i32, i32 }
%struct.mjvScene_ = type { i32, i32, ptr, ptr, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i8, i8, i8, i8, i32, ptr, ptr, ptr, ptr, ptr, i32, [100 x %struct.mjvLight_], [2 x %struct.mjvGLCamera_], i8, [3 x float], [4 x float], float, i32, [10 x i8], i32, [3 x float] }
%struct.mjvLight_ = type { [3 x float], [3 x float], [3 x float], float, float, [3 x float], [3 x float], [3 x float], i8, i8, i8 }
%struct.mjvGLCamera_ = type { [3 x float], [3 x float], [3 x float], float, float, float, float, float, float }
%struct.mjrContext_ = type { float, float, float, float, float, [4 x float], i32, i32, i32, i32, i32, [10 x i32], [10 x i32], [10 x i32], i32, i32, i32, i32, i32, i32, i32, i32, [10 x i32], [10 x i32], [10 x i32], [10 x i32], i32, [100 x i32], [100 x i32], i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, [127 x i32], [127 x i32], i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
%struct.mjrRect_ = type { i32, i32, i32, i32 }
%"class.std::chrono::duration" = type { i64 }
%struct.mjModel_ = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i64, i64, %struct.mjOption_, %struct.mjVisual_, %struct.mjStatistic_, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.mjOption_ = type { double, double, double, double, double, double, double, [3 x double], [3 x double], [3 x double], double, double, double, [2 x double], [5 x double], [5 x double], i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
%struct.mjVisual_ = type { %struct.anon, %struct.anon.0, %struct.anon.1, %struct.anon.2, %struct.anon.3, %struct.anon.4 }
%struct.anon = type { float, float, float, float, float, float, float, i32, i32, i32 }
%struct.anon.0 = type { i32, i32, i32, i32, i32 }
%struct.anon.1 = type { [3 x float], [3 x float], [3 x float], i32 }
%struct.anon.2 = type { float, float, float, float, float, float, float, float, float, float, float, float, float }
%struct.anon.3 = type { float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float }
%struct.anon.4 = type { [4 x float], [4 x float], [4 x float], [4 x float], [4 x float], [4 x float], [4 x float], [4 x float], [4 x float], [4 x float], [4 x float], [4 x float], [4 x float], [4 x float], [4 x float], [4 x float], [4 x float], [4 x float], [4 x float], [4 x float], [4 x float], [4 x float], [4 x float] }
%struct.mjStatistic_ = type { double, double, double, double, [3 x double] }
%struct.mjData_ = type { i64, i64, i32, i64, i64, i64, i64, [128 x i64], i64, i32, i32, [8 x %struct.mjWarningStat_], [16 x %struct.mjTimerStat_], [4000 x %struct.mjSolverStat_], i32, [20 x i32], [20 x i32], [2 x double], i32, i32, i32, i32, i32, i32, i32, double, [2 x double], ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i64 }
%struct.mjWarningStat_ = type { i32, i32 }
%struct.mjTimerStat_ = type { double, i32 }
%struct.mjSolverStat_ = type { double, double, double, i32, i32, i32, i32 }

@sleepMs = external dso_local global i32, align 4
@dt = external dso_local global double, align 8
@floatBaseFlag = external dso_local global i8, align 1
@slowRanderFlag = external dso_local global i8, align 1
@_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
@cam = external dso_local global %struct.mjvCamera_, align 8
@opt = external dso_local global %struct.mjvOption_, align 4
@scn = external dso_local global %struct.mjvScene_, align 8
@con = external dso_local global %struct.mjrContext_, align 8
@window = external dso_local global ptr, align 8
@__const.main.errorMsg = external hidden unnamed_addr constant [64 x i8], align 16
@.str.4 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [37 x i8], align 1
@__const.main.rect = external hidden unnamed_addr constant %struct.mjrRect_, align 4

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z7runCtrlR7mjData_(ptr noundef nonnull align 8 dereferenceable(162728)) #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 nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z8keyboardP10GLFWwindowiiii(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #0

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 #2 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) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z12mouse_buttonP10GLFWwindowiii(ptr noundef, i32 noundef, i32 noundef, i32 noundef) #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z10mouse_moveP10GLFWwindowdd(ptr noundef, double noundef, double noundef) #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z6scrollP10GLFWwindowdd(ptr noundef, double noundef, double noundef) #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr noundef %1) #4 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca [64 x i8], align 16
  %7 = alloca double, align 8
  %8 = alloca %"class.std::chrono::duration", align 8
  %9 = alloca %struct.mjrRect_, align 4
  %10 = alloca %struct.mjrRect_, align 4
  %11 = alloca %struct.mjrRect_, align 4
  %12 = alloca %struct.mjrRect_, align 4
  %13 = alloca %"class.std::__cxx11::basic_string", align 8
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 64, ptr %6) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %6, ptr align 16 @__const.main.errorMsg, i64 64, i1 false)
  %16 = getelementptr inbounds [64 x i8], ptr %6, i64 0, i64 0
  %17 = call ptr @mj_loadXML(ptr noundef @.str.4, ptr noundef null, ptr noundef %16, i32 noundef 64)
  store ptr %17, ptr @m, align 8, !tbaa !9
  %18 = load ptr, ptr @m, align 8, !tbaa !9
  %19 = call ptr @mj_makeData(ptr noundef %18)
  store ptr %19, ptr @d, align 8, !tbaa !9
  %20 = call i32 @glfwInit()
  %21 = icmp ne i32 %20, 0
  br i1 %21, label %23, label %22

22:                                               ; preds = %2
  call void (ptr, ...) @mju_error(ptr noundef @.str.5)
  br label %23

23:                                               ; preds = %22, %2
  %24 = call ptr @glfwCreateWindow(i32 noundef 1200, i32 noundef 800, ptr noundef @.str.6, ptr noundef null, ptr noundef null)
  store ptr %24, ptr @window, align 8, !tbaa !9
  %25 = load ptr, ptr @window, align 8, !tbaa !9
  call void @glfwMakeContextCurrent(ptr noundef %25)
  call void @glfwSwapInterval(i32 noundef 1)
  call void @mjv_defaultCamera(ptr noundef @cam)
  store double 5.000000e-01, ptr getelementptr inbounds ([3 x double], ptr getelementptr inbounds (%struct.mjvCamera_, ptr @cam, i32 0, i32 3), i64 0, i64 2), align 8, !tbaa !11
  store double 6.000000e+01, ptr getelementptr inbounds (%struct.mjvCamera_, ptr @cam, i32 0, i32 5), align 8, !tbaa !13
  store double 0.000000e+00, ptr getelementptr inbounds (%struct.mjvCamera_, ptr @cam, i32 0, i32 6), align 8, !tbaa !15
  store double 3.000000e+00, ptr getelementptr inbounds (%struct.mjvCamera_, ptr @cam, i32 0, i32 4), align 8, !tbaa !16
  call void @mjv_defaultOption(ptr noundef @opt)
  call void @mjv_defaultScene(ptr noundef @scn)
  call void @mjr_defaultContext(ptr noundef @con)
  %26 = load ptr, ptr @m, align 8, !tbaa !9
  call void @mjv_makeScene(ptr noundef %26, ptr noundef @scn, i32 noundef 2000)
  %27 = load ptr, ptr @m, align 8, !tbaa !9
  call void @mjr_makeContext(ptr noundef %27, ptr noundef @con, i32 noundef 100)
  %28 = load ptr, ptr @window, align 8, !tbaa !9
  %29 = call ptr @glfwSetKeyCallback(ptr noundef %28, ptr noundef @_Z8keyboardP10GLFWwindowiiii)
  %30 = load ptr, ptr @window, align 8, !tbaa !9
  %31 = call ptr @glfwSetCursorPosCallback(ptr noundef %30, ptr noundef @_Z10mouse_moveP10GLFWwindowdd)
  %32 = load ptr, ptr @window, align 8, !tbaa !9
  %33 = call ptr @glfwSetMouseButtonCallback(ptr noundef %32, ptr noundef @_Z12mouse_buttonP10GLFWwindowiii)
  %34 = load ptr, ptr @window, align 8, !tbaa !9
  %35 = call ptr @glfwSetScrollCallback(ptr noundef %34, ptr noundef @_Z6scrollP10GLFWwindowdd)
  %36 = load ptr, ptr @m, align 8, !tbaa !9
  %37 = getelementptr inbounds %struct.mjModel_, ptr %36, i32 0, i32 77
  %38 = getelementptr inbounds %struct.mjOption_, ptr %37, i32 0, i32 0
  %39 = load double, ptr %38, align 8, !tbaa !17
  store double %39, ptr @dt, align 8, !tbaa !11
  %40 = load double, ptr @dt, align 8, !tbaa !11
  call void @setDt(double noundef %40)
  %41 = load ptr, ptr @m, align 8, !tbaa !9
  %42 = getelementptr inbounds %struct.mjModel_, ptr %41, i32 0, i32 0
  %43 = load i32, ptr %42, align 8, !tbaa !30
  %44 = icmp sgt i32 %43, 12
  br i1 %44, label %45, label %46

45:                                               ; preds = %23
  store i8 1, ptr @floatBaseFlag, align 1, !tbaa !31
  br label %46

46:                                               ; preds = %45, %23
  %47 = 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.7)
  br label %48

48:                                               ; preds = %87, %46
  %49 = load ptr, ptr @window, align 8, !tbaa !9
  %50 = call i32 @glfwWindowShouldClose(ptr noundef %49)
  %51 = icmp ne i32 %50, 0
  %52 = xor i1 %51, true
  br i1 %52, label %53, label %93

53:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #8
  %54 = load ptr, ptr @d, align 8, !tbaa !9
  %55 = getelementptr inbounds %struct.mjData_, ptr %54, i32 0, i32 25
  %56 = load double, ptr %55, align 8, !tbaa !33
  store double %56, ptr %7, align 8, !tbaa !11
  br label %57

57:                                               ; preds = %64, %53
  %58 = load ptr, ptr @d, align 8, !tbaa !9
  %59 = getelementptr inbounds %struct.mjData_, ptr %58, i32 0, i32 25
  %60 = load double, ptr %59, align 8, !tbaa !33
  %61 = load double, ptr %7, align 8, !tbaa !11
  %62 = fsub double %60, %61
  %63 = fcmp olt double %62, 0x3FA1111111111111
  br i1 %63, label %64, label %68

64:                                               ; preds = %57
  %65 = load ptr, ptr @d, align 8, !tbaa !9
  call void @_Z7runCtrlR7mjData_(ptr noundef nonnull align 8 dereferenceable(162728) %65)
  %66 = load ptr, ptr @m, align 8, !tbaa !9
  %67 = load ptr, ptr @d, align 8, !tbaa !9
  call void @mj_step(ptr noundef %66, ptr noundef %67)
  br label %57, !llvm.loop !35

68:                                               ; preds = %57
  %69 = load i8, ptr @slowRanderFlag, align 1, !tbaa !31, !range !37, !noundef !38
  %70 = trunc i8 %69 to i1
  br i1 %70, label %71, label %72

71:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #8
  call void @_ZNSt6chrono8durationIlSt5ratioILl1ELl1000EEEC2IivEERKT_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 4 dereferenceable(4) @sleepMs)
  call void @_ZNSt11this_thread9sleep_forIlSt5ratioILl1ELl1000EEEEvRKNSt6chrono8durationIT_T0_EE(ptr noundef nonnull align 8 dereferenceable(8) %8)
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  br label %72

72:                                               ; preds = %71, %68
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #8
  call void @llvm.memset.p0.i64(ptr align 4 %9, i8 0, i64 16, i1 false)
  %73 = load ptr, ptr @window, align 8, !tbaa !9
  %74 = getelementptr inbounds %struct.mjrRect_, ptr %9, i32 0, i32 2
  %75 = getelementptr inbounds %struct.mjrRect_, ptr %9, i32 0, i32 3
  call void @glfwGetFramebufferSize(ptr noundef %73, ptr noundef %74, ptr noundef %75)
  %76 = load ptr, ptr @m, align 8, !tbaa !9
  %77 = load ptr, ptr @d, align 8, !tbaa !9
  call void @mjv_updateScene(ptr noundef %76, ptr noundef %77, ptr noundef @opt, ptr noundef null, ptr noundef @cam, i32 noundef 7, ptr noundef @scn)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %10, ptr align 4 %9, i64 16, i1 false), !tbaa.struct !39
  %78 = getelementptr inbounds { i64, i64 }, ptr %10, i32 0, i32 0
  %79 = load i64, ptr %78, align 4
  %80 = getelementptr inbounds { i64, i64 }, ptr %10, i32 0, i32 1
  %81 = load i64, ptr %80, align 4
  call void @mjr_render(i64 %79, i64 %81, ptr noundef @scn, ptr noundef @con)
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %11, ptr align 4 @__const.main.rect, i64 16, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %12, ptr align 4 %11, i64 16, i1 false), !tbaa.struct !39
  call void @llvm.lifetime.start.p0(i64 32, ptr %13) #8
  call void @_ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %13, ptr noundef nonnull align 8 dereferenceable(128) @_Z3msgB5cxx11)
  %82 = call noundef ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4dataEv(ptr noundef nonnull align 8 dereferenceable(32) %13) #8
  %83 = getelementptr inbounds { i64, i64 }, ptr %12, i32 0, i32 0
  %84 = load i64, ptr %83, align 4
  %85 = getelementptr inbounds { i64, i64 }, ptr %12, i32 0, i32 1
  %86 = load i64, ptr %85, align 4
  invoke void @mjr_overlay(i32 noundef 0, i32 noundef 2, i64 %84, i64 %86, ptr noundef %82, ptr noundef null, ptr noundef @con)
          to label %87 unwind label %89

87:                                               ; preds = %72
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #8
  %88 = load ptr, ptr @window, align 8, !tbaa !9
  call void @glfwSwapBuffers(ptr noundef %88)
  call void @glfwPollEvents()
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  br label %48, !llvm.loop !40

89:                                               ; preds = %72
  %90 = landingpad { ptr, i32 }
          cleanup
  %91 = extractvalue { ptr, i32 } %90, 0
  store ptr %91, ptr %14, align 8
  %92 = extractvalue { ptr, i32 } %90, 1
  store i32 %92, ptr %15, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 64, ptr %6) #8
  br label %96

93:                                               ; preds = %48
  call void @mjv_freeScene(ptr noundef @scn)
  call void @mjr_freeContext(ptr noundef @con)
  %94 = load ptr, ptr @d, align 8, !tbaa !9
  call void @mj_deleteData(ptr noundef %94)
  %95 = load ptr, ptr @m, align 8, !tbaa !9
  call void @mj_deleteModel(ptr noundef %95)
  call void @llvm.lifetime.end.p0(i64 64, ptr %6) #8
  ret i32 0

96:                                               ; preds = %89
  %97 = load ptr, ptr %14, align 8
  %98 = load i32, ptr %15, align 4
  %99 = insertvalue { ptr, i32 } poison, ptr %97, 0
  %100 = insertvalue { ptr, i32 } %99, i32 %98, 1
  resume { ptr, i32 } %100
}

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

declare ptr @mj_loadXML(ptr noundef, ptr noundef, ptr noundef, i32 noundef) #6

declare ptr @mj_makeData(ptr noundef) #6

declare i32 @glfwInit() #6

declare void @mju_error(ptr noundef, ...) #6

declare ptr @glfwCreateWindow(i32 noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) #6

declare void @glfwMakeContextCurrent(ptr noundef) #6

declare void @glfwSwapInterval(i32 noundef) #6

declare void @mjv_defaultCamera(ptr noundef) #6

declare void @mjv_defaultOption(ptr noundef) #6

declare void @mjv_defaultScene(ptr noundef) #6

declare void @mjr_defaultContext(ptr noundef) #6

declare void @mjv_makeScene(ptr noundef, ptr noundef, i32 noundef) #6

declare void @mjr_makeContext(ptr noundef, ptr noundef, i32 noundef) #6

declare ptr @glfwSetKeyCallback(ptr noundef, ptr noundef) #6

declare ptr @glfwSetCursorPosCallback(ptr noundef, ptr noundef) #6

declare ptr @glfwSetMouseButtonCallback(ptr noundef, ptr noundef) #6

declare ptr @glfwSetScrollCallback(ptr noundef, ptr noundef) #6

declare void @setDt(double noundef) #6

declare i32 @glfwWindowShouldClose(ptr noundef) #6

declare void @mj_step(ptr noundef, ptr noundef) #6

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6chrono8durationIlSt5ratioILl1ELl1000EEEC2IivEERKT_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) 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) #7

declare void @glfwGetFramebufferSize(ptr noundef, ptr noundef, ptr noundef) #6

declare void @mjv_updateScene(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef) #6

declare void @mjr_render(i64, i64, ptr noundef, ptr noundef) #6

declare void @mjr_overlay(i32 noundef, i32 noundef, i64, i64, ptr noundef, ptr noundef, ptr noundef) #6

; Function Attrs: mustprogress uwtable
declare void @_ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(128)) #0 align 2

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

declare void @glfwSwapBuffers(ptr noundef) #6

declare void @glfwPollEvents() #6

declare void @mjv_freeScene(ptr noundef) #6

declare void @mjr_freeContext(ptr noundef) #6

declare void @mj_deleteData(ptr noundef) #6

declare void @mj_deleteModel(ptr noundef) #6

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 = { 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 #4 = { 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 #5 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { "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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!14, !12, i64 48}
!14 = !{!"_ZTS10mjvCamera_", !6, i64 0, !6, i64 4, !6, i64 8, !7, i64 16, !12, i64 40, !12, i64 48, !12, i64 56}
!15 = !{!14, !12, i64 56}
!16 = !{!14, !12, i64 40}
!17 = !{!18, !12, i64 320}
!18 = !{!"_ZTS8mjModel_", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !6, i64 24, !6, i64 28, !6, i64 32, !6, i64 36, !6, i64 40, !6, i64 44, !6, i64 48, !6, i64 52, !6, i64 56, !6, i64 60, !6, i64 64, !6, i64 68, !6, i64 72, !6, i64 76, !6, i64 80, !6, i64 84, !6, i64 88, !6, i64 92, !6, i64 96, !6, i64 100, !6, i64 104, !6, i64 108, !6, i64 112, !6, i64 116, !6, i64 120, !6, i64 124, !6, i64 128, !6, i64 132, !6, i64 136, !6, i64 140, !6, i64 144, !6, i64 148, !6, i64 152, !6, i64 156, !6, i64 160, !6, i64 164, !6, i64 168, !6, i64 172, !6, i64 176, !6, i64 180, !6, i64 184, !6, i64 188, !6, i64 192, !6, i64 196, !6, i64 200, !6, i64 204, !6, i64 208, !6, i64 212, !6, i64 216, !6, i64 220, !6, i64 224, !6, i64 228, !6, i64 232, !6, i64 236, !6, i64 240, !6, i64 244, !6, i64 248, !6, i64 252, !6, i64 256, !6, i64 260, !6, i64 264, !6, i64 268, !6, i64 272, !6, i64 276, !6, i64 280, !6, i64 284, !6, i64 288, !6, i64 292, !6, i64 296, !19, i64 304, !19, i64 312, !20, i64 320, !21, i64 624, !29, i64 1216, !10, i64 1272, !10, i64 1280, !10, i64 1288, !10, i64 1296, !10, i64 1304, !10, i64 1312, !10, i64 1320, !10, i64 1328, !10, i64 1336, !10, i64 1344, !10, i64 1352, !10, i64 1360, !10, i64 1368, !10, i64 1376, !10, i64 1384, !10, i64 1392, !10, i64 1400, !10, i64 1408, !10, i64 1416, !10, i64 1424, !10, i64 1432, !10, i64 1440, !10, i64 1448, !10, i64 1456, !10, i64 1464, !10, i64 1472, !10, i64 1480, !10, i64 1488, !10, i64 1496, !10, i64 1504, !10, i64 1512, !10, i64 1520, !10, i64 1528, !10, i64 1536, !10, i64 1544, !10, i64 1552, !10, i64 1560, !10, i64 1568, !10, i64 1576, !10, i64 1584, !10, i64 1592, !10, i64 1600, !10, i64 1608, !10, i64 1616, !10, i64 1624, !10, i64 1632, !10, i64 1640, !10, i64 1648, !10, i64 1656, !10, i64 1664, !10, i64 1672, !10, i64 1680, !10, i64 1688, !10, i64 1696, !10, i64 1704, !10, i64 1712, !10, i64 1720, !10, i64 1728, !10, i64 1736, !10, i64 1744, !10, i64 1752, !10, i64 1760, !10, i64 1768, !10, i64 1776, !10, i64 1784, !10, i64 1792, !10, i64 1800, !10, i64 1808, !10, i64 1816, !10, i64 1824, !10, i64 1832, !10, i64 1840, !10, i64 1848, !10, i64 1856, !10, i64 1864, !10, i64 1872, !10, i64 1880, !10, i64 1888, !10, i64 1896, !10, i64 1904, !10, i64 1912, !10, i64 1920, !10, i64 1928, !10, i64 1936, !10, i64 1944, !10, i64 1952, !10, i64 1960, !10, i64 1968, !10, i64 1976, !10, i64 1984, !10, i64 1992, !10, i64 2000, !10, i64 2008, !10, i64 2016, !10, i64 2024, !10, i64 2032, !10, i64 2040, !10, i64 2048, !10, i64 2056, !10, i64 2064, !10, i64 2072, !10, i64 2080, !10, i64 2088, !10, i64 2096, !10, i64 2104, !10, i64 2112, !10, i64 2120, !10, i64 2128, !10, i64 2136, !10, i64 2144, !10, i64 2152, !10, i64 2160, !10, i64 2168, !10, i64 2176, !10, i64 2184, !10, i64 2192, !10, i64 2200, !10, i64 2208, !10, i64 2216, !10, i64 2224, !10, i64 2232, !10, i64 2240, !10, i64 2248, !10, i64 2256, !10, i64 2264, !10, i64 2272, !10, i64 2280, !10, i64 2288, !10, i64 2296, !10, i64 2304, !10, i64 2312, !10, i64 2320, !10, i64 2328, !10, i64 2336, !10, i64 2344, !10, i64 2352, !10, i64 2360, !10, i64 2368, !10, i64 2376, !10, i64 2384, !10, i64 2392, !10, i64 2400, !10, i64 2408, !10, i64 2416, !10, i64 2424, !10, i64 2432, !10, i64 2440, !10, i64 2448, !10, i64 2456, !10, i64 2464, !10, i64 2472, !10, i64 2480, !10, i64 2488, !10, i64 2496, !10, i64 2504, !10, i64 2512, !10, i64 2520, !10, i64 2528, !10, i64 2536, !10, i64 2544, !10, i64 2552, !10, i64 2560, !10, i64 2568, !10, i64 2576, !10, i64 2584, !10, i64 2592, !10, i64 2600, !10, i64 2608, !10, i64 2616, !10, i64 2624, !10, i64 2632, !10, i64 2640, !10, i64 2648, !10, i64 2656, !10, i64 2664, !10, i64 2672, !10, i64 2680, !10, i64 2688, !10, i64 2696, !10, i64 2704, !10, i64 2712, !10, i64 2720, !10, i64 2728, !10, i64 2736, !10, i64 2744, !10, i64 2752, !10, i64 2760, !10, i64 2768, !10, i64 2776, !10, i64 2784, !10, i64 2792, !10, i64 2800, !10, i64 2808, !10, i64 2816, !10, i64 2824, !10, i64 2832, !10, i64 2840, !10, i64 2848, !10, i64 2856, !10, i64 2864, !10, i64 2872, !10, i64 2880, !10, i64 2888, !10, i64 2896, !10, i64 2904, !10, i64 2912, !10, i64 2920, !10, i64 2928, !10, i64 2936, !10, i64 2944, !10, i64 2952, !10, i64 2960, !10, i64 2968, !10, i64 2976, !10, i64 2984, !10, i64 2992, !10, i64 3000, !10, i64 3008, !10, i64 3016, !10, i64 3024, !10, i64 3032, !10, i64 3040, !10, i64 3048, !10, i64 3056, !10, i64 3064, !10, i64 3072, !10, i64 3080, !10, i64 3088, !10, i64 3096, !10, i64 3104, !10, i64 3112, !10, i64 3120, !10, i64 3128, !10, i64 3136, !10, i64 3144, !10, i64 3152, !10, i64 3160, !10, i64 3168, !10, i64 3176, !10, i64 3184, !10, i64 3192, !10, i64 3200, !10, i64 3208, !10, i64 3216, !10, i64 3224, !10, i64 3232, !10, i64 3240, !10, i64 3248, !10, i64 3256, !10, i64 3264, !10, i64 3272, !10, i64 3280, !10, i64 3288, !10, i64 3296, !10, i64 3304, !10, i64 3312, !10, i64 3320, !10, i64 3328, !10, i64 3336, !10, i64 3344, !10, i64 3352, !10, i64 3360, !10, i64 3368, !10, i64 3376, !10, i64 3384, !10, i64 3392, !10, i64 3400, !10, i64 3408, !10, i64 3416, !10, i64 3424, !10, i64 3432, !10, i64 3440, !10, i64 3448, !10, i64 3456, !10, i64 3464, !10, i64 3472, !10, i64 3480, !10, i64 3488, !10, i64 3496, !10, i64 3504, !10, i64 3512, !10, i64 3520, !10, i64 3528, !10, i64 3536, !10, i64 3544, !10, i64 3552, !10, i64 3560, !10, i64 3568, !10, i64 3576, !10, i64 3584, !10, i64 3592, !10, i64 3600, !10, i64 3608, !10, i64 3616, !10, i64 3624, !10, i64 3632, !10, i64 3640, !10, i64 3648, !10, i64 3656, !10, i64 3664, !10, i64 3672, !10, i64 3680, !10, i64 3688, !10, i64 3696, !10, i64 3704, !10, i64 3712, !10, i64 3720, !10, i64 3728, !10, i64 3736, !10, i64 3744, !10, i64 3752, !10, i64 3760, !10, i64 3768, !10, i64 3776, !10, i64 3784, !10, i64 3792, !10, i64 3800, !10, i64 3808, !10, i64 3816, !10, i64 3824, !10, i64 3832, !10, i64 3840, !10, i64 3848, !10, i64 3856, !10, i64 3864, !10, i64 3872, !10, i64 3880, !10, i64 3888, !10, i64 3896, !10, i64 3904, !10, i64 3912, !10, i64 3920, !10, i64 3928, !10, i64 3936, !10, i64 3944, !10, i64 3952, !10, i64 3960, !10, i64 3968, !10, i64 3976, !10, i64 3984, !10, i64 3992, !10, i64 4000, !10, i64 4008, !10, i64 4016, !10, i64 4024, !10, i64 4032, !10, i64 4040, !10, i64 4048, !10, i64 4056, !10, i64 4064, !10, i64 4072, !10, i64 4080, !10, i64 4088, !10, i64 4096, !10, i64 4104, !10, i64 4112, !10, i64 4120, !10, i64 4128, !10, i64 4136, !10, i64 4144, !10, i64 4152, !10, i64 4160, !10, i64 4168, !10, i64 4176, !10, i64 4184, !10, i64 4192, !10, i64 4200, !10, i64 4208, !10, i64 4216, !10, i64 4224, !10, i64 4232, !10, i64 4240}
!19 = !{!"long", !7, i64 0}
!20 = !{!"_ZTS9mjOption_", !12, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !12, i64 32, !12, i64 40, !12, i64 48, !7, i64 56, !7, i64 80, !7, i64 104, !12, i64 128, !12, i64 136, !12, i64 144, !7, i64 152, !7, i64 168, !7, i64 208, !6, i64 248, !6, i64 252, !6, i64 256, !6, i64 260, !6, i64 264, !6, i64 268, !6, i64 272, !6, i64 276, !6, i64 280, !6, i64 284, !6, i64 288, !6, i64 292, !6, i64 296}
!21 = !{!"_ZTS9mjVisual_", !22, i64 0, !24, i64 40, !25, i64 60, !26, i64 100, !27, i64 152, !28, i64 220}
!22 = !{!"_ZTSN9mjVisual_Ut_E", !23, i64 0, !23, i64 4, !23, i64 8, !23, i64 12, !23, i64 16, !23, i64 20, !23, i64 24, !6, i64 28, !6, i64 32, !6, i64 36}
!23 = !{!"float", !7, i64 0}
!24 = !{!"_ZTSN9mjVisual_Ut0_E", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !6, i64 16}
!25 = !{!"_ZTSN9mjVisual_Ut1_E", !7, i64 0, !7, i64 12, !7, i64 24, !6, i64 36}
!26 = !{!"_ZTSN9mjVisual_Ut2_E", !23, i64 0, !23, i64 4, !23, i64 8, !23, i64 12, !23, i64 16, !23, i64 20, !23, i64 24, !23, i64 28, !23, i64 32, !23, i64 36, !23, i64 40, !23, i64 44, !23, i64 48}
!27 = !{!"_ZTSN9mjVisual_Ut3_E", !23, i64 0, !23, i64 4, !23, i64 8, !23, i64 12, !23, i64 16, !23, i64 20, !23, i64 24, !23, i64 28, !23, i64 32, !23, i64 36, !23, i64 40, !23, i64 44, !23, i64 48, !23, i64 52, !23, i64 56, !23, i64 60, !23, i64 64}
!28 = !{!"_ZTSN9mjVisual_Ut4_E", !7, i64 0, !7, i64 16, !7, i64 32, !7, i64 48, !7, i64 64, !7, i64 80, !7, i64 96, !7, i64 112, !7, i64 128, !7, i64 144, !7, i64 160, !7, i64 176, !7, i64 192, !7, i64 208, !7, i64 224, !7, i64 240, !7, i64 256, !7, i64 272, !7, i64 288, !7, i64 304, !7, i64 320, !7, i64 336, !7, i64 352}
!29 = !{!"_ZTS12mjStatistic_", !12, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !7, i64 32}
!30 = !{!18, !6, i64 0}
!31 = !{!32, !32, i64 0}
!32 = !{!"bool", !7, i64 0}
!33 = !{!34, !12, i64 161632}
!34 = !{!"_ZTS7mjData_", !19, i64 0, !19, i64 8, !6, i64 16, !19, i64 24, !19, i64 32, !19, i64 40, !19, i64 48, !7, i64 56, !19, i64 1080, !6, i64 1088, !6, i64 1092, !7, i64 1096, !7, i64 1160, !7, i64 1416, !6, i64 161416, !7, i64 161420, !7, i64 161500, !7, i64 161584, !6, i64 161600, !6, i64 161604, !6, i64 161608, !6, i64 161612, !6, i64 161616, !6, i64 161620, !6, i64 161624, !12, i64 161632, !7, i64 161640, !10, i64 161656, !10, i64 161664, !10, i64 161672, !10, i64 161680, !10, i64 161688, !10, i64 161696, !10, i64 161704, !10, i64 161712, !10, i64 161720, !10, i64 161728, !10, i64 161736, !10, i64 161744, !10, i64 161752, !10, i64 161760, !10, i64 161768, !10, i64 161776, !10, i64 161784, !10, i64 161792, !10, i64 161800, !10, i64 161808, !10, i64 161816, !10, i64 161824, !10, i64 161832, !10, i64 161840, !10, i64 161848, !10, i64 161856, !10, i64 161864, !10, i64 161872, !10, i64 161880, !10, i64 161888, !10, i64 161896, !10, i64 161904, !10, i64 161912, !10, i64 161920, !10, i64 161928, !10, i64 161936, !10, i64 161944, !10, i64 161952, !10, i64 161960, !10, i64 161968, !10, i64 161976, !10, i64 161984, !10, i64 161992, !10, i64 162000, !10, i64 162008, !10, i64 162016, !10, i64 162024, !10, i64 162032, !10, i64 162040, !10, i64 162048, !10, i64 162056, !10, i64 162064, !10, i64 162072, !10, i64 162080, !10, i64 162088, !10, i64 162096, !10, i64 162104, !10, i64 162112, !10, i64 162120, !10, i64 162128, !10, i64 162136, !10, i64 162144, !10, i64 162152, !10, i64 162160, !10, i64 162168, !10, i64 162176, !10, i64 162184, !10, i64 162192, !10, i64 162200, !10, i64 162208, !10, i64 162216, !10, i64 162224, !10, i64 162232, !10, i64 162240, !10, i64 162248, !10, i64 162256, !10, i64 162264, !10, i64 162272, !10, i64 162280, !10, i64 162288, !10, i64 162296, !10, i64 162304, !10, i64 162312, !10, i64 162320, !10, i64 162328, !10, i64 162336, !10, i64 162344, !10, i64 162352, !10, i64 162360, !10, i64 162368, !10, i64 162376, !10, i64 162384, !10, i64 162392, !10, i64 162400, !10, i64 162408, !10, i64 162416, !10, i64 162424, !10, i64 162432, !10, i64 162440, !10, i64 162448, !10, i64 162456, !10, i64 162464, !10, i64 162472, !10, i64 162480, !10, i64 162488, !10, i64 162496, !10, i64 162504, !10, i64 162512, !10, i64 162520, !10, i64 162528, !10, i64 162536, !10, i64 162544, !10, i64 162552, !10, i64 162560, !10, i64 162568, !10, i64 162576, !10, i64 162584, !10, i64 162592, !10, i64 162600, !10, i64 162608, !10, i64 162616, !10, i64 162624, !10, i64 162632, !10, i64 162640, !10, i64 162648, !10, i64 162656, !10, i64 162664, !10, i64 162672, !10, i64 162680, !10, i64 162688, !10, i64 162696, !10, i64 162704, !10, i64 162712, !19, i64 162720}
!35 = distinct !{!35, !36}
!36 = !{!"llvm.loop.mustprogress"}
!37 = !{i8 0, i8 2}
!38 = !{}
!39 = !{i64 0, i64 4, !5, i64 4, i64 4, !5, i64 8, i64 4, !5, i64 12, i64 4, !5}
!40 = distinct !{!40, !36}


; 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::__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 }
%struct.mjvCamera_ = type { i32, i32, i32, [3 x double], double, double, double }
%struct.mjvOption_ = type { i32, i32, [6 x i8], [6 x i8], [6 x i8], [6 x i8], [6 x i8], [6 x i8], [6 x i8], [32 x i8], i32, i32 }
%struct.mjvScene_ = type { i32, i32, ptr, ptr, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i8, i8, i8, i8, i32, ptr, ptr, ptr, ptr, ptr, i32, [100 x %struct.mjvLight_], [2 x %struct.mjvGLCamera_], i8, [3 x float], [4 x float], float, i32, [10 x i8], i32, [3 x float] }
%struct.mjvLight_ = type { [3 x float], [3 x float], [3 x float], float, float, [3 x float], [3 x float], [3 x float], i8, i8, i8 }
%struct.mjvGLCamera_ = type { [3 x float], [3 x float], [3 x float], float, float, float, float, float, float }
%struct.mjrContext_ = type { float, float, float, float, float, [4 x float], i32, i32, i32, i32, i32, [10 x i32], [10 x i32], [10 x i32], i32, i32, i32, i32, i32, i32, i32, i32, [10 x i32], [10 x i32], [10 x i32], [10 x i32], i32, [100 x i32], [100 x i32], i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, [127 x i32], [127 x i32], i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
%struct.mjrRect_ = type { i32, i32, i32, i32 }
%"class.std::chrono::duration" = type { i64 }

@sleepMs = external dso_local global i32, align 4
@dt = external dso_local local_unnamed_addr global double, align 8
@floatBaseFlag = external dso_local local_unnamed_addr global i8, align 1
@slowRanderFlag = external dso_local local_unnamed_addr global i8, align 1
@_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
@cam = external dso_local global %struct.mjvCamera_, align 8
@opt = external dso_local global %struct.mjvOption_, align 4
@scn = external dso_local global %struct.mjvScene_, align 8
@con = external dso_local global %struct.mjrContext_, align 8
@window = external dso_local local_unnamed_addr global ptr, align 8
@__const.main.errorMsg = external hidden unnamed_addr constant [64 x i8], align 16
@.str.4 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [37 x i8], align 1
@__const.main.rect = external hidden unnamed_addr constant %struct.mjrRect_, align 4

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z7runCtrlR7mjData_(ptr noundef nonnull align 8 dereferenceable(162728)) 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 uwtable
declare dso_local void @_Z8keyboardP10GLFWwindowiiii(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #0

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 #2 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 #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z12mouse_buttonP10GLFWwindowiii(ptr noundef, i32 noundef, i32 noundef, i32 noundef) #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z10mouse_moveP10GLFWwindowdd(ptr noundef, double noundef, double noundef) #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z6scrollP10GLFWwindowdd(ptr noundef, double noundef, double noundef) #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr nocapture noundef readnone %1) local_unnamed_addr #4 personality ptr @__gxx_personality_v0 {
  %3 = alloca [64 x i8], align 16
  %4 = alloca %"class.std::chrono::duration", align 8
  %5 = alloca %struct.mjrRect_, align 8
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %3) #8
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(64) %3, ptr noundef nonnull align 16 dereferenceable(64) @__const.main.errorMsg, i64 64, i1 false)
  %7 = call ptr @mj_loadXML(ptr noundef nonnull @.str.4, ptr noundef null, ptr noundef nonnull %3, i32 noundef 64)
  store ptr %7, ptr @m, align 8, !tbaa !5
  %8 = call ptr @mj_makeData(ptr noundef %7)
  store ptr %8, ptr @d, align 8, !tbaa !5
  %9 = call i32 @glfwInit()
  %.not = icmp eq i32 %9, 0
  br i1 %.not, label %10, label %11

10:                                               ; preds = %2
  call void (ptr, ...) @mju_error(ptr noundef nonnull @.str.5)
  br label %11

11:                                               ; preds = %10, %2
  %12 = call ptr @glfwCreateWindow(i32 noundef 1200, i32 noundef 800, ptr noundef nonnull @.str.6, ptr noundef null, ptr noundef null)
  store ptr %12, ptr @window, align 8, !tbaa !5
  call void @glfwMakeContextCurrent(ptr noundef %12)
  call void @glfwSwapInterval(i32 noundef 1)
  call void @mjv_defaultCamera(ptr noundef nonnull @cam)
  store <2 x double> <double 6.000000e+01, double 0.000000e+00>, ptr getelementptr inbounds (i8, ptr @cam, i64 48), align 8, !tbaa !9
  store <2 x double> <double 5.000000e-01, double 3.000000e+00>, ptr getelementptr inbounds (i8, ptr @cam, i64 32), align 8, !tbaa !9
  call void @mjv_defaultOption(ptr noundef nonnull @opt)
  call void @mjv_defaultScene(ptr noundef nonnull @scn)
  call void @mjr_defaultContext(ptr noundef nonnull @con)
  %13 = load ptr, ptr @m, align 8, !tbaa !5
  call void @mjv_makeScene(ptr noundef %13, ptr noundef nonnull @scn, i32 noundef 2000)
  %14 = load ptr, ptr @m, align 8, !tbaa !5
  call void @mjr_makeContext(ptr noundef %14, ptr noundef nonnull @con, i32 noundef 100)
  %15 = load ptr, ptr @window, align 8, !tbaa !5
  %16 = call ptr @glfwSetKeyCallback(ptr noundef %15, ptr noundef nonnull @_Z8keyboardP10GLFWwindowiiii)
  %17 = load ptr, ptr @window, align 8, !tbaa !5
  %18 = call ptr @glfwSetCursorPosCallback(ptr noundef %17, ptr noundef nonnull @_Z10mouse_moveP10GLFWwindowdd)
  %19 = load ptr, ptr @window, align 8, !tbaa !5
  %20 = call ptr @glfwSetMouseButtonCallback(ptr noundef %19, ptr noundef nonnull @_Z12mouse_buttonP10GLFWwindowiii)
  %21 = load ptr, ptr @window, align 8, !tbaa !5
  %22 = call ptr @glfwSetScrollCallback(ptr noundef %21, ptr noundef nonnull @_Z6scrollP10GLFWwindowdd)
  %23 = load ptr, ptr @m, align 8, !tbaa !5
  %24 = getelementptr inbounds i8, ptr %23, i64 320
  %25 = load double, ptr %24, align 8, !tbaa !11
  store double %25, ptr @dt, align 8, !tbaa !9
  call void @setDt(double noundef %25)
  %26 = load ptr, ptr @m, align 8, !tbaa !5
  %27 = load i32, ptr %26, align 8, !tbaa !25
  %28 = icmp sgt i32 %27, 12
  br i1 %28, label %29, label %30

29:                                               ; preds = %11
  store i8 1, ptr @floatBaseFlag, align 1, !tbaa !26
  br label %30

30:                                               ; preds = %29, %11
  %31 = 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.7)
  %32 = load ptr, ptr @window, align 8, !tbaa !5
  %33 = call i32 @glfwWindowShouldClose(ptr noundef %32)
  %.not56 = icmp eq i32 %33, 0
  br i1 %.not56, label %.lr.ph8, label %._crit_edge9

.lr.ph8:                                          ; preds = %30
  %34 = getelementptr inbounds i8, ptr %5, i64 8
  %35 = getelementptr inbounds i8, ptr %5, i64 12
  %.sroa.01.0.copyload = load i64, ptr @__const.main.rect, align 4
  %.sroa.5.0.copyload = load i64, ptr getelementptr inbounds (i8, ptr @__const.main.rect, i64 8), align 4
  br label %36

36:                                               ; preds = %.lr.ph8, %58
  %37 = load ptr, ptr @d, align 8, !tbaa !5
  %38 = getelementptr inbounds i8, ptr %37, i64 161632
  %39 = load double, ptr %38, align 8, !tbaa !28
  %40 = fsub double %39, %39
  %41 = fcmp olt double %40, 0x3FA1111111111111
  br i1 %41, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %36, %.lr.ph
  %42 = phi ptr [ %45, %.lr.ph ], [ %37, %36 ]
  call void @_Z7runCtrlR7mjData_(ptr noundef nonnull align 8 dereferenceable(162728) %42)
  %43 = load ptr, ptr @m, align 8, !tbaa !5
  %44 = load ptr, ptr @d, align 8, !tbaa !5
  call void @mj_step(ptr noundef %43, ptr noundef %44)
  %45 = load ptr, ptr @d, align 8, !tbaa !5
  %46 = getelementptr inbounds i8, ptr %45, i64 161632
  %47 = load double, ptr %46, align 8, !tbaa !28
  %48 = fsub double %47, %39
  %49 = fcmp olt double %48, 0x3FA1111111111111
  br i1 %49, label %.lr.ph, label %._crit_edge, !llvm.loop !30

._crit_edge:                                      ; preds = %.lr.ph, %36
  %50 = load i8, ptr @slowRanderFlag, align 1, !tbaa !26, !range !32, !noundef !33
  %51 = trunc nuw i8 %50 to i1
  br i1 %51, label %52, label %53

52:                                               ; preds = %._crit_edge
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #8
  call void @_ZNSt6chrono8durationIlSt5ratioILl1ELl1000EEEC2IivEERKT_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 4 dereferenceable(4) @sleepMs)
  call void @_ZNSt11this_thread9sleep_forIlSt5ratioILl1ELl1000EEEEvRKNSt6chrono8durationIT_T0_EE(ptr noundef nonnull align 8 dereferenceable(8) %4)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  br label %53

53:                                               ; preds = %52, %._crit_edge
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %5, i8 0, i64 16, i1 false)
  %54 = load ptr, ptr @window, align 8, !tbaa !5
  call void @glfwGetFramebufferSize(ptr noundef %54, ptr noundef nonnull %34, ptr noundef nonnull %35)
  %55 = load ptr, ptr @m, align 8, !tbaa !5
  %56 = load ptr, ptr @d, align 8, !tbaa !5
  call void @mjv_updateScene(ptr noundef %55, ptr noundef %56, ptr noundef nonnull @opt, ptr noundef null, ptr noundef nonnull @cam, i32 noundef 7, ptr noundef nonnull @scn)
  %.sroa.02.0.copyload = load i64, ptr %5, align 8
  %.sroa.23.0.copyload = load i64, ptr %34, align 8
  call void @mjr_render(i64 %.sroa.02.0.copyload, i64 %.sroa.23.0.copyload, ptr noundef nonnull @scn, ptr noundef nonnull @con)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #8
  call void @_ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %6, ptr noundef nonnull align 8 dereferenceable(128) @_Z3msgB5cxx11)
  %57 = call noundef ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4dataEv(ptr noundef nonnull align 8 dereferenceable(32) %6) #8
  invoke void @mjr_overlay(i32 noundef 0, i32 noundef 2, i64 %.sroa.01.0.copyload, i64 %.sroa.5.0.copyload, ptr noundef %57, ptr noundef null, ptr noundef nonnull @con)
          to label %58 unwind label %62

58:                                               ; preds = %53
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #8
  %59 = load ptr, ptr @window, align 8, !tbaa !5
  call void @glfwSwapBuffers(ptr noundef %59)
  call void @glfwPollEvents()
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #8
  %60 = load ptr, ptr @window, align 8, !tbaa !5
  %61 = call i32 @glfwWindowShouldClose(ptr noundef %60)
  %.not5 = icmp eq i32 %61, 0
  br i1 %.not5, label %36, label %._crit_edge9, !llvm.loop !34

62:                                               ; preds = %53
  %63 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %3) #8
  resume { ptr, i32 } %63

._crit_edge9:                                     ; preds = %58, %30
  call void @mjv_freeScene(ptr noundef nonnull @scn)
  call void @mjr_freeContext(ptr noundef nonnull @con)
  %64 = load ptr, ptr @d, align 8, !tbaa !5
  call void @mj_deleteData(ptr noundef %64)
  %65 = load ptr, ptr @m, align 8, !tbaa !5
  call void @mj_deleteModel(ptr noundef %65)
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %3) #8
  ret i32 0
}

; Function Attrs: mustprogress 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) #5

declare ptr @mj_loadXML(ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #6

declare ptr @mj_makeData(ptr noundef) local_unnamed_addr #6

declare i32 @glfwInit() local_unnamed_addr #6

declare void @mju_error(ptr noundef, ...) local_unnamed_addr #6

declare ptr @glfwCreateWindow(i32 noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #6

declare void @glfwMakeContextCurrent(ptr noundef) local_unnamed_addr #6

declare void @glfwSwapInterval(i32 noundef) local_unnamed_addr #6

declare void @mjv_defaultCamera(ptr noundef) local_unnamed_addr #6

declare void @mjv_defaultOption(ptr noundef) local_unnamed_addr #6

declare void @mjv_defaultScene(ptr noundef) local_unnamed_addr #6

declare void @mjr_defaultContext(ptr noundef) local_unnamed_addr #6

declare void @mjv_makeScene(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #6

declare void @mjr_makeContext(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #6

declare ptr @glfwSetKeyCallback(ptr noundef, ptr noundef) local_unnamed_addr #6

declare ptr @glfwSetCursorPosCallback(ptr noundef, ptr noundef) local_unnamed_addr #6

declare ptr @glfwSetMouseButtonCallback(ptr noundef, ptr noundef) local_unnamed_addr #6

declare ptr @glfwSetScrollCallback(ptr noundef, ptr noundef) local_unnamed_addr #6

declare void @setDt(double noundef) local_unnamed_addr #6

declare i32 @glfwWindowShouldClose(ptr noundef) local_unnamed_addr #6

declare void @mj_step(ptr noundef, ptr noundef) local_unnamed_addr #6

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6chrono8durationIlSt5ratioILl1ELl1000EEEC2IivEERKT_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) 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) #7

declare void @glfwGetFramebufferSize(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #6

declare void @mjv_updateScene(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #6

declare void @mjr_render(i64, i64, ptr noundef, ptr noundef) local_unnamed_addr #6

declare void @mjr_overlay(i32 noundef, i32 noundef, i64, i64, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #6

; Function Attrs: mustprogress uwtable
declare void @_ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(128)) local_unnamed_addr #0 align 2

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

declare void @glfwSwapBuffers(ptr noundef) local_unnamed_addr #6

declare void @glfwPollEvents() local_unnamed_addr #6

declare void @mjv_freeScene(ptr noundef) local_unnamed_addr #6

declare void @mjr_freeContext(ptr noundef) local_unnamed_addr #6

declare void @mj_deleteData(ptr noundef) local_unnamed_addr #6

declare void @mj_deleteModel(ptr noundef) local_unnamed_addr #6

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 = { 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 #4 = { 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 #5 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !10, i64 320}
!12 = !{!"_ZTS8mjModel_", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !13, i64 16, !13, i64 20, !13, i64 24, !13, i64 28, !13, i64 32, !13, i64 36, !13, i64 40, !13, i64 44, !13, i64 48, !13, i64 52, !13, i64 56, !13, i64 60, !13, i64 64, !13, i64 68, !13, i64 72, !13, i64 76, !13, i64 80, !13, i64 84, !13, i64 88, !13, i64 92, !13, i64 96, !13, i64 100, !13, i64 104, !13, i64 108, !13, i64 112, !13, i64 116, !13, i64 120, !13, i64 124, !13, i64 128, !13, i64 132, !13, i64 136, !13, i64 140, !13, i64 144, !13, i64 148, !13, i64 152, !13, i64 156, !13, i64 160, !13, i64 164, !13, i64 168, !13, i64 172, !13, i64 176, !13, i64 180, !13, i64 184, !13, i64 188, !13, i64 192, !13, i64 196, !13, i64 200, !13, i64 204, !13, i64 208, !13, i64 212, !13, i64 216, !13, i64 220, !13, i64 224, !13, i64 228, !13, i64 232, !13, i64 236, !13, i64 240, !13, i64 244, !13, i64 248, !13, i64 252, !13, i64 256, !13, i64 260, !13, i64 264, !13, i64 268, !13, i64 272, !13, i64 276, !13, i64 280, !13, i64 284, !13, i64 288, !13, i64 292, !13, i64 296, !14, i64 304, !14, i64 312, !15, i64 320, !16, i64 624, !24, i64 1216, !6, i64 1272, !6, i64 1280, !6, i64 1288, !6, i64 1296, !6, i64 1304, !6, i64 1312, !6, i64 1320, !6, i64 1328, !6, i64 1336, !6, i64 1344, !6, i64 1352, !6, i64 1360, !6, i64 1368, !6, i64 1376, !6, i64 1384, !6, i64 1392, !6, i64 1400, !6, i64 1408, !6, i64 1416, !6, i64 1424, !6, i64 1432, !6, i64 1440, !6, i64 1448, !6, i64 1456, !6, i64 1464, !6, i64 1472, !6, i64 1480, !6, i64 1488, !6, i64 1496, !6, i64 1504, !6, i64 1512, !6, i64 1520, !6, i64 1528, !6, i64 1536, !6, i64 1544, !6, i64 1552, !6, i64 1560, !6, i64 1568, !6, i64 1576, !6, i64 1584, !6, i64 1592, !6, i64 1600, !6, i64 1608, !6, i64 1616, !6, i64 1624, !6, i64 1632, !6, i64 1640, !6, i64 1648, !6, i64 1656, !6, i64 1664, !6, i64 1672, !6, i64 1680, !6, i64 1688, !6, i64 1696, !6, i64 1704, !6, i64 1712, !6, i64 1720, !6, i64 1728, !6, i64 1736, !6, i64 1744, !6, i64 1752, !6, i64 1760, !6, i64 1768, !6, i64 1776, !6, i64 1784, !6, i64 1792, !6, i64 1800, !6, i64 1808, !6, i64 1816, !6, i64 1824, !6, i64 1832, !6, i64 1840, !6, i64 1848, !6, i64 1856, !6, i64 1864, !6, i64 1872, !6, i64 1880, !6, i64 1888, !6, i64 1896, !6, i64 1904, !6, i64 1912, !6, i64 1920, !6, i64 1928, !6, i64 1936, !6, i64 1944, !6, i64 1952, !6, i64 1960, !6, i64 1968, !6, i64 1976, !6, i64 1984, !6, i64 1992, !6, i64 2000, !6, i64 2008, !6, i64 2016, !6, i64 2024, !6, i64 2032, !6, i64 2040, !6, i64 2048, !6, i64 2056, !6, i64 2064, !6, i64 2072, !6, i64 2080, !6, i64 2088, !6, i64 2096, !6, i64 2104, !6, i64 2112, !6, i64 2120, !6, i64 2128, !6, i64 2136, !6, i64 2144, !6, i64 2152, !6, i64 2160, !6, i64 2168, !6, i64 2176, !6, i64 2184, !6, i64 2192, !6, i64 2200, !6, i64 2208, !6, i64 2216, !6, i64 2224, !6, i64 2232, !6, i64 2240, !6, i64 2248, !6, i64 2256, !6, i64 2264, !6, i64 2272, !6, i64 2280, !6, i64 2288, !6, i64 2296, !6, i64 2304, !6, i64 2312, !6, i64 2320, !6, i64 2328, !6, i64 2336, !6, i64 2344, !6, i64 2352, !6, i64 2360, !6, i64 2368, !6, i64 2376, !6, i64 2384, !6, i64 2392, !6, i64 2400, !6, i64 2408, !6, i64 2416, !6, i64 2424, !6, i64 2432, !6, i64 2440, !6, i64 2448, !6, i64 2456, !6, i64 2464, !6, i64 2472, !6, i64 2480, !6, i64 2488, !6, i64 2496, !6, i64 2504, !6, i64 2512, !6, i64 2520, !6, i64 2528, !6, i64 2536, !6, i64 2544, !6, i64 2552, !6, i64 2560, !6, i64 2568, !6, i64 2576, !6, i64 2584, !6, i64 2592, !6, i64 2600, !6, i64 2608, !6, i64 2616, !6, i64 2624, !6, i64 2632, !6, i64 2640, !6, i64 2648, !6, i64 2656, !6, i64 2664, !6, i64 2672, !6, i64 2680, !6, i64 2688, !6, i64 2696, !6, i64 2704, !6, i64 2712, !6, i64 2720, !6, i64 2728, !6, i64 2736, !6, i64 2744, !6, i64 2752, !6, i64 2760, !6, i64 2768, !6, i64 2776, !6, i64 2784, !6, i64 2792, !6, i64 2800, !6, i64 2808, !6, i64 2816, !6, i64 2824, !6, i64 2832, !6, i64 2840, !6, i64 2848, !6, i64 2856, !6, i64 2864, !6, i64 2872, !6, i64 2880, !6, i64 2888, !6, i64 2896, !6, i64 2904, !6, i64 2912, !6, i64 2920, !6, i64 2928, !6, i64 2936, !6, i64 2944, !6, i64 2952, !6, i64 2960, !6, i64 2968, !6, i64 2976, !6, i64 2984, !6, i64 2992, !6, i64 3000, !6, i64 3008, !6, i64 3016, !6, i64 3024, !6, i64 3032, !6, i64 3040, !6, i64 3048, !6, i64 3056, !6, i64 3064, !6, i64 3072, !6, i64 3080, !6, i64 3088, !6, i64 3096, !6, i64 3104, !6, i64 3112, !6, i64 3120, !6, i64 3128, !6, i64 3136, !6, i64 3144, !6, i64 3152, !6, i64 3160, !6, i64 3168, !6, i64 3176, !6, i64 3184, !6, i64 3192, !6, i64 3200, !6, i64 3208, !6, i64 3216, !6, i64 3224, !6, i64 3232, !6, i64 3240, !6, i64 3248, !6, i64 3256, !6, i64 3264, !6, i64 3272, !6, i64 3280, !6, i64 3288, !6, i64 3296, !6, i64 3304, !6, i64 3312, !6, i64 3320, !6, i64 3328, !6, i64 3336, !6, i64 3344, !6, i64 3352, !6, i64 3360, !6, i64 3368, !6, i64 3376, !6, i64 3384, !6, i64 3392, !6, i64 3400, !6, i64 3408, !6, i64 3416, !6, i64 3424, !6, i64 3432, !6, i64 3440, !6, i64 3448, !6, i64 3456, !6, i64 3464, !6, i64 3472, !6, i64 3480, !6, i64 3488, !6, i64 3496, !6, i64 3504, !6, i64 3512, !6, i64 3520, !6, i64 3528, !6, i64 3536, !6, i64 3544, !6, i64 3552, !6, i64 3560, !6, i64 3568, !6, i64 3576, !6, i64 3584, !6, i64 3592, !6, i64 3600, !6, i64 3608, !6, i64 3616, !6, i64 3624, !6, i64 3632, !6, i64 3640, !6, i64 3648, !6, i64 3656, !6, i64 3664, !6, i64 3672, !6, i64 3680, !6, i64 3688, !6, i64 3696, !6, i64 3704, !6, i64 3712, !6, i64 3720, !6, i64 3728, !6, i64 3736, !6, i64 3744, !6, i64 3752, !6, i64 3760, !6, i64 3768, !6, i64 3776, !6, i64 3784, !6, i64 3792, !6, i64 3800, !6, i64 3808, !6, i64 3816, !6, i64 3824, !6, i64 3832, !6, i64 3840, !6, i64 3848, !6, i64 3856, !6, i64 3864, !6, i64 3872, !6, i64 3880, !6, i64 3888, !6, i64 3896, !6, i64 3904, !6, i64 3912, !6, i64 3920, !6, i64 3928, !6, i64 3936, !6, i64 3944, !6, i64 3952, !6, i64 3960, !6, i64 3968, !6, i64 3976, !6, i64 3984, !6, i64 3992, !6, i64 4000, !6, i64 4008, !6, i64 4016, !6, i64 4024, !6, i64 4032, !6, i64 4040, !6, i64 4048, !6, i64 4056, !6, i64 4064, !6, i64 4072, !6, i64 4080, !6, i64 4088, !6, i64 4096, !6, i64 4104, !6, i64 4112, !6, i64 4120, !6, i64 4128, !6, i64 4136, !6, i64 4144, !6, i64 4152, !6, i64 4160, !6, i64 4168, !6, i64 4176, !6, i64 4184, !6, i64 4192, !6, i64 4200, !6, i64 4208, !6, i64 4216, !6, i64 4224, !6, i64 4232, !6, i64 4240}
!13 = !{!"int", !7, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = !{!"_ZTS9mjOption_", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !7, i64 56, !7, i64 80, !7, i64 104, !10, i64 128, !10, i64 136, !10, i64 144, !7, i64 152, !7, i64 168, !7, i64 208, !13, i64 248, !13, i64 252, !13, i64 256, !13, i64 260, !13, i64 264, !13, i64 268, !13, i64 272, !13, i64 276, !13, i64 280, !13, i64 284, !13, i64 288, !13, i64 292, !13, i64 296}
!16 = !{!"_ZTS9mjVisual_", !17, i64 0, !19, i64 40, !20, i64 60, !21, i64 100, !22, i64 152, !23, i64 220}
!17 = !{!"_ZTSN9mjVisual_Ut_E", !18, i64 0, !18, i64 4, !18, i64 8, !18, i64 12, !18, i64 16, !18, i64 20, !18, i64 24, !13, i64 28, !13, i64 32, !13, i64 36}
!18 = !{!"float", !7, i64 0}
!19 = !{!"_ZTSN9mjVisual_Ut0_E", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !13, i64 16}
!20 = !{!"_ZTSN9mjVisual_Ut1_E", !7, i64 0, !7, i64 12, !7, i64 24, !13, i64 36}
!21 = !{!"_ZTSN9mjVisual_Ut2_E", !18, i64 0, !18, i64 4, !18, i64 8, !18, i64 12, !18, i64 16, !18, i64 20, !18, i64 24, !18, i64 28, !18, i64 32, !18, i64 36, !18, i64 40, !18, i64 44, !18, i64 48}
!22 = !{!"_ZTSN9mjVisual_Ut3_E", !18, i64 0, !18, i64 4, !18, i64 8, !18, i64 12, !18, i64 16, !18, i64 20, !18, i64 24, !18, i64 28, !18, i64 32, !18, i64 36, !18, i64 40, !18, i64 44, !18, i64 48, !18, i64 52, !18, i64 56, !18, i64 60, !18, i64 64}
!23 = !{!"_ZTSN9mjVisual_Ut4_E", !7, i64 0, !7, i64 16, !7, i64 32, !7, i64 48, !7, i64 64, !7, i64 80, !7, i64 96, !7, i64 112, !7, i64 128, !7, i64 144, !7, i64 160, !7, i64 176, !7, i64 192, !7, i64 208, !7, i64 224, !7, i64 240, !7, i64 256, !7, i64 272, !7, i64 288, !7, i64 304, !7, i64 320, !7, i64 336, !7, i64 352}
!24 = !{!"_ZTS12mjStatistic_", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !7, i64 32}
!25 = !{!12, !13, i64 0}
!26 = !{!27, !27, i64 0}
!27 = !{!"bool", !7, i64 0}
!28 = !{!29, !10, i64 161632}
!29 = !{!"_ZTS7mjData_", !14, i64 0, !14, i64 8, !13, i64 16, !14, i64 24, !14, i64 32, !14, i64 40, !14, i64 48, !7, i64 56, !14, i64 1080, !13, i64 1088, !13, i64 1092, !7, i64 1096, !7, i64 1160, !7, i64 1416, !13, i64 161416, !7, i64 161420, !7, i64 161500, !7, i64 161584, !13, i64 161600, !13, i64 161604, !13, i64 161608, !13, i64 161612, !13, i64 161616, !13, i64 161620, !13, i64 161624, !10, i64 161632, !7, i64 161640, !6, i64 161656, !6, i64 161664, !6, i64 161672, !6, i64 161680, !6, i64 161688, !6, i64 161696, !6, i64 161704, !6, i64 161712, !6, i64 161720, !6, i64 161728, !6, i64 161736, !6, i64 161744, !6, i64 161752, !6, i64 161760, !6, i64 161768, !6, i64 161776, !6, i64 161784, !6, i64 161792, !6, i64 161800, !6, i64 161808, !6, i64 161816, !6, i64 161824, !6, i64 161832, !6, i64 161840, !6, i64 161848, !6, i64 161856, !6, i64 161864, !6, i64 161872, !6, i64 161880, !6, i64 161888, !6, i64 161896, !6, i64 161904, !6, i64 161912, !6, i64 161920, !6, i64 161928, !6, i64 161936, !6, i64 161944, !6, i64 161952, !6, i64 161960, !6, i64 161968, !6, i64 161976, !6, i64 161984, !6, i64 161992, !6, i64 162000, !6, i64 162008, !6, i64 162016, !6, i64 162024, !6, i64 162032, !6, i64 162040, !6, i64 162048, !6, i64 162056, !6, i64 162064, !6, i64 162072, !6, i64 162080, !6, i64 162088, !6, i64 162096, !6, i64 162104, !6, i64 162112, !6, i64 162120, !6, i64 162128, !6, i64 162136, !6, i64 162144, !6, i64 162152, !6, i64 162160, !6, i64 162168, !6, i64 162176, !6, i64 162184, !6, i64 162192, !6, i64 162200, !6, i64 162208, !6, i64 162216, !6, i64 162224, !6, i64 162232, !6, i64 162240, !6, i64 162248, !6, i64 162256, !6, i64 162264, !6, i64 162272, !6, i64 162280, !6, i64 162288, !6, i64 162296, !6, i64 162304, !6, i64 162312, !6, i64 162320, !6, i64 162328, !6, i64 162336, !6, i64 162344, !6, i64 162352, !6, i64 162360, !6, i64 162368, !6, i64 162376, !6, i64 162384, !6, i64 162392, !6, i64 162400, !6, i64 162408, !6, i64 162416, !6, i64 162424, !6, i64 162432, !6, i64 162440, !6, i64 162448, !6, i64 162456, !6, i64 162464, !6, i64 162472, !6, i64 162480, !6, i64 162488, !6, i64 162496, !6, i64 162504, !6, i64 162512, !6, i64 162520, !6, i64 162528, !6, i64 162536, !6, i64 162544, !6, i64 162552, !6, i64 162560, !6, i64 162568, !6, i64 162576, !6, i64 162584, !6, i64 162592, !6, i64 162600, !6, i64 162608, !6, i64 162616, !6, i64 162624, !6, i64 162632, !6, i64 162640, !6, i64 162648, !6, i64 162656, !6, i64 162664, !6, i64 162672, !6, i64 162680, !6, i64 162688, !6, i64 162696, !6, i64 162704, !6, i64 162712, !14, i64 162720}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}
!32 = !{i8 0, i8 2}
!33 = !{}
!34 = distinct !{!34, !31}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass