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

; 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"

@.str = external hidden unnamed_addr constant [28 x i8], align 1
@vertex_shader_text = external hidden global ptr, align 8
@fragment_shader_text = external hidden global ptr, align 8
@glad_glUseProgram = external global ptr, align 8
@glad_glGetUniformLocation = external global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [10 x i8], align 1
@view_angle = external hidden global float, align 4
@aspect_ratio = external hidden global float, align 4
@projection_matrix = external hidden global [16 x float], align 16
@z_far = external hidden global float, align 4
@z_near = external hidden global float, align 4
@glad_glUniformMatrix4fv = external global ptr, align 8
@modelview_matrix = external hidden global [16 x float], align 16
@glad_glViewport = external global ptr, align 8
@glad_glClearColor = external global ptr, align 8
@glad_glClear = external global ptr, align 8
@glad_glDrawElements = external global ptr, align 8

; Function Attrs: nounwind uwtable
define dso_local i32 @main(i32 noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca double, align 8
  %9 = alloca double, align 8
  %10 = alloca i32, align 4
  %11 = alloca float, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  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 4, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  %17 = call ptr @glfwSetErrorCallback(ptr noundef @error_callback)
  %18 = call i32 @glfwInit()
  %19 = icmp ne i32 %18, 0
  br i1 %19, label %21, label %20

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

21:                                               ; preds = %2
  call void @glfwWindowHint(i32 noundef 131075, i32 noundef 0)
  call void @glfwWindowHint(i32 noundef 139266, i32 noundef 3)
  call void @glfwWindowHint(i32 noundef 139267, i32 noundef 2)
  call void @glfwWindowHint(i32 noundef 139272, i32 noundef 204801)
  call void @glfwWindowHint(i32 noundef 139270, i32 noundef 1)
  %22 = call ptr @glfwCreateWindow(i32 noundef 800, i32 noundef 600, ptr noundef @.str, ptr noundef null, ptr noundef null)
  store ptr %22, ptr %6, align 8, !tbaa !9
  %23 = load ptr, ptr %6, align 8, !tbaa !9
  %24 = icmp ne ptr %23, null
  br i1 %24, label %26, label %25

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

26:                                               ; preds = %21
  %27 = load ptr, ptr %6, align 8, !tbaa !9
  %28 = call ptr @glfwSetKeyCallback(ptr noundef %27, ptr noundef @key_callback)
  %29 = load ptr, ptr %6, align 8, !tbaa !9
  call void @glfwMakeContextCurrent(ptr noundef %29)
  %30 = call i32 @gladLoadGLLoader(ptr noundef @glfwGetProcAddress)
  %31 = load ptr, ptr @vertex_shader_text, align 8, !tbaa !9
  %32 = load ptr, ptr @fragment_shader_text, align 8, !tbaa !9
  %33 = call i32 @make_shader_program(ptr noundef %31, ptr noundef %32)
  store i32 %33, ptr %16, align 4, !tbaa !5
  %34 = load i32, ptr %16, align 4, !tbaa !5
  %35 = icmp eq i32 %34, 0
  br i1 %35, label %36, label %37

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

37:                                               ; preds = %26
  %38 = load ptr, ptr @glad_glUseProgram, align 8, !tbaa !9
  %39 = load i32, ptr %16, align 4, !tbaa !5
  call void %38(i32 noundef %39)
  %40 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !9
  %41 = load i32, ptr %16, align 4, !tbaa !5
  %42 = call i32 %40(i32 noundef %41, ptr noundef @.str.1)
  store i32 %42, ptr %13, align 4, !tbaa !5
  %43 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !9
  %44 = load i32, ptr %16, align 4, !tbaa !5
  %45 = call i32 %43(i32 noundef %44, ptr noundef @.str.2)
  store i32 %45, ptr %12, align 4, !tbaa !5
  %46 = load float, ptr @view_angle, align 4, !tbaa !11
  %47 = fdiv float %46, 2.000000e+00
  %48 = call float @tanf(float noundef %47) #5
  %49 = fdiv float 1.000000e+00, %48
  store float %49, ptr %11, align 4, !tbaa !11
  %50 = load float, ptr %11, align 4, !tbaa !11
  %51 = load float, ptr @aspect_ratio, align 4, !tbaa !11
  %52 = fdiv float %50, %51
  store float %52, ptr @projection_matrix, align 16, !tbaa !11
  %53 = load float, ptr %11, align 4, !tbaa !11
  store float %53, ptr getelementptr inbounds ([16 x float], ptr @projection_matrix, i64 0, i64 5), align 4, !tbaa !11
  %54 = load float, ptr @z_far, align 4, !tbaa !11
  %55 = load float, ptr @z_near, align 4, !tbaa !11
  %56 = fadd float %54, %55
  %57 = load float, ptr @z_near, align 4, !tbaa !11
  %58 = load float, ptr @z_far, align 4, !tbaa !11
  %59 = fsub float %57, %58
  %60 = fdiv float %56, %59
  store float %60, ptr getelementptr inbounds ([16 x float], ptr @projection_matrix, i64 0, i64 10), align 8, !tbaa !11
  store float -1.000000e+00, ptr getelementptr inbounds ([16 x float], ptr @projection_matrix, i64 0, i64 11), align 4, !tbaa !11
  %61 = load float, ptr @z_far, align 4, !tbaa !11
  %62 = load float, ptr @z_near, align 4, !tbaa !11
  %63 = fmul float %61, %62
  %64 = fmul float 2.000000e+00, %63
  %65 = load float, ptr @z_near, align 4, !tbaa !11
  %66 = load float, ptr @z_far, align 4, !tbaa !11
  %67 = fsub float %65, %66
  %68 = fdiv float %64, %67
  store float %68, ptr getelementptr inbounds ([16 x float], ptr @projection_matrix, i64 0, i64 14), align 8, !tbaa !11
  %69 = load ptr, ptr @glad_glUniformMatrix4fv, align 8, !tbaa !9
  %70 = load i32, ptr %13, align 4, !tbaa !5
  call void %69(i32 noundef %70, i32 noundef 1, i8 noundef zeroext 0, ptr noundef @projection_matrix)
  store float -5.000000e+00, ptr getelementptr inbounds ([16 x float], ptr @modelview_matrix, i64 0, i64 12), align 16, !tbaa !11
  store float -5.000000e+00, ptr getelementptr inbounds ([16 x float], ptr @modelview_matrix, i64 0, i64 13), align 4, !tbaa !11
  store float -2.000000e+01, ptr getelementptr inbounds ([16 x float], ptr @modelview_matrix, i64 0, i64 14), align 8, !tbaa !11
  %71 = load ptr, ptr @glad_glUniformMatrix4fv, align 8, !tbaa !9
  %72 = load i32, ptr %12, align 4, !tbaa !5
  call void %71(i32 noundef %72, i32 noundef 1, i8 noundef zeroext 0, ptr noundef @modelview_matrix)
  call void @init_map()
  %73 = load i32, ptr %16, align 4, !tbaa !5
  call void @make_mesh(i32 noundef %73)
  %74 = load ptr, ptr %6, align 8, !tbaa !9
  call void @glfwGetFramebufferSize(ptr noundef %74, ptr noundef %14, ptr noundef %15)
  %75 = load ptr, ptr @glad_glViewport, align 8, !tbaa !9
  %76 = load i32, ptr %14, align 4, !tbaa !5
  %77 = load i32, ptr %15, align 4, !tbaa !5
  call void %75(i32 noundef 0, i32 noundef 0, i32 noundef %76, i32 noundef %77)
  %78 = load ptr, ptr @glad_glClearColor, align 8, !tbaa !9
  call void %78(float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 0.000000e+00)
  store i32 0, ptr %10, align 4, !tbaa !5
  store i32 0, ptr %7, align 4, !tbaa !5
  %79 = call double @glfwGetTime()
  store double %79, ptr %9, align 8, !tbaa !13
  br label %80

80:                                               ; preds = %104, %37
  %81 = load ptr, ptr %6, align 8, !tbaa !9
  %82 = call i32 @glfwWindowShouldClose(ptr noundef %81)
  %83 = icmp ne i32 %82, 0
  %84 = xor i1 %83, true
  br i1 %84, label %85, label %105

85:                                               ; preds = %80
  %86 = load i32, ptr %10, align 4, !tbaa !5
  %87 = add nsw i32 %86, 1
  store i32 %87, ptr %10, align 4, !tbaa !5
  %88 = load ptr, ptr @glad_glClear, align 8, !tbaa !9
  call void %88(i32 noundef 16384)
  %89 = load ptr, ptr @glad_glDrawElements, align 8, !tbaa !9
  call void %89(i32 noundef 1, i32 noundef 37762, i32 noundef 5125, ptr noundef null)
  %90 = load ptr, ptr %6, align 8, !tbaa !9
  call void @glfwSwapBuffers(ptr noundef %90)
  call void @glfwPollEvents()
  %91 = call double @glfwGetTime()
  store double %91, ptr %8, align 8, !tbaa !13
  %92 = load double, ptr %8, align 8, !tbaa !13
  %93 = load double, ptr %9, align 8, !tbaa !13
  %94 = fsub double %92, %93
  %95 = fcmp ogt double %94, 2.000000e-01
  br i1 %95, label %96, label %104

96:                                               ; preds = %85
  %97 = load i32, ptr %7, align 4, !tbaa !5
  %98 = icmp slt i32 %97, 200
  br i1 %98, label %99, label %102

99:                                               ; preds = %96
  call void @update_map(i32 noundef 1)
  call void @update_mesh()
  %100 = load i32, ptr %7, align 4, !tbaa !5
  %101 = add nsw i32 %100, 1
  store i32 %101, ptr %7, align 4, !tbaa !5
  br label %102

102:                                              ; preds = %99, %96
  %103 = load double, ptr %8, align 8, !tbaa !13
  store double %103, ptr %9, align 8, !tbaa !13
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %104

104:                                              ; preds = %102, %85
  br label %80, !llvm.loop !15

105:                                              ; preds = %80
  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

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

; Function Attrs: nounwind
declare float @tanf(float noundef) #4

; Function Attrs: nounwind uwtable
declare hidden void @init_map() #0

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

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

declare double @glfwGetTime() #2

declare i32 @glfwWindowShouldClose(ptr noundef) #2

declare void @glfwSwapBuffers(ptr noundef) #2

declare void @glfwPollEvents() #2

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

; Function Attrs: nounwind uwtable
declare hidden void @update_mesh() #0

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 = { 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 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"double", !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"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"

@.str = external hidden unnamed_addr constant [28 x i8], align 1
@vertex_shader_text = external hidden local_unnamed_addr global ptr, align 8
@fragment_shader_text = external hidden local_unnamed_addr global ptr, align 8
@glad_glUseProgram = 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 [8 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [10 x i8], align 1
@view_angle = external hidden local_unnamed_addr global float, align 4
@aspect_ratio = external hidden local_unnamed_addr global float, align 4
@projection_matrix = external hidden global [16 x float], align 16
@z_far = external hidden local_unnamed_addr global float, align 4
@z_near = external hidden local_unnamed_addr global float, align 4
@glad_glUniformMatrix4fv = external local_unnamed_addr global ptr, align 8
@modelview_matrix = external hidden global [16 x float], align 16
@glad_glViewport = external local_unnamed_addr global ptr, align 8
@glad_glClearColor = external local_unnamed_addr global ptr, align 8
@glad_glClear = external local_unnamed_addr global ptr, align 8
@glad_glDrawElements = external local_unnamed_addr global ptr, align 8

; Function Attrs: noreturn nounwind uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr nocapture noundef readnone %1) local_unnamed_addr #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #6
  %5 = tail call ptr @glfwSetErrorCallback(ptr noundef nonnull @error_callback) #6
  %6 = tail call i32 @glfwInit() #6
  %.not = icmp eq i32 %6, 0
  br i1 %.not, label %7, label %8

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

8:                                                ; preds = %2
  tail call void @glfwWindowHint(i32 noundef 131075, i32 noundef 0) #6
  tail call void @glfwWindowHint(i32 noundef 139266, i32 noundef 3) #6
  tail call void @glfwWindowHint(i32 noundef 139267, i32 noundef 2) #6
  tail call void @glfwWindowHint(i32 noundef 139272, i32 noundef 204801) #6
  tail call void @glfwWindowHint(i32 noundef 139270, i32 noundef 1) #6
  %9 = tail call ptr @glfwCreateWindow(i32 noundef 800, i32 noundef 600, ptr noundef nonnull @.str, ptr noundef null, ptr noundef null) #6
  %.not26 = icmp eq ptr %9, null
  br i1 %.not26, label %10, label %11

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

11:                                               ; preds = %8
  %12 = tail call ptr @glfwSetKeyCallback(ptr noundef nonnull %9, ptr noundef nonnull @key_callback) #6
  tail call void @glfwMakeContextCurrent(ptr noundef nonnull %9) #6
  %13 = tail call i32 @gladLoadGLLoader(ptr noundef nonnull @glfwGetProcAddress) #6
  %14 = load ptr, ptr @vertex_shader_text, align 8, !tbaa !5
  %15 = load ptr, ptr @fragment_shader_text, align 8, !tbaa !5
  %16 = tail call i32 @make_shader_program(ptr noundef %14, ptr noundef %15)
  %17 = icmp eq i32 %16, 0
  br i1 %17, label %18, label %19

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

19:                                               ; preds = %11
  %20 = load ptr, ptr @glad_glUseProgram, align 8, !tbaa !5
  tail call void %20(i32 noundef %16) #6
  %21 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !5
  %22 = tail call i32 %21(i32 noundef %16, ptr noundef nonnull @.str.1) #6
  %23 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !5
  %24 = tail call i32 %23(i32 noundef %16, ptr noundef nonnull @.str.2) #6
  %25 = load float, ptr @view_angle, align 4, !tbaa !9
  %26 = fmul float %25, 5.000000e-01
  %27 = tail call float @tanf(float noundef %26) #6
  %28 = fdiv float 1.000000e+00, %27
  %29 = load float, ptr @aspect_ratio, align 4, !tbaa !9
  %30 = fdiv float %28, %29
  store float %30, ptr @projection_matrix, align 16, !tbaa !9
  store float %28, ptr getelementptr inbounds (i8, ptr @projection_matrix, i64 20), align 4, !tbaa !9
  %31 = load float, ptr @z_far, align 4, !tbaa !9
  %32 = load float, ptr @z_near, align 4, !tbaa !9
  %33 = fadd float %31, %32
  %34 = fsub float %32, %31
  %35 = fdiv float %33, %34
  store float %35, ptr getelementptr inbounds (i8, ptr @projection_matrix, i64 40), align 8, !tbaa !9
  store float -1.000000e+00, ptr getelementptr inbounds (i8, ptr @projection_matrix, i64 44), align 4, !tbaa !9
  %36 = fmul float %31, %32
  %37 = fmul float %36, 2.000000e+00
  %38 = fdiv float %37, %34
  store float %38, ptr getelementptr inbounds (i8, ptr @projection_matrix, i64 56), align 8, !tbaa !9
  %39 = load ptr, ptr @glad_glUniformMatrix4fv, align 8, !tbaa !5
  tail call void %39(i32 noundef %22, i32 noundef 1, i8 noundef zeroext 0, ptr noundef nonnull @projection_matrix) #6
  store <2 x float> <float -5.000000e+00, float -5.000000e+00>, ptr getelementptr inbounds (i8, ptr @modelview_matrix, i64 48), align 16, !tbaa !9
  store float -2.000000e+01, ptr getelementptr inbounds (i8, ptr @modelview_matrix, i64 56), align 8, !tbaa !9
  %40 = load ptr, ptr @glad_glUniformMatrix4fv, align 8, !tbaa !5
  tail call void %40(i32 noundef %24, i32 noundef 1, i8 noundef zeroext 0, ptr noundef nonnull @modelview_matrix) #6
  tail call void @init_map()
  tail call void @make_mesh(i32 noundef %16)
  call void @glfwGetFramebufferSize(ptr noundef nonnull %9, ptr noundef nonnull %3, ptr noundef nonnull %4) #6
  %41 = load ptr, ptr @glad_glViewport, align 8, !tbaa !5
  %42 = load i32, ptr %3, align 4, !tbaa !11
  %43 = load i32, ptr %4, align 4, !tbaa !11
  call void %41(i32 noundef 0, i32 noundef 0, i32 noundef %42, i32 noundef %43) #6
  %44 = load ptr, ptr @glad_glClearColor, align 8, !tbaa !5
  call void %44(float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 0.000000e+00) #6
  %45 = call double @glfwGetTime() #6
  %46 = call i32 @glfwWindowShouldClose(ptr noundef nonnull %9) #6
  %.not2728 = icmp eq i32 %46, 0
  br i1 %.not2728, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %19, %56
  %.031 = phi i32 [ %.2, %56 ], [ 0, %19 ]
  %.02030 = phi double [ %.121, %56 ], [ %45, %19 ]
  %47 = load ptr, ptr @glad_glClear, align 8, !tbaa !5
  call void %47(i32 noundef 16384) #6
  %48 = load ptr, ptr @glad_glDrawElements, align 8, !tbaa !5
  call void %48(i32 noundef 1, i32 noundef 37762, i32 noundef 5125, ptr noundef null) #6
  call void @glfwSwapBuffers(ptr noundef nonnull %9) #6
  call void @glfwPollEvents() #6
  %49 = call double @glfwGetTime() #6
  %50 = fsub double %49, %.02030
  %51 = fcmp ogt double %50, 2.000000e-01
  br i1 %51, label %52, label %56

52:                                               ; preds = %.lr.ph
  %53 = icmp slt i32 %.031, 200
  br i1 %53, label %54, label %56

54:                                               ; preds = %52
  call void @update_map(i32 noundef 1)
  call void @update_mesh()
  %55 = add nsw i32 %.031, 1
  br label %56

56:                                               ; preds = %52, %54, %.lr.ph
  %.121 = phi double [ %.02030, %.lr.ph ], [ %49, %54 ], [ %49, %52 ]
  %.2 = phi i32 [ %.031, %.lr.ph ], [ %55, %54 ], [ %.031, %52 ]
  %57 = call i32 @glfwWindowShouldClose(ptr noundef nonnull %9) #6
  %.not27 = icmp eq i32 %57, 0
  br i1 %.not27, label %.lr.ph, label %._crit_edge, !llvm.loop !13

._crit_edge:                                      ; preds = %56, %19
  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

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare float @tanf(float noundef) local_unnamed_addr #5

; Function Attrs: nounwind uwtable
declare hidden void @init_map() local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare hidden void @make_mesh(i32 noundef) local_unnamed_addr #3

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

declare double @glfwGetTime() local_unnamed_addr #2

declare i32 @glfwWindowShouldClose(ptr noundef) local_unnamed_addr #2

declare void @glfwSwapBuffers(ptr noundef) local_unnamed_addr #2

declare void @glfwPollEvents() local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare hidden void @update_map(i32 noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare hidden void @update_mesh() local_unnamed_addr #3

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 = { mustprogress nofree nounwind willreturn memory(write) "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 = !{!"float", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}


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