def __do_case_5_work(d_w, d_u, case_1, case_2, case_3, dfs_data):
<EOL>if case_3:<EOL><INDENT>return False<EOL><DEDENT>comp_d_w = abs(d_w)<EOL>__insert_frond_LF(d_w, d_u, dfs_data)<EOL>m = dfs_data['<STR_LIT>']['<STR_LIT:m>']<EOL>Lm = L(m, dfs_data)<EOL>if comp_d_w < Lm['<STR_LIT:u>']:<EOL><INDENT>Lm['<STR_LIT:u>'] = d_w<EOL><DEDENT>if d_u > Lm['<STR_LIT:v>']:<EOL><INDENT>Lm['<STR_LIT:v>'] = d_u<EOL><DEDENT>if case_2:<EOL><INDENT>Lm['<STR_LIT:u>'] = d_w<EOL>x_m1 = fn_x(m-<NUM_LIT:1>, dfs_data)<EOL>while comp_d_w < x_m1:<EOL><INDENT>merge_Fm(dfs_data)<EOL>m = dfs_data['<STR_LIT>']['<STR_LIT:m>']<EOL>x_m1 = fn_x(m-<NUM_LIT:1>, dfs_data)<EOL><DEDENT><DEDENT>return True<EOL>
Encapsulates the work that will be done for case 5 of __embed_frond,
    since it gets used in more than one place.