; LLVM IR from Dynmi/AlexNet :: src (batchnorm_layer)

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

; Function Attrs: nounwind uwtable
define dso_local void @batch_norm_op_forward(ptr noundef %0) #0 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca float, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #6
  %11 = load ptr, ptr %2, align 8, !tbaa !5
  %12 = getelementptr inbounds %struct.batch_norm_op, ptr %11, i32 0, i32 0
  %13 = load ptr, ptr %12, align 8, !tbaa !9
  store ptr %13, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #6
  %14 = load ptr, ptr %2, align 8, !tbaa !5
  %15 = getelementptr inbounds %struct.batch_norm_op, ptr %14, i32 0, i32 2
  %16 = load ptr, ptr %15, align 8, !tbaa !13
  store ptr %16, ptr %4, align 8, !tbaa !5
  %17 = load ptr, ptr %2, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.batch_norm_op, ptr %17, i32 0, i32 8
  %19 = load i32, ptr %18, align 8, !tbaa !14
  %20 = sext i32 %19 to i64
  %21 = call noalias ptr @calloc(i64 noundef %20, i64 noundef 4) #7
  %22 = load ptr, ptr %2, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.batch_norm_op, ptr %22, i32 0, i32 11
  store ptr %21, ptr %23, align 8, !tbaa !15
  %24 = load ptr, ptr %2, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.batch_norm_op, ptr %24, i32 0, i32 8
  %26 = load i32, ptr %25, align 8, !tbaa !14
  %27 = sext i32 %26 to i64
  %28 = call noalias ptr @calloc(i64 noundef %27, i64 noundef 4) #7
  %29 = load ptr, ptr %2, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.batch_norm_op, ptr %29, i32 0, i32 12
  store ptr %28, ptr %30, align 8, !tbaa !16
  %31 = load ptr, ptr %2, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.batch_norm_op, ptr %31, i32 0, i32 9
  %33 = load i16, ptr %32, align 4, !tbaa !17
  %34 = sext i16 %33 to i32
  %35 = load ptr, ptr %2, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.batch_norm_op, ptr %35, i32 0, i32 8
  %37 = load i32, ptr %36, align 8, !tbaa !14
  %38 = mul nsw i32 %34, %37
  %39 = sext i32 %38 to i64
  %40 = mul i64 %39, 4
  %41 = call noalias ptr @malloc(i64 noundef %40) #8
  %42 = load ptr, ptr %2, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.batch_norm_op, ptr %42, i32 0, i32 10
  store ptr %41, ptr %43, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 0, ptr %7, align 4, !tbaa !19
  store i32 0, ptr %6, align 4, !tbaa !19
  br label %44

44:                                               ; preds = %77, %1
  %45 = load i32, ptr %6, align 4, !tbaa !19
  %46 = load ptr, ptr %2, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.batch_norm_op, ptr %46, i32 0, i32 9
  %48 = load i16, ptr %47, align 4, !tbaa !17
  %49 = sext i16 %48 to i32
  %50 = icmp slt i32 %45, %49
  br i1 %50, label %51, label %80

51:                                               ; preds = %44
  store i32 0, ptr %5, align 4, !tbaa !19
  br label %52

52:                                               ; preds = %73, %51
  %53 = load i32, ptr %5, align 4, !tbaa !19
  %54 = load ptr, ptr %2, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.batch_norm_op, ptr %54, i32 0, i32 8
  %56 = load i32, ptr %55, align 8, !tbaa !14
  %57 = icmp slt i32 %53, %56
  br i1 %57, label %58, label %76

58:                                               ; preds = %52
  %59 = load ptr, ptr %3, align 8, !tbaa !5
  %60 = load i32, ptr %7, align 4, !tbaa !19
  %61 = add nsw i32 %60, 1
  store i32 %61, ptr %7, align 4, !tbaa !19
  %62 = sext i32 %60 to i64
  %63 = getelementptr inbounds float, ptr %59, i64 %62
  %64 = load float, ptr %63, align 4, !tbaa !20
  %65 = load ptr, ptr %2, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.batch_norm_op, ptr %65, i32 0, i32 11
  %67 = load ptr, ptr %66, align 8, !tbaa !15
  %68 = load i32, ptr %5, align 4, !tbaa !19
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds float, ptr %67, i64 %69
  %71 = load float, ptr %70, align 4, !tbaa !20
  %72 = fadd float %71, %64
  store float %72, ptr %70, align 4, !tbaa !20
  br label %73

73:                                               ; preds = %58
  %74 = load i32, ptr %5, align 4, !tbaa !19
  %75 = add nsw i32 %74, 1
  store i32 %75, ptr %5, align 4, !tbaa !19
  br label %52, !llvm.loop !22

76:                                               ; preds = %52
  br label %77

77:                                               ; preds = %76
  %78 = load i32, ptr %6, align 4, !tbaa !19
  %79 = add nsw i32 %78, 1
  store i32 %79, ptr %6, align 4, !tbaa !19
  br label %44, !llvm.loop !24

80:                                               ; preds = %44
  store i32 0, ptr %5, align 4, !tbaa !19
  br label %81

81:                                               ; preds = %101, %80
  %82 = load i32, ptr %5, align 4, !tbaa !19
  %83 = load ptr, ptr %2, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.batch_norm_op, ptr %83, i32 0, i32 8
  %85 = load i32, ptr %84, align 8, !tbaa !14
  %86 = icmp slt i32 %82, %85
  br i1 %86, label %87, label %104

87:                                               ; preds = %81
  %88 = load ptr, ptr %2, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.batch_norm_op, ptr %88, i32 0, i32 9
  %90 = load i16, ptr %89, align 4, !tbaa !17
  %91 = sext i16 %90 to i32
  %92 = sitofp i32 %91 to float
  %93 = load ptr, ptr %2, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.batch_norm_op, ptr %93, i32 0, i32 11
  %95 = load ptr, ptr %94, align 8, !tbaa !15
  %96 = load i32, ptr %5, align 4, !tbaa !19
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds float, ptr %95, i64 %97
  %99 = load float, ptr %98, align 4, !tbaa !20
  %100 = fdiv float %99, %92
  store float %100, ptr %98, align 4, !tbaa !20
  br label %101

101:                                              ; preds = %87
  %102 = load i32, ptr %5, align 4, !tbaa !19
  %103 = add nsw i32 %102, 1
  store i32 %103, ptr %5, align 4, !tbaa !19
  br label %81, !llvm.loop !25

104:                                              ; preds = %81
  store i32 0, ptr %7, align 4, !tbaa !19
  store i32 0, ptr %6, align 4, !tbaa !19
  br label %105

105:                                              ; preds = %148, %104
  %106 = load i32, ptr %6, align 4, !tbaa !19
  %107 = load ptr, ptr %2, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.batch_norm_op, ptr %107, i32 0, i32 9
  %109 = load i16, ptr %108, align 4, !tbaa !17
  %110 = sext i16 %109 to i32
  %111 = icmp slt i32 %106, %110
  br i1 %111, label %112, label %151

112:                                              ; preds = %105
  store i32 0, ptr %5, align 4, !tbaa !19
  br label %113

113:                                              ; preds = %144, %112
  %114 = load i32, ptr %5, align 4, !tbaa !19
  %115 = load ptr, ptr %2, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.batch_norm_op, ptr %115, i32 0, i32 8
  %117 = load i32, ptr %116, align 8, !tbaa !14
  %118 = icmp slt i32 %114, %117
  br i1 %118, label %119, label %147

119:                                              ; preds = %113
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  %120 = load ptr, ptr %3, align 8, !tbaa !5
  %121 = load i32, ptr %7, align 4, !tbaa !19
  %122 = add nsw i32 %121, 1
  store i32 %122, ptr %7, align 4, !tbaa !19
  %123 = sext i32 %121 to i64
  %124 = getelementptr inbounds float, ptr %120, i64 %123
  %125 = load float, ptr %124, align 4, !tbaa !20
  %126 = load ptr, ptr %2, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.batch_norm_op, ptr %126, i32 0, i32 11
  %128 = load ptr, ptr %127, align 8, !tbaa !15
  %129 = load i32, ptr %5, align 4, !tbaa !19
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds float, ptr %128, i64 %130
  %132 = load float, ptr %131, align 4, !tbaa !20
  %133 = fsub float %125, %132
  store float %133, ptr %8, align 4, !tbaa !20
  %134 = load float, ptr %8, align 4, !tbaa !20
  %135 = load float, ptr %8, align 4, !tbaa !20
  %136 = load ptr, ptr %2, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.batch_norm_op, ptr %136, i32 0, i32 12
  %138 = load ptr, ptr %137, align 8, !tbaa !16
  %139 = load i32, ptr %5, align 4, !tbaa !19
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds float, ptr %138, i64 %140
  %142 = load float, ptr %141, align 4, !tbaa !20
  %143 = call float @llvm.fmuladd.f32(float %134, float %135, float %142)
  store float %143, ptr %141, align 4, !tbaa !20
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %144

144:                                              ; preds = %119
  %145 = load i32, ptr %5, align 4, !tbaa !19
  %146 = add nsw i32 %145, 1
  store i32 %146, ptr %5, align 4, !tbaa !19
  br label %113, !llvm.loop !26

147:                                              ; preds = %113
  br label %148

148:                                              ; preds = %147
  %149 = load i32, ptr %6, align 4, !tbaa !19
  %150 = add nsw i32 %149, 1
  store i32 %150, ptr %6, align 4, !tbaa !19
  br label %105, !llvm.loop !27

151:                                              ; preds = %105
  store i32 0, ptr %5, align 4, !tbaa !19
  br label %152

152:                                              ; preds = %172, %151
  %153 = load i32, ptr %5, align 4, !tbaa !19
  %154 = load ptr, ptr %2, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct.batch_norm_op, ptr %154, i32 0, i32 8
  %156 = load i32, ptr %155, align 8, !tbaa !14
  %157 = icmp slt i32 %153, %156
  br i1 %157, label %158, label %175

158:                                              ; preds = %152
  %159 = load ptr, ptr %2, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct.batch_norm_op, ptr %159, i32 0, i32 9
  %161 = load i16, ptr %160, align 4, !tbaa !17
  %162 = sext i16 %161 to i32
  %163 = sitofp i32 %162 to float
  %164 = load ptr, ptr %2, align 8, !tbaa !5
  %165 = getelementptr inbounds %struct.batch_norm_op, ptr %164, i32 0, i32 12
  %166 = load ptr, ptr %165, align 8, !tbaa !16
  %167 = load i32, ptr %5, align 4, !tbaa !19
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds float, ptr %166, i64 %168
  %170 = load float, ptr %169, align 4, !tbaa !20
  %171 = fdiv float %170, %163
  store float %171, ptr %169, align 4, !tbaa !20
  br label %172

172:                                              ; preds = %158
  %173 = load i32, ptr %5, align 4, !tbaa !19
  %174 = add nsw i32 %173, 1
  store i32 %174, ptr %5, align 4, !tbaa !19
  br label %152, !llvm.loop !28

175:                                              ; preds = %152
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %176 = load ptr, ptr %2, align 8, !tbaa !5
  %177 = getelementptr inbounds %struct.batch_norm_op, ptr %176, i32 0, i32 4
  %178 = load ptr, ptr %177, align 8, !tbaa !29
  store ptr %178, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %179 = load ptr, ptr %2, align 8, !tbaa !5
  %180 = getelementptr inbounds %struct.batch_norm_op, ptr %179, i32 0, i32 6
  %181 = load ptr, ptr %180, align 8, !tbaa !30
  store ptr %181, ptr %10, align 8, !tbaa !5
  store i32 0, ptr %7, align 4, !tbaa !19
  store i32 0, ptr %6, align 4, !tbaa !19
  br label %182

182:                                              ; preds = %257, %175
  %183 = load i32, ptr %6, align 4, !tbaa !19
  %184 = load ptr, ptr %2, align 8, !tbaa !5
  %185 = getelementptr inbounds %struct.batch_norm_op, ptr %184, i32 0, i32 9
  %186 = load i16, ptr %185, align 4, !tbaa !17
  %187 = sext i16 %186 to i32
  %188 = icmp slt i32 %183, %187
  br i1 %188, label %189, label %260

189:                                              ; preds = %182
  store i32 0, ptr %5, align 4, !tbaa !19
  br label %190

190:                                              ; preds = %253, %189
  %191 = load i32, ptr %5, align 4, !tbaa !19
  %192 = load ptr, ptr %2, align 8, !tbaa !5
  %193 = getelementptr inbounds %struct.batch_norm_op, ptr %192, i32 0, i32 8
  %194 = load i32, ptr %193, align 8, !tbaa !14
  %195 = icmp slt i32 %191, %194
  br i1 %195, label %196, label %256

196:                                              ; preds = %190
  %197 = load ptr, ptr %3, align 8, !tbaa !5
  %198 = load i32, ptr %7, align 4, !tbaa !19
  %199 = sext i32 %198 to i64
  %200 = getelementptr inbounds float, ptr %197, i64 %199
  %201 = load float, ptr %200, align 4, !tbaa !20
  %202 = load ptr, ptr %2, align 8, !tbaa !5
  %203 = getelementptr inbounds %struct.batch_norm_op, ptr %202, i32 0, i32 11
  %204 = load ptr, ptr %203, align 8, !tbaa !15
  %205 = load i32, ptr %5, align 4, !tbaa !19
  %206 = sext i32 %205 to i64
  %207 = getelementptr inbounds float, ptr %204, i64 %206
  %208 = load float, ptr %207, align 4, !tbaa !20
  %209 = fsub float %201, %208
  %210 = fpext float %209 to double
  %211 = load ptr, ptr %2, align 8, !tbaa !5
  %212 = getelementptr inbounds %struct.batch_norm_op, ptr %211, i32 0, i32 12
  %213 = load ptr, ptr %212, align 8, !tbaa !16
  %214 = load i32, ptr %5, align 4, !tbaa !19
  %215 = sext i32 %214 to i64
  %216 = getelementptr inbounds float, ptr %213, i64 %215
  %217 = load float, ptr %216, align 4, !tbaa !20
  %218 = fpext float %217 to double
  %219 = fadd double %218, 1.000000e-05
  %220 = call double @sqrt(double noundef %219) #6
  %221 = fdiv double %210, %220
  %222 = fptrunc double %221 to float
  %223 = load ptr, ptr %2, align 8, !tbaa !5
  %224 = getelementptr inbounds %struct.batch_norm_op, ptr %223, i32 0, i32 10
  %225 = load ptr, ptr %224, align 8, !tbaa !18
  %226 = load i32, ptr %7, align 4, !tbaa !19
  %227 = sext i32 %226 to i64
  %228 = getelementptr inbounds float, ptr %225, i64 %227
  store float %222, ptr %228, align 4, !tbaa !20
  %229 = load ptr, ptr %9, align 8, !tbaa !5
  %230 = load i32, ptr %5, align 4, !tbaa !19
  %231 = sext i32 %230 to i64
  %232 = getelementptr inbounds float, ptr %229, i64 %231
  %233 = load float, ptr %232, align 4, !tbaa !20
  %234 = load ptr, ptr %2, align 8, !tbaa !5
  %235 = getelementptr inbounds %struct.batch_norm_op, ptr %234, i32 0, i32 10
  %236 = load ptr, ptr %235, align 8, !tbaa !18
  %237 = load i32, ptr %7, align 4, !tbaa !19
  %238 = sext i32 %237 to i64
  %239 = getelementptr inbounds float, ptr %236, i64 %238
  %240 = load float, ptr %239, align 4, !tbaa !20
  %241 = load ptr, ptr %10, align 8, !tbaa !5
  %242 = load i32, ptr %5, align 4, !tbaa !19
  %243 = sext i32 %242 to i64
  %244 = getelementptr inbounds float, ptr %241, i64 %243
  %245 = load float, ptr %244, align 4, !tbaa !20
  %246 = call float @llvm.fmuladd.f32(float %233, float %240, float %245)
  %247 = load ptr, ptr %4, align 8, !tbaa !5
  %248 = load i32, ptr %7, align 4, !tbaa !19
  %249 = sext i32 %248 to i64
  %250 = getelementptr inbounds float, ptr %247, i64 %249
  store float %246, ptr %250, align 4, !tbaa !20
  %251 = load i32, ptr %7, align 4, !tbaa !19
  %252 = add nsw i32 %251, 1
  store i32 %252, ptr %7, align 4, !tbaa !19
  br label %253

253:                                              ; preds = %196
  %254 = load i32, ptr %5, align 4, !tbaa !19
  %255 = add nsw i32 %254, 1
  store i32 %255, ptr %5, align 4, !tbaa !19
  br label %190, !llvm.loop !31

256:                                              ; preds = %190
  br label %257

257:                                              ; preds = %256
  %258 = load i32, ptr %6, align 4, !tbaa !19
  %259 = add nsw i32 %258, 1
  store i32 %259, ptr %6, align 4, !tbaa !19
  br label %182, !llvm.loop !32

260:                                              ; preds = %182
  %261 = load ptr, ptr %2, align 8, !tbaa !5
  %262 = getelementptr inbounds %struct.batch_norm_op, ptr %261, i32 0, i32 11
  %263 = load ptr, ptr %262, align 8, !tbaa !15
  call void @free(ptr noundef %263) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  ret void
}

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

; Function Attrs: nounwind allocsize(0,1)
declare noalias ptr @calloc(i64 noundef, i64 noundef) #2

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #3

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

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

; Function Attrs: nounwind
declare double @sqrt(double noundef) #5

; Function Attrs: nounwind
declare void @free(ptr noundef) #5

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nounwind allocsize(0,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 #3 = { nounwind allocsize(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 "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 #6 = { nounwind }
attributes #7 = { nounwind allocsize(0,1) }
attributes #8 = { nounwind allocsize(0) }

!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, !6, i64 0}
!10 = !{!"batch_norm_op", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !11, i64 64, !12, i64 68, !6, i64 72, !6, i64 80, !6, i64 88}
!11 = !{!"int", !7, i64 0}
!12 = !{!"short", !7, i64 0}
!13 = !{!10, !6, i64 16}
!14 = !{!10, !11, i64 64}
!15 = !{!10, !6, i64 80}
!16 = !{!10, !6, i64 88}
!17 = !{!10, !12, i64 68}
!18 = !{!10, !6, i64 72}
!19 = !{!11, !11, i64 0}
!20 = !{!21, !21, i64 0}
!21 = !{!"float", !7, i64 0}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = distinct !{!24, !23}
!25 = distinct !{!25, !23}
!26 = distinct !{!26, !23}
!27 = distinct !{!27, !23}
!28 = distinct !{!28, !23}
!29 = !{!10, !6, i64 32}
!30 = !{!10, !6, i64 48}
!31 = distinct !{!31, !23}
!32 = distinct !{!32, !23}


; 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: nounwind uwtable
define dso_local void @batch_norm_op_forward(ptr nocapture noundef %0) local_unnamed_addr #0 {
  %2 = load ptr, ptr %0, align 8, !tbaa !5
  %3 = getelementptr inbounds i8, ptr %0, i64 16
  %4 = load ptr, ptr %3, align 8, !tbaa !12
  %5 = getelementptr inbounds i8, ptr %0, i64 64
  %6 = load i32, ptr %5, align 8, !tbaa !13
  %7 = sext i32 %6 to i64
  %8 = tail call noalias ptr @calloc(i64 noundef %7, i64 noundef 4) #7
  %9 = getelementptr inbounds i8, ptr %0, i64 80
  store ptr %8, ptr %9, align 8, !tbaa !14
  %10 = tail call noalias ptr @calloc(i64 noundef %7, i64 noundef 4) #7
  %11 = getelementptr inbounds i8, ptr %0, i64 88
  store ptr %10, ptr %11, align 8, !tbaa !15
  %12 = getelementptr inbounds i8, ptr %0, i64 68
  %13 = load i16, ptr %12, align 4, !tbaa !16
  %14 = sext i16 %13 to i32
  %15 = mul nsw i32 %6, %14
  %16 = sext i32 %15 to i64
  %17 = shl nsw i64 %16, 2
  %18 = tail call noalias ptr @malloc(i64 noundef %17) #8
  %19 = getelementptr inbounds i8, ptr %0, i64 72
  store ptr %18, ptr %19, align 8, !tbaa !17
  %20 = icmp sgt i16 %13, 0
  br i1 %20, label %.preheader82.lr.ph, label %.preheader81

.preheader82.lr.ph:                               ; preds = %1
  %21 = icmp sgt i32 %6, 0
  br i1 %21, label %.preheader82.us.preheader, label %._crit_edge103

.preheader82.us.preheader:                        ; preds = %.preheader82.lr.ph
  %wide.trip.count = zext nneg i32 %6 to i64
  %22 = shl nuw nsw i64 %wide.trip.count, 2
  %scevgep = getelementptr i8, ptr %8, i64 %22
  %scevgep146 = getelementptr i8, ptr %2, i64 %22
  %min.iters.check = icmp ult i32 %6, 8
  %n.vec = and i64 %wide.trip.count, 2147483640
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  %xtraiter = and i64 %wide.trip.count, 1
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  %23 = add nsw i64 %wide.trip.count, -1
  %invariant.gep = getelementptr i8, ptr %2, i64 4
  %invariant.gep214 = getelementptr i8, ptr %8, i64 4
  br label %.preheader82.us

.preheader82.us:                                  ; preds = %.preheader82.us.preheader, %._crit_edge.us
  %.07086.us = phi i32 [ %48, %._crit_edge.us ], [ 0, %.preheader82.us.preheader ]
  %.07385.us = phi i64 [ %indvars.iv.next110.lcssa, %._crit_edge.us ], [ 0, %.preheader82.us.preheader ]
  %sext = shl i64 %.07385.us, 32
  %24 = ashr exact i64 %sext, 32
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.memcheck

vector.memcheck:                                  ; preds = %.preheader82.us
  %25 = ashr exact i64 %sext, 30
  %scevgep145 = getelementptr i8, ptr %2, i64 %25
  %scevgep147 = getelementptr i8, ptr %scevgep146, i64 %25
  %bound0 = icmp ult ptr %8, %scevgep147
  %bound1 = icmp ult ptr %scevgep145, %scevgep
  %found.conflict = and i1 %bound0, %bound1
  br i1 %found.conflict, label %scalar.ph.preheader, label %vector.ph

vector.ph:                                        ; preds = %vector.memcheck
  %ind.end = add nsw i64 %24, %n.vec
  %26 = getelementptr float, ptr %2, i64 %24
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %27 = getelementptr float, ptr %26, i64 %index
  %28 = getelementptr inbounds i8, ptr %27, i64 16
  %wide.load = load <4 x float>, ptr %27, align 4, !tbaa !18, !alias.scope !20
  %wide.load149 = load <4 x float>, ptr %28, align 4, !tbaa !18, !alias.scope !20
  %29 = getelementptr inbounds float, ptr %8, i64 %index
  %30 = getelementptr inbounds i8, ptr %29, i64 16
  %wide.load150 = load <4 x float>, ptr %29, align 4, !tbaa !18, !alias.scope !23, !noalias !20
  %wide.load151 = load <4 x float>, ptr %30, align 4, !tbaa !18, !alias.scope !23, !noalias !20
  %31 = fadd <4 x float> %wide.load, %wide.load150
  %32 = fadd <4 x float> %wide.load149, %wide.load151
  store <4 x float> %31, ptr %29, align 4, !tbaa !18, !alias.scope !23, !noalias !20
  store <4 x float> %32, ptr %30, align 4, !tbaa !18, !alias.scope !23, !noalias !20
  %index.next = add nuw i64 %index, 8
  %33 = icmp eq i64 %index.next, %n.vec
  br i1 %33, label %middle.block, label %vector.body, !llvm.loop !25

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

scalar.ph.preheader:                              ; preds = %middle.block, %vector.memcheck, %.preheader82.us
  %indvars.iv109.ph = phi i64 [ %24, %vector.memcheck ], [ %24, %.preheader82.us ], [ %ind.end, %middle.block ]
  %indvars.iv.ph = phi i64 [ 0, %vector.memcheck ], [ 0, %.preheader82.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
  %indvars.iv.next110.prol = add nsw i64 %indvars.iv109.ph, 1
  %34 = getelementptr inbounds float, ptr %2, i64 %indvars.iv109.ph
  %35 = load float, ptr %34, align 4, !tbaa !18
  %36 = getelementptr inbounds float, ptr %8, i64 %indvars.iv.ph
  %37 = load float, ptr %36, align 4, !tbaa !18
  %38 = fadd float %35, %37
  store float %38, ptr %36, align 4, !tbaa !18
  %indvars.iv.next.prol = or disjoint i64 %indvars.iv.ph, 1
  br label %scalar.ph.prol.loopexit

scalar.ph.prol.loopexit:                          ; preds = %scalar.ph.prol, %scalar.ph.preheader
  %indvars.iv.next110.lcssa211.unr = phi i64 [ poison, %scalar.ph.preheader ], [ %indvars.iv.next110.prol, %scalar.ph.prol ]
  %indvars.iv109.unr = phi i64 [ %indvars.iv109.ph, %scalar.ph.preheader ], [ %indvars.iv.next110.prol, %scalar.ph.prol ]
  %indvars.iv.unr = phi i64 [ %indvars.iv.ph, %scalar.ph.preheader ], [ %indvars.iv.next.prol, %scalar.ph.prol ]
  %39 = icmp eq i64 %indvars.iv.ph, %23
  br i1 %39, label %._crit_edge.us, label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.prol.loopexit, %scalar.ph
  %indvars.iv109 = phi i64 [ %indvars.iv.next110.1, %scalar.ph ], [ %indvars.iv109.unr, %scalar.ph.prol.loopexit ]
  %indvars.iv = phi i64 [ %indvars.iv.next.1, %scalar.ph ], [ %indvars.iv.unr, %scalar.ph.prol.loopexit ]
  %40 = getelementptr inbounds float, ptr %2, i64 %indvars.iv109
  %41 = load float, ptr %40, align 4, !tbaa !18
  %42 = getelementptr inbounds float, ptr %8, i64 %indvars.iv
  %43 = load float, ptr %42, align 4, !tbaa !18
  %44 = fadd float %41, %43
  store float %44, ptr %42, align 4, !tbaa !18
  %indvars.iv.next110.1 = add nsw i64 %indvars.iv109, 2
  %gep = getelementptr float, ptr %invariant.gep, i64 %indvars.iv109
  %45 = load float, ptr %gep, align 4, !tbaa !18
  %gep215 = getelementptr float, ptr %invariant.gep214, i64 %indvars.iv
  %46 = load float, ptr %gep215, align 4, !tbaa !18
  %47 = fadd float %45, %46
  store float %47, ptr %gep215, align 4, !tbaa !18
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %exitcond.not.1 = icmp eq i64 %indvars.iv.next.1, %wide.trip.count
  br i1 %exitcond.not.1, label %._crit_edge.us, label %scalar.ph, !llvm.loop !29

._crit_edge.us:                                   ; preds = %scalar.ph.prol.loopexit, %scalar.ph, %middle.block
  %indvars.iv.next110.lcssa = phi i64 [ %ind.end, %middle.block ], [ %indvars.iv.next110.lcssa211.unr, %scalar.ph.prol.loopexit ], [ %indvars.iv.next110.1, %scalar.ph ]
  %48 = add nuw nsw i32 %.07086.us, 1
  %exitcond114.not = icmp eq i32 %48, %14
  br i1 %exitcond114.not, label %.preheader81, label %.preheader82.us, !llvm.loop !30

.preheader81:                                     ; preds = %._crit_edge.us, %1
  %49 = icmp sgt i32 %6, 0
  br i1 %49, label %.lr.ph, label %.preheader80

.lr.ph:                                           ; preds = %.preheader81
  %50 = sitofp i16 %13 to float
  %wide.trip.count118 = zext nneg i32 %6 to i64
  %min.iters.check154 = icmp ult i32 %6, 4
  br i1 %min.iters.check154, label %scalar.ph153.preheader, label %vector.ph155

scalar.ph153.preheader:                           ; preds = %middle.block152, %.lr.ph
  %indvars.iv115.ph = phi i64 [ 0, %.lr.ph ], [ %n.vec157, %middle.block152 ]
  br label %scalar.ph153

vector.ph155:                                     ; preds = %.lr.ph
  %n.vec157 = and i64 %wide.trip.count118, 2147483644
  %broadcast.splatinsert = insertelement <4 x float> poison, float %50, i64 0
  %broadcast.splat = shufflevector <4 x float> %broadcast.splatinsert, <4 x float> poison, <4 x i32> zeroinitializer
  br label %vector.body159

vector.body159:                                   ; preds = %vector.body159, %vector.ph155
  %index160 = phi i64 [ 0, %vector.ph155 ], [ %index.next162, %vector.body159 ]
  %51 = getelementptr inbounds float, ptr %8, i64 %index160
  %wide.load161 = load <4 x float>, ptr %51, align 4, !tbaa !18
  %52 = fdiv <4 x float> %wide.load161, %broadcast.splat
  store <4 x float> %52, ptr %51, align 4, !tbaa !18
  %index.next162 = add nuw i64 %index160, 4
  %53 = icmp eq i64 %index.next162, %n.vec157
  br i1 %53, label %middle.block152, label %vector.body159, !llvm.loop !31

middle.block152:                                  ; preds = %vector.body159
  %cmp.n163 = icmp eq i64 %n.vec157, %wide.trip.count118
  br i1 %cmp.n163, label %.preheader80, label %scalar.ph153.preheader

.preheader80:                                     ; preds = %scalar.ph153, %middle.block152, %.preheader81
  %54 = phi i1 [ false, %.preheader81 ], [ %49, %middle.block152 ], [ %49, %scalar.ph153 ]
  br i1 %20, label %.preheader79.lr.ph, label %.preheader78

.preheader79.lr.ph:                               ; preds = %.preheader80
  br i1 %54, label %.preheader79.us.preheader, label %._crit_edge103

.preheader79.us.preheader:                        ; preds = %.preheader79.lr.ph
  %wide.trip.count127 = zext i32 %6 to i64
  %55 = shl nuw nsw i64 %wide.trip.count127, 2
  %scevgep165 = getelementptr i8, ptr %10, i64 %55
  %scevgep167 = getelementptr i8, ptr %2, i64 %55
  %scevgep169 = getelementptr i8, ptr %8, i64 %55
  %min.iters.check178 = icmp ult i32 %6, 8
  %bound0173 = icmp ult ptr %10, %scevgep169
  %bound1174 = icmp ult ptr %8, %scevgep165
  %found.conflict175 = and i1 %bound0173, %bound1174
  %n.vec181 = and i64 %wide.trip.count127, 2147483640
  %cmp.n195 = icmp eq i64 %n.vec181, %wide.trip.count127
  %xtraiter212 = and i64 %wide.trip.count127, 1
  %lcmp.mod213.not = icmp eq i64 %xtraiter212, 0
  %56 = add nsw i64 %wide.trip.count127, -1
  %invariant.gep216 = getelementptr i8, ptr %2, i64 4
  br label %.preheader79.us

.preheader79.us:                                  ; preds = %.preheader79.us.preheader, %._crit_edge.us93
  %.17192.us = phi i32 [ %95, %._crit_edge.us93 ], [ 0, %.preheader79.us.preheader ]
  %.27591.us = phi i64 [ %indvars.iv.next123.lcssa, %._crit_edge.us93 ], [ 0, %.preheader79.us.preheader ]
  %sext143 = shl i64 %.27591.us, 32
  %57 = ashr exact i64 %sext143, 32
  br i1 %min.iters.check178, label %scalar.ph177.preheader, label %vector.memcheck164

vector.memcheck164:                               ; preds = %.preheader79.us
  %58 = ashr exact i64 %sext143, 30
  %scevgep166 = getelementptr i8, ptr %2, i64 %58
  %scevgep168 = getelementptr i8, ptr %scevgep167, i64 %58
  %bound0170 = icmp ult ptr %10, %scevgep168
  %bound1171 = icmp ult ptr %scevgep166, %scevgep165
  %found.conflict172 = and i1 %bound0170, %bound1171
  %conflict.rdx = or i1 %found.conflict172, %found.conflict175
  br i1 %conflict.rdx, label %scalar.ph177.preheader, label %vector.ph179

vector.ph179:                                     ; preds = %vector.memcheck164
  %ind.end182 = add nsw i64 %57, %n.vec181
  %59 = getelementptr float, ptr %2, i64 %57
  br label %vector.body185

vector.body185:                                   ; preds = %vector.body185, %vector.ph179
  %index186 = phi i64 [ 0, %vector.ph179 ], [ %index.next194, %vector.body185 ]
  %60 = getelementptr float, ptr %59, i64 %index186
  %61 = getelementptr inbounds i8, ptr %60, i64 16
  %wide.load188 = load <4 x float>, ptr %60, align 4, !tbaa !18, !alias.scope !32
  %wide.load189 = load <4 x float>, ptr %61, align 4, !tbaa !18, !alias.scope !32
  %62 = getelementptr inbounds float, ptr %8, i64 %index186
  %63 = getelementptr inbounds i8, ptr %62, i64 16
  %wide.load190 = load <4 x float>, ptr %62, align 4, !tbaa !18, !alias.scope !35
  %wide.load191 = load <4 x float>, ptr %63, align 4, !tbaa !18, !alias.scope !35
  %64 = fsub <4 x float> %wide.load188, %wide.load190
  %65 = fsub <4 x float> %wide.load189, %wide.load191
  %66 = getelementptr inbounds float, ptr %10, i64 %index186
  %67 = getelementptr inbounds i8, ptr %66, i64 16
  %wide.load192 = load <4 x float>, ptr %66, align 4, !tbaa !18, !alias.scope !37, !noalias !39
  %wide.load193 = load <4 x float>, ptr %67, align 4, !tbaa !18, !alias.scope !37, !noalias !39
  %68 = tail call <4 x float> @llvm.fmuladd.v4f32(<4 x float> %64, <4 x float> %64, <4 x float> %wide.load192)
  %69 = tail call <4 x float> @llvm.fmuladd.v4f32(<4 x float> %65, <4 x float> %65, <4 x float> %wide.load193)
  store <4 x float> %68, ptr %66, align 4, !tbaa !18, !alias.scope !37, !noalias !39
  store <4 x float> %69, ptr %67, align 4, !tbaa !18, !alias.scope !37, !noalias !39
  %index.next194 = add nuw i64 %index186, 8
  %70 = icmp eq i64 %index.next194, %n.vec181
  br i1 %70, label %middle.block176, label %vector.body185, !llvm.loop !40

middle.block176:                                  ; preds = %vector.body185
  br i1 %cmp.n195, label %._crit_edge.us93, label %scalar.ph177.preheader

scalar.ph177.preheader:                           ; preds = %middle.block176, %vector.memcheck164, %.preheader79.us
  %indvars.iv122.ph = phi i64 [ %57, %vector.memcheck164 ], [ %57, %.preheader79.us ], [ %ind.end182, %middle.block176 ]
  %indvars.iv120.ph = phi i64 [ 0, %vector.memcheck164 ], [ 0, %.preheader79.us ], [ %n.vec181, %middle.block176 ]
  br i1 %lcmp.mod213.not, label %scalar.ph177.prol.loopexit, label %scalar.ph177.prol

scalar.ph177.prol:                                ; preds = %scalar.ph177.preheader
  %indvars.iv.next123.prol = add nsw i64 %indvars.iv122.ph, 1
  %71 = getelementptr inbounds float, ptr %2, i64 %indvars.iv122.ph
  %72 = load float, ptr %71, align 4, !tbaa !18
  %73 = getelementptr inbounds float, ptr %8, i64 %indvars.iv120.ph
  %74 = load float, ptr %73, align 4, !tbaa !18
  %75 = fsub float %72, %74
  %76 = getelementptr inbounds float, ptr %10, i64 %indvars.iv120.ph
  %77 = load float, ptr %76, align 4, !tbaa !18
  %78 = tail call float @llvm.fmuladd.f32(float %75, float %75, float %77)
  store float %78, ptr %76, align 4, !tbaa !18
  %indvars.iv.next121.prol = or disjoint i64 %indvars.iv120.ph, 1
  br label %scalar.ph177.prol.loopexit

scalar.ph177.prol.loopexit:                       ; preds = %scalar.ph177.prol, %scalar.ph177.preheader
  %indvars.iv.next123.lcssa210.unr = phi i64 [ poison, %scalar.ph177.preheader ], [ %indvars.iv.next123.prol, %scalar.ph177.prol ]
  %indvars.iv122.unr = phi i64 [ %indvars.iv122.ph, %scalar.ph177.preheader ], [ %indvars.iv.next123.prol, %scalar.ph177.prol ]
  %indvars.iv120.unr = phi i64 [ %indvars.iv120.ph, %scalar.ph177.preheader ], [ %indvars.iv.next121.prol, %scalar.ph177.prol ]
  %79 = icmp eq i64 %indvars.iv120.ph, %56
  br i1 %79, label %._crit_edge.us93, label %scalar.ph177

scalar.ph177:                                     ; preds = %scalar.ph177.prol.loopexit, %scalar.ph177
  %indvars.iv122 = phi i64 [ %indvars.iv.next123.1, %scalar.ph177 ], [ %indvars.iv122.unr, %scalar.ph177.prol.loopexit ]
  %indvars.iv120 = phi i64 [ %indvars.iv.next121.1, %scalar.ph177 ], [ %indvars.iv120.unr, %scalar.ph177.prol.loopexit ]
  %80 = getelementptr inbounds float, ptr %2, i64 %indvars.iv122
  %81 = load float, ptr %80, align 4, !tbaa !18
  %82 = getelementptr inbounds float, ptr %8, i64 %indvars.iv120
  %83 = load float, ptr %82, align 4, !tbaa !18
  %84 = fsub float %81, %83
  %85 = getelementptr inbounds float, ptr %10, i64 %indvars.iv120
  %86 = load float, ptr %85, align 4, !tbaa !18
  %87 = tail call float @llvm.fmuladd.f32(float %84, float %84, float %86)
  store float %87, ptr %85, align 4, !tbaa !18
  %indvars.iv.next121 = add nuw nsw i64 %indvars.iv120, 1
  %indvars.iv.next123.1 = add nsw i64 %indvars.iv122, 2
  %gep217 = getelementptr float, ptr %invariant.gep216, i64 %indvars.iv122
  %88 = load float, ptr %gep217, align 4, !tbaa !18
  %89 = getelementptr inbounds float, ptr %8, i64 %indvars.iv.next121
  %90 = load float, ptr %89, align 4, !tbaa !18
  %91 = fsub float %88, %90
  %92 = getelementptr inbounds float, ptr %10, i64 %indvars.iv.next121
  %93 = load float, ptr %92, align 4, !tbaa !18
  %94 = tail call float @llvm.fmuladd.f32(float %91, float %91, float %93)
  store float %94, ptr %92, align 4, !tbaa !18
  %indvars.iv.next121.1 = add nuw nsw i64 %indvars.iv120, 2
  %exitcond128.not.1 = icmp eq i64 %indvars.iv.next121.1, %wide.trip.count127
  br i1 %exitcond128.not.1, label %._crit_edge.us93, label %scalar.ph177, !llvm.loop !41

._crit_edge.us93:                                 ; preds = %scalar.ph177.prol.loopexit, %scalar.ph177, %middle.block176
  %indvars.iv.next123.lcssa = phi i64 [ %ind.end182, %middle.block176 ], [ %indvars.iv.next123.lcssa210.unr, %scalar.ph177.prol.loopexit ], [ %indvars.iv.next123.1, %scalar.ph177 ]
  %95 = add nuw nsw i32 %.17192.us, 1
  %exitcond129.not = icmp eq i32 %95, %14
  br i1 %exitcond129.not, label %.preheader78, label %.preheader79.us, !llvm.loop !42

scalar.ph153:                                     ; preds = %scalar.ph153.preheader, %scalar.ph153
  %indvars.iv115 = phi i64 [ %indvars.iv.next116, %scalar.ph153 ], [ %indvars.iv115.ph, %scalar.ph153.preheader ]
  %96 = getelementptr inbounds float, ptr %8, i64 %indvars.iv115
  %97 = load float, ptr %96, align 4, !tbaa !18
  %98 = fdiv float %97, %50
  store float %98, ptr %96, align 4, !tbaa !18
  %indvars.iv.next116 = add nuw nsw i64 %indvars.iv115, 1
  %exitcond119.not = icmp eq i64 %indvars.iv.next116, %wide.trip.count118
  br i1 %exitcond119.not, label %.preheader80, label %scalar.ph153, !llvm.loop !43

.preheader78:                                     ; preds = %._crit_edge.us93, %.preheader80
  br i1 %54, label %.lr.ph96, label %._crit_edge

.lr.ph96:                                         ; preds = %.preheader78
  %99 = sitofp i16 %13 to float
  %wide.trip.count133 = zext nneg i32 %6 to i64
  %min.iters.check198 = icmp ult i32 %6, 4
  br i1 %min.iters.check198, label %scalar.ph197.preheader, label %vector.ph199

vector.ph199:                                     ; preds = %.lr.ph96
  %n.vec201 = and i64 %wide.trip.count133, 2147483644
  %broadcast.splatinsert206 = insertelement <4 x float> poison, float %99, i64 0
  %broadcast.splat207 = shufflevector <4 x float> %broadcast.splatinsert206, <4 x float> poison, <4 x i32> zeroinitializer
  br label %vector.body203

vector.body203:                                   ; preds = %vector.body203, %vector.ph199
  %index204 = phi i64 [ 0, %vector.ph199 ], [ %index.next208, %vector.body203 ]
  %100 = getelementptr inbounds float, ptr %10, i64 %index204
  %wide.load205 = load <4 x float>, ptr %100, align 4, !tbaa !18
  %101 = fdiv <4 x float> %wide.load205, %broadcast.splat207
  store <4 x float> %101, ptr %100, align 4, !tbaa !18
  %index.next208 = add nuw i64 %index204, 4
  %102 = icmp eq i64 %index.next208, %n.vec201
  br i1 %102, label %middle.block196, label %vector.body203, !llvm.loop !44

middle.block196:                                  ; preds = %vector.body203
  %cmp.n209 = icmp eq i64 %n.vec201, %wide.trip.count133
  br i1 %cmp.n209, label %._crit_edge, label %scalar.ph197.preheader

scalar.ph197.preheader:                           ; preds = %middle.block196, %.lr.ph96
  %indvars.iv130.ph = phi i64 [ 0, %.lr.ph96 ], [ %n.vec201, %middle.block196 ]
  br label %scalar.ph197

scalar.ph197:                                     ; preds = %scalar.ph197.preheader, %scalar.ph197
  %indvars.iv130 = phi i64 [ %indvars.iv.next131, %scalar.ph197 ], [ %indvars.iv130.ph, %scalar.ph197.preheader ]
  %103 = getelementptr inbounds float, ptr %10, i64 %indvars.iv130
  %104 = load float, ptr %103, align 4, !tbaa !18
  %105 = fdiv float %104, %99
  store float %105, ptr %103, align 4, !tbaa !18
  %indvars.iv.next131 = add nuw nsw i64 %indvars.iv130, 1
  %exitcond134.not = icmp eq i64 %indvars.iv.next131, %wide.trip.count133
  br i1 %exitcond134.not, label %._crit_edge, label %scalar.ph197, !llvm.loop !45

._crit_edge:                                      ; preds = %scalar.ph197, %middle.block196, %.preheader78
  %106 = phi i1 [ false, %.preheader78 ], [ %54, %middle.block196 ], [ %54, %scalar.ph197 ]
  %107 = getelementptr inbounds i8, ptr %0, i64 32
  %108 = load ptr, ptr %107, align 8, !tbaa !46
  %109 = getelementptr inbounds i8, ptr %0, i64 48
  %110 = load ptr, ptr %109, align 8, !tbaa !47
  %brmerge.not = and i1 %20, %106
  br i1 %brmerge.not, label %.preheader, label %._crit_edge103

.preheader:                                       ; preds = %._crit_edge, %._crit_edge100
  %111 = phi i16 [ %142, %._crit_edge100 ], [ %13, %._crit_edge ]
  %112 = phi i32 [ %143, %._crit_edge100 ], [ %6, %._crit_edge ]
  %.272102 = phi i32 [ %144, %._crit_edge100 ], [ 0, %._crit_edge ]
  %.477101 = phi i32 [ %.5.lcssa, %._crit_edge100 ], [ 0, %._crit_edge ]
  %113 = icmp sgt i32 %112, 0
  br i1 %113, label %.lr.ph99.preheader, label %._crit_edge100

.lr.ph99.preheader:                               ; preds = %.preheader
  %114 = sext i32 %.477101 to i64
  br label %.lr.ph99

.lr.ph99:                                         ; preds = %.lr.ph99.preheader, %.lr.ph99
  %indvars.iv137 = phi i64 [ %114, %.lr.ph99.preheader ], [ %indvars.iv.next138, %.lr.ph99 ]
  %indvars.iv135 = phi i64 [ 0, %.lr.ph99.preheader ], [ %indvars.iv.next136, %.lr.ph99 ]
  %115 = getelementptr inbounds float, ptr %2, i64 %indvars.iv137
  %116 = load float, ptr %115, align 4, !tbaa !18
  %117 = load ptr, ptr %9, align 8, !tbaa !14
  %118 = getelementptr inbounds float, ptr %117, i64 %indvars.iv135
  %119 = load float, ptr %118, align 4, !tbaa !18
  %120 = fsub float %116, %119
  %121 = fpext float %120 to double
  %122 = load ptr, ptr %11, align 8, !tbaa !15
  %123 = getelementptr inbounds float, ptr %122, i64 %indvars.iv135
  %124 = load float, ptr %123, align 4, !tbaa !18
  %125 = fpext float %124 to double
  %126 = fadd double %125, 1.000000e-05
  %127 = tail call double @sqrt(double noundef %126) #9
  %128 = fdiv double %121, %127
  %129 = fptrunc double %128 to float
  %130 = load ptr, ptr %19, align 8, !tbaa !17
  %131 = getelementptr inbounds float, ptr %130, i64 %indvars.iv137
  store float %129, ptr %131, align 4, !tbaa !18
  %132 = getelementptr inbounds float, ptr %108, i64 %indvars.iv135
  %133 = load float, ptr %132, align 4, !tbaa !18
  %134 = getelementptr inbounds float, ptr %110, i64 %indvars.iv135
  %135 = load float, ptr %134, align 4, !tbaa !18
  %136 = tail call float @llvm.fmuladd.f32(float %133, float %129, float %135)
  %137 = getelementptr inbounds float, ptr %4, i64 %indvars.iv137
  store float %136, ptr %137, align 4, !tbaa !18
  %indvars.iv.next138 = add nsw i64 %indvars.iv137, 1
  %indvars.iv.next136 = add nuw nsw i64 %indvars.iv135, 1
  %138 = load i32, ptr %5, align 8, !tbaa !13
  %139 = sext i32 %138 to i64
  %140 = icmp slt i64 %indvars.iv.next136, %139
  br i1 %140, label %.lr.ph99, label %._crit_edge100.loopexit, !llvm.loop !48

._crit_edge100.loopexit:                          ; preds = %.lr.ph99
  %141 = trunc nsw i64 %indvars.iv.next138 to i32
  %.pre = load i16, ptr %12, align 4, !tbaa !16
  br label %._crit_edge100

._crit_edge100:                                   ; preds = %._crit_edge100.loopexit, %.preheader
  %142 = phi i16 [ %111, %.preheader ], [ %.pre, %._crit_edge100.loopexit ]
  %143 = phi i32 [ %112, %.preheader ], [ %138, %._crit_edge100.loopexit ]
  %.5.lcssa = phi i32 [ %.477101, %.preheader ], [ %141, %._crit_edge100.loopexit ]
  %144 = add nuw nsw i32 %.272102, 1
  %145 = sext i16 %142 to i32
  %146 = icmp slt i32 %144, %145
  br i1 %146, label %.preheader, label %._crit_edge103.loopexit, !llvm.loop !49

._crit_edge103.loopexit:                          ; preds = %._crit_edge100
  %.pre142 = load ptr, ptr %9, align 8, !tbaa !14
  br label %._crit_edge103

._crit_edge103:                                   ; preds = %._crit_edge, %.preheader82.lr.ph, %.preheader79.lr.ph, %._crit_edge103.loopexit
  %147 = phi ptr [ %.pre142, %._crit_edge103.loopexit ], [ %8, %._crit_edge ], [ %8, %.preheader79.lr.ph ], [ %8, %.preheader82.lr.ph ]
  tail call void @free(ptr noundef %147) #9
  ret void
}

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @calloc(i64 noundef, i64 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #3

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @sqrt(double noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #5

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <4 x float> @llvm.fmuladd.v4f32(<4 x float>, <4 x float>, <4 x float>) #6

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { mustprogress nofree nounwind willreturn memory(write) "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 #5 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { nounwind allocsize(0,1) }
attributes #8 = { nounwind allocsize(0) }
attributes #9 = { 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, !7, i64 0}
!6 = !{!"batch_norm_op", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !10, i64 64, !11, i64 68, !7, i64 72, !7, i64 80, !7, i64 88}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"short", !8, i64 0}
!12 = !{!6, !7, i64 16}
!13 = !{!6, !10, i64 64}
!14 = !{!6, !7, i64 80}
!15 = !{!6, !7, i64 88}
!16 = !{!6, !11, i64 68}
!17 = !{!6, !7, i64 72}
!18 = !{!19, !19, i64 0}
!19 = !{!"float", !8, i64 0}
!20 = !{!21}
!21 = distinct !{!21, !22}
!22 = distinct !{!22, !"LVerDomain"}
!23 = !{!24}
!24 = distinct !{!24, !22}
!25 = distinct !{!25, !26, !27, !28}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{!"llvm.loop.isvectorized", i32 1}
!28 = !{!"llvm.loop.unroll.runtime.disable"}
!29 = distinct !{!29, !26, !27}
!30 = distinct !{!30, !26}
!31 = distinct !{!31, !26, !27, !28}
!32 = !{!33}
!33 = distinct !{!33, !34}
!34 = distinct !{!34, !"LVerDomain"}
!35 = !{!36}
!36 = distinct !{!36, !34}
!37 = !{!38}
!38 = distinct !{!38, !34}
!39 = !{!33, !36}
!40 = distinct !{!40, !26, !27, !28}
!41 = distinct !{!41, !26, !27}
!42 = distinct !{!42, !26}
!43 = distinct !{!43, !26, !28, !27}
!44 = distinct !{!44, !26, !27, !28}
!45 = distinct !{!45, !26, !28, !27}
!46 = !{!6, !7, i64 32}
!47 = !{!6, !7, i64 48}
!48 = distinct !{!48, !26}
!49 = distinct !{!49, !26, !50}
!50 = !{!"llvm.loop.unswitch.partial.disable"}


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