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

; 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.MHandle = type { i32, i32, ptr, ptr }
%struct.HandleChrono = type { ptr, i32, i32, i32 }
%struct.MObject = type { i32, %union.anon }
%union.anon = type { ptr }
%struct.MChainNode = type { ptr, ptr, ptr }
%struct.ChronoData = type { double, i32, i32, i32 }

@.str = external hidden unnamed_addr constant [76 x i8], align 1
@__FUNCTION__.m_ChronoTask = external hidden unnamed_addr constant [13 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [13 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local double @mTime() #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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @m_ChronoTask(i32 noundef %0, i32 noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca double, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  store i32 %0, ptr %4, align 4, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  %16 = call double @mTime()
  %17 = load i32, ptr %4, align 4, !tbaa !5
  %18 = sitofp i32 %17 to double
  %19 = fadd double %16, %18
  store double %19, ptr %6, align 8, !tbaa !9
  br label %20

20:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  %21 = load i32, ptr %4, align 4, !tbaa !5
  %22 = icmp slt i32 %21, 0
  br i1 %22, label %26, label %23

23:                                               ; preds = %20
  %24 = load i32, ptr %5, align 4, !tbaa !5
  %25 = icmp slt i32 %24, -1
  br label %26

26:                                               ; preds = %23, %20
  %27 = phi i1 [ true, %20 ], [ %25, %23 ]
  %28 = zext i1 %27 to i32
  store i32 %28, ptr %7, align 4, !tbaa !5
  %29 = load i32, ptr %7, align 4, !tbaa !5
  %30 = icmp ne i32 %29, 0
  br i1 %30, label %31, label %33

31:                                               ; preds = %26
  %32 = load i32, ptr %7, align 4, !tbaa !5
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %32, i32 noundef -1, ptr noundef @.str, i32 noundef 60, ptr noundef @__FUNCTION__.m_ChronoTask, ptr noundef @.str.1)
  br label %33

33:                                               ; preds = %31, %26
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  br label %34

34:                                               ; preds = %33
  br label %35

35:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  %36 = call ptr @mMornObject(ptr noundef @.str.2, i32 noundef -1)
  %37 = call ptr @GetHandle(ptr noundef %36, i32 noundef 24, i32 noundef -2033341518, ptr noundef @endChrono)
  store ptr %37, ptr %8, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  %38 = load ptr, ptr %8, align 8, !tbaa !11
  %39 = getelementptr inbounds %struct.MHandle, ptr %38, i32 0, i32 3
  %40 = load ptr, ptr %39, align 8, !tbaa !13
  store ptr %40, ptr %9, align 8, !tbaa !11
  %41 = load ptr, ptr %8, align 8, !tbaa !11
  %42 = getelementptr inbounds %struct.MHandle, ptr %41, i32 0, i32 1
  %43 = load volatile i32, ptr %42, align 4, !tbaa !15
  %44 = icmp eq i32 %43, 0
  br i1 %44, label %45, label %62

45:                                               ; preds = %35
  %46 = load ptr, ptr %9, align 8, !tbaa !11
  %47 = getelementptr inbounds %struct.HandleChrono, ptr %46, i32 0, i32 2
  store i32 100, ptr %47, align 4, !tbaa !16
  %48 = call ptr @mMornObject(ptr noundef @.str.2, i32 noundef -1)
  %49 = load ptr, ptr %9, align 8, !tbaa !11
  %50 = getelementptr inbounds %struct.HandleChrono, ptr %49, i32 0, i32 2
  call void @m_PropertyVariate(ptr noundef %48, ptr noundef @.str.3, ptr noundef %50, i32 noundef 4)
  %51 = load ptr, ptr %9, align 8, !tbaa !11
  %52 = getelementptr inbounds %struct.HandleChrono, ptr %51, i32 0, i32 0
  %53 = load ptr, ptr %52, align 8, !tbaa !18
  %54 = icmp eq ptr %53, null
  br i1 %54, label %55, label %59

55:                                               ; preds = %45
  %56 = call ptr (...) @mChainCreate()
  %57 = load ptr, ptr %9, align 8, !tbaa !11
  %58 = getelementptr inbounds %struct.HandleChrono, ptr %57, i32 0, i32 0
  store ptr %56, ptr %58, align 8, !tbaa !18
  br label %59

59:                                               ; preds = %55, %45
  %60 = load ptr, ptr %8, align 8, !tbaa !11
  %61 = getelementptr inbounds %struct.MHandle, ptr %60, i32 0, i32 1
  store volatile i32 1, ptr %61, align 4, !tbaa !15
  br label %62

62:                                               ; preds = %59, %35
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  %63 = load ptr, ptr %9, align 8, !tbaa !11
  %64 = getelementptr inbounds %struct.HandleChrono, ptr %63, i32 0, i32 1
  %65 = load i32, ptr %64, align 8, !tbaa !19
  %66 = icmp eq i32 %65, 1
  br i1 %66, label %67, label %100

67:                                               ; preds = %62
  %68 = load ptr, ptr %9, align 8, !tbaa !11
  %69 = getelementptr inbounds %struct.HandleChrono, ptr %68, i32 0, i32 0
  %70 = load ptr, ptr %69, align 8, !tbaa !18
  %71 = getelementptr inbounds %struct.MObject, ptr %70, i32 0, i32 1
  %72 = load ptr, ptr %71, align 8, !tbaa !20
  store ptr %72, ptr %10, align 8, !tbaa !11
  %73 = load ptr, ptr %10, align 8, !tbaa !11
  %74 = getelementptr inbounds %struct.MChainNode, ptr %73, i32 0, i32 0
  %75 = load ptr, ptr %74, align 8, !tbaa !21
  store ptr %75, ptr %11, align 8, !tbaa !11
  %76 = load ptr, ptr %11, align 8, !tbaa !11
  %77 = getelementptr inbounds %struct.ChronoData, ptr %76, i32 0, i32 3
  %78 = load i32, ptr %77, align 8, !tbaa !23
  %79 = icmp eq i32 %78, -1
  br i1 %79, label %80, label %99

80:                                               ; preds = %67
  %81 = load ptr, ptr %9, align 8, !tbaa !11
  %82 = getelementptr inbounds %struct.HandleChrono, ptr %81, i32 0, i32 3
  %83 = load i32, ptr %82, align 8, !tbaa !25
  %84 = add nsw i32 %83, 1
  store i32 %84, ptr %82, align 8, !tbaa !25
  %85 = load ptr, ptr %11, align 8, !tbaa !11
  %86 = getelementptr inbounds %struct.ChronoData, ptr %85, i32 0, i32 3
  store i32 %83, ptr %86, align 8, !tbaa !23
  %87 = load i32, ptr %5, align 4, !tbaa !5
  %88 = load ptr, ptr %11, align 8, !tbaa !11
  %89 = getelementptr inbounds %struct.ChronoData, ptr %88, i32 0, i32 1
  store i32 %87, ptr %89, align 8, !tbaa !26
  %90 = load double, ptr %6, align 8, !tbaa !9
  %91 = load ptr, ptr %11, align 8, !tbaa !11
  %92 = getelementptr inbounds %struct.ChronoData, ptr %91, i32 0, i32 0
  store double %90, ptr %92, align 8, !tbaa !27
  %93 = load i32, ptr %4, align 4, !tbaa !5
  %94 = load ptr, ptr %11, align 8, !tbaa !11
  %95 = getelementptr inbounds %struct.ChronoData, ptr %94, i32 0, i32 2
  store i32 %93, ptr %95, align 4, !tbaa !28
  %96 = load ptr, ptr %11, align 8, !tbaa !11
  %97 = getelementptr inbounds %struct.ChronoData, ptr %96, i32 0, i32 3
  %98 = load i32, ptr %97, align 8, !tbaa !23
  store i32 %98, ptr %3, align 4
  store i32 1, ptr %12, align 4
  br label %194

99:                                               ; preds = %67
  br label %100

100:                                              ; preds = %99, %62
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #3
  %101 = load ptr, ptr %9, align 8, !tbaa !11
  %102 = getelementptr inbounds %struct.HandleChrono, ptr %101, i32 0, i32 3
  %103 = load i32, ptr %102, align 8, !tbaa !25
  %104 = add nsw i32 %103, 1
  store i32 %104, ptr %102, align 8, !tbaa !25
  store i32 %103, ptr %13, align 4, !tbaa !5
  %105 = load ptr, ptr %9, align 8, !tbaa !11
  %106 = getelementptr inbounds %struct.HandleChrono, ptr %105, i32 0, i32 1
  %107 = load i32, ptr %106, align 8, !tbaa !19
  %108 = add nsw i32 %107, 1
  store i32 %108, ptr %106, align 8, !tbaa !19
  %109 = load ptr, ptr %9, align 8, !tbaa !11
  %110 = getelementptr inbounds %struct.HandleChrono, ptr %109, i32 0, i32 0
  %111 = load ptr, ptr %110, align 8, !tbaa !18
  %112 = call ptr @mChainNode(ptr noundef %111, ptr noundef null, i32 noundef 24)
  store ptr %112, ptr %10, align 8, !tbaa !11
  %113 = load ptr, ptr %10, align 8, !tbaa !11
  %114 = getelementptr inbounds %struct.MChainNode, ptr %113, i32 0, i32 0
  %115 = load ptr, ptr %114, align 8, !tbaa !21
  store ptr %115, ptr %11, align 8, !tbaa !11
  %116 = load i32, ptr %13, align 4, !tbaa !5
  %117 = load ptr, ptr %11, align 8, !tbaa !11
  %118 = getelementptr inbounds %struct.ChronoData, ptr %117, i32 0, i32 3
  store i32 %116, ptr %118, align 8, !tbaa !23
  %119 = load i32, ptr %5, align 4, !tbaa !5
  %120 = load ptr, ptr %11, align 8, !tbaa !11
  %121 = getelementptr inbounds %struct.ChronoData, ptr %120, i32 0, i32 1
  store i32 %119, ptr %121, align 8, !tbaa !26
  %122 = load double, ptr %6, align 8, !tbaa !9
  %123 = load ptr, ptr %11, align 8, !tbaa !11
  %124 = getelementptr inbounds %struct.ChronoData, ptr %123, i32 0, i32 0
  store double %122, ptr %124, align 8, !tbaa !27
  %125 = load i32, ptr %4, align 4, !tbaa !5
  %126 = load ptr, ptr %11, align 8, !tbaa !11
  %127 = getelementptr inbounds %struct.ChronoData, ptr %126, i32 0, i32 2
  store i32 %125, ptr %127, align 4, !tbaa !28
  %128 = load ptr, ptr %9, align 8, !tbaa !11
  %129 = getelementptr inbounds %struct.HandleChrono, ptr %128, i32 0, i32 1
  %130 = load i32, ptr %129, align 8, !tbaa !19
  %131 = icmp eq i32 %130, 1
  br i1 %131, label %132, label %139

132:                                              ; preds = %100
  %133 = load ptr, ptr %10, align 8, !tbaa !11
  %134 = load ptr, ptr %9, align 8, !tbaa !11
  %135 = getelementptr inbounds %struct.HandleChrono, ptr %134, i32 0, i32 0
  %136 = load ptr, ptr %135, align 8, !tbaa !18
  %137 = getelementptr inbounds %struct.MObject, ptr %136, i32 0, i32 1
  store ptr %133, ptr %137, align 8, !tbaa !20
  %138 = load i32, ptr %13, align 4, !tbaa !5
  store i32 %138, ptr %3, align 4
  store i32 1, ptr %12, align 4
  br label %193

139:                                              ; preds = %100
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  %140 = load ptr, ptr %9, align 8, !tbaa !11
  %141 = getelementptr inbounds %struct.HandleChrono, ptr %140, i32 0, i32 0
  %142 = load ptr, ptr %141, align 8, !tbaa !18
  %143 = getelementptr inbounds %struct.MObject, ptr %142, i32 0, i32 1
  %144 = load ptr, ptr %143, align 8, !tbaa !20
  store ptr %144, ptr %14, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  %145 = load ptr, ptr %14, align 8, !tbaa !11
  %146 = getelementptr inbounds %struct.MChainNode, ptr %145, i32 0, i32 0
  %147 = load ptr, ptr %146, align 8, !tbaa !21
  store ptr %147, ptr %15, align 8, !tbaa !11
  %148 = load double, ptr %6, align 8, !tbaa !9
  %149 = load ptr, ptr %15, align 8, !tbaa !11
  %150 = getelementptr inbounds %struct.ChronoData, ptr %149, i32 0, i32 0
  %151 = load double, ptr %150, align 8, !tbaa !27
  %152 = fcmp olt double %148, %151
  br i1 %152, label %153, label %162

153:                                              ; preds = %139
  %154 = load ptr, ptr %10, align 8, !tbaa !11
  %155 = load ptr, ptr %14, align 8, !tbaa !11
  call void @mChainNodeInsert(ptr noundef null, ptr noundef %154, ptr noundef %155)
  %156 = load ptr, ptr %10, align 8, !tbaa !11
  %157 = load ptr, ptr %9, align 8, !tbaa !11
  %158 = getelementptr inbounds %struct.HandleChrono, ptr %157, i32 0, i32 0
  %159 = load ptr, ptr %158, align 8, !tbaa !18
  %160 = getelementptr inbounds %struct.MObject, ptr %159, i32 0, i32 1
  store ptr %156, ptr %160, align 8, !tbaa !20
  %161 = load i32, ptr %13, align 4, !tbaa !5
  store i32 %161, ptr %3, align 4
  store i32 1, ptr %12, align 4
  br label %192

162:                                              ; preds = %139
  %163 = load ptr, ptr %14, align 8, !tbaa !11
  %164 = getelementptr inbounds %struct.MChainNode, ptr %163, i32 0, i32 2
  %165 = load ptr, ptr %164, align 8, !tbaa !29
  store ptr %165, ptr %14, align 8, !tbaa !11
  br label %166

166:                                              ; preds = %184, %162
  %167 = load ptr, ptr %14, align 8, !tbaa !11
  %168 = load ptr, ptr %9, align 8, !tbaa !11
  %169 = getelementptr inbounds %struct.HandleChrono, ptr %168, i32 0, i32 0
  %170 = load ptr, ptr %169, align 8, !tbaa !18
  %171 = getelementptr inbounds %struct.MObject, ptr %170, i32 0, i32 1
  %172 = load ptr, ptr %171, align 8, !tbaa !20
  %173 = icmp ne ptr %167, %172
  br i1 %173, label %174, label %188

174:                                              ; preds = %166
  %175 = load ptr, ptr %14, align 8, !tbaa !11
  %176 = getelementptr inbounds %struct.MChainNode, ptr %175, i32 0, i32 0
  %177 = load ptr, ptr %176, align 8, !tbaa !21
  store ptr %177, ptr %15, align 8, !tbaa !11
  %178 = load double, ptr %6, align 8, !tbaa !9
  %179 = load ptr, ptr %15, align 8, !tbaa !11
  %180 = getelementptr inbounds %struct.ChronoData, ptr %179, i32 0, i32 0
  %181 = load double, ptr %180, align 8, !tbaa !27
  %182 = fcmp olt double %178, %181
  br i1 %182, label %183, label %184

183:                                              ; preds = %174
  br label %188

184:                                              ; preds = %174
  %185 = load ptr, ptr %14, align 8, !tbaa !11
  %186 = getelementptr inbounds %struct.MChainNode, ptr %185, i32 0, i32 2
  %187 = load ptr, ptr %186, align 8, !tbaa !29
  store ptr %187, ptr %14, align 8, !tbaa !11
  br label %166, !llvm.loop !30

188:                                              ; preds = %183, %166
  %189 = load ptr, ptr %10, align 8, !tbaa !11
  %190 = load ptr, ptr %14, align 8, !tbaa !11
  call void @mChainNodeInsert(ptr noundef null, ptr noundef %189, ptr noundef %190)
  %191 = load i32, ptr %13, align 4, !tbaa !5
  store i32 %191, ptr %3, align 4
  store i32 1, ptr %12, align 4
  br label %192

192:                                              ; preds = %188, %153
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  br label %193

193:                                              ; preds = %192, %132
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #3
  br label %194

194:                                              ; preds = %193, %80
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  %195 = load i32, ptr %3, align 4
  ret i32 %195
}

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

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

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

declare void @m_PropertyVariate(ptr noundef, ptr noundef, ptr noundef, i32 noundef) #2

declare ptr @mChainCreate(...) #2

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

declare void @mChainNodeInsert(ptr noundef, ptr noundef, ptr noundef) #2

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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!14, !12, i64 16}
!14 = !{!"MHandle", !6, i64 0, !6, i64 4, !12, i64 8, !12, i64 16}
!15 = !{!14, !6, i64 4}
!16 = !{!17, !6, i64 12}
!17 = !{!"HandleChrono", !12, i64 0, !6, i64 8, !6, i64 12, !6, i64 16}
!18 = !{!17, !12, i64 0}
!19 = !{!17, !6, i64 8}
!20 = !{!7, !7, i64 0}
!21 = !{!22, !12, i64 0}
!22 = !{!"MChainNode", !12, i64 0, !12, i64 8, !12, i64 16}
!23 = !{!24, !6, i64 16}
!24 = !{!"ChronoData", !10, i64 0, !6, i64 8, !6, i64 12, !6, i64 16}
!25 = !{!17, !6, i64 16}
!26 = !{!24, !6, i64 8}
!27 = !{!24, !10, i64 0}
!28 = !{!24, !6, i64 12}
!29 = !{!22, !12, i64 16}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}


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

@.str = external hidden unnamed_addr constant [76 x i8], align 1
@__FUNCTION__.m_ChronoTask = external hidden unnamed_addr constant [13 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [13 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local double @mTime() local_unnamed_addr #0

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

; Function Attrs: nounwind uwtable
define dso_local i32 @m_ChronoTask(i32 noundef %0, i32 noundef %1) local_unnamed_addr #0 {
  %3 = tail call double @mTime()
  %4 = sitofp i32 %0 to double
  %5 = fadd double %3, %4
  %6 = icmp slt i32 %0, 0
  %7 = icmp slt i32 %1, -1
  %8 = or i1 %6, %7
  br i1 %8, label %9, label %10

9:                                                ; 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 60, ptr noundef nonnull @__FUNCTION__.m_ChronoTask, ptr noundef nonnull @.str.1) #2
  br label %10

10:                                               ; preds = %9, %2
  %11 = tail call ptr @mMornObject(ptr noundef nonnull @.str.2, i32 noundef -1) #2
  %12 = tail call ptr @GetHandle(ptr noundef %11, i32 noundef 24, i32 noundef -2033341518, ptr noundef nonnull @endChrono) #2
  %13 = getelementptr inbounds i8, ptr %12, i64 16
  %14 = load ptr, ptr %13, align 8, !tbaa !5
  %15 = getelementptr inbounds i8, ptr %12, i64 4
  %16 = load volatile i32, ptr %15, align 4, !tbaa !11
  %17 = icmp eq i32 %16, 0
  br i1 %17, label %18, label %._crit_edge

._crit_edge:                                      ; preds = %10
  %.pre.pre = load ptr, ptr %14, align 8, !tbaa !12
  br label %26

18:                                               ; preds = %10
  %19 = getelementptr inbounds i8, ptr %14, i64 12
  store i32 100, ptr %19, align 4, !tbaa !14
  %20 = tail call ptr @mMornObject(ptr noundef nonnull @.str.2, i32 noundef -1) #2
  tail call void @m_PropertyVariate(ptr noundef %20, ptr noundef nonnull @.str.3, ptr noundef nonnull %19, i32 noundef 4) #2
  %21 = load ptr, ptr %14, align 8, !tbaa !12
  %22 = icmp eq ptr %21, null
  br i1 %22, label %23, label %25

23:                                               ; preds = %18
  %24 = tail call ptr (...) @mChainCreate() #2
  store ptr %24, ptr %14, align 8, !tbaa !12
  br label %25

25:                                               ; preds = %23, %18
  %.pre63 = phi ptr [ %24, %23 ], [ %21, %18 ]
  store volatile i32 1, ptr %15, align 4, !tbaa !11
  br label %26

26:                                               ; preds = %._crit_edge, %25
  %.pre = phi ptr [ %.pre.pre, %._crit_edge ], [ %.pre63, %25 ]
  %27 = getelementptr inbounds i8, ptr %14, i64 8
  %28 = load i32, ptr %27, align 8, !tbaa !15
  %29 = icmp eq i32 %28, 1
  br i1 %29, label %30, label %43

30:                                               ; preds = %26
  %31 = getelementptr inbounds i8, ptr %.pre, i64 8
  %32 = load ptr, ptr %31, align 8, !tbaa !16
  %33 = load ptr, ptr %32, align 8, !tbaa !17
  %34 = getelementptr inbounds i8, ptr %33, i64 16
  %35 = load i32, ptr %34, align 8, !tbaa !19
  %36 = icmp eq i32 %35, -1
  br i1 %36, label %37, label %43

37:                                               ; preds = %30
  %38 = getelementptr inbounds i8, ptr %14, i64 16
  %39 = load i32, ptr %38, align 8, !tbaa !22
  %40 = add nsw i32 %39, 1
  store i32 %40, ptr %38, align 8, !tbaa !22
  store i32 %39, ptr %34, align 8, !tbaa !19
  %41 = getelementptr inbounds i8, ptr %33, i64 8
  store i32 %1, ptr %41, align 8, !tbaa !23
  store double %5, ptr %33, align 8, !tbaa !24
  %42 = getelementptr inbounds i8, ptr %33, i64 12
  store i32 %0, ptr %42, align 4, !tbaa !25
  br label %71

43:                                               ; preds = %30, %26
  %44 = getelementptr inbounds i8, ptr %14, i64 16
  %45 = load i32, ptr %44, align 8, !tbaa !22
  %46 = add nsw i32 %45, 1
  store i32 %46, ptr %44, align 8, !tbaa !22
  %47 = add nsw i32 %28, 1
  store i32 %47, ptr %27, align 8, !tbaa !15
  %48 = tail call ptr @mChainNode(ptr noundef %.pre, ptr noundef null, i32 noundef 24) #2
  %49 = load ptr, ptr %48, align 8, !tbaa !17
  %50 = getelementptr inbounds i8, ptr %49, i64 16
  store i32 %45, ptr %50, align 8, !tbaa !19
  %51 = getelementptr inbounds i8, ptr %49, i64 8
  store i32 %1, ptr %51, align 8, !tbaa !23
  store double %5, ptr %49, align 8, !tbaa !24
  %52 = getelementptr inbounds i8, ptr %49, i64 12
  store i32 %0, ptr %52, align 4, !tbaa !25
  %53 = load i32, ptr %27, align 8, !tbaa !15
  %54 = icmp eq i32 %53, 1
  %55 = load ptr, ptr %14, align 8, !tbaa !12
  %56 = getelementptr inbounds i8, ptr %55, i64 8
  br i1 %54, label %57, label %58

57:                                               ; preds = %43
  store ptr %48, ptr %56, align 8, !tbaa !16
  br label %71

58:                                               ; preds = %43
  %59 = load ptr, ptr %56, align 8, !tbaa !16
  %60 = load ptr, ptr %59, align 8, !tbaa !17
  %61 = load double, ptr %60, align 8, !tbaa !24
  %62 = fcmp olt double %5, %61
  br i1 %62, label %63, label %.preheader

63:                                               ; preds = %58
  tail call void @mChainNodeInsert(ptr noundef null, ptr noundef nonnull %48, ptr noundef nonnull %59) #2
  %64 = load ptr, ptr %14, align 8, !tbaa !12
  %65 = getelementptr inbounds i8, ptr %64, i64 8
  store ptr %48, ptr %65, align 8, !tbaa !16
  br label %71

.preheader:                                       ; preds = %58, %66
  %.pn = phi ptr [ %.0, %66 ], [ %59, %58 ]
  %.0.in = getelementptr inbounds i8, ptr %.pn, i64 16
  %.0 = load ptr, ptr %.0.in, align 8, !tbaa !26
  %.not = icmp eq ptr %.0, %59
  br i1 %.not, label %70, label %66

66:                                               ; preds = %.preheader
  %67 = load ptr, ptr %.0, align 8, !tbaa !17
  %68 = load double, ptr %67, align 8, !tbaa !24
  %69 = fcmp olt double %5, %68
  br i1 %69, label %70, label %.preheader, !llvm.loop !27

70:                                               ; preds = %66, %.preheader
  tail call void @mChainNodeInsert(ptr noundef null, ptr noundef nonnull %48, ptr noundef %.0) #2
  br label %71

71:                                               ; preds = %57, %70, %63, %37
  %.2 = phi i32 [ %39, %37 ], [ %45, %63 ], [ %45, %70 ], [ %45, %57 ]
  ret i32 %.2
}

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

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

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

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

declare ptr @mChainCreate(...) local_unnamed_addr #1

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

declare void @mChainNodeInsert(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #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 = { "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 }

!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, !10, i64 16}
!6 = !{!"MHandle", !7, i64 0, !7, i64 4, !10, i64 8, !10, i64 16}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!6, !7, i64 4}
!12 = !{!13, !10, i64 0}
!13 = !{!"HandleChrono", !10, i64 0, !7, i64 8, !7, i64 12, !7, i64 16}
!14 = !{!13, !7, i64 12}
!15 = !{!13, !7, i64 8}
!16 = !{!8, !8, i64 0}
!17 = !{!18, !10, i64 0}
!18 = !{!"MChainNode", !10, i64 0, !10, i64 8, !10, i64 16}
!19 = !{!20, !7, i64 16}
!20 = !{!"ChronoData", !21, i64 0, !7, i64 8, !7, i64 12, !7, i64 16}
!21 = !{!"double", !8, i64 0}
!22 = !{!13, !7, i64 16}
!23 = !{!20, !7, i64 8}
!24 = !{!20, !21, i64 0}
!25 = !{!20, !7, i64 12}
!26 = !{!18, !10, i64 16}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,LCSSAPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass