Problem with.... something? Working with assembly...

Here is a very basic example sketch to blink an LED by calling a function with two arguments:

The .ino sketch:

extern "C" {
  void start(uint8_t arg1, uint16_t arg2); // First argument is passed thru r24/r25, second thru r22/r23,...
}

int main(void) {
  start(250, 3000);

while(true);
}

The .S part of the sketch:

; Blink LED on PB5(Arduino Uno pin 13)

#define __SFR_OFFSET 0
#include   "avr/io.h"

.global start

start:
SBI      DDRB, 5
blink:
mov r20, r24 ;***
CALL       delay_n_ms
SBI      PORTB, 5
mov r20, r24 ;***
CALL       delay_n_ms
CBI      PORTB, 5
JMP       blink

delay_n_ms:
; Delay about r20 * 1ms.  Destroys r20, r30, and r31.
; One millisecond is about 16000 cycles at 16MHz.
; The basic loop takes about 5 cycles, so we need about 3000 loops.
mov r31, r23 ;***
mov r30, r22 ;***
delaylp:
sbiw r30, 1
brne delaylp
subi r20, 1
brne delay_n_ms
ret