; LLVM IR from viveakrt/Competitive-programing :: SPOJ/treap.ll (Z3mndP4nodeii)

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z2szP4node(ptr noundef) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z2mxP4node(ptr noundef) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z2mnP4node(ptr noundef) #0

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #1

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

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

; Function Attrs: uwtable
define dso_local noundef i32 @_Z3mndP4nodeii(ptr noundef %0, i32 noundef %1, i32 noundef %2) #3 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !9
  store i32 %2, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  store i32 2147483647, ptr %8, align 4, !tbaa !9
  %14 = load i32, ptr %6, align 4, !tbaa !9
  %15 = icmp slt i32 %14, 1
  br i1 %15, label %16, label %17

16:                                               ; preds = %3
  store i32 1, ptr %6, align 4, !tbaa !9
  br label %17

17:                                               ; preds = %16, %3
  %18 = load i32, ptr %7, align 4, !tbaa !9
  %19 = load ptr, ptr %5, align 8, !tbaa !5
  %20 = call noundef i32 @_Z2szP4node(ptr noundef %19)
  %21 = icmp sgt i32 %18, %20
  br i1 %21, label %22, label %25

22:                                               ; preds = %17
  %23 = load ptr, ptr %5, align 8, !tbaa !5
  %24 = call noundef i32 @_Z2szP4node(ptr noundef %23)
  store i32 %24, ptr %7, align 4, !tbaa !9
  br label %25

25:                                               ; preds = %22, %17
  %26 = load i32, ptr %6, align 4, !tbaa !9
  %27 = icmp sle i32 %26, 1
  br i1 %27, label %28, label %37

28:                                               ; preds = %25
  %29 = load i32, ptr %7, align 4, !tbaa !9
  %30 = load ptr, ptr %5, align 8, !tbaa !5
  %31 = call noundef i32 @_Z2szP4node(ptr noundef %30)
  %32 = icmp sge i32 %29, %31
  br i1 %32, label %33, label %37

33:                                               ; preds = %28
  %34 = load ptr, ptr %5, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.node, ptr %34, i32 0, i32 5
  %36 = load i32, ptr %35, align 4, !tbaa !11
  store i32 %36, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %143

37:                                               ; preds = %28, %25
  %38 = load i32, ptr %6, align 4, !tbaa !9
  %39 = load ptr, ptr %5, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.node, ptr %39, i32 0, i32 6
  %41 = load ptr, ptr %40, align 8, !tbaa !13
  %42 = call noundef i32 @_Z2szP4node(ptr noundef %41)
  %43 = icmp sle i32 %38, %42
  br i1 %43, label %44, label %63

44:                                               ; preds = %37
  %45 = load i32, ptr %7, align 4, !tbaa !9
  %46 = load ptr, ptr %5, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.node, ptr %46, i32 0, i32 6
  %48 = load ptr, ptr %47, align 8, !tbaa !13
  %49 = call noundef i32 @_Z2szP4node(ptr noundef %48)
  %50 = add nsw i32 %49, 1
  %51 = icmp sge i32 %45, %50
  br i1 %51, label %52, label %63

52:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  %53 = load ptr, ptr %5, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.node, ptr %53, i32 0, i32 1
  %55 = load i32, ptr %54, align 4, !tbaa !14
  %56 = load ptr, ptr %5, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.node, ptr %56, i32 0, i32 6
  %58 = load ptr, ptr %57, align 8, !tbaa !13
  %59 = call noundef i32 @_Z2mxP4node(ptr noundef %58)
  %60 = sub nsw i32 %55, %59
  store i32 %60, ptr %10, align 4, !tbaa !9
  %61 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %10)
  %62 = load i32, ptr %61, align 4, !tbaa !9
  store i32 %62, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  br label %63

63:                                               ; preds = %52, %44, %37
  %64 = load i32, ptr %6, align 4, !tbaa !9
  %65 = load ptr, ptr %5, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.node, ptr %65, i32 0, i32 6
  %67 = load ptr, ptr %66, align 8, !tbaa !13
  %68 = call noundef i32 @_Z2szP4node(ptr noundef %67)
  %69 = add nsw i32 %68, 1
  %70 = icmp sle i32 %64, %69
  br i1 %70, label %71, label %90

71:                                               ; preds = %63
  %72 = load i32, ptr %7, align 4, !tbaa !9
  %73 = load ptr, ptr %5, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.node, ptr %73, i32 0, i32 6
  %75 = load ptr, ptr %74, align 8, !tbaa !13
  %76 = call noundef i32 @_Z2szP4node(ptr noundef %75)
  %77 = add nsw i32 %76, 1
  %78 = icmp sgt i32 %72, %77
  br i1 %78, label %79, label %90

79:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  %80 = load ptr, ptr %5, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.node, ptr %80, i32 0, i32 7
  %82 = load ptr, ptr %81, align 8, !tbaa !15
  %83 = call noundef i32 @_Z2mnP4node(ptr noundef %82)
  %84 = load ptr, ptr %5, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.node, ptr %84, i32 0, i32 1
  %86 = load i32, ptr %85, align 4, !tbaa !14
  %87 = sub nsw i32 %83, %86
  store i32 %87, ptr %11, align 4, !tbaa !9
  %88 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %11)
  %89 = load i32, ptr %88, align 4, !tbaa !9
  store i32 %89, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  br label %90

90:                                               ; preds = %79, %71, %63
  %91 = load i32, ptr %6, align 4, !tbaa !9
  %92 = load ptr, ptr %5, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.node, ptr %92, i32 0, i32 6
  %94 = load ptr, ptr %93, align 8, !tbaa !13
  %95 = call noundef i32 @_Z2szP4node(ptr noundef %94)
  %96 = icmp slt i32 %91, %95
  br i1 %96, label %97, label %106

97:                                               ; preds = %90
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  %98 = load ptr, ptr %5, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.node, ptr %98, i32 0, i32 6
  %100 = load ptr, ptr %99, align 8, !tbaa !13
  %101 = load i32, ptr %6, align 4, !tbaa !9
  %102 = load i32, ptr %7, align 4, !tbaa !9
  %103 = call noundef i32 @_Z3mndP4nodeii(ptr noundef %100, i32 noundef %101, i32 noundef %102)
  store i32 %103, ptr %12, align 4, !tbaa !9
  %104 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %12)
  %105 = load i32, ptr %104, align 4, !tbaa !9
  store i32 %105, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  br label %106

106:                                              ; preds = %97, %90
  %107 = load i32, ptr %7, align 4, !tbaa !9
  %108 = load ptr, ptr %5, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.node, ptr %108, i32 0, i32 6
  %110 = load ptr, ptr %109, align 8, !tbaa !13
  %111 = call noundef i32 @_Z2szP4node(ptr noundef %110)
  %112 = add nsw i32 %111, 2
  %113 = icmp sgt i32 %107, %112
  br i1 %113, label %114, label %135

114:                                              ; preds = %106
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  %115 = load ptr, ptr %5, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.node, ptr %115, i32 0, i32 7
  %117 = load ptr, ptr %116, align 8, !tbaa !15
  %118 = load i32, ptr %6, align 4, !tbaa !9
  %119 = load ptr, ptr %5, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.node, ptr %119, i32 0, i32 6
  %121 = load ptr, ptr %120, align 8, !tbaa !13
  %122 = call noundef i32 @_Z2szP4node(ptr noundef %121)
  %123 = sub nsw i32 %118, %122
  %124 = sub nsw i32 %123, 1
  %125 = load i32, ptr %7, align 4, !tbaa !9
  %126 = load ptr, ptr %5, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.node, ptr %126, i32 0, i32 6
  %128 = load ptr, ptr %127, align 8, !tbaa !13
  %129 = call noundef i32 @_Z2szP4node(ptr noundef %128)
  %130 = sub nsw i32 %125, %129
  %131 = sub nsw i32 %130, 1
  %132 = call noundef i32 @_Z3mndP4nodeii(ptr noundef %117, i32 noundef %124, i32 noundef %131)
  store i32 %132, ptr %13, align 4, !tbaa !9
  %133 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %13)
  %134 = load i32, ptr %133, align 4, !tbaa !9
  store i32 %134, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  br label %135

135:                                              ; preds = %114, %106
  %136 = load i32, ptr %8, align 4, !tbaa !9
  %137 = icmp eq i32 %136, 2147483647
  br i1 %137, label %138, label %141

138:                                              ; preds = %135
  br label %139

139:                                              ; preds = %140, %138
  br label %140

140:                                              ; preds = %139
  br label %139

141:                                              ; preds = %135
  %142 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %142, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %143

143:                                              ; preds = %141, %33
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  %144 = load i32, ptr %4, align 4
  ret i32 %144
}

attributes #0 = { mustprogress 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 = { inlinehint mustprogress 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 #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 20}
!12 = !{!"_ZTS4node", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !6, i64 24, !6, i64 32}
!13 = !{!12, !6, i64 24}
!14 = !{!12, !10, i64 4}
!15 = !{!12, !6, i64 32}


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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z2szP4node(ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z2mxP4node(ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z2mnP4node(ptr noundef) local_unnamed_addr #0

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1

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

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

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @_Z3mndP4nodeii(ptr noundef %0, i32 noundef %1, i32 noundef %2) local_unnamed_addr #3 {
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #5
  store i32 2147483647, ptr %4, align 4, !tbaa !5
  %spec.store.select = tail call i32 @llvm.smax.i32(i32 %1, i32 1)
  %9 = tail call noundef i32 @_Z2szP4node(ptr noundef %0)
  %10 = icmp slt i32 %9, %2
  br i1 %10, label %11, label %13

11:                                               ; preds = %3
  %12 = tail call noundef i32 @_Z2szP4node(ptr noundef %0)
  br label %13

13:                                               ; preds = %11, %3
  %.0 = phi i32 [ %12, %11 ], [ %2, %3 ]
  %14 = icmp slt i32 %1, 2
  br i1 %14, label %15, label %20

15:                                               ; preds = %13
  %16 = tail call noundef i32 @_Z2szP4node(ptr noundef %0)
  %.not = icmp slt i32 %.0, %16
  br i1 %.not, label %20, label %17

17:                                               ; preds = %15
  %18 = getelementptr inbounds i8, ptr %0, i64 20
  %19 = load i32, ptr %18, align 4, !tbaa !9
  br label %84

20:                                               ; preds = %15, %13
  %21 = getelementptr inbounds i8, ptr %0, i64 24
  %22 = load ptr, ptr %21, align 8, !tbaa !12
  %23 = tail call noundef i32 @_Z2szP4node(ptr noundef %22)
  %.not35 = icmp sgt i32 %spec.store.select, %23
  br i1 %.not35, label %35, label %24

24:                                               ; preds = %20
  %25 = load ptr, ptr %21, align 8, !tbaa !12
  %26 = tail call noundef i32 @_Z2szP4node(ptr noundef %25)
  %.not36.not = icmp sgt i32 %.0, %26
  br i1 %.not36.not, label %27, label %35

27:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #5
  %28 = getelementptr inbounds i8, ptr %0, i64 4
  %29 = load i32, ptr %28, align 4, !tbaa !13
  %30 = load ptr, ptr %21, align 8, !tbaa !12
  %31 = tail call noundef i32 @_Z2mxP4node(ptr noundef %30)
  %32 = sub nsw i32 %29, %31
  store i32 %32, ptr %5, align 4, !tbaa !5
  %33 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %34 = load i32, ptr %33, align 4, !tbaa !5
  store i32 %34, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  br label %35

35:                                               ; preds = %27, %24, %20
  %36 = load ptr, ptr %21, align 8, !tbaa !12
  %37 = call noundef i32 @_Z2szP4node(ptr noundef %36)
  %38 = add nsw i32 %37, 1
  %.not37 = icmp sgt i32 %spec.store.select, %38
  br i1 %.not37, label %53, label %39

39:                                               ; preds = %35
  %40 = load ptr, ptr %21, align 8, !tbaa !12
  %41 = call noundef i32 @_Z2szP4node(ptr noundef %40)
  %42 = add nsw i32 %41, 1
  %43 = icmp sgt i32 %.0, %42
  br i1 %43, label %44, label %53

44:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #5
  %45 = getelementptr inbounds i8, ptr %0, i64 32
  %46 = load ptr, ptr %45, align 8, !tbaa !14
  %47 = call noundef i32 @_Z2mnP4node(ptr noundef %46)
  %48 = getelementptr inbounds i8, ptr %0, i64 4
  %49 = load i32, ptr %48, align 4, !tbaa !13
  %50 = sub nsw i32 %47, %49
  store i32 %50, ptr %6, align 4, !tbaa !5
  %51 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %52 = load i32, ptr %51, align 4, !tbaa !5
  store i32 %52, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  br label %53

53:                                               ; preds = %44, %39, %35
  %54 = load ptr, ptr %21, align 8, !tbaa !12
  %55 = call noundef i32 @_Z2szP4node(ptr noundef %54)
  %56 = icmp slt i32 %spec.store.select, %55
  br i1 %56, label %57, label %62

57:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #5
  %58 = load ptr, ptr %21, align 8, !tbaa !12
  %59 = call noundef i32 @_Z3mndP4nodeii(ptr noundef %58, i32 noundef %spec.store.select, i32 noundef %.0)
  store i32 %59, ptr %7, align 4, !tbaa !5
  %60 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %61 = load i32, ptr %60, align 4, !tbaa !5
  store i32 %61, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #5
  br label %62

62:                                               ; preds = %57, %53
  %63 = load ptr, ptr %21, align 8, !tbaa !12
  %64 = call noundef i32 @_Z2szP4node(ptr noundef %63)
  %65 = add nsw i32 %64, 2
  %66 = icmp sgt i32 %.0, %65
  br i1 %66, label %67, label %thread-pre-split

67:                                               ; preds = %62
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #5
  %68 = getelementptr inbounds i8, ptr %0, i64 32
  %69 = load ptr, ptr %68, align 8, !tbaa !14
  %70 = load ptr, ptr %21, align 8, !tbaa !12
  %71 = call noundef i32 @_Z2szP4node(ptr noundef %70)
  %72 = xor i32 %71, -1
  %73 = add i32 %spec.store.select, %72
  %74 = load ptr, ptr %21, align 8, !tbaa !12
  %75 = call noundef i32 @_Z2szP4node(ptr noundef %74)
  %76 = xor i32 %75, -1
  %77 = add i32 %.0, %76
  %78 = call noundef i32 @_Z3mndP4nodeii(ptr noundef %69, i32 noundef %73, i32 noundef %77)
  store i32 %78, ptr %8, align 4, !tbaa !5
  %79 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %8)
  %80 = load i32, ptr %79, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #5
  br label %81

thread-pre-split:                                 ; preds = %62
  %.pr = load i32, ptr %4, align 4, !tbaa !5
  br label %81

81:                                               ; preds = %thread-pre-split, %67
  %82 = phi i32 [ %.pr, %thread-pre-split ], [ %80, %67 ]
  %83 = icmp eq i32 %82, 2147483647
  br i1 %83, label %.preheader, label %84

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

84:                                               ; preds = %81, %17
  %.032 = phi i32 [ %19, %17 ], [ %82, %81 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  ret i32 %.032
}

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #4

attributes #0 = { mustprogress 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 = { inlinehint mustprogress 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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++ TBAA"}
!9 = !{!10, !6, i64 20}
!10 = !{!"_ZTS4node", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !11, i64 24, !11, i64 32}
!11 = !{!"any pointer", !7, i64 0}
!12 = !{!10, !11, i64 24}
!13 = !{!10, !6, i64 4}
!14 = !{!10, !11, i64 32}


; Effective O3 passes: DSEPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass