You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: prove.rs
    path of file: ./repos/risc0/examples/waldo/src/bin
    
    the code of the file until where you have to start completion: // Copyright 2024 RISC Zero, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

use std::{error::Error, fs, path::PathBuf};

use clap::Parser;
use image::{io::Reader as ImageReader, GenericImageView};
use risc0_zkvm::{default_prover, Execu
    
fn main() -> Result<(), Box<dyn Error>> {
    tracing_subscriber::fmt()
        .with_env_filter(tracing_subscriber::filter::EnvFilter::from_default_env())
        .init();
    ();

    let args = Args::parse();

    // Read the image from disk.
    let img = ImageReader::open(&args.image)?.decode()?;
    println!(
        "Read image at {} with size: {} x {}",
        &args.image.display(),
        img.width(),
        img.height()
    );

    let crop_location = (args.waldo_x, args.waldo_y);
    let crop_dimensions = (args.width, args.height);

    // Read the image mask from disk, if provided.
    let mask = args.mask.map_or(Ok::<_, Box<dyn Error>>(None), |path| {
        // Read the image mask from disk. Reads any format and color image.
        let mask: ImageMask = ImageReader::open(&path)?.decode()?.into();
        if mask.dimensions() != crop_dimensions {
            return Err(format!(
                "Mask dimensions do not match specified height and width for Waldo: {:?} != {:?}",
                mask.dimensions(),
                crop_dimensions
            )
            .into());
        }
        println!("Read image mask at {}", &path.display(),);

        Ok(Some(mask.into_raw()))
    })?;

    // Construct a Merkle tree from the full Where's Waldo image.
    let img_merkle_tree = ImageMerkleTree::<{ IMAGE_CHUNK_SIZE }>::new(&img);
    println!(
        "Created Merkle tree from image with root {:?}",
        img_merkle_tree.root(),
    );

    // Give the private input to the guest, including Waldo's location.
    let input = PrivateInput {
        root: img_merkle_tree.root(),
        image_dimensions: img.dimensions(),
        mask,
        crop_location,
        crop_dimensions,
    };

    // Make the ExecutorEnv, registering an io_callback to communicate
    // vector oracle data from the Merkle tree.
    let env = ExecutorEnv::builder()
        .write(&input)?
        .io_callback(SYS_VECTOR_ORACLE, img_merkle_tree.vector_oracle_callback())
        .build()
        .unwrap();

    // Run prover and generate receipt
    println!(
        "Running the prover to cut out Waldo at {:?} with dimensions {:?}",
        input.crop_location, input.crop_dimensions,
    );

    // Obtain the default prover.
    let prover = default_prover();

    // Produce a receipt by proving the specified ELF binary.
    let receipt = prover.prove(env, IMAGE_CROP_ELF).unwrap();

    // Save the receipt to disk so it can be sent to the verifier.
    fs::write(&args.receipt, bincode::serialize(&receipt).unwrap())?;
    println!("Success! Saved the receipt to {}", &args.receipt.display());

    Ok(())
}