; LLVM IR from Erkaman/fluid_sim :: deps/glfw-3.2/examples (simple)

; 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.anon = type { float, float, float, float, float }

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

; Function Attrs: nounwind uwtable
define dso_local i32 @main() #0 {
  %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 float, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, 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
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  %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) #6
  unreachable

20:                                               ; preds = %0
  call void @glfwWindowHint(i32 noundef 139266, i32 noundef 2)
  call void @glfwWindowHint(i32 noundef 139267, i32 noundef 0)
  %21 = call ptr @glfwCreateWindow(i32 noundef 640, i32 noundef 480, ptr noundef @.str, 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 %25, label %24

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

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

73:                                               ; preds = %78, %25
  %74 = load ptr, ptr %2, align 8, !tbaa !5
  %75 = call i32 @glfwWindowShouldClose(ptr noundef %74)
  %76 = icmp ne i32 %75, 0
  %77 = xor i1 %76, true
  br i1 %77, label %78, label %108

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

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

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

declare ptr @glfwSetErrorCallback(ptr noundef) #2

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

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

declare void @glfwMakeContextCurrent(ptr noundef) #2

declare i32 @gladLoadGLLoader(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

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

declare void @glfwDestroyWindow(ptr noundef) #2

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { nounwind }
attributes #6 = { 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 = !{!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.anon = type { float, float, float, float, float }

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

; Function Attrs: noreturn nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %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
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  %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 139266, i32 noundef 2) #6
  tail call void @glfwWindowHint(i32 noundef 139267, i32 noundef 0) #6
  %11 = tail call ptr @glfwCreateWindow(i32 noundef 640, i32 noundef 480, ptr noundef nonnull @.str, ptr noundef null, ptr noundef null) #6
  %.not26 = icmp eq ptr %11, null
  br i1 %.not26, label %12, label %13

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

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

.lr.ph:                                           ; preds = %13, %.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 @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 @glfwGetFramebufferSize(ptr noundef nonnull %11, ptr noundef nonnull %2, ptr noundef nonnull %3) #6
  %44 = load i32, ptr %2, align 4, !tbaa !9
  %45 = sitofp i32 %44 to float
  %46 = load i32, ptr %3, align 4, !tbaa !9
  %47 = sitofp i32 %46 to float
  %48 = fdiv float %45, %47
  %49 = load ptr, ptr @glad_glViewport, align 8, !tbaa !5
  call void %49(i32 noundef 0, i32 noundef 0, i32 noundef %44, i32 noundef %46) #6
  %50 = load ptr, ptr @glad_glClear, align 8, !tbaa !5
  call void %50(i32 noundef 16384) #6
  call void @mat4x4_identity(ptr noundef nonnull %4)
  %51 = call double @glfwGetTime() #6
  %52 = fptrunc double %51 to float
  call void @mat4x4_rotate_Z(ptr noundef nonnull %4, ptr noundef nonnull %4, float noundef %52)
  %53 = fneg float %48
  call void @mat4x4_ortho(ptr noundef nonnull %5, float noundef %53, float noundef %48, 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)
  %54 = load ptr, ptr @glad_glUseProgram, align 8, !tbaa !5
  call void %54(i32 noundef %29) #6
  %55 = load ptr, ptr @glad_glUniformMatrix4fv, align 8, !tbaa !5
  call void %55(i32 noundef %34, i32 noundef 1, i8 noundef zeroext 0, ptr noundef nonnull %6) #6
  %56 = load ptr, ptr @glad_glDrawArrays, align 8, !tbaa !5
  call void %56(i32 noundef 4, i32 noundef 0, i32 noundef 3) #6
  call void @glfwSwapBuffers(ptr noundef nonnull %11) #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
  %57 = call i32 @glfwWindowShouldClose(ptr noundef nonnull %11) #6
  %.not27 = icmp eq i32 %57, 0
  br i1 %.not27, label %.lr.ph, label %._crit_edge, !llvm.loop !11

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

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

declare ptr @glfwSetErrorCallback(ptr noundef) local_unnamed_addr #2

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

declare i32 @glfwInit() local_unnamed_addr #2

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

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

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

declare void @glfwTerminate() local_unnamed_addr #2

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

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

declare void @glfwMakeContextCurrent(ptr noundef) local_unnamed_addr #2

declare i32 @gladLoadGLLoader(ptr noundef) local_unnamed_addr #2

declare ptr @glfwGetProcAddress(ptr noundef) #2

declare void @glfwSwapInterval(i32 noundef) local_unnamed_addr #2

declare i32 @glfwWindowShouldClose(ptr noundef) local_unnamed_addr #2

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

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

declare void @glfwPollEvents() local_unnamed_addr #2

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

declare void @glfwDestroyWindow(ptr noundef) local_unnamed_addr #2

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #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