AMD Interview Question

Debug a program, of about 50 lines. Pretty easy one.