; LLVM IR from gem5/gem5 :: ext/systemc/src/sysc/datatypes/fx (scfx_rep)

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

%"class.sc_dt::scfx_rep" = type <{ %"class.sc_dt::scfx_mant", i32, i32, i32, i32, i32, i8, [3 x i8] }>
%"class.sc_dt::scfx_mant" = type <{ ptr, i32, [4 x i8] }>

@_ZN5sc_dtL8min_mantE = external hidden constant i32, align 4

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZNK5sc_dt8scfx_rep4sizeEv(ptr noundef nonnull align 8 dereferenceable(37)) #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5sc_dt5alignERKNS_8scfx_repES2_RiS3_RNS_13scfx_mant_refES5_(ptr noundef nonnull align 8 dereferenceable(37) %0, ptr noundef nonnull align 8 dereferenceable(37) %1, ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 8 dereferenceable(9) %4, ptr noundef nonnull align 8 dereferenceable(9) %5) #3 {
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i8, align 1
  %14 = alloca i8, align 1
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store ptr %2, ptr %9, align 8, !tbaa !5
  store ptr %3, ptr %10, align 8, !tbaa !5
  store ptr %4, ptr %11, align 8, !tbaa !5
  store ptr %5, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %13) #4
  store i8 1, ptr %13, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #4
  store i8 1, ptr %14, align 1, !tbaa !9
  %22 = load ptr, ptr %7, align 8, !tbaa !5
  %23 = getelementptr inbounds %"class.sc_dt::scfx_rep", ptr %22, i32 0, i32 1
  %24 = load i32, ptr %23, align 8, !tbaa !11
  %25 = load ptr, ptr %8, align 8, !tbaa !5
  %26 = getelementptr inbounds %"class.sc_dt::scfx_rep", ptr %25, i32 0, i32 1
  %27 = load i32, ptr %26, align 8, !tbaa !11
  %28 = icmp ne i32 %24, %27
  br i1 %28, label %35, label %29

29:                                               ; preds = %6
  %30 = load ptr, ptr %7, align 8, !tbaa !5
  %31 = call noundef i32 @_ZNK5sc_dt8scfx_rep4sizeEv(ptr noundef nonnull align 8 dereferenceable(37) %30)
  %32 = load ptr, ptr %8, align 8, !tbaa !5
  %33 = call noundef i32 @_ZNK5sc_dt8scfx_rep4sizeEv(ptr noundef nonnull align 8 dereferenceable(37) %32)
  %34 = icmp ne i32 %31, %33
  br i1 %34, label %35, label %119

35:                                               ; preds = %29, %6
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  %36 = load ptr, ptr %7, align 8, !tbaa !5
  %37 = getelementptr inbounds %"class.sc_dt::scfx_rep", ptr %36, i32 0, i32 5
  %38 = load i32, ptr %37, align 8, !tbaa !16
  %39 = load ptr, ptr %7, align 8, !tbaa !5
  %40 = getelementptr inbounds %"class.sc_dt::scfx_rep", ptr %39, i32 0, i32 1
  %41 = load i32, ptr %40, align 8, !tbaa !11
  %42 = sub nsw i32 %38, %41
  store i32 %42, ptr %15, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  %43 = load ptr, ptr %7, align 8, !tbaa !5
  %44 = getelementptr inbounds %"class.sc_dt::scfx_rep", ptr %43, i32 0, i32 4
  %45 = load i32, ptr %44, align 4, !tbaa !18
  %46 = load ptr, ptr %7, align 8, !tbaa !5
  %47 = getelementptr inbounds %"class.sc_dt::scfx_rep", ptr %46, i32 0, i32 1
  %48 = load i32, ptr %47, align 8, !tbaa !11
  %49 = sub nsw i32 %45, %48
  store i32 %49, ptr %16, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  %50 = load ptr, ptr %8, align 8, !tbaa !5
  %51 = getelementptr inbounds %"class.sc_dt::scfx_rep", ptr %50, i32 0, i32 5
  %52 = load i32, ptr %51, align 8, !tbaa !16
  %53 = load ptr, ptr %8, align 8, !tbaa !5
  %54 = getelementptr inbounds %"class.sc_dt::scfx_rep", ptr %53, i32 0, i32 1
  %55 = load i32, ptr %54, align 8, !tbaa !11
  %56 = sub nsw i32 %52, %55
  store i32 %56, ptr %17, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  %57 = load ptr, ptr %8, align 8, !tbaa !5
  %58 = getelementptr inbounds %"class.sc_dt::scfx_rep", ptr %57, i32 0, i32 4
  %59 = load i32, ptr %58, align 4, !tbaa !18
  %60 = load ptr, ptr %8, align 8, !tbaa !5
  %61 = getelementptr inbounds %"class.sc_dt::scfx_rep", ptr %60, i32 0, i32 1
  %62 = load i32, ptr %61, align 8, !tbaa !11
  %63 = sub nsw i32 %59, %62
  store i32 %63, ptr %18, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #4
  %64 = call noundef i32 @_ZN5sc_dt6sc_minIiEEKT_RS2_S3_(ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %17)
  store i32 %64, ptr %19, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #4
  %65 = call noundef i32 @_ZN5sc_dt6sc_maxIiEEKT_RS2_S3_(ptr noundef nonnull align 4 dereferenceable(4) %16, ptr noundef nonnull align 4 dereferenceable(4) %18)
  store i32 %65, ptr %20, align 4, !tbaa !17
  %66 = load i32, ptr %19, align 4, !tbaa !17
  %67 = sub nsw i32 0, %66
  %68 = load ptr, ptr %9, align 8, !tbaa !5
  store i32 %67, ptr %68, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #4
  %69 = load i32, ptr %20, align 4, !tbaa !17
  %70 = load i32, ptr %19, align 4, !tbaa !17
  %71 = sub nsw i32 %69, %70
  %72 = add nsw i32 %71, 1
  store i32 %72, ptr %21, align 4, !tbaa !17
  %73 = call noundef i32 @_ZN5sc_dt6sc_maxIiEEKT_RS2_S3_(ptr noundef nonnull align 4 dereferenceable(4) @_ZN5sc_dtL8min_mantE, ptr noundef nonnull align 4 dereferenceable(4) %21)
  %74 = load ptr, ptr %10, align 8, !tbaa !5
  store i32 %73, ptr %74, align 4, !tbaa !17
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #4
  %75 = load ptr, ptr %9, align 8, !tbaa !5
  %76 = load i32, ptr %75, align 4, !tbaa !17
  %77 = load ptr, ptr %7, align 8, !tbaa !5
  %78 = getelementptr inbounds %"class.sc_dt::scfx_rep", ptr %77, i32 0, i32 1
  %79 = load i32, ptr %78, align 8, !tbaa !11
  %80 = icmp ne i32 %76, %79
  br i1 %80, label %87, label %81

81:                                               ; preds = %35
  %82 = load ptr, ptr %10, align 8, !tbaa !5
  %83 = load i32, ptr %82, align 4, !tbaa !17
  %84 = load ptr, ptr %7, align 8, !tbaa !5
  %85 = call noundef i32 @_ZNK5sc_dt8scfx_rep4sizeEv(ptr noundef nonnull align 8 dereferenceable(37) %84)
  %86 = icmp ne i32 %83, %85
  br i1 %86, label %87, label %96

87:                                               ; preds = %81, %35
  %88 = load ptr, ptr %7, align 8, !tbaa !5
  %89 = load ptr, ptr %10, align 8, !tbaa !5
  %90 = load i32, ptr %89, align 4, !tbaa !17
  %91 = load ptr, ptr %9, align 8, !tbaa !5
  %92 = load i32, ptr %91, align 4, !tbaa !17
  %93 = call noundef ptr @_ZNK5sc_dt8scfx_rep6resizeEii(ptr noundef nonnull align 8 dereferenceable(37) %88, i32 noundef %90, i32 noundef %92)
  %94 = load ptr, ptr %11, align 8, !tbaa !5
  %95 = call noundef nonnull align 8 dereferenceable(9) ptr @_ZN5sc_dt13scfx_mant_refaSEPNS_9scfx_mantE(ptr noundef nonnull align 8 dereferenceable(9) %94, ptr noundef %93)
  store i8 0, ptr %13, align 1, !tbaa !9
  br label %96

96:                                               ; preds = %87, %81
  %97 = load ptr, ptr %9, align 8, !tbaa !5
  %98 = load i32, ptr %97, align 4, !tbaa !17
  %99 = load ptr, ptr %8, align 8, !tbaa !5
  %100 = getelementptr inbounds %"class.sc_dt::scfx_rep", ptr %99, i32 0, i32 1
  %101 = load i32, ptr %100, align 8, !tbaa !11
  %102 = icmp ne i32 %98, %101
  br i1 %102, label %109, label %103

103:                                              ; preds = %96
  %104 = load ptr, ptr %10, align 8, !tbaa !5
  %105 = load i32, ptr %104, align 4, !tbaa !17
  %106 = load ptr, ptr %8, align 8, !tbaa !5
  %107 = call noundef i32 @_ZNK5sc_dt8scfx_rep4sizeEv(ptr noundef nonnull align 8 dereferenceable(37) %106)
  %108 = icmp ne i32 %105, %107
  br i1 %108, label %109, label %118

109:                                              ; preds = %103, %96
  %110 = load ptr, ptr %8, align 8, !tbaa !5
  %111 = load ptr, ptr %10, align 8, !tbaa !5
  %112 = load i32, ptr %111, align 4, !tbaa !17
  %113 = load ptr, ptr %9, align 8, !tbaa !5
  %114 = load i32, ptr %113, align 4, !tbaa !17
  %115 = call noundef ptr @_ZNK5sc_dt8scfx_rep6resizeEii(ptr noundef nonnull align 8 dereferenceable(37) %110, i32 noundef %112, i32 noundef %114)
  %116 = load ptr, ptr %12, align 8, !tbaa !5
  %117 = call noundef nonnull align 8 dereferenceable(9) ptr @_ZN5sc_dt13scfx_mant_refaSEPNS_9scfx_mantE(ptr noundef nonnull align 8 dereferenceable(9) %116, ptr noundef %115)
  store i8 0, ptr %14, align 1, !tbaa !9
  br label %118

118:                                              ; preds = %109, %103
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  br label %119

119:                                              ; preds = %118, %29
  %120 = load i8, ptr %13, align 1, !tbaa !9, !range !19, !noundef !20
  %121 = trunc i8 %120 to i1
  br i1 %121, label %122, label %127

122:                                              ; preds = %119
  %123 = load ptr, ptr %7, align 8, !tbaa !5
  %124 = getelementptr inbounds %"class.sc_dt::scfx_rep", ptr %123, i32 0, i32 0
  %125 = load ptr, ptr %11, align 8, !tbaa !5
  %126 = call noundef nonnull align 8 dereferenceable(9) ptr @_ZN5sc_dt13scfx_mant_refaSERKNS_9scfx_mantE(ptr noundef nonnull align 8 dereferenceable(9) %125, ptr noundef nonnull align 8 dereferenceable(12) %124)
  br label %127

127:                                              ; preds = %122, %119
  %128 = load i8, ptr %14, align 1, !tbaa !9, !range !19, !noundef !20
  %129 = trunc i8 %128 to i1
  br i1 %129, label %130, label %135

130:                                              ; preds = %127
  %131 = load ptr, ptr %8, align 8, !tbaa !5
  %132 = getelementptr inbounds %"class.sc_dt::scfx_rep", ptr %131, i32 0, i32 0
  %133 = load ptr, ptr %12, align 8, !tbaa !5
  %134 = call noundef nonnull align 8 dereferenceable(9) ptr @_ZN5sc_dt13scfx_mant_refaSERKNS_9scfx_mantE(ptr noundef nonnull align 8 dereferenceable(9) %133, ptr noundef nonnull align 8 dereferenceable(12) %132)
  br label %135

135:                                              ; preds = %130, %127
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #4
  ret void
}

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZNK5sc_dt8scfx_rep6resizeEii(ptr noundef nonnull align 8 dereferenceable(37), i32 noundef, i32 noundef) #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(9) ptr @_ZN5sc_dt13scfx_mant_refaSEPNS_9scfx_mantE(ptr noundef nonnull align 8 dereferenceable(9), ptr noundef) #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(9) ptr @_ZN5sc_dt13scfx_mant_refaSERKNS_9scfx_mantE(ptr noundef nonnull align 8 dereferenceable(9), ptr noundef nonnull align 8 dereferenceable(12)) #2 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { inlinehint mustprogress 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 = { 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 #3 = { mustprogress 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 = !{!"bool", !7, i64 0}
!11 = !{!12, !14, i64 16}
!12 = !{!"_ZTSN5sc_dt8scfx_repE", !13, i64 0, !14, i64 16, !14, i64 20, !15, i64 24, !14, i64 28, !14, i64 32, !10, i64 36}
!13 = !{!"_ZTSN5sc_dt9scfx_mantE", !6, i64 0, !14, i64 8}
!14 = !{!"int", !7, i64 0}
!15 = !{!"_ZTSN5sc_dt8scfx_rep5stateE", !7, i64 0}
!16 = !{!12, !14, i64 32}
!17 = !{!14, !14, i64 0}
!18 = !{!12, !14, i64 28}
!19 = !{i8 0, i8 2}
!20 = !{}


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

@_ZN5sc_dtL8min_mantE = external hidden constant i32, align 4

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZNK5sc_dt8scfx_rep4sizeEv(ptr noundef nonnull align 8 dereferenceable(37)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5sc_dt5alignERKNS_8scfx_repES2_RiS3_RNS_13scfx_mant_refES5_(ptr noundef nonnull align 8 dereferenceable(37) %0, ptr noundef nonnull align 8 dereferenceable(37) %1, ptr nocapture noundef nonnull align 4 dereferenceable(4) %2, ptr nocapture noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 8 dereferenceable(9) %4, ptr noundef nonnull align 8 dereferenceable(9) %5) local_unnamed_addr #3 {
  %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 = getelementptr inbounds i8, ptr %0, i64 16
  %13 = load i32, ptr %12, align 8, !tbaa !5
  %14 = getelementptr inbounds i8, ptr %1, i64 16
  %15 = load i32, ptr %14, align 8, !tbaa !5
  %.not = icmp eq i32 %13, %15
  br i1 %.not, label %16, label %20

16:                                               ; preds = %6
  %17 = tail call noundef i32 @_ZNK5sc_dt8scfx_rep4sizeEv(ptr noundef nonnull align 8 dereferenceable(37) %0)
  %18 = tail call noundef i32 @_ZNK5sc_dt8scfx_rep4sizeEv(ptr noundef nonnull align 8 dereferenceable(37) %1)
  %.not40 = icmp eq i32 %17, %18
  br i1 %.not40, label %.thread.thread, label %._crit_edge

._crit_edge:                                      ; preds = %16
  %.pre = load i32, ptr %12, align 8, !tbaa !5
  %.pre50 = load i32, ptr %14, align 8, !tbaa !5
  br label %20

.thread.thread:                                   ; preds = %16
  %19 = tail call noundef nonnull align 8 dereferenceable(9) ptr @_ZN5sc_dt13scfx_mant_refaSERKNS_9scfx_mantE(ptr noundef nonnull align 8 dereferenceable(9) %4, ptr noundef nonnull align 8 dereferenceable(12) %0)
  br label %.thread62

20:                                               ; preds = %._crit_edge, %6
  %21 = phi i32 [ %.pre50, %._crit_edge ], [ %15, %6 ]
  %22 = phi i32 [ %.pre, %._crit_edge ], [ %13, %6 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #4
  %23 = getelementptr inbounds i8, ptr %0, i64 32
  %24 = load i32, ptr %23, align 8, !tbaa !14
  %25 = sub nsw i32 %24, %22
  store i32 %25, ptr %7, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #4
  %26 = getelementptr inbounds i8, ptr %0, i64 28
  %27 = load i32, ptr %26, align 4, !tbaa !16
  %28 = sub nsw i32 %27, %22
  store i32 %28, ptr %8, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #4
  %29 = getelementptr inbounds i8, ptr %1, i64 32
  %30 = load i32, ptr %29, align 8, !tbaa !14
  %31 = sub nsw i32 %30, %21
  store i32 %31, ptr %9, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #4
  %32 = getelementptr inbounds i8, ptr %1, i64 28
  %33 = load i32, ptr %32, align 4, !tbaa !16
  %34 = sub nsw i32 %33, %21
  store i32 %34, ptr %10, align 4, !tbaa !15
  %35 = call noundef i32 @_ZN5sc_dt6sc_minIiEEKT_RS2_S3_(ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %9)
  %36 = sub i32 0, %35
  %37 = call noundef i32 @_ZN5sc_dt6sc_maxIiEEKT_RS2_S3_(ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %10)
  store i32 %36, ptr %2, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #4
  %reass.sub = sub i32 %37, %35
  %38 = add i32 %reass.sub, 1
  store i32 %38, ptr %11, align 4, !tbaa !15
  %39 = call noundef i32 @_ZN5sc_dt6sc_maxIiEEKT_RS2_S3_(ptr noundef nonnull align 4 dereferenceable(4) @_ZN5sc_dtL8min_mantE, ptr noundef nonnull align 4 dereferenceable(4) %11)
  store i32 %39, ptr %3, align 4, !tbaa !15
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #4
  %40 = load i32, ptr %2, align 4, !tbaa !15
  %41 = load i32, ptr %12, align 8, !tbaa !5
  %.not41 = icmp eq i32 %40, %41
  br i1 %.not41, label %42, label %44

42:                                               ; preds = %20
  %43 = call noundef i32 @_ZNK5sc_dt8scfx_rep4sizeEv(ptr noundef nonnull align 8 dereferenceable(37) %0)
  %.not42 = icmp eq i32 %39, %43
  br i1 %.not42, label %49, label %._crit_edge51

._crit_edge51:                                    ; preds = %42
  %.pre52 = load i32, ptr %3, align 4, !tbaa !15
  %.pre53 = load i32, ptr %2, align 4, !tbaa !15
  br label %44

44:                                               ; preds = %._crit_edge51, %20
  %45 = phi i32 [ %.pre53, %._crit_edge51 ], [ %40, %20 ]
  %46 = phi i32 [ %.pre52, %._crit_edge51 ], [ %39, %20 ]
  %47 = call noundef ptr @_ZNK5sc_dt8scfx_rep6resizeEii(ptr noundef nonnull align 8 dereferenceable(37) %0, i32 noundef %46, i32 noundef %45)
  %48 = call noundef nonnull align 8 dereferenceable(9) ptr @_ZN5sc_dt13scfx_mant_refaSEPNS_9scfx_mantE(ptr noundef nonnull align 8 dereferenceable(9) %4, ptr noundef %47)
  br label %49

49:                                               ; preds = %44, %42
  %.0 = phi i1 [ false, %44 ], [ true, %42 ]
  %50 = load i32, ptr %2, align 4, !tbaa !15
  %51 = load i32, ptr %14, align 8, !tbaa !5
  %.not43 = icmp eq i32 %50, %51
  br i1 %.not43, label %52, label %.thread56

52:                                               ; preds = %49
  %53 = load i32, ptr %3, align 4, !tbaa !15
  %54 = call noundef i32 @_ZNK5sc_dt8scfx_rep4sizeEv(ptr noundef nonnull align 8 dereferenceable(37) %1)
  %.not44 = icmp eq i32 %53, %54
  br i1 %.not44, label %55, label %._crit_edge54

._crit_edge54:                                    ; preds = %52
  %.pre55 = load i32, ptr %2, align 4, !tbaa !15
  br label %.thread56

55:                                               ; preds = %52
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #4
  br i1 %.0, label %.thread, label %.thread62

.thread56:                                        ; preds = %49, %._crit_edge54
  %56 = phi i32 [ %.pre55, %._crit_edge54 ], [ %50, %49 ]
  %57 = load i32, ptr %3, align 4, !tbaa !15
  %58 = call noundef ptr @_ZNK5sc_dt8scfx_rep6resizeEii(ptr noundef nonnull align 8 dereferenceable(37) %1, i32 noundef %57, i32 noundef %56)
  %59 = call noundef nonnull align 8 dereferenceable(9) ptr @_ZN5sc_dt13scfx_mant_refaSEPNS_9scfx_mantE(ptr noundef nonnull align 8 dereferenceable(9) %5, ptr noundef %58)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #4
  br i1 %.0, label %.thread.thread60, label %63

.thread.thread60:                                 ; preds = %.thread56
  %60 = call noundef nonnull align 8 dereferenceable(9) ptr @_ZN5sc_dt13scfx_mant_refaSERKNS_9scfx_mantE(ptr noundef nonnull align 8 dereferenceable(9) %4, ptr noundef nonnull align 8 dereferenceable(12) %0)
  br label %63

.thread:                                          ; preds = %55
  %61 = call noundef nonnull align 8 dereferenceable(9) ptr @_ZN5sc_dt13scfx_mant_refaSERKNS_9scfx_mantE(ptr noundef nonnull align 8 dereferenceable(9) %4, ptr noundef nonnull align 8 dereferenceable(12) %0)
  br label %.thread62

.thread62:                                        ; preds = %55, %.thread, %.thread.thread
  %62 = call noundef nonnull align 8 dereferenceable(9) ptr @_ZN5sc_dt13scfx_mant_refaSERKNS_9scfx_mantE(ptr noundef nonnull align 8 dereferenceable(9) %5, ptr noundef nonnull align 8 dereferenceable(12) %1)
  br label %63

63:                                               ; preds = %.thread56, %.thread.thread60, %.thread62
  ret void
}

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZNK5sc_dt8scfx_rep6resizeEii(ptr noundef nonnull align 8 dereferenceable(37), i32 noundef, i32 noundef) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(9) ptr @_ZN5sc_dt13scfx_mant_refaSEPNS_9scfx_mantE(ptr noundef nonnull align 8 dereferenceable(9), ptr noundef) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(9) ptr @_ZN5sc_dt13scfx_mant_refaSERKNS_9scfx_mantE(ptr noundef nonnull align 8 dereferenceable(9), ptr noundef nonnull align 8 dereferenceable(12)) local_unnamed_addr #2 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { inlinehint mustprogress 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 = { 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 #3 = { mustprogress 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, !11, i64 16}
!6 = !{!"_ZTSN5sc_dt8scfx_repE", !7, i64 0, !11, i64 16, !11, i64 20, !12, i64 24, !11, i64 28, !11, i64 32, !13, i64 36}
!7 = !{!"_ZTSN5sc_dt9scfx_mantE", !8, i64 0, !11, i64 8}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"int", !9, i64 0}
!12 = !{!"_ZTSN5sc_dt8scfx_rep5stateE", !9, i64 0}
!13 = !{!"bool", !9, i64 0}
!14 = !{!6, !11, i64 32}
!15 = !{!11, !11, i64 0}
!16 = !{!6, !11, i64 28}


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