; LLVM IR from hans-ob1/neural_cam_ros :: src/detector (cost_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 }

; Function Attrs: nounwind uwtable
define dso_local void @forward_cost_layer(ptr noundef byval(%struct.layer) align 8 %0, ptr noundef byval(%struct.network_state) align 8 %1) #0 {
  %3 = alloca i32, align 4
  %4 = getelementptr inbounds %struct.network_state, ptr %1, i32 0, i32 0
  %5 = load ptr, ptr %4, align 8, !tbaa !5
  %6 = icmp ne ptr %5, null
  br i1 %6, label %8, label %7

7:                                                ; preds = %2
  br label %84

8:                                                ; preds = %2
  %9 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 2
  %10 = load i32, ptr %9, align 8, !tbaa !13
  %11 = icmp eq i32 %10, 1
  br i1 %11, label %12, label %40

12:                                               ; preds = %8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #3
  store i32 0, ptr %3, align 4, !tbaa !16
  br label %13

13:                                               ; preds = %36, %12
  %14 = load i32, ptr %3, align 4, !tbaa !16
  %15 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 11
  %16 = load i32, ptr %15, align 8, !tbaa !17
  %17 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 14
  %18 = load i32, ptr %17, align 4, !tbaa !18
  %19 = mul nsw i32 %16, %18
  %20 = icmp slt i32 %14, %19
  br i1 %20, label %21, label %39

21:                                               ; preds = %13
  %22 = getelementptr inbounds %struct.network_state, ptr %1, i32 0, i32 0
  %23 = load ptr, ptr %22, align 8, !tbaa !5
  %24 = load i32, ptr %3, align 4, !tbaa !16
  %25 = sext i32 %24 to i64
  %26 = getelementptr inbounds float, ptr %23, i64 %25
  %27 = load float, ptr %26, align 4, !tbaa !19
  %28 = fcmp oeq float %27, -1.234000e+03
  br i1 %28, label %29, label %35

29:                                               ; preds = %21
  %30 = getelementptr inbounds %struct.network_state, ptr %1, i32 0, i32 1
  %31 = load ptr, ptr %30, align 8, !tbaa !20
  %32 = load i32, ptr %3, align 4, !tbaa !16
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds float, ptr %31, i64 %33
  store float -1.234000e+03, ptr %34, align 4, !tbaa !19
  br label %35

35:                                               ; preds = %29, %21
  br label %36

36:                                               ; preds = %35
  %37 = load i32, ptr %3, align 4, !tbaa !16
  %38 = add nsw i32 %37, 1
  store i32 %38, ptr %3, align 4, !tbaa !16
  br label %13, !llvm.loop !21

39:                                               ; preds = %13
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #3
  br label %40

40:                                               ; preds = %39, %8
  %41 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 2
  %42 = load i32, ptr %41, align 8, !tbaa !13
  %43 = icmp eq i32 %42, 2
  br i1 %43, label %44, label %58

44:                                               ; preds = %40
  %45 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 11
  %46 = load i32, ptr %45, align 8, !tbaa !17
  %47 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 14
  %48 = load i32, ptr %47, align 4, !tbaa !18
  %49 = mul nsw i32 %46, %48
  %50 = getelementptr inbounds %struct.network_state, ptr %1, i32 0, i32 1
  %51 = load ptr, ptr %50, align 8, !tbaa !20
  %52 = getelementptr inbounds %struct.network_state, ptr %1, i32 0, i32 0
  %53 = load ptr, ptr %52, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 100
  %55 = load ptr, ptr %54, align 8, !tbaa !23
  %56 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 101
  %57 = load ptr, ptr %56, align 8, !tbaa !24
  call void @smooth_l1_cpu(i32 noundef %49, ptr noundef %51, ptr noundef %53, ptr noundef %55, ptr noundef %57)
  br label %72

58:                                               ; preds = %40
  %59 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 11
  %60 = load i32, ptr %59, align 8, !tbaa !17
  %61 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 14
  %62 = load i32, ptr %61, align 4, !tbaa !18
  %63 = mul nsw i32 %60, %62
  %64 = getelementptr inbounds %struct.network_state, ptr %1, i32 0, i32 1
  %65 = load ptr, ptr %64, align 8, !tbaa !20
  %66 = getelementptr inbounds %struct.network_state, ptr %1, i32 0, i32 0
  %67 = load ptr, ptr %66, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 100
  %69 = load ptr, ptr %68, align 8, !tbaa !23
  %70 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 101
  %71 = load ptr, ptr %70, align 8, !tbaa !24
  call void @l2_cpu(i32 noundef %63, ptr noundef %65, ptr noundef %67, ptr noundef %69, ptr noundef %71)
  br label %72

72:                                               ; preds = %58, %44
  %73 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 101
  %74 = load ptr, ptr %73, align 8, !tbaa !24
  %75 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 11
  %76 = load i32, ptr %75, align 8, !tbaa !17
  %77 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 14
  %78 = load i32, ptr %77, align 4, !tbaa !18
  %79 = mul nsw i32 %76, %78
  %80 = call float @sum_array(ptr noundef %74, i32 noundef %79)
  %81 = getelementptr inbounds %struct.layer, ptr %0, i32 0, i32 84
  %82 = load ptr, ptr %81, align 8, !tbaa !25
  %83 = getelementptr inbounds float, ptr %82, i64 0
  store float %80, ptr %83, align 4, !tbaa !19
  br label %84

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

declare void @smooth_l1_cpu(i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

declare void @l2_cpu(i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

declare float @sum_array(ptr noundef, i32 noundef) #2

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 = { "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 }

!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 = !{!"network_state", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !10, i64 32, !10, i64 36, !11, i64 40}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"network", !7, i64 0, !10, i64 8, !10, i64 12, !7, i64 16, !12, i64 24, !10, i64 28, !12, i64 32, !12, i64 36, !7, i64 40, !10, i64 48, !7, i64 56, !10, i64 64, !12, i64 68, !12, i64 72, !12, i64 76, !12, i64 80, !10, i64 84, !10, i64 88, !10, i64 92, !7, i64 96, !7, i64 104, !10, i64 112, !10, i64 116, !10, i64 120, !12, i64 124, !12, i64 128, !12, i64 132, !10, i64 136, !10, i64 140, !10, i64 144, !10, i64 148, !10, i64 152, !10, i64 156, !12, i64 160, !12, i64 164, !12, i64 168, !12, i64 172, !12, i64 176, !10, i64 180, !7, i64 184}
!12 = !{!"float", !8, i64 0}
!13 = !{!14, !10, i64 8}
!14 = !{!"layer", !10, i64 0, !10, i64 4, !10, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !10, i64 64, !10, i64 68, !10, i64 72, !10, i64 76, !10, i64 80, !10, i64 84, !10, i64 88, !10, i64 92, !10, i64 96, !10, i64 100, !10, i64 104, !10, i64 108, !10, i64 112, !10, i64 116, !10, i64 120, !10, i64 124, !10, i64 128, !10, i64 132, !10, i64 136, !10, i64 140, !10, i64 144, !10, i64 148, !10, i64 152, !10, i64 156, !10, i64 160, !10, i64 164, !10, i64 168, !10, i64 172, !10, i64 176, !12, i64 180, !12, i64 184, !12, i64 188, !12, i64 192, !12, i64 196, !12, i64 200, !12, i64 204, !10, i64 208, !10, i64 212, !10, i64 216, !10, i64 220, !10, i64 224, !10, i64 228, !10, i64 232, !10, i64 236, !10, i64 240, !10, i64 244, !10, i64 248, !10, i64 252, !12, i64 256, !12, i64 260, !12, i64 264, !10, i64 268, !12, i64 272, !12, i64 276, !12, i64 280, !12, i64 284, !12, i64 288, !12, i64 292, !12, i64 296, !10, i64 300, !10, i64 304, !12, i64 308, !10, i64 312, !10, i64 316, !10, i64 320, !10, i64 324, !12, i64 328, !12, i64 332, !12, i64 336, !7, i64 344, !7, i64 352, !7, i64 360, !7, i64 368, !7, i64 376, !7, i64 384, !7, i64 392, !7, i64 400, !7, i64 408, !7, i64 416, !7, i64 424, !7, i64 432, !7, i64 440, !7, i64 448, !7, i64 456, !7, i64 464, !7, i64 472, !7, i64 480, !7, i64 488, !7, i64 496, !7, i64 504, !7, i64 512, !7, i64 520, !7, i64 528, !7, i64 536, !7, i64 544, !7, i64 552, !7, i64 560, !7, i64 568, !7, i64 576, !7, i64 584, !7, i64 592, !7, i64 600, !7, i64 608, !7, i64 616, !7, i64 624, !7, i64 632, !7, i64 640, !7, i64 648, !7, i64 656, !7, i64 664, !7, i64 672, !7, i64 680, !7, i64 688, !7, i64 696, !7, i64 704, !7, i64 712, !7, i64 720, !7, i64 728, !7, i64 736, !7, i64 744, !7, i64 752, !7, i64 760, !7, i64 768, !7, i64 776, !7, i64 784, !7, i64 792, !15, i64 800}
!15 = !{!"long", !8, i64 0}
!16 = !{!10, !10, i64 0}
!17 = !{!14, !10, i64 72}
!18 = !{!14, !10, i64 84}
!19 = !{!12, !12, i64 0}
!20 = !{!6, !7, i64 8}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = !{!14, !7, i64 520}
!24 = !{!14, !7, i64 528}
!25 = !{!14, !7, i64 392}


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

; Function Attrs: nounwind uwtable
define dso_local void @forward_cost_layer(ptr nocapture noundef readonly byval(%struct.layer) align 8 %0, ptr nocapture noundef readonly byval(%struct.network_state) align 8 %1) local_unnamed_addr #0 {
  %3 = load ptr, ptr %1, align 8, !tbaa !5
  %4 = ptrtoint ptr %3 to i64
  %.not = icmp eq ptr %3, null
  br i1 %.not, label %77, label %5

5:                                                ; preds = %2
  %6 = getelementptr inbounds i8, ptr %0, i64 8
  %7 = load i32, ptr %6, align 8, !tbaa !13
  %.phi.trans.insert = getelementptr inbounds i8, ptr %0, i64 72
  %.pre = load i32, ptr %.phi.trans.insert, align 8, !tbaa !16
  %.phi.trans.insert6 = getelementptr inbounds i8, ptr %0, i64 84
  %.pre7 = load i32, ptr %.phi.trans.insert6, align 4, !tbaa !17
  %.pre8 = mul i32 %.pre7, %.pre
  switch i32 %7, label %._crit_edge [
    i32 1, label %.preheader
    i32 2, label %59
  ]

.preheader:                                       ; preds = %5
  %8 = icmp sgt i32 %.pre8, 0
  br i1 %8, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.preheader
  %9 = getelementptr inbounds i8, ptr %1, i64 8
  %10 = load ptr, ptr %9, align 8
  %wide.trip.count = zext nneg i32 %.pre8 to i64
  %min.iters.check = icmp ult i32 %.pre8, 8
  %11 = ptrtoint ptr %10 to i64
  %12 = sub i64 %11, %4
  %diff.check = icmp ult i64 %12, 32
  %or.cond = select i1 %min.iters.check, i1 true, i1 %diff.check
  br i1 %or.cond, label %scalar.ph.preheader, label %vector.ph

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

vector.body:                                      ; preds = %pred.store.continue24, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %pred.store.continue24 ]
  %13 = or disjoint i64 %index, 4
  %14 = getelementptr inbounds float, ptr %3, i64 %index
  %15 = getelementptr inbounds i8, ptr %14, i64 16
  %wide.load = load <4 x float>, ptr %14, align 4, !tbaa !18
  %wide.load10 = load <4 x float>, ptr %15, align 4, !tbaa !18
  %16 = fcmp oeq <4 x float> %wide.load, <float -1.234000e+03, float -1.234000e+03, float -1.234000e+03, float -1.234000e+03>
  %17 = fcmp oeq <4 x float> %wide.load10, <float -1.234000e+03, float -1.234000e+03, float -1.234000e+03, float -1.234000e+03>
  %18 = extractelement <4 x i1> %16, i64 0
  br i1 %18, label %pred.store.if, label %pred.store.continue

pred.store.if:                                    ; preds = %vector.body
  %19 = getelementptr inbounds float, ptr %10, i64 %index
  store float -1.234000e+03, ptr %19, align 4, !tbaa !18
  br label %pred.store.continue

pred.store.continue:                              ; preds = %pred.store.if, %vector.body
  %20 = extractelement <4 x i1> %16, i64 1
  br i1 %20, label %pred.store.if11, label %pred.store.continue12

pred.store.if11:                                  ; preds = %pred.store.continue
  %21 = or disjoint i64 %index, 1
  %22 = getelementptr inbounds float, ptr %10, i64 %21
  store float -1.234000e+03, ptr %22, align 4, !tbaa !18
  br label %pred.store.continue12

pred.store.continue12:                            ; preds = %pred.store.if11, %pred.store.continue
  %23 = extractelement <4 x i1> %16, i64 2
  br i1 %23, label %pred.store.if13, label %pred.store.continue14

pred.store.if13:                                  ; preds = %pred.store.continue12
  %24 = or disjoint i64 %index, 2
  %25 = getelementptr inbounds float, ptr %10, i64 %24
  store float -1.234000e+03, ptr %25, align 4, !tbaa !18
  br label %pred.store.continue14

pred.store.continue14:                            ; preds = %pred.store.if13, %pred.store.continue12
  %26 = extractelement <4 x i1> %16, i64 3
  br i1 %26, label %pred.store.if15, label %pred.store.continue16

pred.store.if15:                                  ; preds = %pred.store.continue14
  %27 = or disjoint i64 %index, 3
  %28 = getelementptr inbounds float, ptr %10, i64 %27
  store float -1.234000e+03, ptr %28, align 4, !tbaa !18
  br label %pred.store.continue16

pred.store.continue16:                            ; preds = %pred.store.if15, %pred.store.continue14
  %29 = extractelement <4 x i1> %17, i64 0
  br i1 %29, label %pred.store.if17, label %pred.store.continue18

pred.store.if17:                                  ; preds = %pred.store.continue16
  %30 = getelementptr inbounds float, ptr %10, i64 %13
  store float -1.234000e+03, ptr %30, align 4, !tbaa !18
  br label %pred.store.continue18

pred.store.continue18:                            ; preds = %pred.store.if17, %pred.store.continue16
  %31 = extractelement <4 x i1> %17, i64 1
  br i1 %31, label %pred.store.if19, label %pred.store.continue20

pred.store.if19:                                  ; preds = %pred.store.continue18
  %32 = or disjoint i64 %index, 5
  %33 = getelementptr inbounds float, ptr %10, i64 %32
  store float -1.234000e+03, ptr %33, align 4, !tbaa !18
  br label %pred.store.continue20

pred.store.continue20:                            ; preds = %pred.store.if19, %pred.store.continue18
  %34 = extractelement <4 x i1> %17, i64 2
  br i1 %34, label %pred.store.if21, label %pred.store.continue22

pred.store.if21:                                  ; preds = %pred.store.continue20
  %35 = or disjoint i64 %index, 6
  %36 = getelementptr inbounds float, ptr %10, i64 %35
  store float -1.234000e+03, ptr %36, align 4, !tbaa !18
  br label %pred.store.continue22

pred.store.continue22:                            ; preds = %pred.store.if21, %pred.store.continue20
  %37 = extractelement <4 x i1> %17, i64 3
  br i1 %37, label %pred.store.if23, label %pred.store.continue24

pred.store.if23:                                  ; preds = %pred.store.continue22
  %38 = or disjoint i64 %index, 7
  %39 = getelementptr inbounds float, ptr %10, i64 %38
  store float -1.234000e+03, ptr %39, align 4, !tbaa !18
  br label %pred.store.continue24

pred.store.continue24:                            ; preds = %pred.store.if23, %pred.store.continue22
  %index.next = add nuw i64 %index, 8
  %40 = icmp eq i64 %index.next, %n.vec
  br i1 %40, label %middle.block, label %vector.body, !llvm.loop !19

middle.block:                                     ; preds = %pred.store.continue24
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %._crit_edge, label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %middle.block, %.lr.ph
  %indvars.iv.ph = phi i64 [ 0, %.lr.ph ], [ %n.vec, %middle.block ]
  %xtraiter = and i64 %wide.trip.count, 1
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol

scalar.ph.prol:                                   ; preds = %scalar.ph.preheader
  %41 = getelementptr inbounds float, ptr %3, i64 %indvars.iv.ph
  %42 = load float, ptr %41, align 4, !tbaa !18
  %43 = fcmp oeq float %42, -1.234000e+03
  br i1 %43, label %44, label %scalar.ph.prol.loopexit.unr-lcssa

44:                                               ; preds = %scalar.ph.prol
  %45 = getelementptr inbounds float, ptr %10, i64 %indvars.iv.ph
  store float -1.234000e+03, ptr %45, align 4, !tbaa !18
  br label %scalar.ph.prol.loopexit.unr-lcssa

scalar.ph.prol.loopexit.unr-lcssa:                ; preds = %44, %scalar.ph.prol
  %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.loopexit.unr-lcssa, %scalar.ph.preheader
  %indvars.iv.unr = phi i64 [ %indvars.iv.ph, %scalar.ph.preheader ], [ %indvars.iv.next.prol, %scalar.ph.prol.loopexit.unr-lcssa ]
  %46 = add nsw i64 %wide.trip.count, -1
  %47 = icmp eq i64 %indvars.iv.ph, %46
  br i1 %47, label %._crit_edge, label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.prol.loopexit, %58
  %indvars.iv = phi i64 [ %indvars.iv.next.1, %58 ], [ %indvars.iv.unr, %scalar.ph.prol.loopexit ]
  %48 = getelementptr inbounds float, ptr %3, i64 %indvars.iv
  %49 = load float, ptr %48, align 4, !tbaa !18
  %50 = fcmp oeq float %49, -1.234000e+03
  br i1 %50, label %51, label %scalar.ph.1

51:                                               ; preds = %scalar.ph
  %52 = getelementptr inbounds float, ptr %10, i64 %indvars.iv
  store float -1.234000e+03, ptr %52, align 4, !tbaa !18
  br label %scalar.ph.1

scalar.ph.1:                                      ; preds = %scalar.ph, %51
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %53 = getelementptr inbounds float, ptr %3, i64 %indvars.iv.next
  %54 = load float, ptr %53, align 4, !tbaa !18
  %55 = fcmp oeq float %54, -1.234000e+03
  br i1 %55, label %56, label %58

56:                                               ; preds = %scalar.ph.1
  %57 = getelementptr inbounds float, ptr %10, i64 %indvars.iv.next
  store float -1.234000e+03, ptr %57, align 4, !tbaa !18
  br label %58

58:                                               ; preds = %56, %scalar.ph.1
  %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, label %scalar.ph, !llvm.loop !23

59:                                               ; preds = %5
  %60 = getelementptr inbounds i8, ptr %1, i64 8
  %61 = load ptr, ptr %60, align 8, !tbaa !24
  %62 = getelementptr inbounds i8, ptr %0, i64 520
  %63 = load ptr, ptr %62, align 8, !tbaa !25
  %64 = getelementptr inbounds i8, ptr %0, i64 528
  %65 = load ptr, ptr %64, align 8, !tbaa !26
  tail call void @smooth_l1_cpu(i32 noundef %.pre8, ptr noundef %61, ptr noundef nonnull %3, ptr noundef %63, ptr noundef %65) #2
  br label %72

._crit_edge:                                      ; preds = %scalar.ph.prol.loopexit, %58, %middle.block, %5, %.preheader
  %66 = getelementptr inbounds i8, ptr %1, i64 8
  %67 = load ptr, ptr %66, align 8, !tbaa !24
  %68 = getelementptr inbounds i8, ptr %0, i64 520
  %69 = load ptr, ptr %68, align 8, !tbaa !25
  %70 = getelementptr inbounds i8, ptr %0, i64 528
  %71 = load ptr, ptr %70, align 8, !tbaa !26
  tail call void @l2_cpu(i32 noundef %.pre8, ptr noundef %67, ptr noundef nonnull %3, ptr noundef %69, ptr noundef %71) #2
  br label %72

72:                                               ; preds = %._crit_edge, %59
  %73 = phi ptr [ %71, %._crit_edge ], [ %65, %59 ]
  %74 = tail call float @sum_array(ptr noundef %73, i32 noundef %.pre8) #2
  %75 = getelementptr inbounds i8, ptr %0, i64 392
  %76 = load ptr, ptr %75, align 8, !tbaa !27
  store float %74, ptr %76, align 4, !tbaa !18
  br label %77

77:                                               ; preds = %2, %72
  ret void
}

declare void @smooth_l1_cpu(i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @l2_cpu(i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare float @sum_array(ptr noundef, i32 noundef) local_unnamed_addr #1

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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind }

!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 = !{!"network_state", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !10, i64 32, !10, i64 36, !11, i64 40}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"network", !7, i64 0, !10, i64 8, !10, i64 12, !7, i64 16, !12, i64 24, !10, i64 28, !12, i64 32, !12, i64 36, !7, i64 40, !10, i64 48, !7, i64 56, !10, i64 64, !12, i64 68, !12, i64 72, !12, i64 76, !12, i64 80, !10, i64 84, !10, i64 88, !10, i64 92, !7, i64 96, !7, i64 104, !10, i64 112, !10, i64 116, !10, i64 120, !12, i64 124, !12, i64 128, !12, i64 132, !10, i64 136, !10, i64 140, !10, i64 144, !10, i64 148, !10, i64 152, !10, i64 156, !12, i64 160, !12, i64 164, !12, i64 168, !12, i64 172, !12, i64 176, !10, i64 180, !7, i64 184}
!12 = !{!"float", !8, i64 0}
!13 = !{!14, !10, i64 8}
!14 = !{!"layer", !10, i64 0, !10, i64 4, !10, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !10, i64 64, !10, i64 68, !10, i64 72, !10, i64 76, !10, i64 80, !10, i64 84, !10, i64 88, !10, i64 92, !10, i64 96, !10, i64 100, !10, i64 104, !10, i64 108, !10, i64 112, !10, i64 116, !10, i64 120, !10, i64 124, !10, i64 128, !10, i64 132, !10, i64 136, !10, i64 140, !10, i64 144, !10, i64 148, !10, i64 152, !10, i64 156, !10, i64 160, !10, i64 164, !10, i64 168, !10, i64 172, !10, i64 176, !12, i64 180, !12, i64 184, !12, i64 188, !12, i64 192, !12, i64 196, !12, i64 200, !12, i64 204, !10, i64 208, !10, i64 212, !10, i64 216, !10, i64 220, !10, i64 224, !10, i64 228, !10, i64 232, !10, i64 236, !10, i64 240, !10, i64 244, !10, i64 248, !10, i64 252, !12, i64 256, !12, i64 260, !12, i64 264, !10, i64 268, !12, i64 272, !12, i64 276, !12, i64 280, !12, i64 284, !12, i64 288, !12, i64 292, !12, i64 296, !10, i64 300, !10, i64 304, !12, i64 308, !10, i64 312, !10, i64 316, !10, i64 320, !10, i64 324, !12, i64 328, !12, i64 332, !12, i64 336, !7, i64 344, !7, i64 352, !7, i64 360, !7, i64 368, !7, i64 376, !7, i64 384, !7, i64 392, !7, i64 400, !7, i64 408, !7, i64 416, !7, i64 424, !7, i64 432, !7, i64 440, !7, i64 448, !7, i64 456, !7, i64 464, !7, i64 472, !7, i64 480, !7, i64 488, !7, i64 496, !7, i64 504, !7, i64 512, !7, i64 520, !7, i64 528, !7, i64 536, !7, i64 544, !7, i64 552, !7, i64 560, !7, i64 568, !7, i64 576, !7, i64 584, !7, i64 592, !7, i64 600, !7, i64 608, !7, i64 616, !7, i64 624, !7, i64 632, !7, i64 640, !7, i64 648, !7, i64 656, !7, i64 664, !7, i64 672, !7, i64 680, !7, i64 688, !7, i64 696, !7, i64 704, !7, i64 712, !7, i64 720, !7, i64 728, !7, i64 736, !7, i64 744, !7, i64 752, !7, i64 760, !7, i64 768, !7, i64 776, !7, i64 784, !7, i64 792, !15, i64 800}
!15 = !{!"long", !8, i64 0}
!16 = !{!14, !10, i64 72}
!17 = !{!14, !10, i64 84}
!18 = !{!12, !12, i64 0}
!19 = distinct !{!19, !20, !21, !22}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!"llvm.loop.isvectorized", i32 1}
!22 = !{!"llvm.loop.unroll.runtime.disable"}
!23 = distinct !{!23, !20, !21}
!24 = !{!6, !7, i64 8}
!25 = !{!14, !7, i64 520}
!26 = !{!14, !7, i64 528}
!27 = !{!14, !7, i64 392}


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