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

%"union.sc_dt::word_short" = type { i32 }
%"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] }>
%struct.anon.0 = type { i16, i16 }

@_ZN5sc_dtL8min_mantE = external hidden constant i32, align 4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN5sc_dt8scfx_rep8set_zeroEi(ptr noundef nonnull align 8 dereferenceable(37), i32 noundef) #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN5sc_dt9scfx_mant5clearEv(ptr noundef nonnull align 8 dereferenceable(12)) #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN5sc_dt8scfx_rep7find_swEv(ptr noundef nonnull align 8 dereferenceable(37)) #0 align 2

; 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: inlinehint mustprogress uwtable
declare dso_local void @_ZN5sc_dt8scfx_rep9resize_toEii(ptr noundef nonnull align 8 dereferenceable(37), i32 noundef, i32 noundef) #0 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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK5sc_dt8scfx_rep6is_nanEv(ptr noundef nonnull align 8 dereferenceable(37)) #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK5sc_dt8scfx_rep6is_infEv(ptr noundef nonnull align 8 dereferenceable(37)) #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK5sc_dt8scfx_rep7is_zeroEv(ptr noundef nonnull align 8 dereferenceable(37)) #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5sc_dt8multiplyERNS_8scfx_repERKS0_S3_i(ptr noundef nonnull align 8 dereferenceable(37) %0, ptr noundef nonnull align 8 dereferenceable(37) %1, ptr noundef nonnull align 8 dereferenceable(37) %2, i32 noundef %3) #3 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %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
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca %"union.sc_dt::word_short", align 4
  %21 = alloca i16, align 2
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store i32 %3, ptr %8, align 4, !tbaa !9
  %22 = load ptr, ptr %6, align 8, !tbaa !5
  %23 = call noundef zeroext i1 @_ZNK5sc_dt8scfx_rep6is_nanEv(ptr noundef nonnull align 8 dereferenceable(37) %22)
  br i1 %23, label %39, label %24

24:                                               ; preds = %4
  %25 = load ptr, ptr %7, align 8, !tbaa !5
  %26 = call noundef zeroext i1 @_ZNK5sc_dt8scfx_rep6is_nanEv(ptr noundef nonnull align 8 dereferenceable(37) %25)
  br i1 %26, label %39, label %27

27:                                               ; preds = %24
  %28 = load ptr, ptr %6, align 8, !tbaa !5
  %29 = call noundef zeroext i1 @_ZNK5sc_dt8scfx_rep6is_infEv(ptr noundef nonnull align 8 dereferenceable(37) %28)
  br i1 %29, label %30, label %33

30:                                               ; preds = %27
  %31 = load ptr, ptr %7, align 8, !tbaa !5
  %32 = call noundef zeroext i1 @_ZNK5sc_dt8scfx_rep7is_zeroEv(ptr noundef nonnull align 8 dereferenceable(37) %31)
  br i1 %32, label %39, label %33

33:                                               ; preds = %30, %27
  %34 = load ptr, ptr %6, align 8, !tbaa !5
  %35 = call noundef zeroext i1 @_ZNK5sc_dt8scfx_rep7is_zeroEv(ptr noundef nonnull align 8 dereferenceable(37) %34)
  br i1 %35, label %36, label %41

36:                                               ; preds = %33
  %37 = load ptr, ptr %7, align 8, !tbaa !5
  %38 = call noundef zeroext i1 @_ZNK5sc_dt8scfx_rep6is_infEv(ptr noundef nonnull align 8 dereferenceable(37) %37)
  br i1 %38, label %39, label %41

39:                                               ; preds = %36, %30, %24, %4
  %40 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZN5sc_dt8scfx_rep7set_nanEv(ptr noundef nonnull align 8 dereferenceable(37) %40)
  br label %216

41:                                               ; preds = %36, %33
  %42 = load ptr, ptr %6, align 8, !tbaa !5
  %43 = call noundef zeroext i1 @_ZNK5sc_dt8scfx_rep6is_infEv(ptr noundef nonnull align 8 dereferenceable(37) %42)
  br i1 %43, label %47, label %44

44:                                               ; preds = %41
  %45 = load ptr, ptr %7, align 8, !tbaa !5
  %46 = call noundef zeroext i1 @_ZNK5sc_dt8scfx_rep6is_infEv(ptr noundef nonnull align 8 dereferenceable(37) %45)
  br i1 %46, label %47, label %56

47:                                               ; preds = %44, %41
  %48 = load ptr, ptr %5, align 8, !tbaa !5
  %49 = load ptr, ptr %6, align 8, !tbaa !5
  %50 = getelementptr inbounds %"class.sc_dt::scfx_rep", ptr %49, i32 0, i32 2
  %51 = load i32, ptr %50, align 4, !tbaa !11
  %52 = load ptr, ptr %7, align 8, !tbaa !5
  %53 = getelementptr inbounds %"class.sc_dt::scfx_rep", ptr %52, i32 0, i32 2
  %54 = load i32, ptr %53, align 4, !tbaa !11
  %55 = mul nsw i32 %51, %54
  call void @_ZN5sc_dt8scfx_rep7set_infEi(ptr noundef nonnull align 8 dereferenceable(37) %48, i32 noundef %55)
  br label %216

56:                                               ; preds = %44
  %57 = load ptr, ptr %6, align 8, !tbaa !5
  %58 = call noundef zeroext i1 @_ZNK5sc_dt8scfx_rep7is_zeroEv(ptr noundef nonnull align 8 dereferenceable(37) %57)
  br i1 %58, label %62, label %59

59:                                               ; preds = %56
  %60 = load ptr, ptr %7, align 8, !tbaa !5
  %61 = call noundef zeroext i1 @_ZNK5sc_dt8scfx_rep7is_zeroEv(ptr noundef nonnull align 8 dereferenceable(37) %60)
  br i1 %61, label %62, label %71

62:                                               ; preds = %59, %56
  %63 = load ptr, ptr %5, align 8, !tbaa !5
  %64 = load ptr, ptr %6, align 8, !tbaa !5
  %65 = getelementptr inbounds %"class.sc_dt::scfx_rep", ptr %64, i32 0, i32 2
  %66 = load i32, ptr %65, align 4, !tbaa !11
  %67 = load ptr, ptr %7, align 8, !tbaa !5
  %68 = getelementptr inbounds %"class.sc_dt::scfx_rep", ptr %67, i32 0, i32 2
  %69 = load i32, ptr %68, align 4, !tbaa !11
  %70 = mul nsw i32 %66, %69
  call void @_ZN5sc_dt8scfx_rep8set_zeroEi(ptr noundef nonnull align 8 dereferenceable(37) %63, i32 noundef %70)
  br label %216

71:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  %72 = load ptr, ptr %6, align 8, !tbaa !5
  %73 = getelementptr inbounds %"class.sc_dt::scfx_rep", ptr %72, i32 0, i32 4
  %74 = load i32, ptr %73, align 4, !tbaa !16
  %75 = load ptr, ptr %6, align 8, !tbaa !5
  %76 = getelementptr inbounds %"class.sc_dt::scfx_rep", ptr %75, i32 0, i32 5
  %77 = load i32, ptr %76, align 8, !tbaa !17
  %78 = sub nsw i32 %74, %77
  %79 = add nsw i32 %78, 1
  store i32 %79, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  %80 = load ptr, ptr %7, align 8, !tbaa !5
  %81 = getelementptr inbounds %"class.sc_dt::scfx_rep", ptr %80, i32 0, i32 4
  %82 = load i32, ptr %81, align 4, !tbaa !16
  %83 = load ptr, ptr %7, align 8, !tbaa !5
  %84 = getelementptr inbounds %"class.sc_dt::scfx_rep", ptr %83, i32 0, i32 5
  %85 = load i32, ptr %84, align 8, !tbaa !17
  %86 = sub nsw i32 %82, %85
  %87 = add nsw i32 %86, 1
  store i32 %87, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  %88 = load i32, ptr %9, align 4, !tbaa !9
  %89 = load i32, ptr %10, align 4, !tbaa !9
  %90 = add nsw i32 %88, %89
  store i32 %90, ptr %12, align 4, !tbaa !9
  %91 = 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) %12)
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  store i32 %91, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  %92 = load ptr, ptr %6, align 8, !tbaa !5
  %93 = getelementptr inbounds %"class.sc_dt::scfx_rep", ptr %92, i32 0, i32 1
  %94 = load i32, ptr %93, align 8, !tbaa !18
  %95 = load ptr, ptr %6, align 8, !tbaa !5
  %96 = getelementptr inbounds %"class.sc_dt::scfx_rep", ptr %95, i32 0, i32 5
  %97 = load i32, ptr %96, align 8, !tbaa !17
  %98 = sub nsw i32 %94, %97
  %99 = load ptr, ptr %7, 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 !18
  %102 = load ptr, ptr %7, align 8, !tbaa !5
  %103 = getelementptr inbounds %"class.sc_dt::scfx_rep", ptr %102, i32 0, i32 5
  %104 = load i32, ptr %103, align 8, !tbaa !17
  %105 = sub nsw i32 %101, %104
  %106 = add nsw i32 %98, %105
  store i32 %106, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  %107 = load ptr, ptr %6, align 8, !tbaa !5
  %108 = getelementptr inbounds %"class.sc_dt::scfx_rep", ptr %107, i32 0, i32 2
  %109 = load i32, ptr %108, align 4, !tbaa !11
  %110 = load ptr, ptr %7, align 8, !tbaa !5
  %111 = getelementptr inbounds %"class.sc_dt::scfx_rep", ptr %110, i32 0, i32 2
  %112 = load i32, ptr %111, align 4, !tbaa !11
  %113 = mul nsw i32 %109, %112
  store i32 %113, ptr %14, align 4, !tbaa !9
  %114 = load ptr, ptr %5, align 8, !tbaa !5
  %115 = load i32, ptr %11, align 4, !tbaa !9
  call void @_ZN5sc_dt8scfx_rep9resize_toEii(ptr noundef nonnull align 8 dereferenceable(37) %114, i32 noundef %115, i32 noundef 0)
  %116 = load ptr, ptr %5, align 8, !tbaa !5
  %117 = getelementptr inbounds %"class.sc_dt::scfx_rep", ptr %116, i32 0, i32 0
  call void @_ZN5sc_dt9scfx_mant5clearEv(ptr noundef nonnull align 8 dereferenceable(12) %117)
  %118 = load i32, ptr %13, align 4, !tbaa !9
  %119 = load ptr, ptr %5, align 8, !tbaa !5
  %120 = getelementptr inbounds %"class.sc_dt::scfx_rep", ptr %119, i32 0, i32 1
  store i32 %118, ptr %120, align 8, !tbaa !18
  %121 = load i32, ptr %14, align 4, !tbaa !9
  %122 = load ptr, ptr %5, align 8, !tbaa !5
  %123 = getelementptr inbounds %"class.sc_dt::scfx_rep", ptr %122, i32 0, i32 2
  store i32 %121, ptr %123, align 4, !tbaa !11
  %124 = load ptr, ptr %5, align 8, !tbaa !5
  %125 = getelementptr inbounds %"class.sc_dt::scfx_rep", ptr %124, i32 0, i32 3
  store i32 0, ptr %125, align 8, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  %126 = load ptr, ptr %6, align 8, !tbaa !5
  %127 = getelementptr inbounds %"class.sc_dt::scfx_rep", ptr %126, i32 0, i32 0
  %128 = load ptr, ptr %6, align 8, !tbaa !5
  %129 = getelementptr inbounds %"class.sc_dt::scfx_rep", ptr %128, i32 0, i32 5
  %130 = load i32, ptr %129, align 8, !tbaa !17
  %131 = call noundef ptr @_ZNK5sc_dt9scfx_mant9half_addrEi(ptr noundef nonnull align 8 dereferenceable(12) %127, i32 noundef %130)
  store ptr %131, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  %132 = load ptr, ptr %7, align 8, !tbaa !5
  %133 = getelementptr inbounds %"class.sc_dt::scfx_rep", ptr %132, i32 0, i32 0
  %134 = load ptr, ptr %7, align 8, !tbaa !5
  %135 = getelementptr inbounds %"class.sc_dt::scfx_rep", ptr %134, i32 0, i32 5
  %136 = load i32, ptr %135, align 8, !tbaa !17
  %137 = call noundef ptr @_ZNK5sc_dt9scfx_mant9half_addrEi(ptr noundef nonnull align 8 dereferenceable(12) %133, i32 noundef %136)
  store ptr %137, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  %138 = load ptr, ptr %5, align 8, !tbaa !5
  %139 = getelementptr inbounds %"class.sc_dt::scfx_rep", ptr %138, i32 0, i32 0
  %140 = call noundef ptr @_ZNK5sc_dt9scfx_mant9half_addrEi(ptr noundef nonnull align 8 dereferenceable(12) %139, i32 noundef 0)
  store ptr %140, ptr %17, align 8, !tbaa !5
  %141 = load i32, ptr %9, align 4, !tbaa !9
  %142 = shl i32 %141, 1
  store i32 %142, ptr %9, align 4, !tbaa !9
  %143 = load i32, ptr %10, align 4, !tbaa !9
  %144 = shl i32 %143, 1
  store i32 %144, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #4
  store i32 0, ptr %18, align 4, !tbaa !9
  br label %145

145:                                              ; preds = %209, %71
  %146 = load i32, ptr %18, align 4, !tbaa !9
  %147 = mul nsw i32 %146, 1
  %148 = load i32, ptr %9, align 4, !tbaa !9
  %149 = icmp slt i32 %147, %148
  br i1 %149, label %150, label %212

150:                                              ; preds = %145
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #4
  store i32 0, ptr %20, align 4, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 2, ptr %21) #4
  %151 = load ptr, ptr %15, align 8, !tbaa !5
  %152 = load i32, ptr %18, align 4, !tbaa !9
  %153 = sext i32 %152 to i64
  %154 = getelementptr inbounds i16, ptr %151, i64 %153
  %155 = load i16, ptr %154, align 2, !tbaa !21
  store i16 %155, ptr %21, align 2, !tbaa !21
  store i32 0, ptr %19, align 4, !tbaa !9
  br label %156

156:                                              ; preds = %197, %150
  %157 = load i32, ptr %19, align 4, !tbaa !9
  %158 = mul nsw i32 %157, 1
  %159 = load i32, ptr %10, align 4, !tbaa !9
  %160 = icmp slt i32 %158, %159
  br i1 %160, label %161, label %200

161:                                              ; preds = %156
  %162 = load i16, ptr %21, align 2, !tbaa !21
  %163 = zext i16 %162 to i32
  %164 = load ptr, ptr %16, align 8, !tbaa !5
  %165 = load i32, ptr %19, align 4, !tbaa !9
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds i16, ptr %164, i64 %166
  %168 = load i16, ptr %167, align 2, !tbaa !21
  %169 = zext i16 %168 to i32
  %170 = mul nsw i32 %163, %169
  %171 = load i32, ptr %20, align 4, !tbaa !20
  %172 = add i32 %171, %170
  store i32 %172, ptr %20, align 4, !tbaa !20
  %173 = getelementptr inbounds %struct.anon.0, ptr %20, i32 0, i32 1
  %174 = load i16, ptr %173, align 2, !tbaa !20
  %175 = zext i16 %174 to i32
  %176 = getelementptr inbounds %struct.anon.0, ptr %20, i32 0, i32 0
  %177 = load i16, ptr %176, align 4, !tbaa !20
  %178 = zext i16 %177 to i32
  %179 = load ptr, ptr %17, align 8, !tbaa !5
  %180 = load i32, ptr %19, align 4, !tbaa !9
  %181 = sext i32 %180 to i64
  %182 = getelementptr inbounds i16, ptr %179, i64 %181
  %183 = load i16, ptr %182, align 2, !tbaa !21
  %184 = zext i16 %183 to i32
  %185 = add nsw i32 %184, %178
  %186 = trunc i32 %185 to i16
  store i16 %186, ptr %182, align 2, !tbaa !21
  %187 = zext i16 %186 to i32
  %188 = getelementptr inbounds %struct.anon.0, ptr %20, i32 0, i32 0
  %189 = load i16, ptr %188, align 4, !tbaa !20
  %190 = zext i16 %189 to i32
  %191 = icmp slt i32 %187, %190
  %192 = zext i1 %191 to i32
  %193 = add nsw i32 %175, %192
  %194 = trunc i32 %193 to i16
  %195 = getelementptr inbounds %struct.anon.0, ptr %20, i32 0, i32 0
  store i16 %194, ptr %195, align 4, !tbaa !20
  %196 = getelementptr inbounds %struct.anon.0, ptr %20, i32 0, i32 1
  store i16 0, ptr %196, align 2, !tbaa !20
  br label %197

197:                                              ; preds = %161
  %198 = load i32, ptr %19, align 4, !tbaa !9
  %199 = add nsw i32 %198, 1
  store i32 %199, ptr %19, align 4, !tbaa !9
  br label %156, !llvm.loop !23

200:                                              ; preds = %156
  %201 = getelementptr inbounds %struct.anon.0, ptr %20, i32 0, i32 0
  %202 = load i16, ptr %201, align 4, !tbaa !20
  %203 = load ptr, ptr %17, align 8, !tbaa !5
  %204 = load i32, ptr %19, align 4, !tbaa !9
  %205 = sext i32 %204 to i64
  %206 = getelementptr inbounds i16, ptr %203, i64 %205
  store i16 %202, ptr %206, align 2, !tbaa !21
  %207 = load ptr, ptr %17, align 8, !tbaa !5
  %208 = getelementptr inbounds i16, ptr %207, i64 1
  store ptr %208, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 2, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #4
  br label %209

209:                                              ; preds = %200
  %210 = load i32, ptr %18, align 4, !tbaa !9
  %211 = add nsw i32 %210, 1
  store i32 %211, ptr %18, align 4, !tbaa !9
  br label %145, !llvm.loop !25

212:                                              ; preds = %145
  %213 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZN5sc_dt8scfx_rep7find_swEv(ptr noundef nonnull align 8 dereferenceable(37) %213)
  %214 = load ptr, ptr %5, align 8, !tbaa !5
  %215 = load i32, ptr %8, align 4, !tbaa !9
  call void @_ZN5sc_dt8scfx_rep5roundEi(ptr noundef nonnull align 8 dereferenceable(37) %214, i32 noundef %215)
  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 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  br label %216

216:                                              ; preds = %212, %62, %47, %39
  ret void
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN5sc_dt8scfx_rep7set_nanEv(ptr noundef nonnull align 8 dereferenceable(37)) #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN5sc_dt8scfx_rep7set_infEi(ptr noundef nonnull align 8 dereferenceable(37), i32 noundef) #0 align 2

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

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

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


; 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: inlinehint mustprogress uwtable
declare dso_local void @_ZN5sc_dt8scfx_rep8set_zeroEi(ptr noundef nonnull align 8 dereferenceable(37), i32 noundef) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN5sc_dt9scfx_mant5clearEv(ptr noundef nonnull align 8 dereferenceable(12)) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN5sc_dt8scfx_rep7find_swEv(ptr noundef nonnull align 8 dereferenceable(37)) local_unnamed_addr #0 align 2

; 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 nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN5sc_dt8scfx_rep9resize_toEii(ptr noundef nonnull align 8 dereferenceable(37), i32 noundef, i32 noundef) local_unnamed_addr #0 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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK5sc_dt8scfx_rep6is_nanEv(ptr noundef nonnull align 8 dereferenceable(37)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK5sc_dt8scfx_rep6is_infEv(ptr noundef nonnull align 8 dereferenceable(37)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK5sc_dt8scfx_rep7is_zeroEv(ptr noundef nonnull align 8 dereferenceable(37)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5sc_dt8multiplyERNS_8scfx_repERKS0_S3_i(ptr noundef nonnull align 8 dereferenceable(37) %0, ptr noundef nonnull align 8 dereferenceable(37) %1, ptr noundef nonnull align 8 dereferenceable(37) %2, i32 noundef %3) local_unnamed_addr #3 {
  %5 = alloca i32, align 4
  %6 = tail call noundef zeroext i1 @_ZNK5sc_dt8scfx_rep6is_nanEv(ptr noundef nonnull align 8 dereferenceable(37) %1)
  br i1 %6, label %17, label %7

7:                                                ; preds = %4
  %8 = tail call noundef zeroext i1 @_ZNK5sc_dt8scfx_rep6is_nanEv(ptr noundef nonnull align 8 dereferenceable(37) %2)
  br i1 %8, label %17, label %9

9:                                                ; preds = %7
  %10 = tail call noundef zeroext i1 @_ZNK5sc_dt8scfx_rep6is_infEv(ptr noundef nonnull align 8 dereferenceable(37) %1)
  br i1 %10, label %11, label %13

11:                                               ; preds = %9
  %12 = tail call noundef zeroext i1 @_ZNK5sc_dt8scfx_rep7is_zeroEv(ptr noundef nonnull align 8 dereferenceable(37) %2)
  br i1 %12, label %17, label %13

13:                                               ; preds = %11, %9
  %14 = tail call noundef zeroext i1 @_ZNK5sc_dt8scfx_rep7is_zeroEv(ptr noundef nonnull align 8 dereferenceable(37) %1)
  br i1 %14, label %15, label %18

15:                                               ; preds = %13
  %16 = tail call noundef zeroext i1 @_ZNK5sc_dt8scfx_rep6is_infEv(ptr noundef nonnull align 8 dereferenceable(37) %2)
  br i1 %16, label %17, label %18

17:                                               ; preds = %15, %11, %7, %4
  tail call void @_ZN5sc_dt8scfx_rep7set_nanEv(ptr noundef nonnull align 8 dereferenceable(37) %0)
  br label %113

18:                                               ; preds = %15, %13
  %19 = tail call noundef zeroext i1 @_ZNK5sc_dt8scfx_rep6is_infEv(ptr noundef nonnull align 8 dereferenceable(37) %1)
  br i1 %19, label %22, label %20

20:                                               ; preds = %18
  %21 = tail call noundef zeroext i1 @_ZNK5sc_dt8scfx_rep6is_infEv(ptr noundef nonnull align 8 dereferenceable(37) %2)
  br i1 %21, label %22, label %28

22:                                               ; preds = %20, %18
  %23 = getelementptr inbounds i8, ptr %1, i64 20
  %24 = load i32, ptr %23, align 4, !tbaa !5
  %25 = getelementptr inbounds i8, ptr %2, i64 20
  %26 = load i32, ptr %25, align 4, !tbaa !5
  %27 = mul nsw i32 %26, %24
  tail call void @_ZN5sc_dt8scfx_rep7set_infEi(ptr noundef nonnull align 8 dereferenceable(37) %0, i32 noundef %27)
  br label %113

28:                                               ; preds = %20
  %29 = tail call noundef zeroext i1 @_ZNK5sc_dt8scfx_rep7is_zeroEv(ptr noundef nonnull align 8 dereferenceable(37) %1)
  br i1 %29, label %32, label %30

30:                                               ; preds = %28
  %31 = tail call noundef zeroext i1 @_ZNK5sc_dt8scfx_rep7is_zeroEv(ptr noundef nonnull align 8 dereferenceable(37) %2)
  br i1 %31, label %32, label %38

32:                                               ; preds = %30, %28
  %33 = getelementptr inbounds i8, ptr %1, i64 20
  %34 = load i32, ptr %33, align 4, !tbaa !5
  %35 = getelementptr inbounds i8, ptr %2, i64 20
  %36 = load i32, ptr %35, align 4, !tbaa !5
  %37 = mul nsw i32 %36, %34
  tail call void @_ZN5sc_dt8scfx_rep8set_zeroEi(ptr noundef nonnull align 8 dereferenceable(37) %0, i32 noundef %37)
  br label %113

38:                                               ; preds = %30
  %39 = getelementptr inbounds i8, ptr %1, i64 28
  %40 = load i32, ptr %39, align 4, !tbaa !14
  %41 = getelementptr inbounds i8, ptr %1, i64 32
  %42 = load i32, ptr %41, align 8, !tbaa !15
  %43 = sub nsw i32 %40, %42
  %44 = add nsw i32 %43, 1
  %45 = getelementptr inbounds i8, ptr %2, i64 28
  %46 = load i32, ptr %45, align 4, !tbaa !14
  %47 = getelementptr inbounds i8, ptr %2, i64 32
  %48 = load i32, ptr %47, align 8, !tbaa !15
  %49 = sub nsw i32 %46, %48
  %50 = add nsw i32 %49, 1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #5
  %51 = add nsw i32 %50, %44
  store i32 %51, ptr %5, align 4, !tbaa !16
  %52 = 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) %5)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  %53 = getelementptr inbounds i8, ptr %1, i64 16
  %54 = load i32, ptr %53, align 8, !tbaa !17
  %55 = load i32, ptr %41, align 8, !tbaa !15
  %56 = getelementptr inbounds i8, ptr %2, i64 16
  %57 = load i32, ptr %56, align 8, !tbaa !17
  %58 = load i32, ptr %47, align 8, !tbaa !15
  %59 = add i32 %54, %57
  %60 = add i32 %55, %58
  %61 = sub i32 %59, %60
  %62 = getelementptr inbounds i8, ptr %1, i64 20
  %63 = load i32, ptr %62, align 4, !tbaa !5
  %64 = getelementptr inbounds i8, ptr %2, i64 20
  %65 = load i32, ptr %64, align 4, !tbaa !5
  %66 = mul nsw i32 %65, %63
  call void @_ZN5sc_dt8scfx_rep9resize_toEii(ptr noundef nonnull align 8 dereferenceable(37) %0, i32 noundef %52, i32 noundef 0)
  call void @_ZN5sc_dt9scfx_mant5clearEv(ptr noundef nonnull align 8 dereferenceable(12) %0)
  %67 = getelementptr inbounds i8, ptr %0, i64 16
  store i32 %61, ptr %67, align 8, !tbaa !17
  %68 = getelementptr inbounds i8, ptr %0, i64 20
  store i32 %66, ptr %68, align 4, !tbaa !5
  %69 = getelementptr inbounds i8, ptr %0, i64 24
  store i32 0, ptr %69, align 8, !tbaa !18
  %70 = load i32, ptr %41, align 8, !tbaa !15
  %71 = call noundef ptr @_ZNK5sc_dt9scfx_mant9half_addrEi(ptr noundef nonnull align 8 dereferenceable(12) %1, i32 noundef %70)
  %72 = load i32, ptr %47, align 8, !tbaa !15
  %73 = call noundef ptr @_ZNK5sc_dt9scfx_mant9half_addrEi(ptr noundef nonnull align 8 dereferenceable(12) %2, i32 noundef %72)
  %74 = call noundef ptr @_ZNK5sc_dt9scfx_mant9half_addrEi(ptr noundef nonnull align 8 dereferenceable(12) %0, i32 noundef 0)
  %75 = shl i32 %44, 1
  %76 = icmp sgt i32 %75, 0
  br i1 %76, label %.lr.ph74, label %._crit_edge75

.lr.ph74:                                         ; preds = %38
  %77 = shl i32 %50, 1
  %78 = icmp sgt i32 %77, 0
  br i1 %78, label %.lr.ph.us.preheader, label %.lr.ph74.split.preheader

.lr.ph74.split.preheader:                         ; preds = %.lr.ph74
  %79 = sub i32 %40, %42
  %80 = shl i32 %79, 1
  %81 = zext i32 %80 to i64
  %82 = shl nuw nsw i64 %81, 1
  %83 = add nuw nsw i64 %82, 4
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 2 dereferenceable(1) %74, i8 0, i64 %83, i1 false), !tbaa !19
  br label %._crit_edge75

.lr.ph.us.preheader:                              ; preds = %.lr.ph74
  %84 = shl i32 %46, 1
  %85 = add i32 %84, 2
  %86 = shl i32 %48, 1
  %87 = sub i32 %85, %86
  %88 = shl i32 %40, 1
  %89 = add i32 %88, 2
  %90 = shl i32 %42, 1
  %91 = sub i32 %89, %90
  %wide.trip.count82 = zext i32 %91 to i64
  %wide.trip.count = zext i32 %87 to i64
  br label %.lr.ph.us

.lr.ph.us:                                        ; preds = %.lr.ph.us.preheader, %._crit_edge.us
  %indvars.iv79 = phi i64 [ 0, %.lr.ph.us.preheader ], [ %indvars.iv.next80, %._crit_edge.us ]
  %.06671.us = phi ptr [ %74, %.lr.ph.us.preheader ], [ %112, %._crit_edge.us ]
  %92 = getelementptr inbounds i16, ptr %71, i64 %indvars.iv79
  %93 = load i16, ptr %92, align 2, !tbaa !19
  %94 = zext i16 %93 to i32
  br label %95

95:                                               ; preds = %.lr.ph.us, %95
  %indvars.iv = phi i64 [ 0, %.lr.ph.us ], [ %indvars.iv.next, %95 ]
  %.sroa.0.069.us = phi i32 [ 0, %.lr.ph.us ], [ %109, %95 ]
  %96 = getelementptr inbounds i16, ptr %73, i64 %indvars.iv
  %97 = load i16, ptr %96, align 2, !tbaa !19
  %98 = zext i16 %97 to i32
  %99 = mul nuw nsw i32 %98, %94
  %.sroa.0.0.insert.ext.us = and i32 %.sroa.0.069.us, 65535
  %100 = add nuw i32 %99, %.sroa.0.0.insert.ext.us
  %.sroa.9.0.extract.shift.us = lshr i32 %100, 16
  %101 = and i32 %100, 65535
  %102 = getelementptr inbounds i16, ptr %.06671.us, i64 %indvars.iv
  %103 = load i16, ptr %102, align 2, !tbaa !19
  %104 = trunc i32 %100 to i16
  %105 = add i16 %103, %104
  store i16 %105, ptr %102, align 2, !tbaa !19
  %106 = zext i16 %105 to i32
  %107 = icmp ugt i32 %101, %106
  %108 = zext i1 %107 to i32
  %109 = add nuw nsw i32 %.sroa.9.0.extract.shift.us, %108
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge.us, label %95, !llvm.loop !21

._crit_edge.us:                                   ; preds = %95
  %110 = trunc nuw i32 %109 to i16
  %111 = getelementptr inbounds i16, ptr %.06671.us, i64 %wide.trip.count
  store i16 %110, ptr %111, align 2, !tbaa !19
  %112 = getelementptr inbounds i8, ptr %.06671.us, i64 2
  %indvars.iv.next80 = add nuw nsw i64 %indvars.iv79, 1
  %exitcond83.not = icmp eq i64 %indvars.iv.next80, %wide.trip.count82
  br i1 %exitcond83.not, label %._crit_edge75, label %.lr.ph.us, !llvm.loop !23

._crit_edge75:                                    ; preds = %._crit_edge.us, %.lr.ph74.split.preheader, %38
  call void @_ZN5sc_dt8scfx_rep7find_swEv(ptr noundef nonnull align 8 dereferenceable(37) %0)
  call void @_ZN5sc_dt8scfx_rep5roundEi(ptr noundef nonnull align 8 dereferenceable(37) %0, i32 noundef %3)
  br label %113

113:                                              ; preds = %._crit_edge75, %32, %22, %17
  ret void
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN5sc_dt8scfx_rep7set_nanEv(ptr noundef nonnull align 8 dereferenceable(37)) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN5sc_dt8scfx_rep7set_infEi(ptr noundef nonnull align 8 dereferenceable(37), i32 noundef) local_unnamed_addr #0 align 2

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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, !11, i64 20}
!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 28}
!15 = !{!6, !11, i64 32}
!16 = !{!11, !11, i64 0}
!17 = !{!6, !11, i64 16}
!18 = !{!6, !12, i64 24}
!19 = !{!20, !20, i64 0}
!20 = !{!"short", !9, i64 0}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = distinct !{!23, !22}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopIdiomRecognizePass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass