![2. [30] Consider the following C code int sum(int n) int i 1; int result0; do i result +ii while in) return result; Implement](https://media.cheggcdn.com/media%2Ff49%2Ff49ee2b2-5e4b-4c26-a15c-385bce1d295f%2Fimage.png)
2. [30] Consider the following C code int sum(int n) int i 1; int result0; do i result +ii while in) return result; Implement the do-while loop above in x86-64. Use the following as a framework: long sum (long n) ( if (n < 1) return 0 long i1; long result-0 // Ensure that argument *n* is in %rdí, *i* is in %rcx, // *result* is in %rax – do not modify