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

; 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_QUEUE_STRUCT = type { i64, ptr, i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, i32, ptr, 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_queue_send(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 ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %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 8, 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 4, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  store i32 0, ptr %15, align 4, !tbaa !11
  %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_QUEUE_STRUCT, ptr %18, i32 0, i32 11
  %20 = load i32, ptr %19, align 8, !tbaa !13
  store i32 %20, ptr %12, align 4, !tbaa !11
  %21 = load ptr, ptr %4, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.TX_QUEUE_STRUCT, ptr %21, i32 0, i32 5
  %23 = load i32, ptr %22, align 4, !tbaa !15
  %24 = icmp ne i32 %23, 0
  br i1 %24, label %25, label %168

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

28:                                               ; preds = %25
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.TX_QUEUE_STRUCT, ptr %29, i32 0, i32 5
  %31 = load i32, ptr %30, align 4, !tbaa !15
  %32 = add i32 %31, -1
  store i32 %32, ptr %30, align 4, !tbaa !15
  %33 = load ptr, ptr %4, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.TX_QUEUE_STRUCT, ptr %33, i32 0, i32 4
  %35 = load i32, ptr %34, align 8, !tbaa !16
  %36 = add i32 %35, 1
  store i32 %36, ptr %34, align 8, !tbaa !16
  %37 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %37, ptr %9, align 8, !tbaa !5
  %38 = load ptr, ptr %4, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.TX_QUEUE_STRUCT, ptr %38, i32 0, i32 9
  %40 = load ptr, ptr %39, align 8, !tbaa !17
  store ptr %40, ptr %10, align 8, !tbaa !5
  %41 = load ptr, ptr %4, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.TX_QUEUE_STRUCT, ptr %41, i32 0, i32 2
  %43 = load i32, ptr %42, align 8, !tbaa !18
  store i32 %43, ptr %11, align 4, !tbaa !11
  %44 = load ptr, ptr %9, align 8, !tbaa !5
  %45 = getelementptr inbounds i64, ptr %44, i32 1
  store ptr %45, ptr %9, align 8, !tbaa !5
  %46 = load i64, ptr %44, align 8, !tbaa !9
  %47 = load ptr, ptr %10, align 8, !tbaa !5
  %48 = getelementptr inbounds i64, ptr %47, i32 1
  store ptr %48, ptr %10, align 8, !tbaa !5
  store i64 %46, ptr %47, align 8, !tbaa !9
  %49 = load i32, ptr %11, align 4, !tbaa !11
  %50 = icmp ugt i32 %49, 1
  br i1 %50, label %51, label %63

51:                                               ; preds = %28
  br label %52

52:                                               ; preds = %56, %51
  %53 = load i32, ptr %11, align 4, !tbaa !11
  %54 = add i32 %53, -1
  store i32 %54, ptr %11, align 4, !tbaa !11
  %55 = icmp ne i32 %54, 0
  br i1 %55, label %56, label %62

56:                                               ; preds = %52
  %57 = load ptr, ptr %9, align 8, !tbaa !5
  %58 = getelementptr inbounds i64, ptr %57, i32 1
  store ptr %58, ptr %9, align 8, !tbaa !5
  %59 = load i64, ptr %57, align 8, !tbaa !9
  %60 = load ptr, ptr %10, align 8, !tbaa !5
  %61 = getelementptr inbounds i64, ptr %60, i32 1
  store ptr %61, ptr %10, align 8, !tbaa !5
  store i64 %59, ptr %60, align 8, !tbaa !9
  br label %52, !llvm.loop !19

62:                                               ; preds = %52
  br label %63

63:                                               ; preds = %62, %28
  %64 = load ptr, ptr %10, align 8, !tbaa !5
  %65 = load ptr, ptr %4, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.TX_QUEUE_STRUCT, ptr %65, i32 0, i32 7
  %67 = load ptr, ptr %66, align 8, !tbaa !21
  %68 = icmp eq ptr %64, %67
  br i1 %68, label %69, label %73

69:                                               ; preds = %63
  %70 = load ptr, ptr %4, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.TX_QUEUE_STRUCT, ptr %70, i32 0, i32 6
  %72 = load ptr, ptr %71, align 8, !tbaa !22
  store ptr %72, ptr %10, align 8, !tbaa !5
  br label %73

73:                                               ; preds = %69, %63
  %74 = load ptr, ptr %10, align 8, !tbaa !5
  %75 = load ptr, ptr %4, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.TX_QUEUE_STRUCT, ptr %75, i32 0, i32 9
  store ptr %74, ptr %76, align 8, !tbaa !17
  %77 = load ptr, ptr %4, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.TX_QUEUE_STRUCT, ptr %77, i32 0, i32 14
  %79 = load ptr, ptr %78, align 8, !tbaa !23
  store ptr %79, ptr %16, align 8, !tbaa !5
  %80 = load i32, ptr %7, align 4, !tbaa !11
  call void @__restore_interrupt(i32 noundef %80)
  %81 = load ptr, ptr %16, align 8, !tbaa !5
  %82 = icmp ne ptr %81, null
  br i1 %82, label %83, label %86

83:                                               ; preds = %73
  %84 = load ptr, ptr %16, align 8, !tbaa !5
  %85 = load ptr, ptr %4, align 8, !tbaa !5
  call void %84(ptr noundef %85)
  br label %86

86:                                               ; preds = %83, %73
  br label %167

87:                                               ; preds = %25
  %88 = load ptr, ptr %4, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.TX_QUEUE_STRUCT, ptr %88, i32 0, i32 10
  %90 = load ptr, ptr %89, align 8, !tbaa !24
  store ptr %90, ptr %8, align 8, !tbaa !5
  %91 = load i32, ptr %12, align 4, !tbaa !11
  %92 = add i32 %91, -1
  store i32 %92, ptr %12, align 4, !tbaa !11
  %93 = load i32, ptr %12, align 4, !tbaa !11
  %94 = icmp eq i32 %93, 0
  br i1 %94, label %95, label %98

95:                                               ; preds = %87
  %96 = load ptr, ptr %4, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.TX_QUEUE_STRUCT, ptr %96, i32 0, i32 10
  store ptr null, ptr %97, align 8, !tbaa !24
  br label %119

98:                                               ; preds = %87
  %99 = load ptr, ptr %8, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %99, i32 0, i32 22
  %101 = load ptr, ptr %100, align 8, !tbaa !25
  %102 = load ptr, ptr %4, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.TX_QUEUE_STRUCT, ptr %102, i32 0, i32 10
  store ptr %101, ptr %103, align 8, !tbaa !24
  %104 = load ptr, ptr %8, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %104, i32 0, i32 22
  %106 = load ptr, ptr %105, align 8, !tbaa !25
  store ptr %106, ptr %13, align 8, !tbaa !5
  %107 = load ptr, ptr %13, align 8, !tbaa !5
  %108 = load ptr, ptr %4, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.TX_QUEUE_STRUCT, ptr %108, i32 0, i32 10
  store ptr %107, ptr %109, align 8, !tbaa !24
  %110 = load ptr, ptr %8, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %110, i32 0, i32 23
  %112 = load ptr, ptr %111, align 8, !tbaa !28
  store ptr %112, ptr %14, align 8, !tbaa !5
  %113 = load ptr, ptr %14, align 8, !tbaa !5
  %114 = load ptr, ptr %13, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %114, i32 0, i32 23
  store ptr %113, ptr %115, align 8, !tbaa !28
  %116 = load ptr, ptr %13, align 8, !tbaa !5
  %117 = load ptr, ptr %14, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %117, i32 0, i32 22
  store ptr %116, ptr %118, align 8, !tbaa !25
  br label %119

119:                                              ; preds = %98, %95
  %120 = load i32, ptr %12, align 4, !tbaa !11
  %121 = load ptr, ptr %4, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.TX_QUEUE_STRUCT, ptr %121, i32 0, i32 11
  store i32 %120, ptr %122, align 8, !tbaa !13
  %123 = load ptr, ptr %8, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %123, i32 0, i32 20
  store ptr null, ptr %124, align 8, !tbaa !29
  %125 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %125, ptr %9, align 8, !tbaa !5
  %126 = load ptr, ptr %8, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %126, i32 0, i32 25
  %128 = load ptr, ptr %127, align 8, !tbaa !30
  store ptr %128, ptr %10, align 8, !tbaa !5
  %129 = load ptr, ptr %4, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.TX_QUEUE_STRUCT, ptr %129, i32 0, i32 2
  %131 = load i32, ptr %130, align 8, !tbaa !18
  store i32 %131, ptr %11, align 4, !tbaa !11
  %132 = load ptr, ptr %9, align 8, !tbaa !5
  %133 = getelementptr inbounds i64, ptr %132, i32 1
  store ptr %133, ptr %9, align 8, !tbaa !5
  %134 = load i64, ptr %132, align 8, !tbaa !9
  %135 = load ptr, ptr %10, align 8, !tbaa !5
  %136 = getelementptr inbounds i64, ptr %135, i32 1
  store ptr %136, ptr %10, align 8, !tbaa !5
  store i64 %134, ptr %135, align 8, !tbaa !9
  %137 = load i32, ptr %11, align 4, !tbaa !11
  %138 = icmp ugt i32 %137, 1
  br i1 %138, label %139, label %151

139:                                              ; preds = %119
  br label %140

140:                                              ; preds = %144, %139
  %141 = load i32, ptr %11, align 4, !tbaa !11
  %142 = add i32 %141, -1
  store i32 %142, ptr %11, align 4, !tbaa !11
  %143 = icmp ne i32 %142, 0
  br i1 %143, label %144, label %150

144:                                              ; preds = %140
  %145 = load ptr, ptr %9, align 8, !tbaa !5
  %146 = getelementptr inbounds i64, ptr %145, i32 1
  store ptr %146, ptr %9, align 8, !tbaa !5
  %147 = load i64, ptr %145, align 8, !tbaa !9
  %148 = load ptr, ptr %10, align 8, !tbaa !5
  %149 = getelementptr inbounds i64, ptr %148, i32 1
  store ptr %149, ptr %10, align 8, !tbaa !5
  store i64 %147, ptr %148, align 8, !tbaa !9
  br label %140, !llvm.loop !31

150:                                              ; preds = %140
  br label %151

151:                                              ; preds = %150, %119
  %152 = load ptr, ptr %8, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %152, i32 0, i32 27
  store i32 0, ptr %153, align 4, !tbaa !32
  %154 = load ptr, ptr %4, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct.TX_QUEUE_STRUCT, ptr %154, i32 0, i32 14
  %156 = load ptr, ptr %155, align 8, !tbaa !23
  store ptr %156, ptr %16, align 8, !tbaa !5
  %157 = load volatile i32, ptr @_tx_thread_preempt_disable, align 4, !tbaa !11
  %158 = add i32 %157, 1
  store volatile i32 %158, ptr @_tx_thread_preempt_disable, align 4, !tbaa !11
  %159 = load i32, ptr %7, align 4, !tbaa !11
  call void @__restore_interrupt(i32 noundef %159)
  %160 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_tx_thread_system_resume(ptr noundef %160)
  %161 = load ptr, ptr %16, align 8, !tbaa !5
  %162 = icmp ne ptr %161, null
  br i1 %162, label %163, label %166

163:                                              ; preds = %151
  %164 = load ptr, ptr %16, align 8, !tbaa !5
  %165 = load ptr, ptr %4, align 8, !tbaa !5
  call void %164(ptr noundef %165)
  br label %166

166:                                              ; preds = %163, %151
  br label %167

167:                                              ; preds = %166, %86
  br label %262

168:                                              ; preds = %3
  %169 = load i64, ptr %6, align 8, !tbaa !9
  %170 = icmp ne i64 %169, 0
  br i1 %170, label %171, label %259

171:                                              ; preds = %168
  %172 = load volatile i32, ptr @_tx_thread_preempt_disable, align 4, !tbaa !11
  %173 = icmp ne i32 %172, 0
  br i1 %173, label %174, label %176

174:                                              ; preds = %171
  %175 = load i32, ptr %7, align 4, !tbaa !11
  call void @__restore_interrupt(i32 noundef %175)
  store i32 11, ptr %15, align 4, !tbaa !11
  br label %258

176:                                              ; preds = %171
  %177 = load ptr, ptr @_tx_thread_current_ptr, align 8, !tbaa !5
  store ptr %177, ptr %8, align 8, !tbaa !5
  %178 = load ptr, ptr %8, align 8, !tbaa !5
  %179 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %178, i32 0, i32 20
  store ptr @_tx_queue_cleanup, ptr %179, align 8, !tbaa !29
  %180 = load ptr, ptr %4, align 8, !tbaa !5
  %181 = load ptr, ptr %8, align 8, !tbaa !5
  %182 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %181, i32 0, i32 21
  store ptr %180, ptr %182, align 8, !tbaa !33
  %183 = load ptr, ptr %5, align 8, !tbaa !5
  %184 = load ptr, ptr %8, align 8, !tbaa !5
  %185 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %184, i32 0, i32 25
  store ptr %183, ptr %185, align 8, !tbaa !30
  %186 = load ptr, ptr %8, align 8, !tbaa !5
  %187 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %186, i32 0, i32 26
  store i32 0, ptr %187, align 8, !tbaa !34
  %188 = load ptr, ptr %8, align 8, !tbaa !5
  %189 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %188, i32 0, i32 39
  %190 = load i64, ptr %189, align 8, !tbaa !35
  %191 = add i64 %190, 1
  store i64 %191, ptr %189, align 8, !tbaa !35
  %192 = load i32, ptr %12, align 4, !tbaa !11
  %193 = icmp eq i32 %192, 0
  br i1 %193, label %194, label %204

194:                                              ; preds = %176
  %195 = load ptr, ptr %8, align 8, !tbaa !5
  %196 = load ptr, ptr %4, align 8, !tbaa !5
  %197 = getelementptr inbounds %struct.TX_QUEUE_STRUCT, ptr %196, i32 0, i32 10
  store ptr %195, ptr %197, align 8, !tbaa !24
  %198 = load ptr, ptr %8, align 8, !tbaa !5
  %199 = load ptr, ptr %8, align 8, !tbaa !5
  %200 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %199, i32 0, i32 22
  store ptr %198, ptr %200, align 8, !tbaa !25
  %201 = load ptr, ptr %8, align 8, !tbaa !5
  %202 = load ptr, ptr %8, align 8, !tbaa !5
  %203 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %202, i32 0, i32 23
  store ptr %201, ptr %203, align 8, !tbaa !28
  br label %223

204:                                              ; preds = %176
  %205 = load ptr, ptr %4, align 8, !tbaa !5
  %206 = getelementptr inbounds %struct.TX_QUEUE_STRUCT, ptr %205, i32 0, i32 10
  %207 = load ptr, ptr %206, align 8, !tbaa !24
  store ptr %207, ptr %13, align 8, !tbaa !5
  %208 = load ptr, ptr %13, align 8, !tbaa !5
  %209 = load ptr, ptr %8, align 8, !tbaa !5
  %210 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %209, i32 0, i32 22
  store ptr %208, ptr %210, align 8, !tbaa !25
  %211 = load ptr, ptr %13, align 8, !tbaa !5
  %212 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %211, i32 0, i32 23
  %213 = load ptr, ptr %212, align 8, !tbaa !28
  store ptr %213, ptr %14, align 8, !tbaa !5
  %214 = load ptr, ptr %14, align 8, !tbaa !5
  %215 = load ptr, ptr %8, align 8, !tbaa !5
  %216 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %215, i32 0, i32 23
  store ptr %214, ptr %216, align 8, !tbaa !28
  %217 = load ptr, ptr %8, align 8, !tbaa !5
  %218 = load ptr, ptr %14, align 8, !tbaa !5
  %219 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %218, i32 0, i32 22
  store ptr %217, ptr %219, align 8, !tbaa !25
  %220 = load ptr, ptr %8, align 8, !tbaa !5
  %221 = load ptr, ptr %13, align 8, !tbaa !5
  %222 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %221, i32 0, i32 23
  store ptr %220, ptr %222, align 8, !tbaa !28
  br label %223

223:                                              ; preds = %204, %194
  %224 = load i32, ptr %12, align 4, !tbaa !11
  %225 = add i32 %224, 1
  %226 = load ptr, ptr %4, align 8, !tbaa !5
  %227 = getelementptr inbounds %struct.TX_QUEUE_STRUCT, ptr %226, i32 0, i32 11
  store i32 %225, ptr %227, align 8, !tbaa !13
  %228 = load ptr, ptr %8, align 8, !tbaa !5
  %229 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %228, i32 0, i32 12
  store i32 5, ptr %229, align 4, !tbaa !36
  %230 = load ptr, ptr %4, align 8, !tbaa !5
  %231 = getelementptr inbounds %struct.TX_QUEUE_STRUCT, ptr %230, i32 0, i32 14
  %232 = load ptr, ptr %231, align 8, !tbaa !23
  store ptr %232, ptr %16, align 8, !tbaa !5
  %233 = load ptr, ptr %8, align 8, !tbaa !5
  %234 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %233, i32 0, i32 14
  store i32 1, ptr %234, align 4, !tbaa !37
  %235 = load i64, ptr %6, align 8, !tbaa !9
  %236 = load ptr, ptr %8, align 8, !tbaa !5
  %237 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %236, i32 0, i32 19
  %238 = getelementptr inbounds %struct.TX_TIMER_INTERNAL_STRUCT, ptr %237, i32 0, i32 0
  store i64 %235, ptr %238, align 8, !tbaa !38
  %239 = load volatile i32, ptr @_tx_thread_preempt_disable, align 4, !tbaa !11
  %240 = add i32 %239, 1
  store volatile i32 %240, ptr @_tx_thread_preempt_disable, align 4, !tbaa !11
  %241 = load i32, ptr %7, align 4, !tbaa !11
  call void @__restore_interrupt(i32 noundef %241)
  %242 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_tx_thread_system_suspend(ptr noundef %242)
  %243 = load ptr, ptr %8, align 8, !tbaa !5
  %244 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %243, i32 0, i32 27
  %245 = load i32, ptr %244, align 4, !tbaa !32
  %246 = icmp eq i32 %245, 0
  br i1 %246, label %247, label %254

247:                                              ; preds = %223
  %248 = load ptr, ptr %16, align 8, !tbaa !5
  %249 = icmp ne ptr %248, null
  br i1 %249, label %250, label %253

250:                                              ; preds = %247
  %251 = load ptr, ptr %16, align 8, !tbaa !5
  %252 = load ptr, ptr %4, align 8, !tbaa !5
  call void %251(ptr noundef %252)
  br label %253

253:                                              ; preds = %250, %247
  br label %254

254:                                              ; preds = %253, %223
  %255 = load ptr, ptr %8, align 8, !tbaa !5
  %256 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %255, i32 0, i32 27
  %257 = load i32, ptr %256, align 4, !tbaa !32
  store i32 %257, ptr %15, align 4, !tbaa !11
  br label %258

258:                                              ; preds = %254, %174
  br label %261

259:                                              ; preds = %168
  %260 = load i32, ptr %7, align 4, !tbaa !11
  call void @__restore_interrupt(i32 noundef %260)
  store i32 11, ptr %15, align 4, !tbaa !11
  br label %261

261:                                              ; preds = %259, %258
  br label %262

262:                                              ; preds = %261, %167
  %263 = load i32, ptr %15, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, 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 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  ret i32 %263
}

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

declare void @_tx_queue_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 72}
!14 = !{!"TX_QUEUE_STRUCT", !10, i64 0, !6, i64 8, !12, i64 16, !12, i64 20, !12, i64 24, !12, i64 28, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !12, i64 72, !6, i64 80, !6, i64 88, !6, i64 96}
!15 = !{!14, !12, i64 28}
!16 = !{!14, !12, i64 24}
!17 = !{!14, !6, i64 56}
!18 = !{!14, !12, i64 16}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!14, !6, i64 40}
!22 = !{!14, !6, i64 32}
!23 = !{!14, !6, i64 96}
!24 = !{!14, !6, i64 64}
!25 = !{!26, !6, i64 208}
!26 = !{!"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, !27, 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}
!27 = !{!"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}
!28 = !{!26, !6, i64 216}
!29 = !{!26, !6, i64 192}
!30 = !{!26, !6, i64 232}
!31 = distinct !{!31, !20}
!32 = !{!26, !12, i64 244}
!33 = !{!26, !6, i64 200}
!34 = !{!26, !12, i64 240}
!35 = !{!26, !10, i64 320}
!36 = !{!26, !12, i64 92}
!37 = !{!26, !12, i64 100}
!38 = !{!26, !10, i64 136}


; 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_queue_send(ptr noundef %0, ptr noundef %1, i64 noundef %2) local_unnamed_addr #0 {
  %4 = ptrtoint ptr %1 to i64
  %5 = tail call i32 @__disable_interrupts()
  %6 = getelementptr inbounds i8, ptr %0, i64 72
  %7 = load i32, ptr %6, align 8, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %0, i64 28
  %9 = load i32, ptr %8, align 4, !tbaa !12
  %.not = icmp eq i32 %9, 0
  br i1 %.not, label %118, label %10

10:                                               ; preds = %3
  %11 = icmp eq i32 %7, 0
  br i1 %11, label %12, label %67

12:                                               ; preds = %10
  %13 = add i32 %9, -1
  store i32 %13, ptr %8, align 4, !tbaa !12
  %14 = getelementptr inbounds i8, ptr %0, i64 24
  %15 = load i32, ptr %14, align 8, !tbaa !13
  %16 = add i32 %15, 1
  store i32 %16, ptr %14, align 8, !tbaa !13
  %17 = getelementptr inbounds i8, ptr %0, i64 56
  %18 = load ptr, ptr %17, align 8, !tbaa !14
  %19 = getelementptr inbounds i8, ptr %0, i64 16
  %20 = load i32, ptr %19, align 8, !tbaa !15
  %21 = load i64, ptr %1, align 8, !tbaa !16
  %22 = getelementptr i8, ptr %18, i64 8
  store i64 %21, ptr %18, align 8, !tbaa !16
  %or.cond131 = icmp ult i32 %20, 2
  br i1 %or.cond131, label %.loopexit, label %.lr.ph130.preheader

.lr.ph130.preheader:                              ; preds = %12
  %23 = ptrtoint ptr %18 to i64
  %24 = add i32 %20, -1
  %25 = zext i32 %24 to i64
  %min.iters.check148 = icmp ult i32 %20, 7
  %26 = sub i64 %23, %4
  %diff.check145 = icmp ult i64 %26, 32
  %or.cond171 = or i1 %min.iters.check148, %diff.check145
  br i1 %or.cond171, label %.lr.ph130.preheader173, label %vector.ph149

vector.ph149:                                     ; preds = %.lr.ph130.preheader
  %n.vec151 = and i64 %25, 4294967292
  %.cast152 = trunc nuw i64 %n.vec151 to i32
  %ind.end153 = sub i32 %24, %.cast152
  %27 = shl nuw nsw i64 %n.vec151, 3
  %ind.end155 = getelementptr i8, ptr %22, i64 %27
  %28 = shl nuw nsw i64 %n.vec151, 3
  %ind.end157 = getelementptr i8, ptr %1, i64 %28
  br label %vector.body159

vector.body159:                                   ; preds = %vector.body159, %vector.ph149
  %index160 = phi i64 [ 0, %vector.ph149 ], [ %index.next169, %vector.body159 ]
  %offset.idx161 = shl i64 %index160, 3
  %next.gep162 = getelementptr i8, ptr %22, i64 %offset.idx161
  %offset.idx164 = shl i64 %index160, 3
  %next.gep165 = getelementptr i8, ptr %1, i64 %offset.idx164
  %29 = getelementptr inbounds i8, ptr %next.gep165, i64 8
  %30 = getelementptr inbounds i8, ptr %next.gep165, i64 24
  %wide.load167 = load <2 x i64>, ptr %29, align 8, !tbaa !16
  %wide.load168 = load <2 x i64>, ptr %30, align 8, !tbaa !16
  %31 = getelementptr i8, ptr %next.gep162, i64 16
  store <2 x i64> %wide.load167, ptr %next.gep162, align 8, !tbaa !16
  store <2 x i64> %wide.load168, ptr %31, align 8, !tbaa !16
  %index.next169 = add nuw i64 %index160, 4
  %32 = icmp eq i64 %index.next169, %n.vec151
  br i1 %32, label %middle.block146, label %vector.body159, !llvm.loop !17

middle.block146:                                  ; preds = %vector.body159
  %cmp.n170 = icmp eq i64 %n.vec151, %25
  br i1 %cmp.n170, label %.loopexit, label %.lr.ph130.preheader173

.lr.ph130.preheader173:                           ; preds = %middle.block146, %.lr.ph130.preheader
  %.ph = phi i32 [ %24, %.lr.ph130.preheader ], [ %ind.end153, %middle.block146 ]
  %.0100129.ph = phi ptr [ %22, %.lr.ph130.preheader ], [ %ind.end155, %middle.block146 ]
  %.pn121128.ph = phi ptr [ %1, %.lr.ph130.preheader ], [ %ind.end157, %middle.block146 ]
  %33 = add i32 %.ph, -1
  %xtraiter176 = and i32 %.ph, 7
  %lcmp.mod177.not = icmp eq i32 %xtraiter176, 0
  br i1 %lcmp.mod177.not, label %.lr.ph130.prol.loopexit, label %.lr.ph130.prol

.lr.ph130.prol:                                   ; preds = %.lr.ph130.preheader173, %.lr.ph130.prol
  %34 = phi i32 [ %37, %.lr.ph130.prol ], [ %.ph, %.lr.ph130.preheader173 ]
  %.0100129.prol = phi ptr [ %36, %.lr.ph130.prol ], [ %.0100129.ph, %.lr.ph130.preheader173 ]
  %.pn121128.prol = phi ptr [ %.0102.prol, %.lr.ph130.prol ], [ %.pn121128.ph, %.lr.ph130.preheader173 ]
  %prol.iter178 = phi i32 [ %prol.iter178.next, %.lr.ph130.prol ], [ 0, %.lr.ph130.preheader173 ]
  %.0102.prol = getelementptr inbounds i8, ptr %.pn121128.prol, i64 8
  %35 = load i64, ptr %.0102.prol, align 8, !tbaa !16
  %36 = getelementptr inbounds i8, ptr %.0100129.prol, i64 8
  store i64 %35, ptr %.0100129.prol, align 8, !tbaa !16
  %37 = add i32 %34, -1
  %prol.iter178.next = add i32 %prol.iter178, 1
  %prol.iter178.cmp.not = icmp eq i32 %prol.iter178.next, %xtraiter176
  br i1 %prol.iter178.cmp.not, label %.lr.ph130.prol.loopexit, label %.lr.ph130.prol, !llvm.loop !21

.lr.ph130.prol.loopexit:                          ; preds = %.lr.ph130.prol, %.lr.ph130.preheader173
  %.lcssa.unr = phi ptr [ poison, %.lr.ph130.preheader173 ], [ %36, %.lr.ph130.prol ]
  %.unr179 = phi i32 [ %.ph, %.lr.ph130.preheader173 ], [ %37, %.lr.ph130.prol ]
  %.0100129.unr = phi ptr [ %.0100129.ph, %.lr.ph130.preheader173 ], [ %36, %.lr.ph130.prol ]
  %.pn121128.unr = phi ptr [ %.pn121128.ph, %.lr.ph130.preheader173 ], [ %.0102.prol, %.lr.ph130.prol ]
  %38 = icmp ult i32 %33, 7
  br i1 %38, label %.loopexit, label %.lr.ph130

.lr.ph130:                                        ; preds = %.lr.ph130.prol.loopexit, %.lr.ph130
  %39 = phi i32 [ %56, %.lr.ph130 ], [ %.unr179, %.lr.ph130.prol.loopexit ]
  %.0100129 = phi ptr [ %55, %.lr.ph130 ], [ %.0100129.unr, %.lr.ph130.prol.loopexit ]
  %.pn121128 = phi ptr [ %.0102.7, %.lr.ph130 ], [ %.pn121128.unr, %.lr.ph130.prol.loopexit ]
  %.0102 = getelementptr inbounds i8, ptr %.pn121128, i64 8
  %40 = load i64, ptr %.0102, align 8, !tbaa !16
  %41 = getelementptr inbounds i8, ptr %.0100129, i64 8
  store i64 %40, ptr %.0100129, align 8, !tbaa !16
  %.0102.1 = getelementptr inbounds i8, ptr %.pn121128, i64 16
  %42 = load i64, ptr %.0102.1, align 8, !tbaa !16
  %43 = getelementptr inbounds i8, ptr %.0100129, i64 16
  store i64 %42, ptr %41, align 8, !tbaa !16
  %.0102.2 = getelementptr inbounds i8, ptr %.pn121128, i64 24
  %44 = load i64, ptr %.0102.2, align 8, !tbaa !16
  %45 = getelementptr inbounds i8, ptr %.0100129, i64 24
  store i64 %44, ptr %43, align 8, !tbaa !16
  %.0102.3 = getelementptr inbounds i8, ptr %.pn121128, i64 32
  %46 = load i64, ptr %.0102.3, align 8, !tbaa !16
  %47 = getelementptr inbounds i8, ptr %.0100129, i64 32
  store i64 %46, ptr %45, align 8, !tbaa !16
  %.0102.4 = getelementptr inbounds i8, ptr %.pn121128, i64 40
  %48 = load i64, ptr %.0102.4, align 8, !tbaa !16
  %49 = getelementptr inbounds i8, ptr %.0100129, i64 40
  store i64 %48, ptr %47, align 8, !tbaa !16
  %.0102.5 = getelementptr inbounds i8, ptr %.pn121128, i64 48
  %50 = load i64, ptr %.0102.5, align 8, !tbaa !16
  %51 = getelementptr inbounds i8, ptr %.0100129, i64 48
  store i64 %50, ptr %49, align 8, !tbaa !16
  %.0102.6 = getelementptr inbounds i8, ptr %.pn121128, i64 56
  %52 = load i64, ptr %.0102.6, align 8, !tbaa !16
  %53 = getelementptr inbounds i8, ptr %.0100129, i64 56
  store i64 %52, ptr %51, align 8, !tbaa !16
  %.0102.7 = getelementptr inbounds i8, ptr %.pn121128, i64 64
  %54 = load i64, ptr %.0102.7, align 8, !tbaa !16
  %55 = getelementptr inbounds i8, ptr %.0100129, i64 64
  store i64 %54, ptr %53, align 8, !tbaa !16
  %56 = add i32 %39, -8
  %.not119.7 = icmp eq i32 %56, 0
  br i1 %.not119.7, label %.loopexit, label %.lr.ph130, !llvm.loop !23

.loopexit:                                        ; preds = %.lr.ph130.prol.loopexit, %.lr.ph130, %middle.block146, %12
  %.1101 = phi ptr [ %22, %12 ], [ %ind.end155, %middle.block146 ], [ %.lcssa.unr, %.lr.ph130.prol.loopexit ], [ %55, %.lr.ph130 ]
  %57 = getelementptr inbounds i8, ptr %0, i64 40
  %58 = load ptr, ptr %57, align 8, !tbaa !24
  %59 = icmp eq ptr %.1101, %58
  br i1 %59, label %60, label %63

60:                                               ; preds = %.loopexit
  %61 = getelementptr inbounds i8, ptr %0, i64 32
  %62 = load ptr, ptr %61, align 8, !tbaa !25
  br label %63

63:                                               ; preds = %60, %.loopexit
  %.2 = phi ptr [ %62, %60 ], [ %.1101, %.loopexit ]
  store ptr %.2, ptr %17, align 8, !tbaa !14
  %64 = getelementptr inbounds i8, ptr %0, i64 96
  %65 = load ptr, ptr %64, align 8, !tbaa !26
  tail call void @__restore_interrupt(i32 noundef %5)
  %.not120 = icmp eq ptr %65, null
  br i1 %.not120, label %157, label %66

66:                                               ; preds = %63
  tail call void %65(ptr noundef nonnull %0) #3
  br label %157

67:                                               ; preds = %10
  %68 = getelementptr inbounds i8, ptr %0, i64 64
  %69 = load ptr, ptr %68, align 8, !tbaa !27
  %70 = add i32 %7, -1
  %71 = icmp eq i32 %70, 0
  br i1 %71, label %79, label %72

72:                                               ; preds = %67
  %73 = getelementptr inbounds i8, ptr %69, i64 208
  %74 = load ptr, ptr %73, align 8, !tbaa !28
  %75 = getelementptr inbounds i8, ptr %69, i64 216
  %76 = load ptr, ptr %75, align 8, !tbaa !31
  %77 = getelementptr inbounds i8, ptr %74, i64 216
  store ptr %76, ptr %77, align 8, !tbaa !31
  %78 = getelementptr inbounds i8, ptr %76, i64 208
  store ptr %74, ptr %78, align 8, !tbaa !28
  br label %79

79:                                               ; preds = %67, %72
  %.sink = phi ptr [ %74, %72 ], [ null, %67 ]
  store ptr %.sink, ptr %68, align 8
  store i32 %70, ptr %6, align 8, !tbaa !5
  %80 = getelementptr inbounds i8, ptr %69, i64 192
  store ptr null, ptr %80, align 8, !tbaa !32
  %81 = getelementptr inbounds i8, ptr %69, i64 232
  %82 = load ptr, ptr %81, align 8, !tbaa !33
  %83 = getelementptr inbounds i8, ptr %0, i64 16
  %84 = load i32, ptr %83, align 8, !tbaa !15
  %85 = load i64, ptr %1, align 8, !tbaa !16
  store i64 %85, ptr %82, align 8, !tbaa !16
  %or.cond132 = icmp ult i32 %84, 2
  br i1 %or.cond132, label %.loopexit123, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %79
  %86 = ptrtoint ptr %82 to i64
  %87 = add i32 %84, -1
  %88 = zext i32 %87 to i64
  %min.iters.check = icmp ult i32 %84, 7
  %89 = sub i64 %86, %4
  %diff.check = icmp ult i64 %89, 32
  %or.cond172 = or i1 %min.iters.check, %diff.check
  br i1 %or.cond172, label %.lr.ph.preheader174, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph.preheader
  %n.vec = and i64 %88, 4294967292
  %.cast = trunc nuw i64 %n.vec to i32
  %ind.end = sub i32 %87, %.cast
  %90 = shl nuw nsw i64 %n.vec, 3
  %ind.end135 = getelementptr i8, ptr %82, i64 %90
  %91 = shl nuw nsw i64 %n.vec, 3
  %ind.end137 = getelementptr i8, ptr %1, i64 %91
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %offset.idx = shl i64 %index, 3
  %next.gep = getelementptr i8, ptr %82, i64 %offset.idx
  %offset.idx140 = shl i64 %index, 3
  %next.gep141 = getelementptr i8, ptr %1, i64 %offset.idx140
  %92 = getelementptr inbounds i8, ptr %next.gep, i64 8
  %93 = getelementptr inbounds i8, ptr %next.gep141, i64 8
  %94 = getelementptr inbounds i8, ptr %next.gep141, i64 24
  %wide.load = load <2 x i64>, ptr %93, align 8, !tbaa !16
  %wide.load143 = load <2 x i64>, ptr %94, align 8, !tbaa !16
  %95 = getelementptr inbounds i8, ptr %next.gep, i64 24
  store <2 x i64> %wide.load, ptr %92, align 8, !tbaa !16
  store <2 x i64> %wide.load143, ptr %95, align 8, !tbaa !16
  %index.next = add nuw i64 %index, 4
  %96 = icmp eq i64 %index.next, %n.vec
  br i1 %96, label %middle.block, label %vector.body, !llvm.loop !34

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %88
  br i1 %cmp.n, label %.loopexit123, label %.lr.ph.preheader174

.lr.ph.preheader174:                              ; preds = %middle.block, %.lr.ph.preheader
  %.ph175 = phi i32 [ %87, %.lr.ph.preheader ], [ %ind.end, %middle.block ]
  %.pn118126.ph = phi ptr [ %82, %.lr.ph.preheader ], [ %ind.end135, %middle.block ]
  %.pn125.ph = phi ptr [ %1, %.lr.ph.preheader ], [ %ind.end137, %middle.block ]
  %97 = add i32 %.ph175, -1
  %xtraiter = and i32 %.ph175, 7
  %lcmp.mod.not = icmp eq i32 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.lr.ph.prol.loopexit, label %.lr.ph.prol

.lr.ph.prol:                                      ; preds = %.lr.ph.preheader174, %.lr.ph.prol
  %98 = phi i32 [ %100, %.lr.ph.prol ], [ %.ph175, %.lr.ph.preheader174 ]
  %.pn118126.prol = phi ptr [ %.3.prol, %.lr.ph.prol ], [ %.pn118126.ph, %.lr.ph.preheader174 ]
  %.pn125.prol = phi ptr [ %.1103.prol, %.lr.ph.prol ], [ %.pn125.ph, %.lr.ph.preheader174 ]
  %prol.iter = phi i32 [ %prol.iter.next, %.lr.ph.prol ], [ 0, %.lr.ph.preheader174 ]
  %.3.prol = getelementptr inbounds i8, ptr %.pn118126.prol, i64 8
  %.1103.prol = getelementptr inbounds i8, ptr %.pn125.prol, i64 8
  %99 = load i64, ptr %.1103.prol, align 8, !tbaa !16
  store i64 %99, ptr %.3.prol, align 8, !tbaa !16
  %100 = add i32 %98, -1
  %prol.iter.next = add i32 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i32 %prol.iter.next, %xtraiter
  br i1 %prol.iter.cmp.not, label %.lr.ph.prol.loopexit, label %.lr.ph.prol, !llvm.loop !35

.lr.ph.prol.loopexit:                             ; preds = %.lr.ph.prol, %.lr.ph.preheader174
  %.unr = phi i32 [ %.ph175, %.lr.ph.preheader174 ], [ %100, %.lr.ph.prol ]
  %.pn118126.unr = phi ptr [ %.pn118126.ph, %.lr.ph.preheader174 ], [ %.3.prol, %.lr.ph.prol ]
  %.pn125.unr = phi ptr [ %.pn125.ph, %.lr.ph.preheader174 ], [ %.1103.prol, %.lr.ph.prol ]
  %101 = icmp ult i32 %97, 7
  br i1 %101, label %.loopexit123, label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.prol.loopexit, %.lr.ph
  %102 = phi i32 [ %111, %.lr.ph ], [ %.unr, %.lr.ph.prol.loopexit ]
  %.pn118126 = phi ptr [ %.3.7, %.lr.ph ], [ %.pn118126.unr, %.lr.ph.prol.loopexit ]
  %.pn125 = phi ptr [ %.1103.7, %.lr.ph ], [ %.pn125.unr, %.lr.ph.prol.loopexit ]
  %.3 = getelementptr inbounds i8, ptr %.pn118126, i64 8
  %.1103 = getelementptr inbounds i8, ptr %.pn125, i64 8
  %103 = load i64, ptr %.1103, align 8, !tbaa !16
  store i64 %103, ptr %.3, align 8, !tbaa !16
  %.3.1 = getelementptr inbounds i8, ptr %.pn118126, i64 16
  %.1103.1 = getelementptr inbounds i8, ptr %.pn125, i64 16
  %104 = load i64, ptr %.1103.1, align 8, !tbaa !16
  store i64 %104, ptr %.3.1, align 8, !tbaa !16
  %.3.2 = getelementptr inbounds i8, ptr %.pn118126, i64 24
  %.1103.2 = getelementptr inbounds i8, ptr %.pn125, i64 24
  %105 = load i64, ptr %.1103.2, align 8, !tbaa !16
  store i64 %105, ptr %.3.2, align 8, !tbaa !16
  %.3.3 = getelementptr inbounds i8, ptr %.pn118126, i64 32
  %.1103.3 = getelementptr inbounds i8, ptr %.pn125, i64 32
  %106 = load i64, ptr %.1103.3, align 8, !tbaa !16
  store i64 %106, ptr %.3.3, align 8, !tbaa !16
  %.3.4 = getelementptr inbounds i8, ptr %.pn118126, i64 40
  %.1103.4 = getelementptr inbounds i8, ptr %.pn125, i64 40
  %107 = load i64, ptr %.1103.4, align 8, !tbaa !16
  store i64 %107, ptr %.3.4, align 8, !tbaa !16
  %.3.5 = getelementptr inbounds i8, ptr %.pn118126, i64 48
  %.1103.5 = getelementptr inbounds i8, ptr %.pn125, i64 48
  %108 = load i64, ptr %.1103.5, align 8, !tbaa !16
  store i64 %108, ptr %.3.5, align 8, !tbaa !16
  %.3.6 = getelementptr inbounds i8, ptr %.pn118126, i64 56
  %.1103.6 = getelementptr inbounds i8, ptr %.pn125, i64 56
  %109 = load i64, ptr %.1103.6, align 8, !tbaa !16
  store i64 %109, ptr %.3.6, align 8, !tbaa !16
  %.3.7 = getelementptr inbounds i8, ptr %.pn118126, i64 64
  %.1103.7 = getelementptr inbounds i8, ptr %.pn125, i64 64
  %110 = load i64, ptr %.1103.7, align 8, !tbaa !16
  store i64 %110, ptr %.3.7, align 8, !tbaa !16
  %111 = add i32 %102, -8
  %.not116.7 = icmp eq i32 %111, 0
  br i1 %.not116.7, label %.loopexit123, label %.lr.ph, !llvm.loop !36

.loopexit123:                                     ; preds = %.lr.ph.prol.loopexit, %.lr.ph, %middle.block, %79
  %112 = getelementptr inbounds i8, ptr %69, i64 244
  store i32 0, ptr %112, align 4, !tbaa !37
  %113 = getelementptr inbounds i8, ptr %0, i64 96
  %114 = load ptr, ptr %113, align 8, !tbaa !26
  %115 = load volatile i32, ptr @_tx_thread_preempt_disable, align 4, !tbaa !38
  %116 = add i32 %115, 1
  store volatile i32 %116, ptr @_tx_thread_preempt_disable, align 4, !tbaa !38
  tail call void @__restore_interrupt(i32 noundef %5)
  tail call void @_tx_thread_system_resume(ptr noundef %69) #3
  %.not117 = icmp eq ptr %114, null
  br i1 %.not117, label %157, label %117

117:                                              ; preds = %.loopexit123
  tail call void %114(ptr noundef nonnull %0) #3
  br label %157

118:                                              ; preds = %3
  %.not114 = icmp eq i64 %2, 0
  br i1 %.not114, label %156, label %119

119:                                              ; preds = %118
  %120 = load volatile i32, ptr @_tx_thread_preempt_disable, align 4, !tbaa !38
  %.not115 = icmp eq i32 %120, 0
  br i1 %.not115, label %122, label %121

121:                                              ; preds = %119
  tail call void @__restore_interrupt(i32 noundef %5)
  br label %157

122:                                              ; preds = %119
  %123 = load ptr, ptr @_tx_thread_current_ptr, align 8, !tbaa !39
  %124 = getelementptr inbounds i8, ptr %123, i64 192
  store ptr @_tx_queue_cleanup, ptr %124, align 8, !tbaa !32
  %125 = getelementptr inbounds i8, ptr %123, i64 200
  store ptr %0, ptr %125, align 8, !tbaa !40
  %126 = getelementptr inbounds i8, ptr %123, i64 232
  store ptr %1, ptr %126, align 8, !tbaa !33
  %127 = getelementptr inbounds i8, ptr %123, i64 240
  store i32 0, ptr %127, align 8, !tbaa !41
  %128 = getelementptr inbounds i8, ptr %123, i64 320
  %129 = load i64, ptr %128, align 8, !tbaa !42
  %130 = add i64 %129, 1
  store i64 %130, ptr %128, align 8, !tbaa !42
  %131 = icmp eq i32 %7, 0
  %132 = getelementptr inbounds i8, ptr %0, i64 64
  %133 = getelementptr inbounds i8, ptr %123, i64 208
  br i1 %131, label %134, label %136

134:                                              ; preds = %122
  store ptr %123, ptr %132, align 8, !tbaa !27
  store ptr %123, ptr %133, align 8, !tbaa !28
  %135 = getelementptr inbounds i8, ptr %123, i64 216
  br label %142

136:                                              ; preds = %122
  %137 = load ptr, ptr %132, align 8, !tbaa !27
  store ptr %137, ptr %133, align 8, !tbaa !28
  %138 = getelementptr inbounds i8, ptr %137, i64 216
  %139 = load ptr, ptr %138, align 8, !tbaa !31
  %140 = getelementptr inbounds i8, ptr %123, i64 216
  store ptr %139, ptr %140, align 8, !tbaa !31
  %141 = getelementptr inbounds i8, ptr %139, i64 208
  store ptr %123, ptr %141, align 8, !tbaa !28
  br label %142

142:                                              ; preds = %136, %134
  %.sink134 = phi ptr [ %138, %136 ], [ %135, %134 ]
  store ptr %123, ptr %.sink134, align 8, !tbaa !31
  %143 = add i32 %7, 1
  store i32 %143, ptr %6, align 8, !tbaa !5
  %144 = getelementptr inbounds i8, ptr %123, i64 92
  store i32 5, ptr %144, align 4, !tbaa !43
  %145 = getelementptr inbounds i8, ptr %0, i64 96
  %146 = load ptr, ptr %145, align 8, !tbaa !26
  %147 = getelementptr inbounds i8, ptr %123, i64 100
  store i32 1, ptr %147, align 4, !tbaa !44
  %148 = getelementptr inbounds i8, ptr %123, i64 136
  store i64 %2, ptr %148, align 8, !tbaa !45
  %149 = load volatile i32, ptr @_tx_thread_preempt_disable, align 4, !tbaa !38
  %150 = add i32 %149, 1
  store volatile i32 %150, ptr @_tx_thread_preempt_disable, align 4, !tbaa !38
  tail call void @__restore_interrupt(i32 noundef %5)
  tail call void @_tx_thread_system_suspend(ptr noundef nonnull %123) #3
  %151 = getelementptr inbounds i8, ptr %123, i64 244
  %152 = load i32, ptr %151, align 4, !tbaa !37
  %153 = icmp eq i32 %152, 0
  %154 = icmp ne ptr %146, null
  %or.cond = select i1 %153, i1 %154, i1 false
  br i1 %or.cond, label %155, label %157

155:                                              ; preds = %142
  tail call void %146(ptr noundef nonnull %0) #3
  %.pre = load i32, ptr %151, align 4, !tbaa !37
  br label %157

156:                                              ; preds = %118
  tail call void @__restore_interrupt(i32 noundef %5)
  br label %157

157:                                              ; preds = %142, %155, %156, %121, %66, %63, %117, %.loopexit123
  %.0 = phi i32 [ 0, %66 ], [ 0, %63 ], [ 0, %117 ], [ 0, %.loopexit123 ], [ 11, %121 ], [ 11, %156 ], [ %.pre, %155 ], [ %152, %142 ]
  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_thread_system_resume(ptr noundef) local_unnamed_addr #2

declare void @_tx_queue_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 72}
!6 = !{!"TX_QUEUE_STRUCT", !7, i64 0, !10, i64 8, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !11, i64 72, !10, i64 80, !10, i64 88, !10, i64 96}
!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, !11, i64 28}
!13 = !{!6, !11, i64 24}
!14 = !{!6, !10, i64 56}
!15 = !{!6, !11, i64 16}
!16 = !{!7, !7, i64 0}
!17 = distinct !{!17, !18, !19, !20}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!"llvm.loop.isvectorized", i32 1}
!20 = !{!"llvm.loop.unroll.runtime.disable"}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.unroll.disable"}
!23 = distinct !{!23, !18, !19}
!24 = !{!6, !10, i64 40}
!25 = !{!6, !10, i64 32}
!26 = !{!6, !10, i64 96}
!27 = !{!6, !10, i64 64}
!28 = !{!29, !10, i64 208}
!29 = !{!"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, !30, 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}
!30 = !{!"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}
!31 = !{!29, !10, i64 216}
!32 = !{!29, !10, i64 192}
!33 = !{!29, !10, i64 232}
!34 = distinct !{!34, !18, !19, !20}
!35 = distinct !{!35, !22}
!36 = distinct !{!36, !18, !19}
!37 = !{!29, !11, i64 244}
!38 = !{!11, !11, i64 0}
!39 = !{!10, !10, i64 0}
!40 = !{!29, !10, i64 200}
!41 = !{!29, !11, i64 240}
!42 = !{!29, !7, i64 320}
!43 = !{!29, !11, i64 92}
!44 = !{!29, !11, i64 100}
!45 = !{!29, !7, i64 136}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,MergedLoadStoreMotionPass,SROAPass,SimplifyCFGPass,TailCallElimPass