| 1 | Start outer loop | 0 | - | - | true | Start comparing pattern at i=0 | - |
| 2 | Compare chars | 0 | 0 | 'a' == 'a' | true | Continue | - |
| 3 | Compare chars | 0 | 1 | 'b' == 'b' | true | Continue | - |
| 4 | Compare chars | 0 | 2 | 'c' == 'c' | true | Continue | - |
| 5 | Compare chars | 0 | 3 | 'x' == 'd' | false | Mismatch, break inner loop | - |
| 6 | Increment i | 1 | - | - | - | Try next position i=1 | - |
| 7 | Start outer loop | 1 | - | - | true | Start comparing pattern at i=1 | - |
| 8 | Compare chars | 1 | 0 | 'b' == 'a' | false | Mismatch, break inner loop | - |
| 9 | Increment i | 2 | - | - | - | Try next position i=2 | - |
| 10 | Start outer loop | 2 | - | - | true | Start comparing pattern at i=2 | - |
| 11 | Compare chars | 2 | 0 | 'c' == 'a' | false | Mismatch, break inner loop | - |
| 12 | Increment i | 3 | - | - | - | Try next position i=3 | - |
| 13 | Start outer loop | 3 | - | - | true | Start comparing pattern at i=3 | - |
| 14 | Compare chars | 3 | 0 | 'x' == 'a' | false | Mismatch, break inner loop | - |
| 15 | Increment i | 4 | - | - | - | Try next position i=4 | - |
| 16 | Start outer loop | 4 | - | - | true | Start comparing pattern at i=4 | - |
| 17 | Compare chars | 4 | 0 | 'a' == 'a' | true | Continue | - |
| 18 | Compare chars | 4 | 1 | 'b' == 'b' | true | Continue | - |
| 19 | Compare chars | 4 | 2 | 'c' == 'c' | true | Continue | - |
| 20 | Compare chars | 4 | 3 | 'd' == 'd' | true | Continue | - |
| 21 | Compare chars | 4 | 4 | 'a' == 'a' | true | Continue | - |
| 22 | Compare chars | 4 | 5 | 'b' == 'b' | true | Continue | - |
| 23 | Compare chars | 4 | 6 | 'x' == 'c' | false | Mismatch, break inner loop | - |
| 24 | Increment i | 5 | - | - | - | Try next position i=5 | - |
| 25 | Start outer loop | 5 | - | - | true | Start comparing pattern at i=5 | - |
| 26 | Compare chars | 5 | 0 | 'b' == 'a' | false | Mismatch, break inner loop | - |
| 27 | Increment i | 6 | - | - | - | Try next position i=6 | - |
| 28 | Start outer loop | 6 | - | - | true | Start comparing pattern at i=6 | - |
| 29 | Compare chars | 6 | 0 | 'c' == 'a' | false | Mismatch, break inner loop | - |
| 30 | Increment i | 7 | - | - | - | Try next position i=7 | - |
| 31 | Start outer loop | 7 | - | - | true | Start comparing pattern at i=7 | - |
| 32 | Compare chars | 7 | 0 | 'd' == 'a' | false | Mismatch, break inner loop | - |
| 33 | Increment i | 8 | - | - | - | Try next position i=8 | - |
| 34 | Start outer loop | 8 | - | - | true | Start comparing pattern at i=8 | - |
| 35 | Compare chars | 8 | 0 | 'a' == 'a' | true | Continue | - |
| 36 | Compare chars | 8 | 1 | 'b' == 'b' | true | Continue | - |
| 37 | Compare chars | 8 | 2 | 'x' == 'c' | false | Mismatch, break inner loop | - |
| 38 | Increment i | 9 | - | - | - | Try next position i=9 | - |
| 39 | Start outer loop | 9 | - | - | true | Start comparing pattern at i=9 | - |
| 40 | Compare chars | 9 | 0 | 'b' == 'a' | false | Mismatch, break inner loop | - |
| 41 | Increment i | 10 | - | - | - | Try next position i=10 | - |
| 42 | Start outer loop | 10 | - | - | true | Start comparing pattern at i=10 | - |
| 43 | Compare chars | 10 | 0 | 'x' == 'a' | false | Mismatch, break inner loop | - |
| 44 | Increment i | 11 | - | - | - | Try next position i=11 | - |
| 45 | Start outer loop | 11 | - | - | true | Start comparing pattern at i=11 | - |
| 46 | Compare chars | 11 | 0 | 'a' == 'a' | true | Continue | - |
| 47 | Compare chars | 11 | 1 | 'b' == 'b' | true | Continue | - |
| 48 | Compare chars | 11 | 2 | 'c' == 'c' | true | Continue | - |
| 49 | Compare chars | 11 | 3 | 'd' == 'd' | true | Continue | - |
| 50 | Compare chars | 11 | 4 | 'a' == 'a' | true | Continue | - |
| 51 | Compare chars | 11 | 5 | 'b' == 'b' | true | Continue | - |
| 52 | Compare chars | 11 | 6 | 'c' == 'c' | true | Continue | - |
| 53 | Compare chars | 11 | 7 | 'y' == 'y' | true | Pattern matched fully | Pattern found at index 11 |
| 54 | Increment i | 12 | - | - | - | Try next position i=12 | - |
| 55 | Start outer loop | 12 | - | - | true | Start comparing pattern at i=12 | - |
| 56 | Compare chars | 12 | 0 | 'b' == 'a' | false | Mismatch, break inner loop | - |
| 57 | Increment i | 13 | - | - | - | Try next position i=13 | - |
| 58 | Start outer loop | 13 | - | - | true | Start comparing pattern at i=13 | - |
| 59 | Compare chars | 13 | 0 | 'c' == 'a' | false | Mismatch, break inner loop | - |
| 60 | Increment i | 14 | - | - | - | Try next position i=14 | - |
| 61 | Start outer loop | 14 | - | - | true | Start comparing pattern at i=14 | - |
| 62 | Compare chars | 14 | 0 | 'd' == 'a' | false | Mismatch, break inner loop | - |
| 63 | Increment i | 15 | - | - | - | Try next position i=15 | - |
| 64 | Start outer loop | 15 | - | - | true | Start comparing pattern at i=15 | - |
| 65 | Compare chars | 15 | 0 | 'a' == 'a' | true | Continue | - |
| 66 | Compare chars | 15 | 1 | 'b' == 'b' | true | Continue | - |
| 67 | Compare chars | 15 | 2 | 'c' == 'c' | true | Continue | - |
| 68 | Compare chars | 15 | 3 | 'd' == 'd' | true | Continue | - |
| 69 | Compare chars | 15 | 4 | 'a' == 'a' | true | Continue | - |
| 70 | Compare chars | 15 | 5 | 'b' == 'b' | true | Continue | - |
| 71 | Compare chars | 15 | 6 | 'c' == 'c' | true | Continue | - |
| 72 | Compare chars | 15 | 7 | 'y' == 'y' | true | Pattern matched fully | Pattern found at index 15 |
| 73 | Increment i | 16 | - | - | - | Try next position i=16 | - |
| 74 | Check loop condition | 16 | - | - | - | i > len(text)-len(pattern), stop | - |