That is the guy whose car is broken.
That is the guy whose car I rented.
What is the function of "whose" in both of above sentences. Is it subject or object, or something else of the relative clause? Kindly elaborate function of each part of speech those plays in above both sentences.