your code does not make much sense to me.
You are calling get_sub_field() but you do not have a have_rows() loop. You cannot get sub fields of a repeater without a loop.
From there is just gets more confusing.
A better explanation of the fields being used here might help.