; LLVM IR from tsotchke/quantum_rng :: examples/finance (monte_carlo)

; 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.simulation_config_t = type { i32, i32, %struct.asset_params_t, [256 x i8], i32, i32, i32, [1024 x i8], double }
%struct.asset_params_t = type { double, double, double, double }

@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @parse_simulation_args(i32 noundef %0, ptr noundef %1, ptr noundef %2) #0 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  store ptr %2, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 1, ptr %7, align 4, !tbaa !5
  br label %8

8:                                                ; preds = %257, %3
  %9 = load i32, ptr %7, align 4, !tbaa !5
  %10 = load i32, ptr %4, align 4, !tbaa !5
  %11 = icmp slt i32 %9, %10
  br i1 %11, label %13, label %12

12:                                               ; preds = %8
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %260

13:                                               ; preds = %8
  %14 = load ptr, ptr %5, align 8, !tbaa !9
  %15 = load i32, ptr %7, align 4, !tbaa !5
  %16 = sext i32 %15 to i64
  %17 = getelementptr inbounds ptr, ptr %14, i64 %16
  %18 = load ptr, ptr %17, align 8, !tbaa !9
  %19 = call i32 @strcmp(ptr noundef %18, ptr noundef @.str) #6
  %20 = icmp eq i32 %19, 0
  br i1 %20, label %21, label %36

21:                                               ; preds = %13
  %22 = load i32, ptr %7, align 4, !tbaa !5
  %23 = add nsw i32 %22, 1
  %24 = load i32, ptr %4, align 4, !tbaa !5
  %25 = icmp slt i32 %23, %24
  br i1 %25, label %26, label %36

26:                                               ; preds = %21
  %27 = load ptr, ptr %5, align 8, !tbaa !9
  %28 = load i32, ptr %7, align 4, !tbaa !5
  %29 = add nsw i32 %28, 1
  store i32 %29, ptr %7, align 4, !tbaa !5
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds ptr, ptr %27, i64 %30
  %32 = load ptr, ptr %31, align 8, !tbaa !9
  %33 = call i32 @atoi(ptr noundef %32) #6
  %34 = load ptr, ptr %6, align 8, !tbaa !9
  %35 = getelementptr inbounds %struct.simulation_config_t, ptr %34, i32 0, i32 0
  store i32 %33, ptr %35, align 8, !tbaa !11
  br label %256

36:                                               ; preds = %21, %13
  %37 = load ptr, ptr %5, align 8, !tbaa !9
  %38 = load i32, ptr %7, align 4, !tbaa !5
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds ptr, ptr %37, i64 %39
  %41 = load ptr, ptr %40, align 8, !tbaa !9
  %42 = call i32 @strcmp(ptr noundef %41, ptr noundef @.str.1) #6
  %43 = icmp eq i32 %42, 0
  br i1 %43, label %44, label %59

44:                                               ; preds = %36
  %45 = load i32, ptr %7, align 4, !tbaa !5
  %46 = add nsw i32 %45, 1
  %47 = load i32, ptr %4, align 4, !tbaa !5
  %48 = icmp slt i32 %46, %47
  br i1 %48, label %49, label %59

49:                                               ; preds = %44
  %50 = load ptr, ptr %5, align 8, !tbaa !9
  %51 = load i32, ptr %7, align 4, !tbaa !5
  %52 = add nsw i32 %51, 1
  store i32 %52, ptr %7, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds ptr, ptr %50, i64 %53
  %55 = load ptr, ptr %54, align 8, !tbaa !9
  %56 = call i32 @atoi(ptr noundef %55) #6
  %57 = load ptr, ptr %6, align 8, !tbaa !9
  %58 = getelementptr inbounds %struct.simulation_config_t, ptr %57, i32 0, i32 1
  store i32 %56, ptr %58, align 4, !tbaa !15
  br label %255

59:                                               ; preds = %44, %36
  %60 = load ptr, ptr %5, align 8, !tbaa !9
  %61 = load i32, ptr %7, align 4, !tbaa !5
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds ptr, ptr %60, i64 %62
  %64 = load ptr, ptr %63, align 8, !tbaa !9
  %65 = call i32 @strcmp(ptr noundef %64, ptr noundef @.str.2) #6
  %66 = icmp eq i32 %65, 0
  br i1 %66, label %67, label %83

67:                                               ; preds = %59
  %68 = load i32, ptr %7, align 4, !tbaa !5
  %69 = add nsw i32 %68, 1
  %70 = load i32, ptr %4, align 4, !tbaa !5
  %71 = icmp slt i32 %69, %70
  br i1 %71, label %72, label %83

72:                                               ; preds = %67
  %73 = load ptr, ptr %5, align 8, !tbaa !9
  %74 = load i32, ptr %7, align 4, !tbaa !5
  %75 = add nsw i32 %74, 1
  store i32 %75, ptr %7, align 4, !tbaa !5
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds ptr, ptr %73, i64 %76
  %78 = load ptr, ptr %77, align 8, !tbaa !9
  %79 = call double @atof(ptr noundef %78) #6
  %80 = load ptr, ptr %6, align 8, !tbaa !9
  %81 = getelementptr inbounds %struct.simulation_config_t, ptr %80, i32 0, i32 2
  %82 = getelementptr inbounds %struct.asset_params_t, ptr %81, i32 0, i32 0
  store double %79, ptr %82, align 8, !tbaa !16
  br label %254

83:                                               ; preds = %67, %59
  %84 = load ptr, ptr %5, align 8, !tbaa !9
  %85 = load i32, ptr %7, align 4, !tbaa !5
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds ptr, ptr %84, i64 %86
  %88 = load ptr, ptr %87, align 8, !tbaa !9
  %89 = call i32 @strcmp(ptr noundef %88, ptr noundef @.str.3) #6
  %90 = icmp eq i32 %89, 0
  br i1 %90, label %91, label %107

91:                                               ; preds = %83
  %92 = load i32, ptr %7, align 4, !tbaa !5
  %93 = add nsw i32 %92, 1
  %94 = load i32, ptr %4, align 4, !tbaa !5
  %95 = icmp slt i32 %93, %94
  br i1 %95, label %96, label %107

96:                                               ; preds = %91
  %97 = load ptr, ptr %5, align 8, !tbaa !9
  %98 = load i32, ptr %7, align 4, !tbaa !5
  %99 = add nsw i32 %98, 1
  store i32 %99, ptr %7, align 4, !tbaa !5
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds ptr, ptr %97, i64 %100
  %102 = load ptr, ptr %101, align 8, !tbaa !9
  %103 = call double @atof(ptr noundef %102) #6
  %104 = load ptr, ptr %6, align 8, !tbaa !9
  %105 = getelementptr inbounds %struct.simulation_config_t, ptr %104, i32 0, i32 2
  %106 = getelementptr inbounds %struct.asset_params_t, ptr %105, i32 0, i32 1
  store double %103, ptr %106, align 8, !tbaa !17
  br label %253

107:                                              ; preds = %91, %83
  %108 = load ptr, ptr %5, align 8, !tbaa !9
  %109 = load i32, ptr %7, align 4, !tbaa !5
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds ptr, ptr %108, i64 %110
  %112 = load ptr, ptr %111, align 8, !tbaa !9
  %113 = call i32 @strcmp(ptr noundef %112, ptr noundef @.str.4) #6
  %114 = icmp eq i32 %113, 0
  br i1 %114, label %115, label %131

115:                                              ; preds = %107
  %116 = load i32, ptr %7, align 4, !tbaa !5
  %117 = add nsw i32 %116, 1
  %118 = load i32, ptr %4, align 4, !tbaa !5
  %119 = icmp slt i32 %117, %118
  br i1 %119, label %120, label %131

120:                                              ; preds = %115
  %121 = load ptr, ptr %5, align 8, !tbaa !9
  %122 = load i32, ptr %7, align 4, !tbaa !5
  %123 = add nsw i32 %122, 1
  store i32 %123, ptr %7, align 4, !tbaa !5
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds ptr, ptr %121, i64 %124
  %126 = load ptr, ptr %125, align 8, !tbaa !9
  %127 = call double @atof(ptr noundef %126) #6
  %128 = load ptr, ptr %6, align 8, !tbaa !9
  %129 = getelementptr inbounds %struct.simulation_config_t, ptr %128, i32 0, i32 2
  %130 = getelementptr inbounds %struct.asset_params_t, ptr %129, i32 0, i32 2
  store double %127, ptr %130, align 8, !tbaa !18
  br label %252

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

139:                                              ; preds = %131
  %140 = load i32, ptr %7, align 4, !tbaa !5
  %141 = add nsw i32 %140, 1
  %142 = load i32, ptr %4, align 4, !tbaa !5
  %143 = icmp slt i32 %141, %142
  br i1 %143, label %144, label %155

144:                                              ; preds = %139
  %145 = load ptr, ptr %5, align 8, !tbaa !9
  %146 = load i32, ptr %7, align 4, !tbaa !5
  %147 = add nsw i32 %146, 1
  store i32 %147, ptr %7, align 4, !tbaa !5
  %148 = sext i32 %147 to i64
  %149 = getelementptr inbounds ptr, ptr %145, i64 %148
  %150 = load ptr, ptr %149, align 8, !tbaa !9
  %151 = call double @atof(ptr noundef %150) #6
  %152 = load ptr, ptr %6, align 8, !tbaa !9
  %153 = getelementptr inbounds %struct.simulation_config_t, ptr %152, i32 0, i32 2
  %154 = getelementptr inbounds %struct.asset_params_t, ptr %153, i32 0, i32 3
  store double %151, ptr %154, align 8, !tbaa !19
  br label %251

155:                                              ; preds = %139, %131
  %156 = load ptr, ptr %5, align 8, !tbaa !9
  %157 = load i32, ptr %7, align 4, !tbaa !5
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds ptr, ptr %156, i64 %158
  %160 = load ptr, ptr %159, align 8, !tbaa !9
  %161 = call i32 @strcmp(ptr noundef %160, ptr noundef @.str.6) #6
  %162 = icmp eq i32 %161, 0
  br i1 %162, label %163, label %193

163:                                              ; preds = %155
  %164 = load i32, ptr %7, align 4, !tbaa !5
  %165 = add nsw i32 %164, 1
  %166 = load i32, ptr %4, align 4, !tbaa !5
  %167 = icmp slt i32 %165, %166
  br i1 %167, label %168, label %193

168:                                              ; preds = %163
  %169 = load ptr, ptr %5, align 8, !tbaa !9
  %170 = load i32, ptr %7, align 4, !tbaa !5
  %171 = add nsw i32 %170, 1
  store i32 %171, ptr %7, align 4, !tbaa !5
  %172 = sext i32 %171 to i64
  %173 = getelementptr inbounds ptr, ptr %169, i64 %172
  %174 = load ptr, ptr %173, align 8, !tbaa !9
  %175 = call i32 @strcmp(ptr noundef %174, ptr noundef @.str.7) #6
  %176 = icmp eq i32 %175, 0
  br i1 %176, label %177, label %180

177:                                              ; preds = %168
  %178 = load ptr, ptr %6, align 8, !tbaa !9
  %179 = getelementptr inbounds %struct.simulation_config_t, ptr %178, i32 0, i32 5
  store i32 3, ptr %179, align 4, !tbaa !20
  br label %192

180:                                              ; preds = %168
  %181 = load ptr, ptr %5, align 8, !tbaa !9
  %182 = load i32, ptr %7, align 4, !tbaa !5
  %183 = sext i32 %182 to i64
  %184 = getelementptr inbounds ptr, ptr %181, i64 %183
  %185 = load ptr, ptr %184, align 8, !tbaa !9
  %186 = call i32 @strcmp(ptr noundef %185, ptr noundef @.str.8) #6
  %187 = icmp eq i32 %186, 0
  br i1 %187, label %188, label %191

188:                                              ; preds = %180
  %189 = load ptr, ptr %6, align 8, !tbaa !9
  %190 = getelementptr inbounds %struct.simulation_config_t, ptr %189, i32 0, i32 5
  store i32 4, ptr %190, align 4, !tbaa !20
  br label %191

191:                                              ; preds = %188, %180
  br label %192

192:                                              ; preds = %191, %177
  br label %250

193:                                              ; preds = %163, %155
  %194 = load ptr, ptr %5, align 8, !tbaa !9
  %195 = load i32, ptr %7, align 4, !tbaa !5
  %196 = sext i32 %195 to i64
  %197 = getelementptr inbounds ptr, ptr %194, i64 %196
  %198 = load ptr, ptr %197, align 8, !tbaa !9
  %199 = call i32 @strcmp(ptr noundef %198, ptr noundef @.str.9) #6
  %200 = icmp eq i32 %199, 0
  br i1 %200, label %201, label %224

201:                                              ; preds = %193
  %202 = load i32, ptr %7, align 4, !tbaa !5
  %203 = add nsw i32 %202, 1
  %204 = load i32, ptr %4, align 4, !tbaa !5
  %205 = icmp slt i32 %203, %204
  br i1 %205, label %206, label %224

206:                                              ; preds = %201
  %207 = load ptr, ptr %6, align 8, !tbaa !9
  %208 = getelementptr inbounds %struct.simulation_config_t, ptr %207, i32 0, i32 3
  %209 = getelementptr inbounds [256 x i8], ptr %208, i64 0, i64 0
  %210 = load ptr, ptr %5, align 8, !tbaa !9
  %211 = load i32, ptr %7, align 4, !tbaa !5
  %212 = add nsw i32 %211, 1
  store i32 %212, ptr %7, align 4, !tbaa !5
  %213 = sext i32 %212 to i64
  %214 = getelementptr inbounds ptr, ptr %210, i64 %213
  %215 = load ptr, ptr %214, align 8, !tbaa !9
  %216 = call ptr @strncpy(ptr noundef %209, ptr noundef %215, i64 noundef 255) #5
  %217 = load ptr, ptr %6, align 8, !tbaa !9
  %218 = getelementptr inbounds %struct.simulation_config_t, ptr %217, i32 0, i32 3
  %219 = getelementptr inbounds [256 x i8], ptr %218, i64 0, i64 0
  %220 = call i64 @strlen(ptr noundef %219) #6
  %221 = trunc i64 %220 to i32
  %222 = load ptr, ptr %6, align 8, !tbaa !9
  %223 = getelementptr inbounds %struct.simulation_config_t, ptr %222, i32 0, i32 4
  store i32 %221, ptr %223, align 8, !tbaa !21
  br label %249

224:                                              ; preds = %201, %193
  %225 = load ptr, ptr %5, align 8, !tbaa !9
  %226 = load i32, ptr %7, align 4, !tbaa !5
  %227 = sext i32 %226 to i64
  %228 = getelementptr inbounds ptr, ptr %225, i64 %227
  %229 = load ptr, ptr %228, align 8, !tbaa !9
  %230 = call i32 @strcmp(ptr noundef %229, ptr noundef @.str.10) #6
  %231 = icmp eq i32 %230, 0
  br i1 %231, label %232, label %248

232:                                              ; preds = %224
  %233 = load i32, ptr %7, align 4, !tbaa !5
  %234 = add nsw i32 %233, 1
  %235 = load i32, ptr %4, align 4, !tbaa !5
  %236 = icmp slt i32 %234, %235
  br i1 %236, label %237, label %248

237:                                              ; preds = %232
  %238 = load ptr, ptr %6, align 8, !tbaa !9
  %239 = getelementptr inbounds %struct.simulation_config_t, ptr %238, i32 0, i32 7
  %240 = getelementptr inbounds [1024 x i8], ptr %239, i64 0, i64 0
  %241 = load ptr, ptr %5, align 8, !tbaa !9
  %242 = load i32, ptr %7, align 4, !tbaa !5
  %243 = add nsw i32 %242, 1
  store i32 %243, ptr %7, align 4, !tbaa !5
  %244 = sext i32 %243 to i64
  %245 = getelementptr inbounds ptr, ptr %241, i64 %244
  %246 = load ptr, ptr %245, align 8, !tbaa !9
  %247 = call ptr @strncpy(ptr noundef %240, ptr noundef %246, i64 noundef 1023) #5
  br label %248

248:                                              ; preds = %237, %232, %224
  br label %249

249:                                              ; preds = %248, %206
  br label %250

250:                                              ; preds = %249, %192
  br label %251

251:                                              ; preds = %250, %144
  br label %252

252:                                              ; preds = %251, %120
  br label %253

253:                                              ; preds = %252, %96
  br label %254

254:                                              ; preds = %253, %72
  br label %255

255:                                              ; preds = %254, %49
  br label %256

256:                                              ; preds = %255, %26
  br label %257

257:                                              ; preds = %256
  %258 = load i32, ptr %7, align 4, !tbaa !5
  %259 = add nsw i32 %258, 1
  store i32 %259, ptr %7, align 4, !tbaa !5
  br label %8, !llvm.loop !22

260:                                              ; preds = %12
  ret void
}

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

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

; Function Attrs: inlinehint nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr noundef nonnull) #3

; Function Attrs: inlinehint nounwind willreturn memory(read) uwtable
declare double @atof(ptr noundef nonnull) #3

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

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

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { inlinehint nounwind willreturn memory(read) 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 #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 = { 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 = !{!"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 = !{!12, !6, i64 0}
!12 = !{!"", !6, i64 0, !6, i64 4, !13, i64 8, !7, i64 40, !6, i64 296, !6, i64 300, !6, i64 304, !7, i64 308, !14, i64 1336}
!13 = !{!"", !14, i64 0, !14, i64 8, !14, i64 16, !14, i64 24}
!14 = !{!"double", !7, i64 0}
!15 = !{!12, !6, i64 4}
!16 = !{!12, !14, i64 8}
!17 = !{!12, !14, i64 16}
!18 = !{!12, !14, i64 24}
!19 = !{!12, !14, i64 32}
!20 = !{!12, !6, i64 300}
!21 = !{!12, !6, i64 296}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: nofree nounwind memory(readwrite, inaccessiblemem: read) uwtable
define dso_local void @parse_simulation_args(i32 noundef %0, ptr nocapture noundef readonly %1, ptr noundef %2) local_unnamed_addr #0 {
  %4 = icmp sgt i32 %0, 1
  br i1 %4, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %3
  %5 = getelementptr inbounds i8, ptr %2, i64 308
  %6 = getelementptr inbounds i8, ptr %2, i64 40
  %7 = getelementptr inbounds i8, ptr %2, i64 296
  %8 = getelementptr inbounds i8, ptr %2, i64 300
  %9 = getelementptr inbounds i8, ptr %2, i64 32
  %10 = getelementptr inbounds i8, ptr %2, i64 24
  %11 = getelementptr inbounds i8, ptr %2, i64 16
  %12 = getelementptr inbounds i8, ptr %2, i64 8
  %13 = getelementptr inbounds i8, ptr %2, i64 4
  br label %14

._crit_edge:                                      ; preds = %124, %3
  ret void

14:                                               ; preds = %.lr.ph, %124
  %.080 = phi i32 [ 1, %.lr.ph ], [ %125, %124 ]
  %15 = sext i32 %.080 to i64
  %16 = getelementptr inbounds ptr, ptr %1, i64 %15
  %17 = load ptr, ptr %16, align 8, !tbaa !5
  %18 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %17, ptr noundef nonnull dereferenceable(1) @.str) #4
  %19 = icmp eq i32 %18, 0
  br i1 %19, label %20, label %28

20:                                               ; preds = %14
  %21 = add nsw i32 %.080, 1
  %22 = icmp slt i32 %21, %0
  br i1 %22, label %23, label %28

23:                                               ; preds = %20
  %24 = sext i32 %21 to i64
  %25 = getelementptr inbounds ptr, ptr %1, i64 %24
  %26 = load ptr, ptr %25, align 8, !tbaa !5
  %27 = tail call i32 @atoi(ptr nocapture noundef %26) #4
  store i32 %27, ptr %2, align 8, !tbaa !9
  br label %124

28:                                               ; preds = %20, %14
  %29 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %17, ptr noundef nonnull dereferenceable(1) @.str.1) #4
  %30 = icmp eq i32 %29, 0
  br i1 %30, label %31, label %39

31:                                               ; preds = %28
  %32 = add nsw i32 %.080, 1
  %33 = icmp slt i32 %32, %0
  br i1 %33, label %34, label %39

34:                                               ; preds = %31
  %35 = sext i32 %32 to i64
  %36 = getelementptr inbounds ptr, ptr %1, i64 %35
  %37 = load ptr, ptr %36, align 8, !tbaa !5
  %38 = tail call i32 @atoi(ptr nocapture noundef %37) #4
  store i32 %38, ptr %13, align 4, !tbaa !14
  br label %124

39:                                               ; preds = %31, %28
  %40 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %17, ptr noundef nonnull dereferenceable(1) @.str.2) #4
  %41 = icmp eq i32 %40, 0
  br i1 %41, label %42, label %50

42:                                               ; preds = %39
  %43 = add nsw i32 %.080, 1
  %44 = icmp slt i32 %43, %0
  br i1 %44, label %45, label %50

45:                                               ; preds = %42
  %46 = sext i32 %43 to i64
  %47 = getelementptr inbounds ptr, ptr %1, i64 %46
  %48 = load ptr, ptr %47, align 8, !tbaa !5
  %49 = tail call double @atof(ptr noundef %48) #4
  store double %49, ptr %12, align 8, !tbaa !15
  br label %124

50:                                               ; preds = %42, %39
  %51 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %17, ptr noundef nonnull dereferenceable(1) @.str.3) #4
  %52 = icmp eq i32 %51, 0
  br i1 %52, label %53, label %61

53:                                               ; preds = %50
  %54 = add nsw i32 %.080, 1
  %55 = icmp slt i32 %54, %0
  br i1 %55, label %56, label %61

56:                                               ; preds = %53
  %57 = sext i32 %54 to i64
  %58 = getelementptr inbounds ptr, ptr %1, i64 %57
  %59 = load ptr, ptr %58, align 8, !tbaa !5
  %60 = tail call double @atof(ptr noundef %59) #4
  store double %60, ptr %11, align 8, !tbaa !16
  br label %124

61:                                               ; preds = %53, %50
  %62 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %17, ptr noundef nonnull dereferenceable(1) @.str.4) #4
  %63 = icmp eq i32 %62, 0
  br i1 %63, label %64, label %72

64:                                               ; preds = %61
  %65 = add nsw i32 %.080, 1
  %66 = icmp slt i32 %65, %0
  br i1 %66, label %67, label %72

67:                                               ; preds = %64
  %68 = sext i32 %65 to i64
  %69 = getelementptr inbounds ptr, ptr %1, i64 %68
  %70 = load ptr, ptr %69, align 8, !tbaa !5
  %71 = tail call double @atof(ptr noundef %70) #4
  store double %71, ptr %10, align 8, !tbaa !17
  br label %124

72:                                               ; preds = %64, %61
  %73 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %17, ptr noundef nonnull dereferenceable(1) @.str.5) #4
  %74 = icmp eq i32 %73, 0
  br i1 %74, label %75, label %83

75:                                               ; preds = %72
  %76 = add nsw i32 %.080, 1
  %77 = icmp slt i32 %76, %0
  br i1 %77, label %78, label %83

78:                                               ; preds = %75
  %79 = sext i32 %76 to i64
  %80 = getelementptr inbounds ptr, ptr %1, i64 %79
  %81 = load ptr, ptr %80, align 8, !tbaa !5
  %82 = tail call double @atof(ptr noundef %81) #4
  store double %82, ptr %9, align 8, !tbaa !18
  br label %124

83:                                               ; preds = %75, %72
  %84 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %17, ptr noundef nonnull dereferenceable(1) @.str.6) #4
  %85 = icmp eq i32 %84, 0
  br i1 %85, label %86, label %100

86:                                               ; preds = %83
  %87 = add nsw i32 %.080, 1
  %88 = icmp slt i32 %87, %0
  br i1 %88, label %89, label %100

89:                                               ; preds = %86
  %90 = sext i32 %87 to i64
  %91 = getelementptr inbounds ptr, ptr %1, i64 %90
  %92 = load ptr, ptr %91, align 8, !tbaa !5
  %93 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %92, ptr noundef nonnull dereferenceable(1) @.str.7) #4
  %94 = icmp eq i32 %93, 0
  br i1 %94, label %95, label %96

95:                                               ; preds = %89
  store i32 3, ptr %8, align 4, !tbaa !19
  br label %124

96:                                               ; preds = %89
  %97 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %92, ptr noundef nonnull dereferenceable(1) @.str.8) #4
  %98 = icmp eq i32 %97, 0
  br i1 %98, label %99, label %124

99:                                               ; preds = %96
  store i32 4, ptr %8, align 4, !tbaa !19
  br label %124

100:                                              ; preds = %86, %83
  %101 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %17, ptr noundef nonnull dereferenceable(1) @.str.9) #4
  %102 = icmp eq i32 %101, 0
  br i1 %102, label %103, label %113

103:                                              ; preds = %100
  %104 = add nsw i32 %.080, 1
  %105 = icmp slt i32 %104, %0
  br i1 %105, label %106, label %113

106:                                              ; preds = %103
  %107 = sext i32 %104 to i64
  %108 = getelementptr inbounds ptr, ptr %1, i64 %107
  %109 = load ptr, ptr %108, align 8, !tbaa !5
  %110 = tail call ptr @strncpy(ptr noundef nonnull dereferenceable(1) %6, ptr noundef nonnull dereferenceable(1) %109, i64 noundef 255) #5
  %111 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %6) #4
  %112 = trunc i64 %111 to i32
  store i32 %112, ptr %7, align 8, !tbaa !20
  br label %124

113:                                              ; preds = %103, %100
  %114 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %17, ptr noundef nonnull dereferenceable(1) @.str.10) #4
  %115 = icmp eq i32 %114, 0
  br i1 %115, label %116, label %124

116:                                              ; preds = %113
  %117 = add nsw i32 %.080, 1
  %118 = icmp slt i32 %117, %0
  br i1 %118, label %119, label %124

119:                                              ; preds = %116
  %120 = sext i32 %117 to i64
  %121 = getelementptr inbounds ptr, ptr %1, i64 %120
  %122 = load ptr, ptr %121, align 8, !tbaa !5
  %123 = tail call ptr @strncpy(ptr noundef nonnull dereferenceable(1) %5, ptr noundef nonnull dereferenceable(1) %122, i64 noundef 1023) #5
  br label %124

124:                                              ; preds = %23, %45, %67, %96, %99, %95, %113, %116, %119, %106, %78, %56, %34
  %.1 = phi i32 [ %21, %23 ], [ %32, %34 ], [ %43, %45 ], [ %54, %56 ], [ %65, %67 ], [ %76, %78 ], [ %87, %95 ], [ %87, %99 ], [ %87, %96 ], [ %104, %106 ], [ %117, %119 ], [ %.080, %116 ], [ %.080, %113 ]
  %125 = add nsw i32 %.1, 1
  %126 = icmp slt i32 %125, %0
  br i1 %126, label %14, label %._crit_edge, !llvm.loop !21
}

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

; Function Attrs: inlinehint mustprogress nofree nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr nocapture noundef nonnull) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nofree nounwind willreturn memory(read) uwtable
declare double @atof(ptr nocapture noundef nonnull) local_unnamed_addr #2

; 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 #3

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

attributes #0 = { nofree nounwind memory(readwrite, inaccessiblemem: read) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress 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 #2 = { inlinehint mustprogress nofree nounwind willreturn memory(read) 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 = { 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 #4 = { nounwind willreturn memory(read) }
attributes #5 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"", !11, i64 0, !11, i64 4, !12, i64 8, !7, i64 40, !11, i64 296, !11, i64 300, !11, i64 304, !7, i64 308, !13, i64 1336}
!11 = !{!"int", !7, i64 0}
!12 = !{!"", !13, i64 0, !13, i64 8, !13, i64 16, !13, i64 24}
!13 = !{!"double", !7, i64 0}
!14 = !{!10, !11, i64 4}
!15 = !{!10, !13, i64 8}
!16 = !{!10, !13, i64 16}
!17 = !{!10, !13, i64 24}
!18 = !{!10, !13, i64 32}
!19 = !{!10, !11, i64 300}
!20 = !{!10, !11, i64 296}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass