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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z17get_spongent_sboxv(ptr dead_on_unwind noalias writable sret(%class.Sbox) align 8) #0

; Function Attrs: mustprogress uwtable
define dso_local void @_Z27gen_spongent160_permutationR4Code(ptr noundef nonnull align 8 dereferenceable(200) %0) #0 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca %class.Reg, align 8
  %4 = alloca %class.Reg, align 8
  %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
  %11 = alloca %class.Sbox, align 8
  %12 = alloca %class.Reg, align 8
  %13 = alloca i8, align 1
  %14 = alloca %class.Reg, align 8
  %15 = alloca %class.Reg, align 8
  %16 = alloca [160 x i8], align 16
  %17 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %18 = load ptr, ptr %2, align 8, !tbaa !5
  call void @_ZN4Code20prologue_permutationEPKcj(ptr noundef nonnull align 8 dereferenceable(200) %18, ptr noundef @.str, i32 noundef 0)
  %19 = load ptr, ptr %2, align 8, !tbaa !5
  call void @_ZN4Code7setFlagENS_4FlagE(ptr noundef nonnull align 8 dereferenceable(200) %19, i32 noundef 4)
  %20 = load ptr, ptr %2, align 8, !tbaa !5
  call void @_ZN4Code9clearFlagENS_4FlagE(ptr noundef nonnull align 8 dereferenceable(200) %20, i32 noundef 2)
  call void @llvm.lifetime.start.p0(i64 24, ptr %3) #4
  %21 = 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) %21, i32 noundef 1)
  call void @llvm.lifetime.start.p0(i64 24, ptr %4) #4
  %22 = load ptr, ptr %2, align 8, !tbaa !5
  invoke void @_ZN4Code15allocateHighRegEj(ptr dead_on_unwind writable sret(%class.Reg) align 8 %4, ptr noundef nonnull align 8 dereferenceable(200) %22, i32 noundef 1)
          to label %23 unwind label %60

23:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 24, ptr %7) #4
  %24 = load ptr, ptr %2, align 8, !tbaa !5
  invoke void @_ZN4Code15allocateHighRegEj(ptr dead_on_unwind writable sret(%class.Reg) align 8 %7, ptr noundef nonnull align 8 dereferenceable(200) %24, i32 noundef 1)
          to label %25 unwind label %64

25:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 24, ptr %8) #4
  %26 = load ptr, ptr %2, align 8, !tbaa !5
  invoke void @_ZN4Code11allocateRegEj(ptr dead_on_unwind writable sret(%class.Reg) align 8 %8, ptr noundef nonnull align 8 dereferenceable(200) %26, i32 noundef 20)
          to label %27 unwind label %68

27:                                               ; preds = %25
  %28 = load ptr, ptr %2, align 8, !tbaa !5
  invoke void @_ZN4Code3ldzERK3Regh(ptr noundef nonnull align 8 dereferenceable(200) %28, ptr noundef nonnull align 8 dereferenceable(24) %8, i8 noundef zeroext 0)
          to label %29 unwind label %72

29:                                               ; preds = %27
  %30 = load ptr, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %9) #4
  invoke void @_ZN3Reg5x_ptrEv(ptr dead_on_unwind writable sret(%class.Reg) align 8 %9)
          to label %31 unwind label %76

31:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 24, ptr %10) #4
  invoke void @_ZN3Reg5z_ptrEv(ptr dead_on_unwind writable sret(%class.Reg) align 8 %10)
          to label %32 unwind label %80

32:                                               ; preds = %31
  invoke void @_ZN4Code4moveERK3RegS2_b(ptr noundef nonnull align 8 dereferenceable(200) %30, ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 8 dereferenceable(24) %10, i1 noundef zeroext false)
          to label %33 unwind label %84

33:                                               ; preds = %32
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #4
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #4
  %34 = load ptr, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %11) #4
  invoke void @_Z17get_spongent_sboxv(ptr dead_on_unwind writable sret(%class.Sbox) align 8 %11)
          to label %35 unwind label %90

35:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 24, ptr %12) #4
  invoke void @_ZN3RegC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12)
          to label %36 unwind label %94

36:                                               ; preds = %35
  invoke void @_ZN4Code10sbox_setupEhRK4SboxRK3Reg(ptr noundef nonnull align 8 dereferenceable(200) %34, i8 noundef zeroext 0, ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 8 dereferenceable(24) %12)
          to label %37 unwind label %98

37:                                               ; preds = %36
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #4
  call void @_ZN4SboxD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr %13) #4
  store i8 0, ptr %13, align 1, !tbaa !9
  %38 = load ptr, ptr %2, align 8, !tbaa !5
  invoke void @_ZN4Code4moveERK3Regy(ptr noundef nonnull align 8 dereferenceable(200) %38, ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef 80)
          to label %39 unwind label %104

39:                                               ; preds = %37
  %40 = load ptr, ptr %2, align 8, !tbaa !5
  invoke void @_ZN4Code4moveERK3Regy(ptr noundef nonnull align 8 dereferenceable(200) %40, ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef 117)
          to label %41 unwind label %104

41:                                               ; preds = %39
  %42 = load ptr, ptr %2, align 8, !tbaa !5
  invoke void @_ZN4Code4moveERK3Regy(ptr noundef nonnull align 8 dereferenceable(200) %42, ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef 174)
          to label %43 unwind label %104

43:                                               ; preds = %41
  %44 = load ptr, ptr %2, align 8, !tbaa !5
  invoke void @_ZN4Code5labelERh(ptr noundef nonnull align 8 dereferenceable(200) %44, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %45 unwind label %104

45:                                               ; preds = %43
  %46 = load ptr, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #4
  invoke void @_ZN3RegC1ERKS_hh(ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull align 8 dereferenceable(24) %8, i8 noundef zeroext 0, i8 noundef zeroext 1)
          to label %47 unwind label %108

47:                                               ; preds = %45
  invoke void @_ZN4Code6logxorERK3RegS2_(ptr noundef nonnull align 8 dereferenceable(200) %46, ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull align 8 dereferenceable(24) %4)
          to label %48 unwind label %112

48:                                               ; preds = %47
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #4
  %49 = load ptr, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %15) #4
  invoke void @_ZN3RegC1ERKS_hh(ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 8 dereferenceable(24) %8, i8 noundef zeroext 19, i8 noundef zeroext 1)
          to label %50 unwind label %117

50:                                               ; preds = %48
  invoke void @_ZN4Code6logxorERK3RegS2_(ptr noundef nonnull align 8 dereferenceable(200) %49, ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 8 dereferenceable(24) %7)
          to label %51 unwind label %121

51:                                               ; preds = %50
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #4
  %52 = load ptr, ptr %2, align 8, !tbaa !5
  invoke void @_ZL20spongent_update_lfsrR4CodeRK3RegS3_(ptr noundef nonnull align 8 dereferenceable(200) %52, ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(24) %7)
          to label %53 unwind label %104

53:                                               ; preds = %51
  %54 = load ptr, ptr %2, align 8, !tbaa !5
  invoke void @_ZN4Code11sbox_lookupERK3RegS2_(ptr noundef nonnull align 8 dereferenceable(200) %54, ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(24) %8)
          to label %55 unwind label %104

55:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 160, ptr %16) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  store i32 0, ptr %17, align 4, !tbaa !10
  br label %56

56:                                               ; preds = %134, %55
  %57 = load i32, ptr %17, align 4, !tbaa !10
  %58 = icmp slt i32 %57, 159
  br i1 %58, label %126, label %59

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

60:                                               ; preds = %1
  %61 = landingpad { ptr, i32 }
          cleanup
  %62 = extractvalue { ptr, i32 } %61, 0
  store ptr %62, ptr %5, align 8
  %63 = extractvalue { ptr, i32 } %61, 1
  store i32 %63, ptr %6, align 4
  br label %158

64:                                               ; preds = %23
  %65 = landingpad { ptr, i32 }
          cleanup
  %66 = extractvalue { ptr, i32 } %65, 0
  store ptr %66, ptr %5, align 8
  %67 = extractvalue { ptr, i32 } %65, 1
  store i32 %67, ptr %6, align 4
  br label %157

68:                                               ; preds = %25
  %69 = landingpad { ptr, i32 }
          cleanup
  %70 = extractvalue { ptr, i32 } %69, 0
  store ptr %70, ptr %5, align 8
  %71 = extractvalue { ptr, i32 } %69, 1
  store i32 %71, ptr %6, align 4
  br label %156

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

76:                                               ; preds = %29
  %77 = landingpad { ptr, i32 }
          cleanup
  %78 = extractvalue { ptr, i32 } %77, 0
  store ptr %78, ptr %5, align 8
  %79 = extractvalue { ptr, i32 } %77, 1
  store i32 %79, ptr %6, align 4
  br label %89

80:                                               ; preds = %31
  %81 = landingpad { ptr, i32 }
          cleanup
  %82 = extractvalue { ptr, i32 } %81, 0
  store ptr %82, ptr %5, align 8
  %83 = extractvalue { ptr, i32 } %81, 1
  store i32 %83, ptr %6, align 4
  br label %88

84:                                               ; preds = %32
  %85 = landingpad { ptr, i32 }
          cleanup
  %86 = extractvalue { ptr, i32 } %85, 0
  store ptr %86, ptr %5, align 8
  %87 = extractvalue { ptr, i32 } %85, 1
  store i32 %87, ptr %6, align 4
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #4
  br label %88

88:                                               ; preds = %84, %80
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #4
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #4
  br label %89

89:                                               ; preds = %88, %76
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #4
  br label %155

90:                                               ; preds = %33
  %91 = landingpad { ptr, i32 }
          cleanup
  %92 = extractvalue { ptr, i32 } %91, 0
  store ptr %92, ptr %5, align 8
  %93 = extractvalue { ptr, i32 } %91, 1
  store i32 %93, ptr %6, align 4
  br label %103

94:                                               ; preds = %35
  %95 = landingpad { ptr, i32 }
          cleanup
  %96 = extractvalue { ptr, i32 } %95, 0
  store ptr %96, ptr %5, align 8
  %97 = extractvalue { ptr, i32 } %95, 1
  store i32 %97, ptr %6, align 4
  br label %102

98:                                               ; preds = %36
  %99 = landingpad { ptr, i32 }
          cleanup
  %100 = extractvalue { ptr, i32 } %99, 0
  store ptr %100, ptr %5, align 8
  %101 = extractvalue { ptr, i32 } %99, 1
  store i32 %101, ptr %6, align 4
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #4
  br label %102

102:                                              ; preds = %98, %94
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #4
  call void @_ZN4SboxD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #4
  br label %103

103:                                              ; preds = %102, %90
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #4
  br label %155

104:                                              ; preds = %53, %51, %43, %41, %39, %37
  %105 = landingpad { ptr, i32 }
          cleanup
  %106 = extractvalue { ptr, i32 } %105, 0
  store ptr %106, ptr %5, align 8
  %107 = extractvalue { ptr, i32 } %105, 1
  store i32 %107, ptr %6, align 4
  br label %154

108:                                              ; preds = %45
  %109 = landingpad { ptr, i32 }
          cleanup
  %110 = extractvalue { ptr, i32 } %109, 0
  store ptr %110, ptr %5, align 8
  %111 = extractvalue { ptr, i32 } %109, 1
  store i32 %111, ptr %6, align 4
  br label %116

112:                                              ; preds = %47
  %113 = landingpad { ptr, i32 }
          cleanup
  %114 = extractvalue { ptr, i32 } %113, 0
  store ptr %114, ptr %5, align 8
  %115 = extractvalue { ptr, i32 } %113, 1
  store i32 %115, ptr %6, align 4
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #4
  br label %116

116:                                              ; preds = %112, %108
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #4
  br label %154

117:                                              ; preds = %48
  %118 = landingpad { ptr, i32 }
          cleanup
  %119 = extractvalue { ptr, i32 } %118, 0
  store ptr %119, ptr %5, align 8
  %120 = extractvalue { ptr, i32 } %118, 1
  store i32 %120, ptr %6, align 4
  br label %125

121:                                              ; preds = %50
  %122 = landingpad { ptr, i32 }
          cleanup
  %123 = extractvalue { ptr, i32 } %122, 0
  store ptr %123, ptr %5, align 8
  %124 = extractvalue { ptr, i32 } %122, 1
  store i32 %124, ptr %6, align 4
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #4
  br label %125

125:                                              ; preds = %121, %117
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #4
  br label %154

126:                                              ; preds = %56
  %127 = load i32, ptr %17, align 4, !tbaa !10
  %128 = mul nsw i32 40, %127
  %129 = srem i32 %128, 159
  %130 = trunc i32 %129 to i8
  %131 = load i32, ptr %17, align 4, !tbaa !10
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds [160 x i8], ptr %16, i64 0, i64 %132
  store i8 %130, ptr %133, align 1, !tbaa !9
  br label %134

134:                                              ; preds = %126
  %135 = load i32, ptr %17, align 4, !tbaa !10
  %136 = add nsw i32 %135, 1
  store i32 %136, ptr %17, align 4, !tbaa !10
  br label %56, !llvm.loop !12

137:                                              ; preds = %59
  %138 = getelementptr inbounds [160 x i8], ptr %16, i64 0, i64 159
  store i8 -97, ptr %138, align 1, !tbaa !9
  %139 = load ptr, ptr %2, align 8, !tbaa !5
  %140 = getelementptr inbounds [160 x i8], ptr %16, i64 0, i64 0
  invoke void @_ZN4Code11bit_permuteERK3RegPKhib(ptr noundef nonnull align 8 dereferenceable(200) %139, ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef %140, i32 noundef 160, i1 noundef zeroext false)
          to label %141 unwind label %150

141:                                              ; preds = %137
  %142 = load ptr, ptr %2, align 8, !tbaa !5
  invoke void @_ZN4Code3decERK3Reg(ptr noundef nonnull align 8 dereferenceable(200) %142, ptr noundef nonnull align 8 dereferenceable(24) %3)
          to label %143 unwind label %150

143:                                              ; preds = %141
  %144 = load ptr, ptr %2, align 8, !tbaa !5
  invoke void @_ZN4Code4brneERh(ptr noundef nonnull align 8 dereferenceable(200) %144, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %145 unwind label %150

145:                                              ; preds = %143
  %146 = load ptr, ptr %2, align 8, !tbaa !5
  invoke void @_ZN4Code12sbox_cleanupEv(ptr noundef nonnull align 8 dereferenceable(200) %146)
          to label %147 unwind label %150

147:                                              ; preds = %145
  %148 = load ptr, ptr %2, align 8, !tbaa !5
  invoke void @_ZN4Code3stxERK3Regh(ptr noundef nonnull align 8 dereferenceable(200) %148, ptr noundef nonnull align 8 dereferenceable(24) %8, i8 noundef zeroext -1)
          to label %149 unwind label %150

149:                                              ; preds = %147
  call void @llvm.lifetime.end.p0(i64 160, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #4
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #4
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #4
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #4
  call void @llvm.lifetime.end.p0(i64 24, 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
  ret void

150:                                              ; preds = %147, %145, %143, %141, %137
  %151 = landingpad { ptr, i32 }
          cleanup
  %152 = extractvalue { ptr, i32 } %151, 0
  store ptr %152, ptr %5, align 8
  %153 = extractvalue { ptr, i32 } %151, 1
  store i32 %153, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 160, ptr %16) #4
  br label %154

154:                                              ; preds = %150, %125, %116, %104
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #4
  br label %155

155:                                              ; preds = %154, %103, %89, %72
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #4
  br label %156

156:                                              ; preds = %155, %68
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #4
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #4
  br label %157

157:                                              ; preds = %156, %64
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #4
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #4
  br label %158

158:                                              ; preds = %157, %60
  call void @llvm.lifetime.end.p0(i64 24, 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 %159

159:                                              ; preds = %158
  %160 = load ptr, ptr %5, align 8
  %161 = load i32, ptr %6, align 4
  %162 = insertvalue { ptr, i32 } poison, ptr %160, 0
  %163 = insertvalue { ptr, i32 } %162, i32 %161, 1
  resume { ptr, i32 } %163
}

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

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

; 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) #0 align 2

declare void @_ZN4Code4moveERK3RegS2_b(ptr noundef nonnull align 8 dereferenceable(200), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), i1 noundef zeroext) #1

declare void @_ZN3Reg5x_ptrEv(ptr dead_on_unwind writable sret(%class.Reg) align 8) #1

declare void @_ZN3Reg5z_ptrEv(ptr dead_on_unwind writable sret(%class.Reg) align 8) #1

; 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) #2

declare void @_ZN4Code10sbox_setupEhRK4SboxRK3Reg(ptr noundef nonnull align 8 dereferenceable(200), i8 noundef zeroext, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #1

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

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

declare void @_ZN4Code4moveERK3Regy(ptr noundef nonnull align 8 dereferenceable(200), ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1

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

declare void @_ZN4Code6logxorERK3RegS2_(ptr noundef nonnull align 8 dereferenceable(200), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #1

declare void @_ZN3RegC1ERKS_hh(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), i8 noundef zeroext, i8 noundef zeroext) unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL20spongent_update_lfsrR4CodeRK3RegS3_(ptr noundef nonnull align 8 dereferenceable(200), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #0

declare void @_ZN4Code11sbox_lookupERK3RegS2_(ptr noundef nonnull align 8 dereferenceable(200), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #1

declare void @_ZN4Code11bit_permuteERK3RegPKhib(ptr noundef nonnull align 8 dereferenceable(200), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef, i32 noundef, i1 noundef zeroext) #1

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

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

declare void @_ZN4Code12sbox_cleanupEv(ptr noundef nonnull align 8 dereferenceable(200)) #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4Code3stxERK3Regh(ptr noundef nonnull align 8 dereferenceable(200), ptr noundef nonnull align 8 dereferenceable(24), i8 noundef zeroext) #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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = !{!7, !7, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"int", !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"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.Sbox = 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 }
%class.Reg = type { %"class.std::vector" }

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z17get_spongent_sboxv(ptr dead_on_unwind noalias writable sret(%class.Sbox) align 8) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
define dso_local void @_Z27gen_spongent160_permutationR4Code(ptr noundef nonnull align 8 dereferenceable(200) %0) local_unnamed_addr #0 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
  %7 = alloca %class.Reg, align 8
  %8 = alloca %class.Sbox, align 8
  %9 = alloca %class.Reg, align 8
  %10 = alloca i8, align 1
  %11 = alloca %class.Reg, align 8
  %12 = alloca %class.Reg, align 8
  %13 = alloca [160 x i8], align 16
  tail call void @_ZN4Code20prologue_permutationEPKcj(ptr noundef nonnull align 8 dereferenceable(200) %0, ptr noundef nonnull @.str, i32 noundef 0)
  tail call void @_ZN4Code7setFlagENS_4FlagE(ptr noundef nonnull align 8 dereferenceable(200) %0, i32 noundef 4)
  tail call void @_ZN4Code9clearFlagENS_4FlagE(ptr noundef nonnull align 8 dereferenceable(200) %0, i32 noundef 2)
  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 1)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #4
  invoke void @_ZN4Code15allocateHighRegEj(ptr dead_on_unwind nonnull writable sret(%class.Reg) align 8 %3, ptr noundef nonnull align 8 dereferenceable(200) %0, i32 noundef 1)
          to label %14 unwind label %65

14:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #4
  invoke void @_ZN4Code15allocateHighRegEj(ptr dead_on_unwind nonnull writable sret(%class.Reg) align 8 %4, ptr noundef nonnull align 8 dereferenceable(200) %0, i32 noundef 1)
          to label %15 unwind label %67

15:                                               ; preds = %14
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #4
  invoke void @_ZN4Code11allocateRegEj(ptr dead_on_unwind nonnull writable sret(%class.Reg) align 8 %5, ptr noundef nonnull align 8 dereferenceable(200) %0, i32 noundef 20)
          to label %16 unwind label %69

16:                                               ; preds = %15
  invoke void @_ZN4Code3ldzERK3Regh(ptr noundef nonnull align 8 dereferenceable(200) %0, ptr noundef nonnull align 8 dereferenceable(24) %5, i8 noundef zeroext 0)
          to label %17 unwind label %71

17:                                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #4
  invoke void @_ZN3Reg5x_ptrEv(ptr dead_on_unwind nonnull writable sret(%class.Reg) align 8 %6)
          to label %18 unwind label %73

18:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #4
  invoke void @_ZN3Reg5z_ptrEv(ptr dead_on_unwind nonnull writable sret(%class.Reg) align 8 %7)
          to label %19 unwind label %75

19:                                               ; preds = %18
  invoke void @_ZN4Code4moveERK3RegS2_b(ptr noundef nonnull align 8 dereferenceable(200) %0, ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(24) %7, i1 noundef zeroext false)
          to label %20 unwind label %77

20:                                               ; preds = %19
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #4
  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 @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #4
  invoke void @_Z17get_spongent_sboxv(ptr dead_on_unwind nonnull writable sret(%class.Sbox) align 8 %8)
          to label %21 unwind label %81

21:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #4
  call void @_ZN3RegC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9)
  invoke void @_ZN4Code10sbox_setupEhRK4SboxRK3Reg(ptr noundef nonnull align 8 dereferenceable(200) %0, i8 noundef zeroext 0, ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(24) %9)
          to label %22 unwind label %83

22:                                               ; preds = %21
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #4
  call void @_ZN4SboxD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %10) #4
  store i8 0, ptr %10, align 1, !tbaa !5
  invoke void @_ZN4Code4moveERK3Regy(ptr noundef nonnull align 8 dereferenceable(200) %0, ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 80)
          to label %23 unwind label %86

23:                                               ; preds = %22
  invoke void @_ZN4Code4moveERK3Regy(ptr noundef nonnull align 8 dereferenceable(200) %0, ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef 117)
          to label %24 unwind label %86

24:                                               ; preds = %23
  invoke void @_ZN4Code4moveERK3Regy(ptr noundef nonnull align 8 dereferenceable(200) %0, ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef 174)
          to label %25 unwind label %86

25:                                               ; preds = %24
  invoke void @_ZN4Code5labelERh(ptr noundef nonnull align 8 dereferenceable(200) %0, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %26 unwind label %86

26:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %11) #4
  invoke void @_ZN3RegC1ERKS_hh(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 8 dereferenceable(24) %5, i8 noundef zeroext 0, i8 noundef zeroext 1)
          to label %27 unwind label %88

27:                                               ; preds = %26
  invoke void @_ZN4Code6logxorERK3RegS2_(ptr noundef nonnull align 8 dereferenceable(200) %0, ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 8 dereferenceable(24) %3)
          to label %28 unwind label %90

28:                                               ; preds = %27
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %12) #4
  invoke void @_ZN3RegC1ERKS_hh(ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 8 dereferenceable(24) %5, i8 noundef zeroext 19, i8 noundef zeroext 1)
          to label %29 unwind label %93

29:                                               ; preds = %28
  invoke void @_ZN4Code6logxorERK3RegS2_(ptr noundef nonnull align 8 dereferenceable(200) %0, ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 8 dereferenceable(24) %4)
          to label %30 unwind label %95

30:                                               ; preds = %29
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #4
  invoke void @_ZL20spongent_update_lfsrR4CodeRK3RegS3_(ptr noundef nonnull align 8 dereferenceable(200) %0, ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(24) %4)
          to label %31 unwind label %86

31:                                               ; preds = %30
  invoke void @_ZN4Code11sbox_lookupERK3RegS2_(ptr noundef nonnull align 8 dereferenceable(200) %0, ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(24) %5)
          to label %vector.ph unwind label %86

vector.ph:                                        ; preds = %31
  call void @llvm.lifetime.start.p0(i64 160, ptr nonnull %13) #4
  %32 = getelementptr inbounds i8, ptr %13, i64 8
  store <8 x i8> <i8 0, i8 40, i8 80, i8 120, i8 1, i8 41, i8 81, i8 121>, ptr %13, align 16, !tbaa !5
  store <8 x i8> <i8 2, i8 42, i8 82, i8 122, i8 3, i8 43, i8 83, i8 123>, ptr %32, align 8, !tbaa !5
  %33 = getelementptr inbounds i8, ptr %13, i64 16
  %34 = getelementptr inbounds i8, ptr %13, i64 24
  store <8 x i8> <i8 4, i8 44, i8 84, i8 124, i8 5, i8 45, i8 85, i8 125>, ptr %33, align 16, !tbaa !5
  store <8 x i8> <i8 6, i8 46, i8 86, i8 126, i8 7, i8 47, i8 87, i8 127>, ptr %34, align 8, !tbaa !5
  %35 = getelementptr inbounds i8, ptr %13, i64 32
  %36 = getelementptr inbounds i8, ptr %13, i64 40
  store <8 x i8> <i8 8, i8 48, i8 88, i8 -128, i8 9, i8 49, i8 89, i8 -127>, ptr %35, align 16, !tbaa !5
  store <8 x i8> <i8 10, i8 50, i8 90, i8 -126, i8 11, i8 51, i8 91, i8 -125>, ptr %36, align 8, !tbaa !5
  %37 = getelementptr inbounds i8, ptr %13, i64 48
  %38 = getelementptr inbounds i8, ptr %13, i64 56
  store <8 x i8> <i8 12, i8 52, i8 92, i8 -124, i8 13, i8 53, i8 93, i8 -123>, ptr %37, align 16, !tbaa !5
  store <8 x i8> <i8 14, i8 54, i8 94, i8 -122, i8 15, i8 55, i8 95, i8 -121>, ptr %38, align 8, !tbaa !5
  %39 = getelementptr inbounds i8, ptr %13, i64 64
  %40 = getelementptr inbounds i8, ptr %13, i64 72
  store <8 x i8> <i8 16, i8 56, i8 96, i8 -120, i8 17, i8 57, i8 97, i8 -119>, ptr %39, align 16, !tbaa !5
  store <8 x i8> <i8 18, i8 58, i8 98, i8 -118, i8 19, i8 59, i8 99, i8 -117>, ptr %40, align 8, !tbaa !5
  %41 = getelementptr inbounds i8, ptr %13, i64 80
  %42 = getelementptr inbounds i8, ptr %13, i64 88
  store <8 x i8> <i8 20, i8 60, i8 100, i8 -116, i8 21, i8 61, i8 101, i8 -115>, ptr %41, align 16, !tbaa !5
  store <8 x i8> <i8 22, i8 62, i8 102, i8 -114, i8 23, i8 63, i8 103, i8 -113>, ptr %42, align 8, !tbaa !5
  %43 = getelementptr inbounds i8, ptr %13, i64 96
  %44 = getelementptr inbounds i8, ptr %13, i64 104
  store <8 x i8> <i8 24, i8 64, i8 104, i8 -112, i8 25, i8 65, i8 105, i8 -111>, ptr %43, align 16, !tbaa !5
  store <8 x i8> <i8 26, i8 66, i8 106, i8 -110, i8 27, i8 67, i8 107, i8 -109>, ptr %44, align 8, !tbaa !5
  %45 = getelementptr inbounds i8, ptr %13, i64 112
  %46 = getelementptr inbounds i8, ptr %13, i64 120
  store <8 x i8> <i8 28, i8 68, i8 108, i8 -108, i8 29, i8 69, i8 109, i8 -107>, ptr %45, align 16, !tbaa !5
  store <8 x i8> <i8 30, i8 70, i8 110, i8 -106, i8 31, i8 71, i8 111, i8 -105>, ptr %46, align 8, !tbaa !5
  %47 = getelementptr inbounds i8, ptr %13, i64 128
  %48 = getelementptr inbounds i8, ptr %13, i64 136
  store <8 x i8> <i8 32, i8 72, i8 112, i8 -104, i8 33, i8 73, i8 113, i8 -103>, ptr %47, align 16, !tbaa !5
  store <8 x i8> <i8 34, i8 74, i8 114, i8 -102, i8 35, i8 75, i8 115, i8 -101>, ptr %48, align 8, !tbaa !5
  %49 = getelementptr inbounds i8, ptr %13, i64 144
  store i8 36, ptr %49, align 16, !tbaa !5
  %50 = getelementptr inbounds i8, ptr %13, i64 145
  store i8 76, ptr %50, align 1, !tbaa !5
  %51 = getelementptr inbounds i8, ptr %13, i64 146
  store i8 116, ptr %51, align 2, !tbaa !5
  %52 = getelementptr inbounds i8, ptr %13, i64 147
  store i8 -100, ptr %52, align 1, !tbaa !5
  %53 = getelementptr inbounds i8, ptr %13, i64 148
  store i8 37, ptr %53, align 4, !tbaa !5
  %54 = getelementptr inbounds i8, ptr %13, i64 149
  store i8 77, ptr %54, align 1, !tbaa !5
  %55 = getelementptr inbounds i8, ptr %13, i64 150
  store i8 117, ptr %55, align 2, !tbaa !5
  %56 = getelementptr inbounds i8, ptr %13, i64 151
  store i8 -99, ptr %56, align 1, !tbaa !5
  %57 = getelementptr inbounds i8, ptr %13, i64 152
  store i8 38, ptr %57, align 8, !tbaa !5
  %58 = getelementptr inbounds i8, ptr %13, i64 153
  store i8 78, ptr %58, align 1, !tbaa !5
  %59 = getelementptr inbounds i8, ptr %13, i64 154
  store i8 118, ptr %59, align 2, !tbaa !5
  %60 = getelementptr inbounds i8, ptr %13, i64 155
  store i8 -98, ptr %60, align 1, !tbaa !5
  %61 = getelementptr inbounds i8, ptr %13, i64 156
  store i8 39, ptr %61, align 4, !tbaa !5
  %62 = getelementptr inbounds i8, ptr %13, i64 157
  store i8 79, ptr %62, align 1, !tbaa !5
  %63 = getelementptr inbounds i8, ptr %13, i64 158
  store i8 119, ptr %63, align 2, !tbaa !5
  %64 = getelementptr inbounds i8, ptr %13, i64 159
  store i8 -97, ptr %64, align 1, !tbaa !5
  invoke void @_ZN4Code11bit_permuteERK3RegPKhib(ptr noundef nonnull align 8 dereferenceable(200) %0, ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull %13, i32 noundef 160, i1 noundef zeroext false)
          to label %98 unwind label %103

65:                                               ; preds = %1
  %66 = landingpad { ptr, i32 }
          cleanup
  br label %109

67:                                               ; preds = %14
  %68 = landingpad { ptr, i32 }
          cleanup
  br label %108

69:                                               ; preds = %15
  %70 = landingpad { ptr, i32 }
          cleanup
  br label %107

71:                                               ; preds = %16
  %72 = landingpad { ptr, i32 }
          cleanup
  br label %106

73:                                               ; preds = %17
  %74 = landingpad { ptr, i32 }
          cleanup
  br label %80

75:                                               ; preds = %18
  %76 = landingpad { ptr, i32 }
          cleanup
  br label %79

77:                                               ; preds = %19
  %78 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #4
  br label %79

79:                                               ; preds = %77, %75
  %.pn = phi { ptr, i32 } [ %78, %77 ], [ %76, %75 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #4
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #4
  br label %80

80:                                               ; preds = %79, %73
  %.pn.pn = phi { ptr, i32 } [ %.pn, %79 ], [ %74, %73 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #4
  br label %106

81:                                               ; preds = %20
  %82 = landingpad { ptr, i32 }
          cleanup
  br label %85

83:                                               ; preds = %21
  %84 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #4
  call void @_ZN4SboxD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #4
  br label %85

85:                                               ; preds = %83, %81
  %.pn41 = phi { ptr, i32 } [ %84, %83 ], [ %82, %81 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #4
  br label %106

86:                                               ; preds = %31, %30, %25, %24, %23, %22
  %87 = landingpad { ptr, i32 }
          cleanup
  br label %105

88:                                               ; preds = %26
  %89 = landingpad { ptr, i32 }
          cleanup
  br label %92

90:                                               ; preds = %27
  %91 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #4
  br label %92

92:                                               ; preds = %90, %88
  %.pn43 = phi { ptr, i32 } [ %91, %90 ], [ %89, %88 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #4
  br label %105

93:                                               ; preds = %28
  %94 = landingpad { ptr, i32 }
          cleanup
  br label %97

95:                                               ; preds = %29
  %96 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #4
  br label %97

97:                                               ; preds = %95, %93
  %.pn45 = phi { ptr, i32 } [ %96, %95 ], [ %94, %93 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #4
  br label %105

98:                                               ; preds = %vector.ph
  invoke void @_ZN4Code3decERK3Reg(ptr noundef nonnull align 8 dereferenceable(200) %0, ptr noundef nonnull align 8 dereferenceable(24) %2)
          to label %99 unwind label %103

99:                                               ; preds = %98
  invoke void @_ZN4Code4brneERh(ptr noundef nonnull align 8 dereferenceable(200) %0, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %100 unwind label %103

100:                                              ; preds = %99
  invoke void @_ZN4Code12sbox_cleanupEv(ptr noundef nonnull align 8 dereferenceable(200) %0)
          to label %101 unwind label %103

101:                                              ; preds = %100
  invoke void @_ZN4Code3stxERK3Regh(ptr noundef nonnull align 8 dereferenceable(200) %0, ptr noundef nonnull align 8 dereferenceable(24) %5, i8 noundef zeroext -1)
          to label %102 unwind label %103

102:                                              ; preds = %101
  call void @llvm.lifetime.end.p0(i64 160, ptr nonnull %13) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #4
  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 @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #4
  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 @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #4
  ret void

103:                                              ; preds = %101, %100, %99, %98, %vector.ph
  %104 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 160, ptr nonnull %13) #4
  br label %105

105:                                              ; preds = %103, %97, %92, %86
  %.pn47 = phi { ptr, i32 } [ %104, %103 ], [ %87, %86 ], [ %.pn45, %97 ], [ %.pn43, %92 ]
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #4
  br label %106

106:                                              ; preds = %105, %85, %80, %71
  %.pn47.pn = phi { ptr, i32 } [ %.pn47, %105 ], [ %.pn41, %85 ], [ %.pn.pn, %80 ], [ %72, %71 ]
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #4
  br label %107

107:                                              ; preds = %106, %69
  %.pn47.pn.pn = phi { ptr, i32 } [ %.pn47.pn, %106 ], [ %70, %69 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #4
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #4
  br label %108

108:                                              ; preds = %107, %67
  %.pn47.pn.pn.pn = phi { ptr, i32 } [ %.pn47.pn.pn, %107 ], [ %68, %67 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #4
  call void @_ZN3RegD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  br label %109

109:                                              ; preds = %108, %65
  %.pn47.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn47.pn.pn.pn, %108 ], [ %66, %65 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #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
  resume { ptr, i32 } %.pn47.pn.pn.pn.pn
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4Code9clearFlagENS_4FlagE(ptr noundef nonnull align 8 dereferenceable(200), i32 noundef) local_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) #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 #1

declare i32 @__gxx_personality_v0(...)

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

; 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 #0 align 2

declare void @_ZN4Code4moveERK3RegS2_b(ptr noundef nonnull align 8 dereferenceable(200), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), i1 noundef zeroext) local_unnamed_addr #1

declare void @_ZN3Reg5x_ptrEv(ptr dead_on_unwind writable sret(%class.Reg) align 8) local_unnamed_addr #1

declare void @_ZN3Reg5z_ptrEv(ptr dead_on_unwind writable sret(%class.Reg) align 8) local_unnamed_addr #1

; 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) #2

declare void @_ZN4Code10sbox_setupEhRK4SboxRK3Reg(ptr noundef nonnull align 8 dereferenceable(200), i8 noundef zeroext, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1

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

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

declare void @_ZN4Code4moveERK3Regy(ptr noundef nonnull align 8 dereferenceable(200), ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1

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

declare void @_ZN4Code6logxorERK3RegS2_(ptr noundef nonnull align 8 dereferenceable(200), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1

declare void @_ZN3RegC1ERKS_hh(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), i8 noundef zeroext, i8 noundef zeroext) unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL20spongent_update_lfsrR4CodeRK3RegS3_(ptr noundef nonnull align 8 dereferenceable(200), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0

declare void @_ZN4Code11sbox_lookupERK3RegS2_(ptr noundef nonnull align 8 dereferenceable(200), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1

declare void @_ZN4Code11bit_permuteERK3RegPKhib(ptr noundef nonnull align 8 dereferenceable(200), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef, i32 noundef, i1 noundef zeroext) local_unnamed_addr #1

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

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

declare void @_ZN4Code12sbox_cleanupEv(ptr noundef nonnull align 8 dereferenceable(200)) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4Code3stxERK3Regh(ptr noundef nonnull align 8 dereferenceable(200), ptr noundef nonnull align 8 dereferenceable(24), i8 noundef zeroext) 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 = { "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 nosync nounwind willreturn memory(argmem: readwrite) }
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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,LoopLoadEliminationPass,LoopRotatePass,LoopUnrollPass,LoopVectorizePass,SROAPass,SimplifyCFGPass,TailCallElimPass