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

; 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_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_execute_ptr = external global ptr, align 8
@_tx_thread_preempt_disable = external global i32, align 4
@_tx_thread_priority_list = external global [32 x ptr], align 16
@_tx_thread_preempted_maps = external global [1 x i64], align 8

; Function Attrs: nounwind uwtable
define dso_local void @_tx_mutex_priority_change(ptr noundef %0, i32 noundef %1) #0 {
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i64, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store i32 %1, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 8, 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
  %10 = call i32 @__disable_interrupts()
  store i32 %10, ptr %5, align 4, !tbaa !9
  %11 = load ptr, ptr %3, align 8, !tbaa !5
  %12 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %11, i32 0, i32 12
  %13 = load i32, ptr %12, align 4, !tbaa !11
  %14 = icmp ne i32 %13, 0
  br i1 %14, label %15, label %36

15:                                               ; preds = %2
  %16 = load i32, ptr %4, align 4, !tbaa !9
  %17 = load ptr, ptr %3, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %17, i32 0, i32 11
  store i32 %16, ptr %18, align 8, !tbaa !15
  %19 = load ptr, ptr %3, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %19, i32 0, i32 33
  %21 = load i32, ptr %20, align 4, !tbaa !16
  %22 = load i32, ptr %4, align 4, !tbaa !9
  %23 = icmp ult i32 %21, %22
  br i1 %23, label %24, label %30

24:                                               ; preds = %15
  %25 = load ptr, ptr %3, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %25, i32 0, i32 33
  %27 = load i32, ptr %26, align 4, !tbaa !16
  %28 = load ptr, ptr %3, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %28, i32 0, i32 15
  store i32 %27, ptr %29, align 8, !tbaa !17
  br label %34

30:                                               ; preds = %15
  %31 = load i32, ptr %4, align 4, !tbaa !9
  %32 = load ptr, ptr %3, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %32, i32 0, i32 15
  store i32 %31, ptr %33, align 8, !tbaa !17
  br label %34

34:                                               ; preds = %30, %24
  %35 = load i32, ptr %5, align 4, !tbaa !9
  call void @__restore_interrupt(i32 noundef %35)
  br label %154

36:                                               ; preds = %2
  %37 = load ptr, ptr @_tx_thread_execute_ptr, align 8, !tbaa !5
  store ptr %37, ptr %6, align 8, !tbaa !5
  %38 = load ptr, ptr %3, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %38, i32 0, i32 11
  %40 = load i32, ptr %39, align 8, !tbaa !15
  store i32 %40, ptr %8, align 4, !tbaa !9
  %41 = load volatile i32, ptr @_tx_thread_preempt_disable, align 4, !tbaa !9
  %42 = add i32 %41, 2
  store volatile i32 %42, ptr @_tx_thread_preempt_disable, align 4, !tbaa !9
  %43 = load ptr, ptr %3, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %43, i32 0, i32 12
  store i32 14, ptr %44, align 4, !tbaa !11
  %45 = load ptr, ptr %3, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %45, i32 0, i32 14
  store i32 1, ptr %46, align 4, !tbaa !18
  %47 = load ptr, ptr %3, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %47, i32 0, i32 19
  %49 = getelementptr inbounds %struct.TX_TIMER_INTERNAL_STRUCT, ptr %48, i32 0, i32 0
  store i64 0, ptr %49, align 8, !tbaa !19
  %50 = load i32, ptr %5, align 4, !tbaa !9
  call void @__restore_interrupt(i32 noundef %50)
  %51 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_tx_thread_system_suspend(ptr noundef %51)
  %52 = call i32 @__disable_interrupts()
  store i32 %52, ptr %5, align 4, !tbaa !9
  %53 = load i32, ptr %4, align 4, !tbaa !9
  %54 = load ptr, ptr %3, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %54, i32 0, i32 11
  store i32 %53, ptr %55, align 8, !tbaa !15
  %56 = load ptr, ptr %3, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %56, i32 0, i32 33
  %58 = load i32, ptr %57, align 4, !tbaa !16
  %59 = load i32, ptr %4, align 4, !tbaa !9
  %60 = icmp ult i32 %58, %59
  br i1 %60, label %61, label %67

61:                                               ; preds = %36
  %62 = load ptr, ptr %3, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %62, i32 0, i32 33
  %64 = load i32, ptr %63, align 4, !tbaa !16
  %65 = load ptr, ptr %3, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %65, i32 0, i32 15
  store i32 %64, ptr %66, align 8, !tbaa !17
  br label %71

67:                                               ; preds = %36
  %68 = load i32, ptr %4, align 4, !tbaa !9
  %69 = load ptr, ptr %3, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %69, i32 0, i32 15
  store i32 %68, ptr %70, align 8, !tbaa !17
  br label %71

71:                                               ; preds = %67, %61
  %72 = load i32, ptr %5, align 4, !tbaa !9
  call void @__restore_interrupt(i32 noundef %72)
  %73 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_tx_thread_system_resume(ptr noundef %73)
  %74 = call i32 @__disable_interrupts()
  store i32 %74, ptr %5, align 4, !tbaa !9
  %75 = load ptr, ptr @_tx_thread_execute_ptr, align 8, !tbaa !5
  store ptr %75, ptr %7, align 8, !tbaa !5
  %76 = load ptr, ptr %3, align 8, !tbaa !5
  %77 = load ptr, ptr %7, align 8, !tbaa !5
  %78 = icmp ne ptr %76, %77
  br i1 %78, label %79, label %152

79:                                               ; preds = %71
  %80 = load ptr, ptr %3, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %80, i32 0, i32 12
  %82 = load i32, ptr %81, align 4, !tbaa !11
  %83 = icmp eq i32 %82, 0
  br i1 %83, label %84, label %151

84:                                               ; preds = %79
  %85 = load ptr, ptr %3, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %85, i32 0, i32 11
  %87 = load i32, ptr %86, align 8, !tbaa !15
  %88 = load ptr, ptr %7, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %88, i32 0, i32 11
  %90 = load i32, ptr %89, align 8, !tbaa !15
  %91 = icmp ule i32 %87, %90
  br i1 %91, label %92, label %110

92:                                               ; preds = %84
  %93 = load ptr, ptr %3, align 8, !tbaa !5
  %94 = load ptr, ptr %6, align 8, !tbaa !5
  %95 = icmp eq ptr %93, %94
  br i1 %95, label %96, label %109

96:                                               ; preds = %92
  %97 = load ptr, ptr %3, align 8, !tbaa !5
  store ptr %97, ptr @_tx_thread_execute_ptr, align 8, !tbaa !5
  %98 = load i32, ptr %8, align 4, !tbaa !9
  %99 = load i32, ptr %4, align 4, !tbaa !9
  %100 = icmp ult i32 %98, %99
  br i1 %100, label %101, label %108

101:                                              ; preds = %96
  %102 = load ptr, ptr %3, align 8, !tbaa !5
  %103 = load ptr, ptr %3, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %103, i32 0, i32 11
  %105 = load i32, ptr %104, align 8, !tbaa !15
  %106 = zext i32 %105 to i64
  %107 = getelementptr inbounds [32 x ptr], ptr @_tx_thread_priority_list, i64 0, i64 %106
  store ptr %102, ptr %107, align 8, !tbaa !5
  br label %108

108:                                              ; preds = %101, %96
  br label %109

109:                                              ; preds = %108, %92
  br label %150

110:                                              ; preds = %84
  %111 = load ptr, ptr %3, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %111, i32 0, i32 15
  %113 = load i32, ptr %112, align 8, !tbaa !17
  %114 = load ptr, ptr %3, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %114, i32 0, i32 11
  %116 = load i32, ptr %115, align 8, !tbaa !15
  %117 = icmp ult i32 %113, %116
  br i1 %117, label %118, label %149

118:                                              ; preds = %110
  %119 = load ptr, ptr %3, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %119, i32 0, i32 15
  %121 = load i32, ptr %120, align 8, !tbaa !17
  %122 = load ptr, ptr %7, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %122, i32 0, i32 11
  %124 = load i32, ptr %123, align 8, !tbaa !15
  %125 = icmp ule i32 %121, %124
  br i1 %125, label %126, label %139

126:                                              ; preds = %118
  %127 = load ptr, ptr %3, align 8, !tbaa !5
  store ptr %127, ptr @_tx_thread_execute_ptr, align 8, !tbaa !5
  %128 = load i32, ptr %8, align 4, !tbaa !9
  %129 = load i32, ptr %4, align 4, !tbaa !9
  %130 = icmp ult i32 %128, %129
  br i1 %130, label %131, label %138

131:                                              ; preds = %126
  %132 = load ptr, ptr %3, align 8, !tbaa !5
  %133 = load ptr, ptr %3, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %133, i32 0, i32 11
  %135 = load i32, ptr %134, align 8, !tbaa !15
  %136 = zext i32 %135 to i64
  %137 = getelementptr inbounds [32 x ptr], ptr @_tx_thread_priority_list, i64 0, i64 %136
  store ptr %132, ptr %137, align 8, !tbaa !5
  br label %138

138:                                              ; preds = %131, %126
  br label %148

139:                                              ; preds = %118
  %140 = load ptr, ptr %3, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %140, i32 0, i32 11
  %142 = load i32, ptr %141, align 8, !tbaa !15
  %143 = zext i32 %142 to i64
  %144 = shl i64 1, %143
  store i64 %144, ptr %9, align 8, !tbaa !20
  %145 = load i64, ptr @_tx_thread_preempted_maps, align 8, !tbaa !20
  %146 = load i64, ptr %9, align 8, !tbaa !20
  %147 = or i64 %145, %146
  store i64 %147, ptr @_tx_thread_preempted_maps, align 8, !tbaa !20
  br label %148

148:                                              ; preds = %139, %138
  br label %149

149:                                              ; preds = %148, %110
  br label %150

150:                                              ; preds = %149, %109
  br label %151

151:                                              ; preds = %150, %79
  br label %152

152:                                              ; preds = %151, %71
  %153 = load i32, ptr %5, align 4, !tbaa !9
  call void @__restore_interrupt(i32 noundef %153)
  br label %154

154:                                              ; preds = %152, %34
  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 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  ret void
}

; 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_thread_system_suspend(ptr noundef) #3

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


; 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_execute_ptr = external local_unnamed_addr global ptr, align 8
@_tx_thread_preempt_disable = external global i32, align 4
@_tx_thread_priority_list = external local_unnamed_addr global [32 x ptr], align 16
@_tx_thread_preempted_maps = external local_unnamed_addr global [1 x i64], align 8

; Function Attrs: nounwind uwtable
define dso_local void @_tx_mutex_priority_change(ptr noundef %0, i32 noundef %1) local_unnamed_addr #0 {
  %3 = tail call i32 @__disable_interrupts()
  %4 = getelementptr inbounds i8, ptr %0, i64 92
  %5 = load i32, ptr %4, align 4, !tbaa !5
  %.not = icmp eq i32 %5, 0
  br i1 %.not, label %11, label %6

6:                                                ; preds = %2
  %7 = getelementptr inbounds i8, ptr %0, i64 88
  store i32 %1, ptr %7, align 8, !tbaa !13
  %8 = getelementptr inbounds i8, ptr %0, i64 284
  %9 = load i32, ptr %8, align 4, !tbaa !14
  %spec.select = tail call i32 @llvm.umin.i32(i32 %9, i32 %1)
  %10 = getelementptr inbounds i8, ptr %0, i64 104
  store i32 %spec.select, ptr %10, align 8
  br label %53

11:                                               ; preds = %2
  %12 = load ptr, ptr @_tx_thread_execute_ptr, align 8, !tbaa !15
  %13 = getelementptr inbounds i8, ptr %0, i64 88
  %14 = load i32, ptr %13, align 8, !tbaa !13
  %15 = load volatile i32, ptr @_tx_thread_preempt_disable, align 4, !tbaa !16
  %16 = add i32 %15, 2
  store volatile i32 %16, ptr @_tx_thread_preempt_disable, align 4, !tbaa !16
  store i32 14, ptr %4, align 4, !tbaa !5
  %17 = getelementptr inbounds i8, ptr %0, i64 100
  store i32 1, ptr %17, align 4, !tbaa !17
  %18 = getelementptr inbounds i8, ptr %0, i64 136
  store i64 0, ptr %18, align 8, !tbaa !18
  tail call void @__restore_interrupt(i32 noundef %3)
  tail call void @_tx_thread_system_suspend(ptr noundef nonnull %0) #4
  %19 = tail call i32 @__disable_interrupts()
  store i32 %1, ptr %13, align 8, !tbaa !13
  %20 = getelementptr inbounds i8, ptr %0, i64 284
  %21 = load i32, ptr %20, align 4, !tbaa !14
  %spec.select60 = tail call i32 @llvm.umin.i32(i32 %21, i32 %1)
  %22 = getelementptr inbounds i8, ptr %0, i64 104
  store i32 %spec.select60, ptr %22, align 8
  tail call void @__restore_interrupt(i32 noundef %19)
  tail call void @_tx_thread_system_resume(ptr noundef nonnull %0) #4
  %23 = tail call i32 @__disable_interrupts()
  %24 = load ptr, ptr @_tx_thread_execute_ptr, align 8, !tbaa !15
  %.not56 = icmp eq ptr %24, %0
  br i1 %.not56, label %53, label %25

25:                                               ; preds = %11
  %26 = load i32, ptr %4, align 4, !tbaa !5
  %27 = icmp eq i32 %26, 0
  br i1 %27, label %28, label %53

28:                                               ; preds = %25
  %29 = load i32, ptr %13, align 8, !tbaa !13
  %30 = getelementptr inbounds i8, ptr %24, i64 88
  %31 = load i32, ptr %30, align 8, !tbaa !13
  %.not57 = icmp ugt i32 %29, %31
  br i1 %.not57, label %39, label %32

32:                                               ; preds = %28
  %33 = icmp eq ptr %12, %0
  br i1 %33, label %34, label %53

34:                                               ; preds = %32
  store ptr %0, ptr @_tx_thread_execute_ptr, align 8, !tbaa !15
  %35 = icmp ult i32 %14, %1
  br i1 %35, label %36, label %53

36:                                               ; preds = %34
  %37 = zext i32 %29 to i64
  %38 = getelementptr inbounds [32 x ptr], ptr @_tx_thread_priority_list, i64 0, i64 %37
  store ptr %0, ptr %38, align 8, !tbaa !15
  br label %53

39:                                               ; preds = %28
  %40 = load i32, ptr %22, align 8, !tbaa !19
  %41 = icmp ult i32 %40, %29
  br i1 %41, label %42, label %53

42:                                               ; preds = %39
  %.not58 = icmp ugt i32 %40, %31
  br i1 %.not58, label %48, label %43

43:                                               ; preds = %42
  store ptr %0, ptr @_tx_thread_execute_ptr, align 8, !tbaa !15
  %44 = icmp ult i32 %14, %1
  br i1 %44, label %45, label %53

45:                                               ; preds = %43
  %46 = zext i32 %29 to i64
  %47 = getelementptr inbounds [32 x ptr], ptr @_tx_thread_priority_list, i64 0, i64 %46
  store ptr %0, ptr %47, align 8, !tbaa !15
  br label %53

48:                                               ; preds = %42
  %49 = zext nneg i32 %29 to i64
  %50 = shl nuw i64 1, %49
  %51 = load i64, ptr @_tx_thread_preempted_maps, align 8, !tbaa !20
  %52 = or i64 %51, %50
  store i64 %52, ptr @_tx_thread_preempted_maps, align 8, !tbaa !20
  br label %53

53:                                               ; preds = %11, %34, %36, %32, %48, %45, %43, %39, %25, %6
  %.sink = phi i32 [ %3, %6 ], [ %23, %25 ], [ %23, %39 ], [ %23, %43 ], [ %23, %45 ], [ %23, %48 ], [ %23, %32 ], [ %23, %36 ], [ %23, %34 ], [ %23, %11 ]
  tail call void @__restore_interrupt(i32 noundef %.sink)
  ret void
}

; 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_thread_system_suspend(ptr noundef) local_unnamed_addr #2

declare void @_tx_thread_system_resume(ptr noundef) local_unnamed_addr #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.umin.i32(i32, i32) #3

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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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, !11, i64 92}
!6 = !{!"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, !12, 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}
!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 = !{!"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}
!13 = !{!6, !11, i64 88}
!14 = !{!6, !11, i64 284}
!15 = !{!10, !10, i64 0}
!16 = !{!11, !11, i64 0}
!17 = !{!6, !11, i64 100}
!18 = !{!6, !7, i64 136}
!19 = !{!6, !11, i64 104}
!20 = !{!7, !7, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,MergedLoadStoreMotionPass,SROAPass,SimplifyCFGPass,TailCallElimPass