; LLVM IR from unitreerobotics/kinect_teleoperate :: src/extern/glfw/src/examples (triangle-opengles)

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

%struct.Vertex = type { [2 x float], [3 x float] }

@glad_glAttachShader = external dso_local global ptr, align 8
@glad_glBindBuffer = external dso_local global ptr, align 8
@glad_glBufferData = external dso_local global ptr, align 8
@glad_glClear = external dso_local global ptr, align 8
@glad_glCompileShader = external dso_local global ptr, align 8
@glad_glCreateProgram = external dso_local global ptr, align 8
@glad_glCreateShader = external dso_local global ptr, align 8
@glad_glDrawArrays = external dso_local global ptr, align 8
@glad_glEnableVertexAttribArray = external dso_local global ptr, align 8
@glad_glGenBuffers = external dso_local global ptr, align 8
@glad_glGetAttribLocation = external dso_local global ptr, align 8
@glad_glGetUniformLocation = external dso_local global ptr, align 8
@glad_glLinkProgram = external dso_local global ptr, align 8
@glad_glShaderSource = external dso_local global ptr, align 8
@glad_glUniformMatrix4fv = external dso_local global ptr, align 8
@glad_glUseProgram = external dso_local global ptr, align 8
@glad_glVertexAttribPointer = external dso_local global ptr, align 8
@glad_glViewport = external dso_local global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [23 x i8], align 1
@vertices = external hidden constant [3 x %struct.Vertex], align 16
@vertex_shader_text = external hidden global ptr, align 8
@fragment_shader_text = external hidden global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [5 x i8], align 1

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @gladLoadGLES2(ptr noundef) #1

; Function Attrs: nounwind uwtable
define dso_local i32 @main() #1 {
  %1 = alloca i32, align 4
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca float, align 4
  %13 = alloca [4 x [4 x float]], align 16
  %14 = alloca [4 x [4 x float]], align 16
  %15 = alloca [4 x [4 x float]], align 16
  store i32 0, ptr %1, align 4
  %16 = call ptr @glfwSetErrorCallback(ptr noundef @error_callback)
  %17 = call i32 @glfwInit()
  %18 = icmp ne i32 %17, 0
  br i1 %18, label %20, label %19

19:                                               ; preds = %0
  call void @exit(i32 noundef 1) #5
  unreachable

20:                                               ; preds = %0
  call void @glfwWindowHint(i32 noundef 139265, i32 noundef 196610)
  call void @glfwWindowHint(i32 noundef 139266, i32 noundef 2)
  call void @glfwWindowHint(i32 noundef 139267, i32 noundef 0)
  call void @glfwWindowHint(i32 noundef 139275, i32 noundef 221186)
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #6
  %21 = call ptr @glfwCreateWindow(i32 noundef 640, i32 noundef 480, ptr noundef @.str.1, ptr noundef null, ptr noundef null)
  store ptr %21, ptr %2, align 8, !tbaa !5
  %22 = load ptr, ptr %2, align 8, !tbaa !5
  %23 = icmp ne ptr %22, null
  br i1 %23, label %30, label %24

24:                                               ; preds = %20
  call void @glfwWindowHint(i32 noundef 139275, i32 noundef 221185)
  %25 = call ptr @glfwCreateWindow(i32 noundef 640, i32 noundef 480, ptr noundef @.str.2, ptr noundef null, ptr noundef null)
  store ptr %25, ptr %2, align 8, !tbaa !5
  %26 = load ptr, ptr %2, align 8, !tbaa !5
  %27 = icmp ne ptr %26, null
  br i1 %27, label %29, label %28

28:                                               ; preds = %24
  call void @glfwTerminate()
  call void @exit(i32 noundef 1) #5
  unreachable

29:                                               ; preds = %24
  br label %30

30:                                               ; preds = %29, %20
  %31 = load ptr, ptr %2, align 8, !tbaa !5
  %32 = call ptr @glfwSetKeyCallback(ptr noundef %31, ptr noundef @key_callback)
  %33 = load ptr, ptr %2, align 8, !tbaa !5
  call void @glfwMakeContextCurrent(ptr noundef %33)
  %34 = call i32 @gladLoadGLES2(ptr noundef @glfwGetProcAddress)
  call void @glfwSwapInterval(i32 noundef 1)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  %35 = load ptr, ptr @glad_glGenBuffers, align 8, !tbaa !5
  call void %35(i32 noundef 1, ptr noundef %3)
  %36 = load ptr, ptr @glad_glBindBuffer, align 8, !tbaa !5
  %37 = load i32, ptr %3, align 4, !tbaa !9
  call void %36(i32 noundef 34962, i32 noundef %37)
  %38 = load ptr, ptr @glad_glBufferData, align 8, !tbaa !5
  call void %38(i32 noundef 34962, i64 noundef 60, ptr noundef @vertices, i32 noundef 35044)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  %39 = load ptr, ptr @glad_glCreateShader, align 8, !tbaa !5
  %40 = call i32 %39(i32 noundef 35633)
  store i32 %40, ptr %4, align 4, !tbaa !9
  %41 = load ptr, ptr @glad_glShaderSource, align 8, !tbaa !5
  %42 = load i32, ptr %4, align 4, !tbaa !9
  call void %41(i32 noundef %42, i32 noundef 1, ptr noundef @vertex_shader_text, ptr noundef null)
  %43 = load ptr, ptr @glad_glCompileShader, align 8, !tbaa !5
  %44 = load i32, ptr %4, align 4, !tbaa !9
  call void %43(i32 noundef %44)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  %45 = load ptr, ptr @glad_glCreateShader, align 8, !tbaa !5
  %46 = call i32 %45(i32 noundef 35632)
  store i32 %46, ptr %5, align 4, !tbaa !9
  %47 = load ptr, ptr @glad_glShaderSource, align 8, !tbaa !5
  %48 = load i32, ptr %5, align 4, !tbaa !9
  call void %47(i32 noundef %48, i32 noundef 1, ptr noundef @fragment_shader_text, ptr noundef null)
  %49 = load ptr, ptr @glad_glCompileShader, align 8, !tbaa !5
  %50 = load i32, ptr %5, align 4, !tbaa !9
  call void %49(i32 noundef %50)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  %51 = load ptr, ptr @glad_glCreateProgram, align 8, !tbaa !5
  %52 = call i32 %51()
  store i32 %52, ptr %6, align 4, !tbaa !9
  %53 = load ptr, ptr @glad_glAttachShader, align 8, !tbaa !5
  %54 = load i32, ptr %6, align 4, !tbaa !9
  %55 = load i32, ptr %4, align 4, !tbaa !9
  call void %53(i32 noundef %54, i32 noundef %55)
  %56 = load ptr, ptr @glad_glAttachShader, align 8, !tbaa !5
  %57 = load i32, ptr %6, align 4, !tbaa !9
  %58 = load i32, ptr %5, align 4, !tbaa !9
  call void %56(i32 noundef %57, i32 noundef %58)
  %59 = load ptr, ptr @glad_glLinkProgram, align 8, !tbaa !5
  %60 = load i32, ptr %6, align 4, !tbaa !9
  call void %59(i32 noundef %60)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  %61 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !5
  %62 = load i32, ptr %6, align 4, !tbaa !9
  %63 = call i32 %61(i32 noundef %62, ptr noundef @.str.3)
  store i32 %63, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  %64 = load ptr, ptr @glad_glGetAttribLocation, align 8, !tbaa !5
  %65 = load i32, ptr %6, align 4, !tbaa !9
  %66 = call i32 %64(i32 noundef %65, ptr noundef @.str.4)
  store i32 %66, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  %67 = load ptr, ptr @glad_glGetAttribLocation, align 8, !tbaa !5
  %68 = load i32, ptr %6, align 4, !tbaa !9
  %69 = call i32 %67(i32 noundef %68, ptr noundef @.str.5)
  store i32 %69, ptr %9, align 4, !tbaa !9
  %70 = load ptr, ptr @glad_glEnableVertexAttribArray, align 8, !tbaa !5
  %71 = load i32, ptr %8, align 4, !tbaa !9
  call void %70(i32 noundef %71)
  %72 = load ptr, ptr @glad_glEnableVertexAttribArray, align 8, !tbaa !5
  %73 = load i32, ptr %9, align 4, !tbaa !9
  call void %72(i32 noundef %73)
  %74 = load ptr, ptr @glad_glVertexAttribPointer, align 8, !tbaa !5
  %75 = load i32, ptr %8, align 4, !tbaa !9
  call void %74(i32 noundef %75, i32 noundef 2, i32 noundef 5126, i8 noundef zeroext 0, i32 noundef 20, ptr noundef null)
  %76 = load ptr, ptr @glad_glVertexAttribPointer, align 8, !tbaa !5
  %77 = load i32, ptr %9, align 4, !tbaa !9
  call void %76(i32 noundef %77, i32 noundef 3, i32 noundef 5126, i8 noundef zeroext 0, i32 noundef 20, ptr noundef inttoptr (i64 8 to ptr))
  br label %78

78:                                               ; preds = %83, %30
  %79 = load ptr, ptr %2, align 8, !tbaa !5
  %80 = call i32 @glfwWindowShouldClose(ptr noundef %79)
  %81 = icmp ne i32 %80, 0
  %82 = xor i1 %81, true
  br i1 %82, label %83, label %112

83:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  %84 = load ptr, ptr %2, align 8, !tbaa !5
  call void @glfwGetFramebufferSize(ptr noundef %84, ptr noundef %10, ptr noundef %11)
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  %85 = load i32, ptr %10, align 4, !tbaa !9
  %86 = sitofp i32 %85 to float
  %87 = load i32, ptr %11, align 4, !tbaa !9
  %88 = sitofp i32 %87 to float
  %89 = fdiv float %86, %88
  store float %89, ptr %12, align 4, !tbaa !11
  %90 = load ptr, ptr @glad_glViewport, align 8, !tbaa !5
  %91 = load i32, ptr %10, align 4, !tbaa !9
  %92 = load i32, ptr %11, align 4, !tbaa !9
  call void %90(i32 noundef 0, i32 noundef 0, i32 noundef %91, i32 noundef %92)
  %93 = load ptr, ptr @glad_glClear, align 8, !tbaa !5
  call void %93(i32 noundef 16384)
  call void @llvm.lifetime.start.p0(i64 64, ptr %13) #6
  call void @llvm.lifetime.start.p0(i64 64, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 64, ptr %15) #6
  %94 = getelementptr inbounds [4 x [4 x float]], ptr %13, i64 0, i64 0
  call void @mat4x4_identity(ptr noundef %94)
  %95 = getelementptr inbounds [4 x [4 x float]], ptr %13, i64 0, i64 0
  %96 = getelementptr inbounds [4 x [4 x float]], ptr %13, i64 0, i64 0
  %97 = call double @glfwGetTime()
  %98 = fptrunc double %97 to float
  call void @mat4x4_rotate_Z(ptr noundef %95, ptr noundef %96, float noundef %98)
  %99 = getelementptr inbounds [4 x [4 x float]], ptr %14, i64 0, i64 0
  %100 = load float, ptr %12, align 4, !tbaa !11
  %101 = fneg float %100
  %102 = load float, ptr %12, align 4, !tbaa !11
  call void @mat4x4_ortho(ptr noundef %99, float noundef %101, float noundef %102, float noundef -1.000000e+00, float noundef 1.000000e+00, float noundef 1.000000e+00, float noundef -1.000000e+00)
  %103 = getelementptr inbounds [4 x [4 x float]], ptr %15, i64 0, i64 0
  %104 = getelementptr inbounds [4 x [4 x float]], ptr %14, i64 0, i64 0
  %105 = getelementptr inbounds [4 x [4 x float]], ptr %13, i64 0, i64 0
  call void @mat4x4_mul(ptr noundef %103, ptr noundef %104, ptr noundef %105)
  %106 = load ptr, ptr @glad_glUseProgram, align 8, !tbaa !5
  %107 = load i32, ptr %6, align 4, !tbaa !9
  call void %106(i32 noundef %107)
  %108 = load ptr, ptr @glad_glUniformMatrix4fv, align 8, !tbaa !5
  %109 = load i32, ptr %7, align 4, !tbaa !9
  call void %108(i32 noundef %109, i32 noundef 1, i8 noundef zeroext 0, ptr noundef %15)
  %110 = load ptr, ptr @glad_glDrawArrays, align 8, !tbaa !5
  call void %110(i32 noundef 4, i32 noundef 0, i32 noundef 3)
  %111 = load ptr, ptr %2, align 8, !tbaa !5
  call void @glfwSwapBuffers(ptr noundef %111)
  call void @glfwPollEvents()
  call void @llvm.lifetime.end.p0(i64 64, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 64, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 64, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %78, !llvm.loop !13

112:                                              ; preds = %78
  %113 = load ptr, ptr %2, align 8, !tbaa !5
  call void @glfwDestroyWindow(ptr noundef %113)
  call void @glfwTerminate()
  call void @exit(i32 noundef 0) #5
  unreachable
}

declare ptr @glfwSetErrorCallback(ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden void @error_callback(i32 noundef, ptr noundef) #1

declare i32 @glfwInit() #2

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #3

declare void @glfwWindowHint(i32 noundef, i32 noundef) #2

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

declare void @glfwTerminate() #2

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

; Function Attrs: nounwind uwtable
declare hidden void @key_callback(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #1

declare void @glfwMakeContextCurrent(ptr noundef) #2

declare ptr @glfwGetProcAddress(ptr noundef) #2

declare void @glfwSwapInterval(i32 noundef) #2

declare i32 @glfwWindowShouldClose(ptr noundef) #2

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @mat4x4_identity(ptr noundef) #4

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @mat4x4_rotate_Z(ptr noundef, ptr noundef, float noundef) #4

declare double @glfwGetTime() #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @mat4x4_ortho(ptr noundef, float noundef, float noundef, float noundef, float noundef, float noundef, float noundef) #4

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @mat4x4_mul(ptr noundef, ptr noundef, ptr noundef) #4

declare void @glfwSwapBuffers(ptr noundef) #2

declare void @glfwPollEvents() #2

declare void @glfwDestroyWindow(ptr noundef) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 = { 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 #4 = { inlinehint 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 = { noreturn nounwind }
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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}


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

%struct.Vertex = type { [2 x float], [3 x float] }

@glad_glAttachShader = external dso_local local_unnamed_addr global ptr, align 8
@glad_glBindBuffer = external dso_local local_unnamed_addr global ptr, align 8
@glad_glBufferData = external dso_local local_unnamed_addr global ptr, align 8
@glad_glClear = external dso_local local_unnamed_addr global ptr, align 8
@glad_glCompileShader = external dso_local local_unnamed_addr global ptr, align 8
@glad_glCreateProgram = external dso_local local_unnamed_addr global ptr, align 8
@glad_glCreateShader = external dso_local local_unnamed_addr global ptr, align 8
@glad_glDrawArrays = external dso_local local_unnamed_addr global ptr, align 8
@glad_glEnableVertexAttribArray = external dso_local local_unnamed_addr global ptr, align 8
@glad_glGenBuffers = external dso_local local_unnamed_addr global ptr, align 8
@glad_glGetAttribLocation = external dso_local local_unnamed_addr global ptr, align 8
@glad_glGetUniformLocation = external dso_local local_unnamed_addr global ptr, align 8
@glad_glLinkProgram = external dso_local local_unnamed_addr global ptr, align 8
@glad_glShaderSource = external dso_local local_unnamed_addr global ptr, align 8
@glad_glUniformMatrix4fv = external dso_local local_unnamed_addr global ptr, align 8
@glad_glUseProgram = external dso_local local_unnamed_addr global ptr, align 8
@glad_glVertexAttribPointer = external dso_local local_unnamed_addr global ptr, align 8
@glad_glViewport = external dso_local local_unnamed_addr global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [23 x i8], align 1
@vertices = external hidden constant [3 x %struct.Vertex], align 16
@vertex_shader_text = external hidden global ptr, align 8
@fragment_shader_text = external hidden global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [5 x i8], align 1

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @gladLoadGLES2(ptr noundef) local_unnamed_addr #1

; Function Attrs: noreturn nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca [4 x [4 x float]], align 16
  %5 = alloca [4 x [4 x float]], align 16
  %6 = alloca [4 x [4 x float]], align 16
  %7 = tail call ptr @glfwSetErrorCallback(ptr noundef nonnull @error_callback) #6
  %8 = tail call i32 @glfwInit() #6
  %.not = icmp eq i32 %8, 0
  br i1 %.not, label %9, label %10

9:                                                ; preds = %0
  tail call void @exit(i32 noundef 1) #7
  unreachable

10:                                               ; preds = %0
  tail call void @glfwWindowHint(i32 noundef 139265, i32 noundef 196610) #6
  tail call void @glfwWindowHint(i32 noundef 139266, i32 noundef 2) #6
  tail call void @glfwWindowHint(i32 noundef 139267, i32 noundef 0) #6
  tail call void @glfwWindowHint(i32 noundef 139275, i32 noundef 221186) #6
  %11 = tail call ptr @glfwCreateWindow(i32 noundef 640, i32 noundef 480, ptr noundef nonnull @.str.1, ptr noundef null, ptr noundef null) #6
  %.not29 = icmp eq ptr %11, null
  br i1 %.not29, label %12, label %15

12:                                               ; preds = %10
  tail call void @glfwWindowHint(i32 noundef 139275, i32 noundef 221185) #6
  %13 = tail call ptr @glfwCreateWindow(i32 noundef 640, i32 noundef 480, ptr noundef nonnull @.str.2, ptr noundef null, ptr noundef null) #6
  %.not30 = icmp eq ptr %13, null
  br i1 %.not30, label %14, label %15

14:                                               ; preds = %12
  tail call void @glfwTerminate() #6
  tail call void @exit(i32 noundef 1) #7
  unreachable

15:                                               ; preds = %12, %10
  %.0 = phi ptr [ %11, %10 ], [ %13, %12 ]
  %16 = tail call ptr @glfwSetKeyCallback(ptr noundef nonnull %.0, ptr noundef nonnull @key_callback) #6
  tail call void @glfwMakeContextCurrent(ptr noundef nonnull %.0) #6
  %17 = tail call i32 @gladLoadGLES2(ptr noundef nonnull @glfwGetProcAddress)
  tail call void @glfwSwapInterval(i32 noundef 1) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  %18 = load ptr, ptr @glad_glGenBuffers, align 8, !tbaa !5
  call void %18(i32 noundef 1, ptr noundef nonnull %1) #6
  %19 = load ptr, ptr @glad_glBindBuffer, align 8, !tbaa !5
  %20 = load i32, ptr %1, align 4, !tbaa !9
  call void %19(i32 noundef 34962, i32 noundef %20) #6
  %21 = load ptr, ptr @glad_glBufferData, align 8, !tbaa !5
  call void %21(i32 noundef 34962, i64 noundef 60, ptr noundef nonnull @vertices, i32 noundef 35044) #6
  %22 = load ptr, ptr @glad_glCreateShader, align 8, !tbaa !5
  %23 = call i32 %22(i32 noundef 35633) #6
  %24 = load ptr, ptr @glad_glShaderSource, align 8, !tbaa !5
  call void %24(i32 noundef %23, i32 noundef 1, ptr noundef nonnull @vertex_shader_text, ptr noundef null) #6
  %25 = load ptr, ptr @glad_glCompileShader, align 8, !tbaa !5
  call void %25(i32 noundef %23) #6
  %26 = load ptr, ptr @glad_glCreateShader, align 8, !tbaa !5
  %27 = call i32 %26(i32 noundef 35632) #6
  %28 = load ptr, ptr @glad_glShaderSource, align 8, !tbaa !5
  call void %28(i32 noundef %27, i32 noundef 1, ptr noundef nonnull @fragment_shader_text, ptr noundef null) #6
  %29 = load ptr, ptr @glad_glCompileShader, align 8, !tbaa !5
  call void %29(i32 noundef %27) #6
  %30 = load ptr, ptr @glad_glCreateProgram, align 8, !tbaa !5
  %31 = call i32 %30() #6
  %32 = load ptr, ptr @glad_glAttachShader, align 8, !tbaa !5
  call void %32(i32 noundef %31, i32 noundef %23) #6
  %33 = load ptr, ptr @glad_glAttachShader, align 8, !tbaa !5
  call void %33(i32 noundef %31, i32 noundef %27) #6
  %34 = load ptr, ptr @glad_glLinkProgram, align 8, !tbaa !5
  call void %34(i32 noundef %31) #6
  %35 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !5
  %36 = call i32 %35(i32 noundef %31, ptr noundef nonnull @.str.3) #6
  %37 = load ptr, ptr @glad_glGetAttribLocation, align 8, !tbaa !5
  %38 = call i32 %37(i32 noundef %31, ptr noundef nonnull @.str.4) #6
  %39 = load ptr, ptr @glad_glGetAttribLocation, align 8, !tbaa !5
  %40 = call i32 %39(i32 noundef %31, ptr noundef nonnull @.str.5) #6
  %41 = load ptr, ptr @glad_glEnableVertexAttribArray, align 8, !tbaa !5
  call void %41(i32 noundef %38) #6
  %42 = load ptr, ptr @glad_glEnableVertexAttribArray, align 8, !tbaa !5
  call void %42(i32 noundef %40) #6
  %43 = load ptr, ptr @glad_glVertexAttribPointer, align 8, !tbaa !5
  call void %43(i32 noundef %38, i32 noundef 2, i32 noundef 5126, i8 noundef zeroext 0, i32 noundef 20, ptr noundef null) #6
  %44 = load ptr, ptr @glad_glVertexAttribPointer, align 8, !tbaa !5
  call void %44(i32 noundef %40, i32 noundef 3, i32 noundef 5126, i8 noundef zeroext 0, i32 noundef 20, ptr noundef nonnull inttoptr (i64 8 to ptr)) #6
  %45 = call i32 @glfwWindowShouldClose(ptr noundef nonnull %.0) #6
  %.not3132 = icmp eq i32 %45, 0
  br i1 %.not3132, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %15, %.lr.ph
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  call void @glfwGetFramebufferSize(ptr noundef nonnull %.0, ptr noundef nonnull %2, ptr noundef nonnull %3) #6
  %46 = load i32, ptr %2, align 4, !tbaa !9
  %47 = sitofp i32 %46 to float
  %48 = load i32, ptr %3, align 4, !tbaa !9
  %49 = sitofp i32 %48 to float
  %50 = fdiv float %47, %49
  %51 = load ptr, ptr @glad_glViewport, align 8, !tbaa !5
  call void %51(i32 noundef 0, i32 noundef 0, i32 noundef %46, i32 noundef %48) #6
  %52 = load ptr, ptr @glad_glClear, align 8, !tbaa !5
  call void %52(i32 noundef 16384) #6
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %6) #6
  call void @mat4x4_identity(ptr noundef nonnull %4)
  %53 = call double @glfwGetTime() #6
  %54 = fptrunc double %53 to float
  call void @mat4x4_rotate_Z(ptr noundef nonnull %4, ptr noundef nonnull %4, float noundef %54)
  %55 = fneg float %50
  call void @mat4x4_ortho(ptr noundef nonnull %5, float noundef %55, float noundef %50, float noundef -1.000000e+00, float noundef 1.000000e+00, float noundef 1.000000e+00, float noundef -1.000000e+00)
  call void @mat4x4_mul(ptr noundef nonnull %6, ptr noundef nonnull %5, ptr noundef nonnull %4)
  %56 = load ptr, ptr @glad_glUseProgram, align 8, !tbaa !5
  call void %56(i32 noundef %31) #6
  %57 = load ptr, ptr @glad_glUniformMatrix4fv, align 8, !tbaa !5
  call void %57(i32 noundef %36, i32 noundef 1, i8 noundef zeroext 0, ptr noundef nonnull %6) #6
  %58 = load ptr, ptr @glad_glDrawArrays, align 8, !tbaa !5
  call void %58(i32 noundef 4, i32 noundef 0, i32 noundef 3) #6
  call void @glfwSwapBuffers(ptr noundef nonnull %.0) #6
  call void @glfwPollEvents() #6
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  %59 = call i32 @glfwWindowShouldClose(ptr noundef nonnull %.0) #6
  %.not31 = icmp eq i32 %59, 0
  br i1 %.not31, label %.lr.ph, label %._crit_edge, !llvm.loop !11

._crit_edge:                                      ; preds = %.lr.ph, %15
  call void @glfwDestroyWindow(ptr noundef nonnull %.0) #6
  call void @glfwTerminate() #6
  call void @exit(i32 noundef 0) #7
  unreachable
}

declare ptr @glfwSetErrorCallback(ptr noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare hidden void @error_callback(i32 noundef, ptr noundef) #1

declare i32 @glfwInit() local_unnamed_addr #3

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #4

declare void @glfwWindowHint(i32 noundef, i32 noundef) local_unnamed_addr #3

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

declare void @glfwTerminate() local_unnamed_addr #3

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

; Function Attrs: nounwind uwtable
declare hidden void @key_callback(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #1

declare void @glfwMakeContextCurrent(ptr noundef) local_unnamed_addr #3

declare ptr @glfwGetProcAddress(ptr noundef) #3

declare void @glfwSwapInterval(i32 noundef) local_unnamed_addr #3

declare i32 @glfwWindowShouldClose(ptr noundef) local_unnamed_addr #3

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @mat4x4_identity(ptr noundef) local_unnamed_addr #5

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @mat4x4_rotate_Z(ptr noundef, ptr noundef, float noundef) local_unnamed_addr #5

declare double @glfwGetTime() local_unnamed_addr #3

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @mat4x4_ortho(ptr noundef, float noundef, float noundef, float noundef, float noundef, float noundef, float noundef) local_unnamed_addr #5

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @mat4x4_mul(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #5

declare void @glfwSwapBuffers(ptr noundef) local_unnamed_addr #3

declare void @glfwPollEvents() local_unnamed_addr #3

declare void @glfwDestroyWindow(ptr noundef) local_unnamed_addr #3

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 = { noreturn nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "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 "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint 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 #6 = { nounwind }
attributes #7 = { noreturn 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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass