
fib := λ(: x U64). (: (
   if (<( x 2u64 )) 1u64
   (+(
      (fib(- x 1u64))
      (fib(- x 2u64))
   ))
) U64);

main := (
   (pop( R8 ))
   (pop( R8 ))
   (pop( R8 ))
   (pop( R8 ))
   (mov( 0u64 RAX ))
   (mov( 10u64 R9 ))
   (gensym-label argv)
   (gensym-label begin)
   (label argv)
   (mov( 0u64 R10 ))
   (deref( R8 R10B ))
   (cmp( 0u8 R10B ))
   (je( begin ))
   (mul( R9 ))
   (sub( 48u64 R10 ))
   (add( R10 RAX ))
   (inc( R8 ))
   (jmp( argv ))
   (label begin)
   (fib( RAX ))
);
