Precedence of Load balancer rules and Origin rules

I have two origins.
I set weight 0.9 for the first origin and 0.1 for the second one in Load balancer settings.
Next I set Origin rule that will choose origin by user-agent string of http request.

If Load balancer will choose first origin and Origin rule will choose the second one which origin will request be sent to?

I have not found answer in documentation.