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

; 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.mask_x4_uint32_t = type { i32, i32, i32, i32 }

; Function Attrs: nounwind uwtable
define dso_local i32 @tiny_jambu_128_masked_aead_encrypt(ptr noundef %0, ptr noundef %1, ptr noundef %2, i64 noundef %3, ptr noundef %4, i64 noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8) #0 {
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i64, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i64, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca [4 x %struct.mask_x4_uint32_t], align 16
  %20 = alloca [4 x %struct.mask_x4_uint32_t], align 16
  store ptr %0, ptr %10, align 8, !tbaa !5
  store ptr %1, ptr %11, align 8, !tbaa !5
  store ptr %2, ptr %12, align 8, !tbaa !5
  store i64 %3, ptr %13, align 8, !tbaa !9
  store ptr %4, ptr %14, align 8, !tbaa !5
  store i64 %5, ptr %15, align 8, !tbaa !9
  store ptr %6, ptr %16, align 8, !tbaa !5
  store ptr %7, ptr %17, align 8, !tbaa !5
  store ptr %8, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 64, ptr %19) #3
  call void @llvm.lifetime.start.p0(i64 64, ptr %20) #3
  %21 = load ptr, ptr %16, align 8, !tbaa !5
  %22 = load i64, ptr %13, align 8, !tbaa !9
  %23 = add i64 %22, 8
  %24 = load ptr, ptr %11, align 8, !tbaa !5
  store i64 %23, ptr %24, align 8, !tbaa !9
  call void @aead_random_init()
  br label %25

25:                                               ; preds = %9
  %26 = call i32 @aead_random_generate_32()
  %27 = getelementptr inbounds [4 x %struct.mask_x4_uint32_t], ptr %20, i64 0, i64 0
  %28 = getelementptr inbounds %struct.mask_x4_uint32_t, ptr %27, i32 0, i32 1
  store i32 %26, ptr %28, align 4, !tbaa !11
  %29 = call i32 @aead_random_generate_32()
  %30 = getelementptr inbounds [4 x %struct.mask_x4_uint32_t], ptr %20, i64 0, i64 0
  %31 = getelementptr inbounds %struct.mask_x4_uint32_t, ptr %30, i32 0, i32 2
  store i32 %29, ptr %31, align 8, !tbaa !14
  %32 = call i32 @aead_random_generate_32()
  %33 = getelementptr inbounds [4 x %struct.mask_x4_uint32_t], ptr %20, i64 0, i64 0
  %34 = getelementptr inbounds %struct.mask_x4_uint32_t, ptr %33, i32 0, i32 3
  store i32 %32, ptr %34, align 4, !tbaa !15
  %35 = load ptr, ptr %18, align 8, !tbaa !5
  %36 = getelementptr inbounds i8, ptr %35, i64 3
  %37 = load i8, ptr %36, align 1, !tbaa !16
  %38 = zext i8 %37 to i32
  %39 = shl i32 %38, 24
  %40 = load ptr, ptr %18, align 8, !tbaa !5
  %41 = getelementptr inbounds i8, ptr %40, i64 2
  %42 = load i8, ptr %41, align 1, !tbaa !16
  %43 = zext i8 %42 to i32
  %44 = shl i32 %43, 16
  %45 = or i32 %39, %44
  %46 = load ptr, ptr %18, align 8, !tbaa !5
  %47 = getelementptr inbounds i8, ptr %46, i64 1
  %48 = load i8, ptr %47, align 1, !tbaa !16
  %49 = zext i8 %48 to i32
  %50 = shl i32 %49, 8
  %51 = or i32 %45, %50
  %52 = load ptr, ptr %18, align 8, !tbaa !5
  %53 = getelementptr inbounds i8, ptr %52, i64 0
  %54 = load i8, ptr %53, align 1, !tbaa !16
  %55 = zext i8 %54 to i32
  %56 = or i32 %51, %55
  %57 = getelementptr inbounds [4 x %struct.mask_x4_uint32_t], ptr %20, i64 0, i64 0
  %58 = getelementptr inbounds %struct.mask_x4_uint32_t, ptr %57, i32 0, i32 1
  %59 = load i32, ptr %58, align 4, !tbaa !11
  %60 = xor i32 %56, %59
  %61 = getelementptr inbounds [4 x %struct.mask_x4_uint32_t], ptr %20, i64 0, i64 0
  %62 = getelementptr inbounds %struct.mask_x4_uint32_t, ptr %61, i32 0, i32 2
  %63 = load i32, ptr %62, align 8, !tbaa !14
  %64 = xor i32 %60, %63
  %65 = getelementptr inbounds [4 x %struct.mask_x4_uint32_t], ptr %20, i64 0, i64 0
  %66 = getelementptr inbounds %struct.mask_x4_uint32_t, ptr %65, i32 0, i32 3
  %67 = load i32, ptr %66, align 4, !tbaa !15
  %68 = xor i32 %64, %67
  %69 = getelementptr inbounds [4 x %struct.mask_x4_uint32_t], ptr %20, i64 0, i64 0
  %70 = getelementptr inbounds %struct.mask_x4_uint32_t, ptr %69, i32 0, i32 0
  store i32 %68, ptr %70, align 16, !tbaa !17
  br label %71

71:                                               ; preds = %25
  br label %72

72:                                               ; preds = %71
  br label %73

73:                                               ; preds = %72
  %74 = call i32 @aead_random_generate_32()
  %75 = getelementptr inbounds [4 x %struct.mask_x4_uint32_t], ptr %20, i64 0, i64 1
  %76 = getelementptr inbounds %struct.mask_x4_uint32_t, ptr %75, i32 0, i32 1
  store i32 %74, ptr %76, align 4, !tbaa !11
  %77 = call i32 @aead_random_generate_32()
  %78 = getelementptr inbounds [4 x %struct.mask_x4_uint32_t], ptr %20, i64 0, i64 1
  %79 = getelementptr inbounds %struct.mask_x4_uint32_t, ptr %78, i32 0, i32 2
  store i32 %77, ptr %79, align 8, !tbaa !14
  %80 = call i32 @aead_random_generate_32()
  %81 = getelementptr inbounds [4 x %struct.mask_x4_uint32_t], ptr %20, i64 0, i64 1
  %82 = getelementptr inbounds %struct.mask_x4_uint32_t, ptr %81, i32 0, i32 3
  store i32 %80, ptr %82, align 4, !tbaa !15
  %83 = load ptr, ptr %18, align 8, !tbaa !5
  %84 = getelementptr inbounds i8, ptr %83, i64 4
  %85 = getelementptr inbounds i8, ptr %84, i64 3
  %86 = load i8, ptr %85, align 1, !tbaa !16
  %87 = zext i8 %86 to i32
  %88 = shl i32 %87, 24
  %89 = load ptr, ptr %18, align 8, !tbaa !5
  %90 = getelementptr inbounds i8, ptr %89, i64 4
  %91 = getelementptr inbounds i8, ptr %90, i64 2
  %92 = load i8, ptr %91, align 1, !tbaa !16
  %93 = zext i8 %92 to i32
  %94 = shl i32 %93, 16
  %95 = or i32 %88, %94
  %96 = load ptr, ptr %18, align 8, !tbaa !5
  %97 = getelementptr inbounds i8, ptr %96, i64 4
  %98 = getelementptr inbounds i8, ptr %97, i64 1
  %99 = load i8, ptr %98, align 1, !tbaa !16
  %100 = zext i8 %99 to i32
  %101 = shl i32 %100, 8
  %102 = or i32 %95, %101
  %103 = load ptr, ptr %18, align 8, !tbaa !5
  %104 = getelementptr inbounds i8, ptr %103, i64 4
  %105 = getelementptr inbounds i8, ptr %104, i64 0
  %106 = load i8, ptr %105, align 1, !tbaa !16
  %107 = zext i8 %106 to i32
  %108 = or i32 %102, %107
  %109 = getelementptr inbounds [4 x %struct.mask_x4_uint32_t], ptr %20, i64 0, i64 1
  %110 = getelementptr inbounds %struct.mask_x4_uint32_t, ptr %109, i32 0, i32 1
  %111 = load i32, ptr %110, align 4, !tbaa !11
  %112 = xor i32 %108, %111
  %113 = getelementptr inbounds [4 x %struct.mask_x4_uint32_t], ptr %20, i64 0, i64 1
  %114 = getelementptr inbounds %struct.mask_x4_uint32_t, ptr %113, i32 0, i32 2
  %115 = load i32, ptr %114, align 8, !tbaa !14
  %116 = xor i32 %112, %115
  %117 = getelementptr inbounds [4 x %struct.mask_x4_uint32_t], ptr %20, i64 0, i64 1
  %118 = getelementptr inbounds %struct.mask_x4_uint32_t, ptr %117, i32 0, i32 3
  %119 = load i32, ptr %118, align 4, !tbaa !15
  %120 = xor i32 %116, %119
  %121 = getelementptr inbounds [4 x %struct.mask_x4_uint32_t], ptr %20, i64 0, i64 1
  %122 = getelementptr inbounds %struct.mask_x4_uint32_t, ptr %121, i32 0, i32 0
  store i32 %120, ptr %122, align 16, !tbaa !17
  br label %123

123:                                              ; preds = %73
  br label %124

124:                                              ; preds = %123
  br label %125

125:                                              ; preds = %124
  %126 = call i32 @aead_random_generate_32()
  %127 = getelementptr inbounds [4 x %struct.mask_x4_uint32_t], ptr %20, i64 0, i64 2
  %128 = getelementptr inbounds %struct.mask_x4_uint32_t, ptr %127, i32 0, i32 1
  store i32 %126, ptr %128, align 4, !tbaa !11
  %129 = call i32 @aead_random_generate_32()
  %130 = getelementptr inbounds [4 x %struct.mask_x4_uint32_t], ptr %20, i64 0, i64 2
  %131 = getelementptr inbounds %struct.mask_x4_uint32_t, ptr %130, i32 0, i32 2
  store i32 %129, ptr %131, align 8, !tbaa !14
  %132 = call i32 @aead_random_generate_32()
  %133 = getelementptr inbounds [4 x %struct.mask_x4_uint32_t], ptr %20, i64 0, i64 2
  %134 = getelementptr inbounds %struct.mask_x4_uint32_t, ptr %133, i32 0, i32 3
  store i32 %132, ptr %134, align 4, !tbaa !15
  %135 = load ptr, ptr %18, align 8, !tbaa !5
  %136 = getelementptr inbounds i8, ptr %135, i64 8
  %137 = getelementptr inbounds i8, ptr %136, i64 3
  %138 = load i8, ptr %137, align 1, !tbaa !16
  %139 = zext i8 %138 to i32
  %140 = shl i32 %139, 24
  %141 = load ptr, ptr %18, align 8, !tbaa !5
  %142 = getelementptr inbounds i8, ptr %141, i64 8
  %143 = getelementptr inbounds i8, ptr %142, i64 2
  %144 = load i8, ptr %143, align 1, !tbaa !16
  %145 = zext i8 %144 to i32
  %146 = shl i32 %145, 16
  %147 = or i32 %140, %146
  %148 = load ptr, ptr %18, align 8, !tbaa !5
  %149 = getelementptr inbounds i8, ptr %148, i64 8
  %150 = getelementptr inbounds i8, ptr %149, i64 1
  %151 = load i8, ptr %150, align 1, !tbaa !16
  %152 = zext i8 %151 to i32
  %153 = shl i32 %152, 8
  %154 = or i32 %147, %153
  %155 = load ptr, ptr %18, align 8, !tbaa !5
  %156 = getelementptr inbounds i8, ptr %155, i64 8
  %157 = getelementptr inbounds i8, ptr %156, i64 0
  %158 = load i8, ptr %157, align 1, !tbaa !16
  %159 = zext i8 %158 to i32
  %160 = or i32 %154, %159
  %161 = getelementptr inbounds [4 x %struct.mask_x4_uint32_t], ptr %20, i64 0, i64 2
  %162 = getelementptr inbounds %struct.mask_x4_uint32_t, ptr %161, i32 0, i32 1
  %163 = load i32, ptr %162, align 4, !tbaa !11
  %164 = xor i32 %160, %163
  %165 = getelementptr inbounds [4 x %struct.mask_x4_uint32_t], ptr %20, i64 0, i64 2
  %166 = getelementptr inbounds %struct.mask_x4_uint32_t, ptr %165, i32 0, i32 2
  %167 = load i32, ptr %166, align 8, !tbaa !14
  %168 = xor i32 %164, %167
  %169 = getelementptr inbounds [4 x %struct.mask_x4_uint32_t], ptr %20, i64 0, i64 2
  %170 = getelementptr inbounds %struct.mask_x4_uint32_t, ptr %169, i32 0, i32 3
  %171 = load i32, ptr %170, align 4, !tbaa !15
  %172 = xor i32 %168, %171
  %173 = getelementptr inbounds [4 x %struct.mask_x4_uint32_t], ptr %20, i64 0, i64 2
  %174 = getelementptr inbounds %struct.mask_x4_uint32_t, ptr %173, i32 0, i32 0
  store i32 %172, ptr %174, align 16, !tbaa !17
  br label %175

175:                                              ; preds = %125
  br label %176

176:                                              ; preds = %175
  br label %177

177:                                              ; preds = %176
  %178 = call i32 @aead_random_generate_32()
  %179 = getelementptr inbounds [4 x %struct.mask_x4_uint32_t], ptr %20, i64 0, i64 3
  %180 = getelementptr inbounds %struct.mask_x4_uint32_t, ptr %179, i32 0, i32 1
  store i32 %178, ptr %180, align 4, !tbaa !11
  %181 = call i32 @aead_random_generate_32()
  %182 = getelementptr inbounds [4 x %struct.mask_x4_uint32_t], ptr %20, i64 0, i64 3
  %183 = getelementptr inbounds %struct.mask_x4_uint32_t, ptr %182, i32 0, i32 2
  store i32 %181, ptr %183, align 8, !tbaa !14
  %184 = call i32 @aead_random_generate_32()
  %185 = getelementptr inbounds [4 x %struct.mask_x4_uint32_t], ptr %20, i64 0, i64 3
  %186 = getelementptr inbounds %struct.mask_x4_uint32_t, ptr %185, i32 0, i32 3
  store i32 %184, ptr %186, align 4, !tbaa !15
  %187 = load ptr, ptr %18, align 8, !tbaa !5
  %188 = getelementptr inbounds i8, ptr %187, i64 12
  %189 = getelementptr inbounds i8, ptr %188, i64 3
  %190 = load i8, ptr %189, align 1, !tbaa !16
  %191 = zext i8 %190 to i32
  %192 = shl i32 %191, 24
  %193 = load ptr, ptr %18, align 8, !tbaa !5
  %194 = getelementptr inbounds i8, ptr %193, i64 12
  %195 = getelementptr inbounds i8, ptr %194, i64 2
  %196 = load i8, ptr %195, align 1, !tbaa !16
  %197 = zext i8 %196 to i32
  %198 = shl i32 %197, 16
  %199 = or i32 %192, %198
  %200 = load ptr, ptr %18, align 8, !tbaa !5
  %201 = getelementptr inbounds i8, ptr %200, i64 12
  %202 = getelementptr inbounds i8, ptr %201, i64 1
  %203 = load i8, ptr %202, align 1, !tbaa !16
  %204 = zext i8 %203 to i32
  %205 = shl i32 %204, 8
  %206 = or i32 %199, %205
  %207 = load ptr, ptr %18, align 8, !tbaa !5
  %208 = getelementptr inbounds i8, ptr %207, i64 12
  %209 = getelementptr inbounds i8, ptr %208, i64 0
  %210 = load i8, ptr %209, align 1, !tbaa !16
  %211 = zext i8 %210 to i32
  %212 = or i32 %206, %211
  %213 = getelementptr inbounds [4 x %struct.mask_x4_uint32_t], ptr %20, i64 0, i64 3
  %214 = getelementptr inbounds %struct.mask_x4_uint32_t, ptr %213, i32 0, i32 1
  %215 = load i32, ptr %214, align 4, !tbaa !11
  %216 = xor i32 %212, %215
  %217 = getelementptr inbounds [4 x %struct.mask_x4_uint32_t], ptr %20, i64 0, i64 3
  %218 = getelementptr inbounds %struct.mask_x4_uint32_t, ptr %217, i32 0, i32 2
  %219 = load i32, ptr %218, align 8, !tbaa !14
  %220 = xor i32 %216, %219
  %221 = getelementptr inbounds [4 x %struct.mask_x4_uint32_t], ptr %20, i64 0, i64 3
  %222 = getelementptr inbounds %struct.mask_x4_uint32_t, ptr %221, i32 0, i32 3
  %223 = load i32, ptr %222, align 4, !tbaa !15
  %224 = xor i32 %220, %223
  %225 = getelementptr inbounds [4 x %struct.mask_x4_uint32_t], ptr %20, i64 0, i64 3
  %226 = getelementptr inbounds %struct.mask_x4_uint32_t, ptr %225, i32 0, i32 0
  store i32 %224, ptr %226, align 16, !tbaa !17
  br label %227

227:                                              ; preds = %177
  br label %228

228:                                              ; preds = %227
  %229 = getelementptr inbounds [4 x %struct.mask_x4_uint32_t], ptr %19, i64 0, i64 0
  %230 = getelementptr inbounds [4 x %struct.mask_x4_uint32_t], ptr %20, i64 0, i64 0
  %231 = load ptr, ptr %17, align 8, !tbaa !5
  call void @tiny_jambu_setup_masked(ptr noundef %229, ptr noundef %230, i32 noundef 4, i32 noundef 8, ptr noundef %231)
  %232 = getelementptr inbounds [4 x %struct.mask_x4_uint32_t], ptr %19, i64 0, i64 0
  %233 = getelementptr inbounds [4 x %struct.mask_x4_uint32_t], ptr %20, i64 0, i64 0
  %234 = load ptr, ptr %14, align 8, !tbaa !5
  %235 = load i64, ptr %15, align 8, !tbaa !9
  call void @tiny_jambu_process_ad_masked(ptr noundef %232, ptr noundef %233, i32 noundef 4, ptr noundef %234, i64 noundef %235)
  %236 = getelementptr inbounds [4 x %struct.mask_x4_uint32_t], ptr %19, i64 0, i64 0
  %237 = getelementptr inbounds [4 x %struct.mask_x4_uint32_t], ptr %20, i64 0, i64 0
  %238 = load ptr, ptr %10, align 8, !tbaa !5
  %239 = load ptr, ptr %12, align 8, !tbaa !5
  %240 = load i64, ptr %13, align 8, !tbaa !9
  call void @tiny_jambu_encrypt_masked(ptr noundef %236, ptr noundef %237, i32 noundef 4, i32 noundef 8, ptr noundef %238, ptr noundef %239, i64 noundef %240)
  %241 = getelementptr inbounds [4 x %struct.mask_x4_uint32_t], ptr %19, i64 0, i64 0
  %242 = getelementptr inbounds [4 x %struct.mask_x4_uint32_t], ptr %20, i64 0, i64 0
  %243 = load ptr, ptr %10, align 8, !tbaa !5
  %244 = load i64, ptr %13, align 8, !tbaa !9
  %245 = getelementptr inbounds i8, ptr %243, i64 %244
  call void @tiny_jambu_generate_tag_masked(ptr noundef %241, ptr noundef %242, i32 noundef 4, i32 noundef 8, ptr noundef %245)
  call void @llvm.lifetime.end.p0(i64 64, ptr %20) #3
  call void @llvm.lifetime.end.p0(i64 64, ptr %19) #3
  ret i32 0
}

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

declare void @aead_random_init() #2

declare i32 @aead_random_generate_32() #2

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

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

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

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

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

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, !13, i64 4}
!12 = !{!"", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12}
!13 = !{!"int", !7, i64 0}
!14 = !{!12, !13, i64 8}
!15 = !{!12, !13, i64 12}
!16 = !{!7, !7, i64 0}
!17 = !{!12, !13, i64 0}


; 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.mask_x4_uint32_t = type { i32, i32, i32, i32 }

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @tiny_jambu_128_masked_aead_encrypt(ptr noundef %0, ptr nocapture noundef writeonly %1, ptr noundef %2, i64 noundef %3, ptr noundef %4, i64 noundef %5, ptr nocapture noundef readnone %6, ptr noundef %7, ptr nocapture noundef readonly %8) local_unnamed_addr #0 {
  %10 = alloca [4 x %struct.mask_x4_uint32_t], align 16
  %11 = alloca [4 x %struct.mask_x4_uint32_t], align 16
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %10) #3
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %11) #3
  %12 = add i64 %3, 8
  store i64 %12, ptr %1, align 8, !tbaa !5
  tail call void @aead_random_init() #3
  %13 = tail call i32 @aead_random_generate_32() #3
  %14 = getelementptr inbounds i8, ptr %11, i64 4
  store i32 %13, ptr %14, align 4, !tbaa !9
  %15 = tail call i32 @aead_random_generate_32() #3
  %16 = getelementptr inbounds i8, ptr %11, i64 8
  store i32 %15, ptr %16, align 8, !tbaa !12
  %17 = tail call i32 @aead_random_generate_32() #3
  %18 = getelementptr inbounds i8, ptr %11, i64 12
  store i32 %17, ptr %18, align 4, !tbaa !13
  %19 = load i32, ptr %8, align 1
  %20 = xor i32 %19, %13
  %21 = xor i32 %20, %17
  %22 = xor i32 %21, %15
  store i32 %22, ptr %11, align 16, !tbaa !14
  %23 = tail call i32 @aead_random_generate_32() #3
  %24 = getelementptr inbounds i8, ptr %11, i64 16
  %25 = getelementptr inbounds i8, ptr %11, i64 20
  store i32 %23, ptr %25, align 4, !tbaa !9
  %26 = tail call i32 @aead_random_generate_32() #3
  %27 = getelementptr inbounds i8, ptr %11, i64 24
  store i32 %26, ptr %27, align 8, !tbaa !12
  %28 = tail call i32 @aead_random_generate_32() #3
  %29 = getelementptr inbounds i8, ptr %11, i64 28
  store i32 %28, ptr %29, align 4, !tbaa !13
  %30 = getelementptr inbounds i8, ptr %8, i64 4
  %31 = load i32, ptr %30, align 1
  %32 = xor i32 %31, %23
  %33 = xor i32 %32, %26
  %34 = xor i32 %33, %28
  store i32 %34, ptr %24, align 16, !tbaa !14
  %35 = tail call i32 @aead_random_generate_32() #3
  %36 = getelementptr inbounds i8, ptr %11, i64 32
  %37 = getelementptr inbounds i8, ptr %11, i64 36
  store i32 %35, ptr %37, align 4, !tbaa !9
  %38 = tail call i32 @aead_random_generate_32() #3
  %39 = getelementptr inbounds i8, ptr %11, i64 40
  store i32 %38, ptr %39, align 8, !tbaa !12
  %40 = tail call i32 @aead_random_generate_32() #3
  %41 = getelementptr inbounds i8, ptr %11, i64 44
  store i32 %40, ptr %41, align 4, !tbaa !13
  %42 = getelementptr inbounds i8, ptr %8, i64 8
  %43 = load i32, ptr %42, align 1
  %44 = xor i32 %43, %35
  %45 = xor i32 %44, %38
  %46 = xor i32 %45, %40
  store i32 %46, ptr %36, align 16, !tbaa !14
  %47 = tail call i32 @aead_random_generate_32() #3
  %48 = getelementptr inbounds i8, ptr %11, i64 48
  %49 = getelementptr inbounds i8, ptr %11, i64 52
  store i32 %47, ptr %49, align 4, !tbaa !9
  %50 = tail call i32 @aead_random_generate_32() #3
  %51 = getelementptr inbounds i8, ptr %11, i64 56
  store i32 %50, ptr %51, align 8, !tbaa !12
  %52 = tail call i32 @aead_random_generate_32() #3
  %53 = getelementptr inbounds i8, ptr %11, i64 60
  store i32 %52, ptr %53, align 4, !tbaa !13
  %54 = getelementptr inbounds i8, ptr %8, i64 12
  %55 = load i32, ptr %54, align 1
  %56 = xor i32 %55, %47
  %57 = xor i32 %56, %50
  %58 = xor i32 %57, %52
  store i32 %58, ptr %48, align 16, !tbaa !14
  call void @tiny_jambu_setup_masked(ptr noundef nonnull %10, ptr noundef nonnull %11, i32 noundef 4, i32 noundef 8, ptr noundef %7)
  call void @tiny_jambu_process_ad_masked(ptr noundef nonnull %10, ptr noundef nonnull %11, i32 noundef 4, ptr noundef %4, i64 noundef %5)
  call void @tiny_jambu_encrypt_masked(ptr noundef nonnull %10, ptr noundef nonnull %11, i32 noundef 4, i32 noundef 8, ptr noundef %0, ptr noundef %2, i64 noundef %3)
  %59 = getelementptr inbounds i8, ptr %0, i64 %3
  call void @tiny_jambu_generate_tag_masked(ptr noundef nonnull %10, ptr noundef nonnull %11, i32 noundef 4, i32 noundef 8, ptr noundef %59)
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %11) #3
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %10) #3
  ret i32 0
}

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

declare void @aead_random_init() local_unnamed_addr #2

declare i32 @aead_random_generate_32() local_unnamed_addr #2

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

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

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

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

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

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 = !{!10, !11, i64 4}
!10 = !{!"", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12}
!11 = !{!"int", !7, i64 0}
!12 = !{!10, !11, i64 8}
!13 = !{!10, !11, i64 12}
!14 = !{!10, !11, i64 0}


; Effective O3 passes: AggressiveInstCombinePass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass