; LLVM IR from goldest-star/seawave-animation :: src/vcl/interaction/camera_control_glfw (camera_control_glfw)

; 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.vcl::camera_control_glfw" = type { i8, float, float }

@.str = external hidden unnamed_addr constant [16 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [128 x i8], align 1
@__PRETTY_FUNCTION__._ZN3vcl19camera_control_glfw17update_mouse_moveERNS_12camera_sceneEP10GLFWwindowff = external hidden unnamed_addr constant [93 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3vcl19camera_control_glfw17update_mouse_moveERNS_12camera_sceneEP10GLFWwindowff(ptr noundef nonnull align 4 dereferenceable(12) %0, ptr noundef nonnull align 4 dereferenceable(80) %1, ptr noundef %2, float noundef %3, float noundef %4) #0 align 2 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca float, align 4
  %10 = alloca float, align 4
  %11 = alloca i8, align 1
  %12 = alloca i8, align 1
  %13 = alloca i8, align 1
  %14 = alloca i8, align 1
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca float, align 4
  %19 = alloca float, align 4
  %20 = alloca i32, align 4
  %21 = alloca float, align 4
  %22 = alloca float, align 4
  %23 = alloca float, align 4
  %24 = alloca float, align 4
  %25 = alloca float, align 4
  %26 = alloca float, align 4
  %27 = alloca float, align 4
  %28 = alloca float, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store float %3, ptr %9, align 4, !tbaa !9
  store float %4, ptr %10, align 4, !tbaa !9
  %29 = load ptr, ptr %6, align 8
  %30 = load ptr, ptr %8, align 8, !tbaa !5
  %31 = icmp ne ptr %30, null
  br i1 %31, label %32, label %33

32:                                               ; preds = %5
  br label %35

33:                                               ; preds = %5
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 12, ptr noundef @__PRETTY_FUNCTION__._ZN3vcl19camera_control_glfw17update_mouse_moveERNS_12camera_sceneEP10GLFWwindowff) #4
  unreachable

34:                                               ; No predecessors!
  br label %35

35:                                               ; preds = %34, %32
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #5
  %36 = load ptr, ptr %8, align 8, !tbaa !5
  %37 = call i32 @glfwGetMouseButton(ptr noundef %36, i32 noundef 0)
  %38 = icmp eq i32 %37, 1
  %39 = zext i1 %38 to i8
  store i8 %39, ptr %11, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #5
  %40 = load ptr, ptr %8, align 8, !tbaa !5
  %41 = call i32 @glfwGetMouseButton(ptr noundef %40, i32 noundef 1)
  %42 = icmp eq i32 %41, 1
  %43 = zext i1 %42 to i8
  store i8 %43, ptr %12, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr %13) #5
  %44 = load ptr, ptr %8, align 8, !tbaa !5
  %45 = call i32 @glfwGetKey(ptr noundef %44, i32 noundef 341)
  %46 = icmp ne i32 %45, 0
  br i1 %46, label %51, label %47

47:                                               ; preds = %35
  %48 = load ptr, ptr %8, align 8, !tbaa !5
  %49 = call i32 @glfwGetKey(ptr noundef %48, i32 noundef 345)
  %50 = icmp ne i32 %49, 0
  br label %51

51:                                               ; preds = %47, %35
  %52 = phi i1 [ true, %35 ], [ %50, %47 ]
  %53 = zext i1 %52 to i8
  store i8 %53, ptr %13, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #5
  %54 = load ptr, ptr %8, align 8, !tbaa !5
  %55 = call i32 @glfwGetKey(ptr noundef %54, i32 noundef 340)
  %56 = icmp ne i32 %55, 0
  br i1 %56, label %61, label %57

57:                                               ; preds = %51
  %58 = load ptr, ptr %8, align 8, !tbaa !5
  %59 = call i32 @glfwGetKey(ptr noundef %58, i32 noundef 344)
  %60 = icmp ne i32 %59, 0
  br label %61

61:                                               ; preds = %57, %51
  %62 = phi i1 [ true, %51 ], [ %60, %57 ]
  %63 = zext i1 %62 to i8
  store i8 %63, ptr %14, align 1, !tbaa !11
  %64 = getelementptr inbounds %"class.vcl::camera_control_glfw", ptr %29, i32 0, i32 0
  %65 = load i8, ptr %64, align 4, !tbaa !13, !range !15, !noundef !16
  %66 = trunc i8 %65 to i1
  %67 = zext i1 %66 to i32
  %68 = icmp eq i32 %67, 0
  br i1 %68, label %72, label %69

69:                                               ; preds = %61
  %70 = load i8, ptr %14, align 1, !tbaa !11, !range !15, !noundef !16
  %71 = trunc i8 %70 to i1
  br i1 %71, label %72, label %77

72:                                               ; preds = %69, %61
  %73 = load float, ptr %9, align 4, !tbaa !9
  %74 = getelementptr inbounds %"class.vcl::camera_control_glfw", ptr %29, i32 0, i32 1
  store float %73, ptr %74, align 4, !tbaa !17
  %75 = load float, ptr %10, align 4, !tbaa !9
  %76 = getelementptr inbounds %"class.vcl::camera_control_glfw", ptr %29, i32 0, i32 2
  store float %75, ptr %76, align 4, !tbaa !18
  store i32 1, ptr %15, align 4
  br label %204

77:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  %78 = load ptr, ptr %8, align 8, !tbaa !5
  call void @glfwGetWindowSize(ptr noundef %78, ptr noundef %16, ptr noundef %17)
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  %79 = load i32, ptr %16, align 4, !tbaa !19
  %80 = sitofp i32 %79 to float
  store float %80, ptr %18, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  %81 = load i32, ptr %17, align 4, !tbaa !19
  %82 = sitofp i32 %81 to float
  store float %82, ptr %19, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  store i32 0, ptr %20, align 4, !tbaa !21
  %83 = load i8, ptr %11, align 1, !tbaa !11, !range !15, !noundef !16
  %84 = trunc i8 %83 to i1
  br i1 %84, label %89, label %85

85:                                               ; preds = %77
  %86 = load i8, ptr %12, align 1, !tbaa !11, !range !15, !noundef !16
  %87 = trunc i8 %86 to i1
  br i1 %87, label %89, label %88

88:                                               ; preds = %85
  store i32 0, ptr %20, align 4, !tbaa !21
  br label %121

89:                                               ; preds = %85, %77
  %90 = load i8, ptr %11, align 1, !tbaa !11, !range !15, !noundef !16
  %91 = trunc i8 %90 to i1
  br i1 %91, label %92, label %96

92:                                               ; preds = %89
  %93 = load i8, ptr %13, align 1, !tbaa !11, !range !15, !noundef !16
  %94 = trunc i8 %93 to i1
  br i1 %94, label %96, label %95

95:                                               ; preds = %92
  store i32 2, ptr %20, align 4, !tbaa !21
  br label %120

96:                                               ; preds = %92, %89
  %97 = load i8, ptr %11, align 1, !tbaa !11, !range !15, !noundef !16
  %98 = trunc i8 %97 to i1
  br i1 %98, label %99, label %103

99:                                               ; preds = %96
  %100 = load i8, ptr %13, align 1, !tbaa !11, !range !15, !noundef !16
  %101 = trunc i8 %100 to i1
  br i1 %101, label %102, label %103

102:                                              ; preds = %99
  store i32 1, ptr %20, align 4, !tbaa !21
  br label %119

103:                                              ; preds = %99, %96
  %104 = load i8, ptr %12, align 1, !tbaa !11, !range !15, !noundef !16
  %105 = trunc i8 %104 to i1
  br i1 %105, label %106, label %110

106:                                              ; preds = %103
  %107 = load i8, ptr %13, align 1, !tbaa !11, !range !15, !noundef !16
  %108 = trunc i8 %107 to i1
  br i1 %108, label %110, label %109

109:                                              ; preds = %106
  store i32 3, ptr %20, align 4, !tbaa !21
  br label %118

110:                                              ; preds = %106, %103
  %111 = load i8, ptr %12, align 1, !tbaa !11, !range !15, !noundef !16
  %112 = trunc i8 %111 to i1
  br i1 %112, label %113, label %117

113:                                              ; preds = %110
  %114 = load i8, ptr %13, align 1, !tbaa !11, !range !15, !noundef !16
  %115 = trunc i8 %114 to i1
  br i1 %115, label %116, label %117

116:                                              ; preds = %113
  store i32 4, ptr %20, align 4, !tbaa !21
  br label %117

117:                                              ; preds = %116, %113, %110
  br label %118

118:                                              ; preds = %117, %109
  br label %119

119:                                              ; preds = %118, %102
  br label %120

120:                                              ; preds = %119, %95
  br label %121

121:                                              ; preds = %120, %88
  %122 = load i32, ptr %20, align 4, !tbaa !21
  %123 = icmp eq i32 %122, 1
  br i1 %123, label %124, label %141

124:                                              ; preds = %121
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #5
  %125 = load float, ptr %9, align 4, !tbaa !9
  %126 = getelementptr inbounds %"class.vcl::camera_control_glfw", ptr %29, i32 0, i32 1
  %127 = load float, ptr %126, align 4, !tbaa !17
  %128 = fsub float %125, %127
  %129 = load float, ptr %18, align 4, !tbaa !9
  %130 = fdiv float %128, %129
  store float %130, ptr %21, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #5
  %131 = load float, ptr %10, align 4, !tbaa !9
  %132 = getelementptr inbounds %"class.vcl::camera_control_glfw", ptr %29, i32 0, i32 2
  %133 = load float, ptr %132, align 4, !tbaa !18
  %134 = fsub float %131, %133
  %135 = fneg float %134
  %136 = load float, ptr %19, align 4, !tbaa !9
  %137 = fdiv float %135, %136
  store float %137, ptr %22, align 4, !tbaa !9
  %138 = load ptr, ptr %7, align 8, !tbaa !5
  %139 = load float, ptr %21, align 4, !tbaa !9
  %140 = load float, ptr %22, align 4, !tbaa !9
  call void @_ZN3vcl12camera_scene33apply_translation_in_screen_planeEff(ptr noundef nonnull align 4 dereferenceable(80) %138, float noundef %139, float noundef %140)
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  br label %199

141:                                              ; preds = %121
  %142 = load i32, ptr %20, align 4, !tbaa !21
  %143 = icmp eq i32 %142, 2
  br i1 %143, label %144, label %172

144:                                              ; preds = %141
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #5
  %145 = getelementptr inbounds %"class.vcl::camera_control_glfw", ptr %29, i32 0, i32 1
  %146 = load float, ptr %145, align 4, !tbaa !17
  %147 = fmul float 2.000000e+00, %146
  %148 = load float, ptr %18, align 4, !tbaa !9
  %149 = fdiv float %147, %148
  %150 = fsub float %149, 1.000000e+00
  store float %150, ptr %23, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #5
  %151 = getelementptr inbounds %"class.vcl::camera_control_glfw", ptr %29, i32 0, i32 2
  %152 = load float, ptr %151, align 4, !tbaa !18
  %153 = fmul float 2.000000e+00, %152
  %154 = load float, ptr %19, align 4, !tbaa !9
  %155 = fdiv float %153, %154
  %156 = fsub float 1.000000e+00, %155
  store float %156, ptr %24, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #5
  %157 = load float, ptr %9, align 4, !tbaa !9
  %158 = fmul float 2.000000e+00, %157
  %159 = load float, ptr %18, align 4, !tbaa !9
  %160 = fdiv float %158, %159
  %161 = fsub float %160, 1.000000e+00
  store float %161, ptr %25, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #5
  %162 = load float, ptr %10, align 4, !tbaa !9
  %163 = fmul float 2.000000e+00, %162
  %164 = load float, ptr %19, align 4, !tbaa !9
  %165 = fdiv float %163, %164
  %166 = fsub float 1.000000e+00, %165
  store float %166, ptr %26, align 4, !tbaa !9
  %167 = load ptr, ptr %7, align 8, !tbaa !5
  %168 = load float, ptr %23, align 4, !tbaa !9
  %169 = load float, ptr %24, align 4, !tbaa !9
  %170 = load float, ptr %25, align 4, !tbaa !9
  %171 = load float, ptr %26, align 4, !tbaa !9
  call void @_ZN3vcl12camera_scene14apply_rotationEffff(ptr noundef nonnull align 4 dereferenceable(80) %167, float noundef %168, float noundef %169, float noundef %170, float noundef %171)
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #5
  br label %198

172:                                              ; preds = %141
  %173 = load i32, ptr %20, align 4, !tbaa !21
  %174 = icmp eq i32 %173, 3
  br i1 %174, label %175, label %184

175:                                              ; preds = %172
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #5
  %176 = getelementptr inbounds %"class.vcl::camera_control_glfw", ptr %29, i32 0, i32 2
  %177 = load float, ptr %176, align 4, !tbaa !18
  %178 = load float, ptr %10, align 4, !tbaa !9
  %179 = fsub float %177, %178
  %180 = load float, ptr %19, align 4, !tbaa !9
  %181 = fdiv float %179, %180
  store float %181, ptr %27, align 4, !tbaa !9
  %182 = load ptr, ptr %7, align 8, !tbaa !5
  %183 = load float, ptr %27, align 4, !tbaa !9
  call void @_ZN3vcl12camera_scene13apply_scalingEf(ptr noundef nonnull align 4 dereferenceable(80) %182, float noundef %183)
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #5
  br label %197

184:                                              ; preds = %172
  %185 = load i32, ptr %20, align 4, !tbaa !21
  %186 = icmp eq i32 %185, 4
  br i1 %186, label %187, label %196

187:                                              ; preds = %184
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #5
  %188 = load float, ptr %10, align 4, !tbaa !9
  %189 = getelementptr inbounds %"class.vcl::camera_control_glfw", ptr %29, i32 0, i32 2
  %190 = load float, ptr %189, align 4, !tbaa !18
  %191 = fsub float %188, %190
  %192 = load float, ptr %19, align 4, !tbaa !9
  %193 = fdiv float %191, %192
  store float %193, ptr %28, align 4, !tbaa !9
  %194 = load ptr, ptr %7, align 8, !tbaa !5
  %195 = load float, ptr %28, align 4, !tbaa !9
  call void @_ZN3vcl12camera_scene44apply_translation_orthogonal_to_screen_planeEf(ptr noundef nonnull align 4 dereferenceable(80) %194, float noundef %195)
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #5
  br label %196

196:                                              ; preds = %187, %184
  br label %197

197:                                              ; preds = %196, %175
  br label %198

198:                                              ; preds = %197, %144
  br label %199

199:                                              ; preds = %198, %124
  %200 = load float, ptr %9, align 4, !tbaa !9
  %201 = getelementptr inbounds %"class.vcl::camera_control_glfw", ptr %29, i32 0, i32 1
  store float %200, ptr %201, align 4, !tbaa !17
  %202 = load float, ptr %10, align 4, !tbaa !9
  %203 = getelementptr inbounds %"class.vcl::camera_control_glfw", ptr %29, i32 0, i32 2
  store float %202, ptr %203, align 4, !tbaa !18
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  store i32 0, ptr %15, align 4
  br label %204

204:                                              ; preds = %199, %72
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #5
  %205 = load i32, ptr %15, align 4
  switch i32 %205, label %207 [
    i32 0, label %206
    i32 1, label %206
  ]

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

207:                                              ; preds = %204
  unreachable
}

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #1

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

declare i32 @glfwGetMouseButton(ptr noundef, i32 noundef) #3

declare i32 @glfwGetKey(ptr noundef, i32 noundef) #3

declare void @glfwGetWindowSize(ptr noundef, ptr noundef, ptr noundef) #3

declare void @_ZN3vcl12camera_scene33apply_translation_in_screen_planeEff(ptr noundef nonnull align 4 dereferenceable(80), float noundef, float noundef) #3

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

declare void @_ZN3vcl12camera_scene14apply_rotationEffff(ptr noundef nonnull align 4 dereferenceable(80), float noundef, float noundef, float noundef, float noundef) #3

declare void @_ZN3vcl12camera_scene13apply_scalingEf(ptr noundef nonnull align 4 dereferenceable(80), float noundef) #3

declare void @_ZN3vcl12camera_scene44apply_translation_orthogonal_to_screen_planeEf(ptr noundef nonnull align 4 dereferenceable(80), float noundef) #3

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 = { noreturn nounwind "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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { "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 = { noreturn nounwind }
attributes #5 = { 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 = !{!"float", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!14, !12, i64 0}
!14 = !{!"_ZTSN3vcl19camera_control_glfwE", !12, i64 0, !10, i64 4, !10, i64 8}
!15 = !{i8 0, i8 2}
!16 = !{}
!17 = !{!14, !10, i64 4}
!18 = !{!14, !10, i64 8}
!19 = !{!20, !20, i64 0}
!20 = !{!"int", !7, i64 0}
!21 = !{!22, !22, i64 0}
!22 = !{!"_ZTSN3vcl19camera_action_stateE", !7, 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"

@.str = external hidden unnamed_addr constant [16 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [128 x i8], align 1
@__PRETTY_FUNCTION__._ZN3vcl19camera_control_glfw17update_mouse_moveERNS_12camera_sceneEP10GLFWwindowff = external hidden unnamed_addr constant [93 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3vcl19camera_control_glfw17update_mouse_moveERNS_12camera_sceneEP10GLFWwindowff(ptr nocapture noundef nonnull align 4 dereferenceable(12) %0, ptr noundef nonnull align 4 dereferenceable(80) %1, ptr noundef %2, float noundef %3, float noundef %4) local_unnamed_addr #0 align 2 {
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %.not = icmp eq ptr %2, null
  br i1 %.not, label %8, label %9

8:                                                ; preds = %5
  tail call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 12, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN3vcl19camera_control_glfw17update_mouse_moveERNS_12camera_sceneEP10GLFWwindowff) #4
  unreachable

9:                                                ; preds = %5
  %10 = tail call i32 @glfwGetMouseButton(ptr noundef nonnull %2, i32 noundef 0)
  %11 = icmp eq i32 %10, 1
  %12 = tail call i32 @glfwGetMouseButton(ptr noundef nonnull %2, i32 noundef 1)
  %13 = icmp eq i32 %12, 1
  %14 = tail call i32 @glfwGetKey(ptr noundef nonnull %2, i32 noundef 341)
  %.not54 = icmp eq i32 %14, 0
  br i1 %.not54, label %15, label %18

15:                                               ; preds = %9
  %16 = tail call i32 @glfwGetKey(ptr noundef nonnull %2, i32 noundef 345)
  %17 = icmp ne i32 %16, 0
  br label %18

18:                                               ; preds = %15, %9
  %19 = phi i1 [ true, %9 ], [ %17, %15 ]
  %20 = tail call i32 @glfwGetKey(ptr noundef nonnull %2, i32 noundef 340)
  %.not55 = icmp eq i32 %20, 0
  br i1 %.not55, label %21, label %.thread

21:                                               ; preds = %18
  %22 = tail call i32 @glfwGetKey(ptr noundef nonnull %2, i32 noundef 344)
  %23 = icmp ne i32 %22, 0
  %24 = load i8, ptr %0, align 4, !tbaa !5, !range !11, !noundef !12
  %25 = icmp eq i8 %24, 0
  %brmerge = select i1 %25, i1 true, i1 %23
  br i1 %brmerge, label %.thread, label %28

.thread:                                          ; preds = %18, %21
  %26 = getelementptr inbounds i8, ptr %0, i64 4
  store float %3, ptr %26, align 4, !tbaa !13
  %27 = getelementptr inbounds i8, ptr %0, i64 8
  store float %4, ptr %27, align 4, !tbaa !14
  br label %77

28:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #5
  call void @glfwGetWindowSize(ptr noundef nonnull %2, ptr noundef nonnull %6, ptr noundef nonnull %7)
  %29 = load i32, ptr %6, align 4, !tbaa !15
  %30 = sitofp i32 %29 to float
  %31 = load i32, ptr %7, align 4, !tbaa !15
  %32 = sitofp i32 %31 to float
  %brmerge56 = select i1 %11, i1 true, i1 %13
  br i1 %brmerge56, label %33, label %.thread81

33:                                               ; preds = %28
  %.not57 = xor i1 %11, true
  %brmerge58 = select i1 %.not57, i1 true, i1 %19
  br i1 %brmerge58, label %34, label %47

34:                                               ; preds = %33
  %35 = select i1 %11, i1 %19, i1 false
  br i1 %35, label %37, label %36

36:                                               ; preds = %34
  %.not62 = xor i1 %13, true
  %brmerge63 = select i1 %.not62, i1 true, i1 %19
  br i1 %brmerge63, label %69, label %64

37:                                               ; preds = %34
  %38 = getelementptr inbounds i8, ptr %0, i64 4
  %39 = load float, ptr %38, align 4, !tbaa !13
  %40 = fsub float %3, %39
  %41 = fdiv float %40, %30
  %42 = getelementptr inbounds i8, ptr %0, i64 8
  %43 = load float, ptr %42, align 4, !tbaa !14
  %44 = fsub float %4, %43
  %45 = fneg float %44
  %46 = fdiv float %45, %32
  call void @_ZN3vcl12camera_scene33apply_translation_in_screen_planeEff(ptr noundef nonnull align 4 dereferenceable(80) %1, float noundef %41, float noundef %46)
  br label %.thread81

47:                                               ; preds = %33
  %48 = getelementptr inbounds i8, ptr %0, i64 4
  %49 = load float, ptr %48, align 4, !tbaa !13
  %50 = fmul float %49, 2.000000e+00
  %51 = fdiv float %50, %30
  %52 = fadd float %51, -1.000000e+00
  %53 = getelementptr inbounds i8, ptr %0, i64 8
  %54 = load float, ptr %53, align 4, !tbaa !14
  %55 = fmul float %54, 2.000000e+00
  %56 = fdiv float %55, %32
  %57 = fsub float 1.000000e+00, %56
  %58 = fmul float %3, 2.000000e+00
  %59 = fdiv float %58, %30
  %60 = fadd float %59, -1.000000e+00
  %61 = fmul float %4, 2.000000e+00
  %62 = fdiv float %61, %32
  %63 = fsub float 1.000000e+00, %62
  call void @_ZN3vcl12camera_scene14apply_rotationEffff(ptr noundef nonnull align 4 dereferenceable(80) %1, float noundef %52, float noundef %57, float noundef %60, float noundef %63)
  br label %.thread81

64:                                               ; preds = %36
  %65 = getelementptr inbounds i8, ptr %0, i64 8
  %66 = load float, ptr %65, align 4, !tbaa !14
  %67 = fsub float %66, %4
  %68 = fdiv float %67, %32
  call void @_ZN3vcl12camera_scene13apply_scalingEf(ptr noundef nonnull align 4 dereferenceable(80) %1, float noundef %68)
  br label %.thread81

69:                                               ; preds = %36
  %spec.select64 = select i1 %13, i1 %19, i1 false
  br i1 %spec.select64, label %70, label %.thread81

70:                                               ; preds = %69
  %71 = getelementptr inbounds i8, ptr %0, i64 8
  %72 = load float, ptr %71, align 4, !tbaa !14
  %73 = fsub float %4, %72
  %74 = fdiv float %73, %32
  call void @_ZN3vcl12camera_scene44apply_translation_orthogonal_to_screen_planeEf(ptr noundef nonnull align 4 dereferenceable(80) %1, float noundef %74)
  br label %.thread81

.thread81:                                        ; preds = %28, %47, %69, %70, %64, %37
  %75 = getelementptr inbounds i8, ptr %0, i64 4
  store float %3, ptr %75, align 4, !tbaa !13
  %76 = getelementptr inbounds i8, ptr %0, i64 8
  store float %4, ptr %76, align 4, !tbaa !14
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  br label %77

77:                                               ; preds = %.thread81, %.thread
  ret void
}

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

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

declare i32 @glfwGetMouseButton(ptr noundef, i32 noundef) local_unnamed_addr #3

declare i32 @glfwGetKey(ptr noundef, i32 noundef) local_unnamed_addr #3

declare void @glfwGetWindowSize(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

declare void @_ZN3vcl12camera_scene33apply_translation_in_screen_planeEff(ptr noundef nonnull align 4 dereferenceable(80), float noundef, float noundef) local_unnamed_addr #3

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

declare void @_ZN3vcl12camera_scene14apply_rotationEffff(ptr noundef nonnull align 4 dereferenceable(80), float noundef, float noundef, float noundef, float noundef) local_unnamed_addr #3

declare void @_ZN3vcl12camera_scene13apply_scalingEf(ptr noundef nonnull align 4 dereferenceable(80), float noundef) local_unnamed_addr #3

declare void @_ZN3vcl12camera_scene44apply_translation_orthogonal_to_screen_planeEf(ptr noundef nonnull align 4 dereferenceable(80), float noundef) local_unnamed_addr #3

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 = { noreturn nounwind "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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { "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 = { noreturn nounwind }
attributes #5 = { 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, !7, i64 0}
!6 = !{!"_ZTSN3vcl19camera_control_glfwE", !7, i64 0, !10, i64 4, !10, i64 8}
!7 = !{!"bool", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"float", !8, i64 0}
!11 = !{i8 0, i8 2}
!12 = !{}
!13 = !{!6, !10, i64 4}
!14 = !{!6, !10, i64 8}
!15 = !{!16, !16, i64 0}
!16 = !{!"int", !8, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass