; LLVM IR from drohmer/cgp :: library/cgp/19_camera_controller/camera_controller_orbit/camera_controller_orbit._88bdd084 (stackIfLi4ELi4EEE)

; 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_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::allocator" = type { i8 }
%"struct.cgp::numarray_stack.5" = type { float, float }
%"struct.cgp::camera_controller_generic_base" = type { i8, ptr, ptr }
%"struct.cgp::input_devices" = type <{ %"struct.cgp::inputs_keyboard_parameters", %"struct.cgp::inputs_mouse_parameters", float, [4 x i8] }>
%"struct.cgp::inputs_keyboard_parameters" = type { i8, i8, i8, i8, i8, i8, %"struct.cgp::inputs_keyboard_last_action_parameter", %"class.std::set" }
%"struct.cgp::inputs_keyboard_last_action_parameter" = type { i32, i32 }
%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"struct.cgp::inputs_mouse_parameters" = type <{ %"struct.cgp::inputs_mouse_cursor_position_parameters", %"struct.cgp::inputs_mouse_cursor_click_parameters", float, i8, [3 x i8] }>
%"struct.cgp::inputs_mouse_cursor_position_parameters" = type { %"struct.cgp::numarray_stack.5", %"struct.cgp::numarray_stack.5" }
%"struct.cgp::inputs_mouse_cursor_click_parameters" = type { i8, i8, i32 }
%"struct.cgp::camera_controller_orbit" = type { %"struct.cgp::camera_controller_generic_base", %"struct.cgp::camera_orbit" }
%"struct.cgp::camera_orbit" = type { %"struct.cgp::camera_generic_base", %"struct.cgp::rotation_transform", %"struct.cgp::numarray_stack.1", float }
%"struct.cgp::camera_generic_base" = type { ptr }
%"struct.cgp::rotation_transform" = type { %"struct.cgp::quaternion" }
%"struct.cgp::quaternion" = type { %"struct.cgp::numarray_stack.0" }
%"struct.cgp::numarray_stack.0" = type { float, float, float, float }
%"struct.cgp::numarray_stack.1" = type { float, float, float }

@.str = external hidden unnamed_addr constant [18 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [130 x i8], align 1
@__func__._ZN3cgp23camera_controller_orbit17action_mouse_moveERNS_12matrix_stackIfLi4ELi4EEE = external hidden unnamed_addr constant [18 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [18 x i8], align 1

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

; 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
define dso_local void @_ZN3cgp23camera_controller_orbit17action_mouse_moveERNS_12matrix_stackIfLi4ELi4EEE(ptr noundef nonnull align 8 dereferenceable(64) %0, ptr noundef nonnull align 4 dereferenceable(64) %1) #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = alloca %"class.std::allocator", align 1
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  %10 = alloca %"class.std::allocator", align 1
  %11 = alloca %"class.std::__cxx11::basic_string", align 8
  %12 = alloca %"class.std::allocator", align 1
  %13 = alloca %"class.std::__cxx11::basic_string", align 8
  %14 = alloca %"class.std::allocator", align 1
  %15 = alloca %"class.std::__cxx11::basic_string", align 8
  %16 = alloca %"class.std::allocator", align 1
  %17 = alloca %"class.std::__cxx11::basic_string", align 8
  %18 = alloca %"class.std::allocator", align 1
  %19 = alloca %"class.std::__cxx11::basic_string", align 8
  %20 = alloca %"class.std::allocator", align 1
  %21 = alloca %"class.std::__cxx11::basic_string", align 8
  %22 = alloca %"class.std::allocator", align 1
  %23 = alloca ptr, align 8
  %24 = alloca ptr, align 8
  %25 = alloca i8, align 1
  %26 = alloca i8, align 1
  %27 = alloca i8, align 1
  %28 = alloca i8, align 1
  %29 = alloca %"struct.cgp::numarray_stack.5", align 4
  %30 = alloca %"struct.cgp::numarray_stack.5", align 4
  %31 = alloca %"struct.cgp::numarray_stack.5", align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %32 = load ptr, ptr %3, align 8
  %33 = getelementptr inbounds %"struct.cgp::camera_controller_generic_base", ptr %32, i32 0, i32 1
  %34 = load ptr, ptr %33, align 8, !tbaa !9
  %35 = icmp ne ptr %34, null
  %36 = zext i1 %35 to i32
  %37 = icmp eq i32 %36, 0
  br i1 %37, label %38, label %68

38:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 32, ptr %5) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef @.str, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %39 unwind label %44

39:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef @.str.1, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %40 unwind label %48

40:                                               ; preds = %39
  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.2, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %41 unwind label %52

41:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 32, ptr %13) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef @__func__._ZN3cgp23camera_controller_orbit17action_mouse_moveERNS_12matrix_stackIfLi4ELi4EEE, ptr noundef nonnull align 1 dereferenceable(1) %14)
          to label %42 unwind label %56

42:                                               ; preds = %41
  invoke void @_ZN3cgp10call_errorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_S7_S7_i(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef nonnull align 8 dereferenceable(32) %13, i32 noundef 15) #7
          to label %43 unwind label %60

43:                                               ; preds = %42
  unreachable

44:                                               ; preds = %38
  %45 = landingpad { ptr, i32 }
          cleanup
  %46 = extractvalue { ptr, i32 } %45, 0
  store ptr %46, ptr %7, align 8
  %47 = extractvalue { ptr, i32 } %45, 1
  store i32 %47, ptr %8, align 4
  br label %67

48:                                               ; preds = %39
  %49 = landingpad { ptr, i32 }
          cleanup
  %50 = extractvalue { ptr, i32 } %49, 0
  store ptr %50, ptr %7, align 8
  %51 = extractvalue { ptr, i32 } %49, 1
  store i32 %51, ptr %8, align 4
  br label %66

52:                                               ; preds = %40
  %53 = landingpad { ptr, i32 }
          cleanup
  %54 = extractvalue { ptr, i32 } %53, 0
  store ptr %54, ptr %7, align 8
  %55 = extractvalue { ptr, i32 } %53, 1
  store i32 %55, ptr %8, align 4
  br label %65

56:                                               ; preds = %41
  %57 = landingpad { ptr, i32 }
          cleanup
  %58 = extractvalue { ptr, i32 } %57, 0
  store ptr %58, ptr %7, align 8
  %59 = extractvalue { ptr, i32 } %57, 1
  store i32 %59, ptr %8, align 4
  br label %64

60:                                               ; preds = %42
  %61 = landingpad { ptr, i32 }
          cleanup
  %62 = extractvalue { ptr, i32 } %61, 0
  store ptr %62, ptr %7, align 8
  %63 = extractvalue { ptr, i32 } %61, 1
  store i32 %63, ptr %8, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #6
  br label %64

64:                                               ; preds = %60, %56
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #6
  br label %65

65:                                               ; preds = %64, %52
  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
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #6
  br label %66

66:                                               ; preds = %65, %48
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #6
  br label %67

67:                                               ; preds = %66, %44
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %5) #6
  br label %207

68:                                               ; preds = %2
  %69 = getelementptr inbounds %"struct.cgp::camera_controller_generic_base", ptr %32, i32 0, i32 2
  %70 = load ptr, ptr %69, align 8, !tbaa !12
  %71 = icmp ne ptr %70, null
  %72 = zext i1 %71 to i32
  %73 = icmp eq i32 %72, 0
  br i1 %73, label %74, label %104

74:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 32, ptr %15) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef @.str.3, ptr noundef nonnull align 1 dereferenceable(1) %16)
          to label %75 unwind label %80

75:                                               ; preds = %74
  call void @llvm.lifetime.start.p0(i64 32, ptr %17) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef @.str.1, ptr noundef nonnull align 1 dereferenceable(1) %18)
          to label %76 unwind label %84

76:                                               ; preds = %75
  call void @llvm.lifetime.start.p0(i64 32, ptr %19) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %20) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %19, ptr noundef @.str.2, ptr noundef nonnull align 1 dereferenceable(1) %20)
          to label %77 unwind label %88

77:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 32, ptr %21) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %22) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %21, ptr noundef @__func__._ZN3cgp23camera_controller_orbit17action_mouse_moveERNS_12matrix_stackIfLi4ELi4EEE, ptr noundef nonnull align 1 dereferenceable(1) %22)
          to label %78 unwind label %92

78:                                               ; preds = %77
  invoke void @_ZN3cgp10call_errorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_S7_S7_i(ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef nonnull align 8 dereferenceable(32) %19, ptr noundef nonnull align 8 dereferenceable(32) %21, i32 noundef 16) #7
          to label %79 unwind label %96

79:                                               ; preds = %78
  unreachable

80:                                               ; preds = %74
  %81 = landingpad { ptr, i32 }
          cleanup
  %82 = extractvalue { ptr, i32 } %81, 0
  store ptr %82, ptr %7, align 8
  %83 = extractvalue { ptr, i32 } %81, 1
  store i32 %83, ptr %8, align 4
  br label %103

84:                                               ; preds = %75
  %85 = landingpad { ptr, i32 }
          cleanup
  %86 = extractvalue { ptr, i32 } %85, 0
  store ptr %86, ptr %7, align 8
  %87 = extractvalue { ptr, i32 } %85, 1
  store i32 %87, ptr %8, align 4
  br label %102

88:                                               ; preds = %76
  %89 = landingpad { ptr, i32 }
          cleanup
  %90 = extractvalue { ptr, i32 } %89, 0
  store ptr %90, ptr %7, align 8
  %91 = extractvalue { ptr, i32 } %89, 1
  store i32 %91, ptr %8, align 4
  br label %101

92:                                               ; preds = %77
  %93 = landingpad { ptr, i32 }
          cleanup
  %94 = extractvalue { ptr, i32 } %93, 0
  store ptr %94, ptr %7, align 8
  %95 = extractvalue { ptr, i32 } %93, 1
  store i32 %95, ptr %8, align 4
  br label %100

96:                                               ; preds = %78
  %97 = landingpad { ptr, i32 }
          cleanup
  %98 = extractvalue { ptr, i32 } %97, 0
  store ptr %98, ptr %7, align 8
  %99 = extractvalue { ptr, i32 } %97, 1
  store i32 %99, ptr %8, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #6
  br label %100

100:                                              ; preds = %96, %92
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %21) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #6
  br label %101

101:                                              ; preds = %100, %88
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #6
  br label %102

102:                                              ; preds = %101, %84
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #6
  br label %103

103:                                              ; preds = %102, %80
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #6
  br label %207

104:                                              ; preds = %68
  %105 = getelementptr inbounds %"struct.cgp::camera_controller_generic_base", ptr %32, i32 0, i32 0
  %106 = load i8, ptr %105, align 8, !tbaa !13, !range !14, !noundef !15
  %107 = trunc i8 %106 to i1
  br i1 %107, label %109, label %108

108:                                              ; preds = %104
  br label %206

109:                                              ; preds = %104
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #6
  %110 = getelementptr inbounds %"struct.cgp::camera_controller_generic_base", ptr %32, i32 0, i32 1
  %111 = load ptr, ptr %110, align 8, !tbaa !9
  %112 = getelementptr inbounds %"struct.cgp::input_devices", ptr %111, i32 0, i32 1
  %113 = getelementptr inbounds %"struct.cgp::inputs_mouse_parameters", ptr %112, i32 0, i32 0
  %114 = getelementptr inbounds %"struct.cgp::inputs_mouse_cursor_position_parameters", ptr %113, i32 0, i32 0
  store ptr %114, ptr %23, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #6
  %115 = getelementptr inbounds %"struct.cgp::camera_controller_generic_base", ptr %32, i32 0, i32 1
  %116 = load ptr, ptr %115, align 8, !tbaa !9
  %117 = getelementptr inbounds %"struct.cgp::input_devices", ptr %116, i32 0, i32 1
  %118 = getelementptr inbounds %"struct.cgp::inputs_mouse_parameters", ptr %117, i32 0, i32 0
  %119 = getelementptr inbounds %"struct.cgp::inputs_mouse_cursor_position_parameters", ptr %118, i32 0, i32 1
  store ptr %119, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %25) #6
  %120 = getelementptr inbounds %"struct.cgp::camera_controller_generic_base", ptr %32, i32 0, i32 1
  %121 = load ptr, ptr %120, align 8, !tbaa !9
  %122 = getelementptr inbounds %"struct.cgp::input_devices", ptr %121, i32 0, i32 1
  %123 = getelementptr inbounds %"struct.cgp::inputs_mouse_parameters", ptr %122, i32 0, i32 3
  %124 = load i8, ptr %123, align 4, !tbaa !16, !range !14, !noundef !15
  %125 = trunc i8 %124 to i1
  %126 = xor i1 %125, true
  %127 = zext i1 %126 to i8
  store i8 %127, ptr %25, align 1, !tbaa !36
  call void @llvm.lifetime.start.p0(i64 1, ptr %26) #6
  %128 = getelementptr inbounds %"struct.cgp::camera_controller_generic_base", ptr %32, i32 0, i32 1
  %129 = load ptr, ptr %128, align 8, !tbaa !9
  %130 = getelementptr inbounds %"struct.cgp::input_devices", ptr %129, i32 0, i32 1
  %131 = getelementptr inbounds %"struct.cgp::inputs_mouse_parameters", ptr %130, i32 0, i32 1
  %132 = getelementptr inbounds %"struct.cgp::inputs_mouse_cursor_click_parameters", ptr %131, i32 0, i32 0
  %133 = load i8, ptr %132, align 8, !tbaa !37, !range !14, !noundef !15
  %134 = trunc i8 %133 to i1
  %135 = zext i1 %134 to i8
  store i8 %135, ptr %26, align 1, !tbaa !36
  call void @llvm.lifetime.start.p0(i64 1, ptr %27) #6
  %136 = getelementptr inbounds %"struct.cgp::camera_controller_generic_base", ptr %32, i32 0, i32 1
  %137 = load ptr, ptr %136, align 8, !tbaa !9
  %138 = getelementptr inbounds %"struct.cgp::input_devices", ptr %137, i32 0, i32 1
  %139 = getelementptr inbounds %"struct.cgp::inputs_mouse_parameters", ptr %138, i32 0, i32 1
  %140 = getelementptr inbounds %"struct.cgp::inputs_mouse_cursor_click_parameters", ptr %139, i32 0, i32 1
  %141 = load i8, ptr %140, align 1, !tbaa !38, !range !14, !noundef !15
  %142 = trunc i8 %141 to i1
  %143 = zext i1 %142 to i8
  store i8 %143, ptr %27, align 1, !tbaa !36
  call void @llvm.lifetime.start.p0(i64 1, ptr %28) #6
  %144 = getelementptr inbounds %"struct.cgp::camera_controller_generic_base", ptr %32, i32 0, i32 1
  %145 = load ptr, ptr %144, align 8, !tbaa !9
  %146 = getelementptr inbounds %"struct.cgp::input_devices", ptr %145, i32 0, i32 0
  %147 = getelementptr inbounds %"struct.cgp::inputs_keyboard_parameters", ptr %146, i32 0, i32 1
  %148 = load i8, ptr %147, align 1, !tbaa !39, !range !14, !noundef !15
  %149 = trunc i8 %148 to i1
  %150 = zext i1 %149 to i8
  store i8 %150, ptr %28, align 1, !tbaa !36
  %151 = load i8, ptr %25, align 1, !tbaa !36, !range !14, !noundef !15
  %152 = trunc i8 %151 to i1
  br i1 %152, label %153, label %204

153:                                              ; preds = %109
  %154 = load i8, ptr %26, align 1, !tbaa !36, !range !14, !noundef !15
  %155 = trunc i8 %154 to i1
  br i1 %155, label %156, label %163

156:                                              ; preds = %153
  %157 = load i8, ptr %28, align 1, !tbaa !36, !range !14, !noundef !15
  %158 = trunc i8 %157 to i1
  br i1 %158, label %163, label %159

159:                                              ; preds = %156
  %160 = getelementptr inbounds %"struct.cgp::camera_controller_orbit", ptr %32, i32 0, i32 1
  %161 = load ptr, ptr %24, align 8, !tbaa !5
  %162 = load ptr, ptr %23, align 8, !tbaa !5
  call void @_ZN3cgp12camera_orbit26manipulator_rotate_arcballERKNS_14numarray_stackIfLi2EEES4_(ptr noundef nonnull align 8 dereferenceable(40) %160, ptr noundef nonnull align 4 dereferenceable(8) %161, ptr noundef nonnull align 4 dereferenceable(8) %162)
  br label %203

163:                                              ; preds = %156, %153
  %164 = load i8, ptr %26, align 1, !tbaa !36, !range !14, !noundef !15
  %165 = trunc i8 %164 to i1
  br i1 %165, label %166, label %174

166:                                              ; preds = %163
  %167 = load i8, ptr %28, align 1, !tbaa !36, !range !14, !noundef !15
  %168 = trunc i8 %167 to i1
  br i1 %168, label %169, label %174

169:                                              ; preds = %166
  %170 = getelementptr inbounds %"struct.cgp::camera_controller_orbit", ptr %32, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #6
  %171 = load ptr, ptr %23, align 8, !tbaa !5
  %172 = load ptr, ptr %24, align 8, !tbaa !5
  %173 = call <2 x float> @_ZN3cgpmiIfLi2EEENS_14numarray_stackIT_XT0_EEERKS3_S5_(ptr noundef nonnull align 4 dereferenceable(8) %171, ptr noundef nonnull align 4 dereferenceable(8) %172)
  store <2 x float> %173, ptr %29, align 4
  call void @_ZN3cgp12camera_orbit30manipulator_translate_in_planeERKNS_14numarray_stackIfLi2EEE(ptr noundef nonnull align 8 dereferenceable(40) %170, ptr noundef nonnull align 4 dereferenceable(8) %29)
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #6
  br label %202

174:                                              ; preds = %166, %163
  %175 = load i8, ptr %27, align 1, !tbaa !36, !range !14, !noundef !15
  %176 = trunc i8 %175 to i1
  br i1 %176, label %177, label %187

177:                                              ; preds = %174
  %178 = load i8, ptr %28, align 1, !tbaa !36, !range !14, !noundef !15
  %179 = trunc i8 %178 to i1
  br i1 %179, label %187, label %180

180:                                              ; preds = %177
  %181 = getelementptr inbounds %"struct.cgp::camera_controller_orbit", ptr %32, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #6
  %182 = load ptr, ptr %23, align 8, !tbaa !5
  %183 = load ptr, ptr %24, align 8, !tbaa !5
  %184 = call <2 x float> @_ZN3cgpmiIfLi2EEENS_14numarray_stackIT_XT0_EEERKS3_S5_(ptr noundef nonnull align 4 dereferenceable(8) %182, ptr noundef nonnull align 4 dereferenceable(8) %183)
  store <2 x float> %184, ptr %30, align 4
  %185 = getelementptr inbounds %"struct.cgp::numarray_stack.5", ptr %30, i32 0, i32 1
  %186 = load float, ptr %185, align 4, !tbaa !40
  call void @_ZN3cgp12camera_orbit36manipulator_scale_distance_to_centerEf(ptr noundef nonnull align 8 dereferenceable(40) %181, float noundef %186)
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #6
  br label %201

187:                                              ; preds = %177, %174
  %188 = load i8, ptr %27, align 1, !tbaa !36, !range !14, !noundef !15
  %189 = trunc i8 %188 to i1
  br i1 %189, label %190, label %200

190:                                              ; preds = %187
  %191 = load i8, ptr %28, align 1, !tbaa !36, !range !14, !noundef !15
  %192 = trunc i8 %191 to i1
  br i1 %192, label %193, label %200

193:                                              ; preds = %190
  %194 = getelementptr inbounds %"struct.cgp::camera_controller_orbit", ptr %32, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #6
  %195 = load ptr, ptr %23, align 8, !tbaa !5
  %196 = load ptr, ptr %24, align 8, !tbaa !5
  %197 = call <2 x float> @_ZN3cgpmiIfLi2EEENS_14numarray_stackIT_XT0_EEERKS3_S5_(ptr noundef nonnull align 4 dereferenceable(8) %195, ptr noundef nonnull align 4 dereferenceable(8) %196)
  store <2 x float> %197, ptr %31, align 4
  %198 = getelementptr inbounds %"struct.cgp::numarray_stack.5", ptr %31, i32 0, i32 1
  %199 = load float, ptr %198, align 4, !tbaa !40
  call void @_ZN3cgp12camera_orbit27manipulator_translate_frontEf(ptr noundef nonnull align 8 dereferenceable(40) %194, float noundef %199)
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #6
  br label %200

200:                                              ; preds = %193, %190, %187
  br label %201

201:                                              ; preds = %200, %180
  br label %202

202:                                              ; preds = %201, %169
  br label %203

203:                                              ; preds = %202, %159
  br label %204

204:                                              ; preds = %203, %109
  %205 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN3cgp23camera_controller_orbit6updateERNS_12matrix_stackIfLi4ELi4EEE(ptr noundef nonnull align 8 dereferenceable(64) %32, ptr noundef nonnull align 4 dereferenceable(64) %205)
  call void @llvm.lifetime.end.p0(i64 1, ptr %28) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %26) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  br label %206

206:                                              ; preds = %204, %108
  ret void

207:                                              ; preds = %103, %67
  %208 = load ptr, ptr %7, align 8
  %209 = load i32, ptr %8, align 4
  %210 = insertvalue { ptr, i32 } poison, ptr %208, 0
  %211 = insertvalue { ptr, i32 } %210, i32 %209, 1
  resume { ptr, i32 } %211
}

; Function Attrs: noreturn
declare void @_ZN3cgp10call_errorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_S7_S7_i(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) #3

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

declare void @_ZN3cgp12camera_orbit26manipulator_rotate_arcballERKNS_14numarray_stackIfLi2EEES4_(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) #5

declare void @_ZN3cgp12camera_orbit30manipulator_translate_in_planeERKNS_14numarray_stackIfLi2EEE(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 4 dereferenceable(8)) #5

; Function Attrs: mustprogress uwtable
declare dso_local <2 x float> @_ZN3cgpmiIfLi2EEENS_14numarray_stackIT_XT0_EEERKS3_S5_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) #2

declare void @_ZN3cgp12camera_orbit36manipulator_scale_distance_to_centerEf(ptr noundef nonnull align 8 dereferenceable(40), float noundef) #5

declare void @_ZN3cgp12camera_orbit27manipulator_translate_frontEf(ptr noundef nonnull align 8 dereferenceable(40), float noundef) #5

; 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 = { 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 uwtable "min-legal-vector-width"="64" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { noreturn "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 = { "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 }
attributes #7 = { noreturn }

!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, !6, i64 8}
!10 = !{!"_ZTSN3cgp30camera_controller_generic_baseE", !11, i64 0, !6, i64 8, !6, i64 16}
!11 = !{!"bool", !7, i64 0}
!12 = !{!10, !6, i64 16}
!13 = !{!10, !11, i64 0}
!14 = !{i8 0, i8 2}
!15 = !{}
!16 = !{!17, !11, i64 92}
!17 = !{!"_ZTSN3cgp13input_devicesE", !18, i64 0, !30, i64 64, !33, i64 96}
!18 = !{!"_ZTSN3cgp26inputs_keyboard_parametersE", !11, i64 0, !11, i64 1, !11, i64 2, !11, i64 3, !11, i64 4, !11, i64 5, !19, i64 8, !21, i64 16}
!19 = !{!"_ZTSN3cgp37inputs_keyboard_last_action_parameterE", !20, i64 0, !20, i64 4}
!20 = !{!"int", !7, i64 0}
!21 = !{!"_ZTSSt3setIiSt4lessIiESaIiEE", !22, i64 0}
!22 = !{!"_ZTSSt8_Rb_treeIiiSt9_IdentityIiESt4lessIiESaIiEE", !23, i64 0}
!23 = !{!"_ZTSNSt8_Rb_treeIiiSt9_IdentityIiESt4lessIiESaIiEE13_Rb_tree_implIS3_Lb1EEE", !24, i64 0, !26, i64 8}
!24 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIiEE", !25, i64 0}
!25 = !{!"_ZTSSt4lessIiE"}
!26 = !{!"_ZTSSt15_Rb_tree_header", !27, i64 0, !29, i64 32}
!27 = !{!"_ZTSSt18_Rb_tree_node_base", !28, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!28 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!29 = !{!"long", !7, i64 0}
!30 = !{!"_ZTSN3cgp23inputs_mouse_parametersE", !31, i64 0, !34, i64 16, !33, i64 24, !11, i64 28}
!31 = !{!"_ZTSN3cgp39inputs_mouse_cursor_position_parametersE", !32, i64 0, !32, i64 8}
!32 = !{!"_ZTSN3cgp14numarray_stackIfLi2EEE", !33, i64 0, !33, i64 4}
!33 = !{!"float", !7, i64 0}
!34 = !{!"_ZTSN3cgp36inputs_mouse_cursor_click_parametersE", !11, i64 0, !11, i64 1, !35, i64 4}
!35 = !{!"_ZTSN3cgp24last_mouse_cursor_actionE", !7, i64 0}
!36 = !{!11, !11, i64 0}
!37 = !{!17, !11, i64 80}
!38 = !{!17, !11, i64 81}
!39 = !{!17, !11, i64 1}
!40 = !{!32, !33, i64 4}


; 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_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::allocator" = type { i8 }
%"struct.cgp::numarray_stack.5" = type { float, float }

@.str = external hidden unnamed_addr constant [18 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [130 x i8], align 1
@__func__._ZN3cgp23camera_controller_orbit17action_mouse_moveERNS_12matrix_stackIfLi4ELi4EEE = external hidden unnamed_addr constant [18 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [18 x i8], align 1

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

; 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
define dso_local void @_ZN3cgp23camera_controller_orbit17action_mouse_moveERNS_12matrix_stackIfLi4ELi4EEE(ptr noundef nonnull align 8 dereferenceable(64) %0, ptr noundef nonnull align 4 dereferenceable(64) %1) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::__cxx11::basic_string", align 8
  %4 = alloca %"class.std::allocator", align 1
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = alloca %"class.std::allocator", align 1
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca %"class.std::allocator", align 1
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  %10 = alloca %"class.std::allocator", align 1
  %11 = alloca %"class.std::__cxx11::basic_string", align 8
  %12 = alloca %"class.std::allocator", align 1
  %13 = alloca %"class.std::__cxx11::basic_string", align 8
  %14 = alloca %"class.std::allocator", align 1
  %15 = alloca %"class.std::__cxx11::basic_string", align 8
  %16 = alloca %"class.std::allocator", align 1
  %17 = alloca %"class.std::__cxx11::basic_string", align 8
  %18 = alloca %"class.std::allocator", align 1
  %19 = alloca %"struct.cgp::numarray_stack.5", align 8
  %20 = getelementptr inbounds i8, ptr %0, i64 8
  %21 = load ptr, ptr %20, align 8, !tbaa !5
  %.not = icmp eq ptr %21, null
  br i1 %.not, label %22, label %42

22:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull @.str, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %23 unwind label %28

23:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull @.str.1, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %24 unwind label %30

24:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull @.str.2, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %25 unwind label %32

25:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %10) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull @__func__._ZN3cgp23camera_controller_orbit17action_mouse_moveERNS_12matrix_stackIfLi4ELi4EEE, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %26 unwind label %34

26:                                               ; preds = %25
  invoke void @_ZN3cgp10call_errorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_S7_S7_i(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull align 8 dereferenceable(32) %9, i32 noundef 15) #7
          to label %27 unwind label %36

27:                                               ; preds = %26
  unreachable

28:                                               ; preds = %22
  %29 = landingpad { ptr, i32 }
          cleanup
  br label %41

30:                                               ; preds = %23
  %31 = landingpad { ptr, i32 }
          cleanup
  br label %40

32:                                               ; preds = %24
  %33 = landingpad { ptr, i32 }
          cleanup
  br label %39

34:                                               ; preds = %25
  %35 = landingpad { ptr, i32 }
          cleanup
  br label %38

36:                                               ; preds = %26
  %37 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #6
  br label %38

38:                                               ; preds = %36, %34
  %.pn35 = phi { ptr, i32 } [ %37, %36 ], [ %35, %34 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #6
  br label %39

39:                                               ; preds = %38, %32
  %.pn35.pn = phi { ptr, i32 } [ %.pn35, %38 ], [ %33, %32 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #6
  br label %40

40:                                               ; preds = %39, %30
  %.pn35.pn.pn = phi { ptr, i32 } [ %.pn35.pn, %39 ], [ %31, %30 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #6
  br label %41

41:                                               ; preds = %40, %28
  %.pn35.pn.pn.pn = phi { ptr, i32 } [ %.pn35.pn.pn, %40 ], [ %29, %28 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #6
  br label %100

42:                                               ; preds = %2
  %43 = getelementptr inbounds i8, ptr %0, i64 16
  %44 = load ptr, ptr %43, align 8, !tbaa !11
  %.not30 = icmp eq ptr %44, null
  br i1 %.not30, label %45, label %65

45:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %11) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %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 nonnull @.str.3, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %46 unwind label %51

46:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %13) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %14) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef nonnull @.str.1, ptr noundef nonnull align 1 dereferenceable(1) %14)
          to label %47 unwind label %53

47:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %15) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %16) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef nonnull @.str.2, ptr noundef nonnull align 1 dereferenceable(1) %16)
          to label %48 unwind label %55

48:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %17) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %18) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef nonnull @__func__._ZN3cgp23camera_controller_orbit17action_mouse_moveERNS_12matrix_stackIfLi4ELi4EEE, ptr noundef nonnull align 1 dereferenceable(1) %18)
          to label %49 unwind label %57

49:                                               ; preds = %48
  invoke void @_ZN3cgp10call_errorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_S7_S7_i(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef nonnull align 8 dereferenceable(32) %17, i32 noundef 16) #7
          to label %50 unwind label %59

50:                                               ; preds = %49
  unreachable

51:                                               ; preds = %45
  %52 = landingpad { ptr, i32 }
          cleanup
  br label %64

53:                                               ; preds = %46
  %54 = landingpad { ptr, i32 }
          cleanup
  br label %63

55:                                               ; preds = %47
  %56 = landingpad { ptr, i32 }
          cleanup
  br label %62

57:                                               ; preds = %48
  %58 = landingpad { ptr, i32 }
          cleanup
  br label %61

59:                                               ; preds = %49
  %60 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #6
  br label %61

61:                                               ; preds = %59, %57
  %.pn = phi { ptr, i32 } [ %60, %59 ], [ %58, %57 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %18) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %17) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #6
  br label %62

62:                                               ; preds = %61, %55
  %.pn.pn = phi { ptr, i32 } [ %.pn, %61 ], [ %56, %55 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %16) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %15) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #6
  br label %63

63:                                               ; preds = %62, %53
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %62 ], [ %54, %53 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %14) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %13) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #6
  br label %64

64:                                               ; preds = %63, %51
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %63 ], [ %52, %51 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #6
  br label %100

65:                                               ; preds = %42
  %66 = load i8, ptr %0, align 8, !tbaa !12, !range !13, !noundef !14
  %67 = trunc nuw i8 %66 to i1
  br i1 %67, label %68, label %99

68:                                               ; preds = %65
  %69 = getelementptr inbounds i8, ptr %21, i64 64
  %70 = getelementptr inbounds i8, ptr %21, i64 72
  %71 = getelementptr inbounds i8, ptr %21, i64 92
  %72 = load i8, ptr %71, align 4, !tbaa !15, !range !13, !noundef !14
  %73 = trunc nuw i8 %72 to i1
  %74 = getelementptr inbounds i8, ptr %21, i64 81
  %75 = load i8, ptr %74, align 1, !tbaa !35, !range !13, !noundef !14
  %76 = trunc nuw i8 %75 to i1
  %77 = getelementptr inbounds i8, ptr %21, i64 1
  %78 = load i8, ptr %77, align 1, !tbaa !36, !range !13, !noundef !14
  %79 = trunc nuw i8 %78 to i1
  br i1 %73, label %98, label %80

80:                                               ; preds = %68
  %81 = getelementptr inbounds i8, ptr %21, i64 80
  %82 = load i8, ptr %81, align 8, !tbaa !37, !range !13, !noundef !14
  %83 = trunc nuw i8 %82 to i1
  %.not41 = xor i1 %83, true
  %brmerge = select i1 %.not41, i1 true, i1 %79
  br i1 %brmerge, label %86, label %84

84:                                               ; preds = %80
  %85 = getelementptr inbounds i8, ptr %0, i64 24
  tail call void @_ZN3cgp12camera_orbit26manipulator_rotate_arcballERKNS_14numarray_stackIfLi2EEES4_(ptr noundef nonnull align 8 dereferenceable(40) %85, ptr noundef nonnull align 4 dereferenceable(8) %70, ptr noundef nonnull align 4 dereferenceable(8) %69)
  br label %98

86:                                               ; preds = %80
  %.not43 = xor i1 %79, true
  %brmerge44 = select i1 %.not41, i1 true, i1 %.not43
  br i1 %brmerge44, label %90, label %87

87:                                               ; preds = %86
  %88 = getelementptr inbounds i8, ptr %0, i64 24
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #6
  %89 = tail call <2 x float> @_ZN3cgpmiIfLi2EEENS_14numarray_stackIT_XT0_EEERKS3_S5_(ptr noundef nonnull align 4 dereferenceable(8) %69, ptr noundef nonnull align 4 dereferenceable(8) %70)
  store <2 x float> %89, ptr %19, align 8
  call void @_ZN3cgp12camera_orbit30manipulator_translate_in_planeERKNS_14numarray_stackIfLi2EEE(ptr noundef nonnull align 8 dereferenceable(40) %88, ptr noundef nonnull align 4 dereferenceable(8) %19)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #6
  br label %98

90:                                               ; preds = %86
  %.not45 = xor i1 %76, true
  %brmerge46 = select i1 %.not45, i1 true, i1 %79
  br i1 %brmerge46, label %94, label %91

91:                                               ; preds = %90
  %92 = getelementptr inbounds i8, ptr %0, i64 24
  %93 = tail call <2 x float> @_ZN3cgpmiIfLi2EEENS_14numarray_stackIT_XT0_EEERKS3_S5_(ptr noundef nonnull align 4 dereferenceable(8) %69, ptr noundef nonnull align 4 dereferenceable(8) %70)
  %.sroa.01.4.vec.extract = extractelement <2 x float> %93, i64 1
  tail call void @_ZN3cgp12camera_orbit36manipulator_scale_distance_to_centerEf(ptr noundef nonnull align 8 dereferenceable(40) %92, float noundef %.sroa.01.4.vec.extract)
  br label %98

94:                                               ; preds = %90
  %brmerge49 = select i1 %.not45, i1 true, i1 %.not43
  br i1 %brmerge49, label %98, label %95

95:                                               ; preds = %94
  %96 = getelementptr inbounds i8, ptr %0, i64 24
  %97 = tail call <2 x float> @_ZN3cgpmiIfLi2EEENS_14numarray_stackIT_XT0_EEERKS3_S5_(ptr noundef nonnull align 4 dereferenceable(8) %69, ptr noundef nonnull align 4 dereferenceable(8) %70)
  %.sroa.0.4.vec.extract = extractelement <2 x float> %97, i64 1
  tail call void @_ZN3cgp12camera_orbit27manipulator_translate_frontEf(ptr noundef nonnull align 8 dereferenceable(40) %96, float noundef %.sroa.0.4.vec.extract)
  br label %98

98:                                               ; preds = %94, %84, %91, %95, %87, %68
  call void @_ZN3cgp23camera_controller_orbit6updateERNS_12matrix_stackIfLi4ELi4EEE(ptr noundef nonnull align 8 dereferenceable(64) %0, ptr noundef nonnull align 4 dereferenceable(64) %1)
  br label %99

99:                                               ; preds = %65, %98
  ret void

100:                                              ; preds = %64, %41
  %.pn35.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn35.pn.pn.pn, %41 ], [ %.pn.pn.pn.pn, %64 ]
  resume { ptr, i32 } %.pn35.pn.pn.pn.pn
}

; Function Attrs: noreturn
declare void @_ZN3cgp10call_errorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_S7_S7_i(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) local_unnamed_addr #3

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

declare void @_ZN3cgp12camera_orbit26manipulator_rotate_arcballERKNS_14numarray_stackIfLi2EEES4_(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #5

declare void @_ZN3cgp12camera_orbit30manipulator_translate_in_planeERKNS_14numarray_stackIfLi2EEE(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare dso_local <2 x float> @_ZN3cgpmiIfLi2EEENS_14numarray_stackIT_XT0_EEERKS3_S5_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #2

declare void @_ZN3cgp12camera_orbit36manipulator_scale_distance_to_centerEf(ptr noundef nonnull align 8 dereferenceable(40), float noundef) local_unnamed_addr #5

declare void @_ZN3cgp12camera_orbit27manipulator_translate_frontEf(ptr noundef nonnull align 8 dereferenceable(40), float noundef) local_unnamed_addr #5

; 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 = { 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 uwtable "min-legal-vector-width"="64" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { noreturn "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 = { "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 }
attributes #7 = { noreturn }

!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, !10, i64 8}
!6 = !{!"_ZTSN3cgp30camera_controller_generic_baseE", !7, i64 0, !10, i64 8, !10, i64 16}
!7 = !{!"bool", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!6, !10, i64 16}
!12 = !{!6, !7, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = !{!16, !7, i64 92}
!16 = !{!"_ZTSN3cgp13input_devicesE", !17, i64 0, !29, i64 64, !32, i64 96}
!17 = !{!"_ZTSN3cgp26inputs_keyboard_parametersE", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !7, i64 4, !7, i64 5, !18, i64 8, !20, i64 16}
!18 = !{!"_ZTSN3cgp37inputs_keyboard_last_action_parameterE", !19, i64 0, !19, i64 4}
!19 = !{!"int", !8, i64 0}
!20 = !{!"_ZTSSt3setIiSt4lessIiESaIiEE", !21, i64 0}
!21 = !{!"_ZTSSt8_Rb_treeIiiSt9_IdentityIiESt4lessIiESaIiEE", !22, i64 0}
!22 = !{!"_ZTSNSt8_Rb_treeIiiSt9_IdentityIiESt4lessIiESaIiEE13_Rb_tree_implIS3_Lb1EEE", !23, i64 0, !25, i64 8}
!23 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIiEE", !24, i64 0}
!24 = !{!"_ZTSSt4lessIiE"}
!25 = !{!"_ZTSSt15_Rb_tree_header", !26, i64 0, !28, i64 32}
!26 = !{!"_ZTSSt18_Rb_tree_node_base", !27, i64 0, !10, i64 8, !10, i64 16, !10, i64 24}
!27 = !{!"_ZTSSt14_Rb_tree_color", !8, i64 0}
!28 = !{!"long", !8, i64 0}
!29 = !{!"_ZTSN3cgp23inputs_mouse_parametersE", !30, i64 0, !33, i64 16, !32, i64 24, !7, i64 28}
!30 = !{!"_ZTSN3cgp39inputs_mouse_cursor_position_parametersE", !31, i64 0, !31, i64 8}
!31 = !{!"_ZTSN3cgp14numarray_stackIfLi2EEE", !32, i64 0, !32, i64 4}
!32 = !{!"float", !8, i64 0}
!33 = !{!"_ZTSN3cgp36inputs_mouse_cursor_click_parametersE", !7, i64 0, !7, i64 1, !34, i64 4}
!34 = !{!"_ZTSN3cgp24last_mouse_cursor_actionE", !8, i64 0}
!35 = !{!16, !7, i64 81}
!36 = !{!16, !7, i64 1}
!37 = !{!16, !7, i64 80}


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