ぎわであれば
same giwadeareba

Noun
Da Copula

The "-eba" conditional form ("if/when…") of 覚め際

1. If/when waking up; At the moment of waking

Ba Conditional