; LLVM IR from jingweizhanghuai/Morn :: src/deep_learning (morn_tensor_noise)

; 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.TensorRegister = type { [32 x i8], ptr, ptr, ptr }
%struct.MLayer = type { [32 x i8], i32, ptr, ptr, ptr, i32 }
%struct.TensorDropoutPara = type { ptr, i32, float }
%struct.MTensor = type { i32, i32, i32, i32, ptr, i32 }

@.str.1 = external hidden unnamed_addr constant [93 x i8], align 1
@morn_tensor_register = external global [256 x %struct.TensorRegister], align 16
@morn_network_flag = external global i32, align 4
@__FUNCTION__.mTensorDropoutForward = external hidden unnamed_addr constant [22 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [19 x i8], align 1

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

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

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

; Function Attrs: nounwind willreturn memory(read)
declare i32 @strcmp(ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local void @TensorDropoutSet(ptr noundef) #3

; Function Attrs: nounwind uwtable
define dso_local void @mTensorDropoutForward(ptr noundef %0) #3 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %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 float, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  br label %18

18:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  %19 = load ptr, ptr %2, align 8, !tbaa !5
  %20 = icmp eq ptr %19, null
  br i1 %20, label %25, label %21

21:                                               ; preds = %18
  %22 = load ptr, ptr %2, align 8, !tbaa !5
  %23 = ptrtoint ptr %22 to i64
  %24 = icmp eq i64 %23, -1
  br label %25

25:                                               ; preds = %21, %18
  %26 = phi i1 [ true, %18 ], [ %24, %21 ]
  %27 = zext i1 %26 to i32
  store i32 %27, ptr %3, align 4, !tbaa !9
  %28 = load i32, ptr %3, align 4, !tbaa !9
  %29 = icmp ne i32 %28, 0
  br i1 %29, label %30, label %32

30:                                               ; preds = %25
  %31 = load i32, ptr %3, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %31, i32 noundef -1, ptr noundef @.str.1, i32 noundef 49, ptr noundef @__FUNCTION__.mTensorDropoutForward, ptr noundef @.str.6)
  br label %32

32:                                               ; preds = %30, %25
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  br label %33

33:                                               ; preds = %32
  br label %34

34:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  %35 = load ptr, ptr %2, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.MLayer, ptr %35, i32 0, i32 1
  %37 = load i32, ptr %36, align 8, !tbaa !11
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds [256 x %struct.TensorRegister], ptr @morn_tensor_register, i64 0, i64 %38
  %40 = getelementptr inbounds %struct.TensorRegister, ptr %39, i32 0, i32 0
  %41 = getelementptr inbounds [32 x i8], ptr %40, i64 0, i64 0
  %42 = call i32 @strcmp(ptr noundef @.str.7, ptr noundef %41) #5
  store i32 %42, ptr %4, align 4, !tbaa !9
  %43 = load i32, ptr %4, align 4, !tbaa !9
  %44 = icmp ne i32 %43, 0
  br i1 %44, label %45, label %47

45:                                               ; preds = %34
  %46 = load i32, ptr %4, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %46, i32 noundef -1, ptr noundef @.str.1, i32 noundef 50, ptr noundef @__FUNCTION__.mTensorDropoutForward, ptr noundef @.str.8)
  br label %47

47:                                               ; preds = %45, %34
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  br label %48

48:                                               ; preds = %47
  %49 = load ptr, ptr %2, align 8, !tbaa !5
  call void @TensorDropoutSet(ptr noundef %49)
  %50 = load ptr, ptr %2, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.MLayer, ptr %50, i32 0, i32 5
  store i32 0, ptr %51, align 8, !tbaa !13
  %52 = load i32, ptr @morn_network_flag, align 4, !tbaa !9
  %53 = icmp eq i32 %52, 0
  br i1 %53, label %54, label %55

54:                                               ; preds = %48
  br label %183

55:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  %56 = load ptr, ptr %2, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.MLayer, ptr %56, i32 0, i32 4
  %58 = load ptr, ptr %57, align 8, !tbaa !14
  store ptr %58, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  %59 = load ptr, ptr %5, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.TensorDropoutPara, ptr %59, i32 0, i32 0
  %61 = load ptr, ptr %60, align 8, !tbaa !15
  %62 = getelementptr inbounds %struct.MLayer, ptr %61, i32 0, i32 2
  %63 = load ptr, ptr %62, align 8, !tbaa !18
  store ptr %63, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %64 = load ptr, ptr %2, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.MLayer, ptr %64, i32 0, i32 2
  %66 = load ptr, ptr %65, align 8, !tbaa !18
  store ptr %66, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  %67 = load ptr, ptr %6, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.MTensor, ptr %67, i32 0, i32 1
  %69 = load i32, ptr %68, align 4, !tbaa !19
  %70 = load ptr, ptr %6, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.MTensor, ptr %70, i32 0, i32 2
  %72 = load i32, ptr %71, align 8, !tbaa !21
  %73 = mul nsw i32 %69, %72
  %74 = load ptr, ptr %6, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.MTensor, ptr %74, i32 0, i32 3
  %76 = load i32, ptr %75, align 4, !tbaa !22
  %77 = mul nsw i32 %73, %76
  store i32 %77, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  %78 = load ptr, ptr %6, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.MTensor, ptr %78, i32 0, i32 0
  %80 = load i32, ptr %79, align 8, !tbaa !23
  %81 = load i32, ptr %8, align 4, !tbaa !9
  %82 = mul nsw i32 %80, %81
  %83 = sitofp i32 %82 to float
  %84 = load ptr, ptr %5, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.TensorDropoutPara, ptr %84, i32 0, i32 2
  %86 = load float, ptr %85, align 4, !tbaa !24
  %87 = fmul float %83, %86
  %88 = fpext float %87 to double
  %89 = fadd double %88, 5.000000e-01
  %90 = fptosi double %89 to i32
  store i32 %90, ptr %9, align 4, !tbaa !9
  %91 = load i32, ptr %9, align 4, !tbaa !9
  %92 = sitofp i32 %91 to float
  %93 = load ptr, ptr %6, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.MTensor, ptr %93, i32 0, i32 0
  %95 = load i32, ptr %94, align 8, !tbaa !23
  %96 = load i32, ptr %8, align 4, !tbaa !9
  %97 = mul nsw i32 %95, %96
  %98 = sitofp i32 %97 to float
  %99 = fdiv float %92, %98
  %100 = load ptr, ptr %5, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.TensorDropoutPara, ptr %100, i32 0, i32 2
  store float %99, ptr %101, align 4, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  %102 = load ptr, ptr %5, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.TensorDropoutPara, ptr %102, i32 0, i32 2
  %104 = load float, ptr %103, align 4, !tbaa !24
  %105 = fdiv float 1.000000e+00, %104
  store float %105, ptr %10, align 4, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %106

106:                                              ; preds = %147, %55
  %107 = load i32, ptr %11, align 4, !tbaa !9
  %108 = load ptr, ptr %6, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.MTensor, ptr %108, i32 0, i32 0
  %110 = load i32, ptr %109, align 8, !tbaa !23
  %111 = icmp slt i32 %107, %110
  br i1 %111, label %113, label %112

112:                                              ; preds = %106
  store i32 6, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  br label %150

113:                                              ; preds = %106
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %114

114:                                              ; preds = %143, %113
  %115 = load i32, ptr %13, align 4, !tbaa !9
  %116 = load i32, ptr %8, align 4, !tbaa !9
  %117 = icmp slt i32 %115, %116
  br i1 %117, label %119, label %118

118:                                              ; preds = %114
  store i32 9, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  br label %146

119:                                              ; preds = %114
  %120 = load ptr, ptr %6, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.MTensor, ptr %120, i32 0, i32 4
  %122 = load ptr, ptr %121, align 8, !tbaa !26
  %123 = load i32, ptr %11, align 4, !tbaa !9
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds ptr, ptr %122, i64 %124
  %126 = load ptr, ptr %125, align 8, !tbaa !5
  %127 = load i32, ptr %13, align 4, !tbaa !9
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds float, ptr %126, i64 %128
  %130 = load float, ptr %129, align 4, !tbaa !25
  %131 = load float, ptr %10, align 4, !tbaa !25
  %132 = fmul float %130, %131
  %133 = load ptr, ptr %7, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.MTensor, ptr %133, i32 0, i32 4
  %135 = load ptr, ptr %134, align 8, !tbaa !26
  %136 = load i32, ptr %11, align 4, !tbaa !9
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds ptr, ptr %135, i64 %137
  %139 = load ptr, ptr %138, align 8, !tbaa !5
  %140 = load i32, ptr %13, align 4, !tbaa !9
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds float, ptr %139, i64 %141
  store float %132, ptr %142, align 4, !tbaa !25
  br label %143

143:                                              ; preds = %119
  %144 = load i32, ptr %13, align 4, !tbaa !9
  %145 = add nsw i32 %144, 1
  store i32 %145, ptr %13, align 4, !tbaa !9
  br label %114, !llvm.loop !27

146:                                              ; preds = %118
  br label %147

147:                                              ; preds = %146
  %148 = load i32, ptr %11, align 4, !tbaa !9
  %149 = add nsw i32 %148, 1
  store i32 %149, ptr %11, align 4, !tbaa !9
  br label %106, !llvm.loop !29

150:                                              ; preds = %112
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %151

151:                                              ; preds = %179, %150
  %152 = load i32, ptr %14, align 4, !tbaa !9
  %153 = load i32, ptr %9, align 4, !tbaa !9
  %154 = icmp slt i32 %152, %153
  br i1 %154, label %156, label %155

155:                                              ; preds = %151
  store i32 12, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  br label %182

156:                                              ; preds = %151
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  %157 = load i32, ptr %8, align 4, !tbaa !9
  %158 = load ptr, ptr %6, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct.MTensor, ptr %158, i32 0, i32 0
  %160 = load i32, ptr %159, align 8, !tbaa !23
  %161 = mul nsw i32 %157, %160
  %162 = call i32 @m_Rand(i32 noundef 0, i32 noundef %161)
  store i32 %162, ptr %15, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  %163 = load i32, ptr %15, align 4, !tbaa !9
  %164 = load i32, ptr %8, align 4, !tbaa !9
  %165 = sdiv i32 %163, %164
  store i32 %165, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  %166 = load i32, ptr %15, align 4, !tbaa !9
  %167 = load i32, ptr %8, align 4, !tbaa !9
  %168 = srem i32 %166, %167
  store i32 %168, ptr %17, align 4, !tbaa !9
  %169 = load ptr, ptr %7, align 8, !tbaa !5
  %170 = getelementptr inbounds %struct.MTensor, ptr %169, i32 0, i32 4
  %171 = load ptr, ptr %170, align 8, !tbaa !26
  %172 = load i32, ptr %16, align 4, !tbaa !9
  %173 = sext i32 %172 to i64
  %174 = getelementptr inbounds ptr, ptr %171, i64 %173
  %175 = load ptr, ptr %174, align 8, !tbaa !5
  %176 = load i32, ptr %17, align 4, !tbaa !9
  %177 = sext i32 %176 to i64
  %178 = getelementptr inbounds float, ptr %175, i64 %177
  store float 0.000000e+00, ptr %178, align 4, !tbaa !25
  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 %179

179:                                              ; preds = %156
  %180 = load i32, ptr %14, align 4, !tbaa !9
  %181 = add nsw i32 %180, 1
  store i32 %181, ptr %14, align 4, !tbaa !9
  br label %151, !llvm.loop !30

182:                                              ; preds = %155
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  br label %183

183:                                              ; preds = %182, %54
  ret void
}

declare i32 @m_Rand(i32 noundef, i32 noundef) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 willreturn memory(read) "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 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 }
attributes #5 = { nounwind willreturn memory(read) }

!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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 32}
!12 = !{!"MLayer", !7, i64 0, !10, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !10, i64 64}
!13 = !{!12, !10, i64 64}
!14 = !{!12, !6, i64 56}
!15 = !{!16, !6, i64 0}
!16 = !{!"TensorDropoutPara", !6, i64 0, !10, i64 8, !17, i64 12}
!17 = !{!"float", !7, i64 0}
!18 = !{!12, !6, i64 40}
!19 = !{!20, !10, i64 4}
!20 = !{!"MTensor", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !6, i64 16, !10, i64 24}
!21 = !{!20, !10, i64 8}
!22 = !{!20, !10, i64 12}
!23 = !{!20, !10, i64 0}
!24 = !{!16, !17, i64 12}
!25 = !{!17, !17, i64 0}
!26 = !{!20, !6, i64 16}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}
!29 = distinct !{!29, !28}
!30 = distinct !{!30, !28}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.TensorRegister = type { [32 x i8], ptr, ptr, ptr }

@.str.1 = external hidden unnamed_addr constant [93 x i8], align 1
@morn_tensor_register = external global [256 x %struct.TensorRegister], align 16
@morn_network_flag = external local_unnamed_addr global i32, align 4
@__FUNCTION__.mTensorDropoutForward = external hidden unnamed_addr constant [22 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [19 x i8], align 1

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #1

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

; Function Attrs: nounwind uwtable
define dso_local void @mTensorDropoutForward(ptr noundef %0) local_unnamed_addr #2 {
  %magicptr = ptrtoint ptr %0 to i64
  switch i64 %magicptr, label %7 [
    i64 -1, label %2
    i64 0, label %2
  ]

2:                                                ; preds = %1, %1
  %3 = icmp eq ptr %0, null
  %4 = icmp eq ptr %0, inttoptr (i64 -1 to ptr)
  %5 = or i1 %3, %4
  %6 = zext i1 %5 to i32
  tail call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %6, i32 noundef -1, ptr noundef nonnull @.str.1, i32 noundef 49, ptr noundef nonnull @__FUNCTION__.mTensorDropoutForward, ptr noundef nonnull @.str.6) #3
  br label %7

7:                                                ; preds = %1, %2
  %8 = getelementptr inbounds i8, ptr %0, i64 32
  %9 = load i32, ptr %8, align 8, !tbaa !5
  %10 = sext i32 %9 to i64
  %11 = getelementptr inbounds [256 x %struct.TensorRegister], ptr @morn_tensor_register, i64 0, i64 %10
  %12 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) @.str.7, ptr noundef nonnull dereferenceable(1) %11) #4
  %.not = icmp eq i32 %12, 0
  br i1 %.not, label %14, label %13

13:                                               ; preds = %7
  tail call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %12, i32 noundef -1, ptr noundef nonnull @.str.1, i32 noundef 50, ptr noundef nonnull @__FUNCTION__.mTensorDropoutForward, ptr noundef nonnull @.str.8) #3
  br label %14

14:                                               ; preds = %13, %7
  tail call void @TensorDropoutSet(ptr noundef nonnull %0)
  %15 = getelementptr inbounds i8, ptr %0, i64 64
  store i32 0, ptr %15, align 8, !tbaa !11
  %16 = load i32, ptr @morn_network_flag, align 4, !tbaa !12
  %17 = icmp eq i32 %16, 0
  br i1 %17, label %.loopexit, label %18

18:                                               ; preds = %14
  %19 = getelementptr inbounds i8, ptr %0, i64 56
  %20 = load ptr, ptr %19, align 8, !tbaa !13
  %21 = load ptr, ptr %20, align 8, !tbaa !14
  %22 = getelementptr inbounds i8, ptr %21, i64 40
  %23 = load ptr, ptr %22, align 8, !tbaa !17
  %24 = getelementptr inbounds i8, ptr %0, i64 40
  %25 = load ptr, ptr %24, align 8, !tbaa !17
  %26 = getelementptr inbounds i8, ptr %23, i64 4
  %27 = load i32, ptr %26, align 4, !tbaa !18
  %28 = getelementptr inbounds i8, ptr %23, i64 8
  %29 = load i32, ptr %28, align 8, !tbaa !20
  %30 = mul i32 %29, %27
  %31 = getelementptr inbounds i8, ptr %23, i64 12
  %32 = load i32, ptr %31, align 4, !tbaa !21
  %33 = mul i32 %30, %32
  %34 = load i32, ptr %23, align 8, !tbaa !22
  %35 = mul nsw i32 %34, %33
  %36 = sitofp i32 %35 to float
  %37 = getelementptr inbounds i8, ptr %20, i64 12
  %38 = load float, ptr %37, align 4, !tbaa !23
  %39 = fmul float %38, %36
  %40 = fpext float %39 to double
  %41 = fadd double %40, 5.000000e-01
  %42 = fptosi double %41 to i32
  %43 = sitofp i32 %42 to float
  %44 = fdiv float %43, %36
  store float %44, ptr %37, align 4, !tbaa !23
  %45 = fdiv float 1.000000e+00, %44
  %46 = icmp sgt i32 %34, 0
  %47 = icmp sgt i32 %33, 0
  %or.cond = select i1 %46, i1 %47, i1 false
  br i1 %or.cond, label %.preheader50.lr.ph.split.us, label %.preheader

.preheader50.lr.ph.split.us:                      ; preds = %18
  %48 = getelementptr inbounds i8, ptr %25, i64 16
  %49 = getelementptr inbounds i8, ptr %23, i64 16
  %50 = load ptr, ptr %49, align 8, !tbaa !24
  %51 = load ptr, ptr %48, align 8, !tbaa !24
  %wide.trip.count59 = zext nneg i32 %34 to i64
  %wide.trip.count = zext nneg i32 %33 to i64
  %min.iters.check = icmp ult i32 %33, 8
  %n.vec = and i64 %wide.trip.count, 2147483640
  %broadcast.splatinsert = insertelement <4 x float> poison, float %45, i64 0
  %broadcast.splat = shufflevector <4 x float> %broadcast.splatinsert, <4 x float> poison, <4 x i32> zeroinitializer
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  %xtraiter = and i64 %wide.trip.count, 3
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %.preheader50.us

.preheader50.us:                                  ; preds = %._crit_edge.us, %.preheader50.lr.ph.split.us
  %indvars.iv56 = phi i64 [ %indvars.iv.next57, %._crit_edge.us ], [ 0, %.preheader50.lr.ph.split.us ]
  %52 = getelementptr inbounds ptr, ptr %50, i64 %indvars.iv56
  %53 = load ptr, ptr %52, align 8, !tbaa !25
  %54 = getelementptr inbounds ptr, ptr %51, i64 %indvars.iv56
  %55 = load ptr, ptr %54, align 8, !tbaa !25
  %56 = ptrtoint ptr %55 to i64
  %57 = ptrtoint ptr %53 to i64
  %58 = sub i64 %56, %57
  %diff.check = icmp ult i64 %58, 32
  %or.cond65 = select i1 %min.iters.check, i1 true, i1 %diff.check
  br i1 %or.cond65, label %scalar.ph.preheader, label %vector.body

vector.body:                                      ; preds = %.preheader50.us, %vector.body
  %index = phi i64 [ %index.next, %vector.body ], [ 0, %.preheader50.us ]
  %59 = getelementptr inbounds float, ptr %53, i64 %index
  %60 = getelementptr inbounds i8, ptr %59, i64 16
  %wide.load = load <4 x float>, ptr %59, align 4, !tbaa !26
  %wide.load62 = load <4 x float>, ptr %60, align 4, !tbaa !26
  %61 = fmul <4 x float> %broadcast.splat, %wide.load
  %62 = fmul <4 x float> %broadcast.splat, %wide.load62
  %63 = getelementptr inbounds float, ptr %55, i64 %index
  %64 = getelementptr inbounds i8, ptr %63, i64 16
  store <4 x float> %61, ptr %63, align 4, !tbaa !26
  store <4 x float> %62, ptr %64, align 4, !tbaa !26
  %index.next = add nuw i64 %index, 8
  %65 = icmp eq i64 %index.next, %n.vec
  br i1 %65, label %middle.block, label %vector.body, !llvm.loop !27

middle.block:                                     ; preds = %vector.body
  br i1 %cmp.n, label %._crit_edge.us, label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %middle.block, %.preheader50.us
  %indvars.iv.ph = phi i64 [ 0, %.preheader50.us ], [ %n.vec, %middle.block ]
  br i1 %lcmp.mod.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol

scalar.ph.prol:                                   ; preds = %scalar.ph.preheader, %scalar.ph.prol
  %indvars.iv.prol = phi i64 [ %indvars.iv.next.prol, %scalar.ph.prol ], [ %indvars.iv.ph, %scalar.ph.preheader ]
  %prol.iter = phi i64 [ %prol.iter.next, %scalar.ph.prol ], [ 0, %scalar.ph.preheader ]
  %66 = getelementptr inbounds float, ptr %53, i64 %indvars.iv.prol
  %67 = load float, ptr %66, align 4, !tbaa !26
  %68 = fmul float %45, %67
  %69 = getelementptr inbounds float, ptr %55, i64 %indvars.iv.prol
  store float %68, ptr %69, align 4, !tbaa !26
  %indvars.iv.next.prol = add nuw nsw i64 %indvars.iv.prol, 1
  %prol.iter.next = add i64 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter
  br i1 %prol.iter.cmp.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol, !llvm.loop !31

scalar.ph.prol.loopexit:                          ; preds = %scalar.ph.prol, %scalar.ph.preheader
  %indvars.iv.unr = phi i64 [ %indvars.iv.ph, %scalar.ph.preheader ], [ %indvars.iv.next.prol, %scalar.ph.prol ]
  %70 = sub nsw i64 %indvars.iv.ph, %wide.trip.count
  %71 = icmp ugt i64 %70, -4
  br i1 %71, label %._crit_edge.us, label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.prol.loopexit, %scalar.ph
  %indvars.iv = phi i64 [ %indvars.iv.next.3, %scalar.ph ], [ %indvars.iv.unr, %scalar.ph.prol.loopexit ]
  %72 = getelementptr inbounds float, ptr %53, i64 %indvars.iv
  %73 = load float, ptr %72, align 4, !tbaa !26
  %74 = fmul float %45, %73
  %75 = getelementptr inbounds float, ptr %55, i64 %indvars.iv
  store float %74, ptr %75, align 4, !tbaa !26
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %76 = getelementptr inbounds float, ptr %53, i64 %indvars.iv.next
  %77 = load float, ptr %76, align 4, !tbaa !26
  %78 = fmul float %45, %77
  %79 = getelementptr inbounds float, ptr %55, i64 %indvars.iv.next
  store float %78, ptr %79, align 4, !tbaa !26
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %80 = getelementptr inbounds float, ptr %53, i64 %indvars.iv.next.1
  %81 = load float, ptr %80, align 4, !tbaa !26
  %82 = fmul float %45, %81
  %83 = getelementptr inbounds float, ptr %55, i64 %indvars.iv.next.1
  store float %82, ptr %83, align 4, !tbaa !26
  %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv, 3
  %84 = getelementptr inbounds float, ptr %53, i64 %indvars.iv.next.2
  %85 = load float, ptr %84, align 4, !tbaa !26
  %86 = fmul float %45, %85
  %87 = getelementptr inbounds float, ptr %55, i64 %indvars.iv.next.2
  store float %86, ptr %87, align 4, !tbaa !26
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
  %exitcond.not.3 = icmp eq i64 %indvars.iv.next.3, %wide.trip.count
  br i1 %exitcond.not.3, label %._crit_edge.us, label %scalar.ph, !llvm.loop !33

._crit_edge.us:                                   ; preds = %scalar.ph.prol.loopexit, %scalar.ph, %middle.block
  %indvars.iv.next57 = add nuw nsw i64 %indvars.iv56, 1
  %exitcond60.not = icmp eq i64 %indvars.iv.next57, %wide.trip.count59
  br i1 %exitcond60.not, label %.preheader, label %.preheader50.us, !llvm.loop !34

.preheader:                                       ; preds = %._crit_edge.us, %18
  %88 = icmp sgt i32 %42, 0
  br i1 %88, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %.preheader
  %89 = getelementptr inbounds i8, ptr %25, i64 16
  br label %90

90:                                               ; preds = %.lr.ph, %90
  %.04853 = phi i32 [ 0, %.lr.ph ], [ %102, %90 ]
  %91 = load i32, ptr %23, align 8, !tbaa !22
  %92 = mul nsw i32 %91, %33
  %93 = tail call i32 @m_Rand(i32 noundef 0, i32 noundef %92) #3
  %94 = sdiv i32 %93, %33
  %95 = srem i32 %93, %33
  %96 = load ptr, ptr %89, align 8, !tbaa !24
  %97 = sext i32 %94 to i64
  %98 = getelementptr inbounds ptr, ptr %96, i64 %97
  %99 = load ptr, ptr %98, align 8, !tbaa !25
  %100 = sext i32 %95 to i64
  %101 = getelementptr inbounds float, ptr %99, i64 %100
  store float 0.000000e+00, ptr %101, align 4, !tbaa !26
  %102 = add nuw nsw i32 %.04853, 1
  %exitcond61.not = icmp eq i32 %102, %42
  br i1 %exitcond61.not, label %.loopexit, label %90, !llvm.loop !35

.loopexit:                                        ; preds = %90, %.preheader, %14
  ret void
}

declare i32 @m_Rand(i32 noundef, i32 noundef) local_unnamed_addr #0

attributes #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 nofree nounwind willreturn memory(argmem: read) "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 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 = { nounwind }
attributes #4 = { nounwind willreturn memory(read) }

!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, !9, i64 32}
!6 = !{!"MLayer", !7, i64 0, !9, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !9, i64 64}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!"int", !7, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!6, !9, i64 64}
!12 = !{!9, !9, i64 0}
!13 = !{!6, !10, i64 56}
!14 = !{!15, !10, i64 0}
!15 = !{!"TensorDropoutPara", !10, i64 0, !9, i64 8, !16, i64 12}
!16 = !{!"float", !7, i64 0}
!17 = !{!6, !10, i64 40}
!18 = !{!19, !9, i64 4}
!19 = !{!"MTensor", !9, i64 0, !9, i64 4, !9, i64 8, !9, i64 12, !10, i64 16, !9, i64 24}
!20 = !{!19, !9, i64 8}
!21 = !{!19, !9, i64 12}
!22 = !{!19, !9, i64 0}
!23 = !{!15, !16, i64 12}
!24 = !{!19, !10, i64 16}
!25 = !{!10, !10, i64 0}
!26 = !{!16, !16, i64 0}
!27 = distinct !{!27, !28, !29, !30}
!28 = !{!"llvm.loop.mustprogress"}
!29 = !{!"llvm.loop.isvectorized", i32 1}
!30 = !{!"llvm.loop.unroll.runtime.disable"}
!31 = distinct !{!31, !32}
!32 = !{!"llvm.loop.unroll.disable"}
!33 = distinct !{!33, !28, !29}
!34 = distinct !{!34, !28}
!35 = distinct !{!35, !28}


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