; LLVM IR from erincatto/box2d-lite :: extern/glfw/src/context.ll (glfwIsValidContextConfig)

; 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._GLFWctxconfig = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, %struct.anon }
%struct.anon = type { i32 }
%struct._GLFWwindow = type { ptr, i32, i32, i32, i32, i32, i32, ptr, %struct.GLFWvidmode, ptr, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [8 x i8], [349 x i8], double, double, %struct._GLFWcontext, %struct.anon.0, %struct._GLFWwindowX11 }
%struct.GLFWvidmode = type { i32, i32, i32, i32, i32, i32 }
%struct._GLFWcontext = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, %struct._GLFWcontextGLX, %struct._GLFWcontextEGL, %struct._GLFWcontextOSMesa }
%struct._GLFWcontextGLX = type { ptr, i64 }
%struct._GLFWcontextEGL = type { ptr, ptr, ptr, ptr }
%struct._GLFWcontextOSMesa = type { ptr, i32, i32, ptr }
%struct.anon.0 = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct._GLFWwindowX11 = type { i64, i64, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i64 }

@.str = external hidden unnamed_addr constant [36 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [67 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [71 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [40 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @_glfwIsValidContextConfig(ptr noundef %0) #0 {
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  %4 = load ptr, ptr %3, align 8, !tbaa !5
  %5 = getelementptr inbounds %struct._GLFWctxconfig, ptr %4, i32 0, i32 10
  %6 = load ptr, ptr %5, align 8, !tbaa !9
  %7 = icmp ne ptr %6, null
  br i1 %7, label %8, label %23

8:                                                ; preds = %1
  %9 = load ptr, ptr %3, align 8, !tbaa !5
  %10 = getelementptr inbounds %struct._GLFWctxconfig, ptr %9, i32 0, i32 0
  %11 = load i32, ptr %10, align 8, !tbaa !13
  %12 = icmp eq i32 %11, 0
  br i1 %12, label %21, label %13

13:                                               ; preds = %8
  %14 = load ptr, ptr %3, align 8, !tbaa !5
  %15 = getelementptr inbounds %struct._GLFWctxconfig, ptr %14, i32 0, i32 10
  %16 = load ptr, ptr %15, align 8, !tbaa !9
  %17 = getelementptr inbounds %struct._GLFWwindow, ptr %16, i32 0, i32 25
  %18 = getelementptr inbounds %struct._GLFWcontext, ptr %17, i32 0, i32 0
  %19 = load i32, ptr %18, align 8, !tbaa !14
  %20 = icmp eq i32 %19, 0
  br i1 %20, label %21, label %22

21:                                               ; preds = %13, %8
  call void (i32, ptr, ...) @_glfwInputError(i32 noundef 65546, ptr noundef null)
  store i32 0, ptr %2, align 4
  br label %246

22:                                               ; preds = %13
  br label %23

23:                                               ; preds = %22, %1
  %24 = load ptr, ptr %3, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct._GLFWctxconfig, ptr %24, i32 0, i32 1
  %26 = load i32, ptr %25, align 4, !tbaa !25
  %27 = icmp ne i32 %26, 221185
  br i1 %27, label %28, label %42

28:                                               ; preds = %23
  %29 = load ptr, ptr %3, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct._GLFWctxconfig, ptr %29, i32 0, i32 1
  %31 = load i32, ptr %30, align 4, !tbaa !25
  %32 = icmp ne i32 %31, 221186
  br i1 %32, label %33, label %42

33:                                               ; preds = %28
  %34 = load ptr, ptr %3, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct._GLFWctxconfig, ptr %34, i32 0, i32 1
  %36 = load i32, ptr %35, align 4, !tbaa !25
  %37 = icmp ne i32 %36, 221187
  br i1 %37, label %38, label %42

38:                                               ; preds = %33
  %39 = load ptr, ptr %3, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct._GLFWctxconfig, ptr %39, i32 0, i32 1
  %41 = load i32, ptr %40, align 4, !tbaa !25
  call void (i32, ptr, ...) @_glfwInputError(i32 noundef 65539, ptr noundef @.str, i32 noundef %41)
  store i32 0, ptr %2, align 4
  br label %246

42:                                               ; preds = %33, %28, %23
  %43 = load ptr, ptr %3, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct._GLFWctxconfig, ptr %43, i32 0, i32 0
  %45 = load i32, ptr %44, align 8, !tbaa !13
  %46 = icmp ne i32 %45, 0
  br i1 %46, label %47, label %61

47:                                               ; preds = %42
  %48 = load ptr, ptr %3, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct._GLFWctxconfig, ptr %48, i32 0, i32 0
  %50 = load i32, ptr %49, align 8, !tbaa !13
  %51 = icmp ne i32 %50, 196609
  br i1 %51, label %52, label %61

52:                                               ; preds = %47
  %53 = load ptr, ptr %3, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct._GLFWctxconfig, ptr %53, i32 0, i32 0
  %55 = load i32, ptr %54, align 8, !tbaa !13
  %56 = icmp ne i32 %55, 196610
  br i1 %56, label %57, label %61

57:                                               ; preds = %52
  %58 = load ptr, ptr %3, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct._GLFWctxconfig, ptr %58, i32 0, i32 0
  %60 = load i32, ptr %59, align 8, !tbaa !13
  call void (i32, ptr, ...) @_glfwInputError(i32 noundef 65539, ptr noundef @.str.1, i32 noundef %60)
  store i32 0, ptr %2, align 4
  br label %246

61:                                               ; preds = %52, %47, %42
  %62 = load ptr, ptr %3, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct._GLFWctxconfig, ptr %62, i32 0, i32 0
  %64 = load i32, ptr %63, align 8, !tbaa !13
  %65 = icmp eq i32 %64, 196609
  br i1 %65, label %66, label %161

66:                                               ; preds = %61
  %67 = load ptr, ptr %3, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct._GLFWctxconfig, ptr %67, i32 0, i32 2
  %69 = load i32, ptr %68, align 8, !tbaa !26
  %70 = icmp slt i32 %69, 1
  br i1 %70, label %106, label %71

71:                                               ; preds = %66
  %72 = load ptr, ptr %3, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct._GLFWctxconfig, ptr %72, i32 0, i32 3
  %74 = load i32, ptr %73, align 4, !tbaa !27
  %75 = icmp slt i32 %74, 0
  br i1 %75, label %106, label %76

76:                                               ; preds = %71
  %77 = load ptr, ptr %3, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct._GLFWctxconfig, ptr %77, i32 0, i32 2
  %79 = load i32, ptr %78, align 8, !tbaa !26
  %80 = icmp eq i32 %79, 1
  br i1 %80, label %81, label %86

81:                                               ; preds = %76
  %82 = load ptr, ptr %3, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct._GLFWctxconfig, ptr %82, i32 0, i32 3
  %84 = load i32, ptr %83, align 4, !tbaa !27
  %85 = icmp sgt i32 %84, 5
  br i1 %85, label %106, label %86

86:                                               ; preds = %81, %76
  %87 = load ptr, ptr %3, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct._GLFWctxconfig, ptr %87, i32 0, i32 2
  %89 = load i32, ptr %88, align 8, !tbaa !26
  %90 = icmp eq i32 %89, 2
  br i1 %90, label %91, label %96

91:                                               ; preds = %86
  %92 = load ptr, ptr %3, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct._GLFWctxconfig, ptr %92, i32 0, i32 3
  %94 = load i32, ptr %93, align 4, !tbaa !27
  %95 = icmp sgt i32 %94, 1
  br i1 %95, label %106, label %96

96:                                               ; preds = %91, %86
  %97 = load ptr, ptr %3, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct._GLFWctxconfig, ptr %97, i32 0, i32 2
  %99 = load i32, ptr %98, align 8, !tbaa !26
  %100 = icmp eq i32 %99, 3
  br i1 %100, label %101, label %113

101:                                              ; preds = %96
  %102 = load ptr, ptr %3, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct._GLFWctxconfig, ptr %102, i32 0, i32 3
  %104 = load i32, ptr %103, align 4, !tbaa !27
  %105 = icmp sgt i32 %104, 3
  br i1 %105, label %106, label %113

106:                                              ; preds = %101, %91, %81, %71, %66
  %107 = load ptr, ptr %3, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct._GLFWctxconfig, ptr %107, i32 0, i32 2
  %109 = load i32, ptr %108, align 8, !tbaa !26
  %110 = load ptr, ptr %3, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct._GLFWctxconfig, ptr %110, i32 0, i32 3
  %112 = load i32, ptr %111, align 4, !tbaa !27
  call void (i32, ptr, ...) @_glfwInputError(i32 noundef 65540, ptr noundef @.str.2, i32 noundef %109, i32 noundef %112)
  store i32 0, ptr %2, align 4
  br label %246

113:                                              ; preds = %101, %96
  %114 = load ptr, ptr %3, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct._GLFWctxconfig, ptr %114, i32 0, i32 7
  %116 = load i32, ptr %115, align 4, !tbaa !28
  %117 = icmp ne i32 %116, 0
  br i1 %117, label %118, label %149

118:                                              ; preds = %113
  %119 = load ptr, ptr %3, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct._GLFWctxconfig, ptr %119, i32 0, i32 7
  %121 = load i32, ptr %120, align 4, !tbaa !28
  %122 = icmp ne i32 %121, 204801
  br i1 %122, label %123, label %132

123:                                              ; preds = %118
  %124 = load ptr, ptr %3, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct._GLFWctxconfig, ptr %124, i32 0, i32 7
  %126 = load i32, ptr %125, align 4, !tbaa !28
  %127 = icmp ne i32 %126, 204802
  br i1 %127, label %128, label %132

128:                                              ; preds = %123
  %129 = load ptr, ptr %3, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct._GLFWctxconfig, ptr %129, i32 0, i32 7
  %131 = load i32, ptr %130, align 4, !tbaa !28
  call void (i32, ptr, ...) @_glfwInputError(i32 noundef 65539, ptr noundef @.str.3, i32 noundef %131)
  store i32 0, ptr %2, align 4
  br label %246

132:                                              ; preds = %123, %118
  %133 = load ptr, ptr %3, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct._GLFWctxconfig, ptr %133, i32 0, i32 2
  %135 = load i32, ptr %134, align 8, !tbaa !26
  %136 = icmp sle i32 %135, 2
  br i1 %136, label %147, label %137

137:                                              ; preds = %132
  %138 = load ptr, ptr %3, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct._GLFWctxconfig, ptr %138, i32 0, i32 2
  %140 = load i32, ptr %139, align 8, !tbaa !26
  %141 = icmp eq i32 %140, 3
  br i1 %141, label %142, label %148

142:                                              ; preds = %137
  %143 = load ptr, ptr %3, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct._GLFWctxconfig, ptr %143, i32 0, i32 3
  %145 = load i32, ptr %144, align 4, !tbaa !27
  %146 = icmp slt i32 %145, 2
  br i1 %146, label %147, label %148

147:                                              ; preds = %142, %132
  call void (i32, ptr, ...) @_glfwInputError(i32 noundef 65540, ptr noundef @.str.4)
  store i32 0, ptr %2, align 4
  br label %246

148:                                              ; preds = %142, %137
  br label %149

149:                                              ; preds = %148, %113
  %150 = load ptr, ptr %3, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct._GLFWctxconfig, ptr %150, i32 0, i32 4
  %152 = load i32, ptr %151, align 8, !tbaa !29
  %153 = icmp ne i32 %152, 0
  br i1 %153, label %154, label %160

154:                                              ; preds = %149
  %155 = load ptr, ptr %3, align 8, !tbaa !5
  %156 = getelementptr inbounds %struct._GLFWctxconfig, ptr %155, i32 0, i32 2
  %157 = load i32, ptr %156, align 8, !tbaa !26
  %158 = icmp sle i32 %157, 2
  br i1 %158, label %159, label %160

159:                                              ; preds = %154
  call void (i32, ptr, ...) @_glfwInputError(i32 noundef 65540, ptr noundef @.str.5)
  store i32 0, ptr %2, align 4
  br label %246

160:                                              ; preds = %154, %149
  br label %205

161:                                              ; preds = %61
  %162 = load ptr, ptr %3, align 8, !tbaa !5
  %163 = getelementptr inbounds %struct._GLFWctxconfig, ptr %162, i32 0, i32 0
  %164 = load i32, ptr %163, align 8, !tbaa !13
  %165 = icmp eq i32 %164, 196610
  br i1 %165, label %166, label %204

166:                                              ; preds = %161
  %167 = load ptr, ptr %3, align 8, !tbaa !5
  %168 = getelementptr inbounds %struct._GLFWctxconfig, ptr %167, i32 0, i32 2
  %169 = load i32, ptr %168, align 8, !tbaa !26
  %170 = icmp slt i32 %169, 1
  br i1 %170, label %196, label %171

171:                                              ; preds = %166
  %172 = load ptr, ptr %3, align 8, !tbaa !5
  %173 = getelementptr inbounds %struct._GLFWctxconfig, ptr %172, i32 0, i32 3
  %174 = load i32, ptr %173, align 4, !tbaa !27
  %175 = icmp slt i32 %174, 0
  br i1 %175, label %196, label %176

176:                                              ; preds = %171
  %177 = load ptr, ptr %3, align 8, !tbaa !5
  %178 = getelementptr inbounds %struct._GLFWctxconfig, ptr %177, i32 0, i32 2
  %179 = load i32, ptr %178, align 8, !tbaa !26
  %180 = icmp eq i32 %179, 1
  br i1 %180, label %181, label %186

181:                                              ; preds = %176
  %182 = load ptr, ptr %3, align 8, !tbaa !5
  %183 = getelementptr inbounds %struct._GLFWctxconfig, ptr %182, i32 0, i32 3
  %184 = load i32, ptr %183, align 4, !tbaa !27
  %185 = icmp sgt i32 %184, 1
  br i1 %185, label %196, label %186

186:                                              ; preds = %181, %176
  %187 = load ptr, ptr %3, align 8, !tbaa !5
  %188 = getelementptr inbounds %struct._GLFWctxconfig, ptr %187, i32 0, i32 2
  %189 = load i32, ptr %188, align 8, !tbaa !26
  %190 = icmp eq i32 %189, 2
  br i1 %190, label %191, label %203

191:                                              ; preds = %186
  %192 = load ptr, ptr %3, align 8, !tbaa !5
  %193 = getelementptr inbounds %struct._GLFWctxconfig, ptr %192, i32 0, i32 3
  %194 = load i32, ptr %193, align 4, !tbaa !27
  %195 = icmp sgt i32 %194, 0
  br i1 %195, label %196, label %203

196:                                              ; preds = %191, %181, %171, %166
  %197 = load ptr, ptr %3, align 8, !tbaa !5
  %198 = getelementptr inbounds %struct._GLFWctxconfig, ptr %197, i32 0, i32 2
  %199 = load i32, ptr %198, align 8, !tbaa !26
  %200 = load ptr, ptr %3, align 8, !tbaa !5
  %201 = getelementptr inbounds %struct._GLFWctxconfig, ptr %200, i32 0, i32 3
  %202 = load i32, ptr %201, align 4, !tbaa !27
  call void (i32, ptr, ...) @_glfwInputError(i32 noundef 65540, ptr noundef @.str.6, i32 noundef %199, i32 noundef %202)
  store i32 0, ptr %2, align 4
  br label %246

203:                                              ; preds = %191, %186
  br label %204

204:                                              ; preds = %203, %161
  br label %205

205:                                              ; preds = %204, %160
  %206 = load ptr, ptr %3, align 8, !tbaa !5
  %207 = getelementptr inbounds %struct._GLFWctxconfig, ptr %206, i32 0, i32 8
  %208 = load i32, ptr %207, align 8, !tbaa !30
  %209 = icmp ne i32 %208, 0
  br i1 %209, label %210, label %225

210:                                              ; preds = %205
  %211 = load ptr, ptr %3, align 8, !tbaa !5
  %212 = getelementptr inbounds %struct._GLFWctxconfig, ptr %211, i32 0, i32 8
  %213 = load i32, ptr %212, align 8, !tbaa !30
  %214 = icmp ne i32 %213, 200705
  br i1 %214, label %215, label %224

215:                                              ; preds = %210
  %216 = load ptr, ptr %3, align 8, !tbaa !5
  %217 = getelementptr inbounds %struct._GLFWctxconfig, ptr %216, i32 0, i32 8
  %218 = load i32, ptr %217, align 8, !tbaa !30
  %219 = icmp ne i32 %218, 200706
  br i1 %219, label %220, label %224

220:                                              ; preds = %215
  %221 = load ptr, ptr %3, align 8, !tbaa !5
  %222 = getelementptr inbounds %struct._GLFWctxconfig, ptr %221, i32 0, i32 8
  %223 = load i32, ptr %222, align 8, !tbaa !30
  call void (i32, ptr, ...) @_glfwInputError(i32 noundef 65539, ptr noundef @.str.7, i32 noundef %223)
  store i32 0, ptr %2, align 4
  br label %246

224:                                              ; preds = %215, %210
  br label %225

225:                                              ; preds = %224, %205
  %226 = load ptr, ptr %3, align 8, !tbaa !5
  %227 = getelementptr inbounds %struct._GLFWctxconfig, ptr %226, i32 0, i32 9
  %228 = load i32, ptr %227, align 4, !tbaa !31
  %229 = icmp ne i32 %228, 0
  br i1 %229, label %230, label %245

230:                                              ; preds = %225
  %231 = load ptr, ptr %3, align 8, !tbaa !5
  %232 = getelementptr inbounds %struct._GLFWctxconfig, ptr %231, i32 0, i32 9
  %233 = load i32, ptr %232, align 4, !tbaa !31
  %234 = icmp ne i32 %233, 217090
  br i1 %234, label %235, label %244

235:                                              ; preds = %230
  %236 = load ptr, ptr %3, align 8, !tbaa !5
  %237 = getelementptr inbounds %struct._GLFWctxconfig, ptr %236, i32 0, i32 9
  %238 = load i32, ptr %237, align 4, !tbaa !31
  %239 = icmp ne i32 %238, 217089
  br i1 %239, label %240, label %244

240:                                              ; preds = %235
  %241 = load ptr, ptr %3, align 8, !tbaa !5
  %242 = getelementptr inbounds %struct._GLFWctxconfig, ptr %241, i32 0, i32 9
  %243 = load i32, ptr %242, align 4, !tbaa !31
  call void (i32, ptr, ...) @_glfwInputError(i32 noundef 65539, ptr noundef @.str.8, i32 noundef %243)
  store i32 0, ptr %2, align 4
  br label %246

244:                                              ; preds = %235, %230
  br label %245

245:                                              ; preds = %244, %225
  store i32 1, ptr %2, align 4
  br label %246

246:                                              ; preds = %245, %240, %220, %196, %159, %147, %128, %106, %57, %38, %21
  %247 = load i32, ptr %2, align 4
  ret i32 %247
}

declare void @_glfwInputError(i32 noundef, ptr noundef, ...) #1

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 = { "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" }

!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 40}
!10 = !{!"_GLFWctxconfig", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !6, i64 40, !12, i64 48}
!11 = !{!"int", !7, i64 0}
!12 = !{!"", !11, i64 0}
!13 = !{!10, !11, i64 0}
!14 = !{!15, !11, i64 496}
!15 = !{!"_GLFWwindow", !6, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !6, i64 32, !16, i64 40, !6, i64 64, !6, i64 72, !11, i64 80, !11, i64 84, !11, i64 88, !11, i64 92, !11, i64 96, !11, i64 100, !11, i64 104, !11, i64 108, !11, i64 112, !11, i64 116, !7, i64 120, !7, i64 128, !17, i64 480, !17, i64 488, !18, i64 496, !23, i64 688, !24, i64 824}
!16 = !{!"GLFWvidmode", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20}
!17 = !{!"double", !7, i64 0}
!18 = !{!"_GLFWcontext", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !11, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !19, i64 120, !21, i64 136, !22, i64 168}
!19 = !{!"_GLFWcontextGLX", !6, i64 0, !20, i64 8}
!20 = !{!"long", !7, i64 0}
!21 = !{!"_GLFWcontextEGL", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!22 = !{!"_GLFWcontextOSMesa", !6, i64 0, !11, i64 8, !11, i64 12, !6, i64 16}
!23 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128}
!24 = !{!"_GLFWwindowX11", !20, i64 0, !20, i64 8, !6, i64 16, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !11, i64 40, !11, i64 44, !11, i64 48, !11, i64 52, !11, i64 56, !11, i64 60, !11, i64 64, !11, i64 68, !20, i64 72}
!25 = !{!10, !11, i64 4}
!26 = !{!10, !11, i64 8}
!27 = !{!10, !11, i64 12}
!28 = !{!10, !11, i64 28}
!29 = !{!10, !11, i64 16}
!30 = !{!10, !11, i64 32}
!31 = !{!10, !11, i64 36}


; 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 [36 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [67 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [71 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [40 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @_glfwIsValidContextConfig(ptr nocapture noundef readonly %0) local_unnamed_addr #0 {
  %2 = getelementptr inbounds i8, ptr %0, i64 40
  %3 = load ptr, ptr %2, align 8, !tbaa !5
  %.not = icmp eq ptr %3, null
  br i1 %.not, label %12, label %4

4:                                                ; preds = %1
  %5 = load i32, ptr %0, align 8, !tbaa !12
  %6 = icmp eq i32 %5, 0
  br i1 %6, label %11, label %7

7:                                                ; preds = %4
  %8 = getelementptr inbounds i8, ptr %3, i64 496
  %9 = load i32, ptr %8, align 8, !tbaa !13
  %10 = icmp eq i32 %9, 0
  br i1 %10, label %11, label %12

11:                                               ; preds = %7, %4
  tail call void (i32, ptr, ...) @_glfwInputError(i32 noundef 65546, ptr noundef null) #2
  br label %63

12:                                               ; preds = %7, %1
  %13 = getelementptr inbounds i8, ptr %0, i64 4
  %14 = load i32, ptr %13, align 4, !tbaa !24
  %.off = add i32 %14, -221185
  %switch = icmp ult i32 %.off, 3
  br i1 %switch, label %16, label %15

15:                                               ; preds = %12
  tail call void (i32, ptr, ...) @_glfwInputError(i32 noundef 65539, ptr noundef nonnull @.str, i32 noundef %14) #2
  br label %63

16:                                               ; preds = %12
  %17 = load i32, ptr %0, align 8, !tbaa !12
  switch i32 %17, label %18 [
    i32 196609, label %19
    i32 196610, label %45
    i32 0, label %.thread84
  ]

18:                                               ; preds = %16
  tail call void (i32, ptr, ...) @_glfwInputError(i32 noundef 65539, ptr noundef nonnull @.str.1, i32 noundef %17) #2
  br label %63

19:                                               ; preds = %16
  %20 = getelementptr inbounds i8, ptr %0, i64 8
  %21 = load i32, ptr %20, align 8, !tbaa !25
  %22 = icmp slt i32 %21, 1
  %.phi.trans.insert82 = getelementptr inbounds i8, ptr %0, i64 12
  %.pre83 = load i32, ptr %.phi.trans.insert82, align 4, !tbaa !26
  %23 = icmp slt i32 %.pre83, 0
  %or.cond87 = select i1 %22, i1 true, i1 %23
  br i1 %or.cond87, label %._crit_edge81, label %24

24:                                               ; preds = %19
  %25 = icmp eq i32 %21, 1
  %26 = icmp ugt i32 %.pre83, 5
  %or.cond = and i1 %25, %26
  br i1 %or.cond, label %._crit_edge81, label %27

27:                                               ; preds = %24
  switch i32 %21, label %.thread [
    i32 2, label %28
    i32 3, label %30
  ]

28:                                               ; preds = %27
  %29 = icmp ugt i32 %.pre83, 1
  br i1 %29, label %._crit_edge81, label %.thread

30:                                               ; preds = %27
  %31 = icmp ugt i32 %.pre83, 3
  br i1 %31, label %._crit_edge81, label %.thread

._crit_edge81:                                    ; preds = %19, %24, %30, %28
  tail call void (i32, ptr, ...) @_glfwInputError(i32 noundef 65540, ptr noundef nonnull @.str.2, i32 noundef %21, i32 noundef %.pre83) #2
  br label %63

.thread:                                          ; preds = %27, %28, %30
  %32 = phi i1 [ true, %30 ], [ false, %28 ], [ false, %27 ]
  %33 = getelementptr inbounds i8, ptr %0, i64 28
  %34 = load i32, ptr %33, align 4, !tbaa !27
  switch i32 %34, label %35 [
    i32 0, label %40
    i32 204801, label %36
    i32 204802, label %36
  ]

35:                                               ; preds = %.thread
  tail call void (i32, ptr, ...) @_glfwInputError(i32 noundef 65539, ptr noundef nonnull @.str.3, i32 noundef %34) #2
  br label %63

36:                                               ; preds = %.thread, %.thread
  %37 = icmp ult i32 %21, 3
  %38 = icmp ult i32 %.pre83, 2
  %or.cond77 = and i1 %38, %32
  %or.cond80 = or i1 %37, %or.cond77
  br i1 %or.cond80, label %39, label %.thread84

39:                                               ; preds = %36
  tail call void (i32, ptr, ...) @_glfwInputError(i32 noundef 65540, ptr noundef nonnull @.str.4) #2
  br label %63

40:                                               ; preds = %.thread
  %41 = getelementptr inbounds i8, ptr %0, i64 16
  %42 = load i32, ptr %41, align 8, !tbaa !28
  %.not69 = icmp ne i32 %42, 0
  %43 = icmp ult i32 %21, 3
  %or.cond78 = and i1 %43, %.not69
  br i1 %or.cond78, label %44, label %.thread84

44:                                               ; preds = %40
  tail call void (i32, ptr, ...) @_glfwInputError(i32 noundef 65540, ptr noundef nonnull @.str.5) #2
  br label %63

45:                                               ; preds = %16
  %46 = getelementptr inbounds i8, ptr %0, i64 8
  %47 = load i32, ptr %46, align 8, !tbaa !25
  %48 = icmp slt i32 %47, 1
  %.phi.trans.insert = getelementptr inbounds i8, ptr %0, i64 12
  %.pre = load i32, ptr %.phi.trans.insert, align 4, !tbaa !26
  %49 = icmp slt i32 %.pre, 0
  %or.cond88 = select i1 %48, i1 true, i1 %49
  br i1 %or.cond88, label %._crit_edge, label %50

50:                                               ; preds = %45
  %51 = icmp eq i32 %47, 1
  %52 = icmp ugt i32 %.pre, 1
  %or.cond76 = and i1 %51, %52
  br i1 %or.cond76, label %._crit_edge, label %53

53:                                               ; preds = %50
  %54 = icmp eq i32 %47, 2
  %55 = icmp ne i32 %.pre, 0
  %or.cond79 = and i1 %54, %55
  br i1 %or.cond79, label %._crit_edge, label %.thread84

._crit_edge:                                      ; preds = %45, %53, %50
  tail call void (i32, ptr, ...) @_glfwInputError(i32 noundef 65540, ptr noundef nonnull @.str.6, i32 noundef %47, i32 noundef %.pre) #2
  br label %63

.thread84:                                        ; preds = %36, %16, %53, %40
  %56 = getelementptr inbounds i8, ptr %0, i64 32
  %57 = load i32, ptr %56, align 8, !tbaa !29
  switch i32 %57, label %58 [
    i32 0, label %59
    i32 200705, label %59
    i32 200706, label %59
  ]

58:                                               ; preds = %.thread84
  tail call void (i32, ptr, ...) @_glfwInputError(i32 noundef 65539, ptr noundef nonnull @.str.7, i32 noundef %57) #2
  br label %63

59:                                               ; preds = %.thread84, %.thread84, %.thread84
  %60 = getelementptr inbounds i8, ptr %0, i64 36
  %61 = load i32, ptr %60, align 4, !tbaa !30
  switch i32 %61, label %62 [
    i32 0, label %63
    i32 217090, label %63
    i32 217089, label %63
  ]

62:                                               ; preds = %59
  tail call void (i32, ptr, ...) @_glfwInputError(i32 noundef 65539, ptr noundef nonnull @.str.8, i32 noundef %61) #2
  br label %63

63:                                               ; preds = %59, %59, %59, %62, %58, %._crit_edge, %44, %39, %35, %._crit_edge81, %18, %15, %11
  %.0 = phi i32 [ 0, %11 ], [ 0, %15 ], [ 0, %18 ], [ 0, %._crit_edge81 ], [ 0, %35 ], [ 0, %39 ], [ 0, %44 ], [ 0, %58 ], [ 0, %62 ], [ 0, %._crit_edge ], [ 1, %59 ], [ 1, %59 ], [ 1, %59 ]
  ret i32 %.0
}

declare void @_glfwInputError(i32 noundef, ptr noundef, ...) local_unnamed_addr #1

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 = { "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 = { 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, !10, i64 40}
!6 = !{!"_GLFWctxconfig", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28, !7, i64 32, !7, i64 36, !10, i64 40, !11, i64 48}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"", !7, i64 0}
!12 = !{!6, !7, i64 0}
!13 = !{!14, !7, i64 496}
!14 = !{!"_GLFWwindow", !10, i64 0, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28, !10, i64 32, !15, i64 40, !10, i64 64, !10, i64 72, !7, i64 80, !7, i64 84, !7, i64 88, !7, i64 92, !7, i64 96, !7, i64 100, !7, i64 104, !7, i64 108, !7, i64 112, !7, i64 116, !8, i64 120, !8, i64 128, !16, i64 480, !16, i64 488, !17, i64 496, !22, i64 688, !23, i64 824}
!15 = !{!"GLFWvidmode", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20}
!16 = !{!"double", !8, i64 0}
!17 = !{!"_GLFWcontext", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28, !7, i64 32, !7, i64 36, !7, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !10, i64 96, !10, i64 104, !10, i64 112, !18, i64 120, !20, i64 136, !21, i64 168}
!18 = !{!"_GLFWcontextGLX", !10, i64 0, !19, i64 8}
!19 = !{!"long", !8, i64 0}
!20 = !{!"_GLFWcontextEGL", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24}
!21 = !{!"_GLFWcontextOSMesa", !10, i64 0, !7, i64 8, !7, i64 12, !10, i64 16}
!22 = !{!"", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !10, i64 96, !10, i64 104, !10, i64 112, !10, i64 120, !10, i64 128}
!23 = !{!"_GLFWwindowX11", !19, i64 0, !19, i64 8, !10, i64 16, !7, i64 24, !7, i64 28, !7, i64 32, !7, i64 36, !7, i64 40, !7, i64 44, !7, i64 48, !7, i64 52, !7, i64 56, !7, i64 60, !7, i64 64, !7, i64 68, !19, i64 72}
!24 = !{!6, !7, i64 4}
!25 = !{!6, !7, i64 8}
!26 = !{!6, !7, i64 12}
!27 = !{!6, !7, i64 28}
!28 = !{!6, !7, i64 16}
!29 = !{!6, !7, i64 32}
!30 = !{!6, !7, i64 36}


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InstCombinePass,JumpThreadingPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass