Created
March 5, 2015 16:37
-
-
Save snoopspy/3789e9c9aec3dc35ee1d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
unsigned __attribute__ ((noinline)) f(unsigned a) | |
{ | |
return a/9; | |
.cfi_startproc | |
movl %edi, %eax | |
movl $954437177, %edx | |
mull %edx | |
shrl %edx | |
movl %edx, %eax | |
ret | |
.cfi_endproc | |
} | |
int main() | |
{ | |
unsigned a; | |
std::cin >> a; | |
unsigned b = f(a); | |
std::cout << b << std::endl; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment