; LLVM IR from jingweizhanghuai/Morn :: src/ptc (morn_pipeline)

; 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.MThreadSignal = type { %union.pthread_mutex_t, %union.pthread_cond_t, %union.pthread_rwlock_t, i32 }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%union.pthread_cond_t = type { %struct.__pthread_cond_s }
%struct.__pthread_cond_s = type { %union.__atomic_wide_counter, %union.__atomic_wide_counter, [2 x i32], [2 x i32], i32, i32, [2 x i32] }
%union.__atomic_wide_counter = type { i64 }
%union.pthread_rwlock_t = type { %struct.__pthread_rwlock_arch_t }
%struct.__pthread_rwlock_arch_t = type { i32, i32, i32, i32, i32, i32, i32, i32, i8, [7 x i8], i64, i32 }
%struct.MList = type { i32, ptr }
%struct.MHandle = type { i32, i32, ptr, ptr }
%struct.HandlePipeline = type { i32, ptr, ptr, i32, %struct.MThreadSignal, %struct.MThreadSignal, i32 }

@pipeline_sgn = external dso_local global %struct.MThreadSignal, align 8
@.str = external hidden unnamed_addr constant [79 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [22 x i8], align 1
@__FUNCTION__.mPipelineComplete = external hidden unnamed_addr constant [18 x i8], align 1
@mPipelineComplete.Sgn_valid = external hidden global i32, align 4
@mPipelineComplete.Sgn_valid.6 = external hidden global i32, align 4

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

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

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

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

; Function Attrs: nounwind
declare i32 @pthread_mutex_init(ptr noundef, ptr noundef) #3

; Function Attrs: nounwind
declare i32 @pthread_rwlock_init(ptr noundef, ptr noundef) #3

; Function Attrs: nounwind
declare i32 @pthread_mutex_lock(ptr noundef) #3

; Function Attrs: nounwind
declare i32 @pthread_mutex_unlock(ptr noundef) #3

declare void @m_Exception(i32 noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ...) #2

; Function Attrs: nounwind
declare i32 @pthread_cond_signal(ptr noundef) #3

; Function Attrs: nounwind uwtable
define dso_local void @mPipelineComplete(ptr noundef %0, i32 noundef %1) #0 {
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store i32 %1, ptr %4, align 4, !tbaa !9
  br label %10

10:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  %11 = load ptr, ptr %3, align 8, !tbaa !5
  %12 = icmp eq ptr %11, null
  %13 = zext i1 %12 to i32
  store i32 %13, ptr %5, align 4, !tbaa !9
  %14 = load i32, ptr %5, align 4, !tbaa !9
  %15 = icmp ne i32 %14, 0
  br i1 %15, label %16, label %18

16:                                               ; preds = %10
  %17 = load i32, ptr %5, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %17, i32 noundef -1, ptr noundef @.str, i32 noundef 123, ptr noundef @__FUNCTION__.mPipelineComplete, ptr noundef @.str.2)
  br label %18

18:                                               ; preds = %16, %10
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  br label %19

19:                                               ; preds = %18
  br label %20

20:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  %21 = load i32, ptr %4, align 4, !tbaa !9
  %22 = icmp slt i32 %21, 0
  br i1 %22, label %29, label %23

23:                                               ; preds = %20
  %24 = load i32, ptr %4, align 4, !tbaa !9
  %25 = load ptr, ptr %3, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.MList, ptr %25, i32 0, i32 0
  %27 = load i32, ptr %26, align 8, !tbaa !11
  %28 = icmp sge i32 %24, %27
  br label %29

29:                                               ; preds = %23, %20
  %30 = phi i1 [ true, %20 ], [ %28, %23 ]
  %31 = zext i1 %30 to i32
  store i32 %31, ptr %6, align 4, !tbaa !9
  %32 = load i32, ptr %6, align 4, !tbaa !9
  %33 = icmp ne i32 %32, 0
  br i1 %33, label %34, label %36

34:                                               ; preds = %29
  %35 = load i32, ptr %6, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %35, i32 noundef -1, ptr noundef @.str, i32 noundef 124, ptr noundef @__FUNCTION__.mPipelineComplete, ptr noundef @.str.3)
  br label %36

36:                                               ; preds = %34, %29
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  br label %37

37:                                               ; preds = %36
  %38 = load i32, ptr %4, align 4, !tbaa !9
  %39 = load ptr, ptr %3, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.MList, ptr %39, i32 0, i32 0
  %41 = load i32, ptr %40, align 8, !tbaa !11
  %42 = sub nsw i32 %41, 1
  %43 = icmp eq i32 %38, %42
  br i1 %43, label %44, label %45

44:                                               ; preds = %37
  br label %137

45:                                               ; preds = %37
  br label %46

46:                                               ; preds = %45
  br label %47

47:                                               ; preds = %46
  %48 = load i32, ptr @mPipelineComplete.Sgn_valid, align 4, !tbaa !9
  %49 = icmp eq i32 %48, 0
  br i1 %49, label %50, label %57

50:                                               ; preds = %47
  %51 = atomicrmw xchg ptr getelementptr inbounds (%struct.MThreadSignal, ptr @pipeline_sgn, i32 0, i32 3), i32 -1135873169 seq_cst, align 8
  %52 = icmp ne i32 %51, -1135873169
  br i1 %52, label %53, label %56

53:                                               ; preds = %50
  %54 = call i32 @pthread_mutex_init(ptr noundef @pipeline_sgn, ptr noundef null) #4
  %55 = call i32 @pthread_rwlock_init(ptr noundef getelementptr inbounds (%struct.MThreadSignal, ptr @pipeline_sgn, i32 0, i32 2), ptr noundef null) #4
  br label %56

56:                                               ; preds = %53, %50
  store i32 1, ptr @mPipelineComplete.Sgn_valid, align 4, !tbaa !9
  br label %57

57:                                               ; preds = %56, %47
  br label %58

58:                                               ; preds = %57
  %59 = call i32 @pthread_mutex_lock(ptr noundef @pipeline_sgn) #4
  br label %60

60:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %61 = load ptr, ptr %3, align 8, !tbaa !5
  %62 = call ptr @GetHandle(ptr noundef %61, i32 noundef 344, i32 noundef 75085391, ptr noundef @endPipeline)
  store ptr %62, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %63 = load ptr, ptr %7, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.MHandle, ptr %63, i32 0, i32 3
  %65 = load ptr, ptr %64, align 8, !tbaa !13
  store ptr %65, ptr %8, align 8, !tbaa !5
  br label %66

66:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  %67 = load ptr, ptr %7, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.MHandle, ptr %67, i32 0, i32 1
  %69 = load volatile i32, ptr %68, align 4, !tbaa !15
  %70 = icmp eq i32 %69, 0
  %71 = zext i1 %70 to i32
  store i32 %71, ptr %9, align 4, !tbaa !9
  %72 = load i32, ptr %9, align 4, !tbaa !9
  %73 = icmp ne i32 %72, 0
  br i1 %73, label %74, label %76

74:                                               ; preds = %66
  %75 = load i32, ptr %9, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %75, i32 noundef -1, ptr noundef @.str, i32 noundef 131, ptr noundef @__FUNCTION__.mPipelineComplete, ptr noundef @.str.2)
  br label %76

76:                                               ; preds = %74, %66
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  br label %77

77:                                               ; preds = %76
  br label %78

78:                                               ; preds = %77
  %79 = load i32, ptr %4, align 4, !tbaa !9
  %80 = add nsw i32 %79, 1
  %81 = load ptr, ptr %8, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.HandlePipeline, ptr %81, i32 0, i32 6
  store volatile i32 %80, ptr %82, align 8, !tbaa !16
  %83 = load ptr, ptr %8, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.HandlePipeline, ptr %83, i32 0, i32 3
  %85 = load volatile i32, ptr %84, align 8, !tbaa !19
  %86 = add nsw i32 %85, 1
  store volatile i32 %86, ptr %84, align 8, !tbaa !19
  br label %87

87:                                               ; preds = %78
  %88 = load ptr, ptr %8, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.HandlePipeline, ptr %88, i32 0, i32 3
  %90 = load volatile i32, ptr %89, align 8, !tbaa !19
  %91 = load ptr, ptr %8, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.HandlePipeline, ptr %91, i32 0, i32 0
  %93 = load volatile i32, ptr %92, align 8, !tbaa !20
  %94 = icmp eq i32 %90, %93
  br i1 %94, label %95, label %133

95:                                               ; preds = %87
  br label %96

96:                                               ; preds = %95
  br label %97

97:                                               ; preds = %96
  %98 = load i32, ptr @mPipelineComplete.Sgn_valid.6, align 4, !tbaa !9
  %99 = icmp eq i32 %98, 0
  br i1 %99, label %100, label %116

100:                                              ; preds = %97
  %101 = load ptr, ptr %8, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.HandlePipeline, ptr %101, i32 0, i32 4
  %103 = getelementptr inbounds %struct.MThreadSignal, ptr %102, i32 0, i32 3
  %104 = atomicrmw xchg ptr %103, i32 -1135873169 seq_cst, align 8
  %105 = icmp ne i32 %104, -1135873169
  br i1 %105, label %106, label %115

106:                                              ; preds = %100
  %107 = load ptr, ptr %8, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.HandlePipeline, ptr %107, i32 0, i32 4
  %109 = getelementptr inbounds %struct.MThreadSignal, ptr %108, i32 0, i32 0
  %110 = call i32 @pthread_mutex_init(ptr noundef %109, ptr noundef null) #4
  %111 = load ptr, ptr %8, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.HandlePipeline, ptr %111, i32 0, i32 4
  %113 = getelementptr inbounds %struct.MThreadSignal, ptr %112, i32 0, i32 2
  %114 = call i32 @pthread_rwlock_init(ptr noundef %113, ptr noundef null) #4
  br label %115

115:                                              ; preds = %106, %100
  store i32 1, ptr @mPipelineComplete.Sgn_valid.6, align 4, !tbaa !9
  br label %116

116:                                              ; preds = %115, %97
  br label %117

117:                                              ; preds = %116
  br label %118

118:                                              ; preds = %117
  %119 = load ptr, ptr %8, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.HandlePipeline, ptr %119, i32 0, i32 4
  %121 = getelementptr inbounds %struct.MThreadSignal, ptr %120, i32 0, i32 0
  %122 = call i32 @pthread_mutex_lock(ptr noundef %121) #4
  br label %123

123:                                              ; preds = %118
  br label %124

124:                                              ; preds = %123
  %125 = load ptr, ptr %8, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.HandlePipeline, ptr %125, i32 0, i32 4
  %127 = getelementptr inbounds %struct.MThreadSignal, ptr %126, i32 0, i32 1
  %128 = call i32 @pthread_cond_signal(ptr noundef %127) #4
  %129 = load ptr, ptr %8, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.HandlePipeline, ptr %129, i32 0, i32 4
  %131 = getelementptr inbounds %struct.MThreadSignal, ptr %130, i32 0, i32 0
  %132 = call i32 @pthread_mutex_unlock(ptr noundef %131) #4
  br label %133

133:                                              ; preds = %124, %87
  br label %134

134:                                              ; preds = %133
  br label %135

135:                                              ; preds = %134
  %136 = call i32 @pthread_mutex_unlock(ptr noundef @pipeline_sgn) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  br label %137

137:                                              ; preds = %135, %44
  ret void
}

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 "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 0}
!12 = !{!"MList", !10, i64 0, !6, i64 8}
!13 = !{!14, !6, i64 16}
!14 = !{!"MHandle", !10, i64 0, !10, i64 4, !6, i64 8, !6, i64 16}
!15 = !{!14, !10, i64 4}
!16 = !{!17, !10, i64 336}
!17 = !{!"HandlePipeline", !10, i64 0, !6, i64 8, !6, i64 16, !10, i64 24, !18, i64 32, !18, i64 184, !10, i64 336}
!18 = !{!"MThreadSignal", !7, i64 0, !7, i64 40, !7, i64 88, !10, i64 144}
!19 = !{!17, !10, i64 24}
!20 = !{!17, !10, 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.MThreadSignal = type { %union.pthread_mutex_t, %union.pthread_cond_t, %union.pthread_rwlock_t, i32 }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%union.pthread_cond_t = type { %struct.__pthread_cond_s }
%struct.__pthread_cond_s = type { %union.__atomic_wide_counter, %union.__atomic_wide_counter, [2 x i32], [2 x i32], i32, i32, [2 x i32] }
%union.__atomic_wide_counter = type { i64 }
%union.pthread_rwlock_t = type { %struct.__pthread_rwlock_arch_t }
%struct.__pthread_rwlock_arch_t = type { i32, i32, i32, i32, i32, i32, i32, i32, i8, [7 x i8], i64, i32 }

@pipeline_sgn = external dso_local global %struct.MThreadSignal, align 8
@.str = external hidden unnamed_addr constant [79 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [22 x i8], align 1
@__FUNCTION__.mPipelineComplete = external hidden unnamed_addr constant [18 x i8], align 1
@mPipelineComplete.Sgn_valid = external hidden local_unnamed_addr global i32, align 4
@mPipelineComplete.Sgn_valid.6 = external hidden local_unnamed_addr global i32, align 4

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

declare ptr @GetHandle(ptr noundef, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind
declare i32 @pthread_mutex_init(ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind
declare i32 @pthread_rwlock_init(ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind
declare i32 @pthread_mutex_lock(ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind
declare i32 @pthread_mutex_unlock(ptr noundef) local_unnamed_addr #2

declare void @m_Exception(i32 noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ...) local_unnamed_addr #1

; Function Attrs: nounwind
declare i32 @pthread_cond_signal(ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local void @mPipelineComplete(ptr noundef %0, i32 noundef %1) local_unnamed_addr #0 {
  %3 = icmp eq ptr %0, null
  br i1 %3, label %4, label %5

4:                                                ; preds = %2
  tail call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 123, ptr noundef nonnull @__FUNCTION__.mPipelineComplete, ptr noundef nonnull @.str.2) #3
  br label %5

5:                                                ; preds = %4, %2
  %6 = icmp slt i32 %1, 0
  br i1 %6, label %.thread, label %7

7:                                                ; preds = %5
  %8 = load i32, ptr %0, align 8, !tbaa !5
  %.not26 = icmp sgt i32 %8, %1
  br i1 %.not26, label %9, label %.thread

.thread:                                          ; preds = %5, %7
  tail call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 124, ptr noundef nonnull @__FUNCTION__.mPipelineComplete, ptr noundef nonnull @.str.3) #3
  %.pre = load i32, ptr %0, align 8, !tbaa !5
  br label %9

9:                                                ; preds = %.thread, %7
  %10 = phi i32 [ %.pre, %.thread ], [ %8, %7 ]
  %11 = add nsw i32 %10, -1
  %12 = icmp eq i32 %11, %1
  br i1 %12, label %60, label %13

13:                                               ; preds = %9
  %14 = load i32, ptr @mPipelineComplete.Sgn_valid, align 4, !tbaa !11
  %15 = icmp eq i32 %14, 0
  br i1 %15, label %16, label %22

16:                                               ; preds = %13
  %17 = atomicrmw xchg ptr getelementptr inbounds (i8, ptr @pipeline_sgn, i64 144), i32 -1135873169 seq_cst, align 8
  %.not = icmp eq i32 %17, -1135873169
  br i1 %.not, label %21, label %18

18:                                               ; preds = %16
  %19 = tail call i32 @pthread_mutex_init(ptr noundef nonnull @pipeline_sgn, ptr noundef null) #3
  %20 = tail call i32 @pthread_rwlock_init(ptr noundef nonnull getelementptr inbounds (i8, ptr @pipeline_sgn, i64 88), ptr noundef null) #3
  br label %21

21:                                               ; preds = %18, %16
  store i32 1, ptr @mPipelineComplete.Sgn_valid, align 4, !tbaa !11
  br label %22

22:                                               ; preds = %13, %21
  %23 = tail call i32 @pthread_mutex_lock(ptr noundef nonnull @pipeline_sgn) #3
  %24 = tail call ptr @GetHandle(ptr noundef nonnull %0, i32 noundef 344, i32 noundef 75085391, ptr noundef nonnull @endPipeline) #3
  %25 = getelementptr inbounds i8, ptr %24, i64 16
  %26 = load ptr, ptr %25, align 8, !tbaa !12
  %27 = getelementptr inbounds i8, ptr %24, i64 4
  %28 = load volatile i32, ptr %27, align 4, !tbaa !14
  %29 = icmp eq i32 %28, 0
  br i1 %29, label %30, label %31

30:                                               ; preds = %22
  tail call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 131, ptr noundef nonnull @__FUNCTION__.mPipelineComplete, ptr noundef nonnull @.str.2) #3
  br label %31

31:                                               ; preds = %30, %22
  %32 = add nsw i32 %1, 1
  %33 = getelementptr inbounds i8, ptr %26, i64 336
  store volatile i32 %32, ptr %33, align 8, !tbaa !15
  %34 = getelementptr inbounds i8, ptr %26, i64 24
  %35 = load volatile i32, ptr %34, align 8, !tbaa !18
  %36 = add nsw i32 %35, 1
  store volatile i32 %36, ptr %34, align 8, !tbaa !18
  %37 = load volatile i32, ptr %34, align 8, !tbaa !18
  %38 = load volatile i32, ptr %26, align 8, !tbaa !19
  %39 = icmp eq i32 %37, %38
  br i1 %39, label %40, label %58

40:                                               ; preds = %31
  %41 = load i32, ptr @mPipelineComplete.Sgn_valid.6, align 4, !tbaa !11
  %42 = icmp eq i32 %41, 0
  br i1 %42, label %43, label %52

43:                                               ; preds = %40
  %44 = getelementptr inbounds i8, ptr %26, i64 176
  %45 = atomicrmw xchg ptr %44, i32 -1135873169 seq_cst, align 8
  %.not25 = icmp eq i32 %45, -1135873169
  br i1 %.not25, label %51, label %46

46:                                               ; preds = %43
  %47 = getelementptr inbounds i8, ptr %26, i64 32
  %48 = tail call i32 @pthread_mutex_init(ptr noundef nonnull %47, ptr noundef null) #3
  %49 = getelementptr inbounds i8, ptr %26, i64 120
  %50 = tail call i32 @pthread_rwlock_init(ptr noundef nonnull %49, ptr noundef null) #3
  br label %51

51:                                               ; preds = %46, %43
  store i32 1, ptr @mPipelineComplete.Sgn_valid.6, align 4, !tbaa !11
  br label %52

52:                                               ; preds = %51, %40
  %53 = getelementptr inbounds i8, ptr %26, i64 32
  %54 = tail call i32 @pthread_mutex_lock(ptr noundef nonnull %53) #3
  %55 = getelementptr inbounds i8, ptr %26, i64 72
  %56 = tail call i32 @pthread_cond_signal(ptr noundef nonnull %55) #3
  %57 = tail call i32 @pthread_mutex_unlock(ptr noundef nonnull %53) #3
  br label %58

58:                                               ; preds = %52, %31
  %59 = tail call i32 @pthread_mutex_unlock(ptr noundef nonnull @pipeline_sgn) #3
  br label %60

60:                                               ; preds = %9, %58
  ret void
}

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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind "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, !7, i64 0}
!6 = !{!"MList", !7, i64 0, !10, i64 8}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !10, i64 16}
!13 = !{!"MHandle", !7, i64 0, !7, i64 4, !10, i64 8, !10, i64 16}
!14 = !{!13, !7, i64 4}
!15 = !{!16, !7, i64 336}
!16 = !{!"HandlePipeline", !7, i64 0, !10, i64 8, !10, i64 16, !7, i64 24, !17, i64 32, !17, i64 184, !7, i64 336}
!17 = !{!"MThreadSignal", !8, i64 0, !8, i64 40, !8, i64 88, !7, i64 144}
!18 = !{!16, !7, i64 24}
!19 = !{!16, !7, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,SROAPass,SimplifyCFGPass,TailCallElimPass