; LLVM IR from hans-ob1/neural_cam_ros :: src/detector (convolutional_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.layer = type { i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, float, float, float, float, float, float, float, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, float, float, float, i32, float, float, float, float, float, float, float, i32, i32, float, i32, i32, i32, i32, float, float, float, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i64 }
%struct.network_state = type { ptr, ptr, ptr, ptr, i32, i32, %struct.network }
%struct.network = type { ptr, i32, i32, ptr, float, i32, float, float, ptr, i32, ptr, i32, float, float, float, float, i32, i32, i32, ptr, ptr, i32, i32, i32, float, float, float, i32, i32, i32, i32, i32, i32, float, float, float, float, float, i32, ptr }

@stderr = external global ptr, align 8
@.str = external hidden unnamed_addr constant [60 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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @convolutional_out_height(ptr noundef byval(%struct.layer) align 8) #1

; Function Attrs: nounwind uwtable
declare dso_local i32 @convolutional_out_width(ptr noundef byval(%struct.layer) align 8) #1

; Function Attrs: nounwind uwtable
declare dso_local i64 @get_workspace_size(ptr noundef byval(%struct.layer) align 8) #1

; Function Attrs: nounwind uwtable
define dso_local void @make_convolutional_layer(ptr dead_on_unwind noalias writable sret(%struct.layer) align 8 %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5, i32 noundef %6, i32 noundef %7, i32 noundef %8, i32 noundef %9, i32 noundef %10, i32 noundef %11, i32 noundef %12, i32 noundef %13) #1 {
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca float, align 4
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  store i32 %1, ptr %15, align 4, !tbaa !5
  store i32 %2, ptr %16, align 4, !tbaa !5
  store i32 %3, ptr %17, align 4, !tbaa !5
  store i32 %4, ptr %18, align 4, !tbaa !5
  store i32 %5, ptr %19, align 4, !tbaa !5
  store i32 %6, ptr %20, align 4, !tbaa !5
  store i32 %7, ptr %21, align 4, !tbaa !5
  store i32 %8, ptr %22, align 4, !tbaa !5
  store i32 %9, ptr %23, align 4, !tbaa !5
  store i32 %10, ptr %24, align 4, !tbaa !5
  store i32 %11, ptr %25, align 4, !tbaa !5
  store i32 %12, ptr %26, align 4, !tbaa !5
  store i32 %13, ptr %27, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #6
  call void @llvm.memset.p0.i64(ptr align 8 %0, i8 0, i64 808, i1 false)
  %32 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 0
  store i32 0, ptr %32, align 8, !tbaa !9
  %33 = load i32, ptr %16, align 4, !tbaa !5
  %34 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 17
  store i32 %33, ptr %34, align 8, !tbaa !14
  %35 = load i32, ptr %17, align 4, !tbaa !5
  %36 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 18
  store i32 %35, ptr %36, align 4, !tbaa !15
  %37 = load i32, ptr %18, align 4, !tbaa !5
  %38 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 19
  store i32 %37, ptr %38, align 8, !tbaa !16
  %39 = load i32, ptr %19, align 4, !tbaa !5
  %40 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 23
  store i32 %39, ptr %40, align 8, !tbaa !17
  %41 = load i32, ptr %25, align 4, !tbaa !5
  %42 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 34
  store i32 %41, ptr %42, align 4, !tbaa !18
  %43 = load i32, ptr %26, align 4, !tbaa !5
  %44 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 35
  store i32 %43, ptr %44, align 8, !tbaa !19
  %45 = load i32, ptr %15, align 4, !tbaa !5
  %46 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 11
  store i32 %45, ptr %46, align 8, !tbaa !20
  %47 = load i32, ptr %21, align 4, !tbaa !5
  %48 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 28
  store i32 %47, ptr %48, align 4, !tbaa !21
  %49 = load i32, ptr %20, align 4, !tbaa !5
  %50 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 26
  store i32 %49, ptr %50, align 4, !tbaa !22
  %51 = load i32, ptr %22, align 4, !tbaa !5
  %52 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 30
  store i32 %51, ptr %52, align 4, !tbaa !23
  %53 = load i32, ptr %24, align 4, !tbaa !5
  %54 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 9
  store i32 %53, ptr %54, align 8, !tbaa !24
  %55 = load i32, ptr %18, align 4, !tbaa !5
  %56 = load i32, ptr %19, align 4, !tbaa !5
  %57 = mul nsw i32 %55, %56
  %58 = load i32, ptr %20, align 4, !tbaa !5
  %59 = mul nsw i32 %57, %58
  %60 = load i32, ptr %20, align 4, !tbaa !5
  %61 = mul nsw i32 %59, %60
  %62 = sext i32 %61 to i64
  %63 = call noalias ptr @calloc(i64 noundef %62, i64 noundef 4) #7
  %64 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 97
  store ptr %63, ptr %64, align 8, !tbaa !25
  %65 = load i32, ptr %18, align 4, !tbaa !5
  %66 = load i32, ptr %19, align 4, !tbaa !5
  %67 = mul nsw i32 %65, %66
  %68 = load i32, ptr %20, align 4, !tbaa !5
  %69 = mul nsw i32 %67, %68
  %70 = load i32, ptr %20, align 4, !tbaa !5
  %71 = mul nsw i32 %69, %70
  %72 = sext i32 %71 to i64
  %73 = call noalias ptr @calloc(i64 noundef %72, i64 noundef 4) #7
  %74 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 98
  store ptr %73, ptr %74, align 8, !tbaa !26
  %75 = load i32, ptr %19, align 4, !tbaa !5
  %76 = sext i32 %75 to i64
  %77 = call noalias ptr @calloc(i64 noundef %76, i64 noundef 4) #7
  %78 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 93
  store ptr %77, ptr %78, align 8, !tbaa !27
  %79 = load i32, ptr %19, align 4, !tbaa !5
  %80 = sext i32 %79 to i64
  %81 = call noalias ptr @calloc(i64 noundef %80, i64 noundef 4) #7
  %82 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 94
  store ptr %81, ptr %82, align 8, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #6
  %83 = load i32, ptr %20, align 4, !tbaa !5
  %84 = load i32, ptr %20, align 4, !tbaa !5
  %85 = mul nsw i32 %83, %84
  %86 = load i32, ptr %18, align 4, !tbaa !5
  %87 = mul nsw i32 %85, %86
  %88 = sitofp i32 %87 to double
  %89 = fdiv double 2.000000e+00, %88
  %90 = call double @sqrt(double noundef %89) #6
  %91 = fptrunc double %90 to float
  store float %91, ptr %29, align 4, !tbaa !29
  store i32 0, ptr %28, align 4, !tbaa !5
  br label %92

92:                                               ; preds = %111, %14
  %93 = load i32, ptr %28, align 4, !tbaa !5
  %94 = load i32, ptr %18, align 4, !tbaa !5
  %95 = load i32, ptr %19, align 4, !tbaa !5
  %96 = mul nsw i32 %94, %95
  %97 = load i32, ptr %20, align 4, !tbaa !5
  %98 = mul nsw i32 %96, %97
  %99 = load i32, ptr %20, align 4, !tbaa !5
  %100 = mul nsw i32 %98, %99
  %101 = icmp slt i32 %93, %100
  br i1 %101, label %102, label %114

102:                                              ; preds = %92
  %103 = load float, ptr %29, align 4, !tbaa !29
  %104 = call float @rand_uniform(float noundef -1.000000e+00, float noundef 1.000000e+00)
  %105 = fmul float %103, %104
  %106 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 97
  %107 = load ptr, ptr %106, align 8, !tbaa !25
  %108 = load i32, ptr %28, align 4, !tbaa !5
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds float, ptr %107, i64 %109
  store float %105, ptr %110, align 4, !tbaa !29
  br label %111

111:                                              ; preds = %102
  %112 = load i32, ptr %28, align 4, !tbaa !5
  %113 = add nsw i32 %112, 1
  store i32 %113, ptr %28, align 4, !tbaa !5
  br label %92, !llvm.loop !30

114:                                              ; preds = %92
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #6
  %115 = call i32 @convolutional_out_height(ptr noundef byval(%struct.layer) align 8 %0)
  store i32 %115, ptr %30, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #6
  %116 = call i32 @convolutional_out_width(ptr noundef byval(%struct.layer) align 8 %0)
  store i32 %116, ptr %31, align 4, !tbaa !5
  %117 = load i32, ptr %30, align 4, !tbaa !5
  %118 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 20
  store i32 %117, ptr %118, align 4, !tbaa !32
  %119 = load i32, ptr %31, align 4, !tbaa !5
  %120 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 21
  store i32 %119, ptr %120, align 8, !tbaa !33
  %121 = load i32, ptr %19, align 4, !tbaa !5
  %122 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 22
  store i32 %121, ptr %122, align 4, !tbaa !34
  %123 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 20
  %124 = load i32, ptr %123, align 4, !tbaa !32
  %125 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 21
  %126 = load i32, ptr %125, align 8, !tbaa !33
  %127 = mul nsw i32 %124, %126
  %128 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 22
  %129 = load i32, ptr %128, align 4, !tbaa !34
  %130 = mul nsw i32 %127, %129
  %131 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 15
  store i32 %130, ptr %131, align 8, !tbaa !35
  %132 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 18
  %133 = load i32, ptr %132, align 4, !tbaa !15
  %134 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 17
  %135 = load i32, ptr %134, align 8, !tbaa !14
  %136 = mul nsw i32 %133, %135
  %137 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 19
  %138 = load i32, ptr %137, align 8, !tbaa !16
  %139 = mul nsw i32 %136, %138
  %140 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 14
  store i32 %139, ptr %140, align 4, !tbaa !36
  %141 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 11
  %142 = load i32, ptr %141, align 8, !tbaa !20
  %143 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 15
  %144 = load i32, ptr %143, align 8, !tbaa !35
  %145 = mul nsw i32 %142, %144
  %146 = sext i32 %145 to i64
  %147 = call noalias ptr @calloc(i64 noundef %146, i64 noundef 4) #7
  %148 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 101
  store ptr %147, ptr %148, align 8, !tbaa !37
  %149 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 11
  %150 = load i32, ptr %149, align 8, !tbaa !20
  %151 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 15
  %152 = load i32, ptr %151, align 8, !tbaa !35
  %153 = mul nsw i32 %150, %152
  %154 = sext i32 %153 to i64
  %155 = call noalias ptr @calloc(i64 noundef %154, i64 noundef 4) #7
  %156 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 100
  store ptr %155, ptr %156, align 8, !tbaa !38
  %157 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 3
  store ptr @forward_convolutional_layer, ptr %157, align 8, !tbaa !39
  %158 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 4
  store ptr @backward_convolutional_layer, ptr %158, align 8, !tbaa !40
  %159 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 5
  store ptr @update_convolutional_layer, ptr %159, align 8, !tbaa !41
  %160 = load i32, ptr %25, align 4, !tbaa !5
  %161 = icmp ne i32 %160, 0
  br i1 %161, label %162, label %187

162:                                              ; preds = %114
  %163 = load i32, ptr %18, align 4, !tbaa !5
  %164 = load i32, ptr %19, align 4, !tbaa !5
  %165 = mul nsw i32 %163, %164
  %166 = load i32, ptr %20, align 4, !tbaa !5
  %167 = mul nsw i32 %165, %166
  %168 = load i32, ptr %20, align 4, !tbaa !5
  %169 = mul nsw i32 %167, %168
  %170 = sext i32 %169 to i64
  %171 = call noalias ptr @calloc(i64 noundef %170, i64 noundef 4) #7
  %172 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 92
  store ptr %171, ptr %172, align 8, !tbaa !42
  %173 = load i32, ptr %18, align 4, !tbaa !5
  %174 = load i32, ptr %19, align 4, !tbaa !5
  %175 = mul nsw i32 %173, %174
  %176 = load i32, ptr %20, align 4, !tbaa !5
  %177 = mul nsw i32 %175, %176
  %178 = load i32, ptr %20, align 4, !tbaa !5
  %179 = mul nsw i32 %177, %178
  %180 = sext i32 %179 to i64
  %181 = call noalias ptr @calloc(i64 noundef %180, i64 noundef 1) #7
  %182 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 78
  store ptr %181, ptr %182, align 8, !tbaa !43
  %183 = load i32, ptr %19, align 4, !tbaa !5
  %184 = sext i32 %183 to i64
  %185 = call noalias ptr @calloc(i64 noundef %184, i64 noundef 4) #7
  %186 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 95
  store ptr %185, ptr %186, align 8, !tbaa !44
  br label %187

187:                                              ; preds = %162, %114
  %188 = load i32, ptr %26, align 4, !tbaa !5
  %189 = icmp ne i32 %188, 0
  br i1 %189, label %190, label %209

190:                                              ; preds = %187
  %191 = load i32, ptr %18, align 4, !tbaa !5
  %192 = load i32, ptr %19, align 4, !tbaa !5
  %193 = mul nsw i32 %191, %192
  %194 = load i32, ptr %20, align 4, !tbaa !5
  %195 = mul nsw i32 %193, %194
  %196 = load i32, ptr %20, align 4, !tbaa !5
  %197 = mul nsw i32 %195, %196
  %198 = sext i32 %197 to i64
  %199 = call noalias ptr @calloc(i64 noundef %198, i64 noundef 4) #7
  %200 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 92
  store ptr %199, ptr %200, align 8, !tbaa !42
  %201 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 14
  %202 = load i32, ptr %201, align 4, !tbaa !36
  %203 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 11
  %204 = load i32, ptr %203, align 8, !tbaa !20
  %205 = mul nsw i32 %202, %204
  %206 = sext i32 %205 to i64
  %207 = call noalias ptr @calloc(i64 noundef %206, i64 noundef 4) #7
  %208 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 118
  store ptr %207, ptr %208, align 8, !tbaa !45
  br label %209

209:                                              ; preds = %190, %187
  %210 = load i32, ptr %24, align 4, !tbaa !5
  %211 = icmp ne i32 %210, 0
  br i1 %211, label %212, label %275

212:                                              ; preds = %209
  %213 = load i32, ptr %19, align 4, !tbaa !5
  %214 = sext i32 %213 to i64
  %215 = call noalias ptr @calloc(i64 noundef %214, i64 noundef 4) #7
  %216 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 95
  store ptr %215, ptr %216, align 8, !tbaa !44
  %217 = load i32, ptr %19, align 4, !tbaa !5
  %218 = sext i32 %217 to i64
  %219 = call noalias ptr @calloc(i64 noundef %218, i64 noundef 4) #7
  %220 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 96
  store ptr %219, ptr %220, align 8, !tbaa !46
  store i32 0, ptr %28, align 4, !tbaa !5
  br label %221

221:                                              ; preds = %231, %212
  %222 = load i32, ptr %28, align 4, !tbaa !5
  %223 = load i32, ptr %19, align 4, !tbaa !5
  %224 = icmp slt i32 %222, %223
  br i1 %224, label %225, label %234

225:                                              ; preds = %221
  %226 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 95
  %227 = load ptr, ptr %226, align 8, !tbaa !44
  %228 = load i32, ptr %28, align 4, !tbaa !5
  %229 = sext i32 %228 to i64
  %230 = getelementptr inbounds float, ptr %227, i64 %229
  store float 1.000000e+00, ptr %230, align 4, !tbaa !29
  br label %231

231:                                              ; preds = %225
  %232 = load i32, ptr %28, align 4, !tbaa !5
  %233 = add nsw i32 %232, 1
  store i32 %233, ptr %28, align 4, !tbaa !5
  br label %221, !llvm.loop !47

234:                                              ; preds = %221
  %235 = load i32, ptr %19, align 4, !tbaa !5
  %236 = sext i32 %235 to i64
  %237 = call noalias ptr @calloc(i64 noundef %236, i64 noundef 4) #7
  %238 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 105
  store ptr %237, ptr %238, align 8, !tbaa !48
  %239 = load i32, ptr %19, align 4, !tbaa !5
  %240 = sext i32 %239 to i64
  %241 = call noalias ptr @calloc(i64 noundef %240, i64 noundef 4) #7
  %242 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 106
  store ptr %241, ptr %242, align 8, !tbaa !49
  %243 = load i32, ptr %19, align 4, !tbaa !5
  %244 = sext i32 %243 to i64
  %245 = call noalias ptr @calloc(i64 noundef %244, i64 noundef 4) #7
  %246 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 107
  store ptr %245, ptr %246, align 8, !tbaa !50
  %247 = load i32, ptr %19, align 4, !tbaa !5
  %248 = sext i32 %247 to i64
  %249 = call noalias ptr @calloc(i64 noundef %248, i64 noundef 4) #7
  %250 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 108
  store ptr %249, ptr %250, align 8, !tbaa !51
  %251 = load i32, ptr %19, align 4, !tbaa !5
  %252 = sext i32 %251 to i64
  %253 = call noalias ptr @calloc(i64 noundef %252, i64 noundef 4) #7
  %254 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 109
  store ptr %253, ptr %254, align 8, !tbaa !52
  %255 = load i32, ptr %19, align 4, !tbaa !5
  %256 = sext i32 %255 to i64
  %257 = call noalias ptr @calloc(i64 noundef %256, i64 noundef 4) #7
  %258 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 110
  store ptr %257, ptr %258, align 8, !tbaa !53
  %259 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 11
  %260 = load i32, ptr %259, align 8, !tbaa !20
  %261 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 15
  %262 = load i32, ptr %261, align 8, !tbaa !35
  %263 = mul nsw i32 %260, %262
  %264 = sext i32 %263 to i64
  %265 = call noalias ptr @calloc(i64 noundef %264, i64 noundef 4) #7
  %266 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 111
  store ptr %265, ptr %266, align 8, !tbaa !54
  %267 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 11
  %268 = load i32, ptr %267, align 8, !tbaa !20
  %269 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 15
  %270 = load i32, ptr %269, align 8, !tbaa !35
  %271 = mul nsw i32 %268, %270
  %272 = sext i32 %271 to i64
  %273 = call noalias ptr @calloc(i64 noundef %272, i64 noundef 4) #7
  %274 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 112
  store ptr %273, ptr %274, align 8, !tbaa !55
  br label %275

275:                                              ; preds = %234, %209
  %276 = load i32, ptr %27, align 4, !tbaa !5
  %277 = icmp ne i32 %276, 0
  br i1 %277, label %278, label %300

278:                                              ; preds = %275
  %279 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 56
  store i32 1, ptr %279, align 4, !tbaa !56
  %280 = load i32, ptr %18, align 4, !tbaa !5
  %281 = load i32, ptr %19, align 4, !tbaa !5
  %282 = mul nsw i32 %280, %281
  %283 = load i32, ptr %20, align 4, !tbaa !5
  %284 = mul nsw i32 %282, %283
  %285 = load i32, ptr %20, align 4, !tbaa !5
  %286 = mul nsw i32 %284, %285
  %287 = sext i32 %286 to i64
  %288 = call noalias ptr @calloc(i64 noundef %287, i64 noundef 4) #7
  %289 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 113
  store ptr %288, ptr %289, align 8, !tbaa !57
  %290 = load i32, ptr %18, align 4, !tbaa !5
  %291 = load i32, ptr %19, align 4, !tbaa !5
  %292 = mul nsw i32 %290, %291
  %293 = load i32, ptr %20, align 4, !tbaa !5
  %294 = mul nsw i32 %292, %293
  %295 = load i32, ptr %20, align 4, !tbaa !5
  %296 = mul nsw i32 %294, %295
  %297 = sext i32 %296 to i64
  %298 = call noalias ptr @calloc(i64 noundef %297, i64 noundef 4) #7
  %299 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 114
  store ptr %298, ptr %299, align 8, !tbaa !58
  br label %300

300:                                              ; preds = %278, %275
  %301 = call i64 @get_workspace_size(ptr noundef byval(%struct.layer) align 8 %0)
  %302 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 135
  store i64 %301, ptr %302, align 8, !tbaa !59
  %303 = load i32, ptr %23, align 4, !tbaa !5
  %304 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 1
  store i32 %303, ptr %304, align 4, !tbaa !60
  %305 = load ptr, ptr @stderr, align 8, !tbaa !61
  %306 = load i32, ptr %19, align 4, !tbaa !5
  %307 = load i32, ptr %20, align 4, !tbaa !5
  %308 = load i32, ptr %20, align 4, !tbaa !5
  %309 = load i32, ptr %21, align 4, !tbaa !5
  %310 = load i32, ptr %17, align 4, !tbaa !5
  %311 = load i32, ptr %16, align 4, !tbaa !5
  %312 = load i32, ptr %18, align 4, !tbaa !5
  %313 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 21
  %314 = load i32, ptr %313, align 8, !tbaa !33
  %315 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 20
  %316 = load i32, ptr %315, align 4, !tbaa !32
  %317 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 22
  %318 = load i32, ptr %317, align 4, !tbaa !34
  %319 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %305, ptr noundef @.str, i32 noundef %306, i32 noundef %307, i32 noundef %308, i32 noundef %309, i32 noundef %310, i32 noundef %311, i32 noundef %312, i32 noundef %314, i32 noundef %316, i32 noundef %318) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #6
  ret void
}

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

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

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

declare float @rand_uniform(float noundef, float noundef) #5

; Function Attrs: nounwind uwtable
declare dso_local void @forward_convolutional_layer(ptr noundef byval(%struct.layer) align 8, ptr noundef byval(%struct.network_state) align 8) #1

; Function Attrs: nounwind uwtable
declare dso_local void @backward_convolutional_layer(ptr noundef byval(%struct.layer) align 8, ptr noundef byval(%struct.network_state) align 8) #1

; Function Attrs: nounwind uwtable
declare dso_local void @update_convolutional_layer(ptr noundef byval(%struct.layer) align 8, i32 noundef, float noundef, float noundef, float noundef) #1

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #4

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"layer", !6, i64 0, !6, i64 4, !6, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !11, i64 56, !6, i64 64, !6, i64 68, !6, i64 72, !6, i64 76, !6, i64 80, !6, i64 84, !6, i64 88, !6, i64 92, !6, i64 96, !6, i64 100, !6, i64 104, !6, i64 108, !6, i64 112, !6, i64 116, !6, i64 120, !6, i64 124, !6, i64 128, !6, i64 132, !6, i64 136, !6, i64 140, !6, i64 144, !6, i64 148, !6, i64 152, !6, i64 156, !6, i64 160, !6, i64 164, !6, i64 168, !6, i64 172, !6, i64 176, !12, i64 180, !12, i64 184, !12, i64 188, !12, i64 192, !12, i64 196, !12, i64 200, !12, i64 204, !6, i64 208, !6, i64 212, !6, i64 216, !6, i64 220, !6, i64 224, !6, i64 228, !6, i64 232, !6, i64 236, !6, i64 240, !6, i64 244, !6, i64 248, !6, i64 252, !12, i64 256, !12, i64 260, !12, i64 264, !6, i64 268, !12, i64 272, !12, i64 276, !12, i64 280, !12, i64 284, !12, i64 288, !12, i64 292, !12, i64 296, !6, i64 300, !6, i64 304, !12, i64 308, !6, i64 312, !6, i64 316, !6, i64 320, !6, i64 324, !12, i64 328, !12, i64 332, !12, i64 336, !11, i64 344, !11, i64 352, !11, i64 360, !11, i64 368, !11, i64 376, !11, i64 384, !11, i64 392, !11, i64 400, !11, i64 408, !11, i64 416, !11, i64 424, !11, i64 432, !11, i64 440, !11, i64 448, !11, i64 456, !11, i64 464, !11, i64 472, !11, i64 480, !11, i64 488, !11, i64 496, !11, i64 504, !11, i64 512, !11, i64 520, !11, i64 528, !11, i64 536, !11, i64 544, !11, i64 552, !11, i64 560, !11, i64 568, !11, i64 576, !11, i64 584, !11, i64 592, !11, i64 600, !11, i64 608, !11, i64 616, !11, i64 624, !11, i64 632, !11, i64 640, !11, i64 648, !11, i64 656, !11, i64 664, !11, i64 672, !11, i64 680, !11, i64 688, !11, i64 696, !11, i64 704, !11, i64 712, !11, i64 720, !11, i64 728, !11, i64 736, !11, i64 744, !11, i64 752, !11, i64 760, !11, i64 768, !11, i64 776, !11, i64 784, !11, i64 792, !13, i64 800}
!11 = !{!"any pointer", !7, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!"long", !7, i64 0}
!14 = !{!10, !6, i64 96}
!15 = !{!10, !6, i64 100}
!16 = !{!10, !6, i64 104}
!17 = !{!10, !6, i64 120}
!18 = !{!10, !6, i64 164}
!19 = !{!10, !6, i64 168}
!20 = !{!10, !6, i64 72}
!21 = !{!10, !6, i64 140}
!22 = !{!10, !6, i64 132}
!23 = !{!10, !6, i64 148}
!24 = !{!10, !6, i64 64}
!25 = !{!10, !11, i64 496}
!26 = !{!10, !11, i64 504}
!27 = !{!10, !11, i64 464}
!28 = !{!10, !11, i64 472}
!29 = !{!12, !12, i64 0}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}
!32 = !{!10, !6, i64 108}
!33 = !{!10, !6, i64 112}
!34 = !{!10, !6, i64 116}
!35 = !{!10, !6, i64 88}
!36 = !{!10, !6, i64 84}
!37 = !{!10, !11, i64 528}
!38 = !{!10, !11, i64 520}
!39 = !{!10, !11, i64 16}
!40 = !{!10, !11, i64 24}
!41 = !{!10, !11, i64 32}
!42 = !{!10, !11, i64 456}
!43 = !{!10, !11, i64 344}
!44 = !{!10, !11, i64 480}
!45 = !{!10, !11, i64 664}
!46 = !{!10, !11, i64 488}
!47 = distinct !{!47, !31}
!48 = !{!10, !11, i64 560}
!49 = !{!10, !11, i64 568}
!50 = !{!10, !11, i64 576}
!51 = !{!10, !11, i64 584}
!52 = !{!10, !11, i64 592}
!53 = !{!10, !11, i64 600}
!54 = !{!10, !11, i64 608}
!55 = !{!10, !11, i64 616}
!56 = !{!10, !6, i64 252}
!57 = !{!10, !11, i64 624}
!58 = !{!10, !11, i64 632}
!59 = !{!10, !13, i64 800}
!60 = !{!10, !6, i64 4}
!61 = !{!11, !11, i64 0}


; 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.layer = type { i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, float, float, float, float, float, float, float, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, float, float, float, i32, float, float, float, float, float, float, float, i32, i32, float, i32, i32, i32, i32, float, float, float, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i64 }
%struct.network_state = type { ptr, ptr, ptr, ptr, i32, i32, %struct.network }
%struct.network = type { ptr, i32, i32, ptr, float, i32, float, float, ptr, i32, ptr, i32, float, float, float, float, i32, i32, i32, ptr, ptr, i32, i32, i32, float, float, float, i32, i32, i32, i32, i32, i32, float, float, float, float, float, i32, ptr }

@stderr = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [60 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local i32 @convolutional_out_height(ptr noundef byval(%struct.layer) align 8) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @convolutional_out_width(ptr noundef byval(%struct.layer) align 8) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local i64 @get_workspace_size(ptr noundef byval(%struct.layer) align 8) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local void @make_convolutional_layer(ptr dead_on_unwind noalias writable sret(%struct.layer) align 8 %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5, i32 noundef %6, i32 noundef %7, i32 noundef %8, i32 noundef %9, i32 noundef %10, i32 noundef %11, i32 noundef %12, i32 noundef %13) local_unnamed_addr #0 {
  %15 = getelementptr inbounds i8, ptr %0, i64 96
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(808) %0, i8 0, i64 808, i1 false)
  store i32 %2, ptr %15, align 8, !tbaa !5
  %16 = getelementptr inbounds i8, ptr %0, i64 100
  store i32 %3, ptr %16, align 4, !tbaa !13
  %17 = getelementptr inbounds i8, ptr %0, i64 104
  store i32 %4, ptr %17, align 8, !tbaa !14
  %18 = getelementptr inbounds i8, ptr %0, i64 120
  store i32 %5, ptr %18, align 8, !tbaa !15
  %19 = getelementptr inbounds i8, ptr %0, i64 164
  store i32 %11, ptr %19, align 4, !tbaa !16
  %20 = getelementptr inbounds i8, ptr %0, i64 168
  store i32 %12, ptr %20, align 8, !tbaa !17
  %21 = getelementptr inbounds i8, ptr %0, i64 72
  store i32 %1, ptr %21, align 8, !tbaa !18
  %22 = getelementptr inbounds i8, ptr %0, i64 140
  store i32 %7, ptr %22, align 4, !tbaa !19
  %23 = getelementptr inbounds i8, ptr %0, i64 132
  store i32 %6, ptr %23, align 4, !tbaa !20
  %24 = getelementptr inbounds i8, ptr %0, i64 148
  store i32 %8, ptr %24, align 4, !tbaa !21
  %25 = getelementptr inbounds i8, ptr %0, i64 64
  store i32 %10, ptr %25, align 8, !tbaa !22
  %26 = mul i32 %6, %4
  %27 = mul i32 %26, %5
  %28 = mul nsw i32 %27, %6
  %29 = sext i32 %28 to i64
  %30 = tail call noalias ptr @calloc(i64 noundef %29, i64 noundef 4) #6
  %31 = getelementptr inbounds i8, ptr %0, i64 496
  store ptr %30, ptr %31, align 8, !tbaa !23
  %32 = tail call noalias ptr @calloc(i64 noundef %29, i64 noundef 4) #6
  %33 = getelementptr inbounds i8, ptr %0, i64 504
  store ptr %32, ptr %33, align 8, !tbaa !24
  %34 = sext i32 %5 to i64
  %35 = tail call noalias ptr @calloc(i64 noundef %34, i64 noundef 4) #6
  %36 = getelementptr inbounds i8, ptr %0, i64 464
  store ptr %35, ptr %36, align 8, !tbaa !25
  %37 = tail call noalias ptr @calloc(i64 noundef %34, i64 noundef 4) #6
  %38 = getelementptr inbounds i8, ptr %0, i64 472
  store ptr %37, ptr %38, align 8, !tbaa !26
  %39 = mul i32 %26, %6
  %40 = sitofp i32 %39 to double
  %41 = fdiv double 2.000000e+00, %40
  %42 = tail call double @sqrt(double noundef %41) #7
  %43 = fptrunc double %42 to float
  %44 = icmp sgt i32 %28, 0
  br i1 %44, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %14
  %wide.trip.count = zext nneg i32 %28 to i64
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  %45 = tail call float @rand_uniform(float noundef -1.000000e+00, float noundef 1.000000e+00) #7
  %46 = fmul float %45, %43
  %47 = load ptr, ptr %31, align 8, !tbaa !23
  %48 = getelementptr inbounds float, ptr %47, i64 %indvars.iv
  store float %46, ptr %48, align 4, !tbaa !27
  %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, label %.lr.ph, !llvm.loop !28

._crit_edge:                                      ; preds = %.lr.ph, %14
  %49 = tail call i32 @convolutional_out_height(ptr noundef nonnull byval(%struct.layer) align 8 %0)
  %50 = tail call i32 @convolutional_out_width(ptr noundef nonnull byval(%struct.layer) align 8 %0)
  %51 = getelementptr inbounds i8, ptr %0, i64 108
  store i32 %49, ptr %51, align 4, !tbaa !30
  %52 = getelementptr inbounds i8, ptr %0, i64 112
  store i32 %50, ptr %52, align 8, !tbaa !31
  %53 = getelementptr inbounds i8, ptr %0, i64 116
  store i32 %5, ptr %53, align 4, !tbaa !32
  %54 = mul i32 %49, %5
  %55 = mul i32 %54, %50
  %56 = getelementptr inbounds i8, ptr %0, i64 88
  store i32 %55, ptr %56, align 8, !tbaa !33
  %57 = load i32, ptr %16, align 4, !tbaa !13
  %58 = load i32, ptr %15, align 8, !tbaa !5
  %59 = mul nsw i32 %58, %57
  %60 = load i32, ptr %17, align 8, !tbaa !14
  %61 = mul nsw i32 %59, %60
  %62 = getelementptr inbounds i8, ptr %0, i64 84
  store i32 %61, ptr %62, align 4, !tbaa !34
  %63 = load i32, ptr %21, align 8, !tbaa !18
  %64 = mul nsw i32 %63, %55
  %65 = sext i32 %64 to i64
  %66 = tail call noalias ptr @calloc(i64 noundef %65, i64 noundef 4) #6
  %67 = getelementptr inbounds i8, ptr %0, i64 528
  store ptr %66, ptr %67, align 8, !tbaa !35
  %68 = tail call noalias ptr @calloc(i64 noundef %65, i64 noundef 4) #6
  %69 = getelementptr inbounds i8, ptr %0, i64 520
  store ptr %68, ptr %69, align 8, !tbaa !36
  %70 = getelementptr inbounds i8, ptr %0, i64 16
  store ptr @forward_convolutional_layer, ptr %70, align 8, !tbaa !37
  %71 = getelementptr inbounds i8, ptr %0, i64 24
  store ptr @backward_convolutional_layer, ptr %71, align 8, !tbaa !38
  %72 = getelementptr inbounds i8, ptr %0, i64 32
  store ptr @update_convolutional_layer, ptr %72, align 8, !tbaa !39
  %.not = icmp eq i32 %11, 0
  br i1 %.not, label %80, label %73

73:                                               ; preds = %._crit_edge
  %74 = tail call noalias ptr @calloc(i64 noundef %29, i64 noundef 4) #6
  %75 = getelementptr inbounds i8, ptr %0, i64 456
  store ptr %74, ptr %75, align 8, !tbaa !40
  %76 = tail call noalias ptr @calloc(i64 noundef %29, i64 noundef 1) #6
  %77 = getelementptr inbounds i8, ptr %0, i64 344
  store ptr %76, ptr %77, align 8, !tbaa !41
  %78 = tail call noalias ptr @calloc(i64 noundef %34, i64 noundef 4) #6
  %79 = getelementptr inbounds i8, ptr %0, i64 480
  store ptr %78, ptr %79, align 8, !tbaa !42
  br label %80

80:                                               ; preds = %73, %._crit_edge
  %.not79 = icmp eq i32 %12, 0
  br i1 %.not79, label %88, label %81

81:                                               ; preds = %80
  %82 = tail call noalias ptr @calloc(i64 noundef %29, i64 noundef 4) #6
  %83 = getelementptr inbounds i8, ptr %0, i64 456
  store ptr %82, ptr %83, align 8, !tbaa !40
  %84 = mul nsw i32 %63, %61
  %85 = sext i32 %84 to i64
  %86 = tail call noalias ptr @calloc(i64 noundef %85, i64 noundef 4) #6
  %87 = getelementptr inbounds i8, ptr %0, i64 664
  store ptr %86, ptr %87, align 8, !tbaa !43
  br label %88

88:                                               ; preds = %81, %80
  %.not80 = icmp eq i32 %10, 0
  br i1 %.not80, label %115, label %89

89:                                               ; preds = %88
  %90 = tail call noalias ptr @calloc(i64 noundef %34, i64 noundef 4) #6
  %91 = getelementptr inbounds i8, ptr %0, i64 480
  store ptr %90, ptr %91, align 8, !tbaa !42
  %92 = tail call noalias ptr @calloc(i64 noundef %34, i64 noundef 4) #6
  %93 = getelementptr inbounds i8, ptr %0, i64 488
  store ptr %92, ptr %93, align 8, !tbaa !44
  %94 = icmp sgt i32 %5, 0
  br i1 %94, label %.lr.ph85.preheader, label %._crit_edge86

.lr.ph85.preheader:                               ; preds = %89
  %wide.trip.count91 = zext nneg i32 %5 to i64
  %min.iters.check = icmp ult i32 %5, 8
  br i1 %min.iters.check, label %.lr.ph85.preheader93, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph85.preheader
  %n.vec = and i64 %wide.trip.count91, 2147483640
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %95 = getelementptr inbounds float, ptr %90, i64 %index
  %96 = getelementptr inbounds i8, ptr %95, i64 16
  store <4 x float> <float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00>, ptr %95, align 4, !tbaa !27
  store <4 x float> <float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00>, ptr %96, align 4, !tbaa !27
  %index.next = add nuw i64 %index, 8
  %97 = icmp eq i64 %index.next, %n.vec
  br i1 %97, label %middle.block, label %vector.body, !llvm.loop !45

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count91
  br i1 %cmp.n, label %._crit_edge86, label %.lr.ph85.preheader93

.lr.ph85.preheader93:                             ; preds = %middle.block, %.lr.ph85.preheader
  %indvars.iv88.ph = phi i64 [ 0, %.lr.ph85.preheader ], [ %n.vec, %middle.block ]
  br label %.lr.ph85

.lr.ph85:                                         ; preds = %.lr.ph85.preheader93, %.lr.ph85
  %indvars.iv88 = phi i64 [ %indvars.iv.next89, %.lr.ph85 ], [ %indvars.iv88.ph, %.lr.ph85.preheader93 ]
  %98 = getelementptr inbounds float, ptr %90, i64 %indvars.iv88
  store float 1.000000e+00, ptr %98, align 4, !tbaa !27
  %indvars.iv.next89 = add nuw nsw i64 %indvars.iv88, 1
  %exitcond92.not = icmp eq i64 %indvars.iv.next89, %wide.trip.count91
  br i1 %exitcond92.not, label %._crit_edge86, label %.lr.ph85, !llvm.loop !48

._crit_edge86:                                    ; preds = %.lr.ph85, %middle.block, %89
  %99 = tail call noalias ptr @calloc(i64 noundef %34, i64 noundef 4) #6
  %100 = getelementptr inbounds i8, ptr %0, i64 560
  store ptr %99, ptr %100, align 8, !tbaa !49
  %101 = tail call noalias ptr @calloc(i64 noundef %34, i64 noundef 4) #6
  %102 = getelementptr inbounds i8, ptr %0, i64 568
  store ptr %101, ptr %102, align 8, !tbaa !50
  %103 = tail call noalias ptr @calloc(i64 noundef %34, i64 noundef 4) #6
  %104 = getelementptr inbounds i8, ptr %0, i64 576
  store ptr %103, ptr %104, align 8, !tbaa !51
  %105 = tail call noalias ptr @calloc(i64 noundef %34, i64 noundef 4) #6
  %106 = getelementptr inbounds i8, ptr %0, i64 584
  store ptr %105, ptr %106, align 8, !tbaa !52
  %107 = tail call noalias ptr @calloc(i64 noundef %34, i64 noundef 4) #6
  %108 = getelementptr inbounds i8, ptr %0, i64 592
  store ptr %107, ptr %108, align 8, !tbaa !53
  %109 = tail call noalias ptr @calloc(i64 noundef %34, i64 noundef 4) #6
  %110 = getelementptr inbounds i8, ptr %0, i64 600
  store ptr %109, ptr %110, align 8, !tbaa !54
  %111 = tail call noalias ptr @calloc(i64 noundef %65, i64 noundef 4) #6
  %112 = getelementptr inbounds i8, ptr %0, i64 608
  store ptr %111, ptr %112, align 8, !tbaa !55
  %113 = tail call noalias ptr @calloc(i64 noundef %65, i64 noundef 4) #6
  %114 = getelementptr inbounds i8, ptr %0, i64 616
  store ptr %113, ptr %114, align 8, !tbaa !56
  br label %115

115:                                              ; preds = %._crit_edge86, %88
  %.not81 = icmp eq i32 %13, 0
  br i1 %.not81, label %122, label %116

116:                                              ; preds = %115
  %117 = getelementptr inbounds i8, ptr %0, i64 252
  store i32 1, ptr %117, align 4, !tbaa !57
  %118 = tail call noalias ptr @calloc(i64 noundef %29, i64 noundef 4) #6
  %119 = getelementptr inbounds i8, ptr %0, i64 624
  store ptr %118, ptr %119, align 8, !tbaa !58
  %120 = tail call noalias ptr @calloc(i64 noundef %29, i64 noundef 4) #6
  %121 = getelementptr inbounds i8, ptr %0, i64 632
  store ptr %120, ptr %121, align 8, !tbaa !59
  br label %122

122:                                              ; preds = %116, %115
  %123 = tail call i64 @get_workspace_size(ptr noundef nonnull byval(%struct.layer) align 8 %0)
  %124 = getelementptr inbounds i8, ptr %0, i64 800
  store i64 %123, ptr %124, align 8, !tbaa !60
  %125 = getelementptr inbounds i8, ptr %0, i64 4
  store i32 %9, ptr %125, align 4, !tbaa !61
  %126 = load ptr, ptr @stderr, align 8, !tbaa !62
  %127 = load i32, ptr %52, align 8, !tbaa !31
  %128 = load i32, ptr %51, align 4, !tbaa !30
  %129 = load i32, ptr %53, align 4, !tbaa !32
  %130 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %126, ptr noundef nonnull @.str, i32 noundef %5, i32 noundef %6, i32 noundef %6, i32 noundef %7, i32 noundef %3, i32 noundef %2, i32 noundef %4, i32 noundef %127, i32 noundef %128, i32 noundef %129) #8
  ret void
}

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

; 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 #2

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

declare float @rand_uniform(float noundef, float noundef) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
declare dso_local void @forward_convolutional_layer(ptr noundef byval(%struct.layer) align 8, ptr noundef byval(%struct.network_state) align 8) #0

; Function Attrs: nounwind uwtable
declare dso_local void @backward_convolutional_layer(ptr noundef byval(%struct.layer) align 8, ptr noundef byval(%struct.network_state) align 8) #0

; Function Attrs: nounwind uwtable
declare dso_local void @update_convolutional_layer(ptr noundef byval(%struct.layer) align 8, i32 noundef, float noundef, float noundef, float noundef) #0

; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { 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 #3 = { 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 #4 = { "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 = { nofree 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 allocsize(0,1) }
attributes #7 = { nounwind }
attributes #8 = { cold 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 96}
!6 = !{!"layer", !7, i64 0, !7, i64 4, !7, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !7, i64 64, !7, i64 68, !7, i64 72, !7, i64 76, !7, i64 80, !7, i64 84, !7, i64 88, !7, i64 92, !7, i64 96, !7, i64 100, !7, i64 104, !7, i64 108, !7, i64 112, !7, i64 116, !7, i64 120, !7, i64 124, !7, i64 128, !7, i64 132, !7, i64 136, !7, i64 140, !7, i64 144, !7, i64 148, !7, i64 152, !7, i64 156, !7, i64 160, !7, i64 164, !7, i64 168, !7, i64 172, !7, i64 176, !11, i64 180, !11, i64 184, !11, i64 188, !11, i64 192, !11, i64 196, !11, i64 200, !11, i64 204, !7, i64 208, !7, i64 212, !7, i64 216, !7, i64 220, !7, i64 224, !7, i64 228, !7, i64 232, !7, i64 236, !7, i64 240, !7, i64 244, !7, i64 248, !7, i64 252, !11, i64 256, !11, i64 260, !11, i64 264, !7, i64 268, !11, i64 272, !11, i64 276, !11, i64 280, !11, i64 284, !11, i64 288, !11, i64 292, !11, i64 296, !7, i64 300, !7, i64 304, !11, i64 308, !7, i64 312, !7, i64 316, !7, i64 320, !7, i64 324, !11, i64 328, !11, i64 332, !11, i64 336, !10, i64 344, !10, i64 352, !10, i64 360, !10, i64 368, !10, i64 376, !10, i64 384, !10, i64 392, !10, i64 400, !10, i64 408, !10, i64 416, !10, i64 424, !10, i64 432, !10, i64 440, !10, i64 448, !10, i64 456, !10, i64 464, !10, i64 472, !10, i64 480, !10, i64 488, !10, i64 496, !10, i64 504, !10, i64 512, !10, i64 520, !10, i64 528, !10, i64 536, !10, i64 544, !10, i64 552, !10, i64 560, !10, i64 568, !10, i64 576, !10, i64 584, !10, i64 592, !10, i64 600, !10, i64 608, !10, i64 616, !10, i64 624, !10, i64 632, !10, i64 640, !10, i64 648, !10, i64 656, !10, i64 664, !10, i64 672, !10, i64 680, !10, i64 688, !10, i64 696, !10, i64 704, !10, i64 712, !10, i64 720, !10, i64 728, !10, i64 736, !10, i64 744, !10, i64 752, !10, i64 760, !10, i64 768, !10, i64 776, !10, i64 784, !10, i64 792, !12, i64 800}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"float", !8, i64 0}
!12 = !{!"long", !8, i64 0}
!13 = !{!6, !7, i64 100}
!14 = !{!6, !7, i64 104}
!15 = !{!6, !7, i64 120}
!16 = !{!6, !7, i64 164}
!17 = !{!6, !7, i64 168}
!18 = !{!6, !7, i64 72}
!19 = !{!6, !7, i64 140}
!20 = !{!6, !7, i64 132}
!21 = !{!6, !7, i64 148}
!22 = !{!6, !7, i64 64}
!23 = !{!6, !10, i64 496}
!24 = !{!6, !10, i64 504}
!25 = !{!6, !10, i64 464}
!26 = !{!6, !10, i64 472}
!27 = !{!11, !11, i64 0}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}
!30 = !{!6, !7, i64 108}
!31 = !{!6, !7, i64 112}
!32 = !{!6, !7, i64 116}
!33 = !{!6, !7, i64 88}
!34 = !{!6, !7, i64 84}
!35 = !{!6, !10, i64 528}
!36 = !{!6, !10, i64 520}
!37 = !{!6, !10, i64 16}
!38 = !{!6, !10, i64 24}
!39 = !{!6, !10, i64 32}
!40 = !{!6, !10, i64 456}
!41 = !{!6, !10, i64 344}
!42 = !{!6, !10, i64 480}
!43 = !{!6, !10, i64 664}
!44 = !{!6, !10, i64 488}
!45 = distinct !{!45, !29, !46, !47}
!46 = !{!"llvm.loop.isvectorized", i32 1}
!47 = !{!"llvm.loop.unroll.runtime.disable"}
!48 = distinct !{!48, !29, !47, !46}
!49 = !{!6, !10, i64 560}
!50 = !{!6, !10, i64 568}
!51 = !{!6, !10, i64 576}
!52 = !{!6, !10, i64 584}
!53 = !{!6, !10, i64 592}
!54 = !{!6, !10, i64 600}
!55 = !{!6, !10, i64 608}
!56 = !{!6, !10, i64 616}
!57 = !{!6, !7, i64 252}
!58 = !{!6, !10, i64 624}
!59 = !{!6, !10, i64 632}
!60 = !{!6, !12, i64 800}
!61 = !{!6, !7, i64 4}
!62 = !{!10, !10, i64 0}


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