; LLVM IR from niessner/Matterport :: code/gaps/pkgs/fglut (freeglut_init)

; 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.tagSFG_State = type { %struct.tagSFG_XYUse, %struct.tagSFG_XYUse, i32, i8, i32, i8, i8, i8, i8, i32, i32, i32, i32, i32, i64, %struct.tagSFG_List, %struct.tagSFG_List, ptr, i32, ptr, ptr, %struct.tagSFG_XYUse, i32, i32, i32, i32, ptr, i8, i8, i32, i32, i32, i32, i32, i32 }
%struct.tagSFG_List = type { ptr, ptr }
%struct.tagSFG_XYUse = type { i32, i32, i8 }
%struct.tagSFG_Display = type { ptr, i32, i64, i32, i64, i64, i64, i32, i32, i32, i32 }

@fgState = external dso_local global %struct.tagSFG_State, align 8
@fgDisplay = external dso_local global %struct.tagSFG_Display, align 8
@.str.1 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [65 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [69 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [6 x i8], align 1

; 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 void @glutInit(ptr noundef %0, ptr noundef %1) #1 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  store ptr null, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  store ptr null, ptr %6, align 8, !tbaa !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
  %15 = load ptr, ptr %3, align 8, !tbaa !5
  %16 = load i32, ptr %15, align 4, !tbaa !9
  store i32 %16, ptr %9, align 4, !tbaa !9
  %17 = load i8, ptr getelementptr inbounds (%struct.tagSFG_State, ptr @fgState, i32 0, i32 3), align 4, !tbaa !11
  %18 = icmp ne i8 %17, 0
  br i1 %18, label %19, label %20

19:                                               ; preds = %2
  call void (ptr, ...) @fgError(ptr noundef @.str.1)
  br label %20

20:                                               ; preds = %19, %2
  %21 = load ptr, ptr %3, align 8, !tbaa !5
  %22 = icmp ne ptr %21, null
  br i1 %22, label %23, label %48

23:                                               ; preds = %20
  %24 = load ptr, ptr %3, align 8, !tbaa !5
  %25 = load i32, ptr %24, align 4, !tbaa !9
  %26 = icmp ne i32 %25, 0
  br i1 %26, label %27, label %48

27:                                               ; preds = %23
  %28 = load ptr, ptr %4, align 8, !tbaa !5
  %29 = icmp ne ptr %28, null
  br i1 %29, label %30, label %48

30:                                               ; preds = %27
  %31 = load ptr, ptr %4, align 8, !tbaa !5
  %32 = load ptr, ptr %31, align 8, !tbaa !5
  %33 = icmp ne ptr %32, null
  br i1 %33, label %34, label %48

34:                                               ; preds = %30
  %35 = load ptr, ptr %4, align 8, !tbaa !5
  %36 = load ptr, ptr %35, align 8, !tbaa !5
  %37 = load i8, ptr %36, align 1, !tbaa !16
  %38 = sext i8 %37 to i32
  %39 = icmp ne i32 %38, 0
  br i1 %39, label %40, label %48

40:                                               ; preds = %34
  %41 = load ptr, ptr %4, align 8, !tbaa !5
  %42 = load ptr, ptr %41, align 8, !tbaa !5
  %43 = call noalias ptr @strdup(ptr noundef %42) #5
  store ptr %43, ptr getelementptr inbounds (%struct.tagSFG_State, ptr @fgState, i32 0, i32 26), align 8, !tbaa !17
  %44 = load ptr, ptr getelementptr inbounds (%struct.tagSFG_State, ptr @fgState, i32 0, i32 26), align 8, !tbaa !17
  %45 = icmp ne ptr %44, null
  br i1 %45, label %47, label %46

46:                                               ; preds = %40
  call void (ptr, ...) @fgError(ptr noundef @.str.2)
  br label %47

47:                                               ; preds = %46, %40
  br label %48

48:                                               ; preds = %47, %34, %30, %27, %23, %20
  call void @fgCreateStructure()
  %49 = call i64 @fgSystemTime()
  store i64 %49, ptr getelementptr inbounds (%struct.tagSFG_State, ptr @fgState, i32 0, i32 14), align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %50 = call ptr @getenv(ptr noundef @.str.3) #5
  store ptr %50, ptr %10, align 8, !tbaa !5
  %51 = load ptr, ptr %10, align 8, !tbaa !5
  %52 = icmp ne ptr %51, null
  br i1 %52, label %53, label %62

53:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %54 = load ptr, ptr %10, align 8, !tbaa !5
  %55 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef %54, ptr noundef @.str.4, ptr noundef %11) #5
  %56 = load i32, ptr %11, align 4, !tbaa !9
  %57 = icmp sle i32 %56, 0
  br i1 %57, label %58, label %59

58:                                               ; preds = %53
  store i32 5000, ptr getelementptr inbounds (%struct.tagSFG_State, ptr @fgState, i32 0, i32 11), align 8, !tbaa !19
  br label %61

59:                                               ; preds = %53
  %60 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %60, ptr getelementptr inbounds (%struct.tagSFG_State, ptr @fgState, i32 0, i32 11), align 8, !tbaa !19
  br label %61

61:                                               ; preds = %59, %58
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %62

62:                                               ; preds = %61, %48
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  %63 = call ptr @getenv(ptr noundef @.str.5) #5
  store ptr %63, ptr %5, align 8, !tbaa !5
  store i32 1, ptr %7, align 4, !tbaa !9
  br label %64

64:                                               ; preds = %227, %62
  %65 = load i32, ptr %7, align 4, !tbaa !9
  %66 = load i32, ptr %9, align 4, !tbaa !9
  %67 = icmp slt i32 %65, %66
  br i1 %67, label %68, label %230

68:                                               ; preds = %64
  %69 = load ptr, ptr %4, align 8, !tbaa !5
  %70 = load i32, ptr %7, align 4, !tbaa !9
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds ptr, ptr %69, i64 %71
  %73 = load ptr, ptr %72, align 8, !tbaa !5
  %74 = call i32 @strcmp(ptr noundef %73, ptr noundef @.str.6) #6
  %75 = icmp eq i32 %74, 0
  br i1 %75, label %76, label %100

76:                                               ; preds = %68
  %77 = load i32, ptr %7, align 4, !tbaa !9
  %78 = add nsw i32 %77, 1
  store i32 %78, ptr %7, align 4, !tbaa !9
  %79 = load i32, ptr %9, align 4, !tbaa !9
  %80 = icmp sge i32 %78, %79
  br i1 %80, label %81, label %82

81:                                               ; preds = %76
  call void (ptr, ...) @fgError(ptr noundef @.str.7)
  br label %82

82:                                               ; preds = %81, %76
  %83 = load ptr, ptr %4, align 8, !tbaa !5
  %84 = load i32, ptr %7, align 4, !tbaa !9
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds ptr, ptr %83, i64 %85
  %87 = load ptr, ptr %86, align 8, !tbaa !5
  store ptr %87, ptr %5, align 8, !tbaa !5
  %88 = load ptr, ptr %4, align 8, !tbaa !5
  %89 = load i32, ptr %7, align 4, !tbaa !9
  %90 = sub nsw i32 %89, 1
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds ptr, ptr %88, i64 %91
  store ptr null, ptr %92, align 8, !tbaa !5
  %93 = load ptr, ptr %4, align 8, !tbaa !5
  %94 = load i32, ptr %7, align 4, !tbaa !9
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds ptr, ptr %93, i64 %95
  store ptr null, ptr %96, align 8, !tbaa !5
  %97 = load ptr, ptr %3, align 8, !tbaa !5
  %98 = load i32, ptr %97, align 4, !tbaa !9
  %99 = sub nsw i32 %98, 2
  store i32 %99, ptr %97, align 4, !tbaa !9
  br label %226

100:                                              ; preds = %68
  %101 = load ptr, ptr %4, align 8, !tbaa !5
  %102 = load i32, ptr %7, align 4, !tbaa !9
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds ptr, ptr %101, i64 %103
  %105 = load ptr, ptr %104, align 8, !tbaa !5
  %106 = call i32 @strcmp(ptr noundef %105, ptr noundef @.str.8) #6
  %107 = icmp eq i32 %106, 0
  br i1 %107, label %108, label %132

108:                                              ; preds = %100
  %109 = load i32, ptr %7, align 4, !tbaa !9
  %110 = add nsw i32 %109, 1
  store i32 %110, ptr %7, align 4, !tbaa !9
  %111 = load i32, ptr %9, align 4, !tbaa !9
  %112 = icmp sge i32 %110, %111
  br i1 %112, label %113, label %114

113:                                              ; preds = %108
  call void (ptr, ...) @fgError(ptr noundef @.str.9)
  br label %114

114:                                              ; preds = %113, %108
  %115 = load ptr, ptr %4, align 8, !tbaa !5
  %116 = load i32, ptr %7, align 4, !tbaa !9
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds ptr, ptr %115, i64 %117
  %119 = load ptr, ptr %118, align 8, !tbaa !5
  store ptr %119, ptr %6, align 8, !tbaa !5
  %120 = load ptr, ptr %4, align 8, !tbaa !5
  %121 = load i32, ptr %7, align 4, !tbaa !9
  %122 = sub nsw i32 %121, 1
  %123 = sext i32 %122 to i64
  %124 = getelementptr inbounds ptr, ptr %120, i64 %123
  store ptr null, ptr %124, align 8, !tbaa !5
  %125 = load ptr, ptr %4, align 8, !tbaa !5
  %126 = load i32, ptr %7, align 4, !tbaa !9
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds ptr, ptr %125, i64 %127
  store ptr null, ptr %128, align 8, !tbaa !5
  %129 = load ptr, ptr %3, align 8, !tbaa !5
  %130 = load i32, ptr %129, align 4, !tbaa !9
  %131 = sub nsw i32 %130, 2
  store i32 %131, ptr %129, align 4, !tbaa !9
  br label %225

132:                                              ; preds = %100
  %133 = load ptr, ptr %4, align 8, !tbaa !5
  %134 = load i32, ptr %7, align 4, !tbaa !9
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds ptr, ptr %133, i64 %135
  %137 = load ptr, ptr %136, align 8, !tbaa !5
  %138 = call i32 @strcmp(ptr noundef %137, ptr noundef @.str.10) #6
  %139 = icmp eq i32 %138, 0
  br i1 %139, label %140, label %152

140:                                              ; preds = %132
  %141 = load i32, ptr getelementptr inbounds (%struct.tagSFG_State, ptr @fgState, i32 0, i32 4), align 8, !tbaa !20
  %142 = icmp eq i32 %141, 0
  br i1 %142, label %143, label %144

143:                                              ; preds = %140
  call void (ptr, ...) @fgError(ptr noundef @.str.11)
  br label %144

144:                                              ; preds = %143, %140
  store i32 3, ptr getelementptr inbounds (%struct.tagSFG_State, ptr @fgState, i32 0, i32 4), align 8, !tbaa !20
  %145 = load ptr, ptr %4, align 8, !tbaa !5
  %146 = load i32, ptr %7, align 4, !tbaa !9
  %147 = sext i32 %146 to i64
  %148 = getelementptr inbounds ptr, ptr %145, i64 %147
  store ptr null, ptr %148, align 8, !tbaa !5
  %149 = load ptr, ptr %3, align 8, !tbaa !5
  %150 = load i32, ptr %149, align 4, !tbaa !9
  %151 = add nsw i32 %150, -1
  store i32 %151, ptr %149, align 4, !tbaa !9
  br label %224

152:                                              ; preds = %132
  %153 = load ptr, ptr %4, align 8, !tbaa !5
  %154 = load i32, ptr %7, align 4, !tbaa !9
  %155 = sext i32 %154 to i64
  %156 = getelementptr inbounds ptr, ptr %153, i64 %155
  %157 = load ptr, ptr %156, align 8, !tbaa !5
  %158 = call i32 @strcmp(ptr noundef %157, ptr noundef @.str.12) #6
  %159 = icmp eq i32 %158, 0
  br i1 %159, label %160, label %172

160:                                              ; preds = %152
  %161 = load i32, ptr getelementptr inbounds (%struct.tagSFG_State, ptr @fgState, i32 0, i32 4), align 8, !tbaa !20
  %162 = icmp eq i32 %161, 3
  br i1 %162, label %163, label %164

163:                                              ; preds = %160
  call void (ptr, ...) @fgError(ptr noundef @.str.11)
  br label %164

164:                                              ; preds = %163, %160
  store i32 0, ptr getelementptr inbounds (%struct.tagSFG_State, ptr @fgState, i32 0, i32 4), align 8, !tbaa !20
  %165 = load ptr, ptr %4, align 8, !tbaa !5
  %166 = load i32, ptr %7, align 4, !tbaa !9
  %167 = sext i32 %166 to i64
  %168 = getelementptr inbounds ptr, ptr %165, i64 %167
  store ptr null, ptr %168, align 8, !tbaa !5
  %169 = load ptr, ptr %3, align 8, !tbaa !5
  %170 = load i32, ptr %169, align 4, !tbaa !9
  %171 = add nsw i32 %170, -1
  store i32 %171, ptr %169, align 4, !tbaa !9
  br label %223

172:                                              ; preds = %152
  %173 = load ptr, ptr %4, align 8, !tbaa !5
  %174 = load i32, ptr %7, align 4, !tbaa !9
  %175 = sext i32 %174 to i64
  %176 = getelementptr inbounds ptr, ptr %173, i64 %175
  %177 = load ptr, ptr %176, align 8, !tbaa !5
  %178 = call i32 @strcmp(ptr noundef %177, ptr noundef @.str.13) #6
  %179 = icmp eq i32 %178, 0
  br i1 %179, label %180, label %188

180:                                              ; preds = %172
  store i8 1, ptr getelementptr inbounds (%struct.tagSFG_State, ptr @fgState, i32 0, i32 5), align 4, !tbaa !21
  %181 = load ptr, ptr %4, align 8, !tbaa !5
  %182 = load i32, ptr %7, align 4, !tbaa !9
  %183 = sext i32 %182 to i64
  %184 = getelementptr inbounds ptr, ptr %181, i64 %183
  store ptr null, ptr %184, align 8, !tbaa !5
  %185 = load ptr, ptr %3, align 8, !tbaa !5
  %186 = load i32, ptr %185, align 4, !tbaa !9
  %187 = add nsw i32 %186, -1
  store i32 %187, ptr %185, align 4, !tbaa !9
  br label %222

188:                                              ; preds = %172
  %189 = load ptr, ptr %4, align 8, !tbaa !5
  %190 = load i32, ptr %7, align 4, !tbaa !9
  %191 = sext i32 %190 to i64
  %192 = getelementptr inbounds ptr, ptr %189, i64 %191
  %193 = load ptr, ptr %192, align 8, !tbaa !5
  %194 = call i32 @strcmp(ptr noundef %193, ptr noundef @.str.14) #6
  %195 = icmp eq i32 %194, 0
  br i1 %195, label %196, label %204

196:                                              ; preds = %188
  store i8 1, ptr getelementptr inbounds (%struct.tagSFG_State, ptr @fgState, i32 0, i32 7), align 2, !tbaa !22
  %197 = load ptr, ptr %4, align 8, !tbaa !5
  %198 = load i32, ptr %7, align 4, !tbaa !9
  %199 = sext i32 %198 to i64
  %200 = getelementptr inbounds ptr, ptr %197, i64 %199
  store ptr null, ptr %200, align 8, !tbaa !5
  %201 = load ptr, ptr %3, align 8, !tbaa !5
  %202 = load i32, ptr %201, align 4, !tbaa !9
  %203 = add nsw i32 %202, -1
  store i32 %203, ptr %201, align 4, !tbaa !9
  br label %221

204:                                              ; preds = %188
  %205 = load ptr, ptr %4, align 8, !tbaa !5
  %206 = load i32, ptr %7, align 4, !tbaa !9
  %207 = sext i32 %206 to i64
  %208 = getelementptr inbounds ptr, ptr %205, i64 %207
  %209 = load ptr, ptr %208, align 8, !tbaa !5
  %210 = call i32 @strcmp(ptr noundef %209, ptr noundef @.str.15) #6
  %211 = icmp eq i32 %210, 0
  br i1 %211, label %212, label %220

212:                                              ; preds = %204
  store i8 1, ptr getelementptr inbounds (%struct.tagSFG_State, ptr @fgState, i32 0, i32 8), align 1, !tbaa !23
  %213 = load ptr, ptr %4, align 8, !tbaa !5
  %214 = load i32, ptr %7, align 4, !tbaa !9
  %215 = sext i32 %214 to i64
  %216 = getelementptr inbounds ptr, ptr %213, i64 %215
  store ptr null, ptr %216, align 8, !tbaa !5
  %217 = load ptr, ptr %3, align 8, !tbaa !5
  %218 = load i32, ptr %217, align 4, !tbaa !9
  %219 = add nsw i32 %218, -1
  store i32 %219, ptr %217, align 4, !tbaa !9
  br label %220

220:                                              ; preds = %212, %204
  br label %221

221:                                              ; preds = %220, %196
  br label %222

222:                                              ; preds = %221, %180
  br label %223

223:                                              ; preds = %222, %164
  br label %224

224:                                              ; preds = %223, %144
  br label %225

225:                                              ; preds = %224, %114
  br label %226

226:                                              ; preds = %225, %82
  br label %227

227:                                              ; preds = %226
  %228 = load i32, ptr %7, align 4, !tbaa !9
  %229 = add nsw i32 %228, 1
  store i32 %229, ptr %7, align 4, !tbaa !9
  br label %64, !llvm.loop !24

230:                                              ; preds = %64
  store i32 1, ptr %8, align 4, !tbaa !9
  store i32 1, ptr %7, align 4, !tbaa !9
  br label %231

231:                                              ; preds = %262, %230
  %232 = load i32, ptr %7, align 4, !tbaa !9
  %233 = load ptr, ptr %3, align 8, !tbaa !5
  %234 = load i32, ptr %233, align 4, !tbaa !9
  %235 = icmp slt i32 %232, %234
  br i1 %235, label %236, label %267

236:                                              ; preds = %231
  br label %237

237:                                              ; preds = %244, %236
  %238 = load ptr, ptr %4, align 8, !tbaa !5
  %239 = load i32, ptr %8, align 4, !tbaa !9
  %240 = sext i32 %239 to i64
  %241 = getelementptr inbounds ptr, ptr %238, i64 %240
  %242 = load ptr, ptr %241, align 8, !tbaa !5
  %243 = icmp eq ptr %242, null
  br i1 %243, label %244, label %247

244:                                              ; preds = %237
  %245 = load i32, ptr %8, align 4, !tbaa !9
  %246 = add nsw i32 %245, 1
  store i32 %246, ptr %8, align 4, !tbaa !9
  br label %237, !llvm.loop !26

247:                                              ; preds = %237
  %248 = load i32, ptr %7, align 4, !tbaa !9
  %249 = load i32, ptr %8, align 4, !tbaa !9
  %250 = icmp ne i32 %248, %249
  br i1 %250, label %251, label %261

251:                                              ; preds = %247
  %252 = load ptr, ptr %4, align 8, !tbaa !5
  %253 = load i32, ptr %8, align 4, !tbaa !9
  %254 = sext i32 %253 to i64
  %255 = getelementptr inbounds ptr, ptr %252, i64 %254
  %256 = load ptr, ptr %255, align 8, !tbaa !5
  %257 = load ptr, ptr %4, align 8, !tbaa !5
  %258 = load i32, ptr %7, align 4, !tbaa !9
  %259 = sext i32 %258 to i64
  %260 = getelementptr inbounds ptr, ptr %257, i64 %259
  store ptr %256, ptr %260, align 8, !tbaa !5
  br label %261

261:                                              ; preds = %251, %247
  br label %262

262:                                              ; preds = %261
  %263 = load i32, ptr %7, align 4, !tbaa !9
  %264 = add nsw i32 %263, 1
  store i32 %264, ptr %7, align 4, !tbaa !9
  %265 = load i32, ptr %8, align 4, !tbaa !9
  %266 = add nsw i32 %265, 1
  store i32 %266, ptr %8, align 4, !tbaa !9
  br label %231, !llvm.loop !27

267:                                              ; preds = %231
  %268 = load ptr, ptr %5, align 8, !tbaa !5
  call void @fghInitialize(ptr noundef %268)
  %269 = load ptr, ptr %6, align 8, !tbaa !5
  %270 = icmp ne ptr %269, null
  br i1 %270, label %271, label %306

271:                                              ; preds = %267
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store i32 0, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 0, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  %272 = load ptr, ptr %6, align 8, !tbaa !5
  %273 = call i32 @XParseGeometry(ptr noundef %272, ptr noundef @fgState, ptr noundef getelementptr inbounds (%struct.tagSFG_XYUse, ptr @fgState, i32 0, i32 1), ptr noundef %12, ptr noundef %13)
  store i32 %273, ptr %14, align 4, !tbaa !9
  %274 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %274, ptr getelementptr inbounds (%struct.tagSFG_State, ptr @fgState, i32 0, i32 1), align 4, !tbaa !28
  %275 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %275, ptr getelementptr inbounds (%struct.tagSFG_XYUse, ptr getelementptr inbounds (%struct.tagSFG_State, ptr @fgState, i32 0, i32 1), i32 0, i32 1), align 4, !tbaa !29
  %276 = load i32, ptr %14, align 4, !tbaa !9
  %277 = and i32 %276, 12
  %278 = icmp eq i32 %277, 12
  br i1 %278, label %279, label %280

279:                                              ; preds = %271
  store i8 1, ptr getelementptr inbounds (%struct.tagSFG_XYUse, ptr getelementptr inbounds (%struct.tagSFG_State, ptr @fgState, i32 0, i32 1), i32 0, i32 2), align 4, !tbaa !30
  br label %280

280:                                              ; preds = %279, %271
  %281 = load i32, ptr %14, align 4, !tbaa !9
  %282 = and i32 %281, 16
  %283 = icmp ne i32 %282, 0
  br i1 %283, label %284, label %290

284:                                              ; preds = %280
  %285 = load i32, ptr getelementptr inbounds (%struct.tagSFG_Display, ptr @fgDisplay, i32 0, i32 7), align 8, !tbaa !31
  %286 = load i32, ptr getelementptr inbounds (%struct.tagSFG_State, ptr @fgState, i32 0, i32 1), align 4, !tbaa !28
  %287 = sub nsw i32 %285, %286
  %288 = load i32, ptr @fgState, align 8, !tbaa !33
  %289 = add nsw i32 %288, %287
  store i32 %289, ptr @fgState, align 8, !tbaa !33
  br label %290

290:                                              ; preds = %284, %280
  %291 = load i32, ptr %14, align 4, !tbaa !9
  %292 = and i32 %291, 32
  %293 = icmp ne i32 %292, 0
  br i1 %293, label %294, label %300

294:                                              ; preds = %290
  %295 = load i32, ptr getelementptr inbounds (%struct.tagSFG_Display, ptr @fgDisplay, i32 0, i32 8), align 4, !tbaa !34
  %296 = load i32, ptr getelementptr inbounds (%struct.tagSFG_XYUse, ptr getelementptr inbounds (%struct.tagSFG_State, ptr @fgState, i32 0, i32 1), i32 0, i32 1), align 4, !tbaa !29
  %297 = sub nsw i32 %295, %296
  %298 = load i32, ptr getelementptr inbounds (%struct.tagSFG_XYUse, ptr @fgState, i32 0, i32 1), align 4, !tbaa !35
  %299 = add nsw i32 %298, %297
  store i32 %299, ptr getelementptr inbounds (%struct.tagSFG_XYUse, ptr @fgState, i32 0, i32 1), align 4, !tbaa !35
  br label %300

300:                                              ; preds = %294, %290
  %301 = load i32, ptr %14, align 4, !tbaa !9
  %302 = and i32 %301, 3
  %303 = icmp eq i32 %302, 3
  br i1 %303, label %304, label %305

304:                                              ; preds = %300
  store i8 1, ptr getelementptr inbounds (%struct.tagSFG_XYUse, ptr @fgState, i32 0, i32 2), align 8, !tbaa !36
  br label %305

305:                                              ; preds = %304, %300
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %306

306:                                              ; preds = %305, %267
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  ret void
}

declare void @fgError(ptr noundef, ...) #2

; Function Attrs: nounwind
declare noalias ptr @strdup(ptr noundef) #3

declare void @fgCreateStructure() #2

declare i64 @fgSystemTime() #2

; Function Attrs: nounwind
declare ptr @getenv(ptr noundef) #3

; Function Attrs: nounwind
declare i32 @__isoc99_sscanf(ptr noundef, ptr noundef, ...) #3

; Function Attrs: nounwind willreturn memory(read)
declare i32 @strcmp(ptr noundef, ptr noundef) #4

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

declare i32 @XParseGeometry(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #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 = { 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 willreturn memory(read) "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 = { nounwind willreturn memory(read) }

!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, !7, i64 28}
!12 = !{!"tagSFG_State", !13, i64 0, !13, i64 12, !10, i64 24, !7, i64 28, !10, i64 32, !7, i64 36, !7, i64 37, !7, i64 38, !7, i64 39, !10, i64 40, !10, i64 44, !10, i64 48, !10, i64 52, !10, i64 56, !14, i64 64, !15, i64 72, !15, i64 88, !6, i64 104, !10, i64 112, !6, i64 120, !6, i64 128, !13, i64 136, !10, i64 148, !10, i64 152, !10, i64 156, !10, i64 160, !6, i64 168, !7, i64 176, !7, i64 177, !10, i64 180, !10, i64 184, !10, i64 188, !10, i64 192, !10, i64 196, !10, i64 200}
!13 = !{!"tagSFG_XYUse", !10, i64 0, !10, i64 4, !7, i64 8}
!14 = !{!"long", !7, i64 0}
!15 = !{!"tagSFG_List", !6, i64 0, !6, i64 8}
!16 = !{!7, !7, i64 0}
!17 = !{!12, !6, i64 168}
!18 = !{!12, !14, i64 64}
!19 = !{!12, !10, i64 48}
!20 = !{!12, !10, i64 32}
!21 = !{!12, !7, i64 36}
!22 = !{!12, !7, i64 38}
!23 = !{!12, !7, i64 39}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = distinct !{!26, !25}
!27 = distinct !{!27, !25}
!28 = !{!12, !10, i64 12}
!29 = !{!12, !10, i64 16}
!30 = !{!12, !7, i64 20}
!31 = !{!32, !10, i64 56}
!32 = !{!"tagSFG_Display", !6, i64 0, !10, i64 8, !14, i64 16, !10, i64 24, !14, i64 32, !14, i64 40, !14, i64 48, !10, i64 56, !10, i64 60, !10, i64 64, !10, i64 68}
!33 = !{!12, !10, i64 0}
!34 = !{!32, !10, i64 60}
!35 = !{!12, !10, i64 4}
!36 = !{!12, !7, i64 8}


; 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.tagSFG_State = type { %struct.tagSFG_XYUse, %struct.tagSFG_XYUse, i32, i8, i32, i8, i8, i8, i8, i32, i32, i32, i32, i32, i64, %struct.tagSFG_List, %struct.tagSFG_List, ptr, i32, ptr, ptr, %struct.tagSFG_XYUse, i32, i32, i32, i32, ptr, i8, i8, i32, i32, i32, i32, i32, i32 }
%struct.tagSFG_List = type { ptr, ptr }
%struct.tagSFG_XYUse = type { i32, i32, i8 }
%struct.tagSFG_Display = type { ptr, i32, i64, i32, i64, i64, i64, i32, i32, i32, i32 }

@fgState = external dso_local global %struct.tagSFG_State, align 8
@fgDisplay = external dso_local local_unnamed_addr global %struct.tagSFG_Display, align 8
@.str.1 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [65 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [69 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [6 x i8], align 1

; 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: nounwind uwtable
define dso_local void @glutInit(ptr nocapture noundef %0, ptr noundef %1) local_unnamed_addr #1 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = load i32, ptr %0, align 4, !tbaa !5
  %7 = load i8, ptr getelementptr inbounds (i8, ptr @fgState, i64 28), align 4, !tbaa !9
  %.not = icmp eq i8 %7, 0
  br i1 %.not, label %9, label %8

8:                                                ; preds = %2
  tail call void (ptr, ...) @fgError(ptr noundef nonnull @.str.1) #7
  %.pre = load i32, ptr %0, align 4, !tbaa !5
  br label %9

9:                                                ; preds = %2, %8
  %10 = phi i32 [ %6, %2 ], [ %.pre, %8 ]
  %11 = icmp ne i32 %10, 0
  %12 = icmp ne ptr %1, null
  %or.cond = and i1 %12, %11
  br i1 %or.cond, label %13, label %20

13:                                               ; preds = %9
  %14 = load ptr, ptr %1, align 8, !tbaa !15
  %.not91 = icmp eq ptr %14, null
  br i1 %.not91, label %20, label %15

15:                                               ; preds = %13
  %16 = load i8, ptr %14, align 1, !tbaa !16
  %.not92 = icmp eq i8 %16, 0
  br i1 %.not92, label %20, label %17

17:                                               ; preds = %15
  %18 = tail call noalias ptr @strdup(ptr noundef nonnull %14) #7
  store ptr %18, ptr getelementptr inbounds (i8, ptr @fgState, i64 168), align 8, !tbaa !17
  %.not93 = icmp eq ptr %18, null
  br i1 %.not93, label %19, label %20

19:                                               ; preds = %17
  tail call void (ptr, ...) @fgError(ptr noundef nonnull @.str.2) #7
  br label %20

20:                                               ; preds = %17, %19, %15, %13, %9
  tail call void @fgCreateStructure() #7
  %21 = tail call i64 @fgSystemTime() #7
  store i64 %21, ptr getelementptr inbounds (i8, ptr @fgState, i64 64), align 8, !tbaa !18
  %22 = tail call ptr @getenv(ptr noundef nonnull @.str.3) #7
  %.not94 = icmp eq ptr %22, null
  br i1 %.not94, label %27, label %23

23:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  %24 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef nonnull %22, ptr noundef nonnull @.str.4, ptr noundef nonnull %3) #7
  %25 = load i32, ptr %3, align 4, !tbaa !5
  %26 = icmp slt i32 %25, 1
  %. = select i1 %26, i32 5000, i32 %25
  store i32 %., ptr getelementptr inbounds (i8, ptr @fgState, i64 48), align 8, !tbaa !19
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  br label %27

27:                                               ; preds = %23, %20
  %28 = call ptr @getenv(ptr noundef nonnull @.str.5) #7
  %29 = icmp sgt i32 %6, 1
  br i1 %29, label %.lr.ph, label %.preheader102

.preheader102:                                    ; preds = %84, %27
  %.079.lcssa = phi ptr [ null, %27 ], [ %.180, %84 ]
  %.0.lcssa = phi ptr [ %28, %27 ], [ %.1, %84 ]
  %30 = load i32, ptr %0, align 4, !tbaa !5
  %31 = icmp sgt i32 %30, 1
  br i1 %31, label %.preheader.preheader, label %._crit_edge

.preheader.preheader:                             ; preds = %.preheader102
  %wide.trip.count = zext nneg i32 %30 to i64
  br label %.preheader

.lr.ph:                                           ; preds = %27, %84
  %.0105 = phi ptr [ %.1, %84 ], [ %28, %27 ]
  %.079104 = phi ptr [ %.180, %84 ], [ null, %27 ]
  %.081103 = phi i32 [ %85, %84 ], [ 1, %27 ]
  %32 = sext i32 %.081103 to i64
  %33 = getelementptr inbounds ptr, ptr %1, i64 %32
  %34 = load ptr, ptr %33, align 8, !tbaa !15
  %35 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %34, ptr noundef nonnull dereferenceable(1) @.str.6) #8
  %36 = icmp eq i32 %35, 0
  br i1 %36, label %37, label %44

37:                                               ; preds = %.lr.ph
  %38 = add nsw i32 %.081103, 1
  %.not100 = icmp slt i32 %38, %6
  br i1 %.not100, label %40, label %39

39:                                               ; preds = %37
  call void (ptr, ...) @fgError(ptr noundef nonnull @.str.7) #7
  br label %40

40:                                               ; preds = %39, %37
  %41 = sext i32 %38 to i64
  %42 = getelementptr inbounds ptr, ptr %1, i64 %41
  %43 = load ptr, ptr %42, align 8, !tbaa !15
  store ptr null, ptr %33, align 8, !tbaa !15
  br label %.sink.split

44:                                               ; preds = %.lr.ph
  %45 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %34, ptr noundef nonnull dereferenceable(1) @.str.8) #8
  %46 = icmp eq i32 %45, 0
  br i1 %46, label %47, label %54

47:                                               ; preds = %44
  %48 = add nsw i32 %.081103, 1
  %.not99 = icmp slt i32 %48, %6
  br i1 %.not99, label %50, label %49

49:                                               ; preds = %47
  call void (ptr, ...) @fgError(ptr noundef nonnull @.str.9) #7
  br label %50

50:                                               ; preds = %49, %47
  %51 = sext i32 %48 to i64
  %52 = getelementptr inbounds ptr, ptr %1, i64 %51
  %53 = load ptr, ptr %52, align 8, !tbaa !15
  store ptr null, ptr %33, align 8, !tbaa !15
  br label %.sink.split

54:                                               ; preds = %44
  %55 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %34, ptr noundef nonnull dereferenceable(1) @.str.10) #8
  %56 = icmp eq i32 %55, 0
  br i1 %56, label %57, label %62

57:                                               ; preds = %54
  %58 = load i32, ptr getelementptr inbounds (i8, ptr @fgState, i64 32), align 8, !tbaa !20
  %59 = icmp eq i32 %58, 0
  br i1 %59, label %60, label %61

60:                                               ; preds = %57
  call void (ptr, ...) @fgError(ptr noundef nonnull @.str.11) #7
  br label %61

61:                                               ; preds = %60, %57
  store i32 3, ptr getelementptr inbounds (i8, ptr @fgState, i64 32), align 8, !tbaa !20
  br label %.sink.split

62:                                               ; preds = %54
  %63 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %34, ptr noundef nonnull dereferenceable(1) @.str.12) #8
  %64 = icmp eq i32 %63, 0
  br i1 %64, label %65, label %70

65:                                               ; preds = %62
  %66 = load i32, ptr getelementptr inbounds (i8, ptr @fgState, i64 32), align 8, !tbaa !20
  %67 = icmp eq i32 %66, 3
  br i1 %67, label %68, label %69

68:                                               ; preds = %65
  call void (ptr, ...) @fgError(ptr noundef nonnull @.str.11) #7
  br label %69

69:                                               ; preds = %68, %65
  store i32 0, ptr getelementptr inbounds (i8, ptr @fgState, i64 32), align 8, !tbaa !20
  br label %.sink.split

70:                                               ; preds = %62
  %71 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %34, ptr noundef nonnull dereferenceable(1) @.str.13) #8
  %72 = icmp eq i32 %71, 0
  br i1 %72, label %73, label %74

73:                                               ; preds = %70
  store i8 1, ptr getelementptr inbounds (i8, ptr @fgState, i64 36), align 4, !tbaa !21
  br label %.sink.split

74:                                               ; preds = %70
  %75 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %34, ptr noundef nonnull dereferenceable(1) @.str.14) #8
  %76 = icmp eq i32 %75, 0
  br i1 %76, label %77, label %78

77:                                               ; preds = %74
  store i8 1, ptr getelementptr inbounds (i8, ptr @fgState, i64 38), align 2, !tbaa !22
  br label %.sink.split

78:                                               ; preds = %74
  %79 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %34, ptr noundef nonnull dereferenceable(1) @.str.15) #8
  %80 = icmp eq i32 %79, 0
  br i1 %80, label %81, label %84

81:                                               ; preds = %78
  store i8 1, ptr getelementptr inbounds (i8, ptr @fgState, i64 39), align 1, !tbaa !23
  br label %.sink.split

.sink.split:                                      ; preds = %50, %69, %77, %81, %73, %61, %40
  %.sink = phi ptr [ %42, %40 ], [ %33, %61 ], [ %33, %73 ], [ %33, %81 ], [ %33, %77 ], [ %33, %69 ], [ %52, %50 ]
  %.sink114 = phi i32 [ -2, %40 ], [ -1, %61 ], [ -1, %73 ], [ -1, %81 ], [ -1, %77 ], [ -1, %69 ], [ -2, %50 ]
  %.182.ph = phi i32 [ %38, %40 ], [ %.081103, %61 ], [ %.081103, %73 ], [ %.081103, %81 ], [ %.081103, %77 ], [ %.081103, %69 ], [ %48, %50 ]
  %.180.ph = phi ptr [ %.079104, %40 ], [ %.079104, %61 ], [ %.079104, %73 ], [ %.079104, %81 ], [ %.079104, %77 ], [ %.079104, %69 ], [ %53, %50 ]
  %.1.ph = phi ptr [ %43, %40 ], [ %.0105, %61 ], [ %.0105, %73 ], [ %.0105, %81 ], [ %.0105, %77 ], [ %.0105, %69 ], [ %.0105, %50 ]
  store ptr null, ptr %.sink, align 8, !tbaa !15
  %82 = load i32, ptr %0, align 4, !tbaa !5
  %83 = add nsw i32 %82, %.sink114
  store i32 %83, ptr %0, align 4, !tbaa !5
  br label %84

84:                                               ; preds = %.sink.split, %78
  %.182 = phi i32 [ %.081103, %78 ], [ %.182.ph, %.sink.split ]
  %.180 = phi ptr [ %.079104, %78 ], [ %.180.ph, %.sink.split ]
  %.1 = phi ptr [ %.0105, %78 ], [ %.1.ph, %.sink.split ]
  %85 = add nsw i32 %.182, 1
  %86 = icmp slt i32 %85, %6
  br i1 %86, label %.lr.ph, label %.preheader102, !llvm.loop !24

.preheader:                                       ; preds = %.preheader.preheader, %96
  %indvars.iv110 = phi i64 [ 1, %.preheader.preheader ], [ %indvars.iv.next111, %96 ]
  %.083107 = phi i64 [ 1, %.preheader.preheader ], [ %97, %96 ]
  %sext = shl i64 %.083107, 32
  %87 = ashr exact i64 %sext, 32
  br label %88

88:                                               ; preds = %88, %.preheader
  %indvars.iv = phi i64 [ %indvars.iv.next, %88 ], [ %87, %.preheader ]
  %89 = getelementptr inbounds ptr, ptr %1, i64 %indvars.iv
  %90 = load ptr, ptr %89, align 8, !tbaa !15
  %91 = icmp eq ptr %90, null
  %indvars.iv.next = add nsw i64 %indvars.iv, 1
  br i1 %91, label %88, label %92, !llvm.loop !26

92:                                               ; preds = %88
  %93 = and i64 %indvars.iv, 4294967295
  %.not98 = icmp eq i64 %indvars.iv110, %93
  br i1 %.not98, label %96, label %94

94:                                               ; preds = %92
  %95 = getelementptr inbounds ptr, ptr %1, i64 %indvars.iv110
  store ptr %90, ptr %95, align 8, !tbaa !15
  br label %96

96:                                               ; preds = %92, %94
  %indvars.iv.next111 = add nuw nsw i64 %indvars.iv110, 1
  %97 = add i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next111, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.preheader, !llvm.loop !27

._crit_edge:                                      ; preds = %96, %.preheader102
  call void @fghInitialize(ptr noundef %.0.lcssa)
  %.not95 = icmp eq ptr %.079.lcssa, null
  br i1 %.not95, label %124, label %98

98:                                               ; preds = %._crit_edge
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  store i32 0, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #7
  store i32 0, ptr %5, align 4, !tbaa !5
  %99 = call i32 @XParseGeometry(ptr noundef nonnull %.079.lcssa, ptr noundef nonnull @fgState, ptr noundef nonnull getelementptr inbounds (i8, ptr @fgState, i64 4), ptr noundef nonnull %4, ptr noundef nonnull %5) #7
  %100 = load i32, ptr %4, align 4, !tbaa !5
  store i32 %100, ptr getelementptr inbounds (i8, ptr @fgState, i64 12), align 4, !tbaa !28
  %101 = load i32, ptr %5, align 4, !tbaa !5
  store i32 %101, ptr getelementptr inbounds (i8, ptr @fgState, i64 16), align 8, !tbaa !29
  %102 = and i32 %99, 12
  %103 = icmp eq i32 %102, 12
  br i1 %103, label %104, label %105

104:                                              ; preds = %98
  store i8 1, ptr getelementptr inbounds (i8, ptr @fgState, i64 20), align 4, !tbaa !30
  br label %105

105:                                              ; preds = %104, %98
  %106 = and i32 %99, 16
  %.not96 = icmp eq i32 %106, 0
  br i1 %.not96, label %112, label %107

107:                                              ; preds = %105
  %108 = load i32, ptr getelementptr inbounds (i8, ptr @fgDisplay, i64 56), align 8, !tbaa !31
  %109 = sub i32 %108, %100
  %110 = load i32, ptr @fgState, align 8, !tbaa !33
  %111 = add nsw i32 %109, %110
  store i32 %111, ptr @fgState, align 8, !tbaa !33
  br label %112

112:                                              ; preds = %107, %105
  %113 = and i32 %99, 32
  %.not97 = icmp eq i32 %113, 0
  br i1 %.not97, label %119, label %114

114:                                              ; preds = %112
  %115 = load i32, ptr getelementptr inbounds (i8, ptr @fgDisplay, i64 60), align 4, !tbaa !34
  %116 = sub i32 %115, %101
  %117 = load i32, ptr getelementptr inbounds (i8, ptr @fgState, i64 4), align 4, !tbaa !35
  %118 = add nsw i32 %116, %117
  store i32 %118, ptr getelementptr inbounds (i8, ptr @fgState, i64 4), align 4, !tbaa !35
  br label %119

119:                                              ; preds = %114, %112
  %120 = and i32 %99, 3
  %121 = icmp eq i32 %120, 3
  br i1 %121, label %122, label %123

122:                                              ; preds = %119
  store i8 1, ptr getelementptr inbounds (i8, ptr @fgState, i64 8), align 8, !tbaa !36
  br label %123

123:                                              ; preds = %122, %119
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  br label %124

124:                                              ; preds = %123, %._crit_edge
  ret void
}

declare void @fgError(ptr noundef, ...) local_unnamed_addr #2

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: readwrite, inaccessiblemem: readwrite)
declare noalias ptr @strdup(ptr nocapture noundef readonly) local_unnamed_addr #3

declare void @fgCreateStructure() local_unnamed_addr #2

declare i64 @fgSystemTime() local_unnamed_addr #2

; Function Attrs: nofree nounwind memory(read)
declare noundef ptr @getenv(ptr nocapture noundef) local_unnamed_addr #4

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #6

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

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

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

!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, !7, i64 28}
!10 = !{!"tagSFG_State", !11, i64 0, !11, i64 12, !6, i64 24, !7, i64 28, !6, i64 32, !7, i64 36, !7, i64 37, !7, i64 38, !7, i64 39, !6, i64 40, !6, i64 44, !6, i64 48, !6, i64 52, !6, i64 56, !12, i64 64, !13, i64 72, !13, i64 88, !14, i64 104, !6, i64 112, !14, i64 120, !14, i64 128, !11, i64 136, !6, i64 148, !6, i64 152, !6, i64 156, !6, i64 160, !14, i64 168, !7, i64 176, !7, i64 177, !6, i64 180, !6, i64 184, !6, i64 188, !6, i64 192, !6, i64 196, !6, i64 200}
!11 = !{!"tagSFG_XYUse", !6, i64 0, !6, i64 4, !7, i64 8}
!12 = !{!"long", !7, i64 0}
!13 = !{!"tagSFG_List", !14, i64 0, !14, i64 8}
!14 = !{!"any pointer", !7, i64 0}
!15 = !{!14, !14, i64 0}
!16 = !{!7, !7, i64 0}
!17 = !{!10, !14, i64 168}
!18 = !{!10, !12, i64 64}
!19 = !{!10, !6, i64 48}
!20 = !{!10, !6, i64 32}
!21 = !{!10, !7, i64 36}
!22 = !{!10, !7, i64 38}
!23 = !{!10, !7, i64 39}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = distinct !{!26, !25}
!27 = distinct !{!27, !25}
!28 = !{!10, !6, i64 12}
!29 = !{!10, !6, i64 16}
!30 = !{!10, !7, i64 20}
!31 = !{!32, !6, i64 56}
!32 = !{!"tagSFG_Display", !14, i64 0, !6, i64 8, !12, i64 16, !6, i64 24, !12, i64 32, !12, i64 40, !12, i64 48, !6, i64 56, !6, i64 60, !6, i64 64, !6, i64 68}
!33 = !{!10, !6, i64 0}
!34 = !{!32, !6, i64 60}
!35 = !{!10, !6, i64 4}
!36 = !{!10, !7, i64 8}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass