module __float64__trunc( input wire [63:0] f, output wire [63:0] out ); function automatic priority_sel_1b_2way (input reg [1:0] sel, input reg case0, input reg case1, input reg default_value); begin casez (sel) 2'b?1: begin priority_sel_1b_2way = case0; end 2'b10: begin priority_sel_1b_2way = case1; end 2'b00: begin priority_sel_1b_2way = default_value; end default: begin // Propagate X priority_sel_1b_2way = 1'dx; end endcase end endfunction wire [10:0] f_bexp__1; wire [51:0] f_fraction__1; wire [10:0] EXPR_MASK; wire [10:0] exp; wire or_620; wire eq_622; wire eq_623; wire [51:0] fractional_mask__2; wire or_634; wire nor_635; wire [51:0] sel_639; wire f_sign__1; wire [63:0] tuple_655; assign f_bexp__1 = f[62:52]; assign f_fraction__1 = f[51:0]; assign EXPR_MASK = 11'h7ff; assign exp = f_bexp__1 + 11'h401; assign or_620 = f_bexp__1[10] | (&f_bexp__1[9:0]); assign eq_622 = f_fraction__1 == 52'h0_0000_0000_0000; assign eq_623 = f_bexp__1 == EXPR_MASK; assign fractional_mask__2 = {{21{exp[10]}}, exp} >= 32'h0000_0034 ? 52'h0_0000_0000_0000 : 52'hf_ffff_ffff_ffff >> {{21{exp[10]}}, exp}; assign or_634 = f_bexp__1 == 11'h000 & eq_622 | eq_623 & eq_622; assign nor_635 = ~(~eq_623 | eq_622); assign sel_639 = f_bexp__1 < 11'h433 ? ~(~f_fraction__1 | fractional_mask__2 | ~{52{or_620}}) : f_fraction__1; assign f_sign__1 = f[63:63]; assign tuple_655 = {~(nor_635 | ~f_sign__1), f_bexp__1 & {11{or_620}}, {priority_sel_1b_2way({or_634, nor_635}, 1'h1, 1'h0, sel_639[51]), sel_639[50:0] & {51{~(or_634 | nor_635)}}}}; assign out = tuple_655; endmodule