You are an expert Verilog hardware designer working on a complete FPGA or ASIC project. You are given the full source code of a Verilog project. One of the modules in the project is incomplete — its implementation is missing and marked with:

// >>> Module Implementation Begin

// <<< Module Implementation End

Your task is to complete the missing implementation so that the entire project functions correctly. You must infer what the missing module or logic is supposed to do by analyzing the rest of the codebase: module names, signal connections, instantiations, comments, and usage patterns.

Follow these rules:

1. Only generate Verilog code to go between the `// >>> Module Implementation Begin` and `// <<< Module Implementation End` comments.
2. Use Verilog-2001 syntax. Ensure the code is synthesizable.
3. Assume the goal is a working, integrated hardware design — your code must make the whole system function as intended.
4. Analyze the naming, I/O ports, and how the module is instantiated or used in other parts of the project.
5. Implement correct behavior based on design context. Do not guess randomly — reason it out.
6. Avoid vendor-specific features unless explicitly required.
7. Do not output comments, explanation, or anything outside the required code region unless explicitly asked.

Your output should contain **only the Verilog code** that fits inside the marked region.

/*
 * Copyright (c) 2024 Jack Leightcap
 * SPDX-License-Identifier: Apache-2.0
 */

`default_nettype none

module tt_um_jleightcap (
    input  wire [7:0] ui_in,    // Dedicated inputs
    output wire [7:0] uo_out,   // Dedicated outputs
    input  wire [7:0] uio_in,   // IOs: Input path
    output wire [7:0] uio_out,  // IOs: Output path
    output wire [7:0] uio_oe,   // IOs: Enable path (active high: 0=input, 1=output)
    input  wire       ena,      // always 1 when the design is powered, so you can ignore it
    input  wire       clk,      // clock
    input  wire       rst_n     // reset_n - low to reset
);

  wire we, halt;
  wire [5:0] count;
  Fractran ft (
      .clk(clk),
      .rst(rst_n),
      .en(ena),
      .accumulator(uio_in),
      .fraction(ui_in),
      .we(we),
      .degree(uo_out),
      .halt(halt),
      .count(count)
  );
  assign uio_out = {we, halt, count};
  assign uio_oe = {we, we, we, we, we, we, we, we};

endmodule


/* AUTOMATICALLY GENERATED VERILOG-2001 SOURCE CODE.
** GENERATED BY CLASH 1.6.3. DO NOT MODIFY.
*/
module Fractran
    ( // Inputs
      input [7:0] accumulator
    , input [7:0] fraction
    , input  clk // clock
    , input  rst // reset
    , input  en // enable

      // Outputs
    , output wire [7:0] degree
    , output wire  we
    , output wire  halt
    , output wire [5:0] count
    );
// >>> Module Implementation Begin

// <<< Module Implementation End
endmodule





Reference solution:
rtl/generated.v:   // src/Fractran.hs:148:1-9
  wire [17:0] \input ;
  // src/Fractran.hs:120:1-88
  reg [16:0] s1 = {1'd0,   {1'b1,{1'b1,8'b00000000}},   6'b000000};
  wire [7:0] c$case_alt_0;
  wire [7:0] c$app_arg;
  wire  c$app_arg_0;
  wire [0:0] c$app_arg_1;
  // src/Fractran.hs:37:3-6
  wire [7:0] a;
  // src/Fractran.hs:107:1-6
  wire [8:0] v;
  wire [16:0] result;
  wire [9:0] result_0;
  wire [9:0] c$case_alt_1;
  wire [9:0] c$case_alt_2;
  wire [9:0] c$case_alt_3;
  wire [9:0] c$case_alt_4;
  // src/Fractran.hs:56:7-8
  wire [7:0] ipv;
  wire [7:0] c$app_arg_2;
  wire [9:0] c$case_alt_5;
  wire  c$case_scrut;
  // src/Fractran.hs:56:7-8
  wire [7:0] f;
  // src/Fractran.hs:81:1-6
  wire [8:0] f_0;
  // src/Fractran.hs:81:1-6
  wire [8:0] a_0;
  // src/Fractran.hs:148:1-9
  reg [8:0] c$input_app_arg;
  // src/Fractran.hs:148:1-9
  reg [8:0] c$input_app_arg_0;
  wire [9:0] c$app_arg_selection_1;
  wire [9:0] c$app_arg_selection_6;
  wire [7:0] c$bv;
  wire [15:0] c$case_alt;

  assign \input  = {c$input_app_arg_0,
                    c$input_app_arg};

  // register begin
  always @(posedge clk or  posedge  rst) begin : s1_register
    if ( rst) begin
      s1 <= {1'd0,   {1'b1,{1'b1,8'b00000000}},   6'b000000};
    end else if (en) begin
      s1 <= result;
    end
  end
  // register end

  assign c$case_alt_0 = v[8:8] ? (a) : 8'b11111111;

  assign c$app_arg_selection_1 = s1[15:6];

  assign c$app_arg = c$app_arg_selection_1[9:9] ? c$case_alt_0 : (8'b00000000);

  assign c$app_arg_0 = s1[16:16] ? (1'b1) : (1'b0);

  assign c$app_arg_selection_6 = s1[15:6];

  assign c$app_arg_1 = c$app_arg_selection_6[9:9] ? 1'b0 : 1'b1;

  assign c$case_alt = {c$app_arg,   c$app_arg_0,
                       (c$app_arg_1),   s1[5:0]};

  assign a = v[7:0];

  assign v = s1[14:6];

  assign result = s1[16:16] ? {1'd0,   result_0,
                               s1[5:0]} : {1'd1,   result_0,
                                           s1[5:0] + 6'b000001};

  assign result_0 = a_0[8:8] ? c$case_alt_1 : c$case_alt_2;

  assign c$case_alt_1 = f_0[8:8] ? c$case_alt_3 : {1'b1,a_0};

  assign c$case_alt_2 = f_0[8:8] ? c$case_alt_5 : {1'b1,{1'b0,8'bxxxxxxxx}};

  assign c$case_alt_3 = c$case_scrut ? {1'b1,{1'b1,(ipv + f) % 8'b01111110}} : c$case_alt_4;

  assign c$case_alt_4 = (ipv >= c$app_arg_2) ? {1'b1,{1'b1,(ipv - c$app_arg_2) + 8'b00000001}} : {1'b0,9'bxxxxxxxxx};

  assign ipv = a_0[7:0];

  assign c$app_arg_2 = -f;

  assign c$case_alt_5 = c$case_scrut ? {1'b1,{1'b1,f}} : {1'b0,9'bxxxxxxxxx};

  assign c$bv = (f);

  assign c$case_scrut = ( c$bv[8-1] ) == (1'b0);

  assign f = f_0[7:0];

  assign f_0 = \input [8:0];

  assign a_0 = \input [17:9];

  always @(*) begin
    case(fraction)
      8'b11111111 : c$input_app_arg = {1'b0,8'bxxxxxxxx};
      default : c$input_app_arg = {1'b1,fraction};
    endcase
  end

  always @(*) begin
    case(accumulator)
      8'b11111111 : c$input_app_arg_0 = {1'b0,8'bxxxxxxxx};
      default : c$input_app_arg_0 = {1'b1,accumulator};
    endcase
  end

  assign degree = c$case_alt[15:8];

  assign we = c$case_alt[7:7];

  assign halt = c$case_alt[6:6];

  assign count = c$case_alt[5:0];