; LLVM IR from guanzhi/GmSSL :: src (ghash)

; 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.GHASH_CTX = type { [2 x i64], [2 x i64], i64, i64, [16 x i8], i64 }

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

declare void @gf128_from_bytes(ptr noundef, ptr noundef) #1

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

declare void @gf128_add(ptr noundef, ptr noundef, ptr noundef) #1

declare void @gf128_mul(ptr noundef, ptr noundef, ptr noundef) #1

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

declare void @gf128_to_bytes(ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
define dso_local void @ghash_finish(ptr noundef %0, ptr noundef %1) #3 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca [2 x i64], align 16
  %6 = alloca [2 x i64], align 16
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %5) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr %6) #4
  %7 = load ptr, ptr %3, align 8, !tbaa !5
  %8 = getelementptr inbounds %struct.GHASH_CTX, ptr %7, i32 0, i32 5
  %9 = load i64, ptr %8, align 8, !tbaa !9
  %10 = icmp ne i64 %9, 0
  br i1 %10, label %11, label %43

11:                                               ; preds = %2
  %12 = load ptr, ptr %3, align 8, !tbaa !5
  %13 = getelementptr inbounds %struct.GHASH_CTX, ptr %12, i32 0, i32 4
  %14 = getelementptr inbounds [16 x i8], ptr %13, i64 0, i64 0
  %15 = load ptr, ptr %3, align 8, !tbaa !5
  %16 = getelementptr inbounds %struct.GHASH_CTX, ptr %15, i32 0, i32 5
  %17 = load i64, ptr %16, align 8, !tbaa !9
  %18 = getelementptr inbounds i8, ptr %14, i64 %17
  %19 = load ptr, ptr %3, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.GHASH_CTX, ptr %19, i32 0, i32 5
  %21 = load i64, ptr %20, align 8, !tbaa !9
  %22 = sub i64 16, %21
  call void @llvm.memset.p0.i64(ptr align 1 %18, i8 0, i64 %22, i1 false)
  %23 = getelementptr inbounds [2 x i64], ptr %5, i64 0, i64 0
  %24 = load ptr, ptr %3, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.GHASH_CTX, ptr %24, i32 0, i32 4
  %26 = getelementptr inbounds [16 x i8], ptr %25, i64 0, i64 0
  call void @gf128_from_bytes(ptr noundef %23, ptr noundef %26)
  %27 = load ptr, ptr %3, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.GHASH_CTX, ptr %27, i32 0, i32 1
  %29 = getelementptr inbounds [2 x i64], ptr %28, i64 0, i64 0
  %30 = load ptr, ptr %3, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.GHASH_CTX, ptr %30, i32 0, i32 1
  %32 = getelementptr inbounds [2 x i64], ptr %31, i64 0, i64 0
  %33 = getelementptr inbounds [2 x i64], ptr %5, i64 0, i64 0
  call void @gf128_add(ptr noundef %29, ptr noundef %32, ptr noundef %33)
  %34 = load ptr, ptr %3, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.GHASH_CTX, ptr %34, i32 0, i32 1
  %36 = getelementptr inbounds [2 x i64], ptr %35, i64 0, i64 0
  %37 = load ptr, ptr %3, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.GHASH_CTX, ptr %37, i32 0, i32 1
  %39 = getelementptr inbounds [2 x i64], ptr %38, i64 0, i64 0
  %40 = load ptr, ptr %3, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.GHASH_CTX, ptr %40, i32 0, i32 0
  %42 = getelementptr inbounds [2 x i64], ptr %41, i64 0, i64 0
  call void @gf128_mul(ptr noundef %36, ptr noundef %39, ptr noundef %42)
  br label %43

43:                                               ; preds = %11, %2
  %44 = load ptr, ptr %3, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.GHASH_CTX, ptr %44, i32 0, i32 2
  %46 = load i64, ptr %45, align 8, !tbaa !12
  %47 = shl i64 %46, 3
  %48 = lshr i64 %47, 56
  %49 = trunc i64 %48 to i8
  %50 = load ptr, ptr %3, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.GHASH_CTX, ptr %50, i32 0, i32 4
  %52 = getelementptr inbounds [16 x i8], ptr %51, i64 0, i64 0
  store i8 %49, ptr %52, align 8, !tbaa !13
  %53 = load ptr, ptr %3, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.GHASH_CTX, ptr %53, i32 0, i32 2
  %55 = load i64, ptr %54, align 8, !tbaa !12
  %56 = shl i64 %55, 3
  %57 = lshr i64 %56, 48
  %58 = trunc i64 %57 to i8
  %59 = load ptr, ptr %3, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.GHASH_CTX, ptr %59, i32 0, i32 4
  %61 = getelementptr inbounds [16 x i8], ptr %60, i64 0, i64 1
  store i8 %58, ptr %61, align 1, !tbaa !13
  %62 = load ptr, ptr %3, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.GHASH_CTX, ptr %62, i32 0, i32 2
  %64 = load i64, ptr %63, align 8, !tbaa !12
  %65 = shl i64 %64, 3
  %66 = lshr i64 %65, 40
  %67 = trunc i64 %66 to i8
  %68 = load ptr, ptr %3, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.GHASH_CTX, ptr %68, i32 0, i32 4
  %70 = getelementptr inbounds [16 x i8], ptr %69, i64 0, i64 2
  store i8 %67, ptr %70, align 2, !tbaa !13
  %71 = load ptr, ptr %3, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.GHASH_CTX, ptr %71, i32 0, i32 2
  %73 = load i64, ptr %72, align 8, !tbaa !12
  %74 = shl i64 %73, 3
  %75 = lshr i64 %74, 32
  %76 = trunc i64 %75 to i8
  %77 = load ptr, ptr %3, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.GHASH_CTX, ptr %77, i32 0, i32 4
  %79 = getelementptr inbounds [16 x i8], ptr %78, i64 0, i64 3
  store i8 %76, ptr %79, align 1, !tbaa !13
  %80 = load ptr, ptr %3, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.GHASH_CTX, ptr %80, i32 0, i32 2
  %82 = load i64, ptr %81, align 8, !tbaa !12
  %83 = shl i64 %82, 3
  %84 = lshr i64 %83, 24
  %85 = trunc i64 %84 to i8
  %86 = load ptr, ptr %3, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.GHASH_CTX, ptr %86, i32 0, i32 4
  %88 = getelementptr inbounds [16 x i8], ptr %87, i64 0, i64 4
  store i8 %85, ptr %88, align 4, !tbaa !13
  %89 = load ptr, ptr %3, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.GHASH_CTX, ptr %89, i32 0, i32 2
  %91 = load i64, ptr %90, align 8, !tbaa !12
  %92 = shl i64 %91, 3
  %93 = lshr i64 %92, 16
  %94 = trunc i64 %93 to i8
  %95 = load ptr, ptr %3, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.GHASH_CTX, ptr %95, i32 0, i32 4
  %97 = getelementptr inbounds [16 x i8], ptr %96, i64 0, i64 5
  store i8 %94, ptr %97, align 1, !tbaa !13
  %98 = load ptr, ptr %3, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.GHASH_CTX, ptr %98, i32 0, i32 2
  %100 = load i64, ptr %99, align 8, !tbaa !12
  %101 = shl i64 %100, 3
  %102 = lshr i64 %101, 8
  %103 = trunc i64 %102 to i8
  %104 = load ptr, ptr %3, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.GHASH_CTX, ptr %104, i32 0, i32 4
  %106 = getelementptr inbounds [16 x i8], ptr %105, i64 0, i64 6
  store i8 %103, ptr %106, align 2, !tbaa !13
  %107 = load ptr, ptr %3, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.GHASH_CTX, ptr %107, i32 0, i32 2
  %109 = load i64, ptr %108, align 8, !tbaa !12
  %110 = shl i64 %109, 3
  %111 = trunc i64 %110 to i8
  %112 = load ptr, ptr %3, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.GHASH_CTX, ptr %112, i32 0, i32 4
  %114 = getelementptr inbounds [16 x i8], ptr %113, i64 0, i64 7
  store i8 %111, ptr %114, align 1, !tbaa !13
  %115 = load ptr, ptr %3, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.GHASH_CTX, ptr %115, i32 0, i32 3
  %117 = load i64, ptr %116, align 8, !tbaa !14
  %118 = shl i64 %117, 3
  %119 = lshr i64 %118, 56
  %120 = trunc i64 %119 to i8
  %121 = load ptr, ptr %3, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.GHASH_CTX, ptr %121, i32 0, i32 4
  %123 = getelementptr inbounds [16 x i8], ptr %122, i64 0, i64 0
  %124 = getelementptr inbounds i8, ptr %123, i64 8
  %125 = getelementptr inbounds i8, ptr %124, i64 0
  store i8 %120, ptr %125, align 1, !tbaa !13
  %126 = load ptr, ptr %3, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.GHASH_CTX, ptr %126, i32 0, i32 3
  %128 = load i64, ptr %127, align 8, !tbaa !14
  %129 = shl i64 %128, 3
  %130 = lshr i64 %129, 48
  %131 = trunc i64 %130 to i8
  %132 = load ptr, ptr %3, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.GHASH_CTX, ptr %132, i32 0, i32 4
  %134 = getelementptr inbounds [16 x i8], ptr %133, i64 0, i64 0
  %135 = getelementptr inbounds i8, ptr %134, i64 8
  %136 = getelementptr inbounds i8, ptr %135, i64 1
  store i8 %131, ptr %136, align 1, !tbaa !13
  %137 = load ptr, ptr %3, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.GHASH_CTX, ptr %137, i32 0, i32 3
  %139 = load i64, ptr %138, align 8, !tbaa !14
  %140 = shl i64 %139, 3
  %141 = lshr i64 %140, 40
  %142 = trunc i64 %141 to i8
  %143 = load ptr, ptr %3, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.GHASH_CTX, ptr %143, i32 0, i32 4
  %145 = getelementptr inbounds [16 x i8], ptr %144, i64 0, i64 0
  %146 = getelementptr inbounds i8, ptr %145, i64 8
  %147 = getelementptr inbounds i8, ptr %146, i64 2
  store i8 %142, ptr %147, align 1, !tbaa !13
  %148 = load ptr, ptr %3, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.GHASH_CTX, ptr %148, i32 0, i32 3
  %150 = load i64, ptr %149, align 8, !tbaa !14
  %151 = shl i64 %150, 3
  %152 = lshr i64 %151, 32
  %153 = trunc i64 %152 to i8
  %154 = load ptr, ptr %3, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct.GHASH_CTX, ptr %154, i32 0, i32 4
  %156 = getelementptr inbounds [16 x i8], ptr %155, i64 0, i64 0
  %157 = getelementptr inbounds i8, ptr %156, i64 8
  %158 = getelementptr inbounds i8, ptr %157, i64 3
  store i8 %153, ptr %158, align 1, !tbaa !13
  %159 = load ptr, ptr %3, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct.GHASH_CTX, ptr %159, i32 0, i32 3
  %161 = load i64, ptr %160, align 8, !tbaa !14
  %162 = shl i64 %161, 3
  %163 = lshr i64 %162, 24
  %164 = trunc i64 %163 to i8
  %165 = load ptr, ptr %3, align 8, !tbaa !5
  %166 = getelementptr inbounds %struct.GHASH_CTX, ptr %165, i32 0, i32 4
  %167 = getelementptr inbounds [16 x i8], ptr %166, i64 0, i64 0
  %168 = getelementptr inbounds i8, ptr %167, i64 8
  %169 = getelementptr inbounds i8, ptr %168, i64 4
  store i8 %164, ptr %169, align 1, !tbaa !13
  %170 = load ptr, ptr %3, align 8, !tbaa !5
  %171 = getelementptr inbounds %struct.GHASH_CTX, ptr %170, i32 0, i32 3
  %172 = load i64, ptr %171, align 8, !tbaa !14
  %173 = shl i64 %172, 3
  %174 = lshr i64 %173, 16
  %175 = trunc i64 %174 to i8
  %176 = load ptr, ptr %3, align 8, !tbaa !5
  %177 = getelementptr inbounds %struct.GHASH_CTX, ptr %176, i32 0, i32 4
  %178 = getelementptr inbounds [16 x i8], ptr %177, i64 0, i64 0
  %179 = getelementptr inbounds i8, ptr %178, i64 8
  %180 = getelementptr inbounds i8, ptr %179, i64 5
  store i8 %175, ptr %180, align 1, !tbaa !13
  %181 = load ptr, ptr %3, align 8, !tbaa !5
  %182 = getelementptr inbounds %struct.GHASH_CTX, ptr %181, i32 0, i32 3
  %183 = load i64, ptr %182, align 8, !tbaa !14
  %184 = shl i64 %183, 3
  %185 = lshr i64 %184, 8
  %186 = trunc i64 %185 to i8
  %187 = load ptr, ptr %3, align 8, !tbaa !5
  %188 = getelementptr inbounds %struct.GHASH_CTX, ptr %187, i32 0, i32 4
  %189 = getelementptr inbounds [16 x i8], ptr %188, i64 0, i64 0
  %190 = getelementptr inbounds i8, ptr %189, i64 8
  %191 = getelementptr inbounds i8, ptr %190, i64 6
  store i8 %186, ptr %191, align 1, !tbaa !13
  %192 = load ptr, ptr %3, align 8, !tbaa !5
  %193 = getelementptr inbounds %struct.GHASH_CTX, ptr %192, i32 0, i32 3
  %194 = load i64, ptr %193, align 8, !tbaa !14
  %195 = shl i64 %194, 3
  %196 = trunc i64 %195 to i8
  %197 = load ptr, ptr %3, align 8, !tbaa !5
  %198 = getelementptr inbounds %struct.GHASH_CTX, ptr %197, i32 0, i32 4
  %199 = getelementptr inbounds [16 x i8], ptr %198, i64 0, i64 0
  %200 = getelementptr inbounds i8, ptr %199, i64 8
  %201 = getelementptr inbounds i8, ptr %200, i64 7
  store i8 %196, ptr %201, align 1, !tbaa !13
  %202 = getelementptr inbounds [2 x i64], ptr %6, i64 0, i64 0
  %203 = load ptr, ptr %3, align 8, !tbaa !5
  %204 = getelementptr inbounds %struct.GHASH_CTX, ptr %203, i32 0, i32 4
  %205 = getelementptr inbounds [16 x i8], ptr %204, i64 0, i64 0
  call void @gf128_from_bytes(ptr noundef %202, ptr noundef %205)
  %206 = load ptr, ptr %3, align 8, !tbaa !5
  %207 = getelementptr inbounds %struct.GHASH_CTX, ptr %206, i32 0, i32 1
  %208 = getelementptr inbounds [2 x i64], ptr %207, i64 0, i64 0
  %209 = load ptr, ptr %3, align 8, !tbaa !5
  %210 = getelementptr inbounds %struct.GHASH_CTX, ptr %209, i32 0, i32 1
  %211 = getelementptr inbounds [2 x i64], ptr %210, i64 0, i64 0
  %212 = getelementptr inbounds [2 x i64], ptr %6, i64 0, i64 0
  call void @gf128_add(ptr noundef %208, ptr noundef %211, ptr noundef %212)
  %213 = load ptr, ptr %3, align 8, !tbaa !5
  %214 = getelementptr inbounds %struct.GHASH_CTX, ptr %213, i32 0, i32 0
  %215 = getelementptr inbounds [2 x i64], ptr %214, i64 0, i64 0
  %216 = load ptr, ptr %3, align 8, !tbaa !5
  %217 = getelementptr inbounds %struct.GHASH_CTX, ptr %216, i32 0, i32 1
  %218 = getelementptr inbounds [2 x i64], ptr %217, i64 0, i64 0
  %219 = load ptr, ptr %3, align 8, !tbaa !5
  %220 = getelementptr inbounds %struct.GHASH_CTX, ptr %219, i32 0, i32 0
  %221 = getelementptr inbounds [2 x i64], ptr %220, i64 0, i64 0
  call void @gf128_mul(ptr noundef %215, ptr noundef %218, ptr noundef %221)
  %222 = load ptr, ptr %3, align 8, !tbaa !5
  %223 = getelementptr inbounds %struct.GHASH_CTX, ptr %222, i32 0, i32 0
  %224 = getelementptr inbounds [2 x i64], ptr %223, i64 0, i64 0
  %225 = load ptr, ptr %4, align 8, !tbaa !5
  call void @gf128_to_bytes(ptr noundef %224, ptr noundef %225)
  %226 = load ptr, ptr %3, align 8, !tbaa !5
  call void @gmssl_secure_clear(ptr noundef %226, i64 noundef 72)
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %5) #4
  ret void
}

declare void @gmssl_secure_clear(ptr noundef, i64 noundef) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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, !11, i64 64}
!10 = !{!"", !7, i64 0, !7, i64 16, !11, i64 32, !11, i64 40, !7, i64 48, !11, i64 64}
!11 = !{!"long", !7, i64 0}
!12 = !{!10, !11, i64 32}
!13 = !{!7, !7, i64 0}
!14 = !{!10, !11, i64 40}


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

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

declare void @gf128_from_bytes(ptr noundef, ptr noundef) local_unnamed_addr #1

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

declare void @gf128_add(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @gf128_mul(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

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

declare void @gf128_to_bytes(ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local void @ghash_finish(ptr noundef %0, ptr noundef %1) local_unnamed_addr #3 {
  %3 = alloca [2 x i64], align 16
  %4 = alloca [2 x i64], align 16
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #4
  %5 = getelementptr inbounds i8, ptr %0, i64 64
  %6 = load i64, ptr %5, align 8, !tbaa !5
  %.not = icmp eq i64 %6, 0
  br i1 %.not, label %12, label %7

7:                                                ; preds = %2
  %8 = getelementptr inbounds i8, ptr %0, i64 48
  %9 = getelementptr inbounds i8, ptr %8, i64 %6
  %10 = sub i64 16, %6
  tail call void @llvm.memset.p0.i64(ptr nonnull align 1 %9, i8 0, i64 %10, i1 false)
  call void @gf128_from_bytes(ptr noundef nonnull %3, ptr noundef nonnull %8) #4
  %11 = getelementptr inbounds i8, ptr %0, i64 16
  call void @gf128_add(ptr noundef nonnull %11, ptr noundef nonnull %11, ptr noundef nonnull %3) #4
  call void @gf128_mul(ptr noundef nonnull %11, ptr noundef nonnull %11, ptr noundef nonnull %0) #4
  br label %12

12:                                               ; preds = %7, %2
  %13 = getelementptr inbounds i8, ptr %0, i64 32
  %14 = load i64, ptr %13, align 8, !tbaa !10
  %15 = lshr i64 %14, 53
  %16 = trunc i64 %15 to i8
  %17 = getelementptr inbounds i8, ptr %0, i64 48
  store i8 %16, ptr %17, align 8, !tbaa !11
  %18 = lshr i64 %14, 45
  %19 = trunc i64 %18 to i8
  %20 = getelementptr inbounds i8, ptr %0, i64 49
  store i8 %19, ptr %20, align 1, !tbaa !11
  %21 = lshr i64 %14, 37
  %22 = trunc i64 %21 to i8
  %23 = getelementptr inbounds i8, ptr %0, i64 50
  store i8 %22, ptr %23, align 2, !tbaa !11
  %24 = lshr i64 %14, 29
  %25 = trunc i64 %24 to i8
  %26 = getelementptr inbounds i8, ptr %0, i64 51
  store i8 %25, ptr %26, align 1, !tbaa !11
  %27 = lshr i64 %14, 21
  %28 = trunc i64 %27 to i8
  %29 = getelementptr inbounds i8, ptr %0, i64 52
  store i8 %28, ptr %29, align 4, !tbaa !11
  %30 = lshr i64 %14, 13
  %31 = trunc i64 %30 to i8
  %32 = getelementptr inbounds i8, ptr %0, i64 53
  store i8 %31, ptr %32, align 1, !tbaa !11
  %33 = lshr i64 %14, 5
  %34 = trunc i64 %33 to i8
  %35 = getelementptr inbounds i8, ptr %0, i64 54
  store i8 %34, ptr %35, align 2, !tbaa !11
  %.tr = trunc i64 %14 to i8
  %36 = shl i8 %.tr, 3
  %37 = getelementptr inbounds i8, ptr %0, i64 55
  store i8 %36, ptr %37, align 1, !tbaa !11
  %38 = getelementptr inbounds i8, ptr %0, i64 40
  %39 = load i64, ptr %38, align 8, !tbaa !12
  %40 = lshr i64 %39, 53
  %41 = trunc i64 %40 to i8
  %42 = getelementptr inbounds i8, ptr %0, i64 56
  store i8 %41, ptr %42, align 1, !tbaa !11
  %43 = lshr i64 %39, 45
  %44 = trunc i64 %43 to i8
  %45 = getelementptr inbounds i8, ptr %0, i64 57
  store i8 %44, ptr %45, align 1, !tbaa !11
  %46 = lshr i64 %39, 37
  %47 = trunc i64 %46 to i8
  %48 = getelementptr inbounds i8, ptr %0, i64 58
  store i8 %47, ptr %48, align 1, !tbaa !11
  %49 = lshr i64 %39, 29
  %50 = trunc i64 %49 to i8
  %51 = getelementptr inbounds i8, ptr %0, i64 59
  store i8 %50, ptr %51, align 1, !tbaa !11
  %52 = lshr i64 %39, 21
  %53 = trunc i64 %52 to i8
  %54 = getelementptr inbounds i8, ptr %0, i64 60
  store i8 %53, ptr %54, align 1, !tbaa !11
  %55 = lshr i64 %39, 13
  %56 = trunc i64 %55 to i8
  %57 = getelementptr inbounds i8, ptr %0, i64 61
  store i8 %56, ptr %57, align 1, !tbaa !11
  %58 = lshr i64 %39, 5
  %59 = trunc i64 %58 to i8
  %60 = getelementptr inbounds i8, ptr %0, i64 62
  store i8 %59, ptr %60, align 1, !tbaa !11
  %.tr51 = trunc i64 %39 to i8
  %61 = shl i8 %.tr51, 3
  %62 = getelementptr inbounds i8, ptr %0, i64 63
  store i8 %61, ptr %62, align 1, !tbaa !11
  call void @gf128_from_bytes(ptr noundef nonnull %4, ptr noundef nonnull %17) #4
  %63 = getelementptr inbounds i8, ptr %0, i64 16
  call void @gf128_add(ptr noundef nonnull %63, ptr noundef nonnull %63, ptr noundef nonnull %4) #4
  call void @gf128_mul(ptr noundef nonnull %0, ptr noundef nonnull %63, ptr noundef nonnull %0) #4
  call void @gf128_to_bytes(ptr noundef nonnull %0, ptr noundef %1) #4
  call void @gmssl_secure_clear(ptr noundef nonnull %0, i64 noundef 72) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #4
  ret void
}

declare void @gmssl_secure_clear(ptr noundef, i64 noundef) local_unnamed_addr #1

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
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, !9, i64 64}
!6 = !{!"", !7, i64 0, !7, i64 16, !9, i64 32, !9, i64 40, !7, i64 48, !9, i64 64}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!"long", !7, i64 0}
!10 = !{!6, !9, i64 32}
!11 = !{!7, !7, i64 0}
!12 = !{!6, !9, i64 40}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,TailCallElimPass