module __float32__sub( input wire [31:0] x, input wire [31:0] y, output wire [31:0] out ); function automatic [1:0] priority_sel_2b_2way (input reg [1:0] sel, input reg [1:0] case0, input reg [1:0] case1, input reg [1:0] default_value); begin casez (sel) 2'b?1: begin priority_sel_2b_2way = case0; end 2'b10: begin priority_sel_2b_2way = case1; end 2'b00: begin priority_sel_2b_2way = default_value; end default: begin // Propagate X priority_sel_2b_2way = 2'dx; end endcase end endfunction function automatic [2:0] priority_sel_3b_2way (input reg [1:0] sel, input reg [2:0] case0, input reg [2:0] case1, input reg [2:0] default_value); begin casez (sel) 2'b?1: begin priority_sel_3b_2way = case0; end 2'b10: begin priority_sel_3b_2way = case1; end 2'b00: begin priority_sel_3b_2way = default_value; end default: begin // Propagate X priority_sel_3b_2way = 3'dx; end endcase end endfunction 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 [7:0] y_bexp__2; wire literal_29086; wire [7:0] x_bexp__2; wire [7:0] y__1_bexpnot__1; wire [8:0] x_bexp_extended__2; wire [8:0] y__1_bexpnot_extended__1; wire [8:0] full_result; wire overflow_detected; wire [22:0] y_fraction__2; wire [22:0] tuple_index_29094; wire [7:0] x_bexp__3; wire [7:0] literal_29096; wire [7:0] y_bexp__3; wire literal_29098; wire [22:0] x_fraction__1; wire [22:0] y_fraction__3; wire nc; wire y_sign__2; wire [23:0] fraction_x; wire [23:0] fraction_y; wire [23:0] sign_ext_29108; wire [7:0] narrowed_result; wire [7:0] x_bexpor_mask__1; wire tuple_index_29113; wire [23:0] fraction_x__1; wire [23:0] fraction_y__1; wire [2:0] xddend_x__2_squeezed_const_lsb_bits; wire [7:0] result; wire x_sign__1; wire y_sign__3; wire [24:0] wide_x_squeezed; wire [26:0] wide_y_shift_bits; wire [7:0] shift; wire [26:0] shrl_29127; wire [27:0] shll_29129; wire [24:0] xddend_x__2_squeezed; wire [1:0] literal_29131; wire [23:0] literal_29139; wire [25:0] add_29140; wire sticky; wire [27:0] concat_29146; wire [27:0] xbs_fraction__1; wire carry_bit; wire nor_29187; wire nor_29182; wire nor_29183; wire nor_29173; wire nor_29174; wire and_29216; wire nor_29218; wire nor_29220; wire and_29213; wire nor_29209; wire and_29205; wire nor_29206; wire nor_29200; wire nor_29202; wire and_29245; wire nor_29226; wire nor_29227; wire and_29266; wire [1:0] priority_sel_29267; wire and_29262; wire and_29258; wire and_29254; wire [2:0] concat_29280; wire [2:0] concat_29277; wire [2:0] concat_29276; wire [2:0] concat_29274; wire [2:0] concat_29273; wire and_29285; wire [3:0] concat_29289; wire [3:0] sel_29398; wire [4:0] concat_29297; wire [4:0] leading_zeroes; wire [28:0] cancel_fraction; wire [26:0] cancel_fraction__1; wire [26:0] carry_fraction__1; wire [26:0] shifted_fraction; wire [2:0] normal_chunk; wire [2:0] fraction_shift__3; wire [1:0] half_way_chunk; wire do_round_up; wire [24:0] add_29317; wire rounding_carry; wire [8:0] add_29330; wire [5:0] sub_29331; wire fraction_is_zero; wire [9:0] wide_exponent_associative_element; wire [9:0] wide_exponent_associative_element__1; wire [9:0] wide_exponent; wire [9:0] wide_exponent__1; wire [7:0] MAX_EXPONENT; wire [22:0] literal_29344; wire [8:0] wide_exponent__2; wire eq_29346; wire eq_29347; wire eq_29348; wire eq_29349; wire [2:0] fraction_shift__2; wire is_operand_inf; wire and_reduce_29367; wire has_pos_inf; wire has_neg_inf; wire [27:0] rounded_fraction; wire [2:0] fraction_shift__1; wire [27:0] shrl_29380; wire is_result_nan; wire result_sign; wire [22:0] result_fraction; wire [22:0] sign_ext_29386; wire result_sign__1; wire [22:0] result_fraction__3; wire [22:0] FRACTION_HIGH_BIT; wire result_sign__2; wire [7:0] result_exponent__2; wire [22:0] result_fraction__4; assign y_bexp__2 = y[30:23]; assign literal_29086 = 1'h0; assign x_bexp__2 = x[30:23]; assign y__1_bexpnot__1 = ~y_bexp__2; assign x_bexp_extended__2 = {literal_29086, x_bexp__2}; assign y__1_bexpnot_extended__1 = {literal_29086, y__1_bexpnot__1}; assign full_result = x_bexp_extended__2 + y__1_bexpnot_extended__1; assign overflow_detected = full_result[8]; assign y_fraction__2 = y[22:0]; assign tuple_index_29094 = x[22:0]; assign x_bexp__3 = overflow_detected ? x_bexp__2 : y_bexp__2; assign literal_29096 = 8'h00; assign y_bexp__3 = overflow_detected ? y_bexp__2 : x_bexp__2; assign literal_29098 = 1'h1; assign x_fraction__1 = overflow_detected ? tuple_index_29094 : y_fraction__2; assign y_fraction__3 = overflow_detected ? y_fraction__2 : tuple_index_29094; assign nc = ~overflow_detected; assign y_sign__2 = y[31:31]; assign fraction_x = {literal_29098, x_fraction__1}; assign fraction_y = {literal_29098, y_fraction__3}; assign sign_ext_29108 = {24{y_bexp__3 != literal_29096}}; assign narrowed_result = full_result[7:0]; assign x_bexpor_mask__1 = {8{nc}}; assign tuple_index_29113 = x[31:31]; assign fraction_x__1 = fraction_x & {24{x_bexp__3 != literal_29096}}; assign fraction_y__1 = fraction_y & sign_ext_29108; assign xddend_x__2_squeezed_const_lsb_bits = 3'h0; assign result = narrowed_result ^ x_bexpor_mask__1; assign x_sign__1 = overflow_detected ? tuple_index_29113 : ~y_sign__2; assign y_sign__3 = overflow_detected ? ~y_sign__2 : tuple_index_29113; assign wide_x_squeezed = {literal_29086, fraction_x__1}; assign wide_y_shift_bits = {fraction_y__1, xddend_x__2_squeezed_const_lsb_bits}; assign shift = result + {7'h00, overflow_detected}; assign shrl_29127 = shift >= 8'h1b ? 27'h000_0000 : wide_y_shift_bits >> shift; assign shll_29129 = shift >= 8'h1c ? 28'h000_0000 : 28'hfff_ffff << shift; assign xddend_x__2_squeezed = x_sign__1 ^ y_sign__3 ? -wide_x_squeezed : wide_x_squeezed; assign literal_29131 = 2'h0; assign literal_29139 = 24'h00_0000; assign add_29140 = {{1{xddend_x__2_squeezed[24]}}, xddend_x__2_squeezed} + {literal_29131, shrl_29127[26:3]}; assign sticky = ~({literal_29086, ~y_fraction__3} | ~sign_ext_29108 | shll_29129[26:3]) != literal_29139; assign concat_29146 = {add_29140[24:0], shrl_29127[2:1], shrl_29127[0] | sticky}; assign xbs_fraction__1 = add_29140[25] ? -concat_29146 : concat_29146; assign carry_bit = xbs_fraction__1[27]; assign nor_29187 = ~(xbs_fraction__1[25] | xbs_fraction__1[24]); assign nor_29182 = ~(xbs_fraction__1[17] | xbs_fraction__1[16]); assign nor_29183 = ~(xbs_fraction__1[19] | xbs_fraction__1[18]); assign nor_29173 = ~(xbs_fraction__1[9] | xbs_fraction__1[8]); assign nor_29174 = ~(xbs_fraction__1[11] | xbs_fraction__1[10]); assign and_29216 = ~(carry_bit | xbs_fraction__1[26]) & nor_29187; assign nor_29218 = ~(xbs_fraction__1[21] | xbs_fraction__1[20]); assign nor_29220 = ~(carry_bit | ~xbs_fraction__1[26]); assign and_29213 = nor_29183 & nor_29182; assign nor_29209 = ~(xbs_fraction__1[13] | xbs_fraction__1[12]); assign and_29205 = nor_29174 & nor_29173; assign nor_29206 = ~(xbs_fraction__1[11] | ~xbs_fraction__1[10]); assign nor_29200 = ~(xbs_fraction__1[5] | xbs_fraction__1[4]); assign nor_29202 = ~(xbs_fraction__1[7] | xbs_fraction__1[6]); assign and_29245 = ~(xbs_fraction__1[23] | xbs_fraction__1[22]) & nor_29218; assign nor_29226 = ~(xbs_fraction__1[1] | xbs_fraction__1[0]); assign nor_29227 = ~(xbs_fraction__1[3] | xbs_fraction__1[2]); assign and_29266 = and_29216 & and_29245; assign priority_sel_29267 = priority_sel_2b_2way({~(carry_bit | xbs_fraction__1[26] | nor_29187), and_29216}, {nor_29220, literal_29086}, {literal_29098, ~(xbs_fraction__1[25] | ~xbs_fraction__1[24])}, {literal_29086, nor_29220}); assign and_29262 = ~(xbs_fraction__1[15] | xbs_fraction__1[14]) & nor_29209; assign and_29258 = nor_29202 & nor_29200; assign and_29254 = nor_29227 & nor_29226; assign concat_29280 = {literal_29098, ~(xbs_fraction__1[23] | xbs_fraction__1[22] | nor_29218) ? {literal_29098, ~(xbs_fraction__1[21] | ~xbs_fraction__1[20])} : {literal_29086, ~(xbs_fraction__1[23] | ~xbs_fraction__1[22])}}; assign concat_29277 = {and_29213, priority_sel_2b_2way({~(xbs_fraction__1[19] | xbs_fraction__1[18] | nor_29182), and_29213}, literal_29131, {literal_29098, ~(xbs_fraction__1[17] | ~xbs_fraction__1[16])}, {nor_29183, ~(xbs_fraction__1[19] | ~xbs_fraction__1[18])})}; assign concat_29276 = {literal_29098, ~(xbs_fraction__1[15] | xbs_fraction__1[14] | nor_29209) ? {literal_29098, ~(xbs_fraction__1[13] | ~xbs_fraction__1[12])} : {literal_29086, ~(xbs_fraction__1[15] | ~xbs_fraction__1[14])}}; assign concat_29274 = {and_29205, priority_sel_2b_2way({~(xbs_fraction__1[11] | xbs_fraction__1[10] | nor_29173), and_29205}, {nor_29206, literal_29086}, {literal_29098, ~(xbs_fraction__1[9] | ~xbs_fraction__1[8])}, {nor_29174, nor_29206})}; assign concat_29273 = {literal_29098, ~(xbs_fraction__1[7] | xbs_fraction__1[6] | nor_29200) ? {literal_29098, ~(xbs_fraction__1[5] | ~xbs_fraction__1[4])} : {nor_29202, ~(xbs_fraction__1[7] | ~xbs_fraction__1[6])}}; assign and_29285 = and_29213 & and_29262; assign concat_29289 = {literal_29098, and_29254, priority_sel_2b_2way({~(xbs_fraction__1[3] | xbs_fraction__1[2] | nor_29226), and_29254}, literal_29131, {literal_29098, ~(xbs_fraction__1[1] | ~xbs_fraction__1[0])}, {nor_29227, ~(xbs_fraction__1[3] | ~xbs_fraction__1[2])})}; assign sel_29398 = ~(~and_29266 | and_29285) ? {literal_29098, ~(~and_29213 | and_29262) ? concat_29276 : concat_29277} : {and_29266, priority_sel_3b_2way({~(~and_29216 | and_29245), and_29266}, {priority_sel_29267, literal_29086}, concat_29280, {literal_29086, priority_sel_29267})}; assign concat_29297 = {literal_29098, and_29205 & and_29258 ? concat_29289 : {literal_29086, ~(~and_29205 | and_29258) ? concat_29273 : concat_29274}}; assign leading_zeroes = and_29266 & and_29285 ? concat_29297 : {literal_29086, sel_29398}; assign cancel_fraction = leading_zeroes >= 5'h1d ? 29'h0000_0000 : {literal_29086, xbs_fraction__1} << leading_zeroes; assign cancel_fraction__1 = cancel_fraction[27:1]; assign carry_fraction__1 = {xbs_fraction__1[27:2], xbs_fraction__1[1] | xbs_fraction__1[0]}; assign shifted_fraction = carry_bit ? carry_fraction__1 : cancel_fraction__1; assign normal_chunk = shifted_fraction[2:0]; assign fraction_shift__3 = 3'h4; assign half_way_chunk = shifted_fraction[3:2]; assign do_round_up = normal_chunk > fraction_shift__3 | half_way_chunk == 2'h3; assign add_29317 = {literal_29086, shifted_fraction[26:3]} + {literal_29139, do_round_up}; assign rounding_carry = add_29317[24]; assign add_29330 = {literal_29086, x_bexp__3} + 9'h001; assign sub_29331 = {5'h00, rounding_carry} - {literal_29086, leading_zeroes}; assign fraction_is_zero = add_29140 == 26'h000_0000 & ~(shrl_29127[1] | shrl_29127[2]) & ~(shrl_29127[0] | sticky); assign wide_exponent_associative_element = {literal_29086, add_29330}; assign wide_exponent_associative_element__1 = {{4{sub_29331[5]}}, sub_29331}; assign wide_exponent = wide_exponent_associative_element + wide_exponent_associative_element__1; assign wide_exponent__1 = wide_exponent & {10{~fraction_is_zero}}; assign MAX_EXPONENT = 8'hff; assign literal_29344 = 23'h00_0000; assign wide_exponent__2 = wide_exponent__1[8:0] & {9{~wide_exponent__1[9]}}; assign eq_29346 = x_bexp__3 == MAX_EXPONENT; assign eq_29347 = x_fraction__1 == literal_29344; assign eq_29348 = y_bexp__3 == MAX_EXPONENT; assign eq_29349 = y_fraction__3 == literal_29344; assign fraction_shift__2 = 3'h3; assign is_operand_inf = eq_29346 & eq_29347 | eq_29348 & eq_29349; assign and_reduce_29367 = &wide_exponent__2[7:0]; assign has_pos_inf = ~(~eq_29346 | ~eq_29347 | x_sign__1) | ~(~eq_29348 | ~eq_29349 | y_sign__3); assign has_neg_inf = eq_29346 & eq_29347 & x_sign__1 | eq_29348 & eq_29349 & y_sign__3; assign rounded_fraction = {add_29317, normal_chunk}; assign fraction_shift__1 = rounding_carry ? fraction_shift__3 : fraction_shift__2; assign shrl_29380 = rounded_fraction >> fraction_shift__1; assign is_result_nan = ~(~eq_29346 | eq_29347) | ~(~eq_29348 | eq_29349) | has_pos_inf & has_neg_inf; assign result_sign = priority_sel_1b_2way({add_29140[25], fraction_is_zero}, x_sign__1 & y_sign__3, ~y_sign__3, y_sign__3); assign result_fraction = shrl_29380[22:0]; assign sign_ext_29386 = {23{~(is_operand_inf | wide_exponent__2[8] | and_reduce_29367 | ~((|wide_exponent__2[8:1]) | wide_exponent__2[0]))}}; assign result_sign__1 = is_operand_inf ? ~has_pos_inf : result_sign; assign result_fraction__3 = result_fraction & sign_ext_29386; assign FRACTION_HIGH_BIT = 23'h40_0000; assign result_sign__2 = ~is_result_nan & result_sign__1; assign result_exponent__2 = is_result_nan | is_operand_inf | wide_exponent__2[8] | and_reduce_29367 ? MAX_EXPONENT : wide_exponent__2[7:0]; assign result_fraction__4 = is_result_nan ? FRACTION_HIGH_BIT : result_fraction__3; assign out = {result_sign__2, result_exponent__2, result_fraction__4}; endmodule