; LLVM IR from unitreerobotics/kinect_teleoperate :: src/extern/glfw/src/tests (iconify)

; 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.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [10 x i8], align 1
@stdout = external global ptr, align 8

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @main(i32 noundef %0, ptr noundef %1) #1 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %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 i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  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 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
  store i32 0, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 0, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  br label %15

15:                                               ; preds = %26, %2
  %16 = load i32, ptr %4, align 4, !tbaa !5
  %17 = load ptr, ptr %5, align 8, !tbaa !9
  %18 = call i32 @getopt(i32 noundef %16, ptr noundef %17, ptr noundef @.str.1)
  store i32 %18, ptr %6, align 4, !tbaa !5
  %19 = icmp ne i32 %18, -1
  br i1 %19, label %20, label %27

20:                                               ; preds = %15
  %21 = load i32, ptr %6, align 4, !tbaa !5
  switch i32 %21, label %25 [
    i32 97, label %22
    i32 104, label %23
    i32 102, label %24
  ]

22:                                               ; preds = %20
  store i32 1, ptr %10, align 4, !tbaa !5
  br label %26

23:                                               ; preds = %20
  call void @usage()
  call void @exit(i32 noundef 0) #6
  unreachable

24:                                               ; preds = %20
  store i32 1, ptr %9, align 4, !tbaa !5
  br label %26

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

26:                                               ; preds = %24, %22
  br label %15, !llvm.loop !11

27:                                               ; preds = %15
  %28 = call ptr @glfwSetErrorCallback(ptr noundef @error_callback)
  %29 = call i32 @glfwInit()
  %30 = icmp ne i32 %29, 0
  br i1 %30, label %32, label %31

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

32:                                               ; preds = %27
  %33 = load i32, ptr %9, align 4, !tbaa !5
  %34 = icmp ne i32 %33, 0
  br i1 %34, label %35, label %71

35:                                               ; preds = %32
  %36 = load i32, ptr %10, align 4, !tbaa !5
  %37 = icmp ne i32 %36, 0
  br i1 %37, label %38, label %71

38:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %39 = call ptr @glfwGetMonitors(ptr noundef %12)
  store ptr %39, ptr %13, align 8, !tbaa !9
  %40 = load i32, ptr %12, align 4, !tbaa !5
  store i32 %40, ptr %8, align 4, !tbaa !5
  %41 = load i32, ptr %8, align 4, !tbaa !5
  %42 = sext i32 %41 to i64
  %43 = call noalias ptr @calloc(i64 noundef %42, i64 noundef 8) #7
  store ptr %43, ptr %11, align 8, !tbaa !9
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %44

44:                                               ; preds = %67, %38
  %45 = load i32, ptr %7, align 4, !tbaa !5
  %46 = load i32, ptr %12, align 4, !tbaa !5
  %47 = icmp slt i32 %45, %46
  br i1 %47, label %48, label %70

48:                                               ; preds = %44
  %49 = load ptr, ptr %13, align 8, !tbaa !9
  %50 = load i32, ptr %7, align 4, !tbaa !5
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds ptr, ptr %49, i64 %51
  %53 = load ptr, ptr %52, align 8, !tbaa !9
  %54 = call ptr @create_window(ptr noundef %53)
  %55 = load ptr, ptr %11, align 8, !tbaa !9
  %56 = load i32, ptr %7, align 4, !tbaa !5
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds ptr, ptr %55, i64 %57
  store ptr %54, ptr %58, align 8, !tbaa !9
  %59 = load ptr, ptr %11, align 8, !tbaa !9
  %60 = load i32, ptr %7, align 4, !tbaa !5
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds ptr, ptr %59, i64 %61
  %63 = load ptr, ptr %62, align 8, !tbaa !9
  %64 = icmp ne ptr %63, null
  br i1 %64, label %66, label %65

65:                                               ; preds = %48
  br label %70

66:                                               ; preds = %48
  br label %67

67:                                               ; preds = %66
  %68 = load i32, ptr %7, align 4, !tbaa !5
  %69 = add nsw i32 %68, 1
  store i32 %69, ptr %7, align 4, !tbaa !5
  br label %44, !llvm.loop !13

70:                                               ; preds = %65, %44
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %84

71:                                               ; preds = %35, %32
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  store ptr null, ptr %14, align 8, !tbaa !9
  %72 = load i32, ptr %9, align 4, !tbaa !5
  %73 = icmp ne i32 %72, 0
  br i1 %73, label %74, label %76

74:                                               ; preds = %71
  %75 = call ptr @glfwGetPrimaryMonitor()
  store ptr %75, ptr %14, align 8, !tbaa !9
  br label %76

76:                                               ; preds = %74, %71
  store i32 1, ptr %8, align 4, !tbaa !5
  %77 = load i32, ptr %8, align 4, !tbaa !5
  %78 = sext i32 %77 to i64
  %79 = call noalias ptr @calloc(i64 noundef %78, i64 noundef 8) #7
  store ptr %79, ptr %11, align 8, !tbaa !9
  %80 = load ptr, ptr %14, align 8, !tbaa !9
  %81 = call ptr @create_window(ptr noundef %80)
  %82 = load ptr, ptr %11, align 8, !tbaa !9
  %83 = getelementptr inbounds ptr, ptr %82, i64 0
  store ptr %81, ptr %83, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  br label %84

84:                                               ; preds = %76, %70
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %85

85:                                               ; preds = %156, %84
  %86 = load i32, ptr %7, align 4, !tbaa !5
  %87 = load i32, ptr %8, align 4, !tbaa !5
  %88 = icmp slt i32 %86, %87
  br i1 %88, label %89, label %159

89:                                               ; preds = %85
  %90 = load ptr, ptr %11, align 8, !tbaa !9
  %91 = load i32, ptr %7, align 4, !tbaa !5
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds ptr, ptr %90, i64 %92
  %94 = load ptr, ptr %93, align 8, !tbaa !9
  %95 = call ptr @glfwSetKeyCallback(ptr noundef %94, ptr noundef @key_callback)
  %96 = load ptr, ptr %11, align 8, !tbaa !9
  %97 = load i32, ptr %7, align 4, !tbaa !5
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds ptr, ptr %96, i64 %98
  %100 = load ptr, ptr %99, align 8, !tbaa !9
  %101 = call ptr @glfwSetFramebufferSizeCallback(ptr noundef %100, ptr noundef @framebuffer_size_callback)
  %102 = load ptr, ptr %11, align 8, !tbaa !9
  %103 = load i32, ptr %7, align 4, !tbaa !5
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds ptr, ptr %102, i64 %104
  %106 = load ptr, ptr %105, align 8, !tbaa !9
  %107 = call ptr @glfwSetWindowSizeCallback(ptr noundef %106, ptr noundef @window_size_callback)
  %108 = load ptr, ptr %11, align 8, !tbaa !9
  %109 = load i32, ptr %7, align 4, !tbaa !5
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds ptr, ptr %108, i64 %110
  %112 = load ptr, ptr %111, align 8, !tbaa !9
  %113 = call ptr @glfwSetWindowFocusCallback(ptr noundef %112, ptr noundef @window_focus_callback)
  %114 = load ptr, ptr %11, align 8, !tbaa !9
  %115 = load i32, ptr %7, align 4, !tbaa !5
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds ptr, ptr %114, i64 %116
  %118 = load ptr, ptr %117, align 8, !tbaa !9
  %119 = call ptr @glfwSetWindowIconifyCallback(ptr noundef %118, ptr noundef @window_iconify_callback)
  %120 = load ptr, ptr %11, align 8, !tbaa !9
  %121 = load i32, ptr %7, align 4, !tbaa !5
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds ptr, ptr %120, i64 %122
  %124 = load ptr, ptr %123, align 8, !tbaa !9
  %125 = call ptr @glfwSetWindowMaximizeCallback(ptr noundef %124, ptr noundef @window_maximize_callback)
  %126 = load ptr, ptr %11, align 8, !tbaa !9
  %127 = load i32, ptr %7, align 4, !tbaa !5
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds ptr, ptr %126, i64 %128
  %130 = load ptr, ptr %129, align 8, !tbaa !9
  %131 = call ptr @glfwSetWindowRefreshCallback(ptr noundef %130, ptr noundef @window_refresh_callback)
  %132 = load ptr, ptr %11, align 8, !tbaa !9
  %133 = load i32, ptr %7, align 4, !tbaa !5
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds ptr, ptr %132, i64 %134
  %136 = load ptr, ptr %135, align 8, !tbaa !9
  call void @window_refresh_callback(ptr noundef %136)
  %137 = load ptr, ptr %11, align 8, !tbaa !9
  %138 = load i32, ptr %7, align 4, !tbaa !5
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds ptr, ptr %137, i64 %139
  %141 = load ptr, ptr %140, align 8, !tbaa !9
  %142 = call i32 @glfwGetWindowAttrib(ptr noundef %141, i32 noundef 131074)
  %143 = icmp ne i32 %142, 0
  %144 = zext i1 %143 to i64
  %145 = select i1 %143, ptr @.str.3, ptr @.str.4
  %146 = load ptr, ptr %11, align 8, !tbaa !9
  %147 = load i32, ptr %7, align 4, !tbaa !5
  %148 = sext i32 %147 to i64
  %149 = getelementptr inbounds ptr, ptr %146, i64 %148
  %150 = load ptr, ptr %149, align 8, !tbaa !9
  %151 = call i32 @glfwGetWindowAttrib(ptr noundef %150, i32 noundef 131073)
  %152 = icmp ne i32 %151, 0
  %153 = zext i1 %152 to i64
  %154 = select i1 %152, ptr @.str.5, ptr @.str.6
  %155 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, ptr noundef %145, ptr noundef %154)
  br label %156

156:                                              ; preds = %89
  %157 = load i32, ptr %7, align 4, !tbaa !5
  %158 = add nsw i32 %157, 1
  store i32 %158, ptr %7, align 4, !tbaa !5
  br label %85, !llvm.loop !14

159:                                              ; preds = %85
  br label %160

160:                                              ; preds = %183, %159
  call void @glfwWaitEvents()
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %161

161:                                              ; preds = %175, %160
  %162 = load i32, ptr %7, align 4, !tbaa !5
  %163 = load i32, ptr %8, align 4, !tbaa !5
  %164 = icmp slt i32 %162, %163
  br i1 %164, label %165, label %178

165:                                              ; preds = %161
  %166 = load ptr, ptr %11, align 8, !tbaa !9
  %167 = load i32, ptr %7, align 4, !tbaa !5
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds ptr, ptr %166, i64 %168
  %170 = load ptr, ptr %169, align 8, !tbaa !9
  %171 = call i32 @glfwWindowShouldClose(ptr noundef %170)
  %172 = icmp ne i32 %171, 0
  br i1 %172, label %173, label %174

173:                                              ; preds = %165
  br label %178

174:                                              ; preds = %165
  br label %175

175:                                              ; preds = %174
  %176 = load i32, ptr %7, align 4, !tbaa !5
  %177 = add nsw i32 %176, 1
  store i32 %177, ptr %7, align 4, !tbaa !5
  br label %161, !llvm.loop !15

178:                                              ; preds = %173, %161
  %179 = load i32, ptr %7, align 4, !tbaa !5
  %180 = load i32, ptr %8, align 4, !tbaa !5
  %181 = icmp slt i32 %179, %180
  br i1 %181, label %182, label %183

182:                                              ; preds = %178
  br label %186

183:                                              ; preds = %178
  %184 = load ptr, ptr @stdout, align 8, !tbaa !9
  %185 = call i32 @fflush(ptr noundef %184)
  br label %160

186:                                              ; preds = %182
  call void @glfwTerminate()
  call void @exit(i32 noundef 0) #6
  unreachable
}

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

; Function Attrs: nounwind uwtable
declare hidden void @usage() #1

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

declare ptr @glfwSetErrorCallback(ptr noundef) #2

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

declare i32 @glfwInit() #2

declare ptr @glfwGetMonitors(ptr noundef) #2

; Function Attrs: nounwind allocsize(0,1)
declare noalias ptr @calloc(i64 noundef, i64 noundef) #4

; Function Attrs: nounwind uwtable
declare hidden ptr @create_window(ptr noundef) #1

declare ptr @glfwGetPrimaryMonitor() #2

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

declare void @glfwWaitEvents() #2

declare i32 @glfwWindowShouldClose(ptr noundef) #2

declare i32 @fflush(ptr noundef) #2

declare void @glfwTerminate() #2

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

!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 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !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"

@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [10 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8

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

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

; Function Attrs: noreturn nounwind uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr noundef %1) local_unnamed_addr #1 {
  %3 = alloca i32, align 4
  br label %.outer

.outer:                                           ; preds = %.loopexit111, %2
  %4 = phi i1 [ true, %.loopexit111 ], [ false, %2 ]
  %.050.ph = phi i32 [ %.050.lcssa105, %.loopexit111 ], [ 0, %2 ]
  %5 = tail call i32 @getopt(i32 noundef %0, ptr noundef %1, ptr noundef nonnull @.str.1) #7
  switch i32 %5, label %.loopexit [
    i32 -1, label %.loopexit113
    i32 97, label %.outer.peel.newph
    i32 104, label %.loopexit110
    i32 102, label %.loopexit111
  ]

.outer.peel.newph:                                ; preds = %.outer, %.outer.peel.newph
  %6 = tail call i32 @getopt(i32 noundef %0, ptr noundef %1, ptr noundef nonnull @.str.1) #7
  switch i32 %6, label %.loopexit [
    i32 -1, label %.loopexit109
    i32 97, label %.outer.peel.newph
    i32 104, label %.loopexit110
    i32 102, label %.loopexit111
  ], !llvm.loop !5

.loopexit110:                                     ; preds = %.outer, %.outer.peel.newph
  tail call void @usage()
  tail call void @exit(i32 noundef 0) #8
  unreachable

.loopexit111:                                     ; preds = %.outer.peel.newph, %.outer
  %.050.lcssa105 = phi i32 [ %.050.ph, %.outer ], [ 1, %.outer.peel.newph ]
  br label %.outer, !llvm.loop !8

.loopexit:                                        ; preds = %.outer, %.outer.peel.newph
  tail call void @usage()
  tail call void @exit(i32 noundef 1) #8
  unreachable

.loopexit113:                                     ; preds = %.outer
  %7 = icmp ne i32 %.050.ph, 0
  br label %.loopexit109

.loopexit109:                                     ; preds = %.outer.peel.newph, %.loopexit113
  %.050.lcssa103 = phi i1 [ %7, %.loopexit113 ], [ true, %.outer.peel.newph ]
  %8 = tail call ptr @glfwSetErrorCallback(ptr noundef nonnull @error_callback) #7
  %9 = tail call i32 @glfwInit() #7
  %.not56 = icmp eq i32 %9, 0
  br i1 %.not56, label %10, label %11

10:                                               ; preds = %.loopexit109
  tail call void @exit(i32 noundef 1) #8
  unreachable

11:                                               ; preds = %.loopexit109
  %or.cond = select i1 %4, i1 %.050.lcssa103, i1 false
  br i1 %or.cond, label %12, label %27

12:                                               ; preds = %11
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  %13 = call ptr @glfwGetMonitors(ptr noundef nonnull %3) #7
  %14 = load i32, ptr %3, align 4, !tbaa !9
  %15 = freeze i32 %14
  %16 = sext i32 %15 to i64
  %17 = call noalias ptr @calloc(i64 noundef %16, i64 noundef 8) #9
  %18 = icmp sgt i32 %15, 0
  br i1 %18, label %.lr.ph, label %.thread92

.thread92:                                        ; preds = %12
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  br label %.critedge

19:                                               ; preds = %.lr.ph
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %20 = load i32, ptr %3, align 4, !tbaa !9
  %21 = sext i32 %20 to i64
  %22 = icmp slt i64 %indvars.iv.next, %21
  br i1 %22, label %.lr.ph, label %32, !llvm.loop !13

.lr.ph:                                           ; preds = %12, %19
  %indvars.iv = phi i64 [ %indvars.iv.next, %19 ], [ 0, %12 ]
  %23 = getelementptr inbounds ptr, ptr %13, i64 %indvars.iv
  %24 = load ptr, ptr %23, align 8, !tbaa !14
  %25 = call ptr @create_window(ptr noundef %24)
  %26 = getelementptr inbounds ptr, ptr %17, i64 %indvars.iv
  store ptr %25, ptr %26, align 8, !tbaa !14
  %.not57 = icmp eq ptr %25, null
  br i1 %.not57, label %32, label %19

27:                                               ; preds = %11
  br i1 %4, label %28, label %.thread

28:                                               ; preds = %27
  %29 = tail call ptr @glfwGetPrimaryMonitor() #7
  br label %.thread

.thread:                                          ; preds = %27, %28
  %.0 = phi ptr [ %29, %28 ], [ null, %27 ]
  %30 = tail call noalias dereferenceable_or_null(8) ptr @calloc(i64 noundef 1, i64 noundef 8) #9
  %31 = tail call ptr @create_window(ptr noundef %.0)
  store ptr %31, ptr %30, align 8, !tbaa !14
  br label %.lr.ph69.preheader

32:                                               ; preds = %.lr.ph, %19
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  %33 = zext nneg i32 %15 to i64
  br label %.lr.ph69.preheader

.lr.ph69.preheader:                               ; preds = %32, %.thread
  %.04990 = phi ptr [ %30, %.thread ], [ %17, %32 ]
  %.05488 = phi i64 [ 1, %.thread ], [ %33, %32 ]
  br label %.lr.ph69

.lr.ph72.us:                                      ; preds = %.lr.ph69, %..critedge_crit_edge.us
  call void @glfwWaitEvents() #7
  br label %35

34:                                               ; preds = %35
  %indvars.iv.next82 = add nuw nsw i64 %indvars.iv81, 1
  %exitcond85.not = icmp eq i64 %indvars.iv.next82, %.05488
  br i1 %exitcond85.not, label %..critedge_crit_edge.us, label %35, !llvm.loop !16

35:                                               ; preds = %.lr.ph72.us, %34
  %indvars.iv81 = phi i64 [ 0, %.lr.ph72.us ], [ %indvars.iv.next82, %34 ]
  %36 = getelementptr inbounds ptr, ptr %.04990, i64 %indvars.iv81
  %37 = load ptr, ptr %36, align 8, !tbaa !14
  %38 = call i32 @glfwWindowShouldClose(ptr noundef %37) #7
  %.not58.us = icmp eq i32 %38, 0
  br i1 %.not58.us, label %34, label %.split.us

..critedge_crit_edge.us:                          ; preds = %34
  %39 = load ptr, ptr @stdout, align 8, !tbaa !14
  %40 = call i32 @fflush(ptr noundef %39)
  br label %.lr.ph72.us

.lr.ph69:                                         ; preds = %.lr.ph69.preheader, %.lr.ph69
  %indvars.iv78 = phi i64 [ 0, %.lr.ph69.preheader ], [ %indvars.iv.next79, %.lr.ph69 ]
  %41 = getelementptr inbounds ptr, ptr %.04990, i64 %indvars.iv78
  %42 = load ptr, ptr %41, align 8, !tbaa !14
  %43 = call ptr @glfwSetKeyCallback(ptr noundef %42, ptr noundef nonnull @key_callback) #7
  %44 = load ptr, ptr %41, align 8, !tbaa !14
  %45 = call ptr @glfwSetFramebufferSizeCallback(ptr noundef %44, ptr noundef nonnull @framebuffer_size_callback) #7
  %46 = load ptr, ptr %41, align 8, !tbaa !14
  %47 = call ptr @glfwSetWindowSizeCallback(ptr noundef %46, ptr noundef nonnull @window_size_callback) #7
  %48 = load ptr, ptr %41, align 8, !tbaa !14
  %49 = call ptr @glfwSetWindowFocusCallback(ptr noundef %48, ptr noundef nonnull @window_focus_callback) #7
  %50 = load ptr, ptr %41, align 8, !tbaa !14
  %51 = call ptr @glfwSetWindowIconifyCallback(ptr noundef %50, ptr noundef nonnull @window_iconify_callback) #7
  %52 = load ptr, ptr %41, align 8, !tbaa !14
  %53 = call ptr @glfwSetWindowMaximizeCallback(ptr noundef %52, ptr noundef nonnull @window_maximize_callback) #7
  %54 = load ptr, ptr %41, align 8, !tbaa !14
  %55 = call ptr @glfwSetWindowRefreshCallback(ptr noundef %54, ptr noundef nonnull @window_refresh_callback) #7
  %56 = load ptr, ptr %41, align 8, !tbaa !14
  call void @window_refresh_callback(ptr noundef %56)
  %57 = load ptr, ptr %41, align 8, !tbaa !14
  %58 = call i32 @glfwGetWindowAttrib(ptr noundef %57, i32 noundef 131074) #7
  %.not59 = icmp eq i32 %58, 0
  %59 = select i1 %.not59, ptr @.str.4, ptr @.str.3
  %60 = load ptr, ptr %41, align 8, !tbaa !14
  %61 = call i32 @glfwGetWindowAttrib(ptr noundef %60, i32 noundef 131073) #7
  %.not60 = icmp eq i32 %61, 0
  %62 = select i1 %.not60, ptr @.str.6, ptr @.str.5
  %63 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef nonnull %59, ptr noundef nonnull %62)
  %indvars.iv.next79 = add nuw nsw i64 %indvars.iv78, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next79, %.05488
  br i1 %exitcond.not, label %.lr.ph72.us, label %.lr.ph69, !llvm.loop !17

.critedge:                                        ; preds = %.thread92, %.critedge
  call void @glfwWaitEvents() #7
  %64 = load ptr, ptr @stdout, align 8, !tbaa !14
  %65 = call i32 @fflush(ptr noundef %64)
  br label %.critedge

.split.us:                                        ; preds = %35
  call void @glfwTerminate() #7
  call void @exit(i32 noundef 0) #8
  unreachable
}

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

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

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

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

declare ptr @glfwGetMonitors(ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @calloc(i64 noundef, i64 noundef) local_unnamed_addr #5

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

declare ptr @glfwGetPrimaryMonitor() 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 ptr @glfwSetFramebufferSizeCallback(ptr noundef, ptr noundef) local_unnamed_addr #2

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

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

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

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

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

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

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

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

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

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

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

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

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

declare void @glfwWaitEvents() local_unnamed_addr #2

declare i32 @glfwWindowShouldClose(ptr noundef) local_unnamed_addr #2

; Function Attrs: nofree nounwind
declare noundef i32 @fflush(ptr nocapture noundef) local_unnamed_addr #6

declare void @glfwTerminate() local_unnamed_addr #2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 allockind("alloc,zeroed") allocsize(0,1) memory(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 #6 = { 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 #7 = { nounwind }
attributes #8 = { noreturn nounwind }
attributes #9 = { nounwind allocsize(0,1) }

!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 = distinct !{!5, !6, !7}
!6 = !{!"llvm.loop.mustprogress"}
!7 = !{!"llvm.loop.peeled.count", i32 1}
!8 = distinct !{!8, !6}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !11, i64 0}
!11 = !{!"omnipotent char", !12, i64 0}
!12 = !{!"Simple C/C++ TBAA"}
!13 = distinct !{!13, !6}
!14 = !{!15, !15, i64 0}
!15 = !{!"any pointer", !11, i64 0}
!16 = distinct !{!16, !6}
!17 = distinct !{!17, !6}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass