; LLVM IR from mlcommons/tiny :: benchmark/interface/Middlewares/ST/threadx/common/src (tx_block_allocate)

; 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.TX_BLOCK_POOL_STRUCT = type { i64, ptr, i32, i32, ptr, ptr, i64, i32, ptr, i32, ptr, ptr }
%struct.TX_THREAD_STRUCT = type { i64, i64, ptr, ptr, ptr, i64, i64, i64, ptr, ptr, ptr, i32, i32, i32, i32, i32, ptr, ptr, i64, %struct.TX_TIMER_INTERNAL_STRUCT, ptr, ptr, ptr, ptr, i64, ptr, i32, i32, ptr, ptr, ptr, ptr, i32, i32, i32, i32, ptr, ptr, ptr, i64 }
%struct.TX_TIMER_INTERNAL_STRUCT = type { i64, i64, ptr, i64, ptr, ptr, ptr }

@_tx_thread_preempt_disable = external global i32, align 4
@_tx_thread_current_ptr = external global ptr, align 8

; Function Attrs: nounwind uwtable
define dso_local i32 @_tx_block_allocate(ptr noundef %0, ptr noundef %1, i64 noundef %2) #0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store i64 %2, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  %17 = call i32 @__disable_interrupts()
  store i32 %17, ptr %7, align 4, !tbaa !11
  %18 = load ptr, ptr %4, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.TX_BLOCK_POOL_STRUCT, ptr %18, i32 0, i32 2
  %20 = load i32, ptr %19, align 8, !tbaa !13
  %21 = icmp ne i32 %20, 0
  br i1 %21, label %22, label %44

22:                                               ; preds = %3
  %23 = load ptr, ptr %4, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.TX_BLOCK_POOL_STRUCT, ptr %23, i32 0, i32 2
  %25 = load i32, ptr %24, align 8, !tbaa !13
  %26 = add i32 %25, -1
  store i32 %26, ptr %24, align 8, !tbaa !13
  %27 = load ptr, ptr %4, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.TX_BLOCK_POOL_STRUCT, ptr %27, i32 0, i32 4
  %29 = load ptr, ptr %28, align 8, !tbaa !15
  store ptr %29, ptr %10, align 8, !tbaa !5
  %30 = load ptr, ptr %10, align 8, !tbaa !5
  %31 = getelementptr inbounds i8, ptr %30, i64 8
  store ptr %31, ptr %11, align 8, !tbaa !5
  %32 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %32, ptr %13, align 8, !tbaa !5
  %33 = load ptr, ptr %11, align 8, !tbaa !5
  %34 = load ptr, ptr %13, align 8, !tbaa !5
  store ptr %33, ptr %34, align 8, !tbaa !5
  %35 = load ptr, ptr %10, align 8, !tbaa !5
  store ptr %35, ptr %12, align 8, !tbaa !5
  %36 = load ptr, ptr %12, align 8, !tbaa !5
  %37 = load ptr, ptr %36, align 8, !tbaa !5
  %38 = load ptr, ptr %4, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.TX_BLOCK_POOL_STRUCT, ptr %38, i32 0, i32 4
  store ptr %37, ptr %39, align 8, !tbaa !15
  %40 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %40, ptr %11, align 8, !tbaa !5
  %41 = load ptr, ptr %11, align 8, !tbaa !5
  %42 = load ptr, ptr %12, align 8, !tbaa !5
  store ptr %41, ptr %42, align 8, !tbaa !5
  store i32 0, ptr %8, align 4, !tbaa !11
  %43 = load i32, ptr %7, align 4, !tbaa !11
  call void @__restore_interrupt(i32 noundef %43)
  br label %126

44:                                               ; preds = %3
  %45 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %45, ptr %13, align 8, !tbaa !5
  %46 = load ptr, ptr %13, align 8, !tbaa !5
  store ptr null, ptr %46, align 8, !tbaa !5
  %47 = load i64, ptr %6, align 8, !tbaa !9
  %48 = icmp ne i64 %47, 0
  br i1 %48, label %49, label %123

49:                                               ; preds = %44
  %50 = load volatile i32, ptr @_tx_thread_preempt_disable, align 4, !tbaa !11
  %51 = icmp ne i32 %50, 0
  br i1 %51, label %52, label %54

52:                                               ; preds = %49
  store i32 16, ptr %8, align 4, !tbaa !11
  %53 = load i32, ptr %7, align 4, !tbaa !11
  call void @__restore_interrupt(i32 noundef %53)
  br label %122

54:                                               ; preds = %49
  %55 = load ptr, ptr @_tx_thread_current_ptr, align 8, !tbaa !5
  store ptr %55, ptr %9, align 8, !tbaa !5
  %56 = load ptr, ptr %9, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %56, i32 0, i32 20
  store ptr @_tx_block_pool_cleanup, ptr %57, align 8, !tbaa !16
  %58 = load ptr, ptr %4, align 8, !tbaa !5
  %59 = load ptr, ptr %9, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %59, i32 0, i32 21
  store ptr %58, ptr %60, align 8, !tbaa !19
  %61 = load ptr, ptr %5, align 8, !tbaa !5
  %62 = load ptr, ptr %9, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %62, i32 0, i32 25
  store ptr %61, ptr %63, align 8, !tbaa !20
  %64 = load ptr, ptr %9, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %64, i32 0, i32 39
  %66 = load i64, ptr %65, align 8, !tbaa !21
  %67 = add i64 %66, 1
  store i64 %67, ptr %65, align 8, !tbaa !21
  %68 = load ptr, ptr %4, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.TX_BLOCK_POOL_STRUCT, ptr %68, i32 0, i32 9
  %70 = load i32, ptr %69, align 8, !tbaa !22
  store i32 %70, ptr %14, align 4, !tbaa !11
  %71 = load ptr, ptr %4, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.TX_BLOCK_POOL_STRUCT, ptr %71, i32 0, i32 9
  %73 = load i32, ptr %72, align 8, !tbaa !22
  %74 = add i32 %73, 1
  store i32 %74, ptr %72, align 8, !tbaa !22
  %75 = load i32, ptr %14, align 4, !tbaa !11
  %76 = icmp eq i32 %75, 0
  br i1 %76, label %77, label %87

77:                                               ; preds = %54
  %78 = load ptr, ptr %9, align 8, !tbaa !5
  %79 = load ptr, ptr %4, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.TX_BLOCK_POOL_STRUCT, ptr %79, i32 0, i32 8
  store ptr %78, ptr %80, align 8, !tbaa !23
  %81 = load ptr, ptr %9, align 8, !tbaa !5
  %82 = load ptr, ptr %9, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %82, i32 0, i32 22
  store ptr %81, ptr %83, align 8, !tbaa !24
  %84 = load ptr, ptr %9, align 8, !tbaa !5
  %85 = load ptr, ptr %9, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %85, i32 0, i32 23
  store ptr %84, ptr %86, align 8, !tbaa !25
  br label %106

87:                                               ; preds = %54
  %88 = load ptr, ptr %4, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.TX_BLOCK_POOL_STRUCT, ptr %88, i32 0, i32 8
  %90 = load ptr, ptr %89, align 8, !tbaa !23
  store ptr %90, ptr %15, align 8, !tbaa !5
  %91 = load ptr, ptr %15, align 8, !tbaa !5
  %92 = load ptr, ptr %9, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %92, i32 0, i32 22
  store ptr %91, ptr %93, align 8, !tbaa !24
  %94 = load ptr, ptr %15, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %94, i32 0, i32 23
  %96 = load ptr, ptr %95, align 8, !tbaa !25
  store ptr %96, ptr %16, align 8, !tbaa !5
  %97 = load ptr, ptr %16, align 8, !tbaa !5
  %98 = load ptr, ptr %9, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %98, i32 0, i32 23
  store ptr %97, ptr %99, align 8, !tbaa !25
  %100 = load ptr, ptr %9, align 8, !tbaa !5
  %101 = load ptr, ptr %16, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %101, i32 0, i32 22
  store ptr %100, ptr %102, align 8, !tbaa !24
  %103 = load ptr, ptr %9, align 8, !tbaa !5
  %104 = load ptr, ptr %15, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %104, i32 0, i32 23
  store ptr %103, ptr %105, align 8, !tbaa !25
  br label %106

106:                                              ; preds = %87, %77
  %107 = load ptr, ptr %9, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %107, i32 0, i32 12
  store i32 8, ptr %108, align 4, !tbaa !26
  %109 = load ptr, ptr %9, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %109, i32 0, i32 14
  store i32 1, ptr %110, align 4, !tbaa !27
  %111 = load i64, ptr %6, align 8, !tbaa !9
  %112 = load ptr, ptr %9, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %112, i32 0, i32 19
  %114 = getelementptr inbounds %struct.TX_TIMER_INTERNAL_STRUCT, ptr %113, i32 0, i32 0
  store i64 %111, ptr %114, align 8, !tbaa !28
  %115 = load volatile i32, ptr @_tx_thread_preempt_disable, align 4, !tbaa !11
  %116 = add i32 %115, 1
  store volatile i32 %116, ptr @_tx_thread_preempt_disable, align 4, !tbaa !11
  %117 = load i32, ptr %7, align 4, !tbaa !11
  call void @__restore_interrupt(i32 noundef %117)
  %118 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_tx_thread_system_suspend(ptr noundef %118)
  %119 = load ptr, ptr %9, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %119, i32 0, i32 27
  %121 = load i32, ptr %120, align 4, !tbaa !29
  store i32 %121, ptr %8, align 4, !tbaa !11
  br label %122

122:                                              ; preds = %106, %52
  br label %125

123:                                              ; preds = %44
  store i32 16, ptr %8, align 4, !tbaa !11
  %124 = load i32, ptr %7, align 4, !tbaa !11
  call void @__restore_interrupt(i32 noundef %124)
  br label %125

125:                                              ; preds = %123, %122
  br label %126

126:                                              ; preds = %125, %22
  %127 = load i32, ptr %8, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  ret i32 %127
}

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

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

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

declare void @_tx_block_pool_cleanup(ptr noundef, i64 noundef) #3

declare void @_tx_thread_system_suspend(ptr noundef) #3

; 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 = { 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 = { "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, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !12, i64 16}
!14 = !{!"TX_BLOCK_POOL_STRUCT", !10, i64 0, !6, i64 8, !12, i64 16, !12, i64 20, !6, i64 24, !6, i64 32, !10, i64 40, !12, i64 48, !6, i64 56, !12, i64 64, !6, i64 72, !6, i64 80}
!15 = !{!14, !6, i64 24}
!16 = !{!17, !6, i64 192}
!17 = !{!"TX_THREAD_STRUCT", !10, i64 0, !10, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !12, i64 88, !12, i64 92, !12, i64 96, !12, i64 100, !12, i64 104, !6, i64 112, !6, i64 120, !10, i64 128, !18, i64 136, !6, i64 192, !6, i64 200, !6, i64 208, !6, i64 216, !10, i64 224, !6, i64 232, !12, i64 240, !12, i64 244, !6, i64 248, !6, i64 256, !6, i64 264, !6, i64 272, !12, i64 280, !12, i64 284, !12, i64 288, !12, i64 292, !6, i64 296, !6, i64 304, !6, i64 312, !10, i64 320}
!18 = !{!"TX_TIMER_INTERNAL_STRUCT", !10, i64 0, !10, i64 8, !6, i64 16, !10, i64 24, !6, i64 32, !6, i64 40, !6, i64 48}
!19 = !{!17, !6, i64 200}
!20 = !{!17, !6, i64 232}
!21 = !{!17, !10, i64 320}
!22 = !{!14, !12, i64 64}
!23 = !{!14, !6, i64 56}
!24 = !{!17, !6, i64 208}
!25 = !{!17, !6, i64 216}
!26 = !{!17, !12, i64 92}
!27 = !{!17, !12, i64 100}
!28 = !{!17, !10, i64 136}
!29 = !{!17, !12, i64 244}


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

@_tx_thread_preempt_disable = external global i32, align 4
@_tx_thread_current_ptr = external local_unnamed_addr global ptr, align 8

; Function Attrs: nounwind uwtable
define dso_local i32 @_tx_block_allocate(ptr noundef %0, ptr noundef %1, i64 noundef %2) local_unnamed_addr #0 {
  %4 = tail call i32 @__disable_interrupts()
  %5 = getelementptr inbounds i8, ptr %0, i64 16
  %6 = load i32, ptr %5, align 8, !tbaa !5
  %.not = icmp eq i32 %6, 0
  br i1 %.not, label %13, label %7

7:                                                ; preds = %3
  %8 = add i32 %6, -1
  store i32 %8, ptr %5, align 8, !tbaa !5
  %9 = getelementptr inbounds i8, ptr %0, i64 24
  %10 = load ptr, ptr %9, align 8, !tbaa !12
  %11 = getelementptr inbounds i8, ptr %10, i64 8
  store ptr %11, ptr %1, align 8, !tbaa !13
  %12 = load ptr, ptr %10, align 8, !tbaa !13
  store ptr %12, ptr %9, align 8, !tbaa !12
  store ptr %0, ptr %10, align 8, !tbaa !13
  tail call void @__restore_interrupt(i32 noundef %4)
  br label %48

13:                                               ; preds = %3
  store ptr null, ptr %1, align 8, !tbaa !13
  %.not53 = icmp eq i64 %2, 0
  br i1 %.not53, label %47, label %14

14:                                               ; preds = %13
  %15 = load volatile i32, ptr @_tx_thread_preempt_disable, align 4, !tbaa !14
  %.not54 = icmp eq i32 %15, 0
  br i1 %.not54, label %17, label %16

16:                                               ; preds = %14
  tail call void @__restore_interrupt(i32 noundef %4)
  br label %48

17:                                               ; preds = %14
  %18 = load ptr, ptr @_tx_thread_current_ptr, align 8, !tbaa !13
  %19 = getelementptr inbounds i8, ptr %18, i64 192
  store ptr @_tx_block_pool_cleanup, ptr %19, align 8, !tbaa !15
  %20 = getelementptr inbounds i8, ptr %18, i64 200
  store ptr %0, ptr %20, align 8, !tbaa !18
  %21 = getelementptr inbounds i8, ptr %18, i64 232
  store ptr %1, ptr %21, align 8, !tbaa !19
  %22 = getelementptr inbounds i8, ptr %18, i64 320
  %23 = load i64, ptr %22, align 8, !tbaa !20
  %24 = add i64 %23, 1
  store i64 %24, ptr %22, align 8, !tbaa !20
  %25 = getelementptr inbounds i8, ptr %0, i64 64
  %26 = load i32, ptr %25, align 8, !tbaa !21
  %27 = add i32 %26, 1
  store i32 %27, ptr %25, align 8, !tbaa !21
  %28 = icmp eq i32 %26, 0
  %29 = getelementptr inbounds i8, ptr %0, i64 56
  %30 = getelementptr inbounds i8, ptr %18, i64 208
  br i1 %28, label %31, label %33

31:                                               ; preds = %17
  store ptr %18, ptr %29, align 8, !tbaa !22
  store ptr %18, ptr %30, align 8, !tbaa !23
  %32 = getelementptr inbounds i8, ptr %18, i64 216
  br label %39

33:                                               ; preds = %17
  %34 = load ptr, ptr %29, align 8, !tbaa !22
  store ptr %34, ptr %30, align 8, !tbaa !23
  %35 = getelementptr inbounds i8, ptr %34, i64 216
  %36 = load ptr, ptr %35, align 8, !tbaa !24
  %37 = getelementptr inbounds i8, ptr %18, i64 216
  store ptr %36, ptr %37, align 8, !tbaa !24
  %38 = getelementptr inbounds i8, ptr %36, i64 208
  store ptr %18, ptr %38, align 8, !tbaa !23
  br label %39

39:                                               ; preds = %33, %31
  %.sink = phi ptr [ %35, %33 ], [ %32, %31 ]
  store ptr %18, ptr %.sink, align 8, !tbaa !24
  %40 = getelementptr inbounds i8, ptr %18, i64 92
  store i32 8, ptr %40, align 4, !tbaa !25
  %41 = getelementptr inbounds i8, ptr %18, i64 100
  store i32 1, ptr %41, align 4, !tbaa !26
  %42 = getelementptr inbounds i8, ptr %18, i64 136
  store i64 %2, ptr %42, align 8, !tbaa !27
  %43 = load volatile i32, ptr @_tx_thread_preempt_disable, align 4, !tbaa !14
  %44 = add i32 %43, 1
  store volatile i32 %44, ptr @_tx_thread_preempt_disable, align 4, !tbaa !14
  tail call void @__restore_interrupt(i32 noundef %4)
  tail call void @_tx_thread_system_suspend(ptr noundef nonnull %18) #3
  %45 = getelementptr inbounds i8, ptr %18, i64 244
  %46 = load i32, ptr %45, align 4, !tbaa !28
  br label %48

47:                                               ; preds = %13
  tail call void @__restore_interrupt(i32 noundef %4)
  br label %48

48:                                               ; preds = %47, %39, %16, %7
  %.0 = phi i32 [ 0, %7 ], [ 16, %16 ], [ %46, %39 ], [ 16, %47 ]
  ret i32 %.0
}

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

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

declare void @_tx_block_pool_cleanup(ptr noundef, i64 noundef) #2

declare void @_tx_thread_system_suspend(ptr noundef) local_unnamed_addr #2

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 = { 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 #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, !11, i64 16}
!6 = !{!"TX_BLOCK_POOL_STRUCT", !7, i64 0, !10, i64 8, !11, i64 16, !11, i64 20, !10, i64 24, !10, i64 32, !7, i64 40, !11, i64 48, !10, i64 56, !11, i64 64, !10, i64 72, !10, i64 80}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"int", !8, i64 0}
!12 = !{!6, !10, i64 24}
!13 = !{!10, !10, i64 0}
!14 = !{!11, !11, i64 0}
!15 = !{!16, !10, i64 192}
!16 = !{!"TX_THREAD_STRUCT", !7, i64 0, !7, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !11, i64 88, !11, i64 92, !11, i64 96, !11, i64 100, !11, i64 104, !10, i64 112, !10, i64 120, !7, i64 128, !17, i64 136, !10, i64 192, !10, i64 200, !10, i64 208, !10, i64 216, !7, i64 224, !10, i64 232, !11, i64 240, !11, i64 244, !10, i64 248, !10, i64 256, !10, i64 264, !10, i64 272, !11, i64 280, !11, i64 284, !11, i64 288, !11, i64 292, !10, i64 296, !10, i64 304, !10, i64 312, !7, i64 320}
!17 = !{!"TX_TIMER_INTERNAL_STRUCT", !7, i64 0, !7, i64 8, !10, i64 16, !7, i64 24, !10, i64 32, !10, i64 40, !10, i64 48}
!18 = !{!16, !10, i64 200}
!19 = !{!16, !10, i64 232}
!20 = !{!16, !7, i64 320}
!21 = !{!6, !11, i64 64}
!22 = !{!6, !10, i64 56}
!23 = !{!16, !10, i64 208}
!24 = !{!16, !10, i64 216}
!25 = !{!16, !11, i64 92}
!26 = !{!16, !11, i64 100}
!27 = !{!16, !7, i64 136}
!28 = !{!16, !11, i64 244}


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