Help with writing a delay code in assembly for ATmega328P

Hello to everyone , I the the following code using assembly language in Atmel studio.

.ORG 0
** JMP MAIN**
.ORG 0x02
** JMP i1**
.ORG 0x04
** JMP i2**
MAIN: LDI R20,HIGH(RAMEND)
** OUT SPH,R20**
** LDI R20,LOW(RAMEND)**
** OUT SPL,R20**
** LDI R20,0x6**
** STS EICRA,R20**
** SBI PORTD,2**
** SBI PORTD,3**
** LDI R20,(1<<INT0) | (1<<INT1)**
** OUT EIMSK,R20**
** SEI**

HERE: JMP HERE
i1:
** LDI DDRB,0x01**
** OUT DDRB,R21**
** OUT PORTB,R21**
** RETI**
i2: LDI DDRB,0x02
** OUT DDRB,R21**
** OUT PORTB,R21**
** RETI**

This code is working and the hardware setup is fixed. I am facing switch bouncing issues. Occasionally the switch receives two inputs. I want to add 50ms delay in the main program. I need help to write a delay code in assembly.

ldi r16, x ; 1 cycle
ldi r17, y ; 1 cycle
loop: nop ; 1 cycle
dec r16 ; 1 cycle
brne skip ; 2 cycles when jumping, 1 otherwise
dec r17 ; 1 cycle
skip: brne loop ; 2 cycles when jumping, 1 otherwise

I found the above coding from stack overflow. Can someone help me to modify this code to wait for 50ms?

Thank you.

(deleted)