; LLVM IR from xhub/reshop :: gams_link (reshop_main)

; 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.rhp_gams_handles = type { ptr, ptr, ptr, ptr, ptr }
%struct.rhpRec = type { ptr, ptr, ptr, ptr, ptr, i32, ptr }

@stderr = external global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [52 x i8], align 1
@stdout = external global ptr, align 8
@.str.5 = external hidden unnamed_addr constant [4 x i8], align 1
@gmoEnvironment = external global ptr, align 8
@gevGetStrOpt = external global ptr, align 8
@.str.6 = external hidden unnamed_addr constant [11 x i8], align 1
@gevLogStat = external global ptr, align 8
@.str.7 = external hidden unnamed_addr constant [82 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [87 x i8], align 1
@gmoDictionary = external global ptr, align 8
@gmoDict = external global ptr, align 8
@.str.9 = external hidden unnamed_addr constant [64 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [13 x i8], align 1
@cfgReadConfig = external global ptr, align 8
@gevLogStatPChar = external global ptr, align 8
@.str.12 = external hidden unnamed_addr constant [47 x i8], align 1
@cfgNumMsg = external global ptr, align 8
@cfgGetMsg = external global ptr, align 8
@gevTerminateInstall = external global ptr, align 8
@.str.13 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [62 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [69 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [45 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

declare void @rhp_mdl_free(ptr noundef) #1

; Function Attrs: nounwind uwtable
define dso_local i32 @rhpReadyAPI(ptr noundef %0, ptr noundef %1) #2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca [256 x i8], align 16
  %6 = alloca [256 x i8], align 16
  %7 = alloca i32, align 4
  %8 = alloca i8, align 1
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i64, align 8
  %12 = alloca %struct.rhp_gams_handles, align 8
  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 256, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 256, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 0, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  store ptr null, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %13 = load ptr, ptr %3, align 8, !tbaa !5
  store ptr %13, ptr %10, align 8, !tbaa !5
  %14 = load ptr, ptr %10, align 8, !tbaa !5
  %15 = icmp ne ptr %14, null
  br i1 %15, label %19, label %16

16:                                               ; preds = %2
  %17 = load ptr, ptr @stderr, align 8, !tbaa !5
  %18 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %17, ptr noundef @.str.3) #5
  store i32 1, ptr %7, align 4, !tbaa !9
  br label %298

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

22:                                               ; preds = %19
  %23 = load ptr, ptr @stderr, align 8, !tbaa !5
  %24 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %23, ptr noundef @.str.4) #5
  store i32 1, ptr %7, align 4, !tbaa !9
  br label %298

25:                                               ; preds = %19
  %26 = getelementptr inbounds [256 x i8], ptr %5, i64 0, i64 0
  %27 = call i32 @gmoGetReady(ptr noundef %26, i32 noundef 256)
  %28 = icmp ne i32 %27, 0
  br i1 %28, label %33, label %29

29:                                               ; preds = %25
  %30 = load ptr, ptr @stdout, align 8, !tbaa !5
  %31 = getelementptr inbounds [256 x i8], ptr %5, i64 0, i64 0
  %32 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %30, ptr noundef @.str.5, ptr noundef %31) #5
  store i32 1, ptr %7, align 4, !tbaa !9
  br label %298

33:                                               ; preds = %25
  %34 = load ptr, ptr %4, align 8, !tbaa !5
  %35 = load ptr, ptr %10, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.rhpRec, ptr %35, i32 0, i32 1
  store ptr %34, ptr %36, align 8, !tbaa !11
  %37 = getelementptr inbounds [256 x i8], ptr %5, i64 0, i64 0
  %38 = call i32 @gevGetReady(ptr noundef %37, i32 noundef 256)
  %39 = icmp ne i32 %38, 0
  br i1 %39, label %44, label %40

40:                                               ; preds = %33
  %41 = load ptr, ptr @stdout, align 8, !tbaa !5
  %42 = getelementptr inbounds [256 x i8], ptr %5, i64 0, i64 0
  %43 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %41, ptr noundef @.str.5, ptr noundef %42) #5
  store i32 1, ptr %7, align 4, !tbaa !9
  br label %298

44:                                               ; preds = %33
  %45 = load ptr, ptr @gmoEnvironment, align 8, !tbaa !5
  %46 = load ptr, ptr %4, align 8, !tbaa !5
  %47 = call ptr %45(ptr noundef %46)
  %48 = load ptr, ptr %10, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.rhpRec, ptr %48, i32 0, i32 2
  store ptr %47, ptr %49, align 8, !tbaa !13
  %50 = load ptr, ptr %10, align 8, !tbaa !5
  call void @rhp_set_printops(ptr noundef %50, ptr noundef @printgams, ptr noundef @flushgams, i1 noundef zeroext false)
  %51 = load ptr, ptr @gevGetStrOpt, align 8, !tbaa !5
  %52 = load ptr, ptr %10, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.rhpRec, ptr %52, i32 0, i32 2
  %54 = load ptr, ptr %53, align 8, !tbaa !13
  %55 = getelementptr inbounds [256 x i8], ptr %6, i64 0, i64 0
  %56 = call ptr %51(ptr noundef %54, ptr noundef @.str.6, ptr noundef %55)
  %57 = getelementptr inbounds [256 x i8], ptr %6, i64 0, i64 0
  %58 = getelementptr inbounds [256 x i8], ptr %5, i64 0, i64 0
  %59 = call i32 @dctGetReadyD(ptr noundef %57, ptr noundef %58, i32 noundef 256)
  %60 = icmp ne i32 %59, 0
  br i1 %60, label %67, label %61

61:                                               ; preds = %44
  %62 = load ptr, ptr @gevLogStat, align 8, !tbaa !5
  %63 = load ptr, ptr %10, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.rhpRec, ptr %63, i32 0, i32 2
  %65 = load ptr, ptr %64, align 8, !tbaa !13
  %66 = getelementptr inbounds [256 x i8], ptr %5, i64 0, i64 0
  call void %62(ptr noundef %65, ptr noundef %66)
  store i32 1, ptr %7, align 4, !tbaa !9
  br label %298

67:                                               ; preds = %44
  %68 = getelementptr inbounds [256 x i8], ptr %5, i64 0, i64 0
  %69 = call i32 @dctCorrectLibraryVersion(ptr noundef %68, i32 noundef 256)
  %70 = icmp ne i32 %69, 0
  br i1 %70, label %85, label %71

71:                                               ; preds = %67
  %72 = load ptr, ptr @gevLogStat, align 8, !tbaa !5
  %73 = load ptr, ptr %10, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.rhpRec, ptr %73, i32 0, i32 2
  %75 = load ptr, ptr %74, align 8, !tbaa !13
  call void %72(ptr noundef %75, ptr noundef @.str.7)
  %76 = load ptr, ptr @gevLogStat, align 8, !tbaa !5
  %77 = load ptr, ptr %10, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.rhpRec, ptr %77, i32 0, i32 2
  %79 = load ptr, ptr %78, align 8, !tbaa !13
  %80 = getelementptr inbounds [256 x i8], ptr %5, i64 0, i64 0
  call void %76(ptr noundef %79, ptr noundef %80)
  %81 = load ptr, ptr @gevLogStat, align 8, !tbaa !5
  %82 = load ptr, ptr %10, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.rhpRec, ptr %82, i32 0, i32 2
  %84 = load ptr, ptr %83, align 8, !tbaa !13
  call void %81(ptr noundef %84, ptr noundef @.str.8)
  br label %85

85:                                               ; preds = %71, %67
  %86 = load ptr, ptr @gmoDictionary, align 8, !tbaa !5
  %87 = load ptr, ptr %4, align 8, !tbaa !5
  %88 = call i32 %86(ptr noundef %87)
  %89 = icmp ne i32 %88, 0
  br i1 %89, label %90, label %96

90:                                               ; preds = %85
  %91 = load ptr, ptr @gmoDict, align 8, !tbaa !5
  %92 = load ptr, ptr %4, align 8, !tbaa !5
  %93 = call ptr %91(ptr noundef %92)
  %94 = load ptr, ptr %10, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.rhpRec, ptr %94, i32 0, i32 3
  store ptr %93, ptr %95, align 8, !tbaa !14
  br label %101

96:                                               ; preds = %85
  %97 = load ptr, ptr @gevLogStat, align 8, !tbaa !5
  %98 = load ptr, ptr %10, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.rhpRec, ptr %98, i32 0, i32 2
  %100 = load ptr, ptr %99, align 8, !tbaa !13
  call void %97(ptr noundef %100, ptr noundef @.str.9)
  store i32 1, ptr %7, align 4, !tbaa !9
  br label %298

101:                                              ; preds = %90
  %102 = load ptr, ptr %10, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.rhpRec, ptr %102, i32 0, i32 4
  %104 = getelementptr inbounds [256 x i8], ptr %6, i64 0, i64 0
  %105 = getelementptr inbounds [256 x i8], ptr %5, i64 0, i64 0
  %106 = call i32 @cfgCreateD(ptr noundef %103, ptr noundef %104, ptr noundef %105, i32 noundef 256)
  %107 = icmp ne i32 %106, 0
  br i1 %107, label %114, label %108

108:                                              ; preds = %101
  %109 = load ptr, ptr @gevLogStat, align 8, !tbaa !5
  %110 = load ptr, ptr %10, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.rhpRec, ptr %110, i32 0, i32 2
  %112 = load ptr, ptr %111, align 8, !tbaa !13
  %113 = getelementptr inbounds [256 x i8], ptr %5, i64 0, i64 0
  call void %109(ptr noundef %112, ptr noundef %113)
  store i32 1, ptr %7, align 4, !tbaa !9
  br label %298

114:                                              ; preds = %101
  %115 = getelementptr inbounds [256 x i8], ptr %6, i64 0, i64 0
  %116 = call i64 @strlen(ptr noundef %115) #6
  store i64 %116, ptr %11, align 8, !tbaa !15
  %117 = load i64, ptr %11, align 8, !tbaa !15
  %118 = add i64 %117, 13
  %119 = icmp ule i64 256, %118
  br i1 %119, label %120, label %125

120:                                              ; preds = %114
  %121 = load ptr, ptr @gevLogStat, align 8, !tbaa !5
  %122 = load ptr, ptr %10, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.rhpRec, ptr %122, i32 0, i32 2
  %124 = load ptr, ptr %123, align 8, !tbaa !13
  call void %121(ptr noundef %124, ptr noundef @.str.10)
  store i32 1, ptr %7, align 4, !tbaa !9
  br label %298

125:                                              ; preds = %114
  %126 = getelementptr inbounds [256 x i8], ptr %6, i64 0, i64 0
  %127 = call ptr @strcat(ptr noundef %126, ptr noundef @.str.11) #5
  %128 = load ptr, ptr @cfgReadConfig, align 8, !tbaa !5
  %129 = load ptr, ptr %10, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.rhpRec, ptr %129, i32 0, i32 4
  %131 = load ptr, ptr %130, align 8, !tbaa !17
  %132 = getelementptr inbounds [256 x i8], ptr %6, i64 0, i64 0
  %133 = call i32 %128(ptr noundef %131, ptr noundef %132)
  %134 = icmp ne i32 %133, 0
  br i1 %134, label %135, label %165

135:                                              ; preds = %125
  %136 = load ptr, ptr @gevLogStatPChar, align 8, !tbaa !5
  %137 = load ptr, ptr %10, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.rhpRec, ptr %137, i32 0, i32 2
  %139 = load ptr, ptr %138, align 8, !tbaa !13
  call void %136(ptr noundef %139, ptr noundef @.str.12)
  %140 = load ptr, ptr @gevLogStat, align 8, !tbaa !5
  %141 = load ptr, ptr %10, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.rhpRec, ptr %141, i32 0, i32 2
  %143 = load ptr, ptr %142, align 8, !tbaa !13
  %144 = getelementptr inbounds [256 x i8], ptr %6, i64 0, i64 0
  call void %140(ptr noundef %143, ptr noundef %144)
  br label %145

145:                                              ; preds = %152, %135
  %146 = load ptr, ptr @cfgNumMsg, align 8, !tbaa !5
  %147 = load ptr, ptr %10, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct.rhpRec, ptr %147, i32 0, i32 4
  %149 = load ptr, ptr %148, align 8, !tbaa !17
  %150 = call i32 %146(ptr noundef %149)
  %151 = icmp sgt i32 %150, 0
  br i1 %151, label %152, label %164

152:                                              ; preds = %145
  %153 = load ptr, ptr @cfgGetMsg, align 8, !tbaa !5
  %154 = load ptr, ptr %10, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct.rhpRec, ptr %154, i32 0, i32 4
  %156 = load ptr, ptr %155, align 8, !tbaa !17
  %157 = getelementptr inbounds [256 x i8], ptr %5, i64 0, i64 0
  %158 = call ptr %153(ptr noundef %156, ptr noundef %157)
  %159 = load ptr, ptr @gevLogStat, align 8, !tbaa !5
  %160 = load ptr, ptr %10, align 8, !tbaa !5
  %161 = getelementptr inbounds %struct.rhpRec, ptr %160, i32 0, i32 2
  %162 = load ptr, ptr %161, align 8, !tbaa !13
  %163 = getelementptr inbounds [256 x i8], ptr %5, i64 0, i64 0
  call void %159(ptr noundef %162, ptr noundef %163)
  br label %145, !llvm.loop !18

164:                                              ; preds = %145
  store i32 1, ptr %7, align 4, !tbaa !9
  br label %298

165:                                              ; preds = %125
  %166 = load i64, ptr %11, align 8, !tbaa !15
  %167 = getelementptr inbounds [256 x i8], ptr %6, i64 0, i64 %166
  store i8 0, ptr %167, align 1, !tbaa !20
  %168 = load ptr, ptr @gevTerminateInstall, align 8, !tbaa !5
  %169 = load ptr, ptr %10, align 8, !tbaa !5
  %170 = getelementptr inbounds %struct.rhpRec, ptr %169, i32 0, i32 2
  %171 = load ptr, ptr %170, align 8, !tbaa !13
  call void %168(ptr noundef %171)
  %172 = load ptr, ptr %10, align 8, !tbaa !5
  %173 = getelementptr inbounds %struct.rhpRec, ptr %172, i32 0, i32 0
  %174 = load ptr, ptr %173, align 8, !tbaa !21
  %175 = icmp ne ptr %174, null
  br i1 %175, label %210, label %176

176:                                              ; preds = %165
  %177 = getelementptr inbounds [256 x i8], ptr %6, i64 0, i64 0
  %178 = getelementptr inbounds [256 x i8], ptr %5, i64 0, i64 0
  %179 = call i32 @optGetReadyD(ptr noundef %177, ptr noundef %178, i32 noundef 256)
  %180 = icmp ne i32 %179, 0
  br i1 %180, label %191, label %181

181:                                              ; preds = %176
  %182 = load ptr, ptr @gevLogStatPChar, align 8, !tbaa !5
  %183 = load ptr, ptr %10, align 8, !tbaa !5
  %184 = getelementptr inbounds %struct.rhpRec, ptr %183, i32 0, i32 2
  %185 = load ptr, ptr %184, align 8, !tbaa !13
  call void %182(ptr noundef %185, ptr noundef @.str.13)
  %186 = load ptr, ptr @gevLogStat, align 8, !tbaa !5
  %187 = load ptr, ptr %10, align 8, !tbaa !5
  %188 = getelementptr inbounds %struct.rhpRec, ptr %187, i32 0, i32 2
  %189 = load ptr, ptr %188, align 8, !tbaa !13
  %190 = getelementptr inbounds [256 x i8], ptr %5, i64 0, i64 0
  call void %186(ptr noundef %189, ptr noundef %190)
  store i32 1, ptr %7, align 4, !tbaa !9
  br label %298

191:                                              ; preds = %176
  %192 = load ptr, ptr %10, align 8, !tbaa !5
  %193 = getelementptr inbounds %struct.rhpRec, ptr %192, i32 0, i32 0
  %194 = getelementptr inbounds [256 x i8], ptr %5, i64 0, i64 0
  %195 = call i32 @optCreate(ptr noundef %193, ptr noundef %194, i32 noundef 256)
  %196 = icmp ne i32 %195, 0
  br i1 %196, label %207, label %197

197:                                              ; preds = %191
  %198 = load ptr, ptr @gevLogStatPChar, align 8, !tbaa !5
  %199 = load ptr, ptr %10, align 8, !tbaa !5
  %200 = getelementptr inbounds %struct.rhpRec, ptr %199, i32 0, i32 2
  %201 = load ptr, ptr %200, align 8, !tbaa !13
  call void %198(ptr noundef %201, ptr noundef @.str.14)
  %202 = load ptr, ptr @gevLogStat, align 8, !tbaa !5
  %203 = load ptr, ptr %10, align 8, !tbaa !5
  %204 = getelementptr inbounds %struct.rhpRec, ptr %203, i32 0, i32 2
  %205 = load ptr, ptr %204, align 8, !tbaa !13
  %206 = getelementptr inbounds [256 x i8], ptr %5, i64 0, i64 0
  call void %202(ptr noundef %205, ptr noundef %206)
  store i32 1, ptr %7, align 4, !tbaa !9
  br label %298

207:                                              ; preds = %191
  %208 = load ptr, ptr %10, align 8, !tbaa !5
  %209 = getelementptr inbounds %struct.rhpRec, ptr %208, i32 0, i32 5
  store i32 1, ptr %209, align 8, !tbaa !22
  store i8 1, ptr %8, align 1, !tbaa !23
  br label %211

210:                                              ; preds = %165
  store i8 0, ptr %8, align 1, !tbaa !23
  br label %211

211:                                              ; preds = %210, %207
  %212 = load ptr, ptr %10, align 8, !tbaa !5
  %213 = load i8, ptr %8, align 1, !tbaa !23, !range !25, !noundef !26
  %214 = trunc i8 %213 to i1
  %215 = getelementptr inbounds [256 x i8], ptr %6, i64 0, i64 0
  %216 = call i32 @opt_process(ptr noundef %212, i1 noundef zeroext %214, ptr noundef %215)
  store i32 %216, ptr %7, align 4, !tbaa !9
  %217 = load i32, ptr %7, align 4, !tbaa !9
  %218 = icmp ne i32 %217, 0
  br i1 %218, label %219, label %228

219:                                              ; preds = %211
  %220 = getelementptr inbounds [256 x i8], ptr %5, i64 0, i64 0
  %221 = load i32, ptr %7, align 4, !tbaa !9
  %222 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %220, i64 noundef 256, ptr noundef @.str.15, i32 noundef %221) #5
  %223 = load ptr, ptr @gevLogStat, align 8, !tbaa !5
  %224 = load ptr, ptr %10, align 8, !tbaa !5
  %225 = getelementptr inbounds %struct.rhpRec, ptr %224, i32 0, i32 2
  %226 = load ptr, ptr %225, align 8, !tbaa !13
  %227 = getelementptr inbounds [256 x i8], ptr %5, i64 0, i64 0
  call void %223(ptr noundef %226, ptr noundef %227)
  store i32 1, ptr %7, align 4, !tbaa !9
  br label %298

228:                                              ; preds = %211
  call void @rhp_print_banner()
  %229 = call i32 @rhp_syncenv()
  %230 = icmp ne i32 %229, 0
  br i1 %230, label %231, label %236

231:                                              ; preds = %228
  %232 = load ptr, ptr @gevLogStat, align 8, !tbaa !5
  %233 = load ptr, ptr %10, align 8, !tbaa !5
  %234 = getelementptr inbounds %struct.rhpRec, ptr %233, i32 0, i32 2
  %235 = load ptr, ptr %234, align 8, !tbaa !13
  call void %232(ptr noundef %235, ptr noundef @.str.16)
  store i32 1, ptr %7, align 4, !tbaa !9
  br label %298

236:                                              ; preds = %228
  %237 = getelementptr inbounds [256 x i8], ptr %6, i64 0, i64 0
  %238 = call i32 @rhp_gms_loadlibs(ptr noundef %237)
  %239 = icmp ne i32 %238, 0
  br i1 %239, label %240, label %245

240:                                              ; preds = %236
  %241 = load ptr, ptr @gevLogStat, align 8, !tbaa !5
  %242 = load ptr, ptr %10, align 8, !tbaa !5
  %243 = getelementptr inbounds %struct.rhpRec, ptr %242, i32 0, i32 2
  %244 = load ptr, ptr %243, align 8, !tbaa !13
  call void %241(ptr noundef %244, ptr noundef @.str.17)
  store i32 1, ptr %7, align 4, !tbaa !9
  br label %298

245:                                              ; preds = %236
  %246 = call noalias ptr @rhp_mdl_new(i32 noundef 0)
  store ptr %246, ptr %9, align 8, !tbaa !5
  %247 = load ptr, ptr %9, align 8, !tbaa !5
  %248 = icmp ne ptr %247, null
  br i1 %248, label %254, label %249

249:                                              ; preds = %245
  %250 = load ptr, ptr @gevLogStat, align 8, !tbaa !5
  %251 = load ptr, ptr %10, align 8, !tbaa !5
  %252 = getelementptr inbounds %struct.rhpRec, ptr %251, i32 0, i32 2
  %253 = load ptr, ptr %252, align 8, !tbaa !13
  call void %250(ptr noundef %253, ptr noundef @.str.18)
  store i32 1, ptr %7, align 4, !tbaa !9
  br label %298

254:                                              ; preds = %245
  %255 = load ptr, ptr %9, align 8, !tbaa !5
  %256 = load ptr, ptr %10, align 8, !tbaa !5
  %257 = getelementptr inbounds %struct.rhpRec, ptr %256, i32 0, i32 6
  store ptr %255, ptr %257, align 8, !tbaa !27
  %258 = load ptr, ptr %10, align 8, !tbaa !5
  %259 = getelementptr inbounds %struct.rhpRec, ptr %258, i32 0, i32 0
  %260 = load ptr, ptr %259, align 8, !tbaa !21
  %261 = getelementptr inbounds %struct.rhp_gams_handles, ptr %12, i32 0, i32 0
  store ptr %260, ptr %261, align 8, !tbaa !28
  %262 = load ptr, ptr %10, align 8, !tbaa !5
  %263 = getelementptr inbounds %struct.rhpRec, ptr %262, i32 0, i32 1
  %264 = load ptr, ptr %263, align 8, !tbaa !11
  %265 = getelementptr inbounds %struct.rhp_gams_handles, ptr %12, i32 0, i32 1
  store ptr %264, ptr %265, align 8, !tbaa !30
  %266 = load ptr, ptr %10, align 8, !tbaa !5
  %267 = getelementptr inbounds %struct.rhpRec, ptr %266, i32 0, i32 2
  %268 = load ptr, ptr %267, align 8, !tbaa !13
  %269 = getelementptr inbounds %struct.rhp_gams_handles, ptr %12, i32 0, i32 2
  store ptr %268, ptr %269, align 8, !tbaa !31
  %270 = load ptr, ptr %10, align 8, !tbaa !5
  %271 = getelementptr inbounds %struct.rhpRec, ptr %270, i32 0, i32 3
  %272 = load ptr, ptr %271, align 8, !tbaa !14
  %273 = getelementptr inbounds %struct.rhp_gams_handles, ptr %12, i32 0, i32 3
  store ptr %272, ptr %273, align 8, !tbaa !32
  %274 = load ptr, ptr %10, align 8, !tbaa !5
  %275 = getelementptr inbounds %struct.rhpRec, ptr %274, i32 0, i32 4
  %276 = load ptr, ptr %275, align 8, !tbaa !17
  %277 = getelementptr inbounds %struct.rhp_gams_handles, ptr %12, i32 0, i32 4
  store ptr %276, ptr %277, align 8, !tbaa !33
  %278 = load ptr, ptr %9, align 8, !tbaa !5
  %279 = call i32 @rhp_gms_fillgmshandles(ptr noundef %278, ptr noundef %12)
  store i32 %279, ptr %7, align 4, !tbaa !9
  %280 = load i32, ptr %7, align 4, !tbaa !9
  %281 = icmp ne i32 %280, 0
  br i1 %281, label %282, label %287

282:                                              ; preds = %254
  %283 = load ptr, ptr @gevLogStat, align 8, !tbaa !5
  %284 = load ptr, ptr %10, align 8, !tbaa !5
  %285 = getelementptr inbounds %struct.rhpRec, ptr %284, i32 0, i32 2
  %286 = load ptr, ptr %285, align 8, !tbaa !13
  call void %283(ptr noundef %286, ptr noundef @.str.19)
  store i32 1, ptr %7, align 4, !tbaa !9
  br label %298

287:                                              ; preds = %254
  %288 = load ptr, ptr %9, align 8, !tbaa !5
  %289 = call i32 @rhp_gms_fillmdl(ptr noundef %288)
  store i32 %289, ptr %7, align 4, !tbaa !9
  %290 = load i32, ptr %7, align 4, !tbaa !9
  %291 = icmp ne i32 %290, 0
  br i1 %291, label %292, label %297

292:                                              ; preds = %287
  %293 = load ptr, ptr @gevLogStat, align 8, !tbaa !5
  %294 = load ptr, ptr %10, align 8, !tbaa !5
  %295 = getelementptr inbounds %struct.rhpRec, ptr %294, i32 0, i32 2
  %296 = load ptr, ptr %295, align 8, !tbaa !13
  call void %293(ptr noundef %296, ptr noundef @.str.20)
  store i32 1, ptr %7, align 4, !tbaa !9
  br label %298

297:                                              ; preds = %287
  br label %298

298:                                              ; preds = %297, %292, %282, %249, %240, %231, %219, %197, %181, %164, %120, %108, %96, %61, %40, %29, %22, %16
  %299 = load i32, ptr %7, align 4, !tbaa !9
  %300 = icmp ne i32 %299, 0
  br i1 %300, label %301, label %307

301:                                              ; preds = %298
  %302 = load ptr, ptr %9, align 8, !tbaa !5
  %303 = icmp ne ptr %302, null
  br i1 %303, label %304, label %306

304:                                              ; preds = %301
  %305 = load ptr, ptr %9, align 8, !tbaa !5
  call void @rhp_mdl_free(ptr noundef %305)
  br label %306

306:                                              ; preds = %304, %301
  br label %307

307:                                              ; preds = %306, %298
  %308 = load i32, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 256, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 256, ptr %5) #5
  ret i32 %308
}

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

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

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

declare void @rhp_set_printops(ptr noundef, ptr noundef, ptr noundef, i1 noundef zeroext) #1

declare void @printgams(ptr noundef, i32 noundef, ptr noundef) #1

declare void @flushgams(ptr noundef) #1

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

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

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

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #4

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

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

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

declare i32 @opt_process(ptr noundef, i1 noundef zeroext, ptr noundef) #1

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

declare void @rhp_print_banner() #1

declare i32 @rhp_syncenv() #1

declare i32 @rhp_gms_loadlibs(ptr noundef) #1

declare noalias ptr @rhp_mdl_new(i32 noundef) #1

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

declare i32 @rhp_gms_fillmdl(ptr noundef) #1

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 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, !6, i64 8}
!12 = !{!"rhpRec", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !10, i64 40, !6, i64 48}
!13 = !{!12, !6, i64 16}
!14 = !{!12, !6, i64 24}
!15 = !{!16, !16, i64 0}
!16 = !{!"long", !7, i64 0}
!17 = !{!12, !6, i64 32}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = !{!7, !7, i64 0}
!21 = !{!12, !6, i64 0}
!22 = !{!12, !10, i64 40}
!23 = !{!24, !24, i64 0}
!24 = !{!"_Bool", !7, i64 0}
!25 = !{i8 0, i8 2}
!26 = !{}
!27 = !{!12, !6, i64 48}
!28 = !{!29, !6, i64 0}
!29 = !{!"rhp_gams_handles", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32}
!30 = !{!29, !6, i64 8}
!31 = !{!29, !6, i64 16}
!32 = !{!29, !6, i64 24}
!33 = !{!29, !6, 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.rhp_gams_handles = type { ptr, ptr, ptr, ptr, ptr }

@stderr = external local_unnamed_addr global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [52 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8
@.str.5 = external hidden unnamed_addr constant [4 x i8], align 1
@gmoEnvironment = external local_unnamed_addr global ptr, align 8
@gevGetStrOpt = external local_unnamed_addr global ptr, align 8
@.str.6 = external hidden unnamed_addr constant [11 x i8], align 1
@gevLogStat = external local_unnamed_addr global ptr, align 8
@.str.7 = external hidden unnamed_addr constant [82 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [87 x i8], align 1
@gmoDictionary = external local_unnamed_addr global ptr, align 8
@gmoDict = external local_unnamed_addr global ptr, align 8
@.str.9 = external hidden unnamed_addr constant [64 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [13 x i8], align 1
@cfgReadConfig = external local_unnamed_addr global ptr, align 8
@gevLogStatPChar = external local_unnamed_addr global ptr, align 8
@.str.12 = external hidden unnamed_addr constant [47 x i8], align 1
@cfgNumMsg = external local_unnamed_addr global ptr, align 8
@cfgGetMsg = external local_unnamed_addr global ptr, align 8
@gevTerminateInstall = external local_unnamed_addr global ptr, align 8
@.str.13 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [62 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [69 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [45 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

declare void @rhp_mdl_free(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @rhpReadyAPI(ptr noundef %0, ptr noundef %1) local_unnamed_addr #2 {
  %3 = alloca [256 x i8], align 16
  %4 = alloca [256 x i8], align 16
  %5 = alloca %struct.rhp_gams_handles, align 16
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %4) #6
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %6, label %9

6:                                                ; preds = %2
  %7 = load ptr, ptr @stderr, align 8, !tbaa !5
  %8 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %7, ptr noundef nonnull @.str.3) #7
  br label %.thread

9:                                                ; preds = %2
  %.not69 = icmp eq ptr %1, null
  br i1 %.not69, label %10, label %13

10:                                               ; preds = %9
  %11 = load ptr, ptr @stderr, align 8, !tbaa !5
  %12 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %11, ptr noundef nonnull @.str.4) #7
  br label %.thread

13:                                               ; preds = %9
  %14 = call i32 @gmoGetReady(ptr noundef nonnull %3, i32 noundef 256) #6
  %.not70 = icmp eq i32 %14, 0
  br i1 %.not70, label %15, label %18

15:                                               ; preds = %13
  %16 = load ptr, ptr @stdout, align 8, !tbaa !5
  %17 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %16, ptr noundef nonnull @.str.5, ptr noundef nonnull %3) #6
  br label %.thread

18:                                               ; preds = %13
  %19 = getelementptr inbounds i8, ptr %0, i64 8
  store ptr %1, ptr %19, align 8, !tbaa !9
  %20 = call i32 @gevGetReady(ptr noundef nonnull %3, i32 noundef 256) #6
  %.not71 = icmp eq i32 %20, 0
  br i1 %.not71, label %21, label %24

21:                                               ; preds = %18
  %22 = load ptr, ptr @stdout, align 8, !tbaa !5
  %23 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %22, ptr noundef nonnull @.str.5, ptr noundef nonnull %3) #6
  br label %.thread

24:                                               ; preds = %18
  %25 = load ptr, ptr @gmoEnvironment, align 8, !tbaa !5
  %26 = call ptr %25(ptr noundef nonnull %1) #6
  %27 = getelementptr inbounds i8, ptr %0, i64 16
  store ptr %26, ptr %27, align 8, !tbaa !12
  call void @rhp_set_printops(ptr noundef nonnull %0, ptr noundef nonnull @printgams, ptr noundef nonnull @flushgams, i1 noundef zeroext false) #6
  %28 = load ptr, ptr @gevGetStrOpt, align 8, !tbaa !5
  %29 = load ptr, ptr %27, align 8, !tbaa !12
  %30 = call ptr %28(ptr noundef %29, ptr noundef nonnull @.str.6, ptr noundef nonnull %4) #6
  %31 = call i32 @dctGetReadyD(ptr noundef nonnull %4, ptr noundef nonnull %3, i32 noundef 256) #6
  %.not72 = icmp eq i32 %31, 0
  br i1 %.not72, label %32, label %35

32:                                               ; preds = %24
  %33 = load ptr, ptr @gevLogStat, align 8, !tbaa !5
  %34 = load ptr, ptr %27, align 8, !tbaa !12
  call void %33(ptr noundef %34, ptr noundef nonnull %3) #6
  br label %.thread

35:                                               ; preds = %24
  %36 = call i32 @dctCorrectLibraryVersion(ptr noundef nonnull %3, i32 noundef 256) #6
  %.not73 = icmp eq i32 %36, 0
  br i1 %.not73, label %37, label %44

37:                                               ; preds = %35
  %38 = load ptr, ptr @gevLogStat, align 8, !tbaa !5
  %39 = load ptr, ptr %27, align 8, !tbaa !12
  call void %38(ptr noundef %39, ptr noundef nonnull @.str.7) #6
  %40 = load ptr, ptr @gevLogStat, align 8, !tbaa !5
  %41 = load ptr, ptr %27, align 8, !tbaa !12
  call void %40(ptr noundef %41, ptr noundef nonnull %3) #6
  %42 = load ptr, ptr @gevLogStat, align 8, !tbaa !5
  %43 = load ptr, ptr %27, align 8, !tbaa !12
  call void %42(ptr noundef %43, ptr noundef nonnull @.str.8) #6
  br label %44

44:                                               ; preds = %37, %35
  %45 = load ptr, ptr @gmoDictionary, align 8, !tbaa !5
  %46 = call i32 %45(ptr noundef nonnull %1) #6
  %.not74 = icmp eq i32 %46, 0
  br i1 %.not74, label %53, label %47

47:                                               ; preds = %44
  %48 = load ptr, ptr @gmoDict, align 8, !tbaa !5
  %49 = call ptr %48(ptr noundef nonnull %1) #6
  %50 = getelementptr inbounds i8, ptr %0, i64 24
  store ptr %49, ptr %50, align 8, !tbaa !13
  %51 = getelementptr inbounds i8, ptr %0, i64 32
  %52 = call i32 @cfgCreateD(ptr noundef nonnull %51, ptr noundef nonnull %4, ptr noundef nonnull %3, i32 noundef 256) #6
  %.not75 = icmp eq i32 %52, 0
  br i1 %.not75, label %56, label %59

53:                                               ; preds = %44
  %54 = load ptr, ptr @gevLogStat, align 8, !tbaa !5
  %55 = load ptr, ptr %27, align 8, !tbaa !12
  call void %54(ptr noundef %55, ptr noundef nonnull @.str.9) #6
  br label %.thread

56:                                               ; preds = %47
  %57 = load ptr, ptr @gevLogStat, align 8, !tbaa !5
  %58 = load ptr, ptr %27, align 8, !tbaa !12
  call void %57(ptr noundef %58, ptr noundef nonnull %3) #6
  br label %.thread

59:                                               ; preds = %47
  %60 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %4) #8
  %61 = add i64 %60, -243
  %62 = icmp ult i64 %61, -256
  br i1 %62, label %63, label %66

63:                                               ; preds = %59
  %64 = load ptr, ptr @gevLogStat, align 8, !tbaa !5
  %65 = load ptr, ptr %27, align 8, !tbaa !12
  call void %64(ptr noundef %65, ptr noundef nonnull @.str.10) #6
  br label %.thread

66:                                               ; preds = %59
  %67 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %4, ptr noundef nonnull dereferenceable(1) @.str.11) #6
  %68 = load ptr, ptr @cfgReadConfig, align 8, !tbaa !5
  %69 = load ptr, ptr %51, align 8, !tbaa !14
  %70 = call i32 %68(ptr noundef %69, ptr noundef nonnull %4) #6
  %.not76 = icmp eq i32 %70, 0
  br i1 %.not76, label %89, label %71

71:                                               ; preds = %66
  %72 = load ptr, ptr @gevLogStatPChar, align 8, !tbaa !5
  %73 = load ptr, ptr %27, align 8, !tbaa !12
  call void %72(ptr noundef %73, ptr noundef nonnull @.str.12) #6
  %74 = load ptr, ptr @gevLogStat, align 8, !tbaa !5
  %75 = load ptr, ptr %27, align 8, !tbaa !12
  call void %74(ptr noundef %75, ptr noundef nonnull %4) #6
  %76 = load ptr, ptr @cfgNumMsg, align 8, !tbaa !5
  %77 = load ptr, ptr %51, align 8, !tbaa !14
  %78 = call i32 %76(ptr noundef %77) #6
  %79 = icmp sgt i32 %78, 0
  br i1 %79, label %.lr.ph, label %.thread

.lr.ph:                                           ; preds = %71, %.lr.ph
  %80 = load ptr, ptr @cfgGetMsg, align 8, !tbaa !5
  %81 = load ptr, ptr %51, align 8, !tbaa !14
  %82 = call ptr %80(ptr noundef %81, ptr noundef nonnull %3) #6
  %83 = load ptr, ptr @gevLogStat, align 8, !tbaa !5
  %84 = load ptr, ptr %27, align 8, !tbaa !12
  call void %83(ptr noundef %84, ptr noundef nonnull %3) #6
  %85 = load ptr, ptr @cfgNumMsg, align 8, !tbaa !5
  %86 = load ptr, ptr %51, align 8, !tbaa !14
  %87 = call i32 %85(ptr noundef %86) #6
  %88 = icmp sgt i32 %87, 0
  br i1 %88, label %.lr.ph, label %.thread, !llvm.loop !15

89:                                               ; preds = %66
  %90 = getelementptr inbounds [256 x i8], ptr %4, i64 0, i64 %60
  store i8 0, ptr %90, align 1, !tbaa !17
  %91 = load ptr, ptr @gevTerminateInstall, align 8, !tbaa !5
  %92 = load ptr, ptr %27, align 8, !tbaa !12
  call void %91(ptr noundef %92) #6
  %93 = load ptr, ptr %0, align 8, !tbaa !18
  %.not77 = icmp eq ptr %93, null
  br i1 %.not77, label %94, label %110

94:                                               ; preds = %89
  %95 = call i32 @optGetReadyD(ptr noundef nonnull %4, ptr noundef nonnull %3, i32 noundef 256) #6
  %.not78 = icmp eq i32 %95, 0
  br i1 %.not78, label %96, label %101

96:                                               ; preds = %94
  %97 = load ptr, ptr @gevLogStatPChar, align 8, !tbaa !5
  %98 = load ptr, ptr %27, align 8, !tbaa !12
  call void %97(ptr noundef %98, ptr noundef nonnull @.str.13) #6
  %99 = load ptr, ptr @gevLogStat, align 8, !tbaa !5
  %100 = load ptr, ptr %27, align 8, !tbaa !12
  call void %99(ptr noundef %100, ptr noundef nonnull %3) #6
  br label %.thread

101:                                              ; preds = %94
  %102 = call i32 @optCreate(ptr noundef nonnull %0, ptr noundef nonnull %3, i32 noundef 256) #6
  %.not79 = icmp eq i32 %102, 0
  br i1 %.not79, label %103, label %108

103:                                              ; preds = %101
  %104 = load ptr, ptr @gevLogStatPChar, align 8, !tbaa !5
  %105 = load ptr, ptr %27, align 8, !tbaa !12
  call void %104(ptr noundef %105, ptr noundef nonnull @.str.14) #6
  %106 = load ptr, ptr @gevLogStat, align 8, !tbaa !5
  %107 = load ptr, ptr %27, align 8, !tbaa !12
  call void %106(ptr noundef %107, ptr noundef nonnull %3) #6
  br label %.thread

108:                                              ; preds = %101
  %109 = getelementptr inbounds i8, ptr %0, i64 40
  store i32 1, ptr %109, align 8, !tbaa !19
  br label %110

110:                                              ; preds = %89, %108
  %111 = call i32 @opt_process(ptr noundef nonnull %0, i1 noundef zeroext %.not77, ptr noundef nonnull %4) #6
  %.not80 = icmp eq i32 %111, 0
  br i1 %.not80, label %116, label %112

112:                                              ; preds = %110
  %113 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %3, i64 noundef 256, ptr noundef nonnull @.str.15, i32 noundef %111) #6
  %114 = load ptr, ptr @gevLogStat, align 8, !tbaa !5
  %115 = load ptr, ptr %27, align 8, !tbaa !12
  call void %114(ptr noundef %115, ptr noundef nonnull %3) #6
  br label %.thread

116:                                              ; preds = %110
  call void @rhp_print_banner() #6
  %117 = call i32 @rhp_syncenv() #6
  %.not81 = icmp eq i32 %117, 0
  br i1 %.not81, label %121, label %118

118:                                              ; preds = %116
  %119 = load ptr, ptr @gevLogStat, align 8, !tbaa !5
  %120 = load ptr, ptr %27, align 8, !tbaa !12
  call void %119(ptr noundef %120, ptr noundef nonnull @.str.16) #6
  br label %.thread

121:                                              ; preds = %116
  %122 = call i32 @rhp_gms_loadlibs(ptr noundef nonnull %4) #6
  %.not82 = icmp eq i32 %122, 0
  br i1 %.not82, label %126, label %123

123:                                              ; preds = %121
  %124 = load ptr, ptr @gevLogStat, align 8, !tbaa !5
  %125 = load ptr, ptr %27, align 8, !tbaa !12
  call void %124(ptr noundef %125, ptr noundef nonnull @.str.17) #6
  br label %.thread

126:                                              ; preds = %121
  %127 = call noalias ptr @rhp_mdl_new(i32 noundef 0) #6
  %.not83 = icmp eq ptr %127, null
  br i1 %.not83, label %128, label %131

128:                                              ; preds = %126
  %129 = load ptr, ptr @gevLogStat, align 8, !tbaa !5
  %130 = load ptr, ptr %27, align 8, !tbaa !12
  call void %129(ptr noundef %130, ptr noundef nonnull @.str.18) #6
  br label %.thread

131:                                              ; preds = %126
  %132 = getelementptr inbounds i8, ptr %0, i64 48
  store ptr %127, ptr %132, align 8, !tbaa !20
  %133 = load <2 x ptr>, ptr %0, align 8, !tbaa !5
  store <2 x ptr> %133, ptr %5, align 16, !tbaa !5
  %134 = getelementptr inbounds i8, ptr %5, i64 16
  %135 = load <2 x ptr>, ptr %27, align 8, !tbaa !5
  store <2 x ptr> %135, ptr %134, align 16, !tbaa !5
  %136 = load ptr, ptr %51, align 8, !tbaa !14
  %137 = getelementptr inbounds i8, ptr %5, i64 32
  store ptr %136, ptr %137, align 16, !tbaa !21
  %138 = call i32 @rhp_gms_fillgmshandles(ptr noundef nonnull %127, ptr noundef nonnull %5) #6
  %.not84 = icmp eq i32 %138, 0
  br i1 %.not84, label %139, label %141

139:                                              ; preds = %131
  %140 = call i32 @rhp_gms_fillmdl(ptr noundef nonnull %127) #6
  %.not85 = icmp eq i32 %140, 0
  br i1 %.not85, label %.thread, label %141

141:                                              ; preds = %139, %131
  %.str.19.sink = phi ptr [ @.str.19, %131 ], [ @.str.20, %139 ]
  %142 = load ptr, ptr @gevLogStat, align 8, !tbaa !5
  %143 = load ptr, ptr %27, align 8, !tbaa !12
  call void %142(ptr noundef %143, ptr noundef nonnull %.str.19.sink) #6
  call void @rhp_mdl_free(ptr noundef nonnull %127) #6
  br label %.thread

.thread:                                          ; preds = %.lr.ph, %71, %6, %10, %15, %21, %32, %53, %56, %96, %103, %128, %123, %118, %112, %63, %139, %141
  %.089 = phi i32 [ 1, %141 ], [ 1, %6 ], [ 1, %10 ], [ 1, %15 ], [ 1, %21 ], [ 1, %32 ], [ 1, %53 ], [ 1, %56 ], [ 1, %96 ], [ 1, %103 ], [ 1, %128 ], [ 0, %139 ], [ 1, %123 ], [ 1, %118 ], [ 1, %112 ], [ 1, %63 ], [ 1, %71 ], [ 1, %.lr.ph ]
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %3) #6
  ret i32 %.089
}

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

declare i32 @gmoGetReady(ptr noundef, i32 noundef) local_unnamed_addr #1

declare i32 @gevGetReady(ptr noundef, i32 noundef) local_unnamed_addr #1

declare void @rhp_set_printops(ptr noundef, ptr noundef, ptr noundef, i1 noundef zeroext) local_unnamed_addr #1

declare void @printgams(ptr noundef, i32 noundef, ptr noundef) #1

declare void @flushgams(ptr noundef) #1

declare i32 @dctGetReadyD(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

declare i32 @dctCorrectLibraryVersion(ptr noundef, i32 noundef) local_unnamed_addr #1

declare i32 @cfgCreateD(ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: readwrite)
declare ptr @strcat(ptr noalias noundef returned, ptr noalias nocapture noundef readonly) local_unnamed_addr #5

declare i32 @optGetReadyD(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

declare i32 @optCreate(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

declare i32 @opt_process(ptr noundef, i1 noundef zeroext, ptr noundef) local_unnamed_addr #1

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

declare void @rhp_print_banner() local_unnamed_addr #1

declare i32 @rhp_syncenv() local_unnamed_addr #1

declare i32 @rhp_gms_loadlibs(ptr noundef) local_unnamed_addr #1

declare noalias ptr @rhp_mdl_new(i32 noundef) local_unnamed_addr #1

declare i32 @rhp_gms_fillgmshandles(ptr noundef, ptr noundef) local_unnamed_addr #1

declare i32 @rhp_gms_fillmdl(ptr noundef) local_unnamed_addr #1

attributes #0 = { mustprogress 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 = { 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 = { 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 #5 = { mustprogress nofree nounwind willreturn memory(argmem: readwrite) "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 = { nounwind }
attributes #7 = { cold 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 8}
!10 = !{!"rhpRec", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !11, i64 40, !6, i64 48}
!11 = !{!"int", !7, i64 0}
!12 = !{!10, !6, i64 16}
!13 = !{!10, !6, i64 24}
!14 = !{!10, !6, i64 32}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!7, !7, i64 0}
!18 = !{!10, !6, i64 0}
!19 = !{!10, !11, i64 40}
!20 = !{!10, !6, i64 48}
!21 = !{!22, !6, i64 32}
!22 = !{!"rhp_gams_handles", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass