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

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

@rules_count = external hidden global i64, align 8
@rules = external hidden global [100000 x ptr], align 16
@.str.8 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [19 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 [25 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [61 x i8], align 1

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @mmt_sec_print_rules_info() #3 {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %struct.tm, align 8
  %8 = alloca [100000 x i8], align 16
  %9 = alloca ptr, align 8
  %10 = alloca [1000 x i8], align 16
  %11 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 56, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 100000, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 1000, ptr %10) #6
  %12 = getelementptr inbounds [100000 x i8], ptr %8, i64 0, i64 0
  store i8 0, ptr %12, align 16, !tbaa !5
  %13 = getelementptr inbounds [100000 x i8], ptr %8, i64 0, i64 0
  store ptr %13, ptr %9, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 100000, ptr %11, align 4, !tbaa !10
  %14 = load i64, ptr @rules_count, align 8, !tbaa !12
  %15 = load i64, ptr @rules_count, align 8, !tbaa !12
  %16 = icmp ule i64 %15, 1
  %17 = zext i1 %16 to i64
  %18 = select i1 %16, ptr @.str.9, ptr @.str.10
  %19 = call i32 (ptr, ...) @printf(ptr noundef @.str.8, i64 noundef %14, ptr noundef %18)
  store i64 0, ptr %1, align 8, !tbaa !12
  br label %20

20:                                               ; preds = %189, %0
  %21 = load i64, ptr %1, align 8, !tbaa !12
  %22 = load i64, ptr @rules_count, align 8, !tbaa !12
  %23 = icmp ult i64 %21, %22
  br i1 %23, label %24, label %192

24:                                               ; preds = %20
  %25 = load i64, ptr %1, align 8, !tbaa !12
  %26 = add i64 %25, 1
  %27 = load i64, ptr %1, align 8, !tbaa !12
  %28 = getelementptr inbounds [100000 x ptr], ptr @rules, i64 0, i64 %27
  %29 = load ptr, ptr %28, align 8, !tbaa !8
  %30 = getelementptr inbounds %struct.rule_info_struct, ptr %29, i32 0, i32 0
  %31 = load i32, ptr %30, align 8, !tbaa !14
  %32 = call i32 (ptr, ...) @printf(ptr noundef @.str.11, i64 noundef %26, i32 noundef %31)
  %33 = load i64, ptr %1, align 8, !tbaa !12
  %34 = getelementptr inbounds [100000 x ptr], ptr @rules, i64 0, i64 %33
  %35 = load ptr, ptr %34, align 8, !tbaa !8
  %36 = getelementptr inbounds %struct.rule_info_struct, ptr %35, i32 0, i32 2
  %37 = load ptr, ptr %36, align 8, !tbaa !16
  %38 = call i32 (ptr, ...) @printf(ptr noundef @.str.12, ptr noundef %37)
  %39 = load i64, ptr %1, align 8, !tbaa !12
  %40 = getelementptr inbounds [100000 x ptr], ptr @rules, i64 0, i64 %39
  %41 = load ptr, ptr %40, align 8, !tbaa !8
  %42 = getelementptr inbounds %struct.rule_info_struct, ptr %41, i32 0, i32 3
  %43 = load ptr, ptr %42, align 8, !tbaa !17
  %44 = call i32 (ptr, ...) @printf(ptr noundef @.str.13, ptr noundef %43)
  %45 = load i64, ptr %1, align 8, !tbaa !12
  %46 = getelementptr inbounds [100000 x ptr], ptr @rules, i64 0, i64 %45
  %47 = load ptr, ptr %46, align 8, !tbaa !8
  %48 = getelementptr inbounds %struct.rule_info_struct, ptr %47, i32 0, i32 4
  %49 = load ptr, ptr %48, align 8, !tbaa !18
  %50 = call i32 (ptr, ...) @printf(ptr noundef @.str.14, ptr noundef %49)
  store i64 0, ptr %2, align 8, !tbaa !12
  br label %51

51:                                               ; preds = %142, %24
  %52 = load i64, ptr %2, align 8, !tbaa !12
  %53 = load i64, ptr %1, align 8, !tbaa !12
  %54 = getelementptr inbounds [100000 x ptr], ptr @rules, i64 0, i64 %53
  %55 = load ptr, ptr %54, align 8, !tbaa !8
  %56 = getelementptr inbounds %struct.rule_info_struct, ptr %55, i32 0, i32 7
  %57 = load i8, ptr %56, align 1, !tbaa !19
  %58 = zext i8 %57 to i64
  %59 = icmp ult i64 %52, %58
  br i1 %59, label %60, label %145

60:                                               ; preds = %51
  %61 = load i64, ptr %2, align 8, !tbaa !12
  %62 = add i64 %61, 1
  %63 = call i32 (ptr, ...) @printf(ptr noundef @.str.15, i64 noundef %62)
  %64 = load i64, ptr %1, align 8, !tbaa !12
  %65 = getelementptr inbounds [100000 x ptr], ptr @rules, i64 0, i64 %64
  %66 = load ptr, ptr %65, align 8, !tbaa !8
  %67 = getelementptr inbounds %struct.rule_info_struct, ptr %66, i32 0, i32 9
  %68 = load ptr, ptr %67, align 8, !tbaa !20
  %69 = load i64, ptr %2, align 8, !tbaa !12
  %70 = add i64 %69, 1
  %71 = getelementptr inbounds %struct.mmt_array_struct, ptr %68, i64 %70
  store ptr %71, ptr %5, align 8, !tbaa !8
  store i64 0, ptr %3, align 8, !tbaa !12
  br label %72

72:                                               ; preds = %138, %60
  %73 = load i64, ptr %3, align 8, !tbaa !12
  %74 = load ptr, ptr %5, align 8, !tbaa !8
  %75 = getelementptr inbounds %struct.mmt_array_struct, ptr %74, i32 0, i32 0
  %76 = load i64, ptr %75, align 8, !tbaa !21
  %77 = icmp ult i64 %73, %76
  br i1 %77, label %78, label %141

78:                                               ; preds = %72
  %79 = load ptr, ptr %5, align 8, !tbaa !8
  %80 = getelementptr inbounds %struct.mmt_array_struct, ptr %79, i32 0, i32 1
  %81 = load ptr, ptr %80, align 8, !tbaa !23
  %82 = load i64, ptr %3, align 8, !tbaa !12
  %83 = getelementptr inbounds ptr, ptr %81, i64 %82
  %84 = load ptr, ptr %83, align 8, !tbaa !8
  store ptr %84, ptr %6, align 8, !tbaa !8
  %85 = load i64, ptr %3, align 8, !tbaa !12
  %86 = icmp eq i64 %85, 0
  %87 = zext i1 %86 to i64
  %88 = select i1 %86, i32 58, i32 44
  %89 = load ptr, ptr %6, align 8, !tbaa !8
  %90 = getelementptr inbounds %struct.proto_attribute_struct, ptr %89, i32 0, i32 0
  %91 = load ptr, ptr %90, align 8, !tbaa !24
  %92 = load ptr, ptr %6, align 8, !tbaa !8
  %93 = getelementptr inbounds %struct.proto_attribute_struct, ptr %92, i32 0, i32 1
  %94 = load ptr, ptr %93, align 8, !tbaa !26
  %95 = load ptr, ptr %6, align 8, !tbaa !8
  %96 = getelementptr inbounds %struct.proto_attribute_struct, ptr %95, i32 0, i32 2
  %97 = load i32, ptr %96, align 8, !tbaa !27
  %98 = load ptr, ptr %6, align 8, !tbaa !8
  %99 = getelementptr inbounds %struct.proto_attribute_struct, ptr %98, i32 0, i32 3
  %100 = load i32, ptr %99, align 4, !tbaa !28
  %101 = call i32 (ptr, ...) @printf(ptr noundef @.str.16, i32 noundef %88, ptr noundef %91, ptr noundef %94, i32 noundef %97, i32 noundef %100)
  %102 = getelementptr inbounds [1000 x i8], ptr %10, i64 0, i64 0
  %103 = load ptr, ptr %6, align 8, !tbaa !8
  %104 = getelementptr inbounds %struct.proto_attribute_struct, ptr %103, i32 0, i32 0
  %105 = load ptr, ptr %104, align 8, !tbaa !24
  %106 = load ptr, ptr %6, align 8, !tbaa !8
  %107 = getelementptr inbounds %struct.proto_attribute_struct, ptr %106, i32 0, i32 1
  %108 = load ptr, ptr %107, align 8, !tbaa !26
  %109 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %102, i64 noundef 1000, ptr noundef @.str.17, ptr noundef %105, ptr noundef %108) #6
  %110 = getelementptr inbounds [100000 x i8], ptr %8, i64 0, i64 0
  %111 = getelementptr inbounds [1000 x i8], ptr %10, i64 0, i64 0
  %112 = call ptr @strstr(ptr noundef %110, ptr noundef %111) #7
  %113 = icmp eq ptr %112, null
  br i1 %113, label %114, label %137

114:                                              ; preds = %78
  %115 = load i32, ptr %11, align 4, !tbaa !10
  %116 = icmp sgt i32 %115, 0
  br i1 %116, label %117, label %137

117:                                              ; preds = %114
  %118 = load ptr, ptr %9, align 8, !tbaa !8
  %119 = load i32, ptr %11, align 4, !tbaa !10
  %120 = sext i32 %119 to i64
  %121 = load ptr, ptr %6, align 8, !tbaa !8
  %122 = getelementptr inbounds %struct.proto_attribute_struct, ptr %121, i32 0, i32 0
  %123 = load ptr, ptr %122, align 8, !tbaa !24
  %124 = load ptr, ptr %6, align 8, !tbaa !8
  %125 = getelementptr inbounds %struct.proto_attribute_struct, ptr %124, i32 0, i32 1
  %126 = load ptr, ptr %125, align 8, !tbaa !26
  %127 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %118, i64 noundef %120, ptr noundef @.str.18, ptr noundef %123, ptr noundef %126) #6
  %128 = sext i32 %127 to i64
  store i64 %128, ptr %4, align 8, !tbaa !12
  %129 = load i64, ptr %4, align 8, !tbaa !12
  %130 = load ptr, ptr %9, align 8, !tbaa !8
  %131 = getelementptr inbounds i8, ptr %130, i64 %129
  store ptr %131, ptr %9, align 8, !tbaa !8
  %132 = load i64, ptr %4, align 8, !tbaa !12
  %133 = load i32, ptr %11, align 4, !tbaa !10
  %134 = sext i32 %133 to i64
  %135 = sub i64 %134, %132
  %136 = trunc i64 %135 to i32
  store i32 %136, ptr %11, align 4, !tbaa !10
  br label %137

137:                                              ; preds = %117, %114, %78
  br label %138

138:                                              ; preds = %137
  %139 = load i64, ptr %3, align 8, !tbaa !12
  %140 = add i64 %139, 1
  store i64 %140, ptr %3, align 8, !tbaa !12
  br label %72, !llvm.loop !29

141:                                              ; preds = %72
  br label %142

142:                                              ; preds = %141
  %143 = load i64, ptr %2, align 8, !tbaa !12
  %144 = add i64 %143, 1
  store i64 %144, ptr %2, align 8, !tbaa !12
  br label %51, !llvm.loop !31

145:                                              ; preds = %51
  %146 = load i64, ptr %1, align 8, !tbaa !12
  %147 = getelementptr inbounds [100000 x ptr], ptr @rules, i64 0, i64 %146
  %148 = load ptr, ptr %147, align 8, !tbaa !8
  %149 = getelementptr inbounds %struct.rule_info_struct, ptr %148, i32 0, i32 13
  %150 = load ptr, ptr %149, align 8, !tbaa !32
  %151 = getelementptr inbounds %struct.rule_version_info_struct, ptr %150, i32 0, i32 0
  %152 = call ptr @localtime(ptr noundef %151) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %7, ptr align 8 %152, i64 56, i1 false), !tbaa.struct !33
  %153 = load i64, ptr %1, align 8, !tbaa !12
  %154 = getelementptr inbounds [100000 x ptr], ptr @rules, i64 0, i64 %153
  %155 = load ptr, ptr %154, align 8, !tbaa !8
  %156 = getelementptr inbounds %struct.rule_info_struct, ptr %155, i32 0, i32 13
  %157 = load ptr, ptr %156, align 8, !tbaa !32
  %158 = getelementptr inbounds %struct.rule_version_info_struct, ptr %157, i32 0, i32 2
  %159 = load ptr, ptr %158, align 8, !tbaa !34
  %160 = load i64, ptr %1, align 8, !tbaa !12
  %161 = getelementptr inbounds [100000 x ptr], ptr @rules, i64 0, i64 %160
  %162 = load ptr, ptr %161, align 8, !tbaa !8
  %163 = getelementptr inbounds %struct.rule_info_struct, ptr %162, i32 0, i32 13
  %164 = load ptr, ptr %163, align 8, !tbaa !32
  %165 = getelementptr inbounds %struct.rule_version_info_struct, ptr %164, i32 0, i32 1
  %166 = load ptr, ptr %165, align 8, !tbaa !36
  %167 = getelementptr inbounds %struct.tm, ptr %7, i32 0, i32 5
  %168 = load i32, ptr %167, align 4, !tbaa !37
  %169 = add nsw i32 %168, 1900
  %170 = getelementptr inbounds %struct.tm, ptr %7, i32 0, i32 4
  %171 = load i32, ptr %170, align 8, !tbaa !39
  %172 = add nsw i32 %171, 1
  %173 = getelementptr inbounds %struct.tm, ptr %7, i32 0, i32 3
  %174 = load i32, ptr %173, align 4, !tbaa !40
  %175 = getelementptr inbounds %struct.tm, ptr %7, i32 0, i32 2
  %176 = load i32, ptr %175, align 8, !tbaa !41
  %177 = getelementptr inbounds %struct.tm, ptr %7, i32 0, i32 1
  %178 = load i32, ptr %177, align 4, !tbaa !42
  %179 = getelementptr inbounds %struct.tm, ptr %7, i32 0, i32 0
  %180 = load i32, ptr %179, align 8, !tbaa !43
  %181 = load i64, ptr %1, align 8, !tbaa !12
  %182 = getelementptr inbounds [100000 x ptr], ptr @rules, i64 0, i64 %181
  %183 = load ptr, ptr %182, align 8, !tbaa !8
  %184 = getelementptr inbounds %struct.rule_info_struct, ptr %183, i32 0, i32 13
  %185 = load ptr, ptr %184, align 8, !tbaa !32
  %186 = getelementptr inbounds %struct.rule_version_info_struct, ptr %185, i32 0, i32 4
  %187 = load ptr, ptr %186, align 8, !tbaa !44
  %188 = call i32 (ptr, ...) @printf(ptr noundef @.str.19, ptr noundef %159, ptr noundef %166, i32 noundef %169, i32 noundef %172, i32 noundef %174, i32 noundef %176, i32 noundef %178, i32 noundef %180, ptr noundef %187)
  br label %189

189:                                              ; preds = %145
  %190 = load i64, ptr %1, align 8, !tbaa !12
  %191 = add i64 %190, 1
  store i64 %191, ptr %1, align 8, !tbaa !12
  br label %20, !llvm.loop !45

192:                                              ; preds = %20
  %193 = getelementptr inbounds [100000 x i8], ptr %8, i64 0, i64 0
  %194 = call i64 @strlen(ptr noundef %193) #7
  store i64 %194, ptr %4, align 8, !tbaa !12
  %195 = load i64, ptr %4, align 8, !tbaa !12
  %196 = icmp ugt i64 %195, 0
  br i1 %196, label %197, label %201

197:                                              ; preds = %192
  %198 = load i64, ptr %4, align 8, !tbaa !12
  %199 = sub i64 %198, 1
  %200 = getelementptr inbounds [100000 x i8], ptr %8, i64 0, i64 %199
  store i8 0, ptr %200, align 1, !tbaa !5
  br label %201

201:                                              ; preds = %197, %192
  %202 = getelementptr inbounds [100000 x i8], ptr %8, i64 0, i64 0
  %203 = call i32 (ptr, ...) @printf(ptr noundef @.str.20, ptr noundef %202)
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 1000, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 100000, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 56, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #6
  ret void
}

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

; Function Attrs: nounwind willreturn memory(read)
declare ptr @strstr(ptr noundef, ptr noundef) #1

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

; 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) #5

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { 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 #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { nounwind }
attributes #7 = { 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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"any pointer", !6, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"int", !6, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"long", !6, i64 0}
!14 = !{!15, !11, i64 0}
!15 = !{!"rule_info_struct", !11, i64 0, !11, i64 4, !9, i64 8, !9, i64 16, !9, i64 24, !9, i64 32, !6, i64 40, !6, i64 41, !9, i64 48, !9, i64 56, !9, i64 64, !9, i64 72, !9, i64 80, !9, i64 88}
!16 = !{!15, !9, i64 8}
!17 = !{!15, !9, i64 16}
!18 = !{!15, !9, i64 24}
!19 = !{!15, !6, i64 41}
!20 = !{!15, !9, i64 56}
!21 = !{!22, !13, i64 0}
!22 = !{!"mmt_array_struct", !13, i64 0, !9, i64 8}
!23 = !{!22, !9, i64 8}
!24 = !{!25, !9, i64 0}
!25 = !{!"proto_attribute_struct", !9, i64 0, !9, i64 8, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28}
!26 = !{!25, !9, i64 8}
!27 = !{!25, !11, i64 16}
!28 = !{!25, !11, i64 20}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.mustprogress"}
!31 = distinct !{!31, !30}
!32 = !{!15, !9, i64 88}
!33 = !{i64 0, i64 4, !10, i64 4, i64 4, !10, i64 8, i64 4, !10, i64 12, i64 4, !10, i64 16, i64 4, !10, i64 20, i64 4, !10, i64 24, i64 4, !10, i64 28, i64 4, !10, i64 32, i64 4, !10, i64 40, i64 8, !12, i64 48, i64 8, !8}
!34 = !{!35, !9, i64 16}
!35 = !{!"rule_version_info_struct", !13, i64 0, !9, i64 8, !9, i64 16, !11, i64 24, !9, i64 32}
!36 = !{!35, !9, i64 8}
!37 = !{!38, !11, i64 20}
!38 = !{!"tm", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32, !13, i64 40, !9, i64 48}
!39 = !{!38, !11, i64 16}
!40 = !{!38, !11, i64 12}
!41 = !{!38, !11, i64 8}
!42 = !{!38, !11, i64 4}
!43 = !{!38, !11, i64 0}
!44 = !{!35, !9, i64 32}
!45 = distinct !{!45, !30}


; 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.mmt_array_struct = type { i64, ptr }

@rules_count = external hidden local_unnamed_addr global i64, align 8
@rules = external hidden local_unnamed_addr global [100000 x ptr], align 16
@.str.8 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [19 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 [25 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [61 x i8], align 1

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @mmt_sec_print_rules_info() local_unnamed_addr #3 {
  %1 = alloca [100000 x i8], align 16
  %2 = alloca [1000 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 100000, ptr nonnull %1) #5
  call void @llvm.lifetime.start.p0(i64 1000, ptr nonnull %2) #5
  store i8 0, ptr %1, align 16, !tbaa !5
  %3 = load i64, ptr @rules_count, align 8, !tbaa !8
  %4 = icmp ult i64 %3, 2
  %5 = select i1 %4, ptr @.str.9, ptr @.str.10
  %6 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, i64 noundef %3, ptr noundef nonnull %5)
  %7 = load i64, ptr @rules_count, align 8, !tbaa !8
  %.not65 = icmp eq i64 %7, 0
  br i1 %.not65, label %._crit_edge64, label %.lr.ph63

.lr.ph63:                                         ; preds = %0, %._crit_edge
  %.061 = phi i32 [ %.1.lcssa, %._crit_edge ], [ 100000, %0 ]
  %.04060 = phi ptr [ %.141.lcssa, %._crit_edge ], [ %1, %0 ]
  %.04459 = phi i64 [ %8, %._crit_edge ], [ 0, %0 ]
  %8 = add nuw i64 %.04459, 1
  %9 = getelementptr inbounds [100000 x ptr], ptr @rules, i64 0, i64 %.04459
  %10 = load ptr, ptr %9, align 8, !tbaa !10
  %11 = load i32, ptr %10, align 8, !tbaa !12
  %12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11, i64 noundef %8, i32 noundef %11)
  %13 = load ptr, ptr %9, align 8, !tbaa !10
  %14 = getelementptr inbounds i8, ptr %13, i64 8
  %15 = load ptr, ptr %14, align 8, !tbaa !15
  %16 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.12, ptr noundef %15)
  %17 = load ptr, ptr %9, align 8, !tbaa !10
  %18 = getelementptr inbounds i8, ptr %17, i64 16
  %19 = load ptr, ptr %18, align 8, !tbaa !16
  %20 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.13, ptr noundef %19)
  %21 = load ptr, ptr %9, align 8, !tbaa !10
  %22 = getelementptr inbounds i8, ptr %21, i64 24
  %23 = load ptr, ptr %22, align 8, !tbaa !17
  %24 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.14, ptr noundef %23)
  %25 = load ptr, ptr %9, align 8, !tbaa !10
  %26 = getelementptr inbounds i8, ptr %25, i64 41
  %27 = load i8, ptr %26, align 1, !tbaa !18
  %.not66 = icmp eq i8 %27, 0
  br i1 %.not66, label %._crit_edge, label %.lr.ph55

.loopexit.loopexit:                               ; preds = %93, %65
  %.343.lcssa = phi ptr [ %.343.peel, %65 ], [ %.343, %93 ]
  %.3.lcssa = phi i32 [ %.3.peel, %65 ], [ %.3, %93 ]
  %.pre = load ptr, ptr %9, align 8, !tbaa !10
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.loopexit, %.lr.ph55
  %28 = phi ptr [ %35, %.lr.ph55 ], [ %.pre, %.loopexit.loopexit ]
  %.242.lcssa = phi ptr [ %.14153, %.lr.ph55 ], [ %.343.lcssa, %.loopexit.loopexit ]
  %.2.lcssa = phi i32 [ %.154, %.lr.ph55 ], [ %.3.lcssa, %.loopexit.loopexit ]
  %29 = getelementptr inbounds i8, ptr %28, i64 41
  %30 = load i8, ptr %29, align 1, !tbaa !18
  %31 = zext i8 %30 to i64
  %32 = icmp ult i64 %33, %31
  br i1 %32, label %.lr.ph55, label %._crit_edge, !llvm.loop !19

.lr.ph55:                                         ; preds = %.lr.ph63, %.loopexit
  %.154 = phi i32 [ %.2.lcssa, %.loopexit ], [ %.061, %.lr.ph63 ]
  %.14153 = phi ptr [ %.242.lcssa, %.loopexit ], [ %.04060, %.lr.ph63 ]
  %.04552 = phi i64 [ %33, %.loopexit ], [ 0, %.lr.ph63 ]
  %33 = add nuw nsw i64 %.04552, 1
  %34 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.15, i64 noundef %33)
  %35 = load ptr, ptr %9, align 8, !tbaa !10
  %36 = getelementptr inbounds i8, ptr %35, i64 56
  %37 = load ptr, ptr %36, align 8, !tbaa !21
  %38 = getelementptr inbounds %struct.mmt_array_struct, ptr %37, i64 %33
  %39 = load i64, ptr %38, align 8, !tbaa !22
  %.not67 = icmp eq i64 %39, 0
  br i1 %.not67, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph55
  %40 = getelementptr inbounds i8, ptr %38, i64 8
  %41 = load ptr, ptr %40, align 8, !tbaa !24
  %42 = load ptr, ptr %41, align 8, !tbaa !10
  %43 = load ptr, ptr %42, align 8, !tbaa !25
  %44 = getelementptr inbounds i8, ptr %42, i64 8
  %45 = load ptr, ptr %44, align 8, !tbaa !27
  %46 = getelementptr inbounds i8, ptr %42, i64 16
  %47 = load i32, ptr %46, align 8, !tbaa !28
  %48 = getelementptr inbounds i8, ptr %42, i64 20
  %49 = load i32, ptr %48, align 4, !tbaa !29
  %50 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.16, i32 noundef 58, ptr noundef %43, ptr noundef %45, i32 noundef %47, i32 noundef %49)
  %51 = load ptr, ptr %42, align 8, !tbaa !25
  %52 = load ptr, ptr %44, align 8, !tbaa !27
  %53 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %2, i64 noundef 1000, ptr noundef nonnull @.str.17, ptr noundef %51, ptr noundef %52) #5
  %54 = call ptr @strstr(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) %2) #6
  %55 = icmp eq ptr %54, null
  %56 = icmp sgt i32 %.154, 0
  %or.cond.peel = select i1 %55, i1 %56, i1 false
  br i1 %or.cond.peel, label %57, label %65

57:                                               ; preds = %.lr.ph
  %58 = zext nneg i32 %.154 to i64
  %59 = load ptr, ptr %42, align 8, !tbaa !25
  %60 = load ptr, ptr %44, align 8, !tbaa !27
  %61 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %.14153, i64 noundef %58, ptr noundef nonnull @.str.18, ptr noundef %59, ptr noundef %60) #5
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds i8, ptr %.14153, i64 %62
  %64 = sub i32 %.154, %61
  br label %65

65:                                               ; preds = %57, %.lr.ph
  %.343.peel = phi ptr [ %63, %57 ], [ %.14153, %.lr.ph ]
  %.3.peel = phi i32 [ %64, %57 ], [ %.154, %.lr.ph ]
  %66 = load i64, ptr %38, align 8, !tbaa !22
  %67 = icmp ugt i64 %66, 1
  br i1 %67, label %.peel.next, label %.loopexit.loopexit

.peel.next:                                       ; preds = %65, %93
  %.250 = phi i32 [ %.3, %93 ], [ %.3.peel, %65 ]
  %.24249 = phi ptr [ %.343, %93 ], [ %.343.peel, %65 ]
  %.04648 = phi i64 [ %94, %93 ], [ 1, %65 ]
  %68 = load ptr, ptr %40, align 8, !tbaa !24
  %69 = getelementptr inbounds ptr, ptr %68, i64 %.04648
  %70 = load ptr, ptr %69, align 8, !tbaa !10
  %71 = load ptr, ptr %70, align 8, !tbaa !25
  %72 = getelementptr inbounds i8, ptr %70, i64 8
  %73 = load ptr, ptr %72, align 8, !tbaa !27
  %74 = getelementptr inbounds i8, ptr %70, i64 16
  %75 = load i32, ptr %74, align 8, !tbaa !28
  %76 = getelementptr inbounds i8, ptr %70, i64 20
  %77 = load i32, ptr %76, align 4, !tbaa !29
  %78 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.16, i32 noundef 44, ptr noundef %71, ptr noundef %73, i32 noundef %75, i32 noundef %77)
  %79 = load ptr, ptr %70, align 8, !tbaa !25
  %80 = load ptr, ptr %72, align 8, !tbaa !27
  %81 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %2, i64 noundef 1000, ptr noundef nonnull @.str.17, ptr noundef %79, ptr noundef %80) #5
  %82 = call ptr @strstr(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) %2) #6
  %83 = icmp eq ptr %82, null
  %84 = icmp sgt i32 %.250, 0
  %or.cond = select i1 %83, i1 %84, i1 false
  br i1 %or.cond, label %85, label %93

85:                                               ; preds = %.peel.next
  %86 = zext nneg i32 %.250 to i64
  %87 = load ptr, ptr %70, align 8, !tbaa !25
  %88 = load ptr, ptr %72, align 8, !tbaa !27
  %89 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %.24249, i64 noundef %86, ptr noundef nonnull @.str.18, ptr noundef %87, ptr noundef %88) #5
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds i8, ptr %.24249, i64 %90
  %92 = sub i32 %.250, %89
  br label %93

93:                                               ; preds = %.peel.next, %85
  %.343 = phi ptr [ %91, %85 ], [ %.24249, %.peel.next ]
  %.3 = phi i32 [ %92, %85 ], [ %.250, %.peel.next ]
  %94 = add nuw i64 %.04648, 1
  %95 = load i64, ptr %38, align 8, !tbaa !22
  %96 = icmp ult i64 %94, %95
  br i1 %96, label %.peel.next, label %.loopexit.loopexit, !llvm.loop !30

._crit_edge:                                      ; preds = %.loopexit, %.lr.ph63
  %.141.lcssa = phi ptr [ %.04060, %.lr.ph63 ], [ %.242.lcssa, %.loopexit ]
  %.1.lcssa = phi i32 [ %.061, %.lr.ph63 ], [ %.2.lcssa, %.loopexit ]
  %.lcssa = phi ptr [ %25, %.lr.ph63 ], [ %28, %.loopexit ]
  %97 = getelementptr inbounds i8, ptr %.lcssa, i64 88
  %98 = load ptr, ptr %97, align 8, !tbaa !32
  %99 = call ptr @localtime(ptr noundef %98) #5
  %.sroa.0.0.copyload = load i32, ptr %99, align 8, !tbaa !33
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %99, i64 4
  %.sroa.4.0.copyload = load i32, ptr %.sroa.4.0..sroa_idx, align 4, !tbaa !33
  %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %99, i64 8
  %.sroa.5.0.copyload = load i32, ptr %.sroa.5.0..sroa_idx, align 8, !tbaa !33
  %.sroa.6.0..sroa_idx = getelementptr inbounds i8, ptr %99, i64 12
  %.sroa.6.0.copyload = load i32, ptr %.sroa.6.0..sroa_idx, align 4, !tbaa !33
  %.sroa.7.0..sroa_idx = getelementptr inbounds i8, ptr %99, i64 16
  %.sroa.7.0.copyload = load i32, ptr %.sroa.7.0..sroa_idx, align 8, !tbaa !33
  %.sroa.8.0..sroa_idx = getelementptr inbounds i8, ptr %99, i64 20
  %.sroa.8.0.copyload = load i32, ptr %.sroa.8.0..sroa_idx, align 4, !tbaa !33
  %100 = load ptr, ptr %9, align 8, !tbaa !10
  %101 = getelementptr inbounds i8, ptr %100, i64 88
  %102 = load ptr, ptr %101, align 8, !tbaa !32
  %103 = getelementptr inbounds i8, ptr %102, i64 16
  %104 = load ptr, ptr %103, align 8, !tbaa !34
  %105 = getelementptr inbounds i8, ptr %102, i64 8
  %106 = load ptr, ptr %105, align 8, !tbaa !36
  %107 = add nsw i32 %.sroa.8.0.copyload, 1900
  %108 = add nsw i32 %.sroa.7.0.copyload, 1
  %109 = getelementptr inbounds i8, ptr %102, i64 32
  %110 = load ptr, ptr %109, align 8, !tbaa !37
  %111 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.19, ptr noundef %104, ptr noundef %106, i32 noundef %107, i32 noundef %108, 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 %110)
  %112 = load i64, ptr @rules_count, align 8, !tbaa !8
  %113 = icmp ult i64 %8, %112
  br i1 %113, label %.lr.ph63, label %._crit_edge64, !llvm.loop !38

._crit_edge64:                                    ; preds = %._crit_edge, %0
  %114 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %1) #6
  %.not = icmp eq i64 %114, 0
  br i1 %.not, label %118, label %115

115:                                              ; preds = %._crit_edge64
  %116 = add i64 %114, -1
  %117 = getelementptr inbounds [100000 x i8], ptr %1, i64 0, i64 %116
  store i8 0, ptr %117, align 1, !tbaa !5
  br label %118

118:                                              ; preds = %115, %._crit_edge64
  %119 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.20, ptr noundef nonnull %1)
  call void @llvm.lifetime.end.p0(i64 1000, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 100000, ptr nonnull %1) #5
  ret void
}

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #3 = { 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 #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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"long", !6, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"any pointer", !6, i64 0}
!12 = !{!13, !14, i64 0}
!13 = !{!"rule_info_struct", !14, i64 0, !14, i64 4, !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !6, i64 40, !6, i64 41, !11, i64 48, !11, i64 56, !11, i64 64, !11, i64 72, !11, i64 80, !11, i64 88}
!14 = !{!"int", !6, i64 0}
!15 = !{!13, !11, i64 8}
!16 = !{!13, !11, i64 16}
!17 = !{!13, !11, i64 24}
!18 = !{!13, !6, i64 41}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!13, !11, i64 56}
!22 = !{!23, !9, i64 0}
!23 = !{!"mmt_array_struct", !9, i64 0, !11, i64 8}
!24 = !{!23, !11, i64 8}
!25 = !{!26, !11, i64 0}
!26 = !{!"proto_attribute_struct", !11, i64 0, !11, i64 8, !14, i64 16, !14, i64 20, !14, i64 24, !14, i64 28}
!27 = !{!26, !11, i64 8}
!28 = !{!26, !14, i64 16}
!29 = !{!26, !14, i64 20}
!30 = distinct !{!30, !20, !31}
!31 = !{!"llvm.loop.peeled.count", i32 1}
!32 = !{!13, !11, i64 88}
!33 = !{!14, !14, i64 0}
!34 = !{!35, !11, i64 16}
!35 = !{!"rule_version_info_struct", !9, i64 0, !11, i64 8, !11, i64 16, !14, i64 24, !11, i64 32}
!36 = !{!35, !11, i64 8}
!37 = !{!35, !11, i64 32}
!38 = distinct !{!38, !20}


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