; LLVM IR from jingweizhanghuai/Morn :: src/util (morn_log)

; 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.__va_list_tag = type { i32, i32, ptr, ptr }
%struct.HandleLog = type { i32, [128 x i8], [128 x i8], [16 x i8], i64, i32, i32, %struct.MThreadSignal, i32, i32, i32, i32, ptr, i32, i32, i32, ptr, ptr }
%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 }

@morn_log_string = external dso_local thread_local global [1024 x i8], align 16
@morn_log_string_size = external dso_local thread_local global i32, align 4
@m_Log.Sgn_valid = external hidden global i32, align 4

; Function Attrs: nounwind uwtable
declare dso_local void @LogFile(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 nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare nonnull ptr @llvm.threadlocal.address.p0(ptr nonnull) #3

; Function Attrs: nounwind uwtable
define dso_local void @m_Log(i32 noundef %0, ptr noundef %1, ...) #0 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca [1 x %struct.__va_list_tag], align 16
  %7 = alloca i32, align 4
  store i32 %0, ptr %3, align 4, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  %8 = call ptr @LogInit()
  store ptr %8, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 24, ptr %6) #7
  %9 = getelementptr inbounds [1 x %struct.__va_list_tag], ptr %6, i64 0, i64 0
  call void @llvm.va_start.p0(ptr %9)
  %10 = call align 16 ptr @llvm.threadlocal.address.p0(ptr align 16 @morn_log_string)
  %11 = getelementptr inbounds [1024 x i8], ptr %10, i64 0, i64 0
  %12 = load ptr, ptr %4, align 8, !tbaa !9
  %13 = getelementptr inbounds [1 x %struct.__va_list_tag], ptr %6, i64 0, i64 0
  %14 = call i32 @vsnprintf(ptr noundef %11, i64 noundef 1024, ptr noundef %12, ptr noundef %13) #7
  %15 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @morn_log_string_size)
  store i32 %14, ptr %15, align 4, !tbaa !5
  %16 = getelementptr inbounds [1 x %struct.__va_list_tag], ptr %6, i64 0, i64 0
  call void @llvm.va_end.p0(ptr %16)
  %17 = load ptr, ptr %5, align 8, !tbaa !9
  %18 = getelementptr inbounds %struct.HandleLog, ptr %17, i32 0, i32 14
  %19 = load i32, ptr %18, align 4, !tbaa !11
  %20 = icmp ne i32 %19, 0
  br i1 %20, label %21, label %25

21:                                               ; preds = %2
  %22 = call align 16 ptr @llvm.threadlocal.address.p0(ptr align 16 @morn_log_string)
  %23 = getelementptr inbounds [1024 x i8], ptr %22, i64 0, i64 0
  %24 = call i32 (ptr, ...) @printf(ptr noundef %23)
  br label %25

25:                                               ; preds = %21, %2
  %26 = load ptr, ptr %5, align 8, !tbaa !9
  %27 = getelementptr inbounds %struct.HandleLog, ptr %26, i32 0, i32 0
  %28 = load i32, ptr %27, align 8, !tbaa !15
  %29 = icmp ne i32 %28, 0
  br i1 %29, label %30, label %99

30:                                               ; preds = %25
  br label %31

31:                                               ; preds = %30
  br label %32

32:                                               ; preds = %31
  %33 = load i32, ptr @m_Log.Sgn_valid, align 4, !tbaa !5
  %34 = icmp eq i32 %33, 0
  br i1 %34, label %35, label %51

35:                                               ; preds = %32
  %36 = load ptr, ptr %5, align 8, !tbaa !9
  %37 = getelementptr inbounds %struct.HandleLog, ptr %36, i32 0, i32 7
  %38 = getelementptr inbounds %struct.MThreadSignal, ptr %37, i32 0, i32 3
  %39 = atomicrmw xchg ptr %38, i32 -1135873169 seq_cst, align 8
  %40 = icmp ne i32 %39, -1135873169
  br i1 %40, label %41, label %50

41:                                               ; preds = %35
  %42 = load ptr, ptr %5, align 8, !tbaa !9
  %43 = getelementptr inbounds %struct.HandleLog, ptr %42, i32 0, i32 7
  %44 = getelementptr inbounds %struct.MThreadSignal, ptr %43, i32 0, i32 0
  %45 = call i32 @pthread_mutex_init(ptr noundef %44, ptr noundef null) #7
  %46 = load ptr, ptr %5, align 8, !tbaa !9
  %47 = getelementptr inbounds %struct.HandleLog, ptr %46, i32 0, i32 7
  %48 = getelementptr inbounds %struct.MThreadSignal, ptr %47, i32 0, i32 2
  %49 = call i32 @pthread_rwlock_init(ptr noundef %48, ptr noundef null) #7
  br label %50

50:                                               ; preds = %41, %35
  store i32 1, ptr @m_Log.Sgn_valid, align 4, !tbaa !5
  br label %51

51:                                               ; preds = %50, %32
  br label %52

52:                                               ; preds = %51
  br label %53

53:                                               ; preds = %52
  %54 = load ptr, ptr %5, align 8, !tbaa !9
  %55 = getelementptr inbounds %struct.HandleLog, ptr %54, i32 0, i32 7
  %56 = getelementptr inbounds %struct.MThreadSignal, ptr %55, i32 0, i32 0
  %57 = call i32 @pthread_mutex_lock(ptr noundef %56) #7
  br label %58

58:                                               ; preds = %53
  br label %59

59:                                               ; preds = %58
  %60 = load ptr, ptr %5, align 8, !tbaa !9
  %61 = getelementptr inbounds %struct.HandleLog, ptr %60, i32 0, i32 10
  %62 = load i32, ptr %61, align 8, !tbaa !16
  %63 = load ptr, ptr %5, align 8, !tbaa !9
  %64 = getelementptr inbounds %struct.HandleLog, ptr %63, i32 0, i32 11
  %65 = load i32, ptr %64, align 4, !tbaa !17
  %66 = sub nsw i32 %62, %65
  %67 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @morn_log_string_size)
  %68 = load i32, ptr %67, align 4, !tbaa !5
  %69 = icmp sle i32 %66, %68
  br i1 %69, label %70, label %74

70:                                               ; preds = %59
  %71 = load ptr, ptr %5, align 8, !tbaa !9
  %72 = getelementptr inbounds %struct.HandleLog, ptr %71, i32 0, i32 1
  %73 = getelementptr inbounds [128 x i8], ptr %72, i64 0, i64 0
  call void @LogFile(ptr noundef %73)
  br label %74

74:                                               ; preds = %70, %59
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  %75 = load ptr, ptr %5, align 8, !tbaa !9
  %76 = getelementptr inbounds %struct.HandleLog, ptr %75, i32 0, i32 11
  %77 = load i32, ptr %76, align 4, !tbaa !17
  store i32 %77, ptr %7, align 4, !tbaa !5
  %78 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @morn_log_string_size)
  %79 = load i32, ptr %78, align 4, !tbaa !5
  %80 = load ptr, ptr %5, align 8, !tbaa !9
  %81 = getelementptr inbounds %struct.HandleLog, ptr %80, i32 0, i32 11
  %82 = load i32, ptr %81, align 4, !tbaa !17
  %83 = add nsw i32 %82, %79
  store i32 %83, ptr %81, align 4, !tbaa !17
  %84 = load ptr, ptr %5, align 8, !tbaa !9
  %85 = getelementptr inbounds %struct.HandleLog, ptr %84, i32 0, i32 12
  %86 = load ptr, ptr %85, align 8, !tbaa !18
  %87 = load i32, ptr %7, align 4, !tbaa !5
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds i8, ptr %86, i64 %88
  %90 = call align 16 ptr @llvm.threadlocal.address.p0(ptr align 16 @morn_log_string)
  %91 = getelementptr inbounds [1024 x i8], ptr %90, i64 0, i64 0
  %92 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @morn_log_string_size)
  %93 = load i32, ptr %92, align 4, !tbaa !5
  %94 = sext i32 %93 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %89, ptr align 16 %91, i64 %94, i1 false)
  %95 = load ptr, ptr %5, align 8, !tbaa !9
  %96 = getelementptr inbounds %struct.HandleLog, ptr %95, i32 0, i32 7
  %97 = getelementptr inbounds %struct.MThreadSignal, ptr %96, i32 0, i32 0
  %98 = call i32 @pthread_mutex_unlock(ptr noundef %97) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %99

99:                                               ; preds = %74, %25
  %100 = load ptr, ptr %5, align 8, !tbaa !9
  %101 = getelementptr inbounds %struct.HandleLog, ptr %100, i32 0, i32 15
  %102 = load i32, ptr %101, align 8, !tbaa !19
  %103 = icmp ne i32 %102, 0
  br i1 %103, label %104, label %115

104:                                              ; preds = %99
  %105 = load ptr, ptr %5, align 8, !tbaa !9
  %106 = getelementptr inbounds %struct.HandleLog, ptr %105, i32 0, i32 16
  %107 = load ptr, ptr %106, align 8, !tbaa !20
  %108 = call align 16 ptr @llvm.threadlocal.address.p0(ptr align 16 @morn_log_string)
  %109 = getelementptr inbounds [1024 x i8], ptr %108, i64 0, i64 0
  %110 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @morn_log_string_size)
  %111 = load i32, ptr %110, align 4, !tbaa !5
  %112 = load ptr, ptr %5, align 8, !tbaa !9
  %113 = getelementptr inbounds %struct.HandleLog, ptr %112, i32 0, i32 17
  %114 = load ptr, ptr %113, align 8, !tbaa !21
  call void %107(ptr noundef %109, i32 noundef %111, ptr noundef %114)
  br label %115

115:                                              ; preds = %104, %99
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  ret void
}

; Function Attrs: nounwind uwtable
declare dso_local ptr @LogInit() #0

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.va_start.p0(ptr) #4

; Function Attrs: nounwind
declare i32 @vsnprintf(ptr noundef, i64 noundef, ptr noundef, ptr noundef) #5

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.va_end.p0(ptr) #4

declare i32 @printf(ptr noundef, ...) #6

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

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

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

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

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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { nocallback nofree nosync nounwind willreturn }
attributes #5 = { 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 #6 = { "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 #7 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !6, i64 476}
!12 = !{!"HandleLog", !6, i64 0, !7, i64 4, !7, i64 132, !7, i64 260, !13, i64 280, !6, i64 288, !6, i64 292, !14, i64 296, !6, i64 448, !6, i64 452, !6, i64 456, !6, i64 460, !10, i64 464, !6, i64 472, !6, i64 476, !6, i64 480, !10, i64 488, !10, i64 496}
!13 = !{!"long", !7, i64 0}
!14 = !{!"MThreadSignal", !7, i64 0, !7, i64 40, !7, i64 88, !6, i64 144}
!15 = !{!12, !6, i64 0}
!16 = !{!12, !6, i64 456}
!17 = !{!12, !6, i64 460}
!18 = !{!12, !10, i64 464}
!19 = !{!12, !6, i64 480}
!20 = !{!12, !10, i64 488}
!21 = !{!12, !10, i64 496}


; 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.__va_list_tag = type { i32, i32, ptr, ptr }

@morn_log_string = external dso_local thread_local global [1024 x i8], align 16
@morn_log_string_size = external dso_local thread_local local_unnamed_addr global i32, align 4
@m_Log.Sgn_valid = external hidden local_unnamed_addr global i32, align 4

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

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare nonnull ptr @llvm.threadlocal.address.p0(ptr nonnull) #3

; Function Attrs: nounwind uwtable
define dso_local void @m_Log(i32 noundef %0, ptr nocapture noundef readonly %1, ...) local_unnamed_addr #0 {
  %3 = alloca [1 x %struct.__va_list_tag], align 16
  %4 = tail call ptr @LogInit()
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #7
  call void @llvm.va_start.p0(ptr nonnull %3)
  %5 = call align 16 ptr @llvm.threadlocal.address.p0(ptr align 16 @morn_log_string)
  %6 = call i32 @vsnprintf(ptr noundef nonnull %5, i64 noundef 1024, ptr noundef %1, ptr noundef nonnull %3) #7
  %7 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @morn_log_string_size)
  store i32 %6, ptr %7, align 4, !tbaa !5
  call void @llvm.va_end.p0(ptr nonnull %3)
  %8 = getelementptr inbounds i8, ptr %4, i64 476
  %9 = load i32, ptr %8, align 4, !tbaa !9
  %.not = icmp eq i32 %9, 0
  br i1 %.not, label %12, label %10

10:                                               ; preds = %2
  %11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %5)
  br label %12

12:                                               ; preds = %10, %2
  %13 = load i32, ptr %4, align 8, !tbaa !14
  %.not17 = icmp eq i32 %13, 0
  br i1 %.not17, label %47, label %14

14:                                               ; preds = %12
  %15 = load i32, ptr @m_Log.Sgn_valid, align 4, !tbaa !5
  %16 = icmp eq i32 %15, 0
  br i1 %16, label %17, label %26

17:                                               ; preds = %14
  %18 = getelementptr inbounds i8, ptr %4, i64 440
  %19 = atomicrmw xchg ptr %18, i32 -1135873169 seq_cst, align 8
  %.not18 = icmp eq i32 %19, -1135873169
  br i1 %.not18, label %25, label %20

20:                                               ; preds = %17
  %21 = getelementptr inbounds i8, ptr %4, i64 296
  %22 = call i32 @pthread_mutex_init(ptr noundef nonnull %21, ptr noundef null) #7
  %23 = getelementptr inbounds i8, ptr %4, i64 384
  %24 = call i32 @pthread_rwlock_init(ptr noundef nonnull %23, ptr noundef null) #7
  br label %25

25:                                               ; preds = %20, %17
  store i32 1, ptr @m_Log.Sgn_valid, align 4, !tbaa !5
  br label %26

26:                                               ; preds = %25, %14
  %27 = getelementptr inbounds i8, ptr %4, i64 296
  %28 = call i32 @pthread_mutex_lock(ptr noundef nonnull %27) #7
  %29 = getelementptr inbounds i8, ptr %4, i64 456
  %30 = load i32, ptr %29, align 8, !tbaa !15
  %31 = getelementptr inbounds i8, ptr %4, i64 460
  %32 = load i32, ptr %31, align 4, !tbaa !16
  %33 = sub nsw i32 %30, %32
  %34 = load i32, ptr %7, align 4, !tbaa !5
  %.not19 = icmp sgt i32 %33, %34
  br i1 %.not19, label %37, label %35

35:                                               ; preds = %26
  %36 = getelementptr inbounds i8, ptr %4, i64 4
  call void @LogFile(ptr noundef nonnull %36)
  %.pre = load i32, ptr %31, align 4, !tbaa !16
  %.pre21 = load i32, ptr %7, align 4, !tbaa !5
  br label %37

37:                                               ; preds = %35, %26
  %38 = phi i32 [ %.pre21, %35 ], [ %34, %26 ]
  %39 = phi i32 [ %.pre, %35 ], [ %32, %26 ]
  %40 = add nsw i32 %38, %39
  store i32 %40, ptr %31, align 4, !tbaa !16
  %41 = getelementptr inbounds i8, ptr %4, i64 464
  %42 = load ptr, ptr %41, align 8, !tbaa !17
  %43 = sext i32 %39 to i64
  %44 = getelementptr inbounds i8, ptr %42, i64 %43
  %45 = sext i32 %38 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %44, ptr nonnull align 16 %5, i64 %45, i1 false)
  %46 = call i32 @pthread_mutex_unlock(ptr noundef nonnull %27) #7
  br label %47

47:                                               ; preds = %37, %12
  %48 = getelementptr inbounds i8, ptr %4, i64 480
  %49 = load i32, ptr %48, align 8, !tbaa !18
  %.not20 = icmp eq i32 %49, 0
  br i1 %.not20, label %56, label %50

50:                                               ; preds = %47
  %51 = getelementptr inbounds i8, ptr %4, i64 488
  %52 = load ptr, ptr %51, align 8, !tbaa !19
  %53 = load i32, ptr %7, align 4, !tbaa !5
  %54 = getelementptr inbounds i8, ptr %4, i64 496
  %55 = load ptr, ptr %54, align 8, !tbaa !20
  call void %52(ptr noundef nonnull %5, i32 noundef %53, ptr noundef %55) #7
  br label %56

56:                                               ; preds = %50, %47
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #7
  ret void
}

; Function Attrs: nounwind uwtable
declare dso_local ptr @LogInit() local_unnamed_addr #0

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.va_start.p0(ptr) #4

; Function Attrs: nofree nounwind
declare noundef i32 @vsnprintf(ptr nocapture noundef, i64 noundef, ptr nocapture noundef readonly, ptr noundef) local_unnamed_addr #5

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.va_end.p0(ptr) #4

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #5

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

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

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

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

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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { mustprogress nocallback nofree nosync nounwind willreturn }
attributes #5 = { nofree 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 #6 = { 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 #7 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 476}
!10 = !{!"HandleLog", !6, i64 0, !7, i64 4, !7, i64 132, !7, i64 260, !11, i64 280, !6, i64 288, !6, i64 292, !12, i64 296, !6, i64 448, !6, i64 452, !6, i64 456, !6, i64 460, !13, i64 464, !6, i64 472, !6, i64 476, !6, i64 480, !13, i64 488, !13, i64 496}
!11 = !{!"long", !7, i64 0}
!12 = !{!"MThreadSignal", !7, i64 0, !7, i64 40, !7, i64 88, !6, i64 144}
!13 = !{!"any pointer", !7, i64 0}
!14 = !{!10, !6, i64 0}
!15 = !{!10, !6, i64 456}
!16 = !{!10, !6, i64 460}
!17 = !{!10, !13, i64 464}
!18 = !{!10, !6, i64 480}
!19 = !{!10, !13, i64 488}
!20 = !{!10, !13, i64 496}


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