; LLVM IR from ligurio/unreliablefs :: unreliablefs/tests (fsx)

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

@file_size = external dso_local global i64, align 8
@simulatedopcount = external dso_local global i64, align 8
@closeprob = external dso_local global i32, align 4
@invlprob = external dso_local global i32, align 4
@debug = external dso_local global i32, align 4
@debugstart = external dso_local global i64, align 8
@maxfilelen = external dso_local global i64, align 8
@sizechecks = external dso_local global i32, align 4
@maxoplen = external dso_local global i32, align 4
@quiet = external dso_local global i32, align 4
@progressinterval = external dso_local global i64, align 8
@readbdy = external dso_local global i32, align 4
@style = external dso_local global i32, align 4
@truncbdy = external dso_local global i32, align 4
@writebdy = external dso_local global i32, align 4
@monitorstart = external dso_local global i64, align 8
@monitorend = external dso_local global i64, align 8
@lite = external dso_local global i32, align 4
@numops = external dso_local global i64, align 8
@randomoplen = external dso_local global i32, align 4
@seed = external dso_local global i32, align 4
@mapped_writes = external dso_local global i32, align 4
@mapped_reads = external dso_local global i32, align 4
@mapped_msync = external dso_local global i32, align 4
@fsxgoodfd = external dso_local global i32, align 4
@fsxlogf = external dso_local global ptr, align 8
@stdout = external global ptr, align 8
@good_buf = external dso_local global ptr, align 8
@fname = external dso_local global ptr, align 8
@temp_buf = external dso_local global ptr, align 8
@fd = external dso_local global i32, align 4
@page_mask = external dso_local global i32, align 4
@page_size = external dso_local global i32, align 4
@original_buf = external dso_local global ptr, align 8
@.str.86 = external hidden unnamed_addr constant [39 x i8], align 1
@optarg = external global ptr, align 8
@.str.87 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.88 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.89 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.90 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.91 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.92 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.93 = external hidden unnamed_addr constant [23 x i8], align 1
@optind = external global i32, align 4
@state = external dso_local global [256 x i8], align 16
@.str.94 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.95 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.96 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.97 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.98 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.99 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.100 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.101 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.102 = external hidden unnamed_addr constant [32 x i8], align 1

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

; Function Attrs: nounwind uwtable
declare dso_local void @warn(ptr noundef, ...) #1

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @prt(ptr noundef, ...) #1

; Function Attrs: nounwind uwtable
declare dso_local void @prterr(ptr noundef) #1

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #3

; Function Attrs: nounwind
declare i64 @lseek(i32 noundef, i64 noundef, i32 noundef) #0

declare i64 @write(i32 noundef, ptr noundef, i64 noundef) #4

; Function Attrs: nounwind uwtable
declare dso_local void @report_failure(i32 noundef) #1

declare i32 @close(i32 noundef) #4

; Function Attrs: nounwind uwtable
declare dso_local void @check_trunc_hack() #1

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

declare i32 @open(ptr noundef, i32 noundef, ...) #4

; Function Attrs: nounwind uwtable
declare dso_local void @test() #1

; Function Attrs: nounwind
declare i64 @random() #0

; Function Attrs: nounwind uwtable
declare dso_local void @cleanup(i32 noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @usage() #1

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

; Function Attrs: nounwind uwtable
define dso_local i32 @main(i32 noundef %0, ptr noundef %1) #1 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca [1024 x i8], align 16
  %10 = alloca [1024 x i8], align 16
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #8
  call void @llvm.lifetime.start.p0(i64 1024, ptr %9) #8
  call void @llvm.lifetime.start.p0(i64 1024, ptr %10) #8
  %13 = getelementptr inbounds [1024 x i8], ptr %9, i64 0, i64 0
  store i8 0, ptr %13, align 16, !tbaa !11
  %14 = getelementptr inbounds [1024 x i8], ptr %10, i64 0, i64 0
  store i8 0, ptr %14, align 16, !tbaa !11
  %15 = call i32 @getpagesize() #9
  store i32 %15, ptr @page_size, align 4, !tbaa !5
  %16 = load i32, ptr @page_size, align 4, !tbaa !5
  %17 = sub nsw i32 %16, 1
  store i32 %17, ptr @page_mask, align 4, !tbaa !5
  %18 = load ptr, ptr @stdout, align 8, !tbaa !9
  %19 = call i32 @setvbuf(ptr noundef %18, ptr noundef null, i32 noundef 1, i64 noundef 0) #8
  br label %20

20:                                               ; preds = %224, %2
  %21 = load i32, ptr %4, align 4, !tbaa !5
  %22 = load ptr, ptr %5, align 8, !tbaa !9
  %23 = call i32 @getopt(i32 noundef %21, ptr noundef %22, ptr noundef @.str.86) #8
  store i32 %23, ptr %7, align 4, !tbaa !5
  %24 = icmp ne i32 %23, -1
  br i1 %24, label %25, label %225

25:                                               ; preds = %20
  %26 = load i32, ptr %7, align 4, !tbaa !5
  switch i32 %26, label %223 [
    i32 98, label %27
    i32 99, label %44
    i32 100, label %58
    i32 105, label %59
    i32 108, label %73
    i32 109, label %81
    i32 110, label %110
    i32 111, label %111
    i32 112, label %118
    i32 113, label %126
    i32 114, label %127
    i32 115, label %134
    i32 116, label %144
    i32 119, label %151
    i32 68, label %158
    i32 76, label %166
    i32 78, label %167
    i32 79, label %175
    i32 80, label %176
    i32 82, label %187
    i32 83, label %188
    i32 87, label %209
    i32 85, label %216
  ]

27:                                               ; preds = %25
  %28 = load ptr, ptr @optarg, align 8, !tbaa !9
  %29 = call i32 @getnum(ptr noundef %28, ptr noundef %8)
  %30 = sext i32 %29 to i64
  store i64 %30, ptr @simulatedopcount, align 8, !tbaa !12
  %31 = load i32, ptr @quiet, align 4, !tbaa !5
  %32 = icmp ne i32 %31, 0
  br i1 %32, label %37, label %33

33:                                               ; preds = %27
  %34 = load ptr, ptr @stdout, align 8, !tbaa !9
  %35 = load i64, ptr @simulatedopcount, align 8, !tbaa !12
  %36 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %34, ptr noundef @.str.87, i64 noundef %35) #8
  br label %37

37:                                               ; preds = %33, %27
  %38 = load i64, ptr @simulatedopcount, align 8, !tbaa !12
  %39 = icmp eq i64 %38, 0
  br i1 %39, label %40, label %41

40:                                               ; preds = %37
  call void @usage()
  br label %41

41:                                               ; preds = %40, %37
  %42 = load i64, ptr @simulatedopcount, align 8, !tbaa !12
  %43 = sub i64 %42, 1
  store i64 %43, ptr @simulatedopcount, align 8, !tbaa !12
  br label %224

44:                                               ; preds = %25
  %45 = load ptr, ptr @optarg, align 8, !tbaa !9
  %46 = call i32 @getnum(ptr noundef %45, ptr noundef %8)
  store i32 %46, ptr @closeprob, align 4, !tbaa !5
  %47 = load i32, ptr @quiet, align 4, !tbaa !5
  %48 = icmp ne i32 %47, 0
  br i1 %48, label %53, label %49

49:                                               ; preds = %44
  %50 = load ptr, ptr @stdout, align 8, !tbaa !9
  %51 = load i32, ptr @closeprob, align 4, !tbaa !5
  %52 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %50, ptr noundef @.str.88, i32 noundef %51) #8
  br label %53

53:                                               ; preds = %49, %44
  %54 = load i32, ptr @closeprob, align 4, !tbaa !5
  %55 = icmp sle i32 %54, 0
  br i1 %55, label %56, label %57

56:                                               ; preds = %53
  call void @usage()
  br label %57

57:                                               ; preds = %56, %53
  br label %224

58:                                               ; preds = %25
  store i32 1, ptr @debug, align 4, !tbaa !5
  br label %224

59:                                               ; preds = %25
  %60 = load ptr, ptr @optarg, align 8, !tbaa !9
  %61 = call i32 @getnum(ptr noundef %60, ptr noundef %8)
  store i32 %61, ptr @invlprob, align 4, !tbaa !5
  %62 = load i32, ptr @quiet, align 4, !tbaa !5
  %63 = icmp ne i32 %62, 0
  br i1 %63, label %68, label %64

64:                                               ; preds = %59
  %65 = load ptr, ptr @stdout, align 8, !tbaa !9
  %66 = load i32, ptr @invlprob, align 4, !tbaa !5
  %67 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %65, ptr noundef @.str.89, i32 noundef %66) #8
  br label %68

68:                                               ; preds = %64, %59
  %69 = load i32, ptr @invlprob, align 4, !tbaa !5
  %70 = icmp sle i32 %69, 0
  br i1 %70, label %71, label %72

71:                                               ; preds = %68
  call void @usage()
  br label %72

72:                                               ; preds = %71, %68
  br label %224

73:                                               ; preds = %25
  %74 = load ptr, ptr @optarg, align 8, !tbaa !9
  %75 = call i32 @getnum(ptr noundef %74, ptr noundef %8)
  %76 = sext i32 %75 to i64
  store i64 %76, ptr @maxfilelen, align 8, !tbaa !12
  %77 = load i64, ptr @maxfilelen, align 8, !tbaa !12
  %78 = icmp ule i64 %77, 0
  br i1 %78, label %79, label %80

79:                                               ; preds = %73
  call void @usage()
  br label %80

80:                                               ; preds = %79, %73
  br label %224

81:                                               ; preds = %25
  %82 = load ptr, ptr @optarg, align 8, !tbaa !9
  %83 = call i32 @getnum(ptr noundef %82, ptr noundef %8)
  %84 = sext i32 %83 to i64
  store i64 %84, ptr @monitorstart, align 8, !tbaa !12
  %85 = load i64, ptr @monitorstart, align 8, !tbaa !12
  %86 = icmp slt i64 %85, 0
  br i1 %86, label %87, label %88

87:                                               ; preds = %81
  call void @usage()
  br label %88

88:                                               ; preds = %87, %81
  %89 = load ptr, ptr %8, align 8, !tbaa !9
  %90 = icmp ne ptr %89, null
  br i1 %90, label %91, label %97

91:                                               ; preds = %88
  %92 = load ptr, ptr %8, align 8, !tbaa !9
  %93 = getelementptr inbounds i8, ptr %92, i32 1
  store ptr %93, ptr %8, align 8, !tbaa !9
  %94 = load i8, ptr %92, align 1, !tbaa !11
  %95 = sext i8 %94 to i32
  %96 = icmp ne i32 %95, 58
  br i1 %96, label %97, label %98

97:                                               ; preds = %91, %88
  call void @usage()
  br label %98

98:                                               ; preds = %97, %91
  %99 = load ptr, ptr %8, align 8, !tbaa !9
  %100 = call i32 @getnum(ptr noundef %99, ptr noundef %8)
  %101 = sext i32 %100 to i64
  store i64 %101, ptr @monitorend, align 8, !tbaa !12
  %102 = load i64, ptr @monitorend, align 8, !tbaa !12
  %103 = icmp slt i64 %102, 0
  br i1 %103, label %104, label %105

104:                                              ; preds = %98
  call void @usage()
  br label %105

105:                                              ; preds = %104, %98
  %106 = load i64, ptr @monitorend, align 8, !tbaa !12
  %107 = icmp eq i64 %106, 0
  br i1 %107, label %108, label %109

108:                                              ; preds = %105
  store i64 -1, ptr @monitorend, align 8, !tbaa !12
  br label %109

109:                                              ; preds = %108, %105
  store i32 1, ptr @debug, align 4, !tbaa !5
  br label %110

110:                                              ; preds = %109, %25
  store i32 0, ptr @sizechecks, align 4, !tbaa !5
  br label %224

111:                                              ; preds = %25
  %112 = load ptr, ptr @optarg, align 8, !tbaa !9
  %113 = call i32 @getnum(ptr noundef %112, ptr noundef %8)
  store i32 %113, ptr @maxoplen, align 4, !tbaa !5
  %114 = load i32, ptr @maxoplen, align 4, !tbaa !5
  %115 = icmp sle i32 %114, 0
  br i1 %115, label %116, label %117

116:                                              ; preds = %111
  call void @usage()
  br label %117

117:                                              ; preds = %116, %111
  br label %224

118:                                              ; preds = %25
  %119 = load ptr, ptr @optarg, align 8, !tbaa !9
  %120 = call i32 @getnum(ptr noundef %119, ptr noundef %8)
  %121 = sext i32 %120 to i64
  store i64 %121, ptr @progressinterval, align 8, !tbaa !12
  %122 = load i64, ptr @progressinterval, align 8, !tbaa !12
  %123 = icmp ult i64 %122, 0
  br i1 %123, label %124, label %125

124:                                              ; preds = %118
  call void @usage()
  br label %125

125:                                              ; preds = %124, %118
  br label %224

126:                                              ; preds = %25
  store i32 1, ptr @quiet, align 4, !tbaa !5
  br label %224

127:                                              ; preds = %25
  %128 = load ptr, ptr @optarg, align 8, !tbaa !9
  %129 = call i32 @getnum(ptr noundef %128, ptr noundef %8)
  store i32 %129, ptr @readbdy, align 4, !tbaa !5
  %130 = load i32, ptr @readbdy, align 4, !tbaa !5
  %131 = icmp sle i32 %130, 0
  br i1 %131, label %132, label %133

132:                                              ; preds = %127
  call void @usage()
  br label %133

133:                                              ; preds = %132, %127
  br label %224

134:                                              ; preds = %25
  %135 = load ptr, ptr @optarg, align 8, !tbaa !9
  %136 = call i32 @getnum(ptr noundef %135, ptr noundef %8)
  store i32 %136, ptr @style, align 4, !tbaa !5
  %137 = load i32, ptr @style, align 4, !tbaa !5
  %138 = icmp slt i32 %137, 0
  br i1 %138, label %142, label %139

139:                                              ; preds = %134
  %140 = load i32, ptr @style, align 4, !tbaa !5
  %141 = icmp sgt i32 %140, 1
  br i1 %141, label %142, label %143

142:                                              ; preds = %139, %134
  call void @usage()
  br label %143

143:                                              ; preds = %142, %139
  br label %224

144:                                              ; preds = %25
  %145 = load ptr, ptr @optarg, align 8, !tbaa !9
  %146 = call i32 @getnum(ptr noundef %145, ptr noundef %8)
  store i32 %146, ptr @truncbdy, align 4, !tbaa !5
  %147 = load i32, ptr @truncbdy, align 4, !tbaa !5
  %148 = icmp sle i32 %147, 0
  br i1 %148, label %149, label %150

149:                                              ; preds = %144
  call void @usage()
  br label %150

150:                                              ; preds = %149, %144
  br label %224

151:                                              ; preds = %25
  %152 = load ptr, ptr @optarg, align 8, !tbaa !9
  %153 = call i32 @getnum(ptr noundef %152, ptr noundef %8)
  store i32 %153, ptr @writebdy, align 4, !tbaa !5
  %154 = load i32, ptr @writebdy, align 4, !tbaa !5
  %155 = icmp sle i32 %154, 0
  br i1 %155, label %156, label %157

156:                                              ; preds = %151
  call void @usage()
  br label %157

157:                                              ; preds = %156, %151
  br label %224

158:                                              ; preds = %25
  %159 = load ptr, ptr @optarg, align 8, !tbaa !9
  %160 = call i32 @getnum(ptr noundef %159, ptr noundef %8)
  %161 = sext i32 %160 to i64
  store i64 %161, ptr @debugstart, align 8, !tbaa !12
  %162 = load i64, ptr @debugstart, align 8, !tbaa !12
  %163 = icmp ult i64 %162, 1
  br i1 %163, label %164, label %165

164:                                              ; preds = %158
  call void @usage()
  br label %165

165:                                              ; preds = %164, %158
  br label %224

166:                                              ; preds = %25
  store i32 1, ptr @lite, align 4, !tbaa !5
  br label %224

167:                                              ; preds = %25
  %168 = load ptr, ptr @optarg, align 8, !tbaa !9
  %169 = call i32 @getnum(ptr noundef %168, ptr noundef %8)
  %170 = sext i32 %169 to i64
  store i64 %170, ptr @numops, align 8, !tbaa !12
  %171 = load i64, ptr @numops, align 8, !tbaa !12
  %172 = icmp slt i64 %171, 0
  br i1 %172, label %173, label %174

173:                                              ; preds = %167
  call void @usage()
  br label %174

174:                                              ; preds = %173, %167
  br label %224

175:                                              ; preds = %25
  store i32 0, ptr @randomoplen, align 4, !tbaa !5
  br label %224

176:                                              ; preds = %25
  %177 = getelementptr inbounds [1024 x i8], ptr %9, i64 0, i64 0
  %178 = load ptr, ptr @optarg, align 8, !tbaa !9
  %179 = call ptr @strncpy(ptr noundef %177, ptr noundef %178, i64 noundef 1024) #8
  %180 = getelementptr inbounds [1024 x i8], ptr %9, i64 0, i64 0
  %181 = call ptr @strcat(ptr noundef %180, ptr noundef @.str.90) #8
  %182 = getelementptr inbounds [1024 x i8], ptr %10, i64 0, i64 0
  %183 = load ptr, ptr @optarg, align 8, !tbaa !9
  %184 = call ptr @strncpy(ptr noundef %182, ptr noundef %183, i64 noundef 1024) #8
  %185 = getelementptr inbounds [1024 x i8], ptr %10, i64 0, i64 0
  %186 = call ptr @strcat(ptr noundef %185, ptr noundef @.str.90) #8
  br label %224

187:                                              ; preds = %25
  store i32 0, ptr @mapped_reads, align 4, !tbaa !5
  br label %224

188:                                              ; preds = %25
  %189 = load ptr, ptr @optarg, align 8, !tbaa !9
  %190 = call i32 @getnum(ptr noundef %189, ptr noundef %8)
  store i32 %190, ptr @seed, align 4, !tbaa !5
  %191 = load i32, ptr @seed, align 4, !tbaa !5
  %192 = icmp eq i32 %191, 0
  br i1 %192, label %193, label %197

193:                                              ; preds = %188
  %194 = call i64 @time(ptr noundef null) #8
  %195 = srem i64 %194, 10000
  %196 = trunc i64 %195 to i32
  store i32 %196, ptr @seed, align 4, !tbaa !5
  br label %197

197:                                              ; preds = %193, %188
  %198 = load i32, ptr @quiet, align 4, !tbaa !5
  %199 = icmp ne i32 %198, 0
  br i1 %199, label %204, label %200

200:                                              ; preds = %197
  %201 = load ptr, ptr @stdout, align 8, !tbaa !9
  %202 = load i32, ptr @seed, align 4, !tbaa !5
  %203 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %201, ptr noundef @.str.91, i32 noundef %202) #8
  br label %204

204:                                              ; preds = %200, %197
  %205 = load i32, ptr @seed, align 4, !tbaa !5
  %206 = icmp slt i32 %205, 0
  br i1 %206, label %207, label %208

207:                                              ; preds = %204
  call void @usage()
  br label %208

208:                                              ; preds = %207, %204
  br label %224

209:                                              ; preds = %25
  store i32 0, ptr @mapped_writes, align 4, !tbaa !5
  %210 = load i32, ptr @quiet, align 4, !tbaa !5
  %211 = icmp ne i32 %210, 0
  br i1 %211, label %215, label %212

212:                                              ; preds = %209
  %213 = load ptr, ptr @stdout, align 8, !tbaa !9
  %214 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %213, ptr noundef @.str.92) #8
  br label %215

215:                                              ; preds = %212, %209
  br label %224

216:                                              ; preds = %25
  store i32 0, ptr @mapped_msync, align 4, !tbaa !5
  %217 = load i32, ptr @quiet, align 4, !tbaa !5
  %218 = icmp ne i32 %217, 0
  br i1 %218, label %222, label %219

219:                                              ; preds = %216
  %220 = load ptr, ptr @stdout, align 8, !tbaa !9
  %221 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %220, ptr noundef @.str.93) #8
  br label %222

222:                                              ; preds = %219, %216
  br label %224

223:                                              ; preds = %25
  call void @usage()
  br label %224

224:                                              ; preds = %223, %222, %215, %208, %187, %176, %175, %174, %166, %165, %157, %150, %143, %133, %126, %125, %117, %110, %80, %72, %58, %57, %41
  br label %20, !llvm.loop !14

225:                                              ; preds = %20
  %226 = load i32, ptr @optind, align 4, !tbaa !5
  %227 = load i32, ptr %4, align 4, !tbaa !5
  %228 = sub nsw i32 %227, %226
  store i32 %228, ptr %4, align 4, !tbaa !5
  %229 = load i32, ptr @optind, align 4, !tbaa !5
  %230 = load ptr, ptr %5, align 8, !tbaa !9
  %231 = sext i32 %229 to i64
  %232 = getelementptr inbounds ptr, ptr %230, i64 %231
  store ptr %232, ptr %5, align 8, !tbaa !9
  %233 = load i32, ptr %4, align 4, !tbaa !5
  %234 = icmp ne i32 %233, 1
  br i1 %234, label %235, label %236

235:                                              ; preds = %225
  call void @usage()
  br label %236

236:                                              ; preds = %235, %225
  %237 = load ptr, ptr %5, align 8, !tbaa !9
  %238 = getelementptr inbounds ptr, ptr %237, i64 0
  %239 = load ptr, ptr %238, align 8, !tbaa !9
  store ptr %239, ptr @fname, align 8, !tbaa !9
  %240 = call ptr @signal(i32 noundef 1, ptr noundef @cleanup) #8
  %241 = call ptr @signal(i32 noundef 2, ptr noundef @cleanup) #8
  %242 = call ptr @signal(i32 noundef 13, ptr noundef @cleanup) #8
  %243 = call ptr @signal(i32 noundef 14, ptr noundef @cleanup) #8
  %244 = call ptr @signal(i32 noundef 15, ptr noundef @cleanup) #8
  %245 = call ptr @signal(i32 noundef 24, ptr noundef @cleanup) #8
  %246 = call ptr @signal(i32 noundef 25, ptr noundef @cleanup) #8
  %247 = call ptr @signal(i32 noundef 26, ptr noundef @cleanup) #8
  %248 = call ptr @signal(i32 noundef 10, ptr noundef @cleanup) #8
  %249 = call ptr @signal(i32 noundef 12, ptr noundef @cleanup) #8
  %250 = load i32, ptr @seed, align 4, !tbaa !5
  %251 = call ptr @initstate(i32 noundef %250, ptr noundef @state, i64 noundef 256) #8
  %252 = call ptr @setstate(ptr noundef @state) #8
  %253 = load ptr, ptr @fname, align 8, !tbaa !9
  %254 = load i32, ptr @lite, align 4, !tbaa !5
  %255 = icmp ne i32 %254, 0
  %256 = zext i1 %255 to i64
  %257 = select i1 %255, i32 0, i32 576
  %258 = or i32 2, %257
  %259 = call i32 (ptr, i32, ...) @open(ptr noundef %253, i32 noundef %258, i32 noundef 438)
  store i32 %259, ptr @fd, align 4, !tbaa !5
  %260 = load i32, ptr @fd, align 4, !tbaa !5
  %261 = icmp slt i32 %260, 0
  br i1 %261, label %262, label %264

262:                                              ; preds = %236
  %263 = load ptr, ptr @fname, align 8, !tbaa !9
  call void @prterr(ptr noundef %263)
  call void @exit(i32 noundef 91) #10
  unreachable

264:                                              ; preds = %236
  %265 = getelementptr inbounds [1024 x i8], ptr %9, i64 0, i64 0
  %266 = load ptr, ptr @fname, align 8, !tbaa !9
  %267 = call ptr @strncat(ptr noundef %265, ptr noundef %266, i64 noundef 256) #8
  %268 = getelementptr inbounds [1024 x i8], ptr %9, i64 0, i64 0
  %269 = call ptr @strcat(ptr noundef %268, ptr noundef @.str.94) #8
  %270 = getelementptr inbounds [1024 x i8], ptr %9, i64 0, i64 0
  %271 = call i32 (ptr, i32, ...) @open(ptr noundef %270, i32 noundef 578, i32 noundef 438)
  store i32 %271, ptr @fsxgoodfd, align 4, !tbaa !5
  %272 = load i32, ptr @fsxgoodfd, align 4, !tbaa !5
  %273 = icmp slt i32 %272, 0
  br i1 %273, label %274, label %276

274:                                              ; preds = %264
  %275 = getelementptr inbounds [1024 x i8], ptr %9, i64 0, i64 0
  call void @prterr(ptr noundef %275)
  call void @exit(i32 noundef 92) #10
  unreachable

276:                                              ; preds = %264
  %277 = getelementptr inbounds [1024 x i8], ptr %10, i64 0, i64 0
  %278 = load ptr, ptr @fname, align 8, !tbaa !9
  %279 = call ptr @strncat(ptr noundef %277, ptr noundef %278, i64 noundef 256) #8
  %280 = getelementptr inbounds [1024 x i8], ptr %10, i64 0, i64 0
  %281 = call ptr @strcat(ptr noundef %280, ptr noundef @.str.95) #8
  %282 = getelementptr inbounds [1024 x i8], ptr %10, i64 0, i64 0
  %283 = call noalias ptr @fopen(ptr noundef %282, ptr noundef @.str.96)
  store ptr %283, ptr @fsxlogf, align 8, !tbaa !9
  %284 = load ptr, ptr @fsxlogf, align 8, !tbaa !9
  %285 = icmp eq ptr %284, null
  br i1 %285, label %286, label %288

286:                                              ; preds = %276
  %287 = getelementptr inbounds [1024 x i8], ptr %10, i64 0, i64 0
  call void @prterr(ptr noundef %287)
  call void @exit(i32 noundef 93) #10
  unreachable

288:                                              ; preds = %276
  %289 = load i32, ptr @lite, align 4, !tbaa !5
  %290 = icmp ne i32 %289, 0
  br i1 %290, label %291, label %306

291:                                              ; preds = %288
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  %292 = load i32, ptr @fd, align 4, !tbaa !5
  %293 = call i64 @lseek(i32 noundef %292, i64 noundef 0, i32 noundef 2) #8
  store i64 %293, ptr @maxfilelen, align 8, !tbaa !12
  store i64 %293, ptr @file_size, align 8, !tbaa !12
  %294 = load i64, ptr @file_size, align 8, !tbaa !12
  %295 = icmp eq i64 %294, -1
  br i1 %295, label %296, label %298

296:                                              ; preds = %291
  %297 = load ptr, ptr @fname, align 8, !tbaa !9
  call void @prterr(ptr noundef %297)
  call void (ptr, ...) @warn(ptr noundef @.str.97)
  call void @exit(i32 noundef 94) #10
  unreachable

298:                                              ; preds = %291
  %299 = load i32, ptr @fd, align 4, !tbaa !5
  %300 = call i64 @lseek(i32 noundef %299, i64 noundef 0, i32 noundef 0) #8
  store i64 %300, ptr %11, align 8, !tbaa !12
  %301 = load i64, ptr %11, align 8, !tbaa !12
  %302 = icmp eq i64 %301, -1
  br i1 %302, label %303, label %305

303:                                              ; preds = %298
  %304 = load ptr, ptr @fname, align 8, !tbaa !9
  call void @prterr(ptr noundef %304)
  call void (ptr, ...) @warn(ptr noundef @.str.98)
  call void @exit(i32 noundef 95) #10
  unreachable

305:                                              ; preds = %298
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  br label %306

306:                                              ; preds = %305, %288
  %307 = load i64, ptr @maxfilelen, align 8, !tbaa !12
  %308 = call noalias ptr @malloc(i64 noundef %307) #11
  store ptr %308, ptr @original_buf, align 8, !tbaa !9
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %309

309:                                              ; preds = %322, %306
  %310 = load i32, ptr %6, align 4, !tbaa !5
  %311 = sext i32 %310 to i64
  %312 = load i64, ptr @maxfilelen, align 8, !tbaa !12
  %313 = icmp ult i64 %311, %312
  br i1 %313, label %314, label %325

314:                                              ; preds = %309
  %315 = call i64 @random() #8
  %316 = srem i64 %315, 256
  %317 = trunc i64 %316 to i8
  %318 = load ptr, ptr @original_buf, align 8, !tbaa !9
  %319 = load i32, ptr %6, align 4, !tbaa !5
  %320 = sext i32 %319 to i64
  %321 = getelementptr inbounds i8, ptr %318, i64 %320
  store i8 %317, ptr %321, align 1, !tbaa !11
  br label %322

322:                                              ; preds = %314
  %323 = load i32, ptr %6, align 4, !tbaa !5
  %324 = add nsw i32 %323, 1
  store i32 %324, ptr %6, align 4, !tbaa !5
  br label %309, !llvm.loop !16

325:                                              ; preds = %309
  %326 = load i64, ptr @maxfilelen, align 8, !tbaa !12
  %327 = call noalias ptr @malloc(i64 noundef %326) #11
  store ptr %327, ptr @good_buf, align 8, !tbaa !9
  %328 = load ptr, ptr @good_buf, align 8, !tbaa !9
  %329 = load i64, ptr @maxfilelen, align 8, !tbaa !12
  call void @llvm.memset.p0.i64(ptr align 1 %328, i8 0, i64 %329, i1 false)
  %330 = load i32, ptr @maxoplen, align 4, !tbaa !5
  %331 = sext i32 %330 to i64
  %332 = call noalias ptr @malloc(i64 noundef %331) #11
  store ptr %332, ptr @temp_buf, align 8, !tbaa !9
  %333 = load ptr, ptr @temp_buf, align 8, !tbaa !9
  %334 = load i32, ptr @maxoplen, align 4, !tbaa !5
  %335 = sext i32 %334 to i64
  call void @llvm.memset.p0.i64(ptr align 1 %333, i8 0, i64 %335, i1 false)
  %336 = load i32, ptr @lite, align 4, !tbaa !5
  %337 = icmp ne i32 %336, 0
  br i1 %337, label %338, label %357

338:                                              ; preds = %325
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #8
  %339 = load i32, ptr @fd, align 4, !tbaa !5
  %340 = load ptr, ptr @good_buf, align 8, !tbaa !9
  %341 = load i64, ptr @maxfilelen, align 8, !tbaa !12
  %342 = call i64 @write(i32 noundef %339, ptr noundef %340, i64 noundef %341)
  store i64 %342, ptr %12, align 8, !tbaa !12
  %343 = load i64, ptr %12, align 8, !tbaa !12
  %344 = load i64, ptr @maxfilelen, align 8, !tbaa !12
  %345 = icmp ne i64 %343, %344
  br i1 %345, label %346, label %356

346:                                              ; preds = %338
  %347 = load i64, ptr %12, align 8, !tbaa !12
  %348 = icmp eq i64 %347, -1
  br i1 %348, label %349, label %351

349:                                              ; preds = %346
  %350 = load ptr, ptr @fname, align 8, !tbaa !9
  call void @prterr(ptr noundef %350)
  call void (ptr, ...) @warn(ptr noundef @.str.99)
  br label %355

351:                                              ; preds = %346
  %352 = load i64, ptr %12, align 8, !tbaa !12
  %353 = trunc i64 %352 to i32
  %354 = load i64, ptr @maxfilelen, align 8, !tbaa !12
  call void (ptr, ...) @warn(ptr noundef @.str.100, i32 noundef %353, i64 noundef %354)
  br label %355

355:                                              ; preds = %351, %349
  call void @exit(i32 noundef 98) #10
  unreachable

356:                                              ; preds = %338
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  br label %358

357:                                              ; preds = %325
  call void @check_trunc_hack()
  br label %358

358:                                              ; preds = %357, %356
  br label %359

359:                                              ; preds = %368, %358
  %360 = load i64, ptr @numops, align 8, !tbaa !12
  %361 = icmp eq i64 %360, -1
  br i1 %361, label %366, label %362

362:                                              ; preds = %359
  %363 = load i64, ptr @numops, align 8, !tbaa !12
  %364 = add nsw i64 %363, -1
  store i64 %364, ptr @numops, align 8, !tbaa !12
  %365 = icmp ne i64 %363, 0
  br label %366

366:                                              ; preds = %362, %359
  %367 = phi i1 [ true, %359 ], [ %365, %362 ]
  br i1 %367, label %368, label %369

368:                                              ; preds = %366
  call void @test()
  br label %359, !llvm.loop !17

369:                                              ; preds = %366
  %370 = load i32, ptr @fd, align 4, !tbaa !5
  %371 = call i32 @close(i32 noundef %370)
  %372 = icmp ne i32 %371, 0
  br i1 %372, label %373, label %374

373:                                              ; preds = %369
  call void @prterr(ptr noundef @.str.101)
  call void @report_failure(i32 noundef 99)
  br label %374

374:                                              ; preds = %373, %369
  call void (ptr, ...) @prt(ptr noundef @.str.102)
  call void @exit(i32 noundef 0) #10
  unreachable
}

; Function Attrs: nounwind willreturn memory(none)
declare i32 @getpagesize() #6

; Function Attrs: nounwind
declare i32 @setvbuf(ptr noundef, ptr noundef, i32 noundef, i64 noundef) #0

; Function Attrs: nounwind
declare i32 @getopt(i32 noundef, ptr noundef, ptr noundef) #0

; Function Attrs: nounwind
declare ptr @strncpy(ptr noundef, ptr noundef, i64 noundef) #0

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

; Function Attrs: nounwind
declare i64 @time(ptr noundef) #0

; Function Attrs: nounwind
declare ptr @signal(i32 noundef, ptr noundef) #0

; Function Attrs: nounwind
declare ptr @initstate(i32 noundef, ptr noundef, i64 noundef) #0

; Function Attrs: nounwind
declare ptr @setstate(ptr noundef) #0

; Function Attrs: nounwind
declare ptr @strncat(ptr noundef, ptr noundef, i64 noundef) #0

declare noalias ptr @fopen(ptr noundef, ptr noundef) #4

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #7

attributes #0 = { 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 #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { noreturn 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 = { "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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { nounwind willreturn memory(none) "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 allocsize(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 #8 = { nounwind }
attributes #9 = { nounwind willreturn memory(none) }
attributes #10 = { noreturn nounwind }
attributes #11 = { nounwind allocsize(0) }

!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, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"long", !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = distinct !{!17, !15}


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

@file_size = external dso_local local_unnamed_addr global i64, align 8
@simulatedopcount = external dso_local local_unnamed_addr global i64, align 8
@closeprob = external dso_local local_unnamed_addr global i32, align 4
@invlprob = external dso_local local_unnamed_addr global i32, align 4
@debug = external dso_local local_unnamed_addr global i32, align 4
@debugstart = external dso_local local_unnamed_addr global i64, align 8
@maxfilelen = external dso_local local_unnamed_addr global i64, align 8
@sizechecks = external dso_local local_unnamed_addr global i32, align 4
@maxoplen = external dso_local local_unnamed_addr global i32, align 4
@quiet = external dso_local local_unnamed_addr global i32, align 4
@progressinterval = external dso_local local_unnamed_addr global i64, align 8
@readbdy = external dso_local local_unnamed_addr global i32, align 4
@style = external dso_local local_unnamed_addr global i32, align 4
@truncbdy = external dso_local local_unnamed_addr global i32, align 4
@writebdy = external dso_local local_unnamed_addr global i32, align 4
@monitorstart = external dso_local local_unnamed_addr global i64, align 8
@monitorend = external dso_local local_unnamed_addr global i64, align 8
@lite = external dso_local local_unnamed_addr global i32, align 4
@numops = external dso_local local_unnamed_addr global i64, align 8
@randomoplen = external dso_local local_unnamed_addr global i32, align 4
@seed = external dso_local local_unnamed_addr global i32, align 4
@mapped_writes = external dso_local local_unnamed_addr global i32, align 4
@mapped_reads = external dso_local local_unnamed_addr global i32, align 4
@mapped_msync = external dso_local local_unnamed_addr global i32, align 4
@fsxgoodfd = external dso_local local_unnamed_addr global i32, align 4
@fsxlogf = external dso_local local_unnamed_addr global ptr, align 8
@stdout = external local_unnamed_addr global ptr, align 8
@good_buf = external dso_local local_unnamed_addr global ptr, align 8
@fname = external dso_local local_unnamed_addr global ptr, align 8
@temp_buf = external dso_local local_unnamed_addr global ptr, align 8
@fd = external dso_local local_unnamed_addr global i32, align 4
@page_mask = external dso_local local_unnamed_addr global i32, align 4
@page_size = external dso_local local_unnamed_addr global i32, align 4
@original_buf = external dso_local local_unnamed_addr global ptr, align 8
@.str.86 = external hidden unnamed_addr constant [39 x i8], align 1
@optarg = external local_unnamed_addr global ptr, align 8
@.str.87 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.88 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.89 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.90 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.91 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.92 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.93 = external hidden unnamed_addr constant [23 x i8], align 1
@optind = external local_unnamed_addr global i32, align 4
@state = external dso_local global [256 x i8], align 16
@.str.94 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.95 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.96 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.97 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.98 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.99 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.100 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.101 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.102 = external hidden unnamed_addr constant [32 x i8], align 1

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

; Function Attrs: nounwind uwtable
declare dso_local void @warn(ptr noundef, ...) local_unnamed_addr #1

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

; Function Attrs: nounwind uwtable
declare dso_local void @prt(ptr noundef, ...) local_unnamed_addr #1

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

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #3

; Function Attrs: nounwind
declare i64 @lseek(i32 noundef, i64 noundef, i32 noundef) local_unnamed_addr #4

; Function Attrs: nofree
declare noundef i64 @write(i32 noundef, ptr nocapture noundef readonly, i64 noundef) local_unnamed_addr #5

; Function Attrs: nounwind uwtable
declare dso_local void @report_failure(i32 noundef) local_unnamed_addr #1

declare i32 @close(i32 noundef) local_unnamed_addr #6

; Function Attrs: nounwind uwtable
declare dso_local void @check_trunc_hack() local_unnamed_addr #1

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

; Function Attrs: nounwind uwtable
declare dso_local void @test() local_unnamed_addr #1

; Function Attrs: nounwind
declare i64 @random() local_unnamed_addr #4

; Function Attrs: nounwind uwtable
declare dso_local void @cleanup(i32 noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @usage() local_unnamed_addr #1

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

; Function Attrs: noreturn nounwind uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr noundef %1) local_unnamed_addr #7 {
  %3 = alloca ptr, align 8
  %4 = alloca [1024 x i8], align 16
  %5 = alloca [1024 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #12
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %4) #12
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %5) #12
  store i8 0, ptr %4, align 16, !tbaa !5
  store i8 0, ptr %5, align 16, !tbaa !5
  %6 = tail call i32 @getpagesize() #13
  store i32 %6, ptr @page_size, align 4, !tbaa !8
  %7 = add nsw i32 %6, -1
  store i32 %7, ptr @page_mask, align 4, !tbaa !8
  %8 = load ptr, ptr @stdout, align 8, !tbaa !10
  %9 = tail call i32 @setvbuf(ptr noundef %8, ptr noundef null, i32 noundef 1, i64 noundef 0) #12
  br label %10

10:                                               ; preds = %.backedge, %2
  %11 = call i32 @getopt(i32 noundef %0, ptr noundef %1, ptr noundef nonnull @.str.86) #12
  switch i32 %11, label %158 [
    i32 -1, label %159
    i32 98, label %12
    i32 99, label %27
    i32 100, label %38
    i32 105, label %39
    i32 108, label %50
    i32 109, label %56
    i32 110, label %79
    i32 111, label %80
    i32 112, label %85
    i32 113, label %89
    i32 114, label %90
    i32 115, label %95
    i32 116, label %99
    i32 119, label %104
    i32 68, label %109
    i32 76, label %115
    i32 78, label %116
    i32 79, label %122
    i32 80, label %123
    i32 82, label %129
    i32 83, label %130
    i32 87, label %148
    i32 85, label %153
  ]

12:                                               ; preds = %10
  %13 = load ptr, ptr @optarg, align 8, !tbaa !10
  %14 = call i32 @getnum(ptr noundef %13, ptr noundef nonnull %3)
  %15 = sext i32 %14 to i64
  store i64 %15, ptr @simulatedopcount, align 8, !tbaa !12
  %16 = load i32, ptr @quiet, align 4, !tbaa !8
  %.not35 = icmp eq i32 %16, 0
  br i1 %.not35, label %17, label %20

17:                                               ; preds = %12
  %18 = load ptr, ptr @stdout, align 8, !tbaa !10
  %19 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %18, ptr noundef nonnull @.str.87, i64 noundef %15) #12
  %.pr = load i64, ptr @simulatedopcount, align 8, !tbaa !12
  br label %20

20:                                               ; preds = %17, %12
  %21 = phi i64 [ %.pr, %17 ], [ %15, %12 ]
  %22 = icmp eq i64 %21, 0
  br i1 %22, label %23, label %24

23:                                               ; preds = %20
  call void @usage()
  %.pre43 = load i64, ptr @simulatedopcount, align 8, !tbaa !12
  br label %24

24:                                               ; preds = %23, %20
  %25 = phi i64 [ %.pre43, %23 ], [ %21, %20 ]
  %26 = add i64 %25, -1
  store i64 %26, ptr @simulatedopcount, align 8, !tbaa !12
  br label %.backedge

27:                                               ; preds = %10
  %28 = load ptr, ptr @optarg, align 8, !tbaa !10
  %29 = call i32 @getnum(ptr noundef %28, ptr noundef nonnull %3)
  store i32 %29, ptr @closeprob, align 4, !tbaa !8
  %30 = load i32, ptr @quiet, align 4, !tbaa !8
  %.not34 = icmp eq i32 %30, 0
  br i1 %.not34, label %31, label %34

31:                                               ; preds = %27
  %32 = load ptr, ptr @stdout, align 8, !tbaa !10
  %33 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %32, ptr noundef nonnull @.str.88, i32 noundef %29) #12
  %.pr36 = load i32, ptr @closeprob, align 4, !tbaa !8
  br label %34

34:                                               ; preds = %31, %27
  %35 = phi i32 [ %.pr36, %31 ], [ %29, %27 ]
  %36 = icmp slt i32 %35, 1
  br i1 %36, label %37, label %.backedge

37:                                               ; preds = %34
  call void @usage()
  br label %.backedge

38:                                               ; preds = %10
  store i32 1, ptr @debug, align 4, !tbaa !8
  br label %.backedge

39:                                               ; preds = %10
  %40 = load ptr, ptr @optarg, align 8, !tbaa !10
  %41 = call i32 @getnum(ptr noundef %40, ptr noundef nonnull %3)
  store i32 %41, ptr @invlprob, align 4, !tbaa !8
  %42 = load i32, ptr @quiet, align 4, !tbaa !8
  %.not33 = icmp eq i32 %42, 0
  br i1 %.not33, label %43, label %46

43:                                               ; preds = %39
  %44 = load ptr, ptr @stdout, align 8, !tbaa !10
  %45 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %44, ptr noundef nonnull @.str.89, i32 noundef %41) #12
  %.pr37 = load i32, ptr @invlprob, align 4, !tbaa !8
  br label %46

46:                                               ; preds = %43, %39
  %47 = phi i32 [ %.pr37, %43 ], [ %41, %39 ]
  %48 = icmp slt i32 %47, 1
  br i1 %48, label %49, label %.backedge

49:                                               ; preds = %46
  call void @usage()
  br label %.backedge

50:                                               ; preds = %10
  %51 = load ptr, ptr @optarg, align 8, !tbaa !10
  %52 = call i32 @getnum(ptr noundef %51, ptr noundef nonnull %3)
  %53 = sext i32 %52 to i64
  store i64 %53, ptr @maxfilelen, align 8, !tbaa !12
  %54 = icmp eq i32 %52, 0
  br i1 %54, label %55, label %.backedge

55:                                               ; preds = %50
  call void @usage()
  br label %.backedge

56:                                               ; preds = %10
  %57 = load ptr, ptr @optarg, align 8, !tbaa !10
  %58 = call i32 @getnum(ptr noundef %57, ptr noundef nonnull %3)
  %59 = sext i32 %58 to i64
  store i64 %59, ptr @monitorstart, align 8, !tbaa !12
  %60 = icmp slt i32 %58, 0
  br i1 %60, label %61, label %62

61:                                               ; preds = %56
  call void @usage()
  br label %62

62:                                               ; preds = %61, %56
  %63 = load ptr, ptr %3, align 8, !tbaa !10
  %.not31 = icmp eq ptr %63, null
  br i1 %.not31, label %67, label %64

64:                                               ; preds = %62
  %65 = getelementptr inbounds i8, ptr %63, i64 1
  store ptr %65, ptr %3, align 8, !tbaa !10
  %66 = load i8, ptr %63, align 1, !tbaa !5
  %.not32 = icmp eq i8 %66, 58
  br i1 %.not32, label %68, label %67

67:                                               ; preds = %64, %62
  call void @usage()
  %.pre42 = load ptr, ptr %3, align 8, !tbaa !10
  br label %68

68:                                               ; preds = %67, %64
  %69 = phi ptr [ %.pre42, %67 ], [ %65, %64 ]
  %70 = call i32 @getnum(ptr noundef %69, ptr noundef nonnull %3)
  %71 = sext i32 %70 to i64
  store i64 %71, ptr @monitorend, align 8, !tbaa !12
  %72 = icmp slt i32 %70, 0
  br i1 %72, label %73, label %74

73:                                               ; preds = %68
  call void @usage()
  %.pr38 = load i64, ptr @monitorend, align 8, !tbaa !12
  br label %74

74:                                               ; preds = %73, %68
  %75 = phi i64 [ %.pr38, %73 ], [ %71, %68 ]
  %76 = icmp eq i64 %75, 0
  br i1 %76, label %77, label %78

77:                                               ; preds = %74
  store i64 -1, ptr @monitorend, align 8, !tbaa !12
  br label %78

78:                                               ; preds = %77, %74
  store i32 1, ptr @debug, align 4, !tbaa !8
  br label %79

79:                                               ; preds = %10, %78
  store i32 0, ptr @sizechecks, align 4, !tbaa !8
  br label %.backedge

80:                                               ; preds = %10
  %81 = load ptr, ptr @optarg, align 8, !tbaa !10
  %82 = call i32 @getnum(ptr noundef %81, ptr noundef nonnull %3)
  store i32 %82, ptr @maxoplen, align 4, !tbaa !8
  %83 = icmp slt i32 %82, 1
  br i1 %83, label %84, label %.backedge

84:                                               ; preds = %80
  call void @usage()
  br label %.backedge

85:                                               ; preds = %10
  %86 = load ptr, ptr @optarg, align 8, !tbaa !10
  %87 = call i32 @getnum(ptr noundef %86, ptr noundef nonnull %3)
  %88 = sext i32 %87 to i64
  store i64 %88, ptr @progressinterval, align 8, !tbaa !12
  br label %.backedge

.backedge:                                        ; preds = %85, %153, %155, %148, %150, %144, %147, %116, %121, %109, %114, %104, %108, %99, %103, %98, %95, %90, %94, %80, %84, %50, %55, %46, %49, %34, %37, %158, %129, %123, %122, %115, %89, %79, %38, %24
  br label %10, !llvm.loop !14

89:                                               ; preds = %10
  store i32 1, ptr @quiet, align 4, !tbaa !8
  br label %.backedge

90:                                               ; preds = %10
  %91 = load ptr, ptr @optarg, align 8, !tbaa !10
  %92 = call i32 @getnum(ptr noundef %91, ptr noundef nonnull %3)
  store i32 %92, ptr @readbdy, align 4, !tbaa !8
  %93 = icmp slt i32 %92, 1
  br i1 %93, label %94, label %.backedge

94:                                               ; preds = %90
  call void @usage()
  br label %.backedge

95:                                               ; preds = %10
  %96 = load ptr, ptr @optarg, align 8, !tbaa !10
  %97 = call i32 @getnum(ptr noundef %96, ptr noundef nonnull %3)
  store i32 %97, ptr @style, align 4, !tbaa !8
  %or.cond = icmp ugt i32 %97, 1
  br i1 %or.cond, label %98, label %.backedge

98:                                               ; preds = %95
  call void @usage()
  br label %.backedge

99:                                               ; preds = %10
  %100 = load ptr, ptr @optarg, align 8, !tbaa !10
  %101 = call i32 @getnum(ptr noundef %100, ptr noundef nonnull %3)
  store i32 %101, ptr @truncbdy, align 4, !tbaa !8
  %102 = icmp slt i32 %101, 1
  br i1 %102, label %103, label %.backedge

103:                                              ; preds = %99
  call void @usage()
  br label %.backedge

104:                                              ; preds = %10
  %105 = load ptr, ptr @optarg, align 8, !tbaa !10
  %106 = call i32 @getnum(ptr noundef %105, ptr noundef nonnull %3)
  store i32 %106, ptr @writebdy, align 4, !tbaa !8
  %107 = icmp slt i32 %106, 1
  br i1 %107, label %108, label %.backedge

108:                                              ; preds = %104
  call void @usage()
  br label %.backedge

109:                                              ; preds = %10
  %110 = load ptr, ptr @optarg, align 8, !tbaa !10
  %111 = call i32 @getnum(ptr noundef %110, ptr noundef nonnull %3)
  %112 = sext i32 %111 to i64
  store i64 %112, ptr @debugstart, align 8, !tbaa !12
  %113 = icmp eq i32 %111, 0
  br i1 %113, label %114, label %.backedge

114:                                              ; preds = %109
  call void @usage()
  br label %.backedge

115:                                              ; preds = %10
  store i32 1, ptr @lite, align 4, !tbaa !8
  br label %.backedge

116:                                              ; preds = %10
  %117 = load ptr, ptr @optarg, align 8, !tbaa !10
  %118 = call i32 @getnum(ptr noundef %117, ptr noundef nonnull %3)
  %119 = sext i32 %118 to i64
  store i64 %119, ptr @numops, align 8, !tbaa !12
  %120 = icmp slt i32 %118, 0
  br i1 %120, label %121, label %.backedge

121:                                              ; preds = %116
  call void @usage()
  br label %.backedge

122:                                              ; preds = %10
  store i32 0, ptr @randomoplen, align 4, !tbaa !8
  br label %.backedge

123:                                              ; preds = %10
  %124 = load ptr, ptr @optarg, align 8, !tbaa !10
  %125 = call ptr @strncpy(ptr noundef nonnull dereferenceable(1) %4, ptr noundef nonnull dereferenceable(1) %124, i64 noundef 1024) #12
  %126 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %4, ptr noundef nonnull dereferenceable(1) @.str.90) #12
  %127 = call ptr @strncpy(ptr noundef nonnull dereferenceable(1) %5, ptr noundef nonnull dereferenceable(1) %124, i64 noundef 1024) #12
  %128 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %5, ptr noundef nonnull dereferenceable(1) @.str.90) #12
  br label %.backedge

129:                                              ; preds = %10
  store i32 0, ptr @mapped_reads, align 4, !tbaa !8
  br label %.backedge

130:                                              ; preds = %10
  %131 = load ptr, ptr @optarg, align 8, !tbaa !10
  %132 = call i32 @getnum(ptr noundef %131, ptr noundef nonnull %3)
  store i32 %132, ptr @seed, align 4, !tbaa !8
  %133 = icmp eq i32 %132, 0
  br i1 %133, label %134, label %138

134:                                              ; preds = %130
  %135 = call i64 @time(ptr noundef null) #12
  %136 = srem i64 %135, 10000
  %137 = trunc nsw i64 %136 to i32
  store i32 %137, ptr @seed, align 4, !tbaa !8
  br label %138

138:                                              ; preds = %134, %130
  %139 = phi i32 [ %137, %134 ], [ %132, %130 ]
  %140 = load i32, ptr @quiet, align 4, !tbaa !8
  %.not30 = icmp eq i32 %140, 0
  br i1 %.not30, label %141, label %144

141:                                              ; preds = %138
  %142 = load ptr, ptr @stdout, align 8, !tbaa !10
  %143 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %142, ptr noundef nonnull @.str.91, i32 noundef %139) #12
  %.pre = load i32, ptr @seed, align 4, !tbaa !8
  br label %144

144:                                              ; preds = %141, %138
  %145 = phi i32 [ %.pre, %141 ], [ %139, %138 ]
  %146 = icmp slt i32 %145, 0
  br i1 %146, label %147, label %.backedge

147:                                              ; preds = %144
  call void @usage()
  br label %.backedge

148:                                              ; preds = %10
  store i32 0, ptr @mapped_writes, align 4, !tbaa !8
  %149 = load i32, ptr @quiet, align 4, !tbaa !8
  %.not29 = icmp eq i32 %149, 0
  br i1 %.not29, label %150, label %.backedge

150:                                              ; preds = %148
  %151 = load ptr, ptr @stdout, align 8, !tbaa !10
  %152 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %151, ptr noundef nonnull @.str.92) #12
  br label %.backedge

153:                                              ; preds = %10
  store i32 0, ptr @mapped_msync, align 4, !tbaa !8
  %154 = load i32, ptr @quiet, align 4, !tbaa !8
  %.not28 = icmp eq i32 %154, 0
  br i1 %.not28, label %155, label %.backedge

155:                                              ; preds = %153
  %156 = load ptr, ptr @stdout, align 8, !tbaa !10
  %157 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %156, ptr noundef nonnull @.str.93) #12
  br label %.backedge

158:                                              ; preds = %10
  call void @usage()
  br label %.backedge

159:                                              ; preds = %10
  %160 = load i32, ptr @optind, align 4, !tbaa !8
  %161 = sub nsw i32 %0, %160
  %162 = sext i32 %160 to i64
  %163 = getelementptr inbounds ptr, ptr %1, i64 %162
  %.not21 = icmp eq i32 %161, 1
  br i1 %.not21, label %165, label %164

164:                                              ; preds = %159
  call void @usage()
  br label %165

165:                                              ; preds = %164, %159
  %166 = load ptr, ptr %163, align 8, !tbaa !10
  store ptr %166, ptr @fname, align 8, !tbaa !10
  %167 = call ptr @signal(i32 noundef 1, ptr noundef nonnull @cleanup) #12
  %168 = call ptr @signal(i32 noundef 2, ptr noundef nonnull @cleanup) #12
  %169 = call ptr @signal(i32 noundef 13, ptr noundef nonnull @cleanup) #12
  %170 = call ptr @signal(i32 noundef 14, ptr noundef nonnull @cleanup) #12
  %171 = call ptr @signal(i32 noundef 15, ptr noundef nonnull @cleanup) #12
  %172 = call ptr @signal(i32 noundef 24, ptr noundef nonnull @cleanup) #12
  %173 = call ptr @signal(i32 noundef 25, ptr noundef nonnull @cleanup) #12
  %174 = call ptr @signal(i32 noundef 26, ptr noundef nonnull @cleanup) #12
  %175 = call ptr @signal(i32 noundef 10, ptr noundef nonnull @cleanup) #12
  %176 = call ptr @signal(i32 noundef 12, ptr noundef nonnull @cleanup) #12
  %177 = load i32, ptr @seed, align 4, !tbaa !8
  %178 = call ptr @initstate(i32 noundef %177, ptr noundef nonnull @state, i64 noundef 256) #12
  %179 = call ptr @setstate(ptr noundef nonnull @state) #12
  %180 = load ptr, ptr @fname, align 8, !tbaa !10
  %181 = load i32, ptr @lite, align 4, !tbaa !8
  %.not22 = icmp eq i32 %181, 0
  %182 = select i1 %.not22, i32 578, i32 2
  %183 = call i32 (ptr, i32, ...) @open(ptr noundef %180, i32 noundef %182, i32 noundef 438) #12
  store i32 %183, ptr @fd, align 4, !tbaa !8
  %184 = icmp slt i32 %183, 0
  %185 = load ptr, ptr @fname, align 8, !tbaa !10
  br i1 %184, label %186, label %187

186:                                              ; preds = %165
  call void @prterr(ptr noundef %185)
  call void @exit(i32 noundef 91) #14
  unreachable

187:                                              ; preds = %165
  %188 = call ptr @strncat(ptr noundef nonnull dereferenceable(1) %4, ptr noundef nonnull dereferenceable(1) %185, i64 noundef 256) #12
  %189 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %4, ptr noundef nonnull dereferenceable(1) @.str.94) #12
  %190 = call i32 (ptr, i32, ...) @open(ptr noundef nonnull %4, i32 noundef 578, i32 noundef 438) #12
  store i32 %190, ptr @fsxgoodfd, align 4, !tbaa !8
  %191 = icmp slt i32 %190, 0
  br i1 %191, label %192, label %193

192:                                              ; preds = %187
  call void @prterr(ptr noundef nonnull %4)
  call void @exit(i32 noundef 92) #14
  unreachable

193:                                              ; preds = %187
  %194 = load ptr, ptr @fname, align 8, !tbaa !10
  %195 = call ptr @strncat(ptr noundef nonnull dereferenceable(1) %5, ptr noundef nonnull dereferenceable(1) %194, i64 noundef 256) #12
  %196 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %5, ptr noundef nonnull dereferenceable(1) @.str.95) #12
  %197 = call noalias ptr @fopen(ptr noundef nonnull %5, ptr noundef nonnull @.str.96)
  store ptr %197, ptr @fsxlogf, align 8, !tbaa !10
  %198 = icmp eq ptr %197, null
  br i1 %198, label %199, label %200

199:                                              ; preds = %193
  call void @prterr(ptr noundef nonnull %5)
  call void @exit(i32 noundef 93) #14
  unreachable

200:                                              ; preds = %193
  %201 = load i32, ptr @lite, align 4, !tbaa !8
  %.not23 = icmp eq i32 %201, 0
  br i1 %.not23, label %214, label %202

202:                                              ; preds = %200
  %203 = load i32, ptr @fd, align 4, !tbaa !8
  %204 = call i64 @lseek(i32 noundef %203, i64 noundef 0, i32 noundef 2) #12
  store i64 %204, ptr @maxfilelen, align 8, !tbaa !12
  store i64 %204, ptr @file_size, align 8, !tbaa !12
  %205 = icmp eq i64 %204, -1
  br i1 %205, label %206, label %208

206:                                              ; preds = %202
  %207 = load ptr, ptr @fname, align 8, !tbaa !10
  call void @prterr(ptr noundef %207)
  call void (ptr, ...) @warn(ptr noundef nonnull @.str.97)
  call void @exit(i32 noundef 94) #14
  unreachable

208:                                              ; preds = %202
  %209 = load i32, ptr @fd, align 4, !tbaa !8
  %210 = call i64 @lseek(i32 noundef %209, i64 noundef 0, i32 noundef 0) #12
  %211 = icmp eq i64 %210, -1
  br i1 %211, label %212, label %214

212:                                              ; preds = %208
  %213 = load ptr, ptr @fname, align 8, !tbaa !10
  call void @prterr(ptr noundef %213)
  call void (ptr, ...) @warn(ptr noundef nonnull @.str.98)
  call void @exit(i32 noundef 95) #14
  unreachable

214:                                              ; preds = %208, %200
  %215 = load i64, ptr @maxfilelen, align 8, !tbaa !12
  %216 = call noalias ptr @malloc(i64 noundef %215) #15
  store ptr %216, ptr @original_buf, align 8, !tbaa !10
  %.not = icmp eq i64 %215, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %214, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %214 ]
  %217 = call i64 @random() #12
  %218 = trunc i64 %217 to i8
  %219 = load ptr, ptr @original_buf, align 8, !tbaa !10
  %220 = getelementptr inbounds i8, ptr %219, i64 %indvars.iv
  store i8 %218, ptr %220, align 1, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %221 = load i64, ptr @maxfilelen, align 8, !tbaa !12
  %222 = icmp ugt i64 %221, %indvars.iv.next
  br i1 %222, label %.lr.ph, label %._crit_edge, !llvm.loop !16

._crit_edge:                                      ; preds = %.lr.ph, %214
  %.lcssa = phi i64 [ 0, %214 ], [ %221, %.lr.ph ]
  %calloc = call ptr @calloc(i64 1, i64 %.lcssa)
  store ptr %calloc, ptr @good_buf, align 8, !tbaa !10
  %223 = load i32, ptr @maxoplen, align 4, !tbaa !8
  %224 = sext i32 %223 to i64
  %calloc44 = call ptr @calloc(i64 1, i64 %224)
  store ptr %calloc44, ptr @temp_buf, align 8, !tbaa !10
  %225 = load i32, ptr @lite, align 4, !tbaa !8
  %.not24 = icmp eq i32 %225, 0
  br i1 %.not24, label %237, label %226

226:                                              ; preds = %._crit_edge
  %227 = load i32, ptr @fd, align 4, !tbaa !8
  %228 = call i64 @write(i32 noundef %227, ptr noundef %calloc, i64 noundef %.lcssa) #12
  %229 = load i64, ptr @maxfilelen, align 8, !tbaa !12
  %.not25 = icmp eq i64 %228, %229
  br i1 %.not25, label %.preheader, label %230

230:                                              ; preds = %226
  %231 = icmp eq i64 %228, -1
  br i1 %231, label %232, label %234

232:                                              ; preds = %230
  %233 = load ptr, ptr @fname, align 8, !tbaa !10
  call void @prterr(ptr noundef %233)
  call void (ptr, ...) @warn(ptr noundef nonnull @.str.99)
  br label %236

234:                                              ; preds = %230
  %235 = trunc i64 %228 to i32
  call void (ptr, ...) @warn(ptr noundef nonnull @.str.100, i32 noundef %235, i64 noundef %229)
  br label %236

236:                                              ; preds = %234, %232
  call void @exit(i32 noundef 98) #14
  unreachable

237:                                              ; preds = %._crit_edge
  call void @check_trunc_hack()
  br label %.preheader

.preheader:                                       ; preds = %226, %237
  br label %238

238:                                              ; preds = %.preheader, %.critedge
  %239 = load i64, ptr @numops, align 8, !tbaa !12
  %240 = icmp eq i64 %239, -1
  br i1 %240, label %.critedge, label %241

241:                                              ; preds = %238
  %242 = add nsw i64 %239, -1
  store i64 %242, ptr @numops, align 8, !tbaa !12
  %.not26 = icmp eq i64 %239, 0
  br i1 %.not26, label %243, label %.critedge

.critedge:                                        ; preds = %238, %241
  call void @test()
  br label %238, !llvm.loop !17

243:                                              ; preds = %241
  %244 = load i32, ptr @fd, align 4, !tbaa !8
  %245 = call i32 @close(i32 noundef %244) #12
  %.not27 = icmp eq i32 %245, 0
  br i1 %.not27, label %247, label %246

246:                                              ; preds = %243
  call void @prterr(ptr noundef nonnull @.str.101)
  call void @report_failure(i32 noundef 99)
  br label %247

247:                                              ; preds = %246, %243
  call void (ptr, ...) @prt(ptr noundef nonnull @.str.102)
  call void @exit(i32 noundef 0) #14
  unreachable
}

; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none)
declare i32 @getpagesize() local_unnamed_addr #8

; Function Attrs: nofree nounwind
declare noundef i32 @setvbuf(ptr nocapture noundef, ptr noundef, i32 noundef, i64 noundef) local_unnamed_addr #0

; Function Attrs: nounwind
declare i32 @getopt(i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

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

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

; Function Attrs: nounwind
declare i64 @time(ptr noundef) local_unnamed_addr #4

; Function Attrs: nounwind
declare ptr @signal(i32 noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: nounwind
declare ptr @initstate(i32 noundef, ptr noundef, i64 noundef) local_unnamed_addr #4

; Function Attrs: nounwind
declare ptr @setstate(ptr noundef) local_unnamed_addr #4

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

; Function Attrs: nofree nounwind
declare noalias noundef ptr @fopen(ptr nocapture noundef readonly, ptr nocapture noundef readonly) local_unnamed_addr #0

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #10

; Function Attrs: nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @calloc(i64 noundef, i64 noundef) local_unnamed_addr #11

attributes #0 = { 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 #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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { noreturn 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 "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 "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 = { "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 = { noreturn 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 #8 = { mustprogress nofree nosync nounwind willreturn memory(none) "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 #9 = { 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 #10 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(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 #11 = { nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" }
attributes #12 = { nounwind }
attributes #13 = { nounwind willreturn memory(none) }
attributes #14 = { noreturn nounwind }
attributes #15 = { nounwind allocsize(0) }

!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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !6, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"any pointer", !6, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"long", !6, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = distinct !{!17, !15}


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