> But when i opened optmization, on the debugger jumps another location that is not in my code sequence.
This is a common effect with optimized code. There is no one-to-one relation between C source lines and assembler instructions anymore, and lines or variables are removed (optimized out). Don't get confused with single-stepping your code.
First check if the code behaves correctly, i.e. according to your intended functionality.
If not, you might need to rework your code, as Converse suggested.