; LLVM IR from intel/intel-ipsec-mb :: examples/burst-app (main)

; 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.gcm_key_data = type { [240 x i8], %union.anon }
%union.anon = type { %struct.anon.1 }
%struct.anon.1 = type { [1024 x i8] }
%struct.IMB_MGR = type { i64, i64, [4 x i64], [7 x i8], i8, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, [256 x %struct.IMB_JOB], ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.IMB_JOB = type { ptr, ptr, i64, %union.anon.3, %union.anon.4, %union.anon.5, %union.anon.6, i64, %union.anon.7, ptr, i64, ptr, i64, %union.anon.8, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, i32, %union.anon.9, [2 x i32], i32 }
%union.anon.3 = type { ptr }
%union.anon.4 = type { ptr }
%union.anon.5 = type { i64 }
%union.anon.6 = type { i64 }
%union.anon.7 = type { i64 }
%union.anon.8 = type { %struct._AES_XCBC_specific_fields }
%struct._AES_XCBC_specific_fields = type { ptr, ptr, ptr }
%union.anon.9 = type { %struct._CBCS_specific_fields }
%struct._CBCS_specific_fields = type { ptr }

@.str = external hidden unnamed_addr constant [45 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [41 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca [256 x ptr], align 16
  %6 = alloca [256 x ptr], align 16
  %7 = alloca [256 x ptr], align 16
  %8 = alloca [16 x i8], align 16
  %9 = alloca %struct.gcm_key_data, align 1
  %10 = alloca [32 x [16 x i8]], align 16
  %11 = alloca [32 x [12 x i8]], align 16
  %12 = alloca [32 x ptr], align 16
  %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 i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  store ptr null, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  store i32 1, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 2048, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 2048, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 2048, ptr %7) #5
  %20 = getelementptr inbounds [256 x ptr], ptr %5, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 16 %20, i8 0, i64 2048, i1 false)
  %21 = getelementptr inbounds [256 x ptr], ptr %6, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 16 %21, i8 0, i64 2048, i1 false)
  %22 = getelementptr inbounds [256 x ptr], ptr %7, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 16 %22, i8 0, i64 2048, i1 false)
  %23 = getelementptr inbounds [256 x ptr], ptr %5, i64 0, i64 0
  %24 = call i32 @allocate_array(ptr noundef %23, i32 noundef 256, i64 noundef 2048)
  %25 = icmp slt i32 %24, 0
  br i1 %25, label %26, label %28

26:                                               ; preds = %0
  %27 = call i32 (ptr, ...) @printf(ptr noundef @.str)
  br label %170

28:                                               ; preds = %0
  %29 = getelementptr inbounds [256 x ptr], ptr %6, i64 0, i64 0
  %30 = call i32 @allocate_array(ptr noundef %29, i32 noundef 256, i64 noundef 2048)
  %31 = icmp slt i32 %30, 0
  br i1 %31, label %32, label %34

32:                                               ; preds = %28
  %33 = call i32 (ptr, ...) @printf(ptr noundef @.str.1)
  br label %170

34:                                               ; preds = %28
  %35 = getelementptr inbounds [256 x ptr], ptr %7, i64 0, i64 0
  %36 = call i32 @allocate_array(ptr noundef %35, i32 noundef 256, i64 noundef 16)
  %37 = icmp slt i32 %36, 0
  br i1 %37, label %38, label %40

38:                                               ; preds = %34
  %39 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  br label %170

40:                                               ; preds = %34
  %41 = call ptr @alloc_mb_mgr(i64 noundef 0)
  store ptr %41, ptr %3, align 8, !tbaa !5
  %42 = load ptr, ptr %3, align 8, !tbaa !5
  %43 = icmp eq ptr %42, null
  br i1 %43, label %44, label %46

44:                                               ; preds = %40
  %45 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  br label %170

46:                                               ; preds = %40
  %47 = load ptr, ptr %3, align 8, !tbaa !5
  call void @init_mb_mgr_auto(ptr noundef %47, ptr noundef null)
  %48 = load ptr, ptr %3, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.IMB_MGR, ptr %48, i32 0, i32 55
  %50 = load ptr, ptr %49, align 8, !tbaa !11
  %51 = getelementptr inbounds [16 x i8], ptr %8, i64 0, i64 0
  call void %50(ptr noundef %51, ptr noundef %9)
  store i32 0, ptr %14, align 4, !tbaa !9
  store i32 10000, ptr %15, align 4, !tbaa !9
  %52 = call i32 (ptr, ...) @printf(ptr noundef @.str.4, i64 noundef 10000)
  br label %53

53:                                               ; preds = %146, %144, %46
  %54 = load i32, ptr %15, align 4, !tbaa !9
  %55 = icmp ne i32 %54, 0
  br i1 %55, label %56, label %147

56:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  %57 = load i32, ptr %15, align 4, !tbaa !9
  %58 = icmp ult i32 %57, 32
  br i1 %58, label %59, label %61

59:                                               ; preds = %56
  %60 = load i32, ptr %15, align 4, !tbaa !9
  br label %62

61:                                               ; preds = %56
  br label %62

62:                                               ; preds = %61, %59
  %63 = phi i32 [ %60, %59 ], [ 32, %61 ]
  store i32 %63, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  %64 = load ptr, ptr %3, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.IMB_MGR, ptr %64, i32 0, i32 118
  %66 = load ptr, ptr %65, align 8, !tbaa !14
  %67 = load ptr, ptr %3, align 8, !tbaa !5
  %68 = load i32, ptr %16, align 4, !tbaa !9
  %69 = getelementptr inbounds [32 x ptr], ptr %12, i64 0, i64 0
  %70 = call i32 %66(ptr noundef %67, i32 noundef %68, ptr noundef %69)
  store i32 %70, ptr %17, align 4, !tbaa !9
  %71 = load i32, ptr %17, align 4, !tbaa !9
  %72 = icmp eq i32 %71, 0
  br i1 %72, label %73, label %83

73:                                               ; preds = %62
  %74 = load ptr, ptr %3, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.IMB_MGR, ptr %74, i32 0, i32 121
  %76 = load ptr, ptr %75, align 8, !tbaa !15
  %77 = load ptr, ptr %3, align 8, !tbaa !5
  %78 = getelementptr inbounds [32 x ptr], ptr %12, i64 0, i64 0
  %79 = call i32 %76(ptr noundef %77, i32 noundef 32, ptr noundef %78)
  store i32 %79, ptr %13, align 4, !tbaa !9
  %80 = load i32, ptr %13, align 4, !tbaa !9
  %81 = load i32, ptr %14, align 4, !tbaa !9
  %82 = add i32 %81, %80
  store i32 %82, ptr %14, align 4, !tbaa !9
  store i32 3, ptr %18, align 4
  br label %144, !llvm.loop !16

83:                                               ; preds = %62
  store i32 0, ptr %2, align 4, !tbaa !9
  br label %84

84:                                               ; preds = %127, %83
  %85 = load i32, ptr %2, align 4, !tbaa !9
  %86 = load i32, ptr %17, align 4, !tbaa !9
  %87 = icmp ult i32 %85, %86
  br i1 %87, label %88, label %130

88:                                               ; preds = %84
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  %89 = load i32, ptr %15, align 4, !tbaa !9
  %90 = zext i32 %89 to i64
  %91 = sub i64 10000, %90
  %92 = load i32, ptr %2, align 4, !tbaa !9
  %93 = zext i32 %92 to i64
  %94 = add i64 %91, %93
  %95 = urem i64 %94, 256
  %96 = trunc i64 %95 to i32
  store i32 %96, ptr %19, align 4, !tbaa !9
  %97 = load i32, ptr %2, align 4, !tbaa !9
  %98 = zext i32 %97 to i64
  %99 = getelementptr inbounds [32 x ptr], ptr %12, i64 0, i64 %98
  %100 = load ptr, ptr %99, align 8, !tbaa !5
  %101 = load i32, ptr %19, align 4, !tbaa !9
  %102 = zext i32 %101 to i64
  %103 = getelementptr inbounds [256 x ptr], ptr %5, i64 0, i64 %102
  %104 = load ptr, ptr %103, align 8, !tbaa !5
  %105 = load i32, ptr %19, align 4, !tbaa !9
  %106 = zext i32 %105 to i64
  %107 = getelementptr inbounds [256 x ptr], ptr %6, i64 0, i64 %106
  %108 = load ptr, ptr %107, align 8, !tbaa !5
  %109 = load i32, ptr %2, align 4, !tbaa !9
  %110 = zext i32 %109 to i64
  %111 = getelementptr inbounds [32 x [16 x i8]], ptr %10, i64 0, i64 %110
  %112 = getelementptr inbounds [16 x i8], ptr %111, i64 0, i64 0
  %113 = load i32, ptr %2, align 4, !tbaa !9
  %114 = zext i32 %113 to i64
  %115 = getelementptr inbounds [32 x [12 x i8]], ptr %11, i64 0, i64 %114
  %116 = getelementptr inbounds [12 x i8], ptr %115, i64 0, i64 0
  %117 = load i32, ptr %19, align 4, !tbaa !9
  %118 = zext i32 %117 to i64
  %119 = getelementptr inbounds [256 x ptr], ptr %7, i64 0, i64 %118
  %120 = load ptr, ptr %119, align 8, !tbaa !5
  call void @fill_job(ptr noundef %100, ptr noundef %104, ptr noundef %108, ptr noundef %112, ptr noundef %9, ptr noundef %116, ptr noundef %120)
  %121 = load ptr, ptr %3, align 8, !tbaa !5
  %122 = load i32, ptr %2, align 4, !tbaa !9
  %123 = zext i32 %122 to i64
  %124 = getelementptr inbounds [32 x ptr], ptr %12, i64 0, i64 %123
  %125 = load ptr, ptr %124, align 8, !tbaa !5
  %126 = call i32 @imb_set_session(ptr noundef %121, ptr noundef %125)
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  br label %127

127:                                              ; preds = %88
  %128 = load i32, ptr %2, align 4, !tbaa !9
  %129 = add i32 %128, 1
  store i32 %129, ptr %2, align 4, !tbaa !9
  br label %84, !llvm.loop !18

130:                                              ; preds = %84
  %131 = load ptr, ptr %3, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.IMB_MGR, ptr %131, i32 0, i32 120
  %133 = load ptr, ptr %132, align 8, !tbaa !19
  %134 = load ptr, ptr %3, align 8, !tbaa !5
  %135 = load i32, ptr %17, align 4, !tbaa !9
  %136 = getelementptr inbounds [32 x ptr], ptr %12, i64 0, i64 0
  %137 = call i32 %133(ptr noundef %134, i32 noundef %135, ptr noundef %136)
  store i32 %137, ptr %13, align 4, !tbaa !9
  %138 = load i32, ptr %17, align 4, !tbaa !9
  %139 = load i32, ptr %15, align 4, !tbaa !9
  %140 = sub i32 %139, %138
  store i32 %140, ptr %15, align 4, !tbaa !9
  %141 = load i32, ptr %13, align 4, !tbaa !9
  %142 = load i32, ptr %14, align 4, !tbaa !9
  %143 = add i32 %142, %141
  store i32 %143, ptr %14, align 4, !tbaa !9
  store i32 0, ptr %18, align 4
  br label %144

144:                                              ; preds = %130, %73
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  %145 = load i32, ptr %18, align 4
  switch i32 %145, label %194 [
    i32 0, label %146
    i32 3, label %53
  ]

146:                                              ; preds = %144
  br label %53, !llvm.loop !16

147:                                              ; preds = %53
  %148 = load i32, ptr %14, align 4, !tbaa !9
  %149 = zext i32 %148 to i64
  %150 = icmp ne i64 %149, 10000
  br i1 %150, label %151, label %161

151:                                              ; preds = %147
  %152 = load ptr, ptr %3, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.IMB_MGR, ptr %152, i32 0, i32 121
  %154 = load ptr, ptr %153, align 8, !tbaa !15
  %155 = load ptr, ptr %3, align 8, !tbaa !5
  %156 = getelementptr inbounds [32 x ptr], ptr %12, i64 0, i64 0
  %157 = call i32 %154(ptr noundef %155, i32 noundef 32, ptr noundef %156)
  store i32 %157, ptr %13, align 4, !tbaa !9
  %158 = load i32, ptr %13, align 4, !tbaa !9
  %159 = load i32, ptr %14, align 4, !tbaa !9
  %160 = add i32 %159, %158
  store i32 %160, ptr %14, align 4, !tbaa !9
  br label %161

161:                                              ; preds = %151, %147
  %162 = load i32, ptr %14, align 4, !tbaa !9
  %163 = zext i32 %162 to i64
  %164 = icmp ne i64 %163, 10000
  br i1 %164, label %165, label %168

165:                                              ; preds = %161
  %166 = load i32, ptr %14, align 4, !tbaa !9
  %167 = call i32 (ptr, ...) @printf(ptr noundef @.str.5, i64 noundef 10000, i32 noundef %166)
  br label %170

168:                                              ; preds = %161
  store i32 0, ptr %4, align 4, !tbaa !9
  %169 = call i32 (ptr, ...) @printf(ptr noundef @.str.6)
  br label %170

170:                                              ; preds = %168, %165, %44, %38, %32, %26
  store i32 0, ptr %2, align 4, !tbaa !9
  br label %171

171:                                              ; preds = %187, %170
  %172 = load i32, ptr %2, align 4, !tbaa !9
  %173 = icmp ult i32 %172, 256
  br i1 %173, label %174, label %190

174:                                              ; preds = %171
  %175 = load i32, ptr %2, align 4, !tbaa !9
  %176 = zext i32 %175 to i64
  %177 = getelementptr inbounds [256 x ptr], ptr %5, i64 0, i64 %176
  %178 = load ptr, ptr %177, align 8, !tbaa !5
  call void @free(ptr noundef %178) #5
  %179 = load i32, ptr %2, align 4, !tbaa !9
  %180 = zext i32 %179 to i64
  %181 = getelementptr inbounds [256 x ptr], ptr %6, i64 0, i64 %180
  %182 = load ptr, ptr %181, align 8, !tbaa !5
  call void @free(ptr noundef %182) #5
  %183 = load i32, ptr %2, align 4, !tbaa !9
  %184 = zext i32 %183 to i64
  %185 = getelementptr inbounds [256 x ptr], ptr %7, i64 0, i64 %184
  %186 = load ptr, ptr %185, align 8, !tbaa !5
  call void @free(ptr noundef %186) #5
  br label %187

187:                                              ; preds = %174
  %188 = load i32, ptr %2, align 4, !tbaa !9
  %189 = add i32 %188, 1
  store i32 %189, ptr %2, align 4, !tbaa !9
  br label %171, !llvm.loop !20

190:                                              ; preds = %171
  %191 = load ptr, ptr %3, align 8, !tbaa !5
  call void @free_mb_mgr(ptr noundef %191)
  %192 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %192, ptr %1, align 4
  store i32 1, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 2048, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 2048, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 2048, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  %193 = load i32, ptr %1, align 4
  ret i32 %193

194:                                              ; preds = %144
  unreachable
}

; 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: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

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

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

declare ptr @alloc_mb_mgr(i64 noundef) #3

declare void @init_mb_mgr_auto(ptr noundef, ptr noundef) #3

; Function Attrs: nounwind uwtable
declare hidden void @fill_job(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #0

declare i32 @imb_set_session(ptr noundef, ptr noundef) #3

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

; Function Attrs: nounwind
declare void @free(ptr noundef) #4

declare void @free_mb_mgr(ptr noundef) #3

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: write) }
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 = { 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 }

!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 = !{!12, !6, i64 448}
!12 = !{!"IMB_MGR", !13, i64 0, !13, i64 8, !7, i64 16, !7, i64 48, !7, i64 55, !10, i64 56, !10, i64 60, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184, !6, i64 192, !6, i64 200, !6, i64 208, !6, i64 216, !6, i64 224, !6, i64 232, !6, i64 240, !6, i64 248, !6, i64 256, !6, i64 264, !6, i64 272, !6, i64 280, !6, i64 288, !6, i64 296, !6, i64 304, !6, i64 312, !6, i64 320, !6, i64 328, !6, i64 336, !6, i64 344, !6, i64 352, !6, i64 360, !6, i64 368, !6, i64 376, !6, i64 384, !6, i64 392, !6, i64 400, !6, i64 408, !6, i64 416, !6, i64 424, !6, i64 432, !6, i64 440, !6, i64 448, !6, i64 456, !6, i64 464, !6, i64 472, !6, i64 480, !6, i64 488, !6, i64 496, !6, i64 504, !6, i64 512, !6, i64 520, !6, i64 528, !6, i64 536, !6, i64 544, !6, i64 552, !6, i64 560, !6, i64 568, !6, i64 576, !6, i64 584, !6, i64 592, !6, i64 600, !6, i64 608, !6, i64 616, !6, i64 624, !6, i64 632, !6, i64 640, !6, i64 648, !6, i64 656, !6, i64 664, !6, i64 672, !6, i64 680, !6, i64 688, !6, i64 696, !6, i64 704, !6, i64 712, !6, i64 720, !6, i64 728, !6, i64 736, !6, i64 744, !6, i64 752, !6, i64 760, !6, i64 768, !6, i64 776, !6, i64 784, !6, i64 792, !6, i64 800, !6, i64 808, !6, i64 816, !6, i64 824, !6, i64 832, !6, i64 840, !6, i64 848, !6, i64 856, !6, i64 864, !6, i64 872, !6, i64 880, !6, i64 888, !6, i64 896, !6, i64 904, !6, i64 912, !6, i64 920, !6, i64 928, !6, i64 936, !6, i64 944, !6, i64 952, !6, i64 960, !6, i64 968, !6, i64 976, !6, i64 984, !6, i64 992, !6, i64 1000, !6, i64 1008, !6, i64 1016, !6, i64 1024, !6, i64 1032, !6, i64 1040, !6, i64 1048, !6, i64 1056, !6, i64 1064, !6, i64 1072, !6, i64 1080, !6, i64 1088, !6, i64 1096, !10, i64 1104, !10, i64 1108, !7, i64 1112, !6, i64 56408, !6, i64 56416, !6, i64 56424, !6, i64 56432, !6, i64 56440, !6, i64 56448, !6, i64 56456, !6, i64 56464, !6, i64 56472, !6, i64 56480, !6, i64 56488, !6, i64 56496, !6, i64 56504, !6, i64 56512, !6, i64 56520, !6, i64 56528, !6, i64 56536, !6, i64 56544, !6, i64 56552, !6, i64 56560, !6, i64 56568, !6, i64 56576, !6, i64 56584, !6, i64 56592, !6, i64 56600, !6, i64 56608, !6, i64 56616, !6, i64 56624, !6, i64 56632, !6, i64 56640, !6, i64 56648, !6, i64 56656, !6, i64 56664, !6, i64 56672, !6, i64 56680, !6, i64 56688, !6, i64 56696, !6, i64 56704, !6, i64 56712, !6, i64 56720, !6, i64 56728, !6, i64 56736}
!13 = !{!"long", !7, i64 0}
!14 = !{!12, !6, i64 952}
!15 = !{!12, !6, i64 976}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !17}
!19 = !{!12, !6, i64 968}
!20 = distinct !{!20, !17}


; 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.gcm_key_data = type { [240 x i8], %union.anon }
%union.anon = type { %struct.anon.1 }
%struct.anon.1 = type { [1024 x i8] }

@.str = external hidden unnamed_addr constant [45 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [41 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @main() local_unnamed_addr #0 {
  %1 = alloca [256 x ptr], align 16
  %2 = alloca [256 x ptr], align 16
  %3 = alloca [256 x ptr], align 16
  %4 = alloca [16 x i8], align 16
  %5 = alloca %struct.gcm_key_data, align 1
  %6 = alloca [32 x [16 x i8]], align 16
  %7 = alloca [32 x [12 x i8]], align 16
  %8 = alloca [32 x ptr], align 16
  call void @llvm.lifetime.start.p0(i64 2048, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 2048, ptr nonnull %2) #7
  call void @llvm.lifetime.start.p0(i64 2048, ptr nonnull %3) #7
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(2048) %1, i8 0, i64 2048, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(2048) %2, i8 0, i64 2048, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(2048) %3, i8 0, i64 2048, i1 false)
  %9 = call i32 @allocate_array(ptr noundef nonnull %1, i32 noundef 256, i64 noundef 2048)
  %10 = icmp slt i32 %9, 0
  br i1 %10, label %11, label %13

11:                                               ; preds = %0
  %12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str)
  br label %73

13:                                               ; preds = %0
  %14 = call i32 @allocate_array(ptr noundef nonnull %2, i32 noundef 256, i64 noundef 2048)
  %15 = icmp slt i32 %14, 0
  br i1 %15, label %16, label %18

16:                                               ; preds = %13
  %17 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1)
  br label %73

18:                                               ; preds = %13
  %19 = call i32 @allocate_array(ptr noundef nonnull %3, i32 noundef 256, i64 noundef 16)
  %20 = icmp slt i32 %19, 0
  br i1 %20, label %21, label %23

21:                                               ; preds = %18
  %22 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  br label %73

23:                                               ; preds = %18
  %24 = call ptr @alloc_mb_mgr(i64 noundef 0) #7
  %25 = icmp eq ptr %24, null
  br i1 %25, label %26, label %28

26:                                               ; preds = %23
  %27 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3)
  br label %73

28:                                               ; preds = %23
  call void @init_mb_mgr_auto(ptr noundef nonnull %24, ptr noundef null) #7
  %29 = getelementptr inbounds i8, ptr %24, i64 448
  %30 = load ptr, ptr %29, align 8, !tbaa !5
  call void %30(ptr noundef nonnull %4, ptr noundef nonnull %5) #7
  %31 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i64 noundef 10000)
  %32 = getelementptr inbounds i8, ptr %24, i64 952
  %33 = getelementptr inbounds i8, ptr %24, i64 968
  %34 = getelementptr inbounds i8, ptr %24, i64 976
  br label %35

35:                                               ; preds = %28, %64
  %.04963 = phi i32 [ 10000, %28 ], [ %.150, %64 ]
  %.05162 = phi i32 [ 0, %28 ], [ %.152, %64 ]
  %36 = call i32 @llvm.umin.i32(i32 %.04963, i32 32)
  %37 = load ptr, ptr %32, align 8, !tbaa !12
  %38 = call i32 %37(ptr noundef nonnull %24, i32 noundef %36, ptr noundef nonnull %8) #7
  %39 = icmp eq i32 %38, 0
  br i1 %39, label %40, label %.preheader

.preheader:                                       ; preds = %35
  %wide.trip.count = zext i32 %38 to i64
  br label %43

40:                                               ; preds = %35
  %41 = load ptr, ptr %34, align 8, !tbaa !13
  %42 = call i32 %41(ptr noundef nonnull %24, i32 noundef 32, ptr noundef nonnull %8) #7
  br label %64, !llvm.loop !14

43:                                               ; preds = %.preheader, %43
  %indvars.iv = phi i64 [ 0, %.preheader ], [ %indvars.iv.next, %43 ]
  %44 = trunc nuw i64 %indvars.iv to i32
  %reass.sub65 = sub i32 %44, %.04963
  %45 = add i32 %reass.sub65, 16
  %46 = and i32 %45, 255
  %47 = getelementptr inbounds [32 x ptr], ptr %8, i64 0, i64 %indvars.iv
  %48 = load ptr, ptr %47, align 8, !tbaa !16
  %49 = zext nneg i32 %46 to i64
  %50 = getelementptr inbounds [256 x ptr], ptr %1, i64 0, i64 %49
  %51 = load ptr, ptr %50, align 8, !tbaa !16
  %52 = getelementptr inbounds [256 x ptr], ptr %2, i64 0, i64 %49
  %53 = load ptr, ptr %52, align 8, !tbaa !16
  %54 = getelementptr inbounds [32 x [16 x i8]], ptr %6, i64 0, i64 %indvars.iv
  %55 = getelementptr inbounds [32 x [12 x i8]], ptr %7, i64 0, i64 %indvars.iv
  %56 = getelementptr inbounds [256 x ptr], ptr %3, i64 0, i64 %49
  %57 = load ptr, ptr %56, align 8, !tbaa !16
  call void @fill_job(ptr noundef %48, ptr noundef %51, ptr noundef %53, ptr noundef nonnull %54, ptr noundef nonnull %5, ptr noundef nonnull %55, ptr noundef %57)
  %58 = load ptr, ptr %47, align 8, !tbaa !16
  %59 = call i32 @imb_set_session(ptr noundef nonnull %24, ptr noundef %58) #7
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %60, label %43, !llvm.loop !17

60:                                               ; preds = %43
  %61 = load ptr, ptr %33, align 8, !tbaa !18
  %62 = call i32 %61(ptr noundef nonnull %24, i32 noundef %38, ptr noundef nonnull %8) #7
  %63 = sub i32 %.04963, %38
  br label %64

64:                                               ; preds = %60, %40
  %.pn = phi i32 [ %42, %40 ], [ %62, %60 ]
  %.150 = phi i32 [ %.04963, %40 ], [ %63, %60 ]
  %.152 = add i32 %.pn, %.05162
  %.not = icmp eq i32 %.150, 0
  br i1 %.not, label %65, label %35

65:                                               ; preds = %64
  %.not57 = icmp eq i32 %.152, 10000
  br i1 %.not57, label %.thread, label %66

66:                                               ; preds = %65
  %67 = load ptr, ptr %34, align 8, !tbaa !13
  %68 = call i32 %67(ptr noundef nonnull %24, i32 noundef 32, ptr noundef nonnull %8) #7
  %69 = add i32 %68, %.152
  %.not58 = icmp eq i32 %69, 10000
  br i1 %.not58, label %.thread, label %70

70:                                               ; preds = %66
  %71 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i64 noundef 10000, i32 noundef %69)
  br label %73

.thread:                                          ; preds = %65, %66
  %72 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6)
  br label %73

73:                                               ; preds = %.thread, %70, %26, %21, %16, %11
  %.053 = phi i32 [ 1, %11 ], [ 1, %16 ], [ 1, %21 ], [ 1, %26 ], [ 1, %70 ], [ 0, %.thread ]
  %.048 = phi ptr [ null, %11 ], [ null, %16 ], [ null, %21 ], [ null, %26 ], [ %24, %70 ], [ %24, %.thread ]
  br label %74

74:                                               ; preds = %73, %74
  %indvars.iv67 = phi i64 [ 0, %73 ], [ %indvars.iv.next68, %74 ]
  %75 = getelementptr inbounds [256 x ptr], ptr %1, i64 0, i64 %indvars.iv67
  %76 = load ptr, ptr %75, align 8, !tbaa !16
  call void @free(ptr noundef %76) #7
  %77 = getelementptr inbounds [256 x ptr], ptr %2, i64 0, i64 %indvars.iv67
  %78 = load ptr, ptr %77, align 8, !tbaa !16
  call void @free(ptr noundef %78) #7
  %79 = getelementptr inbounds [256 x ptr], ptr %3, i64 0, i64 %indvars.iv67
  %80 = load ptr, ptr %79, align 8, !tbaa !16
  call void @free(ptr noundef %80) #7
  %indvars.iv.next68 = add nuw nsw i64 %indvars.iv67, 1
  %exitcond70.not = icmp eq i64 %indvars.iv.next68, 256
  br i1 %exitcond70.not, label %81, label %74, !llvm.loop !19

81:                                               ; preds = %74
  call void @free_mb_mgr(ptr noundef %.048) #7
  call void @llvm.lifetime.end.p0(i64 2048, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 2048, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 2048, ptr nonnull %1) #7
  ret i32 %.053
}

; 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: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

; Function Attrs: nounwind uwtable
declare hidden i32 @allocate_array(ptr noundef, i32 noundef, i64 noundef) local_unnamed_addr #0

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

declare ptr @alloc_mb_mgr(i64 noundef) local_unnamed_addr #4

declare void @init_mb_mgr_auto(ptr noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
declare hidden void @fill_job(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

declare i32 @imb_set_session(ptr noundef, ptr noundef) local_unnamed_addr #4

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

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #5

declare void @free_mb_mgr(ptr noundef) local_unnamed_addr #4

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.umin.i32(i32, i32) #6

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: write) }
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 = { "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 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { 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, !11, i64 448}
!6 = !{!"IMB_MGR", !7, i64 0, !7, i64 8, !8, i64 16, !8, i64 48, !8, i64 55, !10, i64 56, !10, i64 60, !11, i64 64, !11, i64 72, !11, i64 80, !11, i64 88, !11, i64 96, !11, i64 104, !11, i64 112, !11, i64 120, !11, i64 128, !11, i64 136, !11, i64 144, !11, i64 152, !11, i64 160, !11, i64 168, !11, i64 176, !11, i64 184, !11, i64 192, !11, i64 200, !11, i64 208, !11, i64 216, !11, i64 224, !11, i64 232, !11, i64 240, !11, i64 248, !11, i64 256, !11, i64 264, !11, i64 272, !11, i64 280, !11, i64 288, !11, i64 296, !11, i64 304, !11, i64 312, !11, i64 320, !11, i64 328, !11, i64 336, !11, i64 344, !11, i64 352, !11, i64 360, !11, i64 368, !11, i64 376, !11, i64 384, !11, i64 392, !11, i64 400, !11, i64 408, !11, i64 416, !11, i64 424, !11, i64 432, !11, i64 440, !11, i64 448, !11, i64 456, !11, i64 464, !11, i64 472, !11, i64 480, !11, i64 488, !11, i64 496, !11, i64 504, !11, i64 512, !11, i64 520, !11, i64 528, !11, i64 536, !11, i64 544, !11, i64 552, !11, i64 560, !11, i64 568, !11, i64 576, !11, i64 584, !11, i64 592, !11, i64 600, !11, i64 608, !11, i64 616, !11, i64 624, !11, i64 632, !11, i64 640, !11, i64 648, !11, i64 656, !11, i64 664, !11, i64 672, !11, i64 680, !11, i64 688, !11, i64 696, !11, i64 704, !11, i64 712, !11, i64 720, !11, i64 728, !11, i64 736, !11, i64 744, !11, i64 752, !11, i64 760, !11, i64 768, !11, i64 776, !11, i64 784, !11, i64 792, !11, i64 800, !11, i64 808, !11, i64 816, !11, i64 824, !11, i64 832, !11, i64 840, !11, i64 848, !11, i64 856, !11, i64 864, !11, i64 872, !11, i64 880, !11, i64 888, !11, i64 896, !11, i64 904, !11, i64 912, !11, i64 920, !11, i64 928, !11, i64 936, !11, i64 944, !11, i64 952, !11, i64 960, !11, i64 968, !11, i64 976, !11, i64 984, !11, i64 992, !11, i64 1000, !11, i64 1008, !11, i64 1016, !11, i64 1024, !11, i64 1032, !11, i64 1040, !11, i64 1048, !11, i64 1056, !11, i64 1064, !11, i64 1072, !11, i64 1080, !11, i64 1088, !11, i64 1096, !10, i64 1104, !10, i64 1108, !8, i64 1112, !11, i64 56408, !11, i64 56416, !11, i64 56424, !11, i64 56432, !11, i64 56440, !11, i64 56448, !11, i64 56456, !11, i64 56464, !11, i64 56472, !11, i64 56480, !11, i64 56488, !11, i64 56496, !11, i64 56504, !11, i64 56512, !11, i64 56520, !11, i64 56528, !11, i64 56536, !11, i64 56544, !11, i64 56552, !11, i64 56560, !11, i64 56568, !11, i64 56576, !11, i64 56584, !11, i64 56592, !11, i64 56600, !11, i64 56608, !11, i64 56616, !11, i64 56624, !11, i64 56632, !11, i64 56640, !11, i64 56648, !11, i64 56656, !11, i64 56664, !11, i64 56672, !11, i64 56680, !11, i64 56688, !11, i64 56696, !11, i64 56704, !11, i64 56712, !11, i64 56720, !11, i64 56728, !11, i64 56736}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!6, !11, i64 952}
!13 = !{!6, !11, i64 976}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = !{!11, !11, i64 0}
!17 = distinct !{!17, !15}
!18 = !{!6, !11, i64 968}
!19 = distinct !{!19, !15}


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