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

; 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" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = 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 }

declare i32 @__gxx_personality_v0(...)

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

; 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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIhSaIhEE9push_backEOh(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 1 dereferenceable(1)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4Code11allocateRegEj(ptr dead_on_unwind noalias writable sret(%class.Reg) align 8, ptr noundef nonnull align 8 dereferenceable(200), i32 noundef) #2 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK4Code7hasFlagENS_4FlagE(ptr noundef nonnull align 8 dereferenceable(200), i32 noundef) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZN3RegaSERKS_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #2 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4Code7st_zeroEN4Insn4TypeEjj(ptr noundef nonnull align 8 dereferenceable(200) %0, i32 noundef %1, i32 noundef %2, i32 noundef %3) #2 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %class.Reg, align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca %class.Reg, align 8
  %14 = alloca i8, align 1
  %15 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !9
  store i32 %2, ptr %7, align 4, !tbaa !11
  store i32 %3, ptr %8, align 4, !tbaa !11
  %16 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr %9) #3
  call void @_ZN3RegC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9)
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  %17 = invoke noundef zeroext i1 @_ZNK4Code7hasFlagENS_4FlagE(ptr noundef nonnull align 8 dereferenceable(200) %16, i32 noundef 128)
          to label %18 unwind label %28

18:                                               ; preds = %4
  br i1 %17, label %19, label %41

19:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 24, ptr %13) #3
  invoke void @_ZN4Code11allocateRegEj(ptr dead_on_unwind writable sret(%class.Reg) align 8 %13, ptr noundef nonnull align 8 dereferenceable(200) %16, i32 noundef 1)
          to label %20 unwind label %32

20:                                               ; preds = %19
  %21 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3RegaSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 8 dereferenceable(24) %13)
          to label %22 unwind label %36

22:                                               ; preds = %20
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #3
  %23 = invoke noundef zeroext i8 @_ZNK3Reg3regEi(ptr noundef nonnull align 8 dereferenceable(24) %9, i32 noundef 0)
          to label %24 unwind label %28

24:                                               ; preds = %22
  %25 = invoke noundef zeroext i8 @_ZNK3Reg3regEi(ptr noundef nonnull align 8 dereferenceable(24) %9, i32 noundef 0)
          to label %26 unwind label %28

26:                                               ; preds = %24
  invoke void @_ZN4Code6tworegEN4Insn4TypeEhh(ptr noundef nonnull align 8 dereferenceable(200) %16, i32 noundef 19, i8 noundef zeroext %23, i8 noundef zeroext %25)
          to label %27 unwind label %28

27:                                               ; preds = %26
  br label %48

28:                                               ; preds = %128, %118, %115, %80, %77, %68, %65, %59, %26, %24, %22, %4
  %29 = landingpad { ptr, i32 }
          cleanup
  %30 = extractvalue { ptr, i32 } %29, 0
  store ptr %30, ptr %11, align 8
  %31 = extractvalue { ptr, i32 } %29, 1
  store i32 %31, ptr %12, align 4
  br label %130

32:                                               ; preds = %19
  %33 = landingpad { ptr, i32 }
          cleanup
  %34 = extractvalue { ptr, i32 } %33, 0
  store ptr %34, ptr %11, align 8
  %35 = extractvalue { ptr, i32 } %33, 1
  store i32 %35, ptr %12, align 4
  br label %40

36:                                               ; preds = %20
  %37 = landingpad { ptr, i32 }
          cleanup
  %38 = extractvalue { ptr, i32 } %37, 0
  store ptr %38, ptr %11, align 8
  %39 = extractvalue { ptr, i32 } %37, 1
  store i32 %39, ptr %12, align 4
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #3
  br label %40

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

41:                                               ; preds = %18
  %42 = getelementptr inbounds %class.Reg, ptr %9, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #3
  store i8 1, ptr %14, align 1, !tbaa !13
  invoke void @_ZNSt6vectorIhSaIhEE9push_backEOh(ptr noundef nonnull align 8 dereferenceable(24) %42, ptr noundef nonnull align 1 dereferenceable(1) %14)
          to label %43 unwind label %44

43:                                               ; preds = %41
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #3
  br label %48

44:                                               ; preds = %41
  %45 = landingpad { ptr, i32 }
          cleanup
  %46 = extractvalue { ptr, i32 } %45, 0
  store ptr %46, ptr %11, align 8
  %47 = extractvalue { ptr, i32 } %45, 1
  store i32 %47, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #3
  br label %130

48:                                               ; preds = %43, %27
  %49 = load i32, ptr %6, align 4, !tbaa !9
  %50 = icmp eq i32 %49, 53
  br i1 %50, label %56, label %51

51:                                               ; preds = %48
  %52 = load i32, ptr %7, align 4, !tbaa !11
  %53 = load i32, ptr %8, align 4, !tbaa !11
  %54 = add i32 %52, %53
  %55 = icmp ugt i32 %54, 64
  br i1 %55, label %56, label %110

56:                                               ; preds = %51, %48
  %57 = load i32, ptr %6, align 4, !tbaa !9
  %58 = icmp eq i32 %57, 53
  br i1 %58, label %59, label %62

59:                                               ; preds = %56
  %60 = load i32, ptr %7, align 4, !tbaa !11
  invoke void @_ZN4Code7add_ptrEhi(ptr noundef nonnull align 8 dereferenceable(200) %16, i8 noundef zeroext 26, i32 noundef %60)
          to label %61 unwind label %28

61:                                               ; preds = %59
  br label %72

62:                                               ; preds = %56
  %63 = load i32, ptr %6, align 4, !tbaa !9
  %64 = icmp eq i32 %63, 54
  br i1 %64, label %65, label %68

65:                                               ; preds = %62
  %66 = load i32, ptr %7, align 4, !tbaa !11
  invoke void @_ZN4Code7add_ptrEhi(ptr noundef nonnull align 8 dereferenceable(200) %16, i8 noundef zeroext 28, i32 noundef %66)
          to label %67 unwind label %28

67:                                               ; preds = %65
  br label %71

68:                                               ; preds = %62
  %69 = load i32, ptr %7, align 4, !tbaa !11
  invoke void @_ZN4Code7add_ptrEhi(ptr noundef nonnull align 8 dereferenceable(200) %16, i8 noundef zeroext 30, i32 noundef %69)
          to label %70 unwind label %28

70:                                               ; preds = %68
  br label %71

71:                                               ; preds = %70, %67
  br label %72

72:                                               ; preds = %71, %61
  store i32 0, ptr %10, align 4, !tbaa !11
  br label %73

73:                                               ; preds = %82, %72
  %74 = load i32, ptr %10, align 4, !tbaa !11
  %75 = load i32, ptr %8, align 4, !tbaa !11
  %76 = icmp ult i32 %74, %75
  br i1 %76, label %77, label %85

77:                                               ; preds = %73
  %78 = load i32, ptr %6, align 4, !tbaa !9
  %79 = invoke noundef zeroext i8 @_ZNK3Reg3regEi(ptr noundef nonnull align 8 dereferenceable(24) %9, i32 noundef 0)
          to label %80 unwind label %28

80:                                               ; preds = %77
  invoke void @_ZN4Code6memoryEN4Insn4TypeEhh(ptr noundef nonnull align 8 dereferenceable(200) %16, i32 noundef %78, i8 noundef zeroext %79, i8 noundef zeroext -1)
          to label %81 unwind label %28

81:                                               ; preds = %80
  br label %82

82:                                               ; preds = %81
  %83 = load i32, ptr %10, align 4, !tbaa !11
  %84 = add i32 %83, 1
  store i32 %84, ptr %10, align 4, !tbaa !11
  br label %73, !llvm.loop !14

85:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #3
  %86 = load i32, ptr %7, align 4, !tbaa !11
  %87 = load i32, ptr %8, align 4, !tbaa !11
  %88 = add i32 %86, %87
  %89 = sub i32 0, %88
  store i32 %89, ptr %15, align 4, !tbaa !11
  %90 = load i32, ptr %6, align 4, !tbaa !9
  %91 = icmp eq i32 %90, 53
  br i1 %91, label %92, label %99

92:                                               ; preds = %85
  %93 = load i32, ptr %15, align 4, !tbaa !11
  invoke void @_ZN4Code7add_ptrEhi(ptr noundef nonnull align 8 dereferenceable(200) %16, i8 noundef zeroext 26, i32 noundef %93)
          to label %94 unwind label %95

94:                                               ; preds = %92
  br label %109

95:                                               ; preds = %105, %102, %92
  %96 = landingpad { ptr, i32 }
          cleanup
  %97 = extractvalue { ptr, i32 } %96, 0
  store ptr %97, ptr %11, align 8
  %98 = extractvalue { ptr, i32 } %96, 1
  store i32 %98, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #3
  br label %130

99:                                               ; preds = %85
  %100 = load i32, ptr %6, align 4, !tbaa !9
  %101 = icmp eq i32 %100, 54
  br i1 %101, label %102, label %105

102:                                              ; preds = %99
  %103 = load i32, ptr %15, align 4, !tbaa !11
  invoke void @_ZN4Code7add_ptrEhi(ptr noundef nonnull align 8 dereferenceable(200) %16, i8 noundef zeroext 28, i32 noundef %103)
          to label %104 unwind label %95

104:                                              ; preds = %102
  br label %108

105:                                              ; preds = %99
  %106 = load i32, ptr %15, align 4, !tbaa !11
  invoke void @_ZN4Code7add_ptrEhi(ptr noundef nonnull align 8 dereferenceable(200) %16, i8 noundef zeroext 30, i32 noundef %106)
          to label %107 unwind label %95

107:                                              ; preds = %105
  br label %108

108:                                              ; preds = %107, %104
  br label %109

109:                                              ; preds = %108, %94
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #3
  br label %128

110:                                              ; preds = %51
  store i32 0, ptr %10, align 4, !tbaa !11
  br label %111

111:                                              ; preds = %124, %110
  %112 = load i32, ptr %10, align 4, !tbaa !11
  %113 = load i32, ptr %8, align 4, !tbaa !11
  %114 = icmp ult i32 %112, %113
  br i1 %114, label %115, label %127

115:                                              ; preds = %111
  %116 = load i32, ptr %6, align 4, !tbaa !9
  %117 = invoke noundef zeroext i8 @_ZNK3Reg3regEi(ptr noundef nonnull align 8 dereferenceable(24) %9, i32 noundef 0)
          to label %118 unwind label %28

118:                                              ; preds = %115
  %119 = load i32, ptr %7, align 4, !tbaa !11
  %120 = load i32, ptr %10, align 4, !tbaa !11
  %121 = add i32 %119, %120
  %122 = trunc i32 %121 to i8
  invoke void @_ZN4Code6memoryEN4Insn4TypeEhh(ptr noundef nonnull align 8 dereferenceable(200) %16, i32 noundef %116, i8 noundef zeroext %117, i8 noundef zeroext %122)
          to label %123 unwind label %28

123:                                              ; preds = %118
  br label %124

124:                                              ; preds = %123
  %125 = load i32, ptr %10, align 4, !tbaa !11
  %126 = add i32 %125, 1
  store i32 %126, ptr %10, align 4, !tbaa !11
  br label %111, !llvm.loop !16

127:                                              ; preds = %111
  br label %128

128:                                              ; preds = %127, %109
  invoke void @_ZN4Code10releaseRegERK3Reg(ptr noundef nonnull align 8 dereferenceable(200) %16, ptr noundef nonnull align 8 dereferenceable(24) %9)
          to label %129 unwind label %28

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

130:                                              ; preds = %95, %44, %40, %28
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #3
  br label %131

131:                                              ; preds = %130
  %132 = load ptr, ptr %11, align 8
  %133 = load i32, ptr %12, align 4
  %134 = insertvalue { ptr, i32 } poison, ptr %132, 0
  %135 = insertvalue { ptr, i32 } %134, i32 %133, 1
  resume { ptr, i32 } %135
}

attributes #0 = { 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 #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 = { 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 = !{!"_ZTSN4Insn4TypeE", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!7, !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}


; 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" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = 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 }

declare i32 @__gxx_personality_v0(...)

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

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

; 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 @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIhSaIhEE9push_backEOh(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4Code11allocateRegEj(ptr dead_on_unwind noalias writable sret(%class.Reg) align 8, ptr noundef nonnull align 8 dereferenceable(200), i32 noundef) local_unnamed_addr #2 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK4Code7hasFlagENS_4FlagE(ptr noundef nonnull align 8 dereferenceable(200), i32 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZN3RegaSERKS_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4Code7st_zeroEN4Insn4TypeEjj(ptr noundef nonnull align 8 dereferenceable(200) %0, i32 noundef %1, i32 noundef %2, i32 noundef %3) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %class.Reg, align 8
  %6 = alloca %class.Reg, align 8
  %7 = alloca i8, align 1
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #3
  call void @_ZN3RegC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5)
  %8 = call noundef zeroext i1 @_ZNK4Code7hasFlagENS_4FlagE(ptr noundef nonnull align 8 dereferenceable(200) %0, i32 noundef 128)
  br i1 %8, label %9, label %22

9:                                                ; preds = %4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #3
  invoke void @_ZN4Code11allocateRegEj(ptr dead_on_unwind nonnull writable sret(%class.Reg) align 8 %6, ptr noundef nonnull align 8 dereferenceable(200) %0, i32 noundef 1)
          to label %10 unwind label %17

10:                                               ; preds = %9
  %11 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3RegaSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(24) %6)
          to label %12 unwind label %19

12:                                               ; preds = %10
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #3
  %13 = invoke noundef zeroext i8 @_ZNK3Reg3regEi(ptr noundef nonnull align 8 dereferenceable(24) %5, i32 noundef 0)
          to label %14 unwind label %.loopexit.split-lp.loopexit.split-lp

14:                                               ; preds = %12
  %15 = invoke noundef zeroext i8 @_ZNK3Reg3regEi(ptr noundef nonnull align 8 dereferenceable(24) %5, i32 noundef 0)
          to label %16 unwind label %.loopexit.split-lp.loopexit.split-lp

16:                                               ; preds = %14
  invoke void @_ZN4Code6tworegEN4Insn4TypeEhh(ptr noundef nonnull align 8 dereferenceable(200) %0, i32 noundef 19, i8 noundef zeroext %13, i8 noundef zeroext %15)
          to label %26 unwind label %.loopexit.split-lp.loopexit.split-lp

.loopexit:                                        ; preds = %.lr.ph44, %34
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

.loopexit.split-lp.loopexit:                      ; preds = %43, %.lr.ph
  %lpad.loopexit39 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

.loopexit.split-lp.loopexit.split-lp:             ; preds = %.invoke, %.loopexit38, %16, %14, %12
  %lpad.loopexit.split-lp40 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

17:                                               ; preds = %9
  %18 = landingpad { ptr, i32 }
          cleanup
  br label %21

19:                                               ; preds = %10
  %20 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #3
  br label %21

21:                                               ; preds = %19, %17
  %.pn = phi { ptr, i32 } [ %20, %19 ], [ %18, %17 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #3
  br label %.loopexit.split-lp

22:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #3
  store i8 1, ptr %7, align 1, !tbaa !5
  invoke void @_ZNSt6vectorIhSaIhEE9push_backEOh(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %23 unwind label %24

23:                                               ; preds = %22
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #3
  br label %26

24:                                               ; preds = %22
  %25 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #3
  br label %.loopexit.split-lp

26:                                               ; preds = %16, %23
  %27 = icmp eq i32 %1, 53
  %28 = add i32 %3, %2
  %29 = icmp ugt i32 %28, 64
  %or.cond = or i1 %27, %29
  br i1 %or.cond, label %.invoke, label %.preheader

.preheader:                                       ; preds = %26
  %.not = icmp eq i32 %3, 0
  br i1 %.not, label %.loopexit38, label %.lr.ph

.invoke:                                          ; preds = %26
  %30 = icmp eq i32 %1, 54
  %. = select i1 %30, i8 28, i8 30
  %31 = select i1 %27, i8 26, i8 %.
  invoke void @_ZN4Code7add_ptrEhi(ptr noundef nonnull align 8 dereferenceable(200) %0, i8 noundef zeroext %31, i32 noundef %2)
          to label %32 unwind label %.loopexit.split-lp.loopexit.split-lp

32:                                               ; preds = %.invoke
  %.not45 = icmp eq i32 %3, 0
  br i1 %.not45, label %._crit_edge, label %.lr.ph44

.lr.ph44:                                         ; preds = %32, %35
  %.043 = phi i32 [ %36, %35 ], [ 0, %32 ]
  %33 = invoke noundef zeroext i8 @_ZNK3Reg3regEi(ptr noundef nonnull align 8 dereferenceable(24) %5, i32 noundef 0)
          to label %34 unwind label %.loopexit

34:                                               ; preds = %.lr.ph44
  invoke void @_ZN4Code6memoryEN4Insn4TypeEhh(ptr noundef nonnull align 8 dereferenceable(200) %0, i32 noundef %1, i8 noundef zeroext %33, i8 noundef zeroext -1)
          to label %35 unwind label %.loopexit

35:                                               ; preds = %34
  %36 = add nuw i32 %.043, 1
  %exitcond46.not = icmp eq i32 %36, %3
  br i1 %exitcond46.not, label %._crit_edge, label %.lr.ph44, !llvm.loop !8

._crit_edge:                                      ; preds = %35, %32
  %37 = sub i32 0, %28
  %38 = icmp eq i32 %1, 54
  %.48 = select i1 %38, i8 28, i8 30
  %39 = select i1 %27, i8 26, i8 %.48
  invoke void @_ZN4Code7add_ptrEhi(ptr noundef nonnull align 8 dereferenceable(200) %0, i8 noundef zeroext %39, i32 noundef %37)
          to label %.loopexit38 unwind label %40

40:                                               ; preds = %._crit_edge
  %41 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

.lr.ph:                                           ; preds = %.preheader, %46
  %.142 = phi i32 [ %47, %46 ], [ 0, %.preheader ]
  %42 = invoke noundef zeroext i8 @_ZNK3Reg3regEi(ptr noundef nonnull align 8 dereferenceable(24) %5, i32 noundef 0)
          to label %43 unwind label %.loopexit.split-lp.loopexit

43:                                               ; preds = %.lr.ph
  %44 = add i32 %.142, %2
  %45 = trunc i32 %44 to i8
  invoke void @_ZN4Code6memoryEN4Insn4TypeEhh(ptr noundef nonnull align 8 dereferenceable(200) %0, i32 noundef %1, i8 noundef zeroext %42, i8 noundef zeroext %45)
          to label %46 unwind label %.loopexit.split-lp.loopexit

46:                                               ; preds = %43
  %47 = add nuw i32 %.142, 1
  %exitcond.not = icmp eq i32 %47, %3
  br i1 %exitcond.not, label %.loopexit38, label %.lr.ph, !llvm.loop !10

.loopexit38:                                      ; preds = %46, %._crit_edge, %.preheader
  invoke void @_ZN4Code10releaseRegERK3Reg(ptr noundef nonnull align 8 dereferenceable(200) %0, ptr noundef nonnull align 8 dereferenceable(24) %5)
          to label %48 unwind label %.loopexit.split-lp.loopexit.split-lp

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

.loopexit.split-lp:                               ; preds = %.loopexit, %.loopexit.split-lp.loopexit.split-lp, %.loopexit.split-lp.loopexit, %40, %24, %21
  %.pn35 = phi { ptr, i32 } [ %41, %40 ], [ %.pn, %21 ], [ %25, %24 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit39, %.loopexit.split-lp.loopexit ], [ %lpad.loopexit.split-lp40, %.loopexit.split-lp.loopexit.split-lp ]
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #3
  resume { ptr, i32 } %.pn35
}

attributes #0 = { 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 #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 = { 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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = distinct !{!8, !9}
!9 = !{!"llvm.loop.mustprogress"}
!10 = distinct !{!10, !9}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass