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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3Reg4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #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 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 uwtable
declare dso_local void @_ZN4Code6oneregEN4Insn4TypeEh(ptr noundef nonnull align 8 dereferenceable(200), i32 noundef, i8 noundef zeroext) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4Code5bitopEN4Insn4TypeEhh(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 noundef zeroext i8 @_ZN4Code7tempregEv(ptr noundef nonnull align 8 dereferenceable(200)) #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN4Code12have_tempregEv(ptr noundef nonnull align 8 dereferenceable(200)) #2 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4Code3rorERK3Regj(ptr noundef nonnull align 8 dereferenceable(200) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %2) #2 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i8, align 1
  %9 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store i32 %2, ptr %6, align 4, !tbaa !9
  %10 = load ptr, ptr %4, align 8
  %11 = load i32, ptr %6, align 4, !tbaa !9
  %12 = icmp eq i32 %11, 0
  br i1 %12, label %17, label %13

13:                                               ; preds = %3
  %14 = load ptr, ptr %5, align 8, !tbaa !5
  %15 = call noundef i32 @_ZNK3Reg4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %14)
  %16 = icmp eq i32 %15, 0
  br i1 %16, label %17, label %18

17:                                               ; preds = %13, %3
  br label %144

18:                                               ; preds = %13
  %19 = load i32, ptr %6, align 4, !tbaa !9
  %20 = icmp eq i32 %19, 1
  br i1 %20, label %21, label %55

21:                                               ; preds = %18
  %22 = load ptr, ptr %5, align 8, !tbaa !5
  %23 = call noundef zeroext i8 @_ZNK3Reg3regEi(ptr noundef nonnull align 8 dereferenceable(24) %22, i32 noundef 0)
  call void @_ZN4Code5bitopEN4Insn4TypeEhh(ptr noundef nonnull align 8 dereferenceable(200) %10, i32 noundef 7, i8 noundef zeroext %23, i8 noundef zeroext 0)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  %24 = load ptr, ptr %5, align 8, !tbaa !5
  %25 = call noundef i32 @_ZNK3Reg4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %24)
  %26 = sub nsw i32 %25, 1
  store i32 %26, ptr %7, align 4, !tbaa !9
  br label %27

27:                                               ; preds = %46, %21
  %28 = load i32, ptr %7, align 4, !tbaa !9
  %29 = icmp sge i32 %28, 0
  br i1 %29, label %31, label %30

30:                                               ; preds = %27
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  br label %49

31:                                               ; preds = %27
  %32 = load i32, ptr %7, align 4, !tbaa !9
  %33 = load ptr, ptr %5, align 8, !tbaa !5
  %34 = call noundef i32 @_ZNK3Reg4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %33)
  %35 = sub nsw i32 %34, 1
  %36 = icmp eq i32 %32, %35
  br i1 %36, label %37, label %41

37:                                               ; preds = %31
  %38 = load ptr, ptr %5, align 8, !tbaa !5
  %39 = load i32, ptr %7, align 4, !tbaa !9
  %40 = call noundef zeroext i8 @_ZNK3Reg3regEi(ptr noundef nonnull align 8 dereferenceable(24) %38, i32 noundef %39)
  call void @_ZN4Code6oneregEN4Insn4TypeEh(ptr noundef nonnull align 8 dereferenceable(200) %10, i32 noundef 33, i8 noundef zeroext %40)
  br label %45

41:                                               ; preds = %31
  %42 = load ptr, ptr %5, align 8, !tbaa !5
  %43 = load i32, ptr %7, align 4, !tbaa !9
  %44 = call noundef zeroext i8 @_ZNK3Reg3regEi(ptr noundef nonnull align 8 dereferenceable(24) %42, i32 noundef %43)
  call void @_ZN4Code6oneregEN4Insn4TypeEh(ptr noundef nonnull align 8 dereferenceable(200) %10, i32 noundef 47, i8 noundef zeroext %44)
  br label %45

45:                                               ; preds = %41, %37
  br label %46

46:                                               ; preds = %45
  %47 = load i32, ptr %7, align 4, !tbaa !9
  %48 = add nsw i32 %47, -1
  store i32 %48, ptr %7, align 4, !tbaa !9
  br label %27, !llvm.loop !11

49:                                               ; preds = %30
  %50 = load ptr, ptr %5, align 8, !tbaa !5
  %51 = load ptr, ptr %5, align 8, !tbaa !5
  %52 = call noundef i32 @_ZNK3Reg4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %51)
  %53 = sub nsw i32 %52, 1
  %54 = call noundef zeroext i8 @_ZNK3Reg3regEi(ptr noundef nonnull align 8 dereferenceable(24) %50, i32 noundef %53)
  call void @_ZN4Code5bitopEN4Insn4TypeEhh(ptr noundef nonnull align 8 dereferenceable(200) %10, i32 noundef 6, i8 noundef zeroext %54, i8 noundef zeroext 7)
  br label %143

55:                                               ; preds = %18
  %56 = load i32, ptr %6, align 4, !tbaa !9
  %57 = urem i32 %56, 8
  %58 = icmp eq i32 %57, 0
  br i1 %58, label %59, label %63

59:                                               ; preds = %55
  %60 = load ptr, ptr %5, align 8, !tbaa !5
  %61 = load i32, ptr %6, align 4, !tbaa !9
  %62 = udiv i32 %61, 8
  call void @_ZN4Code9ror_bytesERK3Regj(ptr noundef nonnull align 8 dereferenceable(200) %10, ptr noundef nonnull align 8 dereferenceable(24) %60, i32 noundef %62)
  br label %142

63:                                               ; preds = %55
  %64 = load i32, ptr %6, align 4, !tbaa !9
  %65 = icmp eq i32 %64, 4
  br i1 %65, label %66, label %73

66:                                               ; preds = %63
  %67 = load ptr, ptr %5, align 8, !tbaa !5
  %68 = call noundef i32 @_ZNK3Reg4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %67)
  %69 = icmp eq i32 %68, 1
  br i1 %69, label %70, label %73

70:                                               ; preds = %66
  %71 = load ptr, ptr %5, align 8, !tbaa !5
  %72 = call noundef zeroext i8 @_ZNK3Reg3regEi(ptr noundef nonnull align 8 dereferenceable(24) %71, i32 noundef 0)
  call void @_ZN4Code6oneregEN4Insn4TypeEh(ptr noundef nonnull align 8 dereferenceable(200) %10, i32 noundef 56, i8 noundef zeroext %72)
  br label %141

73:                                               ; preds = %66, %63
  %74 = load i32, ptr %6, align 4, !tbaa !9
  %75 = urem i32 %74, 8
  %76 = icmp ule i32 %75, 4
  br i1 %76, label %77, label %131

77:                                               ; preds = %73
  %78 = load ptr, ptr %5, align 8, !tbaa !5
  %79 = load i32, ptr %6, align 4, !tbaa !9
  %80 = udiv i32 %79, 8
  call void @_ZN4Code9ror_bytesERK3Regj(ptr noundef nonnull align 8 dereferenceable(200) %10, ptr noundef nonnull align 8 dereferenceable(24) %78, i32 noundef %80)
  %81 = load i32, ptr %6, align 4, !tbaa !9
  %82 = urem i32 %81, 8
  store i32 %82, ptr %6, align 4, !tbaa !9
  %83 = call noundef zeroext i1 @_ZN4Code12have_tempregEv(ptr noundef nonnull align 8 dereferenceable(200) %10)
  br i1 %83, label %84, label %121

84:                                               ; preds = %77
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #3
  %85 = call noundef zeroext i8 @_ZN4Code7tempregEv(ptr noundef nonnull align 8 dereferenceable(200) %10)
  store i8 %85, ptr %8, align 1, !tbaa !13
  %86 = load i8, ptr %8, align 1, !tbaa !13
  call void @_ZN4Code7zeroregEhb(ptr noundef nonnull align 8 dereferenceable(200) %10, i8 noundef zeroext %86, i1 noundef zeroext true)
  br label %87

87:                                               ; preds = %110, %84
  %88 = load i32, ptr %6, align 4, !tbaa !9
  %89 = icmp ugt i32 %88, 0
  br i1 %89, label %90, label %114

90:                                               ; preds = %87
  %91 = load ptr, ptr %5, align 8, !tbaa !5
  %92 = load ptr, ptr %5, align 8, !tbaa !5
  %93 = call noundef i32 @_ZNK3Reg4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %92)
  %94 = sub nsw i32 %93, 1
  %95 = call noundef zeroext i8 @_ZNK3Reg3regEi(ptr noundef nonnull align 8 dereferenceable(24) %91, i32 noundef %94)
  call void @_ZN4Code6oneregEN4Insn4TypeEh(ptr noundef nonnull align 8 dereferenceable(200) %10, i32 noundef 33, i8 noundef zeroext %95)
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  %96 = load ptr, ptr %5, align 8, !tbaa !5
  %97 = call noundef i32 @_ZNK3Reg4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %96)
  %98 = sub nsw i32 %97, 2
  store i32 %98, ptr %9, align 4, !tbaa !9
  br label %99

99:                                               ; preds = %107, %90
  %100 = load i32, ptr %9, align 4, !tbaa !9
  %101 = icmp sge i32 %100, 0
  br i1 %101, label %103, label %102

102:                                              ; preds = %99
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  br label %110

103:                                              ; preds = %99
  %104 = load ptr, ptr %5, align 8, !tbaa !5
  %105 = load i32, ptr %9, align 4, !tbaa !9
  %106 = call noundef zeroext i8 @_ZNK3Reg3regEi(ptr noundef nonnull align 8 dereferenceable(24) %104, i32 noundef %105)
  call void @_ZN4Code6oneregEN4Insn4TypeEh(ptr noundef nonnull align 8 dereferenceable(200) %10, i32 noundef 47, i8 noundef zeroext %106)
  br label %107

107:                                              ; preds = %103
  %108 = load i32, ptr %9, align 4, !tbaa !9
  %109 = add nsw i32 %108, -1
  store i32 %109, ptr %9, align 4, !tbaa !9
  br label %99, !llvm.loop !14

110:                                              ; preds = %102
  %111 = load i8, ptr %8, align 1, !tbaa !13
  call void @_ZN4Code6oneregEN4Insn4TypeEh(ptr noundef nonnull align 8 dereferenceable(200) %10, i32 noundef 47, i8 noundef zeroext %111)
  %112 = load i32, ptr %6, align 4, !tbaa !9
  %113 = add i32 %112, -1
  store i32 %113, ptr %6, align 4, !tbaa !9
  br label %87, !llvm.loop !15

114:                                              ; preds = %87
  %115 = load ptr, ptr %5, align 8, !tbaa !5
  %116 = load ptr, ptr %5, align 8, !tbaa !5
  %117 = call noundef i32 @_ZNK3Reg4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %116)
  %118 = sub nsw i32 %117, 1
  %119 = call noundef zeroext i8 @_ZNK3Reg3regEi(ptr noundef nonnull align 8 dereferenceable(24) %115, i32 noundef %118)
  %120 = load i8, ptr %8, align 1, !tbaa !13
  call void @_ZN4Code6tworegEN4Insn4TypeEhh(ptr noundef nonnull align 8 dereferenceable(200) %10, i32 noundef 38, i8 noundef zeroext %119, i8 noundef zeroext %120)
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #3
  br label %130

121:                                              ; preds = %77
  br label %122

122:                                              ; preds = %125, %121
  %123 = load i32, ptr %6, align 4, !tbaa !9
  %124 = icmp ugt i32 %123, 0
  br i1 %124, label %125, label %129

125:                                              ; preds = %122
  %126 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZN4Code3rorERK3Regj(ptr noundef nonnull align 8 dereferenceable(200) %10, ptr noundef nonnull align 8 dereferenceable(24) %126, i32 noundef 1)
  %127 = load i32, ptr %6, align 4, !tbaa !9
  %128 = add i32 %127, -1
  store i32 %128, ptr %6, align 4, !tbaa !9
  br label %122, !llvm.loop !16

129:                                              ; preds = %122
  br label %130

130:                                              ; preds = %129, %114
  br label %140

131:                                              ; preds = %73
  %132 = load ptr, ptr %5, align 8, !tbaa !5
  %133 = load i32, ptr %6, align 4, !tbaa !9
  %134 = udiv i32 %133, 8
  %135 = add i32 %134, 1
  call void @_ZN4Code9ror_bytesERK3Regj(ptr noundef nonnull align 8 dereferenceable(200) %10, ptr noundef nonnull align 8 dereferenceable(24) %132, i32 noundef %135)
  %136 = load ptr, ptr %5, align 8, !tbaa !5
  %137 = load i32, ptr %6, align 4, !tbaa !9
  %138 = urem i32 %137, 8
  %139 = sub i32 8, %138
  call void @_ZN4Code3rolERK3Regj(ptr noundef nonnull align 8 dereferenceable(200) %10, ptr noundef nonnull align 8 dereferenceable(24) %136, i32 noundef %139)
  br label %140

140:                                              ; preds = %131, %130
  br label %141

141:                                              ; preds = %140, %70
  br label %142

142:                                              ; preds = %141, %59
  br label %143

143:                                              ; preds = %142, %49
  br label %144

144:                                              ; preds = %143, %17
  ret void
}

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

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


; 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 nounwind uwtable
declare dso_local noundef i32 @_ZNK3Reg4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0 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 #1 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 #1 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i8 @_ZN4Code7tempregEv(ptr noundef nonnull align 8 dereferenceable(200)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN4Code12have_tempregEv(ptr noundef nonnull align 8 dereferenceable(200)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4Code3rorERK3Regj(ptr noundef nonnull align 8 dereferenceable(200) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %2) local_unnamed_addr #1 align 2 {
  %4 = icmp eq i32 %2, 0
  br i1 %4, label %.loopexit, label %5

5:                                                ; preds = %3
  %6 = tail call noundef i32 @_ZNK3Reg4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %7 = icmp eq i32 %6, 0
  br i1 %7, label %.loopexit, label %8

8:                                                ; preds = %5
  %9 = icmp eq i32 %2, 1
  br i1 %9, label %10, label %21

10:                                               ; preds = %8
  %11 = tail call noundef zeroext i8 @_ZNK3Reg3regEi(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef 0)
  tail call void @_ZN4Code5bitopEN4Insn4TypeEhh(ptr noundef nonnull align 8 dereferenceable(200) %0, i32 noundef 7, i8 noundef zeroext %11, i8 noundef zeroext 0)
  %12 = tail call noundef i32 @_ZNK3Reg4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %13 = icmp sgt i32 %12, 0
  br i1 %13, label %.lr.ph58, label %._crit_edge59

._crit_edge59:                                    ; preds = %.lr.ph58, %10
  %14 = tail call noundef i32 @_ZNK3Reg4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %15 = add nsw i32 %14, -1
  %16 = tail call noundef zeroext i8 @_ZNK3Reg3regEi(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %15)
  tail call void @_ZN4Code5bitopEN4Insn4TypeEhh(ptr noundef nonnull align 8 dereferenceable(200) %0, i32 noundef 6, i8 noundef zeroext %16, i8 noundef zeroext 7)
  br label %.loopexit

.lr.ph58:                                         ; preds = %10, %.lr.ph58
  %.047.in55 = phi i32 [ %.04756, %.lr.ph58 ], [ %12, %10 ]
  %.04756 = add nsw i32 %.047.in55, -1
  %17 = tail call noundef i32 @_ZNK3Reg4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %18 = icmp eq i32 %.047.in55, %17
  %19 = tail call noundef zeroext i8 @_ZNK3Reg3regEi(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %.04756)
  %. = select i1 %18, i32 33, i32 47
  tail call void @_ZN4Code6oneregEN4Insn4TypeEh(ptr noundef nonnull align 8 dereferenceable(200) %0, i32 noundef %., i8 noundef zeroext %19)
  %20 = icmp ugt i32 %.047.in55, 1
  br i1 %20, label %.lr.ph58, label %._crit_edge59, !llvm.loop !5

21:                                               ; preds = %8
  %22 = and i32 %2, 7
  %23 = icmp eq i32 %22, 0
  br i1 %23, label %24, label %26

24:                                               ; preds = %21
  %25 = lshr exact i32 %2, 3
  tail call void @_ZN4Code9ror_bytesERK3Regj(ptr noundef nonnull align 8 dereferenceable(200) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %25)
  br label %.loopexit

26:                                               ; preds = %21
  %27 = icmp eq i32 %2, 4
  br i1 %27, label %28, label %33

28:                                               ; preds = %26
  %29 = tail call noundef i32 @_ZNK3Reg4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %30 = icmp eq i32 %29, 1
  br i1 %30, label %31, label %.thread

31:                                               ; preds = %28
  %32 = tail call noundef zeroext i8 @_ZNK3Reg3regEi(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef 0)
  tail call void @_ZN4Code6oneregEN4Insn4TypeEh(ptr noundef nonnull align 8 dereferenceable(200) %0, i32 noundef 56, i8 noundef zeroext %32)
  br label %.loopexit

33:                                               ; preds = %26
  %34 = icmp ult i32 %22, 5
  br i1 %34, label %.thread, label %54

.thread:                                          ; preds = %28, %33
  %35 = lshr i32 %2, 3
  tail call void @_ZN4Code9ror_bytesERK3Regj(ptr noundef nonnull align 8 dereferenceable(200) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %35)
  %36 = tail call noundef zeroext i1 @_ZN4Code12have_tempregEv(ptr noundef nonnull align 8 dereferenceable(200) %0)
  br i1 %36, label %37, label %.preheader

37:                                               ; preds = %.thread
  %38 = tail call noundef zeroext i8 @_ZN4Code7tempregEv(ptr noundef nonnull align 8 dereferenceable(200) %0)
  tail call void @_ZN4Code7zeroregEhb(ptr noundef nonnull align 8 dereferenceable(200) %0, i8 noundef zeroext %38, i1 noundef zeroext true)
  br label %39

39:                                               ; preds = %37, %._crit_edge
  %.04653 = phi i32 [ %22, %37 ], [ %46, %._crit_edge ]
  %40 = tail call noundef i32 @_ZNK3Reg4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %41 = add nsw i32 %40, -1
  %42 = tail call noundef zeroext i8 @_ZNK3Reg3regEi(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %41)
  tail call void @_ZN4Code6oneregEN4Insn4TypeEh(ptr noundef nonnull align 8 dereferenceable(200) %0, i32 noundef 33, i8 noundef zeroext %42)
  %43 = tail call noundef i32 @_ZNK3Reg4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %44 = icmp sgt i32 %43, 1
  br i1 %44, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %39
  %45 = add nsw i32 %43, -2
  br label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %39
  tail call void @_ZN4Code6oneregEN4Insn4TypeEh(ptr noundef nonnull align 8 dereferenceable(200) %0, i32 noundef 47, i8 noundef zeroext %38)
  %46 = add nsw i32 %.04653, -1
  %.not50 = icmp eq i32 %46, 0
  br i1 %.not50, label %49, label %39, !llvm.loop !7

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %.052 = phi i32 [ %48, %.lr.ph ], [ %45, %.lr.ph.preheader ]
  %47 = tail call noundef zeroext i8 @_ZNK3Reg3regEi(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %.052)
  tail call void @_ZN4Code6oneregEN4Insn4TypeEh(ptr noundef nonnull align 8 dereferenceable(200) %0, i32 noundef 47, i8 noundef zeroext %47)
  %48 = add nsw i32 %.052, -1
  %.not60 = icmp eq i32 %.052, 0
  br i1 %.not60, label %._crit_edge, label %.lr.ph, !llvm.loop !8

49:                                               ; preds = %._crit_edge
  %50 = tail call noundef i32 @_ZNK3Reg4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %51 = add nsw i32 %50, -1
  %52 = tail call noundef zeroext i8 @_ZNK3Reg3regEi(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %51)
  tail call void @_ZN4Code6tworegEN4Insn4TypeEhh(ptr noundef nonnull align 8 dereferenceable(200) %0, i32 noundef 38, i8 noundef zeroext %52, i8 noundef zeroext %38)
  br label %.loopexit

.preheader:                                       ; preds = %.thread, %.preheader
  %.151 = phi i32 [ %53, %.preheader ], [ %22, %.thread ]
  tail call void @_ZN4Code3rorERK3Regj(ptr noundef nonnull align 8 dereferenceable(200) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef 1)
  %53 = add nsw i32 %.151, -1
  %.not = icmp eq i32 %53, 0
  br i1 %.not, label %.loopexit, label %.preheader, !llvm.loop !9

54:                                               ; preds = %33
  %55 = lshr i32 %2, 3
  %56 = add nuw nsw i32 %55, 1
  tail call void @_ZN4Code9ror_bytesERK3Regj(ptr noundef nonnull align 8 dereferenceable(200) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %56)
  %57 = sub nuw nsw i32 8, %22
  tail call void @_ZN4Code3rolERK3Regj(ptr noundef nonnull align 8 dereferenceable(200) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %57)
  br label %.loopexit

.loopexit:                                        ; preds = %.preheader, %._crit_edge59, %31, %49, %54, %24, %3, %5
  ret void
}

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

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

!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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = distinct !{!7, !6}
!8 = distinct !{!8, !6}
!9 = distinct !{!9, !6}


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