; LLVM IR from intel/intel-ipsec-mb :: examples/sb-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.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 }

@.str = external hidden unnamed_addr constant [22 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [27 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @main(i32 noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca [64 x i8], align 16
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  %14 = load i32, ptr %4, align 4, !tbaa !5
  %15 = icmp ne i32 %14, 2
  br i1 %15, label %16, label %22

16:                                               ; preds = %2
  %17 = load ptr, ptr %5, align 8, !tbaa !9
  %18 = getelementptr inbounds ptr, ptr %17, i64 0
  %19 = load ptr, ptr %18, align 8, !tbaa !9
  %20 = call i32 (ptr, ...) @printf(ptr noundef @.str, ptr noundef %19)
  %21 = call i32 (ptr, ...) @printf(ptr noundef @.str.1)
  store i32 1, ptr %3, align 4
  br label %126

22:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  store ptr null, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 1, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %23 = load ptr, ptr %5, align 8, !tbaa !9
  %24 = getelementptr inbounds ptr, ptr %23, i64 1
  %25 = load ptr, ptr %24, align 8, !tbaa !9
  store ptr %25, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %26 = call noalias ptr @malloc(i64 noundef 16384) #7
  store ptr %26, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 64, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 10000, ptr %11, align 4, !tbaa !5
  %27 = load ptr, ptr %9, align 8, !tbaa !9
  %28 = icmp eq ptr %27, null
  br i1 %28, label %29, label %31

29:                                               ; preds = %22
  %30 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  br label %121

31:                                               ; preds = %22
  %32 = call ptr @alloc_mb_mgr(i64 noundef 0)
  store ptr %32, ptr %6, align 8, !tbaa !9
  %33 = load ptr, ptr %6, align 8, !tbaa !9
  %34 = icmp eq ptr %33, null
  br i1 %34, label %35, label %37

35:                                               ; preds = %31
  %36 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  br label %121

37:                                               ; preds = %31
  %38 = load ptr, ptr %9, align 8, !tbaa !9
  call void @fill_buffer(ptr noundef %38)
  %39 = load ptr, ptr %6, align 8, !tbaa !9
  call void @init_mb_mgr_auto(ptr noundef %39, ptr noundef null)
  %40 = load ptr, ptr %8, align 8, !tbaa !9
  %41 = call i32 (ptr, ...) @printf(ptr noundef @.str.4, ptr noundef %40, i32 noundef 16384, i64 noundef 10000)
  br label %42

42:                                               ; preds = %118, %37
  %43 = load i32, ptr %11, align 4, !tbaa !5
  %44 = icmp ne i32 %43, 0
  br i1 %44, label %45, label %119

45:                                               ; preds = %42
  %46 = load ptr, ptr %8, align 8, !tbaa !9
  %47 = call i32 @strcasecmp(ptr noundef %46, ptr noundef @.str.5) #8
  %48 = icmp eq i32 %47, 0
  br i1 %48, label %49, label %55

49:                                               ; preds = %45
  %50 = load ptr, ptr %6, align 8, !tbaa !9
  %51 = getelementptr inbounds %struct.IMB_MGR, ptr %50, i32 0, i32 25
  %52 = load ptr, ptr %51, align 8, !tbaa !11
  %53 = load ptr, ptr %9, align 8, !tbaa !9
  %54 = getelementptr inbounds [64 x i8], ptr %10, i64 0, i64 0
  call void %52(ptr noundef %53, i64 noundef 16384, ptr noundef %54)
  br label %102

55:                                               ; preds = %45
  %56 = load ptr, ptr %8, align 8, !tbaa !9
  %57 = call i32 @strcasecmp(ptr noundef %56, ptr noundef @.str.6) #8
  %58 = icmp eq i32 %57, 0
  br i1 %58, label %59, label %65

59:                                               ; preds = %55
  %60 = load ptr, ptr %6, align 8, !tbaa !9
  %61 = getelementptr inbounds %struct.IMB_MGR, ptr %60, i32 0, i32 26
  %62 = load ptr, ptr %61, align 8, !tbaa !14
  %63 = load ptr, ptr %9, align 8, !tbaa !9
  %64 = getelementptr inbounds [64 x i8], ptr %10, i64 0, i64 0
  call void %62(ptr noundef %63, i64 noundef 16384, ptr noundef %64)
  br label %101

65:                                               ; preds = %55
  %66 = load ptr, ptr %8, align 8, !tbaa !9
  %67 = call i32 @strcasecmp(ptr noundef %66, ptr noundef @.str.7) #8
  %68 = icmp eq i32 %67, 0
  br i1 %68, label %69, label %75

69:                                               ; preds = %65
  %70 = load ptr, ptr %6, align 8, !tbaa !9
  %71 = getelementptr inbounds %struct.IMB_MGR, ptr %70, i32 0, i32 27
  %72 = load ptr, ptr %71, align 8, !tbaa !15
  %73 = load ptr, ptr %9, align 8, !tbaa !9
  %74 = getelementptr inbounds [64 x i8], ptr %10, i64 0, i64 0
  call void %72(ptr noundef %73, i64 noundef 16384, ptr noundef %74)
  br label %100

75:                                               ; preds = %65
  %76 = load ptr, ptr %8, align 8, !tbaa !9
  %77 = call i32 @strcasecmp(ptr noundef %76, ptr noundef @.str.8) #8
  %78 = icmp eq i32 %77, 0
  br i1 %78, label %79, label %85

79:                                               ; preds = %75
  %80 = load ptr, ptr %6, align 8, !tbaa !9
  %81 = getelementptr inbounds %struct.IMB_MGR, ptr %80, i32 0, i32 28
  %82 = load ptr, ptr %81, align 8, !tbaa !16
  %83 = load ptr, ptr %9, align 8, !tbaa !9
  %84 = getelementptr inbounds [64 x i8], ptr %10, i64 0, i64 0
  call void %82(ptr noundef %83, i64 noundef 16384, ptr noundef %84)
  br label %99

85:                                               ; preds = %75
  %86 = load ptr, ptr %8, align 8, !tbaa !9
  %87 = call i32 @strcasecmp(ptr noundef %86, ptr noundef @.str.9) #8
  %88 = icmp eq i32 %87, 0
  br i1 %88, label %89, label %95

89:                                               ; preds = %85
  %90 = load ptr, ptr %6, align 8, !tbaa !9
  %91 = getelementptr inbounds %struct.IMB_MGR, ptr %90, i32 0, i32 29
  %92 = load ptr, ptr %91, align 8, !tbaa !17
  %93 = load ptr, ptr %9, align 8, !tbaa !9
  %94 = getelementptr inbounds [64 x i8], ptr %10, i64 0, i64 0
  call void %92(ptr noundef %93, i64 noundef 16384, ptr noundef %94)
  br label %98

95:                                               ; preds = %85
  %96 = load ptr, ptr %8, align 8, !tbaa !9
  %97 = call i32 (ptr, ...) @printf(ptr noundef @.str.10, ptr noundef %96)
  br label %121

98:                                               ; preds = %89
  br label %99

99:                                               ; preds = %98, %79
  br label %100

100:                                              ; preds = %99, %69
  br label %101

101:                                              ; preds = %100, %59
  br label %102

102:                                              ; preds = %101, %49
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  %103 = load ptr, ptr %6, align 8, !tbaa !9
  %104 = call i32 @imb_get_errno(ptr noundef %103)
  store i32 %104, ptr %12, align 4, !tbaa !5
  %105 = load i32, ptr %12, align 4, !tbaa !5
  %106 = icmp ne i32 %105, 0
  br i1 %106, label %107, label %112

107:                                              ; preds = %102
  %108 = load i32, ptr %12, align 4, !tbaa !5
  %109 = load i32, ptr %12, align 4, !tbaa !5
  %110 = call ptr @imb_get_strerror(i32 noundef %109)
  %111 = call i32 (ptr, ...) @printf(ptr noundef @.str.11, i32 noundef %108, ptr noundef %110)
  store i32 2, ptr %13, align 4
  br label %116

112:                                              ; preds = %102
  %113 = load i32, ptr %11, align 4, !tbaa !5
  %114 = add i32 %113, -1
  store i32 %114, ptr %11, align 4, !tbaa !5
  br label %115

115:                                              ; preds = %112
  store i32 0, ptr %13, align 4
  br label %116

116:                                              ; preds = %115, %107
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  %117 = load i32, ptr %13, align 4
  switch i32 %117, label %125 [
    i32 0, label %118
    i32 2, label %121
  ]

118:                                              ; preds = %116
  br label %42, !llvm.loop !18

119:                                              ; preds = %42
  store i32 0, ptr %7, align 4, !tbaa !5
  %120 = call i32 (ptr, ...) @printf(ptr noundef @.str.12)
  br label %121

121:                                              ; preds = %119, %116, %95, %35, %29
  %122 = load ptr, ptr %9, align 8, !tbaa !9
  call void @free(ptr noundef %122) #6
  %123 = load ptr, ptr %6, align 8, !tbaa !9
  call void @free_mb_mgr(ptr noundef %123)
  %124 = load i32, ptr %7, align 4, !tbaa !5
  store i32 %124, ptr %3, align 4
  store i32 1, ptr %13, align 4
  br label %125

125:                                              ; preds = %121, %116
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 64, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  br label %126

126:                                              ; preds = %125, %16
  %127 = load i32, ptr %3, align 4
  ret i32 %127
}

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

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

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #3

declare ptr @alloc_mb_mgr(i64 noundef) #1

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

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

; Function Attrs: nounwind willreturn memory(read)
declare i32 @strcasecmp(ptr noundef, ptr noundef) #4

declare i32 @imb_get_errno(ptr noundef) #1

declare ptr @imb_get_strerror(i32 noundef) #1

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

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

declare void @free_mb_mgr(ptr noundef) #1

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { "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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nounwind allocsize(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 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 #5 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }
attributes #7 = { nounwind allocsize(0) }
attributes #8 = { nounwind willreturn memory(read) }

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

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

@.str = external hidden unnamed_addr constant [22 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [27 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @main(i32 noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #0 {
  %3 = alloca [64 x i8], align 16
  %.not = icmp eq i32 %0, 2
  br i1 %.not, label %8, label %4

4:                                                ; preds = %2
  %5 = load ptr, ptr %1, align 8, !tbaa !5
  %6 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, ptr noundef %5)
  %7 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1)
  br label %54

8:                                                ; preds = %2
  %9 = getelementptr inbounds i8, ptr %1, i64 8
  %10 = load ptr, ptr %9, align 8, !tbaa !5
  %11 = tail call noalias dereferenceable_or_null(16384) ptr @malloc(i64 noundef 16384) #7
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %3) #8
  %12 = icmp eq ptr %11, null
  br i1 %12, label %13, label %15

13:                                               ; preds = %8
  %14 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  br label %53

15:                                               ; preds = %8
  %16 = tail call ptr @alloc_mb_mgr(i64 noundef 0) #8
  %17 = icmp eq ptr %16, null
  br i1 %17, label %18, label %20

18:                                               ; preds = %15
  %19 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3)
  br label %53

20:                                               ; preds = %15
  tail call void @fill_buffer(ptr noundef nonnull %11)
  tail call void @init_mb_mgr_auto(ptr noundef nonnull %16, ptr noundef null) #8
  %21 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, ptr noundef %10, i32 noundef 16384, i64 noundef 10000)
  %22 = getelementptr inbounds i8, ptr %16, i64 240
  %23 = getelementptr inbounds i8, ptr %16, i64 232
  %24 = getelementptr inbounds i8, ptr %16, i64 224
  %25 = getelementptr inbounds i8, ptr %16, i64 216
  %26 = getelementptr inbounds i8, ptr %16, i64 208
  br label %29

27:                                               ; preds = %46
  %28 = add nsw i32 %.03549, -1
  %.not43 = icmp eq i32 %28, 0
  br i1 %.not43, label %51, label %29

29:                                               ; preds = %20, %27
  %.03549 = phi i32 [ 10000, %20 ], [ %28, %27 ]
  %30 = call i32 @strcasecmp(ptr noundef %10, ptr noundef nonnull @.str.5) #9
  %31 = icmp eq i32 %30, 0
  br i1 %31, label %46, label %32

32:                                               ; preds = %29
  %33 = call i32 @strcasecmp(ptr noundef %10, ptr noundef nonnull @.str.6) #9
  %34 = icmp eq i32 %33, 0
  br i1 %34, label %46, label %35

35:                                               ; preds = %32
  %36 = call i32 @strcasecmp(ptr noundef %10, ptr noundef nonnull @.str.7) #9
  %37 = icmp eq i32 %36, 0
  br i1 %37, label %46, label %38

38:                                               ; preds = %35
  %39 = call i32 @strcasecmp(ptr noundef %10, ptr noundef nonnull @.str.8) #9
  %40 = icmp eq i32 %39, 0
  br i1 %40, label %46, label %41

41:                                               ; preds = %38
  %42 = call i32 @strcasecmp(ptr noundef %10, ptr noundef nonnull @.str.9) #9
  %43 = icmp eq i32 %42, 0
  br i1 %43, label %46, label %44

44:                                               ; preds = %41
  %45 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10, ptr noundef %10)
  br label %53

46:                                               ; preds = %41, %38, %35, %32, %29
  %.sink52 = phi ptr [ %26, %29 ], [ %25, %32 ], [ %24, %35 ], [ %23, %38 ], [ %22, %41 ]
  %47 = load ptr, ptr %.sink52, align 8, !tbaa !5
  call void %47(ptr noundef nonnull %11, i64 noundef 16384, ptr noundef nonnull %3) #8
  %48 = call i32 @imb_get_errno(ptr noundef nonnull %16) #8
  %.not44 = icmp eq i32 %48, 0
  br i1 %.not44, label %27, label %.thread

.thread:                                          ; preds = %46
  %49 = call ptr @imb_get_strerror(i32 noundef %48) #8
  %50 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11, i32 noundef %48, ptr noundef %49)
  br label %53

51:                                               ; preds = %27
  %52 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.12)
  br label %53

53:                                               ; preds = %.thread, %51, %44, %18, %13
  %.038 = phi i32 [ 1, %13 ], [ 1, %18 ], [ 1, %44 ], [ 0, %51 ], [ 1, %.thread ]
  %.037 = phi ptr [ null, %13 ], [ null, %18 ], [ %16, %44 ], [ %16, %51 ], [ %16, %.thread ]
  call void @free(ptr noundef %11) #8
  call void @free_mb_mgr(ptr noundef %.037) #8
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %3) #8
  br label %54

54:                                               ; preds = %53, %4
  %.1 = phi i32 [ 1, %4 ], [ %.038, %53 ]
  ret i32 %.1
}

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

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

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #3

declare ptr @alloc_mb_mgr(i64 noundef) local_unnamed_addr #4

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

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(read)
declare i32 @strcasecmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #5

declare i32 @imb_get_errno(ptr noundef) local_unnamed_addr #4

declare ptr @imb_get_strerror(i32 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) #2

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

declare void @free_mb_mgr(ptr noundef) local_unnamed_addr #4

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 = { 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(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 #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 nofree 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 #6 = { 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 #7 = { nounwind allocsize(0) }
attributes #8 = { nounwind }
attributes #9 = { nounwind willreturn memory(read) }

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

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


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