; LLVM IR from intel/intel-ipsec-mb :: test/mp-app (mp_imb)

; 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.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, %union.anon.0, %union.anon.1, %union.anon.2, i64, %union.anon.3, ptr, i64, ptr, i64, %union.anon.4, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, i32, %union.anon.5, [2 x i32], i32 }
%union.anon = type { ptr }
%union.anon.0 = type { ptr }
%union.anon.1 = type { i64 }
%union.anon.2 = type { i64 }
%union.anon.3 = type { i64 }
%union.anon.4 = type { %struct._AES_XCBC_specific_fields }
%struct._AES_XCBC_specific_fields = type { ptr, ptr, ptr }
%union.anon.5 = type { %struct._CBCS_specific_fields }
%struct._CBCS_specific_fields = type { ptr }

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

declare i32 @imb_get_errno(ptr noundef) #1

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

; Function Attrs: nounwind uwtable
define dso_local i32 @submit_aes_cbc_enc_jobs(ptr noundef %0, ptr noundef %1, ptr noundef %2, i64 noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, i64 noundef %8) #2 {
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i64, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  %21 = alloca i32, align 4
  %22 = alloca ptr, align 8
  %23 = alloca ptr, align 8
  store ptr %0, ptr %11, align 8, !tbaa !5
  store ptr %1, ptr %12, align 8, !tbaa !5
  store ptr %2, ptr %13, align 8, !tbaa !5
  store i64 %3, ptr %14, align 8, !tbaa !9
  store ptr %4, ptr %15, align 8, !tbaa !5
  store ptr %5, ptr %16, align 8, !tbaa !5
  store ptr %6, ptr %17, align 8, !tbaa !5
  store ptr %7, ptr %18, align 8, !tbaa !5
  store i64 %8, ptr %19, align 8, !tbaa !9
  %24 = load ptr, ptr %11, align 8, !tbaa !5
  %25 = icmp eq ptr %24, null
  br i1 %25, label %47, label %26

26:                                               ; preds = %9
  %27 = load ptr, ptr %12, align 8, !tbaa !5
  %28 = icmp eq ptr %27, null
  br i1 %28, label %47, label %29

29:                                               ; preds = %26
  %30 = load ptr, ptr %13, align 8, !tbaa !5
  %31 = icmp eq ptr %30, null
  br i1 %31, label %47, label %32

32:                                               ; preds = %29
  %33 = load i64, ptr %14, align 8, !tbaa !9
  %34 = icmp eq i64 %33, 0
  br i1 %34, label %47, label %35

35:                                               ; preds = %32
  %36 = load ptr, ptr %15, align 8, !tbaa !5
  %37 = icmp eq ptr %36, null
  br i1 %37, label %47, label %38

38:                                               ; preds = %35
  %39 = load ptr, ptr %16, align 8, !tbaa !5
  %40 = icmp eq ptr %39, null
  br i1 %40, label %47, label %41

41:                                               ; preds = %38
  %42 = load ptr, ptr %17, align 8, !tbaa !5
  %43 = icmp eq ptr %42, null
  br i1 %43, label %47, label %44

44:                                               ; preds = %41
  %45 = load ptr, ptr %18, align 8, !tbaa !5
  %46 = icmp eq ptr %45, null
  br i1 %46, label %47, label %48

47:                                               ; preds = %44, %41, %38, %35, %32, %29, %26, %9
  store i32 -2, ptr %10, align 4
  br label %130

48:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #4
  store i64 0, ptr %20, align 8, !tbaa !9
  br label %49

49:                                               ; preds = %124, %48
  %50 = load i64, ptr %20, align 8, !tbaa !9
  %51 = load i64, ptr %14, align 8, !tbaa !9
  %52 = icmp ult i64 %50, %51
  br i1 %52, label %54, label %53

53:                                               ; preds = %49
  store i32 2, ptr %21, align 4
  br label %127

54:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #4
  %55 = load ptr, ptr %11, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.IMB_MGR, ptr %55, i32 0, i32 7
  %57 = load ptr, ptr %56, align 8, !tbaa !11
  %58 = load ptr, ptr %11, align 8, !tbaa !5
  %59 = call ptr %57(ptr noundef %58)
  store ptr %59, ptr %22, align 8, !tbaa !5
  %60 = load ptr, ptr %22, align 8, !tbaa !5
  call void @llvm.memset.p0.i64(ptr align 8 %60, i8 0, i64 216, i1 false)
  %61 = load ptr, ptr %22, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.IMB_JOB, ptr %61, i32 0, i32 16
  store i32 1, ptr %62, align 8, !tbaa !14
  %63 = load ptr, ptr %22, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.IMB_JOB, ptr %63, i32 0, i32 18
  store i32 1, ptr %64, align 8, !tbaa !16
  %65 = load ptr, ptr %12, align 8, !tbaa !5
  %66 = load i64, ptr %20, align 8, !tbaa !9
  %67 = getelementptr inbounds ptr, ptr %65, i64 %66
  %68 = load ptr, ptr %67, align 8, !tbaa !5
  %69 = load ptr, ptr %22, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.IMB_JOB, ptr %69, i32 0, i32 3
  store ptr %68, ptr %70, align 8, !tbaa !17
  %71 = load ptr, ptr %13, align 8, !tbaa !5
  %72 = load i64, ptr %20, align 8, !tbaa !9
  %73 = getelementptr inbounds ptr, ptr %71, i64 %72
  %74 = load ptr, ptr %73, align 8, !tbaa !5
  %75 = load ptr, ptr %22, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.IMB_JOB, ptr %75, i32 0, i32 4
  store ptr %74, ptr %76, align 8, !tbaa !17
  %77 = load ptr, ptr %22, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.IMB_JOB, ptr %77, i32 0, i32 15
  store i32 1, ptr %78, align 4, !tbaa !18
  %79 = load ptr, ptr %17, align 8, !tbaa !5
  %80 = load ptr, ptr %22, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.IMB_JOB, ptr %80, i32 0, i32 0
  store ptr %79, ptr %81, align 8, !tbaa !19
  %82 = load ptr, ptr %22, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.IMB_JOB, ptr %82, i32 0, i32 1
  store ptr null, ptr %83, align 8, !tbaa !20
  %84 = load ptr, ptr %22, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.IMB_JOB, ptr %84, i32 0, i32 2
  store i64 16, ptr %85, align 8, !tbaa !21
  %86 = load ptr, ptr %18, align 8, !tbaa !5
  %87 = load ptr, ptr %22, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.IMB_JOB, ptr %87, i32 0, i32 9
  store ptr %86, ptr %88, align 8, !tbaa !22
  %89 = load ptr, ptr %22, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.IMB_JOB, ptr %89, i32 0, i32 10
  store i64 16, ptr %90, align 8, !tbaa !23
  %91 = load ptr, ptr %22, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.IMB_JOB, ptr %91, i32 0, i32 5
  store i64 0, ptr %92, align 8, !tbaa !17
  %93 = load i64, ptr %19, align 8, !tbaa !9
  %94 = load ptr, ptr %22, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.IMB_JOB, ptr %94, i32 0, i32 6
  store i64 %93, ptr %95, align 8, !tbaa !17
  %96 = load ptr, ptr %22, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.IMB_JOB, ptr %96, i32 0, i32 17
  store i32 8, ptr %97, align 4, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #4
  %98 = load ptr, ptr %11, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.IMB_MGR, ptr %98, i32 0, i32 8
  %100 = load ptr, ptr %99, align 8, !tbaa !25
  %101 = load ptr, ptr %11, align 8, !tbaa !5
  %102 = call ptr %100(ptr noundef %101)
  store ptr %102, ptr %23, align 8, !tbaa !5
  %103 = load ptr, ptr %11, align 8, !tbaa !5
  %104 = call i32 @imb_get_errno(ptr noundef %103)
  %105 = icmp eq i32 %104, 0
  br i1 %105, label %106, label %111

106:                                              ; preds = %54
  %107 = load ptr, ptr %16, align 8, !tbaa !5
  %108 = load i32, ptr %107, align 4, !tbaa !26
  %109 = add i32 %108, 1
  %110 = load ptr, ptr %16, align 8, !tbaa !5
  store i32 %109, ptr %110, align 4, !tbaa !26
  br label %112

111:                                              ; preds = %54
  store i32 -1, ptr %10, align 4
  store i32 1, ptr %21, align 4
  br label %121

112:                                              ; preds = %106
  %113 = load ptr, ptr %23, align 8, !tbaa !5
  %114 = icmp ne ptr %113, null
  br i1 %114, label %115, label %120

115:                                              ; preds = %112
  %116 = load ptr, ptr %15, align 8, !tbaa !5
  %117 = load i32, ptr %116, align 4, !tbaa !26
  %118 = add i32 %117, 1
  %119 = load ptr, ptr %15, align 8, !tbaa !5
  store i32 %118, ptr %119, align 4, !tbaa !26
  br label %120

120:                                              ; preds = %115, %112
  store i32 0, ptr %21, align 4
  br label %121

121:                                              ; preds = %120, %111
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #4
  %122 = load i32, ptr %21, align 4
  switch i32 %122, label %127 [
    i32 0, label %123
  ]

123:                                              ; preds = %121
  br label %124

124:                                              ; preds = %123
  %125 = load i64, ptr %20, align 8, !tbaa !9
  %126 = add i64 %125, 1
  store i64 %126, ptr %20, align 8, !tbaa !9
  br label %49, !llvm.loop !27

127:                                              ; preds = %121, %53
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  %128 = load i32, ptr %21, align 4
  switch i32 %128, label %132 [
    i32 2, label %129
    i32 1, label %130
  ]

129:                                              ; preds = %127
  store i32 0, ptr %10, align 4
  br label %130

130:                                              ; preds = %129, %127, %47
  %131 = load i32, ptr %10, align 4
  ret i32 %131

132:                                              ; preds = %127
  unreachable
}

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { 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 = !{!"long", !7, i64 0}
!11 = !{!12, !6, i64 64}
!12 = !{!"IMB_MGR", !10, i64 0, !10, i64 8, !7, i64 16, !7, i64 48, !7, i64 55, !13, i64 56, !13, 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, !13, i64 1104, !13, 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 = !{!"int", !7, i64 0}
!14 = !{!15, !13, i64 136}
!15 = !{!"IMB_JOB", !6, i64 0, !6, i64 8, !10, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !10, i64 56, !7, i64 64, !6, i64 72, !10, i64 80, !6, i64 88, !10, i64 96, !7, i64 104, !13, i64 128, !13, i64 132, !13, i64 136, !13, i64 140, !13, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !13, i64 184, !7, i64 192, !7, i64 200, !13, i64 208}
!16 = !{!15, !13, i64 144}
!17 = !{!7, !7, i64 0}
!18 = !{!15, !13, i64 132}
!19 = !{!15, !6, i64 0}
!20 = !{!15, !6, i64 8}
!21 = !{!15, !10, i64 16}
!22 = !{!15, !6, i64 72}
!23 = !{!15, !10, i64 80}
!24 = !{!15, !13, i64 140}
!25 = !{!12, !6, i64 72}
!26 = !{!13, !13, i64 0}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}


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

declare i32 @imb_get_errno(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local i32 @submit_aes_cbc_enc_jobs(ptr noundef %0, ptr noundef readonly %1, ptr noundef readonly %2, i64 noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, i64 noundef %8) local_unnamed_addr #1 {
  %10 = insertelement <4 x ptr> poison, ptr %0, i64 0
  %11 = insertelement <4 x ptr> %10, ptr %1, i64 1
  %12 = insertelement <4 x ptr> %11, ptr %2, i64 2
  %13 = insertelement <4 x ptr> %12, ptr %4, i64 3
  %14 = icmp eq <4 x ptr> %13, zeroinitializer
  %15 = icmp eq i64 %3, 0
  %16 = icmp eq ptr %5, null
  %17 = icmp eq ptr %6, null
  %18 = icmp eq ptr %7, null
  %19 = bitcast <4 x i1> %14 to i4
  %20 = icmp ne i4 %19, 0
  %op.rdx = or i1 %20, %16
  %op.rdx64 = or i1 %17, %18
  %op.rdx65 = or i1 %op.rdx, %op.rdx64
  %op.rdx66 = or i1 %op.rdx65, %15
  br i1 %op.rdx66, label %51, label %.preheader

.preheader:                                       ; preds = %9
  %21 = getelementptr inbounds i8, ptr %0, i64 64
  %22 = getelementptr inbounds i8, ptr %0, i64 72
  br label %23

23:                                               ; preds = %.preheader, %49
  %.not6163 = phi i1 [ true, %.preheader ], [ %.not61, %49 ]
  %.05762 = phi i64 [ 0, %.preheader ], [ %50, %49 ]
  %24 = load ptr, ptr %21, align 8, !tbaa !5
  %25 = tail call ptr %24(ptr noundef %0) #3
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(216) %25, i8 0, i64 216, i1 false)
  %26 = getelementptr inbounds ptr, ptr %1, i64 %.05762
  %27 = load ptr, ptr %26, align 8, !tbaa !12
  %28 = getelementptr inbounds i8, ptr %25, i64 24
  store ptr %27, ptr %28, align 8, !tbaa !13
  %29 = getelementptr inbounds ptr, ptr %2, i64 %.05762
  %30 = load ptr, ptr %29, align 8, !tbaa !12
  %31 = getelementptr inbounds i8, ptr %25, i64 32
  store ptr %30, ptr %31, align 8, !tbaa !13
  %32 = getelementptr inbounds i8, ptr %25, i64 132
  store ptr %6, ptr %25, align 8, !tbaa !14
  %33 = getelementptr inbounds i8, ptr %25, i64 8
  store ptr null, ptr %33, align 8, !tbaa !16
  %34 = getelementptr inbounds i8, ptr %25, i64 16
  store i64 16, ptr %34, align 8, !tbaa !17
  %35 = getelementptr inbounds i8, ptr %25, i64 72
  store ptr %7, ptr %35, align 8, !tbaa !18
  %36 = getelementptr inbounds i8, ptr %25, i64 80
  store i64 16, ptr %36, align 8, !tbaa !19
  %37 = getelementptr inbounds i8, ptr %25, i64 40
  store i64 0, ptr %37, align 8, !tbaa !13
  %38 = getelementptr inbounds i8, ptr %25, i64 48
  store i64 %8, ptr %38, align 8, !tbaa !13
  store <4 x i32> <i32 1, i32 1, i32 8, i32 1>, ptr %32, align 4, !tbaa !20
  %39 = load ptr, ptr %22, align 8, !tbaa !21
  %40 = tail call ptr %39(ptr noundef %0) #3
  %41 = tail call i32 @imb_get_errno(ptr noundef %0) #3
  %42 = icmp eq i32 %41, 0
  br i1 %42, label %43, label %.critedge

43:                                               ; preds = %23
  %44 = load i32, ptr %5, align 4, !tbaa !20
  %45 = add i32 %44, 1
  store i32 %45, ptr %5, align 4, !tbaa !20
  %.not = icmp eq ptr %40, null
  br i1 %.not, label %49, label %46

46:                                               ; preds = %43
  %47 = load i32, ptr %4, align 4, !tbaa !20
  %48 = add i32 %47, 1
  store i32 %48, ptr %4, align 4, !tbaa !20
  br label %49

49:                                               ; preds = %46, %43
  %50 = add nuw i64 %.05762, 1
  %.not61 = icmp ult i64 %50, %3
  %exitcond.not = icmp eq i64 %50, %3
  br i1 %exitcond.not, label %.critedge, label %23, !llvm.loop !22

.critedge:                                        ; preds = %23, %49
  %.not61.lcssa = phi i1 [ %.not6163, %23 ], [ %.not61, %49 ]
  %spec.select = sext i1 %.not61.lcssa to i32
  br label %51

51:                                               ; preds = %.critedge, %9
  %.3 = phi i32 [ -2, %9 ], [ %spec.select, %.critedge ]
  ret i32 %.3
}

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

attributes #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 = { 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 #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { 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 64}
!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 = !{!11, !11, i64 0}
!13 = !{!8, !8, i64 0}
!14 = !{!15, !11, i64 0}
!15 = !{!"IMB_JOB", !11, i64 0, !11, i64 8, !7, i64 16, !8, i64 24, !8, i64 32, !8, i64 40, !8, i64 48, !7, i64 56, !8, i64 64, !11, i64 72, !7, i64 80, !11, i64 88, !7, i64 96, !8, i64 104, !10, i64 128, !10, i64 132, !10, i64 136, !10, i64 140, !10, i64 144, !11, i64 152, !11, i64 160, !11, i64 168, !11, i64 176, !10, i64 184, !8, i64 192, !8, i64 200, !10, i64 208}
!16 = !{!15, !11, i64 8}
!17 = !{!15, !7, i64 16}
!18 = !{!15, !11, i64 72}
!19 = !{!15, !7, i64 80}
!20 = !{!10, !10, i64 0}
!21 = !{!6, !11, i64 72}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalDCEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,PostOrderFunctionAttrsPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass