; LLVM IR from eclipse-threadx/threadx :: ports_smp/mips32_interaptiv_smp/gnu/example_build (demo_threadx)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.TX_BYTE_POOL_STRUCT = type { i64, ptr, i64, i32, ptr, ptr, ptr, i64, ptr, ptr, i32, ptr, ptr }
%struct.TX_THREAD_STRUCT = type { i64, i64, ptr, ptr, ptr, i64, i64, i64, ptr, ptr, ptr, i32, ptr, ptr, i32, i32, i32, i32, i32, ptr, ptr, i64, %struct.TX_TIMER_INTERNAL_STRUCT, ptr, ptr, ptr, ptr, i64, ptr, i32, i32, ptr, ptr, ptr, i32, i32, i32, i32, ptr, ptr, ptr, i64 }
%struct.TX_TIMER_INTERNAL_STRUCT = type { i64, i64, ptr, i64, ptr, ptr, ptr }
%struct.TX_QUEUE_STRUCT = type { i64, ptr, i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, i32, ptr, ptr, ptr }
%struct.TX_SEMAPHORE_STRUCT = type { i64, ptr, i64, ptr, i32, ptr, ptr, ptr }
%struct.TX_EVENT_FLAGS_GROUP_STRUCT = type { i64, ptr, i64, i32, ptr, i32, ptr, ptr, i64, ptr }
%struct.TX_MUTEX_STRUCT = type { i64, ptr, i32, ptr, i32, i32, ptr, i32, ptr, ptr, i32, ptr, ptr }
%struct.TX_BLOCK_POOL_STRUCT = type { i64, ptr, i32, i32, ptr, ptr, i64, i32, ptr, i32, ptr, ptr }

@byte_pool_0 = external dso_local global %struct.TX_BYTE_POOL_STRUCT, align 8
@.str = external hidden unnamed_addr constant [12 x i8], align 1
@thread_0 = external dso_local global %struct.TX_THREAD_STRUCT, align 8
@.str.1 = external hidden unnamed_addr constant [9 x i8], align 1
@lcd_thread = external dso_local global %struct.TX_THREAD_STRUCT, align 8
@.str.2 = external hidden unnamed_addr constant [11 x i8], align 1
@thread_1 = external dso_local global %struct.TX_THREAD_STRUCT, align 8
@.str.3 = external hidden unnamed_addr constant [9 x i8], align 1
@thread_2 = external dso_local global %struct.TX_THREAD_STRUCT, align 8
@.str.4 = external hidden unnamed_addr constant [9 x i8], align 1
@thread_3 = external dso_local global %struct.TX_THREAD_STRUCT, align 8
@.str.5 = external hidden unnamed_addr constant [9 x i8], align 1
@thread_4 = external dso_local global %struct.TX_THREAD_STRUCT, align 8
@.str.6 = external hidden unnamed_addr constant [9 x i8], align 1
@thread_5 = external dso_local global %struct.TX_THREAD_STRUCT, align 8
@.str.7 = external hidden unnamed_addr constant [9 x i8], align 1
@thread_6 = external dso_local global %struct.TX_THREAD_STRUCT, align 8
@.str.8 = external hidden unnamed_addr constant [9 x i8], align 1
@thread_7 = external dso_local global %struct.TX_THREAD_STRUCT, align 8
@.str.9 = external hidden unnamed_addr constant [9 x i8], align 1
@queue_0 = external dso_local global %struct.TX_QUEUE_STRUCT, align 8
@.str.10 = external hidden unnamed_addr constant [8 x i8], align 1
@semaphore_0 = external dso_local global %struct.TX_SEMAPHORE_STRUCT, align 8
@.str.11 = external hidden unnamed_addr constant [12 x i8], align 1
@event_flags_0 = external dso_local global %struct.TX_EVENT_FLAGS_GROUP_STRUCT, align 8
@.str.12 = external hidden unnamed_addr constant [14 x i8], align 1
@mutex_0 = external dso_local global %struct.TX_MUTEX_STRUCT, align 8
@.str.13 = external hidden unnamed_addr constant [8 x i8], align 1
@block_pool_0 = external dso_local global %struct.TX_BLOCK_POOL_STRUCT, align 8
@.str.14 = external hidden unnamed_addr constant [13 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @tx_application_define(ptr noundef %0) #0 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #3
  %4 = load ptr, ptr %2, align 8, !tbaa !5
  %5 = call i32 @_txe_byte_pool_create(ptr noundef @byte_pool_0, ptr noundef @.str, ptr noundef %4, i64 noundef 40000, i32 noundef 104)
  %6 = call i32 @_txe_byte_allocate(ptr noundef @byte_pool_0, ptr noundef %3, i64 noundef 4096, i64 noundef 0)
  %7 = load ptr, ptr %3, align 8, !tbaa !5
  %8 = call i32 @_txe_thread_create(ptr noundef @thread_0, ptr noundef @.str.1, ptr noundef @thread_0_entry, i64 noundef 0, ptr noundef %7, i64 noundef 4096, i32 noundef 1, i32 noundef 1, i64 noundef 0, i32 noundef 1, i32 noundef 344)
  %9 = call i32 @_txe_byte_allocate(ptr noundef @byte_pool_0, ptr noundef %3, i64 noundef 4096, i64 noundef 0)
  %10 = load ptr, ptr %3, align 8, !tbaa !5
  %11 = call i32 @_txe_thread_create(ptr noundef @lcd_thread, ptr noundef @.str.2, ptr noundef @lcd_thread_entry, i64 noundef 0, ptr noundef %10, i64 noundef 4096, i32 noundef 1, i32 noundef 1, i64 noundef 0, i32 noundef 1, i32 noundef 344)
  %12 = call i32 @_txe_byte_allocate(ptr noundef @byte_pool_0, ptr noundef %3, i64 noundef 4096, i64 noundef 0)
  %13 = load ptr, ptr %3, align 8, !tbaa !5
  %14 = call i32 @_txe_thread_create(ptr noundef @thread_1, ptr noundef @.str.3, ptr noundef @thread_1_entry, i64 noundef 1, ptr noundef %13, i64 noundef 4096, i32 noundef 16, i32 noundef 16, i64 noundef 4, i32 noundef 1, i32 noundef 344)
  %15 = call i32 @_txe_byte_allocate(ptr noundef @byte_pool_0, ptr noundef %3, i64 noundef 4096, i64 noundef 0)
  %16 = load ptr, ptr %3, align 8, !tbaa !5
  %17 = call i32 @_txe_thread_create(ptr noundef @thread_2, ptr noundef @.str.4, ptr noundef @thread_2_entry, i64 noundef 2, ptr noundef %16, i64 noundef 4096, i32 noundef 16, i32 noundef 16, i64 noundef 4, i32 noundef 1, i32 noundef 344)
  %18 = call i32 @_txe_byte_allocate(ptr noundef @byte_pool_0, ptr noundef %3, i64 noundef 4096, i64 noundef 0)
  %19 = load ptr, ptr %3, align 8, !tbaa !5
  %20 = call i32 @_txe_thread_create(ptr noundef @thread_3, ptr noundef @.str.5, ptr noundef @thread_3_and_4_entry, i64 noundef 3, ptr noundef %19, i64 noundef 4096, i32 noundef 8, i32 noundef 8, i64 noundef 0, i32 noundef 1, i32 noundef 344)
  %21 = call i32 @_txe_byte_allocate(ptr noundef @byte_pool_0, ptr noundef %3, i64 noundef 4096, i64 noundef 0)
  %22 = load ptr, ptr %3, align 8, !tbaa !5
  %23 = call i32 @_txe_thread_create(ptr noundef @thread_4, ptr noundef @.str.6, ptr noundef @thread_3_and_4_entry, i64 noundef 4, ptr noundef %22, i64 noundef 4096, i32 noundef 8, i32 noundef 8, i64 noundef 0, i32 noundef 1, i32 noundef 344)
  %24 = call i32 @_txe_byte_allocate(ptr noundef @byte_pool_0, ptr noundef %3, i64 noundef 4096, i64 noundef 0)
  %25 = load ptr, ptr %3, align 8, !tbaa !5
  %26 = call i32 @_txe_thread_create(ptr noundef @thread_5, ptr noundef @.str.7, ptr noundef @thread_5_entry, i64 noundef 5, ptr noundef %25, i64 noundef 4096, i32 noundef 4, i32 noundef 4, i64 noundef 0, i32 noundef 1, i32 noundef 344)
  %27 = call i32 @_txe_byte_allocate(ptr noundef @byte_pool_0, ptr noundef %3, i64 noundef 4096, i64 noundef 0)
  %28 = load ptr, ptr %3, align 8, !tbaa !5
  %29 = call i32 @_txe_thread_create(ptr noundef @thread_6, ptr noundef @.str.8, ptr noundef @thread_6_and_7_entry, i64 noundef 6, ptr noundef %28, i64 noundef 4096, i32 noundef 8, i32 noundef 8, i64 noundef 0, i32 noundef 1, i32 noundef 344)
  %30 = call i32 @_txe_byte_allocate(ptr noundef @byte_pool_0, ptr noundef %3, i64 noundef 4096, i64 noundef 0)
  %31 = load ptr, ptr %3, align 8, !tbaa !5
  %32 = call i32 @_txe_thread_create(ptr noundef @thread_7, ptr noundef @.str.9, ptr noundef @thread_6_and_7_entry, i64 noundef 7, ptr noundef %31, i64 noundef 4096, i32 noundef 8, i32 noundef 8, i64 noundef 0, i32 noundef 1, i32 noundef 344)
  %33 = call i32 @_txe_byte_allocate(ptr noundef @byte_pool_0, ptr noundef %3, i64 noundef 800, i64 noundef 0)
  %34 = load ptr, ptr %3, align 8, !tbaa !5
  %35 = call i32 @_txe_queue_create(ptr noundef @queue_0, ptr noundef @.str.10, i32 noundef 1, ptr noundef %34, i64 noundef 800, i32 noundef 104)
  %36 = call i32 @_txe_semaphore_create(ptr noundef @semaphore_0, ptr noundef @.str.11, i64 noundef 1, i32 noundef 64)
  %37 = call i32 @_txe_event_flags_create(ptr noundef @event_flags_0, ptr noundef @.str.12, i32 noundef 80)
  %38 = call i32 @_txe_mutex_create(ptr noundef @mutex_0, ptr noundef @.str.13, i32 noundef 0, i32 noundef 96)
  %39 = call i32 @_txe_byte_allocate(ptr noundef @byte_pool_0, ptr noundef %3, i64 noundef 100, i64 noundef 0)
  %40 = load ptr, ptr %3, align 8, !tbaa !5
  %41 = call i32 @_txe_block_pool_create(ptr noundef @block_pool_0, ptr noundef @.str.14, i64 noundef 8, ptr noundef %40, i64 noundef 100, i32 noundef 88)
  %42 = call i32 @_txe_block_allocate(ptr noundef @block_pool_0, ptr noundef %3, i64 noundef 0)
  %43 = load ptr, ptr %3, align 8, !tbaa !5
  %44 = call i32 @_txe_block_release(ptr noundef %43)
  store i64 84, ptr inttoptr (i64 3204449304 to ptr), align 8, !tbaa !9
  store i64 88, ptr inttoptr (i64 3204449312 to ptr), align 8, !tbaa !9
  store i64 32, ptr inttoptr (i64 3204449320 to ptr), align 8, !tbaa !9
  store i64 71, ptr inttoptr (i64 3204449328 to ptr), align 8, !tbaa !9
  store i64 79, ptr inttoptr (i64 3204449336 to ptr), align 8, !tbaa !9
  store i64 33, ptr inttoptr (i64 3204449344 to ptr), align 8, !tbaa !9
  store i64 32, ptr inttoptr (i64 3204449352 to ptr), align 8, !tbaa !9
  store i64 32, ptr inttoptr (i64 3204449360 to ptr), align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, 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 @_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 @lcd_thread_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_semaphore_create(ptr noundef, ptr noundef, i64 noundef, i32 noundef) #2

declare i32 @_txe_event_flags_create(ptr noundef, ptr noundef, i32 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}


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

%struct.TX_BYTE_POOL_STRUCT = type { i64, ptr, i64, i32, ptr, ptr, ptr, i64, ptr, ptr, i32, ptr, ptr }
%struct.TX_THREAD_STRUCT = type { i64, i64, ptr, ptr, ptr, i64, i64, i64, ptr, ptr, ptr, i32, ptr, ptr, i32, i32, i32, i32, i32, ptr, ptr, i64, %struct.TX_TIMER_INTERNAL_STRUCT, ptr, ptr, ptr, ptr, i64, ptr, i32, i32, ptr, ptr, ptr, i32, i32, i32, i32, ptr, ptr, ptr, i64 }
%struct.TX_TIMER_INTERNAL_STRUCT = type { i64, i64, ptr, i64, ptr, ptr, ptr }
%struct.TX_QUEUE_STRUCT = type { i64, ptr, i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, i32, ptr, ptr, ptr }
%struct.TX_SEMAPHORE_STRUCT = type { i64, ptr, i64, ptr, i32, ptr, ptr, ptr }
%struct.TX_EVENT_FLAGS_GROUP_STRUCT = type { i64, ptr, i64, i32, ptr, i32, ptr, ptr, i64, ptr }
%struct.TX_MUTEX_STRUCT = type { i64, ptr, i32, ptr, i32, i32, ptr, i32, ptr, ptr, i32, ptr, ptr }
%struct.TX_BLOCK_POOL_STRUCT = type { i64, ptr, i32, i32, ptr, ptr, i64, i32, ptr, i32, ptr, ptr }

@byte_pool_0 = external dso_local global %struct.TX_BYTE_POOL_STRUCT, align 8
@.str = external hidden unnamed_addr constant [12 x i8], align 1
@thread_0 = external dso_local global %struct.TX_THREAD_STRUCT, align 8
@.str.1 = external hidden unnamed_addr constant [9 x i8], align 1
@lcd_thread = external dso_local global %struct.TX_THREAD_STRUCT, align 8
@.str.2 = external hidden unnamed_addr constant [11 x i8], align 1
@thread_1 = external dso_local global %struct.TX_THREAD_STRUCT, align 8
@.str.3 = external hidden unnamed_addr constant [9 x i8], align 1
@thread_2 = external dso_local global %struct.TX_THREAD_STRUCT, align 8
@.str.4 = external hidden unnamed_addr constant [9 x i8], align 1
@thread_3 = external dso_local global %struct.TX_THREAD_STRUCT, align 8
@.str.5 = external hidden unnamed_addr constant [9 x i8], align 1
@thread_4 = external dso_local global %struct.TX_THREAD_STRUCT, align 8
@.str.6 = external hidden unnamed_addr constant [9 x i8], align 1
@thread_5 = external dso_local global %struct.TX_THREAD_STRUCT, align 8
@.str.7 = external hidden unnamed_addr constant [9 x i8], align 1
@thread_6 = external dso_local global %struct.TX_THREAD_STRUCT, align 8
@.str.8 = external hidden unnamed_addr constant [9 x i8], align 1
@thread_7 = external dso_local global %struct.TX_THREAD_STRUCT, align 8
@.str.9 = external hidden unnamed_addr constant [9 x i8], align 1
@queue_0 = external dso_local global %struct.TX_QUEUE_STRUCT, align 8
@.str.10 = external hidden unnamed_addr constant [8 x i8], align 1
@semaphore_0 = external dso_local global %struct.TX_SEMAPHORE_STRUCT, align 8
@.str.11 = external hidden unnamed_addr constant [12 x i8], align 1
@event_flags_0 = external dso_local global %struct.TX_EVENT_FLAGS_GROUP_STRUCT, align 8
@.str.12 = external hidden unnamed_addr constant [14 x i8], align 1
@mutex_0 = external dso_local global %struct.TX_MUTEX_STRUCT, align 8
@.str.13 = external hidden unnamed_addr constant [8 x i8], align 1
@block_pool_0 = external dso_local global %struct.TX_BLOCK_POOL_STRUCT, align 8
@.str.14 = external hidden unnamed_addr constant [13 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @tx_application_define(ptr 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 @_txe_byte_pool_create(ptr noundef nonnull @byte_pool_0, ptr noundef nonnull @.str, ptr noundef %0, i64 noundef 40000, i32 noundef 104) #3
  %4 = call i32 @_txe_byte_allocate(ptr noundef nonnull @byte_pool_0, ptr noundef nonnull %2, i64 noundef 4096, i64 noundef 0) #3
  %5 = load ptr, ptr %2, align 8, !tbaa !5
  %6 = call i32 @_txe_thread_create(ptr noundef nonnull @thread_0, ptr noundef nonnull @.str.1, ptr noundef nonnull @thread_0_entry, i64 noundef 0, ptr noundef %5, i64 noundef 4096, i32 noundef 1, i32 noundef 1, i64 noundef 0, i32 noundef 1, i32 noundef 344) #3
  %7 = call i32 @_txe_byte_allocate(ptr noundef nonnull @byte_pool_0, ptr noundef nonnull %2, i64 noundef 4096, i64 noundef 0) #3
  %8 = load ptr, ptr %2, align 8, !tbaa !5
  %9 = call i32 @_txe_thread_create(ptr noundef nonnull @lcd_thread, ptr noundef nonnull @.str.2, ptr noundef nonnull @lcd_thread_entry, i64 noundef 0, ptr noundef %8, i64 noundef 4096, i32 noundef 1, i32 noundef 1, i64 noundef 0, i32 noundef 1, i32 noundef 344) #3
  %10 = call i32 @_txe_byte_allocate(ptr noundef nonnull @byte_pool_0, ptr noundef nonnull %2, i64 noundef 4096, i64 noundef 0) #3
  %11 = load ptr, ptr %2, align 8, !tbaa !5
  %12 = call i32 @_txe_thread_create(ptr noundef nonnull @thread_1, ptr noundef nonnull @.str.3, ptr noundef nonnull @thread_1_entry, i64 noundef 1, ptr noundef %11, i64 noundef 4096, i32 noundef 16, i32 noundef 16, i64 noundef 4, i32 noundef 1, i32 noundef 344) #3
  %13 = call i32 @_txe_byte_allocate(ptr noundef nonnull @byte_pool_0, ptr noundef nonnull %2, i64 noundef 4096, i64 noundef 0) #3
  %14 = load ptr, ptr %2, align 8, !tbaa !5
  %15 = call i32 @_txe_thread_create(ptr noundef nonnull @thread_2, ptr noundef nonnull @.str.4, ptr noundef nonnull @thread_2_entry, i64 noundef 2, ptr noundef %14, i64 noundef 4096, i32 noundef 16, i32 noundef 16, i64 noundef 4, i32 noundef 1, i32 noundef 344) #3
  %16 = call i32 @_txe_byte_allocate(ptr noundef nonnull @byte_pool_0, ptr noundef nonnull %2, i64 noundef 4096, i64 noundef 0) #3
  %17 = load ptr, ptr %2, align 8, !tbaa !5
  %18 = call i32 @_txe_thread_create(ptr noundef nonnull @thread_3, ptr noundef nonnull @.str.5, ptr noundef nonnull @thread_3_and_4_entry, i64 noundef 3, ptr noundef %17, i64 noundef 4096, i32 noundef 8, i32 noundef 8, i64 noundef 0, i32 noundef 1, i32 noundef 344) #3
  %19 = call i32 @_txe_byte_allocate(ptr noundef nonnull @byte_pool_0, ptr noundef nonnull %2, i64 noundef 4096, i64 noundef 0) #3
  %20 = load ptr, ptr %2, align 8, !tbaa !5
  %21 = call i32 @_txe_thread_create(ptr noundef nonnull @thread_4, ptr noundef nonnull @.str.6, ptr noundef nonnull @thread_3_and_4_entry, i64 noundef 4, ptr noundef %20, i64 noundef 4096, i32 noundef 8, i32 noundef 8, i64 noundef 0, i32 noundef 1, i32 noundef 344) #3
  %22 = call i32 @_txe_byte_allocate(ptr noundef nonnull @byte_pool_0, ptr noundef nonnull %2, i64 noundef 4096, i64 noundef 0) #3
  %23 = load ptr, ptr %2, align 8, !tbaa !5
  %24 = call i32 @_txe_thread_create(ptr noundef nonnull @thread_5, ptr noundef nonnull @.str.7, ptr noundef nonnull @thread_5_entry, i64 noundef 5, ptr noundef %23, i64 noundef 4096, i32 noundef 4, i32 noundef 4, i64 noundef 0, i32 noundef 1, i32 noundef 344) #3
  %25 = call i32 @_txe_byte_allocate(ptr noundef nonnull @byte_pool_0, ptr noundef nonnull %2, i64 noundef 4096, i64 noundef 0) #3
  %26 = load ptr, ptr %2, align 8, !tbaa !5
  %27 = call i32 @_txe_thread_create(ptr noundef nonnull @thread_6, ptr noundef nonnull @.str.8, ptr noundef nonnull @thread_6_and_7_entry, i64 noundef 6, ptr noundef %26, i64 noundef 4096, i32 noundef 8, i32 noundef 8, i64 noundef 0, i32 noundef 1, i32 noundef 344) #3
  %28 = call i32 @_txe_byte_allocate(ptr noundef nonnull @byte_pool_0, ptr noundef nonnull %2, i64 noundef 4096, i64 noundef 0) #3
  %29 = load ptr, ptr %2, align 8, !tbaa !5
  %30 = call i32 @_txe_thread_create(ptr noundef nonnull @thread_7, ptr noundef nonnull @.str.9, ptr noundef nonnull @thread_6_and_7_entry, i64 noundef 7, ptr noundef %29, i64 noundef 4096, i32 noundef 8, i32 noundef 8, i64 noundef 0, i32 noundef 1, i32 noundef 344) #3
  %31 = call i32 @_txe_byte_allocate(ptr noundef nonnull @byte_pool_0, ptr noundef nonnull %2, i64 noundef 800, i64 noundef 0) #3
  %32 = load ptr, ptr %2, align 8, !tbaa !5
  %33 = call i32 @_txe_queue_create(ptr noundef nonnull @queue_0, ptr noundef nonnull @.str.10, i32 noundef 1, ptr noundef %32, i64 noundef 800, i32 noundef 104) #3
  %34 = call i32 @_txe_semaphore_create(ptr noundef nonnull @semaphore_0, ptr noundef nonnull @.str.11, i64 noundef 1, i32 noundef 64) #3
  %35 = call i32 @_txe_event_flags_create(ptr noundef nonnull @event_flags_0, ptr noundef nonnull @.str.12, i32 noundef 80) #3
  %36 = call i32 @_txe_mutex_create(ptr noundef nonnull @mutex_0, ptr noundef nonnull @.str.13, i32 noundef 0, i32 noundef 96) #3
  %37 = call i32 @_txe_byte_allocate(ptr noundef nonnull @byte_pool_0, ptr noundef nonnull %2, i64 noundef 100, i64 noundef 0) #3
  %38 = load ptr, ptr %2, align 8, !tbaa !5
  %39 = call i32 @_txe_block_pool_create(ptr noundef nonnull @block_pool_0, ptr noundef nonnull @.str.14, i64 noundef 8, ptr noundef %38, i64 noundef 100, i32 noundef 88) #3
  %40 = call i32 @_txe_block_allocate(ptr noundef nonnull @block_pool_0, ptr noundef nonnull %2, i64 noundef 0) #3
  %41 = load ptr, ptr %2, align 8, !tbaa !5
  %42 = call i32 @_txe_block_release(ptr noundef %41) #3
  store i64 84, ptr inttoptr (i64 3204449304 to ptr), align 8, !tbaa !9
  store i64 88, ptr inttoptr (i64 3204449312 to ptr), align 32, !tbaa !9
  store i64 32, ptr inttoptr (i64 3204449320 to ptr), align 8, !tbaa !9
  store i64 71, ptr inttoptr (i64 3204449328 to ptr), align 16, !tbaa !9
  store i64 79, ptr inttoptr (i64 3204449336 to ptr), align 8, !tbaa !9
  store i64 33, ptr inttoptr (i64 3204449344 to ptr), align 64, !tbaa !9
  store i64 32, ptr inttoptr (i64 3204449352 to ptr), align 8, !tbaa !9
  store i64 32, ptr inttoptr (i64 3204449360 to ptr), align 16, !tbaa !9
  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 @_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 @lcd_thread_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_semaphore_create(ptr noundef, ptr noundef, i64 noundef, i32 noundef) local_unnamed_addr #2

declare i32 @_txe_event_flags_create(ptr noundef, ptr noundef, i32 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 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}


; Effective O3 passes: GlobalOptPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,TailCallElimPass