formulas – google-sheet filter only gets the lower cell value

I'm trying to filter my Google sheet (attached) and get the last cell value. In the attached spreadsheet, I try to find the last status of each cylinder based on the cylinder number.

Each cylinder of gas is filled on a given date and empties on another date, it goes on further. But I want to grab the last entry of each cylinder.

I can do it in two stages, but it's not practical because I have at least 20 different cylinders.

First, I get the historical status of each cylinder with (look at J2)

    = FILTER (C2: C, D2: D = G2)

so I find the last row (look at K2)

= INDEX (C2: C, COUNTA (C2: C))

How can I combine them into one formula?

https://docs.google.com/spreadsheets/d/1BtRgRZPzXKaQ4iHQbvP0zm0-CJ7Dg0HKt2bnw6TeGLU/edit?usp=sharing