; LLVM IR from eclipse-threadx/threadx :: ports_module/cortex_a35_smp/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 [15 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [20 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 [16 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [16 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 800, 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 @queue_0, align 8, !tbaa !26
  %104 = load ptr, ptr %4, align 8, !tbaa !26
  %105 = call i32 @_txe_queue_create(ptr noundef %103, ptr noundef @.str.1, i32 noundef 1, ptr noundef %104, i64 noundef 800, i32 noundef 104)
  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 @queue_0, align 8, !tbaa !26
  %112 = call i32 @_txe_queue_send_notify(ptr noundef %111, ptr noundef @queue_0_notify)
  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 @semaphore_0, align 8, !tbaa !26
  %119 = call i32 @_txe_semaphore_create(ptr noundef %118, ptr noundef @.str.2, i64 noundef 1, i32 noundef 64)
  store i32 %119, ptr %3, align 4, !tbaa !9
  br label %120

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

123:                                              ; preds = %120
  br label %120, !llvm.loop !32

124:                                              ; preds = %120
  %125 = load ptr, ptr @semaphore_0, align 8, !tbaa !26
  %126 = call i32 @_txe_semaphore_put_notify(ptr noundef %125, ptr noundef @semaphore_0_notify)
  store i32 %126, ptr %3, align 4, !tbaa !9
  br label %127

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

130:                                              ; preds = %127
  br label %127, !llvm.loop !33

131:                                              ; preds = %127
  %132 = load ptr, ptr @event_flags_0, align 8, !tbaa !26
  %133 = call i32 @_txe_event_flags_create(ptr noundef %132, ptr noundef @.str.3, i32 noundef 80)
  store i32 %133, ptr %3, align 4, !tbaa !9
  br label %134

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

137:                                              ; preds = %134
  br label %134, !llvm.loop !34

138:                                              ; preds = %134
  %139 = load ptr, ptr @event_flags_0, align 8, !tbaa !26
  %140 = call i32 @_txe_event_flags_set_notify(ptr noundef %139, ptr noundef @event_0_notify)
  store i32 %140, ptr %3, align 4, !tbaa !9
  br label %141

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

144:                                              ; preds = %141
  br label %141, !llvm.loop !35

145:                                              ; preds = %141
  %146 = load ptr, ptr @mutex_0, align 8, !tbaa !26
  %147 = call i32 @_txe_mutex_create(ptr noundef %146, ptr noundef @.str.4, i32 noundef 0, i32 noundef 96)
  store i32 %147, ptr %3, align 4, !tbaa !9
  br label %148

148:                                              ; preds = %151, %145
  %149 = load i32, ptr %3, align 4, !tbaa !9
  %150 = icmp ne i32 %149, 0
  br i1 %150, label %151, label %152

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

152:                                              ; preds = %148
  %153 = load ptr, ptr @byte_pool_0, align 8, !tbaa !26
  %154 = call i32 @_txe_byte_allocate(ptr noundef %153, ptr noundef %4, i64 noundef 100, i64 noundef 0)
  store i32 %154, ptr %3, align 4, !tbaa !9
  br label %155

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

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

159:                                              ; preds = %155
  %160 = load ptr, ptr @block_pool_0, align 8, !tbaa !26
  %161 = load ptr, ptr %4, align 8, !tbaa !26
  %162 = call i32 @_txe_block_pool_create(ptr noundef %160, ptr noundef @.str.5, i64 noundef 8, ptr noundef %161, i64 noundef 100, i32 noundef 88)
  store i32 %162, ptr %3, align 4, !tbaa !9
  br label %163

163:                                              ; preds = %166, %159
  %164 = load i32, ptr %3, align 4, !tbaa !9
  %165 = icmp ne i32 %164, 0
  br i1 %165, label %166, label %167

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

167:                                              ; preds = %163
  %168 = load ptr, ptr @block_pool_0, align 8, !tbaa !26
  %169 = call i32 @_txe_block_allocate(ptr noundef %168, ptr noundef %4, i64 noundef 0)
  store i32 %169, ptr %3, align 4, !tbaa !9
  br label %170

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

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

174:                                              ; preds = %170
  %175 = load ptr, ptr %4, align 8, !tbaa !26
  %176 = call i32 @_txe_block_release(ptr noundef %175)
  store i32 %176, ptr %3, align 4, !tbaa !9
  br label %177

177:                                              ; preds = %180, %174
  %178 = load i32, ptr %3, align 4, !tbaa !9
  %179 = icmp ne i32 %178, 0
  br i1 %179, label %180, label %181

180:                                              ; preds = %177
  br label %177, !llvm.loop !40

181:                                              ; preds = %177
  %182 = load ptr, ptr @byte_pool_0, align 8, !tbaa !26
  %183 = call i32 @_txe_byte_allocate(ptr noundef %182, ptr noundef %4, i64 noundef 4096, i64 noundef 0)
  store i32 %183, ptr %3, align 4, !tbaa !9
  br label %184

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

187:                                              ; preds = %184
  br label %184, !llvm.loop !41

188:                                              ; preds = %184
  %189 = load ptr, ptr @thread_0, align 8, !tbaa !26
  %190 = load ptr, ptr %4, align 8, !tbaa !26
  %191 = call i32 @_txe_thread_create(ptr noundef %189, ptr noundef @.str.6, ptr noundef @thread_0_entry, i64 noundef 0, ptr noundef %190, i64 noundef 4096, i32 noundef 1, i32 noundef 1, i64 noundef 0, i32 noundef 1, i32 noundef 344)
  store i32 %191, ptr %3, align 4, !tbaa !9
  br label %192

192:                                              ; preds = %195, %188
  %193 = load i32, ptr %3, align 4, !tbaa !9
  %194 = icmp ne i32 %193, 0
  br i1 %194, label %195, label %196

195:                                              ; preds = %192
  br label %192, !llvm.loop !42

196:                                              ; preds = %192
  %197 = load ptr, ptr @byte_pool_0, align 8, !tbaa !26
  %198 = call i32 @_txe_byte_allocate(ptr noundef %197, ptr noundef %4, i64 noundef 4096, i64 noundef 0)
  store i32 %198, ptr %3, align 4, !tbaa !9
  br label %199

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

202:                                              ; preds = %199
  br label %199, !llvm.loop !43

203:                                              ; preds = %199
  %204 = load ptr, ptr @thread_1, align 8, !tbaa !26
  %205 = load ptr, ptr %4, align 8, !tbaa !26
  %206 = call i32 @_txe_thread_create(ptr noundef %204, ptr noundef @.str.7, ptr noundef @thread_1_entry, i64 noundef 1, ptr noundef %205, i64 noundef 4096, i32 noundef 16, i32 noundef 16, i64 noundef 4, i32 noundef 1, i32 noundef 344)
  store i32 %206, ptr %3, align 4, !tbaa !9
  br label %207

207:                                              ; preds = %210, %203
  %208 = load i32, ptr %3, align 4, !tbaa !9
  %209 = icmp ne i32 %208, 0
  br i1 %209, label %210, label %211

210:                                              ; preds = %207
  br label %207, !llvm.loop !44

211:                                              ; preds = %207
  %212 = load ptr, ptr @byte_pool_0, align 8, !tbaa !26
  %213 = call i32 @_txe_byte_allocate(ptr noundef %212, ptr noundef %4, i64 noundef 4096, i64 noundef 0)
  store i32 %213, ptr %3, align 4, !tbaa !9
  br label %214

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

217:                                              ; preds = %214
  br label %214, !llvm.loop !45

218:                                              ; preds = %214
  %219 = load ptr, ptr @thread_2, align 8, !tbaa !26
  %220 = load ptr, ptr %4, align 8, !tbaa !26
  %221 = call i32 @_txe_thread_create(ptr noundef %219, ptr noundef @.str.8, ptr noundef @thread_2_entry, i64 noundef 2, ptr noundef %220, i64 noundef 4096, i32 noundef 16, i32 noundef 16, i64 noundef 4, i32 noundef 1, i32 noundef 344)
  store i32 %221, ptr %3, align 4, !tbaa !9
  br label %222

222:                                              ; preds = %225, %218
  %223 = load i32, ptr %3, align 4, !tbaa !9
  %224 = icmp ne i32 %223, 0
  br i1 %224, label %225, label %226

225:                                              ; preds = %222
  br label %222, !llvm.loop !46

226:                                              ; preds = %222
  %227 = load ptr, ptr @byte_pool_0, align 8, !tbaa !26
  %228 = call i32 @_txe_byte_allocate(ptr noundef %227, ptr noundef %4, i64 noundef 4096, i64 noundef 0)
  store i32 %228, ptr %3, align 4, !tbaa !9
  br label %229

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

232:                                              ; preds = %229
  br label %229, !llvm.loop !47

233:                                              ; preds = %229
  %234 = load ptr, ptr @thread_3, align 8, !tbaa !26
  %235 = load ptr, ptr %4, align 8, !tbaa !26
  %236 = call i32 @_txe_thread_create(ptr noundef %234, ptr noundef @.str.9, ptr noundef @thread_3_and_4_entry, i64 noundef 3, ptr noundef %235, i64 noundef 4096, i32 noundef 8, i32 noundef 8, i64 noundef 0, i32 noundef 1, i32 noundef 344)
  store i32 %236, ptr %3, align 4, !tbaa !9
  br label %237

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

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

241:                                              ; preds = %237
  %242 = load ptr, ptr @byte_pool_0, align 8, !tbaa !26
  %243 = call i32 @_txe_byte_allocate(ptr noundef %242, ptr noundef %4, i64 noundef 4096, i64 noundef 0)
  store i32 %243, ptr %3, align 4, !tbaa !9
  br label %244

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

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

248:                                              ; preds = %244
  %249 = load ptr, ptr @thread_4, align 8, !tbaa !26
  %250 = load ptr, ptr %4, align 8, !tbaa !26
  %251 = call i32 @_txe_thread_create(ptr noundef %249, ptr noundef @.str.10, ptr noundef @thread_3_and_4_entry, i64 noundef 4, ptr noundef %250, i64 noundef 4096, i32 noundef 8, i32 noundef 8, i64 noundef 0, i32 noundef 1, i32 noundef 344)
  store i32 %251, ptr %3, align 4, !tbaa !9
  br label %252

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

255:                                              ; preds = %252
  br label %252, !llvm.loop !50

256:                                              ; preds = %252
  %257 = load ptr, ptr @byte_pool_0, align 8, !tbaa !26
  %258 = call i32 @_txe_byte_allocate(ptr noundef %257, ptr noundef %4, i64 noundef 4096, i64 noundef 0)
  store i32 %258, ptr %3, align 4, !tbaa !9
  br label %259

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

262:                                              ; preds = %259
  br label %259, !llvm.loop !51

263:                                              ; preds = %259
  %264 = load ptr, ptr @thread_5, align 8, !tbaa !26
  %265 = load ptr, ptr %4, align 8, !tbaa !26
  %266 = call i32 @_txe_thread_create(ptr noundef %264, ptr noundef @.str.11, ptr noundef @thread_5_entry, i64 noundef 5, ptr noundef %265, i64 noundef 4096, i32 noundef 4, i32 noundef 4, i64 noundef 0, i32 noundef 1, i32 noundef 344)
  store i32 %266, ptr %3, align 4, !tbaa !9
  br label %267

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

270:                                              ; preds = %267
  br label %267, !llvm.loop !52

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

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

277:                                              ; preds = %274
  br label %274, !llvm.loop !53

278:                                              ; preds = %274
  %279 = load ptr, ptr @thread_6, align 8, !tbaa !26
  %280 = load ptr, ptr %4, align 8, !tbaa !26
  %281 = call i32 @_txe_thread_create(ptr noundef %279, ptr noundef @.str.12, ptr noundef @thread_6_and_7_entry, i64 noundef 6, ptr noundef %280, i64 noundef 4096, i32 noundef 8, i32 noundef 8, i64 noundef 0, i32 noundef 1, i32 noundef 344)
  store i32 %281, ptr %3, align 4, !tbaa !9
  br label %282

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

285:                                              ; preds = %282
  br label %282, !llvm.loop !54

286:                                              ; preds = %282
  %287 = load ptr, ptr @byte_pool_0, align 8, !tbaa !26
  %288 = call i32 @_txe_byte_allocate(ptr noundef %287, ptr noundef %4, i64 noundef 4096, i64 noundef 0)
  store i32 %288, ptr %3, align 4, !tbaa !9
  br label %289

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

292:                                              ; preds = %289
  br label %289, !llvm.loop !55

293:                                              ; preds = %289
  %294 = load ptr, ptr @thread_7, align 8, !tbaa !26
  %295 = load ptr, ptr %4, align 8, !tbaa !26
  %296 = call i32 @_txe_thread_create(ptr noundef %294, ptr noundef @.str.13, ptr noundef @thread_6_and_7_entry, i64 noundef 7, ptr noundef %295, i64 noundef 4096, i32 noundef 8, i32 noundef 8, i64 noundef 0, i32 noundef 1, i32 noundef 344)
  store i32 %296, ptr %3, align 4, !tbaa !9
  br label %297

297:                                              ; preds = %300, %293
  %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_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

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

; 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 [15 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [20 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 [16 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [16 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 800, 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 @queue_0, align 8, !tbaa !20
  %38 = load ptr, ptr %2, align 8, !tbaa !20
  %39 = call i32 @_txe_queue_create(ptr noundef %37, ptr noundef nonnull @.str.1, i32 noundef 1, ptr noundef %38, i64 noundef 800, i32 noundef 104) #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 @queue_0, align 8, !tbaa !20
  %42 = call i32 @_txe_queue_send_notify(ptr noundef %41, ptr noundef nonnull @queue_0_notify) #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 @semaphore_0, align 8, !tbaa !20
  %45 = call i32 @_txe_semaphore_create(ptr noundef %44, ptr noundef nonnull @.str.2, i64 noundef 1, i32 noundef 64) #3
  %.not60 = icmp eq i32 %45, 0
  br i1 %.not60, label %46, label %.split102, !llvm.loop !28

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

46:                                               ; preds = %43
  %47 = load ptr, ptr @semaphore_0, align 8, !tbaa !20
  %48 = call i32 @_txe_semaphore_put_notify(ptr noundef %47, ptr noundef nonnull @semaphore_0_notify) #3
  %.not61 = icmp eq i32 %48, 0
  br i1 %.not61, label %49, label %.split103, !llvm.loop !29

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

49:                                               ; preds = %46
  %50 = load ptr, ptr @event_flags_0, align 8, !tbaa !20
  %51 = call i32 @_txe_event_flags_create(ptr noundef %50, ptr noundef nonnull @.str.3, i32 noundef 80) #3
  %.not62 = icmp eq i32 %51, 0
  br i1 %.not62, label %52, label %.split104, !llvm.loop !30

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

52:                                               ; preds = %49
  %53 = load ptr, ptr @event_flags_0, align 8, !tbaa !20
  %54 = call i32 @_txe_event_flags_set_notify(ptr noundef %53, ptr noundef nonnull @event_0_notify) #3
  %.not63 = icmp eq i32 %54, 0
  br i1 %.not63, label %55, label %.split105, !llvm.loop !31

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

55:                                               ; preds = %52
  %56 = load ptr, ptr @mutex_0, align 8, !tbaa !20
  %57 = call i32 @_txe_mutex_create(ptr noundef %56, ptr noundef nonnull @.str.4, i32 noundef 0, i32 noundef 96) #3
  %.not64 = icmp eq i32 %57, 0
  br i1 %.not64, label %58, label %.split106, !llvm.loop !32

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

58:                                               ; preds = %55
  %59 = load ptr, ptr @byte_pool_0, align 8, !tbaa !20
  %60 = call i32 @_txe_byte_allocate(ptr noundef %59, ptr noundef nonnull %2, i64 noundef 100, i64 noundef 0) #3
  %.not65 = icmp eq i32 %60, 0
  br i1 %.not65, label %61, label %.split107, !llvm.loop !33

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

61:                                               ; preds = %58
  %62 = load ptr, ptr @block_pool_0, align 8, !tbaa !20
  %63 = load ptr, ptr %2, align 8, !tbaa !20
  %64 = call i32 @_txe_block_pool_create(ptr noundef %62, ptr noundef nonnull @.str.5, i64 noundef 8, ptr noundef %63, i64 noundef 100, i32 noundef 88) #3
  %.not66 = icmp eq i32 %64, 0
  br i1 %.not66, label %65, label %.split108, !llvm.loop !34

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

65:                                               ; preds = %61
  %66 = load ptr, ptr @block_pool_0, align 8, !tbaa !20
  %67 = call i32 @_txe_block_allocate(ptr noundef %66, ptr noundef nonnull %2, i64 noundef 0) #3
  %.not67 = icmp eq i32 %67, 0
  br i1 %.not67, label %68, label %.split109, !llvm.loop !35

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

68:                                               ; preds = %65
  %69 = load ptr, ptr %2, align 8, !tbaa !20
  %70 = call i32 @_txe_block_release(ptr noundef %69) #3
  %.not68 = icmp eq i32 %70, 0
  br i1 %.not68, label %71, label %.split110, !llvm.loop !36

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

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

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

74:                                               ; preds = %71
  %75 = load ptr, ptr @thread_0, align 8, !tbaa !20
  %76 = load ptr, ptr %2, align 8, !tbaa !20
  %77 = call i32 @_txe_thread_create(ptr noundef %75, ptr noundef nonnull @.str.6, ptr noundef nonnull @thread_0_entry, i64 noundef 0, ptr noundef %76, i64 noundef 4096, i32 noundef 1, i32 noundef 1, i64 noundef 0, i32 noundef 1, i32 noundef 344) #3
  %.not70 = icmp eq i32 %77, 0
  br i1 %.not70, label %78, label %.split112, !llvm.loop !38

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

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

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

81:                                               ; preds = %78
  %82 = load ptr, ptr @thread_1, align 8, !tbaa !20
  %83 = load ptr, ptr %2, align 8, !tbaa !20
  %84 = call i32 @_txe_thread_create(ptr noundef %82, ptr noundef nonnull @.str.7, ptr noundef nonnull @thread_1_entry, i64 noundef 1, ptr noundef %83, i64 noundef 4096, i32 noundef 16, i32 noundef 16, i64 noundef 4, i32 noundef 1, i32 noundef 344) #3
  %.not72 = icmp eq i32 %84, 0
  br i1 %.not72, label %85, label %.split114, !llvm.loop !40

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

85:                                               ; preds = %81
  %86 = load ptr, ptr @byte_pool_0, align 8, !tbaa !20
  %87 = call i32 @_txe_byte_allocate(ptr noundef %86, ptr noundef nonnull %2, i64 noundef 4096, i64 noundef 0) #3
  %.not73 = icmp eq i32 %87, 0
  br i1 %.not73, label %88, label %.split115, !llvm.loop !41

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

88:                                               ; preds = %85
  %89 = load ptr, ptr @thread_2, align 8, !tbaa !20
  %90 = load ptr, ptr %2, align 8, !tbaa !20
  %91 = call i32 @_txe_thread_create(ptr noundef %89, ptr noundef nonnull @.str.8, ptr noundef nonnull @thread_2_entry, i64 noundef 2, ptr noundef %90, i64 noundef 4096, i32 noundef 16, i32 noundef 16, i64 noundef 4, i32 noundef 1, i32 noundef 344) #3
  %.not74 = icmp eq i32 %91, 0
  br i1 %.not74, label %92, label %.split116, !llvm.loop !42

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

92:                                               ; preds = %88
  %93 = load ptr, ptr @byte_pool_0, align 8, !tbaa !20
  %94 = call i32 @_txe_byte_allocate(ptr noundef %93, ptr noundef nonnull %2, i64 noundef 4096, i64 noundef 0) #3
  %.not75 = icmp eq i32 %94, 0
  br i1 %.not75, label %95, label %.split117, !llvm.loop !43

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

95:                                               ; preds = %92
  %96 = load ptr, ptr @thread_3, align 8, !tbaa !20
  %97 = load ptr, ptr %2, align 8, !tbaa !20
  %98 = call i32 @_txe_thread_create(ptr noundef %96, ptr noundef nonnull @.str.9, ptr noundef nonnull @thread_3_and_4_entry, i64 noundef 3, ptr noundef %97, i64 noundef 4096, i32 noundef 8, i32 noundef 8, i64 noundef 0, i32 noundef 1, i32 noundef 344) #3
  %.not76 = icmp eq i32 %98, 0
  br i1 %.not76, label %99, label %.split118, !llvm.loop !44

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

99:                                               ; preds = %95
  %100 = load ptr, ptr @byte_pool_0, align 8, !tbaa !20
  %101 = call i32 @_txe_byte_allocate(ptr noundef %100, ptr noundef nonnull %2, i64 noundef 4096, i64 noundef 0) #3
  %.not77 = icmp eq i32 %101, 0
  br i1 %.not77, label %102, label %.split119, !llvm.loop !45

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

102:                                              ; preds = %99
  %103 = load ptr, ptr @thread_4, align 8, !tbaa !20
  %104 = load ptr, ptr %2, align 8, !tbaa !20
  %105 = call i32 @_txe_thread_create(ptr noundef %103, ptr noundef nonnull @.str.10, ptr noundef nonnull @thread_3_and_4_entry, i64 noundef 4, ptr noundef %104, i64 noundef 4096, i32 noundef 8, i32 noundef 8, i64 noundef 0, i32 noundef 1, i32 noundef 344) #3
  %.not78 = icmp eq i32 %105, 0
  br i1 %.not78, label %106, label %.split120, !llvm.loop !46

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

106:                                              ; preds = %102
  %107 = load ptr, ptr @byte_pool_0, align 8, !tbaa !20
  %108 = call i32 @_txe_byte_allocate(ptr noundef %107, ptr noundef nonnull %2, i64 noundef 4096, i64 noundef 0) #3
  %.not79 = icmp eq i32 %108, 0
  br i1 %.not79, label %109, label %.split121, !llvm.loop !47

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

109:                                              ; preds = %106
  %110 = load ptr, ptr @thread_5, align 8, !tbaa !20
  %111 = load ptr, ptr %2, align 8, !tbaa !20
  %112 = call i32 @_txe_thread_create(ptr noundef %110, ptr noundef nonnull @.str.11, ptr noundef nonnull @thread_5_entry, i64 noundef 5, ptr noundef %111, i64 noundef 4096, i32 noundef 4, i32 noundef 4, i64 noundef 0, i32 noundef 1, i32 noundef 344) #3
  %.not80 = icmp eq i32 %112, 0
  br i1 %.not80, label %113, label %.split122, !llvm.loop !48

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

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

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

116:                                              ; preds = %113
  %117 = load ptr, ptr @thread_6, align 8, !tbaa !20
  %118 = load ptr, ptr %2, align 8, !tbaa !20
  %119 = call i32 @_txe_thread_create(ptr noundef %117, ptr noundef nonnull @.str.12, ptr noundef nonnull @thread_6_and_7_entry, i64 noundef 6, ptr noundef %118, i64 noundef 4096, i32 noundef 8, i32 noundef 8, i64 noundef 0, i32 noundef 1, i32 noundef 344) #3
  %.not82 = icmp eq i32 %119, 0
  br i1 %.not82, label %120, label %.split124, !llvm.loop !50

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

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

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

123:                                              ; preds = %120
  %124 = load ptr, ptr @thread_7, align 8, !tbaa !20
  %125 = load ptr, ptr %2, align 8, !tbaa !20
  %126 = call i32 @_txe_thread_create(ptr noundef %124, ptr noundef nonnull @.str.13, ptr noundef nonnull @thread_6_and_7_entry, i64 noundef 7, ptr noundef %125, i64 noundef 4096, i32 noundef 8, i32 noundef 8, i64 noundef 0, i32 noundef 1, i32 noundef 344) #3
  %.not84 = icmp eq i32 %126, 0
  br i1 %.not84, label %127, label %.split126, !llvm.loop !52

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

127:                                              ; preds = %123
  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_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

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

; 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