1 #include <math.h> 2 llrint(double x)3 long long llrint(double x) 4 { 5 long long n; 6 __asm__ ( 7 "frintx %d1, %d1\n" 8 "fcvtzs %x0, %d1\n" : "=r"(n), "+w"(x)); 9 return n; 10 } 11