Gonna nitpick here and be pedantic. Regardless of gear ratio, it’s all leg power. Gearing simply allows the rider to go slower, which does allows for a lower required power, but for a longer duration of time. The amount of total energy output is effectively the same.
Source: cycling nerd who is obsessed with power.