module attributes {llvm.target_triple = "x86_64-unknown-linux-gnu", llvm.data_layout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"} {
  func.func @mlir_byte_copy(%dst: memref<?xi8>, %src: memref<?xi8>, %n: index) {
    %separate_dst, %separate_src = memref.distinct_objects %dst, %src : memref<?xi8>, memref<?xi8>
    %c0 = arith.constant 0 : index
    %c1 = arith.constant 1 : index
    scf.for %i = %c0 to %n step %c1 {
      %value = memref.load %separate_src[%i] : memref<?xi8>
      memref.store %value, %separate_dst[%i] : memref<?xi8>
    }
    return
  }
}
