; LLVM IR from danginsburg/opengles3-book :: Chapter_7/Instancing (Instancing)

; 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.ESContext = type { ptr, ptr, i32, i32, ptr, i64, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.UserData = type { i32, i32, i32, i32, i32, i32, [100 x float] }

@__const.Init.vShaderStr = external hidden unnamed_addr constant [451 x i8], align 16
@__const.Init.fShaderStr = external hidden unnamed_addr constant [385 x i8], align 16

; Function Attrs: nounwind uwtable
define dso_local i32 @Init(ptr noundef %0) #0 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca [451 x i8], align 16
  %7 = alloca [385 x i8], align 16
  %8 = alloca [100 x [4 x i8]], align 16
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  %11 = load ptr, ptr %2, align 8, !tbaa !5
  %12 = getelementptr inbounds %struct.ESContext, ptr %11, i32 0, i32 1
  %13 = load ptr, ptr %12, align 8, !tbaa !9
  store ptr %13, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 451, ptr %6) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %6, ptr align 16 @__const.Init.vShaderStr, i64 451, i1 false)
  call void @llvm.lifetime.start.p0(i64 385, ptr %7) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %7, ptr align 16 @__const.Init.fShaderStr, i64 385, i1 false)
  %14 = getelementptr inbounds [451 x i8], ptr %6, i64 0, i64 0
  %15 = getelementptr inbounds [385 x i8], ptr %7, i64 0, i64 0
  %16 = call i32 @esLoadProgram(ptr noundef %14, ptr noundef %15)
  %17 = load ptr, ptr %5, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.UserData, ptr %17, i32 0, i32 0
  store i32 %16, ptr %18, align 4, !tbaa !13
  %19 = call i32 @esGenCube(float noundef 0x3FB99999A0000000, ptr noundef %3, ptr noundef null, ptr noundef null, ptr noundef %4)
  %20 = load ptr, ptr %5, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct.UserData, ptr %20, i32 0, i32 5
  store i32 %19, ptr %21, align 4, !tbaa !15
  %22 = load ptr, ptr %5, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.UserData, ptr %22, i32 0, i32 4
  call void @glGenBuffers(i32 noundef 1, ptr noundef %23)
  %24 = load ptr, ptr %5, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.UserData, ptr %24, i32 0, i32 4
  %26 = load i32, ptr %25, align 4, !tbaa !16
  call void @glBindBuffer(i32 noundef 34963, i32 noundef %26)
  %27 = load ptr, ptr %5, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.UserData, ptr %27, i32 0, i32 5
  %29 = load i32, ptr %28, align 4, !tbaa !15
  %30 = sext i32 %29 to i64
  %31 = mul i64 4, %30
  %32 = load ptr, ptr %4, align 8, !tbaa !5
  call void @glBufferData(i32 noundef 34963, i64 noundef %31, ptr noundef %32, i32 noundef 35044)
  call void @glBindBuffer(i32 noundef 34963, i32 noundef 0)
  %33 = load ptr, ptr %4, align 8, !tbaa !5
  call void @free(ptr noundef %33) #5
  %34 = load ptr, ptr %5, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.UserData, ptr %34, i32 0, i32 1
  call void @glGenBuffers(i32 noundef 1, ptr noundef %35)
  %36 = load ptr, ptr %5, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.UserData, ptr %36, i32 0, i32 1
  %38 = load i32, ptr %37, align 4, !tbaa !17
  call void @glBindBuffer(i32 noundef 34962, i32 noundef %38)
  %39 = load ptr, ptr %3, align 8, !tbaa !5
  call void @glBufferData(i32 noundef 34962, i64 noundef 288, ptr noundef %39, i32 noundef 35044)
  %40 = load ptr, ptr %3, align 8, !tbaa !5
  call void @free(ptr noundef %40) #5
  call void @llvm.lifetime.start.p0(i64 400, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  call void @srandom(i32 noundef 0) #5
  store i32 0, ptr %9, align 4, !tbaa !18
  br label %41

41:                                               ; preds = %70, %1
  %42 = load i32, ptr %9, align 4, !tbaa !18
  %43 = icmp slt i32 %42, 100
  br i1 %43, label %44, label %73

44:                                               ; preds = %41
  %45 = call i64 @random() #5
  %46 = srem i64 %45, 255
  %47 = trunc i64 %46 to i8
  %48 = load i32, ptr %9, align 4, !tbaa !18
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds [100 x [4 x i8]], ptr %8, i64 0, i64 %49
  %51 = getelementptr inbounds [4 x i8], ptr %50, i64 0, i64 0
  store i8 %47, ptr %51, align 4, !tbaa !19
  %52 = call i64 @random() #5
  %53 = srem i64 %52, 255
  %54 = trunc i64 %53 to i8
  %55 = load i32, ptr %9, align 4, !tbaa !18
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [100 x [4 x i8]], ptr %8, i64 0, i64 %56
  %58 = getelementptr inbounds [4 x i8], ptr %57, i64 0, i64 1
  store i8 %54, ptr %58, align 1, !tbaa !19
  %59 = call i64 @random() #5
  %60 = srem i64 %59, 255
  %61 = trunc i64 %60 to i8
  %62 = load i32, ptr %9, align 4, !tbaa !18
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [100 x [4 x i8]], ptr %8, i64 0, i64 %63
  %65 = getelementptr inbounds [4 x i8], ptr %64, i64 0, i64 2
  store i8 %61, ptr %65, align 2, !tbaa !19
  %66 = load i32, ptr %9, align 4, !tbaa !18
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [100 x [4 x i8]], ptr %8, i64 0, i64 %67
  %69 = getelementptr inbounds [4 x i8], ptr %68, i64 0, i64 3
  store i8 0, ptr %69, align 1, !tbaa !19
  br label %70

70:                                               ; preds = %44
  %71 = load i32, ptr %9, align 4, !tbaa !18
  %72 = add nsw i32 %71, 1
  store i32 %72, ptr %9, align 4, !tbaa !18
  br label %41, !llvm.loop !20

73:                                               ; preds = %41
  %74 = load ptr, ptr %5, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.UserData, ptr %74, i32 0, i32 2
  call void @glGenBuffers(i32 noundef 1, ptr noundef %75)
  %76 = load ptr, ptr %5, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.UserData, ptr %76, i32 0, i32 2
  %78 = load i32, ptr %77, align 4, !tbaa !22
  call void @glBindBuffer(i32 noundef 34962, i32 noundef %78)
  %79 = getelementptr inbounds [100 x [4 x i8]], ptr %8, i64 0, i64 0
  call void @glBufferData(i32 noundef 34962, i64 noundef 400, ptr noundef %79, i32 noundef 35044)
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 400, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 0, ptr %10, align 4, !tbaa !18
  br label %80

80:                                               ; preds = %94, %73
  %81 = load i32, ptr %10, align 4, !tbaa !18
  %82 = icmp slt i32 %81, 100
  br i1 %82, label %83, label %97

83:                                               ; preds = %80
  %84 = call i64 @random() #5
  %85 = srem i64 %84, 32768
  %86 = sitofp i64 %85 to float
  %87 = fdiv float %86, 3.276700e+04
  %88 = fmul float %87, 3.600000e+02
  %89 = load ptr, ptr %5, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.UserData, ptr %89, i32 0, i32 6
  %91 = load i32, ptr %10, align 4, !tbaa !18
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [100 x float], ptr %90, i64 0, i64 %92
  store float %88, ptr %93, align 4, !tbaa !23
  br label %94

94:                                               ; preds = %83
  %95 = load i32, ptr %10, align 4, !tbaa !18
  %96 = add nsw i32 %95, 1
  store i32 %96, ptr %10, align 4, !tbaa !18
  br label %80, !llvm.loop !25

97:                                               ; preds = %80
  %98 = load ptr, ptr %5, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.UserData, ptr %98, i32 0, i32 3
  call void @glGenBuffers(i32 noundef 1, ptr noundef %99)
  %100 = load ptr, ptr %5, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.UserData, ptr %100, i32 0, i32 3
  %102 = load i32, ptr %101, align 4, !tbaa !26
  call void @glBindBuffer(i32 noundef 34962, i32 noundef %102)
  call void @glBufferData(i32 noundef 34962, i64 noundef 6400, ptr noundef null, i32 noundef 35048)
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @glBindBuffer(i32 noundef 34962, i32 noundef 0)
  call void @glClearColor(float noundef 1.000000e+00, float noundef 1.000000e+00, float noundef 1.000000e+00, float noundef 0.000000e+00)
  call void @llvm.lifetime.end.p0(i64 385, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 451, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  ret i32 1
}

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

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

declare i32 @esGenCube(float noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #3

declare void @glGenBuffers(i32 noundef, ptr noundef) #3

declare void @glBindBuffer(i32 noundef, i32 noundef) #3

declare void @glBufferData(i32 noundef, i64 noundef, ptr noundef, i32 noundef) #3

; Function Attrs: nounwind
declare void @free(ptr noundef) #4

; Function Attrs: nounwind
declare void @srandom(i32 noundef) #4

; Function Attrs: nounwind
declare i64 @random() #4

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

declare void @glClearColor(float noundef, float noundef, float noundef, float noundef) #3

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 = { nocallback nofree 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 = { 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 }

!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, !6, i64 8}
!10 = !{!"ESContext", !6, i64 0, !6, i64 8, !11, i64 16, !11, i64 20, !6, i64 24, !12, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88}
!11 = !{!"int", !7, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !11, i64 0}
!14 = !{!"", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !7, i64 24}
!15 = !{!14, !11, i64 20}
!16 = !{!14, !11, i64 16}
!17 = !{!14, !11, i64 4}
!18 = !{!11, !11, i64 0}
!19 = !{!7, !7, i64 0}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = !{!14, !11, i64 8}
!23 = !{!24, !24, i64 0}
!24 = !{!"float", !7, i64 0}
!25 = distinct !{!25, !21}
!26 = !{!14, !11, i64 12}


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

@__const.Init.vShaderStr = external hidden unnamed_addr constant [451 x i8], align 16
@__const.Init.fShaderStr = external hidden unnamed_addr constant [385 x i8], align 16

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @Init(ptr nocapture noundef readonly %0) local_unnamed_addr #0 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca [451 x i8], align 16
  %5 = alloca [385 x i8], align 16
  %6 = alloca [100 x [4 x i8]], align 16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  %7 = getelementptr inbounds i8, ptr %0, i64 8
  %8 = load ptr, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 451, ptr nonnull %4) #6
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(451) %4, ptr noundef nonnull align 16 dereferenceable(451) @__const.Init.vShaderStr, i64 451, i1 false)
  call void @llvm.lifetime.start.p0(i64 385, ptr nonnull %5) #6
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(385) %5, ptr noundef nonnull align 16 dereferenceable(385) @__const.Init.fShaderStr, i64 385, i1 false)
  %9 = call i32 @esLoadProgram(ptr noundef nonnull %4, ptr noundef nonnull %5) #6
  store i32 %9, ptr %8, align 4, !tbaa !12
  %10 = call i32 @esGenCube(float noundef 0x3FB99999A0000000, ptr noundef nonnull %2, ptr noundef null, ptr noundef null, ptr noundef nonnull %3) #6
  %11 = getelementptr inbounds i8, ptr %8, i64 20
  store i32 %10, ptr %11, align 4, !tbaa !14
  %12 = getelementptr inbounds i8, ptr %8, i64 16
  call void @glGenBuffers(i32 noundef 1, ptr noundef nonnull %12) #6
  %13 = load i32, ptr %12, align 4, !tbaa !15
  call void @glBindBuffer(i32 noundef 34963, i32 noundef %13) #6
  %14 = load i32, ptr %11, align 4, !tbaa !14
  %15 = sext i32 %14 to i64
  %16 = shl nsw i64 %15, 2
  %17 = load ptr, ptr %3, align 8, !tbaa !16
  call void @glBufferData(i32 noundef 34963, i64 noundef %16, ptr noundef %17, i32 noundef 35044) #6
  call void @glBindBuffer(i32 noundef 34963, i32 noundef 0) #6
  %18 = load ptr, ptr %3, align 8, !tbaa !16
  call void @free(ptr noundef %18) #6
  %19 = getelementptr inbounds i8, ptr %8, i64 4
  call void @glGenBuffers(i32 noundef 1, ptr noundef nonnull %19) #6
  %20 = load i32, ptr %19, align 4, !tbaa !17
  call void @glBindBuffer(i32 noundef 34962, i32 noundef %20) #6
  %21 = load ptr, ptr %2, align 8, !tbaa !16
  call void @glBufferData(i32 noundef 34962, i64 noundef 288, ptr noundef %21, i32 noundef 35044) #6
  %22 = load ptr, ptr %2, align 8, !tbaa !16
  call void @free(ptr noundef %22) #6
  call void @llvm.lifetime.start.p0(i64 400, ptr nonnull %6) #6
  call void @srandom(i32 noundef 0) #6
  br label %23

23:                                               ; preds = %1, %23
  %indvars.iv = phi i64 [ 0, %1 ], [ %indvars.iv.next, %23 ]
  %24 = call i64 @random() #6
  %25 = srem i64 %24, 255
  %26 = trunc i64 %25 to i8
  %27 = getelementptr inbounds [100 x [4 x i8]], ptr %6, i64 0, i64 %indvars.iv
  store i8 %26, ptr %27, align 4, !tbaa !18
  %28 = call i64 @random() #6
  %29 = srem i64 %28, 255
  %30 = trunc i64 %29 to i8
  %31 = getelementptr inbounds i8, ptr %27, i64 1
  store i8 %30, ptr %31, align 1, !tbaa !18
  %32 = call i64 @random() #6
  %33 = srem i64 %32, 255
  %34 = trunc i64 %33 to i8
  %35 = getelementptr inbounds i8, ptr %27, i64 2
  store i8 %34, ptr %35, align 2, !tbaa !18
  %36 = getelementptr inbounds i8, ptr %27, i64 3
  store i8 0, ptr %36, align 1, !tbaa !18
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 100
  br i1 %exitcond.not, label %37, label %23, !llvm.loop !19

37:                                               ; preds = %23
  %38 = getelementptr inbounds i8, ptr %8, i64 8
  call void @glGenBuffers(i32 noundef 1, ptr noundef nonnull %38) #6
  %39 = load i32, ptr %38, align 4, !tbaa !21
  call void @glBindBuffer(i32 noundef 34962, i32 noundef %39) #6
  call void @glBufferData(i32 noundef 34962, i64 noundef 400, ptr noundef nonnull %6, i32 noundef 35044) #6
  call void @llvm.lifetime.end.p0(i64 400, ptr nonnull %6) #6
  %40 = getelementptr inbounds i8, ptr %8, i64 24
  br label %41

41:                                               ; preds = %37, %41
  %indvars.iv25 = phi i64 [ 0, %37 ], [ %indvars.iv.next26, %41 ]
  %42 = call i64 @random() #6
  %43 = srem i64 %42, 32768
  %44 = sitofp i64 %43 to float
  %45 = fdiv float %44, 3.276700e+04
  %46 = fmul float %45, 3.600000e+02
  %47 = getelementptr inbounds [100 x float], ptr %40, i64 0, i64 %indvars.iv25
  store float %46, ptr %47, align 4, !tbaa !22
  %indvars.iv.next26 = add nuw nsw i64 %indvars.iv25, 1
  %exitcond28.not = icmp eq i64 %indvars.iv.next26, 100
  br i1 %exitcond28.not, label %48, label %41, !llvm.loop !24

48:                                               ; preds = %41
  %49 = getelementptr inbounds i8, ptr %8, i64 12
  call void @glGenBuffers(i32 noundef 1, ptr noundef nonnull %49) #6
  %50 = load i32, ptr %49, align 4, !tbaa !25
  call void @glBindBuffer(i32 noundef 34962, i32 noundef %50) #6
  call void @glBufferData(i32 noundef 34962, i64 noundef 6400, ptr noundef null, i32 noundef 35048) #6
  call void @glBindBuffer(i32 noundef 34962, i32 noundef 0) #6
  call void @glClearColor(float noundef 1.000000e+00, float noundef 1.000000e+00, float noundef 1.000000e+00, float noundef 0.000000e+00) #6
  call void @llvm.lifetime.end.p0(i64 385, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 451, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  ret i32 1
}

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

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

declare i32 @esGenCube(float noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

declare void @glGenBuffers(i32 noundef, ptr noundef) local_unnamed_addr #3

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

declare void @glBufferData(i32 noundef, i64 noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #4

; Function Attrs: nounwind
declare void @srandom(i32 noundef) local_unnamed_addr #5

; Function Attrs: nounwind
declare i64 @random() local_unnamed_addr #5

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

declare void @glClearColor(float noundef, float noundef, float noundef, float noundef) local_unnamed_addr #3

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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree 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 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 8}
!6 = !{!"ESContext", !7, i64 0, !7, i64 8, !10, i64 16, !10, i64 20, !7, i64 24, !11, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !7, i64 80, !7, i64 88}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"long", !8, i64 0}
!12 = !{!13, !10, i64 0}
!13 = !{!"", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !8, i64 24}
!14 = !{!13, !10, i64 20}
!15 = !{!13, !10, i64 16}
!16 = !{!7, !7, i64 0}
!17 = !{!13, !10, i64 4}
!18 = !{!8, !8, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!13, !10, i64 8}
!22 = !{!23, !23, i64 0}
!23 = !{!"float", !8, i64 0}
!24 = distinct !{!24, !20}
!25 = !{!13, !10, i64 12}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LICMPass,LoopRotatePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass