; 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
declare hidden void @ocb_block_xor(ptr noundef, ptr noundef, i64 noundef, ptr noundef) #3

; 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

; Function Attrs: nounwind uwtable
define dso_local i32 @CRYPTO_ocb128_decrypt(ptr noundef %0, ptr noundef %1, ptr noundef %2, i64 noundef %3) #3 {
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca i32, align 4
  %17 = alloca %union.OCB_BLOCK, align 8
  %18 = alloca ptr, align 8
  %19 = alloca %union.OCB_BLOCK, align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store i64 %3, ptr %9, align 8, !tbaa !9
  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 8, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  %20 = load i64, ptr %9, align 8, !tbaa !9
  %21 = udiv i64 %20, 16
  store i64 %21, ptr %12, align 8, !tbaa !9
  %22 = load i64, ptr %12, align 8, !tbaa !9
  %23 = load ptr, ptr %6, 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 1
  %26 = load i64, ptr %25, align 8, !tbaa !11
  %27 = add i64 %22, %26
  store i64 %27, ptr %11, align 8, !tbaa !15
  %28 = load i64, ptr %12, align 8, !tbaa !9
  %29 = icmp ne i64 %28, 0
  br i1 %29, label %30, label %83

30:                                               ; preds = %4
  %31 = load i64, ptr %11, align 8, !tbaa !15
  %32 = load i64, ptr %11, align 8, !tbaa !15
  %33 = icmp eq i64 %31, %32
  br i1 %33, label %34, label %83

34:                                               ; preds = %30
  %35 = load ptr, ptr %6, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.ocb128_context, ptr %35, i32 0, i32 4
  %37 = load ptr, ptr %36, align 8, !tbaa !16
  %38 = icmp ne ptr %37, null
  br i1 %38, label %39, label %83

39:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  store i64 0, ptr %14, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  %40 = load i64, ptr %11, align 8, !tbaa !15
  store i64 %40, ptr %15, align 8, !tbaa !9
  br label %41

41:                                               ; preds = %45, %39
  %42 = load i64, ptr %15, align 8, !tbaa !9
  %43 = lshr i64 %42, 1
  store i64 %43, ptr %15, align 8, !tbaa !9
  %44 = icmp ne i64 %43, 0
  br i1 %44, label %45, label %48

45:                                               ; preds = %41
  %46 = load i64, ptr %14, align 8, !tbaa !9
  %47 = add i64 %46, 1
  store i64 %47, ptr %14, align 8, !tbaa !9
  br label %41, !llvm.loop !17

48:                                               ; preds = %41
  %49 = load ptr, ptr %6, align 8, !tbaa !5
  %50 = load i64, ptr %14, align 8, !tbaa !9
  %51 = call ptr @ocb_lookup_l(ptr noundef %49, i64 noundef %50)
  %52 = icmp eq ptr %51, null
  br i1 %52, label %53, label %54

53:                                               ; preds = %48
  store i32 0, ptr %5, align 4
  store i32 1, ptr %16, align 4
  br label %80

54:                                               ; preds = %48
  %55 = load ptr, ptr %6, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.ocb128_context, ptr %55, i32 0, i32 4
  %57 = load ptr, ptr %56, align 8, !tbaa !16
  %58 = load ptr, ptr %7, align 8, !tbaa !5
  %59 = load ptr, ptr %8, align 8, !tbaa !5
  %60 = load i64, ptr %12, align 8, !tbaa !9
  %61 = load ptr, ptr %6, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.ocb128_context, ptr %61, i32 0, i32 3
  %63 = load ptr, ptr %62, align 8, !tbaa !19
  %64 = load ptr, ptr %6, 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 1
  %67 = load i64, ptr %66, align 8, !tbaa !11
  %68 = add i64 %67, 1
  %69 = load ptr, ptr %6, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.ocb128_context, ptr %69, i32 0, i32 10
  %71 = getelementptr inbounds %struct.anon, ptr %70, i32 0, i32 4
  %72 = getelementptr inbounds [16 x i8], ptr %71, i64 0, i64 0
  %73 = load ptr, ptr %6, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.ocb128_context, ptr %73, i32 0, i32 9
  %75 = load ptr, ptr %74, align 8, !tbaa !20
  %76 = load ptr, ptr %6, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.ocb128_context, ptr %76, i32 0, i32 10
  %78 = getelementptr inbounds %struct.anon, ptr %77, i32 0, i32 5
  %79 = getelementptr inbounds [16 x i8], ptr %78, i64 0, i64 0
  call void %57(ptr noundef %58, ptr noundef %59, i64 noundef %60, ptr noundef %63, i64 noundef %68, ptr noundef %72, ptr noundef %75, ptr noundef %79)
  store i32 0, ptr %16, align 4
  br label %80

80:                                               ; preds = %54, %53
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  %81 = load i32, ptr %16, align 4
  switch i32 %81, label %299 [
    i32 0, label %82
  ]

82:                                               ; preds = %80
  br label %215

83:                                               ; preds = %34, %30, %4
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #4
  %84 = load ptr, ptr %6, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.ocb128_context, ptr %84, i32 0, i32 10
  %86 = getelementptr inbounds %struct.anon, ptr %85, i32 0, i32 1
  %87 = load i64, ptr %86, align 8, !tbaa !11
  %88 = add i64 %87, 1
  store i64 %88, ptr %10, align 8, !tbaa !15
  br label %89

89:                                               ; preds = %208, %83
  %90 = load i64, ptr %10, align 8, !tbaa !15
  %91 = load i64, ptr %11, align 8, !tbaa !15
  %92 = icmp ule i64 %90, %91
  br i1 %92, label %93, label %211

93:                                               ; preds = %89
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  %94 = load ptr, ptr %6, align 8, !tbaa !5
  %95 = load i64, ptr %10, align 8, !tbaa !15
  %96 = call i32 @ocb_ntz(i64 noundef %95)
  %97 = zext i32 %96 to i64
  %98 = call ptr @ocb_lookup_l(ptr noundef %94, i64 noundef %97)
  store ptr %98, ptr %18, align 8, !tbaa !5
  %99 = load ptr, ptr %18, align 8, !tbaa !5
  %100 = icmp eq ptr %99, null
  br i1 %100, label %101, label %102

101:                                              ; preds = %93
  store i32 0, ptr %5, align 4
  store i32 1, ptr %16, align 4
  br label %205

102:                                              ; preds = %93
  %103 = load ptr, ptr %6, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.ocb128_context, ptr %103, i32 0, i32 10
  %105 = getelementptr inbounds %struct.anon, ptr %104, i32 0, i32 4
  %106 = getelementptr inbounds [2 x i64], ptr %105, i64 0, i64 0
  %107 = load i64, ptr %106, align 8, !tbaa !21
  %108 = load ptr, ptr %18, align 8, !tbaa !5
  %109 = getelementptr inbounds [2 x i64], ptr %108, i64 0, i64 0
  %110 = load i64, ptr %109, align 8, !tbaa !21
  %111 = xor i64 %107, %110
  %112 = load ptr, ptr %6, 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 4
  %115 = getelementptr inbounds [2 x i64], ptr %114, i64 0, i64 0
  store i64 %111, ptr %115, align 8, !tbaa !21
  %116 = load ptr, ptr %6, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.ocb128_context, ptr %116, i32 0, i32 10
  %118 = getelementptr inbounds %struct.anon, ptr %117, i32 0, i32 4
  %119 = getelementptr inbounds [2 x i64], ptr %118, i64 0, i64 1
  %120 = load i64, ptr %119, align 8, !tbaa !21
  %121 = load ptr, ptr %18, align 8, !tbaa !5
  %122 = getelementptr inbounds [2 x i64], ptr %121, i64 0, i64 1
  %123 = load i64, ptr %122, align 8, !tbaa !21
  %124 = xor i64 %120, %123
  %125 = load ptr, ptr %6, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.ocb128_context, ptr %125, i32 0, i32 10
  %127 = getelementptr inbounds %struct.anon, ptr %126, i32 0, i32 4
  %128 = getelementptr inbounds [2 x i64], ptr %127, i64 0, i64 1
  store i64 %124, ptr %128, align 8, !tbaa !21
  %129 = getelementptr inbounds [16 x i8], ptr %17, i64 0, i64 0
  %130 = load ptr, ptr %7, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %129, ptr align 1 %130, i64 16, i1 false)
  %131 = load ptr, ptr %7, align 8, !tbaa !5
  %132 = getelementptr inbounds i8, ptr %131, i64 16
  store ptr %132, ptr %7, align 8, !tbaa !5
  %133 = load ptr, ptr %6, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.ocb128_context, ptr %133, i32 0, i32 10
  %135 = getelementptr inbounds %struct.anon, ptr %134, i32 0, i32 4
  %136 = getelementptr inbounds [2 x i64], ptr %135, i64 0, i64 0
  %137 = load i64, ptr %136, align 8, !tbaa !21
  %138 = getelementptr inbounds [2 x i64], ptr %17, i64 0, i64 0
  %139 = load i64, ptr %138, align 8, !tbaa !21
  %140 = xor i64 %137, %139
  %141 = getelementptr inbounds [2 x i64], ptr %17, i64 0, i64 0
  store i64 %140, ptr %141, align 8, !tbaa !21
  %142 = load ptr, ptr %6, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.ocb128_context, ptr %142, i32 0, i32 10
  %144 = getelementptr inbounds %struct.anon, ptr %143, i32 0, i32 4
  %145 = getelementptr inbounds [2 x i64], ptr %144, i64 0, i64 1
  %146 = load i64, ptr %145, align 8, !tbaa !21
  %147 = getelementptr inbounds [2 x i64], ptr %17, i64 0, i64 1
  %148 = load i64, ptr %147, align 8, !tbaa !21
  %149 = xor i64 %146, %148
  %150 = getelementptr inbounds [2 x i64], ptr %17, i64 0, i64 1
  store i64 %149, ptr %150, align 8, !tbaa !21
  %151 = load ptr, ptr %6, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.ocb128_context, ptr %151, i32 0, i32 1
  %153 = load ptr, ptr %152, align 8, !tbaa !22
  %154 = getelementptr inbounds [16 x i8], ptr %17, i64 0, i64 0
  %155 = getelementptr inbounds [16 x i8], ptr %17, i64 0, i64 0
  %156 = load ptr, ptr %6, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct.ocb128_context, ptr %156, i32 0, i32 3
  %158 = load ptr, ptr %157, align 8, !tbaa !19
  call void %153(ptr noundef %154, ptr noundef %155, ptr noundef %158)
  %159 = load ptr, ptr %6, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct.ocb128_context, ptr %159, i32 0, i32 10
  %161 = getelementptr inbounds %struct.anon, ptr %160, i32 0, i32 4
  %162 = getelementptr inbounds [2 x i64], ptr %161, i64 0, i64 0
  %163 = load i64, ptr %162, align 8, !tbaa !21
  %164 = getelementptr inbounds [2 x i64], ptr %17, i64 0, i64 0
  %165 = load i64, ptr %164, align 8, !tbaa !21
  %166 = xor i64 %163, %165
  %167 = getelementptr inbounds [2 x i64], ptr %17, i64 0, i64 0
  store i64 %166, ptr %167, align 8, !tbaa !21
  %168 = load ptr, ptr %6, 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 4
  %171 = getelementptr inbounds [2 x i64], ptr %170, i64 0, i64 1
  %172 = load i64, ptr %171, align 8, !tbaa !21
  %173 = getelementptr inbounds [2 x i64], ptr %17, i64 0, i64 1
  %174 = load i64, ptr %173, align 8, !tbaa !21
  %175 = xor i64 %172, %174
  %176 = getelementptr inbounds [2 x i64], ptr %17, i64 0, i64 1
  store i64 %175, ptr %176, align 8, !tbaa !21
  %177 = getelementptr inbounds [2 x i64], ptr %17, i64 0, i64 0
  %178 = load i64, ptr %177, align 8, !tbaa !21
  %179 = load ptr, ptr %6, align 8, !tbaa !5
  %180 = getelementptr inbounds %struct.ocb128_context, ptr %179, i32 0, i32 10
  %181 = getelementptr inbounds %struct.anon, ptr %180, i32 0, i32 5
  %182 = getelementptr inbounds [2 x i64], ptr %181, i64 0, i64 0
  %183 = load i64, ptr %182, align 8, !tbaa !21
  %184 = xor i64 %178, %183
  %185 = load ptr, ptr %6, align 8, !tbaa !5
  %186 = getelementptr inbounds %struct.ocb128_context, ptr %185, i32 0, i32 10
  %187 = getelementptr inbounds %struct.anon, ptr %186, i32 0, i32 5
  %188 = getelementptr inbounds [2 x i64], ptr %187, i64 0, i64 0
  store i64 %184, ptr %188, align 8, !tbaa !21
  %189 = getelementptr inbounds [2 x i64], ptr %17, i64 0, i64 1
  %190 = load i64, ptr %189, align 8, !tbaa !21
  %191 = load ptr, ptr %6, align 8, !tbaa !5
  %192 = getelementptr inbounds %struct.ocb128_context, ptr %191, i32 0, i32 10
  %193 = getelementptr inbounds %struct.anon, ptr %192, i32 0, i32 5
  %194 = getelementptr inbounds [2 x i64], ptr %193, i64 0, i64 1
  %195 = load i64, ptr %194, align 8, !tbaa !21
  %196 = xor i64 %190, %195
  %197 = load ptr, ptr %6, align 8, !tbaa !5
  %198 = getelementptr inbounds %struct.ocb128_context, ptr %197, i32 0, i32 10
  %199 = getelementptr inbounds %struct.anon, ptr %198, i32 0, i32 5
  %200 = getelementptr inbounds [2 x i64], ptr %199, i64 0, i64 1
  store i64 %196, ptr %200, align 8, !tbaa !21
  %201 = load ptr, ptr %8, align 8, !tbaa !5
  %202 = getelementptr inbounds [16 x i8], ptr %17, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %201, ptr align 8 %202, i64 16, i1 false)
  %203 = load ptr, ptr %8, align 8, !tbaa !5
  %204 = getelementptr inbounds i8, ptr %203, i64 16
  store ptr %204, ptr %8, align 8, !tbaa !5
  store i32 0, ptr %16, align 4
  br label %205

205:                                              ; preds = %102, %101
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  %206 = load i32, ptr %16, align 4
  switch i32 %206, label %212 [
    i32 0, label %207
  ]

207:                                              ; preds = %205
  br label %208

208:                                              ; preds = %207
  %209 = load i64, ptr %10, align 8, !tbaa !15
  %210 = add i64 %209, 1
  store i64 %210, ptr %10, align 8, !tbaa !15
  br label %89, !llvm.loop !23

211:                                              ; preds = %89
  store i32 0, ptr %16, align 4
  br label %212

212:                                              ; preds = %211, %205
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #4
  %213 = load i32, ptr %16, align 4
  switch i32 %213, label %299 [
    i32 0, label %214
  ]

214:                                              ; preds = %212
  br label %215

215:                                              ; preds = %214, %82
  %216 = load i64, ptr %9, align 8, !tbaa !9
  %217 = urem i64 %216, 16
  store i64 %217, ptr %13, align 8, !tbaa !9
  %218 = load i64, ptr %13, align 8, !tbaa !9
  %219 = icmp ugt i64 %218, 0
  br i1 %219, label %220, label %294

220:                                              ; preds = %215
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #4
  %221 = load ptr, ptr %6, align 8, !tbaa !5
  %222 = getelementptr inbounds %struct.ocb128_context, ptr %221, i32 0, i32 10
  %223 = getelementptr inbounds %struct.anon, ptr %222, i32 0, i32 4
  %224 = getelementptr inbounds [2 x i64], ptr %223, i64 0, i64 0
  %225 = load i64, ptr %224, align 8, !tbaa !21
  %226 = load ptr, ptr %6, align 8, !tbaa !5
  %227 = getelementptr inbounds %struct.ocb128_context, ptr %226, i32 0, i32 7
  %228 = getelementptr inbounds [2 x i64], ptr %227, i64 0, i64 0
  %229 = load i64, ptr %228, align 8, !tbaa !21
  %230 = xor i64 %225, %229
  %231 = load ptr, ptr %6, align 8, !tbaa !5
  %232 = getelementptr inbounds %struct.ocb128_context, ptr %231, i32 0, i32 10
  %233 = getelementptr inbounds %struct.anon, ptr %232, i32 0, i32 4
  %234 = getelementptr inbounds [2 x i64], ptr %233, i64 0, i64 0
  store i64 %230, ptr %234, align 8, !tbaa !21
  %235 = load ptr, ptr %6, align 8, !tbaa !5
  %236 = getelementptr inbounds %struct.ocb128_context, ptr %235, i32 0, i32 10
  %237 = getelementptr inbounds %struct.anon, ptr %236, i32 0, i32 4
  %238 = getelementptr inbounds [2 x i64], ptr %237, i64 0, i64 1
  %239 = load i64, ptr %238, align 8, !tbaa !21
  %240 = load ptr, ptr %6, align 8, !tbaa !5
  %241 = getelementptr inbounds %struct.ocb128_context, ptr %240, i32 0, i32 7
  %242 = getelementptr inbounds [2 x i64], ptr %241, i64 0, i64 1
  %243 = load i64, ptr %242, align 8, !tbaa !21
  %244 = xor i64 %239, %243
  %245 = load ptr, ptr %6, align 8, !tbaa !5
  %246 = getelementptr inbounds %struct.ocb128_context, ptr %245, i32 0, i32 10
  %247 = getelementptr inbounds %struct.anon, ptr %246, i32 0, i32 4
  %248 = getelementptr inbounds [2 x i64], ptr %247, i64 0, i64 1
  store i64 %244, ptr %248, align 8, !tbaa !21
  %249 = load ptr, ptr %6, align 8, !tbaa !5
  %250 = getelementptr inbounds %struct.ocb128_context, ptr %249, i32 0, i32 0
  %251 = load ptr, ptr %250, align 8, !tbaa !24
  %252 = load ptr, ptr %6, align 8, !tbaa !5
  %253 = getelementptr inbounds %struct.ocb128_context, ptr %252, i32 0, i32 10
  %254 = getelementptr inbounds %struct.anon, ptr %253, i32 0, i32 4
  %255 = getelementptr inbounds [16 x i8], ptr %254, i64 0, i64 0
  %256 = getelementptr inbounds [16 x i8], ptr %19, i64 0, i64 0
  %257 = load ptr, ptr %6, align 8, !tbaa !5
  %258 = getelementptr inbounds %struct.ocb128_context, ptr %257, i32 0, i32 2
  %259 = load ptr, ptr %258, align 8, !tbaa !25
  call void %251(ptr noundef %255, ptr noundef %256, ptr noundef %259)
  %260 = load ptr, ptr %7, align 8, !tbaa !5
  %261 = getelementptr inbounds [16 x i8], ptr %19, i64 0, i64 0
  %262 = load i64, ptr %13, align 8, !tbaa !9
  %263 = load ptr, ptr %8, align 8, !tbaa !5
  call void @ocb_block_xor(ptr noundef %260, ptr noundef %261, i64 noundef %262, ptr noundef %263)
  %264 = getelementptr inbounds [16 x i8], ptr %19, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 8 %264, i8 0, i64 16, i1 false)
  %265 = getelementptr inbounds [16 x i8], ptr %19, i64 0, i64 0
  %266 = load ptr, ptr %8, align 8, !tbaa !5
  %267 = load i64, ptr %13, align 8, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %265, ptr align 1 %266, i64 %267, i1 false)
  %268 = load i64, ptr %13, align 8, !tbaa !9
  %269 = getelementptr inbounds [16 x i8], ptr %19, i64 0, i64 %268
  store i8 -128, ptr %269, align 1, !tbaa !21
  %270 = getelementptr inbounds [2 x i64], ptr %19, i64 0, i64 0
  %271 = load i64, ptr %270, align 8, !tbaa !21
  %272 = load ptr, ptr %6, align 8, !tbaa !5
  %273 = getelementptr inbounds %struct.ocb128_context, ptr %272, i32 0, i32 10
  %274 = getelementptr inbounds %struct.anon, ptr %273, i32 0, i32 5
  %275 = getelementptr inbounds [2 x i64], ptr %274, i64 0, i64 0
  %276 = load i64, ptr %275, align 8, !tbaa !21
  %277 = xor i64 %271, %276
  %278 = load ptr, ptr %6, align 8, !tbaa !5
  %279 = getelementptr inbounds %struct.ocb128_context, ptr %278, i32 0, i32 10
  %280 = getelementptr inbounds %struct.anon, ptr %279, i32 0, i32 5
  %281 = getelementptr inbounds [2 x i64], ptr %280, i64 0, i64 0
  store i64 %277, ptr %281, align 8, !tbaa !21
  %282 = getelementptr inbounds [2 x i64], ptr %19, i64 0, i64 1
  %283 = load i64, ptr %282, align 8, !tbaa !21
  %284 = load ptr, ptr %6, align 8, !tbaa !5
  %285 = getelementptr inbounds %struct.ocb128_context, ptr %284, i32 0, i32 10
  %286 = getelementptr inbounds %struct.anon, ptr %285, i32 0, i32 5
  %287 = getelementptr inbounds [2 x i64], ptr %286, i64 0, i64 1
  %288 = load i64, ptr %287, align 8, !tbaa !21
  %289 = xor i64 %283, %288
  %290 = load ptr, ptr %6, align 8, !tbaa !5
  %291 = getelementptr inbounds %struct.ocb128_context, ptr %290, i32 0, i32 10
  %292 = getelementptr inbounds %struct.anon, ptr %291, i32 0, i32 5
  %293 = getelementptr inbounds [2 x i64], ptr %292, i64 0, i64 1
  store i64 %289, ptr %293, align 8, !tbaa !21
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #4
  br label %294

294:                                              ; preds = %220, %215
  %295 = load i64, ptr %11, align 8, !tbaa !15
  %296 = load ptr, ptr %6, align 8, !tbaa !5
  %297 = getelementptr inbounds %struct.ocb128_context, ptr %296, i32 0, i32 10
  %298 = getelementptr inbounds %struct.anon, ptr %297, i32 0, i32 1
  store i64 %295, ptr %298, align 8, !tbaa !11
  store i32 1, ptr %5, align 4
  store i32 1, ptr %16, align 4
  br label %299

299:                                              ; preds = %294, %212, %80
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, 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
  %300 = load i32, ptr %5, align 4
  ret i32 %300
}

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 104}
!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 = !{!12, !6, i64 32}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!12, !6, i64 24}
!20 = !{!12, !6, i64 88}
!21 = !{!7, !7, i64 0}
!22 = !{!12, !6, i64 8}
!23 = distinct !{!23, !18}
!24 = !{!12, !6, i64 0}
!25 = !{!12, !6, i64 16}


; 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
declare hidden void @ocb_block_xor(ptr noundef, ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #3

; 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

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @CRYPTO_ocb128_decrypt(ptr noundef %0, ptr noundef %1, ptr noundef %2, i64 noundef %3) local_unnamed_addr #3 {
  %5 = alloca %union.OCB_BLOCK, align 16
  %6 = alloca %union.OCB_BLOCK, align 16
  %7 = lshr i64 %3, 4
  %8 = getelementptr inbounds i8, ptr %0, i64 104
  %9 = load i64, ptr %8, align 8, !tbaa !5
  %10 = add i64 %9, %7
  %.not = icmp ult i64 %3, 16
  br i1 %.not, label %27, label %11

11:                                               ; preds = %4
  %12 = getelementptr inbounds i8, ptr %0, i64 32
  %13 = load ptr, ptr %12, align 8, !tbaa !13
  %.not93 = icmp eq ptr %13, null
  br i1 %.not93, label %27, label %.preheader

.preheader:                                       ; preds = %11
  %.not96104 = icmp ult i64 %10, 2
  %14 = tail call range(i64 0, 65) i64 @llvm.ctlz.i64(i64 %10, i1 true)
  %15 = xor i64 %14, 63
  %.080.lcssa = select i1 %.not96104, i64 0, i64 %15
  %16 = tail call ptr @ocb_lookup_l(ptr noundef nonnull %0, i64 noundef %.080.lcssa)
  %.not97 = icmp eq ptr %16, null
  br i1 %.not97, label %.critedge, label %17

17:                                               ; preds = %.preheader
  %18 = load ptr, ptr %12, align 8, !tbaa !13
  %19 = getelementptr inbounds i8, ptr %0, i64 24
  %20 = load ptr, ptr %19, align 8, !tbaa !14
  %21 = load i64, ptr %8, align 8, !tbaa !5
  %22 = add i64 %21, 1
  %23 = getelementptr inbounds i8, ptr %0, i64 144
  %24 = getelementptr inbounds i8, ptr %0, i64 88
  %25 = load ptr, ptr %24, align 8, !tbaa !15
  %26 = getelementptr inbounds i8, ptr %0, i64 160
  tail call void %18(ptr noundef %1, ptr noundef %2, i64 noundef %7, ptr noundef %20, i64 noundef %22, ptr noundef nonnull %23, ptr noundef %25, ptr noundef nonnull %26) #5
  br label %60

27:                                               ; preds = %11, %4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #5
  %.089107 = add i64 %9, 1
  %.not94108 = icmp ugt i64 %.089107, %10
  br i1 %.not94108, label %.thread101, label %.lr.ph113

.lr.ph113:                                        ; preds = %27
  %28 = getelementptr inbounds i8, ptr %0, i64 144
  %29 = getelementptr inbounds i8, ptr %0, i64 152
  %30 = getelementptr inbounds i8, ptr %5, i64 8
  %31 = getelementptr inbounds i8, ptr %0, i64 8
  %32 = getelementptr inbounds i8, ptr %0, i64 24
  %33 = getelementptr inbounds i8, ptr %0, i64 160
  br label %34

.thread101:                                       ; preds = %38, %27
  %.085.lcssa = phi ptr [ %2, %27 ], [ %58, %38 ]
  %.081.lcssa = phi ptr [ %1, %27 ], [ %46, %38 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #5
  br label %60

34:                                               ; preds = %.lr.ph113, %38
  %.089111 = phi i64 [ %.089107, %.lr.ph113 ], [ %.089, %38 ]
  %.081110 = phi ptr [ %1, %.lr.ph113 ], [ %46, %38 ]
  %.085109 = phi ptr [ %2, %.lr.ph113 ], [ %58, %38 ]
  %35 = call i32 @ocb_ntz(i64 noundef %.089111)
  %36 = zext i32 %35 to i64
  %37 = call ptr @ocb_lookup_l(ptr noundef nonnull %0, i64 noundef %36)
  %.not95 = icmp eq ptr %37, null
  br i1 %.not95, label %59, label %38

38:                                               ; preds = %34
  %39 = load i64, ptr %28, align 8, !tbaa !16
  %40 = load i64, ptr %37, align 8, !tbaa !16
  %41 = xor i64 %40, %39
  store i64 %41, ptr %28, align 8, !tbaa !16
  %42 = load i64, ptr %29, align 8, !tbaa !16
  %43 = getelementptr inbounds i8, ptr %37, i64 8
  %44 = load i64, ptr %43, align 8, !tbaa !16
  %45 = xor i64 %44, %42
  store i64 %45, ptr %29, align 8, !tbaa !16
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %5, ptr noundef nonnull align 1 dereferenceable(16) %.081110, i64 16, i1 false)
  %46 = getelementptr inbounds i8, ptr %.081110, i64 16
  %47 = load i64, ptr %5, align 16, !tbaa !16
  %48 = xor i64 %47, %41
  store i64 %48, ptr %5, align 16, !tbaa !16
  %49 = load i64, ptr %30, align 8, !tbaa !16
  %50 = xor i64 %49, %45
  store i64 %50, ptr %30, align 8, !tbaa !16
  %51 = load ptr, ptr %31, align 8, !tbaa !17
  %52 = load ptr, ptr %32, align 8, !tbaa !14
  call void %51(ptr noundef nonnull %5, ptr noundef nonnull %5, ptr noundef %52) #5
  %53 = load <2 x i64>, ptr %28, align 8, !tbaa !16
  %54 = load <2 x i64>, ptr %5, align 16, !tbaa !16
  %55 = xor <2 x i64> %54, %53
  store <2 x i64> %55, ptr %5, align 16, !tbaa !16
  %56 = load <2 x i64>, ptr %33, align 8, !tbaa !16
  %57 = xor <2 x i64> %56, %55
  store <2 x i64> %57, ptr %33, align 8, !tbaa !16
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(16) %.085109, ptr noundef nonnull align 16 dereferenceable(16) %5, i64 16, i1 false)
  %58 = getelementptr inbounds i8, ptr %.085109, i64 16
  %.089 = add i64 %.089111, 1
  %.not94 = icmp ugt i64 %.089, %10
  br i1 %.not94, label %.thread101, label %34, !llvm.loop !18

59:                                               ; preds = %34
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #5
  br label %.critedge

60:                                               ; preds = %.thread101, %17
  %.388 = phi ptr [ %2, %17 ], [ %.085.lcssa, %.thread101 ]
  %.384 = phi ptr [ %1, %17 ], [ %.081.lcssa, %.thread101 ]
  %61 = and i64 %3, 15
  %.not98 = icmp eq i64 %61, 0
  br i1 %.not98, label %76, label %62

62:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #5
  %63 = getelementptr inbounds i8, ptr %0, i64 144
  %64 = getelementptr inbounds i8, ptr %0, i64 56
  %65 = load <2 x i64>, ptr %63, align 8, !tbaa !16
  %66 = load <2 x i64>, ptr %64, align 8, !tbaa !16
  %67 = xor <2 x i64> %66, %65
  store <2 x i64> %67, ptr %63, align 8, !tbaa !16
  %68 = load ptr, ptr %0, align 8, !tbaa !20
  %69 = getelementptr inbounds i8, ptr %0, i64 16
  %70 = load ptr, ptr %69, align 8, !tbaa !21
  call void %68(ptr noundef nonnull %63, ptr noundef nonnull %6, ptr noundef %70) #5
  call void @ocb_block_xor(ptr noundef %.384, ptr noundef nonnull %6, i64 noundef %61, ptr noundef %.388)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %6, i8 0, i64 16, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 16 %6, ptr align 1 %.388, i64 %61, i1 false)
  %71 = getelementptr inbounds [16 x i8], ptr %6, i64 0, i64 %61
  store i8 -128, ptr %71, align 1, !tbaa !16
  %72 = getelementptr inbounds i8, ptr %0, i64 160
  %73 = load <2 x i64>, ptr %6, align 16, !tbaa !16
  %74 = load <2 x i64>, ptr %72, align 8, !tbaa !16
  %75 = xor <2 x i64> %74, %73
  store <2 x i64> %75, ptr %72, align 8, !tbaa !16
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #5
  br label %76

76:                                               ; preds = %62, %60
  store i64 %10, ptr %8, align 8, !tbaa !5
  br label %.critedge

.critedge:                                        ; preds = %59, %.preheader, %76
  %.4 = phi i32 [ 1, %76 ], [ 0, %59 ], [ 0, %.preheader ]
  ret i32 %.4
}

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.ctlz.i64(i64, i1 immarg) #4

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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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 104}
!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 = !{!6, !7, i64 32}
!14 = !{!6, !7, i64 24}
!15 = !{!6, !7, i64 88}
!16 = !{!8, !8, i64 0}
!17 = !{!6, !7, i64 8}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = !{!6, !7, i64 0}
!21 = !{!6, !7, i64 16}


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