; LLVM IR from bkaradzic/bgfx :: 3rdparty/fcpp (cpp4)

; 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.Global = type { i32, i32, ptr, ptr, i32, i32, i32, ptr, i32, i32, i32, i32, [513 x i8], ptr, i8, i8, i8, i8, i8, [32 x i8], ptr, [20 x ptr], ptr, [20 x ptr], [20 x i8], i32, [5 x ptr], [5 x ptr], i8, ptr, [1025 x i8], ptr, [31 x ptr], i32, ptr, [64 x ptr], i32, ptr, ptr, ptr, ptr, ptr, ptr, i8, i8, i8, i8, i8, i8, i8, i8, ptr, i64, i8, i8, i8, i8, i8, i8, ptr, [20 x ptr], i32, i8, i8, i8, ptr }
%struct.defbuf = type { ptr, ptr, i32, i32, [1 x i8] }
%struct.fileinfo = type { ptr, i32, ptr, ptr, ptr, ptr, i32, [1 x i8] }

@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [19 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

declare i32 @fpp_skipws(ptr noundef) #1

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

declare i32 @fpp_get(ptr noundef) #1

declare void @fpp_unget(ptr noundef) #1

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

; Function Attrs: nounwind uwtable
define dso_local i32 @fpp_expand(ptr noundef %0, ptr noundef %1) #2 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  store i32 0, ptr %8, align 4, !tbaa !9
  %10 = load ptr, ptr %4, align 8, !tbaa !5
  %11 = getelementptr inbounds %struct.Global, ptr %10, i32 0, i32 8
  %12 = load i32, ptr %11, align 8, !tbaa !11
  %13 = add nsw i32 %12, 1
  store i32 %13, ptr %11, align 8, !tbaa !11
  %14 = icmp eq i32 %12, 0
  br i1 %14, label %15, label %19

15:                                               ; preds = %2
  %16 = load ptr, ptr %5, align 8, !tbaa !5
  %17 = load ptr, ptr %4, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.Global, ptr %17, i32 0, i32 34
  store ptr %16, ptr %18, align 8, !tbaa !14
  br label %62

19:                                               ; preds = %2
  %20 = load ptr, ptr %4, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct.Global, ptr %20, i32 0, i32 8
  %22 = load i32, ptr %21, align 8, !tbaa !11
  %23 = icmp eq i32 %22, 1000
  br i1 %23, label %24, label %61

24:                                               ; preds = %19
  %25 = load ptr, ptr %4, align 8, !tbaa !5
  %26 = load ptr, ptr %5, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.defbuf, ptr %26, i32 0, i32 4
  %28 = getelementptr inbounds [1 x i8], ptr %27, i64 0, i64 0
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.Global, ptr %29, i32 0, i32 34
  %31 = load ptr, ptr %30, align 8, !tbaa !14
  %32 = getelementptr inbounds %struct.defbuf, ptr %31, i32 0, i32 4
  %33 = getelementptr inbounds [1 x i8], ptr %32, i64 0, i64 0
  call void (ptr, i32, ...) @fpp_cerror(ptr noundef %25, i32 noundef 9, ptr noundef %28, ptr noundef %33)
  %34 = load ptr, ptr %4, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.Global, ptr %34, i32 0, i32 9
  %36 = load i32, ptr %35, align 4, !tbaa !15
  %37 = icmp ne i32 %36, 0
  br i1 %37, label %38, label %60

38:                                               ; preds = %24
  br label %39

39:                                               ; preds = %54, %38
  %40 = load ptr, ptr %4, align 8, !tbaa !5
  %41 = call i32 @fpp_get(ptr noundef %40)
  store i32 %41, ptr %6, align 4, !tbaa !9
  br label %42

42:                                               ; preds = %39
  %43 = load ptr, ptr %4, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.Global, ptr %43, i32 0, i32 7
  %45 = load ptr, ptr %44, align 8, !tbaa !16
  %46 = icmp ne ptr %45, null
  br i1 %46, label %47, label %54

47:                                               ; preds = %42
  %48 = load ptr, ptr %4, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.Global, ptr %48, i32 0, i32 7
  %50 = load ptr, ptr %49, align 8, !tbaa !16
  %51 = getelementptr inbounds %struct.fileinfo, ptr %50, i32 0, i32 2
  %52 = load ptr, ptr %51, align 8, !tbaa !17
  %53 = icmp eq ptr %52, null
  br label %54

54:                                               ; preds = %47, %42
  %55 = phi i1 [ false, %42 ], [ %53, %47 ]
  br i1 %55, label %39, label %56, !llvm.loop !19

56:                                               ; preds = %54
  %57 = load ptr, ptr %4, align 8, !tbaa !5
  call void @fpp_unget(ptr noundef %57)
  %58 = load ptr, ptr %4, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.Global, ptr %58, i32 0, i32 8
  store i32 0, ptr %59, align 8, !tbaa !11
  store i32 0, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %283

60:                                               ; preds = %24
  br label %61

61:                                               ; preds = %60, %19
  br label %62

62:                                               ; preds = %61, %15
  %63 = load ptr, ptr %4, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.Global, ptr %63, i32 0, i32 33
  store i32 0, ptr %64, align 8, !tbaa !21
  %65 = load ptr, ptr %4, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.Global, ptr %65, i32 0, i32 30
  %67 = getelementptr inbounds [1025 x i8], ptr %66, i64 0, i64 0
  %68 = load ptr, ptr %4, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.Global, ptr %68, i32 0, i32 31
  store ptr %67, ptr %69, align 8, !tbaa !22
  %70 = load ptr, ptr %5, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.defbuf, ptr %70, i32 0, i32 3
  %72 = load i32, ptr %71, align 4, !tbaa !23
  switch i32 %72, label %219 [
    i32 -2, label %73
    i32 -3, label %125
    i32 -4, label %172
    i32 -5, label %201
    i32 -1, label %272
  ]

73:                                               ; preds = %62
  %74 = load ptr, ptr %4, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.Global, ptr %74, i32 0, i32 7
  %76 = load ptr, ptr %75, align 8, !tbaa !16
  %77 = getelementptr inbounds %struct.fileinfo, ptr %76, i32 0, i32 2
  %78 = load ptr, ptr %77, align 8, !tbaa !17
  %79 = icmp ne ptr %78, null
  br i1 %79, label %80, label %88

80:                                               ; preds = %73
  %81 = load ptr, ptr %4, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.Global, ptr %81, i32 0, i32 12
  %83 = getelementptr inbounds [513 x i8], ptr %82, i64 0, i64 0
  %84 = load ptr, ptr %4, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.Global, ptr %84, i32 0, i32 0
  %86 = load i32, ptr %85, align 8, !tbaa !25
  %87 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %83, ptr noundef @.str, i32 noundef %86) #4
  br label %114

88:                                               ; preds = %73
  %89 = load ptr, ptr %4, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.Global, ptr %89, i32 0, i32 7
  %91 = load ptr, ptr %90, align 8, !tbaa !16
  store ptr %91, ptr %7, align 8, !tbaa !5
  br label %92

92:                                               ; preds = %109, %88
  %93 = load ptr, ptr %7, align 8, !tbaa !5
  %94 = icmp ne ptr %93, null
  br i1 %94, label %95, label %113

95:                                               ; preds = %92
  %96 = load ptr, ptr %7, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.fileinfo, ptr %96, i32 0, i32 2
  %98 = load ptr, ptr %97, align 8, !tbaa !17
  %99 = icmp ne ptr %98, null
  br i1 %99, label %100, label %108

100:                                              ; preds = %95
  %101 = load ptr, ptr %4, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.Global, ptr %101, i32 0, i32 12
  %103 = getelementptr inbounds [513 x i8], ptr %102, i64 0, i64 0
  %104 = load ptr, ptr %7, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.fileinfo, ptr %104, i32 0, i32 1
  %106 = load i32, ptr %105, align 8, !tbaa !26
  %107 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %103, ptr noundef @.str, i32 noundef %106) #4
  br label %113

108:                                              ; preds = %95
  br label %109

109:                                              ; preds = %108
  %110 = load ptr, ptr %7, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.fileinfo, ptr %110, i32 0, i32 3
  %112 = load ptr, ptr %111, align 8, !tbaa !27
  store ptr %112, ptr %7, align 8, !tbaa !5
  br label %92, !llvm.loop !28

113:                                              ; preds = %100, %92
  br label %114

114:                                              ; preds = %113, %80
  %115 = load ptr, ptr %4, align 8, !tbaa !5
  %116 = load ptr, ptr %4, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.Global, ptr %116, i32 0, i32 12
  %118 = getelementptr inbounds [513 x i8], ptr %117, i64 0, i64 0
  %119 = call i32 @fpp_ungetstring(ptr noundef %115, ptr noundef %118)
  store i32 %119, ptr %8, align 4, !tbaa !9
  %120 = load i32, ptr %8, align 4, !tbaa !9
  %121 = icmp ne i32 %120, 0
  br i1 %121, label %122, label %124

122:                                              ; preds = %114
  %123 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %123, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %283

124:                                              ; preds = %114
  br label %281

125:                                              ; preds = %62
  %126 = load ptr, ptr %4, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.Global, ptr %126, i32 0, i32 7
  %128 = load ptr, ptr %127, align 8, !tbaa !16
  store ptr %128, ptr %7, align 8, !tbaa !5
  br label %129

129:                                              ; preds = %167, %125
  %130 = load ptr, ptr %7, align 8, !tbaa !5
  %131 = icmp ne ptr %130, null
  br i1 %131, label %132, label %171

132:                                              ; preds = %129
  %133 = load ptr, ptr %7, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.fileinfo, ptr %133, i32 0, i32 2
  %135 = load ptr, ptr %134, align 8, !tbaa !17
  %136 = icmp ne ptr %135, null
  br i1 %136, label %137, label %166

137:                                              ; preds = %132
  %138 = load ptr, ptr %4, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.Global, ptr %138, i32 0, i32 12
  %140 = getelementptr inbounds [513 x i8], ptr %139, i64 0, i64 0
  %141 = load ptr, ptr %7, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.fileinfo, ptr %141, i32 0, i32 5
  %143 = load ptr, ptr %142, align 8, !tbaa !29
  %144 = icmp ne ptr %143, null
  br i1 %144, label %145, label %149

145:                                              ; preds = %137
  %146 = load ptr, ptr %7, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.fileinfo, ptr %146, i32 0, i32 5
  %148 = load ptr, ptr %147, align 8, !tbaa !29
  br label %153

149:                                              ; preds = %137
  %150 = load ptr, ptr %7, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.fileinfo, ptr %150, i32 0, i32 4
  %152 = load ptr, ptr %151, align 8, !tbaa !30
  br label %153

153:                                              ; preds = %149, %145
  %154 = phi ptr [ %148, %145 ], [ %152, %149 ]
  %155 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %140, ptr noundef @.str.1, ptr noundef %154) #4
  %156 = load ptr, ptr %4, align 8, !tbaa !5
  %157 = load ptr, ptr %4, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.Global, ptr %157, i32 0, i32 12
  %159 = getelementptr inbounds [513 x i8], ptr %158, i64 0, i64 0
  %160 = call i32 @fpp_ungetstring(ptr noundef %156, ptr noundef %159)
  store i32 %160, ptr %8, align 4, !tbaa !9
  %161 = load i32, ptr %8, align 4, !tbaa !9
  %162 = icmp ne i32 %161, 0
  br i1 %162, label %163, label %165

163:                                              ; preds = %153
  %164 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %164, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %283

165:                                              ; preds = %153
  br label %171

166:                                              ; preds = %132
  br label %167

167:                                              ; preds = %166
  %168 = load ptr, ptr %7, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct.fileinfo, ptr %168, i32 0, i32 3
  %170 = load ptr, ptr %169, align 8, !tbaa !27
  store ptr %170, ptr %7, align 8, !tbaa !5
  br label %129, !llvm.loop !31

171:                                              ; preds = %165, %129
  br label %281

172:                                              ; preds = %62
  %173 = load ptr, ptr %4, align 8, !tbaa !5
  %174 = getelementptr inbounds %struct.Global, ptr %173, i32 0, i32 12
  %175 = getelementptr inbounds [513 x i8], ptr %174, i64 0, i64 0
  %176 = load ptr, ptr %4, align 8, !tbaa !5
  %177 = getelementptr inbounds %struct.Global, ptr %176, i32 0, i32 3
  %178 = load ptr, ptr %177, align 8, !tbaa !32
  %179 = getelementptr inbounds i8, ptr %178, i64 0
  %180 = load i8, ptr %179, align 1, !tbaa !33
  %181 = sext i8 %180 to i32
  %182 = icmp ne i32 %181, 0
  br i1 %182, label %183, label %187

183:                                              ; preds = %172
  %184 = load ptr, ptr %4, align 8, !tbaa !5
  %185 = getelementptr inbounds %struct.Global, ptr %184, i32 0, i32 3
  %186 = load ptr, ptr %185, align 8, !tbaa !32
  br label %188

187:                                              ; preds = %172
  br label %188

188:                                              ; preds = %187, %183
  %189 = phi ptr [ %186, %183 ], [ @.str.2, %187 ]
  %190 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %175, ptr noundef @.str.1, ptr noundef %189) #4
  %191 = load ptr, ptr %4, align 8, !tbaa !5
  %192 = load ptr, ptr %4, align 8, !tbaa !5
  %193 = getelementptr inbounds %struct.Global, ptr %192, i32 0, i32 12
  %194 = getelementptr inbounds [513 x i8], ptr %193, i64 0, i64 0
  %195 = call i32 @fpp_ungetstring(ptr noundef %191, ptr noundef %194)
  store i32 %195, ptr %8, align 4, !tbaa !9
  %196 = load i32, ptr %8, align 4, !tbaa !9
  %197 = icmp ne i32 %196, 0
  br i1 %197, label %198, label %200

198:                                              ; preds = %188
  %199 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %199, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %283

200:                                              ; preds = %188
  br label %281

201:                                              ; preds = %62
  %202 = load ptr, ptr %4, align 8, !tbaa !5
  %203 = getelementptr inbounds %struct.Global, ptr %202, i32 0, i32 12
  %204 = getelementptr inbounds [513 x i8], ptr %203, i64 0, i64 0
  %205 = load ptr, ptr %4, align 8, !tbaa !5
  %206 = getelementptr inbounds %struct.Global, ptr %205, i32 0, i32 4
  %207 = load i32, ptr %206, align 8, !tbaa !34
  %208 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %204, ptr noundef @.str, i32 noundef %207) #4
  %209 = load ptr, ptr %4, align 8, !tbaa !5
  %210 = load ptr, ptr %4, align 8, !tbaa !5
  %211 = getelementptr inbounds %struct.Global, ptr %210, i32 0, i32 12
  %212 = getelementptr inbounds [513 x i8], ptr %211, i64 0, i64 0
  %213 = call i32 @fpp_ungetstring(ptr noundef %209, ptr noundef %212)
  store i32 %213, ptr %8, align 4, !tbaa !9
  %214 = load i32, ptr %8, align 4, !tbaa !9
  %215 = icmp ne i32 %214, 0
  br i1 %215, label %216, label %218

216:                                              ; preds = %201
  %217 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %217, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %283

218:                                              ; preds = %201
  br label %281

219:                                              ; preds = %62
  %220 = load ptr, ptr %5, align 8, !tbaa !5
  %221 = getelementptr inbounds %struct.defbuf, ptr %220, i32 0, i32 3
  %222 = load i32, ptr %221, align 4, !tbaa !23
  %223 = icmp slt i32 %222, 0
  br i1 %223, label %224, label %229

224:                                              ; preds = %219
  %225 = load ptr, ptr %4, align 8, !tbaa !5
  %226 = load ptr, ptr %5, align 8, !tbaa !5
  %227 = getelementptr inbounds %struct.defbuf, ptr %226, i32 0, i32 4
  %228 = getelementptr inbounds [1 x i8], ptr %227, i64 0, i64 0
  call void (ptr, i32, ...) @fpp_cerror(ptr noundef %225, i32 noundef 60, ptr noundef %228)
  store i32 8, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %283

229:                                              ; preds = %219
  br label %230

230:                                              ; preds = %234, %229
  %231 = load ptr, ptr %4, align 8, !tbaa !5
  %232 = call i32 @fpp_skipws(ptr noundef %231)
  store i32 %232, ptr %6, align 4, !tbaa !9
  %233 = icmp eq i32 %232, 10
  br i1 %233, label %234, label %237

234:                                              ; preds = %230
  %235 = load ptr, ptr %4, align 8, !tbaa !5
  %236 = getelementptr inbounds %struct.Global, ptr %235, i32 0, i32 1
  store i32 1, ptr %236, align 4, !tbaa !35
  br label %230, !llvm.loop !36

237:                                              ; preds = %230
  %238 = load i32, ptr %6, align 4, !tbaa !9
  %239 = icmp ne i32 %238, 40
  br i1 %239, label %240, label %250

240:                                              ; preds = %237
  %241 = load ptr, ptr %4, align 8, !tbaa !5
  call void @fpp_unget(ptr noundef %241)
  %242 = load ptr, ptr %4, align 8, !tbaa !5
  %243 = load ptr, ptr %5, align 8, !tbaa !5
  %244 = getelementptr inbounds %struct.defbuf, ptr %243, i32 0, i32 4
  %245 = getelementptr inbounds [1 x i8], ptr %244, i64 0, i64 0
  call void (ptr, i32, ...) @fpp_cerror(ptr noundef %242, i32 noundef 43, ptr noundef %245)
  %246 = load ptr, ptr %4, align 8, !tbaa !5
  %247 = load ptr, ptr %5, align 8, !tbaa !5
  %248 = getelementptr inbounds %struct.defbuf, ptr %247, i32 0, i32 4
  %249 = getelementptr inbounds [1 x i8], ptr %248, i64 0, i64 0
  call void @fpp_Putstring(ptr noundef %246, ptr noundef %249)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %283

250:                                              ; preds = %237
  %251 = load ptr, ptr %4, align 8, !tbaa !5
  %252 = call i32 @fpp_expcollect(ptr noundef %251)
  store i32 %252, ptr %8, align 4, !tbaa !9
  %253 = icmp ne i32 %252, 0
  br i1 %253, label %268, label %254

254:                                              ; preds = %250
  %255 = load ptr, ptr %5, align 8, !tbaa !5
  %256 = getelementptr inbounds %struct.defbuf, ptr %255, i32 0, i32 3
  %257 = load i32, ptr %256, align 4, !tbaa !23
  %258 = load ptr, ptr %4, align 8, !tbaa !5
  %259 = getelementptr inbounds %struct.Global, ptr %258, i32 0, i32 33
  %260 = load i32, ptr %259, align 8, !tbaa !21
  %261 = icmp ne i32 %257, %260
  br i1 %261, label %262, label %267

262:                                              ; preds = %254
  %263 = load ptr, ptr %4, align 8, !tbaa !5
  %264 = load ptr, ptr %5, align 8, !tbaa !5
  %265 = getelementptr inbounds %struct.defbuf, ptr %264, i32 0, i32 4
  %266 = getelementptr inbounds [1 x i8], ptr %265, i64 0, i64 0
  call void (ptr, i32, ...) @fpp_cerror(ptr noundef %263, i32 noundef 44, ptr noundef %266)
  br label %267

267:                                              ; preds = %262, %254
  br label %270

268:                                              ; preds = %250
  %269 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %269, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %283

270:                                              ; preds = %267
  br label %271

271:                                              ; preds = %270
  br label %272

272:                                              ; preds = %271, %62
  %273 = load ptr, ptr %4, align 8, !tbaa !5
  %274 = load ptr, ptr %5, align 8, !tbaa !5
  %275 = getelementptr inbounds %struct.defbuf, ptr %274, i32 0, i32 4
  %276 = getelementptr inbounds [1 x i8], ptr %275, i64 0, i64 0
  %277 = load ptr, ptr %5, align 8, !tbaa !5
  %278 = getelementptr inbounds %struct.defbuf, ptr %277, i32 0, i32 1
  %279 = load ptr, ptr %278, align 8, !tbaa !37
  %280 = call i32 @fpp_expstuff(ptr noundef %273, ptr noundef %276, ptr noundef %279)
  store i32 %280, ptr %8, align 4, !tbaa !9
  br label %281

281:                                              ; preds = %272, %218, %200, %171, %124
  %282 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %282, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %283

283:                                              ; preds = %281, %268, %240, %224, %216, %198, %163, %122, %56
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  %284 = load i32, ptr %3, align 4
  ret i32 %284
}

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

declare i32 @fpp_ungetstring(ptr noundef, ptr noundef) #1

declare void @fpp_Putstring(ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden i32 @fpp_expcollect(ptr noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local i32 @fpp_expstuff(ptr noundef, ptr noundef, ptr noundef) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 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 #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 }

!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, !10, i64 48}
!12 = !{!"Global", !10, i64 0, !10, i64 4, !6, i64 8, !6, i64 16, !10, i64 24, !10, i64 28, !10, i64 32, !6, i64 40, !10, i64 48, !10, i64 52, !10, i64 56, !10, i64 60, !7, i64 64, !6, i64 584, !7, i64 592, !7, i64 593, !7, i64 594, !7, i64 595, !7, i64 596, !7, i64 597, !6, i64 632, !7, i64 640, !6, i64 800, !7, i64 808, !7, i64 968, !10, i64 988, !7, i64 992, !7, i64 1032, !7, i64 1072, !6, i64 1080, !7, i64 1088, !6, i64 2120, !7, i64 2128, !10, i64 2376, !6, i64 2384, !7, i64 2392, !10, i64 2904, !6, i64 2912, !6, i64 2920, !6, i64 2928, !6, i64 2936, !6, i64 2944, !6, i64 2952, !7, i64 2960, !7, i64 2961, !7, i64 2962, !7, i64 2963, !7, i64 2964, !7, i64 2965, !7, i64 2966, !7, i64 2967, !6, i64 2968, !13, i64 2976, !7, i64 2984, !7, i64 2985, !7, i64 2986, !7, i64 2987, !7, i64 2988, !7, i64 2989, !6, i64 2992, !7, i64 3000, !10, i64 3160, !7, i64 3164, !7, i64 3165, !7, i64 3166, !6, i64 3168}
!13 = !{!"long", !7, i64 0}
!14 = !{!12, !6, i64 2384}
!15 = !{!12, !10, i64 52}
!16 = !{!12, !6, i64 40}
!17 = !{!18, !6, i64 16}
!18 = !{!"fileinfo", !6, i64 0, !10, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !10, i64 48, !7, i64 52}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!12, !10, i64 2376}
!22 = !{!12, !6, i64 2120}
!23 = !{!24, !10, i64 20}
!24 = !{!"defbuf", !6, i64 0, !6, i64 8, !10, i64 16, !10, i64 20, !7, i64 24}
!25 = !{!12, !10, i64 0}
!26 = !{!18, !10, i64 8}
!27 = !{!18, !6, i64 24}
!28 = distinct !{!28, !20}
!29 = !{!18, !6, i64 40}
!30 = !{!18, !6, i64 32}
!31 = distinct !{!31, !20}
!32 = !{!12, !6, i64 16}
!33 = !{!7, !7, i64 0}
!34 = !{!12, !10, i64 24}
!35 = !{!12, !10, i64 4}
!36 = distinct !{!36, !20}
!37 = !{!24, !6, 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"

@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [19 x i8], align 1

declare i32 @fpp_skipws(ptr noundef) local_unnamed_addr #0

declare void @fpp_cerror(ptr noundef, i32 noundef, ...) local_unnamed_addr #0

declare i32 @fpp_get(ptr noundef) local_unnamed_addr #0

declare void @fpp_unget(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local i32 @fpp_expand(ptr noundef %0, ptr noundef %1) local_unnamed_addr #1 {
  %3 = getelementptr inbounds i8, ptr %0, i64 48
  %4 = load i32, ptr %3, align 8, !tbaa !5
  %5 = add nsw i32 %4, 1
  store i32 %5, ptr %3, align 8, !tbaa !5
  %6 = icmp eq i32 %4, 0
  br i1 %6, label %7, label %9

7:                                                ; preds = %2
  %8 = getelementptr inbounds i8, ptr %0, i64 2384
  store ptr %1, ptr %8, align 8, !tbaa !12
  br label %26

9:                                                ; preds = %2
  %10 = icmp eq i32 %5, 1000
  br i1 %10, label %11, label %26

11:                                               ; preds = %9
  %12 = getelementptr inbounds i8, ptr %1, i64 24
  %13 = getelementptr inbounds i8, ptr %0, i64 2384
  %14 = load ptr, ptr %13, align 8, !tbaa !12
  %15 = getelementptr inbounds i8, ptr %14, i64 24
  tail call void (ptr, i32, ...) @fpp_cerror(ptr noundef nonnull %0, i32 noundef 9, ptr noundef nonnull %12, ptr noundef nonnull %15) #3
  %16 = getelementptr inbounds i8, ptr %0, i64 52
  %17 = load i32, ptr %16, align 4, !tbaa !13
  %.not = icmp eq i32 %17, 0
  br i1 %.not, label %26, label %.preheader107

.preheader107:                                    ; preds = %11
  %18 = getelementptr inbounds i8, ptr %0, i64 40
  br label %19

19:                                               ; preds = %.preheader107, %22
  %20 = tail call i32 @fpp_get(ptr noundef nonnull %0) #3
  %21 = load ptr, ptr %18, align 8, !tbaa !14
  %.not90 = icmp eq ptr %21, null
  br i1 %.not90, label %.critedge, label %22

22:                                               ; preds = %19
  %23 = getelementptr inbounds i8, ptr %21, i64 16
  %24 = load ptr, ptr %23, align 8, !tbaa !15
  %25 = icmp eq ptr %24, null
  br i1 %25, label %19, label %.critedge, !llvm.loop !17

.critedge:                                        ; preds = %19, %22
  tail call void @fpp_unget(ptr noundef nonnull %0) #3
  store i32 0, ptr %3, align 8, !tbaa !5
  br label %100

26:                                               ; preds = %9, %11, %7
  %27 = getelementptr inbounds i8, ptr %0, i64 2376
  store i32 0, ptr %27, align 8, !tbaa !19
  %28 = getelementptr inbounds i8, ptr %0, i64 1088
  %29 = getelementptr inbounds i8, ptr %0, i64 2120
  store ptr %28, ptr %29, align 8, !tbaa !20
  %30 = getelementptr inbounds i8, ptr %1, i64 20
  %31 = load i32, ptr %30, align 4, !tbaa !21
  switch i32 %31, label %78 [
    i32 -2, label %32
    i32 -3, label %48
    i32 -4, label %65
    i32 -5, label %72
    i32 -1, label %95
  ]

32:                                               ; preds = %26
  %33 = getelementptr inbounds i8, ptr %0, i64 40
  %34 = load ptr, ptr %33, align 8, !tbaa !14
  %35 = getelementptr inbounds i8, ptr %34, i64 16
  %36 = load ptr, ptr %35, align 8, !tbaa !15
  %.not98 = icmp eq ptr %36, null
  br i1 %.not98, label %.lr.ph115, label %.loopexit.sink.split

.lr.ph115:                                        ; preds = %32, %41
  %.076114 = phi ptr [ %43, %41 ], [ %34, %32 ]
  %37 = getelementptr inbounds i8, ptr %.076114, i64 16
  %38 = load ptr, ptr %37, align 8, !tbaa !15
  %.not100 = icmp eq ptr %38, null
  br i1 %.not100, label %41, label %39

39:                                               ; preds = %.lr.ph115
  %40 = getelementptr inbounds i8, ptr %.076114, i64 8
  br label %.loopexit.sink.split

41:                                               ; preds = %.lr.ph115
  %42 = getelementptr inbounds i8, ptr %.076114, i64 24
  %43 = load ptr, ptr %42, align 8, !tbaa !23
  %.not99 = icmp eq ptr %43, null
  br i1 %.not99, label %.loopexit, label %.lr.ph115, !llvm.loop !24

.loopexit.sink.split:                             ; preds = %32, %39
  %.sink121 = phi ptr [ %40, %39 ], [ %0, %32 ]
  %.sink = getelementptr inbounds i8, ptr %0, i64 64
  %44 = load i32, ptr %.sink121, align 8, !tbaa !25
  %45 = tail call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %.sink, ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %44) #3
  br label %.loopexit

.loopexit:                                        ; preds = %41, %.loopexit.sink.split
  %46 = getelementptr inbounds i8, ptr %0, i64 64
  %47 = tail call i32 @fpp_ungetstring(ptr noundef %0, ptr noundef nonnull %46) #3
  %.not101 = icmp eq i32 %47, 0
  br i1 %.not101, label %.loopexit106, label %100

48:                                               ; preds = %26
  %49 = getelementptr inbounds i8, ptr %0, i64 40
  %.1110 = load ptr, ptr %49, align 8, !tbaa !26
  %.not94111 = icmp eq ptr %.1110, null
  br i1 %.not94111, label %.loopexit106, label %.lr.ph

.lr.ph:                                           ; preds = %48, %63
  %.1112 = phi ptr [ %.1, %63 ], [ %.1110, %48 ]
  %50 = getelementptr inbounds i8, ptr %.1112, i64 16
  %51 = load ptr, ptr %50, align 8, !tbaa !15
  %.not95 = icmp eq ptr %51, null
  br i1 %.not95, label %63, label %52

52:                                               ; preds = %.lr.ph
  %53 = getelementptr inbounds i8, ptr %0, i64 64
  %54 = getelementptr inbounds i8, ptr %.1112, i64 40
  %55 = load ptr, ptr %54, align 8, !tbaa !27
  %.not96 = icmp eq ptr %55, null
  br i1 %.not96, label %56, label %59

56:                                               ; preds = %52
  %57 = getelementptr inbounds i8, ptr %.1112, i64 32
  %58 = load ptr, ptr %57, align 8, !tbaa !28
  br label %59

59:                                               ; preds = %52, %56
  %60 = phi ptr [ %58, %56 ], [ %55, %52 ]
  %61 = tail call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %53, ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef %60) #3
  %62 = tail call i32 @fpp_ungetstring(ptr noundef %0, ptr noundef nonnull %53) #3
  %.not97 = icmp eq i32 %62, 0
  br i1 %.not97, label %.loopexit106, label %100

63:                                               ; preds = %.lr.ph
  %64 = getelementptr inbounds i8, ptr %.1112, i64 24
  %.1 = load ptr, ptr %64, align 8, !tbaa !26
  %.not94 = icmp eq ptr %.1, null
  br i1 %.not94, label %.loopexit106, label %.lr.ph, !llvm.loop !29

65:                                               ; preds = %26
  %66 = getelementptr inbounds i8, ptr %0, i64 64
  %67 = getelementptr inbounds i8, ptr %0, i64 16
  %68 = load ptr, ptr %67, align 8, !tbaa !30
  %69 = load i8, ptr %68, align 1, !tbaa !31
  %.not92 = icmp eq i8 %69, 0
  %spec.select = select i1 %.not92, ptr @.str.2, ptr %68
  %70 = tail call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %66, ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef nonnull %spec.select) #3
  %71 = tail call i32 @fpp_ungetstring(ptr noundef nonnull %0, ptr noundef nonnull %66) #3
  %.not93 = icmp eq i32 %71, 0
  br i1 %.not93, label %.loopexit106, label %100

72:                                               ; preds = %26
  %73 = getelementptr inbounds i8, ptr %0, i64 64
  %74 = getelementptr inbounds i8, ptr %0, i64 24
  %75 = load i32, ptr %74, align 8, !tbaa !32
  %76 = tail call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %73, ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %75) #3
  %77 = tail call i32 @fpp_ungetstring(ptr noundef nonnull %0, ptr noundef nonnull %73) #3
  %.not91 = icmp eq i32 %77, 0
  br i1 %.not91, label %.loopexit106, label %100

78:                                               ; preds = %26
  %79 = icmp slt i32 %31, 0
  br i1 %79, label %81, label %.preheader

.preheader:                                       ; preds = %78
  %80 = getelementptr inbounds i8, ptr %0, i64 4
  br label %83

81:                                               ; preds = %78
  %82 = getelementptr inbounds i8, ptr %1, i64 24
  tail call void (ptr, i32, ...) @fpp_cerror(ptr noundef nonnull %0, i32 noundef 60, ptr noundef nonnull %82) #3
  br label %100

83:                                               ; preds = %.preheader, %85
  %84 = tail call i32 @fpp_skipws(ptr noundef nonnull %0) #3
  switch i32 %84, label %86 [
    i32 10, label %85
    i32 40, label %88
  ]

85:                                               ; preds = %83
  store i32 1, ptr %80, align 4, !tbaa !33
  br label %83, !llvm.loop !34

86:                                               ; preds = %83
  tail call void @fpp_unget(ptr noundef nonnull %0) #3
  %87 = getelementptr inbounds i8, ptr %1, i64 24
  tail call void (ptr, i32, ...) @fpp_cerror(ptr noundef nonnull %0, i32 noundef 43, ptr noundef nonnull %87) #3
  tail call void @fpp_Putstring(ptr noundef nonnull %0, ptr noundef nonnull %87) #3
  br label %100

88:                                               ; preds = %83
  %89 = tail call i32 @fpp_expcollect(ptr noundef nonnull %0)
  %.not103 = icmp eq i32 %89, 0
  br i1 %.not103, label %90, label %100

90:                                               ; preds = %88
  %91 = load i32, ptr %30, align 4, !tbaa !21
  %92 = load i32, ptr %27, align 8, !tbaa !19
  %.not104 = icmp eq i32 %91, %92
  br i1 %.not104, label %95, label %93

93:                                               ; preds = %90
  %94 = getelementptr inbounds i8, ptr %1, i64 24
  tail call void (ptr, i32, ...) @fpp_cerror(ptr noundef nonnull %0, i32 noundef 44, ptr noundef nonnull %94) #3
  br label %95

95:                                               ; preds = %90, %93, %26
  %96 = getelementptr inbounds i8, ptr %1, i64 24
  %97 = getelementptr inbounds i8, ptr %1, i64 8
  %98 = load ptr, ptr %97, align 8, !tbaa !35
  %99 = tail call i32 @fpp_expstuff(ptr noundef nonnull %0, ptr noundef nonnull %96, ptr noundef %98)
  br label %.loopexit106

.loopexit106:                                     ; preds = %63, %48, %72, %65, %59, %.loopexit, %95
  %.0 = phi i32 [ %99, %95 ], [ 0, %72 ], [ 0, %65 ], [ 0, %59 ], [ 0, %.loopexit ], [ 0, %48 ], [ 0, %63 ]
  br label %100

100:                                              ; preds = %88, %72, %65, %59, %.loopexit, %.loopexit106, %86, %81, %.critedge
  %.077 = phi i32 [ 8, %81 ], [ 0, %86 ], [ %.0, %.loopexit106 ], [ 0, %.critedge ], [ %47, %.loopexit ], [ %62, %59 ], [ %71, %65 ], [ %77, %72 ], [ %89, %88 ]
  ret i32 %.077
}

; Function Attrs: nofree nounwind
declare noundef i32 @sprintf(ptr noalias nocapture noundef writeonly, ptr nocapture noundef readonly, ...) local_unnamed_addr #2

declare i32 @fpp_ungetstring(ptr noundef, ptr noundef) local_unnamed_addr #0

declare void @fpp_Putstring(ptr noundef, ptr noundef) local_unnamed_addr #0

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @fpp_expstuff(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

attributes #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 = { 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 = { 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 #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, !7, i64 48}
!6 = !{!"Global", !7, i64 0, !7, i64 4, !10, i64 8, !10, i64 16, !7, i64 24, !7, i64 28, !7, i64 32, !10, i64 40, !7, i64 48, !7, i64 52, !7, i64 56, !7, i64 60, !8, i64 64, !10, i64 584, !8, i64 592, !8, i64 593, !8, i64 594, !8, i64 595, !8, i64 596, !8, i64 597, !10, i64 632, !8, i64 640, !10, i64 800, !8, i64 808, !8, i64 968, !7, i64 988, !8, i64 992, !8, i64 1032, !8, i64 1072, !10, i64 1080, !8, i64 1088, !10, i64 2120, !8, i64 2128, !7, i64 2376, !10, i64 2384, !8, i64 2392, !7, i64 2904, !10, i64 2912, !10, i64 2920, !10, i64 2928, !10, i64 2936, !10, i64 2944, !10, i64 2952, !8, i64 2960, !8, i64 2961, !8, i64 2962, !8, i64 2963, !8, i64 2964, !8, i64 2965, !8, i64 2966, !8, i64 2967, !10, i64 2968, !11, i64 2976, !8, i64 2984, !8, i64 2985, !8, i64 2986, !8, i64 2987, !8, i64 2988, !8, i64 2989, !10, i64 2992, !8, i64 3000, !7, i64 3160, !8, i64 3164, !8, i64 3165, !8, i64 3166, !10, i64 3168}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"long", !8, i64 0}
!12 = !{!6, !10, i64 2384}
!13 = !{!6, !7, i64 52}
!14 = !{!6, !10, i64 40}
!15 = !{!16, !10, i64 16}
!16 = !{!"fileinfo", !10, i64 0, !7, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !7, i64 48, !8, i64 52}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!6, !7, i64 2376}
!20 = !{!6, !10, i64 2120}
!21 = !{!22, !7, i64 20}
!22 = !{!"defbuf", !10, i64 0, !10, i64 8, !7, i64 16, !7, i64 20, !8, i64 24}
!23 = !{!16, !10, i64 24}
!24 = distinct !{!24, !18}
!25 = !{!7, !7, i64 0}
!26 = !{!10, !10, i64 0}
!27 = !{!16, !10, i64 40}
!28 = !{!16, !10, i64 32}
!29 = distinct !{!29, !18}
!30 = !{!6, !10, i64 16}
!31 = !{!8, !8, i64 0}
!32 = !{!6, !7, i64 24}
!33 = !{!6, !7, i64 4}
!34 = distinct !{!34, !18}
!35 = !{!22, !10, i64 8}


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