; LLVM IR from mlcommons/tiny :: benchmark/interface/Middlewares/ST/filex/common/src/fx_file_close.ll (fx_file_close)

; 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_FILE_STRUCT = type { i64, ptr, i64, i8, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, ptr, ptr, ptr, %struct.FX_DIR_ENTRY_STRUCT, [256 x i8], i64, ptr }
%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 }

@_fx_system_time = external global i32, align 4
@_fx_system_date = external global i32, align 4

; Function Attrs: nounwind uwtable
define dso_local i32 @_fx_file_close(ptr noundef %0) #0 {
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  %8 = load ptr, ptr %3, align 8, !tbaa !5
  %9 = getelementptr inbounds %struct.FX_FILE_STRUCT, ptr %8, i32 0, i32 0
  %10 = load i64, ptr %9, align 8, !tbaa !9
  %11 = icmp ne i64 %10, 1179208773
  br i1 %11, label %12, label %13

12:                                               ; preds = %1
  store i32 7, ptr %2, align 4
  store i32 1, ptr %7, align 4
  br label %123

13:                                               ; preds = %1
  %14 = load ptr, ptr %3, align 8, !tbaa !5
  %15 = getelementptr inbounds %struct.FX_FILE_STRUCT, ptr %14, i32 0, i32 16
  %16 = load ptr, ptr %15, align 8, !tbaa !15
  store ptr %16, ptr %5, align 8, !tbaa !5
  %17 = load ptr, ptr %5, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %17, i32 0, i32 73
  %19 = load i64, ptr %18, align 8, !tbaa !16
  %20 = add i64 %19, 1
  store i64 %20, ptr %18, align 8, !tbaa !16
  %21 = load ptr, ptr %5, 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 !20
  %24 = icmp ne i64 %23, 1296385097
  br i1 %24, label %25, label %26

25:                                               ; preds = %13
  store i32 17, ptr %2, align 4
  store i32 1, ptr %7, align 4
  br label %123

26:                                               ; preds = %13
  %27 = load ptr, ptr %5, 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 %2, align 4
  store i32 1, ptr %7, align 4
  br label %123

32:                                               ; preds = %26
  br label %33

33:                                               ; preds = %32
  %34 = load ptr, ptr %3, align 8, !tbaa !5
  %35 = load ptr, ptr %3, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.FX_FILE_STRUCT, ptr %35, i32 0, i32 17
  %37 = load ptr, ptr %36, align 8, !tbaa !21
  %38 = icmp eq ptr %34, %37
  br i1 %38, label %39, label %42

39:                                               ; preds = %33
  %40 = load ptr, ptr %5, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %40, i32 0, i32 48
  store ptr null, ptr %41, align 8, !tbaa !22
  br label %69

42:                                               ; preds = %33
  %43 = load ptr, ptr %3, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.FX_FILE_STRUCT, ptr %43, i32 0, i32 18
  %45 = load ptr, ptr %44, align 8, !tbaa !23
  %46 = load ptr, ptr %3, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.FX_FILE_STRUCT, ptr %46, i32 0, i32 17
  %48 = load ptr, ptr %47, align 8, !tbaa !21
  %49 = getelementptr inbounds %struct.FX_FILE_STRUCT, ptr %48, i32 0, i32 18
  store ptr %45, ptr %49, align 8, !tbaa !23
  %50 = load ptr, ptr %3, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.FX_FILE_STRUCT, ptr %50, i32 0, i32 17
  %52 = load ptr, ptr %51, align 8, !tbaa !21
  %53 = load ptr, ptr %3, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.FX_FILE_STRUCT, ptr %53, i32 0, i32 18
  %55 = load ptr, ptr %54, align 8, !tbaa !23
  %56 = getelementptr inbounds %struct.FX_FILE_STRUCT, ptr %55, i32 0, i32 17
  store ptr %52, ptr %56, align 8, !tbaa !21
  %57 = load ptr, ptr %5, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %57, i32 0, i32 48
  %59 = load ptr, ptr %58, align 8, !tbaa !22
  %60 = load ptr, ptr %3, align 8, !tbaa !5
  %61 = icmp eq ptr %59, %60
  br i1 %61, label %62, label %68

62:                                               ; preds = %42
  %63 = load ptr, ptr %3, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.FX_FILE_STRUCT, ptr %63, i32 0, i32 17
  %65 = load ptr, ptr %64, align 8, !tbaa !21
  %66 = load ptr, ptr %5, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %66, i32 0, i32 48
  store ptr %65, ptr %67, align 8, !tbaa !22
  br label %68

68:                                               ; preds = %62, %42
  br label %69

69:                                               ; preds = %68, %39
  %70 = load ptr, ptr %5, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %70, i32 0, i32 49
  %72 = load i64, ptr %71, align 8, !tbaa !24
  %73 = add i64 %72, -1
  store i64 %73, ptr %71, align 8, !tbaa !24
  %74 = load ptr, ptr %3, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.FX_FILE_STRUCT, ptr %74, i32 0, i32 0
  store i64 1179208771, ptr %75, align 8, !tbaa !9
  %76 = load ptr, ptr %3, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.FX_FILE_STRUCT, ptr %76, i32 0, i32 2
  %78 = load i64, ptr %77, align 8, !tbaa !25
  %79 = icmp eq i64 %78, 1
  br i1 %79, label %80, label %119

80:                                               ; preds = %69
  %81 = load ptr, ptr %3, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.FX_FILE_STRUCT, ptr %81, i32 0, i32 3
  %83 = load i8, ptr %82, align 8, !tbaa !26
  %84 = zext i8 %83 to i32
  %85 = icmp ne i32 %84, 0
  br i1 %85, label %86, label %119

86:                                               ; preds = %80
  %87 = call i32 @__disable_interrupts()
  store i32 %87, ptr %6, align 4, !tbaa !27
  %88 = load i32, ptr @_fx_system_time, align 4, !tbaa !27
  %89 = load ptr, ptr %3, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.FX_FILE_STRUCT, ptr %89, i32 0, i32 19
  %91 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %90, i32 0, i32 10
  store i32 %88, ptr %91, align 8, !tbaa !28
  %92 = load i32, ptr @_fx_system_date, align 4, !tbaa !27
  %93 = load ptr, ptr %3, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.FX_FILE_STRUCT, ptr %93, i32 0, i32 19
  %95 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %94, i32 0, i32 11
  store i32 %92, ptr %95, align 4, !tbaa !29
  %96 = load i32, ptr @_fx_system_date, align 4, !tbaa !27
  %97 = load ptr, ptr %3, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.FX_FILE_STRUCT, ptr %97, i32 0, i32 19
  %99 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %98, i32 0, i32 9
  store i32 %96, ptr %99, align 4, !tbaa !30
  %100 = load i32, ptr %6, align 4, !tbaa !27
  call void @__restore_interrupt(i32 noundef %100)
  %101 = load ptr, ptr %3, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.FX_FILE_STRUCT, ptr %101, i32 0, i32 14
  %103 = load i64, ptr %102, align 8, !tbaa !31
  %104 = load ptr, ptr %3, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.FX_FILE_STRUCT, ptr %104, i32 0, i32 19
  %106 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %105, i32 0, i32 13
  store i64 %103, ptr %106, align 8, !tbaa !32
  %107 = load ptr, ptr %5, align 8, !tbaa !5
  %108 = load ptr, ptr %3, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.FX_FILE_STRUCT, ptr %108, i32 0, i32 19
  %110 = call i32 @_fx_directory_entry_write(ptr noundef %107, ptr noundef %109)
  store i32 %110, ptr %4, align 4, !tbaa !27
  %111 = load i32, ptr %4, align 4, !tbaa !27
  %112 = icmp ne i32 %111, 0
  br i1 %112, label %113, label %118

113:                                              ; preds = %86
  %114 = load ptr, ptr %5, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %114, i32 0, i32 112
  %116 = call i32 @_tx_mutex_put(ptr noundef %115)
  %117 = load i32, ptr %4, align 4, !tbaa !27
  store i32 %117, ptr %2, align 4
  store i32 1, ptr %7, align 4
  br label %123

118:                                              ; preds = %86
  br label %119

119:                                              ; preds = %118, %80, %69
  %120 = load ptr, ptr %5, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %120, i32 0, i32 112
  %122 = call i32 @_tx_mutex_put(ptr noundef %121)
  store i32 0, ptr %2, align 4
  store i32 1, ptr %7, align 4
  br label %123

123:                                              ; preds = %119, %113, %31, %25, %12
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  %124 = load i32, ptr %2, align 4
  ret i32 %124
}

; 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

; Function Attrs: alwaysinline nounwind uwtable
declare hidden i32 @__disable_interrupts() #3

; Function Attrs: alwaysinline nounwind uwtable
declare hidden void @__restore_interrupt(i32 noundef) #3

declare i32 @_fx_directory_entry_write(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 = { alwaysinline nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }

!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, !11, i64 0}
!10 = !{!"FX_FILE_STRUCT", !11, i64 0, !6, i64 8, !11, i64 16, !7, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !11, i64 56, !11, i64 64, !12, i64 72, !11, i64 80, !11, i64 88, !11, i64 96, !12, i64 104, !12, i64 112, !12, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !13, i64 152, !7, i64 288, !11, i64 544, !6, i64 552}
!11 = !{!"long", !7, i64 0}
!12 = !{!"long long", !7, i64 0}
!13 = !{!"FX_DIR_ENTRY_STRUCT", !6, i64 0, !7, i64 8, !14, i64 24, !14, i64 28, !7, i64 32, !7, i64 33, !7, i64 34, !14, i64 36, !14, i64 40, !14, i64 44, !14, i64 48, !14, 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}
!14 = !{!"int", !7, i64 0}
!15 = !{!10, !6, i64 128}
!16 = !{!17, !11, i64 512}
!17 = !{!"FX_MEDIA_STRUCT", !11, i64 0, !6, i64 8, !6, i64 16, !11, i64 24, !14, i64 32, !11, i64 40, !6, i64 48, !6, i64 56, !11, i64 64, !11, i64 72, !14, i64 80, !14, i64 84, !14, i64 88, !12, i64 96, !11, i64 104, !14, i64 112, !14, i64 116, !14, i64 120, !14, i64 124, !14, i64 128, !14, i64 132, !14, i64 136, !14, i64 140, !14, i64 144, !11, i64 152, !14, i64 160, !11, i64 168, !11, i64 176, !14, i64 184, !11, i64 192, !11, i64 200, !6, i64 208, !14, i64 216, !14, i64 220, !6, i64 224, !11, i64 232, !11, i64 240, !11, i64 248, !14, i64 256, !14, i64 260, !14, i64 264, !14, i64 268, !14, i64 272, !14, i64 276, !14, i64 280, !6, i64 288, !6, i64 296, !6, i64 304, !6, i64 312, !11, i64 320, !6, i64 328, !6, 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, !18, i64 824, !14, i64 920, !13, i64 928, !13, i64 1064, !7, i64 1200, !7, i64 1456, !19, i64 1712, !7, i64 2368, !7, i64 2752, !11, i64 2880, !7, i64 2888, !7, i64 3912, !11, i64 12104, !11, i64 12112, !11, i64 12120, !11, i64 12128, !7, i64 12136}
!18 = !{!"TX_MUTEX_STRUCT", !11, i64 0, !6, i64 8, !14, i64 16, !6, i64 24, !14, i64 32, !14, i64 36, !6, i64 40, !14, i64 48, !6, i64 56, !6, i64 64, !14, i64 72, !6, i64 80, !6, i64 88}
!19 = !{!"FX_PATH_STRUCT", !13, i64 0, !7, i64 136, !7, i64 392, !11, i64 648}
!20 = !{!17, !11, i64 0}
!21 = !{!10, !6, i64 136}
!22 = !{!17, !6, i64 312}
!23 = !{!10, !6, i64 144}
!24 = !{!17, !11, i64 320}
!25 = !{!10, !11, i64 16}
!26 = !{!10, !7, i64 24}
!27 = !{!14, !14, i64 0}
!28 = !{!10, !14, i64 200}
!29 = !{!10, !14, i64 204}
!30 = !{!10, !14, i64 196}
!31 = !{!10, !12, i64 112}
!32 = !{!10, !12, i64 216}


; 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"

@_fx_system_time = external local_unnamed_addr global i32, align 4
@_fx_system_date = external local_unnamed_addr global i32, align 4

; Function Attrs: nounwind uwtable
define dso_local i32 @_fx_file_close(ptr noundef %0) local_unnamed_addr #0 {
  %2 = load i64, ptr %0, align 8, !tbaa !5
  %.not = icmp eq i64 %2, 1179208773
  br i1 %.not, label %3, label %53

3:                                                ; preds = %1
  %4 = getelementptr inbounds i8, ptr %0, i64 128
  %5 = load ptr, ptr %4, align 8, !tbaa !14
  %6 = getelementptr inbounds i8, ptr %5, i64 512
  %7 = load i64, ptr %6, align 8, !tbaa !15
  %8 = add i64 %7, 1
  store i64 %8, ptr %6, align 8, !tbaa !15
  %9 = load i64, ptr %5, align 8, !tbaa !19
  %.not35 = icmp eq i64 %9, 1296385097
  br i1 %.not35, label %10, label %53

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

13:                                               ; preds = %10
  %14 = getelementptr inbounds i8, ptr %0, i64 136
  %15 = load ptr, ptr %14, align 8, !tbaa !20
  %16 = icmp eq ptr %15, %0
  br i1 %16, label %17, label %19

17:                                               ; preds = %13
  %18 = getelementptr inbounds i8, ptr %5, i64 312
  store ptr null, ptr %18, align 8, !tbaa !21
  br label %29

19:                                               ; preds = %13
  %20 = getelementptr inbounds i8, ptr %0, i64 144
  %21 = load ptr, ptr %20, align 8, !tbaa !22
  %22 = getelementptr inbounds i8, ptr %15, i64 144
  store ptr %21, ptr %22, align 8, !tbaa !22
  %23 = getelementptr inbounds i8, ptr %21, i64 136
  store ptr %15, ptr %23, align 8, !tbaa !20
  %24 = getelementptr inbounds i8, ptr %5, i64 312
  %25 = load ptr, ptr %24, align 8, !tbaa !21
  %26 = icmp eq ptr %25, %0
  br i1 %26, label %27, label %29

27:                                               ; preds = %19
  %28 = load ptr, ptr %14, align 8, !tbaa !20
  store ptr %28, ptr %24, align 8, !tbaa !21
  br label %29

29:                                               ; preds = %19, %27, %17
  %30 = getelementptr inbounds i8, ptr %5, i64 320
  %31 = load i64, ptr %30, align 8, !tbaa !23
  %32 = add i64 %31, -1
  store i64 %32, ptr %30, align 8, !tbaa !23
  store i64 1179208771, ptr %0, align 8, !tbaa !5
  %33 = getelementptr inbounds i8, ptr %0, i64 16
  %34 = load i64, ptr %33, align 8, !tbaa !24
  %35 = icmp eq i64 %34, 1
  br i1 %35, label %36, label %51

36:                                               ; preds = %29
  %37 = getelementptr inbounds i8, ptr %0, i64 24
  %38 = load i8, ptr %37, align 8, !tbaa !25
  %.not37 = icmp eq i8 %38, 0
  br i1 %.not37, label %51, label %39

39:                                               ; preds = %36
  %40 = tail call i32 @__disable_interrupts()
  %41 = load i32, ptr @_fx_system_time, align 4, !tbaa !26
  %42 = getelementptr inbounds i8, ptr %0, i64 152
  %43 = getelementptr inbounds i8, ptr %0, i64 200
  store i32 %41, ptr %43, align 8, !tbaa !27
  %44 = load i32, ptr @_fx_system_date, align 4, !tbaa !26
  %45 = getelementptr inbounds i8, ptr %0, i64 204
  store i32 %44, ptr %45, align 4, !tbaa !28
  %46 = getelementptr inbounds i8, ptr %0, i64 196
  store i32 %44, ptr %46, align 4, !tbaa !29
  tail call void @__restore_interrupt(i32 noundef %40)
  %47 = getelementptr inbounds i8, ptr %0, i64 112
  %48 = load i64, ptr %47, align 8, !tbaa !30
  %49 = getelementptr inbounds i8, ptr %0, i64 216
  store i64 %48, ptr %49, align 8, !tbaa !31
  %50 = tail call i32 @_fx_directory_entry_write(ptr noundef nonnull %5, ptr noundef nonnull %42) #3
  %.not38 = icmp eq i32 %50, 0
  br i1 %.not38, label %51, label %.sink.split

51:                                               ; preds = %39, %36, %29
  br label %.sink.split

.sink.split:                                      ; preds = %39, %51
  %.0.ph = phi i32 [ 0, %51 ], [ %50, %39 ]
  %52 = tail call i32 @_tx_mutex_put(ptr noundef nonnull %11) #3
  br label %53

53:                                               ; preds = %.sink.split, %10, %3, %1
  %.0 = phi i32 [ 7, %1 ], [ 17, %3 ], [ 17, %10 ], [ %.0.ph, %.sink.split ]
  ret i32 %.0
}

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

; Function Attrs: alwaysinline nounwind uwtable
declare hidden i32 @__disable_interrupts() local_unnamed_addr #2

; Function Attrs: alwaysinline nounwind uwtable
declare hidden void @__restore_interrupt(i32 noundef) local_unnamed_addr #2

declare i32 @_fx_directory_entry_write(ptr noundef, ptr noundef) local_unnamed_addr #1

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


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass