; LLVM IR from sbu-fsl/kernel-ml :: src/optimizers (sgd_optimizer)

; 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.square_loss_functions_struct = type { ptr, ptr, ptr, ptr }
%union.val = type { double }
%struct.sgd_optimizer = type { float, %union.val, %union.val, %union.val, ptr, ptr, ptr }
%struct.loss = type { ptr, i32 }
%struct.square_loss = type { ptr, ptr, ptr }
%struct.updates_list = type { ptr, ptr }
%struct.layers = type { ptr, ptr }
%struct.layer = type { ptr, i32, ptr, ptr }
%struct.linear_layer = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.matrix = type { i32, i32, i32, %union.anon }
%union.anon = type { ptr }
%struct.updates = type { ptr, ptr, ptr, ptr }

@__const.sgd_optimize.loss_derivative_sum = external hidden unnamed_addr constant { i32, [4 x i8] }, align 8
@square_loss_functions = external global %struct.square_loss_functions_struct, align 8

; 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

declare void @kml_free(ptr noundef) #1

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

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

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

; Function Attrs: nounwind uwtable
define dso_local void @sgd_optimize(ptr noundef %0, i32 noundef %1) #3 {
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %union.val, align 8
  %8 = alloca %union.val, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store i32 %1, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %8, ptr align 8 @__const.sgd_optimize.loss_derivative_sum, i64 8, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  store ptr null, ptr %9, align 8, !tbaa !5
  %12 = load ptr, ptr %3, align 8, !tbaa !5
  %13 = getelementptr inbounds %struct.sgd_optimizer, ptr %12, i32 0, i32 6
  %14 = load ptr, ptr %13, align 8, !tbaa !11
  %15 = getelementptr inbounds %struct.loss, ptr %14, i32 0, i32 1
  %16 = load i32, ptr %15, align 8, !tbaa !14
  switch i32 %16, label %38 [
    i32 0, label %17
  ]

17:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %18 = load ptr, ptr %3, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.sgd_optimizer, ptr %18, i32 0, i32 6
  %20 = load ptr, ptr %19, align 8, !tbaa !11
  %21 = getelementptr inbounds %struct.loss, ptr %20, i32 0, i32 0
  %22 = load ptr, ptr %21, align 8, !tbaa !16
  store ptr %22, ptr %10, align 8, !tbaa !5
  %23 = load ptr, ptr getelementptr inbounds (%struct.square_loss_functions_struct, ptr @square_loss_functions, i32 0, i32 2), align 8, !tbaa !17
  %24 = load ptr, ptr %10, align 8, !tbaa !5
  %25 = call ptr %23(ptr noundef %24)
  store ptr %25, ptr %9, align 8, !tbaa !5
  %26 = load ptr, ptr %3, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.sgd_optimizer, ptr %26, i32 0, i32 2
  %28 = load float, ptr %27, align 8, !tbaa !19
  %29 = load ptr, ptr %3, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.sgd_optimizer, ptr %29, i32 0, i32 1
  store float %28, ptr %30, align 8, !tbaa !19
  %31 = load ptr, ptr %9, align 8, !tbaa !5
  %32 = load float, ptr %31, align 8, !tbaa !19
  %33 = load ptr, ptr %3, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.sgd_optimizer, ptr %33, i32 0, i32 2
  store float %32, ptr %34, align 8, !tbaa !19
  %35 = load ptr, ptr %10, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.square_loss, ptr %35, i32 0, i32 2
  %37 = load ptr, ptr %36, align 8, !tbaa !20
  call void @matrix_sum_up(ptr noundef %37, ptr noundef %8)
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  br label %39

38:                                               ; preds = %2
  br label %39

39:                                               ; preds = %38, %17
  %40 = load ptr, ptr %9, align 8, !tbaa !5
  %41 = icmp ne ptr %40, null
  br i1 %41, label %42, label %44

42:                                               ; preds = %39
  %43 = load ptr, ptr %9, align 8, !tbaa !5
  call void @kml_free(ptr noundef %43)
  br label %44

44:                                               ; preds = %42, %39
  %45 = load ptr, ptr %3, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.sgd_optimizer, ptr %45, i32 0, i32 5
  %47 = load ptr, ptr %46, align 8, !tbaa !22
  %48 = getelementptr inbounds %struct.updates_list, ptr %47, i32 0, i32 1
  %49 = load ptr, ptr %48, align 8, !tbaa !23
  store ptr %49, ptr %6, align 8, !tbaa !5
  %50 = load ptr, ptr %3, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.sgd_optimizer, ptr %50, i32 0, i32 4
  %52 = load ptr, ptr %51, align 8, !tbaa !25
  %53 = getelementptr inbounds %struct.layers, ptr %52, i32 0, i32 1
  %54 = load ptr, ptr %53, align 8, !tbaa !26
  store ptr %54, ptr %5, align 8, !tbaa !5
  br label %55

55:                                               ; preds = %103, %44
  %56 = load ptr, ptr %6, align 8, !tbaa !5
  %57 = icmp ne ptr %56, null
  br i1 %57, label %58, label %61

58:                                               ; preds = %55
  %59 = load ptr, ptr %5, align 8, !tbaa !5
  %60 = icmp ne ptr %59, null
  br label %61

61:                                               ; preds = %58, %55
  %62 = phi i1 [ false, %55 ], [ %60, %58 ]
  br i1 %62, label %63, label %110

63:                                               ; preds = %61
  %64 = load ptr, ptr %5, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.layer, ptr %64, i32 0, i32 1
  %66 = load i32, ptr %65, align 8, !tbaa !28
  switch i32 %66, label %101 [
    i32 0, label %67
  ]

67:                                               ; preds = %63
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  %68 = load ptr, ptr %5, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.layer, ptr %68, i32 0, i32 0
  %70 = load ptr, ptr %69, align 8, !tbaa !30
  store ptr %70, ptr %11, align 8, !tbaa !5
  %71 = load ptr, ptr %11, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.linear_layer, ptr %71, i32 0, i32 0
  %73 = load ptr, ptr %72, align 8, !tbaa !31
  %74 = getelementptr inbounds %struct.matrix, ptr %73, i32 0, i32 2
  %75 = load i32, ptr %74, align 8, !tbaa !33
  switch i32 %75, label %84 [
    i32 1, label %76
    i32 2, label %79
    i32 0, label %82
  ]

76:                                               ; preds = %67
  %77 = load i32, ptr %4, align 4, !tbaa !9
  %78 = sitofp i32 %77 to float
  store float %78, ptr %7, align 8, !tbaa !19
  br label %84

79:                                               ; preds = %67
  %80 = load i32, ptr %4, align 4, !tbaa !9
  %81 = sitofp i32 %80 to double
  store double %81, ptr %7, align 8, !tbaa !19
  br label %84

82:                                               ; preds = %67
  %83 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %83, ptr %7, align 8, !tbaa !19
  br label %84

84:                                               ; preds = %82, %79, %76, %67
  %85 = load ptr, ptr %11, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.linear_layer, ptr %85, i32 0, i32 0
  %87 = load ptr, ptr %86, align 8, !tbaa !31
  %88 = load ptr, ptr %11, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.linear_layer, ptr %88, i32 0, i32 3
  %90 = load ptr, ptr %89, align 8, !tbaa !35
  %91 = load ptr, ptr %6, align 8, !tbaa !5
  %92 = load ptr, ptr %3, align 8, !tbaa !5
  call void @weight_update(ptr noundef %87, ptr noundef %90, ptr noundef %91, ptr noundef %7, ptr noundef %92)
  %93 = load ptr, ptr %11, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.linear_layer, ptr %93, i32 0, i32 1
  %95 = load ptr, ptr %94, align 8, !tbaa !36
  %96 = load ptr, ptr %11, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.linear_layer, ptr %96, i32 0, i32 4
  %98 = load ptr, ptr %97, align 8, !tbaa !37
  %99 = load ptr, ptr %6, align 8, !tbaa !5
  %100 = load ptr, ptr %3, align 8, !tbaa !5
  call void @bias_update(ptr noundef %95, ptr noundef %98, ptr noundef %99, ptr noundef %7, ptr noundef %100)
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  br label %102

101:                                              ; preds = %63
  br label %102

102:                                              ; preds = %101, %84
  br label %103

103:                                              ; preds = %102
  %104 = load ptr, ptr %6, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.updates, ptr %104, i32 0, i32 3
  %106 = load ptr, ptr %105, align 8, !tbaa !38
  store ptr %106, ptr %6, align 8, !tbaa !5
  %107 = load ptr, ptr %5, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.layer, ptr %107, i32 0, i32 3
  %109 = load ptr, ptr %108, align 8, !tbaa !40
  store ptr %109, ptr %5, align 8, !tbaa !5
  br label %55, !llvm.loop !41

110:                                              ; preds = %61
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  ret void
}

declare void @matrix_sum_up(ptr noundef, ptr noundef) #1

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 48}
!12 = !{!"sgd_optimizer", !13, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !6, i64 32, !6, i64 40, !6, i64 48}
!13 = !{!"float", !7, i64 0}
!14 = !{!15, !10, i64 8}
!15 = !{!"loss", !6, i64 0, !10, i64 8}
!16 = !{!15, !6, i64 0}
!17 = !{!18, !6, i64 16}
!18 = !{!"square_loss_functions_struct", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!19 = !{!7, !7, i64 0}
!20 = !{!21, !6, i64 16}
!21 = !{!"square_loss", !6, i64 0, !6, i64 8, !6, i64 16}
!22 = !{!12, !6, i64 40}
!23 = !{!24, !6, i64 8}
!24 = !{!"updates_list", !6, i64 0, !6, i64 8}
!25 = !{!12, !6, i64 32}
!26 = !{!27, !6, i64 8}
!27 = !{!"layers", !6, i64 0, !6, i64 8}
!28 = !{!29, !10, i64 8}
!29 = !{!"layer", !6, i64 0, !10, i64 8, !6, i64 16, !6, i64 24}
!30 = !{!29, !6, i64 0}
!31 = !{!32, !6, i64 0}
!32 = !{!"linear_layer", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48}
!33 = !{!34, !10, i64 8}
!34 = !{!"matrix", !10, i64 0, !10, i64 4, !10, i64 8, !7, i64 16}
!35 = !{!32, !6, i64 24}
!36 = !{!32, !6, i64 8}
!37 = !{!32, !6, i64 32}
!38 = !{!39, !6, i64 24}
!39 = !{!"updates", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!40 = !{!29, !6, i64 24}
!41 = distinct !{!41, !42}
!42 = !{!"llvm.loop.mustprogress"}


; 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.square_loss_functions_struct = type { ptr, ptr, ptr, ptr }
%union.val = type { double }

@__const.sgd_optimize.loss_derivative_sum = external hidden unnamed_addr constant { i32, [4 x i8] }, align 8
@square_loss_functions = external local_unnamed_addr global %struct.square_loss_functions_struct, align 8

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

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

declare void @kml_free(ptr noundef) local_unnamed_addr #1

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

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

; Function Attrs: nounwind uwtable
define dso_local void @sgd_optimize(ptr noundef %0, i32 noundef %1) local_unnamed_addr #2 {
  %3 = alloca %union.val, align 8
  %4 = alloca %union.val, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #3
  %5 = load i64, ptr @__const.sgd_optimize.loss_derivative_sum, align 8
  store i64 %5, ptr %4, align 8
  %6 = getelementptr inbounds i8, ptr %0, i64 48
  %7 = load ptr, ptr %6, align 8, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %7, i64 8
  %9 = load i32, ptr %8, align 8, !tbaa !11
  %cond = icmp eq i32 %9, 0
  br i1 %cond, label %10, label %.thread

10:                                               ; preds = %2
  %11 = load ptr, ptr %7, align 8, !tbaa !14
  %12 = load ptr, ptr getelementptr inbounds (i8, ptr @square_loss_functions, i64 16), align 8, !tbaa !15
  %13 = tail call ptr %12(ptr noundef %11) #3
  %14 = getelementptr inbounds i8, ptr %0, i64 16
  %15 = load float, ptr %14, align 8, !tbaa !17
  %16 = getelementptr inbounds i8, ptr %0, i64 8
  store float %15, ptr %16, align 8, !tbaa !17
  %17 = load float, ptr %13, align 8, !tbaa !17
  store float %17, ptr %14, align 8, !tbaa !17
  %18 = getelementptr inbounds i8, ptr %11, i64 16
  %19 = load ptr, ptr %18, align 8, !tbaa !18
  call void @matrix_sum_up(ptr noundef %19, ptr noundef nonnull %4) #3
  call void @kml_free(ptr noundef nonnull %13) #3
  br label %.thread

.thread:                                          ; preds = %2, %10
  %20 = getelementptr inbounds i8, ptr %0, i64 40
  %21 = load ptr, ptr %20, align 8, !tbaa !20
  %22 = getelementptr inbounds i8, ptr %21, i64 8
  %23 = getelementptr inbounds i8, ptr %0, i64 32
  %24 = load ptr, ptr %23, align 8, !tbaa !21
  %25 = getelementptr inbounds i8, ptr %24, i64 8
  %.034 = load ptr, ptr %25, align 8, !tbaa !22
  %.03035 = load ptr, ptr %22, align 8, !tbaa !22
  %26 = icmp ne ptr %.03035, null
  %27 = icmp ne ptr %.034, null
  %28 = select i1 %26, i1 %27, i1 false
  br i1 %28, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.thread
  %29 = sitofp i32 %1 to double
  %30 = sitofp i32 %1 to float
  br label %31

31:                                               ; preds = %.lr.ph, %50
  %.03037 = phi ptr [ %.03035, %.lr.ph ], [ %.030, %50 ]
  %.036 = phi ptr [ %.034, %.lr.ph ], [ %.0, %50 ]
  %32 = getelementptr inbounds i8, ptr %.036, i64 8
  %33 = load i32, ptr %32, align 8, !tbaa !23
  %cond1 = icmp eq i32 %33, 0
  br i1 %cond1, label %34, label %50

34:                                               ; preds = %31
  %35 = load ptr, ptr %.036, align 8, !tbaa !25
  %36 = load ptr, ptr %35, align 8, !tbaa !26
  %37 = getelementptr inbounds i8, ptr %36, i64 8
  %38 = load i32, ptr %37, align 8, !tbaa !28
  switch i32 %38, label %42 [
    i32 1, label %39
    i32 2, label %40
    i32 0, label %41
  ]

39:                                               ; preds = %34
  store float %30, ptr %3, align 8, !tbaa !17
  br label %42

40:                                               ; preds = %34
  store double %29, ptr %3, align 8, !tbaa !17
  br label %42

41:                                               ; preds = %34
  store i32 %1, ptr %3, align 8, !tbaa !17
  br label %42

42:                                               ; preds = %41, %40, %39, %34
  %43 = load ptr, ptr %35, align 8, !tbaa !26
  %44 = getelementptr inbounds i8, ptr %35, i64 24
  %45 = load ptr, ptr %44, align 8, !tbaa !30
  call void @weight_update(ptr noundef %43, ptr noundef %45, ptr noundef nonnull %.03037, ptr noundef nonnull %3, ptr noundef %0)
  %46 = getelementptr inbounds i8, ptr %35, i64 8
  %47 = load ptr, ptr %46, align 8, !tbaa !31
  %48 = getelementptr inbounds i8, ptr %35, i64 32
  %49 = load ptr, ptr %48, align 8, !tbaa !32
  call void @bias_update(ptr noundef %47, ptr noundef %49, ptr noundef nonnull %.03037, ptr noundef nonnull %3, ptr noundef %0)
  br label %50

50:                                               ; preds = %42, %31
  %51 = getelementptr inbounds i8, ptr %.03037, i64 24
  %52 = getelementptr inbounds i8, ptr %.036, i64 24
  %.0 = load ptr, ptr %52, align 8, !tbaa !22
  %.030 = load ptr, ptr %51, align 8, !tbaa !22
  %53 = icmp ne ptr %.030, null
  %54 = icmp ne ptr %.0, null
  %55 = select i1 %53, i1 %54, i1 false
  br i1 %55, label %31, label %._crit_edge, !llvm.loop !33

._crit_edge:                                      ; preds = %50, %.thread
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #3
  ret void
}

declare void @matrix_sum_up(ptr noundef, ptr noundef) local_unnamed_addr #1

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

!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, !10, i64 48}
!6 = !{!"sgd_optimizer", !7, i64 0, !8, i64 8, !8, i64 16, !8, i64 24, !10, i64 32, !10, i64 40, !10, i64 48}
!7 = !{!"float", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!12, !13, i64 8}
!12 = !{!"loss", !10, i64 0, !13, i64 8}
!13 = !{!"int", !8, i64 0}
!14 = !{!12, !10, i64 0}
!15 = !{!16, !10, i64 16}
!16 = !{!"square_loss_functions_struct", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24}
!17 = !{!8, !8, i64 0}
!18 = !{!19, !10, i64 16}
!19 = !{!"square_loss", !10, i64 0, !10, i64 8, !10, i64 16}
!20 = !{!6, !10, i64 40}
!21 = !{!6, !10, i64 32}
!22 = !{!10, !10, i64 0}
!23 = !{!24, !13, i64 8}
!24 = !{!"layer", !10, i64 0, !13, i64 8, !10, i64 16, !10, i64 24}
!25 = !{!24, !10, i64 0}
!26 = !{!27, !10, i64 0}
!27 = !{!"linear_layer", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48}
!28 = !{!29, !13, i64 8}
!29 = !{!"matrix", !13, i64 0, !13, i64 4, !13, i64 8, !8, i64 16}
!30 = !{!27, !10, i64 24}
!31 = !{!27, !10, i64 8}
!32 = !{!27, !10, i64 32}
!33 = distinct !{!33, !34}
!34 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass