then you go to macau. then back to HK with your air-ticket. it should be fine as long as you don't stay at each place more than 7 days upon each entry.
theoretically, the HK have to be transit place, not the terminal place. but
you can stay HK no more than 7 days and come back SG directly. normally the customers officer will not ask you. If you are checked by the customer officer, you just say, I am not sure your rules. Do not worry about it