; LLVM IR from rweather/lightweight-crypto :: src/combined (drygascon)

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

%struct.drysponge256_state_t = type { %union.gascon256_state_t, %union.drysponge256_rate_t, %union.drysponge256_x_t, i32, i32 }
%union.gascon256_state_t = type { [9 x i64] }
%union.drysponge256_rate_t = type { [2 x i64] }
%union.drysponge256_x_t = type { [2 x i64] }

; Function Attrs: nounwind uwtable
define dso_local i32 @drygascon256_aead_decrypt(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, i64 noundef %4, ptr noundef %5, i64 noundef %6, ptr noundef %7, ptr noundef %8) #0 {
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i64, align 8
  %16 = alloca ptr, align 8
  %17 = alloca i64, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca %struct.drysponge256_state_t, align 8
  %21 = alloca ptr, align 8
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca ptr, align 8
  %26 = alloca ptr, align 8
  %27 = alloca ptr, align 8
  %28 = alloca i32, align 4
  %29 = alloca ptr, align 8
  %30 = alloca ptr, align 8
  %31 = alloca ptr, align 8
  %32 = alloca i32, align 4
  store ptr %0, ptr %11, align 8, !tbaa !5
  store ptr %1, ptr %12, align 8, !tbaa !5
  store ptr %2, ptr %13, align 8, !tbaa !5
  store ptr %3, ptr %14, align 8, !tbaa !5
  store i64 %4, ptr %15, align 8, !tbaa !9
  store ptr %5, ptr %16, align 8, !tbaa !5
  store i64 %6, ptr %17, align 8, !tbaa !9
  store ptr %7, ptr %18, align 8, !tbaa !5
  store ptr %8, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 112, ptr %20) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #3
  %33 = load ptr, ptr %11, align 8, !tbaa !5
  store ptr %33, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #3
  %34 = load ptr, ptr %13, align 8, !tbaa !5
  %35 = load i64, ptr %15, align 8, !tbaa !9
  %36 = icmp ult i64 %35, 32
  br i1 %36, label %37, label %38

37:                                               ; preds = %9
  store i32 -1, ptr %10, align 4
  store i32 1, ptr %24, align 4
  br label %162

38:                                               ; preds = %9
  %39 = load i64, ptr %15, align 8, !tbaa !9
  %40 = sub i64 %39, 32
  %41 = load ptr, ptr %12, align 8, !tbaa !5
  store i64 %40, ptr %41, align 8, !tbaa !9
  %42 = load i64, ptr %15, align 8, !tbaa !9
  %43 = sub i64 %42, 32
  store i64 %43, ptr %15, align 8, !tbaa !9
  %44 = load ptr, ptr %19, align 8, !tbaa !5
  %45 = load ptr, ptr %18, align 8, !tbaa !5
  %46 = load i64, ptr %17, align 8, !tbaa !9
  %47 = icmp eq i64 %46, 0
  br i1 %47, label %48, label %51

48:                                               ; preds = %38
  %49 = load i64, ptr %15, align 8, !tbaa !9
  %50 = icmp eq i64 %49, 0
  br label %51

51:                                               ; preds = %48, %38
  %52 = phi i1 [ false, %38 ], [ %50, %48 ]
  %53 = zext i1 %52 to i32
  call void @drysponge256_setup(ptr noundef %20, ptr noundef %44, ptr noundef %45, i32 noundef %53)
  %54 = load i64, ptr %17, align 8, !tbaa !9
  %55 = icmp ugt i64 %54, 0
  br i1 %55, label %56, label %62

56:                                               ; preds = %51
  %57 = load ptr, ptr %16, align 8, !tbaa !5
  %58 = load i64, ptr %17, align 8, !tbaa !9
  %59 = load i64, ptr %15, align 8, !tbaa !9
  %60 = icmp eq i64 %59, 0
  %61 = zext i1 %60 to i32
  call void @drygascon256_process_ad(ptr noundef %20, ptr noundef %57, i64 noundef %58, i32 noundef %61)
  br label %62

62:                                               ; preds = %56, %51
  %63 = load i64, ptr %15, align 8, !tbaa !9
  %64 = icmp ugt i64 %63, 0
  br i1 %64, label %65, label %147

65:                                               ; preds = %62
  br label %66

66:                                               ; preds = %95, %65
  %67 = load i64, ptr %15, align 8, !tbaa !9
  %68 = icmp ugt i64 %67, 16
  br i1 %68, label %69, label %103

69:                                               ; preds = %66
  br label %70

70:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #3
  %71 = load ptr, ptr %11, align 8, !tbaa !5
  store ptr %71, ptr %25, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #3
  %72 = load ptr, ptr %14, align 8, !tbaa !5
  store ptr %72, ptr %26, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #3
  %73 = getelementptr inbounds %struct.drysponge256_state_t, ptr %20, i32 0, i32 1
  %74 = getelementptr inbounds [16 x i8], ptr %73, i64 0, i64 0
  store ptr %74, ptr %27, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #3
  store i32 16, ptr %28, align 4, !tbaa !11
  br label %75

75:                                               ; preds = %78, %70
  %76 = load i32, ptr %28, align 4, !tbaa !11
  %77 = icmp ugt i32 %76, 0
  br i1 %77, label %78, label %93

78:                                               ; preds = %75
  %79 = load ptr, ptr %26, align 8, !tbaa !5
  %80 = getelementptr inbounds i8, ptr %79, i32 1
  store ptr %80, ptr %26, align 8, !tbaa !5
  %81 = load i8, ptr %79, align 1, !tbaa !13
  %82 = zext i8 %81 to i32
  %83 = load ptr, ptr %27, align 8, !tbaa !5
  %84 = getelementptr inbounds i8, ptr %83, i32 1
  store ptr %84, ptr %27, align 8, !tbaa !5
  %85 = load i8, ptr %83, align 1, !tbaa !13
  %86 = zext i8 %85 to i32
  %87 = xor i32 %82, %86
  %88 = trunc i32 %87 to i8
  %89 = load ptr, ptr %25, align 8, !tbaa !5
  %90 = getelementptr inbounds i8, ptr %89, i32 1
  store ptr %90, ptr %25, align 8, !tbaa !5
  store i8 %88, ptr %89, align 1, !tbaa !13
  %91 = load i32, ptr %28, align 4, !tbaa !11
  %92 = add i32 %91, -1
  store i32 %92, ptr %28, align 4, !tbaa !11
  br label %75, !llvm.loop !14

93:                                               ; preds = %75
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #3
  br label %94

94:                                               ; preds = %93
  br label %95

95:                                               ; preds = %94
  %96 = load ptr, ptr %11, align 8, !tbaa !5
  call void @drysponge256_f_absorb(ptr noundef %20, ptr noundef %96, i32 noundef 16)
  call void @drysponge256_g(ptr noundef %20)
  %97 = load ptr, ptr %14, align 8, !tbaa !5
  %98 = getelementptr inbounds i8, ptr %97, i64 16
  store ptr %98, ptr %14, align 8, !tbaa !5
  %99 = load ptr, ptr %11, align 8, !tbaa !5
  %100 = getelementptr inbounds i8, ptr %99, i64 16
  store ptr %100, ptr %11, align 8, !tbaa !5
  %101 = load i64, ptr %15, align 8, !tbaa !9
  %102 = sub i64 %101, 16
  store i64 %102, ptr %15, align 8, !tbaa !9
  br label %66, !llvm.loop !16

103:                                              ; preds = %66
  %104 = getelementptr inbounds %struct.drysponge256_state_t, ptr %20, i32 0, i32 3
  store i32 56, ptr %104, align 8, !tbaa !17
  %105 = load i64, ptr %15, align 8, !tbaa !9
  %106 = icmp ult i64 %105, 16
  br i1 %106, label %107, label %111

107:                                              ; preds = %103
  %108 = getelementptr inbounds %struct.drysponge256_state_t, ptr %20, i32 0, i32 3
  %109 = load i32, ptr %108, align 8, !tbaa !17
  %110 = or i32 %109, 4
  store i32 %110, ptr %108, align 8, !tbaa !17
  br label %111

111:                                              ; preds = %107, %103
  %112 = load i64, ptr %15, align 8, !tbaa !9
  %113 = trunc i64 %112 to i32
  store i32 %113, ptr %22, align 4, !tbaa !11
  br label %114

114:                                              ; preds = %111
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #3
  %115 = load ptr, ptr %11, align 8, !tbaa !5
  store ptr %115, ptr %29, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #3
  %116 = load ptr, ptr %14, align 8, !tbaa !5
  store ptr %116, ptr %30, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #3
  %117 = getelementptr inbounds %struct.drysponge256_state_t, ptr %20, i32 0, i32 1
  %118 = getelementptr inbounds [16 x i8], ptr %117, i64 0, i64 0
  store ptr %118, ptr %31, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #3
  %119 = load i32, ptr %22, align 4, !tbaa !11
  store i32 %119, ptr %32, align 4, !tbaa !11
  br label %120

120:                                              ; preds = %123, %114
  %121 = load i32, ptr %32, align 4, !tbaa !11
  %122 = icmp ugt i32 %121, 0
  br i1 %122, label %123, label %138

123:                                              ; preds = %120
  %124 = load ptr, ptr %30, align 8, !tbaa !5
  %125 = getelementptr inbounds i8, ptr %124, i32 1
  store ptr %125, ptr %30, align 8, !tbaa !5
  %126 = load i8, ptr %124, align 1, !tbaa !13
  %127 = zext i8 %126 to i32
  %128 = load ptr, ptr %31, align 8, !tbaa !5
  %129 = getelementptr inbounds i8, ptr %128, i32 1
  store ptr %129, ptr %31, align 8, !tbaa !5
  %130 = load i8, ptr %128, align 1, !tbaa !13
  %131 = zext i8 %130 to i32
  %132 = xor i32 %127, %131
  %133 = trunc i32 %132 to i8
  %134 = load ptr, ptr %29, align 8, !tbaa !5
  %135 = getelementptr inbounds i8, ptr %134, i32 1
  store ptr %135, ptr %29, align 8, !tbaa !5
  store i8 %133, ptr %134, align 1, !tbaa !13
  %136 = load i32, ptr %32, align 4, !tbaa !11
  %137 = add i32 %136, -1
  store i32 %137, ptr %32, align 4, !tbaa !11
  br label %120, !llvm.loop !19

138:                                              ; preds = %120
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #3
  br label %139

139:                                              ; preds = %138
  br label %140

140:                                              ; preds = %139
  %141 = load ptr, ptr %11, align 8, !tbaa !5
  %142 = load i32, ptr %22, align 4, !tbaa !11
  call void @drysponge256_f_absorb(ptr noundef %20, ptr noundef %141, i32 noundef %142)
  call void @drysponge256_g(ptr noundef %20)
  %143 = load i32, ptr %22, align 4, !tbaa !11
  %144 = load ptr, ptr %14, align 8, !tbaa !5
  %145 = zext i32 %143 to i64
  %146 = getelementptr inbounds i8, ptr %144, i64 %145
  store ptr %146, ptr %14, align 8, !tbaa !5
  br label %147

147:                                              ; preds = %140, %62
  %148 = getelementptr inbounds %struct.drysponge256_state_t, ptr %20, i32 0, i32 1
  %149 = getelementptr inbounds [16 x i8], ptr %148, i64 0, i64 0
  %150 = load ptr, ptr %14, align 8, !tbaa !5
  %151 = call i32 @aead_check_tag(ptr noundef null, i64 noundef 0, ptr noundef %149, ptr noundef %150, i32 noundef 16)
  store i32 %151, ptr %23, align 4, !tbaa !11
  call void @drysponge256_g(ptr noundef %20)
  %152 = load ptr, ptr %21, align 8, !tbaa !5
  %153 = load ptr, ptr %12, align 8, !tbaa !5
  %154 = load i64, ptr %153, align 8, !tbaa !9
  %155 = getelementptr inbounds %struct.drysponge256_state_t, ptr %20, i32 0, i32 1
  %156 = getelementptr inbounds [16 x i8], ptr %155, i64 0, i64 0
  %157 = load ptr, ptr %14, align 8, !tbaa !5
  %158 = getelementptr inbounds i8, ptr %157, i64 16
  %159 = load i32, ptr %23, align 4, !tbaa !11
  %160 = xor i32 %159, -1
  %161 = call i32 @aead_check_tag_precheck(ptr noundef %152, i64 noundef %154, ptr noundef %156, ptr noundef %158, i32 noundef 16, i32 noundef %160)
  store i32 %161, ptr %10, align 4
  store i32 1, ptr %24, align 4
  br label %162

162:                                              ; preds = %147, %37
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #3
  call void @llvm.lifetime.end.p0(i64 112, ptr %20) #3
  %163 = load i32, ptr %10, align 4
  ret i32 %163
}

; 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

declare i32 @aead_check_tag(ptr noundef, i64 noundef, ptr noundef, ptr noundef, i32 noundef) #2

declare void @drysponge256_setup(ptr noundef, ptr noundef, ptr noundef, i32 noundef) #2

; Function Attrs: nounwind uwtable
declare hidden void @drygascon256_process_ad(ptr noundef, ptr noundef, i64 noundef, i32 noundef) #0

declare void @drysponge256_f_absorb(ptr noundef, ptr noundef, i32 noundef) #2

declare void @drysponge256_g(ptr noundef) #2

declare i32 @aead_check_tag_precheck(ptr noundef, i64 noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef) #2

attributes #0 = { 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 = { "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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long long", !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}
!17 = !{!18, !12, i64 104}
!18 = !{!"", !7, i64 0, !7, i64 72, !7, i64 88, !12, i64 104, !12, i64 108}
!19 = distinct !{!19, !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"

%struct.drysponge256_state_t = type { %union.gascon256_state_t, %union.drysponge256_rate_t, %union.drysponge256_x_t, i32, i32 }
%union.gascon256_state_t = type { [9 x i64] }
%union.drysponge256_rate_t = type { [2 x i64] }
%union.drysponge256_x_t = type { [2 x i64] }

; Function Attrs: nounwind uwtable
define dso_local i32 @drygascon256_aead_decrypt(ptr noundef %0, ptr nocapture noundef %1, ptr nocapture noundef readnone %2, ptr noundef %3, i64 noundef %4, ptr noundef %5, i64 noundef %6, ptr noundef %7, ptr noundef %8) local_unnamed_addr #0 {
  %10 = alloca %struct.drysponge256_state_t, align 8
  %11 = ptrtoint ptr %10 to i64
  call void @llvm.lifetime.start.p0(i64 112, ptr nonnull %10) #3
  %12 = icmp ult i64 %4, 32
  br i1 %12, label %181, label %13

13:                                               ; preds = %9
  %14 = add i64 %4, -32
  store i64 %14, ptr %1, align 8, !tbaa !5
  %15 = or i64 %14, %6
  %16 = icmp eq i64 %15, 0
  %17 = zext i1 %16 to i32
  call void @drysponge256_setup(ptr noundef nonnull %10, ptr noundef %8, ptr noundef %7, i32 noundef %17) #3
  %.not = icmp eq i64 %6, 0
  br i1 %.not, label %21, label %18

18:                                               ; preds = %13
  %19 = icmp eq i64 %14, 0
  %20 = zext i1 %19 to i32
  call void @drygascon256_process_ad(ptr noundef nonnull %10, ptr noundef %5, i64 noundef %6, i32 noundef %20)
  br label %21

21:                                               ; preds = %18, %13
  %.not60 = icmp eq i64 %14, 0
  br i1 %.not60, label %174, label %.preheader

.preheader:                                       ; preds = %21
  %22 = icmp ugt i64 %14, 16
  br i1 %22, label %.lr.ph, label %iter.check

.lr.ph:                                           ; preds = %.preheader
  %23 = getelementptr inbounds i8, ptr %10, i64 72
  %24 = getelementptr inbounds i8, ptr %10, i64 73
  %25 = getelementptr inbounds i8, ptr %10, i64 74
  %26 = getelementptr inbounds i8, ptr %10, i64 75
  %27 = getelementptr inbounds i8, ptr %10, i64 76
  %28 = getelementptr inbounds i8, ptr %10, i64 77
  %29 = getelementptr inbounds i8, ptr %10, i64 78
  %30 = getelementptr inbounds i8, ptr %10, i64 79
  %31 = getelementptr inbounds i8, ptr %10, i64 80
  %32 = getelementptr inbounds i8, ptr %10, i64 81
  %33 = getelementptr inbounds i8, ptr %10, i64 82
  %34 = getelementptr inbounds i8, ptr %10, i64 83
  %35 = getelementptr inbounds i8, ptr %10, i64 84
  %36 = getelementptr inbounds i8, ptr %10, i64 85
  %37 = getelementptr inbounds i8, ptr %10, i64 86
  %38 = getelementptr inbounds i8, ptr %10, i64 87
  br label %39

39:                                               ; preds = %.lr.ph, %39
  %.05470 = phi ptr [ %0, %.lr.ph ], [ %119, %39 ]
  %.05569 = phi ptr [ %3, %.lr.ph ], [ %118, %39 ]
  %.05668 = phi i64 [ %14, %.lr.ph ], [ %120, %39 ]
  %40 = getelementptr inbounds i8, ptr %.05569, i64 1
  %41 = load i8, ptr %.05569, align 1, !tbaa !9
  %42 = load i8, ptr %23, align 8, !tbaa !9
  %43 = xor i8 %42, %41
  %44 = getelementptr inbounds i8, ptr %.05470, i64 1
  store i8 %43, ptr %.05470, align 1, !tbaa !9
  %45 = getelementptr inbounds i8, ptr %.05569, i64 2
  %46 = load i8, ptr %40, align 1, !tbaa !9
  %47 = load i8, ptr %24, align 1, !tbaa !9
  %48 = xor i8 %47, %46
  %49 = getelementptr inbounds i8, ptr %.05470, i64 2
  store i8 %48, ptr %44, align 1, !tbaa !9
  %50 = getelementptr inbounds i8, ptr %.05569, i64 3
  %51 = load i8, ptr %45, align 1, !tbaa !9
  %52 = load i8, ptr %25, align 2, !tbaa !9
  %53 = xor i8 %52, %51
  %54 = getelementptr inbounds i8, ptr %.05470, i64 3
  store i8 %53, ptr %49, align 1, !tbaa !9
  %55 = getelementptr inbounds i8, ptr %.05569, i64 4
  %56 = load i8, ptr %50, align 1, !tbaa !9
  %57 = load i8, ptr %26, align 1, !tbaa !9
  %58 = xor i8 %57, %56
  %59 = getelementptr inbounds i8, ptr %.05470, i64 4
  store i8 %58, ptr %54, align 1, !tbaa !9
  %60 = getelementptr inbounds i8, ptr %.05569, i64 5
  %61 = load i8, ptr %55, align 1, !tbaa !9
  %62 = load i8, ptr %27, align 4, !tbaa !9
  %63 = xor i8 %62, %61
  %64 = getelementptr inbounds i8, ptr %.05470, i64 5
  store i8 %63, ptr %59, align 1, !tbaa !9
  %65 = getelementptr inbounds i8, ptr %.05569, i64 6
  %66 = load i8, ptr %60, align 1, !tbaa !9
  %67 = load i8, ptr %28, align 1, !tbaa !9
  %68 = xor i8 %67, %66
  %69 = getelementptr inbounds i8, ptr %.05470, i64 6
  store i8 %68, ptr %64, align 1, !tbaa !9
  %70 = getelementptr inbounds i8, ptr %.05569, i64 7
  %71 = load i8, ptr %65, align 1, !tbaa !9
  %72 = load i8, ptr %29, align 2, !tbaa !9
  %73 = xor i8 %72, %71
  %74 = getelementptr inbounds i8, ptr %.05470, i64 7
  store i8 %73, ptr %69, align 1, !tbaa !9
  %75 = getelementptr inbounds i8, ptr %.05569, i64 8
  %76 = load i8, ptr %70, align 1, !tbaa !9
  %77 = load i8, ptr %30, align 1, !tbaa !9
  %78 = xor i8 %77, %76
  %79 = getelementptr inbounds i8, ptr %.05470, i64 8
  store i8 %78, ptr %74, align 1, !tbaa !9
  %80 = getelementptr inbounds i8, ptr %.05569, i64 9
  %81 = load i8, ptr %75, align 1, !tbaa !9
  %82 = load i8, ptr %31, align 8, !tbaa !9
  %83 = xor i8 %82, %81
  %84 = getelementptr inbounds i8, ptr %.05470, i64 9
  store i8 %83, ptr %79, align 1, !tbaa !9
  %85 = getelementptr inbounds i8, ptr %.05569, i64 10
  %86 = load i8, ptr %80, align 1, !tbaa !9
  %87 = load i8, ptr %32, align 1, !tbaa !9
  %88 = xor i8 %87, %86
  %89 = getelementptr inbounds i8, ptr %.05470, i64 10
  store i8 %88, ptr %84, align 1, !tbaa !9
  %90 = getelementptr inbounds i8, ptr %.05569, i64 11
  %91 = load i8, ptr %85, align 1, !tbaa !9
  %92 = load i8, ptr %33, align 2, !tbaa !9
  %93 = xor i8 %92, %91
  %94 = getelementptr inbounds i8, ptr %.05470, i64 11
  store i8 %93, ptr %89, align 1, !tbaa !9
  %95 = getelementptr inbounds i8, ptr %.05569, i64 12
  %96 = load i8, ptr %90, align 1, !tbaa !9
  %97 = load i8, ptr %34, align 1, !tbaa !9
  %98 = xor i8 %97, %96
  %99 = getelementptr inbounds i8, ptr %.05470, i64 12
  store i8 %98, ptr %94, align 1, !tbaa !9
  %100 = getelementptr inbounds i8, ptr %.05569, i64 13
  %101 = load i8, ptr %95, align 1, !tbaa !9
  %102 = load i8, ptr %35, align 4, !tbaa !9
  %103 = xor i8 %102, %101
  %104 = getelementptr inbounds i8, ptr %.05470, i64 13
  store i8 %103, ptr %99, align 1, !tbaa !9
  %105 = getelementptr inbounds i8, ptr %.05569, i64 14
  %106 = load i8, ptr %100, align 1, !tbaa !9
  %107 = load i8, ptr %36, align 1, !tbaa !9
  %108 = xor i8 %107, %106
  %109 = getelementptr inbounds i8, ptr %.05470, i64 14
  store i8 %108, ptr %104, align 1, !tbaa !9
  %110 = getelementptr inbounds i8, ptr %.05569, i64 15
  %111 = load i8, ptr %105, align 1, !tbaa !9
  %112 = load i8, ptr %37, align 2, !tbaa !9
  %113 = xor i8 %112, %111
  %114 = getelementptr inbounds i8, ptr %.05470, i64 15
  store i8 %113, ptr %109, align 1, !tbaa !9
  %115 = load i8, ptr %110, align 1, !tbaa !9
  %116 = load i8, ptr %38, align 1, !tbaa !9
  %117 = xor i8 %116, %115
  store i8 %117, ptr %114, align 1, !tbaa !9
  call void @drysponge256_f_absorb(ptr noundef nonnull %10, ptr noundef nonnull %.05470, i32 noundef 16) #3
  call void @drysponge256_g(ptr noundef nonnull %10) #3
  %118 = getelementptr inbounds i8, ptr %.05569, i64 16
  %119 = getelementptr inbounds i8, ptr %.05470, i64 16
  %120 = add i64 %.05668, -16
  %121 = icmp ugt i64 %120, 16
  br i1 %121, label %39, label %iter.check, !llvm.loop !10

iter.check:                                       ; preds = %39, %.preheader
  %.056.lcssa = phi i64 [ %14, %.preheader ], [ %120, %39 ]
  %.055.lcssa = phi ptr [ %3, %.preheader ], [ %118, %39 ]
  %.054.lcssa = phi ptr [ %0, %.preheader ], [ %119, %39 ]
  %122 = getelementptr inbounds i8, ptr %10, i64 104
  %.not61 = icmp eq i64 %.056.lcssa, 16
  %spec.select = select i1 %.not61, i32 56, i32 60
  store i32 %spec.select, ptr %122, align 8, !tbaa !12
  %123 = trunc nuw i64 %.056.lcssa to i32
  %124 = getelementptr inbounds i8, ptr %10, i64 72
  %125 = add nuw nsw i64 %.056.lcssa, 4294967295
  %126 = and i64 %125, 4294967295
  %127 = add nuw nsw i64 %126, 1
  %min.iters.check = icmp ult i64 %126, 7
  br i1 %min.iters.check, label %.lr.ph79.preheader, label %vector.memcheck

vector.memcheck:                                  ; preds = %iter.check
  %.055.lcssa88 = ptrtoint ptr %.055.lcssa to i64
  %.054.lcssa87 = ptrtoint ptr %.054.lcssa to i64
  %128 = sub i64 %.054.lcssa87, %.055.lcssa88
  %diff.check = icmp ult i64 %128, 32
  %129 = add i64 %.054.lcssa87, -72
  %130 = sub i64 %129, %11
  %diff.check89 = icmp ult i64 %130, 32
  %conflict.rdx = or i1 %diff.check, %diff.check89
  br i1 %conflict.rdx, label %.lr.ph79.preheader, label %vector.main.loop.iter.check

vector.main.loop.iter.check:                      ; preds = %vector.memcheck
  %min.iters.check90 = icmp ult i64 %126, 31
  br i1 %min.iters.check90, label %vec.epilog.ph, label %vector.ph

vector.ph:                                        ; preds = %vector.main.loop.iter.check
  %n.vec = and i64 %127, 8589934560
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %next.gep = getelementptr i8, ptr %124, i64 %index
  %next.gep92 = getelementptr i8, ptr %.055.lcssa, i64 %index
  %next.gep94 = getelementptr i8, ptr %.054.lcssa, i64 %index
  %131 = getelementptr i8, ptr %next.gep92, i64 16
  %wide.load = load <16 x i8>, ptr %next.gep92, align 1, !tbaa !9
  %wide.load96 = load <16 x i8>, ptr %131, align 1, !tbaa !9
  %132 = getelementptr i8, ptr %next.gep, i64 16
  %wide.load97 = load <16 x i8>, ptr %next.gep, align 8, !tbaa !9
  %wide.load98 = load <16 x i8>, ptr %132, align 8, !tbaa !9
  %133 = xor <16 x i8> %wide.load97, %wide.load
  %134 = xor <16 x i8> %wide.load98, %wide.load96
  %135 = getelementptr i8, ptr %next.gep94, i64 16
  store <16 x i8> %133, ptr %next.gep94, align 1, !tbaa !9
  store <16 x i8> %134, ptr %135, align 1, !tbaa !9
  %index.next = add nuw i64 %index, 32
  %136 = icmp eq i64 %index.next, %n.vec
  br i1 %136, label %middle.block, label %vector.body, !llvm.loop !15

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %127, %n.vec
  br i1 %cmp.n, label %._crit_edge80, label %vec.epilog.iter.check

vec.epilog.iter.check:                            ; preds = %middle.block
  %ind.end110 = getelementptr i8, ptr %.054.lcssa, i64 %n.vec
  %ind.end107 = getelementptr i8, ptr %.055.lcssa, i64 %n.vec
  %ind.end104 = getelementptr i8, ptr %124, i64 %n.vec
  %.cast101 = trunc i64 %n.vec to i32
  %ind.end102 = sub i32 %123, %.cast101
  %n.vec.remaining = and i64 %127, 24
  %min.epilog.iters.check = icmp eq i64 %n.vec.remaining, 0
  br i1 %min.epilog.iters.check, label %.lr.ph79.preheader, label %vec.epilog.ph

vec.epilog.ph:                                    ; preds = %vector.main.loop.iter.check, %vec.epilog.iter.check
  %vec.epilog.resume.val = phi i64 [ %n.vec, %vec.epilog.iter.check ], [ 0, %vector.main.loop.iter.check ]
  %n.vec100 = and i64 %127, 8589934584
  %.cast = trunc i64 %n.vec100 to i32
  %ind.end = sub i32 %123, %.cast
  %ind.end103 = getelementptr i8, ptr %124, i64 %n.vec100
  %ind.end106 = getelementptr i8, ptr %.055.lcssa, i64 %n.vec100
  %ind.end109 = getelementptr i8, ptr %.054.lcssa, i64 %n.vec100
  br label %vec.epilog.vector.body

vec.epilog.vector.body:                           ; preds = %vec.epilog.vector.body, %vec.epilog.ph
  %index112 = phi i64 [ %vec.epilog.resume.val, %vec.epilog.ph ], [ %index.next118, %vec.epilog.vector.body ]
  %next.gep113 = getelementptr i8, ptr %124, i64 %index112
  %next.gep114 = getelementptr i8, ptr %.055.lcssa, i64 %index112
  %next.gep115 = getelementptr i8, ptr %.054.lcssa, i64 %index112
  %wide.load116 = load <8 x i8>, ptr %next.gep114, align 1, !tbaa !9
  %wide.load117 = load <8 x i8>, ptr %next.gep113, align 8, !tbaa !9
  %137 = xor <8 x i8> %wide.load117, %wide.load116
  store <8 x i8> %137, ptr %next.gep115, align 1, !tbaa !9
  %index.next118 = add nuw i64 %index112, 8
  %138 = icmp eq i64 %index.next118, %n.vec100
  br i1 %138, label %vec.epilog.middle.block, label %vec.epilog.vector.body, !llvm.loop !18

vec.epilog.middle.block:                          ; preds = %vec.epilog.vector.body
  %cmp.n119 = icmp eq i64 %127, %n.vec100
  br i1 %cmp.n119, label %._crit_edge80, label %.lr.ph79.preheader

.lr.ph79.preheader:                               ; preds = %vec.epilog.middle.block, %vector.memcheck, %iter.check, %vec.epilog.iter.check
  %.077.ph = phi i32 [ %123, %iter.check ], [ %123, %vector.memcheck ], [ %ind.end102, %vec.epilog.iter.check ], [ %ind.end, %vec.epilog.middle.block ]
  %.04676.ph = phi ptr [ %124, %iter.check ], [ %124, %vector.memcheck ], [ %ind.end104, %vec.epilog.iter.check ], [ %ind.end103, %vec.epilog.middle.block ]
  %.04775.ph = phi ptr [ %.055.lcssa, %iter.check ], [ %.055.lcssa, %vector.memcheck ], [ %ind.end107, %vec.epilog.iter.check ], [ %ind.end106, %vec.epilog.middle.block ]
  %.04874.ph = phi ptr [ %.054.lcssa, %iter.check ], [ %.054.lcssa, %vector.memcheck ], [ %ind.end110, %vec.epilog.iter.check ], [ %ind.end109, %vec.epilog.middle.block ]
  %139 = add nsw i32 %.077.ph, -1
  %xtraiter = and i32 %.077.ph, 3
  %lcmp.mod.not = icmp eq i32 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.lr.ph79.prol.loopexit, label %.lr.ph79.prol

.lr.ph79.prol:                                    ; preds = %.lr.ph79.preheader, %.lr.ph79.prol
  %.077.prol = phi i32 [ %146, %.lr.ph79.prol ], [ %.077.ph, %.lr.ph79.preheader ]
  %.04676.prol = phi ptr [ %142, %.lr.ph79.prol ], [ %.04676.ph, %.lr.ph79.preheader ]
  %.04775.prol = phi ptr [ %140, %.lr.ph79.prol ], [ %.04775.ph, %.lr.ph79.preheader ]
  %.04874.prol = phi ptr [ %145, %.lr.ph79.prol ], [ %.04874.ph, %.lr.ph79.preheader ]
  %prol.iter = phi i32 [ %prol.iter.next, %.lr.ph79.prol ], [ 0, %.lr.ph79.preheader ]
  %140 = getelementptr inbounds i8, ptr %.04775.prol, i64 1
  %141 = load i8, ptr %.04775.prol, align 1, !tbaa !9
  %142 = getelementptr inbounds i8, ptr %.04676.prol, i64 1
  %143 = load i8, ptr %.04676.prol, align 1, !tbaa !9
  %144 = xor i8 %143, %141
  %145 = getelementptr inbounds i8, ptr %.04874.prol, i64 1
  store i8 %144, ptr %.04874.prol, align 1, !tbaa !9
  %146 = add nsw i32 %.077.prol, -1
  %prol.iter.next = add i32 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i32 %prol.iter.next, %xtraiter
  br i1 %prol.iter.cmp.not, label %.lr.ph79.prol.loopexit, label %.lr.ph79.prol, !llvm.loop !19

.lr.ph79.prol.loopexit:                           ; preds = %.lr.ph79.prol, %.lr.ph79.preheader
  %.077.unr = phi i32 [ %.077.ph, %.lr.ph79.preheader ], [ %146, %.lr.ph79.prol ]
  %.04676.unr = phi ptr [ %.04676.ph, %.lr.ph79.preheader ], [ %142, %.lr.ph79.prol ]
  %.04775.unr = phi ptr [ %.04775.ph, %.lr.ph79.preheader ], [ %140, %.lr.ph79.prol ]
  %.04874.unr = phi ptr [ %.04874.ph, %.lr.ph79.preheader ], [ %145, %.lr.ph79.prol ]
  %147 = icmp ult i32 %139, 3
  br i1 %147, label %._crit_edge80, label %.lr.ph79

.lr.ph79:                                         ; preds = %.lr.ph79.prol.loopexit, %.lr.ph79
  %.077 = phi i32 [ %172, %.lr.ph79 ], [ %.077.unr, %.lr.ph79.prol.loopexit ]
  %.04676 = phi ptr [ %168, %.lr.ph79 ], [ %.04676.unr, %.lr.ph79.prol.loopexit ]
  %.04775 = phi ptr [ %166, %.lr.ph79 ], [ %.04775.unr, %.lr.ph79.prol.loopexit ]
  %.04874 = phi ptr [ %171, %.lr.ph79 ], [ %.04874.unr, %.lr.ph79.prol.loopexit ]
  %148 = getelementptr inbounds i8, ptr %.04775, i64 1
  %149 = load i8, ptr %.04775, align 1, !tbaa !9
  %150 = getelementptr inbounds i8, ptr %.04676, i64 1
  %151 = load i8, ptr %.04676, align 1, !tbaa !9
  %152 = xor i8 %151, %149
  %153 = getelementptr inbounds i8, ptr %.04874, i64 1
  store i8 %152, ptr %.04874, align 1, !tbaa !9
  %154 = getelementptr inbounds i8, ptr %.04775, i64 2
  %155 = load i8, ptr %148, align 1, !tbaa !9
  %156 = getelementptr inbounds i8, ptr %.04676, i64 2
  %157 = load i8, ptr %150, align 1, !tbaa !9
  %158 = xor i8 %157, %155
  %159 = getelementptr inbounds i8, ptr %.04874, i64 2
  store i8 %158, ptr %153, align 1, !tbaa !9
  %160 = getelementptr inbounds i8, ptr %.04775, i64 3
  %161 = load i8, ptr %154, align 1, !tbaa !9
  %162 = getelementptr inbounds i8, ptr %.04676, i64 3
  %163 = load i8, ptr %156, align 1, !tbaa !9
  %164 = xor i8 %163, %161
  %165 = getelementptr inbounds i8, ptr %.04874, i64 3
  store i8 %164, ptr %159, align 1, !tbaa !9
  %166 = getelementptr inbounds i8, ptr %.04775, i64 4
  %167 = load i8, ptr %160, align 1, !tbaa !9
  %168 = getelementptr inbounds i8, ptr %.04676, i64 4
  %169 = load i8, ptr %162, align 1, !tbaa !9
  %170 = xor i8 %169, %167
  %171 = getelementptr inbounds i8, ptr %.04874, i64 4
  store i8 %170, ptr %165, align 1, !tbaa !9
  %172 = add nsw i32 %.077, -4
  %.not62.3 = icmp eq i32 %172, 0
  br i1 %.not62.3, label %._crit_edge80, label %.lr.ph79, !llvm.loop !21

._crit_edge80:                                    ; preds = %.lr.ph79.prol.loopexit, %.lr.ph79, %vec.epilog.middle.block, %middle.block
  call void @drysponge256_f_absorb(ptr noundef nonnull %10, ptr noundef %.054.lcssa, i32 noundef %123) #3
  call void @drysponge256_g(ptr noundef nonnull %10) #3
  %173 = getelementptr inbounds i8, ptr %.055.lcssa, i64 %.056.lcssa
  br label %174

174:                                              ; preds = %._crit_edge80, %21
  %.1 = phi ptr [ %173, %._crit_edge80 ], [ %3, %21 ]
  %175 = getelementptr inbounds i8, ptr %10, i64 72
  %176 = call i32 @aead_check_tag(ptr noundef null, i64 noundef 0, ptr noundef nonnull %175, ptr noundef %.1, i32 noundef 16) #3
  call void @drysponge256_g(ptr noundef nonnull %10) #3
  %177 = load i64, ptr %1, align 8, !tbaa !5
  %178 = getelementptr inbounds i8, ptr %.1, i64 16
  %179 = xor i32 %176, -1
  %180 = call i32 @aead_check_tag_precheck(ptr noundef %0, i64 noundef %177, ptr noundef nonnull %175, ptr noundef nonnull %178, i32 noundef 16, i32 noundef %179) #3
  br label %181

181:                                              ; preds = %9, %174
  %.053 = phi i32 [ %180, %174 ], [ -1, %9 ]
  call void @llvm.lifetime.end.p0(i64 112, ptr nonnull %10) #3
  ret i32 %.053
}

; 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

declare i32 @aead_check_tag(ptr noundef, i64 noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

declare void @drysponge256_setup(ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare hidden void @drygascon256_process_ad(ptr noundef, ptr noundef, i64 noundef, i32 noundef) local_unnamed_addr #0

declare void @drysponge256_f_absorb(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

declare void @drysponge256_g(ptr noundef) local_unnamed_addr #2

declare i32 @aead_check_tag_precheck(ptr noundef, i64 noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

attributes #0 = { 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 = { "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 = !{!"long long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = !{!13, !14, i64 104}
!13 = !{!"", !7, i64 0, !7, i64 72, !7, i64 88, !14, i64 104, !14, i64 108}
!14 = !{!"int", !7, i64 0}
!15 = distinct !{!15, !11, !16, !17}
!16 = !{!"llvm.loop.isvectorized", i32 1}
!17 = !{!"llvm.loop.unroll.runtime.disable"}
!18 = distinct !{!18, !11, !16, !17}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.unroll.disable"}
!21 = distinct !{!21, !11, !16}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass