| 21 | } |
| 22 | |
| 23 | __attribute__((noinline)) |
| 24 | void inner(int x, int y) { |
| 25 | if (x == y) inner(x + 1, y - 1); // avoid inlining in binaryen |
| 26 | DO_SCAN |
| 27 | printf("a %d, %d\n", x, y); |
| 28 | assert(seenInts.count(314159)); |
| 29 | assert(seenInts.count(21828)); |
| 30 | assert(seenInts.size() < 1000); |
| 31 | seenInts.clear(); |
| 32 | int z; |
| 33 | if (x < y) { |
| 34 | printf("left..\n"); |
| 35 | z = x + 100; |
| 36 | DO_SCAN |
| 37 | printf("..left\n"); |
| 38 | } else { |
| 39 | printf("right..\n"); |
| 40 | z = y + 200; |
| 41 | DO_SCAN |
| 42 | printf("..right\n"); |
| 43 | } |
| 44 | printf("b %d, %d, %d\n", x, y, z); |
| 45 | assert(seenInts.count(314159)); |
| 46 | assert(seenInts.count(21828)); |
| 47 | assert(seenInts.count(22028)); |
| 48 | assert(seenInts.size() < 1000); |
| 49 | seenInts.clear(); |
| 50 | } |
| 51 | |
| 52 | int main() { |
| 53 | int x = EM_ASM_INT({ return 314159 }); |