// RUN: concretecompiler --passes tfhe-to-concrete --action=dump-concrete --skip-program-info %s 2>&1| FileCheck %s

//CHECK: func.func @bootstrap_lwe(%[[A0:.*]]: tensor<601xi64>) -> tensor<1025xi64> {
//CHECK-NEXT:   %cst = arith.constant dense<"[encoded data, 16386 characters]"> : tensor<1024xi64>
//CHECK-NEXT:   %[[V1:.*]] = "Concrete.bootstrap_lwe_tensor"(%arg0, %cst) {baseLog = 1 : i32, bskIndex = -1 : i32, glweDimension = 1 : i32, inputLweDim = 600 : i32, level = 3 : i32, polySize = 1024 : i32} : (tensor<601xi64>, tensor<1024xi64>) -> tensor<1025xi64>
//CHECK-NEXT:   return %[[V1]] : tensor<1025xi64>
//CHECK-NEXT: }
func.func @bootstrap_lwe(%ciphertext: !TFHE.glwe<sk[1]<1,600>>) -> !TFHE.glwe<sk[5]<1,1024>> {
  %cst = arith.constant dense<"[encoded data, 16386 characters]"> : tensor<1024xi64>
  %bootstraped = "TFHE.bootstrap_glwe"(%ciphertext, %cst) {key = #TFHE.bsk<sk[1]<1,600>, sk[1]<1,1024>, 1024, 1, 3, 1>}: (!TFHE.glwe<sk[1]<1,600>>, tensor<1024xi64>) -> !TFHE.glwe<sk[5]<1,1024>>
  return %bootstraped : !TFHE.glwe<sk[5]<1,1024>>
}
