; LLVM IR from ChenyangZhang-cs/iMLBench :: KNN/data/inputGen (hurricanegen)

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

@__const.main.hours = external hidden unnamed_addr constant [4 x i32], align 16
@__const.main.names = external hidden unnamed_addr constant [21 x [10 x i8]], align 16
@stderr = external global ptr, align 8
@.str = external hidden unnamed_addr constant [60 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [85 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [26 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @main(i32 noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca float, align 4
  %20 = alloca float, align 4
  %21 = alloca [4 x i32], align 16
  %22 = alloca ptr, align 8
  %23 = alloca [30 x i8], align 16
  %24 = alloca [21 x [10 x i8]], align 16
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  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 8, ptr %6) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  store i32 0, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 0, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  store i32 0, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 0, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  store i32 0, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %21) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %21, ptr align 16 @__const.main.hours, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  call void @llvm.lifetime.start.p0(i64 30, ptr %23) #7
  call void @llvm.lifetime.start.p0(i64 210, ptr %24) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %24, ptr align 16 @__const.main.names, i64 210, i1 false)
  %27 = load i32, ptr %4, align 4, !tbaa !5
  %28 = icmp slt i32 %27, 3
  br i1 %28, label %29, label %34

29:                                               ; preds = %2
  %30 = load ptr, ptr @stderr, align 8, !tbaa !9
  %31 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %30, ptr noundef @.str) #7
  %32 = load ptr, ptr @stderr, align 8, !tbaa !9
  %33 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %32, ptr noundef @.str.1) #7
  call void @exit(i32 noundef 0) #8
  unreachable

34:                                               ; preds = %2
  %35 = load ptr, ptr %5, align 8, !tbaa !9
  %36 = getelementptr inbounds ptr, ptr %35, i64 1
  %37 = load ptr, ptr %36, align 8, !tbaa !9
  %38 = call i32 @atoi(ptr noundef %37) #9
  store i32 %38, ptr %8, align 4, !tbaa !5
  %39 = load ptr, ptr %5, align 8, !tbaa !9
  %40 = getelementptr inbounds ptr, ptr %39, i64 2
  %41 = load ptr, ptr %40, align 8, !tbaa !9
  %42 = call i32 @atoi(ptr noundef %41) #9
  store i32 %42, ptr %10, align 4, !tbaa !5
  %43 = load i32, ptr %8, align 4, !tbaa !5
  %44 = add nsw i32 %43, 1023
  %45 = sdiv i32 %44, 1024
  %46 = mul nsw i32 %45, 1024
  store i32 %46, ptr %8, align 4, !tbaa !5
  %47 = load i32, ptr %8, align 4, !tbaa !5
  %48 = load i32, ptr %10, align 4, !tbaa !5
  %49 = add nsw i32 %47, %48
  %50 = sub nsw i32 %49, 1
  %51 = load i32, ptr %10, align 4, !tbaa !5
  %52 = sdiv i32 %50, %51
  store i32 %52, ptr %9, align 4, !tbaa !5
  %53 = load i32, ptr %9, align 4, !tbaa !5
  %54 = load i32, ptr %10, align 4, !tbaa !5
  %55 = mul nsw i32 %53, %54
  store i32 %55, ptr %8, align 4, !tbaa !5
  %56 = call i64 @time(ptr noundef null) #7
  %57 = trunc i64 %56 to i32
  call void @srand(i32 noundef %57) #7
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %58

58:                                               ; preds = %153, %34
  %59 = load i32, ptr %11, align 4, !tbaa !5
  %60 = load i32, ptr %10, align 4, !tbaa !5
  %61 = icmp slt i32 %59, %60
  br i1 %61, label %62, label %156

62:                                               ; preds = %58
  %63 = load i32, ptr %10, align 4, !tbaa !5
  %64 = icmp eq i32 %63, 1
  br i1 %64, label %65, label %70

65:                                               ; preds = %62
  %66 = getelementptr inbounds [30 x i8], ptr %23, i64 0, i64 0
  %67 = load i32, ptr %8, align 4, !tbaa !5
  %68 = sdiv i32 %67, 1024
  %69 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %66, ptr noundef @.str.2, i32 noundef %68) #7
  br label %77

70:                                               ; preds = %62
  %71 = getelementptr inbounds [30 x i8], ptr %23, i64 0, i64 0
  %72 = load i32, ptr %8, align 4, !tbaa !5
  %73 = sdiv i32 %72, 1024
  %74 = load i32, ptr %10, align 4, !tbaa !5
  %75 = load i32, ptr %11, align 4, !tbaa !5
  %76 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %71, ptr noundef @.str.3, i32 noundef %73, i32 noundef %74, i32 noundef %75) #7
  br label %77

77:                                               ; preds = %70, %65
  %78 = getelementptr inbounds [30 x i8], ptr %23, i64 0, i64 0
  %79 = call noalias ptr @fopen(ptr noundef %78, ptr noundef @.str.4)
  store ptr %79, ptr %6, align 8, !tbaa !9
  %80 = icmp eq ptr %79, null
  br i1 %80, label %81, label %85

81:                                               ; preds = %77
  %82 = load ptr, ptr @stderr, align 8, !tbaa !9
  %83 = getelementptr inbounds [30 x i8], ptr %23, i64 0, i64 0
  %84 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %82, ptr noundef @.str.5, ptr noundef %83) #7
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %25, align 4
  br label %202

85:                                               ; preds = %77
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %86

86:                                               ; preds = %147, %85
  %87 = load i32, ptr %7, align 4, !tbaa !5
  %88 = load i32, ptr %9, align 4, !tbaa !5
  %89 = icmp slt i32 %87, %88
  br i1 %89, label %90, label %150

90:                                               ; preds = %86
  %91 = call i32 @rand() #7
  %92 = srem i32 %91, 55
  %93 = add nsw i32 1950, %92
  store i32 %93, ptr %12, align 4, !tbaa !5
  %94 = call i32 @rand() #7
  %95 = srem i32 %94, 12
  %96 = add nsw i32 1, %95
  store i32 %96, ptr %13, align 4, !tbaa !5
  %97 = call i32 @rand() #7
  %98 = srem i32 %97, 28
  %99 = add nsw i32 1, %98
  store i32 %99, ptr %14, align 4, !tbaa !5
  %100 = call i32 @rand() #7
  %101 = srem i32 %100, 4
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds [4 x i32], ptr %21, i64 0, i64 %102
  %104 = load i32, ptr %103, align 4, !tbaa !5
  store i32 %104, ptr %15, align 4, !tbaa !5
  %105 = call i32 @rand() #7
  %106 = srem i32 %105, 28
  %107 = add nsw i32 1, %106
  store i32 %107, ptr %16, align 4, !tbaa !5
  %108 = call i32 @rand() #7
  %109 = srem i32 %108, 21
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds [21 x [10 x i8]], ptr %24, i64 0, i64 %110
  %112 = getelementptr inbounds [10 x i8], ptr %111, i64 0, i64 0
  store ptr %112, ptr %22, align 8, !tbaa !9
  %113 = call i32 @rand() #7
  %114 = srem i32 %113, 63
  %115 = add nsw i32 7, %114
  %116 = sitofp i32 %115 to float
  %117 = call i32 @rand() #7
  %118 = sitofp i32 %117 to float
  %119 = fdiv float %118, 0x41E0000000000000
  %120 = fadd float %116, %119
  store float %120, ptr %19, align 4, !tbaa !11
  %121 = call i32 @rand() #7
  %122 = srem i32 %121, 358
  %123 = sitofp i32 %122 to float
  %124 = call i32 @rand() #7
  %125 = sitofp i32 %124 to float
  %126 = fdiv float %125, 0x41E0000000000000
  %127 = fadd float %123, %126
  store float %127, ptr %20, align 4, !tbaa !11
  %128 = call i32 @rand() #7
  %129 = srem i32 %128, 155
  %130 = add nsw i32 10, %129
  store i32 %130, ptr %17, align 4, !tbaa !5
  %131 = call i32 @rand() #7
  %132 = srem i32 %131, 900
  store i32 %132, ptr %18, align 4, !tbaa !5
  %133 = load ptr, ptr %6, align 8, !tbaa !9
  %134 = load i32, ptr %12, align 4, !tbaa !5
  %135 = load i32, ptr %13, align 4, !tbaa !5
  %136 = load i32, ptr %14, align 4, !tbaa !5
  %137 = load i32, ptr %15, align 4, !tbaa !5
  %138 = load i32, ptr %16, align 4, !tbaa !5
  %139 = load ptr, ptr %22, align 8, !tbaa !9
  %140 = load float, ptr %19, align 4, !tbaa !11
  %141 = fpext float %140 to double
  %142 = load float, ptr %20, align 4, !tbaa !11
  %143 = fpext float %142 to double
  %144 = load i32, ptr %17, align 4, !tbaa !5
  %145 = load i32, ptr %18, align 4, !tbaa !5
  %146 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %133, ptr noundef @.str.6, i32 noundef %134, i32 noundef %135, i32 noundef %136, i32 noundef %137, i32 noundef %138, ptr noundef %139, double noundef %141, double noundef %143, i32 noundef %144, i32 noundef %145) #7
  br label %147

147:                                              ; preds = %90
  %148 = load i32, ptr %7, align 4, !tbaa !5
  %149 = add nsw i32 %148, 1
  store i32 %149, ptr %7, align 4, !tbaa !5
  br label %86, !llvm.loop !13

150:                                              ; preds = %86
  %151 = load ptr, ptr %6, align 8, !tbaa !9
  %152 = call i32 @fclose(ptr noundef %151)
  br label %153

153:                                              ; preds = %150
  %154 = load i32, ptr %11, align 4, !tbaa !5
  %155 = add nsw i32 %154, 1
  store i32 %155, ptr %11, align 4, !tbaa !5
  br label %58, !llvm.loop !15

156:                                              ; preds = %58
  %157 = load i32, ptr %8, align 4, !tbaa !5
  %158 = load i32, ptr %10, align 4, !tbaa !5
  %159 = call i32 (ptr, ...) @printf(ptr noundef @.str.7, i32 noundef %157, i32 noundef %158)
  %160 = load i32, ptr %10, align 4, !tbaa !5
  %161 = icmp eq i32 %160, 1
  br i1 %161, label %162, label %173

162:                                              ; preds = %156
  %163 = getelementptr inbounds [30 x i8], ptr %23, i64 0, i64 0
  %164 = load i32, ptr %8, align 4, !tbaa !5
  %165 = sdiv i32 %164, 1024
  %166 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %163, ptr noundef @.str.8, i32 noundef %165) #7
  %167 = getelementptr inbounds [30 x i8], ptr %23, i64 0, i64 0
  %168 = call noalias ptr @fopen(ptr noundef %167, ptr noundef @.str.4)
  store ptr %168, ptr %6, align 8, !tbaa !9
  %169 = load ptr, ptr %6, align 8, !tbaa !9
  %170 = load i32, ptr %8, align 4, !tbaa !5
  %171 = sdiv i32 %170, 1024
  %172 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %169, ptr noundef @.str.9, i32 noundef %171) #7
  br label %197

173:                                              ; preds = %156
  %174 = getelementptr inbounds [30 x i8], ptr %23, i64 0, i64 0
  %175 = load i32, ptr %8, align 4, !tbaa !5
  %176 = sdiv i32 %175, 1024
  %177 = load i32, ptr %10, align 4, !tbaa !5
  %178 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %174, ptr noundef @.str.10, i32 noundef %176, i32 noundef %177) #7
  %179 = getelementptr inbounds [30 x i8], ptr %23, i64 0, i64 0
  %180 = call noalias ptr @fopen(ptr noundef %179, ptr noundef @.str.4)
  store ptr %180, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #7
  store i32 0, ptr %26, align 4, !tbaa !5
  br label %181

181:                                              ; preds = %193, %173
  %182 = load i32, ptr %26, align 4, !tbaa !5
  %183 = load i32, ptr %10, align 4, !tbaa !5
  %184 = icmp slt i32 %182, %183
  br i1 %184, label %186, label %185

185:                                              ; preds = %181
  store i32 8, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #7
  br label %196

186:                                              ; preds = %181
  %187 = load ptr, ptr %6, align 8, !tbaa !9
  %188 = load i32, ptr %8, align 4, !tbaa !5
  %189 = sdiv i32 %188, 1024
  %190 = load i32, ptr %10, align 4, !tbaa !5
  %191 = load i32, ptr %26, align 4, !tbaa !5
  %192 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %187, ptr noundef @.str.11, i32 noundef %189, i32 noundef %190, i32 noundef %191) #7
  br label %193

193:                                              ; preds = %186
  %194 = load i32, ptr %26, align 4, !tbaa !5
  %195 = add nsw i32 %194, 1
  store i32 %195, ptr %26, align 4, !tbaa !5
  br label %181, !llvm.loop !16

196:                                              ; preds = %185
  br label %197

197:                                              ; preds = %196, %162
  %198 = load ptr, ptr %6, align 8, !tbaa !9
  %199 = call i32 @fclose(ptr noundef %198)
  %200 = getelementptr inbounds [30 x i8], ptr %23, i64 0, i64 0
  %201 = call i32 (ptr, ...) @printf(ptr noundef @.str.12, ptr noundef %200)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %25, align 4
  br label %202

202:                                              ; preds = %197, %81
  call void @llvm.lifetime.end.p0(i64 210, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 30, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  %203 = load i32, ptr %3, align 4
  ret i32 %203
}

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

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

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

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

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

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

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

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

; Function Attrs: nounwind
declare i32 @rand() #3

declare i32 @fclose(ptr noundef) #6

declare i32 @printf(ptr noundef, ...) #6

; 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 #5 = { 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 #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 = { nounwind }
attributes #8 = { noreturn nounwind }
attributes #9 = { 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, !12, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}


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

@__const.main.hours = external hidden unnamed_addr constant [4 x i32], align 16
@__const.main.names = external hidden unnamed_addr constant [21 x [10 x i8]], align 16
@stderr = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [60 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [85 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [26 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local range(i32 -1, 1) i32 @main(i32 noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #0 {
  %3 = alloca [30 x i8], align 16
  %4 = alloca [21 x [10 x i8]], align 16
  call void @llvm.lifetime.start.p0(i64 30, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 210, ptr nonnull %4) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(210) %4, ptr noundef nonnull align 16 dereferenceable(210) @__const.main.names, i64 210, i1 false)
  %5 = icmp slt i32 %0, 3
  br i1 %5, label %6, label %11

6:                                                ; preds = %2
  %7 = load ptr, ptr @stderr, align 8, !tbaa !5
  %8 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %7, ptr noundef nonnull @.str) #8
  %9 = load ptr, ptr @stderr, align 8, !tbaa !5
  %10 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %9, ptr noundef nonnull @.str.1) #8
  tail call void @exit(i32 noundef 0) #9
  unreachable

11:                                               ; preds = %2
  %12 = getelementptr inbounds i8, ptr %1, i64 8
  %13 = load ptr, ptr %12, align 8, !tbaa !5
  %14 = tail call i32 @atoi(ptr nocapture noundef %13) #10
  %15 = getelementptr inbounds i8, ptr %1, i64 16
  %16 = load ptr, ptr %15, align 8, !tbaa !5
  %17 = tail call i32 @atoi(ptr nocapture noundef %16) #10
  %18 = add nsw i32 %14, 1023
  %19 = sdiv i32 %18, 1024
  %20 = shl nsw i32 %19, 10
  %21 = add i32 %17, -1
  %22 = add i32 %21, %20
  %23 = sdiv i32 %22, %17
  %.fr62 = freeze i32 %23
  %24 = mul nsw i32 %.fr62, %17
  %25 = tail call i64 @time(ptr noundef null) #7
  %26 = trunc i64 %25 to i32
  tail call void @srand(i32 noundef %26) #7
  %27 = icmp sgt i32 %17, 0
  br i1 %27, label %.lr.ph57, label %._crit_edge58.thread70

._crit_edge58.thread70:                           ; preds = %11
  %28 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef %24, i32 noundef %17)
  br label %105

.lr.ph57:                                         ; preds = %11
  %29 = icmp eq i32 %17, 1
  %30 = sdiv i32 %24, 1024
  %31 = icmp sgt i32 %.fr62, 0
  br i1 %31, label %.lr.ph57.split.us, label %.lr.ph57.split

.lr.ph57.split.us:                                ; preds = %.lr.ph57, %._crit_edge.us
  %.05155.us = phi i32 [ %85, %._crit_edge.us ], [ 0, %.lr.ph57 ]
  br i1 %29, label %34, label %32

32:                                               ; preds = %.lr.ph57.split.us
  %33 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %30, i32 noundef %17, i32 noundef %.05155.us) #7
  br label %36

34:                                               ; preds = %.lr.ph57.split.us
  %35 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %30) #7
  br label %36

36:                                               ; preds = %34, %32
  %37 = call noalias ptr @fopen(ptr noundef nonnull %3, ptr noundef nonnull @.str.4)
  %38 = icmp eq ptr %37, null
  br i1 %38, label %.split.us, label %.preheader.us

.preheader.us:                                    ; preds = %36, %.preheader.us
  %.05054.us = phi i32 [ %83, %.preheader.us ], [ 0, %36 ]
  %39 = call i32 @rand() #7
  %40 = srem i32 %39, 55
  %41 = add nsw i32 %40, 1950
  %42 = call i32 @rand() #7
  %43 = srem i32 %42, 12
  %44 = add nsw i32 %43, 1
  %45 = call i32 @rand() #7
  %46 = srem i32 %45, 28
  %47 = add nsw i32 %46, 1
  %48 = call i32 @rand() #7
  %49 = srem i32 %48, 4
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [4 x i32], ptr @__const.main.hours, i64 0, i64 %50
  %52 = load i32, ptr %51, align 4, !tbaa !9
  %53 = call i32 @rand() #7
  %54 = srem i32 %53, 28
  %55 = add nsw i32 %54, 1
  %56 = call i32 @rand() #7
  %57 = srem i32 %56, 21
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [21 x [10 x i8]], ptr %4, i64 0, i64 %58
  %60 = call i32 @rand() #7
  %61 = srem i32 %60, 63
  %62 = add nsw i32 %61, 7
  %63 = sitofp i32 %62 to float
  %64 = call i32 @rand() #7
  %65 = sitofp i32 %64 to float
  %66 = fmul float %65, 0x3E00000000000000
  %67 = fadd float %66, %63
  %68 = call i32 @rand() #7
  %69 = srem i32 %68, 358
  %70 = sitofp i32 %69 to float
  %71 = call i32 @rand() #7
  %72 = sitofp i32 %71 to float
  %73 = fmul float %72, 0x3E00000000000000
  %74 = fadd float %73, %70
  %75 = call i32 @rand() #7
  %76 = srem i32 %75, 155
  %77 = add nsw i32 %76, 10
  %78 = call i32 @rand() #7
  %79 = srem i32 %78, 900
  %80 = fpext float %67 to double
  %81 = fpext float %74 to double
  %82 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %37, ptr noundef nonnull @.str.6, i32 noundef %41, i32 noundef %44, i32 noundef %47, i32 noundef %52, i32 noundef %55, ptr noundef nonnull %59, double noundef %80, double noundef %81, i32 noundef %77, i32 noundef %79) #7
  %83 = add nuw nsw i32 %.05054.us, 1
  %exitcond67.not = icmp eq i32 %83, %.fr62
  br i1 %exitcond67.not, label %._crit_edge.us, label %.preheader.us, !llvm.loop !11

._crit_edge.us:                                   ; preds = %.preheader.us
  %84 = call i32 @fclose(ptr noundef nonnull %37)
  %85 = add nuw nsw i32 %.05155.us, 1
  %exitcond68.not = icmp eq i32 %85, %17
  br i1 %exitcond68.not, label %._crit_edge58, label %.lr.ph57.split.us, !llvm.loop !13

.lr.ph57.split:                                   ; preds = %.lr.ph57
  br i1 %29, label %.lr.ph57.split.split.us, label %.lr.ph57.split.split

.lr.ph57.split.split.us:                          ; preds = %.lr.ph57.split
  %86 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %30) #7
  %87 = call noalias ptr @fopen(ptr noundef nonnull %3, ptr noundef nonnull @.str.4)
  %88 = icmp eq ptr %87, null
  br i1 %88, label %.split.us, label %._crit_edge58.thread

.lr.ph57.split.split:                             ; preds = %.lr.ph57.split, %.preheader
  %.05155 = phi i32 [ %93, %.preheader ], [ 0, %.lr.ph57.split ]
  %89 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %30, i32 noundef %17, i32 noundef %.05155) #7
  %90 = call noalias ptr @fopen(ptr noundef nonnull %3, ptr noundef nonnull @.str.4)
  %91 = icmp eq ptr %90, null
  br i1 %91, label %.split.us, label %.preheader

.preheader:                                       ; preds = %.lr.ph57.split.split
  %92 = tail call i32 @fclose(ptr noundef nonnull %90)
  %93 = add nuw nsw i32 %.05155, 1
  %exitcond.not = icmp eq i32 %93, %17
  br i1 %exitcond.not, label %._crit_edge58, label %.lr.ph57.split.split, !llvm.loop !13

.split.us:                                        ; preds = %.lr.ph57.split.split, %36, %.lr.ph57.split.split.us
  %94 = load ptr, ptr @stderr, align 8, !tbaa !5
  %95 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %94, ptr noundef nonnull @.str.5, ptr noundef nonnull %3) #8
  br label %113

._crit_edge58.thread:                             ; preds = %.lr.ph57.split.split.us
  %96 = tail call i32 @fclose(ptr noundef nonnull %87)
  %97 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef %24, i32 noundef %17)
  br label %100

._crit_edge58:                                    ; preds = %.preheader, %._crit_edge.us
  %98 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef %24, i32 noundef %17)
  %99 = icmp eq i32 %17, 1
  br i1 %99, label %100, label %105

100:                                              ; preds = %._crit_edge58.thread, %._crit_edge58
  %101 = sdiv i32 %24, 1024
  %102 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.8, i32 noundef %101) #7
  %103 = call noalias ptr @fopen(ptr noundef nonnull %3, ptr noundef nonnull @.str.4)
  %104 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %103, ptr noundef nonnull @.str.9, i32 noundef %101) #7
  br label %.loopexit

105:                                              ; preds = %._crit_edge58.thread70, %._crit_edge58
  %106 = sdiv i32 %24, 1024
  %107 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.10, i32 noundef %106, i32 noundef %17) #7
  %108 = call noalias ptr @fopen(ptr noundef nonnull %3, ptr noundef nonnull @.str.4)
  br i1 %27, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %105, %.lr.ph
  %.061 = phi i32 [ %110, %.lr.ph ], [ 0, %105 ]
  %109 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %108, ptr noundef nonnull @.str.11, i32 noundef %106, i32 noundef %17, i32 noundef %.061) #7
  %110 = add nuw nsw i32 %.061, 1
  %exitcond69.not = icmp eq i32 %110, %17
  br i1 %exitcond69.not, label %.loopexit, label %.lr.ph, !llvm.loop !14

.loopexit:                                        ; preds = %.lr.ph, %105, %100
  %.049 = phi ptr [ %103, %100 ], [ %108, %105 ], [ %108, %.lr.ph ]
  %111 = call i32 @fclose(ptr noundef %.049)
  %112 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.12, ptr noundef nonnull %3)
  br label %113

113:                                              ; preds = %.loopexit, %.split.us
  %.048 = phi i32 [ -1, %.split.us ], [ 0, %.loopexit ]
  call void @llvm.lifetime.end.p0(i64 210, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 30, ptr nonnull %3) #7
  ret i32 %.048
}

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

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

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

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

; Function Attrs: nounwind
declare void @srand(i32 noundef) local_unnamed_addr #6

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

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

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

; Function Attrs: nounwind
declare i32 @rand() local_unnamed_addr #6

; Function Attrs: nofree nounwind
declare noundef i32 @fclose(ptr nocapture noundef) local_unnamed_addr #3

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

; Function Attrs: mustprogress 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 #5 = { 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 #6 = { 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 #7 = { nounwind }
attributes #8 = { cold nounwind }
attributes #9 = { noreturn nounwind }
attributes #10 = { nounwind willreturn memory(read) }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}


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