; LLVM IR from Montimage/mmt-security :: src (main_plugin_info)

; 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.tm = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i64, ptr }
%struct.rule_info_struct = type { i32, i32, ptr, ptr, ptr, ptr, i8, i8, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.proto_attribute_struct = type { ptr, ptr, i32, i32, i32, i32 }
%struct.rule_version_info_struct = type { i64, ptr, ptr, i32, ptr }

@.str = external hidden unnamed_addr constant [24 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [2 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 i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca %struct.tm, 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 8, ptr %6) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.start.p0(i64 56, ptr %10) #7
  br label %11

11:                                               ; preds = %2
  %12 = load i32, ptr %4, align 4, !tbaa !5
  %13 = icmp sle i32 %12, 2
  %14 = xor i1 %13, true
  %15 = xor i1 %14, true
  %16 = xor i1 %15, true
  %17 = zext i1 %16 to i32
  %18 = sext i32 %17 to i64
  %19 = call i64 @llvm.expect.i64(i64 %18, i64 0)
  %20 = icmp ne i64 %19, 0
  br i1 %20, label %21, label %25

21:                                               ; preds = %11
  %22 = load ptr, ptr %5, align 8, !tbaa !9
  %23 = getelementptr inbounds ptr, ptr %22, i64 0
  %24 = load ptr, ptr %23, align 8, !tbaa !9
  call void (i32, ptr, ...) @mmt_sec_log(i32 noundef 4, ptr noundef @.str, ptr noundef %24)
  call void @exit(i32 noundef 0) #8
  unreachable

25:                                               ; preds = %11
  %26 = load i32, ptr %4, align 4, !tbaa !5
  %27 = icmp eq i32 %26, 1
  br i1 %27, label %28, label %30

28:                                               ; preds = %25
  %29 = call i64 @load_mmt_sec_rules(ptr noundef %6)
  store i64 %29, ptr %9, align 8, !tbaa !11
  br label %35

30:                                               ; preds = %25
  %31 = load ptr, ptr %5, align 8, !tbaa !9
  %32 = getelementptr inbounds ptr, ptr %31, i64 1
  %33 = load ptr, ptr %32, align 8, !tbaa !9
  %34 = call i64 @load_mmt_sec_rule(ptr noundef %6, ptr noundef %33)
  store i64 %34, ptr %9, align 8, !tbaa !11
  br label %35

35:                                               ; preds = %30, %28
  %36 = load i64, ptr %9, align 8, !tbaa !11
  %37 = load i64, ptr %9, align 8, !tbaa !11
  %38 = icmp ule i64 %37, 1
  %39 = zext i1 %38 to i64
  %40 = select i1 %38, ptr @.str.2, ptr @.str.3
  %41 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i64 noundef %36, ptr noundef %40)
  store i64 0, ptr %7, align 8, !tbaa !11
  br label %42

42:                                               ; preds = %201, %35
  %43 = load i64, ptr %7, align 8, !tbaa !11
  %44 = load i64, ptr %9, align 8, !tbaa !11
  %45 = icmp ult i64 %43, %44
  br i1 %45, label %46, label %204

46:                                               ; preds = %42
  %47 = load i64, ptr %7, align 8, !tbaa !11
  %48 = add i64 %47, 1
  %49 = load ptr, ptr %6, align 8, !tbaa !9
  %50 = load i64, ptr %7, align 8, !tbaa !11
  %51 = getelementptr inbounds ptr, ptr %49, i64 %50
  %52 = load ptr, ptr %51, align 8, !tbaa !9
  %53 = getelementptr inbounds %struct.rule_info_struct, ptr %52, i32 0, i32 0
  %54 = load i32, ptr %53, align 8, !tbaa !13
  %55 = call i32 (ptr, ...) @printf(ptr noundef @.str.4, i64 noundef %48, i32 noundef %54)
  %56 = load ptr, ptr %6, align 8, !tbaa !9
  %57 = load i64, ptr %7, align 8, !tbaa !11
  %58 = getelementptr inbounds ptr, ptr %56, i64 %57
  %59 = load ptr, ptr %58, align 8, !tbaa !9
  %60 = getelementptr inbounds %struct.rule_info_struct, ptr %59, i32 0, i32 2
  %61 = load ptr, ptr %60, align 8, !tbaa !15
  %62 = call i32 (ptr, ...) @printf(ptr noundef @.str.5, ptr noundef %61)
  %63 = load ptr, ptr %6, align 8, !tbaa !9
  %64 = load i64, ptr %7, align 8, !tbaa !11
  %65 = getelementptr inbounds ptr, ptr %63, i64 %64
  %66 = load ptr, ptr %65, align 8, !tbaa !9
  %67 = getelementptr inbounds %struct.rule_info_struct, ptr %66, i32 0, i32 7
  %68 = load i8, ptr %67, align 1, !tbaa !16
  %69 = zext i8 %68 to i32
  %70 = call i32 (ptr, ...) @printf(ptr noundef @.str.6, i32 noundef %69)
  %71 = load ptr, ptr %6, align 8, !tbaa !9
  %72 = load i64, ptr %7, align 8, !tbaa !11
  %73 = getelementptr inbounds ptr, ptr %71, i64 %72
  %74 = load ptr, ptr %73, align 8, !tbaa !9
  %75 = getelementptr inbounds %struct.rule_info_struct, ptr %74, i32 0, i32 6
  %76 = load i8, ptr %75, align 8, !tbaa !17
  %77 = zext i8 %76 to i32
  %78 = call i32 (ptr, ...) @printf(ptr noundef @.str.7, i32 noundef %77)
  %79 = call i32 (ptr, ...) @printf(ptr noundef @.str.8)
  store i64 0, ptr %8, align 8, !tbaa !11
  br label %80

80:                                               ; preds = %136, %46
  %81 = load i64, ptr %8, align 8, !tbaa !11
  %82 = load ptr, ptr %6, align 8, !tbaa !9
  %83 = load i64, ptr %7, align 8, !tbaa !11
  %84 = getelementptr inbounds ptr, ptr %82, i64 %83
  %85 = load ptr, ptr %84, align 8, !tbaa !9
  %86 = getelementptr inbounds %struct.rule_info_struct, ptr %85, i32 0, i32 6
  %87 = load i8, ptr %86, align 8, !tbaa !17
  %88 = zext i8 %87 to i64
  %89 = icmp ult i64 %81, %88
  br i1 %89, label %90, label %139

90:                                               ; preds = %80
  %91 = load i64, ptr %8, align 8, !tbaa !11
  %92 = icmp eq i64 %91, 0
  %93 = zext i1 %92 to i64
  %94 = select i1 %92, ptr @.str.10, ptr @.str.11
  %95 = load ptr, ptr %6, align 8, !tbaa !9
  %96 = load i64, ptr %7, align 8, !tbaa !11
  %97 = getelementptr inbounds ptr, ptr %95, i64 %96
  %98 = load ptr, ptr %97, align 8, !tbaa !9
  %99 = getelementptr inbounds %struct.rule_info_struct, ptr %98, i32 0, i32 8
  %100 = load ptr, ptr %99, align 8, !tbaa !18
  %101 = load i64, ptr %8, align 8, !tbaa !11
  %102 = getelementptr inbounds %struct.proto_attribute_struct, ptr %100, i64 %101
  %103 = getelementptr inbounds %struct.proto_attribute_struct, ptr %102, i32 0, i32 0
  %104 = load ptr, ptr %103, align 8, !tbaa !19
  %105 = load ptr, ptr %6, align 8, !tbaa !9
  %106 = load i64, ptr %7, align 8, !tbaa !11
  %107 = getelementptr inbounds ptr, ptr %105, i64 %106
  %108 = load ptr, ptr %107, align 8, !tbaa !9
  %109 = getelementptr inbounds %struct.rule_info_struct, ptr %108, i32 0, i32 8
  %110 = load ptr, ptr %109, align 8, !tbaa !18
  %111 = load i64, ptr %8, align 8, !tbaa !11
  %112 = getelementptr inbounds %struct.proto_attribute_struct, ptr %110, i64 %111
  %113 = getelementptr inbounds %struct.proto_attribute_struct, ptr %112, i32 0, i32 1
  %114 = load ptr, ptr %113, align 8, !tbaa !21
  %115 = load ptr, ptr %6, align 8, !tbaa !9
  %116 = load i64, ptr %7, align 8, !tbaa !11
  %117 = getelementptr inbounds ptr, ptr %115, i64 %116
  %118 = load ptr, ptr %117, align 8, !tbaa !9
  %119 = getelementptr inbounds %struct.rule_info_struct, ptr %118, i32 0, i32 8
  %120 = load ptr, ptr %119, align 8, !tbaa !18
  %121 = load i64, ptr %8, align 8, !tbaa !11
  %122 = getelementptr inbounds %struct.proto_attribute_struct, ptr %120, i64 %121
  %123 = getelementptr inbounds %struct.proto_attribute_struct, ptr %122, i32 0, i32 2
  %124 = load i32, ptr %123, align 8, !tbaa !22
  %125 = load ptr, ptr %6, align 8, !tbaa !9
  %126 = load i64, ptr %7, align 8, !tbaa !11
  %127 = getelementptr inbounds ptr, ptr %125, i64 %126
  %128 = load ptr, ptr %127, align 8, !tbaa !9
  %129 = getelementptr inbounds %struct.rule_info_struct, ptr %128, i32 0, i32 8
  %130 = load ptr, ptr %129, align 8, !tbaa !18
  %131 = load i64, ptr %8, align 8, !tbaa !11
  %132 = getelementptr inbounds %struct.proto_attribute_struct, ptr %130, i64 %131
  %133 = getelementptr inbounds %struct.proto_attribute_struct, ptr %132, i32 0, i32 3
  %134 = load i32, ptr %133, align 4, !tbaa !23
  %135 = call i32 (ptr, ...) @printf(ptr noundef @.str.9, ptr noundef %94, ptr noundef %104, ptr noundef %114, i32 noundef %124, i32 noundef %134)
  br label %136

136:                                              ; preds = %90
  %137 = load i64, ptr %8, align 8, !tbaa !11
  %138 = add i64 %137, 1
  store i64 %138, ptr %8, align 8, !tbaa !11
  br label %80, !llvm.loop !24

139:                                              ; preds = %80
  %140 = load ptr, ptr %6, align 8, !tbaa !9
  %141 = load i64, ptr %7, align 8, !tbaa !11
  %142 = getelementptr inbounds ptr, ptr %140, i64 %141
  %143 = load ptr, ptr %142, align 8, !tbaa !9
  %144 = getelementptr inbounds %struct.rule_info_struct, ptr %143, i32 0, i32 3
  %145 = load ptr, ptr %144, align 8, !tbaa !26
  %146 = call i32 (ptr, ...) @printf(ptr noundef @.str.12, ptr noundef %145)
  %147 = load ptr, ptr %6, align 8, !tbaa !9
  %148 = load i64, ptr %7, align 8, !tbaa !11
  %149 = getelementptr inbounds ptr, ptr %147, i64 %148
  %150 = load ptr, ptr %149, align 8, !tbaa !9
  %151 = getelementptr inbounds %struct.rule_info_struct, ptr %150, i32 0, i32 4
  %152 = load ptr, ptr %151, align 8, !tbaa !27
  %153 = call i32 (ptr, ...) @printf(ptr noundef @.str.13, ptr noundef %152)
  %154 = load ptr, ptr %6, align 8, !tbaa !9
  %155 = load i64, ptr %7, align 8, !tbaa !11
  %156 = getelementptr inbounds ptr, ptr %154, i64 %155
  %157 = load ptr, ptr %156, align 8, !tbaa !9
  %158 = getelementptr inbounds %struct.rule_info_struct, ptr %157, i32 0, i32 13
  %159 = load ptr, ptr %158, align 8, !tbaa !28
  %160 = getelementptr inbounds %struct.rule_version_info_struct, ptr %159, i32 0, i32 0
  %161 = call ptr @localtime(ptr noundef %160) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %10, ptr align 8 %161, i64 56, i1 false), !tbaa.struct !29
  %162 = load ptr, ptr %6, align 8, !tbaa !9
  %163 = load i64, ptr %7, align 8, !tbaa !11
  %164 = getelementptr inbounds ptr, ptr %162, i64 %163
  %165 = load ptr, ptr %164, align 8, !tbaa !9
  %166 = getelementptr inbounds %struct.rule_info_struct, ptr %165, i32 0, i32 13
  %167 = load ptr, ptr %166, align 8, !tbaa !28
  %168 = getelementptr inbounds %struct.rule_version_info_struct, ptr %167, i32 0, i32 2
  %169 = load ptr, ptr %168, align 8, !tbaa !30
  %170 = load ptr, ptr %6, align 8, !tbaa !9
  %171 = load i64, ptr %7, align 8, !tbaa !11
  %172 = getelementptr inbounds ptr, ptr %170, i64 %171
  %173 = load ptr, ptr %172, align 8, !tbaa !9
  %174 = getelementptr inbounds %struct.rule_info_struct, ptr %173, i32 0, i32 13
  %175 = load ptr, ptr %174, align 8, !tbaa !28
  %176 = getelementptr inbounds %struct.rule_version_info_struct, ptr %175, i32 0, i32 1
  %177 = load ptr, ptr %176, align 8, !tbaa !32
  %178 = getelementptr inbounds %struct.tm, ptr %10, i32 0, i32 5
  %179 = load i32, ptr %178, align 4, !tbaa !33
  %180 = add nsw i32 %179, 1900
  %181 = getelementptr inbounds %struct.tm, ptr %10, i32 0, i32 4
  %182 = load i32, ptr %181, align 8, !tbaa !35
  %183 = add nsw i32 %182, 1
  %184 = getelementptr inbounds %struct.tm, ptr %10, i32 0, i32 3
  %185 = load i32, ptr %184, align 4, !tbaa !36
  %186 = getelementptr inbounds %struct.tm, ptr %10, i32 0, i32 2
  %187 = load i32, ptr %186, align 8, !tbaa !37
  %188 = getelementptr inbounds %struct.tm, ptr %10, i32 0, i32 1
  %189 = load i32, ptr %188, align 4, !tbaa !38
  %190 = getelementptr inbounds %struct.tm, ptr %10, i32 0, i32 0
  %191 = load i32, ptr %190, align 8, !tbaa !39
  %192 = load ptr, ptr %6, align 8, !tbaa !9
  %193 = load i64, ptr %7, align 8, !tbaa !11
  %194 = getelementptr inbounds ptr, ptr %192, i64 %193
  %195 = load ptr, ptr %194, align 8, !tbaa !9
  %196 = getelementptr inbounds %struct.rule_info_struct, ptr %195, i32 0, i32 13
  %197 = load ptr, ptr %196, align 8, !tbaa !28
  %198 = getelementptr inbounds %struct.rule_version_info_struct, ptr %197, i32 0, i32 4
  %199 = load ptr, ptr %198, align 8, !tbaa !40
  %200 = call i32 (ptr, ...) @printf(ptr noundef @.str.14, ptr noundef %169, ptr noundef %177, i32 noundef %180, i32 noundef %183, i32 noundef %185, i32 noundef %187, i32 noundef %189, i32 noundef %191, ptr noundef %199)
  br label %201

201:                                              ; preds = %139
  %202 = load i64, ptr %7, align 8, !tbaa !11
  %203 = add i64 %202, 1
  store i64 %203, ptr %7, align 8, !tbaa !11
  br label %42, !llvm.loop !41

204:                                              ; preds = %42
  %205 = call i32 (ptr, ...) @printf(ptr noundef @.str.15)
  call void @llvm.lifetime.end.p0(i64 56, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  ret i32 0
}

; 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 nosync nounwind willreturn memory(none)
declare i64 @llvm.expect.i64(i64, i64) #2

declare void @mmt_sec_log(i32 noundef, ptr noundef, ...) #3

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

declare i64 @load_mmt_sec_rules(ptr noundef) #3

declare i64 @load_mmt_sec_rule(ptr noundef, ptr noundef) #3

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

; Function Attrs: nounwind
declare ptr @localtime(ptr noundef) #5

; 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) #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 nosync nounwind willreturn memory(none) }
attributes #3 = { "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 = { 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 #6 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { nounwind }
attributes #8 = { noreturn 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 = !{!"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 = !{!"long", !7, i64 0}
!13 = !{!14, !6, i64 0}
!14 = !{!"rule_info_struct", !6, i64 0, !6, i64 4, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !7, i64 40, !7, i64 41, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88}
!15 = !{!14, !10, i64 8}
!16 = !{!14, !7, i64 41}
!17 = !{!14, !7, i64 40}
!18 = !{!14, !10, i64 48}
!19 = !{!20, !10, i64 0}
!20 = !{!"proto_attribute_struct", !10, i64 0, !10, i64 8, !6, i64 16, !6, i64 20, !6, i64 24, !6, i64 28}
!21 = !{!20, !10, i64 8}
!22 = !{!20, !6, i64 16}
!23 = !{!20, !6, i64 20}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = !{!14, !10, i64 16}
!27 = !{!14, !10, i64 24}
!28 = !{!14, !10, i64 88}
!29 = !{i64 0, i64 4, !5, i64 4, i64 4, !5, i64 8, i64 4, !5, i64 12, i64 4, !5, i64 16, i64 4, !5, i64 20, i64 4, !5, i64 24, i64 4, !5, i64 28, i64 4, !5, i64 32, i64 4, !5, i64 40, i64 8, !11, i64 48, i64 8, !9}
!30 = !{!31, !10, i64 16}
!31 = !{!"rule_version_info_struct", !12, i64 0, !10, i64 8, !10, i64 16, !6, i64 24, !10, i64 32}
!32 = !{!31, !10, i64 8}
!33 = !{!34, !6, i64 20}
!34 = !{!"tm", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !6, i64 24, !6, i64 28, !6, i64 32, !12, i64 40, !10, i64 48}
!35 = !{!34, !6, i64 16}
!36 = !{!34, !6, i64 12}
!37 = !{!34, !6, i64 8}
!38 = !{!34, !6, i64 4}
!39 = !{!34, !6, i64 0}
!40 = !{!31, !10, i64 32}
!41 = distinct !{!41, !25}


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

%struct.proto_attribute_struct = type { ptr, ptr, i32, i32, i32, i32 }

@.str = external hidden unnamed_addr constant [24 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #0 {
  %3 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  %4 = icmp sgt i32 %0, 2
  br i1 %4, label %5, label %7, !prof !5

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

7:                                                ; preds = %2
  %8 = icmp eq i32 %0, 1
  br i1 %8, label %9, label %11

9:                                                ; preds = %7
  %10 = call i64 @load_mmt_sec_rules(ptr noundef nonnull %3) #6
  br label %15

11:                                               ; preds = %7
  %12 = getelementptr inbounds i8, ptr %1, i64 8
  %13 = load ptr, ptr %12, align 8, !tbaa !6
  %14 = call i64 @load_mmt_sec_rule(ptr noundef nonnull %3, ptr noundef %13) #6
  br label %15

15:                                               ; preds = %11, %9
  %.032 = phi i64 [ %10, %9 ], [ %14, %11 ]
  %16 = icmp ult i64 %.032, 2
  %17 = select i1 %16, ptr @.str.2, ptr @.str.3
  %18 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %.032, ptr noundef nonnull %17)
  %.not = icmp eq i64 %.032, 0
  br i1 %.not, label %._crit_edge37, label %.lr.ph36

.lr.ph36:                                         ; preds = %15, %._crit_edge
  %.034 = phi i64 [ %19, %._crit_edge ], [ 0, %15 ]
  %19 = add nuw i64 %.034, 1
  %20 = load ptr, ptr %3, align 8, !tbaa !6
  %21 = getelementptr inbounds ptr, ptr %20, i64 %.034
  %22 = load ptr, ptr %21, align 8, !tbaa !6
  %23 = load i32, ptr %22, align 8, !tbaa !10
  %24 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i64 noundef %19, i32 noundef %23)
  %25 = load ptr, ptr %3, align 8, !tbaa !6
  %26 = getelementptr inbounds ptr, ptr %25, i64 %.034
  %27 = load ptr, ptr %26, align 8, !tbaa !6
  %28 = getelementptr inbounds i8, ptr %27, i64 8
  %29 = load ptr, ptr %28, align 8, !tbaa !13
  %30 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, ptr noundef %29)
  %31 = load ptr, ptr %3, align 8, !tbaa !6
  %32 = getelementptr inbounds ptr, ptr %31, i64 %.034
  %33 = load ptr, ptr %32, align 8, !tbaa !6
  %34 = getelementptr inbounds i8, ptr %33, i64 41
  %35 = load i8, ptr %34, align 1, !tbaa !14
  %36 = zext i8 %35 to i32
  %37 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef %36)
  %38 = load ptr, ptr %3, align 8, !tbaa !6
  %39 = getelementptr inbounds ptr, ptr %38, i64 %.034
  %40 = load ptr, ptr %39, align 8, !tbaa !6
  %41 = getelementptr inbounds i8, ptr %40, i64 40
  %42 = load i8, ptr %41, align 8, !tbaa !15
  %43 = zext i8 %42 to i32
  %44 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef %43)
  %45 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8)
  %46 = load ptr, ptr %3, align 8, !tbaa !6
  %47 = getelementptr inbounds ptr, ptr %46, i64 %.034
  %48 = load ptr, ptr %47, align 8, !tbaa !6
  %49 = getelementptr inbounds i8, ptr %48, i64 40
  %50 = load i8, ptr %49, align 8, !tbaa !15
  %.not38 = icmp eq i8 %50, 0
  br i1 %.not38, label %._crit_edge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %.lr.ph36
  %51 = getelementptr inbounds i8, ptr %48, i64 48
  %52 = load ptr, ptr %51, align 8, !tbaa !16
  %53 = load ptr, ptr %52, align 8, !tbaa !17
  %54 = getelementptr inbounds i8, ptr %52, i64 8
  %55 = load ptr, ptr %54, align 8, !tbaa !19
  %56 = getelementptr inbounds i8, ptr %52, i64 16
  %57 = load i32, ptr %56, align 8, !tbaa !20
  %58 = getelementptr inbounds i8, ptr %52, i64 20
  %59 = load i32, ptr %58, align 4, !tbaa !21
  %60 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9, ptr noundef nonnull @.str.10, ptr noundef %53, ptr noundef %55, i32 noundef %57, i32 noundef %59)
  %61 = load ptr, ptr %3, align 8, !tbaa !6
  %62 = getelementptr inbounds ptr, ptr %61, i64 %.034
  %63 = load ptr, ptr %62, align 8, !tbaa !6
  %64 = getelementptr inbounds i8, ptr %63, i64 40
  %65 = load i8, ptr %64, align 8, !tbaa !15
  %66 = icmp ugt i8 %65, 1
  br i1 %66, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %67 = phi ptr [ %82, %.lr.ph ], [ %63, %.lr.ph.preheader ]
  %.03133 = phi i64 [ %79, %.lr.ph ], [ 1, %.lr.ph.preheader ]
  %68 = getelementptr inbounds i8, ptr %67, i64 48
  %69 = load ptr, ptr %68, align 8, !tbaa !16
  %70 = getelementptr inbounds %struct.proto_attribute_struct, ptr %69, i64 %.03133
  %71 = load ptr, ptr %70, align 8, !tbaa !17
  %72 = getelementptr inbounds i8, ptr %70, i64 8
  %73 = load ptr, ptr %72, align 8, !tbaa !19
  %74 = getelementptr inbounds i8, ptr %70, i64 16
  %75 = load i32, ptr %74, align 8, !tbaa !20
  %76 = getelementptr inbounds i8, ptr %70, i64 20
  %77 = load i32, ptr %76, align 4, !tbaa !21
  %78 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9, ptr noundef nonnull @.str.11, ptr noundef %71, ptr noundef %73, i32 noundef %75, i32 noundef %77)
  %79 = add nuw nsw i64 %.03133, 1
  %80 = load ptr, ptr %3, align 8, !tbaa !6
  %81 = getelementptr inbounds ptr, ptr %80, i64 %.034
  %82 = load ptr, ptr %81, align 8, !tbaa !6
  %83 = getelementptr inbounds i8, ptr %82, i64 40
  %84 = load i8, ptr %83, align 8, !tbaa !15
  %85 = zext i8 %84 to i64
  %86 = icmp ult i64 %79, %85
  br i1 %86, label %.lr.ph, label %._crit_edge, !llvm.loop !22

._crit_edge:                                      ; preds = %.lr.ph, %.lr.ph.preheader, %.lr.ph36
  %.lcssa = phi ptr [ %48, %.lr.ph36 ], [ %63, %.lr.ph.preheader ], [ %82, %.lr.ph ]
  %87 = getelementptr inbounds i8, ptr %.lcssa, i64 16
  %88 = load ptr, ptr %87, align 8, !tbaa !25
  %89 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.12, ptr noundef %88)
  %90 = load ptr, ptr %3, align 8, !tbaa !6
  %91 = getelementptr inbounds ptr, ptr %90, i64 %.034
  %92 = load ptr, ptr %91, align 8, !tbaa !6
  %93 = getelementptr inbounds i8, ptr %92, i64 24
  %94 = load ptr, ptr %93, align 8, !tbaa !26
  %95 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.13, ptr noundef %94)
  %96 = load ptr, ptr %3, align 8, !tbaa !6
  %97 = getelementptr inbounds ptr, ptr %96, i64 %.034
  %98 = load ptr, ptr %97, align 8, !tbaa !6
  %99 = getelementptr inbounds i8, ptr %98, i64 88
  %100 = load ptr, ptr %99, align 8, !tbaa !27
  %101 = call ptr @localtime(ptr noundef %100) #6
  %.sroa.0.0.copyload = load i32, ptr %101, align 8, !tbaa !28
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %101, i64 4
  %.sroa.4.0.copyload = load i32, ptr %.sroa.4.0..sroa_idx, align 4, !tbaa !28
  %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %101, i64 8
  %.sroa.5.0.copyload = load i32, ptr %.sroa.5.0..sroa_idx, align 8, !tbaa !28
  %.sroa.6.0..sroa_idx = getelementptr inbounds i8, ptr %101, i64 12
  %.sroa.6.0.copyload = load i32, ptr %.sroa.6.0..sroa_idx, align 4, !tbaa !28
  %.sroa.7.0..sroa_idx = getelementptr inbounds i8, ptr %101, i64 16
  %.sroa.7.0.copyload = load i32, ptr %.sroa.7.0..sroa_idx, align 8, !tbaa !28
  %.sroa.8.0..sroa_idx = getelementptr inbounds i8, ptr %101, i64 20
  %.sroa.8.0.copyload = load i32, ptr %.sroa.8.0..sroa_idx, align 4, !tbaa !28
  %102 = load ptr, ptr %3, align 8, !tbaa !6
  %103 = getelementptr inbounds ptr, ptr %102, i64 %.034
  %104 = load ptr, ptr %103, align 8, !tbaa !6
  %105 = getelementptr inbounds i8, ptr %104, i64 88
  %106 = load ptr, ptr %105, align 8, !tbaa !27
  %107 = getelementptr inbounds i8, ptr %106, i64 16
  %108 = load ptr, ptr %107, align 8, !tbaa !29
  %109 = getelementptr inbounds i8, ptr %106, i64 8
  %110 = load ptr, ptr %109, align 8, !tbaa !32
  %111 = add nsw i32 %.sroa.8.0.copyload, 1900
  %112 = add nsw i32 %.sroa.7.0.copyload, 1
  %113 = getelementptr inbounds i8, ptr %106, i64 32
  %114 = load ptr, ptr %113, align 8, !tbaa !33
  %115 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.14, ptr noundef %108, ptr noundef %110, i32 noundef %111, i32 noundef %112, i32 noundef %.sroa.6.0.copyload, i32 noundef %.sroa.5.0.copyload, i32 noundef %.sroa.4.0.copyload, i32 noundef %.sroa.0.0.copyload, ptr noundef %114)
  %exitcond.not = icmp eq i64 %19, %.032
  br i1 %exitcond.not, label %._crit_edge37, label %.lr.ph36, !llvm.loop !34

._crit_edge37:                                    ; preds = %._crit_edge, %15
  %116 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.15)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  ret i32 0
}

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

declare void @mmt_sec_log(i32 noundef, ptr noundef, ...) local_unnamed_addr #2

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

declare i64 @load_mmt_sec_rules(ptr noundef) local_unnamed_addr #2

declare i64 @load_mmt_sec_rule(ptr noundef, ptr noundef) local_unnamed_addr #2

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

; Function Attrs: nounwind
declare ptr @localtime(ptr noundef) local_unnamed_addr #5

; 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 = { "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 = { 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 = { 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 #5 = { 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 #6 = { nounwind }
attributes #7 = { noreturn 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 = !{!"branch_weights", !"expected", i32 1, i32 2000}
!6 = !{!7, !7, i64 0}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!11, !12, i64 0}
!11 = !{!"rule_info_struct", !12, i64 0, !12, i64 4, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !8, i64 40, !8, i64 41, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !7, i64 80, !7, i64 88}
!12 = !{!"int", !8, i64 0}
!13 = !{!11, !7, i64 8}
!14 = !{!11, !8, i64 41}
!15 = !{!11, !8, i64 40}
!16 = !{!11, !7, i64 48}
!17 = !{!18, !7, i64 0}
!18 = !{!"proto_attribute_struct", !7, i64 0, !7, i64 8, !12, i64 16, !12, i64 20, !12, i64 24, !12, i64 28}
!19 = !{!18, !7, i64 8}
!20 = !{!18, !12, i64 16}
!21 = !{!18, !12, i64 20}
!22 = distinct !{!22, !23, !24}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{!"llvm.loop.peeled.count", i32 1}
!25 = !{!11, !7, i64 16}
!26 = !{!11, !7, i64 24}
!27 = !{!11, !7, i64 88}
!28 = !{!12, !12, i64 0}
!29 = !{!30, !7, i64 16}
!30 = !{!"rule_version_info_struct", !31, i64 0, !7, i64 8, !7, i64 16, !12, i64 24, !7, i64 32}
!31 = !{!"long", !8, i64 0}
!32 = !{!30, !7, i64 8}
!33 = !{!30, !7, i64 32}
!34 = distinct !{!34, !23}


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