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 Edwin Török
 * SPDX-License-Identifier: Apache-2.0
 */

`default_nettype none

module tt_um_edwintorok (
    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 hsync, vsync, audio;
  wire [1:0] r,g,b;
  
  // All output pins must be assigned. If not used, assign to 0.
  assign uio_out[6:0] = 0;

  assign uio_out[7] = audio; // TODO: audio

  assign uio_oe  = 8'b10000000; // the audio output pin

  // List all unused inputs to prevent warnings
  wire _unused_ok = &{ena, ui_in, uio_in[7:1], rst_n, 1'b0};

  // Tiny VGA PMOD
  assign {uo_out[0], uo_out[4]} = r[1:0];
  assign {uo_out[1], uo_out[5]} = g[1:0];
  assign {uo_out[2], uo_out[6]} = b[1:0];
  assign uo_out[3] = vsync;
  assign uo_out[7] = hsync;

  generated generated(
    .clk(clk),
    .rst_n(rst_n),
    .hsync(hsync),
    .vsync(vsync),
    .r(r),
    .g(g),
    .b(b),
    .audio(audio),
    .test(uio_in[0])
  );

endmodule


/*
 * Generated by src/header.ml. DO NOT EDIT.
 * If you want to modify this file, modify the above generator, or the below libraries instead
 * SPDX-License-Identifier: Apache-2.0
 * 
 * Libraries used:
 *     base.v0.17.1
 *     base.base_internalhash_types.v0.17.1
 *     base.md5.v0.17.1
 *     base.shadow_stdlib.v0.17.1
 *     base_bigstring.v0.17.0
 *     base_quickcheck.v0.17.0
 *     base_quickcheck.ppx_quickcheck.runtime.v0.17.0
 *     bin_prot.v0.17.0
 *     bin_prot.shape.v0.17.0
 *     core.v0.17.1
 *     core.base_for_tests.v0.17.1
 *     core.command.v0.17.1
 *     core.filename_base.v0.17.1
 *     core.heap_block.v0.17.1
 *     core.univ_map.v0.17.1
 *     core.validate.v0.17.1
 *     core_kernel.flags.v0.17.0
 *     cryptokit
 *     dune-build-info.3.16.0
 *     expect_test_helpers_core.expect_test_helpers_base.v0.17.0
 *     fieldslib.v0.17.0
 *     fixederrmath
 *     fixedmath
 *     gel.v0.17.0
 *     generator
 *     gg.1.0.0
 *     hardcaml.v0.17.0
 *     hardcaml_circuits.v0.17.0
 *     hardcaml_fixed_point.v0.17.0
 *     hardcaml_waveterm.v0.17.0
 *     hardcaml_waveterm.cyclesim.v0.17.0
 *     hardcaml_waveterm.kernel.v0.17.0
 *     int_repr.v0.17.0
 *     jane-street-headers.v0.17.0
 *     num.1.6~dev
 *     num.core.1.6~dev
 *     ocaml_intrinsics_kernel.v0.17.1
 *     parsexp.v0.17.0
 *     ppx_assert.runtime-lib.v0.17.0
 *     ppx_bench.runtime-lib.v0.17.0
 *     ppx_compare.runtime-lib.v0.17.0
 *     ppx_diff.diffable.v0.17.0
 *     ppx_diff.diffable_cinaps.v0.17.0
 *     ppx_enumerate.runtime-lib.v0.17.0
 *     ppx_expect.config.v0.17.0
 *     ppx_expect.config_types.v0.17.0
 *     ppx_expect.make_corrected_file.v0.17.0
 *     ppx_expect.runtime.v0.17.0
 *     ppx_hardcaml.runtime.v0.17.0
 *     ppx_hash.runtime-lib.v0.17.0
 *     ppx_here.runtime-lib.v0.17.0
 *     ppx_inline_test.config.v0.17.0
 *     ppx_inline_test.runtime-lib.v0.17.0
 *     ppx_log.syntax.v0.17.0
 *     ppx_log.types.v0.17.0
 *     ppx_module_timer.runtime.v0.17.0
 *     ppx_sexp_conv.runtime-lib.v0.17.0
 *     ppx_stable_witness.runtime.v0.17.0
 *     ppx_stable_witness.stable_witness.v0.17.0
 *     ppx_string.runtime.v0.17.0
 *     ppxlib.print_diff.0.33.0
 *     re.1.11.0
 *     reference
 *     seq.[distributed with OCaml 4.07 or above]
 *     sexp_pretty.v0.17.0
 *     sexplib.v0.17.0
 *     sexplib0.v0.17.0
 *     splittable_random.v0.17.0
 *     stdio.v0.17.0
 *     time_now.v0.17.0
 *     typerep.v0.17.0
 *     unix.5.2.0
 *     variantslib.v0.17.0
 *     vecmath_core
 *     zarith.1.14
*/
module generated (
    test,
    rst_n,
    clk,
    r,
    g,
    b,
    hsync,
    vsync,
    audio
);
// >>> Module Implementation Begin

// <<< Module Implementation End
endmodule




Reference solution:
rtl/generated.v: 
    input test;
    input rst_n;
    input clk;
    output [1:0] r;
    output [1:0] g;
    output [1:0] b;
    output hsync;
    output vsync;
    output audio;

    wire _104;
    reg _107;
    wire vga$o$audio;
    wire [9:0] _111;
    wire _112;
    wire [9:0] _108;
    wire _109;
    wire _110;
    wire _113;
    wire _114;
    wire vga$vgaController$o$vsync;
    reg _115;
    wire vga$o$vsync;
    wire [9:0] _119;
    wire _120;
    wire [9:0] _116;
    wire _117;
    wire _118;
    wire _121;
    wire _122;
    wire vga$vgaController$o$hsync;
    reg _123;
    wire vga$o$hsync;
    reg [2:0] vga$h_border$lb;
    wire [2:0] _226;
    wire [2:0] vga$v_border$lb;
    wire [2:0] _224;
    wire [2:0] _227;
    wire [2:0] vga$blue$lb;
    wire [2:0] vga$red$lb;
    wire [2:0] vga$magenta$lb;
    wire [2:0] vga$green$lb;
    wire [2:0] vga$cyan$lb;
    wire [2:0] vga$yellow$lb;
    wire [2:0] vga$white$lb;
    reg [2:0] vga$bars$lb;
    wire [2:0] vga$gray7$lb;
    wire [2:0] vga$gray6$lb;
    wire [2:0] vga$gray5$lb;
    wire [2:0] vga$gray4$lb;
    wire [2:0] vga$gray3$lb;
    wire [2:0] vga$gray2$lb;
    wire [2:0] vga$gray1$lb;
    wire [2:0] vga$gray0$lb;
    wire [2:0] vga$black$lb;
    reg [2:0] vga$steps$lb;
    wire [2:0] vga$default$lb;
    wire [2:0] _228;
    wire [2:0] _184;
    wire [5:0] _177;
    wire [7:0] _167;
    wire [9:0] vga$ray$light$z;
    wire [19:0] _165;
    wire [11:0] _166;
    wire [19:0] _168;
    wire _169;
    wire [20:0] _170;
    wire [20:0] _171;
    wire _172;
    wire [21:0] _173;
    wire [19:0] _174;
    wire [13:0] _175;
    wire [12:0] _176;
    wire [18:0] vga$ray$color$rgb$v01_1$x;
    wire [18:0] vga$ray$color$rgb$z;
    wire _179;
    wire [19:0] _180;
    wire [16:0] _181;
    wire [13:0] _182;
    wire [12:0] _183;
    wire [15:0] _185;
    wire [2:0] _186;
    wire [2:0] _187;
    wire [2:0] vga$ray$o$lb;
    wire [2:0] _229;
    reg [1:0] _234;
    wire [1:0] _235;
    reg [1:0] _236;
    wire [1:0] vga$o$b;
    reg [2:0] vga$h_border$lg;
    wire [2:0] _283;
    wire [2:0] vga$v_border$lg;
    wire [2:0] _281;
    wire [2:0] _284;
    wire [2:0] vga$blue$lg;
    wire [2:0] vga$red$lg;
    wire [2:0] vga$magenta$lg;
    wire [2:0] vga$green$lg;
    wire [2:0] vga$cyan$lg;
    wire [2:0] vga$yellow$lg;
    wire [2:0] vga$white$lg;
    reg [2:0] vga$bars$lg;
    wire [2:0] vga$gray7$lg;
    wire [2:0] vga$gray6$lg;
    wire [2:0] vga$gray5$lg;
    wire [2:0] vga$gray4$lg;
    wire [2:0] vga$gray3$lg;
    wire [2:0] vga$gray2$lg;
    wire [2:0] vga$gray1$lg;
    wire [2:0] vga$gray0$lg;
    wire [2:0] vga$black$lg;
    reg [2:0] vga$steps$lg;
    wire [2:0] vga$default$lg;
    wire [2:0] _285;
    wire [2:0] _257;
    wire [5:0] _250;
    wire [7:0] _240;
    wire [9:0] vga$ray$light$y;
    wire [19:0] _238;
    wire [11:0] _239;
    wire [19:0] _241;
    wire _242;
    wire [20:0] _243;
    wire [20:0] _163;
    wire [20:0] _244;
    wire _245;
    wire [21:0] _246;
    wire [19:0] _247;
    wire [13:0] _248;
    wire [12:0] _249;
    wire [18:0] vga$ray$color$rgb$v01_0$x;
    wire [18:0] vga$ray$color$rgb$y;
    wire _252;
    wire [19:0] _253;
    wire [16:0] _254;
    wire [13:0] _255;
    wire [12:0] _256;
    wire [15:0] _258;
    wire [2:0] _259;
    wire [2:0] _260;
    wire [2:0] vga$ray$o$lg;
    wire [2:0] _286;
    reg [1:0] _287;
    wire [1:0] _288;
    reg [1:0] _289;
    wire [1:0] vga$o$g;
    wire [1:0] _233;
    wire [1:0] _232;
    wire [4:0] vga$counter_div_mod_1$i$set_quotient;
    wire [4:0] _315;
    wire [4:0] _314;
    wire [4:0] _316;
    wire _312;
    wire [4:0] _306;
    wire [4:0] _16;
    wire _307;
    wire [4:0] _294;
    wire vga$counter_div_mod_1$i$clear;
    wire vga$counter_div_mod_1$i$clock;
    wire [4:0] vga$counter_div_mod_1$i$set_remainder;
    wire [4:0] _302;
    wire [4:0] _301;
    wire [4:0] _303;
    wire _296;
    wire _297;
    wire _298;
    wire _299;
    wire [4:0] _304;
    wire [4:0] _20;
    reg [4:0] _305;
    wire [4:0] _21;
    wire _295;
    wire _308;
    wire _22;
    wire vga$counter_div_mod_1$i$incr;
    wire _310;
    wire vga$counter_div_mod_1$i$set;
    wire _311;
    wire _313;
    wire [4:0] _317;
    wire [4:0] _25;
    reg [4:0] _291;
    wire [4:0] vga$counter_div_mod_1$o$quotient;
    reg [2:0] vga$h_border$lr;
    wire [2:0] _1148;
    wire [3:0] _221;
    wire _222;
    wire [2:0] vga$v_border$lr;
    wire [2:0] _1146;
    wire [2:0] _1149;
    wire [2:0] vga$blue$lr;
    wire [2:0] vga$red$lr;
    wire [2:0] vga$magenta$lr;
    wire [2:0] vga$green$lr;
    wire [2:0] vga$cyan$lr;
    wire [2:0] vga$yellow$lr;
    wire [2:0] vga$white$lr;
    wire [3:0] vga$counter_div_mod$i$set_quotient;
    wire [3:0] _342;
    wire [3:0] _341;
    wire [3:0] _343;
    wire _338;
    wire [3:0] _333;
    wire [3:0] _28;
    wire _334;
    wire [6:0] _321;
    wire vga$counter_div_mod$i$clear;
    wire vga$counter_div_mod$i$clock;
    wire [6:0] vga$counter_div_mod$i$set_remainder;
    wire [6:0] _320;
    wire [6:0] _329;
    wire [6:0] _327;
    wire [6:0] _328;
    wire [6:0] _330;
    wire _323;
    wire _324;
    wire _325;
    wire _326;
    wire [6:0] _331;
    wire [6:0] _32;
    reg [6:0] _332;
    wire [6:0] _33;
    wire _322;
    wire _335;
    wire _34;
    wire vga$counter_div_mod$i$incr;
    wire _336;
    wire vga$counter_div_mod$i$set;
    wire _337;
    wire _339;
    wire [3:0] _344;
    wire [3:0] _37;
    reg [3:0] _319;
    wire [3:0] vga$counter_div_mod$o$quotient;
    reg [2:0] vga$bars$lr;
    wire [2:0] vga$black$lr;
    wire [2:0] vga$gray7$lr;
    wire [2:0] vga$gray6$lr;
    wire [2:0] vga$gray5$lr;
    wire [2:0] vga$gray4$lr;
    wire [2:0] vga$gray3$lr;
    wire [2:0] vga$gray2$lr;
    wire [2:0] vga$gray1$lr;
    wire [2:0] vga$gray0$lr;
    wire [5:0] vga$counter_div_mod_0$i$set_quotient;
    wire [5:0] _345;
    wire [5:0] _367;
    wire [5:0] _365;
    wire [5:0] _366;
    wire [5:0] _368;
    wire _363;
    wire [5:0] _358;
    wire [5:0] _40;
    wire _359;
    wire [4:0] _347;
    wire _293;
    wire vga$counter_div_mod_0$i$clear;
    wire vga$counter_div_mod_0$i$clock;
    wire [4:0] vga$counter_div_mod_0$i$set_remainder;
    wire [4:0] _290;
    wire [4:0] _354;
    wire [4:0] _300;
    wire [4:0] _353;
    wire [4:0] _355;
    wire _349;
    wire _350;
    wire _351;
    wire _352;
    wire [4:0] _356;
    wire [4:0] _44;
    reg [4:0] _357;
    wire [4:0] _45;
    wire _348;
    wire _360;
    wire _46;
    wire vga$counter_div_mod_0$i$incr;
    wire _361;
    wire vga$counter_div_mod_0$i$set;
    wire _362;
    wire _364;
    wire [5:0] _369;
    wire [5:0] _49;
    reg [5:0] _346;
    wire [5:0] vga$counter_div_mod_0$o$quotient;
    reg [2:0] vga$steps$lr;
    wire [9:0] _200;
    wire vga$y_top;
    wire [2:0] vga$default$lr;
    wire [9:0] _195;
    wire _196;
    wire _197;
    wire _194;
    wire _198;
    wire [9:0] _190;
    wire _191;
    wire _192;
    wire [9:0] _188;
    wire _189;
    wire _193;
    wire _199;
    wire [2:0] _1150;
    wire [2:0] _1107;
    wire [4:0] _1100;
    wire [6:0] _1089;
    wire [7:0] _1090;
    wire [1:0] _825;
    wire [1:0] _820;
    wire [3:0] _812;
    wire _804;
    wire [13:0] _805;
    wire [13:0] _801;
    wire [13:0] _806;
    wire _807;
    wire [14:0] _808;
    wire [10:0] _809;
    wire [6:0] _810;
    wire [5:0] _811;
    wire [9:0] vga$ray$l$z;
    wire [7:0] _798;
    wire [1:0] _797;
    wire [9:0] _799;
    wire [7:0] _795;
    wire [9:0] _792;
    wire [9:0] _793;
    wire [1:0] _794;
    wire [9:0] _796;
    wire [9:0] vga$ray$eye$p$norm$z;
    wire [19:0] _814;
    wire _815;
    wire [20:0] _816;
    wire [10:0] _817;
    wire [8:0] _818;
    wire [7:0] _819;
    wire [9:0] _821;
    wire [7:0] _822;
    wire _823;
    wire [8:0] _824;
    wire [10:0] _826;
    wire _827;
    wire [11:0] _828;
    wire [1:0] _788;
    wire [1:0] _782;
    wire [1:0] _779;
    wire [3:0] _771;
    wire _763;
    wire [11:0] _764;
    wire [11:0] _760;
    wire [11:0] _765;
    wire _766;
    wire [12:0] _767;
    wire [10:0] _768;
    wire [6:0] _769;
    wire [5:0] _770;
    wire [9:0] vga$ray$l$y;
    wire [7:0] _757;
    wire [9:0] _755;
    wire [1:0] _756;
    wire [9:0] _758;
    wire [7:0] _753;
    wire [9:0] _751;
    wire [1:0] _752;
    wire [9:0] _754;
    wire [9:0] vga$ray$eye$p$norm$y;
    wire [19:0] _773;
    wire _774;
    wire [20:0] _775;
    wire [10:0] _776;
    wire [8:0] _777;
    wire [7:0] _778;
    wire [9:0] _780;
    wire [7:0] _781;
    wire [9:0] _783;
    wire _784;
    wire [10:0] _785;
    wire [1:0] _747;
    wire [1:0] _744;
    wire [3:0] _736;
    wire _728;
    wire [11:0] _729;
    wire [11:0] _725;
    wire [11:0] _730;
    wire _731;
    wire [12:0] _732;
    wire [10:0] _733;
    wire [6:0] _734;
    wire [5:0] _735;
    wire [9:0] vga$ray$l$x;
    wire [7:0] _722;
    wire [1:0] _721;
    wire [9:0] _723;
    wire [7:0] _719;
    wire [9:0] _711;
    wire [7:0] _707;
    wire _705;
    wire [1:0] _706;
    wire [9:0] _708;
    wire [8:0] _702;
    wire _701;
    wire [9:0] _703;
    wire [12:0] _558;
    wire [2:0] _556;
    wire [7:0] _550;
    wire [7:0] _546;
    wire [7:0] _543;
    wire [7:0] _537;
    wire [7:0] _534;
    wire [7:0] _530;
    wire [9:0] _528;
    wire [1:0] _529;
    wire [9:0] _531;
    wire [7:0] _526;
    wire [9:0] _498;
    wire [7:0] _494;
    wire _492;
    wire [1:0] _493;
    wire [9:0] _495;
    wire [8:0] _489;
    wire _488;
    wire [9:0] _490;
    wire [9:0] _392;
    wire [9:0] _390;
    wire [7:0] _386;
    wire _384;
    wire [1:0] _385;
    wire [9:0] _387;
    wire [8:0] _381;
    wire _380;
    wire [9:0] _382;
    wire [9:0] _383;
    wire [9:0] _388;
    wire [9:0] _389;
    wire _377;
    wire [9:0] _391;
    wire [9:0] _393;
    reg [9:0] _394;
    wire [9:0] _51;
    wire _379;
    wire [9:0] _491;
    wire _378;
    wire [9:0] _496;
    wire [9:0] _497;
    wire [8:0] _373;
    wire [6:0] _479;
    wire [6:0] _475;
    wire [6:0] _471;
    wire [11:0] _469;
    wire [4:0] _470;
    wire [11:0] _472;
    wire [6:0] _467;
    wire [6:0] _460;
    wire [10:0] _461;
    wire _462;
    wire [11:0] _463;
    wire [11:0] _465;
    wire [4:0] _466;
    wire [11:0] _468;
    wire [11:0] _473;
    wire [4:0] _474;
    wire [11:0] _476;
    wire [4:0] _477;
    wire [2:0] _478;
    wire [9:0] _480;
    wire [9:0] _404;
    wire [1:0] _395;
    wire [1:0] _396;
    wire [1:0] _52;
    reg [1:0] iter_sel;
    wire [1:0] iter;
    wire [1:0] _53;
    reg [9:0] e;
    wire [9:0] _403;
    wire [9:0] _405;
    wire [9:0] _481;
    reg [9:0] _482;
    wire [9:0] _54;
    wire _371;
    wire _372;
    wire [9:0] _374;
    wire _376;
    wire [9:0] _499;
    wire [3:0] _485;
    wire _484;
    wire [3:0] _486;
    wire [3:0] _55;
    reg [3:0] _487;
    wire [3:0] _56;
    wire _370;
    wire [9:0] _500;
    reg [9:0] _501;
    wire [9:0] _57;
    wire [19:0] _523;
    wire [9:0] _524;
    wire [1:0] _525;
    wire [9:0] _527;
    wire [6:0] _455;
    wire [10:0] _453;
    wire [3:0] _454;
    wire [10:0] _456;
    wire [6:0] _451;
    wire [9:0] _445;
    wire _446;
    wire [10:0] _447;
    wire [10:0] _449;
    wire [3:0] _450;
    wire [10:0] _452;
    wire [6:0] _443;
    wire [9:0] _439;
    wire [2:0] _440;
    wire _441;
    wire [3:0] _442;
    wire [10:0] _444;
    reg [10:0] vga$ray$eye$p$norm$phi;
    wire [10:0] vga$ray$eye$p$phi;
    wire [3:0] _458;
    wire _459;
    wire [9:0] _532;
    wire [1:0] _533;
    wire [9:0] _535;
    wire [1:0] _536;
    wire [9:0] _538;
    wire [1:0] _539;
    wire _540;
    wire [10:0] _541;
    wire [2:0] _542;
    wire [10:0] _544;
    wire [2:0] _545;
    wire [10:0] _547;
    wire [2:0] _548;
    wire [1:0] _549;
    wire [9:0] _551;
    wire [19:0] _552;
    wire _553;
    wire [1:0] _554;
    wire [3:0] _555;
    wire [6:0] _557;
    wire [19:0] _559;
    wire [9:0] _560;
    wire [9:0] _521;
    wire [7:0] _517;
    wire _515;
    wire [1:0] _516;
    wire [9:0] _518;
    wire [8:0] _512;
    wire _511;
    wire [9:0] _513;
    wire [9:0] _514;
    wire [9:0] _519;
    wire [9:0] _520;
    wire _508;
    wire [9:0] _522;
    wire [9:0] _561;
    reg [9:0] _562;
    wire [9:0] _58;
    wire _510;
    wire [9:0] _704;
    wire _509;
    wire [9:0] _709;
    wire [9:0] _710;
    wire [8:0] _505;
    wire [6:0] _693;
    wire [6:0] _689;
    wire [6:0] _685;
    wire [11:0] _683;
    wire [4:0] _684;
    wire [11:0] _686;
    wire [6:0] _681;
    wire [11:0] _464;
    wire [6:0] _675;
    wire [10:0] _676;
    wire _677;
    wire [11:0] _678;
    wire [11:0] _679;
    wire [4:0] _680;
    wire [11:0] _682;
    wire [11:0] _687;
    wire [4:0] _688;
    wire [11:0] _690;
    wire [4:0] _691;
    wire [2:0] _692;
    wire [9:0] _694;
    wire [9:0] _568;
    wire [1:0] _563;
    wire [1:0] _564;
    wire [1:0] _59;
    reg [1:0] iter_sel_0;
    wire [1:0] iter_0;
    wire [1:0] _60;
    reg [9:0] e_0;
    wire [9:0] _567;
    wire [9:0] _569;
    wire [9:0] _695;
    reg [9:0] _696;
    wire [9:0] _61;
    wire _503;
    wire _504;
    wire [9:0] _506;
    wire _507;
    wire [9:0] _712;
    wire [3:0] _698;
    wire _697;
    wire [3:0] _699;
    wire [3:0] _62;
    reg [3:0] _700;
    wire [3:0] _63;
    wire _502;
    wire [9:0] _713;
    reg [9:0] _714;
    wire [9:0] _64;
    wire [19:0] _715;
    wire [9:0] _716;
    wire [9:0] _717;
    wire [1:0] _718;
    wire [9:0] _720;
    wire [6:0] _670;
    wire [10:0] _668;
    wire [3:0] _669;
    wire [10:0] _671;
    wire [6:0] _666;
    wire [10:0] _448;
    wire [9:0] _661;
    wire _662;
    wire [10:0] _663;
    wire [10:0] _664;
    wire [3:0] _665;
    wire [10:0] _667;
    wire [6:0] _659;
    wire [9:0] _655;
    wire [2:0] _656;
    wire _657;
    wire [3:0] _658;
    wire [10:0] _660;
    reg [10:0] vga$ray$eye$p$norm$theta;
    wire [10:0] vga$ray$eye$p$theta;
    wire [3:0] _673;
    wire _674;
    wire [9:0] vga$ray$eye$p$norm$x;
    wire [19:0] _738;
    wire _739;
    wire [20:0] _740;
    wire [10:0] _741;
    wire [8:0] _742;
    wire [7:0] _743;
    wire [9:0] _745;
    wire [7:0] _746;
    wire [9:0] _748;
    wire _749;
    wire [10:0] _750;
    wire [10:0] _786;
    wire [8:0] _787;
    wire [10:0] _789;
    wire _790;
    wire [11:0] _791;
    wire [11:0] _829;
    wire _830;
    wire [12:0] _831;
    wire [10:0] _832;
    wire [9:0] vga$ray$eye$p$norm$dot_norm_l$x;
    reg [9:0] _834;
    wire [9:0] _65;
    wire [9:0] vga$ray$light$x;
    wire [19:0] _1087;
    wire [12:0] _1088;
    wire [20:0] _1091;
    wire _1092;
    wire [21:0] _1093;
    wire [21:0] _1085;
    wire [21:0] _1094;
    wire _1095;
    wire [22:0] _1096;
    wire [19:0] _1097;
    wire [14:0] _1098;
    wire [13:0] _1099;
    wire [18:0] vga$ray$color$rgb$v01$x;
    wire [18:0] vga$ray$color$rgb$x;
    wire _1102;
    wire [19:0] _1103;
    wire [17:0] _1104;
    wire [14:0] _1105;
    wire [13:0] _1106;
    wire [16:0] _1108;
    wire [2:0] _1109;
    wire [11:0] _160;
    wire [10:0] _158;
    wire [6:0] _154;
    wire [6:0] _148;
    wire [10:0] _141;
    wire [7:0] _137;
    wire [12:0] _131;
    wire [2:0] _129;
    wire [19:0] _125;
    wire _126;
    wire [1:0] _127;
    wire [3:0] _128;
    wire [6:0] _130;
    wire [19:0] _132;
    wire [9:0] _133;
    wire [9:0] _1081;
    reg [9:0] e_1;
    wire [9:0] _1080;
    wire [8:0] _964;
    wire [7:0] _1071;
    wire [4:0] _1066;
    wire [7:0] _1067;
    wire [4:0] _1063;
    wire [4:0] _1057;
    wire [4:0] _1054;
    wire [7:0] _1047;
    wire [7:0] _1043;
    wire [12:0] _1040;
    wire [12:0] _1041;
    wire [4:0] _1042;
    wire [12:0] _1044;
    reg [12:0] _1045;
    wire [4:0] _1046;
    wire [12:0] _1048;
    wire _1049;
    wire [13:0] _1050;
    wire [10:0] _1051;
    wire [5:0] _1052;
    wire [4:0] _1053;
    wire [9:0] _1055;
    wire [4:0] _1056;
    wire [9:0] _1058;
    wire [4:0] _1059;
    wire _1060;
    wire [10:0] _1061;
    wire [5:0] _1062;
    wire [10:0] _1064;
    wire [5:0] _1065;
    wire [13:0] _1068;
    wire [5:0] _1069;
    wire [1:0] _1070;
    wire [9:0] _1072;
    wire [9:0] _1038;
    wire [7:0] _1034;
    wire _1032;
    wire [1:0] _1033;
    wire [9:0] _1035;
    wire [8:0] _1029;
    wire _1028;
    wire [9:0] _1030;
    wire [7:0] _1021;
    wire [4:0] _1016;
    wire [7:0] _1017;
    wire [4:0] _1013;
    wire [4:0] _1007;
    wire [4:0] _1004;
    wire [7:0] _997;
    wire [7:0] _993;
    wire [9:0] _987;
    wire [1:0] _988;
    wire _989;
    wire [1:0] _990;
    wire [2:0] _991;
    wire [4:0] _992;
    wire [12:0] _994;
    wire [7:0] _985;
    wire [1:0] _982;
    wire [2:0] _983;
    wire [4:0] _984;
    wire [12:0] _986;
    wire [7:0] _802;
    wire [12:0] _803;
    wire [12:0] _431;
    wire [2:0] _429;
    wire [9:0] _124;
    wire [19:0] _425;
    wire _426;
    wire [1:0] _427;
    wire [3:0] _428;
    wire [6:0] _430;
    wire [19:0] _432;
    wire [9:0] _433;
    wire [9:0] _946;
    wire [9:0] _401;
    wire [9:0] _400;
    wire [9:0] _399;
    wire [9:0] _398;
    reg [9:0] e_2;
    wire [9:0] _945;
    wire [9:0] _375;
    wire [8:0] _838;
    wire [7:0] _936;
    wire [4:0] _931;
    wire [7:0] _932;
    wire [4:0] _928;
    wire [4:0] _922;
    wire [4:0] _919;
    wire [5:0] _912;
    wire [5:0] _908;
    wire [10:0] _906;
    wire [4:0] _907;
    wire [10:0] _909;
    reg [10:0] _910;
    wire [4:0] _911;
    wire [10:0] _913;
    wire _914;
    wire [11:0] _915;
    wire [10:0] _916;
    wire [5:0] _917;
    wire [4:0] _918;
    wire [9:0] _920;
    wire [4:0] _921;
    wire [9:0] _923;
    wire [4:0] _924;
    wire _925;
    wire [10:0] _926;
    wire [5:0] _927;
    wire [10:0] _929;
    wire [5:0] _930;
    wire [13:0] _933;
    wire [5:0] _934;
    wire [1:0] _935;
    wire [9:0] _937;
    wire [9:0] _904;
    wire [7:0] _900;
    wire _898;
    wire [1:0] _899;
    wire [9:0] _901;
    wire [8:0] _895;
    wire _894;
    wire [9:0] _896;
    wire [7:0] _887;
    wire [2:0] _162;
    wire [4:0] _882;
    wire [7:0] _883;
    wire [4:0] _879;
    wire [4:0] _873;
    wire [4:0] _870;
    wire [5:0] _863;
    wire [5:0] _859;
    wire [10:0] _856;
    wire [10:0] _857;
    wire [4:0] _858;
    wire [10:0] _860;
    wire [5:0] _761;
    wire [10:0] _762;
    wire [5:0] _726;
    wire [10:0] _727;
    wire [5:0] _648;
    wire [5:0] _645;
    wire [6:0] _636;
    wire [6:0] _633;
    wire [11:0] _626;
    wire [7:0] _621;
    wire [8:0] _622;
    wire [7:0] _618;
    wire [10:0] vga$ray$xy$y;
    wire _613;
    wire [11:0] _614;
    wire [10:0] _615;
    wire [2:0] _616;
    wire [1:0] _617;
    wire [9:0] _619;
    wire [1:0] _620;
    wire [10:0] _623;
    wire _624;
    wire [11:0] _625;
    wire [11:0] _627;
    wire _628;
    wire [12:0] _629;
    wire [10:0] _630;
    wire [3:0] _631;
    wire [2:0] _632;
    wire [9:0] vga$ray$xy$uv$y;
    wire [2:0] _635;
    wire [9:0] _637;
    wire _638;
    wire [10:0] _639;
    wire _640;
    wire [11:0] _641;
    wire [10:0] _642;
    wire [4:0] _643;
    wire [3:0] _644;
    wire [9:0] vga$ray$screen_uv_eye$dir$y;
    wire [9:0] vga$ray$screen_uv_eye$y;
    wire [9:0] vga$ray$xy$uv$uv_$y;
    wire [3:0] _647;
    wire [9:0] _649;
    wire _650;
    wire [10:0] vga$ray$eye$p$y;
    wire [4:0] _652;
    wire _653;
    wire [5:0] _606;
    wire [5:0] _603;
    wire [6:0] _594;
    wire [6:0] _591;
    wire [11:0] _584;
    wire [7:0] _579;
    wire [8:0] _580;
    wire [7:0] _576;
    wire [10:0] vga$ray$xy$x;
    wire _571;
    wire [11:0] _572;
    wire [10:0] _573;
    wire [2:0] _574;
    wire [1:0] _575;
    wire [9:0] _577;
    wire [1:0] _578;
    wire [10:0] _581;
    wire _582;
    wire [11:0] _583;
    wire [11:0] _585;
    wire _586;
    wire [12:0] _587;
    wire [10:0] _588;
    wire [3:0] _589;
    wire [2:0] _590;
    wire [9:0] vga$ray$xy$uv$x;
    wire [2:0] _593;
    wire [9:0] _595;
    wire _596;
    wire [10:0] _597;
    wire _598;
    wire [11:0] _599;
    wire [10:0] _600;
    wire [4:0] _601;
    wire [3:0] _602;
    wire [9:0] vga$ray$screen_uv_eye$dir$x;
    wire [9:0] vga$ray$screen_uv_eye$x;
    wire [9:0] vga$ray$xy$uv$uv_$x;
    wire [3:0] _605;
    wire [9:0] _607;
    wire _608;
    wire [10:0] vga$ray$eye$p$x;
    wire [4:0] _610;
    wire _611;
    wire [1:0] _654;
    reg [10:0] _861;
    wire [4:0] _862;
    wire [10:0] _864;
    wire _865;
    wire [11:0] _866;
    wire [10:0] _867;
    wire [5:0] _868;
    wire [4:0] _869;
    wire [9:0] _871;
    wire [4:0] _872;
    wire [9:0] _874;
    wire [4:0] _875;
    wire _876;
    wire [10:0] _877;
    wire [5:0] _878;
    wire [10:0] _880;
    wire [5:0] _881;
    wire [13:0] _884;
    wire [5:0] _885;
    wire [1:0] _886;
    wire [9:0] _888;
    wire [9:0] _854;
    wire [7:0] _850;
    wire _848;
    wire [1:0] _849;
    wire [9:0] _851;
    wire [8:0] _845;
    wire [9:0] _846;
    wire [9:0] _847;
    wire [9:0] _852;
    wire [9:0] _853;
    wire _842;
    wire [9:0] _855;
    wire [9:0] _889;
    reg [9:0] _890;
    wire [9:0] _66;
    wire _844;
    wire [9:0] _897;
    wire [1:0] _891;
    wire [1:0] _892;
    wire [1:0] _67;
    reg [1:0] iter_sel_1;
    wire [1:0] iter_1;
    wire [1:0] _68;
    wire _843;
    wire [9:0] _902;
    wire [9:0] _903;
    wire [9:0] _905;
    wire [9:0] _938;
    reg [9:0] _939;
    wire [9:0] _69;
    wire _836;
    wire _837;
    wire [9:0] _839;
    wire _840;
    wire _841;
    wire [9:0] _947;
    wire [3:0] _941;
    wire _940;
    wire [3:0] _942;
    wire [3:0] _70;
    reg [3:0] _943;
    wire [3:0] _71;
    wire _835;
    wire [9:0] _948;
    reg [9:0] _949;
    wire [9:0] _72;
    wire [19:0] _434;
    wire [9:0] _435;
    wire [1:0] _436;
    wire _437;
    wire [12:0] _421;
    wire [7:0] _417;
    wire [11:0] _414;
    wire [7:0] _410;
    wire [9:0] vga$vgaController$o$x;
    wire [9:0] vga$ray$i$x;
    wire _958;
    wire [9:0] vga$vgaController$o$y;
    wire [9:0] vga$ray$i$y;
    wire _957;
    wire _959;
    wire [7:0] _956;
    wire [7:0] _954;
    wire [7:0] _955;
    wire [7:0] _77;
    reg [7:0] _960;
    wire [7:0] _78;
    wire gnd;
    wire [8:0] _406;
    wire _407;
    wire [1:0] _408;
    wire [2:0] _409;
    wire [10:0] _411;
    wire _412;
    wire [11:0] _413;
    wire [11:0] vga$ray$eye$z;
    wire [3:0] _416;
    wire [11:0] _418;
    wire _419;
    wire [12:0] _420;
    wire [12:0] vga$ray$eye$p$z;
    wire [4:0] _423;
    wire _424;
    wire [1:0] _438;
    reg [12:0] _995;
    wire [4:0] _996;
    wire [12:0] _998;
    wire _999;
    wire [13:0] _1000;
    wire [10:0] _1001;
    wire [5:0] _1002;
    wire [4:0] _1003;
    wire [9:0] _1005;
    wire [4:0] _1006;
    wire [9:0] _1008;
    wire [4:0] _1009;
    wire _1010;
    wire [10:0] _1011;
    wire [5:0] _1012;
    wire [10:0] _1014;
    wire [5:0] _1015;
    wire [13:0] _1018;
    wire [5:0] _1019;
    wire [1:0] _1020;
    wire [9:0] _1022;
    wire [9:0] _980;
    wire [7:0] _976;
    wire _974;
    wire [1:0] _975;
    wire [9:0] _977;
    wire [8:0] _971;
    wire [9:0] _972;
    wire [9:0] _973;
    wire [9:0] _978;
    wire [9:0] _979;
    wire _105;
    wire _968;
    wire [9:0] _981;
    wire [9:0] _1023;
    reg [9:0] _1024;
    wire [9:0] _79;
    wire _970;
    wire [9:0] _1031;
    wire [1:0] _230;
    wire [1:0] _231;
    wire [1:0] _1025;
    wire [1:0] _1026;
    wire [1:0] _80;
    reg [1:0] iter_sel_2;
    wire [1:0] iter_2;
    wire [1:0] _81;
    wire _969;
    wire [9:0] _1036;
    wire [9:0] _1037;
    wire [9:0] _1039;
    wire [9:0] _1073;
    reg [9:0] _1074;
    wire [9:0] _82;
    wire _962;
    wire _963;
    wire [9:0] _965;
    wire _966;
    wire _967;
    wire [9:0] _1082;
    wire vga$ray$i$rst_n;
    wire vga$ray$i$clk;
    wire [3:0] _318;
    wire [3:0] _340;
    wire [3:0] _1076;
    wire [3:0] _483;
    wire _1075;
    wire [3:0] _1077;
    wire [3:0] _85;
    reg [3:0] _1078;
    wire [3:0] _86;
    wire _961;
    wire [9:0] _1083;
    reg [9:0] _1084;
    wire [9:0] _87;
    wire [19:0] _134;
    wire [9:0] vga$ray$eye$p$r;
    wire [9:0] vga$ray$eye$length_xyz$x;
    wire [1:0] _136;
    wire [9:0] _138;
    wire _139;
    wire [10:0] _140;
    wire [10:0] _142;
    wire _143;
    wire [11:0] _144;
    wire [10:0] _145;
    wire [3:0] _146;
    wire [2:0] _147;
    wire [9:0] vga$ray$eye$length_xyz$dist__$p__dist_$x;
    wire [9:0] vga$ray$eye$length_xyz$dist__$x;
    wire [2:0] _150;
    wire _151;
    wire [1:0] _152;
    wire [4:0] _153;
    wire [11:0] _155;
    wire _156;
    wire _157;
    wire [11:0] _159;
    wire _161;
    wire [2:0] _1110;
    wire [2:0] vga$ray$o$lr;
    wire _90;
    wire [2:0] _1151;
    reg [1:0] _1152;
    wire [9:0] _1122;
    wire [9:0] _951;
    wire _952;
    wire [9:0] _1114;
    wire [9:0] _1111;
    wire _1112;
    wire [9:0] _1115;
    wire [9:0] _91;
    reg [9:0] _953;
    wire [9:0] _92;
    wire _1123;
    wire [9:0] _1120;
    wire vdd;
    wire vga$i$rst_n;
    wire vga$vgaController$i$rst_n;
    wire vga$i$clk;
    wire vga$vgaController$i$clk;
    wire [9:0] _292;
    wire [9:0] _1113;
    wire [9:0] _1118;
    wire [9:0] _1116;
    wire _1117;
    wire [9:0] _1119;
    wire [9:0] _99;
    reg [9:0] _950;
    wire [9:0] _100;
    wire _1121;
    wire _1124;
    wire _1125;
    wire vga$vgaController$o$blank;
    wire [1:0] _1153;
    reg [1:0] _1154;
    wire [1:0] vga$o$r;
    assign _104 = vga$vgaController$o$hsync | vga$vgaController$o$vsync;
    always @(posedge vga$i$clk) begin
        if (vga$i$rst_n == 0)
            _107 <= _105;
        else
            _107 <= _104;
    end
    assign vga$o$audio = _107;
    assign _111 = 10'b0111101100;
    assign _112 = _92 < _111;
    assign _108 = 10'b0111101010;
    assign _109 = _92 < _108;
    assign _110 = ~ _109;
    assign _113 = _110 & _112;
    assign _114 = ~ _113;
    assign vga$vgaController$o$vsync = _114;
    always @(posedge vga$i$clk) begin
        if (vga$i$rst_n == 0)
            _115 <= _105;
        else
            _115 <= vga$vgaController$o$vsync;
    end
    assign vga$o$vsync = _115;
    assign _119 = 10'b1011110000;
    assign _120 = _100 < _119;
    assign _116 = 10'b1010010000;
    assign _117 = _100 < _116;
    assign _118 = ~ _117;
    assign _121 = _118 & _120;
    assign _122 = ~ _121;
    assign vga$vgaController$o$hsync = _122;
    always @(posedge vga$i$clk) begin
        if (vga$i$rst_n == 0)
            _123 <= _105;
        else
            _123 <= vga$vgaController$o$hsync;
    end
    assign vga$o$hsync = _123;
    always @* begin
        case (vga$counter_div_mod_1$o$quotient)
        0:
            vga$h_border$lb <= vga$white$lb;
        1:
            vga$h_border$lb <= vga$black$lb;
        2:
            vga$h_border$lb <= vga$white$lb;
        3:
            vga$h_border$lb <= vga$black$lb;
        4:
            vga$h_border$lb <= vga$white$lb;
        5:
            vga$h_border$lb <= vga$black$lb;
        6:
            vga$h_border$lb <= vga$white$lb;
        7:
            vga$h_border$lb <= vga$black$lb;
        8:
            vga$h_border$lb <= vga$white$lb;
        9:
            vga$h_border$lb <= vga$black$lb;
        10:
            vga$h_border$lb <= vga$white$lb;
        11:
            vga$h_border$lb <= vga$black$lb;
        12:
            vga$h_border$lb <= vga$white$lb;
        13:
            vga$h_border$lb <= vga$black$lb;
        14:
            vga$h_border$lb <= vga$white$lb;
        15:
            vga$h_border$lb <= vga$black$lb;
        16:
            vga$h_border$lb <= vga$white$lb;
        17:
            vga$h_border$lb <= vga$black$lb;
        18:
            vga$h_border$lb <= vga$white$lb;
        19:
            vga$h_border$lb <= vga$black$lb;
        20:
            vga$h_border$lb <= vga$white$lb;
        21:
            vga$h_border$lb <= vga$black$lb;
        22:
            vga$h_border$lb <= vga$white$lb;
        default:
            vga$h_border$lb <= vga$black$lb;
        endcase
    end
    assign _226 = _189 ? vga$h_border$lb : vga$h_border$lb;
    assign vga$v_border$lb = _222 ? vga$black$lb : vga$white$lb;
    assign _224 = _194 ? vga$v_border$lb : vga$v_border$lb;
    assign _227 = _193 ? _226 : _224;
    assign vga$blue$lb = 3'b111;
    assign vga$red$lb = 3'b000;
    assign vga$magenta$lb = 3'b111;
    assign vga$green$lb = 3'b000;
    assign vga$cyan$lb = 3'b111;
    assign vga$yellow$lb = 3'b000;
    assign vga$white$lb = 3'b111;
    always @* begin
        case (vga$counter_div_mod$o$quotient)
        0:
            vga$bars$lb <= vga$white$lb;
        1:
            vga$bars$lb <= vga$yellow$lb;
        2:
            vga$bars$lb <= vga$cyan$lb;
        3:
            vga$bars$lb <= vga$green$lb;
        4:
            vga$bars$lb <= vga$magenta$lb;
        5:
            vga$bars$lb <= vga$red$lb;
        6:
            vga$bars$lb <= vga$blue$lb;
        default:
            vga$bars$lb <= vga$black$lb;
        endcase
    end
    assign vga$gray7$lb = 3'b111;
    assign vga$gray6$lb = 3'b110;
    assign vga$gray5$lb = 3'b101;
    assign vga$gray4$lb = 3'b100;
    assign vga$gray3$lb = 3'b011;
    assign vga$gray2$lb = 3'b010;
    assign vga$gray1$lb = 3'b001;
    assign vga$gray0$lb = 3'b000;
    assign vga$black$lb = 3'b000;
    always @* begin
        case (vga$counter_div_mod_0$o$quotient)
        0:
            vga$steps$lb <= vga$black$lb;
        1:
            vga$steps$lb <= vga$black$lb;
        2:
            vga$steps$lb <= vga$black$lb;
        3:
            vga$steps$lb <= vga$black$lb;
        4:
            vga$steps$lb <= vga$black$lb;
        5:
            vga$steps$lb <= vga$black$lb;
        6:
            vga$steps$lb <= vga$black$lb;
        7:
            vga$steps$lb <= vga$black$lb;
        8:
            vga$steps$lb <= vga$black$lb;
        9:
            vga$steps$lb <= vga$black$lb;
        10:
            vga$steps$lb <= vga$black$lb;
        11:
            vga$steps$lb <= vga$black$lb;
        12:
            vga$steps$lb <= vga$black$lb;
        13:
            vga$steps$lb <= vga$black$lb;
        14:
            vga$steps$lb <= vga$black$lb;
        15:
            vga$steps$lb <= vga$black$lb;
        16:
            vga$steps$lb <= vga$gray0$lb;
        17:
            vga$steps$lb <= vga$gray1$lb;
        18:
            vga$steps$lb <= vga$gray2$lb;
        19:
            vga$steps$lb <= vga$gray3$lb;
        20:
            vga$steps$lb <= vga$gray4$lb;
        21:
            vga$steps$lb <= vga$gray5$lb;
        22:
            vga$steps$lb <= vga$gray6$lb;
        23:
            vga$steps$lb <= vga$gray7$lb;
        24:
            vga$steps$lb <= vga$gray0$lb;
        25:
            vga$steps$lb <= vga$gray1$lb;
        26:
            vga$steps$lb <= vga$gray2$lb;
        27:
            vga$steps$lb <= vga$gray3$lb;
        28:
            vga$steps$lb <= vga$gray4$lb;
        29:
            vga$steps$lb <= vga$gray5$lb;
        30:
            vga$steps$lb <= vga$gray6$lb;
        default:
            vga$steps$lb <= vga$gray7$lb;
        endcase
    end
    assign vga$default$lb = vga$y_top ? vga$bars$lb : vga$steps$lb;
    assign _228 = _199 ? _227 : vga$default$lb;
    assign _184 = _181[2:0];
    assign _177 = _174[5:0];
    assign _167 = _165[7:0];
    assign vga$ray$light$z = 10'b0000101000;
    assign _165 = $signed(vga$ray$light$z) * $signed(_65);
    assign _166 = _165[19:8];
    assign _168 = { _166,
                    _167 };
    assign _169 = _168[19:19];
    assign _170 = { _169,
                    _168 };
    assign _171 = _163 + _170;
    assign _172 = _171[20:20];
    assign _173 = { _172,
                    _171 };
    assign _174 = _173[21:2];
    assign _175 = _174[19:6];
    assign _176 = _175[12:0];
    assign vga$ray$color$rgb$v01_1$x = { _176,
                                         _177 };
    assign _179 = vga$ray$color$rgb$v01_1$x[18:18];
    assign _180 = { _179,
                    vga$ray$color$rgb$v01_1$x };
    assign _181 = _180[19:3];
    assign _182 = _181[16:3];
    assign _183 = _182[12:0];
    assign _185 = { _183,
                    _184 };
    assign _186 = _185[2:0];
    assign _187 = _161 ? _186 : _162;
    assign vga$ray$o$lb = _187;
    assign _229 = _90 ? _228 : vga$ray$o$lb;
    always @* begin
        case (_229)
        0:
            _234 <= _230;
        1:
            _234 <= _231;
        2:
            _234 <= _232;
        3:
            _234 <= _232;
        4:
            _234 <= _232;
        5:
            _234 <= _233;
        6:
            _234 <= _233;
        default:
            _234 <= _233;
        endcase
    end
    assign _235 = vga$vgaController$o$blank ? _230 : _234;
    always @(posedge vga$i$clk) begin
        if (vga$i$rst_n == 0)
            _236 <= _230;
        else
            _236 <= _235;
    end
    assign vga$o$b = _236;
    always @* begin
        case (vga$counter_div_mod_1$o$quotient)
        0:
            vga$h_border$lg <= vga$white$lg;
        1:
            vga$h_border$lg <= vga$black$lg;
        2:
            vga$h_border$lg <= vga$white$lg;
        3:
            vga$h_border$lg <= vga$black$lg;
        4:
            vga$h_border$lg <= vga$white$lg;
        5:
            vga$h_border$lg <= vga$black$lg;
        6:
            vga$h_border$lg <= vga$white$lg;
        7:
            vga$h_border$lg <= vga$black$lg;
        8:
            vga$h_border$lg <= vga$white$lg;
        9:
            vga$h_border$lg <= vga$black$lg;
        10:
            vga$h_border$lg <= vga$white$lg;
        11:
            vga$h_border$lg <= vga$black$lg;
        12:
            vga$h_border$lg <= vga$white$lg;
        13:
            vga$h_border$lg <= vga$black$lg;
        14:
            vga$h_border$lg <= vga$white$lg;
        15:
            vga$h_border$lg <= vga$black$lg;
        16:
            vga$h_border$lg <= vga$white$lg;
        17:
            vga$h_border$lg <= vga$black$lg;
        18:
            vga$h_border$lg <= vga$white$lg;
        19:
            vga$h_border$lg <= vga$black$lg;
        20:
            vga$h_border$lg <= vga$white$lg;
        21:
            vga$h_border$lg <= vga$black$lg;
        22:
            vga$h_border$lg <= vga$white$lg;
        default:
            vga$h_border$lg <= vga$black$lg;
        endcase
    end
    assign _283 = _189 ? vga$h_border$lg : vga$h_border$lg;
    assign vga$v_border$lg = _222 ? vga$black$lg : vga$white$lg;
    assign _281 = _194 ? vga$v_border$lg : vga$v_border$lg;
    assign _284 = _193 ? _283 : _281;
    assign vga$blue$lg = 3'b000;
    assign vga$red$lg = 3'b000;
    assign vga$magenta$lg = 3'b000;
    assign vga$green$lg = 3'b111;
    assign vga$cyan$lg = 3'b111;
    assign vga$yellow$lg = 3'b111;
    assign vga$white$lg = 3'b111;
    always @* begin
        case (vga$counter_div_mod$o$quotient)
        0:
            vga$bars$lg <= vga$white$lg;
        1:
            vga$bars$lg <= vga$yellow$lg;
        2:
            vga$bars$lg <= vga$cyan$lg;
        3:
            vga$bars$lg <= vga$green$lg;
        4:
            vga$bars$lg <= vga$magenta$lg;
        5:
            vga$bars$lg <= vga$red$lg;
        6:
            vga$bars$lg <= vga$blue$lg;
        default:
            vga$bars$lg <= vga$black$lg;
        endcase
    end
    assign vga$gray7$lg = 3'b111;
    assign vga$gray6$lg = 3'b110;
    assign vga$gray5$lg = 3'b101;
    assign vga$gray4$lg = 3'b100;
    assign vga$gray3$lg = 3'b011;
    assign vga$gray2$lg = 3'b010;
    assign vga$gray1$lg = 3'b001;
    assign vga$gray0$lg = 3'b000;
    assign vga$black$lg = 3'b000;
    always @* begin
        case (vga$counter_div_mod_0$o$quotient)
        0:
            vga$steps$lg <= vga$black$lg;
        1:
            vga$steps$lg <= vga$black$lg;
        2:
            vga$steps$lg <= vga$black$lg;
        3:
            vga$steps$lg <= vga$black$lg;
        4:
            vga$steps$lg <= vga$black$lg;
        5:
            vga$steps$lg <= vga$black$lg;
        6:
            vga$steps$lg <= vga$black$lg;
        7:
            vga$steps$lg <= vga$black$lg;
        8:
            vga$steps$lg <= vga$gray0$lg;
        9:
            vga$steps$lg <= vga$gray1$lg;
        10:
            vga$steps$lg <= vga$gray2$lg;
        11:
            vga$steps$lg <= vga$gray3$lg;
        12:
            vga$steps$lg <= vga$gray4$lg;
        13:
            vga$steps$lg <= vga$gray5$lg;
        14:
            vga$steps$lg <= vga$gray6$lg;
        15:
            vga$steps$lg <= vga$gray7$lg;
        16:
            vga$steps$lg <= vga$black$lg;
        17:
            vga$steps$lg <= vga$black$lg;
        18:
            vga$steps$lg <= vga$black$lg;
        19:
            vga$steps$lg <= vga$black$lg;
        20:
            vga$steps$lg <= vga$black$lg;
        21:
            vga$steps$lg <= vga$black$lg;
        22:
            vga$steps$lg <= vga$black$lg;
        23:
            vga$steps$lg <= vga$black$lg;
        24:
            vga$steps$lg <= vga$gray0$lg;
        25:
            vga$steps$lg <= vga$gray1$lg;
        26:
            vga$steps$lg <= vga$gray2$lg;
        27:
            vga$steps$lg <= vga$gray3$lg;
        28:
            vga$steps$lg <= vga$gray4$lg;
        29:
            vga$steps$lg <= vga$gray5$lg;
        30:
            vga$steps$lg <= vga$gray6$lg;
        default:
            vga$steps$lg <= vga$gray7$lg;
        endcase
    end
    assign vga$default$lg = vga$y_top ? vga$bars$lg : vga$steps$lg;
    assign _285 = _199 ? _284 : vga$default$lg;
    assign _257 = _254[2:0];
    assign _250 = _247[5:0];
    assign _240 = _238[7:0];
    assign vga$ray$light$y = 10'b0000101000;
    assign _238 = $signed(vga$ray$light$y) * $signed(_65);
    assign _239 = _238[19:8];
    assign _241 = { _239,
                    _240 };
    assign _242 = _241[19:19];
    assign _243 = { _242,
                    _241 };
    assign _163 = 21'b000000000000000011001;
    assign _244 = _163 + _243;
    assign _245 = _244[20:20];
    assign _246 = { _245,
                    _244 };
    assign _247 = _246[21:2];
    assign _248 = _247[19:6];
    assign _249 = _248[12:0];
    assign vga$ray$color$rgb$v01_0$x = { _249,
                                         _250 };
    assign _252 = vga$ray$color$rgb$v01_0$x[18:18];
    assign _253 = { _252,
                    vga$ray$color$rgb$v01_0$x };
    assign _254 = _253[19:3];
    assign _255 = _254[16:3];
    assign _256 = _255[12:0];
    assign _258 = { _256,
                    _257 };
    assign _259 = _258[2:0];
    assign _260 = _161 ? _259 : _162;
    assign vga$ray$o$lg = _260;
    assign _286 = _90 ? _285 : vga$ray$o$lg;
    always @* begin
        case (_286)
        0:
            _287 <= _230;
        1:
            _287 <= _231;
        2:
            _287 <= _232;
        3:
            _287 <= _232;
        4:
            _287 <= _232;
        5:
            _287 <= _233;
        6:
            _287 <= _233;
        default:
            _287 <= _233;
        endcase
    end
    assign _288 = vga$vgaController$o$blank ? _230 : _287;
    always @(posedge vga$i$clk) begin
        if (vga$i$rst_n == 0)
            _289 <= _230;
        else
            _289 <= _288;
    end
    assign vga$o$g = _289;
    assign _233 = 2'b11;
    assign _232 = 2'b10;
    assign vga$counter_div_mod_1$i$set_quotient = _290;
    assign _315 = vga$counter_div_mod_1$i$set ? vga$counter_div_mod_1$i$set_quotient : _290;
    assign _314 = _16 + _300;
    assign _316 = _311 ? _315 : _314;
    assign _312 = vga$counter_div_mod_1$i$incr & _295;
    assign _306 = 5'b11000;
    assign _16 = _291;
    assign _307 = _16 == _306;
    assign _294 = 5'b11001;
    assign vga$counter_div_mod_1$i$clear = _293;
    assign vga$counter_div_mod_1$i$clock = vga$i$clk;
    assign vga$counter_div_mod_1$i$set_remainder = _290;
    assign _302 = vga$counter_div_mod_1$i$set ? vga$counter_div_mod_1$i$set_remainder : _290;
    assign _301 = _21 + _300;
    assign _303 = _298 ? _302 : _301;
    assign _296 = _295 | _22;
    assign _297 = vga$counter_div_mod_1$i$incr & _296;
    assign _298 = vga$counter_div_mod_1$i$set | _297;
    assign _299 = _298 | vga$counter_div_mod_1$i$incr;
    assign _304 = _299 ? _303 : _21;
    assign _20 = _304;
    always @(posedge vga$counter_div_mod_1$i$clock) begin
        if (vga$counter_div_mod_1$i$clear)
            _305 <= _290;
        else
            _305 <= _20;
    end
    assign _21 = _305;
    assign _295 = _21 == _294;
    assign _308 = _295 & _307;
    assign _22 = _308;
    assign vga$counter_div_mod_1$i$incr = vdd;
    assign _310 = vga$counter_div_mod_1$i$incr & _22;
    assign vga$counter_div_mod_1$i$set = gnd;
    assign _311 = vga$counter_div_mod_1$i$set | _310;
    assign _313 = _311 | _312;
    assign _317 = _313 ? _316 : _16;
    assign _25 = _317;
    always @(posedge vga$counter_div_mod_1$i$clock) begin
        if (vga$counter_div_mod_1$i$clear)
            _291 <= _290;
        else
            _291 <= _25;
    end
    assign vga$counter_div_mod_1$o$quotient = _291;
    always @* begin
        case (vga$counter_div_mod_1$o$quotient)
        0:
            vga$h_border$lr <= vga$white$lr;
        1:
            vga$h_border$lr <= vga$black$lr;
        2:
            vga$h_border$lr <= vga$white$lr;
        3:
            vga$h_border$lr <= vga$black$lr;
        4:
            vga$h_border$lr <= vga$white$lr;
        5:
            vga$h_border$lr <= vga$black$lr;
        6:
            vga$h_border$lr <= vga$white$lr;
        7:
            vga$h_border$lr <= vga$black$lr;
        8:
            vga$h_border$lr <= vga$white$lr;
        9:
            vga$h_border$lr <= vga$black$lr;
        10:
            vga$h_border$lr <= vga$white$lr;
        11:
            vga$h_border$lr <= vga$black$lr;
        12:
            vga$h_border$lr <= vga$white$lr;
        13:
            vga$h_border$lr <= vga$black$lr;
        14:
            vga$h_border$lr <= vga$white$lr;
        15:
            vga$h_border$lr <= vga$black$lr;
        16:
            vga$h_border$lr <= vga$white$lr;
        17:
            vga$h_border$lr <= vga$black$lr;
        18:
            vga$h_border$lr <= vga$white$lr;
        19:
            vga$h_border$lr <= vga$black$lr;
        20:
            vga$h_border$lr <= vga$white$lr;
        21:
            vga$h_border$lr <= vga$black$lr;
        22:
            vga$h_border$lr <= vga$white$lr;
        default:
            vga$h_border$lr <= vga$black$lr;
        endcase
    end
    assign _1148 = _189 ? vga$h_border$lr : vga$h_border$lr;
    assign _221 = vga$vgaController$o$y[9:6];
    assign _222 = _221[0:0];
    assign vga$v_border$lr = _222 ? vga$black$lr : vga$white$lr;
    assign _1146 = _194 ? vga$v_border$lr : vga$v_border$lr;
    assign _1149 = _193 ? _1148 : _1146;
    assign vga$blue$lr = 3'b000;
    assign vga$red$lr = 3'b111;
    assign vga$magenta$lr = 3'b111;
    assign vga$green$lr = 3'b000;
    assign vga$cyan$lr = 3'b000;
    assign vga$yellow$lr = 3'b111;
    assign vga$white$lr = 3'b111;
    assign vga$counter_div_mod$i$set_quotient = _318;
    assign _342 = vga$counter_div_mod$i$set ? vga$counter_div_mod$i$set_quotient : _318;
    assign _341 = _28 + _340;
    assign _343 = _337 ? _342 : _341;
    assign _338 = vga$counter_div_mod$i$incr & _322;
    assign _333 = 4'b1000;
    assign _28 = _319;
    assign _334 = _28 == _333;
    assign _321 = 7'b1001111;
    assign vga$counter_div_mod$i$clear = _293;
    assign vga$counter_div_mod$i$clock = vga$i$clk;
    assign vga$counter_div_mod$i$set_remainder = _320;
    assign _320 = 7'b0000000;
    assign _329 = vga$counter_div_mod$i$set ? vga$counter_div_mod$i$set_remainder : _320;
    assign _327 = 7'b0000001;
    assign _328 = _33 + _327;
    assign _330 = _325 ? _329 : _328;
    assign _323 = _322 | _34;
    assign _324 = vga$counter_div_mod$i$incr & _323;
    assign _325 = vga$counter_div_mod$i$set | _324;
    assign _326 = _325 | vga$counter_div_mod$i$incr;
    assign _331 = _326 ? _330 : _33;
    assign _32 = _331;
    always @(posedge vga$counter_div_mod$i$clock) begin
        if (vga$counter_div_mod$i$clear)
            _332 <= _320;
        else
            _332 <= _32;
    end
    assign _33 = _332;
    assign _322 = _33 == _321;
    assign _335 = _322 & _334;
    assign _34 = _335;
    assign vga$counter_div_mod$i$incr = vdd;
    assign _336 = vga$counter_div_mod$i$incr & _34;
    assign vga$counter_div_mod$i$set = gnd;
    assign _337 = vga$counter_div_mod$i$set | _336;
    assign _339 = _337 | _338;
    assign _344 = _339 ? _343 : _28;
    assign _37 = _344;
    always @(posedge vga$counter_div_mod$i$clock) begin
        if (vga$counter_div_mod$i$clear)
            _319 <= _318;
        else
            _319 <= _37;
    end
    assign vga$counter_div_mod$o$quotient = _319;
    always @* begin
        case (vga$counter_div_mod$o$quotient)
        0:
            vga$bars$lr <= vga$white$lr;
        1:
            vga$bars$lr <= vga$yellow$lr;
        2:
            vga$bars$lr <= vga$cyan$lr;
        3:
            vga$bars$lr <= vga$green$lr;
        4:
            vga$bars$lr <= vga$magenta$lr;
        5:
            vga$bars$lr <= vga$red$lr;
        6:
            vga$bars$lr <= vga$blue$lr;
        default:
            vga$bars$lr <= vga$black$lr;
        endcase
    end
    assign vga$black$lr = 3'b000;
    assign vga$gray7$lr = 3'b111;
    assign vga$gray6$lr = 3'b110;
    assign vga$gray5$lr = 3'b101;
    assign vga$gray4$lr = 3'b100;
    assign vga$gray3$lr = 3'b011;
    assign vga$gray2$lr = 3'b010;
    assign vga$gray1$lr = 3'b001;
    assign vga$gray0$lr = 3'b000;
    assign vga$counter_div_mod_0$i$set_quotient = _345;
    assign _345 = 6'b000000;
    assign _367 = vga$counter_div_mod_0$i$set ? vga$counter_div_mod_0$i$set_quotient : _345;
    assign _365 = 6'b000001;
    assign _366 = _40 + _365;
    assign _368 = _362 ? _367 : _366;
    assign _363 = vga$counter_div_mod_0$i$incr & _348;
    assign _358 = 6'b100000;
    assign _40 = _346;
    assign _359 = _40 == _358;
    assign _347 = 5'b10011;
    assign _293 = vga$vgaController$o$x == _292;
    assign vga$counter_div_mod_0$i$clear = _293;
    assign vga$counter_div_mod_0$i$clock = vga$i$clk;
    assign vga$counter_div_mod_0$i$set_remainder = _290;
    assign _290 = 5'b00000;
    assign _354 = vga$counter_div_mod_0$i$set ? vga$counter_div_mod_0$i$set_remainder : _290;
    assign _300 = 5'b00001;
    assign _353 = _45 + _300;
    assign _355 = _351 ? _354 : _353;
    assign _349 = _348 | _46;
    assign _350 = vga$counter_div_mod_0$i$incr & _349;
    assign _351 = vga$counter_div_mod_0$i$set | _350;
    assign _352 = _351 | vga$counter_div_mod_0$i$incr;
    assign _356 = _352 ? _355 : _45;
    assign _44 = _356;
    always @(posedge vga$counter_div_mod_0$i$clock) begin
        if (vga$counter_div_mod_0$i$clear)
            _357 <= _290;
        else
            _357 <= _44;
    end
    assign _45 = _357;
    assign _348 = _45 == _347;
    assign _360 = _348 & _359;
    assign _46 = _360;
    assign vga$counter_div_mod_0$i$incr = vdd;
    assign _361 = vga$counter_div_mod_0$i$incr & _46;
    assign vga$counter_div_mod_0$i$set = gnd;
    assign _362 = vga$counter_div_mod_0$i$set | _361;
    assign _364 = _362 | _363;
    assign _369 = _364 ? _368 : _40;
    assign _49 = _369;
    always @(posedge vga$counter_div_mod_0$i$clock) begin
        if (vga$counter_div_mod_0$i$clear)
            _346 <= _345;
        else
            _346 <= _49;
    end
    assign vga$counter_div_mod_0$o$quotient = _346;
    always @* begin
        case (vga$counter_div_mod_0$o$quotient)
        0:
            vga$steps$lr <= vga$gray0$lr;
        1:
            vga$steps$lr <= vga$gray1$lr;
        2:
            vga$steps$lr <= vga$gray2$lr;
        3:
            vga$steps$lr <= vga$gray3$lr;
        4:
            vga$steps$lr <= vga$gray4$lr;
        5:
            vga$steps$lr <= vga$gray5$lr;
        6:
            vga$steps$lr <= vga$gray6$lr;
        7:
            vga$steps$lr <= vga$gray7$lr;
        8:
            vga$steps$lr <= vga$black$lr;
        9:
            vga$steps$lr <= vga$black$lr;
        10:
            vga$steps$lr <= vga$black$lr;
        11:
            vga$steps$lr <= vga$black$lr;
        12:
            vga$steps$lr <= vga$black$lr;
        13:
            vga$steps$lr <= vga$black$lr;
        14:
            vga$steps$lr <= vga$black$lr;
        15:
            vga$steps$lr <= vga$black$lr;
        16:
            vga$steps$lr <= vga$black$lr;
        17:
            vga$steps$lr <= vga$black$lr;
        18:
            vga$steps$lr <= vga$black$lr;
        19:
            vga$steps$lr <= vga$black$lr;
        20:
            vga$steps$lr <= vga$black$lr;
        21:
            vga$steps$lr <= vga$black$lr;
        22:
            vga$steps$lr <= vga$black$lr;
        23:
            vga$steps$lr <= vga$black$lr;
        24:
            vga$steps$lr <= vga$gray0$lr;
        25:
            vga$steps$lr <= vga$gray1$lr;
        26:
            vga$steps$lr <= vga$gray2$lr;
        27:
            vga$steps$lr <= vga$gray3$lr;
        28:
            vga$steps$lr <= vga$gray4$lr;
        29:
            vga$steps$lr <= vga$gray5$lr;
        30:
            vga$steps$lr <= vga$gray6$lr;
        default:
            vga$steps$lr <= vga$gray7$lr;
        endcase
    end
    assign _200 = 10'b0011110000;
    assign vga$y_top = vga$vgaController$o$y < _200;
    assign vga$default$lr = vga$y_top ? vga$bars$lr : vga$steps$lr;
    assign _195 = 10'b1001111000;
    assign _196 = vga$vgaController$o$x < _195;
    assign _197 = ~ _196;
    assign _194 = vga$vgaController$o$x < _188;
    assign _198 = _194 | _197;
    assign _190 = 10'b0111011000;
    assign _191 = vga$vgaController$o$y < _190;
    assign _192 = ~ _191;
    assign _188 = 10'b0000001000;
    assign _189 = vga$vgaController$o$y < _188;
    assign _193 = _189 | _192;
    assign _199 = _193 | _198;
    assign _1150 = _199 ? _1149 : vga$default$lr;
    assign _1107 = _1104[2:0];
    assign _1100 = _1097[4:0];
    assign _1089 = _1087[6:0];
    assign _1090 = { _1089,
                     _105 };
    assign _825 = _821[1:0];
    assign _820 = _817[1:0];
    assign _812 = _809[3:0];
    assign _804 = _803[12:12];
    assign _805 = { _804,
                    _803 };
    assign _801 = 14'b00010000000000;
    assign _806 = _801 - _805;
    assign _807 = _806[13:13];
    assign _808 = { _807,
                    _806 };
    assign _809 = _808[14:4];
    assign _810 = _809[10:4];
    assign _811 = _810[5:0];
    assign vga$ray$l$z = { _811,
                           _812 };
    assign _798 = _792[7:0];
    assign _797 = _792[9:8];
    assign _799 = { _797,
                    _798 };
    assign _795 = _793[7:0];
    assign _792 = _523[19:10];
    assign _793 = _292 - _792;
    assign _794 = _793[9:8];
    assign _796 = { _794,
                    _795 };
    assign vga$ray$eye$p$norm$z = _459 ? _799 : _796;
    assign _814 = $signed(vga$ray$eye$p$norm$z) * $signed(vga$ray$l$z);
    assign _815 = _814[19:19];
    assign _816 = { _815,
                    _814 };
    assign _817 = _816[20:10];
    assign _818 = _817[10:2];
    assign _819 = _818[7:0];
    assign _821 = { _819,
                    _820 };
    assign _822 = _821[9:2];
    assign _823 = _822[7:7];
    assign _824 = { _823,
                    _822 };
    assign _826 = { _824,
                    _825 };
    assign _827 = _826[10:10];
    assign _828 = { _827,
                    _826 };
    assign _788 = _786[1:0];
    assign _782 = _780[1:0];
    assign _779 = _776[1:0];
    assign _771 = _768[3:0];
    assign _763 = _762[10:10];
    assign _764 = { _763,
                    _762 };
    assign _760 = 12'b000010000000;
    assign _765 = _760 - _764;
    assign _766 = _765[11:11];
    assign _767 = { _766,
                    _765 };
    assign _768 = _767[12:2];
    assign _769 = _768[10:4];
    assign _770 = _769[5:0];
    assign vga$ray$l$y = { _770,
                           _771 };
    assign _757 = _755[7:0];
    assign _755 = _292 - _751;
    assign _756 = _755[9:8];
    assign _758 = { _756,
                    _757 };
    assign _753 = _751[7:0];
    assign _751 = _715[9:0];
    assign _752 = _751[9:8];
    assign _754 = { _752,
                    _753 };
    assign vga$ray$eye$p$norm$y = _674 ? _758 : _754;
    assign _773 = $signed(vga$ray$eye$p$norm$y) * $signed(vga$ray$l$y);
    assign _774 = _773[19:19];
    assign _775 = { _774,
                    _773 };
    assign _776 = _775[20:10];
    assign _777 = _776[10:2];
    assign _778 = _777[7:0];
    assign _780 = { _778,
                    _779 };
    assign _781 = _780[9:2];
    assign _783 = { _781,
                    _782 };
    assign _784 = _783[9:9];
    assign _785 = { _784,
                    _783 };
    assign _747 = _745[1:0];
    assign _744 = _741[1:0];
    assign _736 = _733[3:0];
    assign _728 = _727[10:10];
    assign _729 = { _728,
                    _727 };
    assign _725 = 12'b000100000000;
    assign _730 = _725 - _729;
    assign _731 = _730[11:11];
    assign _732 = { _731,
                    _730 };
    assign _733 = _732[12:2];
    assign _734 = _733[10:4];
    assign _735 = _734[5:0];
    assign vga$ray$l$x = { _735,
                           _736 };
    assign _722 = _716[7:0];
    assign _721 = _716[9:8];
    assign _723 = { _721,
                    _722 };
    assign _719 = _717[7:0];
    assign _711 = _64 - _709;
    assign _707 = _704[9:2];
    assign _705 = _704[9:9];
    assign _706 = { _705,
                    _705 };
    assign _708 = { _706,
                    _707 };
    assign _702 = _58[9:1];
    assign _701 = _58[9:9];
    assign _703 = { _701,
                    _702 };
    assign _558 = _552[19:7];
    assign _556 = { _554,
                    _553 };
    assign _550 = _547[7:0];
    assign _546 = _544[7:0];
    assign _543 = _541[7:0];
    assign _537 = _535[7:0];
    assign _534 = _532[7:0];
    assign _530 = _528[7:0];
    assign _528 = _292 - _524;
    assign _529 = _528[9:8];
    assign _531 = { _529,
                    _530 };
    assign _526 = _524[7:0];
    assign _498 = _57 - _496;
    assign _494 = _491[9:2];
    assign _492 = _491[9:9];
    assign _493 = { _492,
                    _492 };
    assign _495 = { _493,
                    _494 };
    assign _489 = _51[9:1];
    assign _488 = _51[9:9];
    assign _490 = { _488,
                    _489 };
    assign _392 = 10'b0010011100;
    assign _390 = _51 + _388;
    assign _386 = _383[9:2];
    assign _384 = _383[9:9];
    assign _385 = { _384,
                    _384 };
    assign _387 = { _385,
                    _386 };
    assign _381 = _57[9:1];
    assign _380 = _57[9:9];
    assign _382 = { _380,
                    _381 };
    assign _383 = _379 ? _382 : _57;
    assign _388 = _378 ? _387 : _383;
    assign _389 = _51 - _388;
    assign _377 = _105 ^ _376;
    assign _391 = _377 ? _390 : _389;
    assign _393 = _370 ? _392 : _391;
    always @(posedge vga$ray$i$clk) begin
        _394 <= _393;
    end
    assign _51 = _394;
    assign _379 = _53[0:0];
    assign _491 = _379 ? _490 : _51;
    assign _378 = _53[1:1];
    assign _496 = _378 ? _495 : _491;
    assign _497 = _57 + _496;
    assign _373 = _54[8:0];
    assign _479 = _476[6:0];
    assign _475 = _473[6:0];
    assign _471 = _469[6:0];
    assign _469 = _463 + _464;
    assign _470 = _469[11:7];
    assign _472 = { _470,
                    _471 };
    assign _467 = _465[6:0];
    assign _460 = vga$ray$eye$p$norm$phi[6:0];
    assign _461 = { _458,
                    _460 };
    assign _462 = _461[10:10];
    assign _463 = { _462,
                    _461 };
    assign _465 = _463 - _464;
    assign _466 = _465[11:7];
    assign _468 = { _466,
                    _467 };
    assign _473 = _459 ? _472 : _468;
    assign _474 = _473[11:7];
    assign _476 = { _474,
                    _475 };
    assign _477 = _476[11:7];
    assign _478 = _477[2:0];
    assign _480 = { _478,
                    _479 };
    assign _404 = _54 + e;
    assign _395 = _53 + _231;
    assign _396 = _370 ? _230 : _395;
    assign _52 = _396;
    always @(posedge vga$ray$i$clk) begin
        iter_sel <= _52;
    end
    assign _53 = iter_sel;
    always @* begin
        case (_53)
        0:
            e <= _398;
        1:
            e <= _399;
        2:
            e <= _400;
        default:
            e <= _401;
        endcase
    end
    assign _403 = _54 - e;
    assign _405 = _376 ? _404 : _403;
    assign _481 = _370 ? _480 : _405;
    always @(posedge vga$ray$i$clk) begin
        _482 <= _481;
    end
    assign _54 = _482;
    assign _371 = _54[9:9];
    assign _372 = ~ _371;
    assign _374 = { _372,
                    _373 };
    assign _376 = _374 < _375;
    assign _499 = _376 ? _498 : _497;
    assign _485 = _56 + _340;
    assign _484 = _56 == _483;
    assign _486 = _484 ? _318 : _485;
    assign _55 = _486;
    always @(posedge vga$ray$i$clk) begin
        if (vga$ray$i$rst_n == 0)
            _487 <= _318;
        else
            _487 <= _55;
    end
    assign _56 = _487;
    assign _370 = _56 == _318;
    assign _500 = _370 ? _292 : _499;
    always @(posedge vga$ray$i$clk) begin
        _501 <= _500;
    end
    assign _57 = _501;
    assign _523 = { _57,
                    _51 };
    assign _524 = _523[9:0];
    assign _525 = _524[9:8];
    assign _527 = { _525,
                    _526 };
    assign _455 = _453[6:0];
    assign _453 = _447 - _448;
    assign _454 = _453[10:7];
    assign _456 = { _454,
                    _455 };
    assign _451 = _449[6:0];
    assign _445 = { _440,
                    _443 };
    assign _446 = _445[9:9];
    assign _447 = { _446,
                    _445 };
    assign _449 = _447 + _448;
    assign _450 = _449[10:7];
    assign _452 = { _450,
                    _451 };
    assign _443 = _439[6:0];
    assign _439 = _134[19:10];
    assign _440 = _439[9:7];
    assign _441 = _440[2:2];
    assign _442 = { _441,
                    _440 };
    assign _444 = { _442,
                    _443 };
    always @* begin
        case (_438)
        0:
            vga$ray$eye$p$norm$phi <= _444;
        1:
            vga$ray$eye$p$norm$phi <= _444;
        2:
            vga$ray$eye$p$norm$phi <= _452;
        default:
            vga$ray$eye$p$norm$phi <= _456;
        endcase
    end
    assign _458 = vga$ray$eye$p$norm$phi[10:7];
    assign _459 = _458[3:3];
    assign _532 = _459 ? _531 : _527;
    assign _533 = _532[9:8];
    assign _535 = { _533,
                    _534 };
    assign _536 = _535[9:8];
    assign _538 = { _536,
                    _537 };
    assign _539 = _538[9:8];
    assign _540 = _539[1:1];
    assign _541 = { _540,
                    _538 };
    assign _542 = _541[10:8];
    assign _544 = { _542,
                    _543 };
    assign _545 = _544[10:8];
    assign _547 = { _545,
                    _546 };
    assign _548 = _547[10:8];
    assign _549 = _548[1:0];
    assign _551 = { _549,
                    _550 };
    assign _552 = $signed(_551) * $signed(_124);
    assign _553 = _552[19:19];
    assign _554 = { _553,
                    _553 };
    assign _555 = { _554,
                    _554 };
    assign _557 = { _555,
                    _556 };
    assign _559 = { _557,
                    _558 };
    assign _560 = _559[9:0];
    assign _521 = _58 + _519;
    assign _517 = _514[9:2];
    assign _515 = _514[9:9];
    assign _516 = { _515,
                    _515 };
    assign _518 = { _516,
                    _517 };
    assign _512 = _64[9:1];
    assign _511 = _64[9:9];
    assign _513 = { _511,
                    _512 };
    assign _514 = _510 ? _513 : _64;
    assign _519 = _509 ? _518 : _514;
    assign _520 = _58 - _519;
    assign _508 = _105 ^ _507;
    assign _522 = _508 ? _521 : _520;
    assign _561 = _502 ? _560 : _522;
    always @(posedge vga$ray$i$clk) begin
        _562 <= _561;
    end
    assign _58 = _562;
    assign _510 = _60[0:0];
    assign _704 = _510 ? _703 : _58;
    assign _509 = _60[1:1];
    assign _709 = _509 ? _708 : _704;
    assign _710 = _64 + _709;
    assign _505 = _61[8:0];
    assign _693 = _690[6:0];
    assign _689 = _687[6:0];
    assign _685 = _683[6:0];
    assign _683 = _678 + _464;
    assign _684 = _683[11:7];
    assign _686 = { _684,
                    _685 };
    assign _681 = _679[6:0];
    assign _464 = 12'b000011001001;
    assign _675 = vga$ray$eye$p$norm$theta[6:0];
    assign _676 = { _673,
                    _675 };
    assign _677 = _676[10:10];
    assign _678 = { _677,
                    _676 };
    assign _679 = _678 - _464;
    assign _680 = _679[11:7];
    assign _682 = { _680,
                    _681 };
    assign _687 = _674 ? _686 : _682;
    assign _688 = _687[11:7];
    assign _690 = { _688,
                    _689 };
    assign _691 = _690[11:7];
    assign _692 = _691[2:0];
    assign _694 = { _692,
                    _693 };
    assign _568 = _61 + e_0;
    assign _563 = _60 + _231;
    assign _564 = _502 ? _230 : _563;
    assign _59 = _564;
    always @(posedge vga$ray$i$clk) begin
        iter_sel_0 <= _59;
    end
    assign _60 = iter_sel_0;
    always @* begin
        case (_60)
        0:
            e_0 <= _398;
        1:
            e_0 <= _399;
        2:
            e_0 <= _400;
        default:
            e_0 <= _401;
        endcase
    end
    assign _567 = _61 - e_0;
    assign _569 = _507 ? _568 : _567;
    assign _695 = _502 ? _694 : _569;
    always @(posedge vga$ray$i$clk) begin
        _696 <= _695;
    end
    assign _61 = _696;
    assign _503 = _61[9:9];
    assign _504 = ~ _503;
    assign _506 = { _504,
                    _505 };
    assign _507 = _506 < _375;
    assign _712 = _507 ? _711 : _710;
    assign _698 = _63 + _340;
    assign _697 = _63 == _483;
    assign _699 = _697 ? _318 : _698;
    assign _62 = _699;
    always @(posedge vga$ray$i$clk) begin
        if (vga$ray$i$rst_n == 0)
            _700 <= _318;
        else
            _700 <= _62;
    end
    assign _63 = _700;
    assign _502 = _63 == _318;
    assign _713 = _502 ? _292 : _712;
    always @(posedge vga$ray$i$clk) begin
        _714 <= _713;
    end
    assign _64 = _714;
    assign _715 = { _64,
                    _58 };
    assign _716 = _715[19:10];
    assign _717 = _292 - _716;
    assign _718 = _717[9:8];
    assign _720 = { _718,
                    _719 };
    assign _670 = _668[6:0];
    assign _668 = _663 - _448;
    assign _669 = _668[10:7];
    assign _671 = { _669,
                    _670 };
    assign _666 = _664[6:0];
    assign _448 = 11'b00011001001;
    assign _661 = { _656,
                    _659 };
    assign _662 = _661[9:9];
    assign _663 = { _662,
                    _661 };
    assign _664 = _663 + _448;
    assign _665 = _664[10:7];
    assign _667 = { _665,
                    _666 };
    assign _659 = _655[6:0];
    assign _655 = _434[19:10];
    assign _656 = _655[9:7];
    assign _657 = _656[2:2];
    assign _658 = { _657,
                    _656 };
    assign _660 = { _658,
                    _659 };
    always @* begin
        case (_654)
        0:
            vga$ray$eye$p$norm$theta <= _660;
        1:
            vga$ray$eye$p$norm$theta <= _660;
        2:
            vga$ray$eye$p$norm$theta <= _667;
        default:
            vga$ray$eye$p$norm$theta <= _671;
        endcase
    end
    assign _673 = vga$ray$eye$p$norm$theta[10:7];
    assign _674 = _673[3:3];
    assign vga$ray$eye$p$norm$x = _674 ? _723 : _720;
    assign _738 = $signed(vga$ray$eye$p$norm$x) * $signed(vga$ray$l$x);
    assign _739 = _738[19:19];
    assign _740 = { _739,
                    _738 };
    assign _741 = _740[20:10];
    assign _742 = _741[10:2];
    assign _743 = _742[7:0];
    assign _745 = { _743,
                    _744 };
    assign _746 = _745[9:2];
    assign _748 = { _746,
                    _747 };
    assign _749 = _748[9:9];
    assign _750 = { _749,
                    _748 };
    assign _786 = _750 + _785;
    assign _787 = _786[10:2];
    assign _789 = { _787,
                    _788 };
    assign _790 = _789[10:10];
    assign _791 = { _790,
                    _789 };
    assign _829 = _791 + _828;
    assign _830 = _829[11:11];
    assign _831 = { _830,
                    _829 };
    assign _832 = _831[12:2];
    assign vga$ray$eye$p$norm$dot_norm_l$x = _832[9:0];
    always @(posedge vga$ray$i$clk) begin
        if (vga$ray$i$rst_n == 0)
            _834 <= _292;
        else
            _834 <= vga$ray$eye$p$norm$dot_norm_l$x;
    end
    assign _65 = _834;
    assign vga$ray$light$x = 10'b0001110011;
    assign _1087 = $signed(vga$ray$light$x) * $signed(_65);
    assign _1088 = _1087[19:7];
    assign _1091 = { _1088,
                     _1090 };
    assign _1092 = _1091[20:20];
    assign _1093 = { _1092,
                     _1091 };
    assign _1085 = 22'b0000000000000000011001;
    assign _1094 = _1085 + _1093;
    assign _1095 = _1094[21:21];
    assign _1096 = { _1095,
                     _1094 };
    assign _1097 = _1096[22:3];
    assign _1098 = _1097[19:5];
    assign _1099 = _1098[13:0];
    assign vga$ray$color$rgb$v01$x = { _1099,
                                       _1100 };
    assign _1102 = vga$ray$color$rgb$v01$x[18:18];
    assign _1103 = { _1102,
                     vga$ray$color$rgb$v01$x };
    assign _1104 = _1103[19:2];
    assign _1105 = _1104[17:3];
    assign _1106 = _1105[13:0];
    assign _1108 = { _1106,
                     _1107 };
    assign _1109 = _1108[2:0];
    assign _160 = 12'b110000000000;
    assign _158 = _155[10:0];
    assign _154 = vga$ray$eye$length_xyz$dist__$p__dist_$x[6:0];
    assign _148 = _145[6:0];
    assign _141 = 11'b00100000000;
    assign _137 = vga$ray$eye$p$r[7:0];
    assign _131 = _125[19:7];
    assign _129 = { _127,
                    _126 };
    assign _125 = $signed(_79) * $signed(_124);
    assign _126 = _125[19:19];
    assign _127 = { _126,
                    _126 };
    assign _128 = { _127,
                    _127 };
    assign _130 = { _128,
                    _129 };
    assign _132 = { _130,
                    _131 };
    assign _133 = _132[9:0];
    assign _1081 = _87 + e_1;
    always @* begin
        case (_81)
        0:
            e_1 <= _398;
        1:
            e_1 <= _399;
        2:
            e_1 <= _400;
        default:
            e_1 <= _401;
        endcase
    end
    assign _1080 = _87 - e_1;
    assign _964 = _82[8:0];
    assign _1071 = _1068[7:0];
    assign _1066 = _1064[4:0];
    assign _1067 = { _1066,
                     _162 };
    assign _1063 = _1061[4:0];
    assign _1057 = _1055[4:0];
    assign _1054 = _1051[4:0];
    assign _1047 = _1045[7:0];
    assign _1043 = _1041[7:0];
    assign _1040 = 13'b0000000000000;
    assign _1041 = _1040 - vga$ray$eye$p$z;
    assign _1042 = _1041[12:8];
    assign _1044 = { _1042,
                     _1043 };
    always @* begin
        case (_438)
        0:
            _1045 <= _986;
        1:
            _1045 <= _986;
        2:
            _1045 <= _1044;
        default:
            _1045 <= _803;
        endcase
    end
    assign _1046 = _1045[12:8];
    assign _1048 = { _1046,
                     _1047 };
    assign _1049 = _1048[12:12];
    assign _1050 = { _1049,
                     _1048 };
    assign _1051 = _1050[13:3];
    assign _1052 = _1051[10:5];
    assign _1053 = _1052[4:0];
    assign _1055 = { _1053,
                     _1054 };
    assign _1056 = _1055[9:5];
    assign _1058 = { _1056,
                     _1057 };
    assign _1059 = _1058[9:5];
    assign _1060 = _1059[4:4];
    assign _1061 = { _1060,
                     _1058 };
    assign _1062 = _1061[10:5];
    assign _1064 = { _1062,
                     _1063 };
    assign _1065 = _1064[10:5];
    assign _1068 = { _1065,
                     _1067 };
    assign _1069 = _1068[13:8];
    assign _1070 = _1069[1:0];
    assign _1072 = { _1070,
                     _1071 };
    assign _1038 = _82 - _1036;
    assign _1034 = _1031[9:2];
    assign _1032 = _1031[9:9];
    assign _1033 = { _1032,
                     _1032 };
    assign _1035 = { _1033,
                     _1034 };
    assign _1029 = _79[9:1];
    assign _1028 = _79[9:9];
    assign _1030 = { _1028,
                     _1029 };
    assign _1021 = _1018[7:0];
    assign _1016 = _1014[4:0];
    assign _1017 = { _1016,
                     _162 };
    assign _1013 = _1011[4:0];
    assign _1007 = _1005[4:0];
    assign _1004 = _1001[4:0];
    assign _997 = _995[7:0];
    assign _993 = _987[7:0];
    assign _987 = _292 - _435;
    assign _988 = _987[9:8];
    assign _989 = _988[1:1];
    assign _990 = { _989,
                    _989 };
    assign _991 = { _990,
                    _989 };
    assign _992 = { _991,
                    _988 };
    assign _994 = { _992,
                    _993 };
    assign _985 = _435[7:0];
    assign _982 = { _437,
                    _437 };
    assign _983 = { _982,
                    _437 };
    assign _984 = { _983,
                    _436 };
    assign _986 = { _984,
                    _985 };
    assign _802 = vga$ray$eye$p$z[7:0];
    assign _803 = { _423,
                    _802 };
    assign _431 = _425[19:7];
    assign _429 = { _427,
                    _426 };
    assign _124 = 10'b0001001110;
    assign _425 = $signed(_66) * $signed(_124);
    assign _426 = _425[19:19];
    assign _427 = { _426,
                    _426 };
    assign _428 = { _427,
                    _427 };
    assign _430 = { _428,
                    _429 };
    assign _432 = { _430,
                    _431 };
    assign _433 = _432[9:0];
    assign _946 = _72 + e_2;
    assign _401 = 10'b0000010000;
    assign _400 = 10'b0000011111;
    assign _399 = 10'b0000111011;
    assign _398 = 10'b0001100101;
    always @* begin
        case (_68)
        0:
            e_2 <= _398;
        1:
            e_2 <= _399;
        2:
            e_2 <= _400;
        default:
            e_2 <= _401;
        endcase
    end
    assign _945 = _72 - e_2;
    assign _375 = 10'b1000000000;
    assign _838 = _69[8:0];
    assign _936 = _933[7:0];
    assign _931 = _929[4:0];
    assign _932 = { _931,
                    _162 };
    assign _928 = _926[4:0];
    assign _922 = _920[4:0];
    assign _919 = _916[4:0];
    assign _912 = _910[5:0];
    assign _908 = _906[5:0];
    assign _906 = _856 - vga$ray$eye$p$x;
    assign _907 = _906[10:6];
    assign _909 = { _907,
                    _908 };
    always @* begin
        case (_654)
        0:
            _910 <= _762;
        1:
            _910 <= _762;
        2:
            _910 <= _909;
        default:
            _910 <= _727;
        endcase
    end
    assign _911 = _910[10:6];
    assign _913 = { _911,
                    _912 };
    assign _914 = _913[10:10];
    assign _915 = { _914,
                    _913 };
    assign _916 = _915[11:1];
    assign _917 = _916[10:5];
    assign _918 = _917[4:0];
    assign _920 = { _918,
                    _919 };
    assign _921 = _920[9:5];
    assign _923 = { _921,
                    _922 };
    assign _924 = _923[9:5];
    assign _925 = _924[4:4];
    assign _926 = { _925,
                    _923 };
    assign _927 = _926[10:5];
    assign _929 = { _927,
                    _928 };
    assign _930 = _929[10:5];
    assign _933 = { _930,
                    _932 };
    assign _934 = _933[13:8];
    assign _935 = _934[1:0];
    assign _937 = { _935,
                    _936 };
    assign _904 = _69 - _902;
    assign _900 = _897[9:2];
    assign _898 = _897[9:9];
    assign _899 = { _898,
                    _898 };
    assign _901 = { _899,
                    _900 };
    assign _895 = _66[9:1];
    assign _894 = _66[9:9];
    assign _896 = { _894,
                    _895 };
    assign _887 = _884[7:0];
    assign _162 = 3'b000;
    assign _882 = _880[4:0];
    assign _883 = { _882,
                    _162 };
    assign _879 = _877[4:0];
    assign _873 = _871[4:0];
    assign _870 = _867[4:0];
    assign _863 = _861[5:0];
    assign _859 = _857[5:0];
    assign _856 = 11'b00000000000;
    assign _857 = _856 - vga$ray$eye$p$y;
    assign _858 = _857[10:6];
    assign _860 = { _858,
                    _859 };
    assign _761 = vga$ray$eye$p$y[5:0];
    assign _762 = { _652,
                    _761 };
    assign _726 = vga$ray$eye$p$x[5:0];
    assign _727 = { _610,
                    _726 };
    assign _648 = vga$ray$screen_uv_eye$dir$y[5:0];
    assign _645 = _642[5:0];
    assign _636 = vga$ray$xy$uv$y[6:0];
    assign _633 = _630[6:0];
    assign _626 = 12'b000011111000;
    assign _621 = _619[7:0];
    assign _622 = { _621,
                    _105 };
    assign _618 = _615[7:0];
    assign vga$ray$xy$y = { gnd,
                            vga$ray$i$y };
    assign _613 = vga$ray$xy$y[10:10];
    assign _614 = { _613,
                    vga$ray$xy$y };
    assign _615 = _614[11:1];
    assign _616 = _615[10:8];
    assign _617 = _616[1:0];
    assign _619 = { _617,
                    _618 };
    assign _620 = _619[9:8];
    assign _623 = { _620,
                    _622 };
    assign _624 = _623[10:10];
    assign _625 = { _624,
                    _623 };
    assign _627 = _625 - _626;
    assign _628 = _627[11:11];
    assign _629 = { _628,
                    _627 };
    assign _630 = _629[12:2];
    assign _631 = _630[10:7];
    assign _632 = _631[2:0];
    assign vga$ray$xy$uv$y = { _632,
                               _633 };
    assign _635 = vga$ray$xy$uv$y[9:7];
    assign _637 = { _635,
                    _636 };
    assign _638 = _637[9:9];
    assign _639 = { _638,
                    _637 };
    assign _640 = _639[10:10];
    assign _641 = { _640,
                    _639 };
    assign _642 = _641[11:1];
    assign _643 = _642[10:6];
    assign _644 = _643[3:0];
    assign vga$ray$screen_uv_eye$dir$y = { _644,
                                           _645 };
    assign _647 = vga$ray$screen_uv_eye$dir$y[9:6];
    assign _649 = { _647,
                    _648 };
    assign _650 = _649[9:9];
    assign vga$ray$eye$p$y = { _650,
                               _649 };
    assign _652 = vga$ray$eye$p$y[10:6];
    assign _653 = _652[4:4];
    assign _606 = vga$ray$screen_uv_eye$dir$x[5:0];
    assign _603 = _600[5:0];
    assign _594 = vga$ray$xy$uv$x[6:0];
    assign _591 = _588[6:0];
    assign _584 = 12'b000101001000;
    assign _579 = _577[7:0];
    assign _580 = { _579,
                    _105 };
    assign _576 = _573[7:0];
    assign vga$ray$xy$x = { gnd,
                            vga$ray$i$x };
    assign _571 = vga$ray$xy$x[10:10];
    assign _572 = { _571,
                    vga$ray$xy$x };
    assign _573 = _572[11:1];
    assign _574 = _573[10:8];
    assign _575 = _574[1:0];
    assign _577 = { _575,
                    _576 };
    assign _578 = _577[9:8];
    assign _581 = { _578,
                    _580 };
    assign _582 = _581[10:10];
    assign _583 = { _582,
                    _581 };
    assign _585 = _583 - _584;
    assign _586 = _585[11:11];
    assign _587 = { _586,
                    _585 };
    assign _588 = _587[12:2];
    assign _589 = _588[10:7];
    assign _590 = _589[2:0];
    assign vga$ray$xy$uv$x = { _590,
                               _591 };
    assign _593 = vga$ray$xy$uv$x[9:7];
    assign _595 = { _593,
                    _594 };
    assign _596 = _595[9:9];
    assign _597 = { _596,
                    _595 };
    assign _598 = _597[10:10];
    assign _599 = { _598,
                    _597 };
    assign _600 = _599[11:1];
    assign _601 = _600[10:6];
    assign _602 = _601[3:0];
    assign vga$ray$screen_uv_eye$dir$x = { _602,
                                           _603 };
    assign _605 = vga$ray$screen_uv_eye$dir$x[9:6];
    assign _607 = { _605,
                    _606 };
    assign _608 = _607[9:9];
    assign vga$ray$eye$p$x = { _608,
                               _607 };
    assign _610 = vga$ray$eye$p$x[10:6];
    assign _611 = _610[4:4];
    assign _654 = { _611,
                    _653 };
    always @* begin
        case (_654)
        0:
            _861 <= _727;
        1:
            _861 <= _727;
        2:
            _861 <= _762;
        default:
            _861 <= _860;
        endcase
    end
    assign _862 = _861[10:6];
    assign _864 = { _862,
                    _863 };
    assign _865 = _864[10:10];
    assign _866 = { _865,
                    _864 };
    assign _867 = _866[11:1];
    assign _868 = _867[10:5];
    assign _869 = _868[4:0];
    assign _871 = { _869,
                    _870 };
    assign _872 = _871[9:5];
    assign _874 = { _872,
                    _873 };
    assign _875 = _874[9:5];
    assign _876 = _875[4:4];
    assign _877 = { _876,
                    _874 };
    assign _878 = _877[10:5];
    assign _880 = { _878,
                    _879 };
    assign _881 = _880[10:5];
    assign _884 = { _881,
                    _883 };
    assign _885 = _884[13:8];
    assign _886 = _885[1:0];
    assign _888 = { _886,
                    _887 };
    assign _854 = _66 + _852;
    assign _850 = _847[9:2];
    assign _848 = _847[9:9];
    assign _849 = { _848,
                    _848 };
    assign _851 = { _849,
                    _850 };
    assign _845 = _69[9:1];
    assign _846 = { _836,
                    _845 };
    assign _847 = _844 ? _846 : _69;
    assign _852 = _843 ? _851 : _847;
    assign _853 = _66 - _852;
    assign _842 = _105 ^ _841;
    assign _855 = _842 ? _854 : _853;
    assign _889 = _835 ? _888 : _855;
    always @(posedge vga$ray$i$clk) begin
        _890 <= _889;
    end
    assign _66 = _890;
    assign _844 = _68[0:0];
    assign _897 = _844 ? _896 : _66;
    assign _891 = _68 + _231;
    assign _892 = _835 ? _230 : _891;
    assign _67 = _892;
    always @(posedge vga$ray$i$clk) begin
        iter_sel_1 <= _67;
    end
    assign _68 = iter_sel_1;
    assign _843 = _68[1:1];
    assign _902 = _843 ? _901 : _897;
    assign _903 = _69 + _902;
    assign _905 = _841 ? _904 : _903;
    assign _938 = _835 ? _937 : _905;
    always @(posedge vga$ray$i$clk) begin
        _939 <= _938;
    end
    assign _69 = _939;
    assign _836 = _69[9:9];
    assign _837 = ~ _836;
    assign _839 = { _837,
                    _838 };
    assign _840 = _839 < _375;
    assign _841 = ~ _840;
    assign _947 = _841 ? _946 : _945;
    assign _941 = _71 + _340;
    assign _940 = _71 == _483;
    assign _942 = _940 ? _318 : _941;
    assign _70 = _942;
    always @(posedge vga$ray$i$clk) begin
        if (vga$ray$i$rst_n == 0)
            _943 <= _318;
        else
            _943 <= _70;
    end
    assign _71 = _943;
    assign _835 = _71 == _318;
    assign _948 = _835 ? _292 : _947;
    always @(posedge vga$ray$i$clk) begin
        _949 <= _948;
    end
    assign _72 = _949;
    assign _434 = { _72,
                    _433 };
    assign _435 = _434[9:0];
    assign _436 = _435[9:8];
    assign _437 = _436[1:1];
    assign _421 = 13'b1110110010110;
    assign _417 = vga$ray$eye$z[7:0];
    assign _414 = 12'b001110000000;
    assign _410 = _406[7:0];
    assign vga$vgaController$o$x = _950;
    assign vga$ray$i$x = vga$vgaController$o$x;
    assign _958 = vga$ray$i$x == _292;
    assign vga$vgaController$o$y = _953;
    assign vga$ray$i$y = vga$vgaController$o$y;
    assign _957 = vga$ray$i$y == _292;
    assign _959 = _957 & _958;
    assign _956 = 8'b00000000;
    assign _954 = 8'b00000001;
    assign _955 = _78 + _954;
    assign _77 = _955;
    always @(posedge vga$ray$i$clk) begin
        if (vga$ray$i$rst_n == 0)
            _960 <= _956;
        else
            if (_959)
                _960 <= _77;
    end
    assign _78 = _960;
    assign gnd = 1'b0;
    assign _406 = { gnd,
                    _78 };
    assign _407 = _406[8:8];
    assign _408 = { _407,
                    _407 };
    assign _409 = { _408,
                    _407 };
    assign _411 = { _409,
                    _410 };
    assign _412 = _411[10:10];
    assign _413 = { _412,
                    _411 };
    assign vga$ray$eye$z = _413 + _414;
    assign _416 = vga$ray$eye$z[11:8];
    assign _418 = { _416,
                    _417 };
    assign _419 = _418[11:11];
    assign _420 = { _419,
                    _418 };
    assign vga$ray$eye$p$z = _420 + _421;
    assign _423 = vga$ray$eye$p$z[12:8];
    assign _424 = _423[4:4];
    assign _438 = { _424,
                    _437 };
    always @* begin
        case (_438)
        0:
            _995 <= _803;
        1:
            _995 <= _803;
        2:
            _995 <= _986;
        default:
            _995 <= _994;
        endcase
    end
    assign _996 = _995[12:8];
    assign _998 = { _996,
                    _997 };
    assign _999 = _998[12:12];
    assign _1000 = { _999,
                     _998 };
    assign _1001 = _1000[13:3];
    assign _1002 = _1001[10:5];
    assign _1003 = _1002[4:0];
    assign _1005 = { _1003,
                     _1004 };
    assign _1006 = _1005[9:5];
    assign _1008 = { _1006,
                     _1007 };
    assign _1009 = _1008[9:5];
    assign _1010 = _1009[4:4];
    assign _1011 = { _1010,
                     _1008 };
    assign _1012 = _1011[10:5];
    assign _1014 = { _1012,
                     _1013 };
    assign _1015 = _1014[10:5];
    assign _1018 = { _1015,
                     _1017 };
    assign _1019 = _1018[13:8];
    assign _1020 = _1019[1:0];
    assign _1022 = { _1020,
                     _1021 };
    assign _980 = _79 + _978;
    assign _976 = _973[9:2];
    assign _974 = _973[9:9];
    assign _975 = { _974,
                    _974 };
    assign _977 = { _975,
                    _976 };
    assign _971 = _82[9:1];
    assign _972 = { _962,
                    _971 };
    assign _973 = _970 ? _972 : _82;
    assign _978 = _969 ? _977 : _973;
    assign _979 = _79 - _978;
    assign _105 = 1'b0;
    assign _968 = _105 ^ _967;
    assign _981 = _968 ? _980 : _979;
    assign _1023 = _961 ? _1022 : _981;
    always @(posedge vga$ray$i$clk) begin
        _1024 <= _1023;
    end
    assign _79 = _1024;
    assign _970 = _81[0:0];
    assign _1031 = _970 ? _1030 : _79;
    assign _230 = 2'b00;
    assign _231 = 2'b01;
    assign _1025 = _81 + _231;
    assign _1026 = _961 ? _230 : _1025;
    assign _80 = _1026;
    always @(posedge vga$ray$i$clk) begin
        iter_sel_2 <= _80;
    end
    assign _81 = iter_sel_2;
    assign _969 = _81[1:1];
    assign _1036 = _969 ? _1035 : _1031;
    assign _1037 = _82 + _1036;
    assign _1039 = _967 ? _1038 : _1037;
    assign _1073 = _961 ? _1072 : _1039;
    always @(posedge vga$ray$i$clk) begin
        _1074 <= _1073;
    end
    assign _82 = _1074;
    assign _962 = _82[9:9];
    assign _963 = ~ _962;
    assign _965 = { _963,
                    _964 };
    assign _966 = _965 < _375;
    assign _967 = ~ _966;
    assign _1082 = _967 ? _1081 : _1080;
    assign vga$ray$i$rst_n = vga$i$rst_n;
    assign vga$ray$i$clk = vga$i$clk;
    assign _318 = 4'b0000;
    assign _340 = 4'b0001;
    assign _1076 = _86 + _340;
    assign _483 = 4'b0100;
    assign _1075 = _86 == _483;
    assign _1077 = _1075 ? _318 : _1076;
    assign _85 = _1077;
    always @(posedge vga$ray$i$clk) begin
        if (vga$ray$i$rst_n == 0)
            _1078 <= _318;
        else
            _1078 <= _85;
    end
    assign _86 = _1078;
    assign _961 = _86 == _318;
    assign _1083 = _961 ? _292 : _1082;
    always @(posedge vga$ray$i$clk) begin
        _1084 <= _1083;
    end
    assign _87 = _1084;
    assign _134 = { _87,
                    _133 };
    assign vga$ray$eye$p$r = _134[9:0];
    assign _136 = vga$ray$eye$p$r[9:8];
    assign _138 = { _136,
                    _137 };
    assign _139 = _138[9:9];
    assign _140 = { _139,
                    _138 };
    assign _142 = _140 - _141;
    assign _143 = _142[10:10];
    assign _144 = { _143,
                    _142 };
    assign _145 = _144[11:1];
    assign _146 = _145[10:7];
    assign _147 = _146[2:0];
    assign vga$ray$eye$length_xyz$dist__$p__dist_$x = { _147,
                                                        _148 };
    assign _150 = vga$ray$eye$length_xyz$dist__$p__dist_$x[9:7];
    assign _151 = _150[2:2];
    assign _152 = { _151,
                    _151 };
    assign _153 = { _152,
                    _150 };
    assign _155 = { _153,
                    _154 };
    assign _156 = _155[11:11];
    assign _157 = ~ _156;
    assign _159 = { _157,
                    _158 };
    assign _161 = _159 < _160;
    assign _1110 = _161 ? _1109 : _162;
    assign vga$ray$o$lr = _1110;
    assign _90 = test;
    assign _1151 = _90 ? _1150 : vga$ray$o$lr;
    always @* begin
        case (_1151)
        0:
            _1152 <= _230;
        1:
            _1152 <= _231;
        2:
            _1152 <= _232;
        3:
            _1152 <= _232;
        4:
            _1152 <= _232;
        5:
            _1152 <= _233;
        6:
            _1152 <= _233;
        default:
            _1152 <= _233;
        endcase
    end
    assign _1122 = 10'b0111100000;
    assign _951 = 10'b1010001111;
    assign _952 = _100 == _951;
    assign _1114 = _92 + _1113;
    assign _1111 = 10'b1000001100;
    assign _1112 = _92 == _1111;
    assign _1115 = _1112 ? _292 : _1114;
    assign _91 = _1115;
    always @(posedge vga$vgaController$i$clk) begin
        if (vga$vgaController$i$rst_n == 0)
            _953 <= _292;
        else
            if (_952)
                _953 <= _91;
    end
    assign _92 = _953;
    assign _1123 = _92 < _1122;
    assign _1120 = 10'b1010000000;
    assign vdd = 1'b1;
    assign vga$i$rst_n = rst_n;
    assign vga$vgaController$i$rst_n = vga$i$rst_n;
    assign vga$i$clk = clk;
    assign vga$vgaController$i$clk = vga$i$clk;
    assign _292 = 10'b0000000000;
    assign _1113 = 10'b0000000001;
    assign _1118 = _100 + _1113;
    assign _1116 = 10'b1100011111;
    assign _1117 = _100 == _1116;
    assign _1119 = _1117 ? _292 : _1118;
    assign _99 = _1119;
    always @(posedge vga$vgaController$i$clk) begin
        if (vga$vgaController$i$rst_n == 0)
            _950 <= _292;
        else
            _950 <= _99;
    end
    assign _100 = _950;
    assign _1121 = _100 < _1120;
    assign _1124 = _1121 & _1123;
    assign _1125 = ~ _1124;
    assign vga$vgaController$o$blank = _1125;
    assign _1153 = vga$vgaController$o$blank ? _230 : _1152;
    always @(posedge vga$i$clk) begin
        if (vga$i$rst_n == 0)
            _1154 <= _230;
        else
            _1154 <= _1153;
    end
    assign vga$o$r = _1154;
    assign vga$ray$color$rgb$z = vga$ray$color$rgb$v01_1$x;
    assign vga$ray$color$rgb$y = vga$ray$color$rgb$v01_0$x;
    assign iter = iter_sel;
    assign vga$ray$eye$p$phi = vga$ray$eye$p$norm$phi;
    assign iter_0 = iter_sel_0;
    assign vga$ray$eye$p$theta = vga$ray$eye$p$norm$theta;
    assign vga$ray$color$rgb$x = vga$ray$color$rgb$v01$x;
    assign vga$ray$screen_uv_eye$y = vga$ray$screen_uv_eye$dir$y;
    assign vga$ray$xy$uv$uv_$y = vga$ray$screen_uv_eye$dir$y;
    assign vga$ray$screen_uv_eye$x = vga$ray$screen_uv_eye$dir$x;
    assign vga$ray$xy$uv$uv_$x = vga$ray$screen_uv_eye$dir$x;
    assign iter_1 = iter_sel_1;
    assign iter_2 = iter_sel_2;
    assign vga$ray$eye$length_xyz$x = vga$ray$eye$p$r;
    assign vga$ray$eye$length_xyz$dist__$x = vga$ray$eye$length_xyz$dist__$p__dist_$x;
    assign r = vga$o$r;
    assign g = vga$o$g;
    assign b = vga$o$b;
    assign hsync = vga$o$hsync;
    assign vsync = vga$o$vsync;
    assign audio = vga$o$audio;