; LLVM IR from rweather/lightweight-crypto :: src/genavr/algorithm_grain128.ll (Z23gen_grain128_interleaveR4Code)

; 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.Reg = type { %"class.std::vector.5" }
%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@.str.4 = external hidden unnamed_addr constant [20 x i8], align 1

declare void @_ZN4Code20prologue_permutationEPKcj(ptr noundef nonnull align 8 dereferenceable(200), ptr noundef, i32 noundef) #0

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4Code7setFlagENS_4FlagE(ptr noundef nonnull align 8 dereferenceable(200), i32 noundef) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4Code3ldzERK3Regh(ptr noundef nonnull align 8 dereferenceable(200), ptr noundef nonnull align 8 dereferenceable(24), i8 noundef zeroext) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4Code3stzERK3Regh(ptr noundef nonnull align 8 dereferenceable(200), ptr noundef nonnull align 8 dereferenceable(24), i8 noundef zeroext) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3RegC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

declare void @_ZN4Code15allocateHighRegEj(ptr dead_on_unwind writable sret(%class.Reg) align 8, ptr noundef nonnull align 8 dereferenceable(200), i32 noundef) #0

; Function Attrs: mustprogress uwtable
define dso_local void @_Z23gen_grain128_interleaveR4Code(ptr noundef nonnull align 8 dereferenceable(200) %0) #2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca %class.Reg, align 8
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca %class.Reg, align 8
  %8 = alloca %class.Reg, align 8
  %9 = alloca %class.Reg, align 8
  %10 = alloca %class.Reg, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %11 = load ptr, ptr %2, align 8, !tbaa !5
  call void @_ZN4Code20prologue_permutationEPKcj(ptr noundef nonnull align 8 dereferenceable(200) %11, ptr noundef @.str.4, i32 noundef 0)
  %12 = load ptr, ptr %2, align 8, !tbaa !5
  call void @_ZN4Code7setFlagENS_4FlagE(ptr noundef nonnull align 8 dereferenceable(200) %12, i32 noundef 32)
  call void @llvm.lifetime.start.p0(i64 24, ptr %3) #4
  %13 = load ptr, ptr %2, align 8, !tbaa !5
  call void @_ZN4Code15allocateHighRegEj(ptr dead_on_unwind writable sret(%class.Reg) align 8 %3, ptr noundef nonnull align 8 dereferenceable(200) %13, i32 noundef 4)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  store i32 0, ptr %4, align 4, !tbaa !9
  br label %14

14:                                               ; preds = %37, %1
  %15 = load i32, ptr %4, align 4, !tbaa !9
  %16 = icmp slt i32 %15, 16
  br i1 %16, label %18, label %17

17:                                               ; preds = %14
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  br label %81

18:                                               ; preds = %14
  %19 = load ptr, ptr %2, align 8, !tbaa !5
  %20 = load i32, ptr %4, align 4, !tbaa !9
  %21 = trunc i32 %20 to i8
  invoke void @_ZN4Code3ldzERK3Regh(ptr noundef nonnull align 8 dereferenceable(200) %19, ptr noundef nonnull align 8 dereferenceable(24) %3, i8 noundef zeroext %21)
          to label %22 unwind label %40

22:                                               ; preds = %18
  %23 = load ptr, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %7) #4
  invoke void @_ZN3RegC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7)
          to label %24 unwind label %44

24:                                               ; preds = %22
  invoke void @_ZN4Code8swapmoveERK3RegyjS2_(ptr noundef nonnull align 8 dereferenceable(200) %23, ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef 286331153, i32 noundef 3, ptr noundef nonnull align 8 dereferenceable(24) %7)
          to label %25 unwind label %48

25:                                               ; preds = %24
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #4
  %26 = load ptr, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %8) #4
  invoke void @_ZN3RegC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8)
          to label %27 unwind label %53

27:                                               ; preds = %25
  invoke void @_ZN4Code8swapmoveERK3RegyjS2_(ptr noundef nonnull align 8 dereferenceable(200) %26, ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef 50529027, i32 noundef 6, ptr noundef nonnull align 8 dereferenceable(24) %8)
          to label %28 unwind label %57

28:                                               ; preds = %27
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #4
  %29 = load ptr, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %9) #4
  invoke void @_ZN3RegC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9)
          to label %30 unwind label %62

30:                                               ; preds = %28
  invoke void @_ZN4Code8swapmoveERK3RegyjS2_(ptr noundef nonnull align 8 dereferenceable(200) %29, ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef 983055, i32 noundef 12, ptr noundef nonnull align 8 dereferenceable(24) %9)
          to label %31 unwind label %66

31:                                               ; preds = %30
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #4
  %32 = load ptr, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %10) #4
  invoke void @_ZNK3Reg7shuffleEhhhh(ptr dead_on_unwind writable sret(%class.Reg) align 8 %10, ptr noundef nonnull align 8 dereferenceable(24) %3, i8 noundef zeroext 2, i8 noundef zeroext 3, i8 noundef zeroext 0, i8 noundef zeroext 1)
          to label %33 unwind label %71

33:                                               ; preds = %31
  %34 = load i32, ptr %4, align 4, !tbaa !9
  %35 = trunc i32 %34 to i8
  invoke void @_ZN4Code3stzERK3Regh(ptr noundef nonnull align 8 dereferenceable(200) %32, ptr noundef nonnull align 8 dereferenceable(24) %10, i8 noundef zeroext %35)
          to label %36 unwind label %75

36:                                               ; preds = %33
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #4
  br label %37

37:                                               ; preds = %36
  %38 = load i32, ptr %4, align 4, !tbaa !9
  %39 = add nsw i32 %38, 4
  store i32 %39, ptr %4, align 4, !tbaa !9
  br label %14, !llvm.loop !11

40:                                               ; preds = %18
  %41 = landingpad { ptr, i32 }
          cleanup
  %42 = extractvalue { ptr, i32 } %41, 0
  store ptr %42, ptr %5, align 8
  %43 = extractvalue { ptr, i32 } %41, 1
  store i32 %43, ptr %6, align 4
  br label %80

44:                                               ; preds = %22
  %45 = landingpad { ptr, i32 }
          cleanup
  %46 = extractvalue { ptr, i32 } %45, 0
  store ptr %46, ptr %5, align 8
  %47 = extractvalue { ptr, i32 } %45, 1
  store i32 %47, ptr %6, align 4
  br label %52

48:                                               ; preds = %24
  %49 = landingpad { ptr, i32 }
          cleanup
  %50 = extractvalue { ptr, i32 } %49, 0
  store ptr %50, ptr %5, align 8
  %51 = extractvalue { ptr, i32 } %49, 1
  store i32 %51, ptr %6, align 4
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #4
  br label %52

52:                                               ; preds = %48, %44
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #4
  br label %80

53:                                               ; preds = %25
  %54 = landingpad { ptr, i32 }
          cleanup
  %55 = extractvalue { ptr, i32 } %54, 0
  store ptr %55, ptr %5, align 8
  %56 = extractvalue { ptr, i32 } %54, 1
  store i32 %56, ptr %6, align 4
  br label %61

57:                                               ; preds = %27
  %58 = landingpad { ptr, i32 }
          cleanup
  %59 = extractvalue { ptr, i32 } %58, 0
  store ptr %59, ptr %5, align 8
  %60 = extractvalue { ptr, i32 } %58, 1
  store i32 %60, ptr %6, align 4
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #4
  br label %61

61:                                               ; preds = %57, %53
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #4
  br label %80

62:                                               ; preds = %28
  %63 = landingpad { ptr, i32 }
          cleanup
  %64 = extractvalue { ptr, i32 } %63, 0
  store ptr %64, ptr %5, align 8
  %65 = extractvalue { ptr, i32 } %63, 1
  store i32 %65, ptr %6, align 4
  br label %70

66:                                               ; preds = %30
  %67 = landingpad { ptr, i32 }
          cleanup
  %68 = extractvalue { ptr, i32 } %67, 0
  store ptr %68, ptr %5, align 8
  %69 = extractvalue { ptr, i32 } %67, 1
  store i32 %69, ptr %6, align 4
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #4
  br label %70

70:                                               ; preds = %66, %62
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #4
  br label %80

71:                                               ; preds = %31
  %72 = landingpad { ptr, i32 }
          cleanup
  %73 = extractvalue { ptr, i32 } %72, 0
  store ptr %73, ptr %5, align 8
  %74 = extractvalue { ptr, i32 } %72, 1
  store i32 %74, ptr %6, align 4
  br label %79

75:                                               ; preds = %33
  %76 = landingpad { ptr, i32 }
          cleanup
  %77 = extractvalue { ptr, i32 } %76, 0
  store ptr %77, ptr %5, align 8
  %78 = extractvalue { ptr, i32 } %76, 1
  store i32 %78, ptr %6, align 4
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #4
  br label %79

79:                                               ; preds = %75, %71
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #4
  br label %80

80:                                               ; preds = %79, %70, %61, %52, %40
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %3) #4
  br label %82

81:                                               ; preds = %17
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %3) #4
  ret void

82:                                               ; preds = %80
  %83 = load ptr, ptr %5, align 8
  %84 = load i32, ptr %6, align 4
  %85 = insertvalue { ptr, i32 } poison, ptr %83, 0
  %86 = insertvalue { ptr, i32 } %85, i32 %84, 1
  resume { ptr, i32 } %86
}

declare void @_ZN4Code8swapmoveERK3RegyjS2_(ptr noundef nonnull align 8 dereferenceable(200), ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, i32 noundef, ptr noundef nonnull align 8 dereferenceable(24)) #0

declare void @_ZNK3Reg7shuffleEhhhh(ptr dead_on_unwind writable sret(%class.Reg) align 8, ptr noundef nonnull align 8 dereferenceable(24), i8 noundef zeroext, i8 noundef zeroext, i8 noundef zeroext, i8 noundef zeroext) #0

attributes #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 = { 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 #3 = { mustprogress 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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"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"

%class.Reg = type { %"class.std::vector.5" }
%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@.str.4 = external hidden unnamed_addr constant [20 x i8], align 1

declare void @_ZN4Code20prologue_permutationEPKcj(ptr noundef nonnull align 8 dereferenceable(200), ptr noundef, i32 noundef) local_unnamed_addr #0

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4Code7setFlagENS_4FlagE(ptr noundef nonnull align 8 dereferenceable(200), i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4Code3ldzERK3Regh(ptr noundef nonnull align 8 dereferenceable(200), ptr noundef nonnull align 8 dereferenceable(24), i8 noundef zeroext) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4Code3stzERK3Regh(ptr noundef nonnull align 8 dereferenceable(200), ptr noundef nonnull align 8 dereferenceable(24), i8 noundef zeroext) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3RegC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

declare void @_ZN4Code15allocateHighRegEj(ptr dead_on_unwind writable sret(%class.Reg) align 8, ptr noundef nonnull align 8 dereferenceable(200), i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
define dso_local void @_Z23gen_grain128_interleaveR4Code(ptr noundef nonnull align 8 dereferenceable(200) %0) local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %class.Reg, align 8
  %3 = alloca %class.Reg, align 8
  %4 = alloca %class.Reg, align 8
  %5 = alloca %class.Reg, align 8
  %6 = alloca %class.Reg, align 8
  tail call void @_ZN4Code20prologue_permutationEPKcj(ptr noundef nonnull align 8 dereferenceable(200) %0, ptr noundef nonnull @.str.4, i32 noundef 0)
  tail call void @_ZN4Code7setFlagENS_4FlagE(ptr noundef nonnull align 8 dereferenceable(200) %0, i32 noundef 32)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #4
  call void @_ZN4Code15allocateHighRegEj(ptr dead_on_unwind nonnull writable sret(%class.Reg) align 8 %2, ptr noundef nonnull align 8 dereferenceable(200) %0, i32 noundef 4)
  invoke void @_ZN4Code3ldzERK3Regh(ptr noundef nonnull align 8 dereferenceable(200) %0, ptr noundef nonnull align 8 dereferenceable(24) %2, i8 noundef zeroext 0)
          to label %7 unwind label %31

7:                                                ; preds = %1
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #4
  call void @_ZN3RegC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3)
  invoke void @_ZN4Code8swapmoveERK3RegyjS2_(ptr noundef nonnull align 8 dereferenceable(200) %0, ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 286331153, i32 noundef 3, ptr noundef nonnull align 8 dereferenceable(24) %3)
          to label %8 unwind label %33

8:                                                ; preds = %7
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #4
  call void @_ZN3RegC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4)
  invoke void @_ZN4Code8swapmoveERK3RegyjS2_(ptr noundef nonnull align 8 dereferenceable(200) %0, ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 50529027, i32 noundef 6, ptr noundef nonnull align 8 dereferenceable(24) %4)
          to label %9 unwind label %35

9:                                                ; preds = %8
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #4
  call void @_ZN3RegC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5)
  invoke void @_ZN4Code8swapmoveERK3RegyjS2_(ptr noundef nonnull align 8 dereferenceable(200) %0, ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 983055, i32 noundef 12, ptr noundef nonnull align 8 dereferenceable(24) %5)
          to label %10 unwind label %37

10:                                               ; preds = %9
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #4
  invoke void @_ZNK3Reg7shuffleEhhhh(ptr dead_on_unwind nonnull writable sret(%class.Reg) align 8 %6, ptr noundef nonnull align 8 dereferenceable(24) %2, i8 noundef zeroext 2, i8 noundef zeroext 3, i8 noundef zeroext 0, i8 noundef zeroext 1)
          to label %11 unwind label %39

11:                                               ; preds = %10
  invoke void @_ZN4Code3stzERK3Regh(ptr noundef nonnull align 8 dereferenceable(200) %0, ptr noundef nonnull align 8 dereferenceable(24) %6, i8 noundef zeroext 0)
          to label %12 unwind label %41

12:                                               ; preds = %11
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #4
  invoke void @_ZN4Code3ldzERK3Regh(ptr noundef nonnull align 8 dereferenceable(200) %0, ptr noundef nonnull align 8 dereferenceable(24) %2, i8 noundef zeroext 4)
          to label %13 unwind label %31

13:                                               ; preds = %12
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #4
  call void @_ZN3RegC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3)
  invoke void @_ZN4Code8swapmoveERK3RegyjS2_(ptr noundef nonnull align 8 dereferenceable(200) %0, ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 286331153, i32 noundef 3, ptr noundef nonnull align 8 dereferenceable(24) %3)
          to label %14 unwind label %33

14:                                               ; preds = %13
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #4
  call void @_ZN3RegC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4)
  invoke void @_ZN4Code8swapmoveERK3RegyjS2_(ptr noundef nonnull align 8 dereferenceable(200) %0, ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 50529027, i32 noundef 6, ptr noundef nonnull align 8 dereferenceable(24) %4)
          to label %15 unwind label %35

15:                                               ; preds = %14
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #4
  call void @_ZN3RegC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5)
  invoke void @_ZN4Code8swapmoveERK3RegyjS2_(ptr noundef nonnull align 8 dereferenceable(200) %0, ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 983055, i32 noundef 12, ptr noundef nonnull align 8 dereferenceable(24) %5)
          to label %16 unwind label %37

16:                                               ; preds = %15
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #4
  invoke void @_ZNK3Reg7shuffleEhhhh(ptr dead_on_unwind nonnull writable sret(%class.Reg) align 8 %6, ptr noundef nonnull align 8 dereferenceable(24) %2, i8 noundef zeroext 2, i8 noundef zeroext 3, i8 noundef zeroext 0, i8 noundef zeroext 1)
          to label %17 unwind label %39

17:                                               ; preds = %16
  invoke void @_ZN4Code3stzERK3Regh(ptr noundef nonnull align 8 dereferenceable(200) %0, ptr noundef nonnull align 8 dereferenceable(24) %6, i8 noundef zeroext 4)
          to label %18 unwind label %41

18:                                               ; preds = %17
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #4
  invoke void @_ZN4Code3ldzERK3Regh(ptr noundef nonnull align 8 dereferenceable(200) %0, ptr noundef nonnull align 8 dereferenceable(24) %2, i8 noundef zeroext 8)
          to label %19 unwind label %31

19:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #4
  call void @_ZN3RegC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3)
  invoke void @_ZN4Code8swapmoveERK3RegyjS2_(ptr noundef nonnull align 8 dereferenceable(200) %0, ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 286331153, i32 noundef 3, ptr noundef nonnull align 8 dereferenceable(24) %3)
          to label %20 unwind label %33

20:                                               ; preds = %19
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #4
  call void @_ZN3RegC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4)
  invoke void @_ZN4Code8swapmoveERK3RegyjS2_(ptr noundef nonnull align 8 dereferenceable(200) %0, ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 50529027, i32 noundef 6, ptr noundef nonnull align 8 dereferenceable(24) %4)
          to label %21 unwind label %35

21:                                               ; preds = %20
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #4
  call void @_ZN3RegC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5)
  invoke void @_ZN4Code8swapmoveERK3RegyjS2_(ptr noundef nonnull align 8 dereferenceable(200) %0, ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 983055, i32 noundef 12, ptr noundef nonnull align 8 dereferenceable(24) %5)
          to label %22 unwind label %37

22:                                               ; preds = %21
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #4
  invoke void @_ZNK3Reg7shuffleEhhhh(ptr dead_on_unwind nonnull writable sret(%class.Reg) align 8 %6, ptr noundef nonnull align 8 dereferenceable(24) %2, i8 noundef zeroext 2, i8 noundef zeroext 3, i8 noundef zeroext 0, i8 noundef zeroext 1)
          to label %23 unwind label %39

23:                                               ; preds = %22
  invoke void @_ZN4Code3stzERK3Regh(ptr noundef nonnull align 8 dereferenceable(200) %0, ptr noundef nonnull align 8 dereferenceable(24) %6, i8 noundef zeroext 8)
          to label %24 unwind label %41

24:                                               ; preds = %23
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #4
  invoke void @_ZN4Code3ldzERK3Regh(ptr noundef nonnull align 8 dereferenceable(200) %0, ptr noundef nonnull align 8 dereferenceable(24) %2, i8 noundef zeroext 12)
          to label %25 unwind label %31

25:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #4
  call void @_ZN3RegC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3)
  invoke void @_ZN4Code8swapmoveERK3RegyjS2_(ptr noundef nonnull align 8 dereferenceable(200) %0, ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 286331153, i32 noundef 3, ptr noundef nonnull align 8 dereferenceable(24) %3)
          to label %26 unwind label %33

26:                                               ; preds = %25
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #4
  call void @_ZN3RegC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4)
  invoke void @_ZN4Code8swapmoveERK3RegyjS2_(ptr noundef nonnull align 8 dereferenceable(200) %0, ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 50529027, i32 noundef 6, ptr noundef nonnull align 8 dereferenceable(24) %4)
          to label %27 unwind label %35

27:                                               ; preds = %26
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #4
  call void @_ZN3RegC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5)
  invoke void @_ZN4Code8swapmoveERK3RegyjS2_(ptr noundef nonnull align 8 dereferenceable(200) %0, ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 983055, i32 noundef 12, ptr noundef nonnull align 8 dereferenceable(24) %5)
          to label %28 unwind label %37

28:                                               ; preds = %27
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #4
  invoke void @_ZNK3Reg7shuffleEhhhh(ptr dead_on_unwind nonnull writable sret(%class.Reg) align 8 %6, ptr noundef nonnull align 8 dereferenceable(24) %2, i8 noundef zeroext 2, i8 noundef zeroext 3, i8 noundef zeroext 0, i8 noundef zeroext 1)
          to label %29 unwind label %39

29:                                               ; preds = %28
  invoke void @_ZN4Code3stzERK3Regh(ptr noundef nonnull align 8 dereferenceable(200) %0, ptr noundef nonnull align 8 dereferenceable(24) %6, i8 noundef zeroext 12)
          to label %30 unwind label %41

30:                                               ; preds = %29
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #4
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #4
  ret void

31:                                               ; preds = %24, %18, %12, %1
  %32 = landingpad { ptr, i32 }
          cleanup
  br label %44

33:                                               ; preds = %25, %19, %13, %7
  %34 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #4
  br label %44

35:                                               ; preds = %26, %20, %14, %8
  %36 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #4
  br label %44

37:                                               ; preds = %27, %21, %15, %9
  %38 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #4
  br label %44

39:                                               ; preds = %28, %22, %16, %10
  %40 = landingpad { ptr, i32 }
          cleanup
  br label %43

41:                                               ; preds = %29, %23, %17, %11
  %42 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #4
  br label %43

43:                                               ; preds = %41, %39
  %.pn = phi { ptr, i32 } [ %42, %41 ], [ %40, %39 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #4
  br label %44

44:                                               ; preds = %43, %37, %35, %33, %31
  %.pn.pn = phi { ptr, i32 } [ %.pn, %43 ], [ %38, %37 ], [ %36, %35 ], [ %34, %33 ], [ %32, %31 ]
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #4
  resume { ptr, i32 } %.pn.pn
}

declare void @_ZN4Code8swapmoveERK3RegyjS2_(ptr noundef nonnull align 8 dereferenceable(200), ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, i32 noundef, ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0

declare void @_ZNK3Reg7shuffleEhhhh(ptr dead_on_unwind writable sret(%class.Reg) align 8, ptr noundef nonnull align 8 dereferenceable(24), i8 noundef zeroext, i8 noundef zeroext, i8 noundef zeroext, i8 noundef zeroext) local_unnamed_addr #0

attributes #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 nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { mustprogress 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)"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,LoopRotatePass,SROAPass,SimplifyCFGPass,TailCallElimPass