; LLVM IR from erwincoumans/tiny-differentiable-simulator :: src/visualizer/opengl (tiny_load_shader)

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

@glad_glGetError = external global ptr, align 8
@.str = external hidden unnamed_addr constant [28 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [119 x i8], align 1
@__PRETTY_FUNCTION__.gltLoadShaderPair = external hidden unnamed_addr constant [53 x i8], align 1
@glad_glCreateShader = external global ptr, align 8
@glad_glCompileShader = external global ptr, align 8
@glad_glGetShaderiv = external global ptr, align 8
@glad_glGetShaderInfoLog = external global ptr, align 8
@stderr = external global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@glad_glCreateProgram = external global ptr, align 8
@glad_glAttachShader = external global ptr, align 8
@glad_glLinkProgram = external global ptr, align 8
@glad_glDeleteShader = external global ptr, align 8
@glad_glGetProgramiv = external global ptr, align 8
@glad_glGetProgramInfoLog = external global ptr, align 8
@.str.4 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [4 x i8], align 1
@glad_glDeleteProgram = external global ptr, align 8

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z16gltLoadShaderSrcPKcj(ptr noundef, i32 noundef) #0

; 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 nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: mustprogress uwtable
define dso_local i32 @gltLoadShaderPair(ptr noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca [256 x i8], align 16
  %11 = alloca [256 x i8], align 16
  %12 = alloca i32, align 4
  %13 = alloca [4096 x i8], align 16
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %16 = load ptr, ptr @glad_glGetError, align 8, !tbaa !5
  %17 = call i32 %16()
  %18 = icmp eq i32 %17, 0
  br i1 %18, label %19, label %20

19:                                               ; preds = %2
  br label %22

20:                                               ; preds = %2
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 30, ptr noundef @__PRETTY_FUNCTION__.gltLoadShaderPair) #6
  unreachable

21:                                               ; No predecessors!
  br label %22

22:                                               ; preds = %21, %19
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 0, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  %23 = load ptr, ptr @glad_glCreateShader, align 8, !tbaa !5
  %24 = call i32 %23(i32 noundef 35633)
  store i32 %24, ptr %6, align 4, !tbaa !9
  %25 = load ptr, ptr @glad_glCreateShader, align 8, !tbaa !5
  %26 = call i32 %25(i32 noundef 35632)
  store i32 %26, ptr %7, align 4, !tbaa !9
  %27 = load ptr, ptr %4, align 8, !tbaa !5
  %28 = load i32, ptr %6, align 4, !tbaa !9
  call void @_Z16gltLoadShaderSrcPKcj(ptr noundef %27, i32 noundef %28)
  %29 = load ptr, ptr %5, align 8, !tbaa !5
  %30 = load i32, ptr %7, align 4, !tbaa !9
  call void @_Z16gltLoadShaderSrcPKcj(ptr noundef %29, i32 noundef %30)
  %31 = load ptr, ptr @glad_glCompileShader, align 8, !tbaa !5
  %32 = load i32, ptr %6, align 4, !tbaa !9
  call void %31(i32 noundef %32)
  %33 = load ptr, ptr @glad_glGetError, align 8, !tbaa !5
  %34 = call i32 %33()
  %35 = icmp eq i32 %34, 0
  br i1 %35, label %36, label %37

36:                                               ; preds = %22
  br label %39

37:                                               ; preds = %22
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 47, ptr noundef @__PRETTY_FUNCTION__.gltLoadShaderPair) #6
  unreachable

38:                                               ; No predecessors!
  br label %39

39:                                               ; preds = %38, %36
  %40 = load ptr, ptr @glad_glGetShaderiv, align 8, !tbaa !5
  %41 = load i32, ptr %6, align 4, !tbaa !9
  call void %40(i32 noundef %41, i32 noundef 35713, ptr noundef %9)
  %42 = load i32, ptr %9, align 4, !tbaa !9
  %43 = icmp eq i32 %42, 0
  br i1 %43, label %44, label %51

44:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 256, ptr %10) #7
  call void @llvm.memset.p0.i64(ptr align 16 %10, i8 0, i64 256, i1 false)
  %45 = load ptr, ptr @glad_glGetShaderInfoLog, align 8, !tbaa !5
  %46 = load i32, ptr %6, align 4, !tbaa !9
  %47 = getelementptr inbounds [256 x i8], ptr %10, i64 0, i64 0
  call void %45(i32 noundef %46, i32 noundef 256, ptr noundef null, ptr noundef %47)
  %48 = load ptr, ptr @stderr, align 8, !tbaa !5
  %49 = getelementptr inbounds [256 x i8], ptr %10, i64 0, i64 0
  %50 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %48, ptr noundef @.str.2, ptr noundef %49) #7
  call void @__assert_fail(ptr noundef @.str.3, ptr noundef @.str.1, i32 noundef 54, ptr noundef @__PRETTY_FUNCTION__.gltLoadShaderPair) #6
  unreachable

51:                                               ; preds = %39
  %52 = load ptr, ptr @glad_glGetError, align 8, !tbaa !5
  %53 = call i32 %52()
  %54 = icmp eq i32 %53, 0
  br i1 %54, label %55, label %56

55:                                               ; preds = %51
  br label %58

56:                                               ; preds = %51
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 61, ptr noundef @__PRETTY_FUNCTION__.gltLoadShaderPair) #6
  unreachable

57:                                               ; No predecessors!
  br label %58

58:                                               ; preds = %57, %55
  %59 = load ptr, ptr @glad_glCompileShader, align 8, !tbaa !5
  %60 = load i32, ptr %7, align 4, !tbaa !9
  call void %59(i32 noundef %60)
  %61 = load ptr, ptr @glad_glGetError, align 8, !tbaa !5
  %62 = call i32 %61()
  %63 = icmp eq i32 %62, 0
  br i1 %63, label %64, label %65

64:                                               ; preds = %58
  br label %67

65:                                               ; preds = %58
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 64, ptr noundef @__PRETTY_FUNCTION__.gltLoadShaderPair) #6
  unreachable

66:                                               ; No predecessors!
  br label %67

67:                                               ; preds = %66, %64
  %68 = load ptr, ptr @glad_glGetShaderiv, align 8, !tbaa !5
  %69 = load i32, ptr %7, align 4, !tbaa !9
  call void %68(i32 noundef %69, i32 noundef 35713, ptr noundef %9)
  %70 = load i32, ptr %9, align 4, !tbaa !9
  %71 = icmp eq i32 %70, 0
  br i1 %71, label %72, label %79

72:                                               ; preds = %67
  call void @llvm.lifetime.start.p0(i64 256, ptr %11) #7
  call void @llvm.memset.p0.i64(ptr align 16 %11, i8 0, i64 256, i1 false)
  %73 = load ptr, ptr @glad_glGetShaderInfoLog, align 8, !tbaa !5
  %74 = load i32, ptr %7, align 4, !tbaa !9
  %75 = getelementptr inbounds [256 x i8], ptr %11, i64 0, i64 0
  call void %73(i32 noundef %74, i32 noundef 256, ptr noundef null, ptr noundef %75)
  %76 = load ptr, ptr @stderr, align 8, !tbaa !5
  %77 = getelementptr inbounds [256 x i8], ptr %11, i64 0, i64 0
  %78 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %76, ptr noundef @.str.2, ptr noundef %77) #7
  call void @__assert_fail(ptr noundef @.str.3, ptr noundef @.str.1, i32 noundef 71, ptr noundef @__PRETTY_FUNCTION__.gltLoadShaderPair) #6
  unreachable

79:                                               ; preds = %67
  %80 = load ptr, ptr @glad_glGetError, align 8, !tbaa !5
  %81 = call i32 %80()
  %82 = icmp eq i32 %81, 0
  br i1 %82, label %83, label %84

83:                                               ; preds = %79
  br label %86

84:                                               ; preds = %79
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 78, ptr noundef @__PRETTY_FUNCTION__.gltLoadShaderPair) #6
  unreachable

85:                                               ; No predecessors!
  br label %86

86:                                               ; preds = %85, %83
  %87 = load ptr, ptr @glad_glCreateProgram, align 8, !tbaa !5
  %88 = call i32 %87()
  store i32 %88, ptr %8, align 4, !tbaa !9
  %89 = load ptr, ptr @glad_glAttachShader, align 8, !tbaa !5
  %90 = load i32, ptr %8, align 4, !tbaa !9
  %91 = load i32, ptr %6, align 4, !tbaa !9
  call void %89(i32 noundef %90, i32 noundef %91)
  %92 = load ptr, ptr @glad_glAttachShader, align 8, !tbaa !5
  %93 = load i32, ptr %8, align 4, !tbaa !9
  %94 = load i32, ptr %7, align 4, !tbaa !9
  call void %92(i32 noundef %93, i32 noundef %94)
  %95 = load ptr, ptr @glad_glLinkProgram, align 8, !tbaa !5
  %96 = load i32, ptr %8, align 4, !tbaa !9
  call void %95(i32 noundef %96)
  %97 = load ptr, ptr @glad_glDeleteShader, align 8, !tbaa !5
  %98 = load i32, ptr %6, align 4, !tbaa !9
  call void %97(i32 noundef %98)
  %99 = load ptr, ptr @glad_glDeleteShader, align 8, !tbaa !5
  %100 = load i32, ptr %7, align 4, !tbaa !9
  call void %99(i32 noundef %100)
  %101 = load ptr, ptr @glad_glGetProgramiv, align 8, !tbaa !5
  %102 = load i32, ptr %8, align 4, !tbaa !9
  call void %101(i32 noundef %102, i32 noundef 35714, ptr noundef %9)
  %103 = load i32, ptr %9, align 4, !tbaa !9
  %104 = icmp eq i32 %103, 0
  br i1 %104, label %105, label %115

105:                                              ; preds = %86
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  store i32 4096, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4096, ptr %13) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  %106 = load ptr, ptr @glad_glGetProgramInfoLog, align 8, !tbaa !5
  %107 = load i32, ptr %8, align 4, !tbaa !9
  %108 = load i32, ptr %12, align 4, !tbaa !9
  %109 = getelementptr inbounds [4096 x i8], ptr %13, i64 0, i64 0
  call void %106(i32 noundef %107, i32 noundef %108, ptr noundef %14, ptr noundef %109)
  %110 = call i32 (ptr, ...) @printf(ptr noundef @.str.4)
  %111 = getelementptr inbounds [4096 x i8], ptr %13, i64 0, i64 0
  %112 = call i32 (ptr, ...) @printf(ptr noundef @.str.5, ptr noundef %111)
  %113 = load ptr, ptr @glad_glDeleteProgram, align 8, !tbaa !5
  %114 = load i32, ptr %8, align 4, !tbaa !9
  call void %113(i32 noundef %114)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4096, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %117

115:                                              ; preds = %86
  %116 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %116, ptr %3, align 4
  store i32 1, ptr %15, align 4
  br label %117

117:                                              ; preds = %115, %105
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  %118 = load i32, ptr %3, align 4
  ret i32 %118
}

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #4

declare i32 @printf(ptr noundef, ...) #5

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 = { "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 = { noreturn nounwind }
attributes #7 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}


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

@glad_glGetError = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [28 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [119 x i8], align 1
@__PRETTY_FUNCTION__.gltLoadShaderPair = external hidden unnamed_addr constant [53 x i8], align 1
@glad_glCreateShader = external local_unnamed_addr global ptr, align 8
@glad_glCompileShader = external local_unnamed_addr global ptr, align 8
@glad_glGetShaderiv = external local_unnamed_addr global ptr, align 8
@glad_glGetShaderInfoLog = external local_unnamed_addr global ptr, align 8
@stderr = external local_unnamed_addr global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@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_glDeleteShader = external local_unnamed_addr global ptr, align 8
@glad_glGetProgramiv = external local_unnamed_addr global ptr, align 8
@glad_glGetProgramInfoLog = external local_unnamed_addr global ptr, align 8
@.str.4 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [4 x i8], align 1
@glad_glDeleteProgram = external local_unnamed_addr global ptr, align 8

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z16gltLoadShaderSrcPKcj(ptr noundef, i32 noundef) local_unnamed_addr #0

; 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 nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @gltLoadShaderPair(ptr noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = alloca i32, align 4
  %4 = alloca [256 x i8], align 16
  %5 = alloca [256 x i8], align 16
  %6 = alloca [4096 x i8], align 16
  %7 = alloca i32, align 4
  %8 = load ptr, ptr @glad_glGetError, align 8, !tbaa !5
  %9 = tail call i32 %8()
  %10 = icmp eq i32 %9, 0
  br i1 %10, label %12, label %11

11:                                               ; preds = %2
  tail call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 30, ptr noundef nonnull @__PRETTY_FUNCTION__.gltLoadShaderPair) #5
  unreachable

12:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  %13 = load ptr, ptr @glad_glCreateShader, align 8, !tbaa !5
  %14 = tail call i32 %13(i32 noundef 35633)
  %15 = load ptr, ptr @glad_glCreateShader, align 8, !tbaa !5
  %16 = tail call i32 %15(i32 noundef 35632)
  tail call void @_Z16gltLoadShaderSrcPKcj(ptr noundef %0, i32 noundef %14)
  tail call void @_Z16gltLoadShaderSrcPKcj(ptr noundef %1, i32 noundef %16)
  %17 = load ptr, ptr @glad_glCompileShader, align 8, !tbaa !5
  tail call void %17(i32 noundef %14)
  %18 = load ptr, ptr @glad_glGetError, align 8, !tbaa !5
  %19 = tail call i32 %18()
  %20 = icmp eq i32 %19, 0
  br i1 %20, label %22, label %21

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

22:                                               ; preds = %12
  %23 = load ptr, ptr @glad_glGetShaderiv, align 8, !tbaa !5
  call void %23(i32 noundef %14, i32 noundef 35713, ptr noundef nonnull %3)
  %24 = load i32, ptr %3, align 4, !tbaa !9
  %25 = icmp eq i32 %24, 0
  br i1 %25, label %26, label %30

26:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %4) #6
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(256) %4, i8 0, i64 256, i1 false)
  %27 = load ptr, ptr @glad_glGetShaderInfoLog, align 8, !tbaa !5
  call void %27(i32 noundef %14, i32 noundef 256, ptr noundef null, ptr noundef nonnull %4)
  %28 = load ptr, ptr @stderr, align 8, !tbaa !5
  %29 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %28, ptr noundef nonnull @.str.2, ptr noundef nonnull %4) #7
  call void @__assert_fail(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.1, i32 noundef 54, ptr noundef nonnull @__PRETTY_FUNCTION__.gltLoadShaderPair) #5
  unreachable

30:                                               ; preds = %22
  %31 = load ptr, ptr @glad_glGetError, align 8, !tbaa !5
  %32 = call i32 %31()
  %33 = icmp eq i32 %32, 0
  br i1 %33, label %35, label %34

34:                                               ; preds = %30
  call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 61, ptr noundef nonnull @__PRETTY_FUNCTION__.gltLoadShaderPair) #5
  unreachable

35:                                               ; preds = %30
  %36 = load ptr, ptr @glad_glCompileShader, align 8, !tbaa !5
  call void %36(i32 noundef %16)
  %37 = load ptr, ptr @glad_glGetError, align 8, !tbaa !5
  %38 = call i32 %37()
  %39 = icmp eq i32 %38, 0
  br i1 %39, label %41, label %40

40:                                               ; preds = %35
  call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 64, ptr noundef nonnull @__PRETTY_FUNCTION__.gltLoadShaderPair) #5
  unreachable

41:                                               ; preds = %35
  %42 = load ptr, ptr @glad_glGetShaderiv, align 8, !tbaa !5
  call void %42(i32 noundef %16, i32 noundef 35713, ptr noundef nonnull %3)
  %43 = load i32, ptr %3, align 4, !tbaa !9
  %44 = icmp eq i32 %43, 0
  br i1 %44, label %45, label %49

45:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %5) #6
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(256) %5, i8 0, i64 256, i1 false)
  %46 = load ptr, ptr @glad_glGetShaderInfoLog, align 8, !tbaa !5
  call void %46(i32 noundef %16, i32 noundef 256, ptr noundef null, ptr noundef nonnull %5)
  %47 = load ptr, ptr @stderr, align 8, !tbaa !5
  %48 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %47, ptr noundef nonnull @.str.2, ptr noundef nonnull %5) #7
  call void @__assert_fail(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.1, i32 noundef 71, ptr noundef nonnull @__PRETTY_FUNCTION__.gltLoadShaderPair) #5
  unreachable

49:                                               ; preds = %41
  %50 = load ptr, ptr @glad_glGetError, align 8, !tbaa !5
  %51 = call i32 %50()
  %52 = icmp eq i32 %51, 0
  br i1 %52, label %54, label %53

53:                                               ; preds = %49
  call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 78, ptr noundef nonnull @__PRETTY_FUNCTION__.gltLoadShaderPair) #5
  unreachable

54:                                               ; preds = %49
  %55 = load ptr, ptr @glad_glCreateProgram, align 8, !tbaa !5
  %56 = call i32 %55()
  %57 = load ptr, ptr @glad_glAttachShader, align 8, !tbaa !5
  call void %57(i32 noundef %56, i32 noundef %14)
  %58 = load ptr, ptr @glad_glAttachShader, align 8, !tbaa !5
  call void %58(i32 noundef %56, i32 noundef %16)
  %59 = load ptr, ptr @glad_glLinkProgram, align 8, !tbaa !5
  call void %59(i32 noundef %56)
  %60 = load ptr, ptr @glad_glDeleteShader, align 8, !tbaa !5
  call void %60(i32 noundef %14)
  %61 = load ptr, ptr @glad_glDeleteShader, align 8, !tbaa !5
  call void %61(i32 noundef %16)
  %62 = load ptr, ptr @glad_glGetProgramiv, align 8, !tbaa !5
  call void %62(i32 noundef %56, i32 noundef 35714, ptr noundef nonnull %3)
  %63 = load i32, ptr %3, align 4, !tbaa !9
  %64 = icmp eq i32 %63, 0
  br i1 %64, label %65, label %70

65:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 4096, ptr nonnull %6) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #6
  %66 = load ptr, ptr @glad_glGetProgramInfoLog, align 8, !tbaa !5
  call void %66(i32 noundef %56, i32 noundef 4096, ptr noundef nonnull %7, ptr noundef nonnull %6)
  %67 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4)
  %68 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, ptr noundef nonnull %6)
  %69 = load ptr, ptr @glad_glDeleteProgram, align 8, !tbaa !5
  call void %69(i32 noundef %56)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 4096, ptr nonnull %6) #6
  br label %70

70:                                               ; preds = %54, %65
  %.0 = phi i32 [ 0, %65 ], [ %56, %54 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  ret i32 %.0
}

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #4

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { nofree 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 = { noreturn nounwind }
attributes #6 = { nounwind }
attributes #7 = { cold nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}


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