; LLVM IR from openssl/openssl :: crypto/modes (ocb128)

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

%union.OCB_BLOCK = type { [2 x i64] }
%struct.ocb128_context = type { ptr, ptr, ptr, ptr, ptr, i64, i64, %union.OCB_BLOCK, %union.OCB_BLOCK, ptr, %struct.anon }
%struct.anon = type { i64, i64, %union.OCB_BLOCK, %union.OCB_BLOCK, %union.OCB_BLOCK, %union.OCB_BLOCK }

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

; Function Attrs: nounwind uwtable
define dso_local i32 @CRYPTO_ocb128_aad(ptr noundef %0, ptr noundef %1, i64 noundef %2) #3 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca %union.OCB_BLOCK, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store i64 %2, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #4
  %15 = load i64, ptr %7, align 8, !tbaa !9
  %16 = udiv i64 %15, 16
  store i64 %16, ptr %10, align 8, !tbaa !9
  %17 = load i64, ptr %10, align 8, !tbaa !9
  %18 = load ptr, ptr %5, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.ocb128_context, ptr %18, i32 0, i32 10
  %20 = getelementptr inbounds %struct.anon, ptr %19, i32 0, i32 0
  %21 = load i64, ptr %20, align 8, !tbaa !11
  %22 = add i64 %17, %21
  store i64 %22, ptr %9, align 8, !tbaa !15
  %23 = load ptr, ptr %5, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.ocb128_context, ptr %23, i32 0, i32 10
  %25 = getelementptr inbounds %struct.anon, ptr %24, i32 0, i32 0
  %26 = load i64, ptr %25, align 8, !tbaa !11
  %27 = add i64 %26, 1
  store i64 %27, ptr %8, align 8, !tbaa !15
  br label %28

28:                                               ; preds = %125, %3
  %29 = load i64, ptr %8, align 8, !tbaa !15
  %30 = load i64, ptr %9, align 8, !tbaa !15
  %31 = icmp ule i64 %29, %30
  br i1 %31, label %32, label %128

32:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  %33 = load ptr, ptr %5, align 8, !tbaa !5
  %34 = load i64, ptr %8, align 8, !tbaa !15
  %35 = call i32 @ocb_ntz(i64 noundef %34)
  %36 = zext i32 %35 to i64
  %37 = call ptr @ocb_lookup_l(ptr noundef %33, i64 noundef %36)
  store ptr %37, ptr %13, align 8, !tbaa !5
  %38 = load ptr, ptr %13, align 8, !tbaa !5
  %39 = icmp eq ptr %38, null
  br i1 %39, label %40, label %41

40:                                               ; preds = %32
  store i32 0, ptr %4, align 4
  store i32 1, ptr %14, align 4
  br label %122

41:                                               ; preds = %32
  %42 = load ptr, ptr %5, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.ocb128_context, ptr %42, i32 0, i32 10
  %44 = getelementptr inbounds %struct.anon, ptr %43, i32 0, i32 2
  %45 = getelementptr inbounds [2 x i64], ptr %44, i64 0, i64 0
  %46 = load i64, ptr %45, align 8, !tbaa !16
  %47 = load ptr, ptr %13, align 8, !tbaa !5
  %48 = getelementptr inbounds [2 x i64], ptr %47, i64 0, i64 0
  %49 = load i64, ptr %48, align 8, !tbaa !16
  %50 = xor i64 %46, %49
  %51 = load ptr, ptr %5, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.ocb128_context, ptr %51, i32 0, i32 10
  %53 = getelementptr inbounds %struct.anon, ptr %52, i32 0, i32 2
  %54 = getelementptr inbounds [2 x i64], ptr %53, i64 0, i64 0
  store i64 %50, ptr %54, align 8, !tbaa !16
  %55 = load ptr, ptr %5, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.ocb128_context, ptr %55, i32 0, i32 10
  %57 = getelementptr inbounds %struct.anon, ptr %56, i32 0, i32 2
  %58 = getelementptr inbounds [2 x i64], ptr %57, i64 0, i64 1
  %59 = load i64, ptr %58, align 8, !tbaa !16
  %60 = load ptr, ptr %13, align 8, !tbaa !5
  %61 = getelementptr inbounds [2 x i64], ptr %60, i64 0, i64 1
  %62 = load i64, ptr %61, align 8, !tbaa !16
  %63 = xor i64 %59, %62
  %64 = load ptr, ptr %5, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.ocb128_context, ptr %64, i32 0, i32 10
  %66 = getelementptr inbounds %struct.anon, ptr %65, i32 0, i32 2
  %67 = getelementptr inbounds [2 x i64], ptr %66, i64 0, i64 1
  store i64 %63, ptr %67, align 8, !tbaa !16
  %68 = getelementptr inbounds [16 x i8], ptr %12, i64 0, i64 0
  %69 = load ptr, ptr %6, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %68, ptr align 1 %69, i64 16, i1 false)
  %70 = load ptr, ptr %6, align 8, !tbaa !5
  %71 = getelementptr inbounds i8, ptr %70, i64 16
  store ptr %71, ptr %6, align 8, !tbaa !5
  %72 = load ptr, ptr %5, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.ocb128_context, ptr %72, i32 0, i32 10
  %74 = getelementptr inbounds %struct.anon, ptr %73, i32 0, i32 2
  %75 = getelementptr inbounds [2 x i64], ptr %74, i64 0, i64 0
  %76 = load i64, ptr %75, align 8, !tbaa !16
  %77 = getelementptr inbounds [2 x i64], ptr %12, i64 0, i64 0
  %78 = load i64, ptr %77, align 8, !tbaa !16
  %79 = xor i64 %76, %78
  %80 = getelementptr inbounds [2 x i64], ptr %12, i64 0, i64 0
  store i64 %79, ptr %80, align 8, !tbaa !16
  %81 = load ptr, ptr %5, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.ocb128_context, ptr %81, i32 0, i32 10
  %83 = getelementptr inbounds %struct.anon, ptr %82, i32 0, i32 2
  %84 = getelementptr inbounds [2 x i64], ptr %83, i64 0, i64 1
  %85 = load i64, ptr %84, align 8, !tbaa !16
  %86 = getelementptr inbounds [2 x i64], ptr %12, i64 0, i64 1
  %87 = load i64, ptr %86, align 8, !tbaa !16
  %88 = xor i64 %85, %87
  %89 = getelementptr inbounds [2 x i64], ptr %12, i64 0, i64 1
  store i64 %88, ptr %89, align 8, !tbaa !16
  %90 = load ptr, ptr %5, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.ocb128_context, ptr %90, i32 0, i32 0
  %92 = load ptr, ptr %91, align 8, !tbaa !17
  %93 = getelementptr inbounds [16 x i8], ptr %12, i64 0, i64 0
  %94 = getelementptr inbounds [16 x i8], ptr %12, i64 0, i64 0
  %95 = load ptr, ptr %5, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.ocb128_context, ptr %95, i32 0, i32 2
  %97 = load ptr, ptr %96, align 8, !tbaa !18
  call void %92(ptr noundef %93, ptr noundef %94, ptr noundef %97)
  %98 = getelementptr inbounds [2 x i64], ptr %12, i64 0, i64 0
  %99 = load i64, ptr %98, align 8, !tbaa !16
  %100 = load ptr, ptr %5, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.ocb128_context, ptr %100, i32 0, i32 10
  %102 = getelementptr inbounds %struct.anon, ptr %101, i32 0, i32 3
  %103 = getelementptr inbounds [2 x i64], ptr %102, i64 0, i64 0
  %104 = load i64, ptr %103, align 8, !tbaa !16
  %105 = xor i64 %99, %104
  %106 = load ptr, ptr %5, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.ocb128_context, ptr %106, i32 0, i32 10
  %108 = getelementptr inbounds %struct.anon, ptr %107, i32 0, i32 3
  %109 = getelementptr inbounds [2 x i64], ptr %108, i64 0, i64 0
  store i64 %105, ptr %109, align 8, !tbaa !16
  %110 = getelementptr inbounds [2 x i64], ptr %12, i64 0, i64 1
  %111 = load i64, ptr %110, align 8, !tbaa !16
  %112 = load ptr, ptr %5, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.ocb128_context, ptr %112, i32 0, i32 10
  %114 = getelementptr inbounds %struct.anon, ptr %113, i32 0, i32 3
  %115 = getelementptr inbounds [2 x i64], ptr %114, i64 0, i64 1
  %116 = load i64, ptr %115, align 8, !tbaa !16
  %117 = xor i64 %111, %116
  %118 = load ptr, ptr %5, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.ocb128_context, ptr %118, i32 0, i32 10
  %120 = getelementptr inbounds %struct.anon, ptr %119, i32 0, i32 3
  %121 = getelementptr inbounds [2 x i64], ptr %120, i64 0, i64 1
  store i64 %117, ptr %121, align 8, !tbaa !16
  store i32 0, ptr %14, align 4
  br label %122

122:                                              ; preds = %41, %40
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  %123 = load i32, ptr %14, align 4
  switch i32 %123, label %223 [
    i32 0, label %124
  ]

124:                                              ; preds = %122
  br label %125

125:                                              ; preds = %124
  %126 = load i64, ptr %8, align 8, !tbaa !15
  %127 = add i64 %126, 1
  store i64 %127, ptr %8, align 8, !tbaa !15
  br label %28, !llvm.loop !19

128:                                              ; preds = %28
  %129 = load i64, ptr %7, align 8, !tbaa !9
  %130 = urem i64 %129, 16
  store i64 %130, ptr %11, align 8, !tbaa !9
  %131 = load i64, ptr %11, align 8, !tbaa !9
  %132 = icmp ugt i64 %131, 0
  br i1 %132, label %133, label %218

133:                                              ; preds = %128
  %134 = load ptr, ptr %5, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.ocb128_context, ptr %134, i32 0, i32 10
  %136 = getelementptr inbounds %struct.anon, ptr %135, i32 0, i32 2
  %137 = getelementptr inbounds [2 x i64], ptr %136, i64 0, i64 0
  %138 = load i64, ptr %137, align 8, !tbaa !16
  %139 = load ptr, ptr %5, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.ocb128_context, ptr %139, i32 0, i32 7
  %141 = getelementptr inbounds [2 x i64], ptr %140, i64 0, i64 0
  %142 = load i64, ptr %141, align 8, !tbaa !16
  %143 = xor i64 %138, %142
  %144 = load ptr, ptr %5, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.ocb128_context, ptr %144, i32 0, i32 10
  %146 = getelementptr inbounds %struct.anon, ptr %145, i32 0, i32 2
  %147 = getelementptr inbounds [2 x i64], ptr %146, i64 0, i64 0
  store i64 %143, ptr %147, align 8, !tbaa !16
  %148 = load ptr, ptr %5, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.ocb128_context, ptr %148, i32 0, i32 10
  %150 = getelementptr inbounds %struct.anon, ptr %149, i32 0, i32 2
  %151 = getelementptr inbounds [2 x i64], ptr %150, i64 0, i64 1
  %152 = load i64, ptr %151, align 8, !tbaa !16
  %153 = load ptr, ptr %5, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.ocb128_context, ptr %153, i32 0, i32 7
  %155 = getelementptr inbounds [2 x i64], ptr %154, i64 0, i64 1
  %156 = load i64, ptr %155, align 8, !tbaa !16
  %157 = xor i64 %152, %156
  %158 = load ptr, ptr %5, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct.ocb128_context, ptr %158, i32 0, i32 10
  %160 = getelementptr inbounds %struct.anon, ptr %159, i32 0, i32 2
  %161 = getelementptr inbounds [2 x i64], ptr %160, i64 0, i64 1
  store i64 %157, ptr %161, align 8, !tbaa !16
  %162 = getelementptr inbounds [16 x i8], ptr %12, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 8 %162, i8 0, i64 16, i1 false)
  %163 = getelementptr inbounds [16 x i8], ptr %12, i64 0, i64 0
  %164 = load ptr, ptr %6, align 8, !tbaa !5
  %165 = load i64, ptr %11, align 8, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %163, ptr align 1 %164, i64 %165, i1 false)
  %166 = load i64, ptr %11, align 8, !tbaa !9
  %167 = getelementptr inbounds [16 x i8], ptr %12, i64 0, i64 %166
  store i8 -128, ptr %167, align 1, !tbaa !16
  %168 = load ptr, ptr %5, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct.ocb128_context, ptr %168, i32 0, i32 10
  %170 = getelementptr inbounds %struct.anon, ptr %169, i32 0, i32 2
  %171 = getelementptr inbounds [2 x i64], ptr %170, i64 0, i64 0
  %172 = load i64, ptr %171, align 8, !tbaa !16
  %173 = getelementptr inbounds [2 x i64], ptr %12, i64 0, i64 0
  %174 = load i64, ptr %173, align 8, !tbaa !16
  %175 = xor i64 %172, %174
  %176 = getelementptr inbounds [2 x i64], ptr %12, i64 0, i64 0
  store i64 %175, ptr %176, align 8, !tbaa !16
  %177 = load ptr, ptr %5, align 8, !tbaa !5
  %178 = getelementptr inbounds %struct.ocb128_context, ptr %177, i32 0, i32 10
  %179 = getelementptr inbounds %struct.anon, ptr %178, i32 0, i32 2
  %180 = getelementptr inbounds [2 x i64], ptr %179, i64 0, i64 1
  %181 = load i64, ptr %180, align 8, !tbaa !16
  %182 = getelementptr inbounds [2 x i64], ptr %12, i64 0, i64 1
  %183 = load i64, ptr %182, align 8, !tbaa !16
  %184 = xor i64 %181, %183
  %185 = getelementptr inbounds [2 x i64], ptr %12, i64 0, i64 1
  store i64 %184, ptr %185, align 8, !tbaa !16
  %186 = load ptr, ptr %5, align 8, !tbaa !5
  %187 = getelementptr inbounds %struct.ocb128_context, ptr %186, i32 0, i32 0
  %188 = load ptr, ptr %187, align 8, !tbaa !17
  %189 = getelementptr inbounds [16 x i8], ptr %12, i64 0, i64 0
  %190 = getelementptr inbounds [16 x i8], ptr %12, i64 0, i64 0
  %191 = load ptr, ptr %5, align 8, !tbaa !5
  %192 = getelementptr inbounds %struct.ocb128_context, ptr %191, i32 0, i32 2
  %193 = load ptr, ptr %192, align 8, !tbaa !18
  call void %188(ptr noundef %189, ptr noundef %190, ptr noundef %193)
  %194 = getelementptr inbounds [2 x i64], ptr %12, i64 0, i64 0
  %195 = load i64, ptr %194, align 8, !tbaa !16
  %196 = load ptr, ptr %5, align 8, !tbaa !5
  %197 = getelementptr inbounds %struct.ocb128_context, ptr %196, i32 0, i32 10
  %198 = getelementptr inbounds %struct.anon, ptr %197, i32 0, i32 3
  %199 = getelementptr inbounds [2 x i64], ptr %198, i64 0, i64 0
  %200 = load i64, ptr %199, align 8, !tbaa !16
  %201 = xor i64 %195, %200
  %202 = load ptr, ptr %5, align 8, !tbaa !5
  %203 = getelementptr inbounds %struct.ocb128_context, ptr %202, i32 0, i32 10
  %204 = getelementptr inbounds %struct.anon, ptr %203, i32 0, i32 3
  %205 = getelementptr inbounds [2 x i64], ptr %204, i64 0, i64 0
  store i64 %201, ptr %205, align 8, !tbaa !16
  %206 = getelementptr inbounds [2 x i64], ptr %12, i64 0, i64 1
  %207 = load i64, ptr %206, align 8, !tbaa !16
  %208 = load ptr, ptr %5, align 8, !tbaa !5
  %209 = getelementptr inbounds %struct.ocb128_context, ptr %208, i32 0, i32 10
  %210 = getelementptr inbounds %struct.anon, ptr %209, i32 0, i32 3
  %211 = getelementptr inbounds [2 x i64], ptr %210, i64 0, i64 1
  %212 = load i64, ptr %211, align 8, !tbaa !16
  %213 = xor i64 %207, %212
  %214 = load ptr, ptr %5, align 8, !tbaa !5
  %215 = getelementptr inbounds %struct.ocb128_context, ptr %214, i32 0, i32 10
  %216 = getelementptr inbounds %struct.anon, ptr %215, i32 0, i32 3
  %217 = getelementptr inbounds [2 x i64], ptr %216, i64 0, i64 1
  store i64 %213, ptr %217, align 8, !tbaa !16
  br label %218

218:                                              ; preds = %133, %128
  %219 = load i64, ptr %9, align 8, !tbaa !15
  %220 = load ptr, ptr %5, align 8, !tbaa !5
  %221 = getelementptr inbounds %struct.ocb128_context, ptr %220, i32 0, i32 10
  %222 = getelementptr inbounds %struct.anon, ptr %221, i32 0, i32 0
  store i64 %219, ptr %222, align 8, !tbaa !11
  store i32 1, ptr %4, align 4
  store i32 1, ptr %14, align 4
  br label %223

223:                                              ; preds = %218, %122
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  %224 = load i32, ptr %4, align 4
  ret i32 %224
}

; Function Attrs: nounwind uwtable
declare hidden ptr @ocb_lookup_l(ptr noundef, i64 noundef) #3

; Function Attrs: nounwind uwtable
declare hidden i32 @ocb_ntz(i64 noundef) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !14, i64 96}
!12 = !{!"ocb128_context", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !10, i64 40, !10, i64 48, !7, i64 56, !7, i64 72, !6, i64 88, !13, i64 96}
!13 = !{!"", !14, i64 0, !14, i64 8, !7, i64 16, !7, i64 32, !7, i64 48, !7, i64 64}
!14 = !{!"long long", !7, i64 0}
!15 = !{!14, !14, i64 0}
!16 = !{!7, !7, i64 0}
!17 = !{!12, !6, i64 0}
!18 = !{!12, !6, i64 16}
!19 = distinct !{!19, !20}
!20 = !{!"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"

%union.OCB_BLOCK = type { [2 x i64] }

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

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @CRYPTO_ocb128_aad(ptr noundef %0, ptr nocapture noundef readonly %1, i64 noundef %2) local_unnamed_addr #3 {
  %4 = alloca %union.OCB_BLOCK, align 16
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #4
  %5 = lshr i64 %2, 4
  %6 = getelementptr inbounds i8, ptr %0, i64 96
  %7 = load i64, ptr %6, align 8, !tbaa !5
  %8 = add i64 %7, %5
  %.05159 = add i64 %7, 1
  %.not60 = icmp ugt i64 %.05159, %8
  br i1 %.not60, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %3
  %9 = getelementptr inbounds i8, ptr %0, i64 112
  %10 = getelementptr inbounds i8, ptr %0, i64 120
  %11 = getelementptr inbounds i8, ptr %4, i64 8
  %12 = getelementptr inbounds i8, ptr %0, i64 16
  %13 = getelementptr inbounds i8, ptr %0, i64 128
  br label %14

14:                                               ; preds = %.lr.ph, %18
  %.05162 = phi i64 [ %.05159, %.lr.ph ], [ %.051, %18 ]
  %.04961 = phi ptr [ %1, %.lr.ph ], [ %26, %18 ]
  %15 = call i32 @ocb_ntz(i64 noundef %.05162)
  %16 = zext i32 %15 to i64
  %17 = call ptr @ocb_lookup_l(ptr noundef nonnull %0, i64 noundef %16)
  %.not56 = icmp eq ptr %17, null
  br i1 %.not56, label %.thread, label %18

18:                                               ; preds = %14
  %19 = load i64, ptr %9, align 8, !tbaa !13
  %20 = load i64, ptr %17, align 8, !tbaa !13
  %21 = xor i64 %20, %19
  store i64 %21, ptr %9, align 8, !tbaa !13
  %22 = load i64, ptr %10, align 8, !tbaa !13
  %23 = getelementptr inbounds i8, ptr %17, i64 8
  %24 = load i64, ptr %23, align 8, !tbaa !13
  %25 = xor i64 %24, %22
  store i64 %25, ptr %10, align 8, !tbaa !13
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %4, ptr noundef nonnull align 1 dereferenceable(16) %.04961, i64 16, i1 false)
  %26 = getelementptr inbounds i8, ptr %.04961, i64 16
  %27 = load i64, ptr %4, align 16, !tbaa !13
  %28 = xor i64 %27, %21
  store i64 %28, ptr %4, align 16, !tbaa !13
  %29 = load i64, ptr %11, align 8, !tbaa !13
  %30 = xor i64 %29, %25
  store i64 %30, ptr %11, align 8, !tbaa !13
  %31 = load ptr, ptr %0, align 8, !tbaa !14
  %32 = load ptr, ptr %12, align 8, !tbaa !15
  call void %31(ptr noundef nonnull %4, ptr noundef nonnull %4, ptr noundef %32) #4
  %33 = load <2 x i64>, ptr %4, align 16, !tbaa !13
  %34 = load <2 x i64>, ptr %13, align 8, !tbaa !13
  %35 = xor <2 x i64> %34, %33
  store <2 x i64> %35, ptr %13, align 8, !tbaa !13
  %.051 = add i64 %.05162, 1
  %.not = icmp ugt i64 %.051, %8
  br i1 %.not, label %._crit_edge, label %14, !llvm.loop !16

._crit_edge:                                      ; preds = %18, %3
  %.049.lcssa = phi ptr [ %1, %3 ], [ %26, %18 ]
  %36 = and i64 %2, 15
  %.not55 = icmp eq i64 %36, 0
  br i1 %.not55, label %53, label %37

37:                                               ; preds = %._crit_edge
  %38 = getelementptr inbounds i8, ptr %0, i64 112
  %39 = getelementptr inbounds i8, ptr %0, i64 56
  %40 = load <2 x i64>, ptr %38, align 8, !tbaa !13
  %41 = load <2 x i64>, ptr %39, align 8, !tbaa !13
  %42 = xor <2 x i64> %41, %40
  store <2 x i64> %42, ptr %38, align 8, !tbaa !13
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %4, i8 0, i64 16, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 16 %4, ptr align 1 %.049.lcssa, i64 %36, i1 false)
  %43 = getelementptr inbounds [16 x i8], ptr %4, i64 0, i64 %36
  store i8 -128, ptr %43, align 1, !tbaa !13
  %44 = load <2 x i64>, ptr %4, align 16, !tbaa !13
  %45 = xor <2 x i64> %44, %42
  store <2 x i64> %45, ptr %4, align 16, !tbaa !13
  %46 = load ptr, ptr %0, align 8, !tbaa !14
  %47 = getelementptr inbounds i8, ptr %0, i64 16
  %48 = load ptr, ptr %47, align 8, !tbaa !15
  call void %46(ptr noundef nonnull %4, ptr noundef nonnull %4, ptr noundef %48) #4
  %49 = getelementptr inbounds i8, ptr %0, i64 128
  %50 = load <2 x i64>, ptr %4, align 16, !tbaa !13
  %51 = load <2 x i64>, ptr %49, align 8, !tbaa !13
  %52 = xor <2 x i64> %51, %50
  store <2 x i64> %52, ptr %49, align 8, !tbaa !13
  br label %53

53:                                               ; preds = %37, %._crit_edge
  store i64 %8, ptr %6, align 8, !tbaa !5
  br label %.thread

.thread:                                          ; preds = %14, %53
  %.2 = phi i32 [ 1, %53 ], [ 0, %14 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #4
  ret i32 %.2
}

; Function Attrs: nounwind uwtable
declare hidden ptr @ocb_lookup_l(ptr noundef, i64 noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare hidden i32 @ocb_ntz(i64 noundef) local_unnamed_addr #3

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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, !12, i64 96}
!6 = !{!"ocb128_context", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !10, i64 40, !10, i64 48, !8, i64 56, !8, i64 72, !7, i64 88, !11, i64 96}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"long", !8, i64 0}
!11 = !{!"", !12, i64 0, !12, i64 8, !8, i64 16, !8, i64 32, !8, i64 48, !8, i64 64}
!12 = !{!"long long", !8, i64 0}
!13 = !{!8, !8, i64 0}
!14 = !{!6, !7, i64 0}
!15 = !{!6, !7, i64 16}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}


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