; LLVM IR from yettabaa/cub3D :: mlx-linux (mlx_ext_randr)

; 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.XWindowAttributes = type { i32, i32, i32, i32, i32, i32, ptr, i64, i32, i32, i32, i32, i64, i64, i32, i64, i32, i32, i64, i64, i64, i32, ptr }
%struct.s_xvar = type { ptr, i64, i32, i32, ptr, i64, i32, ptr, ptr, ptr, i32, i32, i32, [6 x i32], i64, i64, i32 }
%struct.s_win_list = type { i64, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, [36 x %struct.s_event_list] }
%struct.s_event_list = type { i32, ptr, ptr }
%struct._XRRScreenResources = type { i64, i64, i32, ptr, i32, ptr, i32, ptr }
%struct._XRROutputInfo = type { i64, i64, ptr, i32, i64, i64, i16, i16, i32, ptr, i32, ptr, i32, i32, ptr }
%struct._XRRModeInfo = type { i64, i32, i32, i64, i32, i32, i32, i32, i32, i32, i32, ptr, i32, i64 }
%struct._XRRCrtcInfo = type { i64, i32, i32, i32, i32, i64, i16, i32, ptr, i16, i32, ptr }

@saved_mode = external dso_local global i64, align 8
@.str = external hidden unnamed_addr constant [33 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [20 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @mlx_ext_fullscreen(ptr noundef %0, ptr noundef %1, i32 noundef %2) #0 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca %struct.XWindowAttributes, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i64, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store i32 %2, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 136, ptr %8) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #3
  %18 = load ptr, ptr %5, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.s_xvar, ptr %18, i32 0, i32 0
  %20 = load ptr, ptr %19, align 8, !tbaa !11
  %21 = load ptr, ptr %6, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.s_win_list, ptr %21, i32 0, i32 0
  %23 = load i64, ptr %22, align 8, !tbaa !14
  %24 = call i32 @XGetWindowAttributes(ptr noundef %20, i64 noundef %23, ptr noundef %8)
  %25 = icmp ne i32 %24, 0
  br i1 %25, label %27, label %26

26:                                               ; preds = %3
  store i32 0, ptr %4, align 4
  store i32 1, ptr %17, align 4
  br label %292

27:                                               ; preds = %3
  %28 = load ptr, ptr %5, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.s_xvar, ptr %28, i32 0, i32 0
  %30 = load ptr, ptr %29, align 8, !tbaa !11
  %31 = load ptr, ptr %5, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.s_xvar, ptr %31, i32 0, i32 1
  %33 = load i64, ptr %32, align 8, !tbaa !16
  %34 = call ptr @XRRGetScreenResources(ptr noundef %30, i64 noundef %33)
  store ptr %34, ptr %11, align 8, !tbaa !5
  store ptr null, ptr %12, align 8, !tbaa !5
  store i32 -1, ptr %15, align 4, !tbaa !9
  %35 = load ptr, ptr %11, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct._XRRScreenResources, ptr %35, i32 0, i32 4
  %37 = load i32, ptr %36, align 8, !tbaa !17
  store i32 %37, ptr %9, align 4, !tbaa !9
  br label %38

38:                                               ; preds = %64, %27
  %39 = load i32, ptr %9, align 4, !tbaa !9
  %40 = add nsw i32 %39, -1
  store i32 %40, ptr %9, align 4, !tbaa !9
  %41 = icmp ne i32 %39, 0
  br i1 %41, label %42, label %65

42:                                               ; preds = %38
  %43 = load ptr, ptr %5, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.s_xvar, ptr %43, i32 0, i32 0
  %45 = load ptr, ptr %44, align 8, !tbaa !11
  %46 = load ptr, ptr %11, align 8, !tbaa !5
  %47 = load ptr, ptr %11, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct._XRRScreenResources, ptr %47, i32 0, i32 5
  %49 = load ptr, ptr %48, align 8, !tbaa !19
  %50 = load i32, ptr %9, align 4, !tbaa !9
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds i64, ptr %49, i64 %51
  %53 = load i64, ptr %52, align 8, !tbaa !20
  %54 = call ptr @XRRGetOutputInfo(ptr noundef %45, ptr noundef %46, i64 noundef %53)
  store ptr %54, ptr %12, align 8, !tbaa !5
  %55 = load ptr, ptr %12, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct._XRROutputInfo, ptr %55, i32 0, i32 6
  %57 = load i16, ptr %56, align 8, !tbaa !21
  %58 = zext i16 %57 to i32
  %59 = icmp eq i32 %58, 0
  br i1 %59, label %60, label %62

60:                                               ; preds = %42
  %61 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %61, ptr %15, align 4, !tbaa !9
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %64

62:                                               ; preds = %42
  %63 = load ptr, ptr %12, align 8, !tbaa !5
  call void @XRRFreeOutputInfo(ptr noundef %63)
  br label %64

64:                                               ; preds = %62, %60
  br label %38, !llvm.loop !24

65:                                               ; preds = %38
  %66 = load ptr, ptr %12, align 8, !tbaa !5
  %67 = icmp ne ptr %66, null
  br i1 %67, label %70, label %68

68:                                               ; preds = %65
  %69 = load ptr, ptr %11, align 8, !tbaa !5
  call void @XRRFreeScreenResources(ptr noundef %69)
  store i32 0, ptr %4, align 4
  store i32 1, ptr %17, align 4
  br label %292

70:                                               ; preds = %65
  store i32 -1, ptr %16, align 4, !tbaa !9
  %71 = load ptr, ptr %12, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct._XRROutputInfo, ptr %71, i32 0, i32 12
  %73 = load i32, ptr %72, align 8, !tbaa !26
  store i32 %73, ptr %9, align 4, !tbaa !9
  br label %74

74:                                               ; preds = %170, %70
  %75 = load i32, ptr %9, align 4, !tbaa !9
  %76 = add nsw i32 %75, -1
  store i32 %76, ptr %9, align 4, !tbaa !9
  %77 = icmp ne i32 %75, 0
  br i1 %77, label %78, label %171

78:                                               ; preds = %74
  %79 = load ptr, ptr %11, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct._XRRScreenResources, ptr %79, i32 0, i32 6
  %81 = load i32, ptr %80, align 8, !tbaa !27
  store i32 %81, ptr %10, align 4, !tbaa !9
  br label %82

82:                                               ; preds = %169, %78
  %83 = load i32, ptr %10, align 4, !tbaa !9
  %84 = add nsw i32 %83, -1
  store i32 %84, ptr %10, align 4, !tbaa !9
  %85 = icmp ne i32 %83, 0
  br i1 %85, label %86, label %170

86:                                               ; preds = %82
  %87 = load ptr, ptr %11, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct._XRRScreenResources, ptr %87, i32 0, i32 7
  %89 = load ptr, ptr %88, align 8, !tbaa !28
  %90 = load i32, ptr %10, align 4, !tbaa !9
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds %struct._XRRModeInfo, ptr %89, i64 %91
  %93 = getelementptr inbounds %struct._XRRModeInfo, ptr %92, i32 0, i32 0
  %94 = load i64, ptr %93, align 8, !tbaa !29
  %95 = load ptr, ptr %12, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct._XRROutputInfo, ptr %95, i32 0, i32 14
  %97 = load ptr, ptr %96, align 8, !tbaa !31
  %98 = load i32, ptr %9, align 4, !tbaa !9
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds i64, ptr %97, i64 %99
  %101 = load i64, ptr %100, align 8, !tbaa !20
  %102 = icmp eq i64 %94, %101
  br i1 %102, label %103, label %169

103:                                              ; preds = %86
  %104 = load ptr, ptr %11, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct._XRRScreenResources, ptr %104, i32 0, i32 7
  %106 = load ptr, ptr %105, align 8, !tbaa !28
  %107 = load i32, ptr %10, align 4, !tbaa !9
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds %struct._XRRModeInfo, ptr %106, i64 %108
  %110 = getelementptr inbounds %struct._XRRModeInfo, ptr %109, i32 0, i32 1
  %111 = load i32, ptr %110, align 8, !tbaa !32
  %112 = getelementptr inbounds %struct.XWindowAttributes, ptr %8, i32 0, i32 2
  %113 = load i32, ptr %112, align 8, !tbaa !33
  %114 = icmp uge i32 %111, %113
  br i1 %114, label %115, label %168

115:                                              ; preds = %103
  %116 = load ptr, ptr %11, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct._XRRScreenResources, ptr %116, i32 0, i32 7
  %118 = load ptr, ptr %117, align 8, !tbaa !28
  %119 = load i32, ptr %10, align 4, !tbaa !9
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds %struct._XRRModeInfo, ptr %118, i64 %120
  %122 = getelementptr inbounds %struct._XRRModeInfo, ptr %121, i32 0, i32 2
  %123 = load i32, ptr %122, align 4, !tbaa !35
  %124 = getelementptr inbounds %struct.XWindowAttributes, ptr %8, i32 0, i32 3
  %125 = load i32, ptr %124, align 4, !tbaa !36
  %126 = icmp uge i32 %123, %125
  br i1 %126, label %127, label %168

127:                                              ; preds = %115
  %128 = load i32, ptr %16, align 4, !tbaa !9
  %129 = icmp eq i32 %128, -1
  br i1 %129, label %166, label %130

130:                                              ; preds = %127
  %131 = load ptr, ptr %11, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct._XRRScreenResources, ptr %131, i32 0, i32 7
  %133 = load ptr, ptr %132, align 8, !tbaa !28
  %134 = load i32, ptr %16, align 4, !tbaa !9
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds %struct._XRRModeInfo, ptr %133, i64 %135
  %137 = getelementptr inbounds %struct._XRRModeInfo, ptr %136, i32 0, i32 1
  %138 = load i32, ptr %137, align 8, !tbaa !32
  %139 = load ptr, ptr %11, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct._XRRScreenResources, ptr %139, i32 0, i32 7
  %141 = load ptr, ptr %140, align 8, !tbaa !28
  %142 = load i32, ptr %10, align 4, !tbaa !9
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds %struct._XRRModeInfo, ptr %141, i64 %143
  %145 = getelementptr inbounds %struct._XRRModeInfo, ptr %144, i32 0, i32 1
  %146 = load i32, ptr %145, align 8, !tbaa !32
  %147 = icmp ugt i32 %138, %146
  br i1 %147, label %166, label %148

148:                                              ; preds = %130
  %149 = load ptr, ptr %11, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct._XRRScreenResources, ptr %149, i32 0, i32 7
  %151 = load ptr, ptr %150, align 8, !tbaa !28
  %152 = load i32, ptr %16, align 4, !tbaa !9
  %153 = sext i32 %152 to i64
  %154 = getelementptr inbounds %struct._XRRModeInfo, ptr %151, i64 %153
  %155 = getelementptr inbounds %struct._XRRModeInfo, ptr %154, i32 0, i32 2
  %156 = load i32, ptr %155, align 4, !tbaa !35
  %157 = load ptr, ptr %11, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct._XRRScreenResources, ptr %157, i32 0, i32 7
  %159 = load ptr, ptr %158, align 8, !tbaa !28
  %160 = load i32, ptr %10, align 4, !tbaa !9
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds %struct._XRRModeInfo, ptr %159, i64 %161
  %163 = getelementptr inbounds %struct._XRRModeInfo, ptr %162, i32 0, i32 2
  %164 = load i32, ptr %163, align 4, !tbaa !35
  %165 = icmp ugt i32 %156, %164
  br i1 %165, label %166, label %168

166:                                              ; preds = %148, %130, %127
  %167 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %167, ptr %16, align 4, !tbaa !9
  br label %168

168:                                              ; preds = %166, %148, %115, %103
  br label %169

169:                                              ; preds = %168, %86
  br label %82, !llvm.loop !37

170:                                              ; preds = %82
  br label %74, !llvm.loop !38

171:                                              ; preds = %74
  %172 = load i32, ptr %16, align 4, !tbaa !9
  %173 = icmp slt i32 %172, 0
  br i1 %173, label %174, label %177

174:                                              ; preds = %171
  %175 = load ptr, ptr %12, align 8, !tbaa !5
  call void @XRRFreeOutputInfo(ptr noundef %175)
  %176 = load ptr, ptr %11, align 8, !tbaa !5
  call void @XRRFreeScreenResources(ptr noundef %176)
  store i32 0, ptr %4, align 4
  store i32 1, ptr %17, align 4
  br label %292

177:                                              ; preds = %171
  %178 = load i32, ptr %7, align 4, !tbaa !9
  %179 = icmp ne i32 %178, 0
  br i1 %179, label %184, label %180

180:                                              ; preds = %177
  %181 = load i64, ptr @saved_mode, align 8, !tbaa !20
  %182 = icmp eq i64 %181, -1
  br i1 %182, label %183, label %184

183:                                              ; preds = %180
  store i32 0, ptr %16, align 4, !tbaa !9
  br label %184

184:                                              ; preds = %183, %180, %177
  %185 = load ptr, ptr %12, align 8, !tbaa !5
  %186 = getelementptr inbounds %struct._XRROutputInfo, ptr %185, i32 0, i32 14
  %187 = load ptr, ptr %186, align 8, !tbaa !31
  %188 = load i32, ptr %16, align 4, !tbaa !9
  %189 = sext i32 %188 to i64
  %190 = getelementptr inbounds i64, ptr %187, i64 %189
  %191 = load i64, ptr %190, align 8, !tbaa !20
  store i64 %191, ptr %14, align 8, !tbaa !20
  %192 = load i32, ptr %7, align 4, !tbaa !9
  %193 = icmp ne i32 %192, 0
  br i1 %193, label %196, label %194

194:                                              ; preds = %184
  %195 = load i64, ptr @saved_mode, align 8, !tbaa !20
  store i64 %195, ptr %14, align 8, !tbaa !20
  br label %196

196:                                              ; preds = %194, %184
  %197 = load ptr, ptr %5, align 8, !tbaa !5
  %198 = getelementptr inbounds %struct.s_xvar, ptr %197, i32 0, i32 0
  %199 = load ptr, ptr %198, align 8, !tbaa !11
  %200 = load ptr, ptr %11, align 8, !tbaa !5
  %201 = load ptr, ptr %12, align 8, !tbaa !5
  %202 = getelementptr inbounds %struct._XRROutputInfo, ptr %201, i32 0, i32 1
  %203 = load i64, ptr %202, align 8, !tbaa !39
  %204 = call ptr @XRRGetCrtcInfo(ptr noundef %199, ptr noundef %200, i64 noundef %203)
  store ptr %204, ptr %13, align 8, !tbaa !5
  %205 = load ptr, ptr %13, align 8, !tbaa !5
  %206 = getelementptr inbounds %struct._XRRCrtcInfo, ptr %205, i32 0, i32 5
  %207 = load i64, ptr %206, align 8, !tbaa !40
  store i64 %207, ptr @saved_mode, align 8, !tbaa !20
  %208 = load ptr, ptr %5, align 8, !tbaa !5
  %209 = getelementptr inbounds %struct.s_xvar, ptr %208, i32 0, i32 0
  %210 = load ptr, ptr %209, align 8, !tbaa !11
  %211 = load ptr, ptr %11, align 8, !tbaa !5
  %212 = load ptr, ptr %12, align 8, !tbaa !5
  %213 = getelementptr inbounds %struct._XRROutputInfo, ptr %212, i32 0, i32 1
  %214 = load i64, ptr %213, align 8, !tbaa !39
  %215 = load i64, ptr %14, align 8, !tbaa !20
  %216 = load ptr, ptr %13, align 8, !tbaa !5
  %217 = getelementptr inbounds %struct._XRRCrtcInfo, ptr %216, i32 0, i32 6
  %218 = load i16, ptr %217, align 8, !tbaa !42
  %219 = load ptr, ptr %11, align 8, !tbaa !5
  %220 = getelementptr inbounds %struct._XRRScreenResources, ptr %219, i32 0, i32 5
  %221 = load ptr, ptr %220, align 8, !tbaa !19
  %222 = load i32, ptr %15, align 4, !tbaa !9
  %223 = sext i32 %222 to i64
  %224 = getelementptr inbounds i64, ptr %221, i64 %223
  %225 = call i32 @XRRSetCrtcConfig(ptr noundef %210, ptr noundef %211, i64 noundef %214, i64 noundef 0, i32 noundef 0, i32 noundef 0, i64 noundef %215, i16 noundef zeroext %218, ptr noundef %224, i32 noundef 1)
  store i32 %225, ptr %9, align 4, !tbaa !9
  %226 = load i32, ptr %7, align 4, !tbaa !9
  %227 = icmp ne i32 %226, 0
  br i1 %227, label %228, label %247

228:                                              ; preds = %196
  %229 = load ptr, ptr %11, align 8, !tbaa !5
  %230 = getelementptr inbounds %struct._XRRScreenResources, ptr %229, i32 0, i32 7
  %231 = load ptr, ptr %230, align 8, !tbaa !28
  %232 = load i32, ptr %16, align 4, !tbaa !9
  %233 = sext i32 %232 to i64
  %234 = getelementptr inbounds %struct._XRRModeInfo, ptr %231, i64 %233
  %235 = getelementptr inbounds %struct._XRRModeInfo, ptr %234, i32 0, i32 1
  %236 = load i32, ptr %235, align 8, !tbaa !32
  %237 = load ptr, ptr %11, align 8, !tbaa !5
  %238 = getelementptr inbounds %struct._XRRScreenResources, ptr %237, i32 0, i32 7
  %239 = load ptr, ptr %238, align 8, !tbaa !28
  %240 = load i32, ptr %16, align 4, !tbaa !9
  %241 = sext i32 %240 to i64
  %242 = getelementptr inbounds %struct._XRRModeInfo, ptr %239, i64 %241
  %243 = getelementptr inbounds %struct._XRRModeInfo, ptr %242, i32 0, i32 2
  %244 = load i32, ptr %243, align 4, !tbaa !35
  %245 = load i32, ptr %9, align 4, !tbaa !9
  %246 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %236, i32 noundef %244, i32 noundef %245)
  br label %249

247:                                              ; preds = %196
  %248 = call i32 (ptr, ...) @printf(ptr noundef @.str.1)
  br label %249

249:                                              ; preds = %247, %228
  %250 = load ptr, ptr %5, align 8, !tbaa !5
  %251 = getelementptr inbounds %struct.s_xvar, ptr %250, i32 0, i32 0
  %252 = load ptr, ptr %251, align 8, !tbaa !11
  %253 = load ptr, ptr %6, align 8, !tbaa !5
  %254 = getelementptr inbounds %struct.s_win_list, ptr %253, i32 0, i32 0
  %255 = load i64, ptr %254, align 8, !tbaa !14
  %256 = call i32 @XMoveWindow(ptr noundef %252, i64 noundef %255, i32 noundef 0, i32 noundef 0)
  %257 = load ptr, ptr %5, align 8, !tbaa !5
  %258 = getelementptr inbounds %struct.s_xvar, ptr %257, i32 0, i32 0
  %259 = load ptr, ptr %258, align 8, !tbaa !11
  %260 = load ptr, ptr %6, align 8, !tbaa !5
  %261 = getelementptr inbounds %struct.s_win_list, ptr %260, i32 0, i32 0
  %262 = load i64, ptr %261, align 8, !tbaa !14
  %263 = call i32 @XMapRaised(ptr noundef %259, i64 noundef %262)
  %264 = load i32, ptr %7, align 4, !tbaa !9
  %265 = icmp ne i32 %264, 0
  br i1 %265, label %266, label %274

266:                                              ; preds = %249
  %267 = load ptr, ptr %5, align 8, !tbaa !5
  %268 = getelementptr inbounds %struct.s_xvar, ptr %267, i32 0, i32 0
  %269 = load ptr, ptr %268, align 8, !tbaa !11
  %270 = load ptr, ptr %6, align 8, !tbaa !5
  %271 = getelementptr inbounds %struct.s_win_list, ptr %270, i32 0, i32 0
  %272 = load i64, ptr %271, align 8, !tbaa !14
  %273 = call i32 @XGrabKeyboard(ptr noundef %269, i64 noundef %272, i32 noundef 0, i32 noundef 1, i32 noundef 1, i64 noundef 0)
  br label %283

274:                                              ; preds = %249
  %275 = load ptr, ptr %5, align 8, !tbaa !5
  %276 = getelementptr inbounds %struct.s_xvar, ptr %275, i32 0, i32 0
  %277 = load ptr, ptr %276, align 8, !tbaa !11
  %278 = call i32 @XUngrabPointer(ptr noundef %277, i64 noundef 0)
  %279 = load ptr, ptr %5, align 8, !tbaa !5
  %280 = getelementptr inbounds %struct.s_xvar, ptr %279, i32 0, i32 0
  %281 = load ptr, ptr %280, align 8, !tbaa !11
  %282 = call i32 @XUngrabKeyboard(ptr noundef %281, i64 noundef 0)
  br label %283

283:                                              ; preds = %274, %266
  %284 = load ptr, ptr %5, align 8, !tbaa !5
  %285 = getelementptr inbounds %struct.s_xvar, ptr %284, i32 0, i32 0
  %286 = load ptr, ptr %285, align 8, !tbaa !11
  %287 = call i32 @XSync(ptr noundef %286, i32 noundef 0)
  %288 = call i32 @sleep(i32 noundef 1)
  %289 = load ptr, ptr %13, align 8, !tbaa !5
  call void @XRRFreeCrtcInfo(ptr noundef %289)
  %290 = load ptr, ptr %12, align 8, !tbaa !5
  call void @XRRFreeOutputInfo(ptr noundef %290)
  %291 = load ptr, ptr %11, align 8, !tbaa !5
  call void @XRRFreeScreenResources(ptr noundef %291)
  store i32 0, ptr %17, align 4
  br label %292

292:                                              ; preds = %283, %174, %68, %26
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 136, ptr %8) #3
  %293 = load i32, ptr %17, align 4
  switch i32 %293, label %296 [
    i32 0, label %294
    i32 1, label %294
  ]

294:                                              ; preds = %292, %292
  %295 = load i32, ptr %4, align 4
  ret i32 %295

296:                                              ; preds = %292
  unreachable
}

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

declare i32 @XGetWindowAttributes(ptr noundef, i64 noundef, ptr noundef) #2

declare ptr @XRRGetScreenResources(ptr noundef, i64 noundef) #2

declare ptr @XRRGetOutputInfo(ptr noundef, ptr noundef, i64 noundef) #2

declare void @XRRFreeOutputInfo(ptr noundef) #2

declare void @XRRFreeScreenResources(ptr noundef) #2

declare ptr @XRRGetCrtcInfo(ptr noundef, ptr noundef, i64 noundef) #2

declare i32 @XRRSetCrtcConfig(ptr noundef, ptr noundef, i64 noundef, i64 noundef, i32 noundef, i32 noundef, i64 noundef, i16 noundef zeroext, ptr noundef, i32 noundef) #2

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

declare i32 @XMoveWindow(ptr noundef, i64 noundef, i32 noundef, i32 noundef) #2

declare i32 @XMapRaised(ptr noundef, i64 noundef) #2

declare i32 @XGrabKeyboard(ptr noundef, i64 noundef, i32 noundef, i32 noundef, i32 noundef, i64 noundef) #2

declare i32 @XUngrabPointer(ptr noundef, i64 noundef) #2

declare i32 @XUngrabKeyboard(ptr noundef, i64 noundef) #2

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

declare i32 @sleep(i32 noundef) #2

declare void @XRRFreeCrtcInfo(ptr noundef) #2

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 0}
!12 = !{!"s_xvar", !6, i64 0, !13, i64 8, !10, i64 16, !10, i64 20, !6, i64 24, !13, i64 32, !10, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !10, i64 72, !10, i64 76, !10, i64 80, !7, i64 84, !13, i64 112, !13, i64 120, !10, i64 128}
!13 = !{!"long", !7, i64 0}
!14 = !{!15, !13, i64 0}
!15 = !{!"s_win_list", !13, 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, !7, i64 72}
!16 = !{!12, !13, i64 8}
!17 = !{!18, !10, i64 32}
!18 = !{!"_XRRScreenResources", !13, i64 0, !13, i64 8, !10, i64 16, !6, i64 24, !10, i64 32, !6, i64 40, !10, i64 48, !6, i64 56}
!19 = !{!18, !6, i64 40}
!20 = !{!13, !13, i64 0}
!21 = !{!22, !23, i64 48}
!22 = !{!"_XRROutputInfo", !13, i64 0, !13, i64 8, !6, i64 16, !10, i64 24, !13, i64 32, !13, i64 40, !23, i64 48, !23, i64 50, !10, i64 52, !6, i64 56, !10, i64 64, !6, i64 72, !10, i64 80, !10, i64 84, !6, i64 88}
!23 = !{!"short", !7, i64 0}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = !{!22, !10, i64 80}
!27 = !{!18, !10, i64 48}
!28 = !{!18, !6, i64 56}
!29 = !{!30, !13, i64 0}
!30 = !{!"_XRRModeInfo", !13, i64 0, !10, i64 8, !10, i64 12, !13, i64 16, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !10, i64 48, !6, i64 56, !10, i64 64, !13, i64 72}
!31 = !{!22, !6, i64 88}
!32 = !{!30, !10, i64 8}
!33 = !{!34, !10, i64 8}
!34 = !{!"", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !6, i64 24, !13, i64 32, !10, i64 40, !10, i64 44, !10, i64 48, !10, i64 52, !13, i64 56, !13, i64 64, !10, i64 72, !13, i64 80, !10, i64 88, !10, i64 92, !13, i64 96, !13, i64 104, !13, i64 112, !10, i64 120, !6, i64 128}
!35 = !{!30, !10, i64 12}
!36 = !{!34, !10, i64 12}
!37 = distinct !{!37, !25}
!38 = distinct !{!38, !25}
!39 = !{!22, !13, i64 8}
!40 = !{!41, !13, i64 24}
!41 = !{!"_XRRCrtcInfo", !13, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !13, i64 24, !23, i64 32, !10, i64 36, !6, i64 40, !23, i64 48, !10, i64 52, !6, i64 56}
!42 = !{!41, !23, i64 32}


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

%struct.XWindowAttributes = type { i32, i32, i32, i32, i32, i32, ptr, i64, i32, i32, i32, i32, i64, i64, i32, i64, i32, i32, i64, i64, i64, i32, ptr }
%struct._XRRModeInfo = type { i64, i32, i32, i64, i32, i32, i32, i32, i32, i32, i32, ptr, i32, i64 }

@saved_mode = external dso_local local_unnamed_addr global i64, align 8
@.str = external hidden unnamed_addr constant [33 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [20 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @mlx_ext_fullscreen(ptr nocapture noundef readonly %0, ptr nocapture noundef readonly %1, i32 noundef %2) local_unnamed_addr #0 {
  %4 = alloca %struct.XWindowAttributes, align 8
  call void @llvm.lifetime.start.p0(i64 136, ptr nonnull %4) #4
  %5 = load ptr, ptr %0, align 8, !tbaa !5
  %6 = load i64, ptr %1, align 8, !tbaa !12
  %7 = call i32 @XGetWindowAttributes(ptr noundef %5, i64 noundef %6, ptr noundef nonnull %4) #4
  %.not = icmp eq i32 %7, 0
  br i1 %.not, label %126, label %8

8:                                                ; preds = %3
  %9 = load ptr, ptr %0, align 8, !tbaa !5
  %10 = getelementptr inbounds i8, ptr %0, i64 8
  %11 = load i64, ptr %10, align 8, !tbaa !14
  %12 = call ptr @XRRGetScreenResources(ptr noundef %9, i64 noundef %11) #4
  %13 = getelementptr inbounds i8, ptr %12, i64 32
  %14 = load i32, ptr %13, align 8, !tbaa !15
  %.not8693 = icmp eq i32 %14, 0
  br i1 %.not8693, label %.sink.split, label %.lr.ph

.lr.ph:                                           ; preds = %8
  %15 = getelementptr inbounds i8, ptr %12, i64 40
  br label %16

16:                                               ; preds = %.lr.ph, %27
  %.in = phi i32 [ %14, %.lr.ph ], [ %17, %27 ]
  %17 = add nsw i32 %.in, -1
  %18 = load ptr, ptr %0, align 8, !tbaa !5
  %19 = load ptr, ptr %15, align 8, !tbaa !17
  %20 = sext i32 %17 to i64
  %21 = getelementptr inbounds i64, ptr %19, i64 %20
  %22 = load i64, ptr %21, align 8, !tbaa !18
  %23 = call ptr @XRRGetOutputInfo(ptr noundef %18, ptr noundef nonnull %12, i64 noundef %22) #4
  %24 = getelementptr inbounds i8, ptr %23, i64 48
  %25 = load i16, ptr %24, align 8, !tbaa !19
  %26 = icmp eq i16 %25, 0
  br i1 %26, label %.thread, label %27

27:                                               ; preds = %16
  call void @XRRFreeOutputInfo(ptr noundef nonnull %23) #4
  %.not86 = icmp eq i32 %17, 0
  br i1 %.not86, label %.thread, label %16, !llvm.loop !22

.thread:                                          ; preds = %16, %27
  %.176116 = phi i32 [ -1, %27 ], [ %17, %16 ]
  %28 = sext i32 %.176116 to i64
  %29 = getelementptr inbounds i8, ptr %23, i64 80
  %30 = load i32, ptr %29, align 8, !tbaa !24
  %31 = add i32 %30, -1
  %.not88101 = icmp eq i32 %30, 0
  br i1 %.not88101, label %.sink.split.sink.split, label %.lr.ph104

.lr.ph104:                                        ; preds = %.thread
  %32 = getelementptr inbounds i8, ptr %12, i64 48
  %33 = load i32, ptr %32, align 8, !tbaa !25
  %.not9096 = icmp eq i32 %33, 0
  %34 = getelementptr inbounds i8, ptr %4, i64 8
  %35 = load i32, ptr %34, align 8
  %36 = getelementptr inbounds i8, ptr %4, i64 12
  %37 = load i32, ptr %36, align 4
  br i1 %.not9096, label %.sink.split.sink.split, label %.lr.ph104.split

.lr.ph104.split:                                  ; preds = %.lr.ph104
  %38 = getelementptr inbounds i8, ptr %23, i64 88
  %39 = getelementptr inbounds i8, ptr %12, i64 56
  %40 = load ptr, ptr %39, align 8, !tbaa !26
  %41 = load ptr, ptr %38, align 8, !tbaa !27
  %42 = sext i32 %33 to i64
  %43 = sext i32 %31 to i64
  br label %.lr.ph99

..loopexit_crit_edge:                             ; preds = %71
  %indvars.iv.next111 = add nsw i64 %indvars.iv110, -1
  %44 = icmp eq i64 %indvars.iv110, 0
  br i1 %44, label %._crit_edge105, label %.lr.ph99, !llvm.loop !28

.lr.ph99:                                         ; preds = %.lr.ph104.split, %..loopexit_crit_edge
  %indvars.iv110 = phi i64 [ %43, %.lr.ph104.split ], [ %indvars.iv.next111, %..loopexit_crit_edge ]
  %.0102 = phi i32 [ -1, %.lr.ph104.split ], [ %.2, %..loopexit_crit_edge ]
  %45 = getelementptr inbounds i64, ptr %41, i64 %indvars.iv110
  %46 = load i64, ptr %45, align 8, !tbaa !18
  %47 = trunc nsw i64 %indvars.iv110 to i32
  br label %48

48:                                               ; preds = %.lr.ph99, %71
  %indvars.iv = phi i64 [ %42, %.lr.ph99 ], [ %indvars.iv.next, %71 ]
  %.197 = phi i32 [ %.0102, %.lr.ph99 ], [ %.2, %71 ]
  %indvars.iv.next = add nsw i64 %indvars.iv, -1
  %49 = getelementptr inbounds %struct._XRRModeInfo, ptr %40, i64 %indvars.iv.next
  %50 = load i64, ptr %49, align 8, !tbaa !29
  %51 = icmp eq i64 %50, %46
  br i1 %51, label %52, label %71

52:                                               ; preds = %48
  %53 = getelementptr inbounds i8, ptr %49, i64 8
  %54 = load i32, ptr %53, align 8, !tbaa !31
  %.not91 = icmp ult i32 %54, %35
  br i1 %.not91, label %71, label %55

55:                                               ; preds = %52
  %56 = getelementptr inbounds i8, ptr %49, i64 12
  %57 = load i32, ptr %56, align 4, !tbaa !32
  %.not92 = icmp ult i32 %57, %37
  br i1 %.not92, label %71, label %58

58:                                               ; preds = %55
  %59 = icmp eq i32 %.197, -1
  br i1 %59, label %70, label %60

60:                                               ; preds = %58
  %61 = sext i32 %.197 to i64
  %62 = getelementptr inbounds %struct._XRRModeInfo, ptr %40, i64 %61
  %63 = getelementptr inbounds i8, ptr %62, i64 8
  %64 = load i32, ptr %63, align 8, !tbaa !31
  %65 = icmp ugt i32 %64, %54
  br i1 %65, label %70, label %66

66:                                               ; preds = %60
  %67 = getelementptr inbounds i8, ptr %62, i64 12
  %68 = load i32, ptr %67, align 4, !tbaa !32
  %69 = icmp ugt i32 %68, %57
  br i1 %69, label %70, label %71

70:                                               ; preds = %66, %60, %58
  br label %71

71:                                               ; preds = %52, %55, %66, %70, %48
  %.2 = phi i32 [ %47, %70 ], [ %.197, %66 ], [ %.197, %55 ], [ %.197, %52 ], [ %.197, %48 ]
  %.not90 = icmp eq i64 %indvars.iv.next, 0
  br i1 %.not90, label %..loopexit_crit_edge, label %48, !llvm.loop !33

._crit_edge105:                                   ; preds = %..loopexit_crit_edge
  %72 = icmp slt i32 %.2, 0
  br i1 %72, label %.sink.split.sink.split, label %73

73:                                               ; preds = %._crit_edge105
  %74 = icmp eq i32 %2, 0
  %75 = load i64, ptr @saved_mode, align 8
  %76 = icmp eq i64 %75, -1
  %or.cond = select i1 %74, i1 %76, i1 false
  %77 = zext nneg i32 %.2 to i64
  %78 = getelementptr inbounds i8, ptr %23, i64 88
  %79 = load ptr, ptr %78, align 8, !tbaa !27
  %80 = select i1 %or.cond, i64 0, i64 %77
  %81 = getelementptr inbounds i64, ptr %79, i64 %80
  %.077.in = select i1 %74, ptr @saved_mode, ptr %81
  %.077 = load i64, ptr %.077.in, align 8, !tbaa !18
  %82 = load ptr, ptr %0, align 8, !tbaa !5
  %83 = getelementptr inbounds i8, ptr %23, i64 8
  %84 = load i64, ptr %83, align 8, !tbaa !34
  %85 = call ptr @XRRGetCrtcInfo(ptr noundef %82, ptr noundef nonnull %12, i64 noundef %84) #4
  %86 = getelementptr inbounds i8, ptr %85, i64 24
  %87 = load i64, ptr %86, align 8, !tbaa !35
  store i64 %87, ptr @saved_mode, align 8, !tbaa !18
  %88 = load ptr, ptr %0, align 8, !tbaa !5
  %89 = load i64, ptr %83, align 8, !tbaa !34
  %90 = getelementptr inbounds i8, ptr %85, i64 32
  %91 = load i16, ptr %90, align 8, !tbaa !37
  %92 = getelementptr inbounds i8, ptr %12, i64 40
  %93 = load ptr, ptr %92, align 8, !tbaa !17
  %94 = getelementptr inbounds i64, ptr %93, i64 %28
  %95 = call i32 @XRRSetCrtcConfig(ptr noundef %88, ptr noundef nonnull %12, i64 noundef %89, i64 noundef 0, i32 noundef 0, i32 noundef 0, i64 noundef %.077, i16 noundef zeroext %91, ptr noundef %94, i32 noundef 1) #4
  br i1 %74, label %105, label %96

96:                                               ; preds = %73
  %97 = getelementptr inbounds i8, ptr %12, i64 56
  %98 = load ptr, ptr %97, align 8, !tbaa !26
  %99 = getelementptr inbounds %struct._XRRModeInfo, ptr %98, i64 %80
  %100 = getelementptr inbounds i8, ptr %99, i64 8
  %101 = load i32, ptr %100, align 8, !tbaa !31
  %102 = getelementptr inbounds i8, ptr %99, i64 12
  %103 = load i32, ptr %102, align 4, !tbaa !32
  %104 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %101, i32 noundef %103, i32 noundef %95)
  br label %107

105:                                              ; preds = %73
  %106 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1)
  br label %107

107:                                              ; preds = %105, %96
  %108 = load ptr, ptr %0, align 8, !tbaa !5
  %109 = load i64, ptr %1, align 8, !tbaa !12
  %110 = call i32 @XMoveWindow(ptr noundef %108, i64 noundef %109, i32 noundef 0, i32 noundef 0) #4
  %111 = load ptr, ptr %0, align 8, !tbaa !5
  %112 = load i64, ptr %1, align 8, !tbaa !12
  %113 = call i32 @XMapRaised(ptr noundef %111, i64 noundef %112) #4
  %114 = load ptr, ptr %0, align 8, !tbaa !5
  br i1 %74, label %118, label %115

115:                                              ; preds = %107
  %116 = load i64, ptr %1, align 8, !tbaa !12
  %117 = call i32 @XGrabKeyboard(ptr noundef %114, i64 noundef %116, i32 noundef 0, i32 noundef 1, i32 noundef 1, i64 noundef 0) #4
  br label %122

118:                                              ; preds = %107
  %119 = call i32 @XUngrabPointer(ptr noundef %114, i64 noundef 0) #4
  %120 = load ptr, ptr %0, align 8, !tbaa !5
  %121 = call i32 @XUngrabKeyboard(ptr noundef %120, i64 noundef 0) #4
  br label %122

122:                                              ; preds = %118, %115
  %123 = load ptr, ptr %0, align 8, !tbaa !5
  %124 = call i32 @XSync(ptr noundef %123, i32 noundef 0) #4
  %125 = call i32 @sleep(i32 noundef 1) #4
  call void @XRRFreeCrtcInfo(ptr noundef nonnull %85) #4
  br label %.sink.split.sink.split

.sink.split.sink.split:                           ; preds = %._crit_edge105, %.thread, %.lr.ph104, %122
  call void @XRRFreeOutputInfo(ptr noundef nonnull %23) #4
  br label %.sink.split

.sink.split:                                      ; preds = %.sink.split.sink.split, %8
  call void @XRRFreeScreenResources(ptr noundef nonnull %12) #4
  br label %126

126:                                              ; preds = %.sink.split, %3
  call void @llvm.lifetime.end.p0(i64 136, ptr nonnull %4) #4
  ret i32 0
}

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

declare i32 @XGetWindowAttributes(ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #2

declare ptr @XRRGetScreenResources(ptr noundef, i64 noundef) local_unnamed_addr #2

declare ptr @XRRGetOutputInfo(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #2

declare void @XRRFreeOutputInfo(ptr noundef) local_unnamed_addr #2

declare void @XRRFreeScreenResources(ptr noundef) local_unnamed_addr #2

declare ptr @XRRGetCrtcInfo(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #2

declare i32 @XRRSetCrtcConfig(ptr noundef, ptr noundef, i64 noundef, i64 noundef, i32 noundef, i32 noundef, i64 noundef, i16 noundef zeroext, ptr noundef, i32 noundef) local_unnamed_addr #2

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

declare i32 @XMoveWindow(ptr noundef, i64 noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

declare i32 @XMapRaised(ptr noundef, i64 noundef) local_unnamed_addr #2

declare i32 @XGrabKeyboard(ptr noundef, i64 noundef, i32 noundef, i32 noundef, i32 noundef, i64 noundef) local_unnamed_addr #2

declare i32 @XUngrabPointer(ptr noundef, i64 noundef) local_unnamed_addr #2

declare i32 @XUngrabKeyboard(ptr noundef, i64 noundef) local_unnamed_addr #2

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

declare i32 @sleep(i32 noundef) local_unnamed_addr #2

declare void @XRRFreeCrtcInfo(ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { 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 0}
!6 = !{!"s_xvar", !7, i64 0, !10, i64 8, !11, i64 16, !11, i64 20, !7, i64 24, !10, i64 32, !11, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !11, i64 72, !11, i64 76, !11, i64 80, !8, i64 84, !10, i64 112, !10, i64 120, !11, i64 128}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"long", !8, i64 0}
!11 = !{!"int", !8, i64 0}
!12 = !{!13, !10, i64 0}
!13 = !{!"s_win_list", !10, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !8, i64 72}
!14 = !{!6, !10, i64 8}
!15 = !{!16, !11, i64 32}
!16 = !{!"_XRRScreenResources", !10, i64 0, !10, i64 8, !11, i64 16, !7, i64 24, !11, i64 32, !7, i64 40, !11, i64 48, !7, i64 56}
!17 = !{!16, !7, i64 40}
!18 = !{!10, !10, i64 0}
!19 = !{!20, !21, i64 48}
!20 = !{!"_XRROutputInfo", !10, i64 0, !10, i64 8, !7, i64 16, !11, i64 24, !10, i64 32, !10, i64 40, !21, i64 48, !21, i64 50, !11, i64 52, !7, i64 56, !11, i64 64, !7, i64 72, !11, i64 80, !11, i64 84, !7, i64 88}
!21 = !{!"short", !8, i64 0}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{!20, !11, i64 80}
!25 = !{!16, !11, i64 48}
!26 = !{!16, !7, i64 56}
!27 = !{!20, !7, i64 88}
!28 = distinct !{!28, !23}
!29 = !{!30, !10, i64 0}
!30 = !{!"_XRRModeInfo", !10, i64 0, !11, i64 8, !11, i64 12, !10, i64 16, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !11, i64 40, !11, i64 44, !11, i64 48, !7, i64 56, !11, i64 64, !10, i64 72}
!31 = !{!30, !11, i64 8}
!32 = !{!30, !11, i64 12}
!33 = distinct !{!33, !23}
!34 = !{!20, !10, i64 8}
!35 = !{!36, !10, i64 24}
!36 = !{!"_XRRCrtcInfo", !10, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !10, i64 24, !21, i64 32, !11, i64 36, !7, i64 40, !21, i64 48, !11, i64 52, !7, i64 56}
!37 = !{!36, !21, i64 32}


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