; LLVM IR from mlcommons/tiny :: benchmark/interface/Middlewares/ST/filex/common/src/fx_directory_short_name_ge_39316a55 (extended)

; 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.FX_DIR_ENTRY_STRUCT = type { ptr, [13 x i8], i32, i32, i8, i8, i8, i32, i32, i32, i32, i32, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64 }
%struct.FX_MEDIA_STRUCT = type { i64, ptr, ptr, i64, i32, i64, ptr, ptr, i64, i64, i32, i32, i32, i64, i64, i32, i32, i32, i32, i32, i32, i32, i32, i32, i64, i32, i64, i64, i32, i64, i64, ptr, i32, i32, ptr, i64, i64, i64, i32, i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, i64, ptr, ptr, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, %struct.TX_MUTEX_STRUCT, i32, %struct.FX_DIR_ENTRY_STRUCT, %struct.FX_DIR_ENTRY_STRUCT, [256 x i8], [256 x i8], %struct.FX_PATH_STRUCT, [16 x %struct.FX_FAT_CACHE_ENTRY_STRUCT], [128 x i8], i64, [1024 x i8], [256 x %struct.FX_CACHED_SECTOR_STRUCT], i64, i64, i64, i64, i8 }
%struct.TX_MUTEX_STRUCT = type { i64, ptr, i32, ptr, i32, i32, ptr, i32, ptr, ptr, i32, ptr, ptr }
%struct.FX_PATH_STRUCT = type { %struct.FX_DIR_ENTRY_STRUCT, [256 x i8], [256 x i8], i64 }
%struct.FX_FAT_CACHE_ENTRY_STRUCT = type { i64, i64, i64 }
%struct.FX_CACHED_SECTOR_STRUCT = type { ptr, i64, i8, i8, i8, i8, ptr }

; Function Attrs: nounwind uwtable
define dso_local i32 @_fx_directory_short_name_get_extended(ptr noundef %0, ptr noundef %1, ptr noundef %2, i32 noundef %3) #0 {
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca %struct.FX_DIR_ENTRY_STRUCT, align 8
  %13 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store i32 %3, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 136, ptr %12) #3
  %14 = load ptr, ptr %6, align 8, !tbaa !5
  %15 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %14, i32 0, i32 122
  %16 = getelementptr inbounds [1024 x i8], ptr %15, i64 0, i64 0
  %17 = getelementptr inbounds i8, ptr %16, i64 256
  %18 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %12, i32 0, i32 0
  store ptr %17, ptr %18, align 8, !tbaa !11
  %19 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %12, i32 0, i32 1
  %20 = getelementptr inbounds [13 x i8], ptr %19, i64 0, i64 0
  store i8 0, ptr %20, align 8, !tbaa !15
  %21 = load ptr, ptr %6, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %21, i32 0, i32 0
  %23 = load i64, ptr %22, align 8, !tbaa !16
  %24 = icmp ne i64 %23, 1296385097
  br i1 %24, label %25, label %26

25:                                               ; preds = %4
  store i32 17, ptr %5, align 4
  store i32 1, ptr %13, align 4
  br label %157

26:                                               ; preds = %4
  %27 = load ptr, ptr %6, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %27, i32 0, i32 112
  %29 = call i32 @_tx_mutex_get(ptr noundef %28, i64 noundef 4294967295)
  %30 = icmp ne i32 %29, 0
  br i1 %30, label %31, label %32

31:                                               ; preds = %26
  store i32 17, ptr %5, align 4
  store i32 1, ptr %13, align 4
  br label %157

32:                                               ; preds = %26
  br label %33

33:                                               ; preds = %32
  %34 = load ptr, ptr %6, align 8, !tbaa !5
  %35 = load ptr, ptr %7, align 8, !tbaa !5
  %36 = call i32 @_fx_directory_search(ptr noundef %34, ptr noundef %35, ptr noundef %12, ptr noundef null, ptr noundef null)
  store i32 %36, ptr %10, align 4, !tbaa !9
  %37 = load i32, ptr %10, align 4, !tbaa !9
  %38 = icmp ne i32 %37, 0
  br i1 %38, label %39, label %44

39:                                               ; preds = %33
  %40 = load ptr, ptr %6, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %40, i32 0, i32 112
  %42 = call i32 @_tx_mutex_put(ptr noundef %41)
  %43 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %43, ptr %5, align 4
  store i32 1, ptr %13, align 4
  br label %157

44:                                               ; preds = %33
  %45 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %12, i32 0, i32 1
  %46 = getelementptr inbounds [13 x i8], ptr %45, i64 0, i64 0
  %47 = load i8, ptr %46, align 8, !tbaa !15
  %48 = icmp ne i8 %47, 0
  br i1 %48, label %49, label %99

49:                                               ; preds = %44
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %50

50:                                               ; preds = %68, %49
  %51 = load i32, ptr %11, align 4, !tbaa !9
  %52 = icmp ult i32 %51, 12
  br i1 %52, label %53, label %66

53:                                               ; preds = %50
  %54 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %12, i32 0, i32 1
  %55 = load i32, ptr %11, align 4, !tbaa !9
  %56 = zext i32 %55 to i64
  %57 = getelementptr inbounds [13 x i8], ptr %54, i64 0, i64 %56
  %58 = load i8, ptr %57, align 1, !tbaa !15
  %59 = sext i8 %58 to i32
  %60 = icmp ne i32 %59, 0
  br i1 %60, label %61, label %66

61:                                               ; preds = %53
  %62 = load i32, ptr %11, align 4, !tbaa !9
  %63 = load i32, ptr %9, align 4, !tbaa !9
  %64 = sub i32 %63, 1
  %65 = icmp ult i32 %62, %64
  br label %66

66:                                               ; preds = %61, %53, %50
  %67 = phi i1 [ false, %53 ], [ false, %50 ], [ %65, %61 ]
  br i1 %67, label %68, label %80

68:                                               ; preds = %66
  %69 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %12, i32 0, i32 1
  %70 = load i32, ptr %11, align 4, !tbaa !9
  %71 = zext i32 %70 to i64
  %72 = getelementptr inbounds [13 x i8], ptr %69, i64 0, i64 %71
  %73 = load i8, ptr %72, align 1, !tbaa !15
  %74 = load ptr, ptr %8, align 8, !tbaa !5
  %75 = load i32, ptr %11, align 4, !tbaa !9
  %76 = zext i32 %75 to i64
  %77 = getelementptr inbounds i8, ptr %74, i64 %76
  store i8 %73, ptr %77, align 1, !tbaa !15
  %78 = load i32, ptr %11, align 4, !tbaa !9
  %79 = add i32 %78, 1
  store i32 %79, ptr %11, align 4, !tbaa !9
  br label %50, !llvm.loop !20

80:                                               ; preds = %66
  %81 = load ptr, ptr %8, align 8, !tbaa !5
  %82 = load i32, ptr %11, align 4, !tbaa !9
  %83 = zext i32 %82 to i64
  %84 = getelementptr inbounds i8, ptr %81, i64 %83
  store i8 0, ptr %84, align 1, !tbaa !15
  %85 = load i32, ptr %11, align 4, !tbaa !9
  %86 = load i32, ptr %9, align 4, !tbaa !9
  %87 = sub i32 %86, 1
  %88 = icmp eq i32 %85, %87
  br i1 %88, label %89, label %98

89:                                               ; preds = %80
  %90 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %12, i32 0, i32 1
  %91 = load i32, ptr %11, align 4, !tbaa !9
  %92 = zext i32 %91 to i64
  %93 = getelementptr inbounds [13 x i8], ptr %90, i64 0, i64 %92
  %94 = load i8, ptr %93, align 1, !tbaa !15
  %95 = sext i8 %94 to i32
  %96 = icmp ne i32 %95, 0
  br i1 %96, label %97, label %98

97:                                               ; preds = %89
  store i32 33, ptr %10, align 4, !tbaa !9
  br label %98

98:                                               ; preds = %97, %89, %80
  br label %152

99:                                               ; preds = %44
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %100

100:                                              ; preds = %119, %99
  %101 = load i32, ptr %11, align 4, !tbaa !9
  %102 = icmp ult i32 %101, 12
  br i1 %102, label %103, label %117

103:                                              ; preds = %100
  %104 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %12, i32 0, i32 0
  %105 = load ptr, ptr %104, align 8, !tbaa !11
  %106 = load i32, ptr %11, align 4, !tbaa !9
  %107 = zext i32 %106 to i64
  %108 = getelementptr inbounds i8, ptr %105, i64 %107
  %109 = load i8, ptr %108, align 1, !tbaa !15
  %110 = sext i8 %109 to i32
  %111 = icmp ne i32 %110, 0
  br i1 %111, label %112, label %117

112:                                              ; preds = %103
  %113 = load i32, ptr %11, align 4, !tbaa !9
  %114 = load i32, ptr %9, align 4, !tbaa !9
  %115 = sub i32 %114, 1
  %116 = icmp ult i32 %113, %115
  br label %117

117:                                              ; preds = %112, %103, %100
  %118 = phi i1 [ false, %103 ], [ false, %100 ], [ %116, %112 ]
  br i1 %118, label %119, label %132

119:                                              ; preds = %117
  %120 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %12, i32 0, i32 0
  %121 = load ptr, ptr %120, align 8, !tbaa !11
  %122 = load i32, ptr %11, align 4, !tbaa !9
  %123 = zext i32 %122 to i64
  %124 = getelementptr inbounds i8, ptr %121, i64 %123
  %125 = load i8, ptr %124, align 1, !tbaa !15
  %126 = load ptr, ptr %8, align 8, !tbaa !5
  %127 = load i32, ptr %11, align 4, !tbaa !9
  %128 = zext i32 %127 to i64
  %129 = getelementptr inbounds i8, ptr %126, i64 %128
  store i8 %125, ptr %129, align 1, !tbaa !15
  %130 = load i32, ptr %11, align 4, !tbaa !9
  %131 = add i32 %130, 1
  store i32 %131, ptr %11, align 4, !tbaa !9
  br label %100, !llvm.loop !22

132:                                              ; preds = %117
  %133 = load ptr, ptr %8, align 8, !tbaa !5
  %134 = load i32, ptr %11, align 4, !tbaa !9
  %135 = zext i32 %134 to i64
  %136 = getelementptr inbounds i8, ptr %133, i64 %135
  store i8 0, ptr %136, align 1, !tbaa !15
  %137 = load i32, ptr %11, align 4, !tbaa !9
  %138 = load i32, ptr %9, align 4, !tbaa !9
  %139 = sub i32 %138, 1
  %140 = icmp eq i32 %137, %139
  br i1 %140, label %141, label %151

141:                                              ; preds = %132
  %142 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %12, i32 0, i32 0
  %143 = load ptr, ptr %142, align 8, !tbaa !11
  %144 = load i32, ptr %11, align 4, !tbaa !9
  %145 = zext i32 %144 to i64
  %146 = getelementptr inbounds i8, ptr %143, i64 %145
  %147 = load i8, ptr %146, align 1, !tbaa !15
  %148 = sext i8 %147 to i32
  %149 = icmp ne i32 %148, 0
  br i1 %149, label %150, label %151

150:                                              ; preds = %141
  store i32 33, ptr %10, align 4, !tbaa !9
  br label %151

151:                                              ; preds = %150, %141, %132
  br label %152

152:                                              ; preds = %151, %98
  %153 = load ptr, ptr %6, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %153, i32 0, i32 112
  %155 = call i32 @_tx_mutex_put(ptr noundef %154)
  %156 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %156, ptr %5, align 4
  store i32 1, ptr %13, align 4
  br label %157

157:                                              ; preds = %152, %39, %31, %25
  call void @llvm.lifetime.end.p0(i64 136, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  %158 = load i32, ptr %5, align 4
  ret i32 %158
}

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

declare i32 @_tx_mutex_get(ptr noundef, i64 noundef) #2

declare i32 @_fx_directory_search(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

declare i32 @_tx_mutex_put(ptr noundef) #2

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

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

!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 0}
!12 = !{!"FX_DIR_ENTRY_STRUCT", !6, i64 0, !7, i64 8, !10, i64 24, !10, i64 28, !7, i64 32, !7, i64 33, !7, i64 34, !10, i64 36, !10, i64 40, !10, i64 44, !10, i64 48, !10, i64 52, !13, i64 56, !14, i64 64, !14, i64 72, !13, i64 80, !13, i64 88, !13, i64 96, !13, i64 104, !14, i64 112, !13, i64 120, !14, i64 128}
!13 = !{!"long", !7, i64 0}
!14 = !{!"long long", !7, i64 0}
!15 = !{!7, !7, i64 0}
!16 = !{!17, !13, i64 0}
!17 = !{!"FX_MEDIA_STRUCT", !13, i64 0, !6, i64 8, !6, i64 16, !13, i64 24, !10, i64 32, !13, i64 40, !6, i64 48, !6, i64 56, !13, i64 64, !13, i64 72, !10, i64 80, !10, i64 84, !10, i64 88, !14, i64 96, !13, i64 104, !10, i64 112, !10, i64 116, !10, i64 120, !10, i64 124, !10, i64 128, !10, i64 132, !10, i64 136, !10, i64 140, !10, i64 144, !13, i64 152, !10, i64 160, !13, i64 168, !13, i64 176, !10, i64 184, !13, i64 192, !13, i64 200, !6, i64 208, !10, i64 216, !10, i64 220, !6, i64 224, !13, i64 232, !13, i64 240, !13, i64 248, !10, i64 256, !10, i64 260, !10, i64 264, !10, i64 268, !10, i64 272, !10, i64 276, !10, i64 280, !6, i64 288, !6, i64 296, !6, i64 304, !6, i64 312, !13, i64 320, !6, i64 328, !6, i64 336, !13, i64 344, !13, i64 352, !13, i64 360, !13, i64 368, !13, i64 376, !13, i64 384, !13, i64 392, !13, i64 400, !13, i64 408, !13, i64 416, !13, i64 424, !13, i64 432, !13, i64 440, !13, i64 448, !13, i64 456, !13, i64 464, !13, i64 472, !13, i64 480, !13, i64 488, !13, i64 496, !13, i64 504, !13, i64 512, !13, i64 520, !13, i64 528, !13, i64 536, !13, i64 544, !13, i64 552, !13, i64 560, !13, i64 568, !13, i64 576, !13, i64 584, !13, i64 592, !13, i64 600, !13, i64 608, !13, i64 616, !13, i64 624, !13, i64 632, !13, i64 640, !13, i64 648, !13, i64 656, !13, i64 664, !13, i64 672, !13, i64 680, !13, i64 688, !13, i64 696, !13, i64 704, !13, i64 712, !13, i64 720, !13, i64 728, !13, i64 736, !13, i64 744, !13, i64 752, !13, i64 760, !13, i64 768, !13, i64 776, !13, i64 784, !13, i64 792, !13, i64 800, !13, i64 808, !13, i64 816, !18, i64 824, !10, i64 920, !12, i64 928, !12, i64 1064, !7, i64 1200, !7, i64 1456, !19, i64 1712, !7, i64 2368, !7, i64 2752, !13, i64 2880, !7, i64 2888, !7, i64 3912, !13, i64 12104, !13, i64 12112, !13, i64 12120, !13, i64 12128, !7, i64 12136}
!18 = !{!"TX_MUTEX_STRUCT", !13, i64 0, !6, i64 8, !10, i64 16, !6, i64 24, !10, i64 32, !10, i64 36, !6, i64 40, !10, i64 48, !6, i64 56, !6, i64 64, !10, i64 72, !6, i64 80, !6, i64 88}
!19 = !{!"FX_PATH_STRUCT", !12, i64 0, !7, i64 136, !7, i64 392, !13, i64 648}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = distinct !{!22, !21}


; 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.FX_DIR_ENTRY_STRUCT = type { ptr, [13 x i8], i32, i32, i8, i8, i8, i32, i32, i32, i32, i32, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64 }

; Function Attrs: nounwind uwtable
define dso_local i32 @_fx_directory_short_name_get_extended(ptr noundef %0, ptr noundef %1, ptr nocapture noundef writeonly %2, i32 noundef %3) local_unnamed_addr #0 {
  %5 = alloca %struct.FX_DIR_ENTRY_STRUCT, align 8
  call void @llvm.lifetime.start.p0(i64 136, ptr nonnull %5) #3
  %6 = getelementptr inbounds i8, ptr %0, i64 3144
  store ptr %6, ptr %5, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %5, i64 8
  store i8 0, ptr %7, align 8, !tbaa !13
  %8 = load i64, ptr %0, align 8, !tbaa !14
  %.not = icmp eq i64 %8, 1296385097
  br i1 %.not, label %9, label %145

9:                                                ; preds = %4
  %10 = getelementptr inbounds i8, ptr %0, i64 824
  %11 = tail call i32 @_tx_mutex_get(ptr noundef nonnull %10, i64 noundef 4294967295) #3
  %.not42 = icmp eq i32 %11, 0
  br i1 %.not42, label %12, label %145

12:                                               ; preds = %9
  %13 = call i32 @_fx_directory_search(ptr noundef nonnull %0, ptr noundef %1, ptr noundef nonnull %5, ptr noundef null, ptr noundef null) #3
  %.not43 = icmp eq i32 %13, 0
  br i1 %.not43, label %14, label %.sink.split60

14:                                               ; preds = %12
  %15 = load i8, ptr %7, align 8, !tbaa !13
  %.not44 = icmp eq i8 %15, 0
  br i1 %.not44, label %.preheader, label %.preheader53

.preheader53:                                     ; preds = %14
  %16 = add i32 %3, -1
  %.not58 = icmp eq i32 %16, 0
  br i1 %.not58, label %.critedge, label %21

.preheader:                                       ; preds = %14
  %17 = load ptr, ptr %5, align 8, !tbaa !5
  %18 = add i32 %3, -1
  %19 = load i8, ptr %17, align 1, !tbaa !13
  %.not45 = icmp ne i8 %19, 0
  %20 = icmp ne i32 %18, 0
  %or.cond51 = and i1 %20, %.not45
  br i1 %or.cond51, label %82, label %.critedge2

21:                                               ; preds = %.preheader53
  store i8 %15, ptr %2, align 1, !tbaa !13
  %22 = getelementptr inbounds i8, ptr %5, i64 9
  %23 = load i8, ptr %22, align 1, !tbaa !13
  %.not47.1 = icmp ne i8 %23, 0
  %24 = icmp ne i32 %16, 1
  %or.cond.1 = and i1 %24, %.not47.1
  br i1 %or.cond.1, label %25, label %.critedge

25:                                               ; preds = %21
  %26 = getelementptr inbounds i8, ptr %2, i64 1
  store i8 %23, ptr %26, align 1, !tbaa !13
  %27 = getelementptr inbounds i8, ptr %5, i64 10
  %28 = load i8, ptr %27, align 2, !tbaa !13
  %.not47.2 = icmp ne i8 %28, 0
  %29 = icmp ugt i32 %16, 2
  %or.cond.2 = and i1 %29, %.not47.2
  br i1 %or.cond.2, label %30, label %.critedge

30:                                               ; preds = %25
  %31 = getelementptr inbounds i8, ptr %2, i64 2
  store i8 %28, ptr %31, align 1, !tbaa !13
  %32 = getelementptr inbounds i8, ptr %5, i64 11
  %33 = load i8, ptr %32, align 1, !tbaa !13
  %.not47.3 = icmp ne i8 %33, 0
  %34 = icmp ugt i32 %16, 3
  %or.cond.3 = and i1 %34, %.not47.3
  br i1 %or.cond.3, label %35, label %.critedge

35:                                               ; preds = %30
  %36 = getelementptr inbounds i8, ptr %2, i64 3
  store i8 %33, ptr %36, align 1, !tbaa !13
  %37 = getelementptr inbounds i8, ptr %5, i64 12
  %38 = load i8, ptr %37, align 4, !tbaa !13
  %.not47.4 = icmp ne i8 %38, 0
  %39 = icmp ugt i32 %16, 4
  %or.cond.4 = and i1 %39, %.not47.4
  br i1 %or.cond.4, label %40, label %.critedge

40:                                               ; preds = %35
  %41 = getelementptr inbounds i8, ptr %2, i64 4
  store i8 %38, ptr %41, align 1, !tbaa !13
  %42 = getelementptr inbounds i8, ptr %5, i64 13
  %43 = load i8, ptr %42, align 1, !tbaa !13
  %.not47.5 = icmp ne i8 %43, 0
  %44 = icmp ugt i32 %16, 5
  %or.cond.5 = and i1 %44, %.not47.5
  br i1 %or.cond.5, label %45, label %.critedge

45:                                               ; preds = %40
  %46 = getelementptr inbounds i8, ptr %2, i64 5
  store i8 %43, ptr %46, align 1, !tbaa !13
  %47 = getelementptr inbounds i8, ptr %5, i64 14
  %48 = load i8, ptr %47, align 2, !tbaa !13
  %.not47.6 = icmp ne i8 %48, 0
  %49 = icmp ugt i32 %16, 6
  %or.cond.6 = and i1 %49, %.not47.6
  br i1 %or.cond.6, label %50, label %.critedge

50:                                               ; preds = %45
  %51 = getelementptr inbounds i8, ptr %2, i64 6
  store i8 %48, ptr %51, align 1, !tbaa !13
  %52 = getelementptr inbounds i8, ptr %5, i64 15
  %53 = load i8, ptr %52, align 1, !tbaa !13
  %.not47.7 = icmp ne i8 %53, 0
  %54 = icmp ugt i32 %16, 7
  %or.cond.7 = and i1 %54, %.not47.7
  br i1 %or.cond.7, label %55, label %.critedge

55:                                               ; preds = %50
  %56 = getelementptr inbounds i8, ptr %2, i64 7
  store i8 %53, ptr %56, align 1, !tbaa !13
  %57 = getelementptr inbounds i8, ptr %5, i64 16
  %58 = load i8, ptr %57, align 8, !tbaa !13
  %.not47.8 = icmp ne i8 %58, 0
  %59 = icmp ugt i32 %16, 8
  %or.cond.8 = and i1 %59, %.not47.8
  br i1 %or.cond.8, label %60, label %.critedge

60:                                               ; preds = %55
  %61 = getelementptr inbounds i8, ptr %2, i64 8
  store i8 %58, ptr %61, align 1, !tbaa !13
  %62 = getelementptr inbounds i8, ptr %5, i64 17
  %63 = load i8, ptr %62, align 1, !tbaa !13
  %.not47.9 = icmp ne i8 %63, 0
  %64 = icmp ugt i32 %16, 9
  %or.cond.9 = and i1 %64, %.not47.9
  br i1 %or.cond.9, label %65, label %.critedge

65:                                               ; preds = %60
  %66 = getelementptr inbounds i8, ptr %2, i64 9
  store i8 %63, ptr %66, align 1, !tbaa !13
  %67 = getelementptr inbounds i8, ptr %5, i64 18
  %68 = load i8, ptr %67, align 2, !tbaa !13
  %.not47.10 = icmp ne i8 %68, 0
  %69 = icmp ugt i32 %16, 10
  %or.cond.10 = and i1 %69, %.not47.10
  br i1 %or.cond.10, label %70, label %.critedge

70:                                               ; preds = %65
  %71 = getelementptr inbounds i8, ptr %2, i64 10
  store i8 %68, ptr %71, align 1, !tbaa !13
  %72 = getelementptr inbounds i8, ptr %5, i64 19
  %73 = load i8, ptr %72, align 1, !tbaa !13
  %.not47.11 = icmp ne i8 %73, 0
  %74 = icmp ugt i32 %16, 11
  %or.cond.11 = and i1 %74, %.not47.11
  br i1 %or.cond.11, label %75, label %.critedge

75:                                               ; preds = %70
  %76 = getelementptr inbounds i8, ptr %2, i64 11
  store i8 %73, ptr %76, align 1, !tbaa !13
  br label %.critedge

.critedge:                                        ; preds = %75, %70, %65, %60, %55, %50, %45, %40, %35, %30, %25, %21, %.preheader53
  %.0.lcssa = phi i32 [ 0, %.preheader53 ], [ 1, %21 ], [ 2, %25 ], [ 3, %30 ], [ 4, %35 ], [ 5, %40 ], [ 6, %45 ], [ 7, %50 ], [ 8, %55 ], [ 9, %60 ], [ 10, %65 ], [ 11, %70 ], [ 12, %75 ]
  %77 = zext nneg i32 %.0.lcssa to i64
  %78 = getelementptr inbounds i8, ptr %2, i64 %77
  store i8 0, ptr %78, align 1, !tbaa !13
  %79 = icmp eq i32 %.0.lcssa, %16
  br i1 %79, label %80, label %.sink.split60

80:                                               ; preds = %.critedge
  %81 = getelementptr inbounds [13 x i8], ptr %7, i64 0, i64 %77
  br label %.sink.split

82:                                               ; preds = %.preheader
  store i8 %19, ptr %2, align 1, !tbaa !13
  %83 = getelementptr inbounds i8, ptr %17, i64 1
  %84 = load i8, ptr %83, align 1, !tbaa !13
  %.not45.1 = icmp ne i8 %84, 0
  %85 = icmp ugt i32 %18, 1
  %or.cond51.1 = and i1 %85, %.not45.1
  br i1 %or.cond51.1, label %86, label %.critedge2

86:                                               ; preds = %82
  %87 = getelementptr inbounds i8, ptr %2, i64 1
  store i8 %84, ptr %87, align 1, !tbaa !13
  %88 = getelementptr inbounds i8, ptr %17, i64 2
  %89 = load i8, ptr %88, align 1, !tbaa !13
  %.not45.2 = icmp ne i8 %89, 0
  %90 = icmp ugt i32 %18, 2
  %or.cond51.2 = and i1 %90, %.not45.2
  br i1 %or.cond51.2, label %91, label %.critedge2

91:                                               ; preds = %86
  %92 = getelementptr inbounds i8, ptr %2, i64 2
  store i8 %89, ptr %92, align 1, !tbaa !13
  %93 = getelementptr inbounds i8, ptr %17, i64 3
  %94 = load i8, ptr %93, align 1, !tbaa !13
  %.not45.3 = icmp ne i8 %94, 0
  %95 = icmp ugt i32 %18, 3
  %or.cond51.3 = and i1 %95, %.not45.3
  br i1 %or.cond51.3, label %96, label %.critedge2

96:                                               ; preds = %91
  %97 = getelementptr inbounds i8, ptr %2, i64 3
  store i8 %94, ptr %97, align 1, !tbaa !13
  %98 = getelementptr inbounds i8, ptr %17, i64 4
  %99 = load i8, ptr %98, align 1, !tbaa !13
  %.not45.4 = icmp ne i8 %99, 0
  %100 = icmp ugt i32 %18, 4
  %or.cond51.4 = and i1 %100, %.not45.4
  br i1 %or.cond51.4, label %101, label %.critedge2

101:                                              ; preds = %96
  %102 = getelementptr inbounds i8, ptr %2, i64 4
  store i8 %99, ptr %102, align 1, !tbaa !13
  %103 = getelementptr inbounds i8, ptr %17, i64 5
  %104 = load i8, ptr %103, align 1, !tbaa !13
  %.not45.5 = icmp ne i8 %104, 0
  %105 = icmp ugt i32 %18, 5
  %or.cond51.5 = and i1 %105, %.not45.5
  br i1 %or.cond51.5, label %106, label %.critedge2

106:                                              ; preds = %101
  %107 = getelementptr inbounds i8, ptr %2, i64 5
  store i8 %104, ptr %107, align 1, !tbaa !13
  %108 = getelementptr inbounds i8, ptr %17, i64 6
  %109 = load i8, ptr %108, align 1, !tbaa !13
  %.not45.6 = icmp ne i8 %109, 0
  %110 = icmp ugt i32 %18, 6
  %or.cond51.6 = and i1 %110, %.not45.6
  br i1 %or.cond51.6, label %111, label %.critedge2

111:                                              ; preds = %106
  %112 = getelementptr inbounds i8, ptr %2, i64 6
  store i8 %109, ptr %112, align 1, !tbaa !13
  %113 = getelementptr inbounds i8, ptr %17, i64 7
  %114 = load i8, ptr %113, align 1, !tbaa !13
  %.not45.7 = icmp ne i8 %114, 0
  %115 = icmp ugt i32 %18, 7
  %or.cond51.7 = and i1 %115, %.not45.7
  br i1 %or.cond51.7, label %116, label %.critedge2

116:                                              ; preds = %111
  %117 = getelementptr inbounds i8, ptr %2, i64 7
  store i8 %114, ptr %117, align 1, !tbaa !13
  %118 = getelementptr inbounds i8, ptr %17, i64 8
  %119 = load i8, ptr %118, align 1, !tbaa !13
  %.not45.8 = icmp ne i8 %119, 0
  %120 = icmp ugt i32 %18, 8
  %or.cond51.8 = and i1 %120, %.not45.8
  br i1 %or.cond51.8, label %121, label %.critedge2

121:                                              ; preds = %116
  %122 = getelementptr inbounds i8, ptr %2, i64 8
  store i8 %119, ptr %122, align 1, !tbaa !13
  %123 = getelementptr inbounds i8, ptr %17, i64 9
  %124 = load i8, ptr %123, align 1, !tbaa !13
  %.not45.9 = icmp ne i8 %124, 0
  %125 = icmp ugt i32 %18, 9
  %or.cond51.9 = and i1 %125, %.not45.9
  br i1 %or.cond51.9, label %126, label %.critedge2

126:                                              ; preds = %121
  %127 = getelementptr inbounds i8, ptr %2, i64 9
  store i8 %124, ptr %127, align 1, !tbaa !13
  %128 = getelementptr inbounds i8, ptr %17, i64 10
  %129 = load i8, ptr %128, align 1, !tbaa !13
  %.not45.10 = icmp ne i8 %129, 0
  %130 = icmp ugt i32 %18, 10
  %or.cond51.10 = and i1 %130, %.not45.10
  br i1 %or.cond51.10, label %131, label %.critedge2

131:                                              ; preds = %126
  %132 = getelementptr inbounds i8, ptr %2, i64 10
  store i8 %129, ptr %132, align 1, !tbaa !13
  %133 = getelementptr inbounds i8, ptr %17, i64 11
  %134 = load i8, ptr %133, align 1, !tbaa !13
  %.not45.11 = icmp ne i8 %134, 0
  %135 = icmp ugt i32 %18, 11
  %or.cond51.11 = and i1 %135, %.not45.11
  br i1 %or.cond51.11, label %136, label %.critedge2

136:                                              ; preds = %131
  %137 = getelementptr inbounds i8, ptr %2, i64 11
  store i8 %134, ptr %137, align 1, !tbaa !13
  br label %.critedge2

.critedge2:                                       ; preds = %136, %131, %126, %121, %116, %111, %106, %101, %96, %91, %86, %82, %.preheader
  %.1.lcssa = phi i32 [ 0, %.preheader ], [ 1, %82 ], [ 2, %86 ], [ 3, %91 ], [ 4, %96 ], [ 5, %101 ], [ 6, %106 ], [ 7, %111 ], [ 8, %116 ], [ 9, %121 ], [ 10, %126 ], [ 11, %131 ], [ 12, %136 ]
  %138 = zext nneg i32 %.1.lcssa to i64
  %139 = getelementptr inbounds i8, ptr %2, i64 %138
  store i8 0, ptr %139, align 1, !tbaa !13
  %140 = icmp eq i32 %.1.lcssa, %18
  br i1 %140, label %141, label %.sink.split60

141:                                              ; preds = %.critedge2
  %142 = getelementptr inbounds i8, ptr %17, i64 %138
  br label %.sink.split

.sink.split:                                      ; preds = %80, %141
  %.sink59 = phi ptr [ %142, %141 ], [ %81, %80 ]
  %143 = load i8, ptr %.sink59, align 1, !tbaa !13
  %.not46 = icmp eq i8 %143, 0
  %spec.select52 = select i1 %.not46, i32 0, i32 33
  br label %.sink.split60

.sink.split60:                                    ; preds = %.critedge, %.critedge2, %.sink.split, %12
  %.039.ph = phi i32 [ %13, %12 ], [ 0, %.critedge ], [ 0, %.critedge2 ], [ %spec.select52, %.sink.split ]
  %144 = call i32 @_tx_mutex_put(ptr noundef nonnull %10) #3
  br label %145

145:                                              ; preds = %.sink.split60, %9, %4
  %.039 = phi i32 [ 17, %4 ], [ 17, %9 ], [ %.039.ph, %.sink.split60 ]
  call void @llvm.lifetime.end.p0(i64 136, ptr nonnull %5) #3
  ret i32 %.039
}

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

declare i32 @_tx_mutex_get(ptr noundef, i64 noundef) local_unnamed_addr #2

declare i32 @_fx_directory_search(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @_tx_mutex_put(ptr noundef) local_unnamed_addr #2

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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, !7, i64 0}
!6 = !{!"FX_DIR_ENTRY_STRUCT", !7, i64 0, !8, i64 8, !10, i64 24, !10, i64 28, !8, i64 32, !8, i64 33, !8, i64 34, !10, i64 36, !10, i64 40, !10, i64 44, !10, i64 48, !10, i64 52, !11, i64 56, !12, i64 64, !12, i64 72, !11, i64 80, !11, i64 88, !11, i64 96, !11, i64 104, !12, i64 112, !11, i64 120, !12, i64 128}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"long", !8, i64 0}
!12 = !{!"long long", !8, i64 0}
!13 = !{!8, !8, i64 0}
!14 = !{!15, !11, i64 0}
!15 = !{!"FX_MEDIA_STRUCT", !11, i64 0, !7, i64 8, !7, i64 16, !11, i64 24, !10, i64 32, !11, i64 40, !7, i64 48, !7, i64 56, !11, i64 64, !11, i64 72, !10, i64 80, !10, i64 84, !10, i64 88, !12, i64 96, !11, i64 104, !10, i64 112, !10, i64 116, !10, i64 120, !10, i64 124, !10, i64 128, !10, i64 132, !10, i64 136, !10, i64 140, !10, i64 144, !11, i64 152, !10, i64 160, !11, i64 168, !11, i64 176, !10, i64 184, !11, i64 192, !11, i64 200, !7, i64 208, !10, i64 216, !10, i64 220, !7, i64 224, !11, i64 232, !11, i64 240, !11, i64 248, !10, i64 256, !10, i64 260, !10, i64 264, !10, i64 268, !10, i64 272, !10, i64 276, !10, i64 280, !7, i64 288, !7, i64 296, !7, i64 304, !7, i64 312, !11, i64 320, !7, i64 328, !7, 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, !16, i64 824, !10, i64 920, !6, i64 928, !6, i64 1064, !8, i64 1200, !8, i64 1456, !17, i64 1712, !8, i64 2368, !8, i64 2752, !11, i64 2880, !8, i64 2888, !8, i64 3912, !11, i64 12104, !11, i64 12112, !11, i64 12120, !11, i64 12128, !8, i64 12136}
!16 = !{!"TX_MUTEX_STRUCT", !11, i64 0, !7, i64 8, !10, i64 16, !7, i64 24, !10, i64 32, !10, i64 36, !7, i64 40, !10, i64 48, !7, i64 56, !7, i64 64, !10, i64 72, !7, i64 80, !7, i64 88}
!17 = !{!"FX_PATH_STRUCT", !6, i64 0, !8, i64 136, !8, i64 392, !11, i64 648}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass