calling a function from main loop using push button code

i have a code with two loops

Do you ?
I see a program with one function that loops (the loop() function) and 2 functions named loop1() and loop2() that don't loop but are both called repeatedly.

Do you mean that you want to call either loop1() or loop2() repeatedly from the loop() function depending on whether an input is HIGH or LOW (or maybe if an input becomes HIGH or LOW) ?