Query on Taxation First In first Out(FIFO) when pledging the shares

@Quicko Can you please help me how your taxation works in this scenario?

Day 1. I have bought 100 shares of Niftybees
Day 2. Pledged 100 shares bought in Day 1 for margin
Day 3. Buying additional 100 shares of Niftybees
Day 4. Selling 100 shares of Niftybees

How the taxation works for Day 4 sell?
Whether taxation will be for 100 shares bought in Day1 because of FIFO or it will be for shares bought on Day 3 as Day 1 shares are pledged?