; LLVM IR from keroro824/HashingDeepLearning :: SLIDE/Node.ll (ZN4NodeC2Eiii8NodeTypeiPffS1_S1_)

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

%class.Node = type <{ i32, i32, ptr, i32, [4 x i8], i64, i64, i64, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, float, float, float, float, float, [4 x i8] }>

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4NodeC2Eiii8NodeTypeiPffS1_S1_(ptr noundef nonnull align 8 dereferenceable(132) %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5, ptr noundef %6, float noundef %7, ptr noundef %8, ptr noundef %9) unnamed_addr #0 align 2 {
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca ptr, align 8
  %18 = alloca float, align 4
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  store ptr %0, ptr %11, align 8, !tbaa !5
  store i32 %1, ptr %12, align 4, !tbaa !9
  store i32 %2, ptr %13, align 4, !tbaa !9
  store i32 %3, ptr %14, align 4, !tbaa !9
  store i32 %4, ptr %15, align 4, !tbaa !11
  store i32 %5, ptr %16, align 4, !tbaa !9
  store ptr %6, ptr %17, align 8, !tbaa !5
  store float %7, ptr %18, align 4, !tbaa !13
  store ptr %8, ptr %19, align 8, !tbaa !5
  store ptr %9, ptr %20, align 8, !tbaa !5
  %21 = load ptr, ptr %11, align 8
  %22 = getelementptr inbounds %class.Node, ptr %21, i32 0, i32 16
  store float 0.000000e+00, ptr %22, align 8, !tbaa !15
  %23 = getelementptr inbounds %class.Node, ptr %21, i32 0, i32 17
  store float 0.000000e+00, ptr %23, align 4, !tbaa !18
  %24 = getelementptr inbounds %class.Node, ptr %21, i32 0, i32 18
  store float 0.000000e+00, ptr %24, align 8, !tbaa !19
  %25 = getelementptr inbounds %class.Node, ptr %21, i32 0, i32 19
  store float 0.000000e+00, ptr %25, align 4, !tbaa !20
  %26 = getelementptr inbounds %class.Node, ptr %21, i32 0, i32 20
  store float 0.000000e+00, ptr %26, align 8, !tbaa !21
  %27 = load i32, ptr %12, align 4, !tbaa !9
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds %class.Node, ptr %21, i32 0, i32 5
  store i64 %28, ptr %29, align 8, !tbaa !22
  %30 = load i32, ptr %13, align 4, !tbaa !9
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds %class.Node, ptr %21, i32 0, i32 7
  store i64 %31, ptr %32, align 8, !tbaa !23
  %33 = load i32, ptr %15, align 4, !tbaa !11
  %34 = getelementptr inbounds %class.Node, ptr %21, i32 0, i32 1
  store i32 %33, ptr %34, align 4, !tbaa !24
  %35 = load i32, ptr %14, align 4, !tbaa !9
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds %class.Node, ptr %21, i32 0, i32 6
  store i64 %36, ptr %37, align 8, !tbaa !25
  %38 = load i32, ptr %16, align 4, !tbaa !9
  %39 = getelementptr inbounds %class.Node, ptr %21, i32 0, i32 3
  store i32 %38, ptr %39, align 8, !tbaa !26
  %40 = load ptr, ptr %19, align 8, !tbaa !5
  %41 = getelementptr inbounds %class.Node, ptr %21, i32 0, i32 12
  store ptr %40, ptr %41, align 8, !tbaa !27
  %42 = load ptr, ptr %20, align 8, !tbaa !5
  %43 = getelementptr inbounds %class.Node, ptr %21, i32 0, i32 13
  store ptr %42, ptr %43, align 8, !tbaa !28
  %44 = getelementptr inbounds %class.Node, ptr %21, i32 0, i32 5
  %45 = load i64, ptr %44, align 8, !tbaa !22
  %46 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %45, i64 4)
  %47 = extractvalue { i64, i1 } %46, 1
  %48 = extractvalue { i64, i1 } %46, 0
  %49 = select i1 %47, i64 -1, i64 %48
  %50 = call noalias noundef nonnull ptr @_Znam(i64 noundef %49) #4
  call void @llvm.memset.p0.i64(ptr align 4 %50, i8 0, i64 %49, i1 false)
  %51 = getelementptr inbounds %class.Node, ptr %21, i32 0, i32 14
  store ptr %50, ptr %51, align 8, !tbaa !29
  %52 = getelementptr inbounds %class.Node, ptr %21, i32 0, i32 3
  %53 = load i32, ptr %52, align 8, !tbaa !26
  %54 = sext i32 %53 to i64
  %55 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %54, i64 64)
  %56 = extractvalue { i64, i1 } %55, 1
  %57 = extractvalue { i64, i1 } %55, 0
  %58 = select i1 %56, i64 -1, i64 %57
  %59 = call noundef ptr @_ZN5trainnaEm(i64 noundef %58)
  %60 = getelementptr inbounds %class.Node, ptr %21, i32 0, i32 2
  store ptr %59, ptr %60, align 8, !tbaa !30
  %61 = getelementptr inbounds %class.Node, ptr %21, i32 0, i32 0
  store i32 0, ptr %61, align 8, !tbaa !31
  %62 = load ptr, ptr %17, align 8, !tbaa !5
  %63 = getelementptr inbounds %class.Node, ptr %21, i32 0, i32 10
  store ptr %62, ptr %63, align 8, !tbaa !32
  %64 = load float, ptr %18, align 4, !tbaa !13
  %65 = getelementptr inbounds %class.Node, ptr %21, i32 0, i32 16
  store float %64, ptr %65, align 8, !tbaa !15
  %66 = getelementptr inbounds %class.Node, ptr %21, i32 0, i32 16
  %67 = load float, ptr %66, align 8, !tbaa !15
  %68 = getelementptr inbounds %class.Node, ptr %21, i32 0, i32 20
  store float %67, ptr %68, align 8, !tbaa !21
  ret void
}

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare { i64, i1 } @llvm.umul.with.overflow.i64(i64, i64) #1

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) #2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN5trainnaEm(i64 noundef) #0 align 2

attributes #0 = { mustprogress 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 speculatable willreturn memory(none) }
attributes #2 = { nobuiltin allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { builtin allocsize(0) }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"_ZTS8NodeType", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"float", !7, i64 0}
!15 = !{!16, !14, i64 112}
!16 = !{!"_ZTS4Node", !10, i64 0, !12, i64 4, !6, i64 8, !10, i64 16, !17, i64 24, !17, i64 32, !17, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !14, i64 112, !14, i64 116, !14, i64 120, !14, i64 124, !14, i64 128}
!17 = !{!"long", !7, i64 0}
!18 = !{!16, !14, i64 116}
!19 = !{!16, !14, i64 120}
!20 = !{!16, !14, i64 124}
!21 = !{!16, !14, i64 128}
!22 = !{!16, !17, i64 24}
!23 = !{!16, !17, i64 40}
!24 = !{!16, !12, i64 4}
!25 = !{!16, !17, i64 32}
!26 = !{!16, !10, i64 16}
!27 = !{!16, !6, i64 80}
!28 = !{!16, !6, i64 88}
!29 = !{!16, !6, i64 96}
!30 = !{!16, !6, i64 8}
!31 = !{!16, !10, i64 0}
!32 = !{!16, !6, i64 64}


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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4NodeC2Eiii8NodeTypeiPffS1_S1_(ptr nocapture noundef nonnull writeonly align 8 dereferenceable(132) %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5, ptr noundef %6, float noundef %7, ptr noundef %8, ptr noundef %9) unnamed_addr #0 align 2 {
  %11 = getelementptr inbounds i8, ptr %0, i64 112
  %12 = getelementptr inbounds i8, ptr %0, i64 128
  %13 = sext i32 %1 to i64
  %14 = getelementptr inbounds i8, ptr %0, i64 24
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(20) %11, i8 0, i64 20, i1 false)
  store i64 %13, ptr %14, align 8, !tbaa !5
  %15 = sext i32 %2 to i64
  %16 = getelementptr inbounds i8, ptr %0, i64 40
  store i64 %15, ptr %16, align 8, !tbaa !14
  %17 = getelementptr inbounds i8, ptr %0, i64 4
  store i32 %4, ptr %17, align 4, !tbaa !15
  %18 = sext i32 %3 to i64
  %19 = getelementptr inbounds i8, ptr %0, i64 32
  store i64 %18, ptr %19, align 8, !tbaa !16
  %20 = getelementptr inbounds i8, ptr %0, i64 16
  store i32 %5, ptr %20, align 8, !tbaa !17
  %21 = getelementptr inbounds i8, ptr %0, i64 80
  store ptr %8, ptr %21, align 8, !tbaa !18
  %22 = getelementptr inbounds i8, ptr %0, i64 88
  store ptr %9, ptr %22, align 8, !tbaa !19
  %23 = icmp slt i32 %1, 0
  %24 = shl nuw nsw i64 %13, 2
  %25 = select i1 %23, i64 -1, i64 %24
  %26 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %25) #3
  tail call void @llvm.memset.p0.i64(ptr nonnull align 4 %26, i8 0, i64 %25, i1 false)
  %27 = getelementptr inbounds i8, ptr %0, i64 96
  store ptr %26, ptr %27, align 8, !tbaa !20
  %28 = zext nneg i32 %5 to i64
  %29 = icmp slt i32 %5, 0
  %30 = shl nuw nsw i64 %28, 6
  %31 = select i1 %29, i64 -1, i64 %30
  %32 = tail call noundef ptr @_ZN5trainnaEm(i64 noundef %31)
  %33 = getelementptr inbounds i8, ptr %0, i64 8
  store ptr %32, ptr %33, align 8, !tbaa !21
  store i32 0, ptr %0, align 8, !tbaa !22
  %34 = getelementptr inbounds i8, ptr %0, i64 64
  store ptr %6, ptr %34, align 8, !tbaa !23
  store float %7, ptr %11, align 8, !tbaa !24
  store float %7, ptr %12, align 8, !tbaa !25
  ret void
}

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) local_unnamed_addr #1

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN5trainnaEm(i64 noundef) local_unnamed_addr #0 align 2

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !12, i64 24}
!6 = !{!"_ZTS4Node", !7, i64 0, !10, i64 4, !11, i64 8, !7, i64 16, !12, i64 24, !12, i64 32, !12, i64 40, !11, i64 48, !11, i64 56, !11, i64 64, !11, i64 72, !11, i64 80, !11, i64 88, !11, i64 96, !11, i64 104, !13, i64 112, !13, i64 116, !13, i64 120, !13, i64 124, !13, i64 128}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTS8NodeType", !8, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!"long", !8, i64 0}
!13 = !{!"float", !8, i64 0}
!14 = !{!6, !12, i64 40}
!15 = !{!6, !10, i64 4}
!16 = !{!6, !12, i64 32}
!17 = !{!6, !7, i64 16}
!18 = !{!6, !11, i64 80}
!19 = !{!6, !11, i64 88}
!20 = !{!6, !11, i64 96}
!21 = !{!6, !11, i64 8}
!22 = !{!6, !7, i64 0}
!23 = !{!6, !11, i64 64}
!24 = !{!6, !13, i64 112}
!25 = !{!6, !13, i64 128}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,MemCpyOptPass,PostOrderFunctionAttrsPass,SROAPass,TailCallElimPass