How many minutes old?
Read an age in whole years with scanf and print how many minutes that is, counting every year as 365 days. For the input 19:
19 years is 9986400 minutes
The starter has both format strings and a 4-byte slot in .bss, years_in. Call scanf with fmt_in in x0 and the address of years_in in x1, then load the age into years_r.
A year has 525600 minutes, so at 4086 years the answer no longer fits in 32 bits (the largest 32-bit int is 2147483647). Widen the age first: sxtw copies a 32-bit w value into a 64-bit x register and keeps its sign, and mul on x registers then gives the full 64-bit product. %ld prints a 64-bit x register. 525600 is too wide for one mov, so build it with mul from 1440 (minutes in a day) and 365.
What is checked
- with input
19the line above is printed - the program exits cleanly
sxtwwidens the age- the program also runs on ages you do not see: zero, a negative number, and ages whose minutes do not fit in 32 bits
specification
sxtwWe run your program on the input above and on the hidden ones, and compare what it does. Nothing is matched against a stored solution.