fork download
  1. VC++ ASSEMBLY:
  2.  
  3. void baseline(signed n, signed& cr0) {
  4. 00401500 push ebp
  5. 00401501 mov ebp,esp
  6. cr0 = 4;
  7. 00401503 mov eax,dword ptr [cr0]
  8. 00401506 mov dword ptr [eax],4
  9. }
  10. 0040150C pop ebp
  11. 0040150D ret 8
  12.  
  13. void jalf(signed n, signed& cr0) {
  14. 00401540 push ebp
  15. 00401541 mov ebp,esp
  16. cr0 = 1 << ((n >= 0) + (n == 0));
  17. 00401543 mov eax,dword ptr [n]
  18. 00401546 xor ecx,ecx
  19. 00401548 test eax,eax
  20. 0040154A setns cl
  21. 0040154D xor edx,edx
  22. 0040154F test eax,eax
  23. 00401551 sete dl
  24. 00401554 mov eax,1
  25. 00401559 add ecx,edx
  26. 0040155B shl eax,cl
  27. 0040155D mov ecx,dword ptr [cr0]
  28. 00401560 mov dword ptr [ecx],eax
  29. }
  30. 00401562 pop ebp
  31. 00401563 ret 8
  32.  
  33.  
  34.  
  35. GCC ASSEMBLY:
  36.  
  37. .globl __Z8baselineiRi
  38. .def __Z8baselineiRi; .scl 2; .type 32; .endef
  39. __Z8baselineiRi:
  40. pushl %ebp
  41. movl %esp, %ebp
  42. movl 12(%ebp), %eax
  43. movl $4, (%eax)
  44. popl %ebp
  45. ret
  46. .p2align 4,,15
  47.  
  48.  
  49. .globl __Z4jalfiRi
  50. .def __Z4jalfiRi; .scl 2; .type 32; .endef
  51. __Z4jalfiRi:
  52. pushl %ebp
  53. xorl %ecx, %ecx
  54. movl %esp, %ebp
  55. movl 8(%ebp), %eax
  56. movl 12(%ebp), %edx
  57. testl %eax, %eax
  58. notl %eax
  59. sete %cl
  60. shrl $31, %eax
  61. addl %eax, %ecx
  62. movl $1, %eax
  63. sall %cl, %eax
  64. movl %eax, (%edx)
  65. popl %ebp
  66. ret
  67. .p2align 4,,15
  68.  
Not running #stdin #stdout 0s 0KB
stdin
Standard input is empty
stdout
Standard output is empty