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

; 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_receive(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
  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
  store i32 0, ptr %15, align 4, !tbaa !11
  %16 = call i32 @__disable_interrupts()
  store i32 %16, ptr %7, align 4, !tbaa !11
  %17 = load ptr, ptr %4, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.TX_QUEUE_STRUCT, ptr %17, i32 0, i32 11
  %19 = load i32, ptr %18, align 8, !tbaa !13
  store i32 %19, ptr %12, align 4, !tbaa !11
  %20 = load ptr, ptr %4, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct.TX_QUEUE_STRUCT, ptr %20, i32 0, i32 4
  %22 = load i32, ptr %21, align 8, !tbaa !15
  %23 = icmp ne i32 %22, 0
  br i1 %23, label %24, label %275

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

27:                                               ; preds = %24
  %28 = load ptr, ptr %4, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.TX_QUEUE_STRUCT, ptr %28, i32 0, i32 8
  %30 = load ptr, ptr %29, align 8, !tbaa !16
  store ptr %30, ptr %9, align 8, !tbaa !5
  %31 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %31, ptr %10, align 8, !tbaa !5
  %32 = load ptr, ptr %4, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.TX_QUEUE_STRUCT, ptr %32, i32 0, i32 2
  %34 = load i32, ptr %33, align 8, !tbaa !17
  store i32 %34, ptr %11, align 4, !tbaa !11
  %35 = load ptr, ptr %9, align 8, !tbaa !5
  %36 = getelementptr inbounds i64, ptr %35, i32 1
  store ptr %36, ptr %9, align 8, !tbaa !5
  %37 = load i64, ptr %35, align 8, !tbaa !9
  %38 = load ptr, ptr %10, align 8, !tbaa !5
  %39 = getelementptr inbounds i64, ptr %38, i32 1
  store ptr %39, ptr %10, align 8, !tbaa !5
  store i64 %37, ptr %38, align 8, !tbaa !9
  %40 = load i32, ptr %11, align 4, !tbaa !11
  %41 = icmp ugt i32 %40, 1
  br i1 %41, label %42, label %54

42:                                               ; preds = %27
  br label %43

43:                                               ; preds = %47, %42
  %44 = load i32, ptr %11, align 4, !tbaa !11
  %45 = add i32 %44, -1
  store i32 %45, ptr %11, align 4, !tbaa !11
  %46 = icmp ne i32 %45, 0
  br i1 %46, label %47, label %53

47:                                               ; preds = %43
  %48 = load ptr, ptr %9, align 8, !tbaa !5
  %49 = getelementptr inbounds i64, ptr %48, i32 1
  store ptr %49, ptr %9, align 8, !tbaa !5
  %50 = load i64, ptr %48, align 8, !tbaa !9
  %51 = load ptr, ptr %10, align 8, !tbaa !5
  %52 = getelementptr inbounds i64, ptr %51, i32 1
  store ptr %52, ptr %10, align 8, !tbaa !5
  store i64 %50, ptr %51, align 8, !tbaa !9
  br label %43, !llvm.loop !18

53:                                               ; preds = %43
  br label %54

54:                                               ; preds = %53, %27
  %55 = load ptr, ptr %9, align 8, !tbaa !5
  %56 = load ptr, ptr %4, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.TX_QUEUE_STRUCT, ptr %56, i32 0, i32 7
  %58 = load ptr, ptr %57, align 8, !tbaa !20
  %59 = icmp eq ptr %55, %58
  br i1 %59, label %60, label %64

60:                                               ; preds = %54
  %61 = load ptr, ptr %4, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.TX_QUEUE_STRUCT, ptr %61, i32 0, i32 6
  %63 = load ptr, ptr %62, align 8, !tbaa !21
  store ptr %63, ptr %9, align 8, !tbaa !5
  br label %64

64:                                               ; preds = %60, %54
  %65 = load ptr, ptr %9, align 8, !tbaa !5
  %66 = load ptr, ptr %4, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.TX_QUEUE_STRUCT, ptr %66, i32 0, i32 8
  store ptr %65, ptr %67, align 8, !tbaa !16
  %68 = load ptr, ptr %4, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.TX_QUEUE_STRUCT, ptr %68, i32 0, i32 5
  %70 = load i32, ptr %69, align 4, !tbaa !22
  %71 = add i32 %70, 1
  store i32 %71, ptr %69, align 4, !tbaa !22
  %72 = load ptr, ptr %4, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.TX_QUEUE_STRUCT, ptr %72, i32 0, i32 4
  %74 = load i32, ptr %73, align 8, !tbaa !15
  %75 = add i32 %74, -1
  store i32 %75, ptr %73, align 8, !tbaa !15
  %76 = load i32, ptr %7, align 4, !tbaa !11
  call void @__restore_interrupt(i32 noundef %76)
  br label %274

77:                                               ; preds = %24
  %78 = load ptr, ptr %4, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.TX_QUEUE_STRUCT, ptr %78, i32 0, i32 10
  %80 = load ptr, ptr %79, align 8, !tbaa !23
  store ptr %80, ptr %8, align 8, !tbaa !5
  %81 = load ptr, ptr %8, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %81, i32 0, i32 26
  %83 = load i32, ptr %82, align 8, !tbaa !24
  %84 = icmp eq i32 %83, 1
  br i1 %84, label %85, label %148

85:                                               ; preds = %77
  %86 = load ptr, ptr %8, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %86, i32 0, i32 25
  %88 = load ptr, ptr %87, align 8, !tbaa !27
  store ptr %88, ptr %9, align 8, !tbaa !5
  %89 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %89, ptr %10, align 8, !tbaa !5
  %90 = load ptr, ptr %4, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.TX_QUEUE_STRUCT, ptr %90, i32 0, i32 2
  %92 = load i32, ptr %91, align 8, !tbaa !17
  store i32 %92, ptr %11, align 4, !tbaa !11
  %93 = load ptr, ptr %9, align 8, !tbaa !5
  %94 = getelementptr inbounds i64, ptr %93, i32 1
  store ptr %94, ptr %9, align 8, !tbaa !5
  %95 = load i64, ptr %93, align 8, !tbaa !9
  %96 = load ptr, ptr %10, align 8, !tbaa !5
  %97 = getelementptr inbounds i64, ptr %96, i32 1
  store ptr %97, ptr %10, align 8, !tbaa !5
  store i64 %95, ptr %96, align 8, !tbaa !9
  %98 = load i32, ptr %11, align 4, !tbaa !11
  %99 = icmp ugt i32 %98, 1
  br i1 %99, label %100, label %112

100:                                              ; preds = %85
  br label %101

101:                                              ; preds = %105, %100
  %102 = load i32, ptr %11, align 4, !tbaa !11
  %103 = add i32 %102, -1
  store i32 %103, ptr %11, align 4, !tbaa !11
  %104 = icmp ne i32 %103, 0
  br i1 %104, label %105, label %111

105:                                              ; preds = %101
  %106 = load ptr, ptr %9, align 8, !tbaa !5
  %107 = getelementptr inbounds i64, ptr %106, i32 1
  store ptr %107, ptr %9, align 8, !tbaa !5
  %108 = load i64, ptr %106, align 8, !tbaa !9
  %109 = load ptr, ptr %10, align 8, !tbaa !5
  %110 = getelementptr inbounds i64, ptr %109, i32 1
  store ptr %110, ptr %10, align 8, !tbaa !5
  store i64 %108, ptr %109, align 8, !tbaa !9
  br label %101, !llvm.loop !28

111:                                              ; preds = %101
  br label %112

112:                                              ; preds = %111, %85
  %113 = load i32, ptr %12, align 4, !tbaa !11
  %114 = add i32 %113, -1
  store i32 %114, ptr %12, align 4, !tbaa !11
  %115 = load i32, ptr %12, align 4, !tbaa !11
  %116 = icmp eq i32 %115, 0
  br i1 %116, label %117, label %120

117:                                              ; preds = %112
  %118 = load ptr, ptr %4, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.TX_QUEUE_STRUCT, ptr %118, i32 0, i32 10
  store ptr null, ptr %119, align 8, !tbaa !23
  br label %136

120:                                              ; preds = %112
  %121 = load ptr, ptr %8, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %121, i32 0, i32 22
  %123 = load ptr, ptr %122, align 8, !tbaa !29
  store ptr %123, ptr %13, align 8, !tbaa !5
  %124 = load ptr, ptr %13, align 8, !tbaa !5
  %125 = load ptr, ptr %4, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.TX_QUEUE_STRUCT, ptr %125, i32 0, i32 10
  store ptr %124, ptr %126, align 8, !tbaa !23
  %127 = load ptr, ptr %8, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %127, i32 0, i32 23
  %129 = load ptr, ptr %128, align 8, !tbaa !30
  store ptr %129, ptr %14, align 8, !tbaa !5
  %130 = load ptr, ptr %14, align 8, !tbaa !5
  %131 = load ptr, ptr %13, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %131, i32 0, i32 23
  store ptr %130, ptr %132, align 8, !tbaa !30
  %133 = load ptr, ptr %13, align 8, !tbaa !5
  %134 = load ptr, ptr %14, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %134, i32 0, i32 22
  store ptr %133, ptr %135, align 8, !tbaa !29
  br label %136

136:                                              ; preds = %120, %117
  %137 = load i32, ptr %12, align 4, !tbaa !11
  %138 = load ptr, ptr %4, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.TX_QUEUE_STRUCT, ptr %138, i32 0, i32 11
  store i32 %137, ptr %139, align 8, !tbaa !13
  %140 = load ptr, ptr %8, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %140, i32 0, i32 20
  store ptr null, ptr %141, align 8, !tbaa !31
  %142 = load ptr, ptr %8, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %142, i32 0, i32 27
  store i32 0, ptr %143, align 4, !tbaa !32
  %144 = load volatile i32, ptr @_tx_thread_preempt_disable, align 4, !tbaa !11
  %145 = add i32 %144, 1
  store volatile i32 %145, ptr @_tx_thread_preempt_disable, align 4, !tbaa !11
  %146 = load i32, ptr %7, align 4, !tbaa !11
  call void @__restore_interrupt(i32 noundef %146)
  %147 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_tx_thread_system_resume(ptr noundef %147)
  br label %273

148:                                              ; preds = %77
  %149 = load ptr, ptr %4, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.TX_QUEUE_STRUCT, ptr %149, i32 0, i32 8
  %151 = load ptr, ptr %150, align 8, !tbaa !16
  store ptr %151, ptr %9, align 8, !tbaa !5
  %152 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %152, ptr %10, align 8, !tbaa !5
  %153 = load ptr, ptr %4, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.TX_QUEUE_STRUCT, ptr %153, i32 0, i32 2
  %155 = load i32, ptr %154, align 8, !tbaa !17
  store i32 %155, ptr %11, align 4, !tbaa !11
  %156 = load ptr, ptr %9, align 8, !tbaa !5
  %157 = getelementptr inbounds i64, ptr %156, i32 1
  store ptr %157, ptr %9, align 8, !tbaa !5
  %158 = load i64, ptr %156, align 8, !tbaa !9
  %159 = load ptr, ptr %10, align 8, !tbaa !5
  %160 = getelementptr inbounds i64, ptr %159, i32 1
  store ptr %160, ptr %10, align 8, !tbaa !5
  store i64 %158, ptr %159, align 8, !tbaa !9
  %161 = load i32, ptr %11, align 4, !tbaa !11
  %162 = icmp ugt i32 %161, 1
  br i1 %162, label %163, label %175

163:                                              ; preds = %148
  br label %164

164:                                              ; preds = %168, %163
  %165 = load i32, ptr %11, align 4, !tbaa !11
  %166 = add i32 %165, -1
  store i32 %166, ptr %11, align 4, !tbaa !11
  %167 = icmp ne i32 %166, 0
  br i1 %167, label %168, label %174

168:                                              ; preds = %164
  %169 = load ptr, ptr %9, align 8, !tbaa !5
  %170 = getelementptr inbounds i64, ptr %169, i32 1
  store ptr %170, ptr %9, align 8, !tbaa !5
  %171 = load i64, ptr %169, align 8, !tbaa !9
  %172 = load ptr, ptr %10, align 8, !tbaa !5
  %173 = getelementptr inbounds i64, ptr %172, i32 1
  store ptr %173, ptr %10, align 8, !tbaa !5
  store i64 %171, ptr %172, align 8, !tbaa !9
  br label %164, !llvm.loop !33

174:                                              ; preds = %164
  br label %175

175:                                              ; preds = %174, %148
  %176 = load ptr, ptr %9, align 8, !tbaa !5
  %177 = load ptr, ptr %4, align 8, !tbaa !5
  %178 = getelementptr inbounds %struct.TX_QUEUE_STRUCT, ptr %177, i32 0, i32 7
  %179 = load ptr, ptr %178, align 8, !tbaa !20
  %180 = icmp eq ptr %176, %179
  br i1 %180, label %181, label %185

181:                                              ; preds = %175
  %182 = load ptr, ptr %4, align 8, !tbaa !5
  %183 = getelementptr inbounds %struct.TX_QUEUE_STRUCT, ptr %182, i32 0, i32 6
  %184 = load ptr, ptr %183, align 8, !tbaa !21
  store ptr %184, ptr %9, align 8, !tbaa !5
  br label %185

185:                                              ; preds = %181, %175
  %186 = load ptr, ptr %9, align 8, !tbaa !5
  %187 = load ptr, ptr %4, align 8, !tbaa !5
  %188 = getelementptr inbounds %struct.TX_QUEUE_STRUCT, ptr %187, i32 0, i32 8
  store ptr %186, ptr %188, align 8, !tbaa !16
  %189 = load volatile i32, ptr @_tx_thread_preempt_disable, align 4, !tbaa !11
  %190 = add i32 %189, 1
  store volatile i32 %190, ptr @_tx_thread_preempt_disable, align 4, !tbaa !11
  %191 = load volatile i32, ptr @_tx_thread_preempt_disable, align 4, !tbaa !11
  %192 = add i32 %191, -1
  store volatile i32 %192, ptr @_tx_thread_preempt_disable, align 4, !tbaa !11
  %193 = load ptr, ptr %8, align 8, !tbaa !5
  %194 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %193, i32 0, i32 25
  %195 = load ptr, ptr %194, align 8, !tbaa !27
  store ptr %195, ptr %9, 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 9
  %198 = load ptr, ptr %197, align 8, !tbaa !34
  store ptr %198, ptr %10, align 8, !tbaa !5
  %199 = load ptr, ptr %4, align 8, !tbaa !5
  %200 = getelementptr inbounds %struct.TX_QUEUE_STRUCT, ptr %199, i32 0, i32 2
  %201 = load i32, ptr %200, align 8, !tbaa !17
  store i32 %201, ptr %11, align 4, !tbaa !11
  %202 = load ptr, ptr %9, align 8, !tbaa !5
  %203 = getelementptr inbounds i64, ptr %202, i32 1
  store ptr %203, ptr %9, align 8, !tbaa !5
  %204 = load i64, ptr %202, align 8, !tbaa !9
  %205 = load ptr, ptr %10, align 8, !tbaa !5
  %206 = getelementptr inbounds i64, ptr %205, i32 1
  store ptr %206, ptr %10, align 8, !tbaa !5
  store i64 %204, ptr %205, align 8, !tbaa !9
  %207 = load i32, ptr %11, align 4, !tbaa !11
  %208 = icmp ugt i32 %207, 1
  br i1 %208, label %209, label %221

209:                                              ; preds = %185
  br label %210

210:                                              ; preds = %214, %209
  %211 = load i32, ptr %11, align 4, !tbaa !11
  %212 = add i32 %211, -1
  store i32 %212, ptr %11, align 4, !tbaa !11
  %213 = icmp ne i32 %212, 0
  br i1 %213, label %214, label %220

214:                                              ; preds = %210
  %215 = load ptr, ptr %9, align 8, !tbaa !5
  %216 = getelementptr inbounds i64, ptr %215, i32 1
  store ptr %216, ptr %9, align 8, !tbaa !5
  %217 = load i64, ptr %215, align 8, !tbaa !9
  %218 = load ptr, ptr %10, align 8, !tbaa !5
  %219 = getelementptr inbounds i64, ptr %218, i32 1
  store ptr %219, ptr %10, align 8, !tbaa !5
  store i64 %217, ptr %218, align 8, !tbaa !9
  br label %210, !llvm.loop !35

220:                                              ; preds = %210
  br label %221

221:                                              ; preds = %220, %185
  %222 = load ptr, ptr %10, align 8, !tbaa !5
  %223 = load ptr, ptr %4, align 8, !tbaa !5
  %224 = getelementptr inbounds %struct.TX_QUEUE_STRUCT, ptr %223, i32 0, i32 7
  %225 = load ptr, ptr %224, align 8, !tbaa !20
  %226 = icmp eq ptr %222, %225
  br i1 %226, label %227, label %231

227:                                              ; preds = %221
  %228 = load ptr, ptr %4, align 8, !tbaa !5
  %229 = getelementptr inbounds %struct.TX_QUEUE_STRUCT, ptr %228, i32 0, i32 6
  %230 = load ptr, ptr %229, align 8, !tbaa !21
  store ptr %230, ptr %10, align 8, !tbaa !5
  br label %231

231:                                              ; preds = %227, %221
  %232 = load ptr, ptr %10, align 8, !tbaa !5
  %233 = load ptr, ptr %4, align 8, !tbaa !5
  %234 = getelementptr inbounds %struct.TX_QUEUE_STRUCT, ptr %233, i32 0, i32 9
  store ptr %232, ptr %234, align 8, !tbaa !34
  %235 = load ptr, ptr %4, align 8, !tbaa !5
  %236 = getelementptr inbounds %struct.TX_QUEUE_STRUCT, ptr %235, i32 0, i32 10
  %237 = load ptr, ptr %236, align 8, !tbaa !23
  store ptr %237, ptr %8, align 8, !tbaa !5
  %238 = load i32, ptr %12, align 4, !tbaa !11
  %239 = add i32 %238, -1
  store i32 %239, ptr %12, align 4, !tbaa !11
  %240 = load i32, ptr %12, align 4, !tbaa !11
  %241 = icmp eq i32 %240, 0
  br i1 %241, label %242, label %245

242:                                              ; preds = %231
  %243 = load ptr, ptr %4, align 8, !tbaa !5
  %244 = getelementptr inbounds %struct.TX_QUEUE_STRUCT, ptr %243, i32 0, i32 10
  store ptr null, ptr %244, align 8, !tbaa !23
  br label %261

245:                                              ; preds = %231
  %246 = load ptr, ptr %8, align 8, !tbaa !5
  %247 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %246, i32 0, i32 22
  %248 = load ptr, ptr %247, align 8, !tbaa !29
  store ptr %248, ptr %13, align 8, !tbaa !5
  %249 = load ptr, ptr %13, align 8, !tbaa !5
  %250 = load ptr, ptr %4, align 8, !tbaa !5
  %251 = getelementptr inbounds %struct.TX_QUEUE_STRUCT, ptr %250, i32 0, i32 10
  store ptr %249, ptr %251, align 8, !tbaa !23
  %252 = load ptr, ptr %8, align 8, !tbaa !5
  %253 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %252, i32 0, i32 23
  %254 = load ptr, ptr %253, align 8, !tbaa !30
  store ptr %254, ptr %14, align 8, !tbaa !5
  %255 = load ptr, ptr %14, align 8, !tbaa !5
  %256 = load ptr, ptr %13, align 8, !tbaa !5
  %257 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %256, i32 0, i32 23
  store ptr %255, ptr %257, align 8, !tbaa !30
  %258 = load ptr, ptr %13, align 8, !tbaa !5
  %259 = load ptr, ptr %14, align 8, !tbaa !5
  %260 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %259, i32 0, i32 22
  store ptr %258, ptr %260, align 8, !tbaa !29
  br label %261

261:                                              ; preds = %245, %242
  %262 = load i32, ptr %12, align 4, !tbaa !11
  %263 = load ptr, ptr %4, align 8, !tbaa !5
  %264 = getelementptr inbounds %struct.TX_QUEUE_STRUCT, ptr %263, i32 0, i32 11
  store i32 %262, ptr %264, align 8, !tbaa !13
  %265 = load ptr, ptr %8, align 8, !tbaa !5
  %266 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %265, i32 0, i32 20
  store ptr null, ptr %266, align 8, !tbaa !31
  %267 = load ptr, ptr %8, align 8, !tbaa !5
  %268 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %267, i32 0, i32 27
  store i32 0, ptr %268, align 4, !tbaa !32
  %269 = load volatile i32, ptr @_tx_thread_preempt_disable, align 4, !tbaa !11
  %270 = add i32 %269, 1
  store volatile i32 %270, ptr @_tx_thread_preempt_disable, align 4, !tbaa !11
  %271 = load i32, ptr %7, align 4, !tbaa !11
  call void @__restore_interrupt(i32 noundef %271)
  %272 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_tx_thread_system_resume(ptr noundef %272)
  br label %273

273:                                              ; preds = %261, %136
  br label %274

274:                                              ; preds = %273, %64
  br label %354

275:                                              ; preds = %3
  %276 = load i64, ptr %6, align 8, !tbaa !9
  %277 = icmp ne i64 %276, 0
  br i1 %277, label %278, label %351

278:                                              ; preds = %275
  %279 = load volatile i32, ptr @_tx_thread_preempt_disable, align 4, !tbaa !11
  %280 = icmp ne i32 %279, 0
  br i1 %280, label %281, label %283

281:                                              ; preds = %278
  %282 = load i32, ptr %7, align 4, !tbaa !11
  call void @__restore_interrupt(i32 noundef %282)
  store i32 10, ptr %15, align 4, !tbaa !11
  br label %350

283:                                              ; preds = %278
  %284 = load ptr, ptr @_tx_thread_current_ptr, align 8, !tbaa !5
  store ptr %284, ptr %8, align 8, !tbaa !5
  %285 = load ptr, ptr %8, align 8, !tbaa !5
  %286 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %285, i32 0, i32 20
  store ptr @_tx_queue_cleanup, ptr %286, align 8, !tbaa !31
  %287 = load ptr, ptr %4, align 8, !tbaa !5
  %288 = load ptr, ptr %8, align 8, !tbaa !5
  %289 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %288, i32 0, i32 21
  store ptr %287, ptr %289, align 8, !tbaa !36
  %290 = load ptr, ptr %5, align 8, !tbaa !5
  %291 = load ptr, ptr %8, align 8, !tbaa !5
  %292 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %291, i32 0, i32 25
  store ptr %290, ptr %292, align 8, !tbaa !27
  %293 = load ptr, ptr %8, align 8, !tbaa !5
  %294 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %293, i32 0, i32 26
  store i32 0, ptr %294, align 8, !tbaa !24
  %295 = load ptr, ptr %8, align 8, !tbaa !5
  %296 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %295, i32 0, i32 39
  %297 = load i64, ptr %296, align 8, !tbaa !37
  %298 = add i64 %297, 1
  store i64 %298, ptr %296, align 8, !tbaa !37
  %299 = load i32, ptr %12, align 4, !tbaa !11
  %300 = icmp eq i32 %299, 0
  br i1 %300, label %301, label %311

301:                                              ; preds = %283
  %302 = load ptr, ptr %8, align 8, !tbaa !5
  %303 = load ptr, ptr %4, align 8, !tbaa !5
  %304 = getelementptr inbounds %struct.TX_QUEUE_STRUCT, ptr %303, i32 0, i32 10
  store ptr %302, ptr %304, align 8, !tbaa !23
  %305 = load ptr, ptr %8, align 8, !tbaa !5
  %306 = load ptr, ptr %8, align 8, !tbaa !5
  %307 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %306, i32 0, i32 22
  store ptr %305, ptr %307, align 8, !tbaa !29
  %308 = load ptr, ptr %8, align 8, !tbaa !5
  %309 = load ptr, ptr %8, align 8, !tbaa !5
  %310 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %309, i32 0, i32 23
  store ptr %308, ptr %310, align 8, !tbaa !30
  br label %330

311:                                              ; preds = %283
  %312 = load ptr, ptr %4, align 8, !tbaa !5
  %313 = getelementptr inbounds %struct.TX_QUEUE_STRUCT, ptr %312, i32 0, i32 10
  %314 = load ptr, ptr %313, align 8, !tbaa !23
  store ptr %314, ptr %13, align 8, !tbaa !5
  %315 = load ptr, ptr %13, align 8, !tbaa !5
  %316 = load ptr, ptr %8, align 8, !tbaa !5
  %317 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %316, i32 0, i32 22
  store ptr %315, ptr %317, align 8, !tbaa !29
  %318 = load ptr, ptr %13, align 8, !tbaa !5
  %319 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %318, i32 0, i32 23
  %320 = load ptr, ptr %319, align 8, !tbaa !30
  store ptr %320, ptr %14, align 8, !tbaa !5
  %321 = load ptr, ptr %14, align 8, !tbaa !5
  %322 = load ptr, ptr %8, align 8, !tbaa !5
  %323 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %322, i32 0, i32 23
  store ptr %321, ptr %323, align 8, !tbaa !30
  %324 = load ptr, ptr %8, align 8, !tbaa !5
  %325 = load ptr, ptr %14, align 8, !tbaa !5
  %326 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %325, i32 0, i32 22
  store ptr %324, ptr %326, align 8, !tbaa !29
  %327 = load ptr, ptr %8, align 8, !tbaa !5
  %328 = load ptr, ptr %13, align 8, !tbaa !5
  %329 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %328, i32 0, i32 23
  store ptr %327, ptr %329, align 8, !tbaa !30
  br label %330

330:                                              ; preds = %311, %301
  %331 = load i32, ptr %12, align 4, !tbaa !11
  %332 = add i32 %331, 1
  %333 = load ptr, ptr %4, align 8, !tbaa !5
  %334 = getelementptr inbounds %struct.TX_QUEUE_STRUCT, ptr %333, i32 0, i32 11
  store i32 %332, ptr %334, align 8, !tbaa !13
  %335 = load ptr, ptr %8, align 8, !tbaa !5
  %336 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %335, i32 0, i32 12
  store i32 5, ptr %336, align 4, !tbaa !38
  %337 = load ptr, ptr %8, align 8, !tbaa !5
  %338 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %337, i32 0, i32 14
  store i32 1, ptr %338, align 4, !tbaa !39
  %339 = load i64, ptr %6, align 8, !tbaa !9
  %340 = load ptr, ptr %8, align 8, !tbaa !5
  %341 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %340, i32 0, i32 19
  %342 = getelementptr inbounds %struct.TX_TIMER_INTERNAL_STRUCT, ptr %341, i32 0, i32 0
  store i64 %339, ptr %342, align 8, !tbaa !40
  %343 = load volatile i32, ptr @_tx_thread_preempt_disable, align 4, !tbaa !11
  %344 = add i32 %343, 1
  store volatile i32 %344, ptr @_tx_thread_preempt_disable, align 4, !tbaa !11
  %345 = load i32, ptr %7, align 4, !tbaa !11
  call void @__restore_interrupt(i32 noundef %345)
  %346 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_tx_thread_system_suspend(ptr noundef %346)
  %347 = load ptr, ptr %8, align 8, !tbaa !5
  %348 = getelementptr inbounds %struct.TX_THREAD_STRUCT, ptr %347, i32 0, i32 27
  %349 = load i32, ptr %348, align 4, !tbaa !32
  store i32 %349, ptr %15, align 4, !tbaa !11
  br label %350

350:                                              ; preds = %330, %281
  br label %353

351:                                              ; preds = %275
  %352 = load i32, ptr %7, align 4, !tbaa !11
  call void @__restore_interrupt(i32 noundef %352)
  store i32 10, ptr %15, align 4, !tbaa !11
  br label %353

353:                                              ; preds = %351, %350
  br label %354

354:                                              ; preds = %353, %274
  %355 = load i32, ptr %15, align 4, !tbaa !11
  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 %355
}

; 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 24}
!16 = !{!14, !6, i64 48}
!17 = !{!14, !12, i64 16}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = !{!14, !6, i64 40}
!21 = !{!14, !6, i64 32}
!22 = !{!14, !12, i64 28}
!23 = !{!14, !6, i64 64}
!24 = !{!25, !12, i64 240}
!25 = !{!"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, !26, 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}
!26 = !{!"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}
!27 = !{!25, !6, i64 232}
!28 = distinct !{!28, !19}
!29 = !{!25, !6, i64 208}
!30 = !{!25, !6, i64 216}
!31 = !{!25, !6, i64 192}
!32 = !{!25, !12, i64 244}
!33 = distinct !{!33, !19}
!34 = !{!14, !6, i64 56}
!35 = distinct !{!35, !19}
!36 = !{!25, !6, i64 200}
!37 = !{!25, !10, i64 320}
!38 = !{!25, !12, i64 92}
!39 = !{!25, !12, i64 100}
!40 = !{!25, !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_receive(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 24
  %9 = load i32, ptr %8, align 8, !tbaa !12
  %.not = icmp eq i32 %9, 0
  br i1 %.not, label %225, label %10

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

12:                                               ; preds = %10
  %13 = getelementptr inbounds i8, ptr %0, i64 48
  %14 = load ptr, ptr %13, align 8, !tbaa !13
  %15 = getelementptr inbounds i8, ptr %0, i64 16
  %16 = load i32, ptr %15, align 8, !tbaa !14
  %17 = getelementptr i8, ptr %14, i64 8
  %18 = load i64, ptr %14, align 8, !tbaa !15
  store i64 %18, ptr %1, align 8, !tbaa !15
  %or.cond = icmp ult i32 %16, 2
  br i1 %or.cond, label %.loopexit, label %.lr.ph182.preheader

.lr.ph182.preheader:                              ; preds = %12
  %19 = ptrtoint ptr %14 to i64
  %20 = add i32 %16, -1
  %21 = zext i32 %20 to i64
  %min.iters.check265 = icmp ult i32 %16, 7
  %22 = sub i64 %4, %19
  %diff.check262 = icmp ult i64 %22, 32
  %or.cond288 = or i1 %min.iters.check265, %diff.check262
  br i1 %or.cond288, label %.lr.ph182.preheader292, label %vector.ph266

vector.ph266:                                     ; preds = %.lr.ph182.preheader
  %n.vec268 = and i64 %21, 4294967292
  %.cast269 = trunc nuw i64 %n.vec268 to i32
  %ind.end270 = sub i32 %20, %.cast269
  %23 = shl nuw nsw i64 %n.vec268, 3
  %ind.end272 = getelementptr i8, ptr %1, i64 %23
  %24 = shl nuw nsw i64 %n.vec268, 3
  %ind.end274 = getelementptr i8, ptr %17, i64 %24
  br label %vector.body276

vector.body276:                                   ; preds = %vector.body276, %vector.ph266
  %index277 = phi i64 [ 0, %vector.ph266 ], [ %index.next286, %vector.body276 ]
  %offset.idx278 = shl i64 %index277, 3
  %next.gep279 = getelementptr i8, ptr %1, i64 %offset.idx278
  %offset.idx281 = shl i64 %index277, 3
  %next.gep282 = getelementptr i8, ptr %17, i64 %offset.idx281
  %25 = getelementptr inbounds i8, ptr %next.gep279, i64 8
  %26 = getelementptr i8, ptr %next.gep282, i64 16
  %wide.load284 = load <2 x i64>, ptr %next.gep282, align 8, !tbaa !15
  %wide.load285 = load <2 x i64>, ptr %26, align 8, !tbaa !15
  %27 = getelementptr inbounds i8, ptr %next.gep279, i64 24
  store <2 x i64> %wide.load284, ptr %25, align 8, !tbaa !15
  store <2 x i64> %wide.load285, ptr %27, align 8, !tbaa !15
  %index.next286 = add nuw i64 %index277, 4
  %28 = icmp eq i64 %index.next286, %n.vec268
  br i1 %28, label %middle.block263, label %vector.body276, !llvm.loop !16

middle.block263:                                  ; preds = %vector.body276
  %cmp.n287 = icmp eq i64 %n.vec268, %21
  br i1 %cmp.n287, label %.loopexit, label %.lr.ph182.preheader292

.lr.ph182.preheader292:                           ; preds = %middle.block263, %.lr.ph182.preheader
  %.ph = phi i32 [ %20, %.lr.ph182.preheader ], [ %ind.end270, %middle.block263 ]
  %.pn160181.ph = phi ptr [ %1, %.lr.ph182.preheader ], [ %ind.end272, %middle.block263 ]
  %.0135180.ph = phi ptr [ %17, %.lr.ph182.preheader ], [ %ind.end274, %middle.block263 ]
  %29 = add i32 %.ph, -1
  %xtraiter309 = and i32 %.ph, 7
  %lcmp.mod310.not = icmp eq i32 %xtraiter309, 0
  br i1 %lcmp.mod310.not, label %.lr.ph182.prol.loopexit, label %.lr.ph182.prol

.lr.ph182.prol:                                   ; preds = %.lr.ph182.preheader292, %.lr.ph182.prol
  %30 = phi i32 [ %33, %.lr.ph182.prol ], [ %.ph, %.lr.ph182.preheader292 ]
  %.pn160181.prol = phi ptr [ %.0131.prol, %.lr.ph182.prol ], [ %.pn160181.ph, %.lr.ph182.preheader292 ]
  %.0135180.prol = phi ptr [ %31, %.lr.ph182.prol ], [ %.0135180.ph, %.lr.ph182.preheader292 ]
  %prol.iter311 = phi i32 [ %prol.iter311.next, %.lr.ph182.prol ], [ 0, %.lr.ph182.preheader292 ]
  %.0131.prol = getelementptr inbounds i8, ptr %.pn160181.prol, i64 8
  %31 = getelementptr inbounds i8, ptr %.0135180.prol, i64 8
  %32 = load i64, ptr %.0135180.prol, align 8, !tbaa !15
  store i64 %32, ptr %.0131.prol, align 8, !tbaa !15
  %33 = add i32 %30, -1
  %prol.iter311.next = add i32 %prol.iter311, 1
  %prol.iter311.cmp.not = icmp eq i32 %prol.iter311.next, %xtraiter309
  br i1 %prol.iter311.cmp.not, label %.lr.ph182.prol.loopexit, label %.lr.ph182.prol, !llvm.loop !20

.lr.ph182.prol.loopexit:                          ; preds = %.lr.ph182.prol, %.lr.ph182.preheader292
  %.lcssa.unr = phi ptr [ poison, %.lr.ph182.preheader292 ], [ %31, %.lr.ph182.prol ]
  %.unr312 = phi i32 [ %.ph, %.lr.ph182.preheader292 ], [ %33, %.lr.ph182.prol ]
  %.pn160181.unr = phi ptr [ %.pn160181.ph, %.lr.ph182.preheader292 ], [ %.0131.prol, %.lr.ph182.prol ]
  %.0135180.unr = phi ptr [ %.0135180.ph, %.lr.ph182.preheader292 ], [ %31, %.lr.ph182.prol ]
  %34 = icmp ult i32 %29, 7
  br i1 %34, label %.loopexit, label %.lr.ph182

.lr.ph182:                                        ; preds = %.lr.ph182.prol.loopexit, %.lr.ph182
  %35 = phi i32 [ %52, %.lr.ph182 ], [ %.unr312, %.lr.ph182.prol.loopexit ]
  %.pn160181 = phi ptr [ %.0131.7, %.lr.ph182 ], [ %.pn160181.unr, %.lr.ph182.prol.loopexit ]
  %.0135180 = phi ptr [ %50, %.lr.ph182 ], [ %.0135180.unr, %.lr.ph182.prol.loopexit ]
  %.0131 = getelementptr inbounds i8, ptr %.pn160181, i64 8
  %36 = getelementptr inbounds i8, ptr %.0135180, i64 8
  %37 = load i64, ptr %.0135180, align 8, !tbaa !15
  store i64 %37, ptr %.0131, align 8, !tbaa !15
  %.0131.1 = getelementptr inbounds i8, ptr %.pn160181, i64 16
  %38 = getelementptr inbounds i8, ptr %.0135180, i64 16
  %39 = load i64, ptr %36, align 8, !tbaa !15
  store i64 %39, ptr %.0131.1, align 8, !tbaa !15
  %.0131.2 = getelementptr inbounds i8, ptr %.pn160181, i64 24
  %40 = getelementptr inbounds i8, ptr %.0135180, i64 24
  %41 = load i64, ptr %38, align 8, !tbaa !15
  store i64 %41, ptr %.0131.2, align 8, !tbaa !15
  %.0131.3 = getelementptr inbounds i8, ptr %.pn160181, i64 32
  %42 = getelementptr inbounds i8, ptr %.0135180, i64 32
  %43 = load i64, ptr %40, align 8, !tbaa !15
  store i64 %43, ptr %.0131.3, align 8, !tbaa !15
  %.0131.4 = getelementptr inbounds i8, ptr %.pn160181, i64 40
  %44 = getelementptr inbounds i8, ptr %.0135180, i64 40
  %45 = load i64, ptr %42, align 8, !tbaa !15
  store i64 %45, ptr %.0131.4, align 8, !tbaa !15
  %.0131.5 = getelementptr inbounds i8, ptr %.pn160181, i64 48
  %46 = getelementptr inbounds i8, ptr %.0135180, i64 48
  %47 = load i64, ptr %44, align 8, !tbaa !15
  store i64 %47, ptr %.0131.5, align 8, !tbaa !15
  %.0131.6 = getelementptr inbounds i8, ptr %.pn160181, i64 56
  %48 = getelementptr inbounds i8, ptr %.0135180, i64 56
  %49 = load i64, ptr %46, align 8, !tbaa !15
  store i64 %49, ptr %.0131.6, align 8, !tbaa !15
  %.0131.7 = getelementptr inbounds i8, ptr %.pn160181, i64 64
  %50 = getelementptr inbounds i8, ptr %.0135180, i64 64
  %51 = load i64, ptr %48, align 8, !tbaa !15
  store i64 %51, ptr %.0131.7, align 8, !tbaa !15
  %52 = add i32 %35, -8
  %.not159.7 = icmp eq i32 %52, 0
  br i1 %.not159.7, label %.loopexit, label %.lr.ph182, !llvm.loop !22

.loopexit:                                        ; preds = %.lr.ph182.prol.loopexit, %.lr.ph182, %middle.block263, %12
  %.1136 = phi ptr [ %17, %12 ], [ %ind.end274, %middle.block263 ], [ %.lcssa.unr, %.lr.ph182.prol.loopexit ], [ %50, %.lr.ph182 ]
  %53 = getelementptr inbounds i8, ptr %0, i64 40
  %54 = load ptr, ptr %53, align 8, !tbaa !23
  %55 = icmp eq ptr %.1136, %54
  br i1 %55, label %56, label %59

56:                                               ; preds = %.loopexit
  %57 = getelementptr inbounds i8, ptr %0, i64 32
  %58 = load ptr, ptr %57, align 8, !tbaa !24
  br label %59

59:                                               ; preds = %56, %.loopexit
  %.2137 = phi ptr [ %58, %56 ], [ %.1136, %.loopexit ]
  store ptr %.2137, ptr %13, align 8, !tbaa !13
  %60 = getelementptr inbounds i8, ptr %0, i64 28
  %61 = load i32, ptr %60, align 4, !tbaa !25
  %62 = add i32 %61, 1
  store i32 %62, ptr %60, align 4, !tbaa !25
  %63 = add i32 %9, -1
  store i32 %63, ptr %8, align 8, !tbaa !12
  tail call void @__restore_interrupt(i32 noundef %5)
  br label %259

64:                                               ; preds = %10
  %65 = getelementptr inbounds i8, ptr %0, i64 64
  %66 = load ptr, ptr %65, align 8, !tbaa !26
  %67 = getelementptr inbounds i8, ptr %66, i64 240
  %68 = load i32, ptr %67, align 8, !tbaa !27
  %69 = icmp eq i32 %68, 1
  %70 = getelementptr inbounds i8, ptr %0, i64 16
  %71 = load i32, ptr %70, align 8, !tbaa !14
  br i1 %69, label %72, label %116

72:                                               ; preds = %64
  %73 = getelementptr inbounds i8, ptr %66, i64 232
  %74 = load ptr, ptr %73, align 8, !tbaa !30
  %75 = load i64, ptr %74, align 8, !tbaa !15
  store i64 %75, ptr %1, align 8, !tbaa !15
  %or.cond184 = icmp ult i32 %71, 2
  br i1 %or.cond184, label %.loopexit162, label %.lr.ph178.preheader

.lr.ph178.preheader:                              ; preds = %72
  %76 = ptrtoint ptr %74 to i64
  %77 = add i32 %71, -1
  %78 = zext i32 %77 to i64
  %min.iters.check238 = icmp ult i32 %71, 7
  %79 = sub i64 %4, %76
  %diff.check235 = icmp ult i64 %79, 32
  %or.cond289 = or i1 %min.iters.check238, %diff.check235
  br i1 %or.cond289, label %.lr.ph178.preheader293, label %vector.ph239

vector.ph239:                                     ; preds = %.lr.ph178.preheader
  %n.vec241 = and i64 %78, 4294967292
  %.cast242 = trunc nuw i64 %n.vec241 to i32
  %ind.end243 = sub i32 %77, %.cast242
  %80 = shl nuw nsw i64 %n.vec241, 3
  %ind.end245 = getelementptr i8, ptr %1, i64 %80
  %81 = shl nuw nsw i64 %n.vec241, 3
  %ind.end247 = getelementptr i8, ptr %74, i64 %81
  br label %vector.body249

vector.body249:                                   ; preds = %vector.body249, %vector.ph239
  %index250 = phi i64 [ 0, %vector.ph239 ], [ %index.next259, %vector.body249 ]
  %offset.idx251 = shl i64 %index250, 3
  %next.gep252 = getelementptr i8, ptr %1, i64 %offset.idx251
  %offset.idx254 = shl i64 %index250, 3
  %next.gep255 = getelementptr i8, ptr %74, i64 %offset.idx254
  %82 = getelementptr inbounds i8, ptr %next.gep252, i64 8
  %83 = getelementptr inbounds i8, ptr %next.gep255, i64 8
  %84 = getelementptr inbounds i8, ptr %next.gep255, i64 24
  %wide.load257 = load <2 x i64>, ptr %83, align 8, !tbaa !15
  %wide.load258 = load <2 x i64>, ptr %84, align 8, !tbaa !15
  %85 = getelementptr inbounds i8, ptr %next.gep252, i64 24
  store <2 x i64> %wide.load257, ptr %82, align 8, !tbaa !15
  store <2 x i64> %wide.load258, ptr %85, align 8, !tbaa !15
  %index.next259 = add nuw i64 %index250, 4
  %86 = icmp eq i64 %index.next259, %n.vec241
  br i1 %86, label %middle.block236, label %vector.body249, !llvm.loop !31

middle.block236:                                  ; preds = %vector.body249
  %cmp.n260 = icmp eq i64 %n.vec241, %78
  br i1 %cmp.n260, label %.loopexit162, label %.lr.ph178.preheader293

.lr.ph178.preheader293:                           ; preds = %middle.block236, %.lr.ph178.preheader
  %.ph294 = phi i32 [ %77, %.lr.ph178.preheader ], [ %ind.end243, %middle.block236 ]
  %.pn158177.ph = phi ptr [ %1, %.lr.ph178.preheader ], [ %ind.end245, %middle.block236 ]
  %.pn157176.ph = phi ptr [ %74, %.lr.ph178.preheader ], [ %ind.end247, %middle.block236 ]
  %87 = add i32 %.ph294, -1
  %xtraiter305 = and i32 %.ph294, 7
  %lcmp.mod306.not = icmp eq i32 %xtraiter305, 0
  br i1 %lcmp.mod306.not, label %.lr.ph178.prol.loopexit, label %.lr.ph178.prol

.lr.ph178.prol:                                   ; preds = %.lr.ph178.preheader293, %.lr.ph178.prol
  %88 = phi i32 [ %90, %.lr.ph178.prol ], [ %.ph294, %.lr.ph178.preheader293 ]
  %.pn158177.prol = phi ptr [ %.1132.prol, %.lr.ph178.prol ], [ %.pn158177.ph, %.lr.ph178.preheader293 ]
  %.pn157176.prol = phi ptr [ %.3138.prol, %.lr.ph178.prol ], [ %.pn157176.ph, %.lr.ph178.preheader293 ]
  %prol.iter307 = phi i32 [ %prol.iter307.next, %.lr.ph178.prol ], [ 0, %.lr.ph178.preheader293 ]
  %.1132.prol = getelementptr inbounds i8, ptr %.pn158177.prol, i64 8
  %.3138.prol = getelementptr inbounds i8, ptr %.pn157176.prol, i64 8
  %89 = load i64, ptr %.3138.prol, align 8, !tbaa !15
  store i64 %89, ptr %.1132.prol, align 8, !tbaa !15
  %90 = add i32 %88, -1
  %prol.iter307.next = add i32 %prol.iter307, 1
  %prol.iter307.cmp.not = icmp eq i32 %prol.iter307.next, %xtraiter305
  br i1 %prol.iter307.cmp.not, label %.lr.ph178.prol.loopexit, label %.lr.ph178.prol, !llvm.loop !32

.lr.ph178.prol.loopexit:                          ; preds = %.lr.ph178.prol, %.lr.ph178.preheader293
  %.unr308 = phi i32 [ %.ph294, %.lr.ph178.preheader293 ], [ %90, %.lr.ph178.prol ]
  %.pn158177.unr = phi ptr [ %.pn158177.ph, %.lr.ph178.preheader293 ], [ %.1132.prol, %.lr.ph178.prol ]
  %.pn157176.unr = phi ptr [ %.pn157176.ph, %.lr.ph178.preheader293 ], [ %.3138.prol, %.lr.ph178.prol ]
  %91 = icmp ult i32 %87, 7
  br i1 %91, label %.loopexit162, label %.lr.ph178

.lr.ph178:                                        ; preds = %.lr.ph178.prol.loopexit, %.lr.ph178
  %92 = phi i32 [ %101, %.lr.ph178 ], [ %.unr308, %.lr.ph178.prol.loopexit ]
  %.pn158177 = phi ptr [ %.1132.7, %.lr.ph178 ], [ %.pn158177.unr, %.lr.ph178.prol.loopexit ]
  %.pn157176 = phi ptr [ %.3138.7, %.lr.ph178 ], [ %.pn157176.unr, %.lr.ph178.prol.loopexit ]
  %.1132 = getelementptr inbounds i8, ptr %.pn158177, i64 8
  %.3138 = getelementptr inbounds i8, ptr %.pn157176, i64 8
  %93 = load i64, ptr %.3138, align 8, !tbaa !15
  store i64 %93, ptr %.1132, align 8, !tbaa !15
  %.1132.1 = getelementptr inbounds i8, ptr %.pn158177, i64 16
  %.3138.1 = getelementptr inbounds i8, ptr %.pn157176, i64 16
  %94 = load i64, ptr %.3138.1, align 8, !tbaa !15
  store i64 %94, ptr %.1132.1, align 8, !tbaa !15
  %.1132.2 = getelementptr inbounds i8, ptr %.pn158177, i64 24
  %.3138.2 = getelementptr inbounds i8, ptr %.pn157176, i64 24
  %95 = load i64, ptr %.3138.2, align 8, !tbaa !15
  store i64 %95, ptr %.1132.2, align 8, !tbaa !15
  %.1132.3 = getelementptr inbounds i8, ptr %.pn158177, i64 32
  %.3138.3 = getelementptr inbounds i8, ptr %.pn157176, i64 32
  %96 = load i64, ptr %.3138.3, align 8, !tbaa !15
  store i64 %96, ptr %.1132.3, align 8, !tbaa !15
  %.1132.4 = getelementptr inbounds i8, ptr %.pn158177, i64 40
  %.3138.4 = getelementptr inbounds i8, ptr %.pn157176, i64 40
  %97 = load i64, ptr %.3138.4, align 8, !tbaa !15
  store i64 %97, ptr %.1132.4, align 8, !tbaa !15
  %.1132.5 = getelementptr inbounds i8, ptr %.pn158177, i64 48
  %.3138.5 = getelementptr inbounds i8, ptr %.pn157176, i64 48
  %98 = load i64, ptr %.3138.5, align 8, !tbaa !15
  store i64 %98, ptr %.1132.5, align 8, !tbaa !15
  %.1132.6 = getelementptr inbounds i8, ptr %.pn158177, i64 56
  %.3138.6 = getelementptr inbounds i8, ptr %.pn157176, i64 56
  %99 = load i64, ptr %.3138.6, align 8, !tbaa !15
  store i64 %99, ptr %.1132.6, align 8, !tbaa !15
  %.1132.7 = getelementptr inbounds i8, ptr %.pn158177, i64 64
  %.3138.7 = getelementptr inbounds i8, ptr %.pn157176, i64 64
  %100 = load i64, ptr %.3138.7, align 8, !tbaa !15
  store i64 %100, ptr %.1132.7, align 8, !tbaa !15
  %101 = add i32 %92, -8
  %.not156.7 = icmp eq i32 %101, 0
  br i1 %.not156.7, label %.loopexit162, label %.lr.ph178, !llvm.loop !33

.loopexit162:                                     ; preds = %.lr.ph178.prol.loopexit, %.lr.ph178, %middle.block236, %72
  %102 = add i32 %7, -1
  %103 = icmp eq i32 %102, 0
  br i1 %103, label %111, label %104

104:                                              ; preds = %.loopexit162
  %105 = getelementptr inbounds i8, ptr %66, i64 208
  %106 = load ptr, ptr %105, align 8, !tbaa !34
  %107 = getelementptr inbounds i8, ptr %66, i64 216
  %108 = load ptr, ptr %107, align 8, !tbaa !35
  %109 = getelementptr inbounds i8, ptr %106, i64 216
  store ptr %108, ptr %109, align 8, !tbaa !35
  %110 = getelementptr inbounds i8, ptr %108, i64 208
  store ptr %106, ptr %110, align 8, !tbaa !34
  br label %111

111:                                              ; preds = %.loopexit162, %104
  %.sink = phi ptr [ %106, %104 ], [ null, %.loopexit162 ]
  store ptr %.sink, ptr %65, align 8
  store i32 %102, ptr %6, align 8, !tbaa !5
  %112 = getelementptr inbounds i8, ptr %66, i64 192
  store ptr null, ptr %112, align 8, !tbaa !36
  %113 = getelementptr inbounds i8, ptr %66, i64 244
  store i32 0, ptr %113, align 4, !tbaa !37
  %114 = load volatile i32, ptr @_tx_thread_preempt_disable, align 4, !tbaa !38
  %115 = add i32 %114, 1
  store volatile i32 %115, 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 %66) #3
  br label %259

116:                                              ; preds = %64
  %117 = getelementptr inbounds i8, ptr %0, i64 48
  %118 = load ptr, ptr %117, align 8, !tbaa !13
  %119 = getelementptr i8, ptr %118, i64 8
  %120 = load i64, ptr %118, align 8, !tbaa !15
  store i64 %120, ptr %1, align 8, !tbaa !15
  %121 = add i32 %71, -1
  %or.cond186 = icmp ult i32 %71, 2
  br i1 %or.cond186, label %.loopexit166, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %116
  %122 = ptrtoint ptr %118 to i64
  %123 = zext i32 %121 to i64
  %min.iters.check = icmp ult i32 %71, 7
  %124 = sub i64 %4, %122
  %diff.check = icmp ult i64 %124, 32
  %or.cond290 = or i1 %min.iters.check, %diff.check
  br i1 %or.cond290, label %.lr.ph.preheader298, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph.preheader
  %n.vec = and i64 %123, 4294967292
  %.cast = trunc nuw i64 %n.vec to i32
  %ind.end = sub i32 %121, %.cast
  %125 = shl nuw nsw i64 %n.vec, 3
  %ind.end198 = getelementptr i8, ptr %1, i64 %125
  %126 = shl nuw nsw i64 %n.vec, 3
  %ind.end200 = getelementptr i8, ptr %119, i64 %126
  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 %1, i64 %offset.idx
  %offset.idx203 = shl i64 %index, 3
  %next.gep204 = getelementptr i8, ptr %119, i64 %offset.idx203
  %127 = getelementptr inbounds i8, ptr %next.gep, i64 8
  %128 = getelementptr i8, ptr %next.gep204, i64 16
  %wide.load = load <2 x i64>, ptr %next.gep204, align 8, !tbaa !15
  %wide.load206 = load <2 x i64>, ptr %128, align 8, !tbaa !15
  %129 = getelementptr inbounds i8, ptr %next.gep, i64 24
  store <2 x i64> %wide.load, ptr %127, align 8, !tbaa !15
  store <2 x i64> %wide.load206, ptr %129, align 8, !tbaa !15
  %index.next = add nuw i64 %index, 4
  %130 = icmp eq i64 %index.next, %n.vec
  br i1 %130, label %middle.block, label %vector.body, !llvm.loop !39

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %123
  br i1 %cmp.n, label %.loopexit166, label %.lr.ph.preheader298

.lr.ph.preheader298:                              ; preds = %middle.block, %.lr.ph.preheader
  %.ph299 = phi i32 [ %121, %.lr.ph.preheader ], [ %ind.end, %middle.block ]
  %.pn155169.ph = phi ptr [ %1, %.lr.ph.preheader ], [ %ind.end198, %middle.block ]
  %.4139168.ph = phi ptr [ %119, %.lr.ph.preheader ], [ %ind.end200, %middle.block ]
  %131 = add i32 %.ph299, -1
  %xtraiter = and i32 %.ph299, 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.preheader298, %.lr.ph.prol
  %132 = phi i32 [ %135, %.lr.ph.prol ], [ %.ph299, %.lr.ph.preheader298 ]
  %.pn155169.prol = phi ptr [ %.2133.prol, %.lr.ph.prol ], [ %.pn155169.ph, %.lr.ph.preheader298 ]
  %.4139168.prol = phi ptr [ %133, %.lr.ph.prol ], [ %.4139168.ph, %.lr.ph.preheader298 ]
  %prol.iter = phi i32 [ %prol.iter.next, %.lr.ph.prol ], [ 0, %.lr.ph.preheader298 ]
  %.2133.prol = getelementptr inbounds i8, ptr %.pn155169.prol, i64 8
  %133 = getelementptr inbounds i8, ptr %.4139168.prol, i64 8
  %134 = load i64, ptr %.4139168.prol, align 8, !tbaa !15
  store i64 %134, ptr %.2133.prol, align 8, !tbaa !15
  %135 = add i32 %132, -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 !40

.lr.ph.prol.loopexit:                             ; preds = %.lr.ph.prol, %.lr.ph.preheader298
  %.lcssa300.unr = phi ptr [ poison, %.lr.ph.preheader298 ], [ %133, %.lr.ph.prol ]
  %.unr = phi i32 [ %.ph299, %.lr.ph.preheader298 ], [ %135, %.lr.ph.prol ]
  %.pn155169.unr = phi ptr [ %.pn155169.ph, %.lr.ph.preheader298 ], [ %.2133.prol, %.lr.ph.prol ]
  %.4139168.unr = phi ptr [ %.4139168.ph, %.lr.ph.preheader298 ], [ %133, %.lr.ph.prol ]
  %136 = icmp ult i32 %131, 7
  br i1 %136, label %.loopexit166, label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.prol.loopexit, %.lr.ph
  %137 = phi i32 [ %154, %.lr.ph ], [ %.unr, %.lr.ph.prol.loopexit ]
  %.pn155169 = phi ptr [ %.2133.7, %.lr.ph ], [ %.pn155169.unr, %.lr.ph.prol.loopexit ]
  %.4139168 = phi ptr [ %152, %.lr.ph ], [ %.4139168.unr, %.lr.ph.prol.loopexit ]
  %.2133 = getelementptr inbounds i8, ptr %.pn155169, i64 8
  %138 = getelementptr inbounds i8, ptr %.4139168, i64 8
  %139 = load i64, ptr %.4139168, align 8, !tbaa !15
  store i64 %139, ptr %.2133, align 8, !tbaa !15
  %.2133.1 = getelementptr inbounds i8, ptr %.pn155169, i64 16
  %140 = getelementptr inbounds i8, ptr %.4139168, i64 16
  %141 = load i64, ptr %138, align 8, !tbaa !15
  store i64 %141, ptr %.2133.1, align 8, !tbaa !15
  %.2133.2 = getelementptr inbounds i8, ptr %.pn155169, i64 24
  %142 = getelementptr inbounds i8, ptr %.4139168, i64 24
  %143 = load i64, ptr %140, align 8, !tbaa !15
  store i64 %143, ptr %.2133.2, align 8, !tbaa !15
  %.2133.3 = getelementptr inbounds i8, ptr %.pn155169, i64 32
  %144 = getelementptr inbounds i8, ptr %.4139168, i64 32
  %145 = load i64, ptr %142, align 8, !tbaa !15
  store i64 %145, ptr %.2133.3, align 8, !tbaa !15
  %.2133.4 = getelementptr inbounds i8, ptr %.pn155169, i64 40
  %146 = getelementptr inbounds i8, ptr %.4139168, i64 40
  %147 = load i64, ptr %144, align 8, !tbaa !15
  store i64 %147, ptr %.2133.4, align 8, !tbaa !15
  %.2133.5 = getelementptr inbounds i8, ptr %.pn155169, i64 48
  %148 = getelementptr inbounds i8, ptr %.4139168, i64 48
  %149 = load i64, ptr %146, align 8, !tbaa !15
  store i64 %149, ptr %.2133.5, align 8, !tbaa !15
  %.2133.6 = getelementptr inbounds i8, ptr %.pn155169, i64 56
  %150 = getelementptr inbounds i8, ptr %.4139168, i64 56
  %151 = load i64, ptr %148, align 8, !tbaa !15
  store i64 %151, ptr %.2133.6, align 8, !tbaa !15
  %.2133.7 = getelementptr inbounds i8, ptr %.pn155169, i64 64
  %152 = getelementptr inbounds i8, ptr %.4139168, i64 64
  %153 = load i64, ptr %150, align 8, !tbaa !15
  store i64 %153, ptr %.2133.7, align 8, !tbaa !15
  %154 = add i32 %137, -8
  %.not153.7 = icmp eq i32 %154, 0
  br i1 %.not153.7, label %.loopexit166, label %.lr.ph, !llvm.loop !41

.loopexit166:                                     ; preds = %.lr.ph.prol.loopexit, %.lr.ph, %middle.block, %116
  %.5140 = phi ptr [ %119, %116 ], [ %ind.end200, %middle.block ], [ %.lcssa300.unr, %.lr.ph.prol.loopexit ], [ %152, %.lr.ph ]
  %155 = getelementptr inbounds i8, ptr %0, i64 40
  %156 = load ptr, ptr %155, align 8, !tbaa !23
  %157 = icmp eq ptr %.5140, %156
  br i1 %157, label %158, label %161

158:                                              ; preds = %.loopexit166
  %159 = getelementptr inbounds i8, ptr %0, i64 32
  %160 = load ptr, ptr %159, align 8, !tbaa !24
  br label %161

161:                                              ; preds = %158, %.loopexit166
  %.6 = phi ptr [ %160, %158 ], [ %.5140, %.loopexit166 ]
  store ptr %.6, ptr %117, align 8, !tbaa !13
  %162 = load volatile i32, ptr @_tx_thread_preempt_disable, align 4, !tbaa !38
  %163 = add i32 %162, 1
  store volatile i32 %163, ptr @_tx_thread_preempt_disable, align 4, !tbaa !38
  %164 = load volatile i32, ptr @_tx_thread_preempt_disable, align 4, !tbaa !38
  %165 = add i32 %164, -1
  store volatile i32 %165, ptr @_tx_thread_preempt_disable, align 4, !tbaa !38
  %166 = getelementptr inbounds i8, ptr %66, i64 232
  %167 = load ptr, ptr %166, align 8, !tbaa !30
  %168 = getelementptr inbounds i8, ptr %0, i64 56
  %169 = load ptr, ptr %168, align 8, !tbaa !42
  %170 = load i64, ptr %167, align 8, !tbaa !15
  %171 = getelementptr i8, ptr %169, i64 8
  store i64 %170, ptr %169, align 8, !tbaa !15
  br i1 %or.cond186, label %.loopexit164, label %.lr.ph173.preheader

.lr.ph173.preheader:                              ; preds = %161
  %172 = ptrtoint ptr %169 to i64
  %173 = ptrtoint ptr %167 to i64
  %174 = zext i32 %121 to i64
  %min.iters.check211 = icmp ult i32 %71, 7
  %175 = sub i64 %172, %173
  %diff.check208 = icmp ult i64 %175, 32
  %or.cond291 = or i1 %min.iters.check211, %diff.check208
  br i1 %or.cond291, label %.lr.ph173.preheader295, label %vector.ph212

vector.ph212:                                     ; preds = %.lr.ph173.preheader
  %n.vec214 = and i64 %174, 4294967292
  %.cast215 = trunc nuw i64 %n.vec214 to i32
  %ind.end216 = sub i32 %121, %.cast215
  %176 = shl nuw nsw i64 %n.vec214, 3
  %ind.end218 = getelementptr i8, ptr %171, i64 %176
  %177 = shl nuw nsw i64 %n.vec214, 3
  %ind.end220 = getelementptr i8, ptr %167, i64 %177
  br label %vector.body222

vector.body222:                                   ; preds = %vector.body222, %vector.ph212
  %index223 = phi i64 [ 0, %vector.ph212 ], [ %index.next232, %vector.body222 ]
  %offset.idx224 = shl i64 %index223, 3
  %next.gep225 = getelementptr i8, ptr %171, i64 %offset.idx224
  %offset.idx227 = shl i64 %index223, 3
  %next.gep228 = getelementptr i8, ptr %167, i64 %offset.idx227
  %178 = getelementptr inbounds i8, ptr %next.gep228, i64 8
  %179 = getelementptr inbounds i8, ptr %next.gep228, i64 24
  %wide.load230 = load <2 x i64>, ptr %178, align 8, !tbaa !15
  %wide.load231 = load <2 x i64>, ptr %179, align 8, !tbaa !15
  %180 = getelementptr i8, ptr %next.gep225, i64 16
  store <2 x i64> %wide.load230, ptr %next.gep225, align 8, !tbaa !15
  store <2 x i64> %wide.load231, ptr %180, align 8, !tbaa !15
  %index.next232 = add nuw i64 %index223, 4
  %181 = icmp eq i64 %index.next232, %n.vec214
  br i1 %181, label %middle.block209, label %vector.body222, !llvm.loop !43

middle.block209:                                  ; preds = %vector.body222
  %cmp.n233 = icmp eq i64 %n.vec214, %174
  br i1 %cmp.n233, label %.loopexit164, label %.lr.ph173.preheader295

.lr.ph173.preheader295:                           ; preds = %middle.block209, %.lr.ph173.preheader
  %.ph296 = phi i32 [ %121, %.lr.ph173.preheader ], [ %ind.end216, %middle.block209 ]
  %.3134172.ph = phi ptr [ %171, %.lr.ph173.preheader ], [ %ind.end218, %middle.block209 ]
  %.pn171.ph = phi ptr [ %167, %.lr.ph173.preheader ], [ %ind.end220, %middle.block209 ]
  %182 = add i32 %.ph296, -1
  %xtraiter301 = and i32 %.ph296, 7
  %lcmp.mod302.not = icmp eq i32 %xtraiter301, 0
  br i1 %lcmp.mod302.not, label %.lr.ph173.prol.loopexit, label %.lr.ph173.prol

.lr.ph173.prol:                                   ; preds = %.lr.ph173.preheader295, %.lr.ph173.prol
  %183 = phi i32 [ %186, %.lr.ph173.prol ], [ %.ph296, %.lr.ph173.preheader295 ]
  %.3134172.prol = phi ptr [ %185, %.lr.ph173.prol ], [ %.3134172.ph, %.lr.ph173.preheader295 ]
  %.pn171.prol = phi ptr [ %.7.prol, %.lr.ph173.prol ], [ %.pn171.ph, %.lr.ph173.preheader295 ]
  %prol.iter303 = phi i32 [ %prol.iter303.next, %.lr.ph173.prol ], [ 0, %.lr.ph173.preheader295 ]
  %.7.prol = getelementptr inbounds i8, ptr %.pn171.prol, i64 8
  %184 = load i64, ptr %.7.prol, align 8, !tbaa !15
  %185 = getelementptr inbounds i8, ptr %.3134172.prol, i64 8
  store i64 %184, ptr %.3134172.prol, align 8, !tbaa !15
  %186 = add i32 %183, -1
  %prol.iter303.next = add i32 %prol.iter303, 1
  %prol.iter303.cmp.not = icmp eq i32 %prol.iter303.next, %xtraiter301
  br i1 %prol.iter303.cmp.not, label %.lr.ph173.prol.loopexit, label %.lr.ph173.prol, !llvm.loop !44

.lr.ph173.prol.loopexit:                          ; preds = %.lr.ph173.prol, %.lr.ph173.preheader295
  %.lcssa297.unr = phi ptr [ poison, %.lr.ph173.preheader295 ], [ %185, %.lr.ph173.prol ]
  %.unr304 = phi i32 [ %.ph296, %.lr.ph173.preheader295 ], [ %186, %.lr.ph173.prol ]
  %.3134172.unr = phi ptr [ %.3134172.ph, %.lr.ph173.preheader295 ], [ %185, %.lr.ph173.prol ]
  %.pn171.unr = phi ptr [ %.pn171.ph, %.lr.ph173.preheader295 ], [ %.7.prol, %.lr.ph173.prol ]
  %187 = icmp ult i32 %182, 7
  br i1 %187, label %.loopexit164, label %.lr.ph173

.lr.ph173:                                        ; preds = %.lr.ph173.prol.loopexit, %.lr.ph173
  %188 = phi i32 [ %205, %.lr.ph173 ], [ %.unr304, %.lr.ph173.prol.loopexit ]
  %.3134172 = phi ptr [ %204, %.lr.ph173 ], [ %.3134172.unr, %.lr.ph173.prol.loopexit ]
  %.pn171 = phi ptr [ %.7.7, %.lr.ph173 ], [ %.pn171.unr, %.lr.ph173.prol.loopexit ]
  %.7 = getelementptr inbounds i8, ptr %.pn171, i64 8
  %189 = load i64, ptr %.7, align 8, !tbaa !15
  %190 = getelementptr inbounds i8, ptr %.3134172, i64 8
  store i64 %189, ptr %.3134172, align 8, !tbaa !15
  %.7.1 = getelementptr inbounds i8, ptr %.pn171, i64 16
  %191 = load i64, ptr %.7.1, align 8, !tbaa !15
  %192 = getelementptr inbounds i8, ptr %.3134172, i64 16
  store i64 %191, ptr %190, align 8, !tbaa !15
  %.7.2 = getelementptr inbounds i8, ptr %.pn171, i64 24
  %193 = load i64, ptr %.7.2, align 8, !tbaa !15
  %194 = getelementptr inbounds i8, ptr %.3134172, i64 24
  store i64 %193, ptr %192, align 8, !tbaa !15
  %.7.3 = getelementptr inbounds i8, ptr %.pn171, i64 32
  %195 = load i64, ptr %.7.3, align 8, !tbaa !15
  %196 = getelementptr inbounds i8, ptr %.3134172, i64 32
  store i64 %195, ptr %194, align 8, !tbaa !15
  %.7.4 = getelementptr inbounds i8, ptr %.pn171, i64 40
  %197 = load i64, ptr %.7.4, align 8, !tbaa !15
  %198 = getelementptr inbounds i8, ptr %.3134172, i64 40
  store i64 %197, ptr %196, align 8, !tbaa !15
  %.7.5 = getelementptr inbounds i8, ptr %.pn171, i64 48
  %199 = load i64, ptr %.7.5, align 8, !tbaa !15
  %200 = getelementptr inbounds i8, ptr %.3134172, i64 48
  store i64 %199, ptr %198, align 8, !tbaa !15
  %.7.6 = getelementptr inbounds i8, ptr %.pn171, i64 56
  %201 = load i64, ptr %.7.6, align 8, !tbaa !15
  %202 = getelementptr inbounds i8, ptr %.3134172, i64 56
  store i64 %201, ptr %200, align 8, !tbaa !15
  %.7.7 = getelementptr inbounds i8, ptr %.pn171, i64 64
  %203 = load i64, ptr %.7.7, align 8, !tbaa !15
  %204 = getelementptr inbounds i8, ptr %.3134172, i64 64
  store i64 %203, ptr %202, align 8, !tbaa !15
  %205 = add i32 %188, -8
  %.not154.7 = icmp eq i32 %205, 0
  br i1 %.not154.7, label %.loopexit164, label %.lr.ph173, !llvm.loop !45

.loopexit164:                                     ; preds = %.lr.ph173.prol.loopexit, %.lr.ph173, %middle.block209, %161
  %.4 = phi ptr [ %171, %161 ], [ %ind.end218, %middle.block209 ], [ %.lcssa297.unr, %.lr.ph173.prol.loopexit ], [ %204, %.lr.ph173 ]
  %206 = icmp eq ptr %.4, %156
  br i1 %206, label %207, label %210

207:                                              ; preds = %.loopexit164
  %208 = getelementptr inbounds i8, ptr %0, i64 32
  %209 = load ptr, ptr %208, align 8, !tbaa !24
  br label %210

210:                                              ; preds = %207, %.loopexit164
  %.5 = phi ptr [ %209, %207 ], [ %.4, %.loopexit164 ]
  store ptr %.5, ptr %168, align 8, !tbaa !42
  %211 = add i32 %7, -1
  %212 = icmp eq i32 %211, 0
  br i1 %212, label %220, label %213

213:                                              ; preds = %210
  %214 = getelementptr inbounds i8, ptr %66, i64 208
  %215 = load ptr, ptr %214, align 8, !tbaa !34
  %216 = getelementptr inbounds i8, ptr %66, i64 216
  %217 = load ptr, ptr %216, align 8, !tbaa !35
  %218 = getelementptr inbounds i8, ptr %215, i64 216
  store ptr %217, ptr %218, align 8, !tbaa !35
  %219 = getelementptr inbounds i8, ptr %217, i64 208
  store ptr %215, ptr %219, align 8, !tbaa !34
  br label %220

220:                                              ; preds = %210, %213
  %.sink192 = phi ptr [ %215, %213 ], [ null, %210 ]
  store ptr %.sink192, ptr %65, align 8
  store i32 %211, ptr %6, align 8, !tbaa !5
  %221 = getelementptr inbounds i8, ptr %66, i64 192
  store ptr null, ptr %221, align 8, !tbaa !36
  %222 = getelementptr inbounds i8, ptr %66, i64 244
  store i32 0, ptr %222, align 4, !tbaa !37
  %223 = load volatile i32, ptr @_tx_thread_preempt_disable, align 4, !tbaa !38
  %224 = add i32 %223, 1
  store volatile i32 %224, 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 %66) #3
  br label %259

225:                                              ; preds = %3
  %.not151 = icmp eq i64 %2, 0
  br i1 %.not151, label %258, label %226

226:                                              ; preds = %225
  %227 = load volatile i32, ptr @_tx_thread_preempt_disable, align 4, !tbaa !38
  %.not152 = icmp eq i32 %227, 0
  br i1 %.not152, label %229, label %228

228:                                              ; preds = %226
  tail call void @__restore_interrupt(i32 noundef %5)
  br label %259

229:                                              ; preds = %226
  %230 = load ptr, ptr @_tx_thread_current_ptr, align 8, !tbaa !46
  %231 = getelementptr inbounds i8, ptr %230, i64 192
  store ptr @_tx_queue_cleanup, ptr %231, align 8, !tbaa !36
  %232 = getelementptr inbounds i8, ptr %230, i64 200
  store ptr %0, ptr %232, align 8, !tbaa !47
  %233 = getelementptr inbounds i8, ptr %230, i64 232
  store ptr %1, ptr %233, align 8, !tbaa !30
  %234 = getelementptr inbounds i8, ptr %230, i64 240
  store i32 0, ptr %234, align 8, !tbaa !27
  %235 = getelementptr inbounds i8, ptr %230, i64 320
  %236 = load i64, ptr %235, align 8, !tbaa !48
  %237 = add i64 %236, 1
  store i64 %237, ptr %235, align 8, !tbaa !48
  %238 = icmp eq i32 %7, 0
  %239 = getelementptr inbounds i8, ptr %0, i64 64
  %240 = getelementptr inbounds i8, ptr %230, i64 208
  br i1 %238, label %241, label %243

241:                                              ; preds = %229
  store ptr %230, ptr %239, align 8, !tbaa !26
  store ptr %230, ptr %240, align 8, !tbaa !34
  %242 = getelementptr inbounds i8, ptr %230, i64 216
  br label %249

243:                                              ; preds = %229
  %244 = load ptr, ptr %239, align 8, !tbaa !26
  store ptr %244, ptr %240, align 8, !tbaa !34
  %245 = getelementptr inbounds i8, ptr %244, i64 216
  %246 = load ptr, ptr %245, align 8, !tbaa !35
  %247 = getelementptr inbounds i8, ptr %230, i64 216
  store ptr %246, ptr %247, align 8, !tbaa !35
  %248 = getelementptr inbounds i8, ptr %246, i64 208
  store ptr %230, ptr %248, align 8, !tbaa !34
  br label %249

249:                                              ; preds = %243, %241
  %.sink195 = phi ptr [ %245, %243 ], [ %242, %241 ]
  store ptr %230, ptr %.sink195, align 8, !tbaa !35
  %250 = add i32 %7, 1
  store i32 %250, ptr %6, align 8, !tbaa !5
  %251 = getelementptr inbounds i8, ptr %230, i64 92
  store i32 5, ptr %251, align 4, !tbaa !49
  %252 = getelementptr inbounds i8, ptr %230, i64 100
  store i32 1, ptr %252, align 4, !tbaa !50
  %253 = getelementptr inbounds i8, ptr %230, i64 136
  store i64 %2, ptr %253, align 8, !tbaa !51
  %254 = load volatile i32, ptr @_tx_thread_preempt_disable, align 4, !tbaa !38
  %255 = add i32 %254, 1
  store volatile i32 %255, 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 %230) #3
  %256 = getelementptr inbounds i8, ptr %230, i64 244
  %257 = load i32, ptr %256, align 4, !tbaa !37
  br label %259

258:                                              ; preds = %225
  tail call void @__restore_interrupt(i32 noundef %5)
  br label %259

259:                                              ; preds = %258, %249, %228, %59, %220, %111
  %.0 = phi i32 [ 0, %59 ], [ 0, %111 ], [ 0, %220 ], [ 10, %228 ], [ %257, %249 ], [ 10, %258 ]
  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 24}
!13 = !{!6, !10, i64 48}
!14 = !{!6, !11, i64 16}
!15 = !{!7, !7, i64 0}
!16 = distinct !{!16, !17, !18, !19}
!17 = !{!"llvm.loop.mustprogress"}
!18 = !{!"llvm.loop.isvectorized", i32 1}
!19 = !{!"llvm.loop.unroll.runtime.disable"}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.unroll.disable"}
!22 = distinct !{!22, !17, !18}
!23 = !{!6, !10, i64 40}
!24 = !{!6, !10, i64 32}
!25 = !{!6, !11, i64 28}
!26 = !{!6, !10, i64 64}
!27 = !{!28, !11, i64 240}
!28 = !{!"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, !29, 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}
!29 = !{!"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}
!30 = !{!28, !10, i64 232}
!31 = distinct !{!31, !17, !18, !19}
!32 = distinct !{!32, !21}
!33 = distinct !{!33, !17, !18}
!34 = !{!28, !10, i64 208}
!35 = !{!28, !10, i64 216}
!36 = !{!28, !10, i64 192}
!37 = !{!28, !11, i64 244}
!38 = !{!11, !11, i64 0}
!39 = distinct !{!39, !17, !18, !19}
!40 = distinct !{!40, !21}
!41 = distinct !{!41, !17, !18}
!42 = !{!6, !10, i64 56}
!43 = distinct !{!43, !17, !18, !19}
!44 = distinct !{!44, !21}
!45 = distinct !{!45, !17, !18}
!46 = !{!10, !10, i64 0}
!47 = !{!28, !10, i64 200}
!48 = !{!28, !7, i64 320}
!49 = !{!28, !11, i64 92}
!50 = !{!28, !11, i64 100}
!51 = !{!28, !7, i64 136}


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