Can White live in a corner in this situation?

Hi all!
In one of my recent games I encountered this situation:
Now, I am curious if White can live in the corner after move 25.
BTW, in the actual game White survived, but I think only because Black did not read situation correctly.
What do you think?

I’m probably not the best person to be commenting on this topic, but here goes.

Fundamentally, White’s shape is a rectangular six in the corner (

While you might expect white to live by playing S1 or S2 on your demo board, Black can respond with Q1 and crumple the shape, killing it. If White plays Q1 first then Black can play at S2 to kill. So I don’t think there’s a way for White to live.

But of course I’m DDK, so there’s probably some line of play that works that I don’t know.

Hi archpaladin1!
You are right, after White Q1, Black kills with S2. But the complication in this particular case is that White threatens to kill Black group at P3.
For example, If White plays R1, then Black S2 is a losing move for Black, his group dies before he manages to kill White (I’ve tried to show that in a couple of variations).
So, what do you think, can White survive with R1?

It seems that white can get a ko at best. I posted one variation that leads to ko in the review chat, there are many other ones. I’m not sure whether white can be killed unconditionnally or not.

I added my opinion. I think white can’t get a ko.

Thank you @wurfmaul! Looks like you are right and White is unconditionally dead here.