; LLVM IR from eclipse-threadx/threadx :: ports_module/cortex_a35/ac6/example_build/sample_threadx_module (start)

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

@semaphore_0 = external dso_local global ptr, align 8
@event_flags_0 = external dso_local global ptr, align 8
@queue_0 = external dso_local global ptr, align 8
@thread_0 = external dso_local global ptr, align 8
@thread_1 = external dso_local global ptr, align 8
@thread_2 = external dso_local global ptr, align 8
@thread_3 = external dso_local global ptr, align 8
@thread_4 = external dso_local global ptr, align 8
@thread_5 = external dso_local global ptr, align 8
@thread_6 = external dso_local global ptr, align 8
@thread_7 = external dso_local global ptr, align 8
@mutex_0 = external dso_local global ptr, align 8
@byte_pool_0 = external dso_local global ptr, align 8
@block_pool_0 = external dso_local global ptr, align 8
@.str = external hidden unnamed_addr constant [19 x i8], align 1
@demo_module_pool_space = external dso_local global [6144 x i64], align 16
@.str.1 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [20 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @semaphore_0_notify(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local void @event_0_notify(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local void @queue_0_notify(ptr noundef) #0

; Function Attrs: nounwind uwtable
define dso_local void @demo_module_start(i64 noundef %0) #0 {
  %2 = alloca i64, align 8
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  store i64 %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #3
  %5 = call i32 @_txm_module_object_allocate(ptr noundef @thread_0, i64 noundef 344)
  store i32 %5, ptr %3, align 4, !tbaa !9
  br label %6

6:                                                ; preds = %9, %1
  %7 = load i32, ptr %3, align 4, !tbaa !9
  %8 = icmp ne i32 %7, 0
  br i1 %8, label %9, label %10

9:                                                ; preds = %6
  br label %6, !llvm.loop !11

10:                                               ; preds = %6
  %11 = call i32 @_txm_module_object_allocate(ptr noundef @thread_1, i64 noundef 344)
  store i32 %11, ptr %3, align 4, !tbaa !9
  br label %12

12:                                               ; preds = %15, %10
  %13 = load i32, ptr %3, align 4, !tbaa !9
  %14 = icmp ne i32 %13, 0
  br i1 %14, label %15, label %16

15:                                               ; preds = %12
  br label %12, !llvm.loop !13

16:                                               ; preds = %12
  %17 = call i32 @_txm_module_object_allocate(ptr noundef @thread_2, i64 noundef 344)
  store i32 %17, ptr %3, align 4, !tbaa !9
  br label %18

18:                                               ; preds = %21, %16
  %19 = load i32, ptr %3, align 4, !tbaa !9
  %20 = icmp ne i32 %19, 0
  br i1 %20, label %21, label %22

21:                                               ; preds = %18
  br label %18, !llvm.loop !14

22:                                               ; preds = %18
  %23 = call i32 @_txm_module_object_allocate(ptr noundef @thread_3, i64 noundef 344)
  store i32 %23, ptr %3, align 4, !tbaa !9
  br label %24

24:                                               ; preds = %27, %22
  %25 = load i32, ptr %3, align 4, !tbaa !9
  %26 = icmp ne i32 %25, 0
  br i1 %26, label %27, label %28

27:                                               ; preds = %24
  br label %24, !llvm.loop !15

28:                                               ; preds = %24
  %29 = call i32 @_txm_module_object_allocate(ptr noundef @thread_4, i64 noundef 344)
  store i32 %29, ptr %3, align 4, !tbaa !9
  br label %30

30:                                               ; preds = %33, %28
  %31 = load i32, ptr %3, align 4, !tbaa !9
  %32 = icmp ne i32 %31, 0
  br i1 %32, label %33, label %34

33:                                               ; preds = %30
  br label %30, !llvm.loop !16

34:                                               ; preds = %30
  %35 = call i32 @_txm_module_object_allocate(ptr noundef @thread_5, i64 noundef 344)
  store i32 %35, ptr %3, align 4, !tbaa !9
  br label %36

36:                                               ; preds = %39, %34
  %37 = load i32, ptr %3, align 4, !tbaa !9
  %38 = icmp ne i32 %37, 0
  br i1 %38, label %39, label %40

39:                                               ; preds = %36
  br label %36, !llvm.loop !17

40:                                               ; preds = %36
  %41 = call i32 @_txm_module_object_allocate(ptr noundef @thread_6, i64 noundef 344)
  store i32 %41, ptr %3, align 4, !tbaa !9
  br label %42

42:                                               ; preds = %45, %40
  %43 = load i32, ptr %3, align 4, !tbaa !9
  %44 = icmp ne i32 %43, 0
  br i1 %44, label %45, label %46

45:                                               ; preds = %42
  br label %42, !llvm.loop !18

46:                                               ; preds = %42
  %47 = call i32 @_txm_module_object_allocate(ptr noundef @thread_7, i64 noundef 344)
  store i32 %47, ptr %3, align 4, !tbaa !9
  br label %48

48:                                               ; preds = %51, %46
  %49 = load i32, ptr %3, align 4, !tbaa !9
  %50 = icmp ne i32 %49, 0
  br i1 %50, label %51, label %52

51:                                               ; preds = %48
  br label %48, !llvm.loop !19

52:                                               ; preds = %48
  %53 = call i32 @_txm_module_object_allocate(ptr noundef @queue_0, i64 noundef 104)
  store i32 %53, ptr %3, align 4, !tbaa !9
  br label %54

54:                                               ; preds = %57, %52
  %55 = load i32, ptr %3, align 4, !tbaa !9
  %56 = icmp ne i32 %55, 0
  br i1 %56, label %57, label %58

57:                                               ; preds = %54
  br label %54, !llvm.loop !20

58:                                               ; preds = %54
  %59 = call i32 @_txm_module_object_allocate(ptr noundef @semaphore_0, i64 noundef 64)
  store i32 %59, ptr %3, align 4, !tbaa !9
  br label %60

60:                                               ; preds = %63, %58
  %61 = load i32, ptr %3, align 4, !tbaa !9
  %62 = icmp ne i32 %61, 0
  br i1 %62, label %63, label %64

63:                                               ; preds = %60
  br label %60, !llvm.loop !21

64:                                               ; preds = %60
  %65 = call i32 @_txm_module_object_allocate(ptr noundef @mutex_0, i64 noundef 96)
  store i32 %65, ptr %3, align 4, !tbaa !9
  br label %66

66:                                               ; preds = %69, %64
  %67 = load i32, ptr %3, align 4, !tbaa !9
  %68 = icmp ne i32 %67, 0
  br i1 %68, label %69, label %70

69:                                               ; preds = %66
  br label %66, !llvm.loop !22

70:                                               ; preds = %66
  %71 = call i32 @_txm_module_object_allocate(ptr noundef @event_flags_0, i64 noundef 80)
  store i32 %71, ptr %3, align 4, !tbaa !9
  br label %72

72:                                               ; preds = %75, %70
  %73 = load i32, ptr %3, align 4, !tbaa !9
  %74 = icmp ne i32 %73, 0
  br i1 %74, label %75, label %76

75:                                               ; preds = %72
  br label %72, !llvm.loop !23

76:                                               ; preds = %72
  %77 = call i32 @_txm_module_object_allocate(ptr noundef @byte_pool_0, i64 noundef 104)
  store i32 %77, ptr %3, align 4, !tbaa !9
  br label %78

78:                                               ; preds = %81, %76
  %79 = load i32, ptr %3, align 4, !tbaa !9
  %80 = icmp ne i32 %79, 0
  br i1 %80, label %81, label %82

81:                                               ; preds = %78
  br label %78, !llvm.loop !24

82:                                               ; preds = %78
  %83 = call i32 @_txm_module_object_allocate(ptr noundef @block_pool_0, i64 noundef 88)
  store i32 %83, ptr %3, align 4, !tbaa !9
  br label %84

84:                                               ; preds = %87, %82
  %85 = load i32, ptr %3, align 4, !tbaa !9
  %86 = icmp ne i32 %85, 0
  br i1 %86, label %87, label %88

87:                                               ; preds = %84
  br label %84, !llvm.loop !25

88:                                               ; preds = %84
  %89 = load ptr, ptr @byte_pool_0, align 8, !tbaa !26
  %90 = call i32 @_txe_byte_pool_create(ptr noundef %89, ptr noundef @.str, ptr noundef @demo_module_pool_space, i64 noundef 49152, i32 noundef 104)
  store i32 %90, ptr %3, align 4, !tbaa !9
  br label %91

91:                                               ; preds = %94, %88
  %92 = load i32, ptr %3, align 4, !tbaa !9
  %93 = icmp ne i32 %92, 0
  br i1 %93, label %94, label %95

94:                                               ; preds = %91
  br label %91, !llvm.loop !28

95:                                               ; preds = %91
  %96 = load ptr, ptr @byte_pool_0, align 8, !tbaa !26
  %97 = call i32 @_txe_byte_allocate(ptr noundef %96, ptr noundef %4, i64 noundef 4096, i64 noundef 0)
  store i32 %97, ptr %3, align 4, !tbaa !9
  br label %98

98:                                               ; preds = %101, %95
  %99 = load i32, ptr %3, align 4, !tbaa !9
  %100 = icmp ne i32 %99, 0
  br i1 %100, label %101, label %102

101:                                              ; preds = %98
  br label %98, !llvm.loop !29

102:                                              ; preds = %98
  %103 = load ptr, ptr @thread_0, align 8, !tbaa !26
  %104 = load ptr, ptr %4, align 8, !tbaa !26
  %105 = call i32 @_txe_thread_create(ptr noundef %103, ptr noundef @.str.1, ptr noundef @thread_0_entry, i64 noundef 0, ptr noundef %104, i64 noundef 4096, i32 noundef 1, i32 noundef 1, i64 noundef 0, i32 noundef 1, i32 noundef 344)
  store i32 %105, ptr %3, align 4, !tbaa !9
  br label %106

106:                                              ; preds = %109, %102
  %107 = load i32, ptr %3, align 4, !tbaa !9
  %108 = icmp ne i32 %107, 0
  br i1 %108, label %109, label %110

109:                                              ; preds = %106
  br label %106, !llvm.loop !30

110:                                              ; preds = %106
  %111 = load ptr, ptr @byte_pool_0, align 8, !tbaa !26
  %112 = call i32 @_txe_byte_allocate(ptr noundef %111, ptr noundef %4, i64 noundef 4096, i64 noundef 0)
  store i32 %112, ptr %3, align 4, !tbaa !9
  br label %113

113:                                              ; preds = %116, %110
  %114 = load i32, ptr %3, align 4, !tbaa !9
  %115 = icmp ne i32 %114, 0
  br i1 %115, label %116, label %117

116:                                              ; preds = %113
  br label %113, !llvm.loop !31

117:                                              ; preds = %113
  %118 = load ptr, ptr @thread_1, align 8, !tbaa !26
  %119 = load ptr, ptr %4, align 8, !tbaa !26
  %120 = call i32 @_txe_thread_create(ptr noundef %118, ptr noundef @.str.2, ptr noundef @thread_1_entry, i64 noundef 1, ptr noundef %119, i64 noundef 4096, i32 noundef 16, i32 noundef 16, i64 noundef 4, i32 noundef 1, i32 noundef 344)
  store i32 %120, ptr %3, align 4, !tbaa !9
  br label %121

121:                                              ; preds = %124, %117
  %122 = load i32, ptr %3, align 4, !tbaa !9
  %123 = icmp ne i32 %122, 0
  br i1 %123, label %124, label %125

124:                                              ; preds = %121
  br label %121, !llvm.loop !32

125:                                              ; preds = %121
  %126 = load ptr, ptr @byte_pool_0, align 8, !tbaa !26
  %127 = call i32 @_txe_byte_allocate(ptr noundef %126, ptr noundef %4, i64 noundef 4096, i64 noundef 0)
  store i32 %127, ptr %3, align 4, !tbaa !9
  br label %128

128:                                              ; preds = %131, %125
  %129 = load i32, ptr %3, align 4, !tbaa !9
  %130 = icmp ne i32 %129, 0
  br i1 %130, label %131, label %132

131:                                              ; preds = %128
  br label %128, !llvm.loop !33

132:                                              ; preds = %128
  %133 = load ptr, ptr @thread_2, align 8, !tbaa !26
  %134 = load ptr, ptr %4, align 8, !tbaa !26
  %135 = call i32 @_txe_thread_create(ptr noundef %133, ptr noundef @.str.3, ptr noundef @thread_2_entry, i64 noundef 2, ptr noundef %134, i64 noundef 4096, i32 noundef 16, i32 noundef 16, i64 noundef 4, i32 noundef 1, i32 noundef 344)
  store i32 %135, ptr %3, align 4, !tbaa !9
  br label %136

136:                                              ; preds = %139, %132
  %137 = load i32, ptr %3, align 4, !tbaa !9
  %138 = icmp ne i32 %137, 0
  br i1 %138, label %139, label %140

139:                                              ; preds = %136
  br label %136, !llvm.loop !34

140:                                              ; preds = %136
  %141 = load ptr, ptr @byte_pool_0, align 8, !tbaa !26
  %142 = call i32 @_txe_byte_allocate(ptr noundef %141, ptr noundef %4, i64 noundef 4096, i64 noundef 0)
  store i32 %142, ptr %3, align 4, !tbaa !9
  br label %143

143:                                              ; preds = %146, %140
  %144 = load i32, ptr %3, align 4, !tbaa !9
  %145 = icmp ne i32 %144, 0
  br i1 %145, label %146, label %147

146:                                              ; preds = %143
  br label %143, !llvm.loop !35

147:                                              ; preds = %143
  %148 = load ptr, ptr @thread_3, align 8, !tbaa !26
  %149 = load ptr, ptr %4, align 8, !tbaa !26
  %150 = call i32 @_txe_thread_create(ptr noundef %148, ptr noundef @.str.4, ptr noundef @thread_3_and_4_entry, i64 noundef 3, ptr noundef %149, i64 noundef 4096, i32 noundef 8, i32 noundef 8, i64 noundef 0, i32 noundef 1, i32 noundef 344)
  store i32 %150, ptr %3, align 4, !tbaa !9
  br label %151

151:                                              ; preds = %154, %147
  %152 = load i32, ptr %3, align 4, !tbaa !9
  %153 = icmp ne i32 %152, 0
  br i1 %153, label %154, label %155

154:                                              ; preds = %151
  br label %151, !llvm.loop !36

155:                                              ; preds = %151
  %156 = load ptr, ptr @byte_pool_0, align 8, !tbaa !26
  %157 = call i32 @_txe_byte_allocate(ptr noundef %156, ptr noundef %4, i64 noundef 4096, i64 noundef 0)
  store i32 %157, ptr %3, align 4, !tbaa !9
  br label %158

158:                                              ; preds = %161, %155
  %159 = load i32, ptr %3, align 4, !tbaa !9
  %160 = icmp ne i32 %159, 0
  br i1 %160, label %161, label %162

161:                                              ; preds = %158
  br label %158, !llvm.loop !37

162:                                              ; preds = %158
  %163 = load ptr, ptr @thread_4, align 8, !tbaa !26
  %164 = load ptr, ptr %4, align 8, !tbaa !26
  %165 = call i32 @_txe_thread_create(ptr noundef %163, ptr noundef @.str.5, ptr noundef @thread_3_and_4_entry, i64 noundef 4, ptr noundef %164, i64 noundef 4096, i32 noundef 8, i32 noundef 8, i64 noundef 0, i32 noundef 1, i32 noundef 344)
  store i32 %165, ptr %3, align 4, !tbaa !9
  br label %166

166:                                              ; preds = %169, %162
  %167 = load i32, ptr %3, align 4, !tbaa !9
  %168 = icmp ne i32 %167, 0
  br i1 %168, label %169, label %170

169:                                              ; preds = %166
  br label %166, !llvm.loop !38

170:                                              ; preds = %166
  %171 = load ptr, ptr @byte_pool_0, align 8, !tbaa !26
  %172 = call i32 @_txe_byte_allocate(ptr noundef %171, ptr noundef %4, i64 noundef 4096, i64 noundef 0)
  store i32 %172, ptr %3, align 4, !tbaa !9
  br label %173

173:                                              ; preds = %176, %170
  %174 = load i32, ptr %3, align 4, !tbaa !9
  %175 = icmp ne i32 %174, 0
  br i1 %175, label %176, label %177

176:                                              ; preds = %173
  br label %173, !llvm.loop !39

177:                                              ; preds = %173
  %178 = load ptr, ptr @thread_5, align 8, !tbaa !26
  %179 = load ptr, ptr %4, align 8, !tbaa !26
  %180 = call i32 @_txe_thread_create(ptr noundef %178, ptr noundef @.str.6, ptr noundef @thread_5_entry, i64 noundef 5, ptr noundef %179, i64 noundef 4096, i32 noundef 4, i32 noundef 4, i64 noundef 0, i32 noundef 1, i32 noundef 344)
  store i32 %180, ptr %3, align 4, !tbaa !9
  br label %181

181:                                              ; preds = %184, %177
  %182 = load i32, ptr %3, align 4, !tbaa !9
  %183 = icmp ne i32 %182, 0
  br i1 %183, label %184, label %185

184:                                              ; preds = %181
  br label %181, !llvm.loop !40

185:                                              ; preds = %181
  %186 = load ptr, ptr @byte_pool_0, align 8, !tbaa !26
  %187 = call i32 @_txe_byte_allocate(ptr noundef %186, ptr noundef %4, i64 noundef 4096, i64 noundef 0)
  store i32 %187, ptr %3, align 4, !tbaa !9
  br label %188

188:                                              ; preds = %191, %185
  %189 = load i32, ptr %3, align 4, !tbaa !9
  %190 = icmp ne i32 %189, 0
  br i1 %190, label %191, label %192

191:                                              ; preds = %188
  br label %188, !llvm.loop !41

192:                                              ; preds = %188
  %193 = load ptr, ptr @thread_6, align 8, !tbaa !26
  %194 = load ptr, ptr %4, align 8, !tbaa !26
  %195 = call i32 @_txe_thread_create(ptr noundef %193, ptr noundef @.str.7, ptr noundef @thread_6_and_7_entry, i64 noundef 6, ptr noundef %194, i64 noundef 4096, i32 noundef 8, i32 noundef 8, i64 noundef 0, i32 noundef 1, i32 noundef 344)
  store i32 %195, ptr %3, align 4, !tbaa !9
  br label %196

196:                                              ; preds = %199, %192
  %197 = load i32, ptr %3, align 4, !tbaa !9
  %198 = icmp ne i32 %197, 0
  br i1 %198, label %199, label %200

199:                                              ; preds = %196
  br label %196, !llvm.loop !42

200:                                              ; preds = %196
  %201 = load ptr, ptr @byte_pool_0, align 8, !tbaa !26
  %202 = call i32 @_txe_byte_allocate(ptr noundef %201, ptr noundef %4, i64 noundef 4096, i64 noundef 0)
  store i32 %202, ptr %3, align 4, !tbaa !9
  br label %203

203:                                              ; preds = %206, %200
  %204 = load i32, ptr %3, align 4, !tbaa !9
  %205 = icmp ne i32 %204, 0
  br i1 %205, label %206, label %207

206:                                              ; preds = %203
  br label %203, !llvm.loop !43

207:                                              ; preds = %203
  %208 = load ptr, ptr @thread_7, align 8, !tbaa !26
  %209 = load ptr, ptr %4, align 8, !tbaa !26
  %210 = call i32 @_txe_thread_create(ptr noundef %208, ptr noundef @.str.8, ptr noundef @thread_6_and_7_entry, i64 noundef 7, ptr noundef %209, i64 noundef 4096, i32 noundef 8, i32 noundef 8, i64 noundef 0, i32 noundef 1, i32 noundef 344)
  store i32 %210, ptr %3, align 4, !tbaa !9
  br label %211

211:                                              ; preds = %214, %207
  %212 = load i32, ptr %3, align 4, !tbaa !9
  %213 = icmp ne i32 %212, 0
  br i1 %213, label %214, label %215

214:                                              ; preds = %211
  br label %211, !llvm.loop !44

215:                                              ; preds = %211
  %216 = load ptr, ptr @byte_pool_0, align 8, !tbaa !26
  %217 = call i32 @_txe_byte_allocate(ptr noundef %216, ptr noundef %4, i64 noundef 800, i64 noundef 0)
  store i32 %217, ptr %3, align 4, !tbaa !9
  br label %218

218:                                              ; preds = %221, %215
  %219 = load i32, ptr %3, align 4, !tbaa !9
  %220 = icmp ne i32 %219, 0
  br i1 %220, label %221, label %222

221:                                              ; preds = %218
  br label %218, !llvm.loop !45

222:                                              ; preds = %218
  %223 = load ptr, ptr @queue_0, align 8, !tbaa !26
  %224 = load ptr, ptr %4, align 8, !tbaa !26
  %225 = call i32 @_txe_queue_create(ptr noundef %223, ptr noundef @.str.9, i32 noundef 1, ptr noundef %224, i64 noundef 800, i32 noundef 104)
  store i32 %225, ptr %3, align 4, !tbaa !9
  br label %226

226:                                              ; preds = %229, %222
  %227 = load i32, ptr %3, align 4, !tbaa !9
  %228 = icmp ne i32 %227, 0
  br i1 %228, label %229, label %230

229:                                              ; preds = %226
  br label %226, !llvm.loop !46

230:                                              ; preds = %226
  %231 = load ptr, ptr @queue_0, align 8, !tbaa !26
  %232 = call i32 @_txe_queue_send_notify(ptr noundef %231, ptr noundef @queue_0_notify)
  store i32 %232, ptr %3, align 4, !tbaa !9
  br label %233

233:                                              ; preds = %236, %230
  %234 = load i32, ptr %3, align 4, !tbaa !9
  %235 = icmp ne i32 %234, 0
  br i1 %235, label %236, label %237

236:                                              ; preds = %233
  br label %233, !llvm.loop !47

237:                                              ; preds = %233
  %238 = load ptr, ptr @semaphore_0, align 8, !tbaa !26
  %239 = call i32 @_txe_semaphore_create(ptr noundef %238, ptr noundef @.str.10, i64 noundef 1, i32 noundef 64)
  store i32 %239, ptr %3, align 4, !tbaa !9
  br label %240

240:                                              ; preds = %243, %237
  %241 = load i32, ptr %3, align 4, !tbaa !9
  %242 = icmp ne i32 %241, 0
  br i1 %242, label %243, label %244

243:                                              ; preds = %240
  br label %240, !llvm.loop !48

244:                                              ; preds = %240
  %245 = load ptr, ptr @semaphore_0, align 8, !tbaa !26
  %246 = call i32 @_txe_semaphore_put_notify(ptr noundef %245, ptr noundef @semaphore_0_notify)
  store i32 %246, ptr %3, align 4, !tbaa !9
  br label %247

247:                                              ; preds = %250, %244
  %248 = load i32, ptr %3, align 4, !tbaa !9
  %249 = icmp ne i32 %248, 0
  br i1 %249, label %250, label %251

250:                                              ; preds = %247
  br label %247, !llvm.loop !49

251:                                              ; preds = %247
  %252 = load ptr, ptr @event_flags_0, align 8, !tbaa !26
  %253 = call i32 @_txe_event_flags_create(ptr noundef %252, ptr noundef @.str.11, i32 noundef 80)
  store i32 %253, ptr %3, align 4, !tbaa !9
  br label %254

254:                                              ; preds = %257, %251
  %255 = load i32, ptr %3, align 4, !tbaa !9
  %256 = icmp ne i32 %255, 0
  br i1 %256, label %257, label %258

257:                                              ; preds = %254
  br label %254, !llvm.loop !50

258:                                              ; preds = %254
  %259 = load ptr, ptr @event_flags_0, align 8, !tbaa !26
  %260 = call i32 @_txe_event_flags_set_notify(ptr noundef %259, ptr noundef @event_0_notify)
  store i32 %260, ptr %3, align 4, !tbaa !9
  br label %261

261:                                              ; preds = %264, %258
  %262 = load i32, ptr %3, align 4, !tbaa !9
  %263 = icmp ne i32 %262, 0
  br i1 %263, label %264, label %265

264:                                              ; preds = %261
  br label %261, !llvm.loop !51

265:                                              ; preds = %261
  %266 = load ptr, ptr @mutex_0, align 8, !tbaa !26
  %267 = call i32 @_txe_mutex_create(ptr noundef %266, ptr noundef @.str.12, i32 noundef 0, i32 noundef 96)
  store i32 %267, ptr %3, align 4, !tbaa !9
  br label %268

268:                                              ; preds = %271, %265
  %269 = load i32, ptr %3, align 4, !tbaa !9
  %270 = icmp ne i32 %269, 0
  br i1 %270, label %271, label %272

271:                                              ; preds = %268
  br label %268, !llvm.loop !52

272:                                              ; preds = %268
  %273 = load ptr, ptr @byte_pool_0, align 8, !tbaa !26
  %274 = call i32 @_txe_byte_allocate(ptr noundef %273, ptr noundef %4, i64 noundef 100, i64 noundef 0)
  store i32 %274, ptr %3, align 4, !tbaa !9
  br label %275

275:                                              ; preds = %278, %272
  %276 = load i32, ptr %3, align 4, !tbaa !9
  %277 = icmp ne i32 %276, 0
  br i1 %277, label %278, label %279

278:                                              ; preds = %275
  br label %275, !llvm.loop !53

279:                                              ; preds = %275
  %280 = load ptr, ptr @block_pool_0, align 8, !tbaa !26
  %281 = load ptr, ptr %4, align 8, !tbaa !26
  %282 = call i32 @_txe_block_pool_create(ptr noundef %280, ptr noundef @.str.13, i64 noundef 8, ptr noundef %281, i64 noundef 100, i32 noundef 88)
  store i32 %282, ptr %3, align 4, !tbaa !9
  br label %283

283:                                              ; preds = %286, %279
  %284 = load i32, ptr %3, align 4, !tbaa !9
  %285 = icmp ne i32 %284, 0
  br i1 %285, label %286, label %287

286:                                              ; preds = %283
  br label %283, !llvm.loop !54

287:                                              ; preds = %283
  %288 = load ptr, ptr @block_pool_0, align 8, !tbaa !26
  %289 = call i32 @_txe_block_allocate(ptr noundef %288, ptr noundef %4, i64 noundef 0)
  store i32 %289, ptr %3, align 4, !tbaa !9
  br label %290

290:                                              ; preds = %293, %287
  %291 = load i32, ptr %3, align 4, !tbaa !9
  %292 = icmp ne i32 %291, 0
  br i1 %292, label %293, label %294

293:                                              ; preds = %290
  br label %290, !llvm.loop !55

294:                                              ; preds = %290
  %295 = load ptr, ptr %4, align 8, !tbaa !26
  %296 = call i32 @_txe_block_release(ptr noundef %295)
  store i32 %296, ptr %3, align 4, !tbaa !9
  br label %297

297:                                              ; preds = %300, %294
  %298 = load i32, ptr %3, align 4, !tbaa !9
  %299 = icmp ne i32 %298, 0
  br i1 %299, label %300, label %301

300:                                              ; preds = %297
  br label %297, !llvm.loop !56

301:                                              ; preds = %297
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #3
  ret void
}

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

declare i32 @_txm_module_object_allocate(ptr noundef, i64 noundef) #2

declare i32 @_txe_byte_pool_create(ptr noundef, ptr noundef, ptr noundef, i64 noundef, i32 noundef) #2

declare i32 @_txe_byte_allocate(ptr noundef, ptr noundef, i64 noundef, i64 noundef) #2

declare i32 @_txe_thread_create(ptr noundef, ptr noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, i32 noundef, i32 noundef, i64 noundef, i32 noundef, i32 noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local void @thread_0_entry(i64 noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local void @thread_1_entry(i64 noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local void @thread_2_entry(i64 noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local void @thread_3_and_4_entry(i64 noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local void @thread_5_entry(i64 noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local void @thread_6_and_7_entry(i64 noundef) #0

declare i32 @_txe_queue_create(ptr noundef, ptr noundef, i32 noundef, ptr noundef, i64 noundef, i32 noundef) #2

declare i32 @_txe_queue_send_notify(ptr noundef, ptr noundef) #2

declare i32 @_txe_semaphore_create(ptr noundef, ptr noundef, i64 noundef, i32 noundef) #2

declare i32 @_txe_semaphore_put_notify(ptr noundef, ptr noundef) #2

declare i32 @_txe_event_flags_create(ptr noundef, ptr noundef, i32 noundef) #2

declare i32 @_txe_event_flags_set_notify(ptr noundef, ptr noundef) #2

declare i32 @_txe_mutex_create(ptr noundef, ptr noundef, i32 noundef, i32 noundef) #2

declare i32 @_txe_block_pool_create(ptr noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, i32 noundef) #2

declare i32 @_txe_block_allocate(ptr noundef, ptr noundef, i64 noundef) #2

declare i32 @_txe_block_release(ptr noundef) #2

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !12}
!21 = distinct !{!21, !12}
!22 = distinct !{!22, !12}
!23 = distinct !{!23, !12}
!24 = distinct !{!24, !12}
!25 = distinct !{!25, !12}
!26 = !{!27, !27, i64 0}
!27 = !{!"any pointer", !7, i64 0}
!28 = distinct !{!28, !12}
!29 = distinct !{!29, !12}
!30 = distinct !{!30, !12}
!31 = distinct !{!31, !12}
!32 = distinct !{!32, !12}
!33 = distinct !{!33, !12}
!34 = distinct !{!34, !12}
!35 = distinct !{!35, !12}
!36 = distinct !{!36, !12}
!37 = distinct !{!37, !12}
!38 = distinct !{!38, !12}
!39 = distinct !{!39, !12}
!40 = distinct !{!40, !12}
!41 = distinct !{!41, !12}
!42 = distinct !{!42, !12}
!43 = distinct !{!43, !12}
!44 = distinct !{!44, !12}
!45 = distinct !{!45, !12}
!46 = distinct !{!46, !12}
!47 = distinct !{!47, !12}
!48 = distinct !{!48, !12}
!49 = distinct !{!49, !12}
!50 = distinct !{!50, !12}
!51 = distinct !{!51, !12}
!52 = distinct !{!52, !12}
!53 = distinct !{!53, !12}
!54 = distinct !{!54, !12}
!55 = distinct !{!55, !12}
!56 = distinct !{!56, !12}


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

@semaphore_0 = external dso_local global ptr, align 8
@event_flags_0 = external dso_local global ptr, align 8
@queue_0 = external dso_local global ptr, align 8
@thread_0 = external dso_local global ptr, align 8
@thread_1 = external dso_local global ptr, align 8
@thread_2 = external dso_local global ptr, align 8
@thread_3 = external dso_local global ptr, align 8
@thread_4 = external dso_local global ptr, align 8
@thread_5 = external dso_local global ptr, align 8
@thread_6 = external dso_local global ptr, align 8
@thread_7 = external dso_local global ptr, align 8
@mutex_0 = external dso_local global ptr, align 8
@byte_pool_0 = external dso_local global ptr, align 8
@block_pool_0 = external dso_local global ptr, align 8
@.str = external hidden unnamed_addr constant [19 x i8], align 1
@demo_module_pool_space = external dso_local global [6144 x i64], align 16
@.str.1 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [20 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @semaphore_0_notify(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local void @event_0_notify(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local void @queue_0_notify(ptr noundef) #0

; Function Attrs: nounwind uwtable
define dso_local void @demo_module_start(i64 noundef %0) local_unnamed_addr #0 {
  %2 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #3
  %3 = tail call i32 @_txm_module_object_allocate(ptr noundef nonnull @thread_0, i64 noundef 344) #3
  %.not = icmp eq i32 %3, 0
  br i1 %.not, label %4, label %.split, !llvm.loop !5

.split:                                           ; preds = %1, %.split
  br label %.split

4:                                                ; preds = %1
  %5 = tail call i32 @_txm_module_object_allocate(ptr noundef nonnull @thread_1, i64 noundef 344) #3
  %.not43 = icmp eq i32 %5, 0
  br i1 %.not43, label %6, label %.split85, !llvm.loop !7

.split85:                                         ; preds = %4, %.split85
  br label %.split85

6:                                                ; preds = %4
  %7 = tail call i32 @_txm_module_object_allocate(ptr noundef nonnull @thread_2, i64 noundef 344) #3
  %.not44 = icmp eq i32 %7, 0
  br i1 %.not44, label %8, label %.split86, !llvm.loop !8

.split86:                                         ; preds = %6, %.split86
  br label %.split86

8:                                                ; preds = %6
  %9 = tail call i32 @_txm_module_object_allocate(ptr noundef nonnull @thread_3, i64 noundef 344) #3
  %.not45 = icmp eq i32 %9, 0
  br i1 %.not45, label %10, label %.split87, !llvm.loop !9

.split87:                                         ; preds = %8, %.split87
  br label %.split87

10:                                               ; preds = %8
  %11 = tail call i32 @_txm_module_object_allocate(ptr noundef nonnull @thread_4, i64 noundef 344) #3
  %.not46 = icmp eq i32 %11, 0
  br i1 %.not46, label %12, label %.split88, !llvm.loop !10

.split88:                                         ; preds = %10, %.split88
  br label %.split88

12:                                               ; preds = %10
  %13 = tail call i32 @_txm_module_object_allocate(ptr noundef nonnull @thread_5, i64 noundef 344) #3
  %.not47 = icmp eq i32 %13, 0
  br i1 %.not47, label %14, label %.split89, !llvm.loop !11

.split89:                                         ; preds = %12, %.split89
  br label %.split89

14:                                               ; preds = %12
  %15 = tail call i32 @_txm_module_object_allocate(ptr noundef nonnull @thread_6, i64 noundef 344) #3
  %.not48 = icmp eq i32 %15, 0
  br i1 %.not48, label %16, label %.split90, !llvm.loop !12

.split90:                                         ; preds = %14, %.split90
  br label %.split90

16:                                               ; preds = %14
  %17 = tail call i32 @_txm_module_object_allocate(ptr noundef nonnull @thread_7, i64 noundef 344) #3
  %.not49 = icmp eq i32 %17, 0
  br i1 %.not49, label %18, label %.split91, !llvm.loop !13

.split91:                                         ; preds = %16, %.split91
  br label %.split91

18:                                               ; preds = %16
  %19 = tail call i32 @_txm_module_object_allocate(ptr noundef nonnull @queue_0, i64 noundef 104) #3
  %.not50 = icmp eq i32 %19, 0
  br i1 %.not50, label %20, label %.split92, !llvm.loop !14

.split92:                                         ; preds = %18, %.split92
  br label %.split92

20:                                               ; preds = %18
  %21 = tail call i32 @_txm_module_object_allocate(ptr noundef nonnull @semaphore_0, i64 noundef 64) #3
  %.not51 = icmp eq i32 %21, 0
  br i1 %.not51, label %22, label %.split93, !llvm.loop !15

.split93:                                         ; preds = %20, %.split93
  br label %.split93

22:                                               ; preds = %20
  %23 = tail call i32 @_txm_module_object_allocate(ptr noundef nonnull @mutex_0, i64 noundef 96) #3
  %.not52 = icmp eq i32 %23, 0
  br i1 %.not52, label %24, label %.split94, !llvm.loop !16

.split94:                                         ; preds = %22, %.split94
  br label %.split94

24:                                               ; preds = %22
  %25 = tail call i32 @_txm_module_object_allocate(ptr noundef nonnull @event_flags_0, i64 noundef 80) #3
  %.not53 = icmp eq i32 %25, 0
  br i1 %.not53, label %26, label %.split95, !llvm.loop !17

.split95:                                         ; preds = %24, %.split95
  br label %.split95

26:                                               ; preds = %24
  %27 = tail call i32 @_txm_module_object_allocate(ptr noundef nonnull @byte_pool_0, i64 noundef 104) #3
  %.not54 = icmp eq i32 %27, 0
  br i1 %.not54, label %28, label %.split96, !llvm.loop !18

.split96:                                         ; preds = %26, %.split96
  br label %.split96

28:                                               ; preds = %26
  %29 = tail call i32 @_txm_module_object_allocate(ptr noundef nonnull @block_pool_0, i64 noundef 88) #3
  %.not55 = icmp eq i32 %29, 0
  br i1 %.not55, label %30, label %.split97, !llvm.loop !19

.split97:                                         ; preds = %28, %.split97
  br label %.split97

30:                                               ; preds = %28
  %31 = load ptr, ptr @byte_pool_0, align 8, !tbaa !20
  %32 = tail call i32 @_txe_byte_pool_create(ptr noundef %31, ptr noundef nonnull @.str, ptr noundef nonnull @demo_module_pool_space, i64 noundef 49152, i32 noundef 104) #3
  %.not56 = icmp eq i32 %32, 0
  br i1 %.not56, label %33, label %.split98, !llvm.loop !24

.split98:                                         ; preds = %30, %.split98
  br label %.split98

33:                                               ; preds = %30
  %34 = load ptr, ptr @byte_pool_0, align 8, !tbaa !20
  %35 = call i32 @_txe_byte_allocate(ptr noundef %34, ptr noundef nonnull %2, i64 noundef 4096, i64 noundef 0) #3
  %.not57 = icmp eq i32 %35, 0
  br i1 %.not57, label %36, label %.split99, !llvm.loop !25

.split99:                                         ; preds = %33, %.split99
  br label %.split99

36:                                               ; preds = %33
  %37 = load ptr, ptr @thread_0, align 8, !tbaa !20
  %38 = load ptr, ptr %2, align 8, !tbaa !20
  %39 = call i32 @_txe_thread_create(ptr noundef %37, ptr noundef nonnull @.str.1, ptr noundef nonnull @thread_0_entry, i64 noundef 0, ptr noundef %38, i64 noundef 4096, i32 noundef 1, i32 noundef 1, i64 noundef 0, i32 noundef 1, i32 noundef 344) #3
  %.not58 = icmp eq i32 %39, 0
  br i1 %.not58, label %40, label %.split100, !llvm.loop !26

.split100:                                        ; preds = %36, %.split100
  br label %.split100

40:                                               ; preds = %36
  %41 = load ptr, ptr @byte_pool_0, align 8, !tbaa !20
  %42 = call i32 @_txe_byte_allocate(ptr noundef %41, ptr noundef nonnull %2, i64 noundef 4096, i64 noundef 0) #3
  %.not59 = icmp eq i32 %42, 0
  br i1 %.not59, label %43, label %.split101, !llvm.loop !27

.split101:                                        ; preds = %40, %.split101
  br label %.split101

43:                                               ; preds = %40
  %44 = load ptr, ptr @thread_1, align 8, !tbaa !20
  %45 = load ptr, ptr %2, align 8, !tbaa !20
  %46 = call i32 @_txe_thread_create(ptr noundef %44, ptr noundef nonnull @.str.2, ptr noundef nonnull @thread_1_entry, i64 noundef 1, ptr noundef %45, i64 noundef 4096, i32 noundef 16, i32 noundef 16, i64 noundef 4, i32 noundef 1, i32 noundef 344) #3
  %.not60 = icmp eq i32 %46, 0
  br i1 %.not60, label %47, label %.split102, !llvm.loop !28

.split102:                                        ; preds = %43, %.split102
  br label %.split102

47:                                               ; preds = %43
  %48 = load ptr, ptr @byte_pool_0, align 8, !tbaa !20
  %49 = call i32 @_txe_byte_allocate(ptr noundef %48, ptr noundef nonnull %2, i64 noundef 4096, i64 noundef 0) #3
  %.not61 = icmp eq i32 %49, 0
  br i1 %.not61, label %50, label %.split103, !llvm.loop !29

.split103:                                        ; preds = %47, %.split103
  br label %.split103

50:                                               ; preds = %47
  %51 = load ptr, ptr @thread_2, align 8, !tbaa !20
  %52 = load ptr, ptr %2, align 8, !tbaa !20
  %53 = call i32 @_txe_thread_create(ptr noundef %51, ptr noundef nonnull @.str.3, ptr noundef nonnull @thread_2_entry, i64 noundef 2, ptr noundef %52, i64 noundef 4096, i32 noundef 16, i32 noundef 16, i64 noundef 4, i32 noundef 1, i32 noundef 344) #3
  %.not62 = icmp eq i32 %53, 0
  br i1 %.not62, label %54, label %.split104, !llvm.loop !30

.split104:                                        ; preds = %50, %.split104
  br label %.split104

54:                                               ; preds = %50
  %55 = load ptr, ptr @byte_pool_0, align 8, !tbaa !20
  %56 = call i32 @_txe_byte_allocate(ptr noundef %55, ptr noundef nonnull %2, i64 noundef 4096, i64 noundef 0) #3
  %.not63 = icmp eq i32 %56, 0
  br i1 %.not63, label %57, label %.split105, !llvm.loop !31

.split105:                                        ; preds = %54, %.split105
  br label %.split105

57:                                               ; preds = %54
  %58 = load ptr, ptr @thread_3, align 8, !tbaa !20
  %59 = load ptr, ptr %2, align 8, !tbaa !20
  %60 = call i32 @_txe_thread_create(ptr noundef %58, ptr noundef nonnull @.str.4, ptr noundef nonnull @thread_3_and_4_entry, i64 noundef 3, ptr noundef %59, i64 noundef 4096, i32 noundef 8, i32 noundef 8, i64 noundef 0, i32 noundef 1, i32 noundef 344) #3
  %.not64 = icmp eq i32 %60, 0
  br i1 %.not64, label %61, label %.split106, !llvm.loop !32

.split106:                                        ; preds = %57, %.split106
  br label %.split106

61:                                               ; preds = %57
  %62 = load ptr, ptr @byte_pool_0, align 8, !tbaa !20
  %63 = call i32 @_txe_byte_allocate(ptr noundef %62, ptr noundef nonnull %2, i64 noundef 4096, i64 noundef 0) #3
  %.not65 = icmp eq i32 %63, 0
  br i1 %.not65, label %64, label %.split107, !llvm.loop !33

.split107:                                        ; preds = %61, %.split107
  br label %.split107

64:                                               ; preds = %61
  %65 = load ptr, ptr @thread_4, align 8, !tbaa !20
  %66 = load ptr, ptr %2, align 8, !tbaa !20
  %67 = call i32 @_txe_thread_create(ptr noundef %65, ptr noundef nonnull @.str.5, ptr noundef nonnull @thread_3_and_4_entry, i64 noundef 4, ptr noundef %66, i64 noundef 4096, i32 noundef 8, i32 noundef 8, i64 noundef 0, i32 noundef 1, i32 noundef 344) #3
  %.not66 = icmp eq i32 %67, 0
  br i1 %.not66, label %68, label %.split108, !llvm.loop !34

.split108:                                        ; preds = %64, %.split108
  br label %.split108

68:                                               ; preds = %64
  %69 = load ptr, ptr @byte_pool_0, align 8, !tbaa !20
  %70 = call i32 @_txe_byte_allocate(ptr noundef %69, ptr noundef nonnull %2, i64 noundef 4096, i64 noundef 0) #3
  %.not67 = icmp eq i32 %70, 0
  br i1 %.not67, label %71, label %.split109, !llvm.loop !35

.split109:                                        ; preds = %68, %.split109
  br label %.split109

71:                                               ; preds = %68
  %72 = load ptr, ptr @thread_5, align 8, !tbaa !20
  %73 = load ptr, ptr %2, align 8, !tbaa !20
  %74 = call i32 @_txe_thread_create(ptr noundef %72, ptr noundef nonnull @.str.6, ptr noundef nonnull @thread_5_entry, i64 noundef 5, ptr noundef %73, i64 noundef 4096, i32 noundef 4, i32 noundef 4, i64 noundef 0, i32 noundef 1, i32 noundef 344) #3
  %.not68 = icmp eq i32 %74, 0
  br i1 %.not68, label %75, label %.split110, !llvm.loop !36

.split110:                                        ; preds = %71, %.split110
  br label %.split110

75:                                               ; preds = %71
  %76 = load ptr, ptr @byte_pool_0, align 8, !tbaa !20
  %77 = call i32 @_txe_byte_allocate(ptr noundef %76, ptr noundef nonnull %2, i64 noundef 4096, i64 noundef 0) #3
  %.not69 = icmp eq i32 %77, 0
  br i1 %.not69, label %78, label %.split111, !llvm.loop !37

.split111:                                        ; preds = %75, %.split111
  br label %.split111

78:                                               ; preds = %75
  %79 = load ptr, ptr @thread_6, align 8, !tbaa !20
  %80 = load ptr, ptr %2, align 8, !tbaa !20
  %81 = call i32 @_txe_thread_create(ptr noundef %79, ptr noundef nonnull @.str.7, ptr noundef nonnull @thread_6_and_7_entry, i64 noundef 6, ptr noundef %80, i64 noundef 4096, i32 noundef 8, i32 noundef 8, i64 noundef 0, i32 noundef 1, i32 noundef 344) #3
  %.not70 = icmp eq i32 %81, 0
  br i1 %.not70, label %82, label %.split112, !llvm.loop !38

.split112:                                        ; preds = %78, %.split112
  br label %.split112

82:                                               ; preds = %78
  %83 = load ptr, ptr @byte_pool_0, align 8, !tbaa !20
  %84 = call i32 @_txe_byte_allocate(ptr noundef %83, ptr noundef nonnull %2, i64 noundef 4096, i64 noundef 0) #3
  %.not71 = icmp eq i32 %84, 0
  br i1 %.not71, label %85, label %.split113, !llvm.loop !39

.split113:                                        ; preds = %82, %.split113
  br label %.split113

85:                                               ; preds = %82
  %86 = load ptr, ptr @thread_7, align 8, !tbaa !20
  %87 = load ptr, ptr %2, align 8, !tbaa !20
  %88 = call i32 @_txe_thread_create(ptr noundef %86, ptr noundef nonnull @.str.8, ptr noundef nonnull @thread_6_and_7_entry, i64 noundef 7, ptr noundef %87, i64 noundef 4096, i32 noundef 8, i32 noundef 8, i64 noundef 0, i32 noundef 1, i32 noundef 344) #3
  %.not72 = icmp eq i32 %88, 0
  br i1 %.not72, label %89, label %.split114, !llvm.loop !40

.split114:                                        ; preds = %85, %.split114
  br label %.split114

89:                                               ; preds = %85
  %90 = load ptr, ptr @byte_pool_0, align 8, !tbaa !20
  %91 = call i32 @_txe_byte_allocate(ptr noundef %90, ptr noundef nonnull %2, i64 noundef 800, i64 noundef 0) #3
  %.not73 = icmp eq i32 %91, 0
  br i1 %.not73, label %92, label %.split115, !llvm.loop !41

.split115:                                        ; preds = %89, %.split115
  br label %.split115

92:                                               ; preds = %89
  %93 = load ptr, ptr @queue_0, align 8, !tbaa !20
  %94 = load ptr, ptr %2, align 8, !tbaa !20
  %95 = call i32 @_txe_queue_create(ptr noundef %93, ptr noundef nonnull @.str.9, i32 noundef 1, ptr noundef %94, i64 noundef 800, i32 noundef 104) #3
  %.not74 = icmp eq i32 %95, 0
  br i1 %.not74, label %96, label %.split116, !llvm.loop !42

.split116:                                        ; preds = %92, %.split116
  br label %.split116

96:                                               ; preds = %92
  %97 = load ptr, ptr @queue_0, align 8, !tbaa !20
  %98 = call i32 @_txe_queue_send_notify(ptr noundef %97, ptr noundef nonnull @queue_0_notify) #3
  %.not75 = icmp eq i32 %98, 0
  br i1 %.not75, label %99, label %.split117, !llvm.loop !43

.split117:                                        ; preds = %96, %.split117
  br label %.split117

99:                                               ; preds = %96
  %100 = load ptr, ptr @semaphore_0, align 8, !tbaa !20
  %101 = call i32 @_txe_semaphore_create(ptr noundef %100, ptr noundef nonnull @.str.10, i64 noundef 1, i32 noundef 64) #3
  %.not76 = icmp eq i32 %101, 0
  br i1 %.not76, label %102, label %.split118, !llvm.loop !44

.split118:                                        ; preds = %99, %.split118
  br label %.split118

102:                                              ; preds = %99
  %103 = load ptr, ptr @semaphore_0, align 8, !tbaa !20
  %104 = call i32 @_txe_semaphore_put_notify(ptr noundef %103, ptr noundef nonnull @semaphore_0_notify) #3
  %.not77 = icmp eq i32 %104, 0
  br i1 %.not77, label %105, label %.split119, !llvm.loop !45

.split119:                                        ; preds = %102, %.split119
  br label %.split119

105:                                              ; preds = %102
  %106 = load ptr, ptr @event_flags_0, align 8, !tbaa !20
  %107 = call i32 @_txe_event_flags_create(ptr noundef %106, ptr noundef nonnull @.str.11, i32 noundef 80) #3
  %.not78 = icmp eq i32 %107, 0
  br i1 %.not78, label %108, label %.split120, !llvm.loop !46

.split120:                                        ; preds = %105, %.split120
  br label %.split120

108:                                              ; preds = %105
  %109 = load ptr, ptr @event_flags_0, align 8, !tbaa !20
  %110 = call i32 @_txe_event_flags_set_notify(ptr noundef %109, ptr noundef nonnull @event_0_notify) #3
  %.not79 = icmp eq i32 %110, 0
  br i1 %.not79, label %111, label %.split121, !llvm.loop !47

.split121:                                        ; preds = %108, %.split121
  br label %.split121

111:                                              ; preds = %108
  %112 = load ptr, ptr @mutex_0, align 8, !tbaa !20
  %113 = call i32 @_txe_mutex_create(ptr noundef %112, ptr noundef nonnull @.str.12, i32 noundef 0, i32 noundef 96) #3
  %.not80 = icmp eq i32 %113, 0
  br i1 %.not80, label %114, label %.split122, !llvm.loop !48

.split122:                                        ; preds = %111, %.split122
  br label %.split122

114:                                              ; preds = %111
  %115 = load ptr, ptr @byte_pool_0, align 8, !tbaa !20
  %116 = call i32 @_txe_byte_allocate(ptr noundef %115, ptr noundef nonnull %2, i64 noundef 100, i64 noundef 0) #3
  %.not81 = icmp eq i32 %116, 0
  br i1 %.not81, label %117, label %.split123, !llvm.loop !49

.split123:                                        ; preds = %114, %.split123
  br label %.split123

117:                                              ; preds = %114
  %118 = load ptr, ptr @block_pool_0, align 8, !tbaa !20
  %119 = load ptr, ptr %2, align 8, !tbaa !20
  %120 = call i32 @_txe_block_pool_create(ptr noundef %118, ptr noundef nonnull @.str.13, i64 noundef 8, ptr noundef %119, i64 noundef 100, i32 noundef 88) #3
  %.not82 = icmp eq i32 %120, 0
  br i1 %.not82, label %121, label %.split124, !llvm.loop !50

.split124:                                        ; preds = %117, %.split124
  br label %.split124

121:                                              ; preds = %117
  %122 = load ptr, ptr @block_pool_0, align 8, !tbaa !20
  %123 = call i32 @_txe_block_allocate(ptr noundef %122, ptr noundef nonnull %2, i64 noundef 0) #3
  %.not83 = icmp eq i32 %123, 0
  br i1 %.not83, label %124, label %.split125, !llvm.loop !51

.split125:                                        ; preds = %121, %.split125
  br label %.split125

124:                                              ; preds = %121
  %125 = load ptr, ptr %2, align 8, !tbaa !20
  %126 = call i32 @_txe_block_release(ptr noundef %125) #3
  %.not84 = icmp eq i32 %126, 0
  br i1 %.not84, label %127, label %.split126, !llvm.loop !52

.split126:                                        ; preds = %124, %.split126
  br label %.split126

127:                                              ; preds = %124
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #3
  ret void
}

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

declare i32 @_txm_module_object_allocate(ptr noundef, i64 noundef) local_unnamed_addr #2

declare i32 @_txe_byte_pool_create(ptr noundef, ptr noundef, ptr noundef, i64 noundef, i32 noundef) local_unnamed_addr #2

declare i32 @_txe_byte_allocate(ptr noundef, ptr noundef, i64 noundef, i64 noundef) local_unnamed_addr #2

declare i32 @_txe_thread_create(ptr noundef, ptr noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, i32 noundef, i32 noundef, i64 noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local void @thread_0_entry(i64 noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local void @thread_1_entry(i64 noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local void @thread_2_entry(i64 noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local void @thread_3_and_4_entry(i64 noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local void @thread_5_entry(i64 noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local void @thread_6_and_7_entry(i64 noundef) #0

declare i32 @_txe_queue_create(ptr noundef, ptr noundef, i32 noundef, ptr noundef, i64 noundef, i32 noundef) local_unnamed_addr #2

declare i32 @_txe_queue_send_notify(ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @_txe_semaphore_create(ptr noundef, ptr noundef, i64 noundef, i32 noundef) local_unnamed_addr #2

declare i32 @_txe_semaphore_put_notify(ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @_txe_event_flags_create(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

declare i32 @_txe_event_flags_set_notify(ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @_txe_mutex_create(ptr noundef, ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

declare i32 @_txe_block_pool_create(ptr noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, i32 noundef) local_unnamed_addr #2

declare i32 @_txe_block_allocate(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #2

declare i32 @_txe_block_release(ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = distinct !{!7, !6}
!8 = distinct !{!8, !6}
!9 = distinct !{!9, !6}
!10 = distinct !{!10, !6}
!11 = distinct !{!11, !6}
!12 = distinct !{!12, !6}
!13 = distinct !{!13, !6}
!14 = distinct !{!14, !6}
!15 = distinct !{!15, !6}
!16 = distinct !{!16, !6}
!17 = distinct !{!17, !6}
!18 = distinct !{!18, !6}
!19 = distinct !{!19, !6}
!20 = !{!21, !21, i64 0}
!21 = !{!"any pointer", !22, i64 0}
!22 = !{!"omnipotent char", !23, i64 0}
!23 = !{!"Simple C/C++ TBAA"}
!24 = distinct !{!24, !6}
!25 = distinct !{!25, !6}
!26 = distinct !{!26, !6}
!27 = distinct !{!27, !6}
!28 = distinct !{!28, !6}
!29 = distinct !{!29, !6}
!30 = distinct !{!30, !6}
!31 = distinct !{!31, !6}
!32 = distinct !{!32, !6}
!33 = distinct !{!33, !6}
!34 = distinct !{!34, !6}
!35 = distinct !{!35, !6}
!36 = distinct !{!36, !6}
!37 = distinct !{!37, !6}
!38 = distinct !{!38, !6}
!39 = distinct !{!39, !6}
!40 = distinct !{!40, !6}
!41 = distinct !{!41, !6}
!42 = distinct !{!42, !6}
!43 = distinct !{!43, !6}
!44 = distinct !{!44, !6}
!45 = distinct !{!45, !6}
!46 = distinct !{!46, !6}
!47 = distinct !{!47, !6}
!48 = distinct !{!48, !6}
!49 = distinct !{!49, !6}
!50 = distinct !{!50, !6}
!51 = distinct !{!51, !6}
!52 = distinct !{!52, !6}


; Effective O3 passes: GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,LICMPass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass