; LLVM IR from niessner/Matterport :: code/gaps/pkgs/R3Graphics/R3Viewer.ll (ZN8R3Viewer10WalkCameraEddddiiiiii)

; 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.R3Vector = type { [3 x double] }
%class.R3Plane = type { %class.R3Vector, double }
%class.R3Viewer = type { ptr, %class.R3Camera, %class.R2Viewport }
%class.R3Camera = type { %class.R3CoordSystem, double, double, double, double, double, ptr }
%class.R3CoordSystem = type { %class.R3Point, %class.R3Triad }
%class.R3Point = type { [3 x double] }
%class.R3Triad = type { [3 x %class.R3Vector] }
%class.R2Viewport = type { i32, i32, i32, i32 }

@RN_EPSILON = external global double, align 8
@R3default_camera_up_vector = external global %class.R3Vector, align 8

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK10R2Viewport5WidthEv(ptr noundef nonnull align 4 dereferenceable(16)) #1 align 2

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

declare void @_ZmlRK8R3Vectord(ptr dead_on_unwind writable sret(%class.R3Vector) align 8, ptr noundef nonnull align 8 dereferenceable(24), double noundef) #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNK8R3Camera6OriginEv(ptr noundef nonnull align 8 dereferenceable(144)) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK8R3Camera7TowardsEv(ptr dead_on_unwind noalias writable sret(%class.R3Vector) align 8, ptr noundef nonnull align 8 dereferenceable(144)) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN8R3Viewer15TranslateCameraERK8R3Vector(ptr noundef nonnull align 8 dereferenceable(168), ptr noundef nonnull align 8 dereferenceable(24)) #3 align 2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_Z11RNIsNotZerodd(double noundef, double noundef) #3

declare noundef double @_ZNK8R3Camera3YawEv(ptr noundef nonnull align 8 dereferenceable(144)) #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_Z8RNIsZerodd(double noundef, double noundef) #3

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

declare noundef double @_ZNK8R3Camera4RollEv(ptr noundef nonnull align 8 dereferenceable(144)) #2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8R3Viewer10WalkCameraEddddiiiiii(ptr noundef nonnull align 8 dereferenceable(168) %0, double noundef %1, double noundef %2, double noundef %3, double noundef %4, i32 noundef %5, i32 noundef %6, i32 noundef %7, i32 noundef %8, i32 noundef %9, i32 noundef %10) unnamed_addr #5 align 2 {
  %12 = alloca ptr, align 8
  %13 = alloca double, align 8
  %14 = alloca double, align 8
  %15 = alloca double, align 8
  %16 = alloca double, align 8
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca double, align 8
  %24 = alloca %class.R3Vector, align 8
  %25 = alloca %class.R3Plane, align 8
  %26 = alloca %class.R3Vector, align 8
  store ptr %0, ptr %12, align 8, !tbaa !5
  store double %1, ptr %13, align 8, !tbaa !9
  store double %2, ptr %14, align 8, !tbaa !9
  store double %3, ptr %15, align 8, !tbaa !9
  store double %4, ptr %16, align 8, !tbaa !9
  store i32 %5, ptr %17, align 4, !tbaa !11
  store i32 %6, ptr %18, align 4, !tbaa !11
  store i32 %7, ptr %19, align 4, !tbaa !11
  store i32 %8, ptr %20, align 4, !tbaa !11
  store i32 %9, ptr %21, align 4, !tbaa !11
  store i32 %10, ptr %22, align 4, !tbaa !11
  %27 = load ptr, ptr %12, align 8
  %28 = load double, ptr %13, align 8, !tbaa !9
  %29 = load double, ptr @RN_EPSILON, align 8, !tbaa !9
  %30 = call noundef i32 @_Z11RNIsNotZerodd(double noundef %28, double noundef %29)
  %31 = icmp ne i32 %30, 0
  br i1 %31, label %32, label %41

32:                                               ; preds = %11
  %33 = load double, ptr %13, align 8, !tbaa !9
  %34 = load i32, ptr %19, align 4, !tbaa !11
  %35 = load i32, ptr %20, align 4, !tbaa !11
  %36 = load i32, ptr %21, align 4, !tbaa !11
  %37 = load i32, ptr %22, align 4, !tbaa !11
  %38 = load ptr, ptr %27, align 8, !tbaa !13
  %39 = getelementptr inbounds ptr, ptr %38, i64 4
  %40 = load ptr, ptr %39, align 8
  call void %40(ptr noundef nonnull align 8 dereferenceable(168) %27, double noundef %33, i32 noundef %34, i32 noundef %35, i32 noundef %36, i32 noundef %37)
  br label %41

41:                                               ; preds = %32, %11
  %42 = load double, ptr %14, align 8, !tbaa !9
  %43 = load double, ptr @RN_EPSILON, align 8, !tbaa !9
  %44 = call noundef i32 @_Z11RNIsNotZerodd(double noundef %42, double noundef %43)
  %45 = icmp ne i32 %44, 0
  br i1 %45, label %46, label %55

46:                                               ; preds = %41
  %47 = load double, ptr %14, align 8, !tbaa !9
  %48 = load i32, ptr %19, align 4, !tbaa !11
  %49 = load i32, ptr %20, align 4, !tbaa !11
  %50 = load i32, ptr %21, align 4, !tbaa !11
  %51 = load i32, ptr %22, align 4, !tbaa !11
  %52 = load ptr, ptr %27, align 8, !tbaa !13
  %53 = getelementptr inbounds ptr, ptr %52, i64 5
  %54 = load ptr, ptr %53, align 8
  call void %54(ptr noundef nonnull align 8 dereferenceable(168) %27, double noundef %47, i32 noundef %48, i32 noundef %49, i32 noundef %50, i32 noundef %51)
  br label %79

55:                                               ; preds = %41
  %56 = load i32, ptr %17, align 4, !tbaa !11
  %57 = icmp ne i32 %56, 0
  br i1 %57, label %58, label %78

58:                                               ; preds = %55
  %59 = getelementptr inbounds %class.R3Viewer, ptr %27, i32 0, i32 1
  %60 = call noundef double @_ZNK8R3Camera3YawEv(ptr noundef nonnull align 8 dereferenceable(144) %59)
  %61 = load double, ptr @RN_EPSILON, align 8, !tbaa !9
  %62 = call noundef i32 @_Z11RNIsNotZerodd(double noundef %60, double noundef %61)
  %63 = icmp ne i32 %62, 0
  br i1 %63, label %64, label %78

64:                                               ; preds = %58
  %65 = getelementptr inbounds %class.R3Viewer, ptr %27, i32 0, i32 1
  %66 = call noundef double @_ZNK8R3Camera3YawEv(ptr noundef nonnull align 8 dereferenceable(144) %65)
  %67 = call noundef i32 @_Z8RNIsZerodd(double noundef %66, double noundef 5.000000e-03)
  %68 = icmp ne i32 %67, 0
  br i1 %68, label %69, label %73

69:                                               ; preds = %64
  %70 = getelementptr inbounds %class.R3Viewer, ptr %27, i32 0, i32 1
  %71 = call noundef double @_ZNK8R3Camera3YawEv(ptr noundef nonnull align 8 dereferenceable(144) %70)
  %72 = fmul double -1.000000e+00, %71
  call void @_ZN8R3Viewer15RotateCameraYawEd(ptr noundef nonnull align 8 dereferenceable(168) %27, double noundef %72)
  br label %77

73:                                               ; preds = %64
  %74 = getelementptr inbounds %class.R3Viewer, ptr %27, i32 0, i32 1
  %75 = call noundef double @_ZNK8R3Camera3YawEv(ptr noundef nonnull align 8 dereferenceable(144) %74)
  %76 = fmul double -5.000000e-02, %75
  call void @_ZN8R3Viewer15RotateCameraYawEd(ptr noundef nonnull align 8 dereferenceable(168) %27, double noundef %76)
  br label %77

77:                                               ; preds = %73, %69
  br label %78

78:                                               ; preds = %77, %58, %55
  br label %79

79:                                               ; preds = %78, %46
  %80 = load double, ptr %15, align 8, !tbaa !9
  %81 = load double, ptr @RN_EPSILON, align 8, !tbaa !9
  %82 = call noundef i32 @_Z11RNIsNotZerodd(double noundef %80, double noundef %81)
  %83 = icmp ne i32 %82, 0
  br i1 %83, label %84, label %93

84:                                               ; preds = %79
  %85 = load double, ptr %15, align 8, !tbaa !9
  %86 = load i32, ptr %19, align 4, !tbaa !11
  %87 = load i32, ptr %20, align 4, !tbaa !11
  %88 = load i32, ptr %21, align 4, !tbaa !11
  %89 = load i32, ptr %22, align 4, !tbaa !11
  %90 = load ptr, ptr %27, align 8, !tbaa !13
  %91 = getelementptr inbounds ptr, ptr %90, i64 6
  %92 = load ptr, ptr %91, align 8
  call void %92(ptr noundef nonnull align 8 dereferenceable(168) %27, double noundef %85, i32 noundef %86, i32 noundef %87, i32 noundef %88, i32 noundef %89)
  br label %116

93:                                               ; preds = %79
  %94 = load i32, ptr %18, align 4, !tbaa !11
  %95 = icmp ne i32 %94, 0
  br i1 %95, label %96, label %115

96:                                               ; preds = %93
  %97 = getelementptr inbounds %class.R3Viewer, ptr %27, i32 0, i32 1
  %98 = call noundef double @_ZNK8R3Camera4RollEv(ptr noundef nonnull align 8 dereferenceable(144) %97)
  %99 = load double, ptr @RN_EPSILON, align 8, !tbaa !9
  %100 = call noundef i32 @_Z11RNIsNotZerodd(double noundef %98, double noundef %99)
  %101 = icmp ne i32 %100, 0
  br i1 %101, label %102, label %115

102:                                              ; preds = %96
  %103 = getelementptr inbounds %class.R3Viewer, ptr %27, i32 0, i32 1
  %104 = call noundef double @_ZNK8R3Camera4RollEv(ptr noundef nonnull align 8 dereferenceable(144) %103)
  %105 = fcmp olt double %104, 1.000000e-02
  br i1 %105, label %106, label %110

106:                                              ; preds = %102
  %107 = getelementptr inbounds %class.R3Viewer, ptr %27, i32 0, i32 1
  %108 = call noundef double @_ZNK8R3Camera4RollEv(ptr noundef nonnull align 8 dereferenceable(144) %107)
  %109 = fmul double -1.000000e+00, %108
  call void @_ZN8R3Viewer16RotateCameraRollEd(ptr noundef nonnull align 8 dereferenceable(168) %27, double noundef %109)
  br label %114

110:                                              ; preds = %102
  %111 = getelementptr inbounds %class.R3Viewer, ptr %27, i32 0, i32 1
  %112 = call noundef double @_ZNK8R3Camera4RollEv(ptr noundef nonnull align 8 dereferenceable(144) %111)
  %113 = fmul double -5.000000e-02, %112
  call void @_ZN8R3Viewer16RotateCameraRollEd(ptr noundef nonnull align 8 dereferenceable(168) %27, double noundef %113)
  br label %114

114:                                              ; preds = %110, %106
  br label %115

115:                                              ; preds = %114, %96, %93
  br label %116

116:                                              ; preds = %115, %84
  %117 = load double, ptr %16, align 8, !tbaa !9
  %118 = load double, ptr @RN_EPSILON, align 8, !tbaa !9
  %119 = call noundef i32 @_Z11RNIsNotZerodd(double noundef %117, double noundef %118)
  %120 = icmp ne i32 %119, 0
  br i1 %120, label %121, label %151

121:                                              ; preds = %116
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #6
  %122 = load i32, ptr %19, align 4, !tbaa !11
  %123 = mul nsw i32 2, %122
  %124 = getelementptr inbounds %class.R3Viewer, ptr %27, i32 0, i32 2
  %125 = call noundef i32 @_ZNK10R2Viewport5WidthEv(ptr noundef nonnull align 4 dereferenceable(16) %124)
  %126 = sub nsw i32 %123, %125
  %127 = sitofp i32 %126 to double
  %128 = getelementptr inbounds %class.R3Viewer, ptr %27, i32 0, i32 2
  %129 = call noundef i32 @_ZNK10R2Viewport5WidthEv(ptr noundef nonnull align 4 dereferenceable(16) %128)
  %130 = sitofp i32 %129 to double
  %131 = fdiv double %127, %130
  store double %131, ptr %23, align 8, !tbaa !9
  %132 = load double, ptr %23, align 8, !tbaa !9
  %133 = fcmp ogt double %132, 1.000000e+00
  br i1 %133, label %134, label %135

134:                                              ; preds = %121
  store double 1.000000e+00, ptr %23, align 8, !tbaa !9
  br label %140

135:                                              ; preds = %121
  %136 = load double, ptr %23, align 8, !tbaa !9
  %137 = fcmp olt double %136, -1.000000e+00
  br i1 %137, label %138, label %139

138:                                              ; preds = %135
  store double -1.000000e+00, ptr %23, align 8, !tbaa !9
  br label %139

139:                                              ; preds = %138, %135
  br label %140

140:                                              ; preds = %139, %134
  %141 = load double, ptr %23, align 8, !tbaa !9
  %142 = load double, ptr %23, align 8, !tbaa !9
  %143 = fneg double %141
  %144 = call double @llvm.fmuladd.f64(double %143, double %142, double 1.000000e+00)
  %145 = load double, ptr %16, align 8, !tbaa !9
  %146 = fmul double %145, %144
  store double %146, ptr %16, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 24, ptr %24) #6
  %147 = getelementptr inbounds %class.R3Viewer, ptr %27, i32 0, i32 1
  call void @_ZNK8R3Camera7TowardsEv(ptr dead_on_unwind writable sret(%class.R3Vector) align 8 %24, ptr noundef nonnull align 8 dereferenceable(144) %147)
  call void @llvm.lifetime.start.p0(i64 32, ptr %25) #6
  %148 = getelementptr inbounds %class.R3Viewer, ptr %27, i32 0, i32 1
  %149 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK8R3Camera6OriginEv(ptr noundef nonnull align 8 dereferenceable(144) %148)
  call void @_ZN7R3PlaneC1ERK7R3PointRK8R3Vector(ptr noundef nonnull align 8 dereferenceable(32) %25, ptr noundef nonnull align 8 dereferenceable(24) %149, ptr noundef nonnull align 8 dereferenceable(24) @R3default_camera_up_vector)
  call void @_ZN8R3Vector7ProjectERK7R3Plane(ptr noundef nonnull align 8 dereferenceable(24) %24, ptr noundef nonnull align 8 dereferenceable(32) %25)
  call void @llvm.lifetime.end.p0(i64 32, ptr %25) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %26) #6
  %150 = load double, ptr %16, align 8, !tbaa !9
  call void @_ZmlRK8R3Vectord(ptr dead_on_unwind writable sret(%class.R3Vector) align 8 %26, ptr noundef nonnull align 8 dereferenceable(24) %24, double noundef %150)
  call void @_ZN8R3Viewer15TranslateCameraERK8R3Vector(ptr noundef nonnull align 8 dereferenceable(168) %27, ptr noundef nonnull align 8 dereferenceable(24) %26)
  call void @llvm.lifetime.end.p0(i64 24, ptr %26) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  br label %151

151:                                              ; preds = %140, %116
  ret void
}

declare void @_ZN8R3Vector7ProjectERK7R3Plane(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(32)) #2

declare void @_ZN7R3PlaneC1ERK7R3PointRK8R3Vector(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2

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

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

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


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%class.R3Vector = type { [3 x double] }
%class.R3Plane = type { %class.R3Vector, double }

@RN_EPSILON = external local_unnamed_addr global double, align 8
@R3default_camera_up_vector = external global %class.R3Vector, align 8

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK10R2Viewport5WidthEv(ptr noundef nonnull align 4 dereferenceable(16)) local_unnamed_addr #1 align 2

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

declare void @_ZmlRK8R3Vectord(ptr dead_on_unwind writable sret(%class.R3Vector) align 8, ptr noundef nonnull align 8 dereferenceable(24), double noundef) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNK8R3Camera6OriginEv(ptr noundef nonnull align 8 dereferenceable(144)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK8R3Camera7TowardsEv(ptr dead_on_unwind noalias writable sret(%class.R3Vector) align 8, ptr noundef nonnull align 8 dereferenceable(144)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN8R3Viewer15TranslateCameraERK8R3Vector(ptr noundef nonnull align 8 dereferenceable(168), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_Z11RNIsNotZerodd(double noundef, double noundef) local_unnamed_addr #3

declare noundef double @_ZNK8R3Camera3YawEv(ptr noundef nonnull align 8 dereferenceable(144)) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_Z8RNIsZerodd(double noundef, double noundef) local_unnamed_addr #3

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

declare noundef double @_ZNK8R3Camera4RollEv(ptr noundef nonnull align 8 dereferenceable(144)) local_unnamed_addr #2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8R3Viewer10WalkCameraEddddiiiiii(ptr noundef nonnull align 8 dereferenceable(168) %0, double noundef %1, double noundef %2, double noundef %3, double noundef %4, i32 noundef %5, i32 noundef %6, i32 noundef %7, i32 noundef %8, i32 noundef %9, i32 noundef %10) unnamed_addr #5 align 2 {
  %12 = alloca %class.R3Vector, align 8
  %13 = alloca %class.R3Plane, align 8
  %14 = alloca %class.R3Vector, align 8
  %15 = load double, ptr @RN_EPSILON, align 8, !tbaa !5
  %16 = tail call noundef i32 @_Z11RNIsNotZerodd(double noundef %1, double noundef %15)
  %.not = icmp eq i32 %16, 0
  br i1 %.not, label %21, label %17

17:                                               ; preds = %11
  %18 = load ptr, ptr %0, align 8, !tbaa !9
  %19 = getelementptr inbounds i8, ptr %18, i64 32
  %20 = load ptr, ptr %19, align 8
  tail call void %20(ptr noundef nonnull align 8 dereferenceable(168) %0, double noundef %1, i32 noundef %7, i32 noundef %8, i32 noundef %9, i32 noundef %10)
  br label %21

21:                                               ; preds = %17, %11
  %22 = load double, ptr @RN_EPSILON, align 8, !tbaa !5
  %23 = tail call noundef i32 @_Z11RNIsNotZerodd(double noundef %2, double noundef %22)
  %.not29 = icmp eq i32 %23, 0
  br i1 %.not29, label %28, label %24

24:                                               ; preds = %21
  %25 = load ptr, ptr %0, align 8, !tbaa !9
  %26 = getelementptr inbounds i8, ptr %25, i64 40
  %27 = load ptr, ptr %26, align 8
  tail call void %27(ptr noundef nonnull align 8 dereferenceable(168) %0, double noundef %2, i32 noundef %7, i32 noundef %8, i32 noundef %9, i32 noundef %10)
  br label %42

28:                                               ; preds = %21
  %.not30 = icmp eq i32 %5, 0
  br i1 %.not30, label %42, label %29

29:                                               ; preds = %28
  %30 = getelementptr inbounds i8, ptr %0, i64 8
  %31 = tail call noundef double @_ZNK8R3Camera3YawEv(ptr noundef nonnull align 8 dereferenceable(144) %30)
  %32 = load double, ptr @RN_EPSILON, align 8, !tbaa !5
  %33 = tail call noundef i32 @_Z11RNIsNotZerodd(double noundef %31, double noundef %32)
  %.not31 = icmp eq i32 %33, 0
  br i1 %.not31, label %42, label %34

34:                                               ; preds = %29
  %35 = tail call noundef double @_ZNK8R3Camera3YawEv(ptr noundef nonnull align 8 dereferenceable(144) %30)
  %36 = tail call noundef i32 @_Z8RNIsZerodd(double noundef %35, double noundef 5.000000e-03)
  %.not32 = icmp eq i32 %36, 0
  %37 = tail call noundef double @_ZNK8R3Camera3YawEv(ptr noundef nonnull align 8 dereferenceable(144) %30)
  br i1 %.not32, label %40, label %38

38:                                               ; preds = %34
  %39 = fneg double %37
  tail call void @_ZN8R3Viewer15RotateCameraYawEd(ptr noundef nonnull align 8 dereferenceable(168) %0, double noundef %39)
  br label %42

40:                                               ; preds = %34
  %41 = fmul double %37, -5.000000e-02
  tail call void @_ZN8R3Viewer15RotateCameraYawEd(ptr noundef nonnull align 8 dereferenceable(168) %0, double noundef %41)
  br label %42

42:                                               ; preds = %28, %29, %40, %38, %24
  %43 = load double, ptr @RN_EPSILON, align 8, !tbaa !5
  %44 = tail call noundef i32 @_Z11RNIsNotZerodd(double noundef %3, double noundef %43)
  %.not33 = icmp eq i32 %44, 0
  br i1 %.not33, label %49, label %45

45:                                               ; preds = %42
  %46 = load ptr, ptr %0, align 8, !tbaa !9
  %47 = getelementptr inbounds i8, ptr %46, i64 48
  %48 = load ptr, ptr %47, align 8
  tail call void %48(ptr noundef nonnull align 8 dereferenceable(168) %0, double noundef %3, i32 noundef %7, i32 noundef %8, i32 noundef %9, i32 noundef %10)
  br label %63

49:                                               ; preds = %42
  %.not34 = icmp eq i32 %6, 0
  br i1 %.not34, label %63, label %50

50:                                               ; preds = %49
  %51 = getelementptr inbounds i8, ptr %0, i64 8
  %52 = tail call noundef double @_ZNK8R3Camera4RollEv(ptr noundef nonnull align 8 dereferenceable(144) %51)
  %53 = load double, ptr @RN_EPSILON, align 8, !tbaa !5
  %54 = tail call noundef i32 @_Z11RNIsNotZerodd(double noundef %52, double noundef %53)
  %.not35 = icmp eq i32 %54, 0
  br i1 %.not35, label %63, label %55

55:                                               ; preds = %50
  %56 = tail call noundef double @_ZNK8R3Camera4RollEv(ptr noundef nonnull align 8 dereferenceable(144) %51)
  %57 = fcmp olt double %56, 1.000000e-02
  %58 = tail call noundef double @_ZNK8R3Camera4RollEv(ptr noundef nonnull align 8 dereferenceable(144) %51)
  br i1 %57, label %59, label %61

59:                                               ; preds = %55
  %60 = fneg double %58
  tail call void @_ZN8R3Viewer16RotateCameraRollEd(ptr noundef nonnull align 8 dereferenceable(168) %0, double noundef %60)
  br label %63

61:                                               ; preds = %55
  %62 = fmul double %58, -5.000000e-02
  tail call void @_ZN8R3Viewer16RotateCameraRollEd(ptr noundef nonnull align 8 dereferenceable(168) %0, double noundef %62)
  br label %63

63:                                               ; preds = %49, %50, %61, %59, %45
  %64 = load double, ptr @RN_EPSILON, align 8, !tbaa !5
  %65 = tail call noundef i32 @_Z11RNIsNotZerodd(double noundef %4, double noundef %64)
  %.not36 = icmp eq i32 %65, 0
  br i1 %.not36, label %85, label %66

66:                                               ; preds = %63
  %67 = shl nsw i32 %7, 1
  %68 = getelementptr inbounds i8, ptr %0, i64 152
  %69 = tail call noundef i32 @_ZNK10R2Viewport5WidthEv(ptr noundef nonnull align 4 dereferenceable(16) %68)
  %70 = sub nsw i32 %67, %69
  %71 = sitofp i32 %70 to double
  %72 = tail call noundef i32 @_ZNK10R2Viewport5WidthEv(ptr noundef nonnull align 4 dereferenceable(16) %68)
  %73 = sitofp i32 %72 to double
  %74 = fdiv double %71, %73
  %75 = fcmp ogt double %74, 1.000000e+00
  br i1 %75, label %79, label %76

76:                                               ; preds = %66
  %77 = fcmp olt double %74, -1.000000e+00
  br i1 %77, label %78, label %79

78:                                               ; preds = %76
  br label %79

79:                                               ; preds = %66, %76, %78
  %.0 = phi double [ -1.000000e+00, %78 ], [ %74, %76 ], [ 1.000000e+00, %66 ]
  %80 = fneg double %.0
  %81 = tail call double @llvm.fmuladd.f64(double %80, double %.0, double 1.000000e+00)
  %82 = fmul double %81, %4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %12) #6
  %83 = getelementptr inbounds i8, ptr %0, i64 8
  call void @_ZNK8R3Camera7TowardsEv(ptr dead_on_unwind nonnull writable sret(%class.R3Vector) align 8 %12, ptr noundef nonnull align 8 dereferenceable(144) %83)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %13) #6
  %84 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK8R3Camera6OriginEv(ptr noundef nonnull align 8 dereferenceable(144) %83)
  call void @_ZN7R3PlaneC1ERK7R3PointRK8R3Vector(ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef nonnull align 8 dereferenceable(24) %84, ptr noundef nonnull align 8 dereferenceable(24) @R3default_camera_up_vector)
  call void @_ZN8R3Vector7ProjectERK7R3Plane(ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 8 dereferenceable(32) %13)
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %13) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %14) #6
  call void @_ZmlRK8R3Vectord(ptr dead_on_unwind nonnull writable sret(%class.R3Vector) align 8 %14, ptr noundef nonnull align 8 dereferenceable(24) %12, double noundef %82)
  call void @_ZN8R3Viewer15TranslateCameraERK8R3Vector(ptr noundef nonnull align 8 dereferenceable(168) %0, ptr noundef nonnull align 8 dereferenceable(24) %14)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %14) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #6
  br label %85

85:                                               ; preds = %79, %63
  ret void
}

declare void @_ZN8R3Vector7ProjectERK7R3Plane(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2

declare void @_ZN7R3PlaneC1ERK7R3PointRK8R3Vector(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"vtable pointer", !8, i64 0}


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