Advertisement
Guest User

Untitled

a guest
May 3rd, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.14 KB | None | 0 0
  1. #include <time.h>
  2. #include <stdlib.h>
  3.  
  4. int bar1(int a) {
  5. srand(time(NULL));
  6. return rand();
  7. }
  8.  
  9. int bar2(int a) {
  10. srand(time(NULL));
  11. return rand();
  12. }
  13.  
  14.  
  15.  
  16. void foo() {
  17. int a = 5;
  18. switch (bar1(a)) {
  19. case 1:
  20. bar1(a);
  21. break;
  22. case 2:
  23. bar2(a);
  24. break;
  25. }
  26. bar1(a);
  27. }
  28.  
  29. int main() {
  30.  
  31. }
  32.  
  33.  
  34. #include <time.h>
  35. #include <stdlib.h>
  36.  
  37. int bar1(int a) {
  38. srand(time(NULL));
  39. return rand();
  40. }
  41.  
  42. int bar2(int a) {
  43. srand(time(NULL));
  44. return rand();
  45. }
  46.  
  47.  
  48.  
  49. void foo() {
  50. int a = 5;
  51. switch (bar1(a)) {
  52. case 1:
  53. bar1(a);
  54. break;
  55. case 2:
  56. bar2(a);
  57. break;
  58. }
  59. bar1(a);
  60. }
  61.  
  62. int main() {
  63.  
  64. }
  65.  
  66. //./bin/parry foo some.c 23:store-26:store,20:load-26:load arm --output compiled.c --ccflags -D__arm__
  67.  
  68. #include <time.h>
  69. #include <stdlib.h>
  70.  
  71. int bar1(int a) {
  72. srand(time(NULL));
  73. return rand();
  74. }
  75.  
  76. int bar2(int a) {
  77. srand(time(NULL));
  78. return rand();
  79. }
  80.  
  81.  
  82. void foo() {
  83. int a = 5;
  84. switch (bar1(a)) {
  85. case 1:
  86. bar1(a);
  87. __asm__ __volatile__ ("DMB" ::: "memory");
  88. break;
  89. case 2:
  90. bar2(a);
  91. __asm__ __volatile__ ("DMB ST" ::: "memory");
  92. break;
  93. }
  94. bar1(a);
  95. }
  96.  
  97. int main() {
  98.  
  99. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement